November 4, 1999

The Month of Calendar Class

For some reason unknown to me, the designers of java.util.Calendar class have enumerated months of the year from 0 to 11 inclusive. So, January would be month zero, and December month 11. Very thoughtful of them. Or, maybe this is due to indexing of arrays in java. So when you

Using Applet Viewer the Easy way

To test your applets using the applet viewer, put the following comment in your Java file: /* */ Then you won’t need an HTML file for your applet code. The applet viewer will parse the applet tag and display the applet. Now, you can test it your applet by typing

Share Script Functions

In ASP pages, you can share script functions or libraries using the #INCLUDEdirective. This feature allows you to share subroutines and functions acrossmultiple pages. Instead of repeating similar (or rather same) scriptfunctions in most of your asp pages, you can club them into a single fileand later on include that

Using IObjectControl COM Interface of Component Class Factory

IObjectControl is the second COM interface (besides the COM interface IObjectContext) of the component class factory, as stored in MTS when the component is installed. This interface is useful for carrying out tasks during activation and deactivation of the component. In VB, we can implement this interface within the component

All Variables Must be Variants While Writing ASP code with VBScript

There are two limitation about writing ASP code with VBScript. First of all, all variables must be variants. Second, VBScript can currently retrieve output parameters only when they are declared as variants. If you try to call a method on a Visual Basic object that has an output parameter defined

Enumerate Treeview Nodes Recursively

Trying to parse a set of TreeView nodes and their children’s nodes and their children’s nodes can be confusing. This algorithm makes the process easier. Recursion describes an algorithm that can call itself. This is especially useful in COM’s object hierarchy. Collections that can reference other collections can be easily

Representation of Floating Point Numbers

People sometimes complain about the inaccuracy of floating point arithmetic. To demonstrate the level of floating pint inaccuracy, consider the following program: #include using namespace std; int main() { float f1 = 2000.58; float f2 = 2000.0; cout