Results for “Binary values & packets”
Small, practical examples. Search by task or narrow things down below.
Restore controls to their initial form defaults
HTML: A reset button restores default values rather than clearing every control.
HTML✓ Tested
Restrict a function parameter to known choices
PowerShell: ValidateSet rejects unsupported values before the function body executes.
PowerShell✓ Tested
Return a value from a switch expression
Java: Use an exhaustive switch expression with a fallback for other input values.
Java✓ Tested
Return an inserted row
Read generated data directly from INSERT.
RETURNING✓ Tested
Round a decimal with an explicit rule
Java: Construct BigDecimal from text to avoid importing a binary floating-point approximation.
Java✓ Tested
Round decimal amounts explicitly
Python: Build Decimal values from strings and choose a rounding rule explicitly.
Python✓ Tested
Select an inclusive range
Find rows with values between two endpoints.
BETWEEN✓ Tested
Separate records into two lists
Python: Build two explicit partitions so callers can use both matching and rejected values.
Python✓ Tested
Set several selected options
jQuery: Passing an array to val selects matching values in a multiple select.
jQuery✓ Tested
Sort a vector
Sort C++ integer values in ascending order.
C++✓ Tested
Sort timestamp strings by their parsed instants
JavaScript: Compare epoch values explicitly when date strings may contain different offsets.
JavaScript✓ Tested
Sort timestamp strings by their parsed instants
TypeScript: Compare epoch values explicitly when date strings may contain different offsets.
TypeScript✓ Tested