Showing posts from May, 2013

No Response - Galaxy Tab Screen Hanging

I am unable to do anything with my galaxy tab.

Multiple tasks were running and my galaxy tab was stopped responding to my input. I pressed power button and volume button and nothing work out for me.

Even i can't take out battery do restart.

What to do in this kind of situation ?

Hold the power button for a long time until your device restarted. That's it now your device is started and you can enjoy ...

Skype is not rotating the screen

I have installed skype apps in my tablet and its not rotating based on the sensor and its same for most of the tablets but the application works fine in android mobile devices.

Solution to rotate screen in Tablet's

Go to settings > View > Change from Tablet view to Classic view.Restart your application and it will work fine.

Image compression using java

There are no specific API is available for compressing the images.

Supported format files are JPG (Joint Photography Experts Group) and PNG (Portable Network Graphics) Download Jar (Java Archive) which is developed by Java Query APICreate a instance using ImageResize Class and using that object call the method compressImage Sample
ImageResize ir = new ImageResize();  ir.compressImage("Source Location", "Destination ", width, height);
String Parameter: Source Location and Destination Integer Parameter: width and height
Parameters Description:
·1st Parameter : Source Location , Example c:\\demo\\image.jpg ·2nd Parameter : if you mention “default” then it will compress the original image and if you mention the destination location then it will create a new compressed image ·3rd Parameter  & 4th Parameter : if you enter 0 for both then image resolution will not change but if you mention some value greater than 0 then image resolution will be changed.
That’s it.  Thanks to th…

Remove The Word From Android Keyboard Suggestion

When you type something on android keyboard then android system automatically saved the entered text word for suggesting these words next time when you just begin with few character.

You can do with setting to enable or disable auto saving feature but how you will delete a particular word?
Here is the image of suggesting the words when i start typing the “an” keyword

I need to delete the “anwered” from the suggestion

So hold your finger on “anwered” from some seconds automatically a popup will appear with Remove confirmation and you click the ok button to remove the keyword from already saved words that you entered.

Google Web Toolkit Local Storage

Learn how you can implement the local storage using Google web tool kit.

Local storage helps you to keep the data on client machine or end user machine but never use an important data on local storage because local storage is not a secure storage.
Creating an instance using Storage class and also checking whether the browser supports local storage or not using getLocalStorageIfSupported() method.
Storage stockStore = Storage.getLocalStorageIfSupported();
Insert the data using setItem() method , fetch data using getItem() method and clear the local storage data using clear() method.
stockStore.setItem(String key, String data); stockStore.getItem(String key); stockStore.clear();}
Set Item has two parameters, one is key and another one is data. Key is used to maintain the index and data is the parameter where we can save the string which is needed in other place.
Example :- stockStore.setItem(“userName”,”demo”); stockStore.setItem(“companyName”, “company”);

Get Item has only one parameter i…

Solution : Cannot delete or update a parent row: a foreign key constraint fails

Whenever you want to delete a particular row from a parent table, usually a database engine checks whether this parent data primary key value refers to any child table data.

For Example,

Table: user

id login_Id user_Name 1 demo001 Note 2 demo002 Book
Table: userAddress

id user_id Country State 1 1 India Himachal Pradesh 2 2 India Tamil Nadu
Primary Key Foreign Key

Table UserAddress has “user_id” is a foreign key reference from Table User.

So User Table is Parent Table and UserAddress Table is Child Table

If you are try to delete any data in child table then you might be not facing an error but if you try to delete any data in parent table then you will face problem “Cannot delete or update a parent row: a foreign key constraint fails” because parent table data is referencing to child table.

Execute this Query