Tip Bank

DevX - Software Development Resource

Avoid Redundant Inline Declarations

Remember that functions defined inside the class definition are implicitly inline. Therefore, the inline keyword is redundant in the definition of the member function of the following class: class Employee{public:

DevX - Software Development Resource

Copying Files with File Streams

To copy the contents of one file into another, use the fstream classes. First, open the source file using an ifstream object, then create a target file using ofstream, and

DevX - Software Development Resource

Making Better Use of Garbage Collector

Imagine you have an enormous object serialized on disk that you are using in memory, or that object is loaded in memory. You want to allow the garbage collector (GC)

DevX - Software Development Resource

Implementing Callback Routines

One of the easier ways of implementing an event-driven programming model is through passing function pointers which are invoked when an event occurs. But because Java doesn’t support the notion

DevX - Software Development Resource

Controlling Debugging Information

Debugging is a core part of application development in Java. Programmers tend to use System.out.println & System.err.println in the code everywhere, which becomes uncontrolled as the program evolves. This becomes

DevX - Software Development Resource

Getting Around a Bug in Testing Your Applets

If you’ve tried using the Java Plugin to test your Applets and got a mysterious “Security Exception,” then you’ve run into a known, but unadvertised bug. For a complete description

DevX - Software Development Resource

Checking for Value “NaN”

Question: Why does my if statement if (final == “NaN”) { window.alert(“You…are…a…dunce. Hit reload to try again.”);} fail to detect when final is “NaN”? It always goes straight on to

DevX - Software Development Resource

Disabling Right Clicker on Mouse

Question: Is it possible to disable the user’s right click button using JavaScript? Answer: Is it possible? Yes. Oh, you wanted to know how to do it… Keep in mind,