FIND YOUR NEXT FEW LINES

Results for “os”

Small, practical examples. Search by task or narrow things down below.

809 snippets foundClear filters
GitBranches & ancestry

Return to the previously checked-out branch

Git: The dash shorthand selects the previous branch in the checkout history.

Git✓ Tested
SQLReporting & grouped calculations

Return zero for a sum over no rows

SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQL✓ Tested
CArrays

Reverse an array in place

Swap C array elements from opposite ends.

C✓ Tested
C#Dates & precise numbers

Round a decimal using an explicit midpoint rule

C#: Use decimal literals for decimal arithmetic and choose the midpoint rounding behavior.

C#✓ Tested
PostgresDates & series

Round a timestamp down to its month

Group dates by a calendar boundary.

date_trunc✓ Tested
PythonNumbers & calculations

Round decimal amounts explicitly

Python: Build Decimal values from strings and choose a rounding rule explicitly.

Python✓ Tested
CNumeric parsing & arithmetic

Round downward and upward independently

C: floor and ceil round toward negative and positive infinity respectively.

C✓ Tested
Docker / ComposeContainer commands

Run a command in a running container

Execute an additional process inside an existing container.

exec✓ Tested
SQLGetting Started

Run a first SELECT query

SQL: Return a literal value without creating a table.

SQL✓ Tested
Docker / ComposeContainer commands

Run a one-off container

Run a command and remove its stopped container automatically.

run✓ Tested
Docker / ComposeBuild images

Run an image as a non-root user

Choose an unprivileged numeric identity for the default process.

Dockerfile✓ Tested
Docker / ComposeStorage & isolation

Run with a read-only root filesystem

Add a temporary writable location while protecting the image filesystem.

read-only✓ Tested