Sparkle’s Workshop

Archive for July, 2007

比较高效的关键字过滤代码

Posted on July 26, 2007 - Filed Under Uncategorized

public String keywordMask(String str) {
StringBuffer buffer = new StringBuffer(str);
for (String keyword : getKeyword()) {
int index = 0;
while (true) {
index = buffer.indexOf(keyword, index);
if (index < 0) {
break;
}
for (int i = 0; i < keyword.length(); i++) {
buffer.setCharAt(index + i, ‘*’);
}
}
}
return buffer.toString();
}

Read More..>>

再战mac下的BT软件

Posted on July 26, 2007 - Filed Under Uncategorized

linux最好用的BT软件rtorrent在mac下面竟然遇上中文问题,到现在都没有解决的办法
同样用rtorrent的核心libtorrent的bitrocket开发进度缓缓慢慢的,竟然也有中文问题,而且经常突然退出,基本上不能用
不过有一个好消息就是,utorrent这个可能是windows下面最好的BT软件正在开发mac的版本,已经有运行截图放出来了,不过还没有可以试用的版本
最后找了一个Transmission来用,优点嘛,没有,至少能用
下载速度还可以,资源占用也不高
准备推出的0.8版增加了不少新特性,比如可以选择某些文件不下载(不要怀疑,现在的版本的确没有)等等

Read More..>>