Results for “read-only”
Small, practical examples. Search by task or narrow things down below.
Represent an absent result with optional
C++: value_or supplies a default without requiring a sentinel inside the value domain.
C++✓ Tested
Require a value with NOT NULL
SQL: Declare required fields at the database boundary, not only in application validation.
SQL✓ Tested
Require a value with NOT NULL
SQL Server: Declare required fields at the database boundary, not only in application validation.
SQL Server✓ Tested
Require a value with NOT NULL
Postgres: Declare required fields at the database boundary, not only in application validation.
Postgres✓ Tested
Require a value with NOT NULL
SQLite: Declare required fields at the database boundary, not only in application validation.
SQLite✓ Tested
Require two conditions to be true
C#: Combine a lower and an upper bound to check whether a value is in range.
C#✓ Tested
Require two conditions to be true
C++: Combine a lower and an upper bound to check whether a value is in range.
C++✓ Tested
Resolve a merge by writing the intended final file
Git: After a conflict, edit the result, stage it, and finish the merge commit.
Git✓ Tested
Resolve a relative URI against a base
C#: Use a base URI ending in a slash when the final path component represents a directory.
C#✓ Tested
Resolve a relative URL
Resolve a relative URL using a complete Go program with explicit sample inputs.
Go✓ Tested
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
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