FIND YOUR NEXT FEW LINES

Results for “new”

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

88 snippets foundClear filters
C#Data & dates

Serialize an object to JSON

Serialize a small anonymous C# object with System.Text.Json.

C#✓ Tested
C#Collections

Sort values with LINQ

Create an ascending sequence from C# integer values.

C#✓ Tested
C#Strings

Split and trim values

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

C#✓ 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
jQueryDeferred work & queues

Transform a deferred value with then

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

jQuery✓ Tested
C#LINQ transformations

Transform each item with Select

C#: Project each input value into a new value without modifying the source array.

C#✓ 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

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