FIND YOUR NEXT FEW LINES

Results for “Asynchronous work & URI handling”

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

631 snippets foundClear filters
jQueryDeferred work & queues

Report progress before completion

jQuery: notify calls registered progress handlers while the deferred is pending.

jQuery✓ Tested
jQueryDeferred work & queues

Resolve a deferred result

jQuery: done receives the value supplied to resolve.

jQuery✓ Tested
GitRestoring & revising local work

Restore a file’s content from an older commit

Git: Specify a source revision when the desired contents are not in the current index.

Git✓ Tested
GitStashing selected work

Restore the index state recorded in a stash

Git: Apply with index restores which changes were staged as well as their file contents.

Git✓ Tested
GitInspecting the working tree

Restrict a diff to one chosen path

Git: Use the double dash separator to distinguish a filename from revisions or options.

Git✓ Tested
JavaScriptArray restructuring

Reverse a copy while preserving the original

JavaScript: Copy before reverse because reverse mutates the array it receives.

JavaScript✓ Tested
TypeScriptArray restructuring

Reverse a copy while preserving the original

TypeScript: Copy before reverse because reverse mutates the array it receives.

TypeScript✓ Tested
PythonFunctions & error handling

Run cleanup around a custom context

Python: Use try/finally inside a contextmanager so cleanup runs even on failure.

Python✓ Tested
GitWorking tree & staging

See changed files

Show a concise working-tree status.

status✓ Tested
Docker / ComposeLimits & process security

Set and inspect a fractional CPU limit

Docker / Compose: The cpus option records a limit in units of one billion NanoCPUs.

Docker / Compose✓ Tested
Docker / ComposeLimits & process security

Set the open-file limit for a process

Docker / Compose: The nofile ulimit sets soft and hard file descriptor limits.

Docker / Compose✓ Tested
JavaScriptArray restructuring

Split an array into bounded batches

JavaScript: Advance by a positive batch size and allow a shorter final chunk.

JavaScript✓ Tested