FIND YOUR NEXT FEW LINES

Results for “memo”

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

40 snippets foundClear filters
Arduino / CEEPROM & program memory

Read and total a flash lookup table

Arduino / C: Array size can be computed at compile time even for a flash-resident table.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Reject an unsupported settings version

Arduino / C: A version byte lets firmware fall back when stored settings use another format.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Store a bounded null-terminated text setting

Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Store a compact configuration record

Arduino / C: Save a struct and retrieve it with the same field layout.

Arduino / C✓ Tested
CDynamic memory & ownership

Store a variable-length payload after a structure header

C: A flexible array member lets one allocation hold metadata and trailing bytes.

C✓ Tested
Arduino / CEEPROM & program memory

Store and retrieve a multibyte integer

Arduino / C: put and get copy the bytes of a typed value.

Arduino / C✓ Tested
CDynamic memory & ownership

Swap owned buffers by swapping their pointers

C: Pointer swaps avoid copying the underlying data.

C✓ Tested
Arduino / CEEPROM & program memory

Validate a small stored payload with a checksum

Arduino / C: Store a checksum with the payload and reject a changed byte.

Arduino / C✓ Tested
CNumbers & memory

Allocate a zeroed array

Check calloc, use the allocation, and release it in C.

C✓ Tested
CNumbers & memory

Format a decimal value

Print two fractional digits with C printf.

C✓ Tested
PythonFile operations & archives

Hash a file without reading it all at once

Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.

Python✓ Tested
Bash ScriptsFunctions & arguments

Look up values in an associative array

Use named keys for a small in-memory configuration table.

dictionary✓ Tested