473,287 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

File reading problem

Hi! I have a program with a class that needs to be able to write
itself to a file in clear text format. The file has two integers and
vector of struct objects. The struct has a string that can consist of
one or more words and a few integers. I'm able to create the file
properly, as confimed by viewing it in a text editor, but something
goes wrong when I tried to read it. I've made a test program
illustrating the problem:

#include <fstream>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

struct s_t
{
s_t() {}
s_t(const string& si, int xi, int yi) : s(si), x(xi), y(yi) {}
string s;
int x, y;

friend ostream& operator<<(ostream& os, const s_t& rhs);
friend istream& operator>>(istream& is, s_t& rhs);
};

ostream&
operator<<(ostream& os, const s_t& rhs)
{
os << rhs.s << endl;
os << rhs.x << ' ' << rhs.y;

return os;
}

istream&
operator>>(istream& is, s_t& rhs)
{
getline(is, rhs.s);

is >rhs.x >rhs.y;

return is;
}

void
readit()
{
int x = 0, y = 0;
vector<s_tvec;

ifstream in("foo.txt");

in >x >y;

{
s_t temp;

while (in >temp) vec.push_back(temp);
}

in.close();

cout << x << ' ' << y << endl;
cout << vec.size() << endl;
for (unsigned int i = 0; i < vec.size(); i++)
cout << vec.at(i) << endl;
}

int
main()
{
int x = 4711, y = 1337;
vector<s_tvec;

vec.push_back(s_t("foo bar", 33, 22));
vec.push_back(s_t("bar baz", 11, 99));

ofstream out("foo.txt");

out << x << ' ' << y << endl;
for (unsigned int i = 0; i < vec.size(); i++)
{
out << vec.at(i);

if (i < vec.size() - 1)
out << endl;
}

out.flush();
out.close();

readit();
}

When I run it, I get this output:
4711 1337
0

so it reads the first two numbers ok but reading the s_t objects
doesn't work because the vector is empty afterwards...

Any help appreciated.

- E

Jul 15 '07 #1
9 1886
Eric Lilja wrote:
Hi! I have a program with a class that needs to be able to write
itself to a file in clear text format. The file has two integers and
vector of struct objects. The struct has a string that can consist of
one or more words and a few integers. I'm able to create the file
properly, as confimed by viewing it in a text editor, but something
goes wrong when I tried to read it. I've made a test program
illustrating the problem:

#include <fstream>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

struct s_t
{
s_t() {}
s_t(const string& si, int xi, int yi) : s(si), x(xi), y(yi) {}
string s;
int x, y;

friend ostream& operator<<(ostream& os, const s_t& rhs);
friend istream& operator>>(istream& is, s_t& rhs);
};

ostream&
operator<<(ostream& os, const s_t& rhs)
{
os << rhs.s << endl;
os << rhs.x << ' ' << rhs.y;

return os;
}

istream&
operator>>(istream& is, s_t& rhs)
{
getline(is, rhs.s);

is >rhs.x >rhs.y;

return is;
}

void
readit()
{
int x = 0, y = 0;
vector<s_tvec;

ifstream in("foo.txt");

in >x >y;
After this, the next character in the input stream should be a '\n'.
>
{
s_t temp;
This will now read to the first newline in the stream and put the result
into temp.s. Since the first character is a newline, temp.s will be empty.
Then in will try to put the contents of what's stored as a string into
temp.x. In this case, in finds 'f', and fails. Thus the reading of the two
ints will become a noop, and the test fails.

I suggest you look up the ignore() member function of istream. You need to
ignore the rest of the line.
while (in >temp) vec.push_back(temp);
}

in.close();

cout << x << ' ' << y << endl;
cout << vec.size() << endl;
for (unsigned int i = 0; i < vec.size(); i++)
cout << vec.at(i) << endl;
}

