Primary Key vs. Foreign Key With a SQL Example
A primary key uniquely identifies each row; a foreign key points to a primary key in another table. Six statements and what SQLite accepted or rejected.
Calc sql-fk
Category
HTTP status codes, TLS errors, APIs and everyday conversions in Python, C++ and SQL. Each guide records how its examples were run.
A primary key uniquely identifies each row; a foreign key points to a primary key in another table. Six statements and what SQLite accepted or rejected.
Calc sql-fk
UNION combines two query results and removes duplicate rows; UNION ALL keeps every row. The same queries run both ways, with row counts and shared rules.
ViewTabs
SQL writes not equal as <> (standard) or !=. Both skip NULL rows, which surprises people. Query results show the problem and three ways to include NULLs.
ViewTabs
SSH 'Permission denied (publickey)' means the server rejected every key offered. A throwaway SSH server shows what ssh -v reveals for wrong and right keys.
DecisionTree
405 Method Not Allowed means the URL exists but rejects that HTTP method. Read the Allow header, fix the request, and try methods against a sample API.
Calc http-method
503 Service Unavailable means the server cannot handle the request right now: maintenance or overload. Both reproduced, with Retry-After and log output.
Stepper
ERR_TOO_MANY_REDIRECTS means a page redirects in a circle. Trace it hop by hop with curl, and see the classic proxy and HTTPS loop reproduced and fixed.
Stepper
Firefox shows SSL_ERROR_RX_RECORD_TOO_LONG when HTTPS gets a non-TLS reply, usually plain HTTP on port 443. Reproduced locally, with the bytes behind it.
ByteInspector
ERR_CERT_AUTHORITY_INVALID means the browser cannot chain a site's certificate to a trusted CA. A private test CA shows the failing chain and the fix.
Stepper
ERR_SSL_VERSION_OR_CIPHER_MISMATCH means browser and server share no TLS version or cipher. Both failures reproduced with OpenSSL, and the server fix.
DecisionTree
YAML and JSON can hold the same data but parse differently. One config run through PyYAML and js-yaml shows where YAML surprises you, and when to use each.
Calc yaml-json
Use int(s) to turn a string into an integer in Python. Bases, prefixes, whitespace, underscores, decimals and invalid input, with outputs from real runs.
Calc python-int
Use separator.join(list) to turn a list of strings into one string. Fix the TypeError for numbers with map(str) and avoid common pitfalls. Real outputs.
Calc python-join
Convert a string to int in C++ with std::stoi or std::from_chars. Compiled results for whitespace, signs, trailing text, overflow and invalid input.
ViewTabs
A webhook is an HTTP request one system sends to your URL when an event happens. Follow a simulated delivery, failure and retry, and sign a payload.
Stepper
An API key is a secret string that identifies the app calling an API. A dummy key in a request, scope and expiry errors from a test API, and safe storage.
DecisionTree
Polling an API asks for changes on a schedule; a webhook pushes each change to you. Compare requests and delay for one order flow in a calculator.
Calc polling
401 Unauthorized means the server could not authenticate the request: credentials missing, wrong or expired. Test API responses, and 401 vs. 403.
DecisionTree
400 Bad Request means the server rejected the request itself. Malformed JSON, a failed validation and a bad header, sent to a test server and logged.
DecisionTree