to_urcite_ty_kokos

joined 1 year ago
[โ€“] [email protected] 2 points 11 months ago

Oh, I see, I for some reason switched zip operation with โ€œcreate pair/tupleโ€ operation in my head. Thanks for clarification.

[โ€“] [email protected] 2 points 11 months ago (2 children)

Wouldn't this code fail in a case like this? Because you count different lines, not different characters in the lines, right? Or am I missing something? Thanks (Let's ignore column symmetry for the sake of example).

##
..
..
..

(I think you will get answer 100, but the answer is 300)

But for sure after seeing this I have to learn Scala.

[โ€“] [email protected] 2 points 11 months ago

Kotlin

Github

Was lazy at the beginning, so I started to do actual expansion in memory, then decided to do it properly. And it paid off in the second part.

  • find galaxy coordinates + hold few bit masks to find unused rows and columns โ†’ convert to indexes
  • transform original galaxies coordinates considering number of previous empty lines (time for simple binary search)
  • use the Manhattan distance
[โ€“] [email protected] 1 points 11 months ago* (last edited 11 months ago)

Kotlin

Github

Double expansion seams like a nice approach, but I didn't think of that. Instead, I just scan the lines and โ€œrememberโ€ if I am in a component or not by counting the number of pipe crossings.

[โ€“] [email protected] 2 points 1 year ago (1 children)

That's looking quite promising. The main thing missing before being ready for me is filter/add by region and of course shop name. Then it can go out i think (+ give me a random code feature as the next step).

And make a new post with this, no one will notice otherwise (if you haven't already)

[โ€“] [email protected] 6 points 1 year ago (1 children)

This is the same thing as in chrome

[โ€“] [email protected] 10 points 1 year ago

Shut up and take my money!

[โ€“] [email protected] 1 points 1 year ago

Oh, I missed that ๐Ÿ˜…

[โ€“] [email protected] 20 points 1 year ago (2 children)

Reading this on Infinity for lemmy

[โ€“] [email protected] 1 points 1 year ago (1 children)

I personally have the skills (I hope so), but from the time standpoint it's not as great nowadays. I also don't want to write an app that would be used just by few people (the cards should also be separated by region, so even more people would be needed to start going).

[โ€“] [email protected] 1 points 1 year ago (2 children)

When you sing up for such a card, do they usually check it? I can image some stores checking your ID the first time.

 

Hi, I was wondering if there is an app that enables loyalty cards sharing. When you open it, you can enter your card code of the Store. Now you can use a card of any other participant who entered his own card for the Store (the backend will send a random one) and your code can be used by anyone else using the service. Usually the cards are just permanent ID (shown as a bar code), so it shouldn't be that hard to implement.

While using this, the shop would have no chance of creating a profile on you and tracking you (as the purchases would be โ€œrandomโ€), they have these data anyway. You would only give up the data you fill in when you ask for the card.

Do you know something like this? Or am I missing something important, or do you see some major flaws in this design (I don't use loyalty cards, but sometimes they could be quite useful)? Thanks

view more: next โ€บ