FIND YOUR NEXT FEW LINES

Results for “C”

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

3000 snippets foundClear filters
ReactAccessibility & events

Handle an Escape key press

Handle an Escape key press with a small React component and explicit browser behavior.

React✓ Tested
AngularGetting Started

Handle an event emitted by a child

Handle an event emitted by a child with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonFunctions & error handling

Handle an expected child-process failure

Python: Catch CalledProcessError when check=True reports a nonzero exit status.

Python✓ Tested
Bash ScriptsFunctions & arguments

Handle an expected command failure

Branch on a command’s exit code without aborting the script.

exit status✓ Tested
PowerShellGetting Started

Handle an expected terminating error

PowerShell: Handle an expected terminating error using PowerShell 7.

PowerShell✓ Tested
AngularServices & dependency injection

Handle an optional dependency

Handle an optional dependency with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryHTTP requests

Handle an unsuccessful HTTP status

jQuery: fail receives the jqXHR object and exposes its status.

jQuery✓ Tested
jQueryEvents

Handle dynamically added buttons

Delegate a jQuery event from a stable parent to later children.

jQuery✓ Tested
AngularEvents & DOM interaction

Handle Escape to dismiss a panel

Handle Escape to dismiss a panel with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Arduino / CSerial protocols

Handle incomplete serial input

Arduino / C: The returned byte count distinguishes a complete payload from a timed-out partial one.

Arduino / C✓ Tested
RustErrors & optional values

Handle integer overflow without panicking

Handle integer overflow without panicking in a complete Rust program using the standard library.

Rust✓ Tested
AngularEvents & DOM interaction

Handle the Enter key specifically

Handle the Enter key specifically with a standalone Angular component and explicit browser behavior.

Angular✓ Tested