Results for “Async work & status”
Small, practical examples. Search by task or narrow things down below.
Handle a failed conversion
Handle a failed conversion using a complete Go program with explicit sample inputs.
Go✓ Tested
Handle a filename pattern with no matches
Use nullglob so an unmatched pattern produces an empty array.
nullglob✓ Tested
Handle a form locally
Prevent default form navigation while displaying input with jQuery.
jQuery✓ Tested
Handle a nonzero background-job exit
Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.
Bash Scripts✓ Tested
Handle a parsing Result
Handle a parsing Result in a complete Rust program using the standard library.
Rust✓ Tested
Handle an expected child-process failure
Python: Catch CalledProcessError when check=True reports a nonzero exit status.
Python✓ Tested
Handle an optional value
Handle an optional value in a complete Rust program using the standard library.
Rust✓ Tested
Handle dynamically added buttons
Delegate a jQuery event from a stable parent to later children.
jQuery✓ Tested
Handle integer overflow without panicking
Handle integer overflow without panicking in a complete Rust program using the standard library.
Rust✓ Tested
Hide and show content
Use a button to toggle jQuery visibility and an accessibility state.
jQuery✓ Tested
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
Ignore generated files
Exclude build output from untracked-file listings.
gitignore✓ Tested