devxlogo

Tip Bank

DevX - Software Development Resource

Exception Handling Misuses

Exceptions can be used as an alternative control structure in addition to for-loops or while-blocks. For example, you can use exceptions to implement a simple application that prompts the user

DevX - Software Development Resource

Timely Capture of Font Metrics

If you extend an AWT class to add text to a GUI component, then you probably need access to the font’s metrics so that you can deduce the amount of

DevX - Software Development Resource

Directing CGI Output to Another Frame

A little-known attribute of the tag is TARGET. This attribute can be used to direct the output of a CGI program to another browser window, or another frame in the

DevX - Software Development Resource

Determining Shift Button State

Question: How can I determine if is down or up while dragging an object within my app? The goal is to detect if something is being copied or moved. Answer:

DevX - Software Development Resource

Developing E-Mail System

Question: I want to develop a free e-mail system similar to what Hotmail and Yahoo offer. I was wondering if you could give me some ideas on how to approach

DevX - Software Development Resource

STL Containers Should Not Hold auto_ptr<> Members

During reallocation, a container re-constructs its elements in a new memory location and destroys the original elements by invoking their destructor. Since the destructor of auto_ptr deletes its bound object,

DevX - Software Development Resource

Using Files as Persistent Flags

In Java, static variables may be used as flags to maintain state between different instantiations of a class (see Tip: “Using Static Variables to Store State Across Instantiations”). However, the

DevX - Software Development Resource

Querying NT

Question: Is there a way to query NT 4.0 (programmatically or manually) to have it tell me whether it is NT workstation or NT server? Is the answer in the