Why isn't there a garbage collector in C++, or why hasn't been added... this sure makes a interesting topic to know more about - here i found a fair explanation on the subject.
http://stackoverflow.com/questions/147130/why-doesnt-c-have-a-garbage-collector
Thursday, June 10, 2010
Wednesday, June 9, 2010
Floating Point Arithmatic..
Did you ever face something like this : X, and Y are two floating point numbers. You print their values and they are exactly same. and then you write a simple logic like this..
if(x!=y) {
printf("x and y are not equal) ;
}
and it prints that x and y are not equal ;-) Apparantly it happens often. and if you wondered why
the following links might help you.
Its all got to do with floating point numbers..
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
http://stackoverflow.com/questions/588004/is-javascripts-math-broken
http://dlc.sun.com/pdf/800-7895/800-7895.pdf
if(x!=y) {
printf("x and y are not equal) ;
}
and it prints that x and y are not equal ;-) Apparantly it happens often. and if you wondered why
the following links might help you.
Its all got to do with floating point numbers..
http://www.cygnus-software.
http://stackoverflow.com/
http://dlc.sun.com/pdf/800-
Tuesday, June 8, 2010
what is serialVersionUID ?
Everytime you write a class that implements serializable interface the IDE shows a warning asking to add serialversionUID, I wondered why couple of times but looked it up to find the reasons..
Below is a good link that explains why... the point to note is serialVersionUID is an exception to the rule that “static fields don’t get serialized”
http://www.javablogging.com/what-is-serialversionuid/
Below is a good link that explains why... the point to note is serialVersionUID is an exception to the rule that “static fields don’t get serialized”
http://www.javablogging.com/what-is-serialversionuid/
Subscribe to:
Posts (Atom)