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
| // 参考文章:https://www.jianshu.com/p/0a3aebd63a14 | |
| const el = document.getElementById('#container') || document.body | |
| if( getScrollTop(el) + getWindowHeight(el) >= getScrollHeight(el) ){ | |
| console.log('触发某些东西') | |
| } | |
| // y轴 | |
| function getScrollTop(el) { |
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
| const Koa = require('koa') | |
| const Router = require('koa-router'); | |
| const app = new Koa(); | |
| const router = new Router(); | |
| router.get( | |
| '/csrf', | |
| (ctx, next) => { |
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
| { | |
| "xiaohongshu.com": "小红书", | |
| "vip.com": "唯品会", | |
| "douguo.com": "豆果美食", | |
| "youshu.cc": "有书", | |
| "missfresh.cn": "每日优鲜", | |
| "qnr.io": "去哪儿", | |
| "kaola.com": "网易考拉", | |
| "waimai.meituan.com": "美团外卖", | |
| "qcs.meituan.com": "美团打车", |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>tableToExcel Demo</title> | |
| <script src="tableToExcel.js"></script> | |
| </head> | |
| <body> | |
| <h1>tableToExcel Demo</h1> | |
| <p>Exporting the W3C Example Table</p> |
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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>Transform Transitions</title> | |
| <style> | |
| body { | |
| margin: 0; | |
| } | |
| rect { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>test</title> | |
| <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> | |
| <script> | |
| var Class = (function () { | |
| var _mix = function (r, s) { |
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
| /**调试 express 源码的调试代码 */ | |
| var express = require('express') | |
| // express 初始化 | |
| var app = express() | |
| // 使用 中间件 | |
| app.use('/users', function(req, res, next) { | |
| // req.path will be the req.url with the /users prefix stripped | |
| console.log('%s', req.path); | |
| next(); |
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
| #!/usr/bin/env python | |
| # -*- coding:utf-8 -*- | |
| import itchat | |
| import re | |
| import jieba | |
| def echart_pie(friends): | |
| total = len(friends) - 1 |
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
| #coding:utf-8 | |
| import re | |
| def str2geo(string=u'114°52\'59.52"E',numType=True,decimal=5): | |
| ''' | |
| # pdb.set_trace() | |
| u'114°52\'59.52"E' | |
| 不返回 度分秒 刻读的 | |
| re.match(r'(.*)(?:[\xb0])(.*)(?:[\'])(.*)(?:[\"])([\w]?)',string) | |
| 1 2 3 4 | |
| 返回 度分秒 刻读的 |
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
| #coding:urf-8 | |
| ''' | |
| 该方式测试 没有成功 | |
| ssl 方式 | |
| ''' | |
| import email | |
| import os | |
| import email.mime.multipart | |
| from email import encoders | |
| from email.header import Header |