FIND YOUR NEXT FEW LINES

Results for “field”

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

92 snippets foundClear filters
RustParsing & byte data

Parse a delimited integer record

Parse a delimited integer record in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CText & bounded buffers

Split a writable comma-delimited buffer

Arduino / C: strtok modifies its buffer and returns successive tokens.

Arduino / C✓ Tested
GoStrings & text

Split on repeated whitespace

Split on repeated whitespace using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularTemplate-driven forms

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
CDynamic memory & ownership

Allocate and initialize a structure

C: Use a compound literal assignment to initialize all ordinary structure fields.

C✓ Tested
CSmall algorithms & bit operations

Compute a simple XOR checksum

C: XOR all payload bytes into one byte to demonstrate a basic error-detection field.

C✓ Tested
TypeScriptTypes & functions

Describe an object with an interface

Require named fields on a reusable object shape.

interface✓ Tested
CBinary formats & structured parsing

Format a known timestamp in UTC

C: gmtime converts to UTC calendar fields and strftime formats them.

C✓ Tested
PostgresDates & series

Format a timestamp with to_char

Produce a fixed numeric date string.

to_char✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
HTMLForms

Group mutually exclusive choices

Use the same name for HTML radio buttons and a fieldset legend.

HTML✓ Tested
Arduino / CArrays & embedded state

Group related readings in a struct

Arduino / C: A struct keeps a sample’s fields together without dynamic allocation.

Arduino / C✓ Tested