Search Results

Search found 4 results on 1 pages for 'srandpersonia'.

Page 1/1 | 1 

  • pro*C in oracle XE

    - by srandpersonia
    I downloaded the free express edition of oracle, Oracle XE. I couldn't find the pro*c compiler in this edition. I read somewhere that oracle 9i client has pro*C, So I presumed that oracle client for 10g XE should have it too and downloaded it. But to my disappointment, I can't find it there too. :(. Is there a way to download the older oracle 9i and use it connect to 10g XE without any compatibility problems?. Or is it possible to download the pro*C compiler alone?. I don't want to download the standard editions as they are too large(2 GB). Thanks.

    Read the article

  • java checked exception in a catch clause compilation error

    - by srandpersonia
    Hi, I was expecting an compilation error in the following program because of the throw statement in the catch block as IOException is a checked exception and it is not caught by another try block within the catch block. But I am getting "Hurray!" printed. Any explanation would be much appreciated. According to JLS 11.2.3, http://java.sun.com/docs/books/jls/third_edition/html/exceptions.html It is a compile-time error if a method or constructor body can throw some exception type E when both of the following hold: * E is a checked exception type * E is not a subtype of some type declared in the throws clause of the method or constructor. import java.io.*; public class Test{ public static void main(String args[]) { System.out.println(method()); } public static int method() { try{ throw new Exception(); } catch(Exception e){ throw new IOException(); //No compile time error } finally{ System.out.println("Hurray!"); } } } Thanks in advance.

    Read the article

  • Extracting rightmost N bits of an integer

    - by srandpersonia
    In the yester Code Jam Qualification round http://code.google.com/codejam/contest/dashboard?c=433101#s=a&a=0 , there was a problem called Snapper Chain. From the contest analysis I came to know the problem requires bit twiddling stuff like extracting the rightmost N bits of an integer and checking if they all are 1. I saw a contestant's(Eireksten) code which performed the said operation like below: (((K&(1<<N)-1))==(1<<N)-1) I couldn't understand how this works. What is the use of -1 there in the comparison?. If somebody can explain this, it would be very much useful for us rookies. Also, Any tips on identifying this sort of problems would be much appreciated. I used a naive algorithm to solve this problem and ended up solving only the smaller data set.(It took heck of a time to compile the larger data set which is required to be submitted within 8 minutes.). Thanks in advance.

    Read the article

  • post increment operator java

    - by srandpersonia
    I can't make heads or tails of the following code from "java puzzlers" by joshua bloch. public class Test22{ public static void main(String args[]){ int j=0; for(int i=0;i<100;i++){ j=j++; } System.out.println(j); //prints 0 int a=0,b=0; a=b++; System.out.println(a); System.out.println(b); //prints 1 } } I can't get the part where j prints 0. According to the author, j=j++ is similar to temp=j; j=j+1; j=temp; But a=b++ makes b 1. So it should've evaluated like this, a=b b=b+1 By following the same logic, shouldn't j=j++ be evaluated as, j=j j=j+1 Where does the temp come into picture here? Any explanations would be much appreciated. << I'm breaking my head over this. ;) Thanks in advance.

    Read the article

1