June 7, 2006

Specify Default Reference Assemblies for Command Line Compilation in .NET

For command-line compilation in .NET, you can reference other assemblies by using the /reference or /r option on the command line. But when you have to specify many assemblies, the list becomes too long. Because you have to specify these assemblies everytime you perform command-line compilation, it’s better to specify

Traverse All the Nodes of a DOM Tree

This is just a litle method that illustrates how to get the minimum of information from all nodes of a DOM tree. The key of this method is the “old-school” recursive style: private void traverseAllNodes(Node node) { if(node.hasChildNodes()) { NodeList NL=node.getChildNodes(); for(int i=0;i

Retrieve the Month’s First Day for a Date

This code shows you how to retrieve the month’s first day for a date: /*create a table to store a number, a dummy unique value and a date*/create table t_ ( i number, d date);/*set the date format to dd.mm.yyyy*/alter session set nls_date_format = ‘dd.mm.yyyy’;/*insert a few dates*/insert into t_

Create a Control Array at Runtime Instead of Design-time

To create and access the control arrays as though they were created at design time, simply follow these steps and use the code. This example creates an array of text boxes at runtime. Start a new VB project. Place a textbox on the form. Name the textbox txtarray. Set the

Formatting Floating Point Numbers

ontrolling the number of fractional digits after the decimal point is a common requirement in various application domains?including dialog boxes, relational databases, financial applications, SMS messages, and when processing data files. This solution shows you how to control the number of fractional digits by using familiar design techniques presented in

“Fat” Marching Ants: An Algorithmic Experimentation Using GDI+

arching ants are a colloquial term for the animated dotted-line that indicates a selected item or area by image-editing programs such as Adobe Photoshop and the GIMP. Traditionally, marching ants are implemented as a 1-pixel line. “Fat” marching ants (> 1 pixel wide) have a lot of visual appeal especially