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.

Do teams still find UI automation with Selenium or Playwright difficult to maintain as projects scale?

12 March 2026 @ 3:21 pm

Curious how teams handle UI automation as their applications grow. Many teams start with Selenium or Playwright, but over time the test suite grows and maintenance becomes challenging when the UI changes. For people working with automation testing: • How large is your automation suite? • What tends to break most often? • How much time goes into maintaining tests? Interested to hear how different teams approach

SSL handshake error for Node.js on GitLab CI pipeline

12 March 2026 @ 3:19 pm

I am trying to set up a CI pipeline in GitLab, for a Spring Boot project with Maven, which also installs npm. I have tried using docker exec locally to check if doing mvn install would work, and it is fine, but in the GitLab environment, there are handshake errors when trying to communicate to the nodejs.org website to download npm. I am using the com.github.eirslett:frontend-maven-plugin utility to manage the process. Here is the error I get on GitLab (which does not happen locally, neither in my regular environment, nor in the same Docker image): [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:install-node-and-npm (install-node-and-npm) on project analysis-tool: Could not download Node.js: Could not download `[`https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.gz`](https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.gz)`: Remote host ter

Samsung eSIM rename

12 March 2026 @ 3:18 pm

I work on Application that has carrier privileges to install eSIM. I want to rename eSIM for which carrier privileges is granted. Using public Android API private fun updateNickname(subscriptionId: Int, nickname: String) { val renameIntent = Intent(ACTION_RENAME_SUBSCRIPTION).apply { setPackage(context.packageName) } val callbackIntent = PendingIntent.getBroadcast( context, REQUEST_CODE_RENAME, renameIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE, ) manager?.updateSubscriptionNickname(subscriptionId, nickname, callbackIntent) } It works fine running on Pixel devices, however, executing this code on any Samsung it does not rename eSIM. Anybody has any experience with eSIMs, specifically renaming it? Any help is much appreciated.

Technical variables updated but user data untouched : const or not?

12 March 2026 @ 3:13 pm

In C language, let's imagine a ".c" file where I have the following internal structure (that is, not declared in the associated ".h" file): #define CHUNK_SIZE 1024 struct _Chunk { size_t cursor; char data[CHUNK_SIZE]; }; Not regarding the goodness or badness of the design, suppose now I would like to use it to provide a pseudo memory chunk management to other compilation units with an internal cursor, and create functions like this (prototypes in the ".h" file): #define OPAQUE_HANDLE void* char GetFirstChar(const OPAQUE_HANDLE chunk); char GetNextChar(const OPAQUE_HANDLE chunk); The OPAQUE_HANDLE arguments would point to an instantiated struct _Chunk. The GetFirstChar function would set cursor to zero and return data[0], while the GetNextChar function would increment cursor and return data[cursor]. Here I used the "const" keyword because I intend to make data[] th

dict of count JSON

12 March 2026 @ 3:10 pm

I have tried to make a a function get_statistics to make a dictionary of the JSON persistence. I started doing it manually, but it wants me to do it automatically. Currently stuck making my code of returns automatically. Can someone help? import json from health import Health def save_json(barbie: list[Health]): try: with open ('health_records.json', 'w') as json_file: data = [] for b in barbie: data.append( { "name": b.name, "weight_kg": b.weight_kg, "height_m": b.height_m, "bmi": b.bmi }) json.dump(data, json_file, indent=2) except FileNotFoundError: print("Error, file not found") health50 = Health("Barbie", 50, 180) healthlist = [health50] save_json(health50) def get_statistics(filename: str = "health_records.json") -> dict: barbie =

File handler as a custom pointer in std::unique_ptr

12 March 2026 @ 2:56 pm

I'm trying to write an example demonstrating the usage of a custom pointer in a deleter in std::unique_ptr. Is the implementation of the FileHandler class as a NullablePointer correct, and what should the std::fprintf() line look like where I'm trying to access handle_? #include <cstddef> #include <cstdio> #include <iostream> #include <memory> class FileHandler { private: FILE *handle_ = nullptr; public: FileHandler() = default; explicit FileHandler(FILE *handle) : handle_(handle) { ; } // for NullablePointer FileHandler(std::nullptr_t) { ; } // for NullablePointer auto operator=(std::nullptr_t) -> FileHandler & { handle_ = nullptr; return *this; } // for NullablePointer friend auto operator==(const FileHandler &lhs, std::nullptr_t) -> bool { return lhs.handle_ == nullptr; } //

How to train a text datasets?

12 March 2026 @ 2:00 pm

Everyone!! I'm a BSIT student and currently in a development of a capstone project which is a translation app which focuses on the 2 major languages in the Philippines which is Cebuano and Tagalog I just want to have some advice in terms of training text datasets for us to build a translation app. How can we do that? because it's really hard to know where to start to learn this kind of stuff. Thank you for your consideration!!

Connecting 2 pc without using NAT connection

12 March 2026 @ 1:52 pm

first of all, thank you for your interest. I wanted to share with you a situation that has been on my mind for some time. For the past two years, I have been interested in secure connections and mutual communication. I have developed projects in this field, such as I2P proxy, Lokinet, and Tor proxy, and have worked with technologies that mimic them. Although I have prepared special API points to make file and data sharing over these connections ‘secure,’ I know that they are being monitored, so I decided to create my own background service. I have encountered a problem, which is this: Whenever I ask the top programmers around me, they suggest a NAT connection and tell me I need to set up a proxy, just like the I2P system. However, I know that NAT connections are monitored by internet service providers and governments, so I don't want to use them because, even though I don't need to hide to that extent, I don't want to claim to have a security system when sha

What is the extra "nancode" parameter to the OpenCL nan function?

12 March 2026 @ 1:49 pm

In OpenCL (3.0), we have the function: double nan(ulong nancode); which returns a quiet NaN ("not-a-number") value. But - what is the extra nancode argument supposed to signify? The documentation says that The nancode may be placed in the significand of the resulting NaN. well, so what if it's placed in the significand? What does this mean?

SQL: Find malls without employees

12 March 2026 @ 12:56 pm

There is a table called users that looks like this: mall_id name position 1 Max boss 1 Dan employee 1 Mike employee 2 Ben boss 3 Susan boss 3 Larry employee 3 Pat employee Each shopping center (mall) has a ‘boss’ and possibly employees. These are all stored in a single list. How can I now check which mall has no employees? For example, Mall #2 only has a boss, but no employees. The mall ID and the name of the boss where there are NO employees should be listed. Thank you!