FIND YOUR NEXT FEW LINES

Results for “os”

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

809 snippets foundClear filters
RustErrors & optional values

Transpose an optional parsing result

Transpose an optional parsing result in a complete Rust program using the standard library.

Rust✓ Tested
GitWorking tree & staging

Unstage a file without losing edits

Return a staged change to the working tree.

restore✓ Tested
Bash ScriptsArguments & decisions

Validate the number of positional arguments

Bash Scripts: Use the argument count to enforce a simple command-line contract.

Bash Scripts✓ Tested
Docker / ComposeCompose service options

Wait for a healthy Compose dependency

Docker / Compose: The service_healthy dependency condition waits for the dependency’s health command to succeed.

Docker / Compose✓ Tested
PostgresGetting Started

Accept either of two conditions

Postgres: Use OR to keep matching names or out-of-stock rows.

Postgres✓ Tested
PostgresSchema design & transactions

Add an optional field to an existing table

Postgres: A nullable column permits existing rows to remain valid while data is filled later.

Postgres✓ Tested
CSSVisual treatment & accessibility

Align an image within its content box

CSS: Object-position places the rendered object when fitting leaves spare space or crops an edge.

CSS✓ Tested
PostgresConstraints & defaults

Apply a default when an insert omits a column

Postgres: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.

Postgres✓ Tested
Docker / ComposeNetworks & volume metadata

Assign a network-scoped alias

Docker / Compose: An alias gives an endpoint an additional name on that network.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Attach a descriptive label to a container

Docker / Compose: Attach a descriptive label to a container using a locally available Ubuntu image.

Docker / Compose✓ Tested
Docker / ComposeNetworks & volume metadata

Attach an existing container to another network

Docker / Compose: network connect adds an attachment without recreating the container.

Docker / Compose✓ Tested
PostgresSubqueries & ranked selection

Attach an overall count to every row

Postgres: An uncorrelated scalar subquery supplies the same aggregate to each output row.

Postgres✓ Tested