FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
TypeScriptRegular expressions & URL encoding

Percent-encode one URL component

TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.

TypeScript✓ Tested
JavaFile operations & binary data

Process a text file one line at a time

Java: Use a buffered reader to avoid loading a large file into memory.

Java✓ Tested
AngularGetting Started

Project content into a reusable component

Project content into a reusable component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CSSFlexbox alignment

Push one flex item away from its siblings

CSS: An auto inline-start margin consumes remaining main-axis space.

CSS✓ Tested
GitRemotes & additional checkouts

Push one selected release tag

Git: Naming a single tag avoids pushing every local tag unintentionally.

Git✓ Tested
CFile positioning & lifecycle

Read bytes from a chosen file offset

C: Check fseek before reading so an unsupported or invalid seek is not ignored.

C✓ Tested
GitCommit history & revision selection

Read commit subjects affecting one file

Git: Place the path after -- so Git limits history to the selected file.

Git✓ Tested
JavaScriptUTC date operations

Read date components in UTC

JavaScript: UTC accessors avoid differences caused by the machine’s local timezone.

JavaScript✓ Tested
TypeScriptUTC date operations

Read date components in UTC

TypeScript: UTC accessors avoid differences caused by the machine’s local timezone.

TypeScript✓ Tested
GitGetting Started

Read history for one path

Git: Read history for one path inside the disposable repository created by the input setup.

Git✓ Tested
Linux CommandsArchive integrity & packaging

Read one archived file to standard output

Linux Commands: Use tar -O with an explicit member name instead of writing files to disk.

Linux Commands✓ Tested
PythonGetting Started

Read one character from ASCII text

Python: Use a valid zero-based index to read the first character.

Python✓ Tested