int
main()
{
int x = 4711, y = 1337;
vector<s_tvec;

vec.push_back(s_t("foo bar", 33, 22));
vec.push_back(s_t("bar baz", 11, 99));

ofstream out("foo.txt");

out << x << ' ' << y << endl;
for (unsigned int i = 0; i < vec.size(); i++)
{
out << vec.at(i);

if (i < vec.size() - 1)
out << endl;
}

out.flush();
out.close();

readit();
}

When I run it, I get this output:
4711 1337
0

so it reads the first two numbers ok but reading the s_t objects
doesn't work because the vector is empty afterwards...

Any help appreciated.
It's a common beginner error. Try to hand trace the code. Write down the
contents of the file on paper with control characters, and see where the
next char to be read is.

--
rbh
Jul 15 '07 #2
On 15 Juli, 15:12, Robert Bauck Hamar <roberth+n...@ifi.uio.nowrote:
Eric Lilja wrote:
Hi! I have a program with a class that needs to be able to write
itself to a file in clear text format. The file has two integers and
vector of struct objects. The struct has a string that can consist of
one or more words and a few integers. I'm able to create the file
properly, as confimed by viewing it in a text editor, but something
goes wrong when I tried to read it. I've made a test program
illustrating the problem:
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct s_t
{
s_t() {}
s_t(const string& si, int xi, int yi) : s(si), x(xi), y(yi) {}
string s;
int x, y;
friend ostream& operator<<(ostream& os, const s_t& rhs);
friend istream& operator>>(istream& is, s_t& rhs);
};
ostream&
operator<<(ostream& os, const s_t& rhs)
{
os << rhs.s << endl;
os << rhs.x << ' ' << rhs.y;
return os;
}
istream&
operator>>(istream& is, s_t& rhs)
{
getline(is, rhs.s);
is >rhs.x >rhs.y;
return is;
}
void
readit()
{
int x = 0, y = 0;
vector<s_tvec;
ifstream in("foo.txt");
in >x >y;

After this, the next character in the input stream should be a '\n'.
{
s_t temp;

This will now read to the first newline in the stream and put the result
into temp.s. Since the first character is a newline, temp.s will be empty.
Then in will try to put the contents of what's stored as a string into
temp.x. In this case, in finds 'f', and fails. Thus the reading of the two
ints will become a noop, and the test fails.

I suggest you look up the ignore() member function of istream. You need to
ignore the rest of the line.
I solved it by adding this to my overloaded operator>>:
if (is.peek() == '\n')
{
is.ignore();
}
before the getline() call. Now that program works just fine. However,
the *real* program tries to read even though there are no more entries
in the file. Hmm.
>

while (in >temp) vec.push_back(temp);
}
in.close();
cout << x << ' ' << y << endl;
cout << vec.size() << endl;
for (unsigned int i = 0; i < vec.size(); i++)
cout << vec.at(i) << endl;
}
int
main()
{
int x = 4711, y = 1337;
vector<s_tvec;
vec.push_back(s_t("foo bar", 33, 22));
vec.push_back(s_t("bar baz", 11, 99));
ofstream out("foo.txt");
out << x << ' ' << y << endl;
for (unsigned int i = 0; i < vec.size(); i++)
{
out << vec.at(i);
if (i < vec.size() - 1)
out << endl;
}
out.flush();
out.close();
readit();
}
When I run it, I get this output:
4711 1337
0
so it reads the first two numbers ok but reading the s_t objects
doesn't work because the vector is empty afterwards...
Any help appreciated.

It's a common beginner error. Try to hand trace the code. Write down the
contents of the file on paper with control characters, and see where the
next char to be read is.

--
rbh

