naidelih says: Hello World!!!

just my online notebook

Entries for August, 2009

StreamReader in vb.net

Reading text file using streamreader;

Imports System.IO

 

 

  Dim list As New List(Of String)

        ' Open file.txt with the Using statement.

        Using r As StreamReader = New StreamReader("file.txt")

            ' Store contents in this String.

            Dim line As String

 

        [...]

Checking for valid email address in PHP

function check_email_address($emailadd) {

 // First, we check that there's one @ symbol, and that the lengths are right

 if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $emailadd)) {

  // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.

  return false;

 }

 // Split it into sections to make life easier

 $email_array = explode("@", $emailadd);

 $local_array = explode(".", $email_array[0]);

 for ($i = [...]