FIND YOUR NEXT FEW LINES

Results for “standard”

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

703 snippets foundClear filters
C++Collections

Count word frequencies

Accumulate word counts in an ordered C++ map.

C++✓ Tested
C#Collections

Count words with GroupBy

Group repeated C# words and print ordered counts.

C#✓ Tested
Linux CommandsArchives & checksums

Create a compressed tar archive

Bundle a directory into a gzip-compressed tar archive, preserving the directory structure.

tar✓ Tested
Linux CommandsFiles & folders

Create a directory tree

Create a directory and its missing parent directories. The -p option also succeeds when the directories already exist.

directory✓ Tested
C#File operations & paths

Create a file only when it does not exist

C#: FileMode.CreateNew prevents accidental replacement of existing content.

C#✓ Tested
PythonFile operations & archives

Create a file without overwriting an existing one

Python: Use exclusive creation mode and handle FileExistsError explicitly.

Python✓ Tested
RustFiles & paths

Create a file without replacing existing data

Create a file without replacing existing data in a complete Rust program using the standard library.

Rust✓ Tested
RustGetting Started

Create a fixed-size array

Create a fixed-size array in a complete Rust program using the standard library.

Rust✓ Tested
C#Types & reliable control flow

Create a modified copy of an immutable record

C#: A with expression creates a shallow copy with selected changed properties.

C#✓ Tested
RustFiles & paths

Create a nested directory tree

Create a nested directory tree in a complete Rust program using the standard library.

Rust✓ Tested
C#LINQ transformations

Create a reusable one-to-many lookup

C#: ToLookup groups values by key and returns an empty sequence for an unknown key.

C#✓ Tested
Linux CommandsFiles & folders

Create a symbolic link

Create a relative symbolic link to a file and inspect its target with readlink.

symlink✓ Tested