The Latest

DevX

Speed up searches with hash tables

You probably know that there are basically two methods to search a value in an array: the brute force approach (i.e. linear searching) and the binary search. Both of them

DevX

Converting ResultSet to XML

Oftentimes, we need to convert ResultSets to XML for transferring data across different applications. Here is very simple code that transforms ResultSets into XML. import java.sql.*;import java.io.*;public class XMLWriter{ public

DevX

Get Nasdaq Quotes Online in your Java Program

This is a piece of my actual code. It’s rather self-explanatory. public static String quote(String symbol) { try { java.net.URL url = new java.net.URL( “http://quotes.nasdaq.com/quote.dll?page=_xml&mode=stock&symbol=” + symbol); com.borland.xml.XmlData data =

DevX

Test if a Character in a String is a Letter

There is a simple way to test if a character in a string is a letter.Just by using the UCase() And LCase() functions. Public Function IsLetter(Char As String) As Boolean

DevX

Change the Key for an Object in a Collection

I have created a generic function for changing the key for an object in a collection: ‘Module: Module1 Option Explicit Public Function ChangeKey(Object As Object, NewKey As String, Collection As

DevX

Clear a Collection

The fastest way to clear a collection is just to set the variable to a new Collection object. However, if it’s necessary to free the references the collection is keeping,

DevX

Making a Clone of a Java Object

You cannot make a separate location to assign one object to another. By implementing a Cloneable interface and calling the clone() method, you can make a separate location for the

DevX

Extract records by their record number

SQL Server, and the SQL language in general, doesn’t support record numbers, so you can’t extract a set of records if you know their position in the resultset. This missing

DevX

Using Abstract Classes in Visual Basic.NET

or years, Visual Basic programmers pleaded with Microsoft to give them the object-oriented programming (OOP) capabilities that were enjoyed by C++ and Java developers. While a few OOP-related features were

DevX

EJB Messaging, Part II: Message-Driven Beans

nterprise messaging has become an increasingly important component of loosely coupled, reliable enterprise frameworks. This is due in large part to the proliferation of enterprise applications (CRM, ERP, SCM, etc.)

DevX

Count Sort, a special case of indexed sort

CountSort is yet another sort algorithm, which can be applied only under very particular conditions but that, when such conditions are met, turns to be the fastest of the lot.

DevX

ASP Calendar

This ASP page lets you display a calendar that starts at a given data and lets the user browse previous/next month or year. The zip file contains a test HTML

DevX

Database Paging Just by Query

In Web development, putting too many records from the database into the Web server is memory intensive processing. This is where the concept of paging comes form. At any point

DevX

Two Dimensional Array Simulation Using One Vector Object

To simulate a Matrix class with M*N elements, initialize a vector withM*N elements and overload the () operator such that Foo(i,j) returnsFoo[i-1+M*(j-1)]. This way Foo(1,1) is equivalent to Foo[0], Foo(2,1)

DevX

Be Careful with operator ==

A common mistake in C++ programming is typing = instead of ==. This can be due either to a typo error or because you are used to other languages such

DevX

Setting Breakpoints Programmatically

It is often useful to make a breakpoint by calling the DebugBreak function. However, this is not necessarily always convenient because the breakpoint will occur in DebugBreak call stack. You