FIND YOUR NEXT FEW LINES

Results for “create folder”

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

1248 snippets foundClear filters
RustGetting Started

Call a typed function

Call a typed function in a complete Rust program using the standard library.

Rust✓ Tested
ReactEffects & lifecycle

Cancel an asynchronous operation on unmount

Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Capture a command’s output

Bash Scripts: Capture a command’s output with a small standalone Bash program.

Bash Scripts✓ Tested
RustFunctions & data types

Capture a surrounding value in a closure

Capture a surrounding value in a closure in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsFunction scope & composition

Capture output while handling a failed command

Bash Scripts: An assignment inherits the status of its command substitution, allowing both output and status to be handled.

Bash Scripts✓ Tested
Bash ScriptsInput streams & redirection

Capture standard output and standard error separately

Bash Scripts: Use distinct redirections when diagnostic text should not be mixed with data.

Bash Scripts✓ Tested
GoFunctions & types

Capture state in a closure

Capture state in a closure using a complete Go program with explicit sample inputs.

Go✓ Tested
SQL ServerTransactions & tables

Catch a T-SQL error

Handle an expected conversion error in TRY/CATCH.

TRY CATCH✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
RustErrors & optional values

Chain operations that may return None

Chain operations that may return None in a complete Rust program using the standard library.

Rust✓ Tested
RustFiles & paths

Change a path’s extension

Change a path’s extension in a complete Rust program using the standard library.

Rust✓ Tested
GitGetting Started

Check a change for whitespace problems

Git: Check a change for whitespace problems inside the disposable repository created by the input setup.

Git✓ Tested