Search:

Type: Posts; User: helloworld922

Page 1 of 20 1 2 3 4

Search: Search took 4.58 seconds.

  1. Replies
    1
    Views
    79

    Re: Thinking like a programmer

    When I program I spend a lot of time using Google and reading through documentation. The fact of the matter is it's impractical for modern programmers to write code from basic principles. We have to...
  2. Replies
    1
    Views
    301

    Re: exec forground process

    You need to transfer the keyboard focus to the player's GUI. Unfortunately, I don't think this is something that can be done in pure Java.
  3. Replies
    8
    Views
    131

    [SOLVED] Re: Downloading files efficiently

    Yep, more or less that's how a buffer works.

    Yes, basically there's some fixed cost associated with performing an operation, plus some dynamic cost depending on the amount of data being requested...
  4. Replies
    8
    Views
    131

    [SOLVED] Re: Downloading files efficiently

    The reason for Buffered streams (and buffers in general) is to mediate slow access operations, for example reading from a hard drive or across the network. The time it takes to read a byte from these...
  5. Replies
    8
    Views
    131

    [SOLVED] Re: Downloading files efficiently

    Why not do something like this:


    // java.net.URL imageUrl initialization here
    URLConnection connection = imageURL.openConnection();
    InputStream is = connection.getInputStream();
    int size =...
  6. Replies
    8
    Views
    131

    [SOLVED] Re: Downloading files efficiently

    Are you sure your code works? I can't get it to produce an actual output image.
  7. Re: application in java to have the key code

    It's not possible in pure Java. You'll need to use some native code to accomplish this. For example, Here's a post I made on how to accomplish this on Windows.

    Alternatively, you can use the Java...
  8. Replies
    2
    Views
    77

    Re: MATLAB Reversi Coding

    Matlab is very different from Java, but like jps said the problem at hand isn't necessarily language specific.
  9. Replies
    7
    Views
    356

    Re: Socket Programming

    One program I've used in the past is WireShark, but generally I prefer to use the "standard" Java debug tools, i.e. Eclipse, Netbeans, whatever you use for debugging Java programs. I check the data...
  10. Replies
    7
    Views
    356

    Re: Socket Programming

    What problems are you running into? I tested it and it works fine for me. Make sure you start the server before trying to run the client.

    I've typically found testing using localhost is the...
  11. Replies
    7
    Views
    356

    Re: Socket Programming

    If you're just doing some testing, use your localhost address: 127.0.0.1. This way you can safely create server/client connections on just your machine.

    If you want to connect to another device,...
  12. Replies
    1
    Views
    71

    Re: Finally Block

    Don't post the same question multiple times on this forum, once is enough. Also, please use code tags.

    Finally tags are always executed, regardless of if an exception was caught/thrown/propagated....
  13. Replies
    3
    Views
    161

    Re: Best way of adding and removing?

    Look into how vectors (a.k.a. ArrayList) track "dynamic arrays". They don't always create a new array storage area every time the size of the list is modified.



    This is a great application area...
  14. Re: Is java how to program by the Deitels a good book?

    JLS for SE5/6 (identical to each other)

    I borrowed it from a friend, I'm not really sure where they got it from.

    You can always print off pages if you don't want to stare at a monitor and put...
  15. Replies
    2
    Views
    88

    [SOLVED] Re: Manipulating large values

    They are the easiest way, but there's nothing theoretically preventing someone from implementing their own versions of these classes (though I don't know why you would want to).

    What is the...
  16. Re: Is java how to program by the Deitels a good book?

    Hey, I like my books! I just don't use them for Java or learning programming languages. They're great for science and engineering cause I tend to write in my books. A lot of good information is also...
  17. Re: Is java how to program by the Deitels a good book?

    I don't really have any good book recommendations, especially for Java. There are so many good online references that I just don't see the need to shell out a hundred dollars or so for a book that...
  18. Replies
    7
    Views
    106

    Re: Favourite letter!

    pi (π)

    From the English alphabet, e.
  19. Replies
    3
    Views
    114

    Re: User Input help

    What do you have so far, and what parts do you need help with specifically?

    For getting user input, I would recommend using the Scanner class.
  20. Replies
    4
    Views
    145

    Re: array copy!!!

    What errors are you getting (specifically)? If you're getting compile errors or runtime exceptions, please post the exact error message (text please, not screen-shots).
  21. Re: Converting a piece of C# code to Java (unsigned longs, etc)

    The best way to translate the code is to figure out fundamentally what the intent of the code is.

    For example:


    ulong num = 0uL;
    for (int j = 0; j < 5; j++)
    {
    num <<= 8;
    num |=...
  22. Replies
    3
    Views
    126

    Re: collision

    You're code is checking to see if the player intersects every part of the ground instead of if it intersects anywhere on the ground (big difference).

    A good method to do the latter:

    1....
  23. Re: My Base Class is Changing every time in my code. How I can overcome this?

    From a pure Java perspective, I would not do this even if it were possible. There might be some hack using reflection and code generation/compilation during runtime, but these solutions are all quite...
  24. Re: My Base Class is Changing every time in my code. How I can overcome this?

    Sounds like a project in dire need of source control software (a.k.a. revision control software), and possibly some re-structuring.

    You really shouldn't be tracking the version of a class in the...
  25. Re: My Base Class is Changing every time in my code. How I can overcome this?

    A few important questions to ask (quite similar to each other, just slightly different):

    1. What is the lifetime of GeneratorBase{n}? If you've gone to using GeneratorBase3, are you going to keep...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4