Results for “while”
Small, practical examples. Search by task or narrow things down below.
Uncommit the latest local change while keeping it staged
Git: A soft reset moves the branch tip but preserves both index and working files.
Git✓ Tested
Unstage a file while keeping its contents
Git: Unstage a file while keeping its contents inside the disposable repository created by the input setup.
Git✓ Tested
Use a build argument while creating an image
Docker / Compose: ARG supplies a build-time value that is not automatically a runtime environment variable.
Docker / Compose✓ Tested
Count down with a bounded loop
Arduino / C: Count down with a bounded loop on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Read a file without losing its last line
Handle spaces, backslashes, and a final line without a newline.
read lines✓ Tested
Read values until a condition changes
Read values until a condition changes in a complete Rust program using the standard library.
Rust✓ Tested
Use a condition-only for loop
Use a condition-only for loop using a complete Go program with explicit sample inputs.
Go✓ Tested
Add a calculated property during selection
PowerShell: A calculated property can derive a value while retaining selected original properties.
PowerShell✓ Tested
Add an optional field to an existing table
SQL: A nullable column permits existing rows to remain valid while data is filled later.
SQL✓ Tested
Add an optional field to an existing table
SQL Server: A nullable column permits existing rows to remain valid while data is filled later.
SQL Server✓ Tested
Add an optional field to an existing table
Postgres: A nullable column permits existing rows to remain valid while data is filled later.
Postgres✓ Tested
Add an optional field to an existing table
SQLite: A nullable column permits existing rows to remain valid while data is filled later.
SQLite✓ Tested