Results for “Errors & optional values”
Small, practical examples. Search by task or narrow things down below.
Reject infinite and NaN numeric values
C++: std::isfinite excludes special floating-point values.
C++✓ Tested
Reject NaN and infinite values
PowerShell: Double.IsFinite excludes numeric values unsuitable for ordinary bounded calculations.
PowerShell✓ Tested
Reject NaN and infinite values
C: isfinite detects whether a floating-point value is an ordinary finite number.
C✓ Tested
Reject nonfinite floating-point values
Java: Double.isFinite excludes both infinity and NaN.
Java✓ Tested
Remove an optional attribute entirely
jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.
jQuery✓ Tested
Remove an optional hashtable entry
PowerShell: Remove changes the map in place without changing unrelated entries.
PowerShell✓ Tested
Remove an optional prefix
Remove an optional prefix using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove duplicate result values
SQL: Use DISTINCT when repeated category values are not useful.
SQL✓ Tested
Remove duplicate result values
SQL Server: Use DISTINCT when repeated category values are not useful.
SQL Server✓ Tested
Remove duplicate result values
Postgres: Use DISTINCT when repeated category values are not useful.
Postgres✓ Tested
Remove duplicate result values
SQLite: Use DISTINCT when repeated category values are not useful.
SQLite✓ Tested
Remove duplicate values
Use LINQ Distinct and OrderBy for a sorted C# result.
C#✓ Tested