FIND YOUR NEXT FEW LINES

Results for “compare”

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

68 snippets foundClear filters
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
GoStrings & text

Compare text ignoring case

Compare text ignoring case using a complete Go program with explicit sample inputs.

Go✓ 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
Bash ScriptsInput streams & redirection

Compare two generated sorted streams

Bash Scripts: Process substitution lets a command consume another command’s output as a file-like input.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Compare two text values

Bash Scripts: Compare two text values with a small standalone Bash program.

Bash Scripts✓ Tested
PythonText validation & encoding

Compare Unicode text without case

Python: Casefold handles more Unicode case mappings than lower for caseless comparison.

Python✓ Tested
SQLJoins & subqueries

Compare with a calculated value

Find products above the average price.

subquery✓ Tested
Linux CommandsGetting Started

Check whether two practice files match

Linux Commands: Check whether two practice files match using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
PowerShellHashtables & object records

Find differences between two collections

PowerShell: Compare-Object marks reference-only values with a left arrow and difference-only values with a right arrow.

PowerShell✓ Tested