devxlogo

April 5, 1999

Floating point accuracy

Question: When I do the following, double answer = 121 * .1;System.out.println(“Answer: ” + answer); I get, Answer: 12.100000000000001 What’s going on? Answer: Almost every computer architecture represents numbers in

UDP Clients

Question: I would like to create an application in Java that communicates with a UDP connection. How do you specify the connection as UDP rather than TCP? Answer: To write

Unix select Equivalent

Question: Is there any Java facility like the Unix select() system call that will wait until there is something to read from a file descriptor before the programmer does the

Comparing Strings

Question: I have defined a string variable using the following command: #define latinWord 64 char word[latinWord]; I want to use an If statment to see if the variable “word” is

Set a Counter Field

Question: Is there an easy way to increase certain fields in tables working as a counter from a third table in a master/detail form? For example: Order Table Item Table

Cout colors

Question: What can I do to make cout output text appear in different colors? I’ve looked in the iomanip.h file and didn’t see anything, and the textcolor() function in conio.h

NT remote execute

Question: How do I execute a batch file on an NT machine remotely from another Windows machine? Answer: You have a couple of choices, all from the NT Server Resource