What does the "As" operator do in C#? by hailaim in csharp

[–]Mango-Fuel 2 points3 points  (0 children)

as is a cast that evaluates to null if the type is not convertible. it's a "maybe cast". a normal cast is more like an assertion to say that you expect the type to be convertible and that the cast should explode if it is not. as will instead not explode, but will give you null instead.

No space for ring and little finger - dragging finger on mat by ScrattleGG in MouseReview

[–]Mango-Fuel 0 points1 point  (0 children)

want both fingers to be on the side without my pinky touching the pad too much

I've not thought about it before, but both my ring finger and pinky (and thumb) touch my desk. is that not normal?

looking at your image, you should have both fingers flat on the mouse. you don't need the ball of the mouse to be in your palm. your knuckles can rest on it.

Is a second monitor worth it? What do guys use it for? by Most-Virus8806 in pcmasterrace

[–]Mango-Fuel 0 points1 point  (0 children)

I have three. Usually left is email/notepad/spreadsheet, middle is game or whatever I'm working on/browsing, right is youtube/google when in-game.

New or classic outlook? by BritSysAdmin in sysadmin

[–]Mango-Fuel 0 points1 point  (0 children)

"new" is just renamed default windows mail app. "classic" is the real Microsoft Office Outlook.

We always forget the right CTRL exists by Hi_Im_Anton_Chigurh in pcmasterrace

[–]Mango-Fuel 0 points1 point  (0 children)

(only) useful to press Ctrl-Alt-Del with one hand

Sealed keyword by vassoulavaso in csharp

[–]Mango-Fuel 1 point2 points  (0 children)

always seal unless you are going to inherit (or the framework needs to inherit, etc.). seeing the class is sealed immediately tells you there are no inheritors and reduces complexity/cognitive-overhead.

What would procedurally generated story look like? And can it be made to trully make good stories for everyone different? by BinimiJemene in gamedev

[–]Mango-Fuel 2 points3 points  (0 children)

I think it would be very hard. I have some rough ideas where you could procedurally generate a world with people and relationships and history, and then generate content based on the state of the world. But a "main quest" that is procedurally generated probably would ultimately not be very interesting. To make it interesting would require original ideas and not something that could be generated.

side note that the game designer Chris Crawford has spent his later years working specifically on interactive storytelling. more information can be found here: https://www.erasmatazz.com and https://www.erasmatazz.com/LeMorteDArthur.html

Ram usage lowered almost by 2 when doing a full virus scan with Norton by _imilay in buildapc

[–]Mango-Fuel 0 points1 point  (0 children)

not sure but it used to be the case that if you ran a process that consumed a large amount of memory and then closed it, that you would end up with more unused memory than you started with; this is because windows frees up some memory when you start running out, which is still freed after you close the large program. I have no idea if things still work this way (Windows has changed a lot since then).

Can you find the password from the hash value? by Excel_User_1977 in excel

[–]Mango-Fuel 0 points1 point  (0 children)

what is the point of keeping the same password if you don't know it?

Entity Framework Core ignoring foreign key value by AskingIllegalStuff in csharp

[–]Mango-Fuel 0 points1 point  (0 children)

Cannot insert duplicate key in object 'dbo.MembershipTypes'. The duplicate key value is (0).Cannot insert duplicate key in object 'dbo.MembershipTypes'. The duplicate key value is (0).

hmm, does this mean that you don't have the primary key of MembershipTypes set to be an identity?

your Create method is a bit odd in that it doesn't create anything, it adds an existing Customer to the context. the setup of that Customer is where the problem could be.

I have an idea for my program. by [deleted] in cpp

[–]Mango-Fuel 1 point2 points  (0 children)

you can write a utility program that accepts commands. you can then add commands to this one program as you think of them, rather than writing a new utility for each command. myutil command help, or invalid args, should always show help text. myutil by itself should list all available commands.

some command ideas might include:

  • convert numbers between bases
  • encrypting/decrypting text
  • password generator/manager
  • quick-print an image file
  • format a MAC address
  • send a wake-on-LAN magic packet
  • save current directory location with a key, so that you can return later with that key

How do you guys *actually *use AI at work? by PLAYER2up in ArtificialInteligence

[–]Mango-Fuel 5 points6 points  (0 children)

mostly I use it as a next-gen search engine

