Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
As matt said, it is no issue.
Probably more a suggestion than an issue.
I banged my head against this for a while, so I'll say to pay attention to "Each value should be in the range 0-255."
I'm having a problem in the submission that apparently one of my images is not similar enough, but there doesn't seem to be any difference to the naked eye. http://imgur.com/hnBJDvM. Can anyone give me any hints as to what might be going wrong?
Would prefer more spacing in the test functions and array examples; they look a little cramped. Also missing an apostrophe in the description ('Lets').
Otherwise GREAT kata with NO problems.
Hi,
I enjoyed this kata! As with others, I agree that it would be helpful to clarify that you take the 'first bit' to be the lowest bit.
Also, is much gained by having the movement bits go [positive, negative, negative, positive]? It highlights the importance of reading the spec carefully, but is a bit weird, so I'm split on the issue.
Sorry about that. I've updated the example test to use
Test.assertSimilar
rather thanTest.assertEquals
. The submission test uses a more sophisticated algorithm to check the results, rather than just comparing your result to another object.This comment is hidden because it contains spoiler information about the solution
Getting this result:
Expected: {"Mercy":["Chen"],"City":["Anderson","Eastman"],"General":["Davis","Ford"]}, instead got: {"Mercy":["Chen"],"City":["Anderson","Eastman"],"General":["Davis","Ford"]}
A problem with strings?
Hello,
Your solution isn't that weird. Actually I'd say you are on a good path!
Only one loop, no regexp, ... seems clean and efficient.
But indeed you'll likely get a "Process was terminated. It took longer than 6000ms to complete" for now, because there are a couple of bugs.
In order to fix this, I recommend you to add temporary
console.log()
to troubleshoot how far you go in the parsing.Also take the time to re-read all your code.
Let me help you with the following tip: in
newWords
andnewLines
functions, you are using String.prototoype.indexOf to look for a specific char, and then do some things according to it.That's good. Also, you are using the facultative second parameter to specify a starting index, which is really a good idea to have a fast implementation: you jump from word to word (or line to line), rather than char by char.
However, the second time you are using the indexOf, you forgot the second parameter! Therefore the second search starts from the beginning of the string.
Thus, you might end up in an infinite loop. Indeed, indexOf might return a value smaller than the current
index
, leading to infinite loop.Exemple:
It would be weise to store the indexOf result in a variable and re-use it rather than searching again a second time in the string.
Also it seems you forgot to call
this.reader.getChunk();
in the loop ;)Let we know if you're still having trouble.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Get the following error when I run the tests: "Expected: 10 9 8 7 6 5 4 3 2 1 liftoff!, instead got: 10 9 8 7 6 5 4 3 2 1 liftoff!"
Not sure what could be going on ...