Results for “library”
Small, practical examples. Search by task or narrow things down below.
Calculate a subtotal
Calculate a subtotal using a complete Go program with explicit sample inputs.
Go✓ Tested
Calculate an order subtotal
Calculate an order subtotal in a complete Rust program using the standard library.
Rust✓ Tested
Calculate beyond the long integer range
Java: Use BigInteger when a fixed-width primitive type would overflow.
Java✓ Tested
Calculate cumulative totals
Python: Use accumulate to retain the running sum after each input.
Python✓ Tested
Calculate several numeric stream statistics
Java: Use summaryStatistics to calculate count, sum, minimum, maximum, and average in one pass.
Java✓ Tested
Calculate the number of required pages
Python: Use integer arithmetic to round a nonnegative count up to a positive page size.
Python✓ Tested
Calculate with exact rational values
Python: Use Fraction for exact ratios rather than binary floating-point approximations.
Python✓ Tested
Call a function with a return value
Call a function with a return value using a complete Go program with explicit sample inputs.
Go✓ Tested
Call a typed function
Call a typed function in a complete Rust program using the standard library.
Rust✓ Tested
Cancel a pending request
jQuery: abort rejects the jqXHR with the abort status.
jQuery✓ Tested
Capture a successful child-process result
Python: Run an argument list without a shell and check the return code.
Python✓ Tested
Capture a surrounding value in a closure
Capture a surrounding value in a closure in a complete Rust program using the standard library.
Rust✓ Tested