Results for “or”
Small, practical examples. Search by task or narrow things down below.
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested
List files changed by the current commit
Git: diff-tree exposes the paths changed between a commit and its parent.
Git✓ Tested
List files tracked by Git
Git: ls-files reads the index instead of listing every file in the working directory.
Git✓ Tested
List newly added staged files only
Git: Filter the cached diff by added status while leaving modified files out.
Git✓ Tested
List only staged filenames
Git: The cached diff compares the index with HEAD rather than comparing working files with the index.
Git✓ Tested
List only volumes matching a label
Docker / Compose: A label filter avoids relying on broad name patterns.
Docker / Compose✓ Tested
List release tags matching a pattern
Git: Use a tag pattern and version-aware sorting for release labels.
Git✓ Tested
Loop over an inclusive range
Loop over an inclusive range in a complete Rust program using the standard library.
Rust✓ Tested
Maintain a rolling sum in a circular window
Arduino / C: Subtract the overwritten sample before adding the next one.
Arduino / C✓ Tested
Make an unavailable select option unselectable
HTML: A disabled option remains visible but cannot be selected through normal keyboard navigation.
HTML✓ Tested
Mark a nonurgent state update as a transition
Mark a nonurgent state update as a transition with a small React component and explicit browser behavior.
React✓ Tested
Measure the byte length of UTF-8 text
C#: Character count and encoded byte count can differ for non-ASCII text.
C#✓ Tested