Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Encode a byte buffer as hexadecimal
C: Format each byte as an unsigned two-digit hexadecimal value.
C✓ Tested
Encode a value as little-endian bytes
Arduino / C: Store the least significant byte first when the protocol requires it.
Arduino / C✓ Tested
Enumerate the items of a JSON array
C#: Dispose JsonDocument after reading its elements.
C#✓ Tested
Exclude a directory from a recursive search
Linux Commands: Use prune to avoid descending into generated dependencies.
Linux Commands✓ Tested
Extract a parent directory from a path
Linux Commands: Use dirname without needing the path to exist.
Linux Commands✓ Tested
Extract the low and high byte of a value
Arduino / C: lowByte and highByte expose the two bytes of a 16-bit value.
Arduino / C✓ Tested
Filter observable emissions
Filter observable emissions with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Find a median element without fully sorting
C++: nth_element partitions around the element that would occupy the chosen sorted position.
C++✓ Tested
Find parents whose every child meets a rule
SQL: Combine existence with the absence of a violating child to exclude parents with no children.
SQL✓ Tested
Find parents whose every child meets a rule
SQL Server: Combine existence with the absence of a violating child to exclude parents with no children.
SQL Server✓ Tested
Find parents whose every child meets a rule
Postgres: Combine existence with the absence of a violating child to exclude parents with no children.
Postgres✓ Tested
Find parents whose every child meets a rule
SQLite: Combine existence with the absence of a violating child to exclude parents with no children.
SQLite✓ Tested