2012年4月16日
摘要: 参考了网上的各种资料,终于搭起来了1.最重要的东西,C++必要工具,安装的是GCC工具链,Make等一系列开发工具:sudo apt-get install build-essential2.安装Eclipsesudo apt-get install eclipsesudo apt-get install eclipse-pdesudo apt-get install eclipse-jdt3.打开Eclipse,打开Help->Install New Software,然后点击Add按钮,在弹出的对话框中Name项填入CDTLocation项填入http://download.ecli 阅读全文
posted @ 2012-04-16 00:09 渊蓝之蓝 阅读(11411) 评论(1) 推荐(1) 编辑
  2012年4月13日
摘要: 中国有句古话"再一再二不能再三再四",看来Blizzard也深得此话的精髓,如果说两个不同的字符串经过一个哈希算法得到的入口点一致有可能,但用三个不同的哈希算法算出的入口点都一致,那几乎可以肯定是不可能的事了,这个几率是1:18889465931478580854784,大概是10的 22.3次方分之一,对一个游戏程序来说足够安全了。 1 /*********************************StringHash.h*********************************/ 2 3 #pragma once 4 5 #define MAXTABLEL 阅读全文
posted @ 2012-04-13 01:02 渊蓝之蓝 阅读(6789) 评论(0) 推荐(0) 编辑
  2012年3月7日
摘要: 在《Python基础教程》的第198页上看到这样一句:re.sub(emphasis_pattern, r'<em>\1</em>', 'Hello, *world*!')其中:emphasis_pattern = r'\*([^\*]+)\*'结果为:'Hello, <em>world</em>!'对emphasis_pattern = r'\*([^\*]+)\*'头尾的\*取消了元字符*,即只是作为普通字符中间的()是一个子模式,字符串中与其匹配的子字符串可以用 阅读全文
posted @ 2012-03-07 01:25 渊蓝之蓝 阅读(589) 评论(0) 推荐(0) 编辑
  2012年2月27日
摘要: 1.在/etc/apache2/site-available/中增加配置文件文件,可以将default拷贝后修改,如blogs:<VirtualHost *自定义端口># 在ServerName后加上你的网站名称ServerNamewww.linyupark.com# 如果你想多个网站名称都取得相同的网站,可以加在ServerAlias后加上其他网站别名。# 别名间以空格隔开。ServerAlias ftp.linyupark.com mail.linyupark.com# 在ServerAdmin后加上网站管理员的电邮地址,方便别人有问题是可以联络网站管理员。ServerAdmi 阅读全文
posted @ 2012-02-27 20:03 渊蓝之蓝 阅读(1704) 评论(0) 推荐(0) 编辑
  2012年2月25日
摘要: 在sudoers里加上# Set default EDITOR to vim, but allow visudo to use EDITOR/VISUAL.Defaults editor=/usr/bin/vim, env_editor 阅读全文
posted @ 2012-02-25 23:57 渊蓝之蓝 阅读(2423) 评论(1) 推荐(1) 编辑
摘要: 修改默认主页:输入这个命令 grep -iR DirectoryIndex /etc/apache2查看 DirectoryIndex 在apache2哪个文件里面。我的就是 这样的/etc/apache2/mods-enabled/dir.conf: DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm/etc/apache2/mods-available/dir.conf: DirectoryIndex index.html index.cgi index.pl index.php inde 阅读全文
posted @ 2012-02-25 20:02 渊蓝之蓝 阅读(4865) 评论(0) 推荐(0) 编辑
摘要: 在Windows下,Apache的配置文件通常只有一个,就是httpd.conf。但我在Ubuntu Linux上用apt-get install apache2命令安装了Apache2后,竟然发现它的httpd.conf(位于/etc/apache2目录)是空的!进而发现Ubuntu的 Apache软件包的配置文件并不像Windows的那样简单,它把各个设置项分在了不同的配置文件中,看起来复杂,但仔细想想设计得确实很合理。严格地说,Ubuntu的Apache(或者应该说Linux下的Apache?我不清楚其他发行版的apache软件包)的配置文件是 /etc/apache2/apache2. 阅读全文
posted @ 2012-02-25 19:46 渊蓝之蓝 阅读(63753) 评论(0) 推荐(0) 编辑
摘要: 错误:[warn] NameVirtualHost *:80 has no VirtualHosts原因:定义了多个NameVirtualHost解决:Ubuntu之前的版本定义在/etc/apache2/sites-available/default, 8.04后在/etc/apache2/ports.conf故可以将/etc/apache2/ports.conf中的NameVirtualHost *:80注释掉这个问题的本质是在没有定义域名是一个端口只能对应一个虚拟主机,将NameVirtualHost *:80改为其他端口也可以解决如果有多个不同的域名的话,用同样的端口也可以 阅读全文
posted @ 2012-02-25 19:01 渊蓝之蓝 阅读(16354) 评论(0) 推荐(0) 编辑
摘要: 希望用户能够以http://X.X.X.X/~username方式来访问自己的网页,我参考了以下两个链接,做一个总结:1.http://www.zyxware.com/articles/2008/06/11/installing-and-configuring-apache-php-mysql-and-drupal-on-ubuntu#comment-5479这篇文章介绍修改apache2.conf和httpd.conf,1)apache2.conf中加入:<IfModule mod_userdir.c>UserDir public_htmlUserDir disabled roo 阅读全文
posted @ 2012-02-25 15:53 渊蓝之蓝 阅读(2587) 评论(1) 推荐(0) 编辑
  2012年2月23日
摘要: 1. 安装mysqlsudo apt-get install mysql-server中间需要输入mysql的管理员密码2. 安装apache 2.0sudo apt-get install apache23. 安装配置php5sudo apt-get install php5sudo apt-get install libapache2-mod-php5sudo apt-get install php5-gdsudo apt-get install php5-mysql4. 安装phpmyadminsudo apt-get install phpmyadmin中间需要输入mysql的管理员密 阅读全文
posted @ 2012-02-23 01:59 渊蓝之蓝 阅读(351) 评论(0) 推荐(0) 编辑