devxlogo

Tip Bank

Using Complex Numbers

The C++ standard library can handle complex numbers. Complex numbers may be used by including . The class std::complex is defined as a template, allowing complex numbers to use different

Create a SAXSource with InputSource and XMLReader

One way to create a SAXSource is to use a SAX InputSource and an XMLReader object. The transformer, ContentHandler, calls the XMLReader.parse(InputSource IS) method. Here’s an example: … try{ //get

Object Functions in Use

An object function is a regular C++ object whose class defines the () operator. An object with a () operator can be called like a function: CFoo foo; // just

Using Multiline Strings in .NET Resource Files

Displaying strings from .NET resource files may be a puzzle if the strings include escape sequences. For example, take the newline (linefeed) character. Suppose you want to display a hardcoded

Read the First Line of a Text File

This code shows you how to use the instance methods from the FileReader and BufferedReader classes with a Xalan 2 processor to read the first line from a text file.

Retrieve Totals from a Dataset Without Looping

Have you ever looped through the entire dataset to get the totals you need to put in the footer? The DataTable.Compute method eliminates this hassle by retrieving commonly performed arithemetic

Removing an Unused Window Service

Removing an unused Window service involves removing your registry key. Go to Start?>Run?>regedit. Find the key: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services Locate the service name you want to remove. Press key to remove the