FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
Bash ScriptsGetting Started

Count array elements

Bash Scripts: Count array elements with a small standalone Bash program.

Bash Scripts✓ Tested
Arduino / CGetting Started

Count down with a bounded loop

Arduino / C: Count down with a bounded loop on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Bash ScriptsGetting Started

Count down with a while loop

Bash Scripts: Count down with a while loop with a small standalone Bash program.

Bash Scripts✓ 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
PowerShellCollections & objects

Count items by group

Group repeated values and report each count.

Group-Object✓ Tested
jQueryGetting Started

Count matched elements

jQuery: Learn how to count matched elements in a complete browser example.

jQuery✓ Tested
PythonCollections

Count occurrences in a list

Count how often each value appears using Counter from the standard library.

count✓ Tested
C++Ordering & set operations

Count occurrences in a sorted sequence

C++: equal_range finds the half-open interval containing values equal to the key.

C++✓ Tested
GoMaps & sets

Count repeated words

Count repeated words using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsArray operations

Count the elements in an array

Bash Scripts: The array length form counts assigned elements, not characters in the first value.

Bash Scripts✓ Tested
GoGetting Started

Count Unicode code points

Count Unicode code points using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptText handling & Unicode

Count Unicode code points in a string

JavaScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.

JavaScript✓ Tested