Results for “BIN”
Small, practical examples. Search by task or narrow things down below.
Parse a bounded simple record with sscanf
C: A width limit protects the destination buffer and the consumed count detects trailing junk.
C✓ Tested
Print integers in different bases
Inspect a byte in decimal, hexadecimal, and binary.
Serial✓ Tested
Process a text file one line at a time
Java: Use a buffered reader to avoid loading a large file into memory.
Java✓ Tested
Quote a CSV field and double embedded quotes
C: A quoted CSV field represents a quote character by repeating it.
C✓ Tested
Read a big-endian integer from bytes
Read a big-endian integer from bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Read a file length in bytes
Java: Files.size inspects metadata without loading the file into a Java string.
Java✓ Tested
Read an optional JSON property safely
C#: Use TryGetProperty instead of throwing when an optional property is absent.
C#✓ Tested
Read an optional nested value
Read an optional nested value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Require every bit in a mask
Arduino / C: Masking followed by equality tests whether all required flags are set.
Arduino / C✓ Tested
Resolve a relative URI against a base
C#: Use a base URI ending in a slash when the final path component represents a directory.
C#✓ Tested
Search a sorted array efficiently
C#: Array.BinarySearch requires an array sorted with the same comparison rules.
C#✓ Tested
Search a sorted array with bsearch
C: The search uses the same ordering comparator as the sorted input.
C✓ Tested