Results for “Group-Object”
Small, practical examples. Search by task or narrow things down below.
Create a reusable one-to-many lookup
C#: ToLookup groups values by key and returns an empty sequence for an unknown key.
C#✓ Tested
Define a function with a typed parameter
Accept a name and return a greeting.
function✓ Tested
Discard incidental output from a setup command
PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.
PowerShell✓ Tested
Extract all integer tokens from text
C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.
C#✓ Tested
Fade an entire element and its descendants
CSS: Opacity applies to the rendered element as a group, including child text.
CSS✓ Tested
Filter and transform an array
Keep active objects and extract their names.
filter✓ Tested
Filter rows with WHERE
Keep products below a chosen price.
WHERE✓ Tested
Find what remains after division
Python: Use the remainder operator to count items left after forming complete groups.
Python✓ Tested
Find what remains after division
C#: Use the remainder operator to count items left after forming complete groups.
C#✓ Tested
Find what remains after division
Java: Use the remainder operator to count items left after forming complete groups.
Java✓ Tested
Find what remains after division
JavaScript: Use the remainder operator to count items left after forming complete groups.
JavaScript✓ Tested
Find what remains after division
TypeScript: Use the remainder operator to count items left after forming complete groups.
TypeScript✓ Tested