FIND YOUR NEXT FEW LINES

Results for “Restoring & revising local work”

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

812 snippets foundClear filters
jQueryEvent control

Prevent navigation from a handled link

jQuery: preventDefault cancels the browser action without cancelling event bubbling.

jQuery✓ Tested
RustGetting Started

Print a collection for inspection

Print a collection for inspection in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsText parsing & arithmetic

Print text containing percent characters literally

Bash Scripts: Never use untrusted text as the printf format string.

Bash Scripts✓ Tested
RustVectors & slices

Process a slice in bounded chunks

Process a slice in bounded chunks in a complete Rust program using the standard library.

Rust✓ Tested
RustErrors & optional values

Propagate a parsing error with question mark

Propagate a parsing error with question mark in a complete Rust program using the standard library.

Rust✓ Tested
Docker / ComposeCompose service options

Protect a Compose service’s root filesystem

Docker / Compose: read_only rejects writes to the image filesystem.

Docker / Compose✓ Tested
GoConcurrency & cancellation

Protect a shared counter

Protect a shared counter using a complete Go program with explicit sample inputs.

Go✓ Tested
RustThreads & shared ownership

Protect shared mutable state with a mutex

Protect shared mutable state with a mutex in a complete Rust program using the standard library.

Rust✓ Tested
Docker / ComposeBuild images

Provide a default environment value

Set a runtime default that can be overridden at startup.

Dockerfile✓ Tested
RustErrors & optional values

Provide a default for a missing value

Provide a default for a missing value in a complete Rust program using the standard library.

Rust✓ Tested
GitRemotes & collaboration

Pull without creating a merge commit

Update a branch only when its upstream can be fast-forwarded.

pull✓ Tested
GitRemotes & collaboration

Push a new branch and set its upstream

Connect a feature branch with its remote counterpart.

push✓ Tested