05 2017 档案

摘要:http://www.jianshu.com/p/677287a002be 阅读全文
posted @ 2017-05-27 16:50 spectrelb 阅读(393) 评论(0) 推荐(0)
摘要:1 //lat 纬度在前(范围-90~90) 2 //lng 经度在后(范围-180~180) 3 4 select 5 id,lng,lat,jietime, 6 ROUND( 7 6378.138 * 2 * ASIN( 8 SQRT( 9 POW( 10 ... 阅读全文
posted @ 2017-05-27 16:45 spectrelb 阅读(815) 评论(0) 推荐(0)
摘要:1 2 3 4 无标题文档 5 15 16 17 18 19 20 21 本地图片: 22 远程图片: 23 24 25 26 27 28 29 1 FormName = $FormName; 16 $this->MaxSize = $maxSize; 17 ... 阅读全文
posted @ 2017-05-16 15:53 spectrelb 阅读(691) 评论(0) 推荐(1)
摘要:注意:安装该扩展不要求安装ImageMagick从http://pecl.php.net/package/imagick找到imagick的最新的版本 Linux代码 wget http://pecl.php.net/get/imagick-3.4.3.tgz tar -xzvf imagick-3 阅读全文
posted @ 2017-05-16 14:53 spectrelb 阅读(1811) 评论(0) 推荐(0)
摘要:wget https://pecl.php.net/get/mongodb-1.2.6.tgztar -zxvf mongodb-1.2.6.tgz cd mongodb-1.2.6 /usr/bin/phpize ./configure --with-php-config=/usr/bin/php 阅读全文
posted @ 2017-05-15 14:42 spectrelb 阅读(488) 评论(0) 推荐(0)
摘要:wget https://github.com/phpredis/phpredis/archive/2.2.4.tar.gztar -zxvf 2.2.4.tar.gz cd phpredis-2.2.7 # 进入 phpredis 目录 /usr/bin/phpize # php安装后的路径 ./ 阅读全文
posted @ 2017-05-15 14:40 spectrelb 阅读(405) 评论(0) 推荐(0)
摘要:下载Composer: 安装Composer: 设置全局命令: 查看是否安装与设置成功: 阅读全文
posted @ 2017-05-15 14:37 spectrelb 阅读(1105) 评论(0) 推荐(0)
摘要:想要编译安装PHP首先需要安装对应的编译工具。 Ubuntu上使用如下命令安装编译工具和依赖包: wget http://php.net/get/php-5.6.30.tar.gz tar -zxvf php-5.6.30 cd php-5.6.30 ./configure --prefix=/us 阅读全文
posted @ 2017-05-15 14:36 spectrelb 阅读(151) 评论(0) 推荐(0)
摘要:RabbitMQ PHP扩展安装 阅读全文
posted @ 2017-05-15 14:31 spectrelb 阅读(3698) 评论(1) 推荐(0)
摘要:wget http://www.openssl.org/source/openssl-1.0.1q.tar.gz tar zxvf openssl-1.0.1q cd openssl-1.0.1q ./config shared make && make install 阅读全文
posted @ 2017-05-12 19:17 spectrelb 阅读(508) 评论(0) 推荐(0)
摘要:http://www.nginx.cn/install ubuntu和debain下的apt方式安装软件很方便,特别是对于新手安装和卸载nginx。 由于nginx不能动态添加模块,所以会经常安装和卸载、升级。 apt安装nginx方法sudo apt-add-repository ppa:ngin 阅读全文
posted @ 2017-05-10 16:18 spectrelb 阅读(603) 评论(0) 推荐(0)
摘要:首先把VM设置成上面那样 在ubuntu里面安装ssh http://jingyan.baidu.com/article/ff411625b20a0512e48237b9.html 阅读全文
posted @ 2017-05-10 15:18 spectrelb 阅读(327) 评论(0) 推荐(0)
摘要:idea的下载:https://www.jetbrains.com/idea/download/#section=windows 破解链接:http://blog.csdn.net/nn_jbrs/article/details/70139178# jar包下载链接:http://pan.baidu 阅读全文
posted @ 2017-05-09 09:59 spectrelb 阅读(194) 评论(0) 推荐(0)
摘要:在config文件里面的service.yml写入自己service 在Controller里使用service 阅读全文
posted @ 2017-05-05 12:08 spectrelb 阅读(632) 评论(0) 推荐(0)
摘要:写一个基类 写一个service继承基类 在代码层调用service 阅读全文
posted @ 2017-05-04 13:57 spectrelb 阅读(569) 评论(0) 推荐(0)
摘要:https://git.oschina.net/1028125449/miaosha 阅读全文
posted @ 2017-05-04 11:37 spectrelb 阅读(329) 评论(0) 推荐(0)
摘要:写了一个mongodb的基类 增删改查 阅读全文
posted @ 2017-05-04 11:34 spectrelb 阅读(877) 评论(0) 推荐(1)
摘要:1 class AlarmController 2 { 3 const VALID = 1; //有效 4 const INVALID = 0; //无效 5 6 /** 7 * @param array $data 8 * @return bool 9 */ 10 public functi... 阅读全文
posted @ 2017-05-03 20:09 spectrelb 阅读(267) 评论(0) 推荐(0)
摘要:https://www.epochconverter.com/ 阅读全文
posted @ 2017-05-03 19:32 spectrelb 阅读(167) 评论(0) 推荐(0)
摘要:官方文档:http://php.net/manual/zh/function.call-user-func.php 工作中遇到这样的业务,会有很大switch的判断,如下: 如果以后在加很多case,那么会变得可读性很差,为了扩展于是我这样想的 这样就省略了switch case, 想要添加,只需要 阅读全文
posted @ 2017-05-03 16:50 spectrelb 阅读(264) 评论(0) 推荐(0)
摘要:http://mp.weixin.qq.com/s/hbeye307DrNI8TOxud5uRA 阅读全文
posted @ 2017-05-02 18:34 spectrelb 阅读(183) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-05-02 15:53 spectrelb 阅读(248) 评论(0) 推荐(0)
摘要:del exists 1.字符串 set,get 2.列表 lRange lRem lPush rPush 3.有序列表 zadd zrem zscore 4.hash hset hget hdel 阅读全文
posted @ 2017-05-02 14:51 spectrelb 阅读(263) 评论(0) 推荐(0)
摘要:打开phpinfo() 看php版本是ts还是nts, 如上是ts版本的,所以需要安装redis的ts版本, redis的扩展下载地址 https://pecl.php.net/package/redis,根据自己的选择,选择对应的扩展, 下载好扩展后,把php_redis.dll 文件放入到本地, 阅读全文
posted @ 2017-05-02 12:02 spectrelb 阅读(319) 评论(0) 推荐(0)
摘要:打开phpinfo() 看php版本是ts还是nts, 如上是ts版本的,所以需要安装mongodb的ts版本, mongodb的扩展下载地址 https://pecl.php.net/package/mongodb,根据自己的选择,选择对应的扩展, 下载好扩展后,把php_mongodb.dll 阅读全文
posted @ 2017-05-02 11:55 spectrelb 阅读(1042) 评论(0) 推荐(0)
摘要:crontab -e 查看并且编辑定时脚本命令 每一分钟执行一次脚本,并且写入log */1 * * * * php /var/www/api/cron/Mission/setMeetingDone.php >> /var/log/cron_log/setMeetingDone rm -rf 删除文 阅读全文
posted @ 2017-05-02 11:21 spectrelb 阅读(282) 评论(0) 推荐(0)
摘要:链接 http://www.oschina.net/question/1779564_2143393 这是去除黄线 再去除灰色线 阅读全文
posted @ 2017-05-02 11:08 spectrelb 阅读(1623) 评论(0) 推荐(0)
摘要:git config -l 查看全局 git config --global alias.co checkout window下配置全局命令 git status git add git add git commit git pull git push git log -n10 查看前10条 git 阅读全文
posted @ 2017-05-02 10:57 spectrelb 阅读(168) 评论(0) 推荐(0)
摘要:SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, cr... 阅读全文
posted @ 2017-05-02 10:50 spectrelb 阅读(1243) 评论(0) 推荐(0)
摘要:1 /** 2 * 数组形式的原生sql 3 */ 4 public function arrayA(array $did) 5 { 6 $statement = $this->getEntityManager()->getConnection()->executeQuery(' 7 SELECT did, count(1) as num 8 FROM posit... 阅读全文
posted @ 2017-05-02 10:44 spectrelb 阅读(1098) 评论(0) 推荐(0)
摘要:1 //得到当前毫秒时间戳 2 public function millStampTime() 3 { 4 list($tmp1, $tmp2) = explode(' ', microtime()); 5 return (float)sprintf('%.0f', (floatval($tmp1) + floatval($tmp2)) *... 阅读全文
posted @ 2017-05-02 10:36 spectrelb 阅读(3075) 评论(0) 推荐(0)