Results for “library”
Small, practical examples. Search by task or narrow things down below.
Define an immutable data record
Java: A local record gives a small Java data carrier named accessors and value semantics.
Java✓ Tested
Define behavior with a trait
Define behavior with a trait in a complete Rust program using the standard library.
Rust✓ Tested
Define related integer constants
Define related integer constants using a complete Go program with explicit sample inputs.
Go✓ Tested
Delete a cached data entry
jQuery: removeData removes the jQuery cache value for the selected key.
jQuery✓ Tested
Delete a known temporary file if present
Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.
Java✓ Tested
Delete a map entry
Delete a map entry using a complete Go program with explicit sample inputs.
Go✓ Tested
Derive comparison and debugging behavior
Derive comparison and debugging behavior in a complete Rust program using the standard library.
Rust✓ Tested
Destructure a tuple
Destructure a tuple in a complete Rust program using the standard library.
Rust✓ Tested
Detect integer addition overflow
Java: Math.addExact throws rather than silently wrapping on overflow.
Java✓ Tested
Detect invalid UTF-8 data
Detect invalid UTF-8 data in a complete Rust program using the standard library.
Rust✓ Tested
Determine whether a year is a leap year
Python: Use calendar.isleap rather than a simplified divisibility-by-four check.
Python✓ Tested
Disable animations for a reduced-motion mode
jQuery: The global fx.off switch causes effects to finish immediately.
jQuery✓ Tested