- Nov 2022
-
stackoverflow.com stackoverflow.com
-
That's an important remark. find /path/to/ -iname '*.gif' -o -iname '*.jpg' -print0 will only print the jpg files! You need brackets here: find /path/to/ \( -iname '*.gif' -o -iname '*.jpg' \) -print0
-
- Apr 2022
-
www.postgresql.org www.postgresql.org
-
This latter equivalence does not hold exactly when more than two tables appear, because JOIN binds more tightly than comma. For example FROM T1 CROSS JOIN T2 INNER JOIN T3 ON condition is not the same as FROM T1, T2 INNER JOIN T3 ON condition because the condition can reference T1 in the first case but not the second.
-
-
stackoverflow.com stackoverflow.com
-
Caution: + continues the statement but not the string. puts "foo"+"bar".upcase gives you fooBAR, whereas puts ("foo"+"bar").upcase gives you FOOBAR. (Whether or not there's a newline after the +.) But: if you use a backslash instead of the plus sign, it will always give you FOOBAR, because combining lines into one statement, and then combining successive strings into one string, happen before the string method gets called.
-
- Jan 2022
-
datasciencejuliahackers.com datasciencejuliahackers.com
-
github.com github.com
-
Svelte currently consistently gives the reactive statement priority over your checked binding.
-
- Dec 2021
-
tvrctkmytfln.gitee.io tvrctkmytfln.gitee.io
-
one for unsigned (mulq) and one for two’s-complement (imulq) multiplication.For both of these instructions, one argument must be in register %rax, and theother is given as the instruction source operand.
mulq 和 imulq 分别表示什么指令集,他们的操作数有什么要求?
-
- Mar 2021
-
trailblazer.to trailblazer.to
-
TRAILBLAZER-STORY will follow as it turned out to be inevitable for setting up application state for tests. Instead of fumbling around with factories and traits in your tests, you “tell a story” about what to create in which order, easily customizable, and all written using activities.
-
-
trailblazer.to trailblazer.to
-
Using operations as test factories is a fundamental concept of Trailblazer to remove buggy redundancy in tests and manual factories.
this doc superseded by: https://trailblazer.to/2.1/docs/trailblazer.html#trailblazer-test-helpers-factory
-
-
trailblazer.to trailblazer.to
-
It is absolutely advisable to use factory in combination with let. let(:song) { factory( Song::Create, { title: "Timebomb", band: "Rancid" } ) }
-
You should always use operations as factories in tests.
-
There are several helpers to deal with operation tests and operations used as factories.
-
-
brain.jaredweakly.com brain.jaredweakly.comDevOps1
Tags
Annotators
URL
-
- Feb 2021
-
-
However, sometimes actions can't be rolled back and it is unfortunately unavoidable. For example, consider when we send emails during the call to process. If we send before saving a record and that record fails to save what do we do? We can't unsend that email.
-
I typically save everything I can first, and then call the side-effects afterwards. If the side-effects fail I can handle them elsewhere and retry when necessary.
-
-
css-tricks.com css-tricks.com
-
Because of the way the CSS “or” operator works, I wouldn’t be able to mix the retina conditions with other expressions since a (b or c) would be compiled into (a or b) c and not a b or a c.
-
- Nov 2020
-
wresch.github.io wresch.github.io
-
Important caveat: in the combined expression, if the middle command has a non-zero exit status, then both the middle and the rightmost command end up getting executed.
I don't think that is surprising, is it? Since && and || have the same order of precedence. So I think this is more of a clarification than a caveat.
I think this is just because:
a && b || c is equivalent to: (a && b) || c (so of course c gets evaluated if
(a && b)
is false (that if eithera
orb
is false).I think they just mean, in this case:
bedmap && mv || fail
if
mv
fails, thenfail
still gets executed.Easier to see with a simpler example:
⟫ true && false || echo 'fail' fail ⟫ false && true || echo 'fail' fail
Better example/explanation here: https://hyp.is/-foxmCVXEeuhnLM-le_R4w/mywiki.wooledge.org/BashPitfalls
The caveat/mistake here is if you treat it / think that it is equivalent to if a then b else c. That is not the case if b has any chance of failing.
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
What's not obvious here is how the quotes nest. A C programmer reading this would expect the first and second double-quotes to be grouped together; and then the third and fourth. But that's not the case in Bash. Bash treats the double-quotes inside the command substitution as one pair, and the double-quotes outside the substitution as another pair.
subshell > quotes
-
-
stackoverflow.com stackoverflow.com
-
I just learned here that || and && have equal precedence in bash (different from C, Java, etc.)
-
- Sep 2020
-
stackoverflow.com stackoverflow.com
-
By default, npx will check whether <command> exists in $PATH, or in the local project binaries, and execute that. Calling npx <command> when <command> isn't already in your $PATH will automatically install a package with that name from the NPM registry for you, and invoke it. When it's done, the installed package won’t be anywhere in your globals, so you won’t have to worry about pollution in the long-term. You can prevent this behaviour by providing --no-install option.
-
-
medium.com medium.com
-
the
Maybe similar to architects supervising the construction of a building
-
- May 2020
-
docs.gitlab.com docs.gitlab.com
-
To conjoin if, changes, and exists clauses with an AND, use them in the same rule.
-
-
about.gitlab.com about.gitlab.com
-
At GitLab, we use "ops" to mean operations - any component of the software delivery value stream after a developer commits code.
Tags
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
For convenience, conventions have been developed about the precedence of the logical operators, to avoid the need to write parentheses in some cases. These rules are similar to the order of operations in arithmetic. A common convention is:
-
-
en.wikipedia.org en.wikipedia.org
-
www.blizzard.com www.blizzard.com
-
Peer must maintain a staffed 24x7 operational center, with knowledge or direct escalation privileges to knowledgable personal to resolve any issues efficiently
-
- Mar 2019
-
runestone.academy runestone.academy
-
- Parenthesis
- Exponents and roots
- Multiplication and division
- Addition and subtraction
-