FIND YOUR NEXT FEW LINES

Results for “C++”

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

3000 snippets foundClear filters
JavaScriptRegular expressions & URL encoding

Resolve a relative URL against a base

JavaScript: A trailing slash makes the final base path component a directory.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Resolve a relative URL against a base

TypeScript: A trailing slash makes the final base path component a directory.

TypeScript✓ Tested
jQueryEvent control

Respond to the Enter key

jQuery: Use the event key rather than deprecated numeric key codes.

jQuery✓ Tested
PowerShellCommands & execution context

Restore an environment value after temporary use

PowerShell: Use finally so temporary process configuration does not leak to subsequent work; remove the entry when it was originally absent.

PowerShell✓ Tested
JavaQueues & collection operations

Retrieve the smallest queued value first

Java: PriorityQueue poll removes the smallest value under the natural ordering.

Java✓ Tested
HTMLNative disclosure & dialogs

Return a value from a dialog form

HTML: A form with method dialog closes its containing dialog without a network submission.

HTML✓ Tested
Bash ScriptsFunction scope & composition

Return a value through a named output variable

Bash Scripts: A Bash nameref can update a caller-supplied variable without command substitution.

Bash Scripts✓ Tested
SQLSubqueries & ranked selection

Return all rows tied for the maximum in a group

SQL: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Return all rows tied for the maximum in a group

SQL Server: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Return all rows tied for the maximum in a group

Postgres: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Return all rows tied for the maximum in a group

SQLite: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.

SQLite✓ Tested
Bash ScriptsFunction scope & composition

Return an array through a nameref

Bash Scripts: Assign through a nameref to preserve array element boundaries.

Bash Scripts✓ Tested