skuvvv1
1
Hello to all.
Can this code be converted from c# into code in kdb?
I had read about read1, but I did not see anything about position of stream for writing.
static int GetInt32(string path, int index) { FileStream stream = new FileStream(path, FileMode.Open); stream.Position = index * 4; byte[] bytes = new byte[4]; stream.Read(bytes, 0, 4); int value = BitConverter.ToInt32(bytes, 0); stream.Close(); return value; } static void SetInt32(string path, int index, int value) { FileStream stream = new FileStream(path, FileMode.OpenOrCreate); stream.Position = index * 4; byte[] bytes = BitConverter.GetBytes(value); stream.Write(bytes, 0, 4); stream.Close(); }
skuvvv1
3
I am Windows user, so I do not have this command…
Hi,
read1 supports (file;offset;length) format.
WBR, Andrey Kozyrev
skuvvv1
5
Hello Andrew.
Yes I know about read0/read1, I already wrote about this.
2015-09-28 12:52 GMT+03:00 Andrew Kozyrev <quintanar401@gmail.com>:
Hi,
read1 supports (file;offset;length) format.
WBR, Andrey Kozyrev
–
You received this message because you are subscribed to a topic in the Google Groups “Kdb+ Personal Developers” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/personal-kdbplus/bK1AmUq1ciU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to personal-kdbplus+unsubscribe@googlegroups.com.
To post to this group, send email to personal-kdbplus@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.
If you are on windows, use cygwin dd.exe, C stdio, or C++ fstream to perform random writes.