StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Best practice for User Provisioning between Microservice DB and Keycloak in a DDD/Hexagonal Architecture

31 January 2026 @ 5:57 pm

I'm building a microservices system using Java Spring Boot, DDD, and Hexagonal Architecture. Current Stack: BFF Service: Orchestrates frontend requests. Customer Service: Manages domain-specific data in PostgreSQL. Keycloak: Handles Authentication and Identity. (Authorization Service) The Problem: When a new customer registers, I need to: Create a record in my customer-service PostgreSQL DB. Provision the user in Keycloak (so they can log in). Here is CreateCustomerUseCase: public CustomerResponse createCustomer(@Valid CreateCustomerRequest request) { Customer customer = customerMapper.toDomain(request); customer = customerRepository.save(customer); return customerMapper.toResponse(customer); } I am struggling with the most robust way to sync these two. I considered an event-driven approach where cust

Bulk revise drawings, parts and assemblies through autodesk vault api

31 January 2026 @ 5:55 pm

I have wrote a C# program using Autodesk vault APIs to revise bulk of objects in Vault by reading an excel where the filename and the revision number is recorded. I'm able to establish connection to vault. But when I get to the 'updateFileRevisionNumbers' method, I get 1013 exception. Tried many things with no luck. How to resolve this issue var searchCond = new ACW.SrchCond { PropDefId = fileNamePropDefID, SrchOper = 1, SrchTxt = fileName, SrchRule = ACW.SearchRuleType.Must }; ACW.File[] files = connection.WebServiceManager.DocumentService.FindFilesBySearchConditions( new ACW.SrchCond[] {searchCond}, null, null, true, true, ref bookmark, out status); if (files.Length == 0) { Console.WriteLine($"File not found:{fileName}"); continue; } var file = files[0]; //update revision try { connection.WebServiceManager.DocumentServiceExtensions.UpdateFileRevisionNumbers(new long[] {file.MasterId},

Why does sql alchemy doesn't see changes despite the commit

31 January 2026 @ 5:42 pm

Statement - session.execute(select(User).where(User.id==1) # = unfilled # begin transaction; UPDATE user SET state=filled WHERE id=1; commit; session.commit() session.execute(select(User).where(User.id==1) # =unfilled, but we expect filled It seems that session sql alchemy doesn't see the changes after commit.

Open search 3.1 not showing traces at node level for DBQ query

31 January 2026 @ 5:37 pm

Setup: Created a local setup of Open Search 3.1 with jaegar to view traces. I am able to see http level traces but not detailed traces at node/shard level to debug slow DBQ queries. Configs used: telemetry.feature.tracer.enabled - true opensearch.experimental.feature.telemetry.enabled - true telemetry.tracer.enabled - true telemetry.tracer.sampler.probability - 1 telemetry.otel.tracer.span.exporter.class - io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporte Attaching screenshot for the same OS traces

Move elements in a grid layout

31 January 2026 @ 5:37 pm

I use DND to move elements. I have a desktop and mobile view. Moving and dropping works great on the mobile view because it's a one-dimensional vertical list. But it doesn't work on the desktop. There, I use a grid layout. Moving and displaying where I can place an element is not shown. When I move an element from the bottom row to the middle row, it is placed in the first row, the next one next to it, and so on. So it starts at the top and continues down, but not where I want to place it. What am I doing wrong? "use client"; import { cn } from "@/lib/utils"; import { TooltipProvider } from "@/components/ui/tooltip"; import { RefreshCw } from "lucide-react"; import { useSession } from "next-auth/react"; import { useCallback, useEffect, useMemo, useState } from "react"; import { navigationCategories } from "@/lib/navMenu"; import EditMode f

How to use pre-boot SSH feature on macOS Tahoe for unlocking Mac with FileVault remotely [closed]

31 January 2026 @ 5:26 pm

I have a Mac mini I want to use as a headless server. The Mac has FileVault enabled and I'd like to keep it on. I'd like to make use of the pre-boot SSH feature in macOS Tahoe so I can unlock the drive remotely without connecting a physical monitor and keyboard to the Mac. The machine is wired into the network over Ethernet, and Wi-Fi is disabled. When I try to ssh into the machine, I get an error: >> ssh [email protected] kex_exchange_identification: read: Connection reset by peer Connection reset by 192.168.0.8 port 22 But the machine does respond to pings: >> ping 192.168.0.8 PING 192.168.0.8 (192.168.0.8): 56 data bytes 64 bytes from 192.168.0.8: icmp_seq=0 ttl=64 time=0.708 ms 64 bytes from 192.168.0.8: icmp_seq=1 ttl=64 time=0.715 ms 64 bytes from 192.168.0.8: icmp_seq=2 ttl=64 time=0.900 ms ^C --- 192.168.0.8 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-t

how can i make this button work iside the fragment?

31 January 2026 @ 5:25 pm

The button "b" in the fragment, wont do a thing The logcat just shows " the up motion event handled by client, just return" i have seen many post about this problem but nothing worked for me... activity main(named root): package com.nio.myapplication2; import android.content.Intent; import android.os.Bundle; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; import androidx.navigation.NavController; import androidx.navigation.Navigation; import androidx.navigation.ui.AppBarConfiguration; import androidx.navigation.ui.NavigationUI; import com.nio.myapplication2.databinding.ActivityMainBinding; import java.util.Objects; public class Root extends AppCompatActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); com.nio.myapplication2.databinding.ActivityMainBinding binding = ActivityMainBi

