`
hn67
  • 浏览: 78483 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
在c++开发过程中,我们可能会用到mysql数据库,这边我简单写了一个类似PHP封装的mysql类,希望能帮助像我这样的C++初学者。 首先我们要安装mysql c++ 库下载地址 http://dev.mysql.com/downloads/connector/cpp/ 我的环境是centos5.5 安装完毕后 看代码:     #include "mysql_connection.h" #include <cppconn/driver.h> #include <cppconn/exception.h> #include < ...
刚接触C++ 不久 ,就要用到这个redis ,在各种好人的帮助下终于摸索出了个样本,贴上来给像我这样的新手使用。 1.首先安装完毕redis 2.安装boost 库 3.开发包下载地址: redis-cplusplus-client 4.上代码     #include "rediscli ...
The following article shows how to useredisto build a simple multi-producer, multi-consumer Queue with an interface similar to thepython standardlib queue. With this queue you can easily share data between multiple processes or offload time consumig calculations to multiple worker processes. T ...
netstat命令的功能是显示网络连接、路由表和网络接口的信息,可以让用户得知有哪些网络连接正在运作。在日常工作中,我们最常用的也就两个参数,即netstat –an,如下所示: [root@tiaobanji ~]# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:50020 ...
一、PHP加速器介绍 PHP加速器是一个为了提高PHP执行效率,从而缓存起PHP的操作码,这样PHP后面执行就不用解析转换了,可以直接调用PHP操作码,这样速度上就提高了不少。 Apache中使用mod_php的请求、响应执行流程: 1、 ...
最近在看SNMP++相关的文档,在网上找到得相关信息都零零散散。经过摸索后,将我实现的步骤与大家一起分享下,希望能帮助初学者少走歪路。 1、在线获取安装包 http://www.agentpp.com/snmp_pp3_x/download_snmp_ppv3/download_snmp_ppv3.html可以下载libdes以及snmp++的安装包。 2、解压 tar -zxvf libdes-l-4.01a.tar.gz tar -zxvf snmp++v3.2.25.tar.gz 获得文件夹libdes和snmp++。 3、编译所需lib文件并且拷贝至 ...
在做下面动作之前我的subversion 已经安装完毕,网上有很多关于这方面的教程我就不说了,我也是参考网上教程弄的,你们自己查吧。 安装方法如下,挨个命令执行不出意外就能完事 [root@server ~]# wget http://gforge.org/download/install-gforge-as-571-src.zip [root@server ~]# unzip install-gforge-as-571-src.zip [root@server ~]# cd gforge-as-571-src [root@server gforge-as-571-src] yum ...
I would like to share with you the simple step to fix below error when trying to start or configuring the postgresql database. This was tested on CentOS 5.5 x86_64 bit. Symptoms: ERROR : Could not find tsearch2.sql file Solution/Fix: yum install postgresql-contrib
建站过程中有时候我们需要做这些设置 1.访问www 直接重定向到没有www上或者反过来,那么怎么通过.htaccess文件来实现呢。 1.首先服务器要支持Rewrite重写 2.创建.htaccess文件 当然如果你不知道个文件是做什么的你可以查看http://httpd.apache.org/docs/1.3/howto/htaccess.html 那我们开始吧,在文件的顶部我们要写如下代码: RewriteEngine On Options +FollowSymLinks 1. 如果你想将所有没有www的页面重定向到有www的上面你们复制下面的代码到.htaccess文件 ...
单件模式是我们在开发中经常用到的一种设计模式,利用PHP5面向对象的特性,我们可以很容易的构建单件模式的应用,下面是单件模式在PHP中的几种实现方法: class Stat{ static $instance = NULL; static function getInstance(){ if(self::$instance == NULL){ self::$instance = new Stat(); } return self::$instance; } ...
在PHP实际开发中很多时候我们都会用到 file_get_contents 这个 函数来获取远程页面返回的内容 ,但是如果远程响应时间很慢的话 ,file_get_contents() 就会一直卡在那儿,不会超时,这时候我们有时候会发现Web服务的 Linux 服务器,突然系统负载上升,使用 top 命令查看,很多 php-cgi 进程 CPU 使用率接近100%。   我们知道,在 php.ini 中,有一个参数 max_execution_time 可以设置 PHP 脚本的最大执行时间,但是,在 php-cgi(php-fpm) 中,该参数不会起效。真正能够控制 PHP 脚本最大执行 ...
1.作用 使用crontab命令可以修改crontab配置文件,然后该配置由cron公用程序在适当的时间执行,该命令使用权限是所有用户。 2.格式 crontab [-u user] {-l | -r | -e} 3.主要参数 -e:执行文字编辑器来设定时程表,内空的文字编辑器是vi ...
文章来源:http://sjolzy.cn/PHP-Using-Curl--socket--file-get-contents-POST-data.html <?php /** *Socket版本 * 使用方法: * $post_string = "app=socket&version=beta"; * request_by_socket('facebook.cn','/restServer.php',$post_string); */ function request_by_socket($remote_server,$rem ...
在shell中,字符串转换为时间戳可以这样做:   date -d "2010-10-18 00:00:00" +%s 输出形如: 1287331200 其中,-d参数表示显示指定的字符串所表示的时间,+%s表示输出时间戳。 而时间戳转换为字符串可以这样做: date -d @1287331200 输出形如: Mon Oct 18 00:00:00 CST 2010 文章来源:http://www.codelast.com/
Installing the SSH2 PHP extension on CentOS is actually pretty simple. Although it isn’t available as a straight yum install, it boils down to a few short steps. Firstly, we’re going to install the dependencies:   yum install gcc php-devel php-pear libssh2 libssh2-devel   These will allow us to ...
Global site tag (gtag.js) - Google Analytics