FIND YOUR NEXT FEW LINES

Results for “cr”

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

1833 snippets foundClear filters
ReactComponents & props

Destructure nested data in a component

Destructure nested data in a component with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsFiles & reliability

Detect an error inside a pipeline

Use pipefail to observe failure before the last pipeline command.

pipefail✓ Tested
RustParsing & byte data

Detect invalid UTF-8 data

Detect invalid UTF-8 data in a complete Rust program using the standard library.

Rust✓ Tested
HTMLForm behavior

Disable a related group of controls

HTML: A disabled fieldset prevents editing its descendant controls and omits them from form submission.

HTML✓ Tested
ReactAsync work & status

Disable an action while it is pending

Disable an action while it is pending with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Disable an unavailable action

Disable an unavailable action with a small React component and explicit browser behavior.

React✓ Tested
GitRestoring & revising local work

Discard an unstaged edit to one tracked file

Git: Restore copies the index version back into the selected working file.

Git✓ Tested
PowerShellCommands & execution context

Discard incidental output from a setup command

PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.

PowerShell✓ Tested
HTMLNative disclosure & dialogs

Dismiss a modal with the Escape key

HTML: Native modal dialogs provide keyboard dismissal and return focus to their invoker.

HTML✓ Tested
Bash ScriptsLoops & decisions

Dispatch a command with case

Choose an action from a small set of supported commands.

case✓ Tested
HTMLNative disclosure & dialogs

Display a calculated form result

HTML: An output element can name the input controls contributing to its value.

HTML✓ Tested
SQLGetting Started

Display a fallback for missing data

SQL: Return a supplied label when a column contains NULL.

SQL✓ Tested