Results for “then”
Small, practical examples. Search by task or narrow things down below.
Increment a shared counter safely
C++: Atomic increments prevent lost updates when two threads change the same counter.
C++✓ Tested
Initialize a byte buffer to zero
C: memset initializes each byte to the chosen unsigned-char value.
C✓ Tested
Initialize component data with ngOnInit
Initialize component data with ngOnInit with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Initialize shared data once
Initialize shared data once in a complete Rust program using the standard library.
Rust✓ Tested
Initialize structure fields by name
C: Designated initializers make field assignments independent of their declaration order.
C✓ Tested
Inject a service into a component
Inject a service into a component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
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
Insert and retrieve a map value
Insert and retrieve a map value in a complete Rust program using the standard library.
Rust✓ Tested
Insert into an array with spare capacity
C: Move the trailing elements before inserting and keep the logical length separate from capacity.
C✓ Tested
Inspect a GitHub remote URL
Configure and inspect an example origin without contacting the network.
GitHub✓ Tested
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
Inspect a substring without allocating a copy
C++: A string_view refers to existing storage and must not outlive that storage.
C++✓ Tested