Results for “du”
Small, practical examples. Search by task or narrow things down below.
Measure a duration between instants
Java: Use Duration for elapsed timeline time and retrieve total seconds.
Java✓ Tested
Measure a duration between instants
Measure a duration between instants using a complete Go program with explicit sample inputs.
Go✓ Tested
Parse a duration string
Parse a duration string using a complete Go program with explicit sample inputs.
Go✓ Tested
Print only duplicate values
Linux Commands: Use uniq -d after sorting to report each repeated value once.
Linux Commands✓ Tested
Produce a lazy sequence with a generator
JavaScript: A generator yields one value per iteration without building an intermediate array.
JavaScript✓ Tested
Produce a lazy sequence with a generator
TypeScript: A generator yields one value per iteration without building an intermediate array.
TypeScript✓ Tested
Produce compact deterministic JSON
Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.
Python✓ Tested
Reject duplicate business identifiers
SQL: A UNIQUE constraint protects a business key independently of the primary key.
SQL✓ Tested
Reject duplicate business identifiers
SQL Server: A UNIQUE constraint protects a business key independently of the primary key.
SQL Server✓ Tested
Reject duplicate business identifiers
Postgres: A UNIQUE constraint protects a business key independently of the primary key.
Postgres✓ Tested
Reject duplicate business identifiers
SQLite: A UNIQUE constraint protects a business key independently of the primary key.
SQLite✓ Tested
Remove adjacent duplicate lines
Linux Commands: Remove adjacent duplicate lines using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested