FIND YOUR NEXT FEW LINES

Results for “Small algorithms & bit operations”

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

443 snippets foundClear filters
ReactGetting Started

Group siblings with a fragment

Group siblings with a fragment with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Handle a button click

Handle a button click with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Handle a form without navigating

Handle a form without navigating with a small React component and explicit browser behavior.

React✓ Tested
ReactAsync work & status

Handle an asynchronous failure

Handle an asynchronous failure with a small React component and explicit browser behavior.

React✓ Tested
ReactAccessibility & events

Handle an Escape key press

Handle an Escape key press with a small React component and explicit browser behavior.

React✓ Tested
ReactAsync work & status

Ignore a result after its effect is cleaned up

Ignore a result after its effect is cleaned up with a small React component and explicit browser behavior.

React✓ Tested
SQLSubqueries & ranked selection

Include every row tied for the highest score

SQL: Compare with MAX rather than limiting to an arbitrary number of rows.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Include every row tied for the highest score

SQL Server: Compare with MAX rather than limiting to an arbitrary number of rows.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Include every row tied for the highest score

Postgres: Compare with MAX rather than limiting to an arbitrary number of rows.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Include every row tied for the highest score

SQLite: Compare with MAX rather than limiting to an arbitrary number of rows.

SQLite✓ Tested
Bash ScriptsGetting Started

Increase an integer variable

Bash Scripts: Increase an integer variable with a small standalone Bash program.

Bash Scripts✓ Tested
ReactState & reducers

Initialize state lazily

Initialize state lazily with a small React component and explicit browser behavior.

React✓ Tested