慢慢悠悠
wwwjjq · 共 104 篇文章
1002_c
#include<stdio.h> #include<stdlib.h> #include<string.h> char telephone; char table="22233344455566670778889990"; char temp; int compare(const void arg1,const void arg2){ return strcmp((char )arg1,(char )arg2); } int main(){ int duplicates=0; int nCases; int i=0,j=0; scanf("%d",&nCases); for(i=0;i<n…
2012-10-09 21:27 · POJ · 评论(0)
C++ String: How to assign or compare strings
http://forums.codeguru.com/showthread.php?231162-C-String-How-to-assign-or-compare-strings -----推荐
2012-10-09 16:41 · 评论(0)
1000_C++
#include using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a+b<<endl; return 0; }
2012-10-04 20:52 · POJ · 评论(0)
1002_C++
#include #include #include #include<ctype.h> using namespace std; string changestr(string str); char atonum(char c); int main(){ int n; string str,cstr; map<string,int> m; map<string,int>::iterator it; cin>>n; while(n>0){ cin>>str; cstr=changestr(str); //cout<<cstr<<endl; if(m.count(cstr)>0){ //m.f…
2012-10-04 20:51 · POJ · 评论(0)
DNS(A, NS, MX, CNAME, SPF, )
Your domain name has a DNS zone which consists of the following records: NS - specifies which are the DNS servers for your domain; A - specifies IP addresses corresponding to your domain and its subdomains; MX - specifies where the emails for your domain should be delivered; CNAME - specifies redir…
2012-10-03 21:37 · 网络 · 评论(0)
运维工程师
http://www.uml.org.cn/site/201207175.asp think about it . http://g.51cto.com/linuxengineers/136390 learn it.
2012-09-29 22:23 · 评论(0)
the C++
1.In retrospect, I think the overall structure of C++ was shaped as much by general "world view" as it was shaped by the detailed computer science concepts used to form its individual parts. 2.I designed C++ to solve a problem,not to prove a point ,and it grew to serve its users.the underlying view…
2012-09-26 19:35 · 读书笔记 · 评论(0)
C++ primer
1.what is relevant ,though, was the focus on composing a software out of well-delimited modules and that the main experimental tool was a relatively large and detailed simulator I wrote for simulating software running on a distributed system. 2.the initial version of this simulator was written in S…
2012-09-26 14:39 · 读书笔记 · 评论(0)
真正认识 realloc 的工作方式。
真正认识 realloc 的工作方式。 Posted on 2008-11-20 13:12 啊夏 阅读(3563) 评论(1) 编辑 收藏 realloc 用过很多次了。无非就是将已经存在的一块内存扩大。 char* p = malloc(1024); char* q = realloc(p,2048); 现在的问题是我们应该如何处理指针 p。 刚开始按照我最直观的理解,如果就是直接将 p = NULL;。 到最后只需要释放 q的空间就可以了。 因为最近在做个封装。结果在做单元测试的时候发现。有时候我在 free(q); 的时候会出错。这样我就郁闷了。 后来仔细一跟踪,发现 realloc…
2012-09-21 22:28 · 评论(0)
mysql cookbook 读书比较1
1.MsSQL的root用户和Unix系统的用户是独立的。两者毫无瓜葛。意味着很可能密码不能,也意味着你不能通过创建你操作系统的登录帐号来创建新的MySQL帐号;而应代之为GRANT语句。 2.当连接到MySQL服务器时你所指定的参数之一就是服务器正运行其上的主机。大多数程序将主机名localhost和IP地址127.0.0.1视作‘本地机器’的同义词,但在Unix下,MySQL程序表现出了不同:依照惯例,它们特殊对待主机名localhost,这时它们会尝试使用一个Unix domain socket(**A Unix domain socket or IPC socket (inter-p…
2012-09-15 14:21 · 读书笔记 · 评论(0)
C++类的大小——sizeof()
http://blog.csdn.net/lishengwei/article/details/2416554 http://blog.csdn.net/zhange000/article/details/335516 从以上的几个例子不难发现类的大小: 1.为类的非静态成员数据的类型大小之和. 2.有编译器额外加入的成员变量的大小,用来支持语言的某些特性(如:指向虚函数的指针). 3.为了优化存取效率,进行的边缘调整. 4 与类中的构造函数,析构函数以及其他的成员函数无关.
2012-09-14 11:11 · 评论(0)
析构函数 为什么是虚的?
http://www.cnblogs.com/wangkangluo1/archive/2012/05/11/2496589.html 注: 1.析构函数其实是一个函数,不论子类还是父类,虽然可能看起来名字不一样。而且析构函数执行过程都是执行子类再到父类。 2.多态的时候一定要将析构函数写成虚函数,防止内存泄露,各个子类维护自己内部数据释放。 virtual 是实现多态的基础 它使得具体的函数跳转从编译时推迟到运行时然而构造函数的调用是编译器期间就决定的,因此它不能为虚
2012-09-14 10:39 · 评论(0)
mysql
<cycnet.blog.51cto.com/117809/812625 >----推荐 ubuntu下安装mysql 看来心浮气躁是无法解决问题了,干脆静下心来,又找到不少关于MySQL安装的介绍文章。多次尝试之后,终于在荆棘丛中觅得一条小径。。。 从http://www.mysql.com下载二进制版的Mysql安装包 //这个MYSQL是二进制版的,不用编译 chmod 755 mysql-standard-5.0.15-linux-gnu-i686-glibc23.tar.gz // tar xfz mysql-standard-5.0.15-linux-gnu-i686-glibc…
2012-09-13 17:48 · 评论(0)
今日单词
prosecute 起诉 propagate 传播 analogy 比喻 security monoculture 安全单作 thwart 阻挠 daunting 令人生畏 canary 金丝雀 incur 招致 convoluted 令人费解的 out of blue 出于蓝 underway 进行 harnessing 利用 pervasive 无处不在 contender 竞争者 foray 进军 misstep 失策 substantially 显着 terabyte TB级
2012-09-11 17:28 · 今日单词 · 评论(0)
今日单词
artifacts 文物 abelian group 交换群 negation 否定 additive inverse 加法逆 encompass 涵盖 Fractional Binary Numbers 二进制小数号码 missile 导弹 velocity 速度 significand 尾数 reduced 减少 inconsequential 无关紧要 monotonicity 单调 idiosyncrasy 特质 peculiarities 特点 diminish 减少 peculiar 奇特 subset 子集 radically 根本 arcane 晦涩难懂的 transisto…
2012-09-05 23:11 · 今日单词 · 评论(0)