Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Trim whitespace around text
Trim whitespace around text in a complete Rust program using the standard library.
Rust✓ Tested
Try a channel receive without blocking
Try a channel receive without blocking using a complete Go program with explicit sample inputs.
Go✓ Tested
Turn a condition into a result label
SQL: Use CASE to describe stock availability for each row.
SQL✓ Tested
Turn a condition into a result label
SQL Server: Use CASE to describe stock availability for each row.
SQL Server✓ Tested
Turn JSON into typed rows
Project JSON array items into SQL columns.
OPENJSON✓ Tested
Turn known group values into columns
SQL: Conditional aggregation gives a portable pivot when the category set is known.
SQL✓ Tested
Turn known group values into columns
SQL Server: Conditional aggregation gives a portable pivot when the category set is known.
SQL Server✓ Tested
Turn known group values into columns
Postgres: Conditional aggregation gives a portable pivot when the category set is known.
Postgres✓ Tested
Turn known group values into columns
SQLite: Conditional aggregation gives a portable pivot when the category set is known.
SQLite✓ Tested
Type a function’s inputs and output
Catch mismatched arguments during compilation.
function✓ Tested
Uncommit a local change and leave its edits unstaged
Git: A mixed reset resets the index while retaining working-file contents.
Git✓ Tested
Uncommit the latest local change while keeping it staged
Git: A soft reset moves the branch tip but preserves both index and working files.
Git✓ Tested