Newest Questions
24,187,307 questions
0
votes
0
answers
6
views
What is the idiomatic way to map on a list that returns a tuple?
Function case (MRE):
MyType = MyDataCtor [MyType] | ... other cases (none of which require the map operation)
foo :: Type1 -> Type2 -> (Type1, Type2)
foo a (MyDataCtor (m:ms)) = <help me>
...
Advice
0
votes
2
replies
20
views
Finding the max values for list values for each key in a dictionary without using max()
Let's say I have a dictionary such as:
dict = { "Mars": [4, 3, 4, 7, 10], "Jupiter": [6, 6, 7, 9, 11], "Saturn": [4, 5, 12, 22, 1]}
I would like to iterate through each ...
Advice
0
votes
0
replies
15
views
A video showing the precision of math
Fifteen years ago I posted on my oldest website a video that showed the perfectness of math.
The numbers would drop down like 1 X 9 = 9 X 1 and 1 X 9 X 8 = 8 X 9 X 1 into a pyramid. The pyramid was ...
Best practices
0
votes
0
replies
8
views
Should I log errors from `tokio::task::JoinHandle::await` in a shutdown method?
I have a couple of shutdown methods looking like:
pub async fn shutdown(self) {
self.cancel.cancel();
let _ = self.join.await;
}
Should i ignore the value returned from join or ...
0
votes
0
answers
15
views
Next.js 14 ignoring my API route completely even though route.ts exists and is named correctly
I'm working on a Next.js (App Router) project and my API route is not being picked up at all. Every time I send a POST request from the client, I get a 404 Not Found.
The route I'm trying to hit is:
/...
0
votes
1
answer
14
views
In NextJS 16+, can "use cache" directive work on server actions?
I am trying to cache the response of a query inside a server action file:
export async function getCachedSession(userCacheToken: string, token: string) {
"use cache";
cacheTag(`user-session:...
0
votes
0
answers
12
views
Remove space at the edge of a text box when text wrap [duplicate]
I have a series of span in my code with some short or long centered text inside.
<span class="mark">CA Global</span>
<span class="mark">Nombre de logements ...
0
votes
0
answers
11
views
How to Add Many iOS 26 Icon Themes with Icon Composer in SwiftUI?
I’ve been experimenting with iOS 26’s new icon customization features. I’ve noticed that many popular apps are already using multiple icons, and it seems iOS 26 allows custom icons through Apple’s ...
0
votes
0
answers
8
views
getD2DCapability error when simulating a 5g project
So I did download the VM appliance in the official simu5g webpage that contains simu5g and inet4.3 also with omnet6.0pre11, I did create a folder called smart_agri in simulations inside simu5g and I ...
0
votes
0
answers
22
views
Linker error with self compiled GCC 15.2.0 trying to use std::stacktrace
I am trying to build a version of GCC for linux and windows that I can use to compile C++ using the C++23 STL stacktrace, however when I try to use the version of g++ that I have compiled it it gives ...
Best practices
0
votes
0
replies
13
views
Seeking for the best practice to add 'eye' option to secureField text box in swift
I'd like to add to my an option to expose the password value in my secure field textbox. Currently I'm doing it by rendering TextField if showPassword is on, and SecureField if it's off. However, the ...
-3
votes
0
answers
23
views
How to make a fabric 1.21.4 minecraft rat that takes a session id and sends it to a discord webhook of my choice [closed]
How to make a fabric 1.21.4 minecraft rat that takes a session id and sends it to a discord webhook of my choice. i dont know how to code. the only thing i know is
Minecraft mc = Minecraft....
0
votes
1
answer
25
views
Captures all domain names within a property SubjectAlternativeName
I’m trying to extract a specific portion of text and haven’t had success despite testing multiple patterns and looking at similar examples. After struggling for a while, I figured it was time to ask ...
0
votes
1
answer
12
views
System.Drawing Bitmap not working on Linux Docker container (.NET Core / DevExpress Report)
I am working with DevExpress Reports in my .NET Core project. On my Windows laptop, the reports are displayed fine, but when I ran the project using Docker container, the reports are not being ...
Best practices
0
votes
0
replies
17
views
What's the best practice of distributed transaction implementation for java/spring based service
I am going to try to implement such thing and thinking about the best practice. Of caurse I know about some patterns like SAGA with transaction outbox but I never used it in practice. Is there any ...