Tip Bank

DevX - Software Development Resource

Qualifying an Element of Priority Queue

The Standard Template Library defines a specialized form of the queue container called priority_queue. A priority_queue is a queue whose elements are internally sorted according to their priority. Thus, an

DevX - Software Development Resource

Using the EventObject Class

The EventObject class is the base class for transferring events in Java (see Tip “Understanding the Listener Pattern”). It provides these methods: public EventObject (Object source) // Constructor. The “source”

DevX - Software Development Resource

Show a Random Image

A bit of randomness can help keep your Web site from getting stale. You can use the JavaScript rand() function to display random text or a random image. function goRand()

DevX - Software Development Resource

Unconsting a const Variable

There are two types of const data storage: true const and contractual const. const int cn = 5; // true const A contractual const variable is a non-const one, which