Tim Moores

Saloon Keeper
+ Follow
since Sep 21, 2011
UK / DE
Cows and Likes
Cows
Total received
117
In last 30 days
2
Total given
11
Likes
Total received
896
Received in last 30 days
35
Total given
352
Given in last 30 days
14
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Moores

Web apps need a servlet environment to run; a command line will not do. For unit tests involving servlet code you may get away with mock objects.

But let's take a step back: how can trying to debug an issue with a web app take a whole month? If the debugger built into the IDE (assuming you're using one) is too cumbersome, try a standalone one like JSwat. I've been using that to debug apps running on Tomcat, and it works fine.

The JDBC issue means the JDBC driver is not in the classpath. You need to include the appropriate jar file in whichever way is appropriate for however you run the code. If that's on the command line, something like "java -cp .;mysql-connector-java-5.1.47.jar JDBCExample" might do the trick.
4 hours ago
Sounds like an exercise you should be doing in order to learn something. So: what do you have so far, and where are you stuck making progress? If you haven't started yet, what ides have you had?

Have you worked through the Java networking tutorial yet? If not, start with that.
I really don't understand why people think that Java won't be free any more. I thought Oracle's document was pretty clear on that, and on the difference between Oracle's JDK and OpenJDK.
17 hours ago
Not here. But you can embed YouTube and Vimeo videos in posts.
1 day ago

Tim Moores wrote:The bottom line is: don't pass null arguments to Integer.parseInt - check the values before using them.


Or in case of "java.lang.NumberFormatException: For input string: "" " : don't pass empty strings to Integer.parseInt.
1 day ago
This is the important part:

Caused by: java.lang.NumberFormatException: s == null
        at java.lang.Integer.parseInt(Integer.java:570)
        at java.lang.Integer.parseInt(Integer.java:643)
        at com.floatr.cypher.MainActivity.onCreate(MainActivity.java:72)



The line number and class name don't match the code you posted earlier, so we can't pinpoint the issue. But it's in line 72 of your MainActivity class. The bottom line is: don't pass null arguments to Integer.parseInt - check the values before using them.
1 day ago
Yeah, but you're calling "getString".
1 day ago

Activities are just that, you could call them screens or windows but in android terminology they are called activities.


I beg to differ: It is not at all unusual to use more than one layout per activity. That's precisely what components like ViewFlipper and ViewPager are there for. No second activity and no Intent are necessary in that case.
2 days ago
Please get in the habit of posting Android questions in Android forum, not any of the Java forums. We have moved your various posts to that forum, but that should really not be necessary :-)

closes down immediately


That generally means there was an unhandled exception, and the full stack trace of the exception -including the line number of the offending statement- will be written to the logcat. That should be your first point of debugging. Post the full stack trace here, along with relevant excerpts of the source code, and indicate which line of code caused the exception.

How can I use 2 screens with one activity


The ViewFlipper component is an easy way to have more than one screen in an activity.
2 days ago
I don't have a strong opinion one way of the other, but reading this and some of the coverage it got, on Vox and elsewhere, a number of things come to mind.

  • It's what the writer thought. Doesn't mean the producers back then saw it that way, and obviously they don't do so now.


  • The tweet about "puppets do not have a sexual orientation" is gone now, but that at least was patently incorrect: Grundgetta was Oscar's girlfriend. And the antics of Miss Piggy towards Kermit -admittedly in a show aimed at an older audience- would be considered sexual harassment now.


  • It's debatable how closely puppet life does or should resemble real life. The Swedish Chef regularly had live animals in his cooking pots, and talking pumpkins, amongst much other stuff that differs from real life. I don't think most kids would mistake that for real events.


  • Just because two boys (or even men) share a room doesn't mean they're gay. Many brothers share a room growing up, or friends during sleepovers. And a lot more adult non-gay men share a room for financial reasons than apparently the people who think they must be gay care to admit.


  • When I was a kid, I assumed Bert and Ernie were *children*.


    Same here. Romance and sexual orientation came later. I's a show for kids, after all.
    2 days ago
    Is the server that creates the HTML under your control? If so, why not create a web service that emits the data in a more direct way, like JSON? If not, HtmlUnit is probably your best option.
    3 days ago