FIND YOUR NEXT FEW LINES

Results for “empty”

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

487 snippets foundClear filters
AngularGetting Started

Provide an @empty list state

Provide an @empty list state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Linux CommandsFiles & permissions

Remove an empty directory only

Linux Commands: Use rmdir so a directory containing files cannot be removed accidentally.

Linux Commands✓ Tested
ReactLists & filtering

Render a helpful empty state

Render a helpful empty state with a small React component and explicit browser behavior.

React✓ Tested
GoMaps & sets

Represent a set with empty structs

Represent a set with empty structs using a complete Go program with explicit sample inputs.

Go✓ Tested
HTMLInput constraints

Require a nonempty text value

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

HTML✓ Tested
CArray transformations

Rotate a nonempty array left by one element

C: Save the first item before shifting the remaining elements.

C✓ Tested
SQLText cleanup & matching

Treat an empty trimmed value as missing

SQL: NULLIF converts an empty string to NULL before a fallback is applied.

SQL✓ Tested
SQL ServerText cleanup & matching

Treat an empty trimmed value as missing

SQL Server: NULLIF converts an empty string to NULL before a fallback is applied.

SQL Server✓ Tested
PostgresText cleanup & matching

Treat an empty trimmed value as missing

Postgres: NULLIF converts an empty string to NULL before a fallback is applied.

Postgres✓ Tested
SQLiteText cleanup & matching

Treat an empty trimmed value as missing

SQLite: NULLIF converts an empty string to NULL before a fallback is applied.

SQLite✓ Tested
Bash ScriptsParameter expansion

Use an alternate value only when a variable is nonempty

Bash Scripts: The colon-plus expansion returns its word only when the parameter has a nonempty value.

Bash Scripts✓ Tested
jQueryGetting Started

Clear a container’s contents

jQuery: Learn how to clear a container’s contents in a complete browser example.

jQuery✓ Tested