473,654 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hash_set core dump on memory free

Hi -

What is wrong this implementation? I get a core dump at the free()
statement? Thanks

Rakesh

#include <ext/hash_map>
#include <iostream.h>
#include <ext/hash_set>
using namespace std;
using namespace __gnu_cxx;

struct eqstr
{
bool operator()(char * s1, char* s2) const
{
return strcmp(s1, s2) == 0;
}
};

int main()
{

char *s, *s1, *temp;
hash_set<char *, hash<char *>, eqstrAddedPhras es;
hash_set<char*, hash<char*>, eqstr::iterator Iter1;
s = (char *)malloc(sizeof (char)*100);
strcpy(s, "apple");
AddedPhrases.in sert(s);

s1 = (char *)malloc(sizeof (char)*100);
strcpy(s1, "absent");
AddedPhrases.in sert(s1);
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)
{
temp = *Iter1;
//printf("\nDelet ing:%s:%d", temp, strlen(temp));
free(temp);
}
}

$ g++ test3.cpp
$ ./a.out

Deleting:apple: 5
Deleting:absent :6
*** glibc detected *** ./a.out: double free or corruption (!prev):
0x09fa2310 ***
======= Backtrace: =========
/lib/libc.so.6[0x6b9f18]
/lib/libc.so.6(__lib c_free+0x79)[0x6bd41d]
../a.out(__gxx_per sonality_v0+0x2 74)[0x804892c]
/lib/libc.so.6(__lib c_start_main+0x dc)[0x66b7e4]
../a.out(__gxx_per sonality_v0+0x6 9)[0x8048721]
======= Memory map: ========
0053b000-00546000 r-xp 00000000 fd:00 38110218
/lib/libgcc_s-4.1.0-20060304.so.1
00546000-00547000 rwxp 0000a000 fd:00 38110218
/lib/libgcc_s-4.1.0-20060304.so.1
00549000-0062b000 r-xp 00000000 fd:00 19344300
/usr/lib/libstdc++.so.6. 0.8
0062b000-0062f000 r-xp 000e2000 fd:00 19344300
/usr/lib/libstdc++.so.6. 0.8
0062f000-00630000 rwxp 000e6000 fd:00 19344300
/usr/lib/libstdc++.so.6. 0.8
00630000-00636000 rwxp 00630000 00:00 0
00639000-00652000 r-xp 00000000 fd:00 38110213 /lib/ld-2.4.so
00652000-00653000 r-xp 00018000 fd:00 38110213 /lib/ld-2.4.so
00653000-00654000 rwxp 00019000 fd:00 38110213 /lib/ld-2.4.so
00656000-00782000 r-xp 00000000 fd:00 38110214 /lib/libc-2.4.so
00782000-00785000 r-xp 0012b000 fd:00 38110214 /lib/libc-2.4.so
00785000-00786000 rwxp 0012e000 fd:00 38110214 /lib/libc-2.4.so
00786000-00789000 rwxp 00786000 00:00 0
0078b000-007ae000 r-xp 00000000 fd:00 38110217 /lib/libm-2.4.so
007ae000-007af000 r-xp 00022000 fd:00 38110217 /lib/libm-2.4.so
007af000-007b0000 rwxp 00023000 fd:00 38110217 /lib/libm-2.4.so
00974000-00975000 r-xp 00974000 00:00 0 [vdso]
08048000-0804c000 r-xp 00000000 fd:00 24674319 /home/oracle/a.out
0804c000-0804d000 rw-p 00003000 fd:00 24674319 /home/oracle/a.out
09fa2000-09fc3000 rw-p 09fa2000 00:00 0 [heap]
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7fa8000-b7fac000 rw-p b7fa8000 00:00 0
bf897000-bf8ac000 rw-p bf897000 00:00 0 [stack]
Deleting:Xax:3A borted
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 5 '06 #1
8 3107
On 4 Nov 2006 22:14:22 -0500, Rakesh wrote:
Hi -

What is wrong this implementation? I get a core dump at the free()
statement? Thanks
I would use std::string's instead of char*. That way you don't have to
worry about allocating/deleting memory.

#include <string>
#include <iostream>
#include <ext/hash_set>

using namespace std;
using namespace __gnu_cxx;

// need to define hash function for std::string
struct string_hasher
{
int operator()(cons t string& s) const
{
int value = 0;
for( string::size_ty pe i=0; i<s.size(); i++ )
value = 5*value + s[i];
return value;
}
};

