[TOC]
arrow-return-shorthand
Possible Errors(可能的错误) | |
The following rules point out potential errors in your CSS.(潜在错误) | |
Beware of box model size(当心盒模型) | |
Require properties appropriate for display (给display使用合适的属性) | |
Disallow duplicate properties(不要使用重复属性) | |
Disallow empty rules(不要使用空属性值) | |
Require use of known properties(不要使用未知属性) | |
Compatibility(兼容性) |
/* | |
* This code requires both RabbitMQ and delayed message plugin is installed. | |
* The plugin can be found here https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/ | |
* | |
* Refeence: https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq/ | |
*/ | |
'use strict'; | |
var amqp = require('amqplib'), |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title> | |
</head> | |
<body> | |
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1> | |
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p> |
'use strict'; | |
class Abstract { | |
// A static abstract method. | |
static foo() { | |
if (this === Abstract) { | |
// Error Type 2. Abstract methods can not be called directly. | |
throw new TypeError("Can not call static abstract method foo."); | |
} else if (this.foo === Abstract.foo) { | |
// Error Type 3. The child has not implemented this method. | |
throw new TypeError("Please implement static abstract method foo."); |
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
//jshint options document: [http://jshint.com/docs/options/#strict](http://jshint.com/docs/options/#strict) | |
"maxerr" : 50, // {int} 超过{int}个错误后,停止检测错误 | |
// Enforcing | |
"bitwise" : false, // true: 禁止使用位逻辑符 (&, |, ^, ...) | |
"camelcase" : false, // true: 变量名必须是驼峰风格 |
function debounce(callback, wait, immediate = false) { | |
let timeout = null | |
return function() { | |
const callNow = immediate && !timeout | |
const next = () => callback.apply(this, arguments) | |
clearTimeout(timeout) | |
timeout = setTimeout(next, wait) |
function throttle(callback, wait, immediate = false) { | |
let timeout = null | |
let initialCall = true | |
return function() { | |
const callNow = immediate && initialCall | |
const next = () => { | |
callback.apply(this, arguments) | |
timeout = null | |
} |
'use strict'; | |
class Abstract { | |
// A static abstract method. | |
static foo() { | |
if (this === Abstract) { | |
// Error Type 2. Abstract methods can not be called directly. | |
throw new TypeError("Can not call static abstract method foo."); | |
} else if (this.foo === Abstract.foo) { | |
// Error Type 3. The child has not implemented this method. | |
throw new TypeError("Please implement static abstract method foo."); |
[TOC]
arrow-return-shorthand
In order to use this script, please retrieve client id, client secret and refresh token before. About this, you can see the detail information at https://gist.github.com/tanaikech/d9674f0ead7e3320c5e3184f5d1b05cc.
This is for the simple item upload is available for items with less than 4 MB of content. The detail information is https://dev.onedrive.com/items/upload_put.htm.
var fs = require('fs');
var mime = require('mime');
var request = require('request');