FIND YOUR NEXT FEW LINES

Results for “local”

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

377 snippets foundClear filters
RustThreads & shared ownership

Borrow local data in a scoped thread

Borrow local data in a scoped thread in a complete Rust program using the standard library.

Rust✓ Tested
HTMLForm behavior

Choose a local file through a labeled control

HTML: A file input exposes selected file metadata to the page without providing arbitrary filesystem access.

HTML✓ Tested
GitRemotes & additional checkouts

Clone a local bare repository

Git: A local remote provides the same clone workflow without any network dependency.

Git✓ Tested
GitTags & repository configuration

Delete only a selected local tag

Git: Deleting a local tag does not delete a corresponding remote tag.

Git✓ Tested
Docker / ComposeGetting Started

Disable networking for a local command

Docker / Compose: Disable networking for a local command using a locally available Ubuntu image.

Docker / Compose✓ Tested
PowerShellText & data

Format a date without locale ambiguity

Parse an ISO date and format it consistently.

date✓ Tested
jQueryEvents

Handle a form locally

Prevent default form navigation while displaying input with jQuery.

jQuery✓ Tested
Bash ScriptsFunction scope & composition

Keep a function variable local

Bash Scripts: Local prevents an ordinary function assignment from replacing a caller variable.

Bash Scripts✓ Tested
CSSPositioning & stacking

Keep a tall section inside a local vertical scroller

CSS: A bounded height and overflow auto keep long content from stretching the surrounding page.

CSS✓ Tested
PowerShellFunctions & parameter validation

Keep function-local assignments separate from caller state

PowerShell: Ordinary function assignments create local variables rather than replacing the caller’s variable.

PowerShell✓ Tested
Bash ScriptsGetting Started

Limit a beginner function variable to local scope

Bash Scripts: Limit a beginner function variable to local scope with a small standalone Bash program.

Bash Scripts✓ Tested
GitBranches & recovery

List local branches

Print branch names in sorted order.

branch✓ Tested