Tip Bank

DevX - Software Development Resource

When to Use Virtual Functions

The decision to use virtual functions is a simple matter. You just need to know when you’d want to override a base method. Take the following code as an example:

DevX - Software Development Resource

Get the End Date of a Financial Quarter

Often, in financial applications, the quarter end date is very important for financial calculations. The following function gets the end date of a Financial Quarter that is relative to the

DevX - Software Development Resource

Extract the Contents of ZIP/JAR Files Programmatically

Suppose jarFile is the jar/zip file to be extracted. destDir is the path where it will be extracted: java.util.jar.JarFile jar = new java.util.jar.JarFile(jarFile);java.util.Enumeration enum = jar.entries();while (enum.hasMoreElements()) { java.util.jar.JarEntry file

DevX - Software Development Resource

Simplify Operator Overloading

For beginning C++ programmers, operator overloading may seem like a complicated task, but in fact, it’s really simple. You can overload operators in two ways: On non-member functions. On member

DevX - Software Development Resource

Use Oracle’s VARRAY Through JDBC

This code snippet demonstrates how to use Oracle’s VARRAY through JDBC. The code: Creates VARRAYs of different lengths. Contains a table to store data of above array type. Stores the

DevX - Software Development Resource

Uploading a Large Number of Records in DB2

When you’re carrying out an database-intensive operations, like trying to insert a lot of records in one transaction or opening a bunch of connections at the same time, you run

DevX - Software Development Resource

Create and Retrieve a Named DataSet

This C# function creates and retrieves a named DataSet using an open connection and a command. public System.Data.DataSet dsReturnedDataSetFrom(System.Data.SqlClient.SqlConnectionsqlOpenConn, System.Data.SqlClient.SqlCommand TheSQLCommand, string TheQueriedTable, stringTheDatasetName){TheSQLCommand.Connection = sqlOpenConn;System.Data.SqlClient.SqlDataAdapter NewDA = new System.Data.SqlClient.SqlDataAdapter(TheSQLCommand);DataSet