Flutter pubspec.yaml error: “A dependency may only have one source” while adding packages

31 January 2026 @ 5:22 pm

I am getting the following error while running flutter pub get: Error on line 32, column 5 of pubspec.yaml:A dependency may only have one source. I am trying to add google_fonts and cupertino_icons to my Flutter project. Even after checking indentation, the error still occurs. Here is the relevant part of my pubspec.yaml file:

What does "SbkConverter::copyToPython is null" mean?

31 January 2026 @ 4:48 pm

I was trying to get extentions to work in PySide6. Here's a shortend version of the code: self._profile = QWebEngineProfile(profilenameorwhatever) ... ext_man = self._profile.extensionManager() print(ext_man.extensions()) The print statment prints [None, None] and when I call ".extensions()", regardless of if it's in a print or not, I get this in the cmd: program.py:48: RuntimeWarning: CopyCppToPython(): SbkConverter::copyToPython is null for "PySide6.QtWebEngineCore.QWebEngineExtensionInfo". print(ext_man.extensions()) Which doesn't crash the program. I have not actually written any more code but I don't think I have to, I will just get 'NoneType' object has no attribute '...' if I try to do anything with that. From my understanding of the documentation I should get a list filled with PySide6.QtWebEngineCore.QWebEngineExtensionInfo obje

Gitlab - how do I push a new branch using my existing ssh key pair? [closed]

31 January 2026 @ 4:25 pm

Os: W10. I have a local SSH key on my machine. I have a matching public key at Gitlab (verified by ssh -T [email protected]). In the past I have managed to push newly created branches by this means. But now I can't get this to work. I seem to be using the wrong commands, and mixing up ssh and http URLs in some way. So today I just set up another project. Having done an initial commit: ...\my_new_project>git remote add origin https://gitlab.com/mrodent/my_new_project ...\my_new_project>git remote set-url origin ssh://[email protected]/mrodent/my_new_project ...\my_new_project>git push --set-upstream https://gitlab.com/mrodent/my_new_project.git main Enumerating objects: 15, done. ... branch 'main' set up to track 'https://gitlab.com/mrodent/my_new_project.git/main'. ... at this point things seem (?) fine ... but then I want to set up a development branch: ...\my_new_project>git checkout -b TDD_2026-01-3