- 博客(26)
- 资源 (2)
- 收藏
- 关注
原创 初入swoole 感受
几年前都看个swoole(下面简称sw)的文档,也简单学习了下,一直没有时间运用,正好现在这个新项目尝试使用,找了很多框架,不是太重就是上手难道大,就在前几天看到一个极简单的框架Simple-Swoole-Framework 框架(下面简称ssf)只有简单的路由没有复杂的配置和各种微服务,注解,能快速上手,并且可以学习sw的一些特性 正是我想要的,也和作者聊了好多,也学习了好多知识,sw和传统开发不一样,sw 是内存行的,可以用deocker 实时刷新,但是公司电脑硬盘太小就网上找了一个 热更新软件(s..
2021-03-10 09:55:32
267
原创 mysql 时间戳模糊查询
比如查询全部8月数据SELECT FROM_UNIXTIME(add_time) FROM `case_library` WHERE FROM_UNIXTIME(add_time) LIKE '%-08-%'
2019-11-26 17:24:23
1593
原创 css flex水平居中,居中显示
.head-title{ display: flex; justify-content:center; align-items:center; height:60px;}开发过程中记录下居中实现高度:必须
2019-08-14 17:27:00
12581
1
原创 element 菜单替换选中下划线样式和隐藏下划线
<el-menu :default-active="activeIndex" class="el-menu-demo" text-color='#222222' close="" active-text-color='#1f84e0' mode="horizontal" @select="handleSelect"> <el-menu-item c...
2019-08-14 17:20:55
11564
12
原创 在vue的data里面能不能new对象
答案是肯定的,可以new在script标签里面创建一个classclass H{ constructor(type,percent,showInfo,successPercent,strokeColor,successPercentstrokeColor){ this.type=type||"line"; this.percent=percent||100; ...
2019-08-02 11:21:27
3818
原创 elasticsearch(es) 使用子查询模拟sql and (or)
{ "query": { "bool": { "must": [ { "query_string": { "default_field": "case_name.keyword", "query": "*测试*" } }, { ...
2019-07-23 17:19:09
6381
2
原创 qt 判断文件编码
//>>.编码转换QString MainWindow::GetCorrectUnicode(const QByteArray &ba){ QTextCodec::ConverterState state; QTextCodec *codec = QTextCodec::codecForName("UTF-8"); QString text = c...
2019-07-13 13:17:20
5626
3
原创 elasticsearch must_not 多条件过滤使用 加上查询语句
"body": {"query": {"bool": {"must_not": [{ "match": { "subordination_area": "省"}},{ "match": {"subordination_area": "市"}}],"must": [{ "term": { "city": "成都市"}}]}}}...
2019-04-26 10:10:47
21653
1
原创 contos 安装php Swoole扩展
swoole 安装教程,Swoole可以广泛应用于互联网、移动通信、企业软件、云计算、网络游戏、物联网(IOT)、车联网、智能家居等领域。 使用PHP+Swoole作为网络通信框架,可以使企业IT研发团队的效率大大提升,更加专注于开发创新产品。
2017-04-14 16:31:47
664
转载 python 查询mysql的时候以键值对方式查询
#!/usr/bin/python# -*- coding: UTF-8 -*-import MySQLdb as msddb = msd.connect("192.168.1.51", "xsy", "xsy123", "demo")# 使用cursor()方法获取操作游标 cursorclass = msd.cursors.DictCursor 加人这个就是获取键值对cursor
2017-04-10 23:48:01
3870
转载 nginx查看配置文件是否正确 查看nginx.conf路径
转载首先执行命令找到nginx路径ps aux | grep nginx如nginx路径为/usr/local/nginx/sbin/nginxcontos 下面查看 nginx配置是否OK/usr/local/nginx/sbin/nginx -tnginx: the configuration file /usr/local/nginx/conf
2017-04-09 18:24:06
39105
转载 nginx 加入contos服务启动 service
转载于把下面的代码保存为nginx 没有后缀名的文件放在/etc/init.d/nginx 文件里面3.设置权限并启动nginx :chmod 755 /etc/init.d/nginx/etc/init.d/nginx start//添加为系统服务chkconfig –add nginx//查看服务拉几个模式开启了次服务
2017-04-09 17:58:46
341
转载 PHP快速入门第一讲 0基础学习PHP
转载1.首先在本机搭建环境本人选择的是phpStudy 集成环境,支持一键换版本,支持apache,支持nginx,支持IISphpStudy下载地址 基本的配置这个官网上也有本教程使用的是PHP5.4.45版本+apache本人的环境是安装在D:\phpStudy验证是否安装成功浏览器输入127.0.0.1 出现下面内容恭喜你环境安装成
2017-04-07 21:52:12
573
转载 php-fpm注册成服务 service
转载1.配置php-fpm.confvi /usr/local/php/etc/php-fpm.confphp-fpm.pid 目录必须指向:/usr/local/php/var/run/php-fpm.pid 2.拷贝php-fpm脚本至/etc/init.d目录cp /home/soft/php-5.3.15/sapi/fpm/i
2017-03-26 10:45:57
1290
转载 mysql 5.7 忘记root密码 修改密码
1.vi /etc/my.cnf2.在[mysqld]中添加skip-grant-tables例如:[mysqld]这句话加上表示不使用密码进入mysqlskip-grant-tablesdatadir=/var/lib/MySQLsocket=/var/lib/mysql/mysql.sock3.重启mysqlser
2017-03-26 10:31:17
430
转载 PHP遍历文件之比对文件(二)
转载来至这样写性能肯定是要差一点,保存在数据库就好点,只是保存数据库每次要去读,也是耗时的<?php/** * Created by PhpStorm. * User: Administrator * Date: 2017/3/23 * Time: 22:36 */$file_limit = ['png', 'jpg', 'gif', 'bmp', 'exe'];
2017-03-26 09:57:01
419
转载 JS获取全部表单值 JQUERY序列化表单
js获取全部表单值 jquery序列化表单括号里面可以是任意选择器$(“form”).serializeArray(); First name: Last name: 转载来至
2017-03-22 23:05:15
385
转载 PHP遍历文件之比对文件(一)
文章转载至http://www.puwei.link/2017/03/22/69.html<?php/** * Created by PhpStorm. * User: Administrator * Date: 2017/3/22 * Time: 20:07 */$file_limit = ['png', 'jpg', 'gif', 'bmp', 'exe']; //不需要
2017-03-22 23:01:53
525
转载 PHP 例出所有加载文件
转载来至 http://www.puwei.link/2017/03/19/55.html这句话在PHP想看的文件里面打印$included_files = get_included_files();foreach ($included_files as $filename) { echo “$filename\n”;}
2017-03-22 23:00:27
404
转载 Redis队列——PHP操作简单示例
php$redis = new Redis();$redis->connect('127.0.0.1',6379);while(True){ try{ $value = 'value_'.date('Y-m-d H:i:s'); $redis->LPUSH('key1',$value); sleep(rand()%3);
2016-07-02 22:02:36
236
原创 验证邮箱的正则
/^[A-Za-zd0-9]+([-_.][A-Za-zd0-9]+)*@([A-Za-zd0-9]+[-.])+[A-Za-zd]{2,5}$/
2016-01-26 12:56:06
302
转载 用到一个json输出不转义/和中文的方法
/** * 不转义中文字符和\/的 json 编码方法 * @param array $arr 待编码数组 * @return string */function json_encode_no_zh($arr){ $str = str_replace ( "\\/" , "/" , json_encode ( $arr ) ); $search = "#
2016-01-04 22:36:18
1965
转载 判断JS变量是否为空
今天刚刚用到需要一个JS判断,判断是否一个变量为空为空返回空/*** 判断是否null * @param data */functionisNull(data){ return(data == ""|| data == undefined || data == null) ? "": data;
2016-01-04 22:28:13
281
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人