FIND YOUR NEXT FEW LINES

Results for “read-only”

Small, practical examples. Search by task or narrow things down below.

990 snippets foundClear filters
PowerShellHashtables & object records

Check for a hashtable key before reading it

PowerShell: ContainsKey distinguishes a missing key from a key whose value happens to be null.

PowerShell✓ Tested
Linux CommandsSorting & joining records

Check whether a file is already sorted

Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.

Linux Commands✓ Tested
C++Tasks & synchronization

Check whether a future is ready without blocking

C++: A zero-duration wait reports timeout until the producer sets a value.

C++✓ Tested
C++Ordering & set operations

Check whether a range is already sorted

C++: is_sorted reports ordering without modifying the input.

C++✓ Tested
C#File operations & paths

Create a file only when it does not exist

C#: FileMode.CreateNew prevents accidental replacement of existing content.

C#✓ Tested
PowerShellFile operations & integrity

Delete only a named scratch file

PowerShell: Use LiteralPath and avoid recursive removal for a single known file.

PowerShell✓ Tested
GitTags & repository configuration

Delete only a selected local tag

Git: Deleting a local tag does not delete a corresponding remote tag.

Git✓ Tested
AngularTemplate-driven forms

Enable saving only after a field changes

Enable saving only after a field changes with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonNumbers & calculations

Find the mean and median of readings

Python: Use statistics helpers to distinguish an arithmetic mean from a middle value.

Python✓ Tested
HTMLGetting Started

Give a date a machine-readable value

HTML: Learn how to give a date a machine-readable value in a complete browser example.

HTML✓ Tested
SQLGetting Started

Give a result column a readable name

SQL: Use AS to label a computed result column.

SQL✓ Tested
SQL ServerGetting Started

Give a result column a readable name

SQL Server: Use AS to label a computed result column.

SQL Server✓ Tested