Results for “or”
Small, practical examples. Search by task or narrow things down below.
Sum values per category
Calculate a grouped total.
SUM✓ Tested
Sum vector values
Use std::accumulate with a wide initial value.
C++✓ Tested
Supply a default for an unset Compose variable
Docker / Compose: The default interpolation form supplies a value when the variable is absent or empty.
Docker / Compose✓ Tested
Supply a title and URL for link previews
HTML: Open Graph metadata describes a shared page without changing its visible content.
HTML✓ Tested
Take a limited number of iterator values
Python: Use islice to consume only the requested prefix of a potentially unbounded iterator.
Python✓ Tested
Take a page from an ordered sequence
C#: Apply a stable order before Skip and Take for predictable paging.
C#✓ Tested
Temporarily store tracked-file edits
Restore a clean working tree and then reapply your saved changes.
stash✓ Tested
Test whether any or all values match
C#: Any and All short-circuit instead of materializing filtered collections.
C#✓ Tested
Test whether one revision is an ancestor of another
Git: merge-base --is-ancestor reports its answer through the exit status.
Git✓ Tested
Test whether tracked working files changed
Git: A quiet diff returns status one for differences, so handle it in a conditional.
Git✓ Tested
Toggle a bit with an XOR mask
Arduino / C: XOR flips selected bits and leaves all other bits unchanged.
Arduino / C✓ Tested
Track a selected record by its identifier
Track a selected record by its identifier with a standalone Angular component and explicit browser behavior.
Angular✓ Tested