Tag Archives: KDB

Publication on KDB

Its a lazy sunday morning and the first time I felt that high temperatures are coming back to the city. Winter is over. Perfect time, not to go out of home, cozily sit in your room and do some random … Continue reading

Posted in KDB, Q | Tagged | Leave a comment

Subvector grade up – QIdiom 7

x:1 0 0 1 0 0 1 0 y:14 12 18 16 13 15 11 17 Solution in K : {,/x+'<:’x _ y}[&x;y] 1 0 2 4 3 5 6 7 Solution Posted : {raze x +’ iasc each x … Continue reading

Posted in Q, Q Idioms | Tagged , , | Leave a comment

Factorial Program

Q Solution 1:  factorial:{prd 1+til x} Q Solution 2: n:5 do[-1+f:r:n;r*:f-:1] r 120 The solution 2 is referred from Execution Control chapter in Q for Mortals. Results : factorial[5] 120

Posted in Q | Tagged , , | 1 Comment