Tip Bank

DevX

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

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

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

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

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

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

Placing Child Window

Question: How do I make a child window go behind its parent window when a button is clicked? I know self.focus() brings a window forward. I need the opposite of

DevX

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,