Bored Student
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Bored Student on 11/19/2024 in #questions
How to type react element arguments
I want to take a string like this
but when i call it like this it says
So i try to use an anonymous class kind of thing
But that's some mess.
The following works
But that is ugly as hell, how do i write that properly ??
6 replies
TTCTheo's Typesafe Cult
•Created by Bored Student on 11/16/2024 in #questions
How to get OpenAi API Key
2 replies
TTCTheo's Typesafe Cult
•Created by Bored Student on 11/16/2024 in #questions
Add React to .NET Api
I have written a .NET Api and now i want to create a web app that uses it. And i want to set it up that the .Net server serves that app on the
/
route (or better any out that's not /api/*
). There is some info from microsoft but that almos exclusively to creating a new combined empty project with an VisualStudio template, but i don't want a new empty .NET app and i don't have VS.7 replies
TTCTheo's Typesafe Cult
•Created by Bored Student on 10/7/2024 in #questions
From Post to API
Is it possible to post a from to an API Endpoint but stay on the Page without JS ?
I have a project that requires me to use JSP (without JS).
And I want to add data to a list, and keep that list in view.
6 replies
How to Dockerize
I have the following docker file
pretty much copy paste from Microsoft https://learn.microsoft.com/de-de/dotnet/core/docker/build-container?tabs=linux&pivots=dotnet-8-0
but i encounter an error i dont have in any other environment about not finding serilog
I looked that my
.csproj
only reference serilog nuget package not the dll directly, and i'm not even using the file sink3 replies
TTCTheo's Typesafe Cult
•Created by Bored Student on 5/17/2024 in #questions
Whats /aab
Lately I've seen a lot of request in my server log probing for some obvious securit overgishts like
GET [host]/.env
or GET [host]/wp-admin/setup-config.php
but there are some I don't recongnize what they are going for
e.g. GET [host]/aab8
GET [host]/aab9``GET [host]/ab2h
anyone know if they mean anything ? if so what, just curious2 replies
API Endpoint is Invoked with `null` Argument
I am sending the following call
to the Following API endpoint
Yet
ad
is null
and this if
triggers.
First Question : why doesn't the Middleware already stop an Empty request ?
Second Question : I confirmed with the Browser DevTools that the request isn't actually empty, so where does my data go ?
DTO Class for reference
13 replies
TTCTheo's Typesafe Cult
•Created by Bored Student on 4/22/2024 in #questions
React Build page
I wanted to deploy a react app to nginx, with the following commands
But i found out that
npm run build
only produces an index.html
and i get error 404 if I navigate on the deployed page.
Is there a way to fix this without changing the code, it's not mine.2 replies
Neat String interpolation
I have this little something, and I want the counter to stay fixed width so
[ 1/50]
instead of [1/50]
how can I do this ?
As simple as possible, I just want it to look neat not write a TUI framework.
I found $"{val , fixedWidth}"
but that only works with constants so it can't adapt if I reach 100 files.16 replies
Type Inference strategies?
I'm generating Class Definition from XML. And currently I just save the Value strings. But I want stricter validation abilities, so I want to find suitable base types, e.g. detect number types. Do you have any ideas how to go about that efficiently and how to balance strictness vs. information loss in small types ?
1 replies
Propagate Changes to WPF
I'm using WPF with Unity Container and Prism. I've got a save button which is supposed to activate once I have data. I log
MyCommand.CanExecute()
which is true but it remains disabled in the GUI.
MyCommand.RaiseCanExecuteChange()
does not exist in Prism. (Or at least can't be resolved)2 replies