Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Print a number with two decimal places
C: Format a small decimal value consistently for display.
C✓ Tested
Print a single character
Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Print integers in different bases
Inspect a byte in decimal, hexadecimal, and binary.
Serial✓ Tested
Print once from setup
Arduino / C: Print once from setup on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Print only the matching portions
Linux Commands: Use extended regex and -o to extract digit sequences.
Linux Commands✓ Tested
Print text containing percent characters literally
Bash Scripts: Never use untrusted text as the printf format string.
Bash Scripts✓ Tested
Process a file as a lazy line sequence
C#: ReadLines avoids allocating one string containing the entire file.
C#✓ Tested
Process a first-in first-out queue
C++: Queue exposes its front item separately from the operation that removes it.
C++✓ Tested
Produce a lazy sequence with a generator
TypeScript: A generator yields one value per iteration without building an intermediate array.
TypeScript✓ Tested
Project content into a reusable component
Project content into a reusable component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Project content into named slots
Project content into named slots with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Protect a shared container with a mutex
C++: A scoped lock_guard releases the mutex when its scope ends.
C++✓ Tested