`
yuanyu5237
  • 浏览: 159337 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
  #include <iostream> #include <cmath> #include <cstdlib> #include <cstring> using namespace std; int main() { char tuna[6] = {'b', 'u', 'c', 'k', 'y', '\0'}; cout << tuna << endl; char bacon[] = "bacon mmmm good"; cout << ...

C++教程60 类模板

    #include <iostream> using namespace std; template <class T> class Bucky{ T first, second; public: Bucky(T a, T b) { first = a; second = b; } T bigger(); }; template <class T> T Bucky<T>::bigger() { return (first>second?first:second); } ...
  #include <iostream> using namespace std; template <class FIRST, class SECOND> FIRST smaller(FIRST a, SECOND b) { return (a<b?a:b); } int main(){ int x = 89; double y = 56.78; cout << smaller(x, y) << endl; }        
0.1.0  source code: http://hg.nginx.org/nginx/rev/551102312e19  http://hg.nginx.org/nginx/tags  内存池: http://www.alidata.org/archives/1390 http://blog.chinaunix.net/uid-24830931-id-3764858.html http://blog.csdn.net/v_july_v/article/details/7040425 http://blog.chinaunix.net/uid-24517549-id-403 ...
最近用nginx+node.js+mangodb+forever搭建了一个精准问答网站:jingzh.com 大致的思路:用群体智慧实现答案的精准性,通过大众的力量来把一个问题的答案改进得越来越精确和实用,后人不断修正前人的观点,最初主要在程序员之间传播,不打算广泛的推广和运营,具体实现如下 1. 用户无需登录,任何人可以提问,任何人可以回答。 2. 问题发布后不能编辑,每个IP每天最多发布3个问题。 3. 每个问题的答案可以无限编辑,但每个IP每天只能编辑10次答案。 4. 只显示每个问题的最新答案,要查看答案修改历史,需要点击答案历史链接。 5. 每个问题都有标签,用户可以根 ...
0.7.69 configure文件源码 #!/bin/sh # Copyright (C) Igor Sysoev . auto/options . auto/init . auto/sources test -d $NGX_OBJS || mkdir $NGX_OBJS echo > $NGX_AUTO_HEADERS_H echo > $NGX_AUTOCONF_ERR echo "#define NGX_CONFIGURE \"$NGX_CONFIGURE\"" > $NGX_AUTO ...

nutch和solr安装

vmware7+ubuntu12.04 1,下载文件nutch1.5http://mirror.bjtu.edu.cn/apache/nutch/1.5/                   solr3.6:http://mirror.bjtu.edu.cn/apache/lucene/solr/3.6.0/ 2,解压,bin/nutch需要添加可执行权限,执行后显示 Usage: nutch [-core] COMMAND 3,配置nutch: conf/nutch-site.xml   创建文件夹urls,假如文件seed.txt,在文件内加入要爬取的网站:http://www ...

hadoop及mahout安装

 
环境:虚拟机vmware7+ubuntu12.04 1,先下载需要的文件:      【注意】:版本问题很重要      jdk,eclipse,maven      hadoop:http://mirror.bjtu.edu.cn/apache/hadoop/common/hadoop-1.0.3/ 我其实先下载了0.2.0      mahout:http://labs.renren.com/apache-mirror/mahout/0.7/ 2,安装jdk,下载的rpm包,需要安装alien,然后用alien把rpm转换成deb,再使用dpkg安装 3,eclipse解压, ...

内存拷贝函数

见下图  
学习 /* Linux 2.6 x86_64 only*/ #include <pthread.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <arpa/inet.h> #include <sys/epoll.h> #include <sys/errno.h> #incl ...

简单epoll服务器

  学习 #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/wait.h> #include <unistd.h> #include <arpa/inet.h> #include ...

一个多进程框架

从别处找来的,记一下,学习~ /*============================================================================= # # Description: 多进程的一个框架,大家可以直接使用,已经经过功能测试和压力测试。 # 编译:g++ forkwork_use.cpp -o forkwork_use # =============================================================================*/ #include <io ...
我使用securecrt远程到服务器上,想从这台服务器访问另外一台机器上的oracle。用的是redhat,64位机器。服务器上的oracle版本11.2。 1,先下载软件,http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html 因为我既想用sqlplus访问,又想写php程序访问,所以下载了: oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm  oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_6 ...
1,很多时候如果不在html页面顶部添加dtd,就会出现很多奇怪的问题,典型的是IE中的文字和内容无法居中,具体dtd详解请参见:http://www.w3school.com.cn/tags/tag_doctype.asp 2,IE中margin浮动产生双倍距离:此时使用display:inline 3,IE中字体可无限小,但chrome最小为12px,所以为了兼容,最好字体大于等于12px 4,IE中没有min-width,有时候为了使容器的大小固定,可以同时设置3个属性,width,min-width,max-width相等 5,文字换行,一般可word-wrap:break-wo ...
我在使用easyPHP的时候,连mysql连不上,报错  写道 mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication   原因应该是密码长度或者格式不对,解决办法:   SET old_passwords = 0; UPDATE mysql.user SET Password = PASSWORD('testpass') WHERE User = 'testuser' limit 1; SELECT LENGTH(Password) FROM mysql.user WH ...
Global site tag (gtag.js) - Google Analytics