FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
CStructures & function interfaces

Represent a small set of named states

C: An enum gives symbolic names to integer state values.

C✓ Tested
Docker / ComposeImage management

Require a locally available image

Docker / Compose: The never pull policy fails for missing images instead of attempting a download.

Docker / Compose✓ Tested
ReactCustom hooks

Reset state to a caller-provided initial value

Reset state to a caller-provided initial value with a small React component and explicit browser behavior.

React✓ Tested
JavaQueues & collection operations

Retrieve the smallest queued value first

Java: PriorityQueue poll removes the smallest value under the natural ordering.

Java✓ Tested
PythonStructured data & serialization

Return a small immutable named record

Python: Use NamedTuple when callers need both tuple behavior and named fields.

Python✓ Tested
SQLSubqueries & ranked selection

Return all rows tied for the maximum in a group

SQL: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Return all rows tied for the maximum in a group

SQL Server: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Return all rows tied for the maximum in a group

Postgres: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Return all rows tied for the maximum in a group

SQLite: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

SQLite✓ Tested
CSSResponsive design

Scroll wide code locally

Keep long code inside a horizontally scrollable CSS container.

CSS✓ Tested
SQLiteQueries & text

Search a small FTS5 table

Use SQLite’s full-text index to match a term.

FTS5✓ Tested
jQueryGetting Started

Select all elements with a class

jQuery: Learn how to select all elements with a class in a complete browser example.

jQuery✓ Tested