FIND YOUR NEXT FEW LINES

Results for “Serial.read”

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

591 snippets foundClear filters
CSSFlexbox alignment

Change visual order without changing DOM order

CSS: Order changes flex painting positions while keyboard and reading order still follow the document.

CSS✓ Tested
C++Text validation & parsing

Check a literal prefix in C++17

C++: Use string compare because starts_with was introduced after C++17.

C++✓ Tested
C++Text validation & parsing

Check a literal suffix in C++17

C++: Check lengths before subtracting to avoid an unsigned underflow.

C++✓ Tested
C++Numeric parsing & calculations

Check an upper integer bound before adding

C++: For these nonnegative values, compare against the maximum minus the addend first.

C++✓ Tested
Linux CommandsSystem information

Check available disk space

Show total, used, and available filesystem space for the current directory in human-readable units.

disk✓ Tested
Arduino / CGetting Started

Check both ends of a range

Arduino / C: Check both ends of a range on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Check EEPROM capacity before a write

Arduino / C: length reports the available address count for this board.

Arduino / C✓ Tested
Linux CommandsSystem information

Check memory usage

Show memory and swap totals in human-readable units. The available column estimates memory usable by new applications.

memory✓ Tested
Bash ScriptsFiles & reliability

Check that a file is present and nonempty

Test file content availability before reading it.

file check✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check whether a variable exists under nounset

Bash Scripts: The plus expansion distinguishes an unset variable without reading its missing value.

Bash Scripts✓ Tested
C++Getting Started

Choose between two branches

C++: Use if and else to handle an available or empty stock count.

C++✓ 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