FIND YOUR NEXT FEW LINES

Results for “current path”

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

284 snippets foundClear filters
GitRestoring & revising local work

Stop tracking a generated file while keeping it locally

Git: Removing a path from the index leaves its working copy intact when cached is specified.

Git✓ Tested
CSSInteraction selectors

Style a control that fails native validation

CSS: Invalid reflects the input’s current constraint-validation result.

CSS✓ Tested
PowerShellCollections & objects

Sum a collection

Calculate a total with Measure-Object.

Measure-Object✓ Tested
PowerShellArray operations

Test whether an array contains a value

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

PowerShell✓ Tested
PowerShellFunctions & control

Transform each item in a collection

Build a result array with a foreach expression.

foreach✓ Tested
PowerShellGetting Started

Transform each pipeline value

PowerShell: Transform each pipeline value using PowerShell 7.

PowerShell✓ Tested
PowerShellStrings & literal text

Trim whitespace around a string

PowerShell: The Trim method removes surrounding whitespace while preserving the middle of the string.

PowerShell✓ Tested
SQL ServerJSON & results

Turn JSON into typed rows

Project JSON array items into SQL columns.

OPENJSON✓ Tested
PowerShellGetting Started

Use a counted loop

PowerShell: Use a counted loop using PowerShell 7.

PowerShell✓ Tested
PowerShellHashtables & object records

Use a fallback for a missing hashtable entry

PowerShell: Test the key explicitly so legitimate false or zero values are preserved.

PowerShell✓ Tested
PowerShellStrings & literal text

Use a literal value in a regular expression

PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.

PowerShell✓ Tested
SQL ServerTransactions & tables

Use a session-scoped temporary table

Store intermediate rows in a local # table.

temporary table✓ Tested