FIND YOUR NEXT FEW LINES

Results for “z”

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

416 snippets foundClear filters
C++Tasks & synchronization

Retrieve the result of an asynchronous task

C++: The explicit async launch policy requests asynchronous execution rather than deferred evaluation.

C++✓ Tested
PythonStructured data & serialization

Return a small immutable named record

Python: Use NamedTuple when callers need both tuple behavior and named fields.

Python✓ Tested
C++Tasks & synchronization

Run a task on a thread and join it

C++: Join before reading a result written by the worker thread.

C++✓ Tested
jQueryForm serialization & state

Set several selected options

jQuery: Passing an array to val selects matching values in a multiple select.

jQuery✓ Tested
PythonDates & time zones

Skip weekends when advancing dates

Python: Walk calendar dates and count only Monday through Friday.

Python✓ Tested
CStrings & byte buffers

Split simple delimited text in place

C: strtok inserts terminators into a writable buffer and skips repeated delimiter characters.

C✓ Tested
jQueryForm serialization & state

Store an object associated with an element

jQuery: data retains JavaScript values without serializing them into HTML attributes.

jQuery✓ Tested
C++Tasks & synchronization

Wait for shared state with a condition variable

C++: Use a predicate so spurious wakeups cannot allow the worker to continue before the state is ready.

C++✓ Tested
PythonJSON & CSV

Write a JSON file

Save a dictionary as readable, indented JSON while preserving Unicode characters.

json✓ Tested
PowerShellFunctions & parameter validation

Accumulate pipeline input across begin process and end

PowerShell: Keep initialization and final output separate from per-item work.

PowerShell✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
Arduino / CArrays & embedded state

Advance an index around a fixed collection

Arduino / C: Modulo wraps a bounded nonnegative index to zero.

Arduino / C✓ Tested