Results for “out”
Small, practical examples. Search by task or narrow things down below.
Take Unicode characters without byte slicing
Take Unicode characters without byte slicing in a complete Rust program using the standard library.
Rust✓ Tested
Test an HTTP handler without a server
Test an HTTP handler without a server using a complete Go program with explicit sample inputs.
Go✓ Tested
Toggle an output using an explicit software state
Arduino / C: Keep the intended output state in a Boolean variable.
Arduino / C✓ Tested
Try a channel receive without blocking
Try a channel receive without blocking using a complete Go program with explicit sample inputs.
Go✓ Tested
Type a function’s inputs and output
Catch mismatched arguments during compilation.
function✓ Tested
Unstage a file without losing edits
Return a staged change to the working tree.
restore✓ Tested
Update an object without mutating state
Update an object without mutating state with a small React component and explicit browser behavior.
React✓ Tested
Use a last-in first-out stack
C#: Stack is useful for reversible traversal and other nested operations.
C#✓ Tested
Use a last-in first-out stack
C++: Read top before pop because pop does not return the removed value.
C++✓ Tested
Validate a finite numeric value without coercion
JavaScript: Number.isFinite rejects numeric strings as well as NaN and infinity.
JavaScript✓ Tested
Validate a finite numeric value without coercion
TypeScript: Number.isFinite rejects numeric strings as well as NaN and infinity.
TypeScript✓ Tested
Wait for a background job before reading its output
Bash Scripts: Save the job PID and wait explicitly before consuming files it produces.
Bash Scripts✓ Tested