Results for “two”
Small, practical examples. Search by task or narrow things down below.
Generate a bounded Fibonacci sequence
C: Keep only the two previous values instead of using exponential recursive calls.
C✓ Tested
Handle a button click
Attach a jQuery click handler to update text.
jQuery✓ Tested
Handle a form locally
Prevent default form navigation while displaying input with jQuery.
jQuery✓ Tested
Handle dynamically added buttons
Delegate a jQuery event from a stable parent to later children.
jQuery✓ Tested
Hide and show content
Use a button to toggle jQuery visibility and an accessibility state.
jQuery✓ Tested
Increment a shared counter safely
C++: Atomic increments prevent lost updates when two threads change the same counter.
C++✓ Tested
Inspect a GitHub remote URL
Configure and inspect an example origin without contacting the network.
GitHub✓ Tested
Join through a lookup table
SQL: Use explicit aliases and join keys when enriching records through two relationships.
SQL✓ Tested
Join through a lookup table
SQL Server: Use explicit aliases and join keys when enriching records through two relationships.
SQL Server✓ Tested
Join through a lookup table
Postgres: Use explicit aliases and join keys when enriching records through two relationships.
Postgres✓ Tested
Join through a lookup table
SQLite: Use explicit aliases and join keys when enriching records through two relationships.
SQLite✓ Tested
Keep both matching and rejected values
JavaScript: Use two explicit outputs when a caller needs both sides of a classification.
JavaScript✓ Tested