FIND YOUR NEXT FEW LINES

Results for “UTF-8”

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

401 snippets foundClear filters
Arduino / CBinary values & packets

Calculate a CRC-8 over a byte sequence

Arduino / C: This implementation uses polynomial 0x07, initial zero, and no reflection.

Arduino / C✓ Tested
PostgresGetting Started

Accept either of two conditions

Postgres: Use OR to keep matching names or out-of-stock rows.

Postgres✓ Tested
C#Collections & data structures

Add a dictionary entry only if absent

C#: TryAdd reports a duplicate key without replacing its existing value.

C#✓ Tested
PostgresDates & series

Add an interval to a date

Perform calendar arithmetic with an interval literal.

INTERVAL✓ Tested
PostgresSchema design & transactions

Add an optional field to an existing table

Postgres: A nullable column permits existing rows to remain valid while data is filled later.

Postgres✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
PostgresGetting Started

Add values across several rows

Postgres: Use SUM to calculate a total quantity.

Postgres✓ Tested
Arduino / CArrays & embedded state

Advance an index around a fixed collection

Arduino / C: Modulo wraps a bounded nonnegative index to zero.

Arduino / C✓ Tested
PostgresConstraints & defaults

Apply a default when an insert omits a column

Postgres: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.

Postgres✓ Tested
Arduino / CSensor calculations

Apply a linear sensor calibration

Arduino / C: Convert a raw reading using an offset and scale measured for the sensor.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Assemble a big-endian 16-bit value

Arduino / C: Cast to an unsigned 16-bit type before shifting the high byte.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Assign a bit from a Boolean state

Arduino / C: bitWrite accepts a bit position and a zero or nonzero value.

Arduino / C✓ Tested