June 7, 2005

Email Address Validation Using a Regular Expression

The following code demonstrates how to validate email using regular expression: import java.util.regex.*;class regexSample { public static void main(String args[]) { //Input the string for validation String email = “[email protected]”; //Set the email pattern string Pattern p = Pattern.compile(“[email protected]+\.[a-z]+”); //Match the given string with the pattern Matcher m = p.matcher(email);

Two Dozen of My Favorite System Stored Procedures

n important part of learning any development platform, whether it is a development platform like Visual Studio using C# or Visual Basic .NET or a server environment like SQL Server or Microsoft Exchange, is learning about the features built-in and available in the environment. There is no reason to write

Using Recursion Efficiently

It’s important to use recursion carefully to avoid running into stack overflow. This sample code reverses a given integer number using recursion: #include “stdafx.h”int myreverse(int num){ static int nLocal = 0; if(num > 0) nLocal = (nLocal* 10) + (num%10) ; else return nLocal; return myreverse(num/10);}int main(int argc, char* argv[]){

Seven Microsoft Application Blocks in One Neat Little Package

he problem with developing enterprise applications is you have to reinvent the wheel for each key area, such as configuration, database access, or security. Microsoft has addressed this problem in the past by providing application building blocks. However, one of the biggest problems with these application blocks was they were