Random snippets of all sorts of code, mixed with a selection of help and advice.
MacPorts cannot find X11/Xlib.h
22 January 2026 @ 5:44 pm
I'm trying to run a program from the terminal on my mac, but I'm getting an error on a line
mpicc -c -g pumax.c
pumax.c:29:10: fatal error: 'X11/Xlib.h' file not found
29 | #include <X11/Xlib.h>
| ^~~~~~~~~~~~
1 error generated.
make: *** [pumax.o] Error 1
I have X11 installed as /opt/X11 but it contains lib, not Xlib.h. Typing port installed to list my MacPorts installed packages, I see xorg-libX11 @1.8.12_0 (active), which is the developer version of X11 (?) so it should have Xlib.h right?
I can my issue is very similar to this post During make mupdf, fatal error: X11/Xlib.h file not found in mac. I've tried the symlink solution but it hasn't worked unfortunately. I've also reinstalled XQuartz and that's not helped.
Any help would be really well appreciated, I'm very
How to optimise storage in my postgres db when there will be documents of various types present
22 January 2026 @ 5:42 pm
Does anyone have any idea on how to optimise the storage when there are documents being saved in the dbFrom what ive searched it uses alot of storage , one of my project requires to store documents
Issues with Celery + Redis in Flask: Retry limit exceeded and Kombu connection errors
22 January 2026 @ 5:35 pm
I'm refactoring a Flask application that receives video data along with some parameters. I decided to add Celery for controlled background processing and Redis to pass parameters. The workflow is:
Save the uploaded video to an input folder.
Pass the video path and additional parameters to a Celery task.
However, every time I try to run the task, I encounter one of two errors:
Retry limit exceeded while trying to reconnect to the Celery Redis result store backend.
Message: The Celery application must be restarted.
Some other connection error related to Kombu.
I've been following the Flask documentation on background tasks with Celery but I can't figure out what's going wrong.
My environment:
Flask latest
5.6.2 (recovery)
Stuck on attending more than 3 times within 6 months over a 1 year period
22 January 2026 @ 5:31 pm
I've got the baseline code correct for attending at least 3 times over a year, but I'm not sure how to filter down to just those who have attended 3 or more times within 6 months over that year
SELECT
p.IDENTIFIER
,count (p.IDENTIFIER) AS attendance_count
FROM ATTENDANCE e
JOIN PERSON p ON p.PERSON_BK = e.PERSON_BK
WHERE e.ATTENDANCE_DT >= '2025-01-01'
GROUP BY 1
HAVING COUNT(p.IDENTIFIER) >= 3
How to Track User Interactions on a Letter Boxed Game WordPress Website? [closed]
22 January 2026 @ 5:28 pm
I am managing a WordPress website related to the Letter Boxed game (NYT) and I want to track user interactions and engagement.
Specifically, I want to:
Track which game pages or sections users visit the most.
Monitor clicks on strategy tips or puzzle solutions.
Automate workflows via HubSpot Marketing Hub for users who interact frequently with specific content.
I have tried:
Installing basic Google Analytics and HubSpot tracking scripts.
Using HubSpot forms to capture user actions.
The problem:
I am not able to track specific in-page interactions like block clicks or puzzle completion.
I am unsure how to link WordPress events with HubSpot workflows for automated follow-ups.
Can anyone guide me on:
Briefcase clickable Images
22 January 2026 @ 5:22 pm
Working on the front end for a beeware briefcase app for android with a couiple of friends style engine is toga. I am trying to get some images to be clickable. Button icons arent big enough and I havent found a way to make them bigger. In addition, I havent found a way to layer the buttons and images which is a way we also explored which i now believe to be impossible, causing me to turn to my last resort: webview (which is something we want as little of as possible). So far it works (havent got the styling fully sorted but that isnt that big of an issue at the moment. Currently, when I press the image in the webview, it sends everything fine but it comes up with webpage not available for a fraction of a second. To get the button to work ive had to change the url in the javascript to a url that doesnt exist and then reset it back to the correct one.
Python:
assert 1 + 1 == 2
# --- IMPORTS ---
from typing import Callable
import httpx # type:ignore
import tog
How to use backstage to push to a gitlab repository with a user specifif identity based on the template feature
22 January 2026 @ 5:18 pm
I have a question and hopefully someone is able to help me. My plan is to use backstage to push some Kubernetes yaml files to gitlab and every logged in user should be able to do this with its own identity, like using a pat, but I am using key cloak to log in and this works fine, but my question is what would be the best approach to authenticate with keycloak and then be able to push into the gitlab repository with an action inside of a template and the push is identified with the user? Thanks in advance hopefully someone can help me with that. I believes this question shouldn’t be so hard but I couldn’t find an appropriate answer.
How to present the valid sample size for each variable with missing data after variable label but before stat_label in {gtsummary}
22 January 2026 @ 5:10 pm
Instead of presenting missing_stat as its own row, how I can present the valid sample size for each variable with missing data following the variable label but before the stat_label (eg, "Chronic conditions, mean (SD) [range]" to "Chronic conditions (valid n = 9), mean (SD) [range])"? I've tried to use tbl_summary's missing* functions but can't interpolate N_nonmiss into the missing_text string, nor can I find a way to relocate the missing_text where desired. I've been unsuccessful with using sprintf() and {glue} to resolve, as well.
# Load packages
library(gt)
library(gtsummary)
library(dplyr)
library(tibble)
# Set seed for reproducibility
set.seed(123)
# Number of observations
n <- 10
# Simulate dataset
analytic <- tibble(
age = round(pmin(pmax(rnorm(n, mean = 55, sd = 15), 18), 90)),
sex = factor(rbinom(n, 1, 0.5), le
TypeScript does not recognize shared fields with conditional types and generic
22 January 2026 @ 4:18 pm
I have a conditional type that has two modes: Extender1 or Extender2. The modes share some common fields. I then have a smaller type that omits some of the fields of the conditional type. I then have a generic function to update the fields of the smaller extender. TypeScript seems to be stripping every field of the smaller type and not just the singular field I omitted. Is there a solution to getting TypeScript to recognize the shared fields or should I just give up on mixing conditional types and generics in TypeScript?
type AbstractBase = {
a: string;
b: string;
}
type Extender1 = AbstractBase & {
c1: string;
}
type Extender2 = AbstractBase & {
c2: string;
}
type ExtenderMode = 'Extender1' | 'Extender2';
type ConditionalExtender<M extends ExtenderMode> = M extends 'Extender1' ? {
Extender: Extender1
} : { Extender: Extender2 }
type FullExtender<M extends ExtenderMode> = ConditionalExtend
TPT - generate schema from select statement
22 January 2026 @ 4:14 pm
According to the documentation, I can generate a schema from a select statement:
DEFINE SCHEMA PROD_EXT FROM SELECT 'Select a,b,c,sum(d) from Products;';
Here's the relevant bit of my script:
DEFINE JOB FOO
(
DEFINE OPERATOR DDL_OPERATOR()
TYPE DDL
ATTRIBUTES
(
VARCHAR TdpID = @TdpId,
VARCHAR LogonMech = @LogonMech,
VARCHAR UserName = @UserName,
VARCHAR UserPassword = @pwd,
VARCHAR ARRAY ErrorList = ['3807','3803']
/*
3807 = object not found
3803 = object already exists
*/
);
DEFINE SCHEMA MED_SCHEMA