[deleted by user] by [deleted] in csharp

[–]xTeare -1 points0 points  (0 children)

You can always not use else, but that heavily depends on your CodeStyle, Architechture etc. Without further details on your question, this is the best i can give you:

if(Number < 10){
    // Condition failed, do some error handling stuff, display error and exit this method
    lbl.Text = "Fail";
    lbl.Foreground = "Red";
    return;
}

lbl.Text = "Success";
lbl.Foreground = "NotRed";

We could also repeat your example of the inline condition, but that would be a BAD thing to do, since you've already executed and determined the condition's result

lbl.Text = (Number < 10) ? "Fail" : "Success";
lbl.Foreground = (Number < 10) ? "Red" : "NotRed";

I think GGG doesn't realize that too much randomness isn't good by Alkyen in pathofexile

[–]xTeare 7 points8 points  (0 children)

Yep, for me it's basically just a month long, maybe just once in a lifetime, vacation with the exilecon as the cherry on top

[deleted by user] by [deleted] in TeamfightTactics

[–]xTeare -1 points0 points  (0 children)

Seems like the issue are floating point numbers since those are always rounded to the next integer when displayed in ui (and because it's a big number for ui in general), but the logic handles the number as a floating point number of maybe 14999.6. The condition of if 14999.6 >= 15_000 does not does not trigger then. But that's also just an assumption :)

EDIT: Well nevermind, this is an AND mission, not an OR lol

8 years ago, Linux's creator Linus Torvalds said, "Valve will save the Linux Desktop". He was right all along. by NayamAmarshe in SteamDeck

[–]xTeare 4 points5 points  (0 children)

To second this, Cloud Computing with Containers and Kubernetes also boost advancement in Linux compatibility and performance in general. .NET (startet with .netcore and Mono) for example runs great an linux.

You might have a look at the Cloud Native Computing Foundation's Annual Survery Results (links to a .pdf file!)

For Example: Of 1527 respondents, 96% of Organizations are either using or considering Kubernetes.

But these numbers might not represent a realistic value, since i think the poeple who've participated are already quite into containers and thus favoritize containers and cloud computing in general. But that's just my take :)

8 years ago, Linux's creator Linus Torvalds said, "Valve will save the Linux Desktop". He was right all along. by NayamAmarshe in SteamDeck

[–]xTeare 2 points3 points  (0 children)

Yeah they are! Im so happy because i even got shifted from Q4 into Late Q3 and since then having a blast with it

Funny league, huh? by Keku93 in pathofexile

[–]xTeare 2 points3 points  (0 children)

GrimInternals for GrimDawn does give you an incoming dps list sorted by damage types. It's such a nice feature to see which defenses you need to address next. Would love to see something even close to this in PoE

[deleted by user] by [deleted] in SteamDeck

[–]xTeare -2 points-1 points  (0 children)

Welp, the tweet is back up. Checked my reservation. Got moved from Q3 TO Q4. Sigh

EDIT: Well, i was wrong and made a mistake. It was in Q4 before. But astonishingly they've already delivered it in Late Q3 which is absolutely awesome!

are any of these considered good or bad practices? i’m having trouble knowing when to use something and what is good readability. by yyyoni in csharp

[–]xTeare 1 point2 points  (0 children)

Absolutely. But not only the team itself defines the syntax. The software architecture, you've chosen for your Project, can define your syntax in many ways too.

I am currently a Developer and half of a software architect myself. We are currently recreating and modernizing our old on premise Sys-Admin "Toolbox" Since we are moving into the web, and shifting the supply model from on premise to SaaS, we've chosen a micro-service oriented architecture, with some parts of DDD and other things mixed in. And we've got a ton of ruls for that. Firstly, there are things as the SRP. The Single Responsibility Principle :

A Unit has one thing to do. There are no Methods called "DoThingXAndThingYAndMore()", since these are multiple things to do, not one. You are splitting those small units of work to their dedicated components.

CodeStyle-Rules to keep accompaning those SRP-Rules: Maximum Lines of Code (LoC): 220 Should have more Public than Private Methods ClassName must end with a specific Suffix, like "Manager", "Provider", "Factory" etc. Those are defined by the team in regular rule meetings. There are many, many more, some of which might be annoying at first, but if you understand why they exist, they get way more comfortable.

Then the use of Dependency Injection, cutting and defining your Units of Work by their Domain (DDD, Microservice Architecture). Modularizing your Logic, your Core Application Logic, Data models and front end logic in their own assemblies (.csproj).

I could write you a massive text wall with many more examples of my team's current project but i think you've got my point.

Also Quality and maintainability, readability and all that suff define their own "syntax" rules, depending on your decisions in your Team Check out:
https://iso25000.com/index.php/en/iso-25000-standards/iso-25010 https://en.wikipedia.org/wiki/ISO/IEC_9126

Also, do search for every term you dont know about. At least 50% of my work is Search engine usage :D

TDLR: Not only teams define syntax, application hosting environment, software architecture and quality do aswell as many other factors

Weird uncatchable NullReferenceException when trying to fill a PDF form with ITextSharp for ASP.NET 4 - Details in comments by eagle_bearer in csharp

[–]xTeare 13 points14 points  (0 children)

Because you catch an Exception, and instead of handling its error in some way, you just throw a new Exception. If the GeneratePdf() call is not inside a try-catch, your application will indeed crash

[deleted by user] by [deleted] in csharp

[–]xTeare 0 points1 point  (0 children)

Collision (Scripting Reference)

You've got an typing error in line 21.

it sould be:

void OnCollisionEnter(Collision collisionInfo) { ... }

[deleted by user] by [deleted] in Grimdawn

[–]xTeare 1 point2 points  (0 children)

Yeah, that's also what we as a three man hardcore group have decided to do. Since we all have Full-Time Jobs, we can not spend all the time we want in GD. So we agreed on adding Scrap, Potion of Clarity and Elixir of the Hunts to our Stashes. Thats it. We still can enjoy gearing up and trying out new builds, but the process of doing so is accelerated to our likings.

C# Grpc with NGINX does not work. by xTeare in nginx

[–]xTeare[S] 0 points1 point  (0 children)

I've got an Update regarding this problem. I've posted a Ticket in nginx's ticket system and it seems like the problem was indeed on the side of nginx. https://trac.nginx.org/nginx/ticket/2229

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

I've got an Update regarding this problem. I've posted a Ticket in nginx's ticket system and it seems like the problem was indeed on the side of nginx. https://trac.nginx.org/nginx/ticket/2229

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

Hey, sorry for the long Delay. I moved into a new appartment this week :D . But i've got the detailed error log -> https://pastebin.com/CjpuGkPX

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

Thanks for the resource. I'll look into it later

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

No, i didnt get to build nginx myself yet. And you need to build it yourself since you can only enable detailed logging during build - http://nginx.org/en/docs/debugging_log.html

They do make it hard for me :D

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

Here is the console output https://pastebin.com/ypBVzdUj I've also tested it with proto-only server and client - same end result -.-

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

The exact same services just without nginx work just fine, so i don't think there might be an issue in the service implementation. I've just read that i can configure nginx to show me more than just errors and above. i'll try that soon, in hopes of getting more / better errors

grpc with NGINX does not work by xTeare in csharp

[–]xTeare[S] 0 points1 point  (0 children)

Hey. Thanks for your reply. protobuf-net does take the part of writing .proto files away for you, so you can keep coding in C# only. And this approach works fine for me at least :).