devxlogo

Tip Bank

Using Break and a Label to Exit a Loop

Although it is perfectly okay to use a goto to exit a nested loop, many developers prefer not to use gotos. Another way to exit a complicated, nested block of

Hear a PDF Instead of Reading It

Did you know you can listen to any PDF instead of reading it? It’s possible with Adobe Reader 6.0+. Here’s the short cut: CTRL+SHIFT+B: This allows you to hear the

Printing Color Lines in VB

Have you ever had a problem printing lines in color from VB6 (SP4)? The following code works correctly on a PictureBox, but prints black on the Printer (HP LaserJet and

A Safe Way to Stop a Java Thread

The Thread.stop() method is unsafe and thus deprecated. If the thread being stopped was modifying common data, that common data remains in an inconsistent state. A better way would be

Debug-friendly New and Delete

For better handling of resource leaks, try “marking” the allocation with ancillary information: #include #include #include #include typedef void FDEL(void* p, size_t size);typedef FDEL* PFDEL;class A{ int a; static void