FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
C++Tasks & synchronization

Increment a shared counter safely

C++: Atomic increments prevent lost updates when two threads change the same counter.

C++✓ Tested
SQLBulk changes & set operations

Increment a stored value in the database

SQL: An in-database arithmetic update avoids a separate application read-modify-write step.

SQL✓ Tested
SQL ServerBulk changes & set operations

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
PostgresBulk changes & set operations

Increment a stored value in the database

Postgres: An in-database arithmetic update avoids a separate application read-modify-write step.

Postgres✓ Tested
SQLiteBulk changes & set operations

Increment a stored value in the database

SQLite: An in-database arithmetic update avoids a separate application read-modify-write step.

SQLite✓ Tested
CDynamic memory & ownership

Initialize a byte buffer to zero

C: memset initializes each byte to the chosen unsigned-char value.

C✓ Tested
ReactState & reducers

Initialize state lazily

Initialize state lazily with a small React component and explicit browser behavior.

React✓ Tested
CStructures & function interfaces

Initialize structure fields by name

C: Designated initializers make field assignments independent of their declaration order.

C✓ Tested
ReactAsync work & status

Inject a data loader into a component

Inject a data loader into a component with a small React component and explicit browser behavior.

React✓ Tested
C++Containers & compound values

Insert a map value only when a key is absent

C++: try_emplace preserves the old value when insertion does not take place.

C++✓ Tested
CArray transformations

Insert into an array with spare capacity

C: Move the trailing elements before inserting and keep the logical length separate from capacity.

C✓ Tested
SQLBulk changes & set operations

Insert only keys absent from a destination

SQL: NOT EXISTS supports a set-based missing-row insert in a single-writer example.

SQL✓ Tested