Monthly Archives: December 2012

Check string isBlank method

To check the string is blank use next:

public static boolean isBlank(String str) {
    int strLen;
    if (str == null || (strLen = str.length()) == 0) {
        return true;
    for (int i = 0; i < strLen; i++) {
        if (!Character.isWhitespace(str.charAt(i))) {
            return false;
    return true;

Or just use apache commons for short.

Resource loading order in JSF 2 and PrimeFaces 3.x

To override primefaces style use next in h:head tag:


And it works fine, instead of using this:


See also,

Just a great online graphic editor Pixlr

For quick edit of images you can use Awesome online editor allows to edit a simple images without install any desktop app.

MySQL backup/restore from command line

# mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

# mysql -u root -p[root_password] [database_name] < dumpfilename.sql

ConEmu. Just a great software!

Many times i’ve tried to find free console emulator for windows without bugs. And its occurred!
Thanx to author


Horizontal and vertical align in CSS

To effectively align elements use:

TYPE here!!!

Thanx to


Confirm dialog in Javascript

To implement confirmation for some action in webpage, use:

In element attribute onclick:

onclick="return doConfirmMultipleInvoice();"