Results for “C”
Small, practical examples. Search by task or narrow things down below.
Wrap a value in a distinct type
Wrap a value in a distinct type in a complete Rust program using the standard library.
Rust✓ Tested
Wrap an error with context
Wrap an error with context using a complete Go program with explicit sample inputs.
Go✓ Tested
Wrap each matched element separately
jQuery: wrap adds a parent around each selected element.
jQuery✓ Tested
Wrap only an element’s existing contents
jQuery: wrapInner leaves the outer element intact.
jQuery✓ Tested
Write a generic first-or-fallback helper
C#: Constrain a generic helper through its input shape and return an explicit caller-supplied fallback.
C#✓ Tested
Write a generic slice helper
Write a generic slice helper using a complete Go program with explicit sample inputs.
Go✓ Tested
Write a literal multiline block
Bash Scripts: Quoting the heredoc delimiter disables parameter and command expansion inside it.
Bash Scripts✓ Tested
Write and read bytes without text conversion
C++: Use binary stream modes and check each I/O operation before consuming its result.
C++✓ Tested
Write and run a first Bash script
Bash Scripts: Write and run a first Bash script with a small standalone Bash program.
Bash Scripts✓ Tested
Write dictionaries to CSV
Write a list of dictionaries to a CSV file with a header row and a predictable column order.
csv✓ Tested
Write object records to a CSV file
PowerShell: Export-Csv uses property names as headers and quotes values when needed.
PowerShell✓ Tested
Write several messages through one file descriptor
Bash Scripts: Open a destination once and close the descriptor after writing.
Bash Scripts✓ Tested