Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Separate an executable from default arguments
Docker / Compose: Separate an executable from default arguments with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Serialize a 16-bit integer in big-endian order
C: Explicit shifts make a byte format independent of the CPU’s native byte order.
C✓ Tested
Serialize an object
Turn a JavaScript object into JSON text.
JavaScript✓ Tested
Serialize nested objects with an explicit depth
PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.
PowerShell✓ Tested
Set a container’s own hostname
Docker / Compose: hostname changes the name reported inside the container.
Docker / Compose✓ Tested
Set a file to a specific byte length
Linux Commands: Use truncate to shorten a known scratch file without replacing its inode.
Linux Commands✓ Tested
Set and inspect a bit flag
Store several boolean states in one byte.
bitSet✓ Tested
Sort a derived copy of a collection
Sort a derived copy of a collection with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Sort an integer array with qsort
C: The comparator uses relational comparisons to avoid subtraction overflow.
C✓ Tested
Split a file into fixed line-count pieces
Linux Commands: Use numeric suffixes for predictable filenames when splitting a large text file.
Linux Commands✓ Tested
Split a key-value pair once
Split a key-value pair once using a complete Go program with explicit sample inputs.
Go✓ Tested
Split a key-value pair once
Split a key-value pair once in a complete Rust program using the standard library.
Rust✓ Tested