Results for “ratio”
Small, practical examples. Search by task or narrow things down below.
Name a value that stays fixed
C++: Use a constant declaration or the language’s constant naming convention for a fixed limit.
C++✓ Tested
Name a value that stays fixed
C: Use a constant declaration or the language’s constant naming convention for a fixed limit.
C✓ Tested
Observe cancellation through a token
C#: A cancellation token is cooperative; operations must check it or accept it as an argument.
C#✓ Tested
Process a first-in first-out queue
C++: Queue exposes its front item separately from the operation that removes it.
C++✓ Tested
Pull without creating a merge commit
Update a branch only when its upstream can be fast-forwarded.
pull✓ Tested
Push a new branch and set its upstream
Connect a feature branch with its remote counterpart.
push✓ Tested
Read a file from the parent commit
Git: HEAD~1 names the first parent one generation before HEAD.
Git✓ Tested
Read named fields from a successful regex match
PowerShell: The Matches table is updated after a successful scalar match operation.
PowerShell✓ Tested
Rename a configured remote
Git: Renaming a remote updates its associated configuration and remote-tracking references.
Git✓ Tested
Repeat while a condition holds
Python: Count down while a positive number remains, updating the loop variable on each iteration.
Python✓ Tested
Repeat while a condition holds
C#: Count down while a positive number remains, updating the loop variable on each iteration.
C#✓ Tested
Repeat while a condition holds
Java: Count down while a positive number remains, updating the loop variable on each iteration.
Java✓ Tested