FIND YOUR NEXT FEW LINES

Results for “Structures & function interfaces”

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

135 snippets foundClear filters
SQLiteText cleanup & matching

Measure the length of ordinary text

SQLite: Use the engine’s text-length function; this ASCII example has no trailing spaces.

SQLite✓ Tested
TypeScriptTypes & functions

Narrow a union using typeof

Handle text and numeric values with separate branches.

union✓ Tested
PostgresWindows & text

Number rows within each group

Assign ordered row numbers with a window function.

row_number✓ Tested
Bash ScriptsFunctions & arguments

Parse a short option with getopts

Read a named option and handle invalid flags explicitly.

getopts✓ Tested
PowerShellFunctions & control

Pass named parameters from a hashtable

Keep a command’s options together in a reusable object.

splatting✓ Tested
Arduino / CEEPROM & program memory

Read a byte lookup table from flash

Arduino / C: PROGMEM tables require the AVR program-memory access functions.

Arduino / C✓ Tested
PowerShellCommands & execution context

Read the kind of command being invoked

PowerShell: CommandType distinguishes cmdlets from functions, aliases, and external applications.

PowerShell✓ Tested
jQueryEvent control

Remove one handler without removing others

jQuery: Pass the original function reference to off.

jQuery✓ Tested
CFile positioning & lifecycle

Rename a known file

C: The standard rename function reports failure through its return value.

C✓ Tested
CNumeric parsing & arithmetic

Round a halfway floating-point value

C: The C round function rounds halfway cases away from zero.

C✓ Tested
SQLWindow analytics

Select the top row in each group with a tie-breaker

SQL: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.

SQL✓ Tested
SQL ServerWindow analytics

Select the top row in each group with a tie-breaker

SQL Server: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.

SQL Server✓ Tested