FIND YOUR NEXT FEW LINES

Results for “save”

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

1671 snippets foundClear filters
CBinary formats & structured parsing

Format a nonnegative integer amount as whole and fractional units

C: Keep the calculation in integer minor units and use two digits for the remainder.

C✓ Tested
Bash ScriptsText parsing & arithmetic

Format a numeric label with leading zeroes

Bash Scripts: Use a constant printf format string and supply values as separate arguments.

Bash Scripts✓ Tested
GoGetting Started

Format a readable status message

Format a readable status message using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Format a UTC timestamp

Format a UTC timestamp using a complete Go program with explicit sample inputs.

Go✓ Tested
RustParsing & byte data

Format an integer as padded hexadecimal

Format an integer as padded hexadecimal in a complete Rust program using the standard library.

Rust✓ Tested
C++Numeric parsing & calculations

Format an integer into a caller-owned buffer

C++: to_chars avoids allocation and reports whether the buffer was large enough.

C++✓ Tested
JavaScriptFiles & async

Format an ISO date

Format a UTC JavaScript Date deterministically.

JavaScript✓ Tested
C++Numbers & algorithms

Format decimal output

Use fixed and setprecision to print two C++ decimal places.

C++✓ Tested
JavaScriptUTC date operations

Format whole seconds as hours minutes and seconds

JavaScript: Use integer divisions and remainders for a nonnegative duration.

JavaScript✓ Tested
TypeScriptUTC date operations

Format whole seconds as hours minutes and seconds

TypeScript: Use integer divisions and remainders for a nonnegative duration.

TypeScript✓ Tested
Bash ScriptsArguments & decisions

Forward all arguments without changing their boundaries

Bash Scripts: Quoted at-sign preserves empty arguments and embedded spaces.

Bash Scripts✓ Tested
CSmall algorithms & bit operations

Generate a bounded Fibonacci sequence

C: Keep only the two previous values instead of using exponential recursive calls.

C✓ Tested