int main()
{
typedef hash_set<string , string_hasher() AddedPhrases;

AddedPhrases addedPhrases;
addedPhrases.in sert("apple");
addedPhrases.in sert("pear");

for( AddedPhrases::c onst_iterator Iter1=addedPhra ses.begin();
Iter1!=addedPhr ases.end();
++Iter1 )
{
cout << *Iter1 << endl;
}

return 0;
}

I didn't try to compile, so there might be some mistakes in there.
Hopefully you get the idea anyway.

--
Daniel
Nov 5 '06 #2
{ Note: this article is cross-posted to comp.lang.c++,
microsoft.publi c.vc.stl, gnu.g++.help and comp.lang.c++.m oderated. -mod }

Rakesh wrote:
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d(); Iter1++)
Hi Rakesh,

Just replace "Iter1++" by "++Iter1".. .

Hope this helps!
Sebastien

--
Sébastien Guérif
http://www-lipn.univ-paris13.fr/~guerif
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 5 '06 #3
Rakesh wrote:
Hi -

What is wrong this implementation? I get a core dump at the free()
statement? Thanks

Rakesh
Hi Rakesh!
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)
Just replace Iter1++ by ++Iter1 above.

Hope this helps!
Sebastien

--
Sebastien Guerif
http://www-lipn.univ-paris13.fr/~guerif

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 5 '06 #4
{ Note: this article is cross-posted to comp.lang.c++,
microsoft.publi c.vc.stl, gnu.g++.help and comp.lang.c++.m oderated. -mod }

Rakesh schrieb:
Hi -

What is wrong this implementation? I get a core dump at the free()
statement? Thanks

Rakesh

#include <ext/hash_map>
#include <iostream.h>
#include <ext/hash_set>
using namespace std;
using namespace __gnu_cxx;

struct eqstr
{
bool operator()(char * s1, char* s2) const
{Variou
return strcmp(s1, s2) == 0;
}
};

int main()
{

char *s, *s1, *temp;
hash_set<char *, hash<char *>, eqstrAddedPhras es;
hash_set<char*, hash<char*>, eqstr::iterator Iter1;
s = (char *)malloc(sizeof (char)*100);
strcpy(s, "apple");
AddedPhrases.in sert(s);

s1 = (char *)malloc(sizeof (char)*100);
strcpy(s1, "absent");
AddedPhrases.in sert(s1);
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)
{
temp = *Iter1;
//printf("\nDelet ing:%s:%d", temp, strlen(temp));
free(temp);
}
}

$ g++ test3.cpp
$ ./a.out

