FIND YOUR NEXT FEW LINES

Results for “Object behavior & collections”

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

631 snippets foundClear filters
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
JavaCollections

Count word frequencies

Use Map.merge to count repeated words in Java.

Java✓ Tested
C++Collections

Count word frequencies

Accumulate word counts in an ordered C++ map.

C++✓ Tested
TypeScriptCollections & records

Count words using a Map

Update a keyed counter without losing its value type.

Map✓ Tested
C#Collections

Count words with GroupBy

Group repeated C# words and print ordered counts.

C#✓ Tested
HTMLGetting Started

Create a complete HTML document

HTML: Learn how to create a complete HTML document in a complete browser example.

HTML✓ Tested
AngularServices & dependency injection

Create a dependency with a provider factory

Create a dependency with a provider factory with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
GitTags & repository configuration

Create a lightweight tag at the current commit

Git: A lightweight tag is a direct reference without an annotation object.

Git✓ Tested
HTMLData & disclosure

Create a native disclosure

Use details and summary to show optional HTML content without JavaScript.

HTML✓ Tested
GitRestoring & revising local work

Create a recovery branch for a recently moved commit

Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.

Git✓ Tested
AngularPipes & formatting

Create a small pure formatting pipe

Create a small pure formatting pipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested