July 12, 2005

Improve Performance by Disabling and Enabling Constraints

For most of us, working with large databases is a day-to-day activity. All too often, backup and restoration are considerably slow&#151usually because of the constraints imposed on the tables. Take a look at the following code: CREATE TABLE Contractors ( contractor_id numeric(5) not null, contractor_name varchar2(50) not null, CONSTRAINT contractor_pk

Build Rich Web Applications with OpenLaszlo

penLaszlo, an open source framework sponsored by LaszloSystems, has attracted a significant attention after Earthlink, the second largest Internet Service Provider, announced that it will use OpenLaszlo technology for its new generation of interactive Web mail clients. OpenLaszlo is a rich, well-documented open source alternative to the popular Macromedia framework

Use the Robot Class for Automatic Keyboard and Mouse Control

This code uses the Robot class to give you automatic keyboard and mouse control. import java.awt.*;import java.awt.event.*;import java.io.IOException;import javax.swing.*;public class RobotDemo extends JFrame implements ActionListener{ //Store Keystrokes in an array static int keyInput[] = {KeyEvent.VK_R,KeyEvent.VK_O, KeyEvent.VK_B,KeyEvent.VK_O,KeyEvent.VK_T}; static JTextArea ta = new JTextArea(); static JButton bold = new JButton(“Bold”); public RobotDemo()

Incrementing Iterators

You can use iterators for a STL set object to loop through the set elements 1 by 1. But did you know you can also increment the iterator by more than 1? Here’s an example: const int GetNextProduct(const unsigned int uiIndex){ ProductSet::const_iterator itElement, it = m_ProductSet.begin(); unsigned int ui =