Results for “library”
Small, practical examples. Search by task or narrow things down below.
Expose observation without exposing resolution
jQuery: promise returns an interface without resolve or reject methods.
jQuery✓ Tested
Express a duration in milliseconds
Express a duration in milliseconds in a complete Rust program using the standard library.
Rust✓ Tested
Extract a route path variable
Extract a route path variable using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract digit sequences
Extract digit sequences using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract filename components
Python: Use pathlib properties to separate a directory, filename stem, and suffix.
Python✓ Tested
Extract named regex fields
Python: Use named capture groups to parse a known date-shaped identifier.
Python✓ Tested
Extract numbers from text
Find all runs of ASCII digits in a string and convert the matches to integers.
regex✓ Tested
Extract successive regex matches
Java: Use a Matcher loop to find all unsigned integer tokens in Java text.
Java✓ Tested
Extract text between known positions
Java: Java substring uses a start-inclusive, end-exclusive range of UTF-16 indices.
Java✓ Tested
Fade a hidden element into view
jQuery: fadeIn shows a hidden element and calls its completion handler.
jQuery✓ Tested
Fade an element out and hide it
jQuery: fadeOut sets display none after the opacity animation finishes.
jQuery✓ Tested
Fetch a plain-text resource
jQuery: An explicit text data type keeps the response as a string.
jQuery✓ Tested