2010年5月5日

Java 设计模式

摘要: 1. Bridge --- JDBC 驱动程序 JDBC就是用于执行SQL语句的应用编程接口,JDBC驱动程序就是实现该接口的类;数据库应用程序就是对数据库操作的抽象,它依赖于JDBC驱动程序;只要提供JDBC驱动程序,数据库应用程序就可以操作任何数据库。JDBC的这种架构将抽象与具体实现相分离,使得数据库应用程序和JDBC驱动程序能够独立地发展。 2. FactoryMethod 图1是Fa... 阅读全文

posted @ 2010-05-05 16:51 good_hans 阅读(274) 评论(0) 推荐(0) 编辑

2010年4月18日

Linux C ---getchar() putchar() gets() scanf()

摘要: 1. getchar : 从键盘读入字符(注意不是字符串) 2. putchar :在屏幕上显示字符(注意不是字符串) #include <stdio.h> void main() { int l; do { l=getchar(); putchar(l); } while (l!='\n'); } 3. gets从键盘读入字符串 #include <... 阅读全文

posted @ 2010-04-18 15:40 good_hans 阅读(2950) 评论(0) 推荐(0) 编辑

2010年4月16日

Fedora 9 安装 libcurl、libxml、libxslt

摘要: curl网址:http://curl.haxx.se/wget http://www.execve.net/curl/curl-7.19.0.tar.gzlibxml2wget http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.30.tar.gzlibxsltwget http://ftp.gnome.org/pub/GN... 阅读全文

posted @ 2010-04-16 17:41 good_hans 阅读(2058) 评论(0) 推荐(0) 编辑

Linux下的c程序---数组、malloc

摘要: #include <stdio.h> #include <stdlib.h> struct flex { int count; double average; double scores[]; // 定义可伸缩的数组 }; // 声明结构体 void showFlex(const struct flex * p); //定义函数 int main(void) {... 阅读全文

posted @ 2010-04-16 16:46 good_hans 阅读(326) 评论(0) 推荐(0) 编辑

2010年4月7日

Linux下的c程序---数组、malloc

摘要: #include <stdio.h>#include <stdlib.h> struct flex{ int count; double average; double scores[]; // 定义可伸缩的数组}; // 声明结构体 void showFlex(const struct flex * p); //定义函数 int main(void){ struct... 阅读全文

posted @ 2010-04-07 22:06 good_hans 阅读(1103) 评论(0) 推荐(1) 编辑

Linux下的c程序---enum、switch、strcmp

摘要: 最近开始学习Linux下c的程序设计,根据自己的学习过程,将要发一系列的文章和大家一起讨论。 #include <stdio.h>#include <string.h> // for strcmp()#include <stdbool.h> // C99 feature enum spectrum {red, orange, yellow, green, b... 阅读全文

posted @ 2010-04-07 21:22 good_hans 阅读(3070) 评论(0) 推荐(0) 编辑

2010年4月2日

Tomcat appBase 和 docBase 的疑惑

摘要: 今天整整搞了一个下午,ubuntu下的tomcat,由于没有深入分析过tomcat/conf/server.xml,遇到很多问题。 一开始总是把appBase配置成应用程序的路径,结果反复的修改别处,也没搞定,突然想起docBase,然后在 appBase 下面加了一行docBase,把路径配置到docBase中,把appBase为空,就OK了 <Host name="localhos... 阅读全文

posted @ 2010-04-02 20:54 good_hans 阅读(8866) 评论(0) 推荐(0) 编辑

Linux 命令平时积累

摘要: 我是Windows Live Writer 写博客,来记录我平时遇到的一些问题和解决的方法。 记得刚刚接触Linux的时候,自己真是一名不折不扣的菜鸟,通过一年的努力,自己可以单独操作Linux了,我将把以后遇到的比较有用的命令积累在这篇博客上。 1. Fedora 版Linux ifconfig /sbin/ipconfig 2. 设置tomcat,系统启动,同时tomcat也启来 ech... 阅读全文

posted @ 2010-04-02 10:42 good_hans 阅读(400) 评论(0) 推荐(0) 编辑

2010年4月1日

Win7 配置Apache+PHP+Mysql环境

摘要: 在学新技术时,配置环境真是个郁闷的事情,很难熬,不过还好网上有很多弟兄的无私奉献对我很有帮助。 第一、安装并配置APACHE(安装到D:\phpapache\Apache2.2) 1、安装时默认安装,Network Domain, Server Name 我填写我的计算机名,Administrator's Email Address区域填你的邮件地址 2、安装完后在安装目录下有个conf文件夹,... 阅读全文

posted @ 2010-04-01 10:58 good_hans 阅读(65422) 评论(3) 推荐(4) 编辑

2010年3月29日

Mysql 远程登录及常用命令

摘要: 第一招、mysql服务的启动和停止 net stop mysql net start mysql 第二招、登陆mysql 语法如下: mysql -u用户名 -p用户密码 键入命令mysql -uroot -p, 回车后提示你输入密码,输入12345,然后回车即可进入到mysql中了,mysql的提示符是: mysql> 注意,如果是连接到另外的机器上,则需要加入一个参数-h机器IP ... 阅读全文

posted @ 2010-03-29 22:09 good_hans 阅读(143738) 评论(0) 推荐(0) 编辑

导航