Search:

Type: Posts; User: Ruhe; Keyword(s):

Page 1 of 3 1 2 3

Search: Search took 0.04 seconds.

  1. Replies
    9
    Views
    23,240

    Re: Setting up mysql and jdbc driver with java

    If you're developing a real world application (not an educational project), then I recommend you to use connection pooling. Apache Commons DBCP does that well.
  2. Replies
    9
    Views
    436

    [SOLVED] Re: Copying arrays in Java

    Checkout this section of java language specification. Look at the example with cloning array of integers.

    This is what I was talking about.

    PS: but it doesn't clone array of my own cloneable...
  3. Replies
    9
    Views
    436

    [SOLVED] Re: Copying arrays in Java

    Interesting question.
    I thought that array.clone() returns deep copy of array,
    so if you clone array, which consists of cloneable elements, then all the elements will be cloned.
    But it seems,...
  4. Replies
    9
    Views
    436

    [SOLVED] Re: Copying arrays in Java

    Use System.arraycopy, Luke ;)
  5. Replies
    2
    Views
    362

    Re: Help me with Java!!!!

    Hi.

    Never do things like fileScan.nextInt() without checking that nextInt() exists.
    This is your mistake, you are trying to get next integer from scanner, but it doesn't exist. I'll show you a...
  6. Re: ruby symbols, :string (colon followed by a string literal)

    Read: http://www.rubytips.org/2008/01/26/what-is-a-ruby-symbol-symbols-explained/
  7. Re: Best language & DB for a home cookbook program?

    Just as a variant Adobe Air + embedded sqlite.
    ActionScript is easy to learn, mxml is much-much better than swing.
  8. Replies
    7
    Views
    1,807

    Re: Moderately complex java program question

    From every java programer's bible "Effective Java Programming 2":
    Item 48: Avoid float and double if exact answers are required.

    Did you test your code?



    int quarters = 1;
    ...
  9. Replies
    7
    Views
    1,807

    Re: Moderately complex java program question

    What Every Computer Scientist Should Know About Floating-Point Arithmetic


    Need correct precision? Use BigDecimal.
  10. Re: Java - Removing object from a Collection while iterating

    If you want to remove items while iterating, you should use Iterator.



    Iterator<Integer> it = list.iterator();
    while (it.hasNext()) {
    int i = it.next();
    if (i % 2 == 0) {
    ...
  11. Replies
    7
    Views
    1,841

    Re: Good Books to help learn Eclipse SWT with Java

    1. Install jdk:
    open terminal (Accessories->Terminal). type

    sudo apt-get install sun-java6-jdk
    This install Sun java development kit.
    After it is installed don't close terminal. Type

    sudo...
  12. Thread: Netbeans

    by Ruhe
    Replies
    2
    Views
    511

    Re: Netbeans

    Most likely you have downloaded Java SE bundle.

    Go to Tools->Plugins->Available and check JavaEE, then click install.
    Maybe you'll want to install some other Web & JavaEE plugins.
  13. Thread: MVC in Java

    by Ruhe
    Replies
    23
    Views
    1,213

    Re: MVC in Java

    http://martinfowler.com/eaaDev/uiArchs.html

    For advanced readers.
  14. Re: Running Anything In Java Gives Error In Eclipse

    So running java -version gives you gcj?

    Try to uninstall gcj and check that sun jdk is installed.
    Then again try to update default java version, and check what returns java -version.

    And one...
  15. Re: Running Anything In Java Gives Error In Eclipse

    Install Sun JDK. And change it to default:


    Open a Terminal window
    Run sudo apt-get install sun-java6-jdk to install Sun jdk.
    Run sudo update-java-alternatives -l to see the current...
  16. Re: Need autocomplete textfield in Netbeans java desktop app

    I wonder how do people use google that they can't find such things.

    1. http://www.jroller.com/santhosh/date/20050620
    2....
  17. Re: Is there a gallery website that shows Javascript designs??

    http://www.smashingmagazine.com/
    JS, query...
  18. Replies
    1
    Views
    358

    Re: Eclipse + Tomcat5.5

    Usually jars are copied to the directory WEB-INF/lib, so that the tomcat server was able to load them.
    Eclipse automatically adds all jars located in WEB-INF/lib to classpath.
  19. Replies
    5
    Views
    1,936

    Re: Java: Extending Collections?

    Look at this post. You'll find a lot of interesting things about collections.

    After I watched this presentation, I thought that it would be great, if such collections would be added in java.
  20. Replies
    15
    Views
    2,017

    Re: compiling c programe

    This is Linus's revenge for the fact that the computer is called "xp-desktop" ;)

    Try to do this:
    create file assert_gcc.sh with the following content


    #!/bin/sh

    mkdir test_dir;
    cd...
  21. Replies
    9
    Views
    6,857

    Re: Good and maintained java decompiler

    I always use jad (plugins for IDEA and Eclipse)
    Reason - it does all what I need.

    And if you need here is link for webarchive...
  22. Replies
    1
    Views
    285

    Re: Oracle for JDBC prototyping?

    Because you will not use it in production, you can download oracle xe.
    There are two versions on download page - Western European and Universal. I chose universal, because I need unicode. So if you...
  23. Thread: j2ee application

    by Ruhe
    Replies
    5
    Views
    493

    Re: j2ee application

    Hey, what's the problem installing jboss?
    Just download it and unpack where you want.
    But it's not so easy to create "hello world" app, because j2ee is too complicated.
    JBoss is well documented....
  24. Replies
    10
    Views
    6,959

    Re: Find the angle between two lines

    You can use Law of cosines.
    This formula, but you'll need arccos of the right side of it:

    http://upload.wikimedia.org/math/4/d/8/4d8d17cae0a354660b66327415507651.png

    You'll need to find...
  25. Replies
    9
    Views
    8,762

    Re: Can I auto create database from JPA?

    Yeah, it's really common task to generate DB schema from some persistent framework. Hibernate provides such mechanism through hbm2ddl.

    cl333r
    Everything depends on which JPA provider you use.
    If...
Results 1 to 25 of 67
Page 1 of 3 1 2 3