Results for “save”
Small, practical examples. Search by task or narrow things down below.
Parse JSON text
Read a JavaScript object from JSON text.
JavaScript✓ Tested
Parse only valid integers
Parse only valid integers in a complete Rust program using the standard library.
Rust✓ Tested
Parse quoted CSV from an in-memory string
Python: Use StringIO with csv.reader so quoted commas are handled correctly.
Python✓ Tested
Partition a collection by a predicate
Java: Use partitioningBy to retain both matching and nonmatching values.
Java✓ Tested
Partition values into two collections
Partition values into two collections in a complete Rust program using the standard library.
Rust✓ Tested
Pass a block of behavior as an argument
PowerShell: Invoke a scriptblock with the call operator and an explicit input value.
PowerShell✓ Tested
Pass a function as a callback
C: A typed function pointer permits behavior to be supplied to another function.
C✓ Tested
Pass a variable to standard input
Bash Scripts: A here-string supplies the expanded value followed by a newline.
Bash Scripts✓ Tested
Pass an argument into a worker thread
C++: Thread arguments are copied by default; std::ref explicitly passes a reference.
C++✓ Tested
Pass an environment value to a child process
PowerShell: The process environment is inherited by a launched child PowerShell process.
PowerShell✓ Tested
Pass dollar expressions through Compose
Docker / Compose: Double dollar signs defer expansion to the container shell.
Docker / Compose✓ Tested
Pass named parameters from a hashtable
Keep a command’s options together in a reusable object.
splatting✓ Tested