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

Forum Posts

How to pack a byte in q/kdb

What I'm trying to do here is pack a byte like I could in c# like this:string symbol = "T" + "\0"; byte orderTypeEnum = (byte)OrderType.Limit; int size = -10; byte[] packed = new byte[symbol.Length + sizeof(byte) + sizeof(int)]; // byte = 1, int = 4 ...

rtrader by New Contributor
  • 784 Views
  • 3 replies
  • 0 kudos

inserting timestamp

what's wrong with this?x: ([] time:`timestamp$(); v:`int$())x,: (2#.z.p; 2#1)`type/this works`x insert (2#.z.p; 2#1)/this also worksx: ([] y:`int$(); v:`int$())x,: (2#1; 2#1)

Object creation/destruction in C++

Let's say my C++ code has some object that needs to be used throughout the program:class API { API(); ~API(); void methodA() { std::cout << "called method A\n"; } void methodB() { std::cout << "called method B\n"; }}API api* = new API();extern "C" K ...

samsogade by New Contributor
  • 1103 Views
  • 3 replies
  • 0 kudos

Multi-threaded decompression

Hi,I am wondering why multi-threaded decompression (using peach) appears to be slower than using a single thread. Is there some sort of IPC between threads that's causing extra overhead? What is the right way to decompress in parallel?Thanks in advan...