May 5, 2000

DevX - Software Development Resource

Generate Audit Table Trigger Code

This code will generate code to do a column-by-column comparison against a table, assuming that you are joining the inserted table (aliased as “i”) with the deleted table (aliased as

DevX - Software Development Resource

Models of Garbage Collectors

If you need a garbage collector, you can either install one or implement it by yourself. Which type of garbage collection should you use? A conservative garbage collector and a

DevX - Software Development Resource

Preventing Memory Fragmentation

Applications that are free from memory leaks but perform dynamic memory allocation and deallocation frequently tend to show gradual performance degradation if they are kept running for long periods. Finally,

DevX - Software Development Resource

Default Arguments in a Template Instantiation

Templates can have default type parameters. The compiler uses these default types when you don’t provide them explicitly in a template instantiation. For example: template < class T1=char, class T2=char

DevX - Software Development Resource

Avoid Hardcoded Literal Strings

Hardcoded literal strings can become a serious maintenance problem. Suppose you have numerous message boxes in your application that display a hardcoded text message and you want to change that

DevX - Software Development Resource

Determining Stack Content Type

Question: Only Objects can be popped from, or push onto, a stack. That means Ihave to wrap a primitive data type, such as int, with something akin toInteger before pushing

DevX - Software Development Resource

Interplatform Networking

Question: I want to connect a Java client program to a C/C++ server applicationusing sockets. What is the easiest way of doing this? Answer: Java provides the ability to write

DevX - Software Development Resource

Random Integer Generation

Question: How do I write a Java program that generates random numbers withinlimits, such as 1 to 100, or 1 to 1000? Answer: The java.util package includes a Random class

DevX - Software Development Resource

Package Protected Constructor

Question: I need to extend class A which resides in a different package, butclass A has only one constructor which is package protected. I get a compile error in class