FIND YOUR NEXT FEW LINES

Results for “Sort-Object”

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

188 snippets foundClear filters
PowerShellStructured formats & encodings

Serialize nested objects with an explicit depth

PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.

PowerShell✓ Tested
ReactLists & filtering

Sort a copy without mutating the original list

Sort a copy without mutating the original list with a small React component and explicit browser behavior.

React✓ Tested
AngularLists & control flow

Sort a derived copy of a collection

Sort a derived copy of a collection with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaCollections

Sort a list

Sort a mutable Java list in natural ascending order.

Java✓ Tested
PowerShellGetting Started

Sort a sequence of numbers

PowerShell: Sort a sequence of numbers using PowerShell 7.

PowerShell✓ Tested
Arduino / CArrays & embedded state

Sort a small array in place

Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.

Arduino / C✓ Tested
Linux CommandsGetting Started

Sort a small set of lines

Linux Commands: Sort a small set of lines using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
C++Collections

Sort a vector

Sort C++ integer values in ascending order.

C++✓ Tested
RustVectors & slices

Sort a vector in ascending order

Sort a vector in ascending order in a complete Rust program using the standard library.

Rust✓ Tested
CArray transformations

Sort an integer array with qsort

C: The comparator uses relational comparisons to avoid subtraction overflow.

C✓ Tested
Linux CommandsText processing

Sort and deduplicate lines

Sort lines alphabetically and remove duplicate lines in a predictable C locale.

sort✓ Tested
C++Collections

Sort and deduplicate values

Sort a C++ vector and erase adjacent duplicates.

C++✓ Tested