Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Measure a node after the first render
Measure a node after the first render with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Measure the byte length of UTF-8 text
C#: Character count and encoded byte count can differ for non-ASCII text.
C#✓ Tested
Mount a host directory read-only
Expose existing files without allowing the container to change them.
bind mount✓ Tested
Normalize a path without requiring it to exist
Linux Commands: Use GNU realpath -m and relative-to to normalize dot segments.
Linux Commands✓ Tested
Override an image’s entrypoint at runtime
Docker / Compose: An explicit entrypoint replaces the image entrypoint for this invocation.
Docker / Compose✓ Tested
Override the process working directory
Docker / Compose: The workdir option sets the directory for the container command.
Docker / Compose✓ Tested
Pack two small values into one byte
Arduino / C: Mask each four-bit value before combining it.
Arduino / C✓ Tested
Pair employees with their managers
SQL: Alias a table twice to represent two different roles in one relationship.
SQL✓ Tested
Pair employees with their managers
SQL Server: Alias a table twice to represent two different roles in one relationship.
SQL Server✓ Tested
Pair employees with their managers
Postgres: Alias a table twice to represent two different roles in one relationship.
Postgres✓ Tested
Pair employees with their managers
SQLite: Alias a table twice to represent two different roles in one relationship.
SQLite✓ Tested
Parse a bounded simple record with sscanf
C: A width limit protects the destination buffer and the consumed count detects trailing junk.
C✓ Tested