I'm trying to solve Google's foobar challenges. I'm not going to spoil the actual question for anyone else, but the title is "Save Beta Rabbit". My solution is coded in Java, and every time I try to verify it I get an Error(400): Bad request. This appears to be an error on their part. I've tested the code locally on my machine and it works fine. Also, if it was a problem with runtime or memory, foobar explicitly tells you that. It also explicitly tells you when you have complier errors. Anybody know anything about this? Challenge is on a timer here.
UPDATE: I've traced down where the bug is. When you recursively call the same static method twice, the bug occurs. Unless anyone else has seen this before, I'm going to report it to Google through the feedback mechanism and close this question.
I got the same error in a Java solution. Without getting into implementation details, it turns out it was a performance problem. After I fixed it the verifier worked.
Related
Problem
My code runs without problem but this prompt keeps appearing. I have run into this problem a lot but I just ignored it since the code runs fine. However it's starting to get rather annoying and all the fixes I saw online did not work. I suspect this has something to do with 'hot code replace'.
I also did set "Build automatically".
I saw on some other post that I could disable hot code replace by going to Preferences>Run/Debug, but I found no such option.
Any help is appreciated, thanks!
Apparently I was running in debug, I confused my shortcut keys... Problem fixed lol
I've currently got a snippet of java code running in eclipse, which has a bug somewhere. In fixing the bug, I'd like to see what the program's actually doing. I know Java traces where the program goes when it displays an error message; can I access that data to find out where I'm going wrong?
Thanks!
If you are not familiar with breakpoints and debugging process this tutorial from Vogella will help you. Breakpoints will help you to understand the flow of program and can see where it starts and stops.In debugging mode when you hover over variable you can actually see what's happening there and values as well. This way you will know where this error is coming from and what could be the solution.
I am very new to Eclipse, java programming and well all "programming" in general and I have recently been learning how to use Eclipse. I've been using it for about a week now and it has been going decent so far. Apart from some errors,(mostly on my part) that has been fixable by restarting the program itself.
However when I started using it today I could no longer see the suggestions made from the Quick Fix command, for example if I type findVi and then press CTRL+1, it shows "No suggestions available" instead of "findViewById()" or something similar.
I know it's the correct binding, I even reset the keys to default to be sure. It still finds the ID if i type it manually but I would like to able to finish words faster that way.
If you guys got any suggestions that can help me out, please let me know.
Thanks.
- First of all if you are new with Java, and want to practice Java, you should NEVER USE ANY IDE, that way you learn the proper syntax, and it helps your error finding skills.
- But as you wrote "findViewById()" it seems that you are doing Android, Now this happens sometimes that Eclipse behaves weirdly with Android. Thats the reason when you make any changes into your Eclipse GUI while working with Android, its always better to see if those changes have taken effect.
- This problem usually goes off after closing and re-opening the Eclipse once or twice.
- Ok try this....
Type findVie then press Ctrl + Space-Bar See if the suggestion pops up...
You can access the Content Assist preferences from Window > Preferences > Java > Editor > Content Assist... perhaps something got messed up.
So for example with my current object tabPanelMain, I'll type a dot after it and expect to see a drop down menu of all the object's available methods. Instead, the marker which shows my currently selected character on the editor disappears meaning I don't know where I'm typing. Worse than that is that the save and save all buttons stop working. And ctrl-s and the menu saves don't work either. I can't save my eclipse projects and have to restart, thus losing my work.
What could be wrong? This problem never used to exist but now I just can't get the methods of an object like I used to.
I hope that was clear enough, please ask me questions if not.
The save problem with not being able to save is one I've encountered before.
I don't know why it happens but for me it helps to minimize and then maximize eclipse again.
Not a fix but at least a workaround that lets you save.
Never heard of the other problem though.
I couldn't figure out what it was that was causing the problem, and while Martin Larsson provided an effective short term solution, I found it best to fresh install Eclipse.
The most annoying part about this was transferring my previous plug ins (like GWT, Subversion, etc) over to the new install. In the end I ended up re-installing them manually. If anyone could shed some light on how to keep previous plug ins, I'd like to hear how. Though I've heard this can be problematic with path urls in the files or something.
Error I am getting:
Sorry!
The application {name} (process {package}) has stopped unexpectedly. Please try again.
The application fetches some data from the internet (my server) and then parse's it to take the data out of the XML. The program does not crash if the data is the same every time (empty every fetch or populated). But it seems to crash when the data changes even though the variables are not set as final and specify "new" on each instance.
The question: is it possible to diagnose the problem more fully from Android? I am not getting any messages in the console (developing live on the phone linked to eclipse).
Thanks for your help!
To diagnose problems in Android it is important to look at the Logcat output. This is the standard output for all Android applications. If this is not helping you could think about using try/catch blocks around the problematic code part or I also would recommend to register a global UncaughtExceptionHandler that catches all exceptions that are nowhere else catched.
You could add a try/catch clause perhaps or typical Log.e messages wherever you feel it's crashing and print the stackTrace.
If it's linked to Eclipse, then the debugging messages should appear (unless you set your manifest feature to be non-debuggeable).
One thing to try is to look at the data that works and the one that doesnt, and note the differences. Then, in the xml that works, add a line of the xml that doesnt work. Do this line by line to determine what part (if at all it does) causes the error. This is assuming your code is okay but the data being sent is wrong.
Hm, before doing this make sure it is a data issue and not code.