FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
C++Tasks & synchronization

Pass an argument into a worker thread

C++: Thread arguments are copied by default; std::ref explicitly passes a reference.

C++✓ Tested
AngularReactive forms

Patch part of a reactive form

Patch part of a reactive form with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptRegular expressions & URL encoding

Percent-encode one URL component

TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.

TypeScript✓ Tested
Docker / ComposeDockerfile patterns

Prepare an owned directory before dropping root

Docker / Compose: Create and chown the writable application path before USER.

Docker / Compose✓ 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
AngularEvents & DOM interaction

Prevent a link’s default navigation

Prevent a link’s default navigation with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptObject behavior & collections

Prevent runtime changes to top-level properties

TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

TypeScript✓ Tested
RustGetting Started

Print a collection for inspection

Print a collection for inspection in a complete Rust program using the standard library.

Rust✓ Tested
TypeScriptGetting Started

Print a number with two decimal places

TypeScript: Format a small decimal value consistently for display.

TypeScript✓ Tested
C++Getting Started

Print a number with two decimal places

C++: Format a small decimal value consistently for display.

C++✓ Tested
CGetting Started

Print a number with two decimal places

C: Format a small decimal value consistently for display.

C✓ Tested