FIND YOUR NEXT FEW LINES

Results for “UTF-8”

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

401 snippets foundClear filters
C#File operations & paths

Delete a known scratch file

C#: File.Delete ignores a missing file but still throws for other I/O failures.

C#✓ Tested
PostgresGetting Started

Delete one row from a practice table

Postgres: Restrict DELETE with a primary-key condition and verify the remaining row count.

Postgres✓ Tested
PostgresBulk changes & set operations

Delete rows selected by a related table

Postgres: A correlated EXISTS limits the delete to explicitly listed records.

Postgres✓ Tested
C#JSON & binary formats

Deserialize a JSON object into a dictionary

C#: Specify the value type expected from a known JSON shape.

C#✓ Tested
C#Dates & precise numbers

Detect integer overflow with checked

C#: A checked arithmetic block throws instead of silently wrapping an integer result.

C#✓ Tested
Arduino / CText & bounded buffers

Detect truncated formatted output

Arduino / C: snprintf returns the length it would have written, excluding the null terminator.

Arduino / C✓ Tested
Arduino / CArrays & embedded state

Dispatch a command through function pointers

Arduino / C: A small function table can map validated command indices to actions.

Arduino / C✓ Tested
Arduino / CSerial protocols

Dispatch a one-character serial command

Arduino / C: A switch provides explicit handling for accepted and unknown commands.

Arduino / C✓ Tested
PostgresGetting Started

Display a fallback for missing data

Postgres: Return a supplied label when a column contains NULL.

Postgres✓ Tested
PostgresReporting & grouped calculations

Distinguish row count from non-null value count

Postgres: COUNT(*) includes every row while COUNT(column) skips NULL values.

Postgres✓ Tested
PostgresWindow analytics

Divide an ordered result into numbered buckets

Postgres: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.

Postgres✓ Tested
C#Getting Started

Divide using a fractional number

C#: Use a floating-point operand to preserve the fractional part of a division.

C#✓ Tested