This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SimpleHTTPServer | |
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def send_head(self): | |
"""Common code for GET and HEAD commands. | |
This sends the response code and MIME headers. | |
Return value is either a file object (which has to be copied | |
to the outputfile by the caller unless the command was HEAD, | |
and must be closed by the caller under all circumstances), or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var o = { | |
first: { | |
a: 1, | |
b: 2, | |
c: { | |
second: { | |
a: 1, | |
b: { | |
third: { | |
a: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var refText, encodedMessage, decodedMessage; | |
function decodeMessage(ref, key) { | |
var keyArr = key.split(''); | |
var keyArrCopy = [].concat(keyArr); | |
var dict = []; | |
var result = ''; | |
while(keyArr.length > 0) { | |
var k = keyArr.splice(0, keyArr.shift()).join(''); |