Jul 15 '07 #3
On 15 Juli, 16:18, Eric Lilja <mindcoo...@gmail.comwrote:
On 15 Juli, 15:12, Robert Bauck Hamar <roberth+n...@ifi.uio.nowrote:
Eric Lilja wrote:
Hi! I have a program with a class that needs to be able to write
itself to a file in clear text format. The file has two integers and
vector of struct objects. The struct has a string that can consist of
one or more words and a few integers. I'm able to create the file
properly, as confimed by viewing it in a text editor, but something
goes wrong when I tried to read it. I've made a test program
illustrating the problem:
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct s_t
{
s_t() {}
s_t(const string& si, int xi, int yi) : s(si), x(xi), y(yi) {}
string s;
int x, y;
friend ostream& operator<<(ostream& os, const s_t& rhs);
friend istream& operator>>(istream& is, s_t& rhs);
};
ostream&
operator<<(ostream& os, const s_t& rhs)
{
os << rhs.s << endl;
os << rhs.x << ' ' << rhs.y;
return os;
}
istream&
operator>>(istream& is, s_t& rhs)
{
getline(is, rhs.s);
is >rhs.x >rhs.y;
return is;
}
void
readit()
{
int x = 0, y = 0;
vector<s_tvec;
ifstream in("foo.txt");
in >x >y;
After this, the next character in the input stream should be a '\n'.
{
s_t temp;
This will now read to the first newline in the stream and put the result
into temp.s. Since the first character is a newline, temp.s will be empty.
Then in will try to put the contents of what's stored as a string into
temp.x. In this case, in finds 'f', and fails. Thus the reading of the two
ints will become a noop, and the test fails.
I suggest you look up the ignore() member function of istream. You need to
ignore the rest of the line.

I solved it by adding this to my overloaded operator>>:
if (is.peek() == '\n')
{
is.ignore();}

before the getline() call. Now that program works just fine. However,
the *real* program tries to read even though there are no more entries
in the file. Hmm.
And I solved that by checking the return value of the getline() call
and returning
the stream directly if it fails.
>

while (in >temp) vec.push_back(temp);
}
in.close();
cout << x << ' ' << y << endl;
cout << vec.size() << endl;
for (unsigned int i = 0; i < vec.size(); i++)
cout << vec.at(i) << endl;
}
int
main()
{
int x = 4711, y = 1337;
vector<s_tvec;
vec.push_back(s_t("foo bar", 33, 22));
vec.push_back(s_t("bar baz", 11, 99));
ofstream out("foo.txt");
out << x << ' ' << y << endl;
for (unsigned int i = 0; i < vec.size(); i++)
{
out << vec.at(i);
if (i < vec.size() - 1)
out << endl;
}
out.flush();
out.close();
readit();
}
When I run it, I get this output:
4711 1337
0
so it reads the first two numbers ok but reading the s_t objects
doesn't work because the vector is empty afterwards...
Any help appreciated.
It's a common beginner error. Try to hand trace the code. Write down the
contents of the file on paper with control characters, and see where the
next char to be read is.
--
rbh

Jul 15 '07 #4

Eric Lilja <mi********@gmail.comwrote in message...
On 15 Juli, 16:18, Eric Lilja <mindcoo...@gmail.comwrote:
On 15 Juli, 15:12, Robert Bauck Hamar <roberth+n...@ifi.uio.nowrote:
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct s_t{
s_t() {}
s_t(const string& si, int xi, int yi) : s(si), x(xi), y(yi) {}
string s;
int x, y;
friend ostream& operator<<(ostream& os, const s_t& rhs);
friend istream& operator>>(istream& is, s_t& rhs);
};
ostream& operator<<(ostream& os, const s_t& rhs){
os << rhs.s << endl;
os << rhs.x << ' ' << rhs.y;
return os;
}
istream& operator>>(istream& is, s_t& rhs){
getline(is, rhs.s);
is >rhs.x >rhs.y;
return is;
}
void readit(){
int x = 0, y = 0;
vector<s_tvec;
ifstream in("foo.txt");
in >x >y;
After this, the next character in the input stream should be a '\n'.
{
s_t temp;
This will now read to the first newline in the stream and put the
result
into temp.s. Since the first character is a newline, temp.s will be
empty.
Then in will try to put the contents of what's stored as a string into
temp.x. In this case, in finds 'f', and fails. Thus the reading of the
two
ints will become a noop, and the test fails.
I suggest you look up the ignore() member function of istream. You
need to
ignore the rest of the line.
I solved it by adding this to my overloaded operator>>:
if (is.peek() == '\n'){ is.ignore();}

before the getline() call. Now that program works just fine. However,
the *real* program tries to read even though there are no more entries
in the file. Hmm.

And I solved that by checking the return value of the getline() call
and returning the stream directly if it fails.
while (in >temp) vec.push_back(temp);
}
in.close();
cout << x << ' ' << y << endl;
cout << vec.size() << endl;
for (unsigned int i = 0; i < vec.size(); i++)
cout << vec.at(i) << endl;
}
int main(){
int x = 4711, y = 1337;
vector<s_tvec;
vec.push_back(s_t("foo bar", 33, 22));
vec.push_back(s_t("bar baz", 11, 99));
ofstream out("foo.txt");
out << x << ' ' << y << endl;
for (unsigned int i = 0; i < vec.size(); i++){
out << vec.at(i);
if (i < vec.size() - 1)
out << endl;
}
out.flush();
out.close();
readit();
}
Your 'vector' in 'main()' is separate from the 'vector' in 'readit()'. If
you want to fill a 'vector' from 'main()', try adding this (no need to
remove your current version):

