I hereby claim:
- I am n4j on github.
- I am n4j (https://keybase.io/n4j) on keybase.
- I have a public key whose fingerprint is 27EF 685F E428 8EA8 80F2 B9D4 5D6D AB4E C9E0 07E7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
%% source - https://www.erlang.org/doc/getting_started/seq_prog.html#maps | |
-module(color). | |
-export([new/4, blend/2]). | |
-define(is_channel(V), (is_float(V) andalso V >= 0.0 andalso V =< 1.0)). | |
new(R,G,B,A) when ?is_channel(R), ?is_channel(G), | |
?is_channel(B), ?is_channel(A) -> |
[[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1],[100000,1], |
["Solution","shuffle","reset","shuffle"] | |
[[[1,2,3]],[],[],[]] | |
["Solution","reset","shuffle"] | |
[[[-6,10,184]],[],[]] | |
["Solution","shuffle","shuffle","shuffle","shuffle"] | |
[[[0,-12893,128384]],[],[],[],[]] | |
["Solution","shuffle","reset","shuffle"] | |
[[[1,2,3]],[],[],[]] | |
["Solution","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle","shuffle"] | |
[[[83864, 71067, 33380, 66975, 69637, 55810, 59670, 96633, 53092, 62766, 94755, 63926, 73637, 6690, 70811, 91952, -2512, 29605, 96216, 24716, 49664, -994, 7977, 52236, 46364, 30921, 66459, 17510, -9120, 87124, 82817, 25083, -3238, 99903, 82376, -5820, 2420, 8012, 53504, 28441, 73990, 27692, 65073]], [], [], [], [], [], [], [], [], [], [], [], [] |
[3,9,20,15,7] | |
[9,3,15,20,7] | |
[-1] | |
[-1] | |
[3,9,10,20,15,11,7] | |
[10,9,3,11,15,20,7] | |
[1,2,4,6,5,3,7,8,9,10] | |
[4,2,5,6,1,3,8,9,7,10] | |
[4,5,3,17,2,6,7,1,9,8,10,11,13,14,15,20,19] | |
[3,2,6,17,1,7,5,9,8,4,10,14,13,11,20,15,19] |
[[2], [7, 4], [1, 11, 1990], [9, 4, 20, 23], [6, 1, 0, 19, 95]] | |
[[10000], [10000, 10000], [10000, 10000, 10000], [10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000]] | |
[[10000], [10000, 10000], [10000, 10000, 10000], [10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000, 10000, 10000]] | |
[[10000], [10000, -10000], [-10000, 10000, -10000], [10000, -10000, 10000, -10000], [-10000, 10000, -10000, 10000, -10000], [10000, -10000, 10000, -10000, 10000, -10000], [-10000, 10000, -10000, 10000, -10000, 10000,-10000]] | |
[[0]] | |
[[0], [0, 0]] | |
[[2],[-3,4],[100,99,7],[4,1,-8,3]] | |
[[3],[3,3],[3,3,3],[3,3,3,3],[3,3,3,3,3],[3,3,3,3,3,3],[3,3,3,3,3,0,3]] | |
[[0],[0,0],[0,0,0],[0,0,0,0],[0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0 |
["TreeAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getKthAncestor","getK |