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++Files & paths

Append text to a file

Open a C++ stream in append mode and verify the write.

C++✓ Tested
CFiles

Append text to a file

Use append mode in C without replacing the existing file.

C✓ Tested
ReactGetting Started

Append to an array without mutating state

Append to an array without mutating state with a small React component and explicit browser behavior.

React✓ Tested
CSSGetting Started

Apply a rule at a viewport breakpoint

CSS: Learn how to apply a rule at a viewport breakpoint in a complete browser example.

CSS✓ Tested
GitStashing selected work

Apply a stash while keeping the saved entry

Git: Apply restores changes without removing the stash reference.

Git✓ Tested
RustTesting & reusable patterns

Assert approximate floating-point equality

Assert approximate floating-point equality in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsParameter expansion

Assign a default to an empty or unset variable

Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.

Bash Scripts✓ Tested
PythonFunctions & error handling

Avoid a shared mutable default argument

Python: Create a fresh list inside the function when the optional argument is omitted.

Python✓ Tested
C#Asynchronous work & URI handling

Await multiple tasks while preserving result order

C#: Task.WhenAll returns results in the same order as the supplied tasks.

C#✓ Tested
TypeScriptUtilities & async

Await several independent results

Preserve input order while awaiting multiple promises.

Promise.all✓ Tested
AngularLists & control flow

Bind a narrowed value using an @if alias

Bind a narrowed value using an @if alias with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularTemplates & bindings

Bind a style property

Bind a style property with a standalone Angular component and explicit browser behavior.

Angular✓ Tested