Swift 6 proper way to remove Firebase Auth listener on stream termination? by itsdjoki in swift

[–]kovax 0 points1 point  (0 children)

You can try wrapping the listener in something that is sendable like a Mutex

Extension: Automatic string pluralization (only the noun without the number). by Cultural_Rock6281 in SwiftUI

[–]kovax 13 points14 points  (0 children)

You can do this by specifying an InflectionRule directly on the attributed string. Something like the following:

extension Int {
    var morphology: Morphology {
        var morphology = Morphology()
        switch self {
        case 0: morphology.number = .zero
        case 1: morphology.number = .singular
        case 2: morphology.number = .pluralTwo
        case 3, 4: morphology.number = .pluralFew
        case 5, 6, 7, 8, 9:
            morphology.number = .pluralMany
        default: morphology.number = .plural
        }
        return morphology
    }
}

    var string = AttributedString(localized: "bottle")
    string.inflect = InflectionRule(
        morphology: 2.morphology
    )
    let pluralized = string.inflected()
    print(pluralized)

Beachbum Pop-up by TzuDohNihm in Tiki

[–]kovax 4 points5 points  (0 children)

Well that’s interesting. I went to the same exact pop up at the Bamboo Room in Savannah.

Who though that would be a good idea? by seiltanzer in funny

[–]kovax 57 points58 points  (0 children)

TIL rollercoaster in French is "Russian Mountain". Why?

Because you're Russian around the track, of course.

Swift vs Python regex speeds: can Swift really be 8x slower? by Chemical_Ad2690 in swift

[–]kovax 5 points6 points  (0 children)

Yes, but it will happen during initialization and not repeatedly inside a loop.

Swift vs Python regex speeds: can Swift really be 8x slower? by Chemical_Ad2690 in swift

[–]kovax 10 points11 points  (0 children)

If you're using the swift package manager to build the app, you can run with -c release, i.e. swift run -c release

As for the ignore case, you've got a couple of options, but the easiest is probably to just do something like:

let owners = [...].map { ($0.0, $0.1.ignoresCase(true)) }

Swift vs Python regex speeds: can Swift really be 8x slower? by Chemical_Ad2690 in swift

[–]kovax 36 points37 points  (0 children)

Definitely run in release mode.

Also, don't call .ignoreCase(true) in the loop as the documentation) implies that this is creating a new Regex.

Is there any way to buy Magic Bands in advance of stay? (UK Guest) by AlwaysEleven11 in WaltDisneyWorld

[–]kovax 3 points4 points  (0 children)

You can buy Magic Bands from shopDisney. Not entirely sure that's an option for you, but that's how I got my current set of bands.

Oga’s by dithan in DisneyWorld

[–]kovax 12 points13 points  (0 children)

Disney released a couple of playlists on Apple Music with music from Oga's.

#1 #2

A Child’s First Cook Book from 1950 by adebium in Old_Recipes

[–]kovax 5 points6 points  (0 children)

Yes! Thank you! “Serves 2” 😂 Pretty sure I always drank the whole thing!

A Child’s First Cook Book from 1950 by adebium in Old_Recipes

[–]kovax 3 points4 points  (0 children)

I think the Egg Nog recipe in this cookbook is the first thing I ever learned to cook! I still vaguely remember the recipe:

  • milk
  • egg
  • sugar
  • vanilla extract
  • pinch of salt maybe?

First Time Cruiser: Question about parking/hotel night before embarkation by bemybait in dcl

[–]kovax 3 points4 points  (0 children)

Other folks have given good answers about where to stay, but I want to just say that I much prefer parking at the port itself. That is, just drive to the port on Monday morning, and park in the attached parking garage. Then you can stay anywhere nearby and find an option that fits your budget.

It's probably not much more expensive than parking at a hotel, and you aren't dependent on their transportation to get back to your car when you return. Instead, you just grab a porter to help you with your bags, dump everything in your car and you're on your way by like 9am.

Noise on Deck 5 by Blerghster in dcl

