FIND YOUR NEXT FEW LINES

Results for “int”

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

797 snippets foundClear filters
SQLiteConstraints & defaults

Reject duplicate business identifiers

SQLite: A UNIQUE constraint protects a business key independently of the primary key.

SQLite✓ Tested
ReactRefs & DOM interaction

Remember the previously committed value

Remember the previously committed value with a small React component and explicit browser behavior.

React✓ Tested
Linux CommandsArchive integrity & packaging

Remove a leading directory while extracting

Linux Commands: Use strip-components only after inspecting a trusted archive layout.

Linux Commands✓ Tested
SQLConstraints & defaults

Remove dependent rows with a declared cascade

SQL: ON DELETE CASCADE removes children when their referenced parent is deleted.

SQL✓ Tested
SQL ServerConstraints & defaults

Remove dependent rows with a declared cascade

SQL Server: ON DELETE CASCADE removes children when their referenced parent is deleted.

SQL Server✓ Tested
PostgresConstraints & defaults

Remove dependent rows with a declared cascade

Postgres: ON DELETE CASCADE removes children when their referenced parent is deleted.

Postgres✓ Tested
SQLiteConstraints & defaults

Remove dependent rows with a declared cascade

SQLite: ON DELETE CASCADE removes children when their referenced parent is deleted.

SQLite✓ Tested
PowerShellFile operations & integrity

Rename a file in its current directory

PowerShell: Rename-Item changes the name without moving the item to another directory.

PowerShell✓ Tested
CStructures & function interfaces

Represent a small set of named states

C: An enum gives symbolic names to integer state values.

C✓ Tested
HTMLInput constraints

Require a checkbox to be selected

HTML: A required checkbox is invalid until that individual control is checked.

HTML✓ Tested
HTMLInput constraints

Require a nonempty text value

HTML: The required attribute makes an empty text control fail native constraint validation.

HTML✓ Tested
SQLConstraints & defaults

Require a value with NOT NULL

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

SQL✓ Tested