FIND YOUR NEXT FEW LINES

Results for “one”

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

590 snippets foundClear filters
Bash ScriptsGetting Started

Calculate with integer arithmetic

Bash Scripts: Calculate with integer arithmetic with a small standalone Bash program.

Bash Scripts✓ Tested
ReactEffects & lifecycle

Cancel an asynchronous operation on unmount

Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.

React✓ Tested
AngularPipes & formatting

Capitalize words with TitleCasePipe

Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Bash ScriptsGetting Started

Capture a command’s output

Bash Scripts: Capture a command’s output with a small standalone Bash program.

Bash Scripts✓ Tested
AngularServices & dependency injection

Centralize a reusable validation rule

Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
CSSInteraction selectors

Change a control’s appearance on hover

CSS: Hover applies while a pointing device is positioned over the element.

CSS✓ Tested
SQLiteJSON data

Check whether text is valid JSON

Reject malformed input before processing it.

json_valid✓ Tested
Bash ScriptsGetting Started

Choose an action with case

Bash Scripts: Choose an action with case with a small standalone Bash program.

Bash Scripts✓ Tested
AngularSignals & state

Choose an equality function for signal values

Choose an equality function for signal values with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Choose between two render branches

Choose between two render branches with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Choose between two script branches

Bash Scripts: Choose between two script branches with a small standalone Bash program.

Bash Scripts✓ Tested