Skip to content

Instantly share code, notes, and snippets.

View maolion's full-sized avatar
👋
门前大桥下 游过一群鸭 大家快来数一数 🐣🐤🐥 🦆 🎱

江宜玮 maolion

👋
门前大桥下 游过一群鸭 大家快来数一数 🐣🐤🐥 🦆 🎱
View GitHub Profile
@maolion
maolion / RegExp Patterns
Last active October 13, 2015 15:18
RegExp Patterns
//@author https://github.com/vilic
var nullLiteralRegex = /null/;
var booleanLiteralRegex = /true|false/;
var stringLiteralRegex = /(["'])(?:(?!\1|[\r\n\u2028\u2029\\])[\s\S]|\\(?:['"\\bfnrtv]|[^'"\\bfnrtv\dxu\r\n\u2028\u2029]|0|x[\da-fA-F]{2}|u[\da-fA-F]{4})|\\(?:[\r\n\u2028\u2029]|\r\n))*\1/;
var numericLiteralRegex = /(?:(?:(?:0|[1-9]\d*)(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?|0[xX][\da-fA-F]+)/;
var regexLiteralRegex = /\/(?:[^\r\n\u2028\u2029*/\[\\]|\\[^\r\n\u2028\u2029]|\[(?:[^\r\n\u2028\u2029\]\\]|\\[^\r\n\u2028\u2029])*\])(?:[^\r\n\u2028\u2029/\[\\]|\\[^\r\n\u2028\u2029]|\[(?:[^\r\n\u2028\u2029\]\\]|\\[^\r\n\u2028\u2029])*\])*\/[gimy]{0,4}/;
/***
* AKD
* ----------------------------------------------------------------------------
* <Cookie.js> - 2014/8/20
* @version 0.1
* @author Joye, maolion.j@gmail.com
* @website http://maolion.com
*/
function cookie(key, value, expires, path){
var
Utils = require("Utils.js"),
Env = require("Env.js"),
Event = require("Event.js"),
Touch = require("Touch.js")
;
function TScroll(scroller, setting) {
var _this = this;
import sys, time
import socket, threading
import hashlib, base64, struct
from libs.Event import *
class Connection(EventSource):
HANDLER_SHAKE_RESPONSE = \
"HTTP/1.1 101 Web Socket Protocol Handshake\r\n"\
"Upgrade: websocket\r\n"\
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if gt IE 8]><!--> <html xmlns="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style>
.page-wrapper .loading {
font-size: 12px;
font-style: normal;
color: rgba(255, 255, 255, 0.4);
/// @require ../libs/jQuery/jquery.easing.1.3.js
var
Utils = require("./Utils.js"),
Env = require("./Env.js"),
Event = require("./Event.js"),
own = Object.prototype.hasOwnProperty,
slice = Array.prototype.slice
;
var
Base = require("akd:base"),
Animation = require("akd:modules/Animation"),
Loading = new Base.Event
;
var animates = {};
var loading = null;
var
Base = require("akd:base"),
Animation = require("akd:modules/Animation"),
Loading = new Base.Event
;
var animates = {};
var loading = null;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="textml; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE2 {
font-size: 9pt;
}