Skip to main content


Showing posts from October, 2011

One of the best windows multiple desktop tools - mDesktop

It's free and open source. enjoy it. mDesktop is a lightweight application that allows the user to utilize multiple virtual desktops. Also, mDesktop integrates with Hotcorners. mDesktop currently supports up to ten virtual desktops. Instructions: Holding Alt-Desktop Index (e.g. Alt-1, Alt-2...) switches between desktops Keystroke Alt-Ctrl-Desktop Index sends the active window to selected window (e.g. Alt-Ctrl-2 sends active window to the second virtual desktop) Right Clicking on tray icon and selecting option "Hide Icon" hides the mDesktop tray icon while the application is still running, allowing you to have a "boss" workspace. roadmap

The regular Expression about Email Validation

public static boolean isValidEmailAddress(String emailAddress) {
*  1. ^(caret): Matches at the start of the string the regex pattern is applied to.
*  2. \ (backslash) followed by any of ^-]\ : A backslash escapes special characters to suppress their special meaning.
*  3. ()The ( (open parenthesis) and ) (close parenthesis) may be used to group (or bind) parts of our search expression together
*  4. * The * (asterisk or star) matches the preceding character 0 or more times, for example, tre* will find tree (2 times) and tread (1 time) and trough (0 times).
*  5. +The + (plus) matches the previous character 1 or more times, for example, tre+ will find tree (2 times) and tread (1 time) but not trough (0 times).

String expression = "^[\\w\\-]([\\.\\w])*[\\w]*@([\\w\\-]+\\.)+[A-Z]{2,4}$";

CharSequence inputStr = emailAddress;
Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(inputStr);
return matcher.matches();