gerard
gerard
CC#
Created by Protagonist on 11/7/2024 in #help
Console Doesn't Clear and Provides nested outputs
Sounds like https://github.com/dotnet/runtime/issues/83568 The second comments gives more info why Terminal behaves this way
102 replies
CC#
Created by Swyftey on 9/17/2024 in #help
✅ ASP.NET Core SSL not working.
so in that case, change the URL that it starts with https:// instead of http://
75 replies
CC#
Created by Swyftey on 9/17/2024 in #help
✅ ASP.NET Core SSL not working.
You also get ERR_EMPTY_RESPONSE when you try to connect to an https port, with http.
75 replies
CC#
Created by glacinefrox on 9/11/2024 in #help
remove or minify variable names out from compiled exe
var number = 1;

Action printNumber = () => {
Console.WriteLine(number);
};
var number = 1;

Action printNumber = () => {
Console.WriteLine(number);
};
> > >
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0
{
public int number;

internal void <<Main>$>b__0()
{
Console.WriteLine(number);
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0
{
public int number;

internal void <<Main>$>b__0()
{
Console.WriteLine(number);
}
}
Is the compiled version of the lambda. As you can see, the variable "number" is outside the lambda and gets captured
200 replies
CC#
Created by glacinefrox on 9/11/2024 in #help
remove or minify variable names out from compiled exe
Because variables outside the lambda are captured into a class, which makes a field, which gets stored: https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA+ABATARgLABQhAbgIZQAEAdgK4C2wMlAvBTgNyGEY5YUAOUAJZUALgDl6jFhQAUASgrMAfBQDehCloo8AnLNoMm8zgQC+pwoJESpTBeyA==
200 replies
CC#
Created by glacinefrox on 9/11/2024 in #help
remove or minify variable names out from compiled exe
that's why it's stored in the dll/exe
200 replies
CC#
Created by glacinefrox on 9/11/2024 in #help
remove or minify variable names out from compiled exe
if you would remove the pdb, then reflection would break
200 replies
CC#
Created by glacinefrox on 9/11/2024 in #help
remove or minify variable names out from compiled exe
and if you want no names at all, publishing it with Native AOT will resolve that right (with no stack traces etc)
200 replies
CC#
Created by dirtikiti on 7/11/2024 in #help
app.UseHealthChecks("/health"); works locally, does not work behind iis deployment.
I think it's only available from localhost (127.0.0.1 or ::1). You can allow more hosts tho: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-8.0#require-host
6 replies
CC#
Created by Zigy on 1/25/2024 in #help
Problem with deserializing JSON file.
It's hard to see without syntax highlighting:
{"[982367487645900, 504339357638715104]":["id"]}
{"[982367487645900, 504339357638715104]":["id"]}
7 replies
CC#
Created by Zigy on 1/25/2024 in #help
Problem with deserializing JSON file.
Also note that the array is in a string, so it's a string.
7 replies
CC#
Created by Zigy on 1/25/2024 in #help
Problem with deserializing JSON file.
If you really, really want Dictionary<List<long>, List<string>>, you can make a JsonConverter for it: https://paste.mod.gg/xpdtuesgzdjf/0
7 replies
CC#
Created by ItzHarold on 1/12/2024 in #help
✅ Help with assignment :D
Can confirm after watching the stream, they really want to learn C#. It's was kinda like voice chat help but in a Twitch stream. but yeah it's unusual here doglaugh
11 replies
CC#
Created by surwren on 1/10/2024 in #help
c# versions
Every November a new C# / .NET version is being released
17 replies
CC#
Created by surwren on 1/10/2024 in #help
c# versions
You're missing something every November 😉
17 replies
CC#
Created by Avery on 6/16/2023 in #help
❔ WinUI3 WebView2
It's probably because you set the source, the browser starts loading the page and you instantly wants to execute the script; which doesn't work. Maybe you need to register to the event "DOMContentLoaded"?
3 replies
CC#
Created by SWEETPONY on 6/12/2023 in #help
✅ how can 1000 requests be completed quickly?
Also, Console.WriteLine is thread-safe (it's locking the stream). So every thread is waiting for each-other when another thread is done writing the line.
30 replies
CC#
Created by SWEETPONY on 6/7/2023 in #help
✅ can't translate linq query
I've been playing around. I've created an extension: https://paste.mod.gg/gdnzgfzdlwea/0 Here you can do the following:
var devices = context.Device
.WhereJsonContains(d => d.Categories, new[] { "B" })
.ToList();
var devices = context.Device
.WhereJsonContains(d => d.Categories, new[] { "B" })
.ToList();
But yeah, of course a new table would be better. shrug
46 replies
CC#
Created by SWEETPONY on 6/7/2023 in #help
✅ can't translate linq query
Not tested, fyi.
46 replies
CC#
Created by SWEETPONY on 6/7/2023 in #help
✅ can't translate linq query
The problem is to use multiple values, a hacky way would Sweaty
46 replies