FIND YOUR NEXT FEW LINES

Results for “min”

Small, practical examples. Search by task or narrow things down below.

264 snippets foundClear filters
Arduino / CEEPROM & program memory

Store a bounded null-terminated text setting

Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.

Arduino / C✓ Tested
CSSFlexbox alignment

Allow a long flex child to shrink inside its container

CSS: Min-width zero removes the default content-size floor so local overflow handling can take effect.

CSS✓ Tested
CSSResponsive conditions & sizing

Choose the smaller of a fixed and viewport-relative size

CSS: Min selects whichever supplied length is smaller at the current viewport.

CSS✓ Tested
Arduino / CGetting Started

Choose the smaller of two values

Arduino / C: Choose the smaller of two values on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
GoTesting & reusable helpers

Clamp a value to an allowed interval

Clamp a value to an allowed interval using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsTransforming text

Collapse repeated spaces

Linux Commands: Use tr -s when repeated occurrences of a character should become one.

Linux Commands✓ Tested
Linux CommandsTransforming text

Convert tab stops to spaces

Linux Commands: Use expand with a fixed tab width when preparing plain-text alignment.

Linux Commands✓ Tested
Linux CommandsTransforming text

Extract a delimited text column

Linux Commands: Use cut for simple unquoted delimiter-separated text.

Linux Commands✓ Tested
Arduino / CArrays & embedded state

Find a sample range in one pass

Arduino / C: Initialize extrema from the first element of a nonempty array.

Arduino / C✓ Tested
C++Sequence algorithms

Find both extremes in one algorithm call

C++: Check for a nonempty input before dereferencing the returned iterators.

C++✓ Tested
CArray transformations

Find the smallest value in a nonempty array

C: Initialize from the first element instead of assuming a numeric sentinel.

C✓ Tested
CBinary formats & structured parsing

Format a nonnegative integer amount as whole and fractional units

C: Keep the calculation in integer minor units and use two digits for the remainder.

C✓ Tested