Tip Bank

DevX - Software Development Resource

Multiple Actions on One Event

To put two actions for one onmouseover=” ” event, just separate the two actions with a semicolon just like you would any two JavaScript statements. For example: OnChange=”alert(‘First Action’);alert(‘Second Action’)”

DevX - Software Development Resource

String Objects and C-strings: Caveats

The standard string class has a dual interface: it supports both C-style strings as well as string objects in various operations: const char text[] = “hello world”;string s = text;

DevX - Software Development Resource

Function Overloading

In order to overload a function, a different signature should be used for each overloaded version. A function signature consists of the list of types of its arguments as well

DevX - Software Development Resource

Pre-Defined Macros

All C/C++ compilers define the following macros: __DATE__ //a literal containing the compilation date in the form “Apr 13 1998″__TIME__ //a literal containing the compilation time in the form “10:01:07″__FILE__

DevX - Software Development Resource

Prefer dynamic_cast<> to typeid()

A robust, long lasting OO design relies on the premise that an existing class can be re-used in the future by means of derivation. Therefore, examining the actual type of

DevX - Software Development Resource

Simulating Inheritance of Assignment Operator

As opposed to base class’ constructor and destructor, which are automatically invoked from the derived class’ constructor and destructor respectively, a user-defined assignment operator defined in a base class is

DevX - Software Development Resource

<SPAN> Attribute in IE

Question: I’ve been working on completely redoing my company’s Web site for over a month and a half now. To help me out, I bought a book on HTML 4.0

DevX - Software Development Resource

Applets, URLs, and frames

Question: I want my Web page to have three frames: one for my applet and the other two for information. How can I make it so my applet updates both