FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
jQueryDeferred work & queues

Transform a deferred value with then

jQuery: then returns a new promise with the callback’s result.

jQuery✓ Tested
RustErrors & optional values

Chain operations that may return None

Chain operations that may return None in a complete Rust program using the standard library.

Rust✓ Tested
RustFunctions & data types

Accept different types with a generic function

Accept different types with a generic function in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Accumulate a result with fold

Accumulate a result with fold in a complete Rust program using the standard library.

Rust✓ Tested
C++Containers & compound values

Add and remove values at both ends

C++: Deque supports efficient end operations without requiring contiguous storage.

C++✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
TypeScriptUTC date operations

Add calendar days in UTC

TypeScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.

TypeScript✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
JavaNumbers & dates

Add days to a date

Parse an ISO date and add calendar days using Java LocalDate.

Java✓ Tested
CNumbers & memory

Allocate a zeroed array

Check calloc, use the allocation, and release it in C.

C✓ Tested
CDynamic memory & ownership

Allocate an independent copy of a C string

C: Include one extra byte for the terminating null character.

C✓ Tested
CDynamic memory & ownership

Allocate and free a typed array

C: Use sizeof on the pointed-to type and check allocation success before writing.

C✓ Tested