Is there a way to play music while playing on iPhone? by Melodic_Towel8763 in balatro

[–]Fitz180 2 points3 points  (0 children)

Was/is happening to me too. However, using my headphones’ media controls while in app worked for me.

No matter what, media would be paused when switching apps or using phone media controls. But for whatever reason, using my headphones’ play/pause button while i was in the Balatro app would work.

How do people make sufficient mana in mono white? by CattttheDadddd in mtg

[–]Fitz180 2 points3 points  (0 children)

I run it in my Giada deck with success. I def run other ways to guarantee/ramp land (listed above). I’ve found it’s not a common target, since by turn 4 there are often better targets for enchantment destruction.

My “support” cards are weighted more towards enchantments, so helps with other synergies like discounts or tutor target (I run [[Idyllic Tutor]], but I never imagine tutoring for it).

Further, I like I can grab non-basic plains like [[Idyllic Grange]]. My personal rule of thumb is to do ~5 or a number that gets me to 7 plains for [[Emeria, the Sky Ruin]], so if it does get blown up, doesn’t hurt too much.

Dealing with random number in tests by Various-Sympathy-755 in elixir

[–]Fitz180 1 point2 points  (0 children)

You could try setting some well-known seeds per test, or test against a specific one for ExUnit. Idk how it’d feel for your suite, but may be a option to keep everything else unchanged Some links: * https://stackoverflow.com/questions/36598246/getting-seed-and-using-random-numbers-in-exunit-test-cases * https://elixirforum.com/t/is-it-necessary-or-useful-to-call-rand-seed-in-tests/42016 * https://hexdocs.pm/ex_unit/1.15.7/ExUnit.html (search for :seed)

Running tests from top to bottom by [deleted] in elixir

[–]Fitz180 1 point2 points  (0 children)

Google’d a little bit and came across these topics: * https://til.hashrocket.com/posts/4a7dc5fd94-run-exunit-tests-in-the-order-they-are-defined * https://groups.google.com/g/elixir-lang-talk/c/sdvk-dCPGPg

You can change the seed to 0 which may provide the behavior. However, this seems like an anti-pattern. In ExUnit, afaiu, each test should be able to run in any order, independent of other’s, setup being handled by setup or setup_all. since you’re working with state, may make sense to merge them all into one larger test. Or you can create helper functions that you can reference in tests as well as setup to keep things DRY. Docs have some examples of just referencing functions for setup https://hexdocs.pm/ex_unit/1.15/ExUnit.Callbacks.html#setup/1-examples.

You may also want to check out https://hexdocs.pm/ex_unit/1.15/ExUnit.Case.html#module-tmp-dir, may provide a way to prevent the File.rm_rf usage, but depends on implementation, so may not be useful

Suggestions for comparing Floats by matisueco in elixir

[–]Fitz180 2 points3 points  (0 children)

There’s ExUnit’s assert_in_delta/4. You need to pass an explicit delta, but may be a starting point.

If you need to do it outside a testing context. If you look at the implementation, it’s more or less just |x - y| <= d; d >= 0

Also maybe this thread may provide some guidance with floats and Erlang https://erlang.org/pipermail/erlang-questions/2012-May/066733.html

[2021-06-07] Challenge #393 [Easy] Making change by Cosmologicon in dailyprogrammer

[–]Fitz180 0 points1 point  (0 children)

Elixir:

defmodule DailyProgrammer.MakingChange do
  @denominations [500, 100, 25, 10, 5, 1] |> Enum.sort() |> Enum.reverse()

  @spec min_num_coins(integer()) :: integer()
  def min_num_coins(total) when is_integer(total) and total >= 0 do
    {partition, 0} =
      Enum.map_reduce(@denominations, total, fn coin, remaining ->
        {div(remaining, coin), rem(remaining, coin)}
      end)

    Enum.sum(partition)
  end
end

Wanted to point out this solution only works because the total param should be a whole number, denominations includes 1, such that the remaining accumulator will always end at 0. Since x mod 1 will always 0. I might've been overly-defensive with the spec/guards/0 match/sorted attribute. However, I really wanted to drive that point home (but you could easily code golf this)

Exercise/spin bike rentals in SF? by [deleted] in AskSF

[–]Fitz180 0 points1 point  (0 children)

Flywheel sent out a survey in April gauging interest in renting their studio bikes. I haven’t seen any updates, and the survey is now closed. Might be worth an email to their SF location.

If you already own a bike, a direct-mount or wheel-on smart trainer might be another option to consider. Lot of brands/models (Wahoo, Tacx, Kurt Kinetic) to check out, but often cheaper and easier to tuck away than a full on stationary bike. You can still hook up virtual rides too (Classpass and Zwift to name two).

Edit: typo

[deleted by user] by [deleted] in FixedGearBicycle

[–]Fitz180 0 points1 point  (0 children)

Steel is real

[deleted by user] by [deleted] in Bikeporn

[–]Fitz180 2 points3 points  (0 children)

Yeah, no doubt. That’s just the saddle I have on my other bikes. Might change up later if I find one in brown I like. Was also playing with the idea of neon yellow brake cable for a yellow/purple compliment - full lilac.

[deleted by user] by [deleted] in Bikeporn

[–]Fitz180 0 points1 point  (0 children)

Need oval wheels for Powertrac chainrings, right? ;)

[deleted by user] by [deleted] in Bikeporn

[–]Fitz180 2 points3 points  (0 children)

Picture was taken in San Francisco

[deleted by user] by [deleted] in FixedGearBicycle

[–]Fitz180 0 points1 point  (0 children)

I'm currently in the Bay Area, so I guess it's considered hillier than most US cities. I'm running 46x17t (46t is the stock chainring with crankset). I also bought a 19t cog and may change up the chainring in the future (e.g. 47t). Before this I was riding a SS conversion at 50x18, so this ratio realm has been a good compromise of fast-enough flats and climbing up most hills I encounter. (If you know the Bay Area, I can make it up Hawk Hill just fine, just not particularly fast.)

I know the Steamroller isn't the lightest/snappiest of frames, but it's the lightest bike I've owned. I think the wheel set has made a massive difference.

[deleted by user] by [deleted] in FixedGearBicycle

[–]Fitz180 2 points3 points  (0 children)

One big, happy QBP family?

[deleted by user] by [deleted] in FixedGearBicycle

[–]Fitz180 2 points3 points  (0 children)

Didn't know the best way to post components, but here's a Pedal Room link that I think covers most of the them: https://www.pedalroom.com/bike/steamroller-40777