FIND YOUR NEXT FEW LINES

Results for “run”

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

2246 snippets foundClear filters
RustFiles & paths

Append to a file without truncating it

Append to a file without truncating it in a complete Rust program using the standard library.

Rust✓ Tested
PostgresWindows & text

Calculate a running total

Accumulate values in row order.

window✓ Tested
CSmall algorithms & bit operations

Calculate an average without integer division truncation

C: Accumulate into double and divide by the nonzero number of readings.

C✓ Tested
RustGetting Started

Compile and run your first Rust program

Compile and run your first Rust program in a complete Rust program using the standard library.

Rust✓ Tested
CStrings & byte buffers

Count a leading run of allowed characters

C: strspn counts bytes at the start that belong to a specified character set.

C✓ Tested
Docker / ComposeDockerfile patterns

Create a runtime file during the build

Docker / Compose: RUN executes during the build while CMD executes when a container starts.

Docker / Compose✓ Tested
Arduino / CText & bounded buffers

Detect truncated formatted output

Arduino / C: snprintf returns the length it would have written, excluding the null terminator.

Arduino / C✓ Tested
Linux CommandsSystem information

List running processes

Display process IDs, parent process IDs, and command names for all visible processes.

process✓ Tested
Docker / ComposeExecution & file transfer

Override an image’s entrypoint at runtime

Docker / Compose: An explicit entrypoint replaces the image entrypoint for this invocation.

Docker / Compose✓ Tested
Bash ScriptsProcesses & environment

Preserve a failure status while an EXIT trap runs

Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.

Bash Scripts✓ Tested
JavaScriptObject behavior & collections

Prevent runtime changes to top-level properties

JavaScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Prevent runtime changes to top-level properties

TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

TypeScript✓ Tested