Welcome to my blog, hope you enjoy reading
RSS

Thursday 23 January 2014

GWT KeyPressHandler getCharCode issues

GWT KeyPressHandler getCharCode issues 

  • event.getNativeEvent().getKeyCode()
  • KeyCodes.KEY_ENTER=13
This code returns the '10' in chrome so the following code is not working.
  • if(event.getNativeEvent().getKeyCode()==KeyCodes.KEY_ENTER)
This code returns the '13' in firefox so the following code is working. 

so like the code like following for both chrome and firefox
  • if(event.getNativeEvent().getKeyCode()==13)
  • {
  • //Do something
  • }else if(event.getNativeEvent().getKeyCode()==10)
  • {
  • //Do something
  • }



Share

Sunday 12 January 2014

How to execute Runnable file in Ubuntu 13.10

How to execute Runnable file in Ubuntu 13.10 

Open the file manager, go to the Files menu and select Preferences to open the "Preferences" dialog.

In the Behaviour tab activate the option Run executable text files when they are opened in the Exexcutable Text Files section:


 
Share

Saturday 4 January 2014

One table comma(,) separated values to get another table data in mysql

One table comma(,) separated values to get another table data in mysql

problem:

I have two tables:

Posts Table

PostID | Gallery
  1    | 4,7,8,12,13
  2    | 1,2,3,4
  3    | 5,8,9
  4    | 3,6,11,14
Share

How to start wamp automatically upon Windows start-up

How to start wamp automatically upon Windows start-up 

1) Log in as an administrator.

2) Start -> Run "services.msc"

3) Right click the service wampapache go to properties and set star-tup type to 'Automatic'

4) Repeat step 3 but for wampmysqld (if you want MySQL to also be available on startup)

Share