FIND YOUR NEXT FEW LINES

Results for “dot”

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

131 snippets foundClear filters
C++Sequence algorithms

Calculate the dot product of two vectors

C++: inner_product multiplies corresponding elements and accumulates them from a chosen seed.

C++✓ Tested
C#Collections & data structures

Add a dictionary entry only if absent

C#: TryAdd reports a duplicate key without replacing its existing value.

C#✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
C#Files & paths

Append a line

Append UTF-8 text without replacing existing C# file contents.

C#✓ Tested
C#Asynchronous work & URI handling

Await an asynchronous method result

C#: Use Task<T> for an async operation with a typed result.

C#✓ Tested
C#Asynchronous work & URI handling

Await multiple tasks while preserving result order

C#: Task.WhenAll returns results in the same order as the supplied tasks.

C#✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested
C#LINQ transformations

Calculate a product with Aggregate

C#: Supply a seed to define the result for an empty sequence.

C#✓ Tested
C#Getting Started

Calculate a simple total

C#: Multiply a unit price by a quantity, then add a delivery fee.

C#✓ Tested
C#Dates & precise numbers

Calculate an integer beyond the 64-bit range

C#: Use BigInteger for arbitrary-precision integer arithmetic.

C#✓ Tested
C#Dates & precise numbers

Calculate the number of calendar days between dates

C#: Subtract DayNumber values when the inputs are calendar dates.

C#✓ Tested
C#Getting Started

Call a library function

C#: Use a standard absolute-value function with a small negative number.

C#✓ Tested