Oct 27
在Google上查了很多东西,综合一下,加上自己的经验,写一篇完整的,恩。

1. 安装输入法和输入法切换程序
sudo apt-get install im-switch fcitx

2. 切换输入法
sudo im-switch -s fcitx -z default
im-switch -s fcitx -z

3. 禁用scim
sudo gedit /usr/lib/gtk-2.0/2.10.0/immodule-files.d/scim-gtk2-immodule.immodules
内容一般是
引用
# automatically generated by dh_gtkmodules, do not edit
“/usr/lib/gtk-2.0/2.10.0/immodules/im-scim.so”
“scim” “SCIM Input Method” “scim” “/usr/share/locale” “ja:ko:zh”

将最后的:zh删掉

4. 重启X Window
按下CTRL + ALT + BackSpace

5. 设置fcitx的字体
gedit ~/.fcitx/config  (其编码是GB18030)
修改第二行
引用
显示字体(中)=*

把*修改为想要使用的字体的名字,比如微软雅黑为 Microsoft YaHei
这个可以通过双击打开字体,在Font Viewer显示内容的第一行看到(为此纠结了好久,网上貌似没有人提到过)

6. 重启X Window

OK~享受小企鹅带来的乐趣吧!
Oct 26

PHProxy 0.5b2 Felix更新版 不指定

