Results for “list archive”
Small, practical examples. Search by task or narrow things down below.
Subscribe to and clean up a window event
Subscribe to and clean up a window event with a small React component and explicit browser behavior.
React✓ Tested
Track a selected record by its identifier
Track a selected record by its identifier with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Track selection by a stable identifier
Track selection by a stable identifier with a small React component and explicit browser behavior.
React✓ Tested
Verify a file against a checksum manifest
Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.
Linux Commands✓ Tested
Append an item to a small array
PowerShell: The plus-equals operator builds a new array; use a generic list for repeated large additions.
PowerShell✓ Tested
Avoid a shared mutable default argument
Python: Create a fresh list inside the function when the optional argument is omitted.
Python✓ Tested
Await several independent results
Preserve input order while awaiting multiple promises.
Promise.all✓ Tested
Calculate a SHA-256 checksum
Calculate a file checksum so you can compare it with a hash from a trusted source and detect changed contents.
checksum✓ Tested
Capture a successful child-process result
Python: Run an argument list without a shell and check the return code.
Python✓ Tested
Compress a file and keep the original
Create a gzip-compressed copy of a file while leaving the uncompressed original in place.
gzip✓ Tested
Copy nested mutable data independently
Python: Use deepcopy when changes to nested lists must not affect the original object.
Python✓ Tested
Copy selected rows into another table
SQL: INSERT SELECT performs a set-based copy with an explicit destination column list.
SQL✓ Tested