FIND YOUR NEXT FEW LINES

Results for “sub”

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

145 snippets foundClear filters
Arduino / CTiming & control

Compare elapsed time across timer rollover

Use unsigned subtraction when a millisecond counter wraps.

rollover✓ Tested
PowerShellArray operations

Count a result even when it is empty or has one item

PowerShell: Wrap pipeline results in an array subexpression for consistent Count behavior.

PowerShell✓ Tested
PythonDates & time zones

Count days between calendar dates

Python: Subtract date objects to get an exact calendar-day difference.

Python✓ Tested
PowerShellDates & numeric validation

Count days between calendar dates

PowerShell: Parse an unambiguous format before subtracting date values.

PowerShell✓ Tested
Linux CommandsFiles & permissions

Create private files with a restrictive umask

Linux Commands: Apply umask in a subshell so the surrounding shell is unaffected.

Linux Commands✓ Tested
HTMLForm behavior

Disable a related group of controls

HTML: A disabled fieldset prevents editing its descendant controls and omits them from form submission.

HTML✓ Tested
GitCommits & history

Find commits by message

Search commit subjects and bodies for a phrase.

log✓ Tested
SQLRelationships & missing data

Find records without any related rows

SQL: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQL✓ Tested
SQL ServerRelationships & missing data

Find records without any related rows

SQL Server: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQL Server✓ Tested
PostgresRelationships & missing data

Find records without any related rows

Postgres: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

Postgres✓ Tested
SQLiteRelationships & missing data

Find records without any related rows

SQLite: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQLite✓ Tested
C#Strings

Find text ignoring case

Use ordinal case-insensitive comparison for a C# substring search.

C#✓ Tested