Win a copy of Terraform in Action this week in the Cloud forum!

Ryan Hamilton

+ Follow
since Apr 13, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ryan Hamilton

I never placed my conversion functions Accommodation<->ByteArray in the Accomodation class as I felt that what should Accomodation know about one particular byte format to represent its data. I felt it was more appropriate such a function would go in a "lower level" object. In my case FileStore. As if I wanted in future to make a DatabaseStore that returned Accomodation objects. It would seem even weirder for accomodation to have a byte conversion function.

Your recNo question:
- Again if you think about protecting against change. recNo should not be considered nth record in file. But just as a unique identifier.
- If you reuse record numbers you should consider the scenario where:

  • User Alice performs a search
  • User Bob performs a search
  • Bob books recNo 1
  • Administrator deletes recNo 2
  • Administrator adds new record which is given recNo 2
  • Alice goes to book recNo 1 or 2 - as displayed in her search

  • As you can see Alice may attempt to book a room which no longer exists, was booked, was deleted and/or has changed.

    Thats just what I think. I am curious how do you handle them situations?
    Why does java allow implicit casting of array subtypes?
    Particularly when it doesn't allow similar behavior for collections?

    For primitives, the compiler knows that Dog is a subtype of Animal, and that Dog[] is a subtype of Animal[], for generics this is not the case.

    As to why java allows implicit casting of array subtypes, which can then cause the error shown, I am not sure.
    I realize this is an old post. But if like me you found this thread because you were having problems setting up freetts this may help. I created a guide to setting up FreeTTS in netbeans/windows:

    1. Run Jsapi.exe, say yes, to unpack jsapi.jar
    2. Find your JRE directory, mine was C:\Program Files\Java\jdk1.6.0_03\jre\lib\ext
    3. Copy all the Jars to that directory
    4. Check in netbeans your projects properties ie right click on project->properties->libraries->manage platforms and the jars should be listed there. If they are not, restart and hopefully they should now be there.
    (See website for screenshot)

    5. Copy to relevant folder, the example Helloworld will complain telling you which directory. Or you can set the property using:

    System.setProperty("freetts.voices", "");

    Any problems, post at and I will try to help you out. (sorry but I dont check this forum often)

    Good luck
    12 years ago