FIND YOUR NEXT FEW LINES

Results for “Sensor calculations”

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

83 snippets foundClear filters
PostgresReporting & grouped calculations

Count rows satisfying separate conditions

Postgres: SUM over CASE expressions calculates several conditional counts in one scan.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Count rows satisfying separate conditions

SQLite: SUM over CASE expressions calculates several conditional counts in one scan.

SQLite✓ Tested
JavaPrecise numeric calculations

Detect integer addition overflow

Java: Math.addExact throws rather than silently wrapping on overflow.

Java✓ Tested
JavaPrecise numeric calculations

Display an integer as unsigned

Java: Use unsigned conversion methods when interpreting a fixed-width bit pattern.

Java✓ Tested
SQLReporting & grouped calculations

Distinguish row count from non-null value count

SQL: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Distinguish row count from non-null value count

SQL Server: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Distinguish row count from non-null value count

Postgres: COUNT(*) includes every row while COUNT(column) skips NULL values.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Distinguish row count from non-null value count

SQLite: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQLite✓ Tested
JavaPrecise numeric calculations

Divide decimal values with controlled precision

Java: Choose both scale and rounding for a quotient that does not terminate in base ten.

Java✓ Tested
JavaPrecise numeric calculations

Divide negative integers with floor rounding

Java: floorDiv and floorMod provide consistent floor-based quotient and remainder.

Java✓ Tested
SQLReporting & grouped calculations

Filter rows before grouping

SQL: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Filter rows before grouping

SQL Server: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.

SQL Server✓ Tested