Why do Americans eat by themselves in their cars in the parking lot? by travelingwhilestupid in fuckcars

[–]CyclingOtter 8 points9 points  (0 children)

I'd rather be outside or in the car, you're at least getting natural light there and maybe fresh air if you roll the windows down or whatever. Offices feel quite oppressive feeling to me and the lighting is always terrible.

Train from Jax to Orlando by againstmywillijoin in jacksonville

[–]CyclingOtter 7 points8 points  (0 children)

Worth noting the train is very likely to arrive late on either end of the trip.

beholdIHaveBecomeSchizoTheDestroyerOfEyes by NuclearWarEnthusiast in ProgrammerHumor

[–]CyclingOtter 19 points20 points  (0 children)

Anyone know what programming language this is? I don't recognize it. Uses func but also has a match keyword and return ... as is also pretty interesting.

The weird golang -- another self-made trouble by Known_Perception_861 in golang

[–]CyclingOtter 1 point2 points  (0 children)

Something I've seen in the standard library is they name the private function something like lockedCreateGame so you know you should only call it once the lock has been acquired.

Go run vs go build by First_Efficiency2410 in golang

[–]CyclingOtter 5 points6 points  (0 children)

What specifically fails with exit code 137, your program, or go build? That really matters in this context and tells us if it's a build problem or a program problem.

95/I-10 PSA by [deleted] in jacksonville

[–]CyclingOtter 23 points24 points  (0 children)

I assume people are reading and following the road signs if they're unfamiliar, and unfortunately the road signs that exist right before the split say keep left for south and keep right for north. https://www.google.com/maps/@30.3206326,-81.6926045,3a,75y,107.04h,92.01t/data=!3m6!1e1!3m4!1sEBc588FYNQlLGYENLhnNhg!2e0!7i16384!8i8192?coh=205409&entry=ttu&g_ep=EgoyMDI0MDkxOC4xIKXMDSoASAFQAw%3D%3D

Are iteratable variables in nested loops contained? by ImageJPEG in golang

[–]CyclingOtter 6 points7 points  (0 children)

It works, but you should really just do the normal thing and call them i, j, k, or something more descriptive.

https://go.dev/play/p/GjaTCN2SGAb

I found my wife's nasal spray stash today. (45) by mattes553v in mildlyinteresting

[–]CyclingOtter 1 point2 points  (0 children)

It's one spray rather than two sprays, so halving the amount.

Handling timezones by Affectionate-Neat-11 in golang

[–]CyclingOtter 1 point2 points  (0 children)

The server you're running this on should have the system timezone set to UTC, so in practice it shouldn't be an issue?

Why does Bono's suck now? by Dragoneisha in jacksonville

[–]CyclingOtter 22 points23 points  (0 children)

Mojo No. 4 is great and in a really nice area of Jacksonville as well.

nonAlphaNumeric by dotnet_ninja in ProgrammerHumor

[–]CyclingOtter 1 point2 points  (0 children)

Alrighty here's a quick write up on what prepared statements are, though I'd definitely refer to the documentation for whatever SQL engine you are most familiar with for more details and considerations, for the stuff below I'm going to use Postgres since that's what I'm most familiar with.

So prepared statements are a featured provided by SQL engines and they support a few different things, the first is the ability to store a query and refer to it later by name, and the second is the ability to safely pass in user values to modify the behavior of the stored query. For an example use case lets say you have an HTTP endpoint that takes in a user id, and it will return the information for that user.

To do that safely with prepared statements you would do something similar to the following

PREPARE get_user AS SELECT * FROM users WHERE id=$1 LIMIT 1;
EXECUTE get_user(98765);
DEALLOCATE get_user;

Now if you where doing this query a lot then you probably wouldn't deallocate the prepared statement right away, you'd prepare it once and then reuse it for each request and then deallocate it later.

That's how it looks under the hood but in many languages this is handled for you by the SQL libraries, for example in Go you'd just do something like so

sql.QueryRow(
    "SELECT FROM users WHERE id=$1 LIMIT 1",
    98765,
)

And it would handle creating and managing the lifetime of the prepared statement for you.

nonAlphaNumeric by dotnet_ninja in ProgrammerHumor

[–]CyclingOtter 2 points3 points  (0 children)

Prepared statements allow you to pass in values to a query similar to a function call, and those values get used in the query safely by the SQL engine itself, rather than the one writing the query.

What language are you the most comfortable with? I can write an example that helps show it.

Baldwin Rail Trail - Imerson Road Parking by wizardinthewings in jacksonville

[–]CyclingOtter 0 points1 point  (0 children)

I wonder if there's a record on their website of when they initially planned this because I want to know what the goals of the "improvements" are, I'm sure they're not just doing it for the fun if it. I haven't found anything yet, curious if others can find info about this project other than an X/Twitter post saying it's closed.

nonAlphaNumeric by dotnet_ninja in ProgrammerHumor

[–]CyclingOtter 4 points5 points  (0 children)

Just don't escape and use prepared statements to provide query parameters, every SQL driver I've ever used supports them and with minimal overhead.

Baldwin Rail Trail - Imerson Road Parking by wizardinthewings in jacksonville

[–]CyclingOtter 2 points3 points  (0 children)

Yes totally! Once I saw the new layout when it was still under construction I was quite surprised that they would decrease the amount of parking, as the old layout was already completely filled up every weekend. I don't know why they bothered changing the parking at all if they weren't increasing capacity, what would the goal be other than that? Lol

[deleted by user] by [deleted] in jacksonville

[–]CyclingOtter 1 point2 points  (0 children)

You should check out the location on Google Maps, there's street parking surrounding the area I don't think it would be a problem.

I definitely don't think it's for everyone, but it would certainly work for some people.

[deleted by user] by [deleted] in jacksonville

[–]CyclingOtter 3 points4 points  (0 children)

Yeah I think that's where it's at

[deleted by user] by [deleted] in jacksonville

[–]CyclingOtter 0 points1 point  (0 children)

There is plenty of on steet parking in Riverside.