void readit( std::vector<s_t&vec ){ // non-const
ifstream in("foo.txt");
if( not in.is_open() ){ std::cerr<<"ERROR"; return; }
int x( 0 ), y( 0 );
in >x >y;
if( in.peek() == '\n' ){ in.ignore(); }
s_t temp;
while( in >temp ) vec.push_back( temp );
// untested. replace the above two lines with:
// for( s_t temp; in >temp; /*m_t*/ ){
// vec.push_back( temp );
// } // for(in)
} // readit( std::vector<s_t>&)

{ // main
// .....
std::vector<s_tvst;
readit( vst );
for( std::size_t i(0); i < vst.size(); ++i )
cout << vst.at(i) << endl;
}

--
Bob R
POVrookie
Jul 15 '07 #5
On 15 Juli, 20:12, "BobR" <removeBadB...@worldnet.att.netwrote:
Eric Lilja <mindcoo...@gmail.comwrote in message...
On 15 Juli, 16:18, Eric Lilja <mindcoo...@gmail.comwrote:
On 15 Juli, 15:12, Robert Bauck Hamar <roberth+n...@ifi.uio.nowrote:
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct s_t{
s_t() {}
s_t(const string& si, int xi, int yi) : s(si), x(xi), y(yi) {}
string s;
int x, y;
friend ostream& operator<<(ostream& os, const s_t& rhs);
friend istream& operator>>(istream& is, s_t& rhs);
};
ostream& operator<<(ostream& os, const s_t& rhs){
os << rhs.s << endl;
os << rhs.x << ' ' << rhs.y;
return os;
}
istream& operator>>(istream& is, s_t& rhs){
getline(is, rhs.s);
is >rhs.x >rhs.y;
return is;
}
void readit(){
int x = 0, y = 0;
vector<s_tvec;
ifstream in("foo.txt");
in >x >y;
After this, the next character in the input stream should be a '\n'.
{
s_t temp;
This will now read to the first newline in the stream and put the
result
into temp.s. Since the first character is a newline, temp.s will be
empty.
Then in will try to put the contents of what's stored as a string into
temp.x. In this case, in finds 'f', and fails. Thus the reading of the
two
ints will become a noop, and the test fails.
I suggest you look up the ignore() member function of istream. You
need to
ignore the rest of the line.
I solved it by adding this to my overloaded operator>>:
if (is.peek() == '\n'){ is.ignore();}
before the getline() call. Now that program works just fine. However,
the *real* program tries to read even though there are no more entries
in the file. Hmm.
And I solved that by checking the return value of the getline() call
and returning the stream directly if it fails.
while (in >temp) vec.push_back(temp);
}
in.close();
cout << x << ' ' << y << endl;
cout << vec.size() << endl;
for (unsigned int i = 0; i < vec.size(); i++)
cout << vec.at(i) << endl;
}
int main(){
int x = 4711, y = 1337;
vector<s_tvec;
vec.push_back(s_t("foo bar", 33, 22));
vec.push_back(s_t("bar baz", 11, 99));
ofstream out("foo.txt");
out << x << ' ' << y << endl;
for (unsigned int i = 0; i < vec.size(); i++){
out << vec.at(i);
if (i < vec.size() - 1)
out << endl;
}
out.flush();
out.close();
readit();
}

