Results for “condition”
Small, practical examples. Search by task or narrow things down below.
Delete one row from a practice table
SQLite: Restrict DELETE with a primary-key condition and verify the remaining row count.
SQLite✓ Tested
Filter items in a pipeline
Keep numbers that meet a condition.
Where-Object✓ Tested
Generate a bounded sequence recursively
Use a recursive CTE with a recursion limit.
recursive CTE✓ Tested
Generate numbers with a recursive CTE
Build a bounded sequence using SQL recursion.
recursive CTE✓ Tested
Handle a missing file without treating it as an empty file
C: Inspect errno after a failed fopen to distinguish the documented missing-path condition.
C✓ Tested
Handle a nonzero background-job exit
Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.
Bash Scripts✓ Tested
Handle an expected command failure
Branch on a command’s exit code without aborting the script.
exit status✓ Tested
Handle three possible outcomes
Python: Check high, normal and low values with an ordered conditional chain.
Python✓ Tested
Handle three possible outcomes
C#: Check high, normal and low values with an ordered conditional chain.
C#✓ Tested
Handle three possible outcomes
Java: Check high, normal and low values with an ordered conditional chain.
Java✓ Tested
Handle three possible outcomes
JavaScript: Check high, normal and low values with an ordered conditional chain.
JavaScript✓ Tested
Handle three possible outcomes
TypeScript: Check high, normal and low values with an ordered conditional chain.
TypeScript✓ Tested