Results for “or”
Small, practical examples. Search by task or narrow things down below.
Sort dictionaries by a value
Sort a list of dictionaries by a numeric field, leaving the original list unchanged.
sort✓ Tested
Sort integers in place
Sort integers in place using a complete Go program with explicit sample inputs.
Go✓ Tested
Sort lines by numeric value
Linux Commands: Use sort -n so 10 sorts after 2 instead of before it.
Linux Commands✓ Tested
Sort map keys for stable output
Sort map keys for stable output using a complete Go program with explicit sample inputs.
Go✓ Tested
Sort numbers numerically
Supply a numeric comparator instead of JavaScript string sorting.
JavaScript✓ Tested
Sort only the smallest requested prefix
C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.
C++✓ Tested
Sort preferred rows ahead of other rows
SQL: A CASE ordering key expresses business priority before a stable secondary sort.
SQL✓ Tested
Sort preferred rows ahead of other rows
SQL Server: A CASE ordering key expresses business priority before a stable secondary sort.
SQL Server✓ Tested
Sort preferred rows ahead of other rows
Postgres: A CASE ordering key expresses business priority before a stable secondary sort.
Postgres✓ Tested
Sort preferred rows ahead of other rows
SQLite: A CASE ordering key expresses business priority before a stable secondary sort.
SQLite✓ Tested
Sort records by a delimited field
Linux Commands: Select the exact sort key to avoid including later columns.
Linux Commands✓ Tested
Sort records by a selected field
Sort records by a selected field using a complete Go program with explicit sample inputs.
Go✓ Tested