`
李俊良
  • 浏览: 141217 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
直接上代码 代码里面注释很清晰 传说中的最难数组大概是在20ms左右解决 /** * 数独算法 */ class Sudoku { constructor({ display = false, sudokuMap = [] }) { // 是否展示算法过程 this.display = display; // 原始数独数组 this.sudokuMap = sudoku ...
1、动态创建video标签       如果是用jquery的$html方法或者after等方法,都会有播放延时问题       需要使用标准的createElement方法创建   2、h264播放兼容问题   3、nginx server需要安装nginx_mod_h264_streaming更好
Git Server Group-level Structures DEC 10TH, 2012 | COMMENTS If you use a small number of git, you can use the following steps to quickly deploy a git server environment. For example, as I am now the situation to two people on assignment to Qita company to do projects, but to do something that is ...
eval "local res = 0;local totalCards;local i =0; totalCards = redis.call('zrangebyscore','inTimeCost','-inf','+inf','withscores');for i,v in ipairs(totalCards) do if i%2 == 0 then res = res + v; end; end;return res;" 0  
    只需要在使用redis-cli的时候带上 redis-cli --raw即可,里面就全部都是中文了    
编辑.git/hook/pre-commit 文件   #!/usr/bin/env node var spawn = require('child_process').spawn; var grunt = spawn('grunt',['-gruntfile', ' ...
此文件是依据markdown所编写,更好效果参见本人github的文档https://github.com/jackliu2013/recipes/blob/master/doc/linux/CentOS_6.4_git服务器搭建.md##CentOS安装Git服务器 Centos 6.4 + Git 1.8.2.2 + gitosis##1.查看Linux系统服务器系统版本```    cat /etc/redhat-release   # 查看系统版本 
io.set('authorization', function (handshakeData, accept) { if (handshakeData.headers.cookie) { handshakeData.cookie = cookie.parse(handshakeData.headers.cookie); if(handshakeData.cookie && handshakeData.cookie['PHPSESSID']){ var sessionCl ...
/** super.js 用于启动js服务 保证js服务停止后自动启动 并且加入日志记录 */ var spawn = require('child_process').spawn, server = null; function startServer(){ console.log('restart server'); server = spawn('node',['/data/pushserver/js/pushserver.js','>','push.log']); console.log('node js pid is '+server.pi ...
    1.给PHP指定一个用户,修改php-fpm配置文件即可 2.给这个用户加入到免sudo登陆列表中/etc/sudoers php ALL=(ALL) NOPASSWD:ALL 3.脚本文件 sudo svn update  
var input = 10140101;//传入的参数 var count = 0; function getCount(ins){ if(ins == 0){ return count; } var ret = ins%2; var shan = Math.floor(ins/2); if(ret == 1){ count++; } return getCount(shan); } var ret = getCount(input); cons ...
  1.要求安装nginx1.3以上版本,具体安装请查询各种文档   2.nginx配置 map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream nodesocket { server 127.0.0.1:10080 fail_timeout=20s; server 127.0.0.1:10081 fail_timeout=20s; } server { ...
yum install libxml2-devel yum install freetype-devel jpeg-devel libpng-devel  yum install libmcrypt libltdl  yum install libtool-ltdl-devel yum install curl-devel yum install mysql-devel   ./configure --prefix=/usr/local/php5.3.27  --with-zlib --enable-mbstring --with-openssl --with-mysql --w ...
  现在兼容做移动版兼容 见过的比较多的是做媒体自适应 通过媒体的宽度等来处理 还有通过js来跳转 比如baidu会分为www.baidu.com和m.baidu.com 里面分的比较细致 还有一种是就是www.m12305.com这种方式   我把这三种分别说成 1. ...
美图世界
Global site tag (gtag.js) - Google Analytics