Ad
  • Custom User Avatar

    For PHP I always define them as constants, because I never needed anything mutable in the preloaded section.

  • Custom User Avatar

    Also, unless you want me to write a custom assertion for this these are the best you're going to get. If I don't unbleach then the newlines get printed normally by scalatest and the most common issue people will run in to (not stripping trailing whitespace) becomes impossible to debug, since it just tells you that the two visually identical strings are different.

  • Custom User Avatar

    Why did you fork only to change nothing? All you've done is prevent me from editing the original.

  • Custom User Avatar

    Your code fails because you did not address this part --> Note: for integers larger than 9, write out the names of each digit in a single word (instead of the proper name of the number in English). For example, write 12 as "onetwo" (instead of twelve), and 999 as "nineninenine" (instead of nine hundred and ninety-nine).

    Instead, trying to access a non-existent key in a dictionary results in None

  • Default User Avatar

    Your fix is correct. Now my attempt worked. Thank you.

  • Default User Avatar

    The thing is, for example the function ToIndustrial may get a string passed as argument or an int and due to the nature of C# being strong typed, usually won't let you, what it can have is function overloads and that what I tried doing, (inspired by the rust translation), what can be done to overcome this, is to change the type of the params to the base class "object", then let the user check what data type is the object, let say, if it is an int or an string, which funny enough I actually wrote the first version of the translation like that hahaha. Then again the reason why i did it this way was based on the rust translation, and thought it was good to mimic, but given that you are the original author, I will gladly change it how you want it to be so it can avoid confusions!

  • Default User Avatar

    Oh I see what you mean, sorry I will definetly change the solution so it can be done without using Linq, it will also make it clear how can be done without it!

  • Custom User Avatar

    That's mostly random, but the longer it stays in unapprovable state, the longer it might take (because when it reaches "approvable" state, it's already burried in the kata search page).

    Done

  • Custom User Avatar

    no, it's out of specs. The task is to handle characters and spaces, that's all. It's the responsibility of the user of the function to respect its contract. Passing in anything else just results in an undefined behavior, so it's not a problem.