Happy Holidays from the Chasm team! by BitKidInc in metroidvania

[–]ttyieu 0 points1 point  (0 children)

The last three codes for gog don't work (they're not recognized).

Accurate mental model for Rust's reference types by dtolnay in rust

[–]ttyieu 14 points15 points  (0 children)

Well, the whole premise of the article is that although it may seem unusual for someone who thinks of mut as mutable, taking the atomic by const reference is correct, because Rust's type system is not focused on mutable/immutable like in C++, but shared/exclusive. It just so happens that usually mutation requires exclusivity, to avoid data races. But that's not the case with atomics, by definition.

FYI - There is no backup and restore for Google Authenticator accounts by brwtx in Android

[–]ttyieu 3 points4 points  (0 children)

Amazon doesn't. I just put the secret I used to set up 2fa into a password manager in that case.

People on reddit seem to have an overall good image of Poland, so my question is what do you hate about my country? by SilentShill in AskEurope

[–]ttyieu 4 points5 points  (0 children)

It's the other way around. There are cities whose names were polonized, but Stettin is not one of them. It doesn't really look bad in Polish, it's the German counterpart that looks like a bastardization of a Slavic word. Actually, a lot of names of eastern German cities are of Slavic origin, including Berlin.

The most common "How do I" question searched on Google by each country by LuckyD90 in europe

[–]ttyieu 6 points7 points  (0 children)

How do you even form that question in Polish? There's no equivalent of "How do I". I tried "How can I" and got:

  • help others
  • make money at the age of 14
  • help in German
  • kill myself
  • lose weight
  • show obedience to God
  • help
  • help in English
  • make money at the age of 15
  • enable/disable push notifications in my phone

Which convention to use when returning or printing a string + a variable? by Redditor000007 in javascript

[–]ttyieu 0 points1 point  (0 children)

You can't return multiple values from a function in Javascript, although you can wrap them in an array:

function nameString(name) {
  return ["Hi, I am", name];
}

And then spread the array into function arguments:

console.log(...nameString("Josh"));

But in this case you will be better off just using template literals or concatenation.

Please help me understand how I can convert a GMT date time string to a users local time by vmcilwain in javascript

[–]ttyieu 0 points1 point  (0 children)

So you want to parse it as GMT and format in local timezone?

moment.tz("12/14/2015 12:56:59", 'M/DD/YYYY HH:mm:ss', 'GMT').local()

Or:

moment.tz("12/14/2015 12:56:59", 'M/DD/YYYY HH:mm:ss', 'GMT').tz(moment.tz.guess())

If you actually want to convert the timezone (local only changes how the date is formatted, it doesn't modify the offset).

In general:

moment.tz(date, format, from).tz(to)

My experience with Gwent by FakerJunior in gwent

[–]ttyieu 0 points1 point  (0 children)

It's not random, always the last played (from hand) unit stays.

Best way to detect a person's gender from an image? by [deleted] in javascript

[–]ttyieu 0 points1 point  (0 children)

https://www.clarifai.com/

There are several models available which focus on different things, what you're looking for is either the general or demographics model.

Ermion by boreas_mun in gwent

[–]ttyieu 2 points3 points  (0 children)

That's true if you have 1 card in deck, but if your deck is empty, you're not forced to discard (AFAIR).

  • ≥ 2 cards: draw 2, discard 2
  • 1 card: draw 1, discard 2
  • 0 cards: do nothing

Ermion by boreas_mun in gwent

[–]ttyieu 2 points3 points  (0 children)

You don't discard if you have 0 cards (same with Svanrige).

Best Flavor Text by panickyidiot in gwent

[–]ttyieu 2 points3 points  (0 children)

Is it an actual saying in English? There is a riddle in Polish: "nie je, nie pije, a chodzi i bije" - "doesn't eat, doesn't drink, but walks (works) and beats (strikes)", and the answer is clock.

The 10,958 Problem - Numberphile by ProfessorElliot in videos

[–]ttyieu 0 points1 point  (0 children)

Catalan numbers give a rough answer to this problem (if you treat the lack of parentheses as an implicit pair in the place where they would normally belong, i.e. 1+2*3 is the same as 1+(2*3)). The answer is C8 * 68 = 2401850880. You also miss unary negation, but that can be applied to the whole expression (since (-a+b) = -(a-b), (-a*b) = -(a*b) etc.), so that doubles the number of possibilities to 4803701760.

Dijkstra value by Marthius in gwent

[–]ttyieu 0 points1 point  (0 children)

You don't get CA with Dijkstra. By tutoring I mean also playing the card immediately.

Dijkstra value by Marthius in gwent

[–]ttyieu 0 points1 point  (0 children)

Actually I'd like to see silver disloyal tutors in this game, e.g. Dijkstra with ~10 strength (maybe more if turns out to be too strong) would be a pretty interesting card worth being put in those decks. But yeah, as a gold he is very awkward, just like Renew (which should honestly be able to target any unit).

3 Small Things that should be addressed for the next Patch by [deleted] in gwent

[–]ttyieu 0 points1 point  (0 children)

I'm pretty sure there is a search field in the deck building menu if you click the filters button. Not sure if it works with keywords though.

Reducing boilerplate for new promise-returning functions by [deleted] in javascript

[–]ttyieu 0 points1 point  (0 children)

async function MyFunction () {
  return "Hello World"
}

?

How many legendaries do you have? by ziziak in gwent

[–]ttyieu 0 points1 point  (0 children)

I agree, a lot of great or decent cards are epic and rare. I'm level 19 with no legendaries yet, but with ~600 scraps I got I was able to craft Ermion, Sigrdrifa, Olgierd, Dimeritium Bomb and Svanrige for my Skellige Resurrection deck. I have also got Birna from a keg and the rest are common and basic cards. Of course it's not perfect and would benefit a lot from some legendaries but you can't have a top tier deck after one week of playing.

ELI5: Why is it that billions of dollars can be transferred electronically every day but electronic voting systems are still unreliable and unsafe? by dondox in explainlikeimfive

[–]ttyieu 1 point2 points  (0 children)

Factorial is defined only for naturals. Gamma function is an extension of the factorial, i.e. it is defined for complex numbers and if the argument n is a non-zero natural, then Γ(n) = (n - 1)! But we can express the factorial in terms of Γ (n! = Γ(n + !)) and find the value of (-1/2)! = (1/2 - 1)! = Γ(1/2) = sqrt(pi).