Welcome to my blog, hope you enjoy reading

Thursday, 3 July 2014

Running GWT's Super Dev Mode

Super dev mode is one of the feature given in GWT after 2.5 version.


Thursday, 19 June 2014

How do upgrade GWT in Eclipse

How do upgrade GWT in Eclipse

  • Download the GWT SDK(s) you need from https://developers.google.com/web-toolkit/versions
  • Extract it anywhere you like
  • In Eclipse Preferences > Google > Web Toolkit, use the "Add..." button and navigate to the GWT SDK directory
  • Then, in each Eclipse project's properties page (Project > Properties > Google > Web Toolkit), you can choose one of your installed SDKs.  

Saturday, 14 June 2014

Eclipse (ADT) crash Failed to write core dump. Core dumps have been disabled

I found my problem here: how to fix “Failed to write core dump. Core dumps have been disabled” error while running java and here: Eclipse crashing on startup and here: Eclipse continue crash

Tuesday, 20 May 2014

replace() vs replaceAll()

Both replace() and replaceAll() replaces all the occurrence found. However, there is difference in the type of arguments they accept.


Thursday, 15 May 2014

What is the size of ” null ” Operator in Java ?

When you write

String st1 = null;
You create a reference “str1″ to an object that still does not exist in the heap, but when you type :


Wednesday, 30 April 2014


The Oracle/PLSQL COALESCE function returns the first non-null expression in the list. If all expressions evaluate to null, then the COALESCE function will return null.

The syntax for the Oracle/PLSQL COALESCE function is:

coalesce( expr1, expr2, ... expr_n )


The COALESCE function can be used in Oracle/PLSQL.

You could use the coalesce function in a SQL statement as follows:

SELECT COALESCE( address1, address2, address3 ) result
FROM suppliers;

The above COALESCE function is equivalent to the following IF-THEN-ELSE statement:

IF address1 is not null THEN
   result := address1;

ELSIF address2 is not null THEN
   result := address2;

ELSIF address3 is not null THEN
   result := address3;

   result := null;


The COALESCE function will compare each value, one by one.

Friday, 7 March 2014

Handling multiple updates in Mysql

Handling multiple updates in Mysql 

UPDATE yourtable
    SET updatefield = CASE id
        WHEN 1 THEN 'new value'
        WHEN 2 THEN 'new value'
        WHEN 3 THEN 'new value'
WHERE id IN (1,2,3)

Tuesday, 4 March 2014

CPU usage in ubuntu

CPU usage in ubuntu 

You first should figure out what process is eating away your CPU.
  •     open a terminal with ctrl+alt+t
  •     execute the command top
  •     note the process using the most cpu
If the process isn't a system process, kill it with sudo pkill [processname] with [processname] the name of the process you want to kill. If it is a system process, don't kill it, but try to google the name and figure out what functionality it has in Ubuntu. Then you can proceed to turn it of (in e.g. you system settings).

Monday, 24 February 2014

Project facet Java version 1.7 is not supported

Project facet Java version 1.7 is not supported 

When i update my java I found the issue "Project facet Java version 1.7 is not supported" To resolve this issue follow the steps.
  1. Go to Ecllipse , right click on your project folder
  2. select the properties
  3. now select Project Facets ,here you will see java, click on the version and change the higher version to lower or as per your requirement .


Sunday, 23 February 2014

How to Use RichTextToolbar in GWT

How to Use RichTextToolbar in GWT 

If you’ve ever tried to use the RichTextToolbar that is showcased in the Gwt Showcase, you will quickly find out that it’s not actually built into GWT.  Many GWT developers have experienced this WTFery, as their hopes to conveniently import RichTextToolbar have been dashed.  It is supposedly so that developers are not locked into using that toolbar, but of course, a good default is better than no default…

As you can see here, multiple bugs have been filed about this exact issue since 2008, to no avail!  Drats, I guess it is one of those things that has low priority because there’s a work-around, but it does affect a good number of developers, which should count for something.

Anyway, to use it in your code:

  •     Navigate to <path>/gwt-2.0.3/samples/Showcase/src/com/google/gwt/sample/showcase/client/content/text on your computer, and you should see a bunch of icons, RichTextToolbar.java and RichTextToolbar$Strings.properties.
  •     Copy RichTextToolbar.java and RichTextToolbar$Strings.properties and paste them into your source code folder and modify the package names accordingly.
  •     Copy all the icons and paste them somewhere (I created a folder  <project>/client/icon)
  •     In RichTextToolbar.java, above each “Image Resource…”, you will need to indicate the source of the image.  For example,


    ImageResource bold();

    if the directory you copied RichTextToolbar.java is under client.

That’s it, a little annoying, but hopefully it will find its way into GWT itself soon, though don’t hold your breath.

Also, you can easily play around with the Toolbar– I removed the bottom row of ListBoxes that give you lots of control over background and foreground colors, font and font sizes (I don’t want my users to have that much control over how my website looks!), and it ends up looking like this:

Hope that helps, and that it will save a few people some time!

Related posts: