devxlogo

Tip Bank

Using the innerHTML Property

To change the text that appears when users click on a button in your program, use JavaScript’s innerHtml property. &ltscript type=”text/javascript”&gtfunction changeText(){ document.getElementById(‘boldStuff’).innerHTML = ‘Fred Flintstone’;}Welcome to the site, dude

Create a “Night” Filter Using RGBImageFilter

This following code shows you how to create the “night” effect for an image using the RGBImageFilter: import java.awt.image.*;public class NightFilter extends RGBImageFilter { double frac; //0.0&lt=g>=16; int green=rgb &

Prevent Inheritance from a Base Class

Use code such as this to prevent subclasses from deriving from a base class: class myclass; class my_lock { friend class myclass; private: my_lock() {} my_lock(const my_lock&) {} }; class

Search Google via Email

For all those people who cannot access internet from the office, there is no need for it. You can search and receive Google search results through email. Simply send an

Use UNION ALL Instead of UNION

To improve query speed, use the UNION ALL statement. UNION ALL looks for and discards duplicate rows in the result set, whereas the UNION statement does not.