FIND YOUR NEXT FEW LINES

Results for “bit”

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

45 snippets foundClear filters
Linux CommandsFiles & permissions

Make a script executable by its owner

Linux Commands: Add the owner execute bit without replacing all permission bits.

Linux Commands✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested
Arduino / CSerial communication

Print a floating-point value with fixed precision

Choose the number of decimal places in serial output.

float✓ Tested
JavaRecords & reliable control flow

Represent a finite set of states

Java: Use an enum to prevent arbitrary strings from representing application states.

Java✓ Tested
SQLSubqueries & ranked selection

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
SQL ServerSubqueries & ranked selection

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
PostgresSubqueries & ranked selection

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
SQLiteSubqueries & ranked selection

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
C++Filesystem operations

Set owner-only read and write permissions

C++: Replace ordinary permission bits with the requested owner permissions.

C++✓ Tested