FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
RustNumbers & durations

Subtract durations without underflow

Subtract durations without underflow in a complete Rust program using the standard library.

Rust✓ Tested
CArrays

Sum array values

Iterate over a fixed C array using a size-derived element count.

C✓ Tested
C#Data & dates

Sum integer values

Sum a C# sequence using LINQ.

C#✓ Tested
JavaNumbers & dates

Sum integer values

Reduce a Java integer stream to its sum.

Java✓ Tested
CSmall algorithms & bit operations

Sum the decimal digits of an unsigned integer

C: Repeated division and remainder extract digits without converting to text.

C✓ Tested
TypeScriptCollections & records

Sum typed values with reduce

Accumulate numeric array elements.

reduce✓ Tested
C++Numbers & algorithms

Sum vector values

Use std::accumulate with a wide initial value.

C++✓ Tested
CDynamic memory & ownership

Swap owned buffers by swapping their pointers

C: Pointer swaps avoid copying the underlying data.

C✓ Tested
CNumbers & memory

Swap two integers

Use a temporary value to swap C integers without arithmetic overflow.

C✓ Tested
AngularSignals & state

Synchronize a document property with an effect

Synchronize a document property with an effect with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustStrings & Unicode

Take Unicode characters without byte slicing

Take Unicode characters without byte slicing in a complete Rust program using the standard library.

Rust✓ Tested
GitBranches & recovery

Temporarily store tracked-file edits

Restore a clean working tree and then reapply your saved changes.

stash✓ Tested