Results for “run”
Small, practical examples. Search by task or narrow things down below.
Find what remains after division
JavaScript: Use the remainder operator to count items left after forming complete groups.
JavaScript✓ Tested
Find what remains after division
TypeScript: Use the remainder operator to count items left after forming complete groups.
TypeScript✓ Tested
Find what remains after division
C++: Use the remainder operator to count items left after forming complete groups.
C++✓ Tested
Find what remains after division
C: Use the remainder operator to count items left after forming complete groups.
C✓ Tested
Flatten a single nesting level
JavaScript: flat defaults to a depth of one and creates a new array.
JavaScript✓ Tested
Flatten a single nesting level
TypeScript: flat defaults to a depth of one and creates a new array.
TypeScript✓ Tested
Flatten nested collections
Java: Use flatMap to concatenate nested Java lists into one stream.
Java✓ Tested
Flatten nested collections
Flatten nested collections in a complete Rust program using the standard library.
Rust✓ Tested
Flatten nested collections with SelectMany
C#: Concatenate the items from several sequences into one sequence.
C#✓ Tested
Flatten one level of nested lists
Python: Use a nested comprehension when each input item is itself an iterable.
Python✓ Tested
Force a disposable container to stop
Docker / Compose: kill sends SIGKILL by default without a graceful shutdown interval.
Docker / Compose✓ Tested
Format a bounded duration as hours minutes and seconds
PowerShell: TimeSpan can format duration components with escaped separators.
PowerShell✓ Tested