FIND YOUR NEXT FEW LINES

Results for “while”

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

162 snippets foundClear filters
Linux CommandsArchives & checksums

Compress a file and keep the original

Create a gzip-compressed copy of a file while leaving the uncompressed original in place.

gzip✓ Tested
C#Dates & precise numbers

Convert a timestamp to a different fixed offset

C#: ToOffset changes the displayed local time while retaining the same instant.

C#✓ Tested
CStrings

Convert ASCII text to uppercase

Convert characters with toupper while avoiding signed-char undefined behavior.

C✓ Tested
JavaScriptUTC date operations

Convert epoch milliseconds to whole seconds

JavaScript: JavaScript Date stores milliseconds while many APIs use Unix seconds.

JavaScript✓ Tested
TypeScriptUTC date operations

Convert epoch milliseconds to whole seconds

TypeScript: JavaScript Date stores milliseconds while many APIs use Unix seconds.

TypeScript✓ Tested
CFile positioning & lifecycle

Copy a file in bounded binary chunks

C: Check read, write, and close errors while copying without loading the entire file.

C✓ Tested
Linux CommandsFiles & folders

Copy a file to a folder

Create a backup folder if needed, then copy a file into it while preserving its modification time and permission bits.

file✓ Tested
GitRestoring & revising local work

Correct the latest unpublished commit message

Git: Amend replaces the current commit while preserving its tree when no new changes are staged.

Git✓ Tested
CFiles

Count newline characters

Count newline bytes in a C file while retaining EOF as an int.

C✓ 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 / ComposeDockerfile patterns

Create a runtime file during the build

Docker / Compose: RUN executes during the build while CMD executes when a container starts.

Docker / Compose✓ Tested
HTMLMetadata & document links

Declare an indexing preference for a draft page

HTML: A robots meta element can request noindex while allowing link following.

HTML✓ Tested