kdb+ and q
Q+A on all things kdb+ database and the q language
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

md5 - getting the original string back.

Hello, Based on this link https://code.kx.com/q/ref/md5/ I understand using md5 keyword we could convert a string into an encoded value. Was wondering if there is a way to get the original string back. Any inputs on this would be great. Thanks in adv...

bindhusri by New Contributor
  • 4 replies
  • 0 kudos

Why does @ need :: and why does . need () in amend?

https://code.kx.com/q/ref/amend/Based on the above, why does . need () to get the entire list and @ need ()?Surely this would imply:q) 1 2 3 4 5 . () /this is NOT the case1 2 3 4 5 and q) list @ :: /this is NOT the caselistHowever q)list @ enlist[::]...

amend.png amend2.png
Mannix by New Contributor III
  • 1 replies
  • 0 kudos

Resolved! Why regular expression doesn't work with bracket?

I have below codes. Why the regular expression doesn't work with {2}? The last 2 lines should be 1b instead. How to make it work? Thanks. "42" like "[0-9][0-9]"; // i.e. 1b"42" like "[0-9]{2}"; // i.e. 0b "42" like "[0-9]{2,2}"; // i.e. 0b

vivo by New Contributor III
  • 2 replies
  • 0 kudos

xbar & timestamp manipulation

Hi, I have a minute table , from which I need to aggregate/process data for different intervals. In my case, as I need the equivalent of a (eg. hourly data from 10:00 to 11:00 must show on the output DT line yyyy.mm.ddD11:00:00), I use an offset va...

JP by New Contributor III
  • 2 replies
  • 0 kudos

rotate function differences between k and q

Following is the implementation of rotate function Orig: k){$[0h>@y;'`rank;98h<@y;'`type;#y;,/|(0;mod[x;#y])_y;y]} Working by making slight changes in q {$[0h>(@)y;'`rank;$[ 98h<(@)y;'`type; [ (#)y;(,/)(|)(0;mod[x;(#)y])_y;y ] ] ] } How is the strike...