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 / CDigital input & output

Control an LED from a button

Translate an active-low button input into an LED output.

button✓ Tested
Arduino / CSensor calculations

Convert a supplied ADC count to volts

Arduino / C: Scale a ten-bit ADC count using an explicit reference voltage.

Arduino / C✓ Tested
C#Dates & precise numbers

Convert a timestamp to a different fixed offset

C#: ToOffset changes the displayed local time while retaining the same instant.

C#✓ Tested
Arduino / CSensor calculations

Convert Celsius to Fahrenheit

Arduino / C: Use floating-point constants to avoid integer division.

Arduino / C✓ Tested
C#Getting Started

Convert known numeric text to an integer

C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C#✓ Tested
Arduino / CSerial protocols

Convert received ASCII letters to uppercase

Arduino / C: ctype functions should receive an unsigned character value.

Arduino / C✓ Tested
C#Dates & precise numbers

Convert Unix seconds to an offset-aware timestamp

C#: DateTimeOffset preserves the UTC offset explicitly.

C#✓ Tested
C#File operations & paths

Copy a file without overwriting

C#: File.Copy defaults to refusing a destination that already exists.

C#✓ Tested
Arduino / CEEPROM & program memory

Copy a flash string into a bounded RAM buffer

Arduino / C: strncpy_P reads from program memory into ordinary RAM.

Arduino / C✓ Tested
Arduino / CDigital signals & interrupts

Copy a multibyte interrupt-owned counter atomically

Arduino / C: ATOMIC_RESTORESTATE restores the interrupt state after reading a shared value.

Arduino / C✓ Tested
Arduino / CText & bounded buffers

Copy a string with a guaranteed terminator

Arduino / C: Reserve one character for the terminator when copying a bounded string.

Arduino / C✓ Tested
PostgresBulk changes & set operations

Copy selected rows into another table

Postgres: INSERT SELECT performs a set-based copy with an explicit destination column list.

Postgres✓ Tested