Results for “Restoring & revising local work”
Small, practical examples. Search by task or narrow things down below.
Apply one commit from another branch
Git: Cherry-pick replays the selected change as a commit on the current branch.
Git✓ Tested
Assert approximate floating-point equality
Assert approximate floating-point equality in a complete Rust program using the standard library.
Rust✓ Tested
Assign a default to an empty or unset variable
Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.
Bash Scripts✓ Tested
Attach a descriptive label to a container
Docker / Compose: Attach a descriptive label to a container using a locally available Ubuntu image.
Docker / Compose✓ Tested
Attach an application-specific request header
jQuery: The headers option adds a header to this request only.
jQuery✓ Tested
Attach behavior to a struct
Attach behavior to a struct using a complete Go program with explicit sample inputs.
Go✓ Tested
Attach configuration when registering a handler
jQuery: event.data carries the registration-time data object.
jQuery✓ Tested
Bind a value with let
Bind a value with let in a complete Rust program using the standard library.
Rust✓ Tested
Borrow text until a modification is needed
Borrow text until a modification is needed in a complete Rust program using the standard library.
Rust✓ Tested
Borrow text without transferring ownership
Borrow text without transferring ownership in a complete Rust program using the standard library.
Rust✓ Tested
Build an image with a default command
Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Build text incrementally
Build text incrementally using a complete Go program with explicit sample inputs.
Go✓ Tested