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.

seleniumbase + google extension

1 December 2025 @ 2:46 pm

I unpacked the extension in the directory and made a path to it. When the uc=True extension doesn't work when the browser opens, but if I do, the uc=False extension will appear. I tried to reinstall SeleniumBase, but it doesn't help with SB(uc=True, test=False, locale_code="en", proxy=proxy, extension_dir=extension_path) as sb: url= "https://www.google.com/" sb.activate_cdp_mode(url)

How do I disable test results in Playwright

1 December 2025 @ 2:42 pm

I have playwright test which I need to run in Azure function. It runs fine locally but when deployed to Azure function it fails with error below. The only reporter configured is list and it shall not write to test-results or read from there. reporter: [['list']] All my logging going to AppInsights, how do I overcome this issue, I really don't need any sort of persistence locally for any of playwright reporters. {"success":false,"message":"Failed to run Playwright tests","error":"Command failed: node ./node_modules/@playwright/test/cli.js test\nError in reporter Error: EROFS: read-only file system, open '/home/site/wwwroot/test-results/.last-run.json'\n at async open (node:internal/fs/promises:641:25)\n at async Object.writeFile (node:internal/fs/promises:1215:14)\n at async LastRunReporter.onEnd (/home/site/wwwroot/node_modules/playwright/lib/runner/lastRun.js:71:5)\n at async wr

Ballerina | error | sample | LLM | MCP SERVICE | \distributions\ballerina-2201.13.1\examples\mcp-service\mcp_service.bal

1 December 2025 @ 2:36 pm

