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.

Windows VM running in Kubernetes (KubeVirt) causes host Ubuntu 22.04 to restart after changing network.interface.model to virtio

4 February 2026 @ 11:20 am

I have an Ubuntu 22.04 machine with Kubernetes installed. Kubernetes version: v1.28.15 Host OS: Ubuntu 22.04 Kubernetes runs directly on the host A Windows VM is running inside the Kubernetes cluster (using KubeVirt) Initially, the Windows VM network interface was configured as e1000. Later, I changed the network interface type to virtio. After this change, when I run my application inside the Windows VM, the following issue occurs: The VM network becomes unresponsive (appears to hang) Shortly after, the entire Ubuntu host restarts unexpectedly This does not happen consistently when using the e1000 NIC(But some network restrictions were there), but happens after switching to virtio. I suspect the issue might be related to:

What is an AI App Builder? Everything You Need to Know

4 February 2026 @ 11:18 am

An AI app builder is a smart platform that allows businesses and individuals to create mobile and web applications using artificial intelligence without traditional coding. With the help of an advanced AI app maker, users can design, customize, and launch applications quickly by using automation, templates, and intelligent features. Creative AI provides a powerful AI app builder that simplifies development, reduces costs, and helps businesses transform ideas into fully functional applications faster.

Spilo HA cluster with mTLS: BOOTSTRAP_POSTGRES_DATABASES not creating databases and SSL certs not used

4 February 2026 @ 11:14 am

I’m setting up a Spilo (Postgres HA) cluster inside Docker with mTLS for both Postgres and Etcd. I’m facing two issues: Databases specified in BOOTSTRAP_POSTGRES_DATABASES are not created. Postgres does not accept client certificates even though SSL is enabled. spilo: image: ghcr.io/zalando/spilo-17:4.0-p3 container_name: postgres_spilo environment: - SCOPE=my-cluster - POD_IP=spilo # Etcd mTLS - PATRONI_ETCD3_HOSTS=etcd:2379 - PATRONI_ETCD_PROTOCOL=https - PATRONI_ETCD_CACERT=/etc/postgres/certs/ca.crt - PATRONI_ETCD_CERT=/etc/postgres/certs/etcd_client.crt - PATRONI_ETCD_KEY=/etc/postgres/certs/etcd_client.key # SSL for Postgres - SSL_CA_FILE=/etc/postgres/certs/ca.crt - SSL_CERTIFICATE_FILE=/etc/postgres/certs/postgres_server.crt - SSL_PRIVATE_KEY_FILE=/etc/postgres/certs/postgres_s

Why does a System.Object error occur when using Costura.Fody in a VB.NET SmartPlant P&ID automation project?

4 February 2026 @ 11:06 am

enter image description here I am developing an automation tool for SmartPlant P&ID using VB.NET (.NET Framework). My goal is to embed all dependent DLLs into a single EXE, so I tried using Costura.Fody. Environment VB.NET (.NET Framework 4.8) SmartPlant P&ID Workstation (32-bit) Visual Studio NuGet packages: Fody (6.8.x) Costura.Fody Vendor DLLs from SmartPlant P&ID (late-bound COM/.NET assemblies)

theme-color / status bar color works on Android light mode, but not on iOS or Android dark mode in a React PWA

4 February 2026 @ 11:02 am

I’m trying to control the device status bar / browser address bar color in a React PWA using the theme-color meta tag plus a useEffect to keep it in sync. This works on Android in light mode, but: On iOS (Safari, Chrome, and when added to home screen), the status bar color does not reflect the chosen color. On Android in dark mode, the address bar/status bar color also ignores the value and appears to default to a system color. I’m setting theme-color both: Statically in (HTML) And dynamically from React in useEffect I also have a web app manifest and some CSS, but none of it seems to affect iOS or dark‑mode Android. Here’s the relevant code with app‑specific details removed. HTML/React root Layout import { ColorSchemeScript, MantineProvider } from "@mantine/core"; import { useEffect } from "react"; import type { ReactNode } from "react"; import { Ou

Telegram OAuth with django

4 February 2026 @ 10:56 am

im trying to integrate telegram oauth into my application, currently it successfully log in in telegram, but django doesnt received any data in callback, I have tryied many methods, but without any results views.py def telegram_callback(request): data = request.GET.dict() print('Telegram callback data:', data) if not verify_telegram_auth(data): return HttpResponseBadRequest("Invalid Telegram auth") telegram_id = data["id"] username = data.get("username", f"tg_{telegram_id}") first_name = data.get("first_name", "") last_name = data.get("last_name", "") user, created = User.objects.get_or_create( username=f"tg_{telegram_id}", defaults={ "first_name": first_name, "last_name": last_name, }, ) print(user, telegram_id) login(request, user) return HttpResponseRedirect(reverse("home"))

Telegram Gateway callback delivery

4 February 2026 @ 10:56 am

We are experiencing an issue with Telegram Gateway callback delivery, even though the verification message request is processed successfully. Below is a concrete example: API Endpoint: POST https://gatewayapi.telegram.org/sendVerificationMessage Request parameters: phone_number: +1667xxxxxxxx code: 666888 callback_url: https://xxxx.xxx.com/webhook payload: 128 API Response (successful): ok: true request_id: 173632xxxxxxx delivery_status.status: sent delivery_status.updated_at: 1770186618 Despite the message being marked as “sent”, we do not receive any callback request at the configured callback URL.

ALE Vim Go linter does not wrap Warning message words in Lubuntu

4 February 2026 @ 10:53 am

Usual picture. Scaled picture after pressing Ctrl+- ALE linter does not wrap warning message words as you can see on the first image and I can see complete line only using scaling as you can see on the second image. What setting could I use to view warning text without pressing Ctrl+-? It seems that I cannot navigate to warning message using l keyboard button.

Convergence issue using SciPy for portfolio optimization

4 February 2026 @ 10:51 am

I am using scipy.optimize.minimize with trust-constr algorithm to run the optimization. The goal is quite standard: optimizing the weights w of a portfolio under some constraints, w0 being the weights of the reference portfolio. This is in the framework of moving from matlab and its fmincon optimizer to python. So what I am doing is running optimizations with each solver and comparing results. With matlab fmincon, there is usually no problem. In each case, the tolerance was set to 1e-12. The function to minimize has the form fun = -(signal @ x) with a Jacobian jac = -signal and Hessian hess = np.zeros((len(signal), len(signal)). Here, x is an array of weights. There are both bounds and constraints (linear and nonlinear). The linear constraint just states that the weights should sum to 1: LinearConstraint(np.ones((1, w0.size)), lb=1, ub=1, keep_feasible=False)

Can I defer the execution of a pipeline assignment

4 February 2026 @ 10:42 am

Apparently I broke my Permutations cmdlet without noticing it... The cmdlet is supposed to generate permutations of a given set. Be aware that the number of permutations grows rapidly (factorial) depending on the set size: Permutation count = (set size)!, E.g. for set of 6 objects, there are 6! = 362880 permutations. Therefore I created a permutation class based on the enumerator interface which works fine: [Permutations](1..3)