• 0 Posts
  • 67 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle












  • Yeah, you’re quite correct, it’s not exactly equivalent, I just went on auto-pilot because it’s used so much for that purpose 🤖

    It’s much closer to being a true null-coalescing operator than ‘OR’ operators in other languages though, because there’s only two values that are falsy in Ruby: nil and false. Some other languages treat 0 and "" (and no doubt other things), as falsy. So this is probably the reason Ruby has never added a true null-coalescing operator, there’s just much fewer cases where there’s a difference.

    It’s going to drive me mad now I’ve seen it, though 😆 That’s usually the case with language features, though, you don’t know what you’re missing until you see it in some other language!








  • ive just heard of an incident where students redirected their books codes to p**n. can i make sure that doesnt happen?

    This is kind of confusing, or at least leaves a lot of detail out 😆 Did the domain lapse? Did their short-URL account get hacked? In any case, your QR code will just be encoding a URL. Ultimately, any URL can be redirected by someone out there; so it’s just a matter of trusting that whoever has that access won’t act maliciously, and that malicious actors can’t gain access.

    also, im using google to generate them, is there a foss alternative as im scared of tracking.

    There absolutely are, just search and you should find plenty. Again, though, the QR code is just encoding a URL. Does Google use their own short-URL service for their generated QR codes? Just scan the QR code and look at the URL it encodes. If it’s only the URL you want - not some Google short-URL that then redirects to the URL you entered - then there can’t be any tracking done on it by Google.

    lastly, can i make the qr code redirect to a specific page of a pdf

    Covered by another commenter already, but for completeness: yes, you just add #page={n) at the end of the URL, e.g. https://dagrs.berkeley.edu/sites/default/files/2020-01/sample.pdf#page=5