

rolf
@rolf
•
Joined Feb 2024 •
Active a year ago
Forum Replies Created
-
q)t:([]sym:`a`b`c`d`e;x:til 5) q)t iasc`c`d?t`sym sym x ----- c 2 d 3 a 0 b 1 e 4
if you want to move the desired records to the top but want to preserve the order of the rest of the table
-
building on the above
rnd:{(`up`dn`nr!(f ceiling;(f:{string(x z*s)%s:10 xexp y})floor;.Q.f'))[z][;y;x]}
-
{key[x][i]!get[x]i:iasc key x:group(!). flip raze key[x],''get x}
indexing into the keys instead of doing a lookup a smidge faster
-
0: gets you the dashes in the date
-
i think this is what you are after
q)f:{abs(til[x]div 2)-x#(x-1),0} q)f each 2*1+til 5 1 0 3 0 2 1 5 0 4 1 3 2 7 0 6 1 5 2 4 3 9 0 8 1 7 2 6 3 5 4
i cannot claim authorship
-
rolf
MemberApril 25, 2022 at 12:00 am in reply to: Generating unique symbol list does not consider symbols after `pp is the 16th letter of the alphabet. not likely a coincidence.
-
q)f:"T"0:2 1#"dt"$ q)f .z.p "2022-03-04T11:07:52.077" / if you want to be picky about the type q)f:first"T"0:2 1#"dt"$ q)f .z.p "2022-03-04T11:08:49.988"