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.

How to access/document a private HMAC-secured API for Odoo SaaS middleware integration?

19 May 2026 @ 6:05 am

We are working on an Odoo SaaS integration project where an external middleware service needs to fetch orders from a third-party ecommerce platform called PipesSpace. The API endpoint provided in the FSD document is: https://www.pipesspace.com/adminapi/odoo/v1/financeOrder When accessing the endpoint directly, we receive: { "code": 401, "message": "Request error, please try again later!", "data": null } Based on the technical specification, the API uses HMAC-SHA256 authentication with headers like: X-Odoo-Key X-Odoo-Timestamp X-Odoo-Nonce X-Odoo-Signature The integration architecture is: PipesSpace API ↓ Middleware Scheduler ↓ Authentication ↓ Fetch Orders ↓ Normalize Data ↓ Duplicate Check ↓ Odoo SaaS The challenge is: There is no public API documentation available.

Previous_gtids in new binlog is wrong after restart, replication breaks

19 May 2026 @ 6:05 am

After a server restart, downstream replication started failing with GTID inconsistencies — some transactions look "missing" from the GTID set even though they were definitely committed before the restart. Digging in, the new binlog file written after startup has a Previous_gtids that doesn't include GTIDs which only existed in the old binlogs (not yet flushed to mysql.gtid_executed). We have a fairly aggressive binlog_expire_logs_seconds, and at startup the server purges expired binlogs immediately. Looks like the purge-at-startup runs before GTID state is fully initialized — I'd guess upstream MySQL has the same issue. Anyone hit this on 8.0.2? Any workaround other than bumping the binlog retention?

Playwright headless browser blocked by Adzuna land/ad/ redirect — "Access Denied" — how to resolve the redirect chain?

19 May 2026 @ 5:53 am

Problem I'm building an automated job application system. When a user clicks "Auto Apply" on an Adzuna job listing, my backend needs to follow the redirect chain to the actual employer application form and fill it out automatically. Adzuna job listings follow this redirect chain: https://www.adzuna.com.au/details/{id} ← job listing (loads fine) → https://www.adzuna.com.au/land/ad/{id} ← tracking redirect (BOT BLOCKED) → https://click.appcast.io/t/{token} ← appcast tracking → https://hatch.team/job/{slug} ← employer platform → https://jobs.ashbyhq.com/{company}/{id}/application ← actual form What works: Navigating to the Adzuna details page with Playwright — works fine Extracting the land/ad/ URL from the Apply button — works fine Following the full chain with Firecrawl (steal

Performance of Depth-First Search (DFS) algorithm in Java

19 May 2026 @ 5:39 am

