Results for “Parsing & byte data”
Small, practical examples. Search by task or narrow things down below.
Remove a trailing carriage return from a line
Bash Scripts: Use an ANSI-C quoted carriage return as the suffix pattern.
Bash Scripts✓ Tested
Remove matching items from a mutable list
C#: List.RemoveAll returns how many items it removed.
C#✓ Tested
Remove one network attachment
Docker / Compose: network disconnect removes the specified attachment while retaining the container.
Docker / Compose✓ Tested
Render an observable with AsyncPipe
Render an observable with AsyncPipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Replace text using captured regex groups
C++: Numbered replacement groups can rearrange a known two-part name.
C++✓ Tested
Resolve a peer’s name on a user-defined network
Docker / Compose: The embedded DNS service resolves names on user-defined bridges.
Docker / Compose✓ Tested
Resolve relative links against an explicit base
HTML: A base href changes how relative document URLs are resolved.
HTML✓ Tested
Return a small immutable named record
Python: Use NamedTuple when callers need both tuple behavior and named fields.
Python✓ Tested
Round a halfway floating-point value
C: The C round function rounds halfway cases away from zero.
C✓ Tested
Round downward and upward independently
C: floor and ceil round toward negative and positive infinity respectively.
C✓ Tested
Round halfway floating-point values away from zero
C++: std::round has an explicit halfway rule different from truncation.
C++✓ Tested
Save a stream while displaying it
Linux Commands: Use tee to write a copy of standard input to a file.
Linux Commands✓ Tested