FIND YOUR NEXT FEW LINES

Results for “at”

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

2630 snippets foundClear filters
Bash ScriptsFiles & reliability

Replace a text file with an atomic rename

Prepare new content beside the target before renaming it into place.

atomic write✓ Tested
JavaScriptStrings

Replace all literal matches

Replace repeated substrings with JavaScript replaceAll.

JavaScript✓ Tested
PostgresWindows & text

Replace all matching text

Normalize repeated whitespace with a regular expression.

regexp_replace✓ Tested
CFile positioning & lifecycle

Replace bytes at a known position in a binary file

C: Open in update mode and seek before writing a fixed-size replacement.

C✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
C++Strings

Replace the first match

Find and replace one literal substring in C++.

C++✓ Tested
SQLSubqueries & ranked selection

Report duplicate business values and their frequency

SQL: Group by a candidate business key and retain only groups with multiple rows.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Report duplicate business values and their frequency

SQL Server: Group by a candidate business key and retain only groups with multiple rows.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Report duplicate business values and their frequency

Postgres: Group by a candidate business key and retain only groups with multiple rows.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Report duplicate business values and their frequency

SQLite: Group by a candidate business key and retain only groups with multiple rows.

SQLite✓ Tested
JavaRecords & reliable control flow

Represent a finite set of states

Java: Use an enum to prevent arbitrary strings from representing application states.

Java✓ Tested
PythonStructured data & serialization

Represent a record with a dataclass

Python: Generate initialization and convert a typed record to a dictionary.

Python✓ Tested