Type: Posts; User: aussiemcgr

Page 1 of 20 1 2 3 4

Search: Search took 0.25 seconds.

  1. Replies

    Robot Canceling with Keystroke

    I'm playing around with the Robot class, and I came across something I am unsure of.
    Let's say I have a Robot running in an infinite loop doing repetitive tasks in MS Excel. At some point, I will...
  2. Replies

    Java ME Embedded 8.1

    So I was planning on playing around with Java Embedded Micro Edition 8.1 on a simple microcontroller device and I had some questions that I wanted to see if anyone could answer for me. I am trying to...
  3. Replies

    Looking For A Creative Solution

    I'm looking for a creative solution to a problem. I am trying to design a cache which contains a path as the key and an object (DTO) as the value.
    The path can be formatted 2 ways:
  4. Re: ClassCastException being thrown?

    It's not the problem, but you should type the ArrayList in your formatData declaration to prevent other types of casting ambiguities:
    private static ArrayList<Integer> formatData(String dataInput)
  5. Re: ClassCastException being thrown?

    Just to verify, the problem isn't in the formatData() method, correct?
  6. Replies

    Suggestions for database hosting

    So I have a domain I own, and a website I manage with AWS. I am currently using their 1 year free tier. I set up a database instance which should have been acceptable for the free tier (the database...
  7. Replies

    Re: testing ActionListener inner class

    You can't access the private class from JUnit, and the actionPerformed method itself doesn't return any value.
    What I would do is:
    1. Check the value of myGreetingField: assume not "Guten Tag"
  8. Replies

    Re: Website Security Questions

    Well we were talking about something like:
    1. User requests password reset
    2. We send the user an email with link to reset password
    3. Link makes user answer security questions
    4. We allow user...
  9. Replies

    Website Security Questions

    So I've been working on a website, and the topic of security questions has come up. I've been reading a lot online about them over the past day or two, and it seems like a lot of people are...
  10. Re: JSF DefaultManagedThreadFactory, I'm overlooking something

    I have a 6 step registration process (all the steps are pretty small).
    There is a rare case where the 5th step requires a bit of preloaded time to set up the initial data (20 seconds, due to calls...
  11. JSF DefaultManagedThreadFactory, I'm overlooking something

    Okay, so I am clearly overlooking something here. In a jsf application, I am attempting to get the DefaultManagedThreadFactory with the following method in a helper class:

    public static...
  12. Replies

    Re: Semester Project Questions

    1. I agree that the way your professor worded the constructor is odd. I don't see the point of such a constructor since, as you pointed out, the default values will already be set when you initialize...
  13. Replies

    Re: prepared statement and SQL injection

    To my understanding, PreparedStatement will not make you vulnerable to SQL injection if you use it correctly (ie: parametrized instead of String concatenation).
    Also, what do you mean by...
  14. Re: Best way to handle the MVC design with a databaseDAO

    I've created a complex structure for my database stuff, which allows me to take advantage of common code.
    The structure allows me to pass an instance of a model class, query the database, and parse...
  15. Re: Best way to handle the MVC design with a databaseDAO

    Wait, so do you have like a single Model class or something?
    Usually, with the MVC design, you have:
    1. The model part, which contains all of your model classes
    2. The view part, which contains...
  16. Re: Is Java on the Decline and ASP on the rise?

    A quick search on leads to:
    ASP.Net/C# jobs: ~22,000
    Java job openings: ~86,000

    Hardly scientific, but that's a huge difference.
  17. [SOLVED] Re: Using substring methods to format numbers between 1,000 and 999,999

    You can save yourself a lot of trouble with the "split" method. The method creates an array of Strings based on how you want to split it up. For example:

    String numberIn = sc.nextLine();
  18. Replies

    Re: numbers as generic class

    T will not be a float, int, ect., they will be: Float, Integer, ect.
    The distinction is primitive vs the object representation of the primitive (the object classes associated with the primitive)....
  19. Re: Not sure what is wrong, but I am sure it is basic.

    Yes. When you do assignments with Objects, it uses references. When you do assignments with primitives, it uses value.

    "from" is just a variable name to use in the constructor. I called it that...
  20. Re: Not sure what is wrong, but I am sure it is basic.

    camel-man is correct. Objects are assigned by reference, not values. I would avoid the Clone methods in java. A better alternative would be to create a constructor in Matrix:

    Matrix(Matrix from) {...
  21. Re: Not sure what is wrong, but I am sure it is basic.

    y would equal 7, but z would equal 10.

    When you say: int z=y, you are copying the value from y into z. Any changes to you make to z will NOT reflect on y. If you wanted to change y and keep z as...
  22. Replies

    Re: Event Listeners?

    You are close.
    The ActionListener class already exists, so you don't need to create the interface.
    You have the correct idea when you create the Listener, but you are creating it incorrectly.
  23. [SOLVED] Re: Help with String class private final char[].length

    To my understanding, that is how the length is stored: just a variable.
    In case this provides you with any assistance, here is Java's array specifications (I didn't see anything that directly...
  24. [SOLVED] Re: Help with String class private final char[].length

    Wait, so is your question how the length of an array is determine?
  25. Replies

    Re: Learning Java

    When I was in high school, we used USACO for practicing for programming competitions. They provide some interesting problems with increasing difficulty as you go.
    Here is the website:
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4