FIND YOUR NEXT FEW LINES

Results for “ps”

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

442 snippets foundClear filters
PowerShellArray operations

Split an array into fixed-size batches

PowerShell: Bound the final index so the last batch can contain fewer elements.

PowerShell✓ Tested
PowerShellGetting Started

Split simple delimited text

PowerShell: Split simple delimited text using PowerShell 7.

PowerShell✓ Tested
CStrings & byte buffers

Split simple delimited text in place

C: strtok inserts terminators into a writable buffer and skips repeated delimiter characters.

C✓ Tested
PowerShellStrings & literal text

Split text on a simple delimiter

PowerShell: The split operator uses a regular expression; this delimiter has no special regex meaning.

PowerShell✓ Tested
Arduino / CArrays & embedded state

Store samples in a fixed-size ring buffer

Arduino / C: The write position wraps while the storage size stays constant.

Arduino / C✓ Tested
CSSInteraction selectors

Style placeholder text independently of entered text

CSS: The placeholder pseudo-element affects the hint, while the input rule styles the actual value.

CSS✓ Tested
PowerShellCollections & objects

Sum a collection

Calculate a total with Measure-Object.

Measure-Object✓ Tested
Bash ScriptsLoops & decisions

Sum a range of integers

Use an arithmetic loop without launching external processes.

arithmetic✓ Tested
PostgresWindow analytics

Sum a row and its immediate predecessor

Postgres: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.

Postgres✓ Tested
CDynamic memory & ownership

Swap owned buffers by swapping their pointers

C: Pointer swaps avoid copying the underlying data.

C✓ Tested
PowerShellArray operations

Test whether an array contains a value

PowerShell: The contains operator compares complete items rather than matching substrings.

PowerShell✓ 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