FIND YOUR NEXT FEW LINES

Results for “Encoding & structured values”

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

391 snippets foundClear filters
Arduino / CSerial communication

Print a floating-point value with fixed precision

Choose the number of decimal places in serial output.

float✓ Tested
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested
jQueryTraversal & selection

Read checked options

Collect checked checkbox values with jQuery map and get.

jQuery✓ Tested
PythonFile operations & archives

Read compressed text directly

Python: Open gzip data in text mode with an explicit encoding.

Python✓ Tested
PowerShellText & data

Read rows from CSV text

Parse CSV into objects with named properties.

CSV✓ Tested
C#Dates & precise numbers

Reject infinity and NaN

C#: Double.IsFinite distinguishes usable finite numeric inputs from special values.

C#✓ Tested
Arduino / CSensor calculations

Reject one outlier with a median-of-three filter

Arduino / C: Sorting three values leaves the median in the middle.

Arduino / C✓ Tested
Bash ScriptsArray operations

Remove an indexed element and compact the array

Bash Scripts: Unsetting an element leaves a gap; reassigning the values creates consecutive indices.

Bash Scripts✓ Tested
PythonCollections

Remove duplicates from a list

Remove repeated hashable values while preserving the order in which they first appeared.

list✓ Tested
Arduino / CSensor calculations

Represent a decimal quantity with a scaled integer

Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.

Arduino / C✓ Tested
CStructures & function interfaces

Represent a small set of named states

C: An enum gives symbolic names to integer state values.

C✓ Tested
HTMLForm behavior

Restore controls to their initial form defaults

HTML: A reset button restores default values rather than clearing every control.

HTML✓ Tested