Search:

Type: Posts; User: csharp100

Page 1 of 2 1 2

Search: Search took 0.20 seconds.

  1. Replies
    0
    Views
    382

    mysql queries in a servlet...

    Hello all, I am having problems with some queries in a servlet. Please note, my experience with mysql queries are very limited. This program exercise is for more of the servlet process than queries....
  2. Re: open multiple text file to input to mysql

    Figured it out, thanks.
  3. open multiple text file to input to mysql

    Hello everyone,
    I am trying to figure a way to open multiple text files to "write" to seperate tables in a mysql db. When I try to open another FileInputStream my ide, (NetBeans) doesn't like it and...
  4. Replies
    12
    Views
    805

    Re: Declaring a winner in a Race Car Program

    Ok so we can go along those lines, but then that begs the question, if a user desides to change the size of the frame, how does one know the size of the frame? What would be a value of that or better...
  5. Replies
    12
    Views
    805

    Re: Declaring a winner in a Race Car Program

    Yes. Since the panel width is "z = 1200", I assume one lap would roughly be less than a panel width. Is that not correct?
  6. Replies
    12
    Views
    805

    Re: Declaring a winner in a Race Car Program

    Yah good call. Gotta figure out how to count the laps. Not really sure how to go about it efficiently. I did have a loop with repaint() in it and it really did not seem efficient enough.
    It was:

    ...
  7. Replies
    12
    Views
    805

    Re: Declaring a winner in a Race Car Program

    Ok so here is some updated code But I am not see the flaw. It doesn't seem to stop after 3 laps. Can someone point out what might be wrong? I really appreciate it.
    Here is the updated code:

    ...
  8. Replies
    12
    Views
    805

    Re: Declaring a winner in a Race Car Program

    Thank You.
  9. Replies
    12
    Views
    805

    Re: Declaring a winner in a Race Car Program

    if (k < 341) {
    repaint();
    k++;

    Is where I will get 3 "laps" based on the panel width of 1200.



    I do not
  10. Replies
    12
    Views
    805

    Declaring a winner in a Race Car Program

    Hello All!

    I have the following code:


    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
  11. Re: Problems with Math.Random() in a for loop

    Yes there is a discrepancy. I noted that right below the full code.
    I will take your suggestion under advisement. Thank you!
  12. Problems with Math.Random() in a for loop

    Hello everyone,
    I have a program here that will display between 2 -4 cars "racing" accross the track. I am trying to get the cars to move at random speeds. Some faster, some slower but always...
  13. Re: Passing command line args from main to another class

    Thanks Norm! Didn't really look at it that way.
  14. Passing command line args from main to another class

    Hello everyone.
    As the title mentions, is this possible? I have been tasked with passing command line args from main to the class drawOnGrid. I will have to pass much more but figured starting here...
  15. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    Frankly that is my problem. The System.out.println(map.getRoute("start city", "end city") is in test.java where getRoute is in Dijkstra and returns right back to test.java. The return is the cities....
  16. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    Well back for another run at it. Can anyone at least tell me how to print out the distance with the cities? As the code is set up now, it prints


    Lollardry, scatterling, obstetrist, provocative
    ...
  17. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    I did this and it prints exactly what was listed above. No numbers just the "city" names.


    System.out.println(shortestPath[i].path);


    I was working on the toString() method and trying to...
  18. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    Dang this Java! I changed it like you said, ran the program and nothing changed. Can I not call this method to main? I tired


    System.out.println(toString());
    &...
  19. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    You lost me there. Do I not have a toString() method in NodeData? Can you help me out with a little code?
  20. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    Well that seems to be my problem. The distances are in the linked list array. I guess I have to do a comparison of some sort in order to get the "miles". My return statement from the algorithm is:
    ...
  21. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    Yes, when I run the program the output is as follows:


    Lollardry, scatterling, obstetrist, provocative

    where "Lollardry" is the starting point and "provacative" is my end point.

    What I...
  22. Replies
    18
    Views
    1,447

    Re: Dijkstra's code help

    From the test function I have two cities listed:


    System.out.println(map.getRoute("Lollardry", "provocative"));

    and the output is as follows:


    Lollardry, scatterling, obstetrist,...
  23. Replies
    18
    Views
    1,447

    Dijkstra's code help

    Hello everyone,
    I have the following code for Dijkstra's algorithm. What my problem is how to get from a start node to ALL the nodes. If I have 4 nodes say STL, NY, CHI, & ATL all with different...
  24. Replies
    31
    Views
    2,780

    Re: string==null or string.equals(null) problem

    Error corrected. I need to add:



    str4 = null;


    in order to "clear out" what was in it whenever it looped.
  25. Replies
    31
    Views
    2,780

    Re: string==null or string.equals(null) problem

    I do not think of you being a "jerk." I guess what I am not understanding is if the code could have been written with fewer lines, I would have written the code with fewer lines. I assume you are...
Results 1 to 25 of 35
Page 1 of 2 1 2