FIND YOUR NEXT FEW LINES

Results for “one”

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

590 snippets foundClear filters
AngularSignals & state

Synchronize a document property with an effect

Synchronize a document property with an effect with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Synchronize the document title with state

Synchronize the document title with state with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Test a function’s success status

Bash Scripts: Test a function’s success status with a small standalone Bash program.

Bash Scripts✓ Tested
CSmall algorithms & bit operations

Test whether an unsigned value is a power of two

C: A nonzero power of two has exactly one set bit.

C✓ Tested
GitInspecting the working tree

Test whether tracked working files changed

Git: A quiet diff returns status one for differences, so handle it in a conditional.

Git✓ Tested
ReactState & reducers

Toggle Boolean state

Toggle Boolean state with a small React component and explicit browser behavior.

React✓ Tested
AngularLists & control flow

Track a selected record by its identifier

Track a selected record by its identifier with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Track only dependencies used by a computed branch

Track only dependencies used by a computed branch with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactLists & filtering

Track selection by a stable identifier

Track selection by a stable identifier with a small React component and explicit browser behavior.

React✓ Tested
ReactForms & validation

Track whether a form differs from its initial value

Track whether a form differs from its initial value with a small React component and explicit browser behavior.

React✓ Tested
AngularLifecycle & observable data

Transform an observable value

Transform an observable value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaScriptText handling & Unicode

Trim and discard blank lines

JavaScript: Split a text block, trim each line, and keep nonempty values.

JavaScript✓ Tested