Tip Bank

DevX - Software Development Resource

The std::pointer_to_unary_function Template

The Standard Library defines several template adaptors for function pointers. The std::pointer_to_unary_function class template encapsulates a pointer to a single argument function. std::pointer_to_unary_function overloads the () operators so that you

DevX - Software Development Resource

Initializing a Static Array Member of a Class

You can initialize static arrays member of a class. The initialization must appear at the place of definition, not inside the class body. For example: class A{private: static char vars[2];

DevX - Software Development Resource

The ## Concatenation Operator

The preprocessor ## operator concatenates macro arguments. For example: #define paste(x,y) x ## y The paste() macro takes two arguments and concatenates them into one. The whitespaces surrounding the ##

DevX - Software Development Resource

Avoid Heap Fragmentation in Palm OS

Memory is precious in Palm OS, since the total amount of memory available is very small. Dynamic memory allocation is often necessary while building applications in which memory at runtime

DevX - Software Development Resource

Nested Transactions

You can use the @@TRANCOUNT function to determine whether any open transactions exist and how deeply they are nested.A BEGIN TRANSACTION statement increments @@TRANCOUNT by one, and a ROLLBACK statement

DevX - Software Development Resource

Lock Timeout!

With the SET LOCK_TIMEOUT option, it is possible to set the maximum amount of time that SQL Server allows a transaction to wait for the release of a blocked resource:

DevX - Software Development Resource

Caching/Releasing JDBC Connections

It happens quite often that a JDBC connection is declared as the instance-level variable. The actual connection is then obtained at construction time. All methods of the object that need

DevX - Software Development Resource

Changing Column Types in a Table

Changing column types in a tableSQL Server does not permit you to explicitly change the datatype or length of a column. But there is a trick to get around this.