FIND YOUR NEXT FEW LINES

Results for “CTE”

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

370 snippets foundClear filters
Bash ScriptsFunctions & arguments

Handle an expected command failure

Branch on a command’s exit code without aborting the script.

exit status✓ Tested
PowerShellGetting Started

Handle an expected terminating error

PowerShell: Handle an expected terminating error using PowerShell 7.

PowerShell✓ Tested
HTMLForm behavior

Identify the selected submit action

HTML: Each submit button can supply its own named value for the same form.

HTML✓ Tested
Bash ScriptsText parsing & arithmetic

Increment a counter without an unexpected errexit

Bash Scripts: An assignment avoids the zero-result exit status of a standalone arithmetic post-increment.

Bash Scripts✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested
JavaScriptArray restructuring

Keep both matching and rejected values

JavaScript: Use two explicit outputs when a caller needs both sides of a classification.

JavaScript✓ Tested
TypeScriptArray restructuring

Keep both matching and rejected values

TypeScript: Use two explicit outputs when a caller needs both sides of a classification.

TypeScript✓ Tested
JavaEncoding & structured values

Measure UTF-8 bytes separately from characters

Java: Encode a Java string before measuring its serialized byte length.

Java✓ Tested
SQLJoins & subqueries

Name an intermediate query with a CTE

Make a filtered result reusable within one statement.

CTE✓ Tested
Linux CommandsTransforming text

Print a selected range of lines

Linux Commands: Use sed -n with a line address to suppress other output.

Linux Commands✓ Tested
Arduino / CGetting Started

Print a single character

Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Bash ScriptsText parsing & arithmetic

Print text containing percent characters literally

Bash Scripts: Never use untrusted text as the printf format string.

Bash Scripts✓ Tested