Results for “or”
Small, practical examples. Search by task or narrow things down below.
Cancel a pending request
jQuery: abort rejects the jqXHR with the abort status.
jQuery✓ Tested
Cancel an asynchronous operation on unmount
Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.
React✓ Tested
Capture a successful child-process result
Python: Run an argument list without a shell and check the return code.
Python✓ Tested
Chain operations that may return None
Chain operations that may return None in a complete Rust program using the standard library.
Rust✓ Tested
Change a control’s appearance on hover
CSS: Hover applies while a pointing device is positioned over the element.
CSS✓ Tested
Check a filename suffix
Java: Use endsWith for a case-sensitive literal suffix test.
Java✓ Tested
Check a string prefix
Java: Use startsWith to check a literal Java prefix without a regular expression.
Java✓ Tested
Check any and all stream elements
Java: Use short-circuiting match operations for predicates over a Java collection.
Java✓ Tested
Check what kind of Git object a revision names
Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.
Git✓ Tested
Choose a local file through a labeled control
HTML: A file input exposes selected file metadata to the page without providing arbitrary filesystem access.
HTML✓ Tested
Choose an image’s default directory
Docker / Compose: Choose an image’s default directory with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Clear an owning pointer after releasing its allocation
C: Assigning NULL helps prevent accidental reuse through the same variable.
C✓ Tested