FIND YOUR NEXT FEW LINES

Results for “as”

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

2533 snippets foundClear filters
PythonNumbers & calculations

Compare floating-point calculations with tolerance

Python: Use isclose instead of exact equality for results affected by floating-point rounding.

Python✓ Tested
JavaPrecise numeric calculations

Compare floating-point results with a tolerance

Java: For this bounded example, compare the absolute difference against a chosen error threshold.

Java✓ Tested
GoTesting & reusable helpers

Compare floats within a tolerance

Compare floats within a tolerance using a complete Go program with explicit sample inputs.

Go✓ Tested
GoMaps & sets

Compare map contents

Compare map contents using a complete Go program with explicit sample inputs.

Go✓ Tested
CNumeric parsing & arithmetic

Compare small floating-point results with a tolerance

C: Use an absolute difference threshold for this known bounded magnitude.

C✓ Tested
GoTesting & reusable helpers

Compare two byte buffers

Compare two byte buffers using a complete Go program with explicit sample inputs.

Go✓ Tested
CStrings & byte buffers

Compare two C strings for equality

C: strcmp returns zero only when both null-terminated byte strings are equal.

C✓ Tested
SQLJoins & subqueries

Compare with a calculated value

Find products above the average price.

subquery✓ Tested
RustGetting Started

Compile and run your first Rust program

Compile and run your first Rust program in a complete Rust program using the standard library.

Rust✓ Tested
Linux CommandsArchives & checksums

Compress a file and keep the original

Create a gzip-compressed copy of a file while leaving the uncompressed original in place.

gzip✓ Tested
Linux CommandsArchive integrity & packaging

Compress a stream to a chosen filename

Linux Commands: Use gzip -c to leave the source file untouched and choose the destination explicitly.

Linux Commands✓ Tested
CSmall algorithms & bit operations

Compute a simple XOR checksum

C: XOR all payload bytes into one byte to demonstrate a basic error-detection field.

C✓ Tested