Results for “library”
Small, practical examples. Search by task or narrow things down below.
Find the mean and median of readings
Python: Use statistics helpers to distinguish an arithmetic mean from a middle value.
Python✓ Tested
Find the next chosen weekday
Java: TemporalAdjusters.next excludes the starting day even if it already has that weekday.
Java✓ Tested
Find the number of days in a month
Python: Use calendar.monthrange to account for leap years.
Python✓ Tested
Find the weekday for a date
Find the weekday for a date using a complete Go program with explicit sample inputs.
Go✓ Tested
Find values missing from another collection
Python: Use a set difference to identify requested IDs absent from the available IDs.
Python✓ Tested
Find values present in exactly one set
Python: Use symmetric difference when either side can contain unmatched values.
Python✓ Tested
Find values shared by two collections
Python: Use set intersection and sort the result for deterministic display.
Python✓ Tested
Find what remains after division
Python: Use the remainder operator to count items left after forming complete groups.
Python✓ Tested
Find what remains after division
Java: Use the remainder operator to count items left after forming complete groups.
Java✓ Tested
Finish all queued animations immediately
jQuery: finish jumps current and queued animations to their final values.
jQuery✓ Tested
Flatten nested collections
Java: Use flatMap to concatenate nested Java lists into one stream.
Java✓ Tested
Flatten nested collections
Flatten nested collections in a complete Rust program using the standard library.
Rust✓ Tested