FIND YOUR NEXT FEW LINES
Results for “Errors & optional values”
Small, practical examples. Search by task or narrow things down below.
354 snippets foundClear filters
Store an object associated with an element
jQuery: data retains JavaScript values without serializing them into HTML attributes.
jQuery✓ Tested
Trim and discard blank lines
JavaScript: Split a text block, trim each line, and keep nonempty values.
JavaScript✓ Tested
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested
Use a fallback for a missing hashtable entry
PowerShell: Test the key explicitly so legitimate false or zero values are preserved.
PowerShell✓ Tested
Validate a complete floating-point input
C: strtod exposes both the stopping position and range errors; reject nonfinite results when required.
C✓ Tested
Write object records to a CSV file
PowerShell: Export-Csv uses property names as headers and quotes values when needed.
PowerShell✓ Tested