Learn

This is the general learning category of posts.

  • Today I woke up to the fact that – Microsoft Excel can store only 65,536 rows per sheet.Exporting data from any other tool like TOAD, will write the extra rows, if any, to a new sheet.Thanks Nagu for this knowledge. I never knew it earlier.

    read more

  • TO_CHAR(date column to format , ‘DD-Mon-YYYY’) = ’10-May-2008′ THis function comes handy to do quick date comparisions.

    read more

  • Standard Swap problem

    public class SwapVariables{ public static void main(String args[]) { int a=5; int b= 6; System.out.println(“Before Swap :”+a+” “+b); a=a+b; b=a-b; a=a-b; System.out.println(“After Swap :”+a+” “+b); }}

    read more

  • FizzBuzz Problem

    Found about FizzBuzz problem here I wrote Java program for it in 6 minutes including testing and debugging. [ Yes 🙁 I didn’t get it correct , first time ] However, here is my solution: public class FizzBuzz{ public static void main(String args[]) { for(int i=1;i<101;i++){ if(i%15==0) System.out.println(“FizzBuzz”); else if(i%5==0) System.out.println(“Buzz”); else if(i%3==0) System.out.println(“Fizz”); else

    read more

  • Till date, I installed Java software hundreds of times.Even then I have to spend sometime(though very few minutes) troubleshooting and I don’t get it correct at first time.So decided to write down basic settings in this blog so that I can just refer this if at all I forget next time! JAVA_HOME = C:\Program Files\Java\jdk1.5.0_14\

    read more

  • <script language=”javascript” type=”text/javascript”> document.onkeypress= resetTimer document.onmousemove= resetTimer document.onmousedown= resetTimer document.Onfocus= resetTimer var timerId; timerId = window.setTimeout(“timeOut()”,7200000); function resetTimer() { window.clearTimeout(timerId); timerId = window.setTimeout(“timeOut()”,7200000); } function timeOut(){ // do something here alert(“Your session is times out. You will not be able to continue. Please login again “); var x=1; if(x==1){ //do something here } } </script>

    read more

  • At last, I cracked it! Here is the story: Sometime back when I deploy my web application( named: myApp) in Tomcat 5.5.23 installed on JDK 1.5 Update 14, I used to stuck with the following issue and I was not able to access my application. Tomcat log will show something like below: INFO: validateJarFile(C:\Program Files\Apache

    read more

  • The substring() method of java.lang.class is not inline with the Java naming conventions for methods. As per Java naming conventions, all the methods will be in camelCase.But this does not bother substring() method. To get sub string of any string in Java, we should use substring() NOT subString(). PS: I remember there are some other

    read more

  • The following Error related to JBoss Drools frustrated me because of Java Version mismatch. The version of Drools we are using runs properly only with JDK 1.5 where as we are trying hard to make it run on JDK1.6 and ended up with the following issue. java.lang.ClassNotFoundException: [Lorg.drools.rule.Declaration; at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa der.java:1359) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa der.java:1205) at

    read more