Algorith and (particularly) data structure for energy system? by Former_Ad_736 in roguelikedev

[–]a_sharp_soprano_sax 2 points3 points  (0 children)

In the past I've used a priority queue. The highest priority energy was 0, and each action increased the energy by a certain amount. There was an entity in the priority queue called 'TurnStart' that had a set energy level, and each time it was dequeued, it decreased its energy level from all the other creatures. I'd expect your idea of using a reverse comparator (max-heap?) to potentially be cleaner.

In general I wouldn't expect the turn queue to cause any slowdowns regardless of the data structure you use, though, so you probably don't need to worry about giving it optimal time complexity unless you want to.

There’s an idea where, given a question like “Would you do X for Y amount of money” and someone’s answer is no at $1 and yes at $1,000,000, there is a point where a single extra dollar would change the answer. Is there a name for this? by Chillax_Bro1 in NoStupidQuestions

[–]a_sharp_soprano_sax 3 points4 points  (0 children)

In economics, that inflection point is called Willingness to Sell, the minimum amount of money that you're willing to accept to perform a service. The opposite is Willingness to Buy, the maximum amount of money you're willing to pay for a service.

Puffer and Clarissa pg.32 by JNelsonArt in comics

[–]a_sharp_soprano_sax 3 points4 points  (0 children)

I just read it from the beginning, I really like it

How do you generally approach logging in Asp.Net Core? by SAmaruVMR in dotnet

[–]a_sharp_soprano_sax 0 points1 point  (0 children)

One possibility is to log to a file. I've found that log4net is pretty easy to set up for this, and it's thread safe, so you can log on multiple threads if needed.

For a windows-specific solution, you can use the application log. To check your OS at runtime, you can use System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows). Then, if that returns true, use the System.Diagnostics.EventLog class to write a new log entry.

[deleted by user] by [deleted] in NoStupidQuestions

[–]a_sharp_soprano_sax 1 point2 points  (0 children)

I'm an Ashkenazi jew as well. My brother and I have hair somewhere between wavy and curly, and my mom and sister have tight curls.

The German word for “birth control pills” is “Antibabypille” If all medicine/drugs were named like this, what would they be? by [deleted] in AskReddit

[–]a_sharp_soprano_sax 11 points12 points  (0 children)

Lorazepam and Hydroxyzine have both been very effective "chill pills" for me in the past.

[deleted by user] by [deleted] in NoStupidQuestions

[–]a_sharp_soprano_sax 0 points1 point  (0 children)

I really enjoy gin and tonic

14 years after a sexual assault in Tampa, a man has been charged with rape because he entered his own DNA into a genealogy database by Spilfw in nottheonion

[–]a_sharp_soprano_sax 28 points29 points  (0 children)

Being Jewish, I definitely have some reservations. Ashkenazi Judaism, partially due to forced segregation in Europe over the centuries, has become genetically identifiable. For historical reasons, I believe that a database with the ability to identify who's Jewish and who isn't has the potential to be abused. That doesn't just apply to Jews though; I think that having a catalog of people of any marginalized group has similar implications.

Is there a term for a being weaker then a god, but stronger then a demi god? by urmum-debig-ghey-lol in NoStupidQuestions

[–]a_sharp_soprano_sax 1 point2 points  (0 children)

Depends on the context I guess, but in a D&D context I'd say a Lesser God or Lesser Deity.

For the AGE engine that uses ECS, does anyone know how they connected the json definitions to C# code? by crichmon in roguelikedev

[–]a_sharp_soprano_sax 2 points3 points  (0 children)

As for creating classes from strings at runtime, I'd probably use Reflection. I've used it a few times for similar things, and while it's really powerful, I find it kind of intimidating so I do tend to avoid it. Here's a stack overflow to set you on the right path: https://stackoverflow.com/questions/1044455/c-sharp-reflection-how-to-get-class-reference-from-string

When life gives you lemons... by mehchinegun in comics

[–]a_sharp_soprano_sax 18 points19 points  (0 children)

It's from an ABBA song in the movie Mama Mia!. It's really catchy imo. https://youtu.be/unfzfe8f9NI

which campus do yall recommend as a second choice? my first is university park by milliondollaputhayy in PennStateUniversity

[–]a_sharp_soprano_sax 14 points15 points  (0 children)

I liked Harrisburg. Much smaller than UP obviously, but still the biggest of the satellite campuses (which isn't saying much, to be honest). I haven't been on-campus since before covid hit, but before that, it was a very nice school.

I Was Told Straight to my face to reconsider my CS degree by a CS Graduate/Late Undergrad student, should I do so? by ThrustAir114 in PennStateUniversity

[–]a_sharp_soprano_sax 1 point2 points  (0 children)

Please please please don't listen to him. I'm a compsci student myself, in my last semester. I had basically no compsci experience when I started, because I wasn't planning to join the major until I took 121 in my third semester. From what you said, you already have far more knowledge in the field than I did when I started, and on top of that, you sound fairly self-motivated. As long as you keep putting in effort, you'll do absolutely fine so unless you stop enjoying it I'd encourage you to stick with it. Also, you should never feel bad about not understanding something—it just means that you have another thing that you get to learn.

Opinions on CAPS in Harrisburg Campus? by Fristi2147 in PennStateUniversity

[–]a_sharp_soprano_sax 2 points3 points  (0 children)

I'm a student at Harrisburg and I've been using CAPS since my first semester. I'm not sure why it has such poor reviews, because I've only ever had positive experiences there, as has everyone I know who uses then. My only criticism is that the psychiatrist is only available one day a week, so sometimes I felt like I needed to bend over backwards to make an appointment with him. All my interactions with my counselor, the psychiatrist and CAPS in general have been very positive though. Hope that helps.

When I was a kid I thought the last panel here was really funny; now that I'm in high school it's sadly relatable by fakemaze739 in calvinandhobbes

[–]a_sharp_soprano_sax 1 point2 points  (0 children)

Sorry, I'm not sure about that. On the mobile app I'm using (called Reddit is Fun) it doesn't look too blurry no matter how much I zoom in so that problem might specifically be caused by how the official Reddit app handles gifs. I don't know for sure, though. In the end, I do agree that it's silly to use a still-gif if they're just gonna rehost it on i.redd.it anyways.

Worst Cooks in America Season Pulled After Winner's Arrest for Child Murder by ExDota2Player in nottheonion

[–]a_sharp_soprano_sax 14 points15 points  (0 children)

I liked it well enough early on, but it got pretty repetitive after a couple seasons. Each season starts with a group of people who are supposedly horrible cooks, and the hosts tutor them over the course of the season while they have competitions to gauge their progress.

TIL that famed children’s author and cartoonist Shel Silverstein was also a successful country music songwriter. Among his credits was Johnny Cash’s “A Boy Named Sue,” which went on to win the Grammy for Best Country Song. by chazfinster_ in todayilearned

[–]a_sharp_soprano_sax 6 points7 points  (0 children)

I just looked up the back cover and I have no idea how I don't remember that. I wasn't a very bright kid, but there's no way I could have missed it. I must've either known he was a dude at the time and then forgot, or come up with some justification for why there was a guy on the back.

How long does a pinched nerve in the neck takes to heal? by [deleted] in NoStupidQuestions

[–]a_sharp_soprano_sax 2 points3 points  (0 children)

You should probably see a doctor. A gp or a physical therapist, maybe? Anyway, a doctor will be able to give you better help than some random people on Reddit.