FIND YOUR NEXT FEW LINES

Results for “ring”

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

465 snippets foundClear filters
Arduino / CGetting Started

Represent an enabled state

Arduino / C: Represent an enabled state on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
HTMLForm behavior

Restore controls to their initial form defaults

HTML: A reset button restores default values rather than clearing every control.

HTML✓ Tested
JavaQueues & collection operations

Retrieve the smallest queued value first

Java: PriorityQueue poll removes the smallest value under the natural ordering.

Java✓ Tested
Bash ScriptsFunctions & arguments

Return text from a shell function

Capture a function’s output with command substitution.

function✓ Tested
Arduino / CGetting Started

Reuse an LED action with a function

Arduino / C: Put a short LED sequence in a named function and call it twice.

Arduino / C✓ Tested
PythonNumbers & calculations

Round decimal amounts explicitly

Python: Build Decimal values from strings and choose a rounding rule explicitly.

Python✓ Tested
Arduino / CGetting Started

Run a first sketch and read serial output

Arduino / C: Run a first sketch and read serial output on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
CArray transformations

Search a sorted array with bsearch

C: The search uses the same ordering comparator as the sorted input.

C✓ Tested
C++Numbers & algorithms

Search a sorted vector

Use binary_search after ensuring C++ values are sorted.

C++✓ Tested
Linux CommandsText processing

Search for text in a file

Find matching lines with their line numbers, ignoring letter case and treating the pattern as literal text.

grep✓ Tested
Arduino / CSerial protocols

Search the stream for a message marker

Arduino / C: find consumes input through a matching marker or until timeout.

Arduino / C✓ Tested