FIND YOUR NEXT FEW LINES

Results for “Measure-Object”

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

123 snippets foundClear filters
GitRestoring & revising local work

Create a recovery branch for a recently moved commit

Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.

Git✓ Tested
PowerShellFunctions & control

Define a function with a typed parameter

Accept a name and return a greeting.

function✓ Tested
PowerShellCommands & execution context

Discard incidental output from a setup command

PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.

PowerShell✓ Tested
C#Text validation & encoding

Extract all integer tokens from text

C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.

C#✓ Tested
JavaScriptText handling & Unicode

Extract text by start and end positions

JavaScript: String slice uses an inclusive start and exclusive end measured in UTF-16 code units.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Extract text by start and end positions

TypeScript: String slice uses an inclusive start and exclusive end measured in UTF-16 code units.

TypeScript✓ Tested
TypeScriptCollections & records

Filter and transform an array

Keep active objects and extract their names.

filter✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
jQueryHTTP requests

Handle an unsuccessful HTTP status

jQuery: fail receives the jqXHR object and exposes its status.

jQuery✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
JavaScriptObjects & JSON

Parse JSON text

Read a JavaScript object from JSON text.

JavaScript✓ Tested
PowerShellFunctions & control

Pass named parameters from a hashtable

Keep a command’s options together in a reusable object.

splatting✓ Tested