Search:

Type: Posts; User: Zula

Page 1 of 3 1 2 3

Search: Search took 0.08 seconds.

  1. Re: Sending data from a computer to a server autonomously(spelling?)

    Cool, and I won't ask for C advice here, but there are no problems with writing a server in C and a client in Java are there? As long as the port is the same and all that good shtuff?
  2. Sending data from a computer to a server autonomously(spelling?)

    What is the best method to accomplish getting data from my computer to a server so that I can then view it in a applet in a browser?

    I have a sensor attached to my computer, I already have that...
  3. Replies
    3
    Views
    1,393

    Re: could you tell me whats wrong....

    I believe the problem is that switching the sign of denom makes it so when you ADD two each time, you are not always adding to the absolute value of the number, as adding to a negative gets it closer...
  4. Thread: school project

    by Zula
    Replies
    13
    Views
    1,949

    Re: school project

    Check out the charAt() or indexOf() methods of the String class
  5. Thread: school project

    by Zula
    Replies
    13
    Views
    1,949

    Re: school project

    this link : Java 2 Platform SE 5.0 Will tell you about the next() methods, nextInt() is to get a number, you want next() or nextLine()
  6. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    With yours, if you don't pop the queue, and keep using front() it'll be the same thing repeatedly. Also if you use Size() in the for loop and pop, you will be counting up and lowering the count so...
  7. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    will print the front item in the queue repeatedly without changing it.


    as the last part of the for loop means it WILL be in the from but the if empty works fine just pointless
  8. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    There is one problem, the for loops that use MyQueue.Size() and pop() together are cut short as pop reduces size, make a variable to remember the original size before you start the loop...as such:
    ...
  9. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    In that example what happens between "After Iteration 1" when the from queue is empty and "Iteration 2" where it has data...you must transfer it...
  10. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    There appears to be a problem with your MyQueue or DoublyLinkedList classes...the to queue is not growing properly. my mistake not true..same poping reducing size problem
  11. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    Hmm...well, you need to empty from as you go through it or it will build up, but I see that doing so changes Size() and makes me run out faster than I should.
  12. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    Problem though, the final sequence from the generator-koch.txt file has spaces for some reason...so an error in the code somewheres

    make it str = console.nextLine().trim(); in the penguin loop
    ...
  13. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    // this class takes in productions and generates turtle commands.

    import java.util.ArrayList;
    import java.io.*;
    import java.util.*;

    public class program6_part_3
    { // beginning of class...
  14. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    I misspoke, it ends in the "from" queue, so print from the "from" queue
  15. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    No offense but your teacher's outline is a bit weird, steps 1&2 are on a different scope than 3,4,5&6, 4,5&6 should have been under 3 and it should have been worded different....but anway, okay, the...
  16. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    for (int iter =0; iter < numberOfIterations; iter++)
    { // beginning of for

    for (int iter2 = 0; iter2 < from.Size(); iter2++)
    { // beginning of for
    if(leftSide.contains(from.front()))
    { //...
  17. Replies
    9
    Views
    2,987

    Re: Java Graphics help

    Still use two circles, since the repeated part has two circles.



    for(int i = 200;i>=20;i-=40) {
    Circle c = new Circle(250, 250, i);
    Circle c2 = new Circle(250, 250, i-20);...
  18. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    Make a for loop that goes to.length iterations and pop them from the 'to' queue into the 'from' queue



    for(int asdf = 0;asdf<to.length();asdf++) {
    from.push(to.front());
    to.pop();
    }
  19. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    For the generator-koch.txt file, I get


    F-F++F-F++F-F++F-F++F-F++F-FF-F++F-F++F-F++F-F++F-F++F-FF-F++F-F++F-F++F-F++F-F++F-FF-F++F-F++F-F++F-F++F-F++F-FF-F++F-F++F-F++F-F++F-F++F-F

    as the...
  20. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    It appears it would yes.
  21. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    But what you need to do is in the for loop, once you read in a production, stick it in two queues, one for the lhs(from) and one for the rhs(to)
  22. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    static Scanner in;
    public static void main(String[] args) throws IOException {
    in = new Scanner(new File("generator-koch.txt"));
    for(int i = 0;i<6;i++) {
    ...
  23. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    He means make a queue of all the chars in the starting sequence, then for each char, check if it is a lhs(left hand side) symbol, if so, take the corresponding rhs and substitute the symbol
  24. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    With scanner.next() it gives you what is inbetween spaces, so if you use



    for (int penguin = 0; penguin < numberOfProductions; penguin++)
    {
    // should read in single character that is on left...
  25. Replies
    55
    Views
    6,083

    [SOLVED] Re: Very complex project. It's hard to explain.

    Alright, try this, post a(1) specific-ish question, and the part of the code that goes with it
Results 1 to 25 of 55
Page 1 of 3 1 2 3