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.

CPU regression in MongoDB for find operations with $in and deep projections

16 March 2026 @ 10:58 am

I've encountered a critical performance issue in MongoDB 8.0.15 - 8.0.20. I need your help diagnosing and finding a solution. After upgrading from version 8.0.14 to any of the versions 8.0.15 - 8.0.20, I observed a sharp increase in CPU consumption when executing identical queries. Rolling back to 8.0.14 completely returns performance to normal. Has anyone else encountered similar behavior when upgrading to 8.0.15+? Are there any known MongoDB Jira tickets describing this issue? I'm attaching a partial log of the slow operation from production: "planSummary": "IXSCAN { _id: 1 }", "planningTimeMicros": 1963814, "keysExamined": 45, "docsExamined": 28, "nBatches": 1, "cursorExhausted": true, "numYields": 0, "nreturned": 28, "planCacheShapeHash": "DA96103F", "queryHash": "DA96103F", "planCacheKey"

Flutter SSL Handshake Failure on Android 13 and below

16 March 2026 @ 10:51 am

We are experiencing an SSL handshake issue in a Flutter-based Android application when connecting to a backend API hosted on SAP Cloud Platform Integration (SAP CPI). Recently, the API certificate chain was upgraded to DigiCert TLS RSA4096 Root G5. After this change, Android devices running Android 13 and below fail to establish an HTTPS connection. The error observed is: HandshakeException: Handshake error in client(OS Error: CERTIFICATE_VERIFY_FAILED: self signed certificate in certificate chain) However, the same API works correctly on: Android 14 and above iOS devices Backend Configuration The backend server is configured to send the full certificate chain, including: Server certificate Intermediate certificate(s)

Debug Golang dockerized project tests

16 March 2026 @ 10:47 am

I have a Golang project, a single page application in React, where golang works as static files server and API. The application can be run using `docker compose up` and `npm run` in the web folder. Here the `compose.yaml`: services: server: container_name: hello-world-server build: context: . target: development volumes: - .:/app - gomodcache:/go/pkg/mod ports: - 40531:8080 - 40532:12345 env_file: .env depends_on: - db db: container_name: hello-world-db image: postgres:16-alpine environment: POSTGRES_PASSWORD: postgres PGUSER: postgres ports: - 40533:5432 volumes: - ./initdb:/docker-entrypoint-initdb.d - dbdata:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready"] interval: 1s timeout: 10s retries: 10 adminer: container_name: hello-world

ARM64 Using physical memory (OCM) as target for DMA

16 March 2026 @ 10:47 am

Simple goal, but I need help... I want to write a user land program on a Kria K26 SoC that initializes and controls an AXI DMA. The AXI DMA shall copy an incoming stream to the OCM memory. As there are a lot of DMA examples around Xilinx / AMD ZynqMP units, I tried what I found, just to find that these examples are often so outdated that they even don't compile anymore in any half way modern Petalinux. Finally I got this code https://github.com/bperez77/xilinx_axidma working on my Kria dev kit in Petalinux 20025.2 and it is copying a buffer to another buffer in the normal DRAM area using AXI DMA. However, the functions to copy a pre-defined buffer are not working for me, what may be totally my fault because of missing understanding. I wrote a little example to mmap() a user space address range to the OCM and with this example I can read / modify / write the OCM (and also mmap

How to delete/move Kotlin source set 'debug'? (migrate to AGP 9.1)

16 March 2026 @ 10:38 am

I tried to migrate my resources to AGP 9.1 (as android.disallowKotlinSourceSets=false will be deprecated in 2026). I already commented this //id ("org.jetbrains.kotlin.android") and this //id("org.jetbrains.kotlin.android") version "2.3.10" apply false But I met problem with existing (as I meant) resources: Using kotlin.sourceSets DSL to add Kotlin sources is not allowed with built-in Kotlin. Kotlin source set 'debug' contains: [C:\Users\userName\myAppName\app\build\generated\ksp\debug\kotlin, C:\Users\userName\myAppName\app\build\generated\ksp\debug\java] Solution: Use android.sourceSets DSL instead. For more information, see https://developer.android.com/r/tools/built-in-kotlin To suppress this error, set android.disallowKotlinSourceSets=false in gr

