FIND YOUR NEXT FEW LINES

Results for “sed”

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

97 snippets foundClear filters
Linux CommandsArchives & checksums

List files in a tar archive

Inspect the contents of a gzip-compressed tar archive without extracting any files.

tar✓ 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
JavaDates & time zones

Measure a duration between instants

Java: Use Duration for elapsed timeline time and retrieve total seconds.

Java✓ Tested
Arduino / CTiming & control

Measure a short delay with micros

Measure elapsed microseconds around a short operation.

micros✓ Tested
PythonIteration & sequences

Number items while iterating

Python: Use enumerate to attach a one-based position without maintaining a separate counter.

Python✓ Tested
C++Ownership & optional values

Observe shared ownership without extending its lifetime

C++: A weak_ptr can be locked while an owner exists and becomes expired after the last owner is released.

C++✓ Tested
Bash ScriptsFunctions & arguments

Parse a short option with getopts

Read a named option and handle invalid flags explicitly.

getopts✓ Tested
Docker / ComposeBuild images

Provide a default environment value

Set a runtime default that can be overridden at startup.

Dockerfile✓ Tested
Arduino / CGetting Started

Read a button in the Serial Monitor

Arduino / C: Use a pull-up input and if/else to report three button readings.

Arduino / C✓ Tested