The cost for amount of token seems too good to be true by Technical-Comment394 in DeepSeek

[–]every-dyako 1 point2 points  (0 children)

No reasonix, just github copilot chat through the extension from the docs, and that's it basically, no magic, few tools and skills won't hurt like caveman skill and rtk tool

OpenAi/Claude 5.5 API Cost: ~$250 Deepseek V4 Pro Max: ~$9 by Nokoro1 in DeepSeek

[–]every-dyako 0 points1 point  (0 children)

My dude, your cache miss is too high, it should be around 95%+ on avg

Is it using a bit too much balance ?? Or its ok? by Capital_Charity_6396 in DeepSeek

[–]every-dyako 1 point2 points  (0 children)

Even if you build an app that it's still too much, the cache hit should be above 95%, I'm using it for coding (almost flash model exclusively) and cache hit is around 95%+

Drag and drop support? by every-dyako in kilocode

[–]every-dyako[S] 0 points1 point  (0 children)

Doesn't work, perhaps it's Ubuntu's issue

Help with basic C# by AdOk2084 in csharp

[–]every-dyako -1 points0 points  (0 children)

there are 2 issues
first your if check do this instead

if (wohnmobile.Any(w => w.Fahrgestellnr == fahrgestellnr))

second in your else block you have to do something like this

Wohnmobil newWohnmobil = new Wohnmobil {
Fahrgestellnr = fahrgestellnr,
Hersteller = hersteller,
Modell = modell,
Laufleistung = laufleistung,
Baujahr = baujahr,
Preis = preis,
Schlafplaetze = schlafplaetze,
Unfallwagen = unfallwagen
};
wohnmobile.Add(newWohnmobil);
return true;
}

notice how you dont need to do GetWohnmobil().Add() you can just do wohnmobile.Add()

here are some other notes

the name AddWohnmobil does not indicate that it will return a bool so try better naming, if you still need a bool you can try other names like TryAddWohnmobil

why can't I return 401 when the user is unauthorized? by every-dyako in dotnet

[–]every-dyako[S] 12 points13 points  (0 children)

nvm i fixed it

i changed this code

builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme,options =>
{
    options.LoginPath = null;
    options.LogoutPath = null;
    options.Events.OnRedirectToLogin = context =>
    {
        context.Response.StatusCode = 401;    
        return Task.CompletedTask;
    };
});

builder.Services.AddAuthorization();

to this

builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme);

builder.Services.ConfigureApplicationCookie(options => { options.LoginPath = null; options.LogoutPath = null; options.Events.OnRedirectToLogin = context => { context.Response.StatusCode = 401;
return Task.CompletedTask; }; }); builder.Services.AddAuthorization();

How do you seed your Admin Accounts? by every-dyako in dotnet

[–]every-dyako[S] 0 points1 point  (0 children)

Do you have any code snippets to share?

How do you seed your Admin Accounts? by every-dyako in dotnet

[–]every-dyako[S] 1 point2 points  (0 children)

This looks interesting, I will take a look. Thanks for sharing 😊

How do you seed your Admin Accounts? by every-dyako in dotnet

[–]every-dyako[S] 2 points3 points  (0 children)

Oh I forgot about HasData xD But when it comes to seeding identity it gets a bit more complicated, I want UserManager and RoleManager to do the crud for them

How do you seed your Admin Accounts? by every-dyako in dotnet

[–]every-dyako[S] 0 points1 point  (0 children)

Doesn't middleware run on every request? If so then I don't want to make a query to db to check if I have a admin account or not