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
RustErrors & optional values

Handle integer overflow without panicking

Handle integer overflow without panicking in a complete Rust program using the standard library.

Rust✓ Tested
jQueryGetting Started

Hide an element

jQuery: Learn how to hide an element in a complete browser example.

jQuery✓ Tested
GitTags & repository configuration

Identify a commit exactly at a release tag

Git: Describe with exact-match refuses to invent a label for a later commit.

Git✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Identify whether a name resolves to a builtin

Bash Scripts: type -t reports the command kind without printing a machine-specific path.

Bash Scripts✓ Tested
GitWorking tree & staging

Ignore generated files

Exclude build output from untracked-file listings.

gitignore✓ Tested
RustFunctions & data types

Implement a method on a struct

Implement a method on a struct in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsGetting Started

Increase an integer variable

Bash Scripts: Increase an integer variable with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsText parsing & arithmetic

Increment a counter without an unexpected errexit

Bash Scripts: An assignment avoids the zero-result exit status of a standalone arithmetic post-increment.

Bash Scripts✓ Tested
GoConcurrency & cancellation

Increment an atomic counter

Increment an atomic counter using a complete Go program with explicit sample inputs.

Go✓ Tested
GoConcurrency & cancellation

Initialize a resource only once

Initialize a resource only once using a complete Go program with explicit sample inputs.

Go✓ Tested
RustThreads & shared ownership

Initialize shared data once

Initialize shared data once in a complete Rust program using the standard library.

Rust✓ Tested
jQueryGetting Started

Insert a list item at the beginning

jQuery: Learn how to insert a list item at the beginning in a complete browser example.

jQuery✓ Tested