FIND YOUR NEXT FEW LINES

Results for “range”

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

78 snippets foundClear filters
Arduino / CGetting Started

Keep a value inside an allowed range

Arduino / C: Keep a value inside an allowed range on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
HTMLInput constraints

Limit a numeric input to an inclusive range

HTML: Number inputs expose range validation separately from the entered text.

HTML✓ Tested
RustGetting Started

Loop over an inclusive range

Loop over an inclusive range in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CData & storage

Map an input range to an output range

Scale an integer reading to a different interval.

map✓ Tested
Linux CommandsTransforming text

Print a selected range of lines

Linux Commands: Use sed -n with a line address to suppress other output.

Linux Commands✓ Tested
RustMaps & sets

Query an ordered map’s key range

Query an ordered map’s key range in a complete Rust program using the standard library.

Rust✓ Tested
GoConcurrency & cancellation

Range over a closed channel

Range over a closed channel using a complete Go program with explicit sample inputs.

Go✓ Tested
GoErrors & validation

Reject an integer outside a byte’s range

Reject an integer outside a byte’s range using a complete Go program with explicit sample inputs.

Go✓ Tested
GoSlices & collections

Remove a slice range

Remove a slice range using a complete Go program with explicit sample inputs.

Go✓ Tested
RustVectors & slices

Remove and collect a vector range

Remove and collect a vector range in a complete Rust program using the standard library.

Rust✓ Tested
jQueryTraversal & selection

Select a range from a collection

jQuery: slice includes the start index and excludes the end index.

jQuery✓ Tested
Bash ScriptsArray operations

Select a range of array elements

Bash Scripts: Quote a sliced at-sign expansion to keep each selected element separate.

Bash Scripts✓ Tested