FIND YOUR NEXT FEW LINES

Results for “or”

Small, practical examples. Search by task or narrow things down below.

2638 snippets foundClear filters
SQLSelect & filter

List distinct values

Remove duplicate category values from a result.

DISTINCT✓ Tested
GitCommit history & revision selection

List files changed by the current commit

Git: diff-tree exposes the paths changed between a commit and its parent.

Git✓ Tested
GitInspecting the working tree

List files tracked by Git

Git: ls-files reads the index instead of listing every file in the working directory.

Git✓ Tested
GitInspecting the working tree

List newly added staged files only

Git: Filter the cached diff by added status while leaving modified files out.

Git✓ Tested
GitInspecting the working tree

List only staged filenames

Git: The cached diff compares the index with HEAD rather than comparing working files with the index.

Git✓ Tested
Docker / ComposeNetworks & volume metadata

List only volumes matching a label

Docker / Compose: A label filter avoids relying on broad name patterns.

Docker / Compose✓ Tested
GitTags & repository configuration

List release tags matching a pattern

Git: Use a tag pattern and version-aware sorting for release labels.

Git✓ Tested
RustGetting Started

Loop over an inclusive range

Loop over an inclusive range in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CSensor calculations

Maintain a rolling sum in a circular window

Arduino / C: Subtract the overwritten sample before adding the next one.

Arduino / C✓ Tested
HTMLForm behavior

Make an unavailable select option unselectable

HTML: A disabled option remains visible but cannot be selected through normal keyboard navigation.

HTML✓ Tested
ReactPerformance & rendering

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
C#JSON & binary formats

Measure the byte length of UTF-8 text

C#: Character count and encoded byte count can differ for non-ASCII text.

C#✓ Tested