FIND YOUR NEXT FEW LINES

Results for “Get-Content”

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

914 snippets foundClear filters
TypeScriptCollections & records

Sum typed values with reduce

Accumulate numeric array elements.

reduce✓ Tested
HTMLMetadata & document links

Supply a title and URL for link previews

HTML: Open Graph metadata describes a shared page without changing its visible content.

HTML✓ Tested
Arduino / CBinary values & packets

Toggle a bit with an XOR mask

Arduino / C: XOR flips selected bits and leaves all other bits unchanged.

Arduino / C✓ Tested
HTMLNative disclosure & dialogs

Toggle a native popover from a button

HTML: The popovertarget relationship handles show and hide behavior without a click handler.

HTML✓ Tested
Arduino / CDigital signals & interrupts

Toggle an output using an explicit software state

Arduino / C: Keep the intended output state in a Boolean variable.

Arduino / C✓ Tested
jQueryCollections & styling

Transform a collection into a plain array

jQuery: map followed by get returns ordinary JavaScript values.

jQuery✓ Tested
TypeScriptPromises & iteration protocols

Transform a resolved promise result

TypeScript: A then handler returns the value passed to the next promise in the chain.

TypeScript✓ Tested
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
TypeScriptCollections & records

Type a dictionary with Record

Limit a lookup table to a known set of keys.

Record✓ Tested