FIND YOUR NEXT FEW LINES

Results for “Records & reliable control flow”

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

215 snippets foundClear filters
AngularReactive forms

Group related typed controls

Group related typed controls with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustErrors & optional values

Handle integer overflow without panicking

Handle integer overflow without panicking in a complete Rust program using the standard library.

Rust✓ Tested
CSSResponsive conditions & sizing

Hide interface controls in print layout

CSS: A print media query can retain article content while removing interactive controls.

CSS✓ Tested
JavaStream transformations

Index records by a unique key

Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.

Java✓ Tested
CStructures & function interfaces

Iterate over a fixed array of records

C: Compute the array element count with sizeof at the point where it is still an array.

C✓ Tested
CSSPositioning & stacking

Keep a control fixed to the viewport during scrolling

CSS: Fixed positioning normally uses the viewport when no ancestor establishes a different fixed containing block.

CSS✓ Tested
C++Ordering & set operations

Preserve equal-key order while sorting records

C++: stable_sort retains encounter order for records whose selected sort keys compare equal.

C++✓ Tested
AngularAccessibility & reusable patterns

Preserve input state when tracked records reorder

Preserve input state when tracked records reorder with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactRefs & DOM interaction

Read an uncontrolled field through a ref

Read an uncontrolled field through a ref with a small React component and explicit browser behavior.

React✓ Tested
ReactForms & validation

Read an uncontrolled form with FormData

Read an uncontrolled form with FormData with a small React component and explicit browser behavior.

React✓ Tested
C#LINQ transformations

Remove duplicate records by a selected key

C#: DistinctBy keeps the first record for each key in encounter order.

C#✓ Tested
AngularReactive forms

Reset a nonnullable control to its initial value

Reset a nonnullable control to its initial value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested