FIND YOUR NEXT FEW LINES

Results for “read-only”

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

990 snippets foundClear filters
Bash ScriptsDiagnostics & defensive scripting

Distinguish an empty input line from end of input

Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.

Bash Scripts✓ Tested
PythonGetting Started

Explain a calculation with a comment

Python: Keep the code executable while documenting why a fixed input is used.

Python✓ Tested
JavaGetting Started

Explain a calculation with a comment

Java: Keep the code executable while documenting why a fixed input is used.

Java✓ Tested
JavaScriptGetting Started

Explain a calculation with a comment

JavaScript: Keep the code executable while documenting why a fixed input is used.

JavaScript✓ Tested
TypeScriptGetting Started

Explain a calculation with a comment

TypeScript: Keep the code executable while documenting why a fixed input is used.

TypeScript✓ Tested
C++Getting Started

Explain a calculation with a comment

C++: Keep the code executable while documenting why a fixed input is used.

C++✓ Tested
CGetting Started

Explain a calculation with a comment

C: Keep the code executable while documenting why a fixed input is used.

C✓ Tested
ReactComponents & props

Forward input props to a reusable field

Forward input props to a reusable field with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CSerial protocols

Handle incomplete serial input

Arduino / C: The returned byte count distinguishes a complete payload from a timed-out partial one.

Arduino / C✓ Tested
CSSType & reading flow

Increase spacing between words

CSS: Word-spacing adds to the font’s normal space width.

CSS✓ Tested
CSSVisual treatment & accessibility

Keep a label available without occupying visible layout space

CSS: A clipped one-pixel label remains the input’s accessible name.

CSS✓ Tested
CSSType & reading flow

Lay out a short label in a vertical writing mode

CSS: Writing-mode changes the direction in which lines and inline content are laid out.

CSS✓ Tested