Many thanks!

• ###### rafalk42commented on "int32 to IPv4" cpp solution

I'm assuming you're asking about the left bit (aka binary) shift operators <<

It can be confusing at first, because the same operator is overloaded by e.g. stringstream to append things to the stream.
But originally the << and >> operators shift bits in an integer. Combined with & (and) operation, it is used here to extract 8 bit parts of the original 32 bit number.

Given an `uint32_t` variable `ip`, you can extract four 8 bit chunks like that:

``````uint8_t a = ip >> 24; // basically discard rightmost 24 bits and we're left with the leftmost 8 bits
uint8_t b = (ip >> 16) & 0xFF; // get rid of 16 rightmost bits, and use & to mask out the 8 leftmost bits
uint8_t c = (ip >> 8) & 0xFF; // as above, but we discard 8 rightmost bits
uint8_t d = ip & 0xFF; // no bit shifts - the bits are in the right place, we just need to get rid of leftmost 24 bits by masking them
``````

To reverse it:

``````ip = (a << 24) + (b << 16) + (c << 8) + d;
``````

Hope that helps :)

• ###### Grec88commented on "int32 to IPv4" cpp solution

Please, help me understand how this code works. If it possible give me a tip about how to google a theory about it.

• ###### dinglemouseresolved a suggestion on "Ping Pong" kata

Approved. Thanks!

Approved!

• ###### Welpycreated a suggestion for "Ping Pong" kata

Javascript translation added. Please review and approve.

• ###### Welpycommented on "Timmy goes to college" kata

I'm sorry, Ciprian Amza, I didn't see your changes while editing it myself. Maybe we should keep your more detailed explanation.

• ###### Welpycommented on "Timmy goes to college" kata

Changed description in following sentences:

(N.E. does not count either as failed student or as participant at all)

and

The best number grade from all the participants to 1 decimal place (check above)

• ###### Welpycommented on "Timmy goes to college" kata

After the apparently not so smart decision of approving a kata whose author has been inactive for some months, I tried to clarify the description regarding the open issues.

In this case I changed the first rule of error reporting to:

1. First check if the list is in the correct format (e.g. number grades corresponding to the pattern #.#), if not return this error: Error Message = "Invalid list"
• ###### stevemartisresolved an issue on "Probation Officer - Restitution Arrearage Calculator" kata

Thank you very much for your help. I have updated the reference solution with proper formatting. You should no longer get that warning. I tested with your solution and my solution. Neither produced a warning, and both passed all tests. Thanks for testing my kata, and providing valuable feedback.

• ###### Welpycreated an issue for "Probation Officer - Restitution Arrearage Calculator" kata

Interesting kata. However, your reference solution gives following warning in stderr:

``````Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
``````

Maybe you could change the way of parsing `sentenceDate`.

• ###### Welpycommented on "Ring container" kata

How about just changing the description to include those in real life maybe even more efficient solutions, too? @balygaby

• ###### Welpyresolved an issue on "Ring container" kata

I changed the tests to report

``````Expected std::exception. No exception was thrown.
``````
• ###### Welpycommented on "Dating with hypergamy" kata

Yeah, I realized it afterwards too. However, learned some new things tonight, not only about JS's intricacies. Thank you!

• ###### Welpycommented on "Dating with hypergamy" kata

I tried to improve balygaby's reference solution and test cases in this regard. Please check.