FIND YOUR NEXT FEW LINES

Results for “Arduino / C”

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

3000 snippets foundClear filters
C++Tasks & synchronization

Pass an argument into a worker thread

C++: Thread arguments are copied by default; std::ref explicitly passes a reference.

C++✓ Tested
Docker / ComposeContainer commands

Pass an environment variable

Supply configuration without changing an image.

environment✓ Tested
ReactGetting Started

Pass data through props

Pass data through props with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeDockerfile patterns

Prepare an owned directory before dropping root

Docker / Compose: Create and chown the writable application path before USER.

Docker / Compose✓ Tested
Bash ScriptsArray operations

Prepend items while preserving existing array values

Bash Scripts: Construct a new array with the new values before the quoted original expansion.

Bash Scripts✓ 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
GoJSON & encoding

Preserve a large JSON integer

Preserve a large JSON integer using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactLists & filtering

Preserve item state while reordering by key

Preserve item state while reordering by key with a small React component and explicit browser behavior.

React✓ Tested
PowerShellHashtables & object records

Preserve key insertion order

PowerShell: An ordered dictionary enumerates keys in the order they were inserted.

PowerShell✓ Tested
JavaQueues & collection operations

Preserve map insertion order

Java: Use LinkedHashMap when iteration should follow the order keys were first added.

Java✓ Tested
AngularEvents & DOM interaction

Prevent a link’s default navigation

Prevent a link’s default navigation with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Prevent a variable value from expanding as a filename pattern

Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.

Bash Scripts✓ Tested