淡水求咸

博客园已经停止更新,请移步 http://lovecjh.com/

导航

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页

2012年7月7日

mysql 学习笔记(一)

摘要: 学号:2姓名:李四年龄:23籍贯:山西学号:1姓名:张三年龄:22籍贯:北京如上情况,我们发现纸片的利用空间有浪费表格学号姓名年龄籍贯1张三22北京2李四23山西表只能删除行,不能删除列服务器 — 库 — 表 — 行(最小操作单位为行)mysql入门语句:1. 如何连接服务器 服务器地址(可用IP,域名):端口(3306) 用户名 密码 mysql –h localhost –u UerName –p PassWd 如:mysql -h localhost -u root –p Enter password:870210 或:mysql –uroot –p870210 这样写... 阅读全文

posted @ 2012-07-07 18:19 深圳彦祖 阅读(416) 评论(0) 推荐(0) 编辑

makefile学习笔记

摘要: The syntax of Makefiles(makefile的语法): makefile主要包括两个方面:1.一组依赖关系 2.规则 一个简单的makefile文件:Makefile1myapp: main.o 2.o 3.o gcc -o myapp main.o 2.o 3.omain.o: main.c a.h gcc -c main.c2.o: 2.c a.h b.h gcc -c 2.c3.o: 3.c b.h c.h gcc -o 3.c1.一组依赖关系: 依赖关系定义了最终应用程序里的每个文件 与源文件之间... 阅读全文

posted @ 2012-07-07 10:47 深圳彦祖 阅读(721) 评论(0) 推荐(1) 编辑

2012年6月27日

convert between char* and std::string

摘要: char* to std::string std::string has a constructor for this: const char *s = "Hello, world!";std::string str(s); note: Make sure thar your char* isn't NULL, or else the behavior is undefined. if you already know size of the char*, use this insteadchar* data = ...;int size = ...;std::st 阅读全文

posted @ 2012-06-27 07:46 深圳彦祖 阅读(3241) 评论(0) 推荐(0) 编辑

2012年6月26日

What is The Rule of Three?

摘要: This is a excellent article aboutdestructor, copy constructor and copy assignment operator.Original text ishttp://stackoverflow.com/questions/4172722/what-is-the-rule-of-three.IntroductionC++ treats variables of user-defined types withvalue semantics. This means that objects are implicitly copied .. 阅读全文

posted @ 2012-06-26 07:25 深圳彦祖 阅读(399) 评论(0) 推荐(0) 编辑

2012年6月23日

由谈退格键的实现来学习字符编码

摘要: 我曾以为老师的话是真的,我曾以为老师会为自己说出的话负责,但事实证明很多时候是照本宣科。 这次在公司做Fcitx输入法时,想到退格删除的字节数的不同,即退格键一按到底删除的是一个字节还是两个字节或者多个。在测试中我发现,中文汉字占了三个字节,竟然占了三个字节,老师不是经常告诉我们汉字是占两个字节,但现在怎么占了三个字节,是老师的错还是程序的错,亦或本都没错,只是没有探其根本罢了。 说汉字占两个字节是从以Unicode的编码方式UCS-2来说的,但实际占三个字节,是从Unicode的实现方式UTF-8来说的。 先介绍下Unicode字符集吧。 什么是字符?什么是字符集? 字符是各种... 阅读全文

posted @ 2012-06-23 14:56 深圳彦祖 阅读(1171) 评论(0) 推荐(0) 编辑

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页