Jon's public fiddles
-
Multisort
Sorts by property 1, then by property 2, passed as global variables
-
Int64 method for BigEndian conversion
(inspired by a StackOverflow question : https://stackoverflow.com/questions/45455979/byte-array-to-uint64-as-a-string)
-
Combination generator
All patterns (n=13,k=6)
-
Chinese Remainder Theorem
a,b,m gives a mod m, b mod (m+1)
-
Partial array count
Adds partial sums of array
-
range finder
finds position of a value in a range
-
masterControl
applies an array of functions to an object array by object
-
Direct Product
multiplies two array together using direct product, flattens using Set
-
Permutator
finds the k-th permutation
-
remove by element
finds an element in array and removes it
-
multinomial calculator
enter an array, see the multinomial!
-
key game
place the keys in the locks
-
choose k from n
picks k distinct numbers from a pool
-
choose k from n
picks k distinct numbers from a pool
-
expectation and variance
calculate finite. discrete expectation and variance
-
javascript class extends
extends a basic rectangle class with a function to return the length of the diagonal.
-
Collision detection via Binary Clamped Arrays
Create a mask for two bitmaps (UInt8Array) where each bit is 0 or 1 (BinaryArray). Collision is when A AND B contains a 1.
-
repeated function call on multiple objects from same class
repeated function call on multiple objects from same class
-
same function on multiple objects
same function on multiple objects
-
dynamic array sum updating
dynamically updated the sum of an array