Random snippets of all sorts of code, mixed with a selection of help and advice.
Chromium-based browsers don't play the video
21 January 2026 @ 3:49 pm
I'm trying to make a video player with custom controls.
I have a PlayerWindow class that has functionality of basic video control.
There's part of code from its constructor that adds play button handler:
this.#playButton.addEventListener('click', () => {
if (!this.#isPlaying) this.play();
else this.pause();
});
There's function that loads a video with certain index into the player:
loadVideo(index) {
if (this.#videoIndex == index)
return;
this.#videoIndex = index;
const video = data.video[index];
this.#title.innerText = `${index + 1}. ${video.title}`;
this.preview = `image/preview/${video.preview}`;
this.title = `${video.title} - Windows Media Player`;
this.#link.href = video.link;
this.#video.src = `video/edit/${video.src}`;
this.#video.load();
this.reset();
}
And there's function that gives opportunity
Android MDC - How to create navigation with one main top bar?
21 January 2026 @ 3:48 pm
When in Main Activity, the top bar and insets display correctly, but when I navigate to the store screen, the content overlaps the top bar (see image, the button obscures the back button).
./MainActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
...
setSupportActionBar(binding.toolbar)
ViewCompat.setOnApplyWindowInsetsListener(binding.appBar) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
val appBarConfig = AppBarConfiguration(
setOf(R.id.home_fragment),
binding.drawerLayou
./MainActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
...
setSupportActionBar(binding.toolbar)
ViewCompat.setOnApplyWindowInsetsListener(binding.appBar) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
val appBarConfig = AppBarConfiguration(
setOf(R.id.home_fragment),
binding.drawerLayouNeed Gmail ID associated with your Play Store account [closed]
21 January 2026 @ 3:39 pm
Looking for a few genuine users who are willing to help by testing the app and sharing feedback.
What testers need to do:
Install the app using the Play Store test link
Use the app normally for 14 days
Report any bugs, crashes, or UI issues (if noticed)
About the app:
Odia Calendar with Panchanga, Tithi & Festivals
Rashiphala and Vedic dates
Simple and clean UI for daily use
đź“§ Note:
To add you as a tester, I’ll need the Gmail email ID associated with your Play Store account.
Is there a way for Pointer Lock API to restore the cursor to its natural position after unlock?
21 January 2026 @ 3:33 pm
I’m implementing drag interactions that need to continue when the pointer leaves the browser window, so I use Pointer Events with `setPointerCapture()` and, in some cases, the Pointer Lock API.
During pointer lock, I track relative motion (movementX / movementY) for the specific interactions (irrelevant there) and can accurately compute where the cursor would have been if pointer lock had not been applied (I don't need it, but just in case let you know).
When pointer lock is released, however, the system cursor reappears at the position where the lock started, rather than at the position implied by the user’s actual movement.
I’m not trying to set an arbitrary cursor position or override user intent -- the target position is fully derived from user input while locked.
My question is:
Is there any way (current or proposed) to let the Pointer Lock API restore the cursor to its “natural” position b
Azure Function App (Python) – VS Code deployment succeeds but Azure Portal still shows old code
21 January 2026 @ 3:31 pm
I am deploying a Python Azure Function App using VS Code. The deployment completes successfully according to the VS Code deployment logs, and during deployment I can confirm that the correct local files and directories are being packaged and deployed.
However, after deployment:
When I open Code + Test / App files in the Azure Portal, I still see the previous version of:
the Python scripts (__init__.py)
requirements.txt
Restarting the Function App does not update the files
Redeploying from VS Code multiple times does not help
Both function folders and root files appear unchanged in the portal
Additional details:
The Function App is Linux-based
Hosting plan: Consumption
UI authentication issues with solr-nightly:10.1.0
21 January 2026 @ 3:27 pm
I am running apache/solr-nightly:10.1.0-SNAPSHOT in a docker container and assigning it and 3 ZK nodes private IPs. I am setting --host param because I have a second node at 10.10.0.6 that can't join unless it has a unique host/name.
services:
solr1:
image: apache/solr-nightly:10.1.0-SNAPSHOT
container_name: solr10
restart: unless-stopped
network_mode: host
environment:
- ZK_HOST=10.10.0.2:2181,10.10.0.3:2181,10.10.0.4:2181
- SOLR_OPTS=-Dmetrics.jetty.host=0.0.0.0
command:
- --host
- "10.10.0.5"
volumes:
- ./solr10:/var/solr
This works, until I run: docker exec -i solr10 bin/solr auth enable -type basicAuth -credentials admin:password
Now UI no longer loads, I don't get prompted for credentials, I only get HTTP ERROR 401 Authentication failed, Response code: 401.
Backend API works and requires the credentials I set. I
Converting latitude and longitude from degrees to meters
21 January 2026 @ 3:26 pm
As the title says, how can i convert a value that i have from a longitude or latitude from degrees to meters ? The task is basically to calculate MAE errors for x,y,z of trajectory prediction, MAE Z is already on meters so its good , and suppose i calculated MAE also for x,y but these are still on degrees. How can i convert to meters given the degrees from MAE for x and y ?
Note that i don't care to be extremely precise, as i understood there are some simplified formulas available and not exactly haversine one i just want some general conversion
For x,y i have these values btw ( in degrees) :
X MAE: 5.3308506163566585e-05
Y MAE: 4.1234323597704966e-05
How to get global mouse coordinates in python without using PyautoGUI (Windows and Wayland/Fedora)
21 January 2026 @ 3:24 pm
I'm looking for a way of retrieving the current X and Y coordinates of the mouse cursor in python without using the PyAutoGUI library. pyautogui.position() works, but I want to avoid dependencies like pillow that come with it.
Current placeholder code:
import pyautogui
import time
try:
while True:
x, y = pyautogui.position()
print(f"X={x}, Y={y}")
time.sleep(2)
except KeyboardInterrupt:
pass
Requirements:
Must work on Windows 11/10 (obviously with Python installed) and Fedora-based Linux distros using Wayland
Must use lightweight 3rd party libraries, or even better, ctypes
How to match the end of a string with regex in Jira formula [closed]
21 January 2026 @ 2:47 pm
I am trying to write a basic formula for Tempo Jira structure that uses a regex. Before trying a more complex regex, I want to make sure that a trivial regex (^.*$) can be matched. The following options don't work, all of these return false:
description.match("/^.*$/")
description.match("/^.*\z/")
description.match("/^.*\Z/")
description.match("/\A.*\z/")
MATCH(description, "/^.*$/")
MATCH(description, "/^.*\z/")
MATCH(description, "/^.*\Z/")
MATCH(description, "/\A.*\z/")
But, as per the doc, I'd expect these to work.
However, if I stop attempting to match the end of line/input, I get a match:
description.match("/^.*/")
Seems like there is something wrong with using $ in general:
removeAll method is triggering an observation change even though array is unchanged
21 January 2026 @ 1:50 pm
Recently I have noticed an interesting thing when using the Observable annotation. I have a model marked with Observable, and there is an array in the model, at some point I call the removeAll on this array using a where condition, and even though the condition isnt matching, and nothing is removed from the array, I noticed the observation is being triggered, and swiftui thinks the array is changed, but in reality the array is unchanged. Why is this happening ?
Sample code:
struct ObservableArrayTestView: View {
@State var model = AppModel()
var body: some View {
let _ = Self._printChanges()
Button {
model.removeCard()
} label: {
Text(model.title)
}
}
}
and model:
@MainActor @Observable
class AppModel {
var cards: [String] = []
var title: String {
cards.isEmpty ? "" : "Cards