Results for “os”
Small, practical examples. Search by task or narrow things down below.
Test missing values with IS NULL
Find rows where an optional value is absent.
IS NULL✓ 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
Transform an optional value
Java: Use Optional.map and orElse to transform a possibly absent result.
Java✓ Tested
Treat an empty trimmed value as missing
SQL: NULLIF converts an empty string to NULL before a fallback is applied.
SQL✓ Tested
Treat dynamic regex input as literal text
Java: Use Pattern.quote so metacharacters in a search term lose their special meaning.
Java✓ Tested
Turn a condition into a result label
SQL: Use CASE to describe stock availability for each row.
SQL✓ Tested
Turn known group values into columns
SQL: Conditional aggregation gives a portable pivot when the category set is known.
SQL✓ Tested
Turn on the LED with a serial command
Arduino / C: Wait for the character 1 in Serial Monitor before turning on the built-in LED.
Arduino / C✓ Tested
Uncommit a local change and leave its edits unstaged
Git: A mixed reset resets the index while retaining working-file contents.
Git✓ Tested
Uncommit the latest local change while keeping it staged
Git: A soft reset moves the branch tip but preserves both index and working files.
Git✓ Tested
Undo a commit with a new commit
Reverse a change while preserving shared history.
revert✓ Tested