FIND YOUR NEXT FEW LINES

Results for “Input constraints”

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

841 snippets foundClear filters
GoHTTP & URLs

Resolve a relative URL

Resolve a relative URL using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeContainer lifecycle

Restart an existing container

Docker / Compose: restart starts the same container again while retaining its writable layer.

Docker / Compose✓ Tested
GitRestoring & revising local work

Restore a file’s content from an older commit

Git: Specify a source revision when the desired contents are not in the current index.

Git✓ Tested
GitStashing selected work

Restore the index state recorded in a stash

Git: Apply with index restores which changes were staged as well as their file contents.

Git✓ Tested
GitInspecting the working tree

Restrict a diff to one chosen path

Git: Use the double dash separator to distinguish a filename from revisions or options.

Git✓ Tested
Docker / ComposeExecution & file transfer

Retrieve a file from a stopped container

Docker / Compose: The writable layer remains available for docker cp after exit.

Docker / Compose✓ Tested
GoErrors & validation

Return a descriptive validation error

Return a descriptive validation error using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaRecords & reliable control flow

Return a value from a switch expression

Java: Use an exhaustive switch expression with a fallback for other input values.

Java✓ 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