- 博客(11)
- 资源 (17)
- 收藏
- 关注
原创 nginx 访问php出现connect() failed (111: Connection refused) while connecting to upstream
原因:php-fpm可能没有启动解决办法:service php-fpm start
2018-05-28 17:46:16 1538
原创 使用ajax 进行post提交json数据到后台php,但是后台php收不到数据。
当 contentType 为 application/x-www-form-urlencoded 时(默认值)才能用 $_POST 得到传入的数据。但是使用application/json;charset=utf-8不是 php 所能识别的类型声明,不能替你解析。所以只能用 php://input 取得,并用 parse_str 自行解析而形如 a=1&b=2&c=3 这样的数据...
2018-05-28 11:48:34 8700 1
转载 pymysql中connections.py编码设置导致中文显示乱码
问题:最近python连接mysql查数据时老是显示为乱码,检查了mysql的配置,没有问题,通过直接查询也没有出现乱码。解决方法:修改python的pymysql的配置文件connections.py,将DEFAULT_CHARSET从latin1改为utf8...
2018-05-23 19:33:49 427
原创 实现定时任务crontab以秒为单位运行。。
#!/bin/bash step=2 #间隔的秒数,不能大于60 for (( i = 0; i < 60; i=(i+step) )); do $(php '/home/fdipzone/php/crontab/tolog.php') sleep $step done exit 0 加入crontab -e * * * * *...
2018-05-23 19:33:10 584
原创 cron: can’t lock /var/run/crond.pid, otherpid may be 2699: Resource temporarily unavailable
解决方案:rm-rf/var/run/crond.pid重启即可重新加载处理方法:/etc/init.d/cron reload重启服务处理方法:/etc/init.d/cron restart
2018-05-23 19:31:08 11336 2
原创 QT QMessageBox::warning显示中文字符串变量
试了网上好多方法,最后没有一个成功的。。。。最后还是被我弄出来了。char str[255];string name = "是否要删除用户:" +ui->name->text().toStdString()+ "所有信息?"; //这里ui->name->text().toStdString()是将name控件上的QString内容转换成std::string格式strc...
2018-05-23 16:56:39 2642
原创 QT界面切换出现闪烁现象
解决方法:在界面hide和show之间添加一定的延时:#include<QTime>QTime dieTime = QTime::currentTime().addMSecs(10);//延时10毫秒while (QTime::currentTime() < dieTime) QCoreApplication::processEvents(QEventLoop::AllEven...
2018-05-23 14:43:18 7623 4
原创 c++多线程之单个生产者:多个消费者
const int NUM = 50;bool ready = false;struct DATA{ int num;};struct node { DATA data[NUM]; // 定义一个大小为10的缓冲区 int tail; int front; int count; //记录队列长度 condition_variable is_not_full; condi...
2018-05-17 15:07:24 3767
原创 C++多线程,单个消费者对单个生产者模型
#include<iostream>#include<thread>#include<string>#include<mutex>#include<deque>#include<condition_variable>#include <windows.h>using namespace std;co
2018-05-17 13:17:33 1039
转载 linux制作一个回收站,防止误删文件。
1.在自己家目录下创建一个.trash隐藏的文件夹2.写一个脚本remove.sh如下:trash_dir='/home/***/.trash' #设置回收站文件夹for i in $*; #对输入文件进行一个遍历 do stamp=`date +%s` filename=`basename $i` #以字符串的形式返回文件名 mv $i $trasd_dir/$filename...
2018-05-13 15:41:11 680
tensorflow inception_v1
2018-04-21
opencv_contrib_python-3.4.0.12-cp35-cp35m-win_amd64
2018-04-14
mysql,connect-c++(适用vs2017 release-x86)
2018-03-31
kk录像机2.6.1.7破解版
2018-02-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人