Results for “min”
Small, practical examples. Search by task or narrow things down below.
Check for an installed command
Bash Scripts: command -v checks command resolution without assuming a specific installation path.
Bash Scripts✓ Tested
Check native form validity before proceeding
jQuery: Use the native checkValidity API from the selected form.
jQuery✓ Tested
Check whether any selected element matches
jQuery: is returns a Boolean without changing the selection.
jQuery✓ Tested
Clamp a number between inclusive bounds
JavaScript: Combine Math.min and Math.max when lower is no greater than upper.
JavaScript✓ Tested
Clamp a number between inclusive bounds
TypeScript: Combine Math.min and Math.max when lower is no greater than upper.
TypeScript✓ Tested
Clamp a numeric value between bounds
Python: Combine min and max for a closed interval when lower is no greater than upper.
Python✓ Tested
Clamp an integer to inclusive bounds
C: Explicit comparisons avoid relying on nonstandard min or max macros.
C✓ Tested
Clear a container’s contents
jQuery: Learn how to clear a container’s contents in a complete browser example.
jQuery✓ Tested
Clear an element
Remove child content while keeping the jQuery-selected container.
jQuery✓ Tested
Clone markup without sharing its identity
jQuery: clone creates a separate node; change duplicated IDs before inserting.
jQuery✓ Tested
Collapse a panel after an animation
jQuery: slideUp hides the panel when the transition completes.
jQuery✓ Tested
Collect a serial line in a fixed buffer
Read a short command without dynamic String allocation.
serial line✓ Tested