- 博客(21)
- 收藏
- 关注
原创 临时对象
临时对象 #include #include using namespace std; class Bar {public: Bar(const char* _name) { cout strcpy(name, _name); } Bar(const Bar& other) { cout strcpy(name, ot
2005-07-11 17:08:00
914
原创 C++中的数组和指针
C++中的数组和指针 先看两个定义(声明)int* aryp[10];int (*pary)[10]; aryp 是一个10个元素的数组,数组中元素类型为int*pary 是一个指针,是指向数组的指针,这个被指的数组的类型为 int[10]这样看pary的定义会clear一点 typdef int INT_ARY_TEN[10];INT_ARY_TEN* pary; C++是一种强类型(stron
2005-07-11 16:31:00
991
原创 令人迷惑的const和指针的组合
令人迷惑的const和指针的组合 #include using namespace std;int main() { const int ci = 1; int const ci2 = 1; const int* pci; int const* pci2; int* const cpi = 0; cout cout cout cou
2005-07-11 14:01:00
820
原创 小峰的前程规划
今天逛别人的blog, 遇到一个叫小峰的牛人.下面是他的前程规划, 我觉得很有学习和勉励意义.http://blog.joycode.com/zjf/articles/7913.aspx
2005-01-09 04:08:00
973
原创 Integrate STLport with VC6.0
环境 VC6.0+SP5, WindowsXP+SP2STLport版本 4.6.2我的vc装在 d:/bin/vc6, 将STLport解压至 d:/bin/vc6/VC98, STLport的根目录为 STLport (即把原来的版本号去掉)编辑 d:/bin/vc6/VC98/bin 下的 vcvars32.bat 文件给INCLUDE 变量 加上 %MSVCDir%/STLpo
2004-09-28 17:03:00
1444
原创 Design Patterns Explained (6) - Abstract Factory
当你有这样的类结构: A1, A2,...,An 继承于 AB1, B2,...,Bn 继承于 B...K1, K2,...,Kn 继承于 K在 Condition_i 的情况下使用 Xi, 当n>=2的时候管理将会很困难, 所以构造这样的 工厂 来负责 Condition :Cond1, Cond2,...,Condn 继承于 Cond利用 Condi, 可以产生 Ai, B
2004-09-21 10:12:00
934
原创 Design Patterns Explained (6) - Bridge
intent: Decouple an abstraction from its implementation so that the two can vary independently.Implementation here means the objects that the abstract class an its derivations use to implement thems
2004-09-18 02:46:00
939
原创 Design Patterns Explained (5) - New Perspective
New? perspective of the tranditional comceptsOject - a boundle of data and members vs. things with responsibility.Encapsulation - hiding data vs. the ability to hide anything.Inheritance - for s
2004-09-17 15:17:00
913
原创 Design Patterns Explained (4) - Adapter
intent: Convert the interface of a class into another interface that the clients expect. Adapter lets classes work together that could not otherwise because of incompatible interface.Problem: A syst
2004-09-16 12:30:00
928
原创 Design Patterns Explained (3) - Facade
Facade pronounces /f2sa:d/ "Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use."
2004-09-15 09:24:00
857
原创 Design Patterns Explained (2) - Introduction
What is Design Patterns?“A solution to a problem in a context” - Christopher AlexanderA pattern involves 4 itemsThe name of the pattern The purpose of the pattern, the probem it solves How w
2004-09-13 09:41:00
718
原创 Debian初体验 3
* 启动时运行用户程序 在Redhat和其他一些linux的发行版本中, 用户可以编辑/etc/rc.d/rc.local来 实现启动时运行程序. 但是debian中却没有这个文件, 怎么办呢 1 以root登录, 建立一个shell脚本 /etc/init.d/local 2 将启动时要执行的内容写进去, 如 #! /bin/sh /home/i
2004-09-11 02:28:00
802
原创 Class与Type的区别与联系
今天上"软件方法学", 许满武老师提问: " 类与类型有什么区别? "众座的回答皆不能令许老师满意.下课后GOOGLE了一篇文章, 是在某人的blog里头的.文章结尾署名为 徐家福居然是徐先生写的. 为表敬仰之情, 现抄录如下类和类型1: 类型的概念概念:类型刻划了一组值及其上可施行的操作,可理解为值集和操作集构成的二元组。类型的概念与值的
2004-09-09 00:29:00
2877
2
原创 Design Patterns Explained (1) - Tranditional Design
Part II? Limitations of Traditional Object-Oriented Designed作者举了一个需求的实例, 并在此需求上用OO方法给出一个设计方案.这个方案虽然使用OO方法设计的, 但还是作为反面教材给出的.在下面的章节里作者应该会给出符合Design Patterns的设计方案.这个设计方案不好的原因在于:?????? ?too much atten
2004-09-08 09:55:00
739
原创 Debian初体验
实验室有一台空机器在我旁边, 于是用knoppix光盘给她装了debian.第一件事就是设代理上网. 用mozilla设代理很简单, 还支持自动脚本.为了方便使用, 在我的winxp上装了SecureCRT, 用ssh登陆到linux.这样就不用把屁股挪来挪去了.那台机器的硬盘有40G, 我这种linux newbie是用不了这么多的.跟我的winxp共享是最好的选择.让linux与w
2004-09-08 02:15:00
929
原创 我所知道的几种分布式中间件
这学期重修分布式系统, 分布式中间件当然是要看看的, 我所知道的有以下几种(排名不分先后):1 CORBA (Common Object Request Broker Architecture) - OMG 关键字: ORB, IDL, OMG 学院派的东西, 高大全, 结构优美. 有人说很难用, 太复杂. 感觉有点曲高和寡, 是perfect world 里的东西.2 EJB
2004-09-07 01:50:00
1850
1
原创 改变优快云 BLOG Congnition皮肤下的字体大小
优快云 BLOG的皮肤, 我比较喜欢Congnition.但是总是觉得文章里的字显示得比较小, 不爽.于是把css文件当下来分析了一下, 找到了方法:在定制CSS选择器加入div.postText{ padding-right: 10px; padding-left: 3px; font-size: XXXpt; padding-bottom: 3px; p
2004-08-11 23:12:00
2429
12
原创 摘录Teach Yourself Programming in Ten Years
这篇文章教你以什么态度学习编程, 甚合我意, 文章如下Teach Yourself Programming in Ten YearsPeter NorvigResearchers (Hayes, Bloom) have shown it takes about ten years to develop expertise in any of a wide variety
2004-08-06 01:00:00
846
原创 给优快云 BLOG添加QQ天气预报的正确方法
今天想用优快云 blog写点东西, 于是装饰了一下. 发现别人的blog上有个qq的天气预报, 觉得不错. 从google上搜得一堆在blog上添加天气预报的方法, 发现他们讲的都是同一种: 就是在csdnblog能识别html的地方贴上 http://appnews.qq.com/cgi-bin/news_qq_search?city=xxx">其中xxx是想要的城市名, 如南京,就是
2004-08-05 03:53:00
2406
9
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