Results for “as”
Small, practical examples. Search by task or narrow things down below.
Keep exec-form arguments literal
Docker / Compose: JSON exec form does not expand shell environment variables.
Docker / Compose✓ Tested
Keep function state between calls
C: A static local variable retains its stored value for the lifetime of the process.
C✓ Tested
Keep only the most recent items
Python: Use a bounded deque to discard the oldest item as new values arrive.
Python✓ Tested
Keep only values satisfying a condition
Keep only values satisfying a condition in a complete Rust program using the standard library.
Rust✓ Tested
Keep parent rows while filtering joined children
SQL: Put a child filter in ON when unmatched parents must remain in the result.
SQL✓ Tested
Keep parent rows while filtering joined children
SQL Server: Put a child filter in ON when unmatched parents must remain in the result.
SQL Server✓ Tested
Keep parent rows while filtering joined children
Postgres: Put a child filter in ON when unmatched parents must remain in the result.
Postgres✓ Tested
Keep parent rows while filtering joined children
SQLite: Put a child filter in ON when unmatched parents must remain in the result.
SQLite✓ Tested
Keep rows matching a condition
SQL: Use WHERE to select rows with a particular category.
SQL✓ Tested
Keep rows matching a condition
SQL Server: Use WHERE to select rows with a particular category.
SQL Server✓ Tested
Keep spaces inside one argument
Linux Commands: Keep spaces inside one argument using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Keep unmatched rows with LEFT JOIN
Show every product even when stock is missing.
LEFT JOIN✓ Tested