FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
TypeScriptPromises & iteration protocols

Run cleanup after a promise settles

TypeScript: finally runs after success or failure and normally preserves the original outcome.

TypeScript✓ Tested
CSmall algorithms & bit operations

Sum the decimal digits of an unsigned integer

C: Repeated division and remainder extract digits without converting to text.

C✓ Tested
CSmall algorithms & bit operations

Test whether an unsigned value is a power of two

C: A nonzero power of two has exactly one set bit.

C✓ Tested
JavaScriptFiles & async

Wait for multiple promises

Use Promise.all to collect JavaScript results in input order.

JavaScript✓ Tested
jQueryDeferred work & queues

Wait for several deferred values

jQuery: when resolves only after every supplied deferred has resolved.

jQuery✓ Tested
jQueryInsertion & wrapping

Wrap a collection in one shared parent

jQuery: wrapAll places all selected elements inside one wrapper.

jQuery✓ Tested
Docker / ComposeCompose service options

Add a fixed hostname mapping

Docker / Compose: extra_hosts adds an entry to the container’s hosts file.

Docker / Compose✓ Tested
SQLSchema design & transactions

Add an optional field to an existing table

SQL: A nullable column permits existing rows to remain valid while data is filled later.

SQL✓ Tested
SQL ServerSchema design & transactions

Add an optional field to an existing table

SQL Server: A nullable column permits existing rows to remain valid while data is filled later.

SQL Server✓ Tested
PostgresSchema design & transactions

Add an optional field to an existing table

Postgres: A nullable column permits existing rows to remain valid while data is filled later.

Postgres✓ Tested
SQLiteSchema design & transactions

Add an optional field to an existing table

SQLite: A nullable column permits existing rows to remain valid while data is filled later.

SQLite✓ Tested
C++Containers & compound values

Add and remove values at both ends

C++: Deque supports efficient end operations without requiring contiguous storage.

C++✓ Tested