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

Deliver a result through a promise and future

C++: A promise sets a shared state and its future retrieves the value.

C++✓ Tested
AngularComponents & communication

Derive a value from an input signal

Derive a value from an input signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaPrecise numeric calculations

Display an integer as unsigned

Java: Use unsigned conversion methods when interpreting a fixed-width bit pattern.

Java✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Distinguish an empty input line from end of input

Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.

Bash Scripts✓ Tested
JavaScriptObject behavior & collections

Distinguish an own property from an inherited one

JavaScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Distinguish an own property from an inherited one

TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

TypeScript✓ Tested
Bash ScriptsParameter expansion

Distinguish unset variables from empty strings

Bash Scripts: Omitting the colon tests only whether a variable is unset; including it also treats an empty value as missing.

Bash Scripts✓ Tested
JavaPrecise numeric calculations

Divide negative integers with floor rounding

Java: floorDiv and floorMod provide consistent floor-based quotient and remainder.

Java✓ Tested
CSSGetting Started

Draw a visible element border

CSS: Learn how to draw a visible element border in a complete browser example.

CSS✓ Tested
SQLiteTables & writes

Enable and use foreign keys

Turn on relationship enforcement for the connection.

foreign keys✓ Tested
PowerShellHashtables & object records

Enumerate hashtable entries in a stable order

PowerShell: Sort entries by key when predictable output matters.

PowerShell✓ Tested
C#JSON & binary formats

Enumerate the items of a JSON array

C#: Dispose JsonDocument after reading its elements.

C#✓ Tested