I am testing LLM MCP interface Std (sample \distributions\ballerina-2201.13.1\examples\mcp-service\mcp_service.bal) with the ballerina language, but I get an error: mcp_service.bal Running executable [Config.toml:(2:1,4:1288)] unused configuration value 'ballerina.ai.wso2ProviderConfig' error: [Config.toml:(3:1,3:65)] unused configuration value 'ballerina.ai.wso2ProviderConfig.serviceUrl' error: [Config.toml:(4:1,4:1288)] unused configuration value 'ballerina.ai.wso2ProviderConfig.accessToken'\ import ballerina/log; import ballerina/mcp; import ballerina/random; import ballerina/time; type Weather record {| string location; decimal temperature; int humidity; int pressure; string condition; string timestamp; |}; type ForecastItem record {| string date; int high; int low; string condition; int precipitationChance; int windSpeed; |}; type WeatherForecast record {| string location; ForecastItem[] f

Switched over to Clang compiler and seeing fatal error: 'iostream' file not found

1 December 2025 @ 2:35 pm

After installing clang compiler and integrating it with current project setup in VS Code I keep getting an interesting error. It complains that it is unable to find iostream the most common header in the standard C++ library. This page: https://blog.johannesmp.com/2015/09/01/installing-clang-on-windows-pt2/ --- claims that one must add directory to the global environment variables in Windows. I've already done all of this. Yet, this annoying error proceeds and remains. I visited: Locating iostream in Clang++: fatal error: 'iostream' file not found Getting Clang to work on windows Error:

Topic Modeling + Regression: Doc-Topic Proportion Issues, Baseline Topic, Multicollinearity (Gensim/LDA) - Using Python [closed]

1 December 2025 @ 2:34 pm

I'm working on a research project (context: sentiment analysis of app reviews for m-apps, comparing 2 apps) using topic modeling (LDA via Gensim library) on short-form app reviews (20+ words filtering used), and then running OLS regression to see how different "issue topics" in reviews decrease user ratings compared to baseline satisfaction, and whether there is any difference between the two apps. One app has 125k+ reviews after filtering and another app has 90k+ reviews after filtering. Plan to run regression: rating ~ topic proportions. I have some methodological issues and am seeking advice on several points—details and questions below: "Hinglish" words and pre-processing: A lot of tokens are mixed Hindi-English, which is giving rise to one garbage topic out of the many, after choosing optimal number of k based on coherence score. I am selectively removing some of these tokens during pre-pr

Instagram Comment Scraping using Selenium - Selenium not loading more than 15 Instagram comments

1 December 2025 @ 2:34 pm

I’m working on a Selenium-based Instagram scraper (for learning purposes) and I'm trying to extract the first 20 comments from a post. However, Selenium always returns only 15 comments, even though the post contains hundreds. Whole Code: from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time # ---------------- CONFIG ---------------- SELENIUM_PROFILE_PATH = r"C:\\Users\\kogre\\AppData\\Local\\Google\\Chrome\\User Data\\SeleniumProfile" ACCOUNT_URL = "https://www.instagram.com/therock/" # ---------------- DRIVER ---------------- options = webdriver.ChromeOptions() options.add_argument(f"user-data-dir={SELENIUM_PROFILE_

How to properly decode ETW trace events emitted by BizTalk XLANG and other biztalk dlls

1 December 2025 @ 2:32 pm

I’m trying to capture and decode internal BizTalk Server XLANG traces using ETW. I start an ETW session using tracelog: {BiztalkFolder}\trace.cmd -start btstest BizTalk code (decompiled) shows it uses this provider: TraceProvider("BizTalk", new Guid("186cc4a4-abab-abab-abab-abababababab")); and writes events like: Trace.Tracer.TraceMessage(16U, "XLANG:BTXDupEnvelope.Create duplicate envelope: instance: {0}, msg: {1}, workId: {2}, {3} of {4}: activation={5}", (object) Service.RootService.InstanceId, (object) msg.MessageID, (object) msg.WorkID, (object) this._receipt.Received, (object) msg.ReservedFlags, (object) msg.IsActivationMessage); The ETL file does contain many events, but when I open it using tracefmt, tracerpt, or Windows Event Viewer, most events look like this: Unknown( 10): GUID=3a6ae6ef-8116-ddee-28de-9802cede7e1b (No Format Information found). Unknown( 24

How to use the bundle League/Csv properly

1 December 2025 @ 2:31 pm

I've been stuck for a few days trying to use the League/csv bundle! I'm desperately trying to create an option so that users can insert a CSV file into the site's database via a file selection interface. I'm taking it step by step to make sure I understand what I'm doing, and I've discovered this bundle that seems to meet my needs! For now, I'm trying to read a CSV file placed directly in my project. My first step was to read and understand the documentation for this bundle, but I don't think I understand it (all the ‘//’ symbols are confusing me)! https://csv.thephpleague.com/9.0/ However, I have managed to take the first steps,(I should point out that I'm a beginner with Symfony and still a junior web developer ^^) which are to create a command (which I am also discovering as I go along ^^), read the CSV file, and perform an ‘echo’ on it. protected function execute( InputInt

How do I efficiently check if any value in a list of dictionaries matches a given key-value pair in Python? [duplicate]

1 December 2025 @ 2:30 pm

data = [ {"id": 1, "name": "Alice", "active": True}, {"id": 2, "name": "Bob", "active": False}, {"id": 3, "name": "Charlie", "active": True}, ] I want to check if any dictionary in the list has "active": True without looping manually using for. Is there a more Pythonic or efficient way to do this?

Has the definition of front-end and back-end changed?

1 December 2025 @ 2:30 pm

Lately, I've seen so many job ads labeled 'front-end' that ask for experience with back-end technologies. For example, I've seen jobs labeled front-end that have asked for experience with databases such as SQL, NoSQL, MongoDB, or Oracle. I've also seen front-end ads that asked for experience with Java, and .NET. Front-end used to refer to the user interfaces that users saw and interacted with. In other words, everything that runs in the browser. Back-end used to mean everything that runs on the server, other than server-rendered user interfaces. That includes SQL, NoSQL, MongoDB, Oracle, Java, .NET, and a lot more. Roles that require experience with front-end and back-end technologies are roles for full-stack developers. So, has the modern definition of a front-end role changed to a full-stack role with an emphasis on front-end technologies?