‚Č° Menu

Java

Seeding the Java random number generator

Random number generation is a very important tool for a programmer. Say for example, you need to shuffle a deck of cards, or choose files from a directory randomly, you need to rely on random number generation. Most random number generators generate pseudo random numbers which means given a seed, the random number generator will [...]

{ 0 comments }

The question - how to check a script/application's return code in a Linux / Unix box? The answer to this question lies in the $? variable. Each program, when exits, has a return or exit code. The exit code of 0 (zero) means the program completed successfully and there was no error. To print the exit [...]

{ 0 comments }