Results for “duplicate”
Small, practical examples. Search by task or narrow things down below.
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Sort and deduplicate values
Sort a C++ vector and erase adjacent duplicates.
C++✓ Tested
Allocate an independent copy of a C string
C: Include one extra byte for the terminating null character.
C✓ Tested
Sort and remove repeated values
Sort and remove repeated values in a complete Rust program using the standard library.
Rust✓ Tested
Add a dictionary entry only if absent
C#: TryAdd reports a duplicate key without replacing its existing value.
C#✓ Tested
Clone markup without sharing its identity
jQuery: clone creates a separate node; change duplicated IDs before inserting.
jQuery✓ Tested
Declare a preferred canonical URL
HTML: A canonical link identifies the preferred public URL for duplicate representations of a document.
HTML✓ Tested
Enforce uniqueness with a dedicated index
SQL: A unique index rejects a duplicate combination independently of query plans.
SQL✓ Tested
Enforce uniqueness with a dedicated index
SQL Server: A unique index rejects a duplicate combination independently of query plans.
SQL Server✓ Tested
Enforce uniqueness with a dedicated index
Postgres: A unique index rejects a duplicate combination independently of query plans.
Postgres✓ Tested
Enforce uniqueness with a dedicated index
SQLite: A unique index rejects a duplicate combination independently of query plans.
SQLite✓ Tested
Find rows shared by two query results
SQL: INTERSECT compares complete selected rows and removes duplicates.
SQL✓ Tested