FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
C++Sequence algorithms

Test any and all elements with predicates

C++: These algorithms stop as soon as their result is known.

C++✓ Tested
CSmall algorithms & bit operations

Test whether an unsigned value is a power of two

C: A nonzero power of two has exactly one set bit.

C✓ Tested
AngularLifecycle & observable data

Tie a subscription’s lifetime to its component

Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Toggle a CSS class from component state

Toggle a CSS class from component state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularLists & control flow

Track a selected record by its identifier

Track a selected record by its identifier with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Track only dependencies used by a computed branch

Track only dependencies used by a computed branch with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CStructures & function interfaces

Track which union member is currently valid

C: An explicit tag tells callers which overlaid union value to read.

C✓ Tested
C++Ownership & optional values

Transfer unique ownership with move

C++: Moving a unique_ptr leaves the source empty and gives ownership to the destination.

C++✓ Tested
JavaScriptPromises & iteration protocols

Transform a resolved promise result

JavaScript: A then handler returns the value passed to the next promise in the chain.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Transform a resolved promise result

TypeScript: A then handler returns the value passed to the next promise in the chain.

TypeScript✓ Tested
RustGetting Started

Transform a value by shadowing

Transform a value by shadowing in a complete Rust program using the standard library.

Rust✓ Tested
C++Sequence algorithms

Transform a vector into a separate result

C++: Pre-size the output before writing through its iterator.

C++✓ Tested