* html .ie6 {property:value;}
or
.ie6 { _property:value;}
local MathUtil = {} | |
---获取两点的距离 | |
function MathUtil.GetDis(vec1, vec2) | |
local x1 = vec1.x or vec1[1] | |
local y1 = vec1.y or vec1[2] | |
local x2 = vec2.x or vec2[1] | |
local y2 = vec2.y or vec2[2] | |
local disX = x1 - x2 |
############################################################################## | |
# BASH CHEATSHEET (中文速查表) - by skywind (created on 2018/02/14) | |
# Version: 43, Last Modified: 2018/04/02 17:00 | |
# https://github.com/skywind3000/awesome-cheatsheets | |
############################################################################## | |
############################################################################## | |
# 常用快捷键(默认使用 Emacs 键位) | |
############################################################################## |
-- @author: yangfch3 | |
-- @date: 2020/09/27 15:20 | |
------------------------------------------ | |
-- Node 基类 | |
local DTNode = BaseClass("DTNode") | |
function DTNode:ctor() end | |
function DTNode:Eval(decisionTree, context) end | |
function DTNode:SetChildren() | |
assert(false) |
--[[ | |
A simple HTTP server | |
If a request is not a HEAD method, then reply with "Hello world!" | |
Usage: lua examples/server_hello.lua [<port>] | |
]] | |
local MyLog = require "AIServer/MyLog" | |
local http_server = require "http.server" | |
local http_headers = require "http.headers" | |
local json = require "3rds/json" |
from argparse import Namespace | |
import traceback | |
import json | |
import urllib | |
import simp_http_serv_helper as helper | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import json | |
import os | |
import sys | |
import time | |
import base64 | |
from subprocess import DEVNULL, STDOUT, Popen, PIPE | |
import merge_data | |
conf_file = "run.conf.json" |
function BaseClass(classname, super) | |
local cls | |
if super then | |
cls = {} | |
setmetatable(cls, {__index = super}) | |
cls.super = super | |
else | |
cls = {ctor = function() end} | |
end |
{ | |
// 继承,可以继承多个 | |
// 如安装了 eslint-config-airbnb | |
// 就可以在 extends 这里引用 airbnb/base, 这样就相当于预设了 airbnb/base 的规则 | |
// 常用的预设:"eslint:recommended" "airbnb/base" "stanard"(需先安装 eslint-config-standard) | |
// 当然,除了 eslint-config-xxx 提供了一系列预设,插件(eslint-plugin-xxx)也能提供预设用于继承 | |
// 例如,当你安装了 eslint-plugin-react 时,就可以在 extends 这里指定 "plugin:react/recommended" | |
// 当然,也可以指定一个具体的 eslint 配置文件 path/to/file 继承 | |
"extends": [ | |
"airbnb/base" |
module.exports = { | |
env: { | |
browser: true, | |
commonjs: true, | |
es6: true, | |
node: true, | |
}, | |
extends: ['eslint:recommended'], | |
globals: { | |
Atomics: 'readonly', |