Random snippets of all sorts of code, mixed with a selection of help and advice.
MS Enterprise Website connector authentication
8 December 2025 @ 8:26 pm
I'm working on building a new intranet for our company using Umbraco as the CMS and we want a "universal" search so that we can get results from our intranet alongside documents and other info stored in MS graph. We are working on implementing the MS Enterprise Website On-prem connector to crawl our intranet, but have hit a road block with the authentication. We recently switched to Entra Id Oauth from Windows auth, which seemed like it would work great because the connector supported Oauth as well. The problem is that it uses App authentication but our site require a username so it fails the login process.
Does anyone know of a way to either allow the App authentication to work with .NET Membersip, or is there a way that I can have the default Auth method be Oauth while only using Windows auth for the Connector?
How to use a separate classes (stubs) in vitest?
8 December 2025 @ 8:24 pm
I've migrated my angular 21 tests from jasmine to vitest. And for some of my tests I use separate helper classes (like Page object models). For example:
export class SignUpPageObject {
constructor(fakeVerificationSvc: IUserVerificationService) {
TestBed.overrideProvider(UserVerificationService, { useValue: fakeVerificationSvc });
this.fixture = TestBed.createComponent(IlgSignUpForm);
this.fixture.detectChanges();
this.component = this.fixture.componentInstance;
this.loader = TestbedHarnessEnvironment.loader(this.fixture);
this.docRootLoader = TestbedHarnessEnvironment.documentRootLoader(this.fixture);
}
get emailInput(): Promise<MatInputHarness> {
return this.loader.getHarness(MatInputHarness.with({ label: "Email" }));
}
async getErrorDialog(): Promise<MatDialogHarness> {
const dlgHarnesses = await this.docRootLoader.getAllHarnesses(MatDialogHarness.with({ selector: "#ilgError
Why does mysqli_num_rows() produce the error “expects parameter 1 to be mysqli_result?
8 December 2025 @ 8:23 pm
I checked the connection was successful, the database also exists. But the mysqli_query function apparently returns false. I've tried:
Check table name: correct
Check column name: correct
Running query directly in phpMyAdmin: success
Added mysqli_error($conn) for debugging
IIncrementalGenerator and AdditionalFiles
8 December 2025 @ 8:23 pm
I'm getting into IIncrementalGenerator Source Code Generation, but I keep getting weird behavior in Visual Studio. The Generators are working perfectly, but after building, most of my c# files that go through them as additional files end up as showing as plain text. I have to close VS and reopen. Even then it can take several attempts.
I have gotten close by editing my MSBuild settings like this:
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include=".\**\*_cg.cs" />
<AdditionalFiles Include=".\**\*_cg.xaml" />
</ItemGroup>
<ItemGroup>
<Compile Include=".\**\*_cg.c
Tableau checkbox filters for multiple fields with 1,0 values
8 December 2025 @ 8:19 pm
I've been researching for hours and cannot seem to figure out if this is possible. I have a about 40 fields that have a 1 or 0 value. I want to have a filter for each field and the ability to select 1 or 0. Preferably a check box filter.
If field 1 is filtered to 0, that would filter the field to show all records with a 0. If a user chooses field 2 and filters to 1, then that would filter results with field 1 having a 0 and filed 2 having a 1, so on and so forth. This would be utilized to allow the end user to update visualizations, counts etc. accordingly.
Is this possible?
on tableau 2025.1.2
Trying to subtract from IMPORTRANGE
8 December 2025 @ 8:14 pm
I would like the cell F4 to subtract from the corresponding F4 cell via IMPORTRANGE to get a week-over-week variance in item inventory.
This is what I have so far, but this looks like it's just pulling data from my current spreadsheet and not subtracting, since it is not zero-ing out.. as the data on both sheets is currently the same.
=MINUS(F5,IMPORTRANGE("doc link", "Liquor!F:F"))
ASP.NET Core Web API: LinkCollectionWrapper<T>.Values always null in JSON despite being populated
8 December 2025 @ 8:07 pm
I'm building a HATEOAS implementation in ASP.NET Core using a LinkCollectionWrapper<T> class that wraps a collection of entities and stores links. My classes look like this:
public class Link
{
public string? Href { get; set; }
public string? Method { get; set; }
public string? Rel { get; set; }
public Link() { }
public Link(string href, string rel, string method) { Href = href; Rel = rel; Method = method; }
}
public class LinkResourceBase
{
public List<Link> Links { get; set; } = new List<Link>();
}
public class LinkCollectionWrapper<T> : LinkResourceBase
{
public List<T> Values { get; set; } = new List<T>();
public LinkCollectionWrapper() { }
public LinkCollectionWrapper(List<T> values) { Values = values; }
}
In my service, I populate a list of EmployeeDto objects (each with its own list of links) and wrap them like this:
var col
SwiftUI WKWebview encounters javascript error on every function call after the first succeeds
8 December 2025 @ 8:06 pm
I'm working on a SwiftUI project that embeds a couple WKWebviews in a tabview and uses flatbuffers for serialization. I've just added the second webview which acts as sort of 'details' sheet, which should be much easier than the other that includes an entire codemirror editor, but it refuses to run the setNoteDetails function only after the first function call succeeds.
I'm getting this error:
JavaScript execution returned a result of an unsupported type
I've tried wrapping the function in an iife, emitting an event in the function instead of calling a function attache to the window, and still I can't get the view to run the function successfully only after the first one runs successfully.
Also, when I copy and paste the generated function string into the safari devtools, everything works as expected. I've even tried serializing everything as a base64
jXchange Endpoint for Changing Customer Email Address Associated to Netteller ID or Online Banking ID
8 December 2025 @ 8:05 pm
We are attempting to automate a process that will change customer's contact information in our core system. We are using the jXchange CustMod operation to change the customer's email addresses. However, our current manual process involves syncing the new primary email address on a customer profile with their assigned NetTeller ID or Online Banking user. So far, I've yet to find an endpoint/operation in the jXchange SOAP docs that will accomplish this.
This is the screen we go to when adjusting their Email address on their NTID in SilverLake.
screenshot
Is there a method to automating this change that anybody is aware of?
Multiplayer programming advice for new game (C# & Mono)
8 December 2025 @ 8:05 pm
I am programming a tetris style game in mono and c# that I want to add multiplayer to. It will be both single player and multiplayer.
The way I want it to work - I want dynamic lobbies (say 10 of them), each having spaces for up to 8 people. When someone joins a lobby, they will wait there until someone else joins. The game will then start a timer (10 seconds), and anyone can join while it is counting down. game starts, and that lobby can still be joined by SPECTATORS only, but thats it (up to 8, including existing players).
I dont know if there is an api or library that would make this easier, or if steam has a way of helping, whether it could be done without a actual server(p2p), or ideally with a server. ANY suggestions/advice would be extremely helpful.
Of course, I am shooting for best connection possible - traffic I imagine being sent would be keystrokes, and the position the piece ends up on the board, as well as some powerup attributes that will aff