Results for “point”
Small, practical examples. Search by task or narrow things down below.
Compare floating-point results with a tolerance
Java: For this bounded example, compare the absolute difference against a chosen error threshold.
Java✓ Tested
Compare small floating-point results with a tolerance
C: Use an absolute difference threshold for this known bounded magnitude.
C✓ Tested
Count Unicode code points
Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.
Java✓ Tested
Count Unicode code points
Count Unicode code points using a complete Go program with explicit sample inputs.
Go✓ Tested
Count Unicode code points in a string
JavaScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.
JavaScript✓ Tested
Count Unicode code points in a string
TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.
TypeScript✓ Tested
Dispatch a command through function pointers
Arduino / C: A small function table can map validated command indices to actions.
Arduino / C✓ Tested
Enumerate Unicode code points
C#: EnumerateRunes combines surrogate pairs into Unicode scalar values.
C#✓ Tested
Interpolate between two calibration points
Arduino / C: Compute a fractional position before scaling to the output interval.
Arduino / C✓ Tested
Mutate a struct through a pointer receiver
Mutate a struct through a pointer receiver using a complete Go program with explicit sample inputs.
Go✓ Tested
Override an image’s entrypoint at runtime
Docker / Compose: An explicit entrypoint replaces the image entrypoint for this invocation.
Docker / Compose✓ Tested
Override the image entrypoint in Compose
Docker / Compose: entrypoint and command combine as executable and arguments.
Docker / Compose✓ Tested