Results for “seq”
Small, practical examples. Search by task or narrow things down below.
Decode a percent-encoded URL component
TypeScript: decodeURIComponent reverses percent encoding and throws for malformed sequences.
TypeScript✓ Tested
Flatten nested collections with SelectMany
C#: Concatenate the items from several sequences into one sequence.
C#✓ Tested
Get the latest row in each group
Select one ordered row per key with DISTINCT ON.
DISTINCT ON✓ Tested
Move focus to a heading without adding a tab stop
HTML: A negative tabindex permits programmatic focus while keeping the heading out of ordinary sequential tab navigation.
HTML✓ Tested
Normalize canonically equivalent Unicode strings
C#: Normalize to NFC before an ordinal comparison of equivalent character sequences.
C#✓ Tested
Pair corresponding collection elements
C#: Zip stops at the shorter sequence, so validate lengths separately if mismatches are an error.
C#✓ Tested
Play a fixed digital output pattern
Arduino / C: A pattern table separates the output sequence from its timing.
Arduino / C✓ Tested
Print only the matching portions
Linux Commands: Use extended regex and -o to extract digit sequences.
Linux Commands✓ Tested
Repeat an action a fixed number of times
Use a counter and delay for a simple finite sequence.
for loop✓ Tested
Restore an environment value after temporary use
PowerShell: Use finally so temporary process configuration does not leak to subsequent work; remove the entry when it was originally absent.
PowerShell✓ Tested
Reuse an LED action with a function
Arduino / C: Put a short LED sequence in a named function and call it twice.
Arduino / C✓ Tested
Separate a first item from the remaining items
JavaScript: Array destructuring and a rest element produce named pieces of a sequence.
JavaScript✓ Tested