FIND YOUR NEXT FEW LINES

Results for “all”

Small, practical examples. Search by task or narrow things down below.

1115 snippets foundClear filters
CSSLayout

Wrap a row of items

Allow CSS flex items to wrap when a row runs out of space.

CSS✓ Tested
CSSTypography

Wrap long words

Allow long unbroken text to wrap within a CSS box.

CSS✓ Tested
PowerShellStrings & literal text

Write a multiline string without expanding variables

PowerShell: A single-quoted here-string preserves dollar signs literally.

PowerShell✓ Tested
PythonFiles & paths

Write a text file

Save a string to a UTF-8 text file and close the file automatically when the write finishes.

file✓ Tested
C++Files & paths

Write a text file

Write and close a C++ output file while checking stream failure.

C++✓ Tested
CFiles

Write a text file

Open, write, and close a C file while checking every operation.

C✓ Tested
CFiles

Write and read binary bytes

Round-trip a byte buffer through a C binary file.

C✓ Tested
C++Filesystem operations

Write and read bytes without text conversion

C++: Use binary stream modes and check each I/O operation before consuming its result.

C++✓ Tested
Bash ScriptsGetting Started

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
Bash ScriptsGetting Started

Write several literal lines

Bash Scripts: Write several literal lines with a small standalone Bash program.

Bash Scripts✓ Tested
PythonFunctions & error handling

Yield values on demand

Python: Use a generator to produce a sequence without storing all intermediate values.

Python✓ Tested