Results for “cleanup”
Small, practical examples. Search by task or narrow things down below.
Replace a literal substring
SQLite: REPLACE performs a literal replacement rather than a regular-expression substitution.
SQLite✓ Tested
Restore the previous document title
Restore the previous document title with a small React component and explicit browser behavior.
React✓ Tested
Search for a literal LIKE wildcard
SQL: Declare an escape character so a percent sign in the pattern is literal.
SQL✓ Tested
Search for a literal LIKE wildcard
SQL Server: Declare an escape character so a percent sign in the pattern is literal.
SQL Server✓ Tested
Search for a literal LIKE wildcard
Postgres: Declare an escape character so a percent sign in the pattern is literal.
Postgres✓ Tested
Search for a literal LIKE wildcard
SQLite: Declare an escape character so a percent sign in the pattern is literal.
SQLite✓ Tested
Treat an empty trimmed value as missing
SQL: NULLIF converts an empty string to NULL before a fallback is applied.
SQL✓ Tested
Treat an empty trimmed value as missing
SQL Server: NULLIF converts an empty string to NULL before a fallback is applied.
SQL Server✓ Tested
Treat an empty trimmed value as missing
Postgres: NULLIF converts an empty string to NULL before a fallback is applied.
Postgres✓ Tested
Treat an empty trimmed value as missing
SQLite: NULLIF converts an empty string to NULL before a fallback is applied.
SQLite✓ Tested
Clean up a temporary directory automatically
Python: Use TemporaryDirectory as a context manager so cleanup also happens after exceptions.
Python✓ Tested
Preserve a failure status while an EXIT trap runs
Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.
Bash Scripts✓ Tested