Results for “Serial.read”
Small, practical examples. Search by task or narrow things down below.
Check native form validity before proceeding
jQuery: Use the native checkValidity API from the selected form.
jQuery✓ Tested
Collect repeated form field names
jQuery: serializeArray preserves multiple values as name-value records.
jQuery✓ Tested
Confirm the root filesystem rejects writes
Docker / Compose: A read-only root prevents creating files outside writable mounts.
Docker / Compose✓ Tested
Control tab width in preformatted content
CSS: Tab-size defines the interval of tab stops in a preformatted block.
CSS✓ Tested
Convert received ASCII letters to uppercase
Arduino / C: ctype functions should receive an unsigned character value.
Arduino / C✓ Tested
Declare a fixed configuration value
Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.
Bash Scripts✓ Tested
Decode a 16-bit big-endian integer
C: Promote bytes to an unsigned integer type before combining shifted values.
C✓ Tested
Delete a cached data entry
jQuery: removeData removes the jQuery cache value for the selected key.
jQuery✓ Tested
Display a label in uppercase without changing its text
CSS: Text-transform changes visual casing while preserving the DOM’s source text.
CSS✓ Tested
Distinguish an empty input line from end of input
Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.
Bash Scripts✓ Tested
Distinguish end-of-input from other errors
Distinguish end-of-input from other errors using a complete Go program with explicit sample inputs.
Go✓ Tested
Explain a calculation with a comment
Python: Keep the code executable while documenting why a fixed input is used.
Python✓ Tested