FIND YOUR NEXT FEW LINES

Results for “ring”

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

465 snippets foundClear filters
Bash ScriptsArray operations

Check exact array membership

Bash Scripts: Compare each element literally instead of searching a concatenated string.

Bash Scripts✓ Tested
JavaStrings

Check whether text contains a phrase

Use a case-sensitive Java substring check.

Java✓ Tested
PowerShellFunctions & control

Choose an action with switch

Map a small command value to a result.

switch✓ Tested
Arduino / CGetting Started

Choose the smaller of two values

Arduino / C: Choose the smaller of two values on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested
Arduino / CGetting Started

Combine several Serial.print calls

Arduino / C: Combine several Serial.print calls on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CText & bounded buffers

Compare a command case-sensitively

Arduino / C: strcmp returns zero when both null-terminated strings match.

Arduino / C✓ Tested
JavaScriptText handling & Unicode

Compare canonically equivalent Unicode text

JavaScript: Normalize to NFC before comparing equivalent composed and decomposed text.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Compare canonically equivalent Unicode text

TypeScript: Normalize to NFC before comparing equivalent composed and decomposed text.

TypeScript✓ Tested
Arduino / CTiming & control

Compare elapsed time across timer rollover

Use unsigned subtraction when a millisecond counter wraps.

rollover✓ Tested
CNumeric parsing & arithmetic

Compute a two-dimensional vector length

C: hypot avoids unnecessary intermediate overflow compared with squaring both inputs directly.

C✓ Tested
Arduino / CDigital input & output

Control an LED from a button

Translate an active-low button input into an LED output.

button✓ Tested