Results for “Serial.read”
Small, practical examples. Search by task or narrow things down below.
Move owned data into a worker
Move owned data into a worker in a complete Rust program using the standard library.
Rust✓ Tested
Name an intermediate query with a CTE
Make a filtered result reusable within one statement.
CTE✓ Tested
Pack and unpack a network-order integer
Python: Use an explicit byte order so the binary format is independent of the host architecture.
Python✓ Tested
Preserve line breaks while collapsing repeated spaces
CSS: Pre-line retains newlines but does not preserve all whitespace like pre-wrap does.
CSS✓ Tested
Print a floating-point value with fixed precision
Choose the number of decimal places in serial output.
float✓ Tested
Print integers in different bases
Inspect a byte in decimal, hexadecimal, and binary.
Serial✓ Tested
Produce compact deterministic JSON
Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.
Python✓ Tested
Protect a Compose service’s root filesystem
Docker / Compose: read_only rejects writes to the image filesystem.
Docker / Compose✓ Tested
Protect shared mutable state with a mutex
Protect shared mutable state with a mutex in a complete Rust program using the standard library.
Rust✓ Tested
Remove an optional attribute entirely
jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.
jQuery✓ Tested
Remove duplicate values with a Set
Keep the first occurrence order while deduplicating.
Set✓ Tested
Represent a record with a dataclass
Python: Generate initialization and convert a typed record to a dictionary.
Python✓ Tested