Results for “Bulk changes & set operations”
Small, practical examples. Search by task or narrow things down below.
Update several classifications in one statement
SQL: A CASE expression computes the new value for each row covered by the update predicate.
SQL✓ Tested
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
Update several classifications in one statement
Postgres: A CASE expression computes the new value for each row covered by the update predicate.
Postgres✓ Tested
Update several classifications in one statement
SQLite: A CASE expression computes the new value for each row covered by the update predicate.
SQLite✓ Tested
Encapsulate increment and reset operations
Encapsulate increment and reset operations with a small React component and explicit browser behavior.
React✓ Tested
Count set bits in an unsigned integer
C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.
C✓ Tested
Find set members missing from another set
Java: Use removeAll on a copy to calculate a set difference.
Java✓ Tested
Find shared set members
Java: Copy a set before retainAll when the original must remain unchanged.
Java✓ Tested
Find sorted set members missing from another set
C++: set_difference writes elements present in the first sorted input but absent from the second.
C++✓ Tested
Find the common members of two sorted sets
C++: set_intersection requires both input ranges to be sorted under the same comparator.
C++✓ Tested
Set owner-only read and write permissions
C++: Replace ordinary permission bits with the requested owner permissions.
C++✓ Tested
Check whether a range is already sorted
C++: is_sorted reports ordering without modifying the input.
C++✓ Tested