FIND YOUR NEXT FEW LINES

Results for “File operations & binary data”

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

1473 snippets foundClear filters
PythonStructured data & serialization

Read elements from trusted XML

Python: Use ElementTree to inspect a small trusted XML document.

Python✓ 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
PythonStructured data & serialization

Read one JSON document per line

Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.

Python✓ Tested
GoFiles & paths

Read text line by line

Read text line by line using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsFiles & permissions

Read the target stored in a symbolic link

Linux Commands: Use readlink without resolving the target path.

Linux Commands✓ Tested
AngularLifecycle & observable data

Register cleanup through DestroyRef

Register cleanup through DestroyRef with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
GoFiles & paths

Reject an escaping relative path

Reject an escaping relative path using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsFiles & permissions

Remove an empty directory only

Linux Commands: Use rmdir so a directory containing files cannot be removed accidentally.

Linux Commands✓ Tested
Bash ScriptsArray operations

Remove an indexed element and compact the array

Bash Scripts: Unsetting an element leaves a gap; reassigning the values creates consecutive indices.

Bash Scripts✓ Tested
JavaQueues & collection operations

Remove collection items that satisfy a condition

Java: Use removeIf on a mutable collection to avoid changing it manually inside a for-each loop.

Java✓ Tested
C#Collections & data structures

Remove matching items from a mutable list

C#: List.RemoveAll returns how many items it removed.

C#✓ Tested
AngularLifecycle & observable data

Render an observable with AsyncPipe

Render an observable with AsyncPipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested