FIND YOUR NEXT FEW LINES

Results for “or”

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

2638 snippets foundClear filters
Bash ScriptsArray operations

Check exact array membership

Bash Scripts: Compare each element literally instead of searching a concatenated string.

Bash Scripts✓ Tested
PostgresJSON & arrays

Check JSONB containment

Test whether an object contains a key-value pair.

jsonb✓ Tested
Bash ScriptsFiles & reliability

Check that a file is present and nonempty

Test file content availability before reading it.

file check✓ Tested
Linux CommandsSystem information

Check the size of a folder

Show a single total for the disk space used by a folder and its contents.

disk usage✓ Tested
PowerShellCommands & execution context

Check whether a command can be resolved

PowerShell: Get-Command with a local error override supports an expected missing-command lookup.

PowerShell✓ Tested
RustNumbers & durations

Check whether a floating-point value is finite

Check whether a floating-point value is finite in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check whether a function has been defined

Bash Scripts: declare -F tests a function name without executing it.

Bash Scripts✓ Tested
C++Tasks & synchronization

Check whether a future is ready without blocking

C++: A zero-duration wait reports timeout until the producer sets a value.

C++✓ Tested
JavaScriptNumbers & numeric validation

Check whether a value is a safe integer

JavaScript: Number.isSafeInteger also checks the exact-integer range supported by Number.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Check whether a value is a safe integer

TypeScript: Number.isSafeInteger also checks the exact-integer range supported by Number.

TypeScript✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check whether a variable exists under nounset

Bash Scripts: The plus expansion distinguishes an unset variable without reading its missing value.

Bash Scripts✓ Tested
jQueryCollections & styling

Check whether any selected element matches

jQuery: is returns a Boolean without changing the selection.

jQuery✓ Tested