FIND YOUR NEXT FEW LINES

Results for “flow”

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

73 snippets foundClear filters
AngularLists & control flow

Render groups with nested loops

Render groups with nested loops with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaRecords & reliable control flow

Represent a finite set of states

Java: Use an enum to prevent arbitrary strings from representing application states.

Java✓ Tested
CSSBox dimensions & overflow

Reserve space for a visible border

CSS: A border adds to the outer dimensions of a content-box element.

CSS✓ Tested
JavaRecords & reliable control flow

Return a value from a switch expression

Java: Use an exhaustive switch expression with a fallback for other input values.

Java✓ Tested
C#Types & reliable control flow

Return multiple named values from a method

C#: Named value tuples give lightweight field names without a separate class.

C#✓ Tested
JavaRecords & reliable control flow

Run a task on an executor and close it

Java: Java 21 ExecutorService supports try-with-resources to shut down after submitted work.

Java✓ Tested
JavaRecords & reliable control flow

Run cleanup after a handled exception

Java: A finally block executes whether the protected operation succeeds or fails.

Java✓ Tested
CSSResponsive design

Scroll wide code locally

Keep long code inside a horizontally scrollable CSS container.

CSS✓ Tested
CSSType & reading flow

Separate an underline from the text

CSS: Text-underline-offset improves the gap between letters and a decorative underline.

CSS✓ Tested
CSSType & reading flow

Set an explicit font weight

CSS: Numeric font weights express typographic emphasis independently of a specific font family.

CSS✓ Tested
CSSBox dimensions & overflow

Size a child relative to its containing block

CSS: A percentage width is based on the containing block’s available width.

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