Results for “running container”
Small, practical examples. Search by task or narrow things down below.
Build a minimum-priority queue
C++: Supply greater as the comparator because priority_queue defaults to the largest value first.
C++✓ Tested
Calculate a cumulative integer percentage
SQL: Divide a running window sum by the complete total using a unique ordering key.
SQL✓ Tested
Calculate a cumulative integer percentage
SQL Server: Divide a running window sum by the complete total using a unique ordering key.
SQL Server✓ Tested
Calculate a cumulative integer percentage
Postgres: Divide a running window sum by the complete total using a unique ordering key.
Postgres✓ Tested
Calculate a cumulative integer percentage
SQLite: Divide a running window sum by the complete total using a unique ordering key.
SQLite✓ Tested
Insert a map value only when a key is absent
C++: try_emplace preserves the old value when insertion does not take place.
C++✓ Tested
Inspect the exit code of a completed process
Docker / Compose: Container state retains the exit code until the container is removed.
Docker / Compose✓ Tested
Process a first-in first-out queue
C++: Queue exposes its front item separately from the operation that removes it.
C++✓ Tested
Remove a map entry and inspect the number removed
C++: erase by key reports whether a unique-key map contained the entry.
C++✓ Tested
Store and inspect a fixed set of bits
C++: bitset offers named operations and a readable binary representation.
C++✓ Tested
Unpack a tuple with structured bindings
C++: Structured bindings give names to the parts of a returned compound value.
C++✓ Tested
Use a hash map for direct key lookup
C++: unordered_map provides key lookup without promising iteration order.
C++✓ Tested