check for email pattern if( !preg_match( “/^(([^<>()[\]\\\\.,;:\s@\”]+(\.[^<>()[\]\\\\.,;:\s@\”]+)*)|(\”([^\”\\\\\r]|(\\\\[\w\W]))*\”))@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([a-z\-0-9áàäçéèêñóòôöüæøå]+\.)+[a-z]{2,}))$/i”, $email ) ) { $msg = ‘Email address was not recognized as a valid email pattern’; } get the mx host name if( preg_match( “/@\[[\d.]*\]$/”, $email ) ) { $mxHost[0] = preg_replace( “/[\w\W]*@\[([\d.]+)\]$/”, …

Check For Email pattern Read more »

  Install the Debian menu to make all installed applications Missing Icons & Fix Broken Icons sudo apt-get update sudo apt-get install menu menu-xdg update-menus   Keeping Ubuntu clean Install deborphan with command: sudo apt-get install deborphan To delete unnecessary …

Clean up the Ubuntu Read more »

Convert Map to ArrayList: Map hashmap = new HashMap () ; hashmap.put ( “one”,new Integer (1) ) ; hashmap.put ( “two”,null ) ; hashmap.put ( “three”, new String (“THREE”) ) ; aList = new ArrayList ( hashmap.values () ) ; …

Java Tips Read more »

Convert latin1 to UTF-8 in MySQL $ mysqldump -h localhost –user=myName -p –default-character-set=latin1 -c \ –insert-ignore –skip-set-charset dbname > dump.sql $ iconv -f ISO-8859-1 -t UTF-8 dump.sql > dump_utf8.sql Find out which charset is my file $ iconv -f 8859-1 …

Linux Tips Read more »