FIND YOUR NEXT FEW LINES

Results for “standard”

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

703 snippets foundClear filters
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
JavaNumbers & dates

Add days to a date

Parse an ISO date and add calendar days using Java LocalDate.

Java✓ Tested
GoDates & times

Advance a calendar date

Advance a calendar date using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonDates & time zones

Advance a date by a number of days

Python: Use timedelta so month and year boundaries are handled automatically.

Python✓ Tested
CNumbers & memory

Allocate a zeroed array

Check calloc, use the allocation, and release it in C.

C✓ Tested
C#Files & paths

Append a line

Append UTF-8 text without replacing existing C# file contents.

C#✓ Tested
JavaFiles & paths

Append a line

Append text to a Java file, creating it if necessary.

Java✓ Tested
PythonFiles & paths

Append a line to a file

Add a new line to the end of a text file without replacing its existing contents. Append mode also creates the file if it does not exist.

file✓ Tested
RustVectors & slices

Append several values to a vector

Append several values to a vector in a complete Rust program using the standard library.

Rust✓ Tested
C++Files & paths

Append text to a file

Open a C++ stream in append mode and verify the write.

C++✓ Tested
CFiles

Append text to a file

Use append mode in C without replacing the existing file.

C✓ Tested