Results for “int”
Small, practical examples. Search by task or narrow things down below.
Sum integer values
Reduce a Java integer stream to its sum.
Java✓ Tested
Sum the decimal digits of an unsigned integer
C: Repeated division and remainder extract digits without converting to text.
C✓ Tested
Swap owned buffers by swapping their pointers
C: Pointer swaps avoid copying the underlying data.
C✓ Tested
Swap two integers
Use a temporary value to swap C integers without arithmetic overflow.
C✓ Tested
Transform a collection into a plain array
jQuery: map followed by get returns ordinary JavaScript values.
jQuery✓ Tested
Transform a vector into a separate result
C++: Pre-size the output before writing through its iterator.
C++✓ Tested
Try parsing an integer
Use TryParse to avoid exceptions for invalid C# integer input.
C#✓ Tested
Turn a condition into a result label
SQL: Use CASE to describe stock availability for each row.
SQL✓ Tested
Turn a condition into a result label
SQL Server: Use CASE to describe stock availability for each row.
SQL Server✓ Tested
Turn a condition into a result label
Postgres: Use CASE to describe stock availability for each row.
Postgres✓ Tested
Turn a condition into a result label
SQLite: Use CASE to describe stock availability for each row.
SQLite✓ Tested
Turn JSON into typed rows
Project JSON array items into SQL columns.
OPENJSON✓ Tested