/** * Created by Mrzou on 2018/3/11. */ //实现简单的订阅与发布模式的代码块export function pattern() { let currentListeners = [] function subscribe(type, listener) { if ((typeof listener !== 'function') || (typeof listener !== 'string')) { throw new Error('参数类型错误') }
将开发过程比较常用的内容段备份一次,下边内容是关于python编写的一个简单那的WSGI PDF server 的内容. # basic_wsgi_pdf_server.py # Basic WSGI PDF server in Python. # Adapted from: from PDFWriter import PDFWriter from wsgiref.simple_server import make_server host = 'localhost' port = 8888 de
1 function request(paras){ 2 var url = location.href; 3 var paraString = url.substring(url.indexOf("?")+1,url.length).split("&"); 4 var paraObj = {} 5 for (i=0; j=paraString[i]; i++){ 6 paraObj[j.substring(0,j.indexOf("="