FIND YOUR NEXT FEW LINES

Results for “read file”

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

1171 snippets foundClear filters
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
C++Getting Started

Calculate a simple total

C++: Multiply a unit price by a quantity, then add a delivery fee.

C++✓ Tested
GoGetting Started

Calculate a subtotal

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

Go✓ Tested
C++Numeric parsing & calculations

Calculate a two-dimensional vector length

C++: hypot avoids unnecessary intermediate overflow in the sum of squares.

C++✓ Tested
CSmall algorithms & bit operations

Calculate an average without integer division truncation

C: Accumulate into double and divide by the nonzero number of readings.

C✓ 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 cumulative totals

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

C++✓ Tested
C++Sequence algorithms

Calculate the dot product of two vectors

C++: inner_product multiplies corresponding elements and accumulates them from a chosen seed.

C++✓ Tested
SQLiteDates & time

Calculate whole days between dates

Subtract Julian day values for date-only inputs.

julianday✓ Tested