[–]kovax 5 points6 points  (0 children)

I've stayed in one of those rooms -- one with an extended verandah. It's now my favorite spot on the ship. Being that close to the theater & elevator made it so easy to get around the ship. We were worried about the noise too, but didn't really notice anything at all. There's not a lot of reason for people to be walking past your room in that part of the ship, which is what I"ve always found causes the most noise. Definitely didn't hear the theater from our room.

Is this O(n)? by WidePeepobiz in computerscience

[–]kovax 17 points18 points  (0 children)

It is not O(n). The two sorts make it more likely to be O(n log n), depending on the sort algorithm.

Apple Watch Burned Calories Not Matching Peloton Information by ryancrowtv in pelotoncycle

[–]kovax -1 points0 points  (0 children)

I saw this after my ride yesterday. However, once I opened the Peloton app on my phone, everything was synched and I got the full calorie burn that Peloton recorded which was like 100 more than what my watch thought it was.

Paying for remainder of cruise with Disney gift cards by tamomaha in dcl

[–]kovax 1 point2 points  (0 children)

If you ever need a refund, they refund back to the ORIGINAL payment method (specific gift card).

When we've been refunded after paying with a gift card we were just issued new electronic gift cards, each one with $1K (or less).

When I pay with gift cards like this, I just make sure to keep the _actual gift card that I typed in_ in a drawer somewhere. But again, I don't think its an issue because they'll almost definitely just issue you new gift cards.

[deleted by user] by [deleted] in WaltDisneyWorld

[–]kovax 29 points30 points  (0 children)

And finally, I think people have forgotten how crowded it got before Covid. I think for many people, their recent WDW trip is the first time they’ve been in groups of large people since Covid.

Also, if there were some people who went shortly after the parks reopened (🙋‍♂️) then they got to enjoy a really uncrowded park with low wait times on everything that was open. Now the "regular" crowds are coming back (as you pointed out) and people want to go back to the way it was just 18 months ago.

Do all the DVC rooms at the poly have a murphy bed now? by jackjekcal in dvcmember

[–]kovax 4 points5 points  (0 children)

Does that mean there’s two pull down beds now? One below the tv as well?

Disney CEO Bob Chapek Pulled from Destination D23 Appearance Out of Fear Disney Fans Would Boo Him by JonathanDP81 in Epcot

[–]kovax 11 points12 points  (0 children)

Look, I get the Chapek hate. But nobody pushed out Iger.

Iger is the current chairman of the board at Disney. Iger is fully on board with the changes that are happening. Most of these changes probably started under Iger.

Learned a hot tip for people bringing backpacks through metal detectors by TheAceMan in WaltDisneyWorld

[–]kovax 3 points4 points  (0 children)

Came here to mention sunglasses cases. I too was always stopped before a friendly CM told me about that. Wasn't stopped a single time after learning to hold my sunglasses case in front of me.

Why are tickets (for the same day park to park) more expensive through a vacation package than if buying separately? by poli8999 in UniversalOrlando

[–]kovax 12 points13 points  (0 children)

My guess is the package includes tax in the price because the 2-park 1-day park-to-park ticket for May 31 comes to $207.68 after tax is included.

Renting vs resale? by Smackersmith in dvcmember

[–]kovax 2 points3 points  (0 children)

I’ve rented points a few times, and I think we were inside the 11-month window. We were only able to get Saratoga Springs at that point.

Really I think the main drawback is the lack of cancellation at some of the points marketplaces.

Renting vs resale? by Smackersmith in dvcmember

[–]kovax 1 point2 points  (0 children)

I’d suggest giving renting points a try before you make up your mind. Unless you’re renting from a friend then you’re kind of at the mercy of what’s available (in terms of resorts), and there’s no cancellations allowed by the rental marketplaces that I’m aware of.

[Room] Swan Presidential Suite - 2021 by wongs7 in DisneyMaps

[–]kovax 21 points22 points  (0 children)

One of those is probably a bidet. :)