Random snippets of all sorts of code, mixed with a selection of help and advice.
Nuxt 4 + tailwindcss + directus gettng error "500 Cannot redefine property: _path"
2 October 2025 @ 11:42 am
So I'm trying to do a project in Nuxt 4, and I got a problem when I try to edit any CSS element. It just crashes to 500 Cannot redefine property: _path I tried changing node version because I found one user changed his version from node 20 to 24, and it fixed it, but I tried the same and still nothing
error 500:
Cannot redefine property: _path
at <project-root>/.nuxt/middleware.mjs:12:10
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ViteNodeRunner.runModule (<project-root>/node_modules/vite-node/dist/client.mjs:397:4)
at async ViteNodeRunner.directRequest (<project-root>/node_modules/vite-node/dist/client.mjs:375:3)
at async ViteNodeRunner.cachedRequest (<project-root>/node_modules/vite-node/dist/client.mjs:189:11)
at async ViteNodeRunner.dependencyRequest (<project-root>/node_modules/vite-node/dist/client.mjs:239:10)
at async <project-root>/no
iOS26 - Unexpected shadow/background color when presenting UIMenu from UIBarButtonItem
2 October 2025 @ 11:35 am
I work in a large and old codebase. I am currently working on implementing the Liquid Glass design in our app, but I am stuck on one detail that I cannot resolve.
Issue:
I open a UIMenu containing a few basic actions from a UIBarButtonItem. The transition happens automatically and the UI is okay. However, a “shadow” or “background color” is visible after the UIMenu is opened (see screenshot).
I want to clarify that I did not write a custom UI for this myself. I create a UIMenu and then pass it on during the initialization of the UIBarButtonItem. See the initialization below.
Initialization:
-(UIBarButtonItem *)getActionsBarButtonItem {
NSMutableArray<UIAction *> *basicActions = [NSMutableArray array];
UIAction *editAction = [UIAction actionWithTitle:@"Edit"

using bash "read" command twice in a loop
2 October 2025 @ 11:29 am
I have a bash script where I use the read command twice:
1st usage: read text file line by line
2nd usage: asking user in the loop to confirm something
However, the second usage is completely ignored and my bash script continue without prompting the user for confirmation line by line.
I understand that I need to clear the buffer before the second usage, but nothing I have tried so far has NOT worked.
I also tried to find a solution that didn't use the read command to prompt the user to type something, but all the solutions I've seen use the read. The same for reading file line by line, all solution use the read.
I tried clearing the read buffer before the second usage, but it didn't help. This is what I tried:
read -t 1 -n 10000 discard
read -d '' -t 0.1 -n 10000
while read -r -t 0; do read -r; done
EF Core: One Principal with two different relationships to the same dependent?
2 October 2025 @ 11:28 am
I've got a class model with a class PrincipalEntity, which serves as the principal and contains a 1:1-relationship as well as a 1:n-relationship both to DependentEntity. How to configure these relationships, so that inserting, updating and deleting works without error?
These are the classes of the data model:
public class PrincipalEntity
{
public PrincipalEntity() { }
public PrincipalEntity(Guid id, string number, string name, DependentEntity dependent, List<DependentEntity> dependents)
{
Id = id;
Number = number;
Name = name;
Dependent = dependent;
Dependents = dependents;
}
public Guid Id { get; set; }
public string Number { get; set; } = null!;
public string Name { get; set; } = null!;
public DependentEntity Dependent { get; set; } = null!;
public List<DependentEntity> Dependents { get; set; }
}
public class DependentEntity
{
public DependentEntity() { }
public D
How can I implement authentication for a custom ASP.NET WebDAV server?
2 October 2025 @ 11:27 am
I am building a proof-of-concept WebDAV server in ASP.NET Framework. This server needs to integrate with an existing ASP.NET Framework application.
I’m not using libraries such as IT Hit. I’m implementing the WebDAV logic myself. I have implemented LOCK and UNLOCK, and I was able to integrate the server with my existing application.
Now I need to add authentication so that the WebDAV server can recognize when a user who is already logged into my system requests a file. So I am looking for ways on how I would be able to implement this kind of authentication
I tried implementing tokens on a pre-signed url. But I noticed that my LOCK/UNLOCK methods don't get called. So Office opens the file in read-only mode.
Inconsistent result based on refreshable materialized view
2 October 2025 @ 11:26 am
I got distributed database with refreshable materialized view. Selecting from target distributed table do not gave me all data, also it gives inconsistent results, I think because of refreshable materialized view working in background.
here is my setup
clickhouse version 25.8.8.26-lte
CREATE DATABASE IF NOT EXISTS some_db ON CLUSTER some_cluster
ENGINE = Replicated('/clickhouse/databases/some_db', '{shard}', '{replica}');
-- BEGIN source table
CREATE TABLE some_db.local_source
(
id String CODEC(ZSTD(1)),
a Int8 DEFAULT 0 CODEC(T64, ZSTD(1)),
b Int8 DEFAULT 0 CODEC(T64, ZSTD(1)),
)
ENGINE = ReplicatedMergeTree
ORDER BY id;
CREATE TABLE some_db.source as some_db.local_source
ENGINE = Distributed(some_cluster, some_db, local_source, metroHash64(id));
-- END source table
-- BEGIN calculated
CREATE TABLE some_db.local_calculated
(
id String CODEC(ZSTD(1)),
a_sum_state AggregateFunction(sum, Int64) CO
ld: library 'c' not found FreePascal Compilier
2 October 2025 @ 11:25 am
I cannot write any code on pascal, it not work and i cant understand why
Code:
program MyProgram;
begin
writeln('Hello world!');
end.
Output:
Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Darwin for AArch64
Compiling first.pas
Assembling myprogram
Linking first
-macosx_version_min has been renamed to -macos_version_min
ld: warning: -multiply_defined is obsolete
ld: library 'c' not found
An error occurred while linking
first.pas(5,33) Error: Error while linking
first.pas(5,33) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppca64 returned an error exitcode
How to solve my problem?
Get e-mail address of corresponding author from OpenAlex
2 October 2025 @ 11:24 am
Is it possible to get the e-mail address of the corresponding author of a scientific publication using OpenAlex?
VS code Python run fail [closed]
2 October 2025 @ 11:23 am
When I run my python code, it doesn't show the output in the terminal even though there are no errors in the code and it had already been running for some time. When I click the Run button, there is no reaction at all, it just prints this /bin/sh: 1: python: not found text:

Changing a saved image in a gallery by setting state
2 October 2025 @ 10:51 am
I am building a simple gallery application. I want to be able to change the main gallery image to a different image when it is clicked using state but am having difficulty. All the images are saved directly in the src folder. In my current code when you select a new image to display the current one disappears but does not change to the selected one, but I can't make it work. Strangely when I pass a variable directly into the src parameter it works, but not when I do it with state, e.g.:
src={clickedImageId !== "4" ? img2 : img4}
This is my code. Where am I going wrong?
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import { useState } from "react";
import img1 from "./img1.jpg";
import img2 from "./img2.jpg";
import img3 from "./img3.jpg";
import img4 from "./img4.jpg";
function App() {
const [clickedIm