FIND YOUR NEXT FEW LINES

Results for “as”

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

2533 snippets foundClear filters
PowerShellText & data

Format a date without locale ambiguity

Parse an ISO date and format it consistently.

date✓ Tested
JavaNumbers & dates

Format a decimal number

Format a Java decimal with two digits and a fixed locale.

Java✓ Tested
CNumbers & memory

Format a decimal value

Print two fractional digits with C printf.

C✓ Tested
CBinary formats & structured parsing

Format a known timestamp in UTC

C: gmtime converts to UTC calendar fields and strftime formats them.

C✓ Tested
Linux CommandsDates & process utilities

Format a known UTC timestamp

Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.

Linux Commands✓ 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
Linux CommandsDates & process utilities

Format a zero-padded numeric label

Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.

Linux Commands✓ 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
C++Numbers & algorithms

Format decimal output

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

C++✓ Tested
Arduino / CText & bounded buffers

Format several integers in a fixed buffer

Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.

Arduino / C✓ 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