FIND YOUR NEXT FEW LINES

Results for “C”

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

3000 snippets foundClear filters
RustTesting & reusable patterns

Borrow text until a modification is needed

Borrow text until a modification is needed in a complete Rust program using the standard library.

Rust✓ Tested
Linux CommandsDates & process utilities

Bound a command execution time

Linux Commands: Use timeout and handle status 124 as an expected time limit.

Linux Commands✓ Tested
Linux CommandsGetting Started

Branch on a command’s exit status

Linux Commands: Branch on a command’s exit status using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Arduino / CGetting Started

Branch on a threshold

Arduino / C: Branch on a threshold on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Linux CommandsSearching text

Branch on whether a pattern exists

Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.

Linux Commands✓ Tested
PowerShellArray operations

Build a mutable generic list

PowerShell: A generic list supports repeated additions without copying an entire array each time.

PowerShell✓ Tested
Docker / ComposeGetting Started

Build an image with a default command

Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.

Docker / Compose✓ Tested
JavaScriptObject behavior & collections

Build an object from key-value entries

JavaScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Build an object from key-value entries

TypeScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

TypeScript✓ Tested
JavaText validation & formatting

Build text efficiently in a loop

Java: Append to StringBuilder when constructing a string incrementally.

Java✓ Tested
GoStrings & text

Build text incrementally

Build text incrementally using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested