Results for “os”
Small, practical examples. Search by task or narrow things down below.
Replace bytes at a known position in a binary file
C: Open in update mode and seek before writing a fixed-size replacement.
C✓ Tested
Represent progress whose total is unknown
HTML: Omit value to make a progress element indeterminate.
HTML✓ Tested
Require numeric values on a chosen step
HTML: The step interval is measured from the minimum value when one is provided.
HTML✓ Tested
Restrict a diff to one chosen path
Git: Use the double dash separator to distinguish a filename from revisions or options.
Git✓ Tested
Rotate a sequence around a selected position
C++: rotate places the element at the middle iterator first while preserving the two segment orders.
C++✓ Tested
Round a decimal with a chosen midpoint rule
PowerShell: Use decimal input and an explicit rounding policy for a reproducible decimal result.
PowerShell✓ Tested
Run a Compose service as a non-root user
Docker / Compose: user overrides the image’s default identity.
Docker / Compose✓ Tested
Run a Compose service as a numeric user
Docker / Compose: Run a Compose service as a numeric user in a small Compose file.
Docker / Compose✓ Tested
Run a task on an executor and close it
Java: Java 21 ExecutorService supports try-with-resources to shut down after submitted work.
Java✓ Tested
Run your first disposable container
Docker / Compose: Run your first disposable container using a locally available Ubuntu image.
Docker / Compose✓ Tested
Select an element by zero-based position
jQuery: eq returns a jQuery collection containing the selected index.
jQuery✓ Tested
Separate prose into paragraphs
HTML: Learn how to separate prose into paragraphs in a complete browser example.
HTML✓ Tested