Results for “only”
Small, practical examples. Search by task or narrow things down below.
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
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
Restrict a diff to one chosen path
Git: Use the double dash separator to distinguish a filename from revisions or options.
Git✓ Tested
Return a descriptive validation error
Return a descriptive validation error using a complete Go program with explicit sample inputs.
Go✓ Tested
Return a value from a loop
Return a value from a loop in a complete Rust program using the standard library.
Rust✓ Tested
Return multiple named values from a method
C#: Named value tuples give lightweight field names without a separate class.
C#✓ Tested
Return to the previously checked-out branch
Git: The dash shorthand selects the previous branch in the checkout history.
Git✓ Tested