Results for “k”
Small, practical examples. Search by task or narrow things down below.
Compare bounded floating-point results with a tolerance
TypeScript: Use an absolute error threshold for values known to be near one.
TypeScript✓ Tested
Compare elapsed time across timer rollover
Use unsigned subtraction when a millisecond counter wraps.
rollover✓ Tested
Compare floats within a tolerance
Compare floats within a tolerance using a complete Go program with explicit sample inputs.
Go✓ Tested
Compare map contents
Compare map contents using a complete Go program with explicit sample inputs.
Go✓ Tested
Compare small floating-point results with a tolerance
C: Use an absolute difference threshold for this known bounded magnitude.
C✓ Tested
Compare text ignoring case
Compare text ignoring case using a complete Go program with explicit sample inputs.
Go✓ Tested
Compare two byte buffers
Compare two byte buffers using a complete Go program with explicit sample inputs.
Go✓ Tested
Compare two generated sorted streams
Bash Scripts: Process substitution lets a command consume another command’s output as a file-like input.
Bash Scripts✓ Tested
Compare two text values
Bash Scripts: Compare two text values with a small standalone Bash program.
Bash Scripts✓ Tested
Compile and run your first Rust program
Compile and run your first Rust program in a complete Rust program using the standard library.
Rust✓ Tested
Compose a component with named content slots
Compose a component with named content slots with a small React component and explicit browser behavior.
React✓ Tested
Compose content through children
Compose content through children with a small React component and explicit browser behavior.
React✓ Tested