This file contains hidden or 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 websocket | |
function doConnect() | |
{ | |
websocket = new WebSocket('ws://localhost:8000/') | |
websocket.onopen = function(evt) { onOpen(evt) } | |
websocket.onclose = function(evt) { onClose(evt) } | |
websocket.onmessage = function(evt) { onMessage(evt) } | |
websocket.onerror = function(evt) { onError(evt) } | |
} |
This file contains hidden or 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
from bottle import * | |
app = Bottle() | |
@app.hook('after_request') | |
def enable_cors(): | |
print("after_request hook") | |
response.headers['Access-Control-Allow-Origin'] = '*' | |
response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, OPTIONS' | |
response.headers['Access-Control-Allow-Headers'] = 'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token' |
This file contains hidden or 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
<xml id="toolbox" style="display: none"> | |
<category name="{catLogic}" colour="210"> | |
<block type="controls_if"></block> | |
<block type="logic_compare"></block> | |
<block type="logic_operation"></block> | |
<block type="logic_negate"></block> | |
<block type="logic_boolean"></block> | |
<block type="logic_null"></block> | |
<block type="logic_ternary"></block> | |
</category> |