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
monitoring = true | |
main = -> | |
send '监控程序已上线' | |
loop | |
if not monitoring | |
send '监控程序已退出' | |
break | |
downCount = 0 |
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 axios = require('axios'); | |
const read = require('readline-sync'); | |
const program = require('commander'); | |
program | |
.version('1.0.0') | |
.option('-u, --username [username]', '设置用户名') | |
.option('-p, --password [password]', '设置密码') | |
.option('-d, --daemon [seconds]', '每隔数秒轮询网络状态,一旦退出自动重新登录', '0') | |
.parse(process.argv); |
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
/* | |
32 Combinations of CSS3 flexbox | |
Usage Example: <div flex="↖-↗~"/> (row, wrap, align=flex-start + justify=space-between) | |
<div flex="|·"> (column, center + center) | |
<p flex="!"/> (flex-grow: 1) | |
</div> | |
1. row: - (ALIGN JUSTIFY) |
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
import json, urllib | |
import tornado.web | |
import tornado.gen | |
from datetime import date, timedelta | |
from tornado.httpclient import AsyncHTTPClient, HTTPRequest | |
class NewNewHandler(tornado.web.RequestHandler): | |
@tornado.web.asynchronous | |
@tornado.gen.engine |
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
// | |
// Created by Vhyme on 2017/7/13. | |
// | |
/* Usage Example: | |
func layoutCourseData() { | |
coursePage.removeAllSubviews() | |
// 遍历课程数据 |
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
/* | |
Material Design 风格的浮动动作按钮(Floating Action Button) | |
用法: | |
<fab catchtap="someAction"/> | |
<fab class="close" catchtap="someAction"/> | |
<fab class="confirm" catchtap="someAction"/> | |
<fab class="{{ canPublish ? '' : 'hidden' }}" catchtap="someAction"/> | |
在上述几个class做动态切换时,会有动画效果。 | |
*/ | |
fab { |
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
Page({ | |
data:{ | |
curIndex: 1 // 此处可指定初始状态显示第几个页面 | |
}, | |
onSwiperChange: function(event) { | |
this.setData({ curIndex: event.detail.current }) | |
} | |
}) |
NewerOlder