FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
C++Containers & compound values

Process a first-in first-out queue

C++: Queue exposes its front item separately from the operation that removes it.

C++✓ Tested
C#Collections & data structures

Process items by numeric priority

C#: PriorityQueue removes the item with the smallest priority value first.

C#✓ Tested
Docker / ComposeCompose service options

Protect a Compose service’s root filesystem

Docker / Compose: read_only rejects writes to the image filesystem.

Docker / Compose✓ Tested
C++Tasks & synchronization

Protect a shared container with a mutex

C++: A scoped lock_guard releases the mutex when its scope ends.

C++✓ Tested
Docker / ComposeBuild images

Provide a default environment value

Set a runtime default that can be overridden at startup.

Dockerfile✓ Tested
ReactContext & shared state

Provide read-only application configuration

Provide read-only application configuration with a small React component and explicit browser behavior.

React✓ Tested
GitRemotes & additional checkouts

Push one selected release tag

Git: Naming a single tag avoids pushing every local tag unintentionally.

Git✓ Tested
Docker / ComposeCompose applications

Put an optional service behind a profile

Keep a utility service separate from a normal Compose startup.

Compose✓ Tested
CBinary formats & structured parsing

Quote a CSV field and double embedded quotes

C: A quoted CSV field represents a quote character by repeating it.

C✓ Tested
PythonFunctions & error handling

Raise and catch a domain-specific exception

Python: Give a validation failure its own exception type so callers can handle it narrowly.

Python✓ Tested
SQLWindow analytics

Rank tied scores with competition gaps

SQL: RANK leaves a gap after tied rows, unlike DENSE_RANK.

SQL✓ Tested
SQL ServerWindow analytics

Rank tied scores with competition gaps

SQL Server: RANK leaves a gap after tied rows, unlike DENSE_RANK.

SQL Server✓ Tested