kxsystems / cookbook Goto Github PK
View Code? Open in Web Editor NEWCompanion files to the kdb+ Knowledge Base
Home Page: https://code.kx.com/q/kb
Companion files to the kdb+ Knowledge Base
Home Page: https://code.kx.com/q/kb
The Java code here: https://code.kx.com/q/kb/timezones/ is flawed when it comes to historical offset changes.
The code uses TimeZone.getTimeZone("...").getRawOffset()
, which as the JavaDoc states, only works for 'now':
This issue is seen when generating tzinfo for Europe/Istanbul - it returns +3h perpetually even though this should only be the case in more recent years (Oct 2018+); in older years it should still alternate between +2h and +3h.
Using ZonedDateTime.of(year, month, day, hour, min, sec, nano, ZoneId.of("...")).getOffset()
accurately returns historic offsets. It is not clear to me why storing DST as a separate offset was required in the first place.
System.out.println("Europe/Istanbul 2000.01.01 offset:");
ZonedDateTime zdtOne = ZonedDateTime.of(2000,1,1,9,15,0,0, ZoneId.of("Europe/Istanbul"));
System.out.println(zdtOne.getOffset()); // +02:00
System.out.println("Europe/Istanbul 2000.06.01 offset:");
ZonedDateTime zdtTwo = ZonedDateTime.of(2000,6,1,9,15,0,0, ZoneId.of("Europe/Istanbul"));
System.out.println(zdtTwo.getOffset()); // +03:00
When reading second+ chunks from same file the the script is treating data record as header and thus skips a record.
shouldn't this portion :
// check if we have already read some data from this file
// if this is the first time we've seen it, then the first row
// contains the header information, so we want to load it accounting for that
// in both cases we want to return a table with the same column names
data:$[filename in filesread;
[flip columnames!("PSFI S";enlist",")0:rawdata;
filesread,::filename];
columnnames xcol ("PSFI S";enlist",")0:rawdata];
be:
// check if we have already read some data from this file
// if this is the first time we've seen it, then the first row
// contains the header information, so we want to load it accounting for that
// in both cases we want to return a table with the same column names
data:$[filename in filesread;
[flip columnnames!("PSFI S";enlist",")0:rawdata];
[filesread,::filename;
columnnames xcol ("PSFI S";enlist",")0:rawdata]];
Hey all,
When I start up the tick.q with sym.q and feed.q with files provided as follows:
q tick.q sym -p 5010
q feed.q
The tickerplant process prints 'length
error on every update, which occurs when incorrect number of elements is passed: https://code.kx.com/wiki/Errors
I suspect that this happens when the feed process calls .u.upd
Are there any suggestions as to how to remove this problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.