Results for “library”
Small, practical examples. Search by task or narrow things down below.
Respond to a button click
jQuery: Learn how to respond to a button click in a complete browser example.
jQuery✓ Tested
Respond to the Enter key
jQuery: Use the event key rather than deprecated numeric key codes.
jQuery✓ Tested
Respond when a select value changes
jQuery: Learn how to respond when a select value changes in a complete browser example.
jQuery✓ Tested
Respond while a user types
jQuery: Learn how to respond while a user types in a complete browser example.
jQuery✓ Tested
Restore a form’s original default values
jQuery: Call the native reset method through the underlying form element.
jQuery✓ Tested
Retrieve the smallest queued value first
Java: PriorityQueue poll removes the smallest value under the natural ordering.
Java✓ Tested
Return a descriptive validation error
Return a descriptive validation error using a complete Go program with explicit sample inputs.
Go✓ Tested
Return a small immutable named record
Python: Use NamedTuple when callers need both tuple behavior and named fields.
Python✓ Tested
Return a value from a loop
Return a value from a loop in a complete Rust program using the standard library.
Rust✓ Tested
Return a value from a switch expression
Java: Use an exhaustive switch expression with a fallback for other input values.
Java✓ Tested
Return to the previous collection in a chain
jQuery: end restores the selection before the last traversal operation.
jQuery✓ Tested
Return two values from a function
Return two values from a function using a complete Go program with explicit sample inputs.
Go✓ Tested