The Latest

DevX - Software Development Resource

Compressing XML—Part I, Writing WBXML

ireless Binary XML (WBXML) is a compact representation of XML and is part of the presentation logic in Wireless Application Protocol (WAP). WBXML significantly improves the efficiency of transmitting XML

DevX - Software Development Resource

‘Making Reuse Fun’ instead of ‘Making Fun of Reuse’

evelopers using binary reusablecomponents essentially becomes users, and immediately they treat these”black boxes” the same way users treat other programs.  Amazingcapabilities are overshadowed by ease of use and other trivial

DevX - Software Development Resource

Create all the subdirectories for a new folder

The System.IO.Directory class exposes a CreateDirectory method that, as its name suggests, can create a subdirectory. However, this method is even more powerful than it appears at a first glance,

DevX - Software Development Resource

Working with owned forms

If a form owns another form, the owned form will be always displayed in front of its owner form, no matter which is the active form. This makes owned forms

DevX - Software Development Resource

Showing help

The System.Windows.Forms.Help class encapsulates the HTML Help 1.0 engine and lets you display the index, the search page, or a specific topic in an HTML file in HTML Help format

DevX - Software Development Resource

Mouse clipping with the Cursor class

The Clip property of the System.Windows.Forms.Cursor class represents the rectangle within which the mouse cursor is confined, or Nothing if the mouse can move over the entire screen. This rectangle

DevX - Software Development Resource

Adding events dynamically in a Windows Form

The new AddHandler statement makes it possible to attach event dynamically, that is without having to bind them via static code based on the Handles keyword. This keyword is also

DevX - Software Development Resource

Use IsDate() to Check Valid Dates

Check For Valid Dates Related Posts How To Remove Virus From AndroidIntroducing brand-new dbForge Studio for PostgreSQL, a powerful IDE for working with PostgreSQL databasesElon Musk threatens Apple over OpenAI

DevX - Software Development Resource

Open a Small Browser Window

The small window is usually used as a pop-up page for advertisements or to show information concerning particular keywords.For example, you can put in a page: Requestor: James Dean When

DevX - Software Development Resource

Validate the Date in Javascript

//validation of From Date//Here FromDay,FromMonth,FromYear & ToDay,ToMonth,_ToYear are the names ofthe form fields corresponding to from date and to _dates. Assuming thatthese are drop down fields on the form.function validateFromDate(){

DevX - Software Development Resource

Consistent Error Handling in SQL Server

Suppose you need to tack on an additional value to all your custom errors in SQL Server 2000. For VB programmers, that might mean tacking on the value of vbobject

DevX - Software Development Resource

Managing Custom Errors in SQL Server

Creating Custom Errors in SQL Server is not a hard thing to do, but managing those errors across multiple developers can be difficult. The question becomes: who has already used

DevX - Software Development Resource

Never Use L”” to Create a BSTR

When you call a COM method, it accepts BSTR in the following way: Iface->f(L””) L”” does not create a BSTR. This just creates a wide character string and if the

DevX - Software Development Resource

Use Math.PI and Math.E for Scientific Calculations

Many scientific/trigonometric/mathematical applications need the values of ‘pi’ and ‘e’ (the basis of natural logarithms) for calculations. The math class in the java.lang package has two static double constants that

DevX - Software Development Resource

Many Primary Keys for a Single Table

Have you ever wanted to have 1:1 relation between tables (i.e. a table in which two columns act like primary key not combined but separately)?DB only supports a single column,

DevX - Software Development Resource

Check for Available Memory Programmatically

If an application’s behavior is dependent on the amount of available memory, then this code fragment can be used to determine what action an application should take. For example, a

DevX - Software Development Resource

Always Use the Collection Name when Using Request Object

In ASP, Request object has five collections: QueryString, Form, Cookies, ClientCertificate, and ServerVariables. When you want to access information in one of these collections, you have the choice of writing

DevX - Software Development Resource

Packing an XML Parser with a Java Application

You can pack the XML Parser along with the Java Application you are shipping. The following steps show how to do this. I used the Apache’s Xerces and Xalan parsers

DevX - Software Development Resource

Use enum Types in switch Statements

Certain compiler and code analyzers can detect a missing enumerator in a switch statement. Consider: enum Seasons{ Winter, Spring, Summer, Fall};switch (s){case Winter: wearCoat(); break;case Spring: pruneGarden(); break;case Summer: goSwimming();

DevX - Software Development Resource

Concatenating Variables

If you need to concatenate variables of different types to form a string, use a stringstream object. The header contains the declarations of the stringstream family of classes. Using its

DevX - Software Development Resource

Reading a String from the Standard Input

There are two methods of reading a string from the standard input. The first one uses getline(), as in the following example: std::string name;getline(cin, name); // option #1 The second