FIND YOUR NEXT FEW LINES

Results for “element”

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

269 snippets foundClear filters
TypeScriptTypes & functions

Return the first item with a generic function

Preserve the element type while allowing empty arrays.

generics✓ Tested
CArrays

Reverse an array in place

Swap C array elements from opposite ends.

C✓ Tested
C++Sequence algorithms

Rotate a sequence around a selected position

C++: rotate places the element at the middle iterator first while preserving the two segment orders.

C++✓ Tested
AngularComponents & communication

Scope a component’s styles

Scope a component’s styles with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryTraversal & selection

Select siblings up to a boundary

jQuery: nextUntil excludes the boundary element itself.

jQuery✓ Tested
JavaScriptArray traversal & selection

Separate a first item from the remaining items

JavaScript: Array destructuring and a rest element produce named pieces of a sequence.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Separate a first item from the remaining items

TypeScript: Array destructuring and a rest element produce named pieces of a sequence.

TypeScript✓ Tested
AngularReactive forms

Set a control value programmatically

Set a control value programmatically with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularServices & dependency injection

Share signal state through an injected service

Share signal state through an injected service with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularComponents & communication

Share two-way state through a model input

Share two-way state through a model input with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularAccessibility & reusable patterns

Show a bounded preview and remaining count

Show a bounded preview and remaining count with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLData & disclosure

Show determinate progress

Represent known completion with an HTML progress element.

HTML✓ Tested