FIND YOUR NEXT FEW LINES

Results for “Map”

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

76 snippets foundClear filters
C#Asynchronous work & URI handling

Limit concurrent access with SemaphoreSlim

C#: Release the semaphore in finally so exceptions cannot leave it permanently acquired.

C#✓ Tested
GoGetting Started

Look up a map entry

Look up a map entry using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Collections

Look up a map key

Use find to read a C++ map without inserting a missing key.

C++✓ Tested
GoGetting Started

Map a command with switch

Map a command with switch using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CData & storage

Map an input range to an output range

Scale an integer reading to a different interval.

map✓ Tested
JavaScriptArray restructuring

Map items to multiple output values

JavaScript: flatMap combines mapping and a one-level flattening operation.

JavaScript✓ Tested
TypeScriptArray restructuring

Map items to multiple output values

TypeScript: flatMap combines mapping and a one-level flattening operation.

TypeScript✓ Tested
PowerShellHashtables & object records

Merge configuration maps with override precedence

PowerShell: Copy defaults before applying override keys so the original remains unchanged.

PowerShell✓ Tested
JavaQueues & collection operations

Preserve map insertion order

Java: Use LinkedHashMap when iteration should follow the order keys were first added.

Java✓ Tested
RustMaps & sets

Query an ordered map’s key range

Query an ordered map’s key range in a complete Rust program using the standard library.

Rust✓ Tested
JavaCollections

Read a map with a default

Return a fallback when a Java map does not contain a key.

Java✓ Tested
JavaScriptObject behavior & collections

Remove a Map entry and detect whether it existed

JavaScript: Map.delete returns true only when an entry was present.

JavaScript✓ Tested