FIND YOUR NEXT FEW LINES

Results for “cr”

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

1833 snippets foundClear filters
ReactContext & shared state

Validate access through a custom context hook

Validate access through a custom context hook with a small React component and explicit browser behavior.

React✓ Tested
HTMLForms

Validate an email input

Use browser constraint validation for a required HTML email field.

HTML✓ Tested
TypeScriptSafe data handling

Validate an unknown value with a type guard

Check a field before treating unknown data as a typed object.

unknown✓ Tested
HTMLInput constraints

Validate the shape of an absolute URL

HTML: A URL input checks syntax, not whether a resource exists or is safe.

HTML✓ Tested
GoErrors & validation

Validate UTF-8 bytes

Validate UTF-8 bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsArchive integrity & packaging

Verify a file against a checksum manifest

Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.

Linux Commands✓ Tested
CSSInteraction selectors

Visually distinguish a disabled control

CSS: The disabled pseudo-class follows the control’s actual disabled state.

CSS✓ Tested
GoConcurrency & cancellation

Wait for concurrent workers

Wait for concurrent workers using a complete Go program with explicit sample inputs.

Go✓ Tested
CSSLayout

Wrap a row of items

Allow CSS flex items to wrap when a row runs out of space.

CSS✓ Tested
RustFunctions & data types

Wrap a value in a distinct type

Wrap a value in a distinct type in a complete Rust program using the standard library.

Rust✓ Tested
GoErrors & validation

Wrap an error with context

Wrap an error with context using a complete Go program with explicit sample inputs.

Go✓ Tested
CSSTypography

Wrap long words

Allow long unbroken text to wrap within a CSS box.

CSS✓ Tested