June 26, 1999

ShiftLeft – Shift a Long to the left

‘ Shift to the left of the specified number of times” NOTE: requires Power2()Function ShiftLeft(ByVal value As Long, ByVal times As Long) As Long ‘ we need to create a

BitClear – Clear a bit in a value

‘ Clear a bit in a value” NOTE: requires Power2()Function BitClear(ByVal value As Long, ByVal bit As Long) As Long ‘ simply AND with the negation of the bit mask

BitTest – Test the value of a bit

‘ Test the value of a bit” NOTE: requires Power2()Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean ‘ simply AND with the bit mask ‘ Range checking

Build List of Components in Hierarchy

It is sometimes useful to be able to obtain a complete list of the components in a container hierarchy. A getComponents() method is provided in the java.awt.Container class, but it

Pausing SQL Server

Pausing SQL Server prevents new users from logging in and gives you time to send a message to current users asking them to complete their work and log out before

Minimize the Use of Pointers and Dynamic Memory Allocation

Pointer-based operations are less frequently needed than they might seem. For instance, examine this class declaration: class PointerMisuse{private: CDC * m_pDeviceContext;public: PointerMisuse(); ~PointerMisuse();};PointerMisuse::PointerMisuse(){ m_pDeviceContext = new CDC;}PointerMisuse::~PointerMisuse(){ delete m_pDeviceContext;} Even

Beware of Single Quotes When Working With SQL

When concatenating a SQL statement such as INSERT, you may have trouble if your field value contains an apostrophe (‘) such as in “Commedia Dell’Arte.” SQL thinks the apostrophe is