FIND YOUR NEXT FEW LINES

Results for “argument”

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

54 snippets foundClear filters
Bash ScriptsArguments & decisions

Repeat until a condition becomes true

Bash Scripts: An until loop continues while its test returns a nonzero status.

Bash Scripts✓ Tested
Bash ScriptsArguments & decisions

Skip selected iterations in a loop

Bash Scripts: Continue starts the next iteration without running the remaining loop body.

Bash Scripts✓ Tested
Bash ScriptsArguments & decisions

Stop a search loop at the first match

Bash Scripts: Break exits the current loop as soon as the desired item is found.

Bash Scripts✓ Tested
jQueryCollections & styling

Apply classes from explicit Boolean state

jQuery: The second toggleClass argument applies a known state consistently.

jQuery✓ Tested
PythonFunctions & error handling

Cache repeated pure function calls

Python: Use lru_cache to avoid recomputing results for identical hashable arguments.

Python✓ Tested
PythonFunctions & error handling

Capture a successful child-process result

Python: Run an argument list without a shell and check the return code.

Python✓ Tested
PowerShellFunctions & parameter validation

Enforce a numeric range at a function boundary

PowerShell: ValidateRange performs argument validation before work begins.

PowerShell✓ Tested
C++Text validation & parsing

Extract a substring with an explicit count

C++: The second substr argument is a length rather than an ending index.

C++✓ Tested
jQueryCollections & styling

Find an element’s position among siblings

jQuery: index without arguments reports a zero-based sibling position.

jQuery✓ Tested
SQL ServerDates & text

Find the final day of a month

Use EOMONTH without manually calculating month length.

EOMONTH✓ Tested
Bash ScriptsText parsing & arithmetic

Format a numeric label with leading zeroes

Bash Scripts: Use a constant printf format string and supply values as separate arguments.

Bash Scripts✓ Tested
PostgresDates & series

Generate a sequence of numbers

Create rows without a stored table.

generate_series✓ Tested