StackOverflow.com

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

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

Organisation/Person tagging using Spacy

12 November 2025 @ 5:03 pm

We’re working on a problem where our master dataset contains names of organizations and individuals, but some entries are untagged. We only have the names (no additional details such as email or address) and need to classify each as Organization or Person. My current approach is rule-based using common words identified from the tagged organization names. However, one suggestion was to use spaCy NER. From my understanding, NER performs best with contextual sentences (e.g., I ate an apple vs. I work at Apple), so I was skeptical. Surprisingly, a colleague tested it and achieved decent accuracy on the sample dataset(65%). Irrespective of the results, I still feel NER isn’t designed for this use case. Am I missing something?

Is it possible to auto select a Python venv without using the terminal or VSCode?

12 November 2025 @ 5:02 pm

Ok so I am the only technical person at a non-technical company. I am writing some scripts that I will be disseminating to my team. My goal is for everyone else on the team to be able to right click on the main.py files to Open With>Python to run the script without having to fiddle with VSCode or the terminal. Problem is, running the main.py file out of the box uses the global python environment. It's not the end of the world if I have to teach everyone how to select and activate a venv, but I know it will absolutely slow down adoption. So I am hoping there is a way to reach my original goal of just running the main.py file and all the fun config stuff happens behind the scenes. Or if there is a way to set it up once and have it remember even if you do not run the script through vscode or the terminal

PHP Intelephense code parsing error: why?

12 November 2025 @ 4:59 pm

I have this php code in a class called "Test.php". <?php class Test { private string $testVar; public function __construct(string $val) { $this->testVar = $val; } } I am repeatedly getting an error Undefined variable '$val'. I have tried un/reinstalling intelephense and restarting vscode to no avail. Any ideas why?

Converting local variable into global variable

12 November 2025 @ 4:56 pm

I have made a function to get the name of a file and it is i want to get the file outsidethe function can you please help me and i have tried this openerfile.addEventListener('change' , function (event) { file= event.target.files[0]; globalThis.file = file; } but it is given undefined openerfile.addEventListener('change' , function (event) { file= event.target.files[0]; }

Sybase ASE avoid permission issues

12 November 2025 @ 4:56 pm

I want to query multiple tables across databases, something like: declare @sql varchar(100) select @sql = 'select * from mydb1..mytable' select @sql = 'select * from mydb2..mytable' exec(@sql) However, if the user doesn't have permissions to log in to some of the databases, I get: User XXX not allowed in database 'mydb1' - only the owner of this database can access it. Is there a way to either 1) ignore the errors for the databases that the user doesn't have permissions to or 2) check the permissions and run only for the ones that the user has permissions for?

AI Ollama console application, pass an image to the LLM using KernelFunction

12 November 2025 @ 4:55 pm

I’m writing an AI chatbot, a console application written in .NET 9 C# using Visual Studio 2022. I’m running on Windows 11 and using Ollama version 0.12.10, which runs on: http://localhost:11434 http://localhost:11434/v1 (for Kernel.CreateBuilder().AddOpenAIChatCompletion) The model (LLM) is qwen3-vl. I’m experiencing a timeout when passing a question to the LLM. Here are the steps: 1. I pass in the question: What's in this picture? "C:\\Temp\Picture 1-1.png” 2. The AI thinks for a while, then calls a KernelFunction FileContentsPlugin.cs ImageFileSearchAsync that I wrote, passing in "C:\\Temp\Picture 1-1.png” as the file path. 3. The KernelFunction returns a base64 string: $data:image/jpeg;base64,{base64String} 4. The AI then times out after 100 seconds. I have increased the timeout, but that has

I need VPS server hosting for my side-project

12 November 2025 @ 4:53 pm

everyone. My name is Denis, I'm new to this community (before this, I only read posts but didn't post anything myself), and I need your help. I'm a developer, and I recently decided to start my own project alongside my main job. The issue is that I need a secure location to store a large amount of data, as it contains sensitive information. I've heard that cloud VPS option is good for this, but I can't decide which one to choose. Should I buy VPS in my situation? If so, can you advise me on what to look for first? Dedicated is also a suitable option, because security is more important than price or configuration complexity. Thank you and peace to all!

Why all browsers are executing scripts as headless on windows 11 when I trigger from Jenkins job

12 November 2025 @ 4:53 pm

When I executing from local machine using pycharm it’s physically visible not running on background. web driver .chromeOptions () Options.Headless false But still not visible Help me on that

How to Post empty Json HttpClient

12 November 2025 @ 4:53 pm

var url = $"{BaseUrl}/asdfg"; var content = new StringContent("{}", Encoding.UTF8, "application/json"); var response = await Client.PostAsync(url, content); The above code works for me, but a "{}" value appears there. The original is completely blank. var response = await Client.PostAsync(url, null); // Gives Error 400

Using BayesOpt for real-time Bayesian tuning of FRC coefficients with AdvantageKit logs in Java with WPILIB

12 November 2025 @ 4:50 pm

This is my first Stack Overflow post, and I’m excited to get some guidance from the community! I’m working on a FIRST Robotics Competition (FRC) robot using Java and WPILib, and I want to implement real-time Bayesian optimization to automatically tune the coefficients in our FiringSolutionSolver.java during operation. Current Setup FiringSolutionSolver.java computes projectile firing solutions for a turreted shooter. It uses LoggedTunableNumbers (via AdvantageKit) for tunable constants such as: drag coefficient projectile mass projectile area launch height target height max exit velocity iterative solver parameters Other details: Shot results (hit