FIND YOUR NEXT FEW LINES

Results for “Object behavior & collections”

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

631 snippets foundClear filters
HTMLTables & list numbering

Continue an ordered list at a chosen number

HTML: The start attribute controls the initial ordinal without changing item text.

HTML✓ Tested
ReactGetting Started

Control a checkbox

Control a checkbox with a small React component and explicit browser behavior.

React✓ Tested
ReactForms & validation

Control a multiline text field

Control a multiline text field with a small React component and explicit browser behavior.

React✓ Tested
AngularEvents & DOM interaction

Control a native dialog through a reference

Control a native dialog through a reference with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactForms & validation

Control a radio-button group

Control a radio-button group with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Control a select element

Control a select element with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Control a text input

Control a text input with a small React component and explicit browser behavior.

React✓ Tested
CStrings

Convert ASCII text to uppercase

Convert characters with toupper while avoiding signed-char undefined behavior.

C✓ Tested
PythonMappings & sets

Copy nested mutable data independently

Python: Use deepcopy when changes to nested lists must not affect the original object.

Python✓ Tested
PowerShellArray operations

Count a result even when it is empty or has one item

PowerShell: Wrap pipeline results in an array subexpression for consistent Count behavior.

PowerShell✓ Tested
HTMLTables & list numbering

Count an ordered list downward

HTML: The reversed attribute changes the native numbering direction.

HTML✓ Tested
PythonDates & time zones

Count days between calendar dates

Python: Subtract date objects to get an exact calendar-day difference.

Python✓ Tested