felix021 @ 2008-10-26 06:59 [IT » 网络] 评论(1) , 引用(0) , 阅读(9857) | Via 本站原创
By Felix021 @ 2008-10-26 03:41 CST

  If you visit http://sourceforge.net/projects/poxy/ , you'll find such statement: As of 2007-09-07 11:55, this project is no longer under active development.
  
  The original authors abandoned this project for abusement of it, but I think it very useful, at least to me who have to download something but have a bad direct connection while via PHProxy on my own webspace I can download with high speed.
  由于使用者对poxy的滥用,作者停止了开发,但是对于我这种需要下载某个文件、直接下载很慢但是通过我的空间连接很快的人而言,poxy还是很有用的。

  But I found that poxy is designed just for browsing, not optimized for downloading, for example, it doesn't support multi-thread downloadment, so I feel obliged to modify the source code. In fact this is very simple. I added a few lines, and now it works well, supporting multi-thread downloading and pause-continue action. What's more, I added a button for users to obtain download link directly from copying the address shown below.
  但是我发现,poxy基本上只是为了浏览而开发的,没有为下载优化过。比如,它不支持多线程下载,所以我觉得有必要去改下源码。实际上非常简单,加上几行代码就行了,现在它工作得很好,不仅支持多线程下载,还支持断点续传。此外,我还增加了一个按钮可以让用户直接获取下载地址。

  This version of poxy is based on poxy 0.5b2, where you can get from sourceforge. It's TODO list has 17 features to be completed, and my modification only partial implemented the 9th, 'support HTTP 1.1' . Maybe I'll implement the FTP support in the future (indeed I've written a simple web ftp proxy before).
  这个版本的poxy是从0.5b2版本改进而来,你可以在sourceforge上down到。本来作者打算还有17个功能要完成,我的修改部分地完成了功能9,支持HTTP 1.1。也许以后有空的时候我会吧FTP支持也做进去(事实上我已经写了一个在线ftp代理 )。

Modification:
我做的修改

1. added a button and an input field for direct download link
    增加一个按钮和输入框,可以直接获取下载地址
2. added HTTP/1.1 'Range' support, now capable of multi-thread downloading
    增加对HTTP/1.1 Range(范围)的支持,可以多线程下载了。
3. added HTTP/1.1 'Referer' support, no worry for anti-leech of the server
    增解HTTP/1.1 Referer(来源页)的支持,可以突破防盗链(很卑鄙,呵呵。。)

Download here:
下载文件 (已下载 1622 次)
Oct 14

在Ubuntu中安装OpenOffice.org 3.0 不指定

felix021 @ 2008-10-14 21:30 [IT » 软件] 评论(0) , 引用(0) , 阅读(4632) | Via 本站原创
参考 http://metamuse.blogspot.com/2008/05/install-openoffice-3-beta-in-ubuntu.html

首先去下载OOo3.0
在这个页面 http://download.openoffice.org/index.html
选择 Linux DEB 这一列下面的某个适合自己语言的链接下载

下载得到一个 tar.gz 解压
打开终端,进入里面的DEBs目录
输入下面的命令自动安装所有的DEB包
$ sudo dpkg -i *.deb
安装完毕后,OOo3.0的启动中心就可以从 /opt/openoffice.org3/program/soffice 打开
更好的方式是在主菜单中建立快捷方式:系统->首选项->主菜单
更多的链接为:
/opt/openoffice.org3/program/soffice   启动中心
/opt/openoffice.org3/program/swriter   文档编辑
/opt/openoffice.org3/program/simpress   演示文稿
/opt/openoffice.org3/program/scalc   电子表格
/opt/openoffice.org3/program/sdraw    Draw
/opt/openoffice.org3/program/smath   Math
Oct 13

DOM Tree的删除 不指定

felix021 @ 2008-10-13 17:34 [IT » 网络] 评论(0) , 引用(0) , 阅读(4317) | Via 本站原创
测试发现,DOM Tree删除某元素的时候,会将其子节点一同删除。
通过表单元素测试,发现确实被删除元素的子元素的值不会被提交给服务器。
删除测试:
Oct 11
效果为:点击add按钮在表格中增加一行;点击某行的del连接删除该行。
Oct 11
zz from http://www.blogjava.net/boddi/archive/2006/08/15/63609.html

attachEvent() / addEventListener() 对象添加触发事件(转)

有时候当某一对象的某一事件被触发时,它所要执行的程序可能是一大串,有可能是要呼叫某一函数,也有可能同时又要呼叫另一函数。

document.getElementById("btn").onclick = method1;
document.getElementById("btn").onclick = method2;
document.getElementById("btn").onclick = method3;
如果这样写,那么将会只有medhot3被执行

在IE中使用attachEvent ,
Oct 10
zz from http://ubuntuforums.org/showthread.php?t=219985
原文对应的jdk版本是5, tomcat版本是5
修改成现有版本是jdk6, tomcat5.5

-----

HOWTO : Apache2 + Tomcat5.5
# All the modified or additional information will be updated on this post in order for everyone to get alwasys up-to date information.

This how to explains you the way to set up apache (http server) + tomcat (servlet container). Tomcat itself can work standalone http server however when we consider about the performance, it's better to use the connector to bind apache and tomcat. (If you really need the performance, RESIN is one of the best servlet container though)

About the connector development of mod-jk2 has been end since 15 November 2004. So please use mod-jk instead.

1) Install the needed package
First of all, let's install the packages needed.
$ sudo apt-get install apache2-mpm-prefork apache2-common apache2-utils
$ sudo apt-get install sun-java6-jdk tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
$ sudo apt-get install libapache2-mod-jk
Oct 6
所以在给whumstc做图书馆藏书情况查询系统的时候
因为觉得用SELECT COUNT(*) FROM `ooxx`是很耗时的
所以就没有做过多的分页功能,只做了首页/上页/下页/跳页。


现在发现我的想法非常愚蠢 - 会如此频繁使用的功能,MySQL怎会不优化呢
不过当时(十一)是在老家,没有网络不能查。
今天想起这个问题,于是google了一下,答案是:

使用MYISAM存储引擎的表,会保存表的记录数。
如果使用SELECT COUNT(*) FROM `table_name`;语句进行查询的时候
会直接返回该记录数。
注意使用InnoDB引擎存储的表没有这个功能
这条SQL语句也不能加上WHERE限定语句,否则将要扫描所有记录。

专门看了一下MySQL Manual的Chapter 7.2.4 MySQL怎样优化WHERE子句, 很有收获。
分页: 61/103 第一页 上页 56 57 58 59 60 61 62 63 64 65 下页 最后页 [ 显示模式: 摘要 | 列表 ]