Results for “read-only”
Small, practical examples. Search by task or narrow things down below.
Protect shared mutable state with a mutex
Protect shared mutable state with a mutex in a complete Rust program using the standard library.
Rust✓ Tested
Send a value through a channel
Send a value through a channel in a complete Rust program using the standard library.
Rust✓ Tested
Share immutable data with Arc
Share immutable data with Arc in a complete Rust program using the standard library.
Rust✓ Tested
Split a line into named fields
Read a simple delimiter-separated line into variables.
read✓ Tested
Update an atomic counter
Update an atomic counter in a complete Rust program using the standard library.
Rust✓ Tested
Combine matching rows with INNER JOIN
Read product names with their matching stock values.
INNER JOIN✓ Tested
Compare a value with a limit
C#: Turn a comparison into a readable yes or no result.
C#✓ Tested
Compute a generated column
Store inputs and derive a value from them.
generated column✓ Tested
Copy a file without overwriting
C#: File.Copy defaults to refusing a destination that already exists.
C#✓ Tested
Count the items in a collection
C#: Read the collection’s length instead of hard-coding the loop limit.
C#✓ Tested
Create nested folders
Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.
directory✓ Tested
Enumerate the items of a JSON array
C#: Dispose JsonDocument after reading its elements.
C#✓ Tested