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#Dates & precise numbers

Find the length of a calendar month

C#: DaysInMonth applies the Gregorian leap-year rules.

C#✓ Tested
PostgresSubqueries & ranked selection

Find the second-highest distinct value

Postgres: Select the maximum below the overall maximum to skip ties at the top.

Postgres✓ Tested
C#Collections & data structures

Find values common to two collections

C#: Intersect returns distinct values shared by the inputs.

C#✓ Tested
C#Collections & data structures

Find values missing from another collection

C#: Except removes duplicates as it calculates the set difference.

C#✓ Tested
C#Getting Started

Find what remains after division

C#: Use the remainder operator to count items left after forming complete groups.

C#✓ Tested
C#LINQ transformations

Flatten nested collections with SelectMany

C#: Concatenate the items from several sequences into one sequence.

C#✓ Tested
C#Data & dates

Format a decimal amount

Use invariant culture to print a C# decimal with two places.

C#✓ Tested
PostgresDates & series

Format a timestamp with to_char

Produce a fixed numeric date string.

to_char✓ Tested
Arduino / CText & bounded buffers

Format several integers in a fixed buffer

Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.

Arduino / C✓ Tested
PostgresDates & series

Generate a sequence of numbers

Create rows without a stored table.

generate_series✓ Tested
Arduino / CDigital signals & interrupts

Generate and measure a short output pulse

Arduino / C: delayMicroseconds can create a short blocking pulse on an output pin.

Arduino / C✓ Tested
PostgresRelationships & missing data

Generate every combination of two sets

Postgres: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

Postgres✓ Tested