“then” is used to depict time, sequence or a causal relationship. “than” is used with comparative adjectives, to depict comparison.

  • 8 Posts
  • 452 Comments
Joined 2 years ago
cake
Cake day: November 12th, 2024

help-circle




  • ulterno@programming.devtoProgrammer Humor@programming.dev•True crime
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    1 year ago

    Same as ?

    std::optional<bool> role;
    
    if (role.value())
    { std::cerr ("User is admin");}
    else if (!role.value())
    { std::cerr ("User is not admin");}
    else if (!role.has_value())
    { std::cerr ("User is not logged in");}
    

    Here has_value() should have been checked first, but the JS seems kinda fine.
    Which is it?



  • ulterno@programming.devtoProgrammer Humor@programming.dev•Don't touch
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    1 year ago

    Send boss a memo of the number of work-hours lost per month due to data loss caused by power-offs.
    Multiply each colleague’s lost-work-hours by their salary and sum it all in the end, telling the boss how much that’s costing the company.

    You your boss has a boss, CC them to make sure they know the reason for why your boss will be trying to set you up in the future.


    Oh, I just realised the “had”.







  • ulterno@programming.devtoProgrammer Humor@programming.dev•Peak homelabbing
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    edit-2
    1 year ago

    I might/might not be one.
    But it definitely is a proximity sensor. Unless yours is an Apple device, in which case, it might be an angle sensor.


    The term “Hall sensor” would refer to the tech used in it, whereas the term “proximity sensor” refers to its function.
    It could be using any other proximity sensing technique too and it would still be a proximity sensor.







  • There is 1 particular thing where I think it can be very useful.
    That is when looking for relevant documentation.

    It has happened to me a few times that despite enough documentation being available I am unable to find the relevant thing because even though the description in the documentation matches what I need to do, I didn’t use the correct keywords required for the search to find the correct class and I ended up using internet search.
    If a language model can find relevant patterns and reduce the requirement onto the documentation writers for having to add tags to make search easier, that would be a win.

    But of course, no generation of new text. All that is needed is to parse the documentation and examples provided by developers and to provide links to them.