October 23, 2024
Chicago 12, Melborne City, USA
java

Microservices – saga choreography

I am usure how to maintain consistency in a microservices architecture system using choreography for transaction management. Take this simple architecture : For the Operation #1 and #2 I can use the Outbox pattern to ensure the changes in the database result in a message being published on the Queue. Or simply One Phase commit

Read More
python

Python selenium headless browser window

This is a block of code of my project from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.edge.service import Service from selenium.webdriver.edge.options import Options import time def extract_data(self, usrname : str): self.edge_options = Options() self.edge_options.add_argument("--headless") self.usrname = usrname service = Service(executable_path=r'C:\web\msedgedriver.exe') self.driver = webdriver.Edge(service=service) self.driver.get(f'https://leetcode.com/{usrname}/') I am using the –headless open also but the

Read More
javascript

How can a mid-level developer evaluate their skills and identify areas for growth?

I’m currently working as a mid-level frontend developer with React and TypeScript. However, compared to other mid-level developers, I sometimes feel like I’m not quite on the same level as I’d like to be. I want to improve, but it’s not always clear where to focus my efforts. In your experience, what distinguishes strong mid-level

Read More
SQL

Why is the syntax “column = NULL” allowed in SQL?

I know this question doesn’t really belong here, because I ask for an explanation and not for a solution to a problem. If there is a better place to ask it, feel free to redirect me. I understand the difference between column IS NULL and column = NULL in SQL, multiple answers such as this

Read More
java

Kubernetes NGINX Ingress Path Rewrite Issue (noVNC Context Path Problem)

I’m deploying an application using noVNC on a Kubernetes cluster. I am using NGINX Ingress to expose the application externally and handling user-specific pods via context paths. The Issue Each pod is accessed through a user-specific path appended to the domain, like http://example.com/podPath. The index.html page loads correctly when accessed. However, when clicking on internal

Read More
python

Python dependencies in kubeflow spark operator

I wanted to ask if there is a way to use python as a .wheel or .egg or just .py dependency in kubeflow spark operator. The resulting file i have in mind would look something like this, the dependecy would be either under jars or files, i presume files would make more sense: apiVersion: sparkoperator.k8s.io/v1beta2

Read More
Android

Loading data into my ListAdapter with submitList is blocking my UI thread

I have a RecyclerView with a ListAdapter and my problem is simple, but I haven’t seen a solution anywhere. I have a list of approximately 90 elements and when I load them with the submitList it blocks the main thread. On top of that, I access this fragment from the bottomNav and until I have

Read More
java

timestamp header value getting replaced at consumer

I have a kafka producer sending data using KafkaTemplate.send(). In the ProducerRecord, I add a header with key ‘timestamp’ and add a custom timestamp value. I have a consumer consuming records using @KafkaListener to ConsumerRecord object. When I try to access the ‘timestamp’ header from this consumer record, I get the value whatever I send

Read More
python

Fine-Tuning segment anything model

I’ve been trying to fine-tune the SAM model but most of the tutorials I found require us to provide prompts even after fine tuning. Is it not possible to fine tune the model so that it can work on that specific data set without us providing prompts? I tried following a tutorial but it did

Read More
javascript

Why JSON file value is not displayed?

<script> // Fetch JSON data fetch('dat.json') .then(response => response.json()) .then(data => { const tbody = document.querySelector('#dataTable tbody'); data.forEach(item => { const row = document.createElement('tr'); row.innerHTML = ` <td>${item.name}</td> <td>${item.age}</td> <td>${item.city}</td> `; tbody.appendChild(row); }); }) .catch(error =>console.error('Error fetching the data:', error)); </script> Why JSON file value is not displayed? The code I took from ChatGPT. I

Read More