Results for “Restoring & revising local work”
Small, practical examples. Search by task or narrow things down below.
Return two values from a function
Return two values from a function using a complete Go program with explicit sample inputs.
Go✓ Tested
Reveal a collapsed panel with a slide
jQuery: slideDown animates the panel’s vertical dimensions.
jQuery✓ Tested
Reverse slice order
Reverse slice order using a complete Go program with explicit sample inputs.
Go✓ Tested
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Round down to a whole minute
Round down to a whole minute using a complete Go program with explicit sample inputs.
Go✓ Tested
Run a command in a running container
Execute an additional process inside an existing container.
exec✓ Tested
Run a Compose service as a non-root user
Docker / Compose: user overrides the image’s default identity.
Docker / Compose✓ Tested
Run a one-off container
Run a command and remove its stopped container automatically.
run✓ Tested
Run a one-off process with a numeric user ID
Docker / Compose: The user option overrides the image’s default identity.
Docker / Compose✓ Tested
Run a process as an unprivileged user
Docker / Compose: Run a process as an unprivileged user using a locally available Ubuntu image.
Docker / Compose✓ Tested
Run a task on a thread and join it
C++: Join before reading a result written by the worker thread.
C++✓ 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