Ad
  • Default User Avatar

    My solution was very close to this, but yours is pretty clean! Well done!

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This is really clever solution.

  • Default User Avatar

    Risky business as non English characters like 'č', 'ř', 'ž' will break the logic. Char.IsLetter('č') returns true.

  • Default User Avatar

    It would be nice to be able to defer execution of the Kata search filter method to a new filter button on the page. When I search for Kata I almost always search by 3 conditions: specific language, progress, and the difficulty. The default behavior of the filter is to immediately execute when one of the filtering options are selected. This can be quite annoying because I have to wait for the page to reload before I can select additional options. Because I regularly filter by 3 conditions it can take 9-12 seconds before I can began looking through the filter results. You could either remove the ability of the controls to trigger the filter method (preferred) and instead defer that control to a filter button or if you are dead set against changing the current filter behavior you could alternatively create another widget below that provides that functionality. Another alternative would be to allow users to save their preferred filter configuration which you could persist in your database and then use it to set default control values when the page is loaded.

  • Custom User Avatar
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Okay so after I saw you other solution below without linq I was able to figure out what was going on but I still can't fathom how you can naturally come up with a solution like this. Is it one of those things where you were able to recognize this specific problem with converting binary to numbers or does it come from just practicing with bitwise operators?

  • Default User Avatar

    probably going to get trolled for asking but can you explain how this works? I'm having trouble understanding how the bitwise operators are being evaluated within this linq expression.

  • Default User Avatar

    well done... well done.

  • Custom User Avatar

    not if you combine that with itertools.takewhile ;p

    (but yeah, that'd become somehow a lot of boiler plate compared to the usual for loop with quick exit)

  • Custom User Avatar

    Depends on whether you want an entire list to be generated or you might only need a partial, say if you had a for loop and wanted to break out of it when you get to a specific element.
    In this case I don't believe it makes sense because you're returning the entire result anyway.

  • Default User Avatar

    I haven't been doing python long enough to know whether or not this is best pratice but I did appreciate your solution because it forced me to learn about generators.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...