Results for “then”
Small, practical examples. Search by task or narrow things down below.
Distinguish an own property from an inherited one
TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.
TypeScript✓ Tested
Distinguish UTF-8 bytes from characters
Distinguish UTF-8 bytes from characters in a complete Rust program using the standard library.
Rust✓ Tested
Divide using a fractional number
TypeScript: Use a floating-point operand to preserve the fractional part of a division.
TypeScript✓ Tested
Divide using a fractional number
C++: Use a floating-point operand to preserve the fractional part of a division.
C++✓ Tested
Divide using a fractional number
C: Use a floating-point operand to preserve the fractional part of a division.
C✓ Tested
Drop the fractional part toward zero
TypeScript: Math.trunc differs from floor for negative inputs.
TypeScript✓ Tested
Emit a typed object from a child
Emit a typed object from a child with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Enable saving only after a field changes
Enable saving only after a field changes with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Encode a byte buffer as hexadecimal
C: Format each byte as an unsigned two-digit hexadecimal value.
C✓ Tested
Encode an integer as big-endian bytes
Encode an integer as big-endian bytes in a complete Rust program using the standard library.
Rust✓ Tested
Exclude files from the build context
Docker / Compose: A dockerignore file prevents selected local files from being copied.
Docker / Compose✓ Tested
Exercise a function with a table of inputs
Exercise a function with a table of inputs in a complete Rust program using the standard library.
Rust✓ Tested