FIND YOUR NEXT FEW LINES

Results for “Reporting & grouped calculations”

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

91 snippets foundClear filters
JavaPrecise numeric calculations

Reject nonfinite floating-point values

Java: Double.isFinite excludes both infinity and NaN.

Java✓ Tested
Arduino / CSensor calculations

Reject one outlier with a median-of-three filter

Arduino / C: Sorting three values leaves the median in the middle.

Arduino / C✓ Tested
Arduino / CSensor calculations

Represent a decimal quantity with a scaled integer

Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.

Arduino / C✓ Tested
JavaPrecise numeric calculations

Round a decimal with an explicit rule

Java: Construct BigDecimal from text to avoid importing a binary floating-point approximation.

Java✓ Tested
PythonNumbers & calculations

Round decimal amounts explicitly

Python: Build Decimal values from strings and choose a rounding rule explicitly.

Python✓ Tested
C++Numeric parsing & calculations

Round halfway floating-point values away from zero

C++: std::round has an explicit halfway rule different from truncation.

C++✓ Tested
PythonNumbers & calculations

Select the largest values without sorting everything

Python: Use heapq.nlargest when only a small prefix of the ranking is required.

Python✓ Tested
Arduino / CSensor calculations

Smooth a sequence with an exponential filter

Arduino / C: Blend each sample with the previous filtered value.

Arduino / C✓ Tested
SQLExpressions & aggregates

Filter aggregate groups

Keep only categories with multiple products.

HAVING✓ Tested
PowerShellDates & numeric validation

Reject NaN and infinite values

PowerShell: Double.IsFinite excludes numeric values unsuitable for ordinary bounded calculations.

PowerShell✓ Tested
SQLBulk changes & set operations

Remove duplicate values while keeping the smallest key

SQL: Identify retained keys in a grouped subquery before deleting other copies.

SQL✓ Tested
SQL ServerBulk changes & set operations

Remove duplicate values while keeping the smallest key

SQL Server: Identify retained keys in a grouped subquery before deleting other copies.

SQL Server✓ Tested