Results for “argument”
Small, practical examples. Search by task or narrow things down below.
Repeat until a condition becomes true
Bash Scripts: An until loop continues while its test returns a nonzero status.
Bash Scripts✓ Tested
Skip selected iterations in a loop
Bash Scripts: Continue starts the next iteration without running the remaining loop body.
Bash Scripts✓ Tested
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
Apply classes from explicit Boolean state
jQuery: The second toggleClass argument applies a known state consistently.
jQuery✓ Tested
Cache repeated pure function calls
Python: Use lru_cache to avoid recomputing results for identical hashable arguments.
Python✓ Tested
Capture a successful child-process result
Python: Run an argument list without a shell and check the return code.
Python✓ Tested
Enforce a numeric range at a function boundary
PowerShell: ValidateRange performs argument validation before work begins.
PowerShell✓ Tested
Extract a substring with an explicit count
C++: The second substr argument is a length rather than an ending index.
C++✓ Tested
Find an element’s position among siblings
jQuery: index without arguments reports a zero-based sibling position.
jQuery✓ Tested
Find the final day of a month
Use EOMONTH without manually calculating month length.
EOMONTH✓ Tested
Format a numeric label with leading zeroes
Bash Scripts: Use a constant printf format string and supply values as separate arguments.
Bash Scripts✓ Tested
Generate a sequence of numbers
Create rows without a stored table.
generate_series✓ Tested