Results for “run”
Small, practical examples. Search by task or narrow things down below.
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
Override an env-file value explicitly
Docker / Compose: The environment section takes precedence over env_file.
Docker / Compose✓ Tested
Override the image entrypoint in Compose
Docker / Compose: entrypoint and command combine as executable and arguments.
Docker / Compose✓ Tested
Override the process working directory
Docker / Compose: The workdir option sets the directory for the container command.
Docker / Compose✓ Tested
Own a heap-allocated value with Box
Own a heap-allocated value with Box in a complete Rust program using the standard library.
Rust✓ Tested
Own one dynamically allocated value with unique_ptr
C++: make_unique allocates a value whose lifetime is tied to its owning smart pointer.
C++✓ Tested
Pack and unpack a network-order integer
Python: Use an explicit byte order so the binary format is independent of the host architecture.
Python✓ Tested
Pad a label with leading zeroes
PowerShell: Use a numeric format specifier to control the displayed width.
PowerShell✓ Tested
Pad a numeric label
Convert a number to text and pad it to a fixed width.
JavaScript✓ Tested
Pad a numeric label to a fixed width
C#: Use a numeric format specifier to add leading zeroes.
C#✓ Tested
Page an ordered result
Skip rows and fetch a bounded page.
OFFSET✓ Tested
Pair corresponding array items by position
JavaScript: Validate equal lengths before zipping when missing counterparts would be an error.
JavaScript✓ Tested