FIND YOUR NEXT FEW LINES

Results for “diff”

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

558 snippets foundClear filters
PythonMappings & sets

Find values missing from another collection

Python: Use a set difference to identify requested IDs absent from the available IDs.

Python✓ Tested
C#Collections & data structures

Find values missing from another collection

C#: Except removes duplicates as it calculates the set difference.

C#✓ Tested
Docker / ComposeExecution & file transfer

Inspect changes to a container’s writable layer

Docker / Compose: diff marks added, changed, and deleted filesystem paths.

Docker / Compose✓ 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
GoDates & times

Measure a duration between instants

Measure a duration between instants using a complete Go program with explicit sample inputs.

Go✓ Tested
GitInspecting the working tree

Summarize added and removed lines numerically

Git: Numstat provides tab-separated counts suitable for processing.

Git✓ Tested
GitInspecting the working tree

Test whether tracked working files changed

Git: A quiet diff returns status one for differences, so handle it in a conditional.

Git✓ Tested
SQLGetting Started

Accept either of two conditions

SQL: Use OR to keep matching names or out-of-stock rows.

SQL✓ Tested
SQL ServerGetting Started

Accept either of two conditions

SQL Server: Use OR to keep matching names or out-of-stock rows.

SQL Server✓ Tested
PostgresGetting Started

Accept either of two conditions

Postgres: Use OR to keep matching names or out-of-stock rows.

Postgres✓ Tested
SQLiteGetting Started

Accept either of two conditions

SQLite: Use OR to keep matching names or out-of-stock rows.

SQLite✓ Tested