FIND YOUR NEXT FEW LINES

Results for “require”

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

1101 snippets foundClear filters
PowerShellArray operations

Pair corresponding values from two arrays

PowerShell: Check lengths before indexing to reject mismatched input collections.

PowerShell✓ Tested
SQL ServerRelationships & missing data

Pair employees with their managers

SQL Server: Alias a table twice to represent two different roles in one relationship.

SQL Server✓ Tested
PostgresRelationships & missing data

Pair employees with their managers

Postgres: Alias a table twice to represent two different roles in one relationship.

Postgres✓ Tested
SQLiteRelationships & missing data

Pair employees with their managers

SQLite: Alias a table twice to represent two different roles in one relationship.

SQLite✓ Tested
PowerShellDates & numeric validation

Parse a hexadecimal integer

PowerShell: Convert.ToInt32 accepts an explicit base for a validated hexadecimal string.

PowerShell✓ Tested
PythonJSON & CSV

Parse a JSON string

Convert a JSON string into a Python dictionary and read values by key.

json✓ Tested
Bash ScriptsFunctions & arguments

Parse a short option with getopts

Read a named option and handle invalid flags explicitly.

getopts✓ Tested
Bash ScriptsArguments & decisions

Parse a small set of long options

Bash Scripts: Use a loop and case statement to consume a value-bearing long option.

Bash Scripts✓ Tested
PowerShellDates & numeric validation

Parse an integer without throwing on invalid input

PowerShell: TryParse reports conversion success separately from its output value.

PowerShell✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
Bash ScriptsText parsing & arithmetic

Parse digits with leading zeroes as decimal

Bash Scripts: The 10# prefix avoids Bash treating a leading zero as an octal notation.

Bash Scripts✓ Tested
PowerShellText & data

Parse JSON into an object

Access a named field in a JSON document.

JSON✓ Tested