Results for “value”
Small, practical examples. Search by task or narrow things down below.
Return multiple named values from a method
C#: Named value tuples give lightweight field names without a separate class.
C#✓ Tested
Return two values from a function
Return two values from a function using a complete Go program with explicit sample inputs.
Go✓ Tested
Round a halfway floating-point value
C: The C round function rounds halfway cases away from zero.
C✓ Tested
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Round halfway floating-point values away from zero
C++: std::round has an explicit halfway rule different from truncation.
C++✓ Tested
Scale a value from the root font size
CSS: Rem units follow the document root instead of accumulating through nested font sizes.
CSS✓ Tested
Select the first pipeline values
PowerShell: Select the first pipeline values using PowerShell 7.
PowerShell✓ Tested
Select the highest values with TOP
Limit an ordered SQL Server result.
TOP✓ Tested
Select the largest values without sorting everything
Python: Use heapq.nlargest when only a small prefix of the ranking is required.
Python✓ Tested
Select values in an inclusive range
SQL: BETWEEN includes both endpoints of the range.
SQL✓ Tested
Select values in an inclusive range
SQL Server: BETWEEN includes both endpoints of the range.
SQL Server✓ Tested
Select values in an inclusive range
Postgres: BETWEEN includes both endpoints of the range.
Postgres✓ Tested