FIND YOUR NEXT FEW LINES

Results for “write file”

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

880 snippets foundClear filters
Docker / ComposeGetting Started

Build an image with a default command

Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.

Docker / Compose✓ Tested
GoStrings & text

Build text incrementally

Build text incrementally using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsArchives & checksums

Calculate a SHA-256 checksum

Calculate a file checksum so you can compare it with a hash from a trusted source and detect changed contents.

checksum✓ Tested
GoJSON & encoding

Calculate a SHA-256 text digest

Calculate a SHA-256 text digest using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellGetting Started

Calculate a simple total

PowerShell: Calculate a simple total using PowerShell 7.

PowerShell✓ Tested
GoGetting Started

Calculate a subtotal

Calculate a subtotal using a complete Go program with explicit sample inputs.

Go✓ Tested
RustGetting Started

Calculate an order subtotal

Calculate an order subtotal in a complete Rust program using the standard library.

Rust✓ Tested
C++Sequence algorithms

Calculate changes between successive readings

C++: adjacent_difference keeps the first value and then writes each difference from its predecessor.

C++✓ Tested
C++Sequence algorithms

Calculate cumulative totals

C++: partial_sum writes the sum of each input prefix to the output sequence.

C++✓ Tested
SQLiteDates & time

Calculate whole days between dates

Subtract Julian day values for date-only inputs.

julianday✓ Tested
GoGetting Started

Call a function with a return value

Call a function with a return value using a complete Go program with explicit sample inputs.

Go✓ Tested
RustGetting Started

Call a typed function

Call a typed function in a complete Rust program using the standard library.

Rust✓ Tested