Results for “exec form”
Small, practical examples. Search by task or narrow things down below.
Repeat text a fixed number of times
Java: Use String.repeat with a nonnegative repetition count.
Java✓ Tested
Require a minimum text length
Require a minimum text length with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Reset a nonnullable control to its initial value
Reset a nonnullable control to its initial value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Restore an environment value after temporary use
PowerShell: Use finally so temporary process configuration does not leak to subsequent work; remove the entry when it was originally absent.
PowerShell✓ Tested
Restore the working location after an operation
PowerShell: Push-Location and Pop-Location manage a directory stack; finally ensures restoration.
PowerShell✓ Tested
Retrieve a file from a stopped container
Docker / Compose: The writable layer remains available for docker cp after exit.
Docker / Compose✓ Tested
Rotate a nonempty array left by one element
C: Save the first item before shifting the remaining elements.
C✓ Tested
Run a command in a running container
Execute an additional process inside an existing container.
exec✓ Tested
Run a command safely for each matching file
Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.
Linux Commands✓ 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
Search a sorted array with bsearch
C: The search uses the same ordering comparator as the sorted input.
C✓ Tested
Serialize a 16-bit integer in big-endian order
C: Explicit shifts make a byte format independent of the CPU’s native byte order.
C✓ Tested