Tip Bank

DevX - Software Development Resource

Detecting the Browser Window Size With DHTML

Some users always maximize their browser window, while others like to keep it small. Not knowing the size of the client window can cause formatting problems for HTML pages; tables

DevX - Software Development Resource

Octal Numerals

A literal integer preceded by 0 (zero) is an octal numeral. When using octal numbers, you should beware of the following common pitfall: const int warning = 10;const int error

DevX - Software Development Resource

Private Inheritance

When a derived class inherits from a private base, the is-a relation between a derived object and its private base does not exist. For example: class Mem_Manager {/*..*/};class List: private

DevX - Software Development Resource

CreateProcess in Windows NT

Question: I am using CreateProcess to run applications in Windows NT. I cannot start any applications that are located in the directory Program Files. The user properties are set the

DevX - Software Development Resource

Using Proxy Classes in Java

The Proxy is one of the most common design patterns in circulation. Gamma et. al. define the intent of the Proxy as: “Provide a surrogate or a placeholder for another

DevX - Software Development Resource

Weaving Threads

Java provides two ways to create and run a thread. You can implement the Runnable interface or extend the Thread class. The Runnable interface defines a single method run(). Consider

DevX - Software Development Resource

Zero as a Universal Initializer

The literal 0 is an int. However, it can be used as a universal initializer for every data type, since it is automatically cast to the appropriate type. In this

DevX - Software Development Resource

The Copy Algorithm

The Standard Library provides a generic copy function, which can be used to copy a sequence of objects to a specified target. The first and the second arguments of copy()

DevX - Software Development Resource

Prefer Function Objects to Function Pointers

Passing a function pointer is a common practice in event-driven systems, whereby a callback routine is invoked through a pointer. C++, however, offers a better alternative to function pointers: function