Results for “code”
Small, practical examples. Search by task or narrow things down below.
Store and inspect a fixed set of bits
C++: bitset offers named operations and a readable binary representation.
C++✓ Tested
Store and iterate over an array
Bash Scripts: Store and iterate over an array with a small standalone Bash program.
Bash Scripts✓ Tested
Store and retrieve a multibyte integer
Arduino / C: put and get copy the bytes of a typed value.
Arduino / C✓ Tested
Store data in an enum variant
Store data in an enum variant in a complete Rust program using the standard library.
Rust✓ Tested
Store reactive state in a signal
Store reactive state in a signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Store samples in a fixed-size ring buffer
Arduino / C: The write position wraps while the storage size stays constant.
Arduino / C✓ Tested
Store several readings in an array
Arduino / C: Store several readings in an array on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Store text in a variable
Bash Scripts: Store text in a variable with a small standalone Bash program.
Bash Scripts✓ Tested
Structure a document with headings
Use a single page heading and a second-level section heading in HTML.
HTML✓ Tested
Style a card based on a selected descendant
CSS: Has matches the parent when its relative selector finds a checked control inside it.
CSS✓ Tested
Style a control that fails native validation
CSS: Invalid reflects the input’s current constraint-validation result.
CSS✓ Tested
Style content associated with a checked option
CSS: The adjacent-sibling selector connects a checked control with its following label text.
CSS✓ Tested