Everyday you learn something new. You do. That is if you let yourself to be taught everyday. I didn't know that you could solve this expression string in .NET in one line of code: "4 + 5 + 10 - 4 / 5 * 2" using System; using System.Collections.Generic; using System.Linq; using System.Text;...
i was experimenting with ExpectedException attribute of NUnit when i noticed that a DivideByZeroException was not thrown when a division by zero was done within variables of type double. instead, i got a PositiveInfinity quotient for my sample routine so I consulted the docs and it was another IEE standard...
I’ve seen an officemate of mine this morning browsing the history log of a code sheet (VSS) to know when was a particular line added and who did it. What striked me was the way he opened each entry of the history database from oldest to the latest. I told him the more efficient way to locate the entry...
Back in grade school (Third Grade if I can remember it correctly), rounding off a number which is exactly in between (halfway) follows the “nearest even rule”. Rounding off 0.5 and 1.5 to their nearest units digit gives: 2.5 -> 2 3.5 -> 4 After that, perhaps in high school, a new rule was presented...