The Latest

DevX - Software Development Resource

Debugging the Memory Leaks in MS VC++ 6.0

The failure to deallocate previously allocated memory is known as a memory leak. A memory leak is one of those hard to detect bugs, and it may cause unpredictable behavior

DevX - Software Development Resource

A Convention for Naming Variables

Naming variables has a major effect on how hard it will be for a person to follow the code, whether it is the same person who wrote it or someone

DevX - Software Development Resource

How to Write Userdefined Exceptions

Here’s an example: Code For Balance Class——————————————————————————–// Demo class for User-Defined Exceptions To Ensure The// Validity of Data Contained In A Classimport java.io.*;public class Balance{ int bal; public Balance(){ }

DevX - Software Development Resource

Linking Your Access Databases with ADOX

This small routine creates a link from all the tables of one .mdb file to another. First, you need to select reference ‘Microsoft ADOX’, your available version. Private Sub CreateLinkTables()

DevX - Software Development Resource

Use JVM Shutdown Hooks to Optimize Resources

ave you ever found yourself in the following scenario: You’ve created server-side Java applications for a production environment.You write a program that allocates external resources: connections to a database using

DevX - Software Development Resource

For JDO, the Time Is Now

uring the past decade, I’ve witnessed remarkable change in the software industry’s overall approach to persistence. Though measuring Plain Old Java Object (POJO) solutions in terms of market share is

DevX - Software Development Resource

Installing an RMI Security Manager

hen you write distributed programs with RMI, you want to restrict theactions performed by remotely loaded classes. Otherwise, you mayinadvertently allow unsecure code to access private systemresources. You can secure

DevX - Software Development Resource

WebRequest & WebResponse

There are two methods to send info and get a response via HTTP. The second (alternate) method works for both .NET and VB6, but it requires DLL reference (take your

DevX - Software Development Resource

The #define Directive

When you compile a program the compiler first uses a preprocessor to analyze the code. The #define directive can be used to either define a constant number or function or

DevX - Software Development Resource

Print an Error Report with NotePad

The following code prints out an error report to NotePad. Private sub cmdPrintError_Click Dim curDB As Database Dim rs As Recordset Dim lSQL As String Dim retVal As Variant Open

DevX - Software Development Resource

Retrieve the rowCount Without Looping

Use this code to obtain the rowcount in JDBC without looping through the resultset. try { // Create a scrollable result set. stmt = conn.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); // Set a

DevX - Software Development Resource

Grant SQL Execute Permissions to a User

Oftentimes, when I’m creating stored procedures, I forget to grant execute permissions to my user(s). Here is a stored procedure that will do this for you by simply passing in

DevX - Software Development Resource

Taking the Enterprise Mobile: Developer Roundtable

n February, DevX Editorial Director Michael McCarthy and Editor-in-chief Lori Piquet sat down with four developers?two in the U.S. and two in Europe?to discuss the mobilization of the enterprise. Why

DevX - Software Development Resource

WinInet API Programming

isual Basic applications are becoming more connected, and developers are trying to Web-enable their applications by supporting HTTP or FTP. Often this requires using the Microsoft Internet Transfer control or

DevX - Software Development Resource

J2SE 1.5: Java’s Evolution Continues

he Java 2 Platform, Standard Edition (J2SE) 1.5 (codename: Tiger) has some language-level enhancements that Sun designed to make programmers’ lives much easier. This article takes a gander at some

DevX - Software Development Resource

Faster String Processing

String processing in VB is usually a very slow task. Often, people process strings letter by letter and construct a larger trinf afterwards from small bits. A better way would

DevX - Software Development Resource

Autoboxing/Unboxing

The problem with the collection API is that you cannot put primitive data types into it. Instead, you must use their object counter parts. For instance, you have to use

DevX - Software Development Resource

All About Arrays

Arrays are similar to ideas in mathematics. An array stores many values in memory using only one name. “Array” in programming means approximately the same thing as array, matrix, or

DevX - Software Development Resource

Avoid Code Repetition by Using Pointers to Members

Suppose a class requires a “springboard” for calling a set of member functions which share the same signature. For example, the springboard might create some parameters to pass to these

DevX - Software Development Resource

Automatically Refresh a Web Page

This is required in B2B integration when one vendor logs into a system and upon validation a success message needs to be displayed and depending upon user’s request, the user

DevX - Software Development Resource

JMS Enables Concurrent Processing in EJB

wo major limitations in the Enterprise JavaBeans (EJB) specification make it difficult to develop multi-threaded EJB applications: New user threads cannot be created inside EJB Container. EJB methods cannot be

DevX - Software Development Resource

How to Detect a User’s Language Settings

User language settings can be detected in one of the two following ways: Using the cultureinfo class current culture property: Using the request object’s userlanguages collection: Note: The UserLanguages collection

DevX - Software Development Resource

Create Python Executables Automatically

his article shows you how to automate the task of creating Python executables via py2exe using Python itself. I call the Python file containing the code makeExe.py. This technique requires