FIND YOUR NEXT FEW LINES

Results for “New-Item”

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

210 snippets foundClear filters
C#Strings

Split and trim values

Split simple comma-separated C# text and trim each value.

C#✓ Tested
Bash ScriptsArguments & decisions

Stop a search loop at the first match

Bash Scripts: Break exits the current loop as soon as the desired item is found.

Bash Scripts✓ Tested
C#Data & dates

Sum integer values

Sum a C# sequence using LINQ.

C#✓ Tested
Docker / ComposeExecution & file transfer

Supply an environment variable to an exec process

Docker / Compose: An exec environment override applies to the new process only.

Docker / Compose✓ Tested
PowerShellArray operations

Test whether an array contains a value

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

PowerShell✓ Tested
jQueryDeferred work & queues

Transform a deferred value with then

jQuery: then returns a new promise with the callback’s result.

jQuery✓ Tested
C#Strings

Trim surrounding whitespace

Remove whitespace at the ends of a C# string.

C#✓ Tested
C#Strings

Try parsing an integer

Use TryParse to avoid exceptions for invalid C# integer input.

C#✓ Tested
SQL ServerJSON & results

Turn JSON into typed rows

Project JSON array items into SQL columns.

OPENJSON✓ Tested
SQL ServerJSON & results

Update a JSON property

Create updated JSON text with JSON_MODIFY.

JSON_MODIFY✓ Tested
SQLBulk changes & set operations

Update several classifications in one statement

SQL: A CASE expression computes the new value for each row covered by the update predicate.

SQL✓ Tested
SQL ServerBulk changes & set operations

Update several classifications in one statement

SQL Server: A CASE expression computes the new value for each row covered by the update predicate.

SQL Server✓ Tested