FIND YOUR NEXT FEW LINES

Results for “Records & reliable control flow”

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

215 snippets foundClear filters
PowerShellHashtables & object records

Check for a hashtable key before reading it

PowerShell: ContainsKey distinguishes a missing key from a key whose value happens to be null.

PowerShell✓ Tested
CNumeric parsing & arithmetic

Check positive integer addition before performing it

C: Check the upper boundary before adding two known nonnegative integers.

C✓ Tested
Linux CommandsSorting & joining records

Check whether a file is already sorted

Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.

Linux Commands✓ Tested
CSSBox dimensions & overflow

Clip content that exceeds a fixed-height box

CSS: Overflow hidden clips the painted content while the full content remains in the DOM.

CSS✓ Tested
PowerShellHashtables & object records

Construct a record with named properties

PowerShell: PSCustomObject gives downstream pipeline commands meaningful property names.

PowerShell✓ Tested
PowerShellHashtables & object records

Convert an object’s properties into a hashtable

PowerShell: Enumerate PSObject.Properties when the set of property names is known only at runtime.

PowerShell✓ Tested
Linux CommandsSorting & joining records

Count repeated lines after sorting

Linux Commands: Group identical lines before uniq -c, then normalize its leading padding.

Linux Commands✓ Tested
CSSType & reading flow

Display a label in uppercase without changing its text

CSS: Text-transform changes visual casing while preserving the DOM’s source text.

CSS✓ Tested
CSSBox dimensions & overflow

Enforce a minimum width

CSS: Min-width can prevent a declared smaller width from taking effect.

CSS✓ Tested
PowerShellHashtables & object records

Enumerate hashtable entries in a stable order

PowerShell: Sort entries by key when predictable output matters.

PowerShell✓ Tested
CSSGrid placement

Fill grid rows before moving to the next column

CSS: Column auto-flow fills the explicitly declared rows in each successive implicit column.

CSS✓ Tested
PowerShellHashtables & object records

Find differences between two collections

PowerShell: Compare-Object marks reference-only values with a left arrow and difference-only values with a right arrow.

PowerShell✓ Tested