FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
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
TypeScriptText handling & Unicode

Trim and discard blank lines

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

TypeScript✓ Tested
Arduino / CGetting Started

Turn on the LED with a serial command

Arduino / C: Wait for the character 1 in Serial Monitor before turning on the built-in LED.

Arduino / C✓ Tested
ReactState & reducers

Update a nested object immutably

Update a nested object immutably with a small React component and explicit browser behavior.

React✓ Tested
SQLiteTables & writes

Update a row on conflict

Use a primary key to insert or update one value.

upsert✓ Tested
AngularSignals & state

Update a signal from its previous value

Update a signal from its previous value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested