Results for “standard”
Small, practical examples. Search by task or narrow things down below.
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 Unicode text without case
Python: Casefold handles more Unicode case mappings than lower for caseless comparison.
Python✓ 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
Compress a file and keep the original
Create a gzip-compressed copy of a file while leaving the uncompressed original in place.
gzip✓ Tested
Construct a named-field struct
Construct a named-field struct in a complete Rust program using the standard library.
Rust✓ Tested
Construct a struct with default values
Construct a struct with default values in a complete Rust program using the standard library.
Rust✓ Tested
Construct an instant relative to the Unix epoch
Construct an instant relative to the Unix epoch in a complete Rust program using the standard library.
Rust✓ Tested
Convert a duration to hours and minutes
Python: Use divmod to split nonnegative whole seconds into display components.
Python✓ Tested
Convert a timestamp to a different fixed offset
C#: ToOffset changes the displayed local time while retaining the same instant.
C#✓ Tested
Convert a Unix timestamp to aware UTC
Python: Supply timezone.utc so the result does not depend on the machine time zone.
Python✓ Tested
Convert an aware datetime to another offset
Python: Use astimezone for conversion; replacing tzinfo alone does not convert an instant.
Python✓ Tested