Results for “bit”
Small, practical examples. Search by task or narrow things down below.
Make a script executable by its owner
Linux Commands: Add the owner execute bit without replacing all permission bits.
Linux Commands✓ Tested
Pack two small values into one byte
Arduino / C: Mask each four-bit value before combining it.
Arduino / C✓ Tested
Print a floating-point value with fixed precision
Choose the number of decimal places in serial output.
float✓ Tested
Represent a finite set of states
Java: Use an enum to prevent arbitrary strings from representing application states.
Java✓ Tested
Return all rows tied for the maximum in a group
SQL: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQL✓ Tested
Return all rows tied for the maximum in a group
SQL Server: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQL Server✓ Tested
Return all rows tied for the maximum in a group
Postgres: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
Postgres✓ Tested
Return all rows tied for the maximum in a group
SQLite: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQLite✓ Tested
Set owner-only read and write permissions
C++: Replace ordinary permission bits with the requested owner permissions.
C++✓ Tested