
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
racle announced this morning that it has created a new version of the Oracle 9i application server, the Java edition, which it is targeting at current BEA application server customers
‘ Validate an e-mail address’ Example:’ MessageBox.Show(IsValidEmail(“[email protected]”)) ‘ True’ MessageBox.Show(IsValidEmail(“vb2themax.com”)) ‘ False’ MessageBox.Show(IsValidEmail(“mbellinaso@vb2themax”)) ‘ FalseFunction IsValidEmail(ByVal email As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch(email, _ “^w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*$”)End Function
‘ Validate a US ZIP code’ Example:’ MessageBox.Show(IsValidUsZip(“12345”)) ‘ => True’ MessageBox.Show(IsValidUsZip(“12345-1234”)) ‘ => True’ MessageBox.Show(IsValidUsZip(“12345-12345”)) ‘ => FalseFunction IsValidUsZip(ByVal zip As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch(zip, _ “^(d{5}-d{4})|(d{5})$”)End Function
‘ Validate a URL’ Example: MessageBox.Show(IsValidUrl(“http://www.vb2themax.com”))Function IsValidUrl(ByVal url As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch(url, _ “(http|ftp|https)://([w-]+.)+(/[w- ./?%&=]*)?”)End Function
‘ Validate an IP address’ Example:’ MessageBox.Show(IsValidIP(“123.14.0.255”)) ‘ => True’ MessageBox.Show(IsValidIP(“256.14.0.255”)) ‘ => FalseFunction IsValidIP(ByVal ipAddress As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch(ipAddress, _ “^(25[0-5]|2[0-4]d|[0-1]?d?d)(.(25[0-5]|2[0-4]d|[0-1]?d?d)){3}$”)End Function
‘ Validate a US Social Security Number’ Example:’ MessageBox.Show(IsValidUsSSN(“123-12-1234”)) ‘ True’ MessageBox.Show(IsValidUsSSN(“123-123-1234”)) ‘ FalseFunction IsValidUsSSN(ByVal ssn As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch(ssn, _ “^d{3}-d{2}-d{4}$”)End Function
‘ Validate a US phone number’ Example:’ MessageBox.Show(IsValidUsPhoneNumber(“(123) 456-7890”)) ‘ True’ MessageBox.Show(IsValidUsPhoneNumber(“(123) 456-78901”)) ‘ FalseFunction IsValidUsPhoneNumber(ByVal phnNum As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch(phnNum, _ “^(((d{3}) ?)|(d{3}-))?d{3}-d{4}$”)End Function
‘ Validate a system path’ Example:’ MessageBox.Show(IsValidPath(“C:TestMemo.txt”)) ‘ => True’ MessageBox.Show(IsValidPath(“\RemotePCTestMemo.txt”)) ‘ => True’ MessageBox.Show(IsValidPath(“C:TestMem|o.txt”)) ‘ => FalseFunction IsValidPath(ByVal path As String) As Boolean Try Dim f As New System.IO.FileInfo(path)
ava developers, here’s your chance to survey the scope of J2ME (Java 2 Micro Edition) knowledge in one solidly written reference. Discover the basic architecture and functionality of J2ME and
s in the prior editions, the authors have exhausted themselves to deliver the very latest in network security technologies and techniques. A special new bonus feature of the book is
t has often been said that programmers are introverts. I find that this isn’t true, in the majority of cases, but programmers usually do have a longer attention span and
he .NET framework supports configuration files to supply settings and static data to both ASP.NET and Windows Forms applications. Configuration files are XML-formatted files loaded at startup time and cached
In this installment, you’ll explore the challenges a developer faces whentrying to build a single set of user interface code that will work on alltargeted platforms. You’ll see what goes
‘ this code assumes that you have used this Imports statement’ Imports Microsoft.Win32Function IsExcelInstalled() As Boolean ‘ Define the RegistryKey objects for the registry hives. Dim regClasses As RegistryKey =
‘ Extract the name of the SoapException’s (the type of exception thrown by a ‘ web service) “inner” exception.” Example:’ Try’ ‘ this call throws an exception’ Dim service As
‘ Execute a batch of OleDb commands.’ Parameters:’ – The list of statements separated by ; chars. Use the ? char as a ‘ placeholder for a parameter.’ – The
‘ Search the specified string, with the case-sensitive mode or not’ Returns the index of the first occurrence found, or -1 if not foundPublic Function SearchString(ByVal source As String, ByVal
‘ Reverse the input string, without using the StrRever function in the VB6 ‘ compatibility assemblyFunction ReverseString(ByVal source As String) As String Dim chars() As Char = source.ToCharArray() Array.Reverse(chars) Return
‘ this code assumes that you have used this Imports statement’ Imports Microsoft.Win32Function IsWordInstalled() As Boolean ‘ Define the RegistryKey objects for the registry hives. Dim regClasses As RegistryKey =
‘ Count the number of string occurrencesPublic Function CountOccurrences(ByVal source As String, ByVal search As String, _ Optional ByVal ignoreCase As Boolean = False) As Integer Dim options As System.Text.RegularExpressions.RegexOptions
‘ Return the number of checked nodes in the specified treePublic Function CountCheckedNodes(ByVal rootNode As TreeNode) As Integer Dim count As Integer = 0 ‘ count the root node, if
If you want your program to be easily translated into a different language, consider making every displayed text a resource in a dll. Every language will have its own .dll
You will never have to check the form tag for local page postbacks.This nipped me once.
What happens if your visitors have it disabled?Include the following code to: Let them know that JavaScript is disabled. Tell them how to enable it in their browser. To view
If you have used a native method through a Java interface, then you might already know that a header file is generated from the Java class that contains the native
To program a case-sensitive comparison of a user-typed password on a case-insensitive SQL Server 7.0 instance, assume that the value of the password stored in your table is BamBi2000 (notice
A normal practice in implementing a search is to use the “like” operator. As long as you are searching for your keyword in only one column, there will be no
y the time you are reading this Microsoft will be very close to shipping Visual Studio .NET 2003 and its associated language products?including Visual C++. February 2003 marks an exciting
ince the earliest versions of the Windows operating system, all Windows have been rectangular. However, the number of applications that break out of this boring mold is rising. Even Microsoft,
luetooth is one of today’s most exciting technologies. It is a short-range radio wave wireless technology operating in the 2.4 GHz frequency spectrum. With an operating range of 30 feet











