FIND YOUR NEXT FEW LINES

Results for “read only”

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

990 snippets foundClear filters
PythonDates & time zones

Read an ISO week number

Python: Use isocalendar because ISO week years can differ from calendar years near January.

Python✓ Tested
JavaDates & time zones

Read an ISO week year and week number

Java: Use ISO week fields together because a week can belong to the previous calendar year.

Java✓ Tested
JavaScriptUTC date operations

Read an ISO-style weekday number

JavaScript: Convert Sunday from zero to seven when using Monday-through-Sunday numbering.

JavaScript✓ Tested
TypeScriptUTC date operations

Read an ISO-style weekday number

TypeScript: Convert Sunday from zero to seven when using Monday-through-Sunday numbering.

TypeScript✓ Tested
JavaScriptObject behavior & collections

Read an object’s own enumerable values

JavaScript: Object.values provides values without their corresponding keys.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Read an object’s own enumerable values

TypeScript: Object.values provides values without their corresponding keys.

TypeScript✓ Tested
Bash ScriptsArray operations

Read an optional associative-array entry

Bash Scripts: Use a fallback expansion when a map key may not be present under nounset.

Bash Scripts✓ Tested
PythonMappings & sets

Read an optional dictionary key

Python: Use get with a fallback while leaving the dictionary unchanged.

Python✓ Tested
AngularTemplates & bindings

Read an optional nested value

Read an optional nested value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactRefs & DOM interaction

Read an uncontrolled field through a ref

Read an uncontrolled field through a ref with a small React component and explicit browser behavior.

React✓ Tested
ReactForms & validation

Read an uncontrolled form with FormData

Read an uncontrolled form with FormData with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CDigital signals & interrupts

Read an unpressed button with an internal pull-up

Arduino / C: An open input configured with INPUT_PULLUP reads high.

Arduino / C✓ Tested