Results for “fs”
Small, practical examples. Search by task or narrow things down below.
Convert a timestamp to a different fixed offset
C#: ToOffset changes the displayed local time while retaining the same instant.
C#✓ Tested
Convert an aware datetime to another offset
Python: Use astimezone for conversion; replacing tzinfo alone does not convert an instant.
Python✓ Tested
Convert Unix seconds to an offset-aware timestamp
C#: DateTimeOffset preserves the UTC offset explicitly.
C#✓ Tested
Display an instant at a fixed offset
Display an instant at a fixed offset using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract a substring by offset and length
Bash Scripts: Bash substring offsets start at zero for an ordinary string.
Bash Scripts✓ Tested
Read bytes from a chosen file offset
C: Check fseek before reading so an unsupported or invalid seek is not ignored.
C✓ Tested
Focus an input through a ref
Focus an input through a ref with a small React component and explicit browser behavior.
React✓ Tested
Give a read-only container temporary storage
Docker / Compose: Give a read-only container temporary storage using a locally available Ubuntu image.
Docker / Compose✓ Tested
Give a read-only service writable scratch space
Docker / Compose: A tmpfs mount provides temporary storage independent of the root filesystem.
Docker / Compose✓ Tested
Keep a mutable value without rendering on each write
Keep a mutable value without rendering on each write with a small React component and explicit browser behavior.
React✓ Tested
Keep scratch data only for the container lifetime
Docker / Compose: Separate tmpfs mounts do not share data between container runs.
Docker / Compose✓ Tested
Observe when a DOM node is attached
Observe when a DOM node is attached with a small React component and explicit browser behavior.
React✓ Tested