Welcome to my blog, hope you enjoy reading
RSS

Wednesday 14 January 2015

How to include Java Source code within Eclipse?

How to include Java Source code within Eclipse?

In Netbeans, I can see the built-in sourse code of Java by clicking on LeftClick + Ctrl, and the .java file is shown:
Share

Tuesday 13 January 2015

android Error in http connectionjavajava.lang.SecurityException: Permission denied (missing INTERNET permission?)

android Error in http connectionjavajava.lang.SecurityException: Permission denied (missing INTERNET permission?)

solution:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Share

“appcompat_v7” project is created automaticaly after creating a new project in Eclipse

“appcompat_v7” project is created automaticaly after creating a new project in Eclipse

Do as follows to overcome this issue, this works for me. Create project as usual than follow below steps

Share

Count number of Delimited value in Column in mysql


Now i want count no of items in one particular row in one particular cell.

i.e If i have 25,45,26,45,46 in a cell in table.
I want the output like 5

Solution:

 If data is end with delimiter then
Query: SELECT LENGTH(yourColumn) - LENGTH(REPLACE(yourColumn, ',', '')) AS numberOfItemsInRow FROM yourTable;

example:
SELECT LENGTH('123,123,') - LENGTH(REPLACE('123,123,', ',', '')) AS numberOfItemsInRow;
o/p: 2

If data is not end with delimiter
Query: SELECT LENGTH(yourColumn) - LENGTH(REPLACE(yourColumn, ',', '')) + 1 AS numberOfItemsInRow FROM yourTable;

example:
SELECT LENGTH('123,123') - LENGTH(REPLACE('123,123', ',', ''))+1 AS numberOfItemsInRow;
o/p: 2

Share