15 Matching Annotations
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
Thanks, this was just what I was looking for! This is a perfect appropriate use of instance_eval. I do not understand the nay-sayers. If you already have your array in a variable, then sure, a.reduce(:+) / a.size.to_f is pretty reasonable. But if you want to "in line" find the mean of an array literal or an array that is returned from a function/expression — without duplicating the entire expression ([0,4,8].reduce(:+) / [0,4,8].length.to_f, for example, is abhorrent) or being required to assign to a local, then instance_eval option is a beautiful, elegant, idiomatic solution!!
-
instance_eval is analogous to using tap, yield_self, … when you are dealing with a chain of method calls: do use it whenever it's appropriate and helpful! And in this case, I absolutely believe that it is.
-
- Apr 2021
-
stackoverflow.com stackoverflow.com
-
<aside> is appropriate if the side note "could be considered separate from the content"
From a programmer's perspective:
- It shouldn't be in an <aside>, if it is actually directly about what is in <main>
- An <aside> should be able to be evaluated on its own, (almost entirely) in isolation from, and not dependent on anything in, the <main> content. This could be especially important/relevant for screen readers.
-
<aside> is not appropriate if the side note is "a parenthetical". The W3C gives no examples of what it means.
-
- Aug 2020
-
material.io material.ioDialogs1
-
Full-screen dialogs are for mobile devices only. For tablet or desktop, use a modal dialog.
-
-
unix.meta.stackexchange.com unix.meta.stackexchange.com
-
There is an observable widespread tendency to give an awk answer to almost everything, but that should not be inferred as a rule to be followed, and if there's (say) a Python answer that involves less programming then surely that is quite on point as an answer for a readership of users.
-
- Jun 2020
-
medium.com medium.com
-
Don’t apply caching if the process is expected to react to changes during the caching period. i.e. Don’t cache when mixing reads and writes.
-
An example candidate for caching might be a nightly billing task which aggregates billing data for the past month. That kind of task is likely not expecting last minute updates while it runs. It assumes that the state of the world remains constant while processing.
-
- May 2020
-
-
For general questions, use cases, or anything else that does not fit into one of the above cases, please post in the GitLab Forum or on a third-party help site.
-
-
-
it is a question of balance — if one mouse-click was all it took to consent, is it appropriate to require a phone call during business hours to withdraw that consent? Probably not.
-
-
www.iubenda.com www.iubenda.com
-
However, please note the following: it will depend on how those subdomains are defined. Are they just subsections of a project that belongs together like help.example.com or blog.example.com (and many other possible arrangements that are part of one and the same setup)? In such a case, using the same policy is appropriate. Problems arise when completely different projects which have little to do with one another and whose data collection practices also differ so significantly that they require different privacy policies.
-
- Apr 2020
-
stackoverflow.com stackoverflow.com
-
I'm happy to try to reach agreement with you, but this isn't the right place. Feel free to invite me to a more appropriate forum.
-
-
stackoverflow.com stackoverflow.com
-
remember to re-raise any errors if the show_detailed_exceptions flag (a more appropriate check than consider_all_requests_local) is true
-
- Oct 2013
-
rhetoric.eserver.org rhetoric.eserver.org
-
This aptness of language is one thing that makes people believe in the truth of your story
-
Your language will be appropriate if it expresses emotion and character, and if it corresponds to its subject.
-