Results for “while”
Small, practical examples. Search by task or narrow things down below.
Remove duplicate values with a Set
Keep the first occurrence order while deduplicating.
Set✓ Tested
Remove duplicates from a list
Remove repeated hashable values while preserving the order in which they first appeared.
list✓ Tested
Remove one array element and close the gap
C: memmove handles the overlap while the logical length shrinks by one.
C✓ Tested
Remove one network attachment
Docker / Compose: network disconnect removes the specified attachment while retaining the container.
Docker / Compose✓ Tested
Rename a container without recreating it
Docker / Compose: rename updates the container name while preserving its identity.
Docker / Compose✓ Tested
Repeat until a condition becomes true
Bash Scripts: An until loop continues while its test returns a nonzero status.
Bash Scripts✓ Tested
Report progress before completion
jQuery: notify calls registered progress handlers while the deferred is pending.
jQuery✓ Tested
Represent removed and inserted text
HTML: Del and ins record a textual change while retaining both versions in the document.
HTML✓ Tested
Restart an existing container
Docker / Compose: restart starts the same container again while retaining its writable layer.
Docker / Compose✓ Tested
Return the first item with a generic function
Preserve the element type while allowing empty arrays.
generics✓ 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
Run a one-off container
Run a command and remove its stopped container automatically.
run✓ Tested