FIND YOUR NEXT FEW LINES

Results for “one”

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

590 snippets foundClear filters
ReactAccessibility & events

Stop an event from reaching a parent handler

Stop an event from reaching a parent handler with a small React component and explicit browser behavior.

React✓ Tested
jQueryAnimation completion

Stop current animation and discard later work

jQuery: stop with clearQueue and jumpToEnd finishes the current animation and removes pending ones.

jQuery✓ Tested
CDynamic memory & ownership

Store a variable-length payload after a structure header

C: A flexible array member lets one allocation hold metadata and trailing bytes.

C✓ Tested
ReactRefs & DOM interaction

Store and cancel a timer handle

Store and cancel a timer handle with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Store and iterate over an array

Bash Scripts: Store and iterate over an array with a small standalone Bash program.

Bash Scripts✓ Tested
AngularGetting Started

Store reactive state in a signal

Store reactive state in a signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Bash ScriptsGetting Started

Store text in a variable

Bash Scripts: Store text in a variable with a small standalone Bash program.

Bash Scripts✓ Tested
AngularLists & control flow

Style the first and last list items

Style the first and last list items with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactPerformance & rendering

Subscribe to a small external store safely

Subscribe to a small external store safely with a small React component and explicit browser behavior.

React✓ Tested
ReactEffects & lifecycle

Subscribe to and clean up a window event

Subscribe to and clean up a window event with a small React component and explicit browser behavior.

React✓ Tested
SQLExpressions & aggregates

Sum values per category

Calculate a grouped total.

SUM✓ Tested
ReactGetting Started

Supply a default prop value

Supply a default prop value with a small React component and explicit browser behavior.

React✓ Tested