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.

React native Android - Embedding React native into standalone Android App

22 January 2026 @ 5:09 am

a newbie React native dev here. I am currently maintaining a legacy standalone android project that uses a react native module for a particular feature in the app. The current production version of react native used in the app is 0.63.2 which is insanely old and not found anywhere in the react native npm. So we decided to upgrade the version for 2 main reasons: Google's 16kb paging requirement keeps getting flagged on the .so files related to the react native module. To update it so that the above issue and any futuristic issues are addressed. The first challenge to solve was that the previous developers added all the react native libraries and dependencies as .aar files inside the standalone project. This was perhaps before autolinking was introduced. But with the newer versions, we cannot get .aar files from what I read. After going through tons of documents and different suggested methods and getting blocked, I finally ma

How can I use Nrich Learning LMS to upload and manage training content?

22 January 2026 @ 5:05 am

I am using the Nrich Learning Learning Management System to upload training content. I want to understand how the platform helps in managing courses, tracking learner progress, and organizing learning materials. I would also like to know if it is suitable for beginner-level users and employee training programs. Any guidance or experience with this platform would be helpful.

Accurate audio seeking in React Native

22 January 2026 @ 5:01 am

I've tried a few different audio libraries for React Native, including react-track-player, react-audio-api, and expo-audio. An issue occurs where I try to seek to a specific point in an audio file (is 35.5 seconds in) and it doesn't always play from the same point. It's pretty random. I've tried multiple file formats as well as local and remote files, but always have the same problem. Is there any workaround? I'm building for iOS btw.

Ignore merging republished data to final table while using DLT

22 January 2026 @ 4:45 am

I am new to DLT and trying to implement a use case where a republished record should not get merged into my curate layer as the record is already present with me in its latest form. I tried reading the curate table in my DLT and apply filtering on raw data but it is leading to circular dependency and is not working. Is there any way to tell the APPLY CHANGES INTO API to ignore the record if the same id with sequence keys is already present in target dataset?

OpenCV: Removing red pixels that are not structurally supported by a fabric/thread mask (mask misfit issue)

22 January 2026 @ 4:33 am

Problem Description From the same input image, I compute two binary masks: red_mask – all red-colored pixels (0 or 255) fabric_mask – detected fabric/thread structure (0 or 255) Both masks are correct individually and pixel-aligned. My goal is to keep only red pixels that are structurally supported by the fabric threads, and remove red pixels that lie across gaps or outside the thread structure. What I Expected to Happen When combining the two masks, I expected the result to: Preserve red pixels that lie along fabric threads Remove red pixels that: Fill thread gaps Cross threads without following their geometry Are not supported by nearby fabric pixels

Streamlit + streamlit-aggrid: checkbox clicks register visually but selection/value doesn’t update after deployment (only on my browser)

22 January 2026 @ 4:30 am

I’m using Streamlit + streamlit-aggrid (AG Grid Community) and I’m facing a strange client-specific issue: ✅ Works locally on my machine ✅ Works after deployment for my colleagues ❌ After deployment, only on my machine/browser, the grid renders but checkbox clicks don’t register What I see (symptoms) On my machine (deployed app only): Clicking the row selection checkbox does nothing (no selection changes) Clicking the editable boolean checkbox (locked) does nothing (no value changes) The grid renders and scrolls normally — it’s only checkbox clicking that fails Because selection never updates, my Assignment panel never opens Expected behavior If the user selects any row using

API endpoint to grab a file drag-and-dropped into description of a GitLab Snippet

22 January 2026 @ 4:30 am

So I created a snippet in self-hosted Gitlab, and within the Description field, I drag-and-dropped a tarball. The ultimate link after saving the Snippet looks something like this (obfuscated): https://gitlab/uploads/-/system/user/123/abc123def123ghi123jkl123mno123pq/some_file.tar.gz The 'shape' is totally different from raw links to the files in the snippet, which looks like this (obfuscated): https://gitlab/-/snippets/999/raw/main/README.md Because the 'shapes' are different, I naturally thought the API Endpoint for grabbing Files in Snippets is not applicable. So, what's the right API Endpoint for downloading a file drag-and-dropped into a Snippet's Description field?

Property 'example' does not exist on type ' componentName'

22 January 2026 @ 4:23 am

Using Angular v17, I am trying to get data from app.component.ts into home.component.ts but I am getting an error "Property 'results' does not exist on type 'HomeComponent'." My full project is quite spread out but here is what I have to work with: This is from home.component.ts import { Component, inject, Input } from '@angular/core'; import { CommonModule } from '@angular/common'; import { DataLayerComponent } from '../data-layer/data-layer.component'; import { DataLayer } from '../datalayer'; import { DataService } from '../data.service'; import { AppComponent } from '../app.component'; @Component({ selector: 'app-home', standalone: true, imports: [ CommonModule, DataLayerComponent, AppComponent], /* Template here */ export class HomeComponent { dataLayer: DataLayer = { name: this.results.name, /* Property 'results' does not exist on type 'HomeComponent'.*/ capital: this.res

Concatenating Stringified Strings Doesn't Truly Concatenate [C++ pre-processor]

22 January 2026 @ 2:31 am

I have been working on this bit of code, with the cpp pre-proceessor: //define some pre-processor string consts #define I2C_DEVICE_BASE_PATH "/sys/devices/platform/soc/9c0000.qcom,qupv3_0_geni_se/984000.i2c/i2c-1/" #define DISPLAY_DEV_ID_PORT0 "1-002b" #define DISPLAY_DEV_ID_PORT1 "2-002f" //the typical "stringification" trick that's posted on here #define S(x) #x #define STR(xx) S(xx) //the macro I'm trying to make work... #define DISPLAY_DEVICE_BASE_PATH(port) STR(I2C_DEVICE_BASE_PATH) STR(DISPLAY_DEV_ID_PORT##port) This will be used as a file-system path somewhere. When I try and use it, I get this weird output: 01-21 20:16:46.135 7236 7236 E QdispControl: can't open file "/sys/devices/platform/soc/9c0000.qcom,qupv3_0_geni_se/984000.i2c/i2c-1/""1-002b"/5v Note the weird placement of the extra quotes in the path... Is there a nicer way to do this

Cannot seem to call poetry installed packages in Docker image (redhat)

22 January 2026 @ 1:19 am

I'll preface by saying I'm not familiar at all with any Redhat specific differences, but I'm running into what seems like it should be a simple issue. I have a Redhat 8 image and the following lines in the dockerfile (the image is from a work artifactory so I can't provide a direct example) FROM docker-baseimages-local.**/redhat/ubi8:8.9 AS builder ARG WORKDIR="/home/python/app" ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 RUN dnf -y install \ python3.12 \ python3.12-pip \ python3.12-devel \ make \ gcc-c++ RUN python3.12 --version RUN mkdir -p ${WORKDIR} WORKDIR ${WORKDIR} COPY target/*.tar.gz ${WORKDIR}/ RUN tar -xvzf lunasearch-*.tar.gz --strip-components=1 RUN python3.12 -m venv ${WORKDIR}/venv ENV PATH="${WORKDIR}/venv/bin:$PATH" RUN . ./venv/bin/activate RUN pip3.12 install poetry RUN poetry --version RUN poetry install RUN uvicorn --version All I'm doing is installing python 3.12, copying code files over