Results for “read only”
Small, practical examples. Search by task or narrow things down below.
Handle three possible outcomes
C++: Check high, normal and low values with an ordered conditional chain.
C++✓ Tested
Hash a UTF-8 value with SHA-256
C#: Use SHA256.HashData for a one-shot content digest.
C#✓ Tested
Identify a commit exactly at a release tag
Git: Describe with exact-match refuses to invent a label for a later commit.
Git✓ Tested
Ignore a personal scratch file without changing shared rules
Git: The repository-local exclude file applies only to this checkout.
Git✓ Tested
Ignore generated files
Exclude build output from untracked-file listings.
gitignore✓ Tested
Implement a method on a struct
Implement a method on a struct in a complete Rust program using the standard library.
Rust✓ Tested
Include untracked files in a stash
Git: The include-untracked option saves new files along with tracked edits.
Git✓ Tested
Increment a shared counter atomically
C#: Interlocked performs an indivisible update without a separate lock for this operation.
C#✓ Tested
Increment a shared counter safely
C++: Atomic increments prevent lost updates when two threads change the same counter.
C++✓ Tested
Increment a stored value in the database
SQL: An in-database arithmetic update avoids a separate application read-modify-write step.
SQL✓ Tested
Increment a stored value in the database
SQL Server: An in-database arithmetic update avoids a separate application read-modify-write step.
SQL Server✓ Tested
Increment a stored value in the database
Postgres: An in-database arithmetic update avoids a separate application read-modify-write step.
Postgres✓ Tested