代码改变世界

Stream_iterator 测试

2015-03-11 17:37 by sylar_liang, 166 阅读, 0 推荐, 收藏, 编辑
摘要:#include #include #include #include #include // istream_iterator 与 ostream_iterator 头文件using namespace std;// 功能:// 1.从标准输入读取所有输入文字// 2.排序// 3.将它们打印到... 阅读全文

max_element 返回值上限与下限

2015-03-11 17:36 by sylar_liang, 399 阅读, 0 推荐, 收藏, 编辑
摘要:#include #include #include using namespace std;//using namespace std::list;//using namespace std::cout;//using namespace std::endl;int main(int argc, ... 阅读全文

auto_ptr 用例1

2015-03-10 17:45 by sylar_liang, 148 阅读, 0 推荐, 收藏, 编辑
摘要:auto_ptr // 头文件 std::auto_ptr ptr1(new ClassA); // okstd::auto_ptr ptr2 = new ClassA; // error 不允许 赋值(assign)初始化方式auto_ptr赋值会导致所有权的转移auto_ptr错误运用:1.au... 阅读全文

MySql 所遇到的问题及其解决方法

2015-03-09 15:18 by sylar_liang, 1009 阅读, 0 推荐, 收藏, 编辑
摘要:1.ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)>检查mysqld状态#/etc/rc.d/init.d/mysqld status如果是关... 阅读全文

mysql 数据库接口

2015-03-09 10:57 by sylar_liang, 3114 阅读, 0 推荐, 收藏, 编辑
摘要:一般步骤是:1.调用mysql_init()初始化MYSQL结构,许多的函数执行需要这个结构体。2.调用mysql_real_connect()连接数据库,参数中涉及到数据库名,数据库登录名,数据库密码等等。3.调用mysql_real_query()执行一条Select SQL语句,通过mysql... 阅读全文

mysql数据类型

2015-03-06 11:27 by sylar_liang, 242 阅读, 0 推荐, 收藏, 编辑
摘要:1.整型tinyint(m) 一个字节 -128~127smallint(m) 2个字节 -32768~32767mediumint(m) 3个字节 -8388608~8388607int(n) 4个字节bigint(n) 8个字节如果加了unsigned,则范围值翻倍。如tinyint unsig... 阅读全文

linux执行shell脚本

2015-03-06 00:09 by sylar_liang, 214 阅读, 0 推荐, 收藏, 编辑
摘要:方法有2种:1.bash myshell.sh2.先给脚本加上可执行权限。chmod +x myshell.sh./myshell.sh 阅读全文

mysql常用命令

2015-03-06 00:07 by sylar_liang, 158 阅读, 0 推荐, 收藏, 编辑
摘要:1.mysql服务的启动和停止启动: net stop mysql停止: net start mysql卸载: sc delete MySQL2.登陆mysqlmysql -h主机名 -u用户名 -p用户密码-h:该命令用于指定客户端所要登录的MySQL主机名, 登录当前机器该参数可以省略;-u:所... 阅读全文

CentOS 安装man man-pages

2015-03-05 17:32 by sylar_liang, 491 阅读, 0 推荐, 收藏, 编辑
摘要:yum -y install man;yum -y install man-pages 阅读全文

inet_pton inet_ntop inet_aton htonl

2015-03-01 11:07 by sylar_liang, 308 阅读, 0 推荐, 收藏, 编辑
摘要:#include #include #include #include // memory zero#include #include // AF_INET#include // inet_* 头文件#include // struct sockaddr_inint main(int arg... 阅读全文
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页