December 17, 2003

Sending Data to a Port in UDP Format

The ByteBuffer Class (from the java.nio package) helps you to write data in UDP by converting them to the respective bytes they generally occupy. This is especially helpful when trying to control network traffic. The example code, by default, has the same computer as the destination and a port 10001

Listing Files in a Directory with Perl

The following code: `ls -t ../../html/indexed | awk {‘print $9’}` Will return an array of files, eg: @files=`ls -t ../../html/indexed | awk {‘print $9’}`; @files is now an array containing the names of all of the files in the ./../html/indexed directory.

A Container for Pointers to Functions

Many times, you’ll find you need to create a container for pointers to functions. The example below demonstrates the syntax for a vector of pointers to functions. For simplicity’s sake, only one function, is_positive(double), has been defined. Notice how the vector of pointers to functions is declared, how the next

How to Get Around the Eolas Patent—Automatically

he great thing about technology is not so much the gadgets and the radical changes in the way that we interact with the world, but it’s that technology gives a small group?or even single individual?the power to change the lives of thousands. Whether it’s for better or worse, technology often