(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
vagrant@homestead:~$ sudo apt-get update | |
vagrant@homestead:~$ git clone -b php7 https://github.com/phpredis/phpredis.git | |
vagrant@homestead:~$ sudo mv phpredis/ /etc/ | |
vagrant@homestead:~$ cd /etc/phpredis | |
vagrant@homestead:/etc/phpredis$ phpize | |
vagrant@homestead:/etc/phpredis$ ./configure | |
vagrant@homestead:/etc/phpredis$ make && make install | |
# Note This is an Extension You Need to Enable to Make it Work in Php 7 | |
# This First Command Will Allow You To Call PHPREDIS Facade in Browser |
/** | |
* 函数节流实现 | |
* @param {Function} fn 需要节流执行的函数 | |
* @param {[type]} interval 事件执行间隔时间,单位 ms | |
* @return {[type]} [description] | |
*/ | |
var throttle = function(fn, interval) { | |
var _self = fn, | |
timer, | |
firstTime = true; |
@mixin text-3d($color: white, $depth: 5) { | |
$shadows: (); | |
$shadow-color: $color; | |
@for $i from 1 through $depth { | |
$shadow-color: darken($shadow-color, 10%); | |
$shadows: append($shadows, 0 ($i * 1px) $shadow-color, comma); | |
} | |
color: $color; |
function getArrForAlphabet(startLetter, endLetter) { | |
//var regExp = /^[a-zA-Z]$/gi; | |
var regExp = new RegExp("^[a-zA-Z]$"); | |
if (!regExp.test(startLetter) || !regExp.test(endLetter)) { | |
//console.log(regExp.test(startLetter)); | |
//console.log(regExp.test(endLetter)); | |
console.log('请传入字母!'); | |
return false; | |
}; | |
//i是得到开始字母的数字表示,j得到结束字母的数字表示 |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<img src="base64:xxxxx" class="hack-qcode"/> | |
</body> | |
</html> |
img { | |
/* Same as first example */ | |
min-height: 50px; | |
} | |
img:before { | |
content: " "; | |
display: block; | |
position: absolute; |
// Add percentage of white to a color | |
@function tint($color, $percent){ | |
@return mix(white, $color, $percent); | |
} | |
// Add percentage of black to a color | |
@function shade($color, $percent){ | |
@return mix(black, $color, $percent); | |
} |
// 保留两位数字符 | |
const twoDigits = (num) => ('0' + num).slice(-2); |
iOS 下原生内容滚动比较卡可以给容器添加下面 CSS 属性: | |
-webkit-overflow-scrolling: touch; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.