Deleting:apple: 5
Deleting:absent :6
*** glibc detected *** ./a.out: double free or corruption (!prev):
0x09fa2310 ***
======= Backtrace: =========
/lib/libc.so.6[0x6b9f18]
/lib/libc.so.6(__lib c_free+0x79)[0x6bd41d]
./a.out(__gxx_per sonality_v0+0x2 74)[0x804892c]
/lib/libc.so.6(__lib c_start_main+0x dc)[0x66b7e4]
./a.out(__gxx_per sonality_v0+0x6 9)[0x8048721]
======= Memory map: ========
{
0053b000-00546000 r-xp 00000000 fd:00 38110218
/lib/libgcc_s-4.1.0-20060304.so.1
00546000-00547000 rwxp 0000a000 fd:00 38110218
/lib/libgcc_s-4.1.0-20060304.so.1
00549000-0062b000 r-xp 00000000 fd:00 19344300
/usr/lib/libstdc++.so.6. 0.8
0062b000-0062f000 r-xp 000e2000 fd:00 19344300
/usr/lib/libstdc++.so.6. 0.8
0062f000-00630000 rwxp 000e6000 fd:00 19344300
/usr/lib/libstdc++.so.6. 0.8
00630000-00636000 rwxp 00630000 00:00 0
00639000-00652000 r-xp 00000000 fd:00 38110213 /lib/ld-2.4.so
00652000-00653000 r-xp 00018000 fd:00 38110213 /lib/ld-2.4.so
00653000-00654000 rwxp 00019000 fd:00 38110213 /lib/ld-2.4.so
00656000-00782000 r-xp 00000000 fd:00 38110214 /lib/libc-2.4.so
00782000-00785000 r-xp 0012b000 fd:00 38110214 /lib/libc-2.4.so
00785000-00786000 rwxp 0012e000 fd:00 38110214 /lib/libc-2.4.so
00786000-00789000 rwxp 00786000 00:00 0
0078b000-007ae000 r-xp 00000000 fd:00 38110217 /lib/libm-2.4.so
007ae000-007af000 r-xp 00022000 fd:00 38110217 /lib/libm-2.4.so
007af000-007b0000 rwxp 00023000 fd:00 38110217 /lib/libm-2.4.so
00974000-00975000 r-xp 00974000 00:00 0 [vdso]
08048000-0804c000 r-xp 00000000 fd:00 24674319 /home/oracle/a.out
0804c000-0804d000 rw-p 00003000 fd:00 24674319 /home/oracle/a.out
09fa2000-09fc3000 rw-p 09fa2000 00:00 0 [heap]
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7fa8000-b7fac000 rw-p b7fa8000 00:00 0
bf897000-bf8ac000 rw-p bf897000 00:00 0 [stack]
Deleting:Xax:3A borted

Hi Rakesh,

the problem is that you are freeing an object that is still inside the
container, but the iterator still tries to access the object during to
call to operator++(). The reason is that the iterator does not store the
bucket number, so when the end of the bucket is reached, the hash
function is called to compute the bucket number. At this point,
hash<char*>() is called with a pointer that no longer points to valid
memory, so you encounter undefined behaviour.

So you have to erase() the string from the container before calling
free(), but after calling

AddedPhrases.er ase(Iter1);

Iter1 is no longer a valid iterator. So the whole loop must be rewritten:

for (Iter1 = AddedPhrases.be gin();
Iter1 != AddedPhrases.en d();
/* do nothing */) { // increment is now performed inside the loop

temp = *Iter1++; // increment iterator, then dereference
// original value value
free(temp);
}
There are other issues with this code, e.g. missing checks for the size
of the string.

And if there is not a very good reason, it is much simpler to use
std::string which will take care of all the memory management for you.

cheers,
Rupert

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 5 '06 #5
{ Note: this article is cross-posted to comp.lang.c++,
microsoft.publi c.vc.stl, gnu.g++.help and comp.lang.c++.m oderated. -mod }

Rakesh wrote:
What is wrong this implementation? I get a core dump at the free()
statement? Thanks
#include <ext/hash_map>
#include <iostream.h>
#include <ext/hash_set>
using namespace std;
using namespace __gnu_cxx;
struct eqstr
{
bool operator()(char * s1, char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
int main()
{

char *s, *s1, *temp;
hash_set<char *, hash<char *>, eqstrAddedPhras es;
hash_set<char*, hash<char*>, eqstr::iterator Iter1;
s = (char *)malloc(sizeof (char)*100);
strcpy(s, "apple");
AddedPhrases.in sert(s);
s1 = (char *)malloc(sizeof (char)*100);
strcpy(s1, "absent");
AddedPhrases.in sert(s1);
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)
{
temp = *Iter1;
//printf("\nDelet ing:%s:%d", temp, strlen(temp));
free(temp);
I'd be very surprised that this doesn't result in undefined
behavior. You're leaving an invalide pointer in the table.
You're in for some very unplaisant surprises the next time some
other value hashes to this value, and the implementation tries
invoking your compare function on the entry. (More generally,
changing anything which affects the value of anything used for
actually keying causes undefined behavior.)

In fact, a quick analysis of the g++ code in the library shows
that it does re-calculate the hash code in the ++ operator.
(The actual implementation seems to be more space optimized than
performance optimized---although space optimizing the iterator
does mean that it copies a lot faster.) The result is that
anything can happen. You might actually iterator through the
loop only once, or you might iterator more times than there are
elements in the loop, or you might loop endlessly over the same
element, or core dump in the iterator, or ...

The correct way to clean up a container like this would be
something like:

__gnu_cxx::hash _set::iterator i = AddedPhrases.be gin() ;
while ( i != AddedPhrases.en d() ) {
char* tmp = *i ;
i = AddedPhrases.er ase( i ) ;
free( tmp ) ;
}
}
}
More generally, of course, you'd be better off:

-- Using the standard IO (<iostream>, <ostream>); g++ definitly
supports it, and the only justification today to use
<iostream.his to support legacy compilers (g++ pre-3.0,
Sun CC 4.2, etc.---all so old you shouldn't be using them
anyway).

-- Using std::string, instead of the char* junk. Do that, and
the destructor of the hash_set will clean up everything
automatically.

-- Not declaring variables until you can correctly initialize
them.

--
James Kanze (Gabi Software) email: ja*********@gma il.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 5 '06 #6
Rupert Kittinger schrieb:
{ Note: this article is cross-posted to comp.lang.c++,
microsoft.publi c.vc.stl, gnu.g++.help and comp.lang.c++.m oderated. -mod }

Rakesh schrieb:
>Hi -

What is wrong this implementation? I get a core dump at the free()
statement? Thanks

Rakesh

#include <ext/hash_map>
#include <iostream.h>
#include <ext/hash_set>
using namespace std;
using namespace __gnu_cxx;

struct eqstr
{
bool operator()(char * s1, char* s2) const
{Variou
return strcmp(s1, s2) == 0;
}
};

int main()
{

char *s, *s1, *temp;
hash_set<char *, hash<char *>, eqstrAddedPhras es;
hash_set<char*, hash<char*>, eqstr::iterator Iter1;
s = (char *)malloc(sizeof (char)*100);
strcpy(s, "apple");
AddedPhrases.in sert(s);

s1 = (char *)malloc(sizeof (char)*100);
strcpy(s1, "absent");
AddedPhrases.in sert(s1);
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)
{
temp = *Iter1;
//printf("\nDelet ing:%s:%d", temp, strlen(temp));
free(temp);
}
}

$ g++ test3.cpp
$ ./a.out

Deleting:apple :5
Deleting:absen t:6
*** glibc detected *** ./a.out: double free or corruption (!prev):
0x09fa2310 ***
....
>
Hi Rakesh,

the problem is that you are freeing an object that is still inside the
container, but the iterator still tries to access the object during to
call to operator++(). The reason is that the iterator does not store the
bucket number, so when the end of the bucket is reached, the hash
function is called to compute the bucket number. At this point,
hash<char*>() is called with a pointer that no longer points to valid
memory, so you encounter undefined behaviour.

So you have to erase() the string from the container before calling
free(), but after calling

AddedPhrases.er ase(Iter1);

Iter1 is no longer a valid iterator. So the whole loop must be rewritten:

for (Iter1 = AddedPhrases.be gin();
Iter1 != AddedPhrases.en d();
/* do nothing */) { // increment is now performed inside the loop

temp = *Iter1++; // increment iterator, then dereference
// original value value
free(temp);
}
There are other issues with this code, e.g. missing checks for the size
of the string.

And if there is not a very good reason, it is much simpler to use
std::string which will take care of all the memory management for you.

cheers,
Rupert
oops, the loop should really be

for (Iter1 = AddedPhrases.be gin();
Iter1 != AddedPhrases.en d();
/* do nothing */) { // increment is now performed inside the
loop temp = *Iter1;

AddedPhrases.er ase(i++);
free(temp);
}

in his post below, James Kanze recommends

i = AddedPhrases.er ase( i );

however, this will only work for std::set. Unfortunately, the g++
hash_set::erase (iterator) method returns void :-(.

Rupert

Nov 5 '06 #7
{ Note: this article is cross-posted to comp.lang.c++,
microsoft.publi c.vc.stl, gnu.g++.help and comp.lang.c++.m oderated. -mod }

Sébastien Guérif wrote in message
<45************ **********@news .orange.fr>...
>Rakesh wrote:
>Hi -
What is wrong this implementation? I get a core dump at the free()
statement? Thanks
Rakesh

Hi Rakesh!
>for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)

Just replace Iter1++ by ++Iter1 above.
{
for( size_t i(0); i < 5; i++ ){
std::cout<<" i = "<< i << std::endl;
}
std::cout<<std: :endl;
for( size_t i(0); i < 5; ++i ){
std::cout<<" i = "<< i << std::endl;
}
}

// i = 0
// i = 1
// i = 2
// i = 3
// i = 4

// i = 0
// i = 1
// i = 2
// i = 3
// i = 4

--
Bob R
POVrookie
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 5 '06 #8
Rupert Kittinger wrote:
{ Note: this article is cross-posted to comp.lang.c++,
microsoft.publi c.vc.stl, gnu.g++.help and comp.lang.c++.m oderated. -mod }
Which is curious in itself: why microsoft.publi c.vc.stl, when
the compiler being used is manifestly g++?
Rakesh schrieb:
What is wrong this implementation? I get a core dump at the free()
statement? Thanks
#include <ext/hash_map>
#include <iostream.h>
#include <ext/hash_set>
using namespace std;
using namespace __gnu_cxx;
struct eqstr
{
bool operator()(char * s1, char* s2) const
{Variou
return strcmp(s1, s2) == 0;
}
};
int main()
{
char *s, *s1, *temp;
hash_set<char *, hash<char *>, eqstrAddedPhras es;
hash_set<char*, hash<char*>, eqstr::iterator Iter1;
s = (char *)malloc(sizeof (char)*100);
strcpy(s, "apple");
AddedPhrases.in sert(s);
s1 = (char *)malloc(sizeof (char)*100);
strcpy(s1, "absent");
AddedPhrases.in sert(s1);
for (Iter1 = AddedPhrases.be gin(); Iter1 != AddedPhrases.en d();
Iter1++)
{
temp = *Iter1;
//printf("\nDelet ing:%s:%d", temp, strlen(temp));
free(temp);
}
}
[...]
the problem is that you are freeing an object that is still inside the
container, but the iterator still tries to access the object during to
call to operator++().
The problem is that the specifications of hash_set have not been
respected. There is a requirement that the key value of any
element in the set not be modified. Although it's not essential
that any particular operation access the key, it's also not
forbidden.
The reason is that the iterator does not store the
bucket number, so when the end of the bucket is reached, the hash
function is called to compute the bucket number.
Which is a legal implementation, given the specifications, even
if it is somewhat surprising. (Typically, there should only be
one or two elements in each bucket, and recalculating the hash
value each time you change buckets can make incrementation an
expensive operation.)

Of course, even if ++ didn't access the key value, other
functions might (including the destructor).

The important point is that he has a contract with the
container, and he has violated it.
At this point, hash<char*>() is called with a pointer that no
longer points to valid memory, so you encounter undefined
behaviour.
So you have to erase() the string from the container before calling
free(), but after calling
AddedPhrases.er ase(Iter1);
Iter1 is no longer a valid iterator. So the whole loop must be rewritten:
for (Iter1 = AddedPhrases.be gin();
Iter1 != AddedPhrases.en d();
/* do nothing */) { // increment is now performed inside the loop
temp = *Iter1++; // increment iterator, then dereference
// original value value
free(temp);
}
The "standard" solution when removing objects in a loop is to
update the iterator with the return value of the erase()
function. This works for multiset and unordered_multi set, as
well as for set and unordered_set. (The g++ hash_set is a
preliminary version of unordered_set.)

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Nov 6 '06 #9

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

Similar topics

3
6195
by: Nick Craig-Wood | last post by:
I've just discovered that my python (Python 2.3.4 from debian package 2.3.4-1 running on debian testing x86 + linux 2.4.26) core dumps when I set recursionlimit very high and do lots of recursion. Eg $ python -c 'import sys; sys.setrecursionlimit(100000) def f(): return f() f()' Segmentation fault (core dumped)
10
4258
by: Alex Gerdemann | last post by:
Hello, I have spent a bunch of time converting a Java program I wrote to C++ in order to improve performance, and have found that it is not necessarily faster. Specifically, I'm writing a circuit simulator, so I must first parse the netlist file. The program goes through an input file, and makes a hash_set of unique nodes (std::string's). The words are then sorted and numbered by copying the hash_set into a vector and sorting. ...
8
4744
by: Jing Cheng | last post by:
Hi, I'm using ifstream reading data from a file, as following: ifstream finput("track.dat"); if(finput.fail()){ cerr << "Open input DATA file error!\n"; exit(-1);
6
2475
by: Code Raptor | last post by:
Folks, I am hitting a segfault while free()ing allocated memory - to make it short, I have a linked list, which I try to free node-by-node. While free()ing the 28th node (of total 40), I hit a segfault. This is legacy code. I tried debugging this problem, and am not able to come up with a valid reason for this. Following function is being used to free: void DBFreePUF (DBPUFRec *userp) {
8
3013
by: nkrisraj | last post by:
Hi, I have a following structure: typedef struct { RateData rdr; int RateID; char RateBalance; } RateInfo;
5
17125
by: jian | last post by:
I am trying to use the hash_set, but cannot get it work. Here's my code: // file name: hash1.cpp #include <hash_set> int main() { hash_set<int> h; } When I type:
1
2040
by: simon | last post by:
I am having problem with an application which core dumps while deleting a vector here is the snippet : Event_Node_t struct defined in the header : +++++++++++++++++++++++++++++++++++++ struct Event_Node_t { int id : 24;
14
3346
by: Sheldon | last post by:
Hi, I have a python script that uses a C extention. I keep getting a recurring problem that causes a core dump a few lines after the C extention return data back tp python. I tried using pbd and gdb but I have not succeeded in understanding what went wrong and where. I post the python script here is the error message and gdb output after reading the core file: ...... printout from with C extention.... Completed freeing 2D arrays.
4
8395
by: loudking | last post by:
Hi, all Here is part of my code. ======================================== void *record; /* treat record */ if (record) {
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.