I implemented Depth-First Search (DFS) recursively in Java. My current implementation searches the entire node list every time I follow an edge in order to find the target node. public void dfsSearch(String start){ List<String> besuchliste = new ArrayList<>(); for(int i = 0; i < getKnotenListe().size();i++){ Knoten knoten = getKnotenListe().get(i); if(knoten.get_name().equals(start)){ hilfMethodea(knoten,besuchliste); } } } private void hilfsMethode(Knoten aktuellerknoten, List<String> besuchsliste){ besuchsliste.add(aktuellerknoten.get_name()); System.out.println("Besuchter Knoten" + aktuellerknoten.get_name()); for(int i = 0; i < aktuellerknoten.get_kanten().size();i++){ Kante kante = aktuellerknoten.get_kanten().get(i); String ziel = String.valueOf(kante.get_ziel()); if(!besuchsliste.contains(ziel)){

Merging and detaching tabs in Electron.js app

19 May 2026 @ 5:25 am

When I working on a project that requires multiple windows, I use the BrowserWindow() Method of Electron to doing this. My code of making the windows const { app, BrowserWindow, screen, ipcMain} = require('electron') const path = require("node:path") let orb; let overlay; function createOrb () { orb = new BrowserWindow({ width: 50, height: 50, alwaysOnTop: true, resizable: false, frame: false, hasShadow:false, webPreferences: { devTools: true, contextIsolation:true, nodeIntegration:false, preload: path.join(__dirname, "preload.js") } }) orb.on("closed", ()=> app.quit()) orb.loadFile('orb.html') } function overlayWindow () { const { width, height } = screen.getPrimaryDisplay().workAreaSize overlay = new BrowserWindow({ widt

incorrect resource path when importing image url when using asset/resource

19 May 2026 @ 5:16 am

The image is being produced in ~/Documents/restaurant-page/dist/images/52e944639d832ccc4639.png but the URL imported in javascript is /home/amanr/Documents/restaurant-page/distimages/52e944639d832ccc4639.png . The image fails to render when opening the html file by itself but it renders correctly when opening through the server setup by webpack-dev-server. Any idea why this happens? Would this impact something if I host it? Webpack Config: import path from 'node:path'; import HtmlWebpackPlugin from "html-webpack-plugin"; const __dirname = import.meta.dirname; export default { entry: "./src/index.js", output: { publicPath: path.resolve(__dirname, "dist/"), filename: "index.bundle.js", assetModuleFilename: 'images/[hash][ext][query]', }, mode: "development", plugins: [new HtmlWebpackPlugin({ template: path.resolve(

Docker pull for dpage/pgadmin4 fails with failed to unmarshal hook response and unexpected EOF

19 May 2026 @ 5:05 am

I am facing an issue while pulling the pgAdmin Docker image. The image gets downloaded successfully the first time using in some systems: docker pull dpage/pgadmin4 However, if I remove the image and try pulling it again, the pull fails around layer 15/18 with errors like: short read: expected 13394216 bytes but got 0: unexpected EOF Sometimes Docker logs also show: time="2026-05-15T11:32:47+05:30" level=debug msg="Plugin hook invocation failed" error="failed to unmarshal hook response (\"\"): unexpected end of JSON input" plugin=scout short read: expected 13394216 bytes but got 0: unexpected EOF Environment: Docker Desktop on Windows WSL2 backend Docker Scout enabled earlier We had also configured Docker Engine registry mirrors previously Docker Engine conf

Why are my Laravel API Route-Model Binding parameters empty or causing 404/validation errors with a frontend fetch?

19 May 2026 @ 5:00 am

I am working on a full-stack application where the frontend is a plain HTML page using JavaScript fetch and Bootstrap 5, and the backend is a Laravel 11 API. I have defined a standard Route::apiResource('invoice_details', InvoiceController::class); route, which handles endpoints for invoice line items. The GET request to fetch data functions correctly, but my POST, PATCH, and DELETE requests fail with unexpected behaviors. For instance, when attempting a DELETE request, the controller fails to receive the model, resulting in a custom 404 error block I implemented because the object arrives empty. Additionally, during a POST request, the InvoiceRequest validation class triggers, but it returns error responses or fails silently without hitting the database correctly. Looking at my Eloquent models, Invoice has a hasMany relat

Rust - create a hierarchical structure of markdown files

19 May 2026 @ 5:00 am

I have an obsidian.md vault with notes and I want to display them in a webpage with a specific order/hierarchy. I want to do this without hardcoding anything in the html file itself so when I found out about frontmatter I thought it would be the perfect way to achieve this by assigning a weight and slug parameter to each note in their frontmatter. However it got complicated when I added subdirectories with unknown depth. This is how I'm imagining it: (this is an example vault) path local weight global weight uri Introduction.md 1 1 intro Programmming/ 2 2 prog Computer basics.md 1 2.1 prog/c-basics Compiled vs Interpreted.md 2 2.2 prog/com-vs-int Python/ 3 2.3 prog/pyt

Frontend Looks Fine with AI, But Should I Still Learn the Basics Properly?

19 May 2026 @ 4:06 am

So far, I was involved in frontend development, and now I started to use some AI tools to create UI components, layouts, animations, and also make my work more productive. Frontend side is fine and I manage to build quite nice interface thanks to AI. But still, sometimes, I'm afraid that my base knowledge is not strong enough, and I feel gaps in such areas as JavaScript principles, React basics, optimization techniques, and frontend architecture as a whole. So sometimes I understand the code provided by AI, but most often, I just change things a little bit, not being aware of its logic. Thus, my question is: Is it reasonable to proceed with developing my projects using AI while learning at the same time or should I first thoroughly learn frontend concepts? Ultimately, I want to be an experienced frontend developer, not just copying AI-generated code. I would highly appreciate your opinion regarding the issue as I'm aspiring for becoming a professional.