Your 'vector' in 'main()' is separate from the 'vector' in 'readit()'. If
you want to fill a 'vector' from 'main()', try adding this (no need to
remove your current version):

void readit( std::vector<s_t&vec ){ // non-const
ifstream in("foo.txt");
if( not in.is_open() ){ std::cerr<<"ERROR"; return; }
int x( 0 ), y( 0 );
in >x >y;
if( in.peek() == '\n' ){ in.ignore(); }
s_t temp;
while( in >temp ) vec.push_back( temp );
// untested. replace the above two lines with:
// for( s_t temp; in >temp; /*m_t*/ ){
// vec.push_back( temp );
// } // for(in)
} // readit( std::vector<s_t>&)

{ // main
// .....
std::vector<s_tvst;
readit( vst );
for( std::size_t i(0); i < vst.size(); ++i )
cout << vst.at(i) << endl;

}

Umm, yeah, I know, this was just a program for illustrating a file
reading problem. I don't care in this program if I use different
vectors, it's completely irrelevant. And I know perfectly well what
passing a variable by reference means...
>
--
Bob R
POVrookie

Jul 15 '07 #6
On Jul 15, 8:12 pm, "BobR" <removeBadB...@worldnet.att.netwrote:

[...]
void readit( std::vector<s_t&vec ){ // non-const
ifstream in("foo.txt");
if( not in.is_open() ){ std::cerr<<"ERROR"; return; }
int x( 0 ), y( 0 );
in >x >y;
You probably want to check the return values here. But I'm not
too sure what this function is designed to do, to begin with.
if( in.peek() == '\n' ){ in.ignore(); }
What's the purpose of this line? The following "in >temp"
will automatically skip any leading white space (and '\n' is
white space).

If the input is line oriented, and you want to verify its
format, then you should probably read using getline, then use
istringstream to parse it (not forgetting a final
if ( line >std::ws && line.get() == EOF ) ...
to ensure that there's no trailing garbage). If it's just a
collection of white space separated s_t, then you can just read,
you don't need to "ignore" anything.
s_t temp;
while( in >temp ) vec.push_back( temp );
// untested. replace the above two lines with:
// for( s_t temp; in >temp; /*m_t*/ ){
Doesn't work. The first pass through the loop will use an
uninitialized temp.
// vec.push_back( temp );
// } // for(in)
} // readit( std::vector<s_t>&)
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Jul 16 '07 #7
On 16 Juli, 09:38, James Kanze <james.ka...@gmail.comwrote:
On Jul 15, 8:12 pm, "BobR" <removeBadB...@worldnet.att.netwrote:

[...]
void readit( std::vector<s_t&vec ){ // non-const
ifstream in("foo.txt");
if( not in.is_open() ){ std::cerr<<"ERROR"; return; }
int x( 0 ), y( 0 );
in >x >y;

You probably want to check the return values here. But I'm not
too sure what this function is designed to do, to begin with.
if( in.peek() == '\n' ){ in.ignore(); }

What's the purpose of this line? The following "in >temp"
will automatically skip any leading white space (and '\n' is
white space).

If the input is line oriented, and you want to verify its
format, then you should probably read using getline, then use
istringstream to parse it (not forgetting a final
if ( line >std::ws && line.get() == EOF ) ...
to ensure that there's no trailing garbage). If it's just a
collection of white space separated s_t, then you can just read,
you don't need to "ignore" anything.
s_t temp;
while( in >temp ) vec.push_back( temp );
// untested. replace the above two lines with:
// for( s_t temp; in >temp; /*m_t*/ ){

Doesn't work. The first pass through the loop will use an
uninitialized temp.
Huh?

and btw, the program works just fine now so I don't see the reason for
this post anyway...
>
// vec.push_back( temp );
// } // for(in)
} // readit( std::vector<s_t>&)

--
James Kanze (GABI Software) email:james.ka...@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Jul 16 '07 #8
James Kanze wrote:
On Jul 15, 8:12 pm, "BobR" <removeBadB...@worldnet.att.netwrote:

[...]
>void readit( std::vector<s_t&vec ){ // non-const
ifstream in("foo.txt");
if( not in.is_open() ){ std::cerr<<"ERROR"; return; }
int x( 0 ), y( 0 );
in >x >y;

You probably want to check the return values here. But I'm not
too sure what this function is designed to do, to begin with.
> if( in.peek() == '\n' ){ in.ignore(); }

What's the purpose of this line? The following "in >temp"
will automatically skip any leading white space (and '\n' is
white space).
No, it will not. in >temp calls the user defined operator>>(istream& i,
s_t& st), which in turn commence by calling getline(i, st). Without the
in.ignore(), or using some other means of skipping the newline, this will
not work correctly.

--
rbh
Jul 16 '07 #9
On 16 Juli, 13:54, Robert Bauck Hamar <roberth+n...@ifi.uio.nowrote:
James Kanze wrote:
On Jul 15, 8:12 pm, "BobR" <removeBadB...@worldnet.att.netwrote:
[...]
void readit( std::vector<s_t&vec ){ // non-const
ifstream in("foo.txt");
if( not in.is_open() ){ std::cerr<<"ERROR"; return; }
int x( 0 ), y( 0 );
in >x >y;
You probably want to check the return values here. But I'm not
too sure what this function is designed to do, to begin with.
if( in.peek() == '\n' ){ in.ignore(); }
What's the purpose of this line? The following "in >temp"
will automatically skip any leading white space (and '\n' is
white space).

No, it will not. in >temp calls the user defined operator>>(istream& i,
s_t& st), which in turn commence by calling getline(i, st). Without the
in.ignore(), or using some other means of skipping the newline, this will
not work correctly.

--
rbh
But the code has an ignore (did you read the entire thread?). The
reading works (tested with two different compilers) now and I'm
working on other bugs and features now.

Jul 16 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: fabrice | last post by:
Hello, I've got trouble reading a text file (event viewer dump) by using the getline() function... After 200 - 300 lines that are read correctly, it suddenly stops reading the rest of the...
8
by: Brandon McCombs | last post by:
This may be the wrong group but I didn't see anything for VC++ so I'm trying here. I have a C++ book by Deitel and Deitel that says I can use fstream File("data.dat", ios::in | ios::out |...
2
by: Sabin Finateanu | last post by:
Hi I'm having problem reading a file from my program and I think it's from a procedure I'm using but I don't see where I'm going wrong. Here is the code: public bool AllowUsage() { ...
1
by: Need Helps | last post by:
Hello. I'm writing an application that writes to a file a month, day, year, number of comments, then some strings for the comments. So the format for each record would look like:...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
7
by: John Dann | last post by:
I'm trying to read some binary data from a file created by another program. I know the binary file format but can't change or control the format. The binary data is organised such that it should...
0
by: Fabrice | last post by:
Hello, (Alain) Tis is a part of my code to retrieve text from hastable in memory cache, by reading (befor) a resources file. Thanks for your help. /1/ The resources file * I have create a...
2
by: ERingmae | last post by:
Hi, The environment is .NET 2.0, the language is C# and the problem is reading XSD file with xs:redefine section correctly to a XMLDataDocument.DataSet. What I am trying to do: I am trying...
1
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C programming. FYI Although I have called this...
6
by: efrenba | last post by:
Hi, I came from delphi world and now I'm doing my first steps in C++. I'm using C++builder because its ide is like delphi although I'm trying to avoid the vcl. I need to insert new features...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.