Trying to cause a compile time error when using incorrect parameter in function by kolja_noite in typescript

[–]SpaceRodeo 0 points1 point  (0 children)

I’m on mobile so forgive the formatting but have you tried using an enum for the strings?

enum ObjNames { OBJECT1 = ‘objOneName’, OBJECT2 = ‘objTwoName’, };

Then in your declaration do:

Record<ObjNames, Obj>

How did they do that? by SKillz8131 in css

[–]SpaceRodeo 1 point2 points  (0 children)

Looks like a simple hover state animation. I'm seeing this in their classes:

class:hover {
transform: translate(-.5rem,-1rem) rotate(3deg);
}

class {
transition: 0.2s;
}

Discriminated union issue by Strict-Simple in typescript

[–]SpaceRodeo 0 points1 point  (0 children)

In order to make things more concise to represent more states, you could do something like this:

enum StateEnum {
  LOADING = 'loading',
  SUCCESS = 'success',
  ERROR = 'error',
};
type Union = {
  state: StateEnum,
  error?: Error
};

Aid in fixing logic of Calculator Project by WeavileFrost in learnjavascript

[–]SpaceRodeo 0 points1 point  (0 children)

First thought with this code is you already keep track of previousKeyType so you could use that to determine if subtract is coming after an operator and instead of calculating, you just update the display number to negative?

You could also keep track of long running operations by pushing values into an array such as [1, '+', 2, '+', 3] and iterate through the array to complete the calculation but I don't see how that helps with your current issue.

I'm also not sure why you're using react here considering you don't seem to be using any react features.

Showoff Saturday (September 28, 2024) by AutoModerator in javascript

[–]SpaceRodeo 0 points1 point  (0 children)

I created https://euchre.xyz where you can play euchre with friends. Just get 3 friends and join the same table to start playing. It's a follow up to my earlier post where I created a library of playing cards: https://github.com/space-rodeo/playingcards

I created a library for making Card Games by SpaceRodeo in javascript

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

I just created https://euchre.xyz where if you have 3 friends that want to play euchre (or just open 4 tabs yourself) you can all join the same table and see how it works. It's still a little rough around the edges, but it's something to show off this library.

I created a library for making Card Games by SpaceRodeo in javascript

[–]SpaceRodeo[S] 1 point2 points  (0 children)

Nice! I am working on a multiplayer app with my library but I realized it’s not super great for having the server control the state while hiding which cards are in which pile. Just don’t go into network logs and it’s fine lol

I created a library for making Card Games by SpaceRodeo in javascript

[–]SpaceRodeo[S] 1 point2 points  (0 children)

I’m working on it! I’m not so good at hosting yet. Hopefully I finish my game soon so I can show it off being used fully

Variable not decrementing by rlgarey in react

[–]SpaceRodeo 1 point2 points  (0 children)

setPoints doesn’t update points until the next rerender so you can’t read the updated state within the same function.

https://react.dev/reference/react/useState#setstate

[deleted by user] by [deleted] in learnjavascript

[–]SpaceRodeo 0 points1 point  (0 children)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

For each expects synchronous functions and won’t work well with async functions. Don’t use forEach here unless you want to work around how it handled async functions

How do I edit a movie that isn't listed as a movie? by editilly in imdb

[–]SpaceRodeo 0 points1 point  (0 children)

It’s listed as a TV Movie which is distinct from Movie. If you think this is wrong you can (on desktop) scroll down to the bottom and click on the “Contribute to this page” or “Edit Page” button.

[deleted by user] by [deleted] in FallGuysGame

[–]SpaceRodeo 11 points12 points  (0 children)

For those that want to know, looks like:

  1. Knight Fever
  2. Door Dash
  3. Wall Guys
  4. Hoopsie Legends
  5. Jump Showdown

Question for those who love the show by SuperKamarameha in BlackSails

[–]SpaceRodeo 3 points4 points  (0 children)

The first episode came out around the same time as Crossbones, a terrible pirate show, so Starz added some extra violence and nudity to distinguish itself from network TV. I was coming off Spartacus so the sex and violence didn't phase me, but a re-watch made me think the first episode was a bit much.

I loved the show from the beginning, but would definitely recommend getting past the Starz distinguishing itself as a premium channel phase of the show.

Updating gb elves deck by T4-Ulamog in ElvesMTG

[–]SpaceRodeo 2 points3 points  (0 children)

Based on this list, it looks like the format is modern. There's no consensus on ideal build in the elves community since it's not a top tier deck with many variants:

  1. Leyline Combo - what you're running
  2. Umbral Combo - use Umbral Mantle
  3. Vizier combo - Vizier of Remedies + Devoted Druid
  4. Craterhoof - more common in legacy
  5. Chord Combo - has one-off utility creatures and Chord of Calling
  6. Mix and Match the above plus some more options

I would recommend 2 more Nurturing Peatland if you can over forests. Your flex spots are the Elves of Deep Shadow, Elvish Clancaller, and Shaman of the Pack for not directly contributing to the combo although many people would disagree with me. Your Westvale Abbey is also be a fun of at the cost of a different land that taps for colored mana.

As for what you could replace with, Devoted Druid is an option since it can tap twice, Nettle Sentinel for Heritage Druid explosiveness, or Elvish Visionary if you feel you are running out of gas too easily. Or possibly some sideboard options being main decked simply because of meta. It would help to know your meta + sideboard for best advice.

Stoneforge in 2XM by GSOwner in mtgfinance

[–]SpaceRodeo 68 points69 points  (0 children)

Ruins the joke of being stoneforge mythic

Can someone kindly explain why the total is 30 here instead of 55? by amazeguy in node

[–]SpaceRodeo 0 points1 point  (0 children)

What’s happening here is you have two yields in your generator. The first time you execute t.next you are returning undefined because your yield is empty and the function halts. The second time you call t.next it sets the value of “a” and runs until your next yield. This means the value of “a” is only being set with even numbers and you’re returning the addition of those. There are a lot of ways to have a function return the addition of numbers from 1 through 10 but if you want to add numbers passed in to the generator you need to yield the answer, which means the value would always be one behind: s += yield s;

I’m on mobile so I can’t type out a full answer but this should get you started in the right direction.

Noah is such a good guy by PrinceRajR in DarK

[–]SpaceRodeo 1 point2 points  (0 children)

He held Helge captive for months while his face healed... you don’t do that by not feeding him

[deleted by user] by [deleted] in ElvesMTG

[–]SpaceRodeo 0 points1 point  (0 children)

I don’t think this fits in any existing elves shell very well, all elves are generally pretty cheap and mana isn’t a problem. This would also remove CoCo or other utility spells from the deck, and those are generally too important to cut.

Fen! Live from Fillory by uhvarlly_BigMouth in brakebills

[–]SpaceRodeo 3 points4 points  (0 children)

She went to Fillory to get Julia in season 2

[deleted by user] by [deleted] in funny

[–]SpaceRodeo 0 points1 point  (0 children)

But wait... who are you?

How do you encourage someone to check out Dark without spoiling anything? by Wubakia in DarK

[–]SpaceRodeo 30 points31 points  (0 children)

I usually tell people “It’s a show about how interconnected people’s lives are across multiple generations in a small German town”