启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
tmux at [-t 会话名]
const Koa = require('./koa'); | |
const app = new Koa(); | |
// logger | |
app.use(async function (ctx, next) { | |
const start = new Date(); | |
await next(); | |
const ms = new Date() - start; | |
console.log(`${ctx.method} ${ctx.url} - ${ms}`); | |
}); |
/* | |
* 根据传入的数字,返回其中包含的最大的连续五位数 | |
* e.g. | |
* maxFiveDigits(283910356876) // =>91035 | |
* maxFiveDigits(123456) // => 23456 | |
*/ | |
function maxFiveDigits(num) { | |
//TODO:完成该函数 | |
} |
/** | |
* 判断类型 | |
* @module filters/is | |
* @param {Any} value - 待检测类型的对象 | |
* @param {sting} type - 类型:`array`, `object`, `boolean`, `string`, `number`, `undefined` | |
* 多个用逗号分隔 | |
* @return {Boolean} | |
*/ | |
export function is(value, types) { | |
let correct = false; |
<!-- 适应移动端start --> | |
<meta name="format-detection" content="telephone=no, email=no" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /><!-- 设置苹果工具栏颜色 --> | |
<meta name="format-detection" content="telphone=no, email=no" /><!-- 忽略页面中的数字识别为电话,忽略email --> | |
<!-- 启用360浏览器的极速模式(webkit) --> | |
<meta name="renderer" content="webkit" /> | |
<!-- 避免IE使用兼容模式 --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
class Dialog { | |
constructor(services) { | |
this.services = services; | |
} | |
init({controller, controllerAs, scope}) { | |
var { $controller } = this.services; | |
var ctrl = $controller(controller, { scope }); | |
var dialog = { |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>html5拖拽</title> | |
<style id="jsbin-css"> | |
.clearfix:before, | |
.clearfix:after{ | |
display: table; | |
content: ''; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<p id="adom">adom</p> | |
<a href="#">link</a> | |
<p class="name">name</p> |
<?php | |
$thumb_id = get_post_thumbnail_id(); | |
$thumb_url = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true);//thumbnail-size:thumbnail,medium,large,full | |
echo $thumb_url[0]; | |
?> |