Results for “os”
Small, practical examples. Search by task or narrow things down below.
Fit as many columns as possible
Use auto-fit and minmax for a CSS grid that responds to its available width.
CSS✓ Tested
Force a disposable container to stop
Docker / Compose: kill sends SIGKILL by default without a graceful shutdown interval.
Docker / Compose✓ Tested
Generate combinations across two collections
Python: Use product for a Cartesian product; this differs from selecting combinations within one collection.
Python✓ Tested
Give a function its own positional parameters
Bash Scripts: A function receives its call arguments without replacing the caller’s positional parameters.
Bash Scripts✓ Tested
Grow an allocation without losing it on failure
C: Assign realloc to a temporary pointer so the original allocation remains available if growth fails.
C✓ 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
Handle three possible outcomes
C++: Check high, normal and low values with an ordered conditional chain.
C++✓ Tested
Handle three possible outcomes
C: Check high, normal and low values with an ordered conditional chain.
C✓ Tested