Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Percent-encode one URL component
TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.
TypeScript✓ Tested
Process a text file one line at a time
Java: Use a buffered reader to avoid loading a large file into memory.
Java✓ Tested
Project content into a reusable component
Project content into a reusable component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Push one flex item away from its siblings
CSS: An auto inline-start margin consumes remaining main-axis space.
CSS✓ Tested
Push one selected release tag
Git: Naming a single tag avoids pushing every local tag unintentionally.
Git✓ Tested
Read bytes from a chosen file offset
C: Check fseek before reading so an unsupported or invalid seek is not ignored.
C✓ Tested
Read commit subjects affecting one file
Git: Place the path after -- so Git limits history to the selected file.
Git✓ Tested
Read date components in UTC
JavaScript: UTC accessors avoid differences caused by the machine’s local timezone.
JavaScript✓ Tested
Read date components in UTC
TypeScript: UTC accessors avoid differences caused by the machine’s local timezone.
TypeScript✓ Tested
Read history for one path
Git: Read history for one path inside the disposable repository created by the input setup.
Git✓ Tested
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
Read one character from ASCII text
Python: Use a valid zero-based index to read the first character.
Python✓ Tested