FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
AngularLists & control flow

Sort a derived copy of a collection

Sort a derived copy of a collection with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaScriptUTC date operations

Sort timestamp strings by their parsed instants

JavaScript: Compare epoch values explicitly when date strings may contain different offsets.

JavaScript✓ Tested
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested
PythonIteration & sequences

Split a list into fixed-size batches

Python: Slice a sequence at regular offsets; the final batch can be smaller.

Python✓ Tested
CSSResponsive design

Stack columns on small screens

Change a two-column CSS grid to one column at a viewport breakpoint.

CSS✓ Tested
AngularEvents & DOM interaction

Stop a nested click from reaching its parent

Stop a nested click from reaching its parent with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
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
C++Containers & compound values

Store and inspect a fixed set of bits

C++: bitset offers named operations and a readable binary representation.

C++✓ 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