FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
HTMLInput constraints

Validate a structured text identifier

HTML: The pattern attribute matches the entire nonempty input; required handles the empty case.

HTML✓ Tested
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
TypeScriptSafe data handling

Validate an unknown value with a type guard

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

unknown✓ Tested
AngularTemplate-driven forms

Validate email syntax with Angular’s email validator

Validate email syntax with Angular’s email validator with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryTraversal & selection

Visit selected elements

Use jQuery each to label every item with its one-based position.

jQuery✓ Tested
Arduino / CData & storage

Write and read a setting in EEPROM

Persist one byte using the update operation.

EEPROM✓ Tested
Bash ScriptsGetting Started

Write and run a first Bash script

Bash Scripts: Write and run a first Bash script with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Write several literal lines

Bash Scripts: Write several literal lines with a small standalone Bash program.

Bash Scripts✓ Tested
HTMLText semantics

Write subscripts and superscripts in ordinary text

HTML: Sub and sup position short annotations such as formula indices and exponents.

HTML✓ Tested