Results for “os”
Small, practical examples. Search by task or narrow things down below.
Return to the previously checked-out branch
Git: The dash shorthand selects the previous branch in the checkout history.
Git✓ Tested
Return zero for a sum over no rows
SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL✓ Tested
Reverse an array in place
Swap C array elements from opposite ends.
C✓ Tested
Round a decimal using an explicit midpoint rule
C#: Use decimal literals for decimal arithmetic and choose the midpoint rounding behavior.
C#✓ Tested
Round a timestamp down to its month
Group dates by a calendar boundary.
date_trunc✓ Tested
Round decimal amounts explicitly
Python: Build Decimal values from strings and choose a rounding rule explicitly.
Python✓ Tested
Round downward and upward independently
C: floor and ceil round toward negative and positive infinity respectively.
C✓ Tested
Run a command in a running container
Execute an additional process inside an existing container.
exec✓ Tested
Run a first SELECT query
SQL: Return a literal value without creating a table.
SQL✓ Tested
Run a one-off container
Run a command and remove its stopped container automatically.
run✓ Tested
Run an image as a non-root user
Choose an unprivileged numeric identity for the default process.
Dockerfile✓ Tested
Run with a read-only root filesystem
Add a temporary writable location while protecting the image filesystem.
read-only✓ Tested