FIND YOUR NEXT FEW LINES

Results for “only”

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

621 snippets foundClear filters
SQLiteTables & writes

Compute a generated column

Store inputs and derive a value from them.

generated column✓ Tested
RustGetting Started

Construct a named-field struct

Construct a named-field struct in a complete Rust program using the standard library.

Rust✓ Tested
RustFunctions & data types

Construct a struct with default values

Construct a struct with default values in a complete Rust program using the standard library.

Rust✓ Tested
RustNumbers & durations

Construct an instant relative to the Unix epoch

Construct an instant relative to the Unix epoch in a complete Rust program using the standard library.

Rust✓ Tested
C#Dates & precise numbers

Convert a timestamp to a different fixed offset

C#: ToOffset changes the displayed local time while retaining the same instant.

C#✓ Tested
PowerShellHashtables & object records

Convert an object’s properties into a hashtable

PowerShell: Enumerate PSObject.Properties when the set of property names is known only at runtime.

PowerShell✓ Tested
C#JSON & binary formats

Convert bytes to Base64 and back

C#: Encode text to UTF-8 before converting it to a Base64 representation.

C#✓ Tested
C#Getting Started

Convert known numeric text to an integer

C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C#✓ Tested
C#Dates & precise numbers

Convert Unix seconds to an offset-aware timestamp

C#: DateTimeOffset preserves the UTC offset explicitly.

C#✓ Tested
GoDates & times

Convert Unix seconds to UTC

Convert Unix seconds to UTC using a complete Go program with explicit sample inputs.

Go✓ Tested
RustFiles & paths

Copy a file and inspect the copied byte count

Copy a file and inspect the copied byte count in a complete Rust program using the standard library.

Rust✓ Tested
C#File operations & paths

Copy a file without overwriting

C#: File.Copy defaults to refusing a destination that already exists.

C#✓ Tested