FIND YOUR NEXT FEW LINES

Results for “target”

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

264 snippets foundClear filters
TypeScriptText handling & Unicode

Transform each regex match with a callback

TypeScript: A replacement callback computes the replacement separately for each match.

TypeScript✓ Tested
TypeScriptText handling & Unicode

Trim and discard blank lines

TypeScript: Split a text block, trim each line, and keep nonempty values.

TypeScript✓ Tested
Arduino / CText & bounded buffers

Trim surrounding whitespace from an Arduino String

Arduino / C: String.trim modifies the object in place.

Arduino / C✓ Tested
Arduino / CDigital input & output

Turn on the built-in LED

Configure the Uno’s LED pin as an output and drive it high.

LED_BUILTIN✓ Tested
Arduino / CGetting Started

Turn on the LED with a serial command

Arduino / C: Wait for the character 1 in Serial Monitor before turning on the built-in LED.

Arduino / C✓ Tested
TypeScriptCollections & records

Type a dictionary with Record

Limit a lookup table to a known set of keys.

Record✓ Tested
TypeScriptTypes & functions

Type a function’s inputs and output

Catch mismatched arguments during compilation.

function✓ Tested
TypeScriptUtilities & async

Type an object update with Partial

Allow a caller to provide just the fields to change.

Partial✓ Tested
Arduino / CGetting Started

Understand setup() and loop()

Arduino / C: See initialization run once and the main loop run repeatedly.

Arduino / C✓ Tested
C#JSON & binary formats

Update a JSON document with mutable nodes

C#: JsonNode permits targeted changes before serializing a document again.

C#✓ Tested
SQLiteTables & writes

Update a row on conflict

Use a primary key to insert or update one value.

upsert✓ Tested
TypeScriptGetting Started

Update a running count

TypeScript: Change a variable after its initial value has been assigned.

TypeScript✓ Tested