how to add rows number using mysql query Get link Facebook X Pinterest Email Other Apps November 11, 2012 select @rownum:=@rownum+1 ‘rowid’, p.* from menu p, (SELECT @rownum:=0) r order by id desc limit 10; Get link Facebook X Pinterest Email Other Apps Comments
How to count duplicate characters from a sentence in java August 20, 2012 Output : DuplicateCharacter .java package com.swain.cell; import java.util.HashMap; public class DuplicateCharacter { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String str = "Character duplicate word example java" ; char ch1[]=str.toCharArray(); HashMap<Character,Integer> hm= new HashMap<Character,Integer>(); for ( int i=0; i<ch1. length ; i++) { char ch=ch1[i]; ... Read more
How to use webview in android? August 20, 2012 MainActivity.java package com.swain.cell.financial.calculator; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.webkit.WebView; public class MainActivity extends Activity { WebView wv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); wv=(WebView)findViewById(R.id.webView1); wv.getSettings().setJavaScriptEnabled(true); wv.loadUrl("file:///android_asset/playlist/index.html"); ... Read more
Fibonacci August 10, 2012 Fibonacci Output 1:- 1 2:- 1 3:- 2 4:- 3 5:- 5 6:- 8 7:- 13 8:- 21 9:- 34 10:- 55 11:- 89 12:- 144 13:- 233 14:- 377 15:- 610 Source code package com.swain.cell; public class Fibonacci { public static long fibonacci( int n) { if (n <= 1) return n; else return fibonacci (n-1) + fibonacci (n-2); } public static void main(String[] args) { int n=15; for ( int i = 1; i <= n; i++) System. out .print... Read more
Comments
Post a Comment