FIND YOUR NEXT FEW LINES

Results for “fields”

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

46 snippets foundClear filters
CDynamic memory & ownership

Allocate and initialize a structure

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

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
SQLReporting & grouped calculations

Group by more than one field

SQL: Each distinct combination of grouping fields produces its own row.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Group by more than one field

SQL Server: Each distinct combination of grouping fields produces its own row.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Group by more than one field

Postgres: Each distinct combination of grouping fields produces its own row.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Group by more than one field

SQLite: Each distinct combination of grouping fields produces its own row.

SQLite✓ 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
jQueryHTTP requests

Post URL-encoded form data

jQuery: post sends a data object as form-encoded fields by default.

jQuery✓ Tested