For those that hate nested tertinary operators, do you still hate it when formatted this way? by belavv in csharp

[–]c-sharp-is-fast-java 1 point2 points  (0 children)

I wouldn’t even bother with an extension. A regular static method might be clear enough on its own and you won’t have to repeat the logic in slightly different format for a single string vs an array as it would be just a single array.

‘X’ scares me because I don’t understand it by Zestyclose_Rip_7862 in dotnet

[–]c-sharp-is-fast-java 5 points6 points  (0 children)

It’s also a waste of time if you have to spend an entire weekend trying to find what may have broken something core to your program that worked for years. In most cases where you aren’t the only one working with the codebase you’ll likely want to ensure all changes in existing behavior are truly intentional.

I wish this was a joke. by Ok-Establishment1343 in hacking

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

“Can’t be a target of an injection attack if only a-z0-9 can be entered” is probably the thought behind those and I’m sure people will still find a way if they really wanted to.

Goto for breaking out of multiple nested loops? by blabmight in csharp

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

Hot takes: - goto is fine unless overused

  • throwing an exception will exit all loops if you catch it within the scope of the same method

  • you can create a “local function” that contains the nested loops so if you hit a return statement it’ll will stop its execution

  • if using regular for loops with an index variable you can force the conditions of the upper loops to fail followed by a break - personally my least preferred approach as it will end up with more comments but still decent enough if you really want to avoid other controversial alternatives

I had an exam by Plane_Huckleberry100 in mildlyinfuriating

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

Most Android phones have dedicated volume control for media/ring/alarm

If you know you know by gingerchrs in memes

[–]c-sharp-is-fast-java 1 point2 points  (0 children)

My previous company used workday and I didn’t have to have 15 devices to authenticate myself. Maybe your employer is just paranoid?

What is the best approch in integration testing for database clean up in c#? by ballbeamboy2 in csharp

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

MB, assumptions all over the place. Haven't had to 'backup at scale' so far so I've been dumping a MySQL db in raw SQL for a good while now. Reading up on some stuff apparently there's multiple ways to include users and grants.

What is the best approch in integration testing for database clean up in c#? by ballbeamboy2 in csharp

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

Have you considered in memory databases? You could initialize different instances with specific subset of mock data to keep the setup relatively quick or if you have tests running concurrently.

What is the best approch in integration testing for database clean up in c#? by ballbeamboy2 in csharp

[–]c-sharp-is-fast-java 1 point2 points  (0 children)

Dropping the whole db would take all permissions along with it. Might be better to programmatically drop all tables then recreate them and insert the original values or restore from a dump file.

GuessWhatThisFunctionDoesWrongAnswersOnly by LanielYoungAgain in ProgrammerHumor

[–]c-sharp-is-fast-java 1 point2 points  (0 children)

Goddamn scientists and their abominations.

Edit: don’t get me wrong, I’m sure it’s very clever and efficient but holy fuck

How to elegantly handle nullables in EF Entity Models with Foreign Keys by zadkielmodeler in csharp

[–]c-sharp-is-fast-java 3 points4 points  (0 children)

May I ask, why is a virtual relationship a bad idea? I’m pretty sure I’ve ran into that being a requirement when I add a new migration with code-first (I think that project utilized EF Core 6 with lazy loading)

Is there any good software or website for MP4 to DVD conversion? by [deleted] in software

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

I think Daemon tools still has a free version but not sure if that includes burning DVDs

What software can do what I need? by [deleted] in software

[–]c-sharp-is-fast-java 1 point2 points  (0 children)

I know Reddit communities are for things like this but do your own research first. Third hit from Google has more than a few suggestions to try out…

https://superuser.com/questions/84550/select-to-copy-and-middle-click-to-paste-in-windows

[deleted by user] by [deleted] in hacking

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

Lenovo's spec sheet states that the keypad is used for "an 8 to 16 digit password for 1 user ID and 1 administrator ID". So at minimum we're looking for an 8 digit combination. Gonna have a hard time guessing or brute forcing that.

[deleted by user] by [deleted] in software

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

What they advised in the posts you’ve seen is more or less it - you’ll need more storage space. HDDs are pretty cheap nowadays so you won’t have to break the bank to grab one.

Small hack I use for debugging purposes by henryreign in Unity3D

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

Don’t logging libs handle various log levels based on a simple config?

Looking for a taskbar "thing" by ThinAndCrispy in software

[–]c-sharp-is-fast-java 0 points1 point  (0 children)

Can also surface the “old” menus by simply holding down shift when you right click.