cathei
cathei
CC#
Created by jborean on 11/20/2024 in #help
Using stackalloc span in if statement
For example you might return entry; that ends up exposing invalid value outside of the method. scoped local introduced to ensure that the variable will not escape current scope. I believe it is also partially backward-compatibility reason involved that we need to explicitly put keyword for it.
5 replies
CC#
Created by jborean on 11/20/2024 in #help
Using stackalloc span in if statement
From my understanding compiler is complaining because it is worried about entry escaping outside of its valid context. You may add scoped keyword to entry (scoped ReadOnlySpan<char> entry) to make it scoped local to make compiler happy. It should also work if MemoryExtensions.TrimEnd took scoped trimChars, but seems like that is not what we have today. This can be a good reading: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/low-level-struct-improvements#scoped-locals Some language folks might chime in and add some details too :catcomf:
5 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
And validation fails
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
So it will try to find a Owner with ID 0
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
0 is valid ID
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
As a seed
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
Why not null?
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
Oh you are saying you putting 0 as seed
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
Paste the code of your Owner class?
54 replies
CC#
Created by {sus} on 10/17/2024 in #help
Setting a Default Value for Migrations
Do you have Id column in Owner?
54 replies
CC#
Created by Poisoid on 6/30/2024 in #help
✅ Help please asap i cant make my portal to appear
Think they left the server
17 replies
CC#
Created by Poisoid on 6/30/2024 in #help
✅ Help please asap i cant make my portal to appear
$unity
17 replies
CC#
Created by Senti on 6/10/2024 in #help
Webapi with SSL in production, using docker
So I'd say yes for this
Is the solution to use some reverse_proxy in front of the API ?
6 replies
CC#
Created by Senti on 6/10/2024 in #help
Webapi with SSL in production, using docker
I'm asking since I'm wondering if there is reason you want to set it up in your app container
6 replies
CC#
Created by Senti on 6/10/2024 in #help
Webapi with SSL in production, using docker
Did you set up domain and all? The regular practice is to set up SSL for your load balancer and do internal networking with plain HTTP
6 replies
CC#
Created by Grafi on 6/7/2024 in #help
LINQ
Lol well done
73 replies
CC#
Created by Grafi on 6/7/2024 in #help
LINQ
Probably should've done that in the first place
73 replies
CC#
Created by Grafi on 6/7/2024 in #help
LINQ
Well take that OrderBy out of Select and put it before GroupBy then
73 replies
CC#
Created by Grafi on 6/7/2024 in #help
LINQ
So they do want you to sort things alphabetical order first?
73 replies
CC#
Created by Grafi on 6/7/2024 in #help
LINQ
{ "YTR", "D", "T", "E", "R" }
{ "YTR", "D", "R", "E", "T" }
{ "YTR", "E", "D", "T", "R" }
{ "YTR", "D", "T", "E", "R" }
{ "YTR", "D", "R", "E", "T" }
{ "YTR", "E", "D", "T", "R" }
Whatever those all should be considered "correct" when requirement is just "Arrange the resulting sequence of strings in descending order of their lengths."
73 replies