FIND YOUR NEXT FEW LINES

Results for “ERROR_NUMBER”

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

248 snippets foundClear filters
PythonIteration & sequences

Take a limited number of iterator values

Python: Use islice to consume only the requested prefix of a potentially unbounded iterator.

Python✓ Tested
GoGetting Started

Test whether a number is even

Test whether a number is even using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsArguments & decisions

Validate the number of positional arguments

Bash Scripts: Use the argument count to enforce a simple command-line contract.

Bash Scripts✓ Tested
GoErrors & validation

Wrap an error with context

Wrap an error with context using a complete Go program with explicit sample inputs.

Go✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
SQL ServerSelect & page

Assign a rank within each group

Number rows with a partitioned window.

ROW_NUMBER✓ Tested
HTMLTables & list numbering

Associate a data cell with explicit table headers

HTML: The headers attribute lists header IDs for a more complex cell association.

HTML✓ Tested
PythonFunctions & error handling

Avoid a shared mutable default argument

Python: Create a fresh list inside the function when the optional argument is omitted.

Python✓ Tested
AngularTemplate-driven forms

Bind a numeric input value

Bind a numeric input value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonFunctions & error handling

Cache repeated pure function calls

Python: Use lru_cache to avoid recomputing results for identical hashable arguments.

Python✓ Tested
JavaScriptNumbers & numeric validation

Calculate a page count with ceiling division

JavaScript: Use Math.ceil for a nonnegative item count and a positive page size.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Calculate a page count with ceiling division

TypeScript: Use Math.ceil for a nonnegative item count and a positive page size.

TypeScript✓ Tested