FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
C++Filesystem operations

List regular files recursively in sorted order

C++: Collect relative paths before sorting because directory iteration order is unspecified.

C++✓ Tested
Linux CommandsSystem information

List running processes

Display process IDs, parent process IDs, and command names for all visible processes.

process✓ Tested
SQLRelationships & missing data

List unordered pairs without duplicate reversals

SQL: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

SQL✓ Tested
SQL ServerRelationships & missing data

List unordered pairs without duplicate reversals

SQL Server: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

SQL Server✓ Tested
PostgresRelationships & missing data

List unordered pairs without duplicate reversals

Postgres: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

Postgres✓ Tested
SQLiteRelationships & missing data

List unordered pairs without duplicate reversals

SQLite: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

SQLite✓ Tested
Docker / ComposeExecution & file transfer

Load environment variables from a file

Docker / Compose: An env file supplies one KEY=value assignment per line.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Load service variables from an env file

Docker / Compose: env_file supplies runtime environment values.

Docker / Compose✓ Tested
C#Collections

Look up a dictionary value

Use TryGetValue for a C# dictionary lookup with a fallback.

C#✓ Tested
C++Collections

Look up a map key

Use find to read a C++ map without inserting a missing key.

C++✓ Tested
Bash ScriptsFunctions & arguments

Look up values in an associative array

Use named keys for a small in-memory configuration table.

dictionary✓ 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