June 20, 2003

A Flying Pop-up Window

The following code can be used to create a popup window which flies in the screen.

Insert Large Numbers of Rows into a Database Table with PL/SQL

Everybody knows that it takes a long time to insert a large number of records into a table. To improve the speed of insertion, you can use the PL/SWL loop FORALL. In PL/SQL, use a cursor to fetch the rows from one table and insert them into the other table.

Write to Multiple Targets Simultaneously

This is helpful, for instance, if you’re error logging to the file and body of an e-mail. Create a new subclass of OutputStream called TeeOutputStream like this: package be.marble.io;import java.io.*;public class TeeOutputStream extends OutputStream { private OutputStream out1, out2; public TeeOutputStream(OutputStream out1, OutputStream out2) { this.out1 = out1; this.out2 =

Negative Numbers Represented in C++

You probably know that integers are represented in binary–in base 2. This is pretty straightforward for positive numbers, but it means you must choose an encoding for representing negatives. The encoding used by C++ (as well was by C and Java) is two’s complement. In two’s complement, the first bit