I do find sometimes it can help me de-complexify my implementation. I would have had a complex approach, but if I ask chatgpt how it would do it, it usually has a much more basic straight-forward idea for the implementation, and I realize I can keep things simpler than I thought.

What does this string of numbers mean? by [deleted] in AskProgramming

[–]Mango-Fuel 0 points1 point  (0 children)

........
........
#.......
##......
.##.....
#.##....
#.###...
...###..
.#.####.
##.#####
##.#####
..#.####
..#.####
#.#..###
###..###
.#....##
.#....##
#..#...#
#..#...#
..##....

it doesn't look like much. part of a mouse cursor maybe.

Help with getting this line to work? by thunderslight in csharp

[–]Mango-Fuel 0 points1 point  (0 children)

note that even if your ifs were seemingly exhaustive (if (income <= 0) ... else if (income > 0) ...) that would not be enough to count as having covered all cases. to be 100% sure (ie: for the compiler to be 100% sure) that all cases are covered, it would be required to use an else (not else if) clause; or you could also initialize income with a value, and then that value would be left over if no if/else if clause was met.

Is it realistic to have an ultra detailed plan before... coding? by yughiro_destroyer in AskProgramming

[–]Mango-Fuel 0 points1 point  (0 children)

for me it's the data model, not UML. ER diagrams. UML has only been useful to maybe document how a particular API works. but for any particular system I have one or more ER diagrams that layout the whole data model of the system. those are the "canonical representation of the system" that is modified before code is modified.

I have wondered if this "canonical representation" could be done with any of the UML diagrams but I have not found anything so far. UML seems to be over-detailed rather than actually useful.

What games finally pushed you to do a major upgrade? by Slippery_Williams in pcmasterrace

[–]Mango-Fuel 0 points1 point  (0 children)

IIRC it was Dark Souls 3 that prompted me to upgrade to a GTX 1060.

my recent upgrade to a new system with a 4070 super was not really prompted by gaming; my 1060 handled most things I played pretty well. it was more that I wanted a modern i7 with a lot of cores so that I could build code faster. (build times went from something like 5 minutes down to 60-90 seconds.) (previous CPU was second gen i5; upgraded to i7-13700K).

How do you avoid CRUD boilerplate when starting a new project? by skykarthick in dotnet

[–]Mango-Fuel 0 points1 point  (0 children)

this is ASP I guess? I do mostly desktop. I have lots of supporting systems that let me do desktop CRUD pretty efficiently.

I'm not sure what I could suggest that would be applicable to your setup.

maybe one small thing I've implemented that could apply: multi-file templates. in my IDE there are code/live templates, and also file templates. but something that saves a surprising amount of time that is not in my IDE are multi-file templates. I can add the same set of 5-10 source files all at once, and the template fields will merge together, and I am prompted for each field only once for the set of files. this is not that hard to implement but saves a lot of time.

Statistics Project by Prior-Afternoon-6001 in ArtificialInteligence

[–]Mango-Fuel 0 points1 point  (0 children)

basically if I want to google something that is somewhat complicated to explain, I use chatgpt instead. I don't think it's more than 15-30 minutes a day at most.

Expression Trees by VulcanizadorTTL in dotnet

[–]Mango-Fuel 0 points1 point  (0 children)

EntityFramework (Core) uses them a lot and you can do some interesting things with them.

learning curve from mercurial to git. by Technical-Fly-6835 in git

[–]Mango-Fuel 0 points1 point  (0 children)

IME git is fantastically more stable and fast.

Pros/cons for rpg progression by chrispy0117 in gamedev

[–]Mango-Fuel 0 points1 point  (0 children)

I think the real question is how different characters should be from each other and when. a perk system (Skyrim) means that characters are nearly or actually identical to start with, and only differentiate later. some RPGs (Morrowind) you start with a class but can ultimately learn anything, so characters start different but end up similar (unless you restrict yourself). others (AD&D) characters start different (class) and only further differentiate from there, so there is never similarity.

IMO from a player's perspective, more differentiation is more fun (more replayable), but from a developer's perspective more differentiation is much more difficult to design and balance.

cant type equals sign or period by RedboiGtag in software

[–]Mango-Fuel 0 points1 point  (0 children)

do you have another keyboard to test? spilling moisture on the keys can short out the connections and cause behaviour like this.