FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
TypeScriptGetting Started

Explain a calculation with a comment

TypeScript: Keep the code executable while documenting why a fixed input is used.

TypeScript✓ Tested
C++Getting Started

Explain a calculation with a comment

C++: Keep the code executable while documenting why a fixed input is used.

C++✓ Tested
CGetting Started

Explain a calculation with a comment

C: Keep the code executable while documenting why a fixed input is used.

C✓ Tested
AngularAccessibility & reusable patterns

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Expose a read-only signal view

Expose a read-only signal view with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularTemplate-driven forms

Expose a required field’s validity

Expose a required field’s validity with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularComponents & communication

Expose an input with a public alias

Expose an input with a public alias with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularServices & dependency injection

Expose service state through a read-only signal

Expose service state through a read-only signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularLists & control flow

Expose the current index in @for

Expose the current index in @for with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustNumbers & durations

Express a duration in milliseconds

Express a duration in milliseconds in a complete Rust program using the standard library.

Rust✓ Tested
C++Text validation & parsing

Extract a substring with an explicit count

C++: The second substr argument is a length rather than an ending index.

C++✓ Tested
TypeScriptRegular expressions & URL encoding

Extract all regex matches with their groups

TypeScript: matchAll requires a global regular expression and returns an iterator of matches.

TypeScript✓ Tested