FIND YOUR NEXT FEW LINES

Results for “Insertion & wrapping”

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

23 snippets foundClear filters
PowerShellHashtables & object records

Preserve key insertion order

PowerShell: An ordered dictionary enumerates keys in the order they were inserted.

PowerShell✓ Tested
JavaQueues & collection operations

Preserve map insertion order

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

Java✓ Tested
CSSTypography

Preserve whitespace while wrapping

Use CSS pre-wrap for multiline text that retains spaces.

CSS✓ Tested
Arduino / CArrays & embedded state

Reject insertion when a fixed queue is full

Arduino / C: Track a count separately from circular read and write positions.

Arduino / C✓ Tested
JavaPrecise numeric calculations

Detect integer addition overflow

Java: Math.addExact throws rather than silently wrapping on overflow.

Java✓ Tested
C#Dates & precise numbers

Detect integer overflow with checked

C#: A checked arithmetic block throws instead of silently wrapping an integer result.

C#✓ Tested
C++Containers & compound values

Insert a map value only when a key is absent

C++: try_emplace preserves the old value when insertion does not take place.

C++✓ Tested
PythonNumbers & calculations

Insert a value while preserving sorted order

Python: Use insort on an already sorted list; insertion still shifts later list elements.

Python✓ Tested
PostgresRows & writes

Insert or update on a key conflict

Use a unique key to update an existing row.

ON CONFLICT✓ Tested
TypeScriptCollections & records

Remove duplicate values with a Set

Keep the first occurrence order while deduplicating.

Set✓ Tested
Arduino / CArrays & embedded state

Sort a small array in place

Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.

Arduino / C✓ Tested