Results for “code”
Small, practical examples. Search by task or narrow things down below.
Paint a gradient without an image file
CSS: Linear-gradient generates a CSS background image from color stops.
CSS✓ Tested
Pair corresponding array items by position
JavaScript: Validate equal lengths before zipping when missing counterparts would be an error.
JavaScript✓ Tested
Pair corresponding array items by position
TypeScript: Validate equal lengths before zipping when missing counterparts would be an error.
TypeScript✓ Tested
Pair corresponding collection elements
C#: Zip stops at the shorter sequence, so validate lengths separately if mismatches are an error.
C#✓ Tested
Pair corresponding list items
Python: Zip two equally sized sequences into pairs; strict mode rejects mismatched lengths on Python 3.10 or later.
Python✓ Tested
Pair corresponding values
Pair corresponding values in a complete Rust program using the standard library.
Rust✓ Tested
Pair corresponding values from two arrays
PowerShell: Check lengths before indexing to reject mismatched input collections.
PowerShell✓ Tested
Pair employees with their managers
SQL: Alias a table twice to represent two different roles in one relationship.
SQL✓ Tested
Pair employees with their managers
SQL Server: Alias a table twice to represent two different roles in one relationship.
SQL Server✓ Tested
Pair employees with their managers
Postgres: Alias a table twice to represent two different roles in one relationship.
Postgres✓ Tested
Pair employees with their managers
SQLite: Alias a table twice to represent two different roles in one relationship.
SQLite✓ Tested
Pair terms and descriptions
Use a description list for a small HTML glossary.
HTML✓ Tested