Results for “create”
Small, practical examples. Search by task or narrow things down below.
Apply a stash while keeping the saved entry
Git: Apply restores changes without removing the stash reference.
Git✓ Tested
Apply and remove a successfully restored stash
Git: Pop removes the entry only after a successful application.
Git✓ Tested
Apply one commit from another branch
Git: Cherry-pick replays the selected change as a commit on the current branch.
Git✓ Tested
Assign a CSS class in JSX
Assign a CSS class in JSX with a small React component and explicit browser behavior.
React✓ Tested
Assign a rank within each group
Number rows with a partitioned window.
ROW_NUMBER✓ Tested
Attach an overall count to every row
SQL: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQL✓ Tested
Attach an overall count to every row
SQL Server: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQL Server✓ Tested
Attach an overall count to every row
Postgres: An uncorrelated scalar subquery supplies the same aggregate to each output row.
Postgres✓ Tested
Attach an overall count to every row
SQLite: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQLite✓ Tested
Attach containers to a user-defined network
Create a dedicated network for a small group of containers.
network✓ Tested
Avoid a shared mutable default argument
Python: Create a fresh list inside the function when the optional argument is omitted.
Python✓ Tested
Block deletion of a referenced parent
SQL: The default foreign-key action prevents deletion while a child still refers to the parent.
SQL✓ Tested