Ta Ri Ki Sun

Ranch Hand
+ Follow
since Mar 26, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ta Ri Ki Sun

Your problem is in the do while loop, you're never "done".

Replace
with

[ November 28, 2006: Message edited by: Ta Ri Ki Sun ]
18 years ago

Originally posted by Anh Vu:
Hi all ,
I have some problems with unicode . I'm using MySQL 4.1 , JDK 5.0 . With the same script to create database , same code to insert data into database , but in my home , when I inserted data into database , it inserted like : Nguyễn Văn , in another computer in my friend's home , it inserted like : Nguy��?n V�?n . I cant understand . Do you know this problems ?



I know you said that it inserted those values but start at the beginning where the data is read from the file or manipulated as String objects.
The operating system's default charset is used unless you specify one, ie new String(someByteArray, "ISO-8859-1") or someString.getBytes("ISO-8859-1")

I found this article very helpful
18 years ago
No difference at all.

From javadoc :
The call <code>System.gc()</code> is effectively equivalent to the call: Runtime.getRuntime().gc()
18 years ago
You've not really explored barcode4j if you haven't run it or seen how it slots into your system.
If the documentation isn't helpful enough they have a mailing list as well and the archives should be helpful too. Sorry if this is vague but you don't have a specific problem, on a POC a while back I used barcode4j and it worked rather nicely.
I can't recall any alternatives at the time, I found barcode4j and tried that and didn't look any further.
18 years ago
Have you had a look at SwingUtilities.invokeLater() & invokeAndWait yet?
18 years ago
1. Your toString method should loop through all the books it has to get the information about book[0] through to the end.

2. What would you like to test? Your code has problems such as that Book[] never being initialised but essentially that main method at the end is creating a library and adding 5 books, to test further you can add the method getBook(int index OR String isbn etc).
18 years ago
I've got quite a few batch process type jobs, a ksh script launches a runner which sends a message off to a bean to start some or other processing.
How can I get rid of all these little scripts and have these processes launched as a service type thingy, scuse me, every so often.

TIA
18 years ago
That's fine. In fact you don't need to prompt in any mode if you're able to use the previous settings, else prompt. You'll probably put the user in a sort of a loop unless you can reuse settings. It would attempt to initialise -> fail -> check if user wants to reconfigure settings -> attempt to initialise -> and so on until either successful or the user chooses to exit.
As you said in the case of 'alone' the only cause for failure is the db not being there, it's possible so cater for that by catching the exception -> prompt to reconfigure settings etc.

I just always loaded the same settings screen, nothing special for just the missing database.
The Aussies have always had one over on us mentally, even at a time when our cricket was incredible consistently it would drop terribly against the Aussies. That was the effect it had, those days are over now. Make no mistake they are still a better side than we are.

The slogging was needed, it kept the pressure on the bowlers who in turn kept bowling full tosses instead of yorkers, short and wide instead of full and straight.
Many classy cricket shots were played too, by both sides.

I watched the game and saw the highlights twice now, just can't get enough of it, well done boys.
18 years ago

Originally posted by Stuart Ash:
Ah heck!! He meant super() and not super.toString(). We got misled.





I wish the line of code could be marked in bold or italics or something to clear it up. sigh, whatever he meant though, he'll have all 3 possible answers now
19 years ago

Originally posted by Stuart Ash:
It's invoking the base class toString(). Without it, it would invoke the current (or lowermost-in-the-hierarchy) toString, and you run the risk of getting into an infinite recursive loop. I am surprised that didn't happen to you already.



Given that it works I think he meant the call super.toString(), not just wacking super from it. I could be wrong on that assumption
19 years ago
Not needed in this case, but if the super class implemented toString you'd be interested in it's returned value as well. Wacking it here wouldn't make any difference though, as you discovered.
19 years ago
Hi Dave
That method really doesn't exist in Arrays, you may be thinking of Array?

setDouble(Object, int, double) - Static method in class java.lang.reflect.Array
19 years ago
The URLyBird spec specifically says to "assume at most one client is accessing the database". Or something to that effect, check your spec as I'm sure it says the same.
NB Client here means a database client, in other words you should only worry about concurrent requests from your server.
If your server is running then no stand alone clients can run, no other server either, but you don't have to prevent this.