Friday, August 29, 2003

here is how to switch domains and keep your desktop in Windows 2k pro.

1)switch domain:
right click "my computer" -> properties -> Network Identification tab -> Properties button -> change domain.
You will be prompted to login to the domain and you will need a user/pass for that domain *not for your computer*

2)the trick to keep your desktop and settings is to login under a third username and change the "Document and Settings" directory for the newUsername to be the one that was the old username you used.

C:\Documents and Settings\newUserName to C:\Documents and Settings\newUserName01
C:\Documents and Settings\oldUserName to C:\Documents and Settings\newUserName

It is important that you are logged in as someone besides the old or new usernames.
Also any shortcuts will be lost that used C:\Documents and Settings\oldUserName in them.

*another way in xp:
system properties-> advanced tab -> user profile settings button -> copy profile button

Friday, August 22, 2003

Don't use floats for money fields

On my current project we are getting slammed by rounding errors from using floats. look at this code:

double x = 426.39 + 834.20;
System.out.println("x: " + x);

Surprisingly it prints:
x: 1260.5900000000001