Results for “field”
Small, practical examples. Search by task or narrow things down below.
Parse a delimited integer record
Parse a delimited integer record in a complete Rust program using the standard library.
Rust✓ Tested
Split a writable comma-delimited buffer
Arduino / C: strtok modifies its buffer and returns successive tokens.
Arduino / C✓ Tested
Split on repeated whitespace
Split on repeated whitespace using a complete Go program with explicit sample inputs.
Go✓ Tested
Validate email syntax with Angular’s email validator
Validate email syntax with Angular’s email validator with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Allocate and initialize a structure
C: Use a compound literal assignment to initialize all ordinary structure fields.
C✓ Tested
Compute a simple XOR checksum
C: XOR all payload bytes into one byte to demonstrate a basic error-detection field.
C✓ Tested
Describe an object with an interface
Require named fields on a reusable object shape.
interface✓ Tested
Format a known timestamp in UTC
C: gmtime converts to UTC calendar fields and strftime formats them.
C✓ Tested
Format a timestamp with to_char
Produce a fixed numeric date string.
to_char✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Group mutually exclusive choices
Use the same name for HTML radio buttons and a fieldset legend.
HTML✓ Tested
Group related readings in a struct
Arduino / C: A struct keeps a sample’s fields together without dynamic allocation.
Arduino / C✓ Tested