Skip to main content

December 2026

Every post published in December 2026, newest first. Pick a day to jump straight to it.

Posts
97
Topics
38
Reading time
10 h
Active days
1

Posts 61–90 of 97 · December 1, 2026

Page 3 of 4

Tuesday, December 1, 2026

30 of 97 posts

  1. How to Run a Script in the Current Shell with source

    Run a shell script inside your current terminal with source (or .) in zsh and bash, and with dot-sourcing in PowerShell, so the variables it sets stay behind. Real output showing the difference from running the script normally.

  2. How to Run Python Code from the Command Line with python -c

    Run a line of Python straight from the terminal with python -c, without a script file, and use its output in other commands. Real output from Python 3.15.2, including the NameError that wrong quotes cause.

  3. How to Generate a Random Secret in Python with secrets.token_urlsafe

    Generate a strong random secret key or token in Python with secrets.token_urlsafe(64), see how long it is, and why the secrets module beats random for this. Real output from Python 3.15.2.

  4. How to Use the with Statement in Python

    Open a file with Python's with statement so it closes on its own when the block ends, and see the file's closed flag change. Real output from Python 3.15.2, including the ValueError for writing after the block.

  5. How to Define a Function Inside Another Function in Python

    Define a helper function inside another Python function, call it there, and let it read the outer function's variables. Real output from Python 3.15.2, including the NameError you get when you call it from outside.

  6. How to Read JSON from a File in Python with json.load

    Read a JSON file into a Python dictionary with json.load, then use its values, and see when to use json.loads instead. Real output from Python 3.15.2, including the AttributeError you get for passing text to json.load.

  7. How to Build a URL Query String in Python with urlencode

    Turn a Python dictionary into a URL query string such as q=weather+report&page=2 with urllib.parse.urlencode, safely escaping spaces, & and accented letters. Real output from Python 3.15.2, including the TypeError for a plain string.

  8. How to Turn a Date into ISO 8601 Text in Python with isoformat()

    Turn a Python date or datetime into standard ISO 8601 text such as 2026-11-30 or 2026-11-30T03:07:41+00:00 with isoformat(), and see why a datetime without a time zone loses its +00:00. Real output from Python 3.15.2.

  9. How to Get Yesterday's Date in Python with timedelta

    Subtract one day from a Python date with timedelta(days=1), and see it handle the end of a month and a leap year. Real output from Python 3.15.2, including the TypeError you get for date - 1.

  10. How to Get the Date from a datetime in Python with .date()

    Turn a Python datetime into just its date with .date(), and see the result's type and what you get when you forget the brackets. Real output from Python 3.15.2.

  11. How to Remove the Unmanaged Layer from a Managed Component in Power Apps

    Undo every change made to a managed flow or other component in an environment: select its unmanaged layer, choose Remove active customizations, confirm Delete unmanaged layer, and check that it's back to the managed version.

  12. How to See a Component's Solution Layers in Power Apps

    Open See solution layers for a flow, app or other component in Power Apps, read the order, solution, publisher and Active layer, and select a layer to see the properties it changed.

  13. How to Edit a Cloud Flow in a Managed Solution in Power Automate

    A flow installed with a managed solution can't be edited inside that solution. Add it to an unmanaged solution, turn it off, edit and save it, then turn it on, and see the Customized column change to Yes.

  14. How to Download Files from a SharePoint Document Library

    Download a file from a SharePoint document library by selecting it and choosing Download, or select several files to get them all in one zip file, with the name and contents of the zip SharePoint made.

  15. How to Upload Files to a Folder in a SharePoint Document Library

    Upload files into a folder of a SharePoint document library from the browser: open the folder, select Create or upload, then Files upload, choose the files, and check that they arrived.

  16. Fixed: "No token cache item found of UNIVERSAL kind" When Signing In with pac auth create

    pac auth create said authenticated successfully, then crashed with a non-recoverable error. Its log showed Internal: No token cache item found of UNIVERSAL kind for https://api.advisor.powerapps.com//.default, and no profile was saved. Signing in again with the same command created it.

  17. Fixed: "Script not found. It may have been unshared or deleted." in Power Automate

    After a flow moved to a new SharePoint site, Run script from SharePoint library showed GetSingleScriptV2 NotFound: Script not found. It may have been unshared or deleted. The script was there, but the action still held the old file's ID. Picking the script again fixed it.

  18. How to Write an Implicit Conversion Operator in C#

    A user-defined implicit conversion operator in C# lets a value of one type be used where another type is expected, with no cast. A small example turns 12.5 into a Celsius struct that prints as 12.5 C and back into a double, with real output, the build errors, and the Console.WriteLine call that printed 12.5 instead.

  19. How to Use a Constant as an Attribute Argument in C#

    An attribute argument in C# must be a constant, so a const field can be one and a static readonly field can't. A small example passes a public const string Hours to a Description attribute and prints Open 9:00 to 17:00, Monday to Saturday from both the attribute and the method, with the CS0182 error for static readonly fields and other non-constant values.

  20. How to Measure How Similar Two Vectors Are with TensorPrimitives.CosineSimilarity in C#

    TensorPrimitives.CosineSimilarity from the System.Numerics.Tensors package measures how similar two vectors are, from 1 for the same direction to -1 for the opposite one. A small example compares compass directions, which give 1, 0 and -1, and drinks described by how sweet, sour and bitter they are, where lemonade and orange juice score 0.98 and lemonade and coffee 0.25.

  21. How to Return a Finished ValueTask with ValueTask.FromResult in C#

    Return a ValueTask<T> that has already finished with ValueTask.FromResult, from a method or a lambda that isn't async. A small example counts the 6 letters of banana and squares 7 to 49, with real output, IsCompletedSuccessfully, and the CS0029 and CS0411 errors.

  22. How to Log an Exception with the LoggerMessage Source Generator in C#

    To log an exception with the LoggerMessage source generator in C#, give the logging method an Exception parameter and leave it out of the message. A small example logs Could not print invoice-42.pdf. with System.InvalidOperationException: The printer is out of paper. below it, with real output, the SYSLIB1013 warning and what a caught exception adds.

  23. How to Use is not with a Declaration Pattern in C#

    An is not check with a declaration pattern in C#, such as input is not int number, turns away values that aren't an int, and after an if that returns, number holds the int. A small example doubles 5 and 12 and turns away hello, with the CS0165 and CS0128 errors you get when the variable is used too early or declared twice.

  24. How to Store a Number with a Fraction in a float or double in C#

    Store a number with a fraction in C# in a double, or in a float with the f suffix. A small example stores 1.75 and 68.5f, shows one third as 0.3333333333333333 in a double and 0.33333334 in a float, and prints their sizes, 8 and 4 bytes, with real output and the CS0664 and CS0266 errors.

  25. How to Sort from Highest to Lowest with LINQ OrderByDescending in C#

    LINQ's OrderByDescending in C# sorts a sequence from highest to lowest by a key you choose. A small example sorts temperatures to 30, 25, 21, 18 and four players by their points, where Ben and Dev both have 95 and keep their list order, with real output and the mistakes that leave a list unsorted.

  26. How to Pass null to an Overloaded Method in C#

    Passing a bare null to an overloaded method in C# fails with error CS0121 when more than one overload can take null. A small example with Show(string?) and Show(int?) picks each overload with a cast: (string?)null printed Show(string?) got null. With real output and what happens with default, (int)null and (string)null.

  27. How to Mix int and decimal Values in One Calculation in C#

    Mix an int with a decimal or a double in one C# calculation, and the int converts by itself. A small example multiplies 38 hours by 15.75m to 598.50 as a decimal and divides 90 by 60.0 to 1.5 as a double, with real output, the CS0266 and CS0019 errors, and why 38 / 4 gave 9.

  28. How to Use a Tuple with Named Elements in C#

    A tuple with named elements in C# holds a few values together and lets you read each one by name, such as result.Quotient, without declaring a class. A small example returns 17 divided by 5 as a quotient of 3 and a remainder of 2 from one method, prints (3, 2), and shows the errors and the silent swap that tuple names can cause.

  29. How to Get the First Item or a Default with LINQ FirstOrDefault in C#

    LINQ's FirstOrDefault in C# returns the first item that passes a test, or a default value when none does, which is null for a string, 0 for an int, or a default you pass in. A small example finds planet as the first word longer than 5 letters, gets null and then none for a z, and 0 from an empty int array, with real output.

  30. How to Pass Any Number of Arguments to a Method with params in C#

    params in C# lets a method take any number of arguments, which arrive as one array or collection. A small example calls Total with none, one and three numbers and prints count 3, total 35, passes an existing array, and uses a C# 13 params IEnumerable, with the build errors for params in the wrong place.