FIND YOUR NEXT FEW LINES

Results for “update”

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

85 snippets foundClear filters
TypeScriptCollections & records

Count words using a Map

Update a keyed counter without losing its value type.

Map✓ Tested
Linux CommandsFiles & permissions

Create an empty file

Linux Commands: Use touch to create a file when absent; an existing file keeps its contents but gets updated timestamps.

Linux Commands✓ Tested
jQueryEvents

Handle a button click

Attach a jQuery click handler to update text.

jQuery✓ Tested
C#Asynchronous work & URI handling

Increment a shared counter atomically

C#: Interlocked performs an indivisible update without a separate lock for this operation.

C#✓ Tested
C++Tasks & synchronization

Increment a shared counter safely

C++: Atomic increments prevent lost updates when two threads change the same counter.

C++✓ Tested
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