FIND YOUR NEXT FEW LINES

Results for “UTF-8”

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

401 snippets foundClear filters
PostgresSubqueries & ranked selection

Attach an overall count to every row

Postgres: An uncorrelated scalar subquery supplies the same aggregate to each output row.

Postgres✓ Tested
Arduino / CData & storage

Average a fixed set of readings

Accumulate sample values without overflowing a 16-bit total.

array✓ Tested
C#Asynchronous work & URI handling

Await an asynchronous method result

C#: Use Task<T> for an async operation with a typed result.

C#✓ Tested
C#Asynchronous work & URI handling

Await multiple tasks while preserving result order

C#: Task.WhenAll returns results in the same order as the supplied tasks.

C#✓ Tested
Arduino / CDigital input & output

Blink the built-in LED three times

Alternate the built-in LED with a short blocking delay.

blink✓ Tested
Arduino / CTiming & control

Blink without blocking the loop

Use elapsed millis time instead of delay for a repeating action.

millis✓ Tested
PostgresConstraints & defaults

Block deletion of a referenced parent

Postgres: The default foreign-key action prevents deletion while a child still refers to the parent.

Postgres✓ Tested
Arduino / CGetting Started

Branch on a threshold

Arduino / C: Branch on a threshold on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
PostgresSubqueries & ranked selection

Build a query from several named stages

Postgres: Separate row selection from aggregation using two common table expressions.

Postgres✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested
PostgresWindow analytics

Calculate a cumulative integer percentage

Postgres: Divide a running window sum by the complete total using a unique ordering key.

Postgres✓ Tested
Arduino / CGetting Started

Calculate a fixed array’s element count

Arduino / C: Calculate a fixed array’s element count on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested