Search:

Type: Posts; User: Dalisra

Page 1 of 2 1 2

Search: Search took 0.25 seconds.

  1. Replies
    1
    Views
    9,233

    Sorting Algorithms

    Hello, today I will try to give a quick overview of sorting algorithms that we can use.

    Note: To keep it simple I will use lists that are made of integers (for sorting).

    Introduction

    First I...
  2. Replies
    5
    Views
    1,371

    Re: Parsing By Prediction Algorithm(?)

    What are you trying to do? To gues a number? Or are you trying to create a list of random numbers?
    I don't quite understood what is your prediction supposed to be..
  3. Re: Convert contents of JTextArea / JEditorPane to PDF

    Let me google that for you
  4. Replies
    1
    Views
    1,374

    Re: Birthday Song Class

    BirthdaySong b2 = new BirthdaySong("Grace");
    b2.sing();

    Here creating BirthdaySong object you pass a string: "Grace"

    in BirthdaySong class you have a constructor that looks like this:

    ...
  5. Re: Homework help... beginning classes

    Its because in PersonInfo you setting all variables as static.
    Static means that no matter how many different person objects you will create, they all will have same value.
    Since you set person3...
  6. Replies
    1
    Views
    1,767

    Re: invisible box game

    I think the problem is that you define smallclick, mediumclick and largeclick outside of the method that acctualy uses them.
    Another problem is that you are using mouseExited() method and not...
  7. Replies
    4
    Views
    1,033

    Re: Storing an array into an array

    In your CustomerDatabase you have an array of Customer objects.
    Each Customer object can have an array of Dvds it have borrowed.
    So all you need to do is to add an array of dvds to your Customer...
  8. Re: Firm enlists Winston the homing pigeon to transfer data

    Interesting! Strange that in 21st century, this would be the best way to send information...
    However I have experienced same thing. It's much faster to upload info into a usb stick, and run to...
  9. Replies
    4
    Views
    7,953

    Re: Breaking out of multiple loops

    I wrote a short code to test my theory and it worked, however I believe you can reuse and optimize the code in a better way to get the same results, this is just an example how to do it:


    ...
  10. Replies
    4
    Views
    7,953

    Re: Breaking out of multiple loops

    Hi,
    have you tried using:
    break;
    ?
  11. Re: AND THE WINNER OF THE BIRTHDAY COMPETITION IS...

    Weee! Thanks a lot! Wasn't expecting to win at all.
  12. Replies
    1
    Views
    2,231

    Re: Printing a Histogram Help - Arrays

    I would suggest to use tab to align them in a nice row.. Another option is to count how big strings are and try to compensate with spaces if string is too short..

    using tabs:


    /**
    * Haven't...
  13. Thread: Random numbers

    by Dalisra
    Replies
    8
    Views
    2,594

    Re: Random numbers

    You say that you will generate 30-40 numbers.. That is a lot if the range is just 40 numbers(f.e. from 1 to 40), and you would overload system. But if the range is one billion (f.e. from 1 to 1 000...
  14. Thread: Random numbers

    by Dalisra
    Replies
    8
    Views
    2,594

    Re: Random numbers

    If you need to pick numbers in random order from x to y then I agree that using random function this way would be unefficient. There are several ways of doing this depending on how big is the range...
  15. Replies
    2
    Views
    3,030

    Re: Desktop Database Application

    Hi TCoomer,

    I think Java is perfect for a such system.
    Take a look at derby database.
    I believe NetBeans is the best free IDE for such system and it will help you with setting up derby database....
  16. Replies
    5
    Views
    1,377

    Re: I need help writing this program

    A quick suggestion: wouldn't it be simplier to use mod function?

    boolean divBy4 = myYearInt % 4 == 0
  17. Replies
    4
    Views
    9,199

    Re: select count(*)

    Ahh, I am glad you found that out.
  18. Replies
    36
    Views
    5,058

    Re: getting files in the linux server

    Maybe that directory, or whole server requires password authentication?
  19. Replies
    4
    Views
    9,199

    Re: select count(*)

    I haven't checked so I might be totaly wrong: but don't you need a "WHERE" statement?
    Example:
    SELECT count(name) FROM Users WHERE 1;

    If it's not that, then I would need to see how you do it in...
  20. Replies
    3
    Views
    2,196

    Re: traversing multiple jTabbedPane?

    If I understand your problem right then what you want to do is to update your selections once someone presses "back" or "next" buttons, and vise versa (enable / disable buttons once someone changes...
  21. Replies
    5
    Views
    3,738

    [SOLVED] Re: Switch statement question

    I hope it works now!
  22. Replies
    5
    Views
    3,738

    [SOLVED] Re: Switch statement question

    You asked how does switch operation work.
    I explained it to you. However there are things you need to do yourself, you need to read firstNumber, secondNumber and operation character before you...
  23. Replies
    5
    Views
    3,738

    [SOLVED] Re: Switch statement question

    Quick search in google gave me this

    The switch Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)

    In the example above they switch an integer. In your case I would...
  24. Replies
    2
    Views
    569

    Dalisra says Hello!

    Hello everybody!

    My name is Dal, I am student in Norway. From all those language courses that I had, the one that I enjoy programming in most, is Java. I feel quite comfortable programming with...
  25. Replies
    4
    Views
    5,040

    [SOLVED] Re: JTextField not visible?

    Well let's see what is going wrong..

    First what I notice is that you are reading in lines from console, instead you should try to create new JTextField and use it for input.

    Also lets try...
Results 1 to 25 of 30
Page 1 of 2 1 2