FIND YOUR NEXT FEW LINES

Results for “move”

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

167 snippets foundClear filters
Docker / ComposeContainer lifecycle

Inspect the exit code of a completed process

Docker / Compose: Container state retains the exit code until the container is removed.

Docker / Compose✓ Tested
SQLJoins & subqueries

Keep unmatched rows with LEFT JOIN

Show every product even when stock is missing.

LEFT JOIN✓ Tested
SQLExpressions & aggregates

Label rows with CASE

Derive a readable label from a condition.

CASE✓ Tested
SQLSelect & filter

List distinct values

Remove duplicate category values from a result.

DISTINCT✓ Tested
Docker / ComposeGetting Started

Make a Compose service’s filesystem read-only

Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.

Docker / Compose✓ Tested
SQLSelect & filter

Match one of several values

Use IN to avoid repeating equality conditions.

IN✓ Tested
SQLJoins & subqueries

Name an intermediate query with a CTE

Make a filtered result reusable within one statement.

CTE✓ Tested
C++Filesystem operations

Normalize a path without touching the filesystem

C++: lexically_normal removes redundant dot components using path syntax alone.

C++✓ Tested
JavaFile operations & binary data

Normalize relative path components

Java: Path.normalize removes redundant dot components without accessing the filesystem.

Java✓ Tested
Bash ScriptsFunction scope & composition

Observe command substitution’s trailing-newline removal

Bash Scripts: Command substitution removes trailing newlines while preserving embedded ones.

Bash Scripts✓ Tested
Bash ScriptsFunctions & arguments

Parse a short option with getopts

Read a named option and handle invalid flags explicitly.

getopts✓ Tested
GitRestoring & revising local work

Preview removal of an untracked scratch file

Git: The dry-run flag shows what clean would remove without deleting it.

Git✓ Tested