FIND YOUR NEXT FEW LINES

Results for “Numeric parsing & arithmetic”

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

213 snippets foundClear filters
RustGetting Started

Handle a parsing Result

Handle a parsing Result in a complete Rust program using the standard library.

Rust✓ Tested
ReactForms & validation

Keep numeric input text until conversion

Keep numeric input text until conversion with a small React component and explicit browser behavior.

React✓ Tested
HTMLInput constraints

Limit a numeric input to an inclusive range

HTML: Number inputs expose range validation separately from the entered text.

HTML✓ Tested
JavaScriptStrings

Pad a numeric label

Convert a number to text and pad it to a fixed width.

JavaScript✓ Tested
C#Text validation & encoding

Pad a numeric label to a fixed width

C#: Use a numeric format specifier to add leading zeroes.

C#✓ Tested
C#Collections & data structures

Process items by numeric priority

C#: PriorityQueue removes the item with the smallest priority value first.

C#✓ Tested
RustErrors & optional values

Propagate a parsing error with question mark

Propagate a parsing error with question mark in a complete Rust program using the standard library.

Rust✓ Tested
PythonNumbers & calculations

Reject NaN and infinite numeric inputs

Python: Use isfinite before computations that require an ordinary finite float.

Python✓ Tested
GoErrors & validation

Reject non-finite numeric input

Reject non-finite numeric input using a complete Go program with explicit sample inputs.

Go✓ Tested
HTMLInput constraints

Require numeric values on a chosen step

HTML: The step interval is measured from the minimum value when one is provided.

HTML✓ Tested
Docker / ComposeGetting Started

Run a Compose service as a numeric user

Docker / Compose: Run a Compose service as a numeric user in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeExecution & file transfer

Run a one-off process with a numeric user ID

Docker / Compose: The user option overrides the image’s default identity.

Docker / Compose✓ Tested