December 2026
Every post published in December 2026, newest first. Pick a day to jump straight to it.
- Posts
- 178
- Topics
- 49
- Reading time
- 17 h
- Active days
- 2
Posts 151–178 of 178 · December 1, 2026
Page 6 of 6
Tuesday, December 1, 2026
28 of 97 posts
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.
4 min readHow 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.
5 min readHow 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.
5 min readHow 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.
7 min readHow 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.
4 min readHow 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.
4 min readFixed: "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.
9 min readFixed: "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.
8 min readHow 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.
7 min readHow 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.
7 min readHow 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.
8 min readHow 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.
6 min readHow 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.
9 min readHow 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.
7 min readHow 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.
7 min readHow 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.
6 min readHow 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.
7 min readHow 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.
7 min readHow 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.
7 min readHow 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.
7 min readHow 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.
7 min readHow to Add, Subtract, Multiply and Divide Numbers in C#
Add, subtract, multiply and divide numbers in C# with +, -, * and /. A small example works with 17 and 5, where 17 / 5 gave 3 as whole numbers and 3.4 as doubles, and 2 + 3 * 4 gave 14, with real output, the DivideByZeroException and what happens past int.MaxValue.
7 min readHow to Switch on Two Values at Once with a Tuple Pattern in C#
A tuple pattern lets a C# switch expression match two values at once: put them in parentheses, such as (isCold, isRaining), and write one arm per combination. A small example picks clothes for all four weather combinations and builds with 0 warnings, with the CS8509 warning, the CS8502 and CS8510 errors and a swapped-order bug you can hit on the way.
6 min readHow to Find the Position of an Item in a List with FindIndex in C#
List<T>.FindIndex in C# returns the position of the first item that passes a test, or -1 when none does. A small example finds milk at index 1 in a shopping list, replaces it through that index, finds melon at index 3 with a start position, and gets -1 for z, with real output and the mistakes to avoid.
7 min readHow to Put an Attribute on a Lambda Parameter in C#
In C#, an attribute can go on a lambda's parameter, written inside the parentheses in front of it. A small example puts Description on the celsius parameter of a Celsius-to-Fahrenheit lambda, prints 100 C is 212 F, reads the description back with reflection, and shows the errors for missing parentheses and a wrong attribute.
6 min readHow to Convert a String to a double with double.Parse in C#
Convert a string to a double in C# with double.Parse and a culture. A small example reads "3.5" and "1.25" with the invariant culture and adds them up to 4.75, then shows why "3.5" read as German became 35, with real output, the FormatException for "$4.99" and Infinity for 1e400.
6 min readHow to Match Several Patterns with or in C#
The or pattern in C# matches a value against several patterns at once, so one switch arm or one is check covers them all. A small example sorts a, b, e and x into vowels and consonants with one arm for all five vowels and checks a grade with is 'A' or 'B', with the errors you get from ||, a variable inside or, and not without parentheses.
6 min readHow to Run Several Tasks at Once and Wait for All of Them with Task.WhenAll in C#
Task.WhenAll in C# waits for several tasks that run at the same time and gives back all their results in the order you passed them in. A small example makes tea, toast and an egg that take 3, 2 and 1 seconds, all done after 3.0 seconds instead of 6, with real output and what happens when two of the tasks throw.
8 min read