FIND YOUR NEXT FEW LINES

Results for “Queues & collection operations”

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

312 snippets foundClear filters
GoSlices & collections

Reverse slice order

Reverse slice order using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Collections & data structures

Search a sorted array efficiently

C#: Array.BinarySearch requires an array sorted with the same comparison rules.

C#✓ Tested
Bash ScriptsArray operations

Select a range of array elements

Bash Scripts: Quote a sliced at-sign expansion to keep each selected element separate.

Bash Scripts✓ Tested
PowerShellArray operations

Select elements by an index range

PowerShell: An index range selects the requested array positions in order.

PowerShell✓ Tested
jQueryDeferred work & queues

Sequence work on an element’s queue

jQuery: A queue callback calls next to allow the following callback to run.

jQuery✓ Tested
C++Filesystem operations

Set owner-only read and write permissions

C++: Replace ordinary permission bits with the requested owner permissions.

C++✓ Tested
jQueryCollections & styling

Set several inline styles together

jQuery: Pass a property-value object to css.

jQuery✓ Tested
GoSlices & collections

Sort integers in place

Sort integers in place using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Ordering & set operations

Sort only the smallest requested prefix

C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.

C++✓ Tested
C++Ordering & set operations

Sort records by two fields

C++: Tuple comparison implements lexicographic ordering across several keys.

C++✓ Tested
JavaScriptUTC date operations

Sort timestamp strings by their parsed instants

JavaScript: Compare epoch values explicitly when date strings may contain different offsets.

JavaScript✓ Tested
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested