StackOverflow.com

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

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

Why does CLIP misclassify my gaze-centered object?

3 September 2025 @ 9:11 pm

CLIP Issue I am preparing an AR gaze dataset and want to label the object a user is looking at. I have fisheye video frames (also tried undistorted). The global scene label from CLIP is reasonable (e.g., “hallway”), but when I try to make CLIP notice the gaze point by blending a subtle red Gaussian glow at the gaze location, the gaze object often gets misclassified (e.g., “curtains” instead of “door”). What I need A robust way to predict the object at the gaze point using CLIP (or a CLIP-friendly pipeline). Why is the red-dot/heatmap approach failing, and what’s a better pattern to follow? What I tried Red dot blending (Gaussian glow at gaze): same mislabels even after undistortion. Direct ROI crop around the gaze (without modifying pixels) and classify with CLIP: still sometimes “curtains” for a door.

Openstack Kolla custom domain admin role

3 September 2025 @ 9:06 pm

I am busy testing out openstack using the kolla-ansible deployment, version 2025.1. I want to use multi-domain which I have enabled and that works. I then wanted to try creating a user in a domain that had full admin access only to that domain. I started by creating a user in the domain and assigning the admin role to that user in the user's domain. Which worked fine but I discovered that doing this gave the user access to change the domain context to the default domain. Which is not what I had planned. Is it even possible to create a user with domain admin access only to their domain? I have been looking at the policy.yaml config for keystone that would allow custom roles. I believe horizon also needs some config or the UI won't allow access to all the functions? I have read a bunch on this but haven't found a blog or guide on how this is meant to work.

Is there a way to peek all explicit returns of a large function in VSCode? (TypeScript)

3 September 2025 @ 9:05 pm

I have a private scoping function that spans thousands lines. It has some (early) returns based on some checks and it wouldn't make sense to put certain features before these points, because it could exit anyway (without being called), so I want to find all explicit returns to figure out where would be the best place to put my new methods/variables. Is there a way to find and peek all returns in a function in VSCode?

Unreal Python script for adding pre-roll

3 September 2025 @ 9:03 pm

Im trying to create a python script that adds pre-roll to my tracks in Unreal 5.4. Currently it correctly sets the CameraCuts, but fails to correctly update Subsequences and CameraComponents > Spawned + Transform to Pre Roll Frames 0100, instead setting it to 0000* which is odd. I have tried saving and re-opening to see if its a visual bug but it doesn't seem to update and I really need this to reflect the change. here is my script Any help is greatly appreciated! import unreal # ----------------------------- CONFIG --------------------------------- SUBSEQ_PREROLL_FRAMES = 100 CAMERA_PREROLL_FRAMES = 100 CAMERA_CUT_HEAD_EXTEND_FRAMES = SUBSEQ_PREROLL_FRAMES - 12 # 88 frames # ---------------------------------------------------------------------- # ----------------------------- Helpers --------------------------------- def _get_or_open_target_sequence():

How to integrate push notifications with speech-to-text functionality in Flutter (IOS)?

3 September 2025 @ 9:01 pm

I'm building a Flutter app where I want to combine push notifications (One-Signal) with speech-to-text functionality. When the app receives a push notification (via Firebase or OneSignal), I want the app to automatically convert the notification body into speech. The speech output should work in both foreground and background modes. Questions: How can I handle background push notifications and still trigger speech output in Flutter? Do I need to configure a background isolate for TTS, or is there a way to integrate it directly with Firebase callbacks? Is OneSignal better than Firebase when it comes to handling background events? How can I ensure compatibility across Android and iOS, especially since iOS has strict background execution policies? What I’ve tried so far: I integrated Firebase Cloud Messaging (firebase_messaging) to handle push notifications. I used the flutter_tts

Android NullPointerException

3 September 2025 @ 8:45 pm

I have a strange problem that I can't solve. Here is a description of the problem that occurs on many devices. From this description I can't even understand where this problem comes from. Only the first two lines are my application. "myschoolbook.com.Keyboard.TopSpace.TopSpace.setContent (SourceFile:3) at myschoolbook.com.Keyboard.TopSpace.TopSpace.c (SourceFile:34)" The error description does not specify the classes from which setContent is called. It is not a static method. Below that are some classes S0.c.S, F0.c.u, T0.e.j, etc. What are these classes? What are they responsible for and how can they be related to the call to my class, which does not exist on its own? In other words, I'm trying to understand what causes the application to crash, but I don't understand what initiates this crash in my application. Maybe someone has encountered the same situation? I would be grateful for any advice. Thank you.

How to make a child responsive to `current` property of a `ref` that points to a sibling

3 September 2025 @ 8:29 pm

I'm building a React component that has two children -- one child a canvas, the other a component that provides controls through which the user can affect what is drawn on the canvas. Obviously drawing on the canvas requires useRef. Here's the basic structure: function Parent(){ const canvasRef = useRef(null); return ( <> <ChildProvidingControls /> <canvas ref={canvasRef}></canvas> </> )}; I'd like make the elements rendered by ChildProvidingControls change depending on whether the canvas has been rendered. For instance, I don't want the user to be presented with a control meant for altering what's drawn on a canvas at any moment prior to when the canvas has been rendered. So, somehow the parent needs to alter ChildProvidingControls once canvasRef.current is no longer null. (Unless some way other than reading canvasRef.

Can I download a git repo with full history from Azure Devops if I don't have git installed?

3 September 2025 @ 7:18 pm

I have an internet connected Windows machine which is managed by my corporation. It doesn't allow software to be installed, including git. It has a white-list of executables that can be run, so even if I were to build it locally (which I couldn't because I can't install build software), I wouldn't be able to run it. I have an offline system where I have git installed and I would like to install some git repositories. The only way to transfer data to this offline system is through the managed machine. The repo I want to clone is on an Azure Devops instance which I have permission to access, but do not own. I know can "Download as Zip", but that loses all the git history. Is there a way I can download repo in some format (git-bundle?) that preserves the git information the same as a git clone? I could then transfer this to my offline system and then clone from the file to have the full git history. Thanks!

TestFlight apps submitted through eas can't be installed

3 September 2025 @ 5:48 pm

When I use eas build --platform ios --profile production --auto-submit everything checks out on expo.dev just fine, both build and submission. After this I get the email and click the link to try and install in TestFlight and I get this error: Could not install app, The requested app is not available or doesn't exist The build is there on App Store Connect, the bundle id matches in code and on App Store Connect, and the email invited through the internal test group matches the one I am logged in with in TestFlight. This happens on new builds, on another thread with similar issue, the solution is to publish the app to production and then it should work, which is practically possible, but preferably I would like to test without having to go through the review process each time. Any help or insight is much appreciated.

Is my approach fine for processing large-scale TEI XML papers using AWS Glue? [closed]

3 September 2025 @ 3:22 pm

I'm working with approximately 3 million TEI XML files generated by GROBID from ArXiv papers, stored in S3. Each file contains structured academic paper data including metadata (title, authors, abstract) and full text content organized by sections and paragraphs. My target is to extract text content by sections and paragraphs for future embeddings step. What would be the easy way to parse so much XML cheap and efficient using AWS infrastructure? Here's example of the structure <TEI> <teiHeader> <fileDesc> <titleStmt><title>Paper Title</title></titleStmt> </fileDesc> </teiHeader> <text> <body> <div> <head n="1">Introduction</head> <p>Paragraph content...</p> <head n="1.1">Introctuin</head> <p>Paragraph...</p> </div> </body> </text