Results for “File positioning & lifecycle”
Small, practical examples. Search by task or narrow things down below.
Stop a running container gracefully
Docker / Compose: stop sends the configured stop signal and waits before forcing termination.
Docker / Compose✓ Tested
Verify that a one-off container was removed
Docker / Compose: An automatically removed container no longer appears in an exact-name listing.
Docker / Compose✓ Tested
Wait for a container to exit
Docker / Compose: wait blocks until the container stops and prints its exit code.
Docker / Compose✓ Tested
Append a line while keeping earlier content
PowerShell: Add-Content appends using an explicitly selected encoding.
PowerShell✓ Tested
Calculate a lexical relative path
C++: lexically_relative compares path components without requiring the paths to exist.
C++✓ Tested
Cancel an asynchronous operation on unmount
Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.
React✓ Tested
Center a fixed-size absolute child with auto margins
CSS: An all-zero inset plus auto margins distributes the available space around the child.
CSS✓ Tested
Change a path’s extension
Change a path’s extension in a complete Rust program using the standard library.
Rust✓ Tested
Choose Bash with pipefail for build commands
Docker / Compose: SHELL changes the interpreter for subsequent shell-form instructions.
Docker / Compose✓ Tested
Choose which overlapping box receives a pointer
CSS: Z-index controls the stack level of these positioned sibling elements.
CSS✓ Tested
Clean up a subscription when a child unmounts
Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.
React✓ Tested
Clean up a temporary directory automatically
Python: Use TemporaryDirectory as a context manager so cleanup also happens after exceptions.
Python✓ Tested