Tip Bank

DevX

Calling C Libraries from .NET

Suppose your library is in C and and your code is in .NET or VC++ (for a UI-based application). Further, suppose you want to display a message box whenever the

DevX

ASP.NET 2.0’s Project Health Monitoring Feature

ASP.NET 2.0 provides much needed project health monitoring through its Health Monitoring feature. Simply add few tags and their values in Web.Config and your project will be automatically monitored. This

DevX

Manipulate the Components of a JNDI Composite Name

This following code shows you how to list, add, and remove components from a JNDI composite name (javax.naming.CompositeName): import javax.naming.*;class jndiCompositeName{ public static void compositeComponents(CompositeName cn) { for(int i=0;i&ltcn.size();i++) System.out.println(cn.get(i));

DevX

How to Calculate the Alignment in C++

Use the following class to help calculate the alignment in C++: template&lttypename T&gtclass Alignment{ struct Align { char align; T t; };public: int alignment() { return sizeof(Align) – sizeof(T); }};

DevX

Turn Off Auto-Commit for Better Performance

When you first establish a connection to a database, the connection is in auto-commit mode, by default. For better performance, turn auto-commit off. You can do this by calling the

DevX

New Web Fonts for Windows Vista

Microsoft has released a number of new Windows Vista fonts, for use in web development. They are described on the Microsoft Typography site, with examples shown in XPS files. If