FIND YOUR NEXT FEW LINES

Results for “int”

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

797 snippets foundClear filters
Arduino / CText & bounded buffers

Reject an integer with trailing characters

Arduino / C: strtol exposes an end pointer so a parser can require the entire token.

Arduino / C✓ Tested
JavaPrecise numeric calculations

Reject nonfinite floating-point values

Java: Double.isFinite excludes both infinity and NaN.

Java✓ 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
GitMerging & replaying changes

Resolve a merge by writing the intended final file

Git: After a conflict, edit the result, stage it, and finish the merge commit.

Git✓ Tested
C#Dates & precise numbers

Round a decimal using an explicit midpoint rule

C#: Use decimal literals for decimal arithmetic and choose the midpoint rounding behavior.

C#✓ Tested
PowerShellDates & numeric validation

Round a decimal with a chosen midpoint rule

PowerShell: Use decimal input and an explicit rounding policy for a reproducible decimal result.

PowerShell✓ Tested
CNumeric parsing & arithmetic

Round a halfway floating-point value

C: The C round function rounds halfway cases away from zero.

C✓ 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
ReactRefs & DOM interaction

Scroll a referenced element into view

Scroll a referenced element into view with a small React component and explicit browser behavior.

React✓ Tested
Linux CommandsGetting Started

Send command output into another command

Linux Commands: Send command output into another command using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Docker / ComposeGetting Started

Send text into a container through stdin

Docker / Compose: Send text into a container through stdin using a locally available Ubuntu image.

Docker / Compose✓ Tested
HTMLGetting Started

Separate prose into paragraphs

HTML: Learn how to separate prose into paragraphs in a complete browser example.

HTML✓ Tested