FIND YOUR NEXT FEW LINES

Results for “C++”

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

3000 snippets foundClear filters
SQLiteText cleanup & matching

Treat an empty trimmed value as missing

SQLite: NULLIF converts an empty string to NULL before a fallback is applied.

SQLite✓ Tested
C#Strings

Try parsing an integer

Use TryParse to avoid exceptions for invalid C# integer input.

C#✓ Tested
CSSGetting Started

Underline meaningful text

CSS: Learn how to underline meaningful text in a complete browser example.

CSS✓ Tested
Arduino / CGetting Started

Understand setup() and loop()

Arduino / C: See initialization run once and the main loop run repeatedly.

Arduino / C✓ Tested
SQLSchema design & transactions

Undo only the work after a savepoint

SQL: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

SQL✓ Tested
SQL ServerSchema design & transactions

Undo only the work after a savepoint

SQL Server: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

SQL Server✓ Tested
PostgresSchema design & transactions

Undo only the work after a savepoint

Postgres: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

Postgres✓ Tested
SQLiteSchema design & transactions

Undo only the work after a savepoint

SQLite: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

SQLite✓ Tested
GitWorking tree & staging

Unstage a file without losing edits

Return a staged change to the working tree.

restore✓ Tested
ReactState & reducers

Update one array item by its identifier

Update one array item by its identifier with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Update state from its previous value

Update state from its previous value with a small React component and explicit browser behavior.

React✓ Tested
JavaQueues & collection operations

Use a deque as a FIFO queue

Java: Add at the tail and remove at the head using ArrayDeque.

Java✓ Tested