FIND YOUR NEXT FEW LINES

Results for “seq”

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

66 snippets foundClear filters
C++Sequence algorithms

Test any and all elements with predicates

C++: These algorithms stop as soon as their result is known.

C++✓ Tested
C++Sequence algorithms

Transform a vector into a separate result

C++: Pre-size the output before writing through its iterator.

C++✓ Tested
PythonIteration & sequences

Visit adjacent pairs

Python: Use itertools.pairwise to process neighboring items without indexing.

Python✓ Tested
C#LINQ transformations

Calculate a product with Aggregate

C#: Supply a seed to define the result for an empty sequence.

C#✓ Tested
CSmall algorithms & bit operations

Calculate a small factorial iteratively

C: Multiply a bounded sequence using an unsigned accumulator.

C✓ Tested
Docker / ComposeDockerfile patterns

Choose Bash with pipefail for build commands

Docker / Compose: SHELL changes the interpreter for subsequent shell-form instructions.

Docker / Compose✓ Tested
JavaScriptArray restructuring

Concatenate arrays without mutating either input

JavaScript: concat creates a shallow combined sequence.

JavaScript✓ Tested
TypeScriptArray restructuring

Concatenate arrays without mutating either input

TypeScript: concat creates a shallow combined sequence.

TypeScript✓ Tested
Arduino / CGetting Started

Count five LED flashes with a for loop

Arduino / C: Repeat an LED action a known number of times and print the current count.

Arduino / C✓ Tested
C#LINQ transformations

Create a reusable one-to-many lookup

C#: ToLookup groups values by key and returns an empty sequence for an unknown key.

C#✓ Tested
HTMLDocument structure

Create an ordered list

Represent a sequence of steps using an HTML ordered list.

HTML✓ Tested
JavaScriptRegular expressions & URL encoding

Decode a percent-encoded URL component

JavaScript: decodeURIComponent reverses percent encoding and throws for malformed sequences.

JavaScript✓ Tested