Results for “read”
Small, practical examples. Search by task or narrow things down below.
Compute a generated column
Store inputs and derive a value from them.
generated column✓ Tested
Constrain and center a container
Use max-width and auto margins for a centered CSS reading area.
CSS✓ Tested
Convert a duration to another unit explicitly
C++: duration_cast converts units and truncates fractional integer units.
C++✓ Tested
Convert ASCII text to lowercase safely
C++: Cast each byte to unsigned char before using the cctype function.
C++✓ Tested
Convert hexadecimal text to bytes
Python: Use bytes.fromhex for a readable byte representation and hex for the reverse conversion.
Python✓ Tested
Convert known numeric text to an integer
C++: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C++✓ Tested
Copy a file in bounded binary chunks
C: Check read, write, and close errors while copying without loading the entire file.
C✓ Tested
Copy a file without overwriting
C#: File.Copy defaults to refusing a destination that already exists.
C#✓ Tested
Copy a file without replacing an existing destination
Java: Files.copy fails if the destination already exists unless replacement is explicitly enabled.
Java✓ Tested
Copy a file without replacing an existing destination
C++: The default copy_file policy refuses to overwrite an existing destination.
C++✓ Tested
Copy a flash string into a bounded RAM buffer
Arduino / C: strncpy_P reads from program memory into ordinary RAM.
Arduino / C✓ Tested
Copy a multibyte interrupt-owned counter atomically
Arduino / C: ATOMIC_RESTORESTATE restores the interrupt state after reading a shared value.
Arduino / C✓ Tested