-
Replied To a Post in Please Help - Java
Could it be the empty Strings ("") you added to the table at the end? Try zero instead for the numeric column? -
Replied To a Post in Please Help - Java
It's interesting that the stack for your error doesn't include any of your code - it's just Swing re-drawing the JTable. So the exception is NOT being thrown from any … -
Replied To a Post in One thread calling another thread without blocking
Hi newbie. I remember this! If the queue keeps growing then the real problem is that you are processing database updates more slowly than new transactions are arriving. Messing about … -
Replied To a Post in Java: Void does not display the input value
Exactly which output is wrong, and what exactly does it display? -
Replied To a Post in Automatic code generation
Before going too far down the reinventing-the-wheel path, have a look at Netbeans, eg "Insert code..." -
Edited Developing a class to ease student coding crash proof and valid IO
This thread will be an attempt to develope a SIMPLE (and good enough) class for beginning Java students, to ease their coding for valid and crash proof, user (Console type) … -
Marked Solved Status for Developing a class to ease student coding crash proof and valid IO
This thread will be an attempt to develope a SIMPLE (and good enough) class for beginning Java students, to ease their coding for valid and crash proof, user (Console type) … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Right, it's done. Final code and JavaDoc can be found at https://www.daniweb.com/programming/code/506346/a-simpler-safer-alternative-to-java-util-scanner -
Edited A simpler, safer alternative to java.util.Scanner
This class is intended as a small and simple alternative to java.util.Scanner for people in the early stages of learning Java. Unlike Scanner it has built-in error handling and retry, … -
Edited A simpler, safer alternative to java.util.Scanner
This class is intended as a small and simple alternative to java.util.Scanner for people in the early stages of learning Java. Unlike Scanner it has built-in error handling and retry, … -
Created A simpler, safer alternative to java.util.Scanner
This class is intended as a small and simple alternative to java.util.Scanner for people in the early stages of learning Java. Unlike Scanner it has built-in error handling and retry, … -
Replied To a Post in Product of two numbers using while loop
Read this before posting: https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question -
Replied To a Post in HELP conditional statement
Read this before posting: https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question -
Replied To a Post in group tuple values with tolerance and average
Yes. My algorithm was 2d, just the illustration was 1d, and it extends to nD. But yours still looks a lot better :) JC ps what about 2,4,4,6,6,6,6 -> 1,1,1,2,2,2,2 -
Replied To a Post in group tuple values with tolerance and average
Maybe sort the list based on the first value. Then it's trivial to find consecutive entries that are within tolerance for the first value. For each set of such entries … -
Gave Reputation to Reverend Jim in Bad Link
When I click on [5 hours ago](https://www.daniweb.com/posts/jump/2210636) in the [Trump](https://www.daniweb.com/community-center/threads/504416/trump), instead of being taken to the end of the thread I get the first post on the first page. -
Replied To a Post in Software Development
If you want help you must explain what you are trying to do, and exactly what help you need. -
Replied To a Post in Boilerplate for publishing code on Daniweb
OK. In the absense of any further input over the next day or two (Dani???) I'll post the code and append to it a copy of the *unlicence* as follows: … -
Replied To a Post in Boilerplate for publishing code on Daniweb
My bad. I wasn't clear in my original post. I wanted to say that personal/educational use would always be OK, even if, for some reason, commercial use wasn't. But my … -
Replied To a Post in Boilerplate for publishing code on Daniweb
I never intended to limit use to educational etc either! I was just trying to avoid any issues about commercial re-use etc. I'm just happy if people use or improve … -
Replied To a Post in Boilerplate for publishing code on Daniweb
What about https://www.daniweb.com/community-center/daniweb-community-feedback/threads/428309/daniweb-copyright-what-s-copyrighted. Dani's arguments for owning the copyright seem just as valid today? -
Created Boilerplate for publishing code on Daniweb
Assertnull and I have cooked up a little Java utility that we think will be useful for early-stage beginners, and I'm planning to post it for anyone to use. Is … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Interesting discussion, You convinced me that there are real use cases for turning logging on and off, so my only beef there is that I think it should be on … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
More thoughts... I think the default for logging input should be true, so all you need to do is write the data at the end. The setter would only be … -
Replied To a Post in Sales java program
rubber man is right. Start by getting the logic right in your head or on a sheet of paper. Doesn't matter how you write that down. When you have that … -
Replied To a Post in Why downloading speed is higher than upload speed ?
Oh yeah, for years I had 1.8 meg download speed at best. Drove me mad when Apple photos decided to re-download my pictures (5gig) at random intervals thus shutting out … -
Replied To a Post in May I please have help with a cannot find symbol error?
The error message should include a line number... that's important Anyway, line 82 of the second class refers to mortgage, which is a variable in the first class. You don't … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Excellent! Thinking more about the use case, I wonder if it would be more useful to use a standard file save dialog for saving the input? Maybe a no-args overload … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Reading all this again I'm not sure where we stand on the logging thing... did you agree with my suggestion of adding everything to a List and having a method … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Yes, I think you and I have converged nicely. What we really need now is some more input. Jc -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Ok, good work! Re logging: right now I'm against it and see it as an unnecessary complication. I'm especially against messing up the second constructor with a cryptic Boolean to … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
A couple more thoughts on logging... If we want to do it it's a single println echoing the user input in getString, plus some trivial method to specify the output … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Many thanks for that excellent feedback, and for improving the commas regex. (NB: the decimal point is also locale sensitive - eg in France it's a comma). I'm no regex … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
OK. I'd also appreciate your feedback on my code if you have time - I intended it as a serious example of how to meet the objectives in good Java. … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
I can't help but feel that has gone way over the top for the original spec/scope. Even without error handling its 242 lines, many of which just cover perfectly good … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
ps - how about this use case: // run multiple test cases UserInput console = new UserInput(); do { String fileName = console.getString{"enter data file name"); UserInput file = new … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
I agree with all that except the static bit at the beginning. Creating classes with just static members is one of those things beginners do because they haven't got the … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
Hi guys Sorry for the delay in replying, but my internet has been out since Saturday night. @assertnull I agree. As originally identified by David the goal is to make … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
As a further illustration of how, in my opinion, these things should be done, here's an example of using standard JavaDoc to share the external (public) design of an API … -
Replied To a Post in Why downloading speed is higher than upload speed ?
There speaks someone who has never been at the end of a 6.5 km ADSL connection. -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
In what way is that "more limited"? The scope looks the same, and the other criteria I suggested seem implied by the objective anyway. ps: I understand why you are … -
Replied To a Post in Developing a class to ease student coding crash proof and valid IO
I’m all in favour of this idea. I’ve seen far too many posts here from beginners struggling or failing with Scanner, so an alternative is much needed. David has has … -
Replied To a Post in Java output
> I meant to ask you to clarify more your suggestion above ... about and alt 'InputStream' constructor public class SimpleInput { // like David W's but my preferred names … -
Replied To a Post in Java output
Good discussion... > some stylists like to only exit at the bottom of a function This makes sense in a language that has manual resource mangement (eg C) because it … -
Replied To a Post in Java output
A couple of quick suggestions: FutureValue line 32 - the `toString()` is redundant because `print` and `println` do that to their arguments anyway TakeInLine: Lines 74 and 95 should be … -
Replied To a Post in Java output
With no error handling there's nothing to chose, but if you can have unrecoverable errors in the input data then it's best not to create the object until/unless you have … -
Replied To a Post in Java output
This code includes a copy of a "Console" class that has popped up a couple of times recently. Maybe the work of David W. ? It's obviously intended as a … -
Replied To a Post in Java program
OK, that's great. I spoke separately with David and asked him to provide more explanation with his code suggestions next time, but people helping each other like this is exactly … -
Replied To a Post in Java program
If you "finished it" by using the hundreds of lines of code from David W then you are deceiving yourself. All you wil have done is to get through this … -
Replied To a Post in Update a LinkedHashMap.
`results` has just two entries (see lines 11,12). You can add stuff to the maps that they contain, but there are still only two entries in `results`itself Try printing the …
The End.