3 ms·
I haven't run this, but the code seems to have an error. As far as I can tell "k.size" will return 19 and you need to subtract 20 from the ASCII code to get the
by CodeMage 15y ago
I haven't run this, but the code seems to have an error. As far as I can tell "k.size" will return 19 and you need to subtract 20 from the ASCII code to get the real thing. Otherwise you would get gibberish.
EDIT: I actually went and ran the thing, just to make sure I wasn't crazy. You definitely need to change "(c - k.size)" to "(c - k.size - 1)".
- antiterra 15y agogWU`UAXYjT[ig\\eBWca looks like 20 characters to me, why would k.size return 19?
- CodeMage 15y agoBecause \\ is an escape for \.
- jorgeortiz85 15y agoBecause Java/Scala strings use \ as an escape character, so the string "\\" parses as a string with a single backslash character, not two.
- jorgeortiz85 15y agoReply to your edit: No, they meant for the string to have two backslashes, not one. Otherwise the domain is wrong.
- gojomo 15y agoIdentifying such a bug could very well be an intentional part of their filter. Was it your intent to post part of the solution for GetGush applicants to crib?
- petervandijck 15y agoNo that was just me messing up the blog post.