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

Increment a shared counter safely

C++: Atomic increments prevent lost updates when two threads change the same counter.

C++✓ Tested
CDynamic memory & ownership

Initialize a byte buffer to zero

C: memset initializes each byte to the chosen unsigned-char value.

C✓ Tested
AngularLifecycle & observable data

Initialize component data with ngOnInit

Initialize component data with ngOnInit with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustThreads & shared ownership

Initialize shared data once

Initialize shared data once in a complete Rust program using the standard library.

Rust✓ Tested
CStructures & function interfaces

Initialize structure fields by name

C: Designated initializers make field assignments independent of their declaration order.

C✓ Tested
AngularGetting Started

Inject a service into a component

Inject a service into a component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C++Containers & compound values

Insert a map value only when a key is absent

C++: try_emplace preserves the old value when insertion does not take place.

C++✓ Tested
RustMaps & sets

Insert and retrieve a map value

Insert and retrieve a map value in a complete Rust program using the standard library.

Rust✓ Tested
CArray transformations

Insert into an array with spare capacity

C: Move the trailing elements before inserting and keep the logical length separate from capacity.

C✓ Tested
GitRemotes & collaboration

Inspect a GitHub remote URL

Configure and inspect an example origin without contacting the network.

GitHub✓ Tested
RustFiles & paths

Inspect a path’s filename and extension

Inspect a path’s filename and extension in a complete Rust program using the standard library.

Rust✓ Tested
C++Text validation & parsing

Inspect a substring without allocating a copy

C++: A string_view refers to existing storage and must not outlive that storage.

C++✓ Tested