FIND YOUR NEXT FEW LINES

Results for “du”

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

410 snippets foundClear filters
JavaDates & time zones

Measure a duration between instants

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

Java✓ Tested
GoDates & times

Measure a duration between instants

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

Go✓ Tested
GoDates & times

Parse a duration string

Parse a duration string using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsSorting & joining records

Print only duplicate values

Linux Commands: Use uniq -d after sorting to report each repeated value once.

Linux Commands✓ Tested
JavaScriptPromises & iteration protocols

Produce a lazy sequence with a generator

JavaScript: A generator yields one value per iteration without building an intermediate array.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Produce a lazy sequence with a generator

TypeScript: A generator yields one value per iteration without building an intermediate array.

TypeScript✓ Tested
PythonStructured data & serialization

Produce compact deterministic JSON

Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.

Python✓ Tested
SQLConstraints & defaults

Reject duplicate business identifiers

SQL: A UNIQUE constraint protects a business key independently of the primary key.

SQL✓ Tested
SQL ServerConstraints & defaults

Reject duplicate business identifiers

SQL Server: A UNIQUE constraint protects a business key independently of the primary key.

SQL Server✓ Tested
PostgresConstraints & defaults

Reject duplicate business identifiers

Postgres: A UNIQUE constraint protects a business key independently of the primary key.

Postgres✓ Tested
SQLiteConstraints & defaults

Reject duplicate business identifiers

SQLite: A UNIQUE constraint protects a business key independently of the primary key.

SQLite✓ Tested
Linux CommandsGetting Started

Remove adjacent duplicate lines

Linux Commands: Remove adjacent duplicate lines using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested