Results for “read file”
Small, practical examples. Search by task or narrow things down below.
Copy a stream and count its bytes
Copy a stream and count its bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Copy an artifact from an earlier build stage
Docker / Compose: A named stage can produce an artifact without copying its other files.
Docker / Compose✓ Tested
Create a nested directory tree
Create a nested directory tree in a complete Rust program using the standard library.
Rust✓ Tested
Create nested directories
Create nested directories using a complete Go program with explicit sample inputs.
Go✓ Tested
Declare a fixed configuration value
Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.
Bash Scripts✓ Tested
Decode a 16-bit big-endian integer
C: Promote bytes to an unsigned integer type before combining shifted values.
C✓ Tested
Display a label in uppercase without changing its text
CSS: Text-transform changes visual casing while preserving the DOM’s source text.
CSS✓ Tested
Distinguish an empty input line from end of input
Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.
Bash Scripts✓ Tested
Exclude a directory from a recursive search
Linux Commands: Use prune to avoid descending into generated dependencies.
Linux Commands✓ Tested
Explain a calculation with a comment
Python: Keep the code executable while documenting why a fixed input is used.
Python✓ Tested
Explain a calculation with a comment
C#: Keep the code executable while documenting why a fixed input is used.
C#✓ Tested
Explain a calculation with a comment
Java: Keep the code executable while documenting why a fixed input is used.
Java✓ Tested