FIND YOUR NEXT FEW LINES

Results for “immutable update”

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

92 snippets foundClear filters
Bash ScriptsProcesses & environment

Keep loop state by avoiding a pipeline subshell

Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.

Bash Scripts✓ Tested
jQueryEvents

Mirror input text

Update a result as the user types using a jQuery input event.

jQuery✓ Tested
JavaScriptObject behavior & collections

Prevent runtime changes to top-level properties

JavaScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Prevent runtime changes to top-level properties

TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

TypeScript✓ Tested
GitRemotes & collaboration

Pull without creating a merge commit

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

pull✓ Tested
PowerShellCommands & execution context

Read named fields from a successful regex match

PowerShell: The Matches table is updated after a successful scalar match operation.

PowerShell✓ Tested
GitRemotes & additional checkouts

Rename a configured remote

Git: Renaming a remote updates its associated configuration and remote-tracking references.

Git✓ Tested
Docker / ComposeContainer lifecycle

Rename a container without recreating it

Docker / Compose: rename updates the container name while preserving its identity.

Docker / Compose✓ Tested
CFile positioning & lifecycle

Replace bytes at a known position in a binary file

C: Open in update mode and seek before writing a fixed-size replacement.

C✓ Tested
PythonGetting Started

Replace one collection element

Python: Update an existing element at a known valid index.

Python✓ Tested
C#Getting Started

Replace one collection element

C#: Update an existing element at a known valid index.

C#✓ Tested
JavaGetting Started

Replace one collection element

Java: Update an existing element at a known valid index.

Java✓ Tested