Results for “ratio”
Small, practical examples. Search by task or narrow things down below.
List untracked files while honoring ignore rules
Git: Use others and exclude-standard together to respect repository and global ignore configuration.
Git✓ Tested
Look up values in an associative array
Use named keys for a small in-memory configuration table.
dictionary✓ Tested
Map items to multiple output values
JavaScript: flatMap combines mapping and a one-level flattening operation.
JavaScript✓ Tested
Map items to multiple output values
TypeScript: flatMap combines mapping and a one-level flattening operation.
TypeScript✓ Tested
Measure a short delay with micros
Measure elapsed microseconds around a short operation.
micros✓ Tested
Measure a small seekable binary file
C: Seek to the end and inspect ftell, checking both operations for errors.
C✓ Tested
Merge a branch only by fast-forward
Refuse to create an unexpected merge commit.
merge✓ Tested
Name a value that stays fixed
Python: Use a constant declaration or the language’s constant naming convention for a fixed limit.
Python✓ 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
Name a value that stays fixed
Java: Use a constant declaration or the language’s constant naming convention for a fixed limit.
Java✓ Tested
Name a value that stays fixed
JavaScript: Use a constant declaration or the language’s constant naming convention for a fixed limit.
JavaScript✓ Tested
Name a value that stays fixed
TypeScript: Use a constant declaration or the language’s constant naming convention for a fixed limit.
TypeScript✓ Tested