FIND YOUR NEXT FEW LINES

Results for “element”

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

269 snippets foundClear filters
CSSBox dimensions & overflow

Size a panel relative to viewport height

CSS: Viewport height units track the browser viewport rather than the parent element.

CSS✓ Tested
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
PowerShellArray operations

Split an array into fixed-size batches

PowerShell: Bound the final index so the last batch can contain fewer elements.

PowerShell✓ Tested
jQueryEvent control

Stop a child event from reaching its parent

jQuery: stopPropagation leaves other handlers on the same element intact.

jQuery✓ 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
C++Ownership & optional values

Store a reference in a standard container

C++: reference_wrapper preserves reference semantics while behaving like a copyable container element.

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

Style placeholder text independently of entered text

CSS: The placeholder pseudo-element affects the hint, while the input rule styles the actual value.

CSS✓ 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
CArrays

Sum array values

Iterate over a fixed C array using a size-derived element count.

C✓ Tested
TypeScriptCollections & records

Sum typed values with reduce

Accumulate numeric array elements.

reduce✓ Tested
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