Skip to content

Instantly share code, notes, and snippets.

View SeavantUUz's full-sized avatar
💭
I may be slow to respond.

AprocySanae SeavantUUz

💭
I may be slow to respond.
View GitHub Profile
<!DOCTYPE html>
<head>
<script type="text/javascript">
var evtSrc = new EventSource("/test");
evtSrc.onmessage = function(e) {
console.log(e.data);
};
function send(){
var xhr = new XMLHttpRequest();
# coding: utf-8
from tornado.ioloop import IOLoop
import tornado.web
from tornado import gen
import time
import settings as Settings
class TestHandler(tornado.web.RequestHandler):
@gen.coroutine
# coding: utf-8
__inspired__ = 'jimmyislive <https://github.com/jimmyislive/hg-pylint-commit-hook>'
__author__ = 'AprocySanae'
import os
import subprocess
from hgapi import hgapi
import re
from StringIO import StringIO
function createXHR(){
if (typeof XMLHttpRequest != "undefined"){
return new XMLHttpRequest();
}
else {
throw new Error("No XHR object available");
}
}
<div class="l-content">
<div class="pricing-tables pure-g">
<div class="pure-u-1 pure-u-md-1-4">
<button type="button" class="button-success pure-button" onclick="test_start()">启动</button>
</div>
<div class="pure-u-1 pure-u-md-1-4">
<button type="button" class="button-error pure-button" onclick="test_stop()">停止</button>
</div>
import time
from threading import Event
from queue import Queue
import threading
q1 = Queue()
q2 = Queue()
class H(object):
def __init__(self):
# coding: utf-8
__author__ = 'AprocySanae'
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def __str__(self):