With respect to x-ordering, get y-value of the item before and the item after the item with y=50:
SELECT * FROM (
lag(y,1,0) OVER (ORDER BY x) AS y_prev,
y AS y_this,
lead(y,1,0) OVER (ORDER BY x) AS y_next
FROM test) AS tmp
WHERE this = 50;
| x | y_prev | y_this | y_next |
| 5 | 16 | 50 | 40 |
Well here is Jupiter, with some motion blur due to my strong and stable tripod:
Just out of curiosity, I also tried to get some shots of Saturn. Saturn is ~10% smaller than Jupiter, and was also almost twice as far away (9AU distance), so I didn’t expect to get any detail – maybe an oval would be the best result I could manage at 500mm with glass optics?
(Click for viewer)
In the creative and poetic words of Donald Trump: “Wrong!” – Saturn’s rings are visibly distinct from the planet itself, although no moons were resolved in any of the photos I took.
That’s Saturn and rings at 9AU distance, on a D5100 body and with a Sigma 150-500mm lens, processed with RawTherapee.
Nice. Unfortunately 9AU is the closest Saturn gets so I’m unlikely to get a better photo with the budget equipment although I’ll take some with a 1metre f/5 Skywatcher when I get time. Jupiter’s closest approach is 4.5AU (10% closer than so I’ll also try Jupiter again with the telescope when it’s at closest approach – the Skywatcher should be able to resolve the atmospheric bands on Jupiter too.
I created a template class which can be used to provide thread-safe access to methods and fields of some target object.
It provides a convenient double-smart-pointer proxy mechanism for accessing one method or field of the target, and a functor mechanism for executing multiple operations on the target within one lock.
Naturally with a RAII solution, the double-smart-pointer style provides no thread-safety for iterator/pointer-based access or any other kind of access which involves taking pointers/references to the target and accessing them outside the lock. For such use cases, wrap the entire operation in the functor style instead.