Dave Tolls

Rancher
+ Follow
since Sep 04, 2013
Cows and Likes
Cows
Total received
47
In last 30 days
0
Total given
0
Likes
Total received
794
Received in last 30 days
7
Total given
24
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dave Tolls

Have you logged the value of response after your calls to replace?

And then I suggest just trying to get that to work, with no other stuff around it.
A simple test bit of code, with a fixed json String based off that value.

The advantage there is that you can then post it here if it doesn't work and we can see and/or test using the same data and code.
1 day ago

Campbell Ritchie wrote:Doesn't work. I have tried it. You need a rotating mount as used for telescopes, aligned with the earth's rotation, otherwise the image will be smeared by the earth's rotation. There is a name for that sort of mount, something like azimuthal mount, but I am not sure. You can't use short exposures because the object photographed will be too faint to appear.



It does work, but it's not a single shot.

What you do is take several shots, using shorter exposures than you would think (about a 5th of a second for Saturn, much less for Jupiter).
There's software to handle overlaying the best of these to get rather nice piccies.
1 day ago
OK.
And have you debugged and logged the apiKey value in both cases?
2 days ago
Spoilsport.
I was hoping Perry would figure that out once he saw the output.
2 days ago
An array is an object, and so (since it doesn't have its own toString method) inherits toString from Object, whose output is what you see. The class name followed by its hashcode.

Since you want a meaningful String to print out there is a method on the Arrays utility class (called toString) you can use.

You will then find (I think) that the last entry in your returned array is 0.
I'll leave that to you to figure out.
2 days ago
So, if you use that api key directly (not injecting it) does it work?
2 days ago

Steve Dyke wrote:
I am trying a different date/time library: java.time, I have to use a back ported version since I am still using v1.7.
However, I am still having issues.



It's nothing to do with that, though.
It's entirely to do with not using the same format for your parser as the date you are attempting to parse.
3 days ago



Your format is MM/yyyy and the thing you are trying to parse is 04/08/2020.

Java does it's best, but they are not the same format.
It parsed the first two items as month and year, so 04/08.
4 days ago
Actually, scratch that.
I'm getting confused by your debugging.
You have printed out the before, but not the after.

Log (not rely on code somewhere else) what the value of mfgDateFormatOverride and mfgDate is as part of the code you posted.

I also note your brackets don't match up, which makes reading that code really awkward.

I would hope this piece of code is not part of a single massive method, and is itself a method you can at least attempt to test.

By the way, I think this is the part that's not doing what you expect:


Your format is (apparently) MM-yyyy, and you are trying to parse 04/08/2020.
I think.
4 days ago
You are not showing us where you are doing the formatting and on what data.
You are simply showing us the output.
We know the output is not what you want, but we cannot see how you are getting that output to point out where your error lies.
4 days ago

Campbell Ritchie wrote:

Yosuf Ibrahim wrote:. . . I am afraid of the database being messed up so any error I get the database to close

No, you are only closing the database if an exception is thrown. You need to close the connection regardless.



Depends on the environment.
If it's a desktop app then it's reasonable to only have a single connection, in which case you wouldn't necessarily want to close it.

Obviously, if it's a connection pooled environment then you would, as you say, always want to close it (ie return it back to the pool).
It's a package private method.
Looking at the source code Paint is not intended to be extended other than by things in the javafx.scene.paint package. The only constructor is a no parameters one, which is also package private.
5 days ago


This while loop does nothing due to your typo at the end there.
Remove the semi-colon.

As things stand this loops until there are no records, and then you go into the next couple of lines where you then try and print out the non-existent record.
Look at the end of line 10.
2 weeks ago
I think you missed the bit where I said to point out where in your code it is thrown from.

Your Controller has no line 77.
2 weeks ago