December 2026
Every post published in December 2026, newest first. Pick a day to jump straight to it.
- Posts
- 410
- Topics
- 77
- Reading time
- 40 h
- Active days
- 3
Posts 211–240 of 410 · December 2–3, 2026
Page 8 of 14
Thursday, December 3, 2026
22 of 232 posts
How to Serve Static Files in ASP.NET Core with MapStaticAssets (C#)
Serve the HTML, CSS and JavaScript files in wwwroot from an ASP.NET Core app with one line, app.MapStaticAssets(). A .NET 10 C# example shows the 404 before it, the 200 after it with its caching headers, and what happens to a file added while the app runs.
8 min readHow to Add Custom Claims to a JWT in Node.js with jose
Add your own claims to a JWT in Node.js by passing an object to jose's SignJWT: a string, an array and a nested object under a URL name, then read them back from jwtVerify's payload, with real output from jose 6.2.
6 min readHow to Join an Array into a String in JavaScript with join
Turn a JavaScript array into one string with join, choose the separator, see the comma join uses by default, what an empty or one-item array gives, and how null items become empty text, with real output from Node.js 26.
4 min readHow to Check if a Number Is a Whole Number in JavaScript with Number.isInteger
Check whether a JavaScript value is a whole number with Number.isInteger, see that 500.0 counts, that the string '500', NaN and Infinity don't, and when to use Number.isSafeInteger instead, with real output from Node.js 26.
3 min readHow to Check if an Array Contains a Value in JavaScript with includes
Check whether a JavaScript array contains a value with includes, see that it matches whole items exactly and is case-sensitive, start the search at an index, and avoid the trap where a string's includes searches text instead, with real output from Node.js 26.
4 min readHow to Handle Several Tool Calls in One Claude Reply
Claude can ask for several tools in one reply. Run every tool_use block, then send all the tool_result blocks back together in one user message. Two opening-hours lookups in a single reply, with real output from anthropic 2.14.0 and Claude Opus 5.5.
7 min readHow to Check if a Value Is an Array in JavaScript with Array.isArray
Check whether a JavaScript value is an array with Array.isArray, see that strings, null and array-like objects aren't arrays, and why typeof can't tell an array from an object, with real output from Node.js 26.
3 min readHow to Check a Value's Type with typeof in JavaScript
Check what type a JavaScript value has with the typeof operator, see why typeof null and typeof an array both give 'object', and test for a real object with typeof and a null check, with real output from Node.js 26.
4 min readHow to Make Claude Follow a Tool's Input Schema with strict: true
Add strict: true to a Claude tool definition, with additionalProperties set to false, and Claude's tool input always matches your JSON Schema: the right types, only allowed values, every required field. A table-booking tool, plus the 400 errors strict mode gives, with real output from anthropic 2.14.0.
6 min readHow to Combine Conditions with AND (&&), OR (||) and NOT (!) in JavaScript
Combine conditions in JavaScript with the logical operators && (AND), || (OR) and ! (NOT), see how they skip the right side when the left side decides, and why || and && can return values that aren't true or false, with real output from Node.js 26.
5 min readHow to Tell Claude a Tool Failed with is_error
When a tool Claude asked for fails, catch the exception and send the error message back in a tool_result block with is_error set to True. Claude can then try again or explain the problem. A library lookup that fails, with real output from anthropic 2.14.0 and Claude Opus 5.5.
8 min readHow to Add a Property to an Object in JavaScript
Add a property to a JavaScript object by assigning a value to it with a dot or square brackets, use a variable or a name with a space as the key, and replace a property's value the same way, with real output from Node.js 26.
4 min readHow to Send a Tool Result Back to Claude in Python
When Claude asks for a tool, run it, append Claude's reply unchanged, then send a user message with a tool_result block that carries the call's tool_use_id. Loop until Claude stops asking. A complete opening-hours example with real output from anthropic 2.14.0 and Claude Opus 5.5.
7 min readHow to Give Claude a Tool with the Claude API in Python
Describe a tool to Claude with a name, a description and a JSON Schema for its input, pass it in tools, and Claude answers with a tool_use block that names the tool and its arguments. One opening-hours tool, with real output from anthropic 2.14.0 and Claude Opus 5.5.
6 min readHow to Trace a Method in a Python Class with @mlflow.trace
Put @mlflow.trace above a method in a Python class and every call becomes a span named after the method, with its arguments as inputs and its return value as output. MLflow leaves the self argument out. Real output from MLflow 3.18.0.
5 min readHow to See an Exception in an MLflow Trace
When a traced Python function raises an exception, MLflow marks its span as an error and records the exception's message and type in the span's Events tab. See a failed step inside a successful trace and a trace that failed as a whole, with real output from MLflow 3.18.0.
7 min readHow to Add Attributes to a Span in MLflow
Attach your own details to an MLflow span: fixed ones with @mlflow.trace(attributes=...), and ones you only know while the function runs with mlflow.get_current_active_span() and set_attributes(). Plus why to check for None first. Real output from MLflow 3.18.0.
6 min readHow to Nest Spans in an MLflow Trace
Get one MLflow trace with a tree of steps instead of a separate trace per function: call traced functions from inside another traced function, and MLflow makes them child spans. A parent and two children in the trace view, with real output from MLflow 3.18.0.
6 min readHow to Set the Span Type of a Traced Function in MLflow
Tell MLflow what kind of step a traced function is, such as a tool, an agent or an LLM call, with @mlflow.trace(span_type=SpanType.TOOL). See the type's icon in the trace view, the UNKNOWN default and every built-in type, with real output from MLflow 3.18.0.
6 min readHow to Trace a Python Function with @mlflow.trace
Put @mlflow.trace above a Python function and every call becomes a trace in MLflow, with the function's arguments as inputs, its return value as output and how long it took. The span's default name and a custom one with name=, with real output from MLflow 3.18.0.
7 min readFixed: "Failed to build pyarrow==20.0.0" When You Run uv add mlflow
uv add mlflow tried to build pyarrow 20.0.0 from source and failed, because the project was named mlflow-tracing, the name of a package MLflow itself needs. uv fell back to the old MLflow 3.1.4. Renaming the project installed MLflow 3.18.0. Real output from uv 0.13.10 and Python 3.15.2.
8 min readFixed: "IDX11025: Cannot serialize object of type: 'Plan' into property: 'plan'" in .NET C#
JsonWebTokenHandler.CreateToken stopped with IDX11025 when a custom JWT claim held a C# record. IdentityModel writes only a fixed list of types, so turn your object into a JsonElement with JsonSerializer.SerializeToElement, or build the claim from a dictionary.
10 min read
Wednesday, December 2, 2026
8 of 81 posts
PyTorch Tutorial for Deep Learning in Python — Part 1: Install PyTorch and Create Your First Tensors on the GPU
Start a deep-learning project in Python: install PyTorch 2.15 and torchvision with uv on Python 3.15, create your first tensors, move them to the GPU and back, see the mixed-device error, and add a command that picks the GPU or the CPU.
38 min readHow to Compare Two Strings Alphabetically in Python
Compare text in Python with < and >, which put strings in order character by character, by each character's Unicode number. Real output from Python 3.15.2, including why capital letters come first and why "10" comes before "9".
3 min readHow to Use the @ Matrix Multiplication Operator in Python
Python's @ operator is for matrix multiplication, but no built-in type supports it: a class makes it work by defining __matmul__. Real output from Python 3.15.2, including the TypeError @ gives for two lists.
3 min readHow to Check the Type of a Value in Python with type()
Find out what kind of value a Python variable holds with type(): int, float, str or list. Real output from Python 3.15.2, plus why comparing a type with text fails and when isinstance() is the better test.
3 min readHow to Check if a Number Is Greater Than Another in Python
Compare two numbers in Python with >, <, >= and <=, each giving True or False, and chain them to test a range. Real output from Python 3.15.2, plus the SyntaxError from => and the TypeError from comparing text with a number.
3 min readFixed: "AnthropicConnectionError: Connection error." When a LangGraph Node Calls Claude
A LangGraph node that called Claude through ChatAnthropic failed with AnthropicConnectionError: Connection error., and the first error in the traceback was Illegal header value b'Bearer '. load_dotenv() hadn't found the .env file, so the API key was empty. Loading .env from the right folder fixed it.
11 min readFixed: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, mps:0 and cpu!
PyTorch stopped with RuntimeError: Expected all tensors to be on the same device, but found at least two devices, mps:0 and cpu! when a tensor on the Mac's GPU met one on the CPU. Making both tensors on the same device fixed it. Real output from PyTorch 2.15.0 on an Apple M1 Pro.
5 min readFixed: RuntimeError: Tensor for argument #2 'mat2' is on CPU, but expected it to be on GPU (while checking arguments for mm)
A PyTorch matrix product with @ stopped with RuntimeError: Tensor for argument #2 'mat2' is on CPU, but expected it to be on GPU (while checking arguments for mm): the second matrix was on the CPU, the first on the Mac's GPU. Moving it with .to(device) fixed it. Real output from PyTorch 2.15.0.
6 min read