FIND YOUR NEXT FEW LINES

Results for “required”

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

81 snippets foundClear filters
PythonJSON & CSV

Read CSV rows as dictionaries

Read a CSV file using its header row as dictionary keys, so each column can be accessed by name.

csv✓ Tested
JavaScriptArrays

Remove duplicate values

Use a JavaScript Set to preserve the first occurrence of each primitive value.

JavaScript✓ Tested
PythonCollections

Remove duplicates from a list

Remove repeated hashable values while preserving the order in which they first appeared.

list✓ Tested
JavaScriptStrings

Replace all literal matches

Replace repeated substrings with JavaScript replaceAll.

JavaScript✓ Tested
PythonStrings & dates

Replace text in a string

Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.

string✓ Tested
Linux CommandsText processing

Replace text with sed

Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.

sed✓ Tested
SQLConstraints & defaults

Require a value with NOT NULL

SQL: Declare required fields at the database boundary, not only in application validation.

SQL✓ Tested
SQL ServerConstraints & defaults

Require a value with NOT NULL

SQL Server: Declare required fields at the database boundary, not only in application validation.

SQL Server✓ Tested
PostgresConstraints & defaults

Require a value with NOT NULL

Postgres: Declare required fields at the database boundary, not only in application validation.

Postgres✓ Tested
SQLiteConstraints & defaults

Require a value with NOT NULL

SQLite: Declare required fields at the database boundary, not only in application validation.

SQLite✓ Tested
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
Linux CommandsText processing

Search for text in a file

Find matching lines with their line numbers, ignoring letter case and treating the pattern as literal text.

grep✓ Tested