30Nov/12

How to write Print/Output/Error Statement on Text file in Java

  System.out and System.err stream objects are mapped to “standard” output and error stream respectively. By default, Java display standard output/error on display console.   Thus, when we print a statement usingRead More…

17Nov/12

Javascript function to check if a field input contains letters and numbers only

// Function to check letters and numbers function alphanumeric(inputtxt) {  var letterNumber = /^[0-9a-zA-Z]+$/;  if((inputtxt.value.match(letterNumber))   {    return true;   } else   {    alert(“message”);    return false;   }   } To get a string contains only letters and numbers (i.e. a-z, A-Z or 0-9) we use a regularRead More…

17Nov/12

Regular Expressions

Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec and test methods of RegExp, and withRead More…