C# connecting to kafka kerberos Authentication

16 March 2026 @ 10:16 am

I have a c# code which tries to connect to kafka .My c# code has few config values var config = new ProducerConfig { BootstrapServers = "broker1:9093", SecurityProtocol = SecurityProtocol.SaslSsl, SaslMechanism = SaslMechanism.Gssapi, SaslKerberosServiceName = "kafka", SaslKerberosPrincipal = "your-user@REALM", SaslKerberosKeytab = "/etc/security/keytabs/app.keytab", SaslKerberosKinitCmd = "kinit -k -t {0} {1}" }; I get an error using SaslKerberosKinitCmd saying thats not supported on windows. I tried searching all over but I couldn't find a way to use keytab file in windows with confluent. Instead all I got was saying its not supported on windows and librdkafka on Windows uses only SSPI, not MIT Kerberos ticket. I have to use only keytabs file. The other thing is that the c# code uses some windows SSPI thing which over rides my SaslKerberosPrincipal as well.Is there

NeMo cashe-aware streaming multilingual ASR training

16 March 2026 @ 10:15 am

I started training nemo's hybrid rnnt ctc cashe aware streaming large multilingual model with code-switching. i wanted to ask if total 1300 hours of dataset will be enough? and somehow I noticed that in first epoch after some steps, model was predicting some words (or just few characters), but on the second epoch i started getting blank predictions and still on 4th epoch I am getting blank predictions and WER of 100%. I wanted to know if it's normal or not. And also is there any of you who has experience in training such model? I had problems with tarring, batching, and bucketing (and weighting it). If you have trained such multilingual model, could you please share your YAML file with me? I would appreciate it. And I am open to any best practice advice. Here is my YAML piece: model: sample_rate: 16000 compute_eval_loss: false log_prediction: true skip_nan_grad: true model_defaults: enc_hidden: ${model.encoder.d_model} pred_hidden: 640 joint_hidden

Query to calculate %diff. between two rows on two tables MYSQL

16 March 2026 @ 9:29 am

I Have 2 tables 2025 and 2024. The columns are the same. I want to calculate the % diff. (+/-) between the same rows on the different tables. E.G., population of USA in 2025 compared with 2024. On a spreadsheet it is easy, Avg column numbers and copy/paste the 200 rows. I only want the ?query? for when and if I need it, not to populate a new column on every table. I don't know if it's a query with statistics or something else but would really appreciate a formula/code/query to calculate this figure so I can use it on all the columns and different tables I will have in the DB I hope I have explained enough to get a positive response. Thank you Phil

DNF/YUM shows PostgreSQL dependency with --assumeno. Will disabling it cause package conflicts?

16 March 2026 @ 8:13 am

I am trying to update packages using dnf (or yum). Before performing the update, I ran the command with --assumeno to preview the transaction: sudo dnf update --assumeno In the output, it shows that some packages depend on PostgreSQL libraries (for example postgresql-libs). My question is: If I disable or remove the PostgreSQL dependency and then run the update again, will the new packages conflict with existing ones? Or will dnf automatically resolve and install the required dependencies again? I want to understand how dnf handles dependencies in this situation and whether disabling a dependency like postgresql-libs could break other packages or cause conflicts during the update. Any explanation about how dependency resolution works in this case would be helpful.

How to track impressions on a post?

16 March 2026 @ 7:02 am

I am developing a social media platform on which we need to track impressions of posts, currenly we are tracking impression when post fetched from backend, but client requiremnt is to track impression only when it appear on the user screen, we are using next.js for frontend, what is the best way to achieve this?