FIND YOUR NEXT FEW LINES

Results for “tr”

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

1534 snippets foundClear filters
TypeScriptGetting Started

Count the items in a collection

TypeScript: Read the collection’s length instead of hard-coding the loop limit.

TypeScript✓ Tested
C++Getting Started

Count the items in a collection

C++: Read the collection’s length instead of hard-coding the loop limit.

C++✓ Tested
CGetting Started

Count the items in a collection

C: Read the collection’s length instead of hard-coding the loop limit.

C✓ 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
Linux CommandsArchives & checksums

Create a compressed tar archive

Bundle a directory into a gzip-compressed tar archive, preserving the directory structure.

tar✓ 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
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
Docker / ComposeGetting Started

Create a small file at build time

Docker / Compose: Create a small file at build time with a complete introductory Dockerfile.

Docker / Compose✓ 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
PythonFile operations & archives

Create a ZIP archive from a file

Python: Give a ZIP entry a relative archive name instead of exposing its source directory.

Python✓ Tested
Linux CommandsArchive integrity & packaging

Create an archive from an explicit file list

Linux Commands: Use tar -T for a controlled list of relative archive members.

Linux Commands✓ Tested