devxlogo

Tip Bank

Running Piped Threads

In a typical application using piped streams, an object of type PipedInputStream and an object of type PipedOutputStream are started as separate threads. One thread uses a PipedOutputStream to output

Set Objects to Nothing

If you set objects to Nothing, then test their nothingness, this suggestion might help you. If you declare an object as New and later set it to Nothing, VB won’t

Hashed Associative Containers

The Standard Template Library (STL) provides only one type of associative container–the sorted associative container. The STL sorted associative containers are map, multimap, set, and multiset. However, there is another

Track MousePointer Changes

If you develop large apps, this routine can help you keep a count of calls to change the mousepointer. The routine, called MouseStack, keeps a stack of those calls and

Scrub Out Unused Constants

Low-level parsing in VB doesn’t come up every day. This routine demonstrates how to search a VB module for dead module-level constants with only a few lines of code. Reading

Obtain the ASCII Value of a Character

To obtain the ASCII value of a character, simply assign the char variable to an int variable. For example: char aChar=’B’;int charVal = aChar; Then System.out.println(“”+charVal); will print the ASCII

Simplify Command-Line Argument Parsing

ArgumentParser simplifies command-line argument processing by separating arguments into positional parameters and options (any argument starting with “-” or “/” is considered an option, which may specify a value). Construct