Random snippets of all sorts of code, mixed with a selection of help and advice.
Problem with Family Controls entitlement for DeviceActivityExtension
17 September 2025 @ 7:46 pm
My team and I are developing an app that uses the Screen Time API to block apps while Focus Mode is active. We’ve already been granted the entitlement to distribute our app with Family Controls, and it works fine in the main target.
However, we’re also using a DeviceActivityExtension to have finer control over the time management of blocked apps. The issue is that this entitlement doesn’t seem to apply to the extension target at all.
Do we need to request a separate entitlement from Apple specifically for the extension target?
Or is there a way to share the granted entitlement between the main app target and the DeviceActivityExtension?
We’ve already tried requesting a separate entitlement for this target, and Apple confirmed via email that it was granted for the whole application. However, we’re still experiencing the same issue.
Loading SciPy offline using Pyodide
17 September 2025 @ 7:46 pm
I wish to load SciPy on Pyodide without using a CDN.
For that, I installed the pyodide package using npm, and within a webworker I ran
pyodide.loadPackage('/wheels/scipy-1.14.1-cp313-cp313-pyodide_2025_0_wasm32.whl')
The pyodide version on the node project was pinned to 0.28.2 and the wheel was extracted from the full 0.28.2 zip.
All other packages (e.g. numpy and others) load successfully, yet on scipy it seems to try and dynamically load libopenblas.so.
I suspected that it is the same as libopenblas-0.3.26.zip within the full package, and transfered it to the same /wheels path (even though it is not a wheel) and it doesn't seem to work.
How do I load libopenblas using pyodide so scipy can find it?
Full error for reference:
The following error occurred while loading scipy:
Failed to load dynamic library /lib/python3.13/site-packages/scipy/integrate/_
YOCTO - mount bpffs with serviced / .mount not working
17 September 2025 @ 7:46 pm
why is this not working:
# recipes-core/bpffs-mount/bpffs-mount.bb
SUMMARY = "Mount bpffs at /sys/fs/bpf"
LICENSE = "CLOSED"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "sys-fs-bpf.mount"
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
RDEPENDS:${PN} += "systemd"
FILES:${PN} += "${systemd_system_unitdir}/sys-fs-bpf.mount /sys/fs/bpf"
inherit systemd
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI = "file://mount-bpf.sh"
do_install() {
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${THISDIR}/files/sys-fs-bpf.mount ${D}${systemd_system_unitdir}/sys-fs-bpf.mount
}
and in my simple sys-fs-bpf.mount file:
#[Unit]
#Description=BPF filesystem
#[Mount]
#What=bpffs
#Where=/sys/fs/bpf
#Type=bpf
#Options=mode=700
It works perfectly fine when i do it manually:
mount -t bpf bpffs /sys/fs/bpf
Slack Bolt Challenge failing
17 September 2025 @ 7:44 pm
So I am trying to create a slack bot to help us out with on call. Trying to get the events setup but when I try to enable, I am getting the error that I didn't respond with the value of the challenge parameter (which I expected bolt to handle for me, but maybe that was an incorrect assumption).
Attempting to test this locally I am making my request to
localhost:3000/slack/events
With the body from here https://docs.slack.dev/reference/events/url_verification/
I am getting a 401 unauthorized. I am not sure where the token value from this is supposed to be coming from.
I am running this in spring boot using Bolt.
I have tried setting the token value in the request to the signing_secret value and the old token value. I have been trying to read through the documentation to understand what that token value is supposed to be but I havent been able to find ref
Building a Tech Career Roadmap like Duolingo but for tech career
17 September 2025 @ 7:40 pm
I have been building this tech career roadmap giving the best resources to learn from the internet.
I know we have roadmap.sh already, but we are building something more engaging and gamified. Focused more on emerging tech (AI, Blockchain, Cybersecurity). So, I would like to ask if there is anything that would help more to come back and learn or you would like to see:
1 - Rewards for learning
2 - Hackathons
3 - Open Source Contribution
4 - Networking and Meetup/Events
5 - Leadership Development
6 - Connecting with Startups
7 - Learning Schedule/Calendar
8 - Internship/Getting Practical Experience
How to solve power flow equations using GEKKO in Python?
17 September 2025 @ 7:30 pm
I want to solve the AC power flow equations (wiki) using GEKKO in Python. This is a nonlinear system of equations describing conservation of energy on a power grid.
I'm struggling to get GEKKO to solve them. I get @error: Solution Not Found. I have checked that this particular instance does converge using a library specialized for power flow equations. The reason I'm trying to solve the system using GEKKO is to do a proof of concept and later expand the problem into a mixed integer nonlinear program.
What am I doing wrong? Is there a way to get more insight into why the solver isn't converging?
Here's the code (the main function is where the problem is defined):
import copy
from enum import IntEnum
import hydra
import numpy as np
from gekko import GEKKO
from numpy._typing import ArrayLike
from omegaconf import D
Nuxt 4 server typescript include
17 September 2025 @ 7:25 pm
how can i extend .nuxt/tsconfig.server.json?
I tried:
putting tsconfig to server folder
adding include to sharedTsConfig
But these won't add the include to the server.json I need.
Dealing with overlapped time in SQL (Calculate total time worked)
17 September 2025 @ 7:18 pm
I tried to calculate the hours worked by an employee with overlapping time, but I couldn't find any logic to do so. I used OVERLAP function, but it is not working for me.
Date employee_id Login Logout
8/1/2025 1 8/1/2025 9:50 8/1/2025 11:34
8/1/2025 1 8/1/2025 12:07 8/1/2025 12:48
8/1/2025 1 8/1/2025 12:08 8/1/2025 13:15
8/1/2025 1 8/1/2025 12:32 8/1/2025 15:15
8/1/2025 1 8/1/2025 13:54 8/1/2025 17:12
8/1/2025 1 8/1/2025 15:02 8/1/2025 17:28
8/1/2025 1 8/1/2025 15:49 8/1/2025 19:39
8/1/2025 1 8/1/2025 15:57 8/1/2025 17:19
8/1/2025 2 8/1/2025 17:04 8/1/2025 19:46
8/1/2025 2 8/1/2025 14:57 8/1/2025 17:10
8/1/2025 2 8/1/2025 14:11 8/1/2025 16:12
8/1/2025 2 8/1/2025 13:45 8/1/2025 17:21
8/1/2025 2 8/1/2025 11:04 8/1/2025 14:46
8/2/2025 1 8/1/2025 10:50 8/1/2025 11:34
8/2/2025 1 8/1/2025 12:30 8/1/2025 12:48
8/2/2025 1 8/1/2025 12:33 8/1/2025 13:15
8/2/2025 1 8/1/2025
How can I aggregate all columns with a 'number' type in power query
17 September 2025 @ 7:17 pm
I'm trying to use power query to aggregate some invoicing columns by project number in power query.
I'm currently using a group by function which looks at the project number and then aggregates each of the many invoice columns one by one. Is there something I can put into code that will look at the column type (they're all numbers) and create the list of columns to sum?
My current code looks like this:
Table.Group(#"Removed Columns", {"JobNumber", }, {{"Invoiced2019", each List.Sum([Invoiced2019]), type nullable number}, {"Invoiced2020", each List.Sum([Invoiced2020]), type nullable number}, {"Invoiced2021", each List.Sum([Invoiced2021]), type nullable number}, {"Invoiced2022", each List.Sum([Invoiced2022]), type nullable number}, {"Invoiced2023", each List.Sum([Invoiced2023]), type nullable number}, {"Invoiced2024", each List.Sum([Invoiced2024]), type nullable number}, {"I
CKEditor 4 - empty line breaks arrow key function
17 September 2025 @ 7:16 pm
Using CKEditor 4 for now... If we put this into a document:
Line 1
Line 2
Line 3
Line 4
Put the cursor at the beginning of Line 1. Hit the down arrow, the cursor moves down to the blank line. Hit it again, the cursor moves down to Line 2and nothing happens. If you put the cursor at the end of Line 1, hit down arrow, cursor moves to the blank line. Hit it again, and nothing happens - the cursor is stuck. This is true whether you start with the cursor anywhere after the "n" in Line 1. THis also happens for a blank line after Line 2 or Line 3, etc, but only if the cursor is after the "e".
Very strange behavior. Any thoughts?