You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eliminate nestjs in favor of /server sveltekit modules
sveltekit uses what's called server-only modules where code located under $lib/server/ can only be accessed on the server. this is where i'd put all the db and bot functionality.
for example
$lib/server/db could contain an index.ts file that sets up the db and exports functions like getUsers
constdb=setUpDB(DB_CONNECTION_STRING,DB_PASSWORD);// it's been a while since i've done this
This gist isn't mathematically rigorous so don't expect it to be as formal as something you'd find in academia.
how do you map from one range of numbers to another?
This problem arises in various math and computer science topics where your input range needs to be transformed to fit into a different range. For example, let's say you had frequency data of a song at a particular moment in time. Each sample is a value that ranges from 0 to 255. In interval notation, it would be written as [0, 255]. The square brackets denote that the endpoints are inclusive - in other words, 0 and 255 are acceptable. We want to take a sample in this range and map it to a different range. Let's say our output range is [-1, 1]. The [-1, 1] range actually pops up a lot in various fields such as graphics programming or trigonometry. For example the range for the sine and cosine functions is [-1, 1].
So we want to take the range [0, 255] and map it to the range [-1, 1]. Of course, we'd want the mapping t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters