Jul 16 2008

开始做正事

前一段时间差不多都贡献给了摄影和照片,处理照片和增加摄影器材花费了不少时间和金钱。虽然乐在其中不过按照计划,从第三个月开始,就要开始着手实现自己脑子里胡思乱想已久的原型了。虽然之前2个月的时间被证明是远远不够完成休息+旅行的,但是计划还是要遵守的。该开始下一步的事情了。之前留下的遗憾,以后再补吧

回顾之前的战果:40D旁边现在多了A16和xxb,脚架SLIK 340DX Pro,用不了几天,还会加上Lowepro Primus AW40周年纪念版背包,希望在摄影上的烧钱就此告一段落。

马上要开始的任务,又要整天对着电脑了。先把工作环境setup起来。强迫自己接下来一段时间自己只写与之相关的东西。悬赏rmb1一元征人监督


May 12 2008

DB2 for zOS stored procedure chart

整理资料时候发现的很久之前做的东东。要不是换机器倒资料,不知道猴年马月才能重见天日了
Stored Procedure chart


Apr 17 2008

A textmate-like gedit in Ubuntu for Ruby and Rails IDE

Pls follow the instructions from http://grigio.org/pimp_my_gedit_was_textmate_linux

Add-on by Deep Blue (Linux newbie may need this if you are using Ubuntu):

How to install liberation fonts on Ubuntu

commands:
——————————————————-
echo “deb http://ppa.launchpad.net/corenominal/ubuntu gutsy main” | sudo tee -a /etc/apt/sources.list
echo “deb-src http://ppa.launchpad.net/corenominal/ubuntu gutsy main” | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install ttf-liberation
——————————————————-

My customized Gedit screen snapshot:
A textmate-like Gedit as Ruby and rails IDE


Apr 11 2008

x86 架构下Ruby/Rails开发环境比较及安装方法

x86 架构下Ruby/Rails开发环境比较及安装方法
[Ruby/Rails Development Environment comparison and setup instructions on x86 platform]

Original posted on www.tzhang.com/blog/
Apr 11, 2008
Version 1.0

方案选择:
1. OSX + Textmate
2. Linux + Netbeans
3. Windows + e texteditor + cgywin

优缺点比较:

1. 缺点:
a) OSX在非Mac机器上安装对显卡的要求很高,兼容性并不好。多系统启动支持也不好,需要用户有较高的操作系统知识和排错技能以及很出众的耐心和时间:(
b) OSX安装在非Apple机器上理论上说是非法的;textmate也是收费软件且价格不菲

优点:想使用最优秀的ruby/rails 编辑器textmate的话,只能这么办哦

2. 缺点:
a) NetBeans IDE比不上textmate;只能将就着用

优点:
a) Linux下全部软件都是开源免费的,包括NetBeans
b) Linux下可以方便的安装使用众多Rails相关的开源软件及库

3. 缺点:
a) Windows环境在ruby/rails的世界里绝对算是少数派
b) e texteditor也是收费软件

优点:
a) Windows简单易用,方便没有Linux/UNIX经验的人使用,setup过程简单
b) e texteditor 使用起来十分接近textmate

安装方法:
——————————————————————————————————–
方案一
OSX
N/A yet
——————————————————————————————————-
方案二
Linux + NetBeans + ruby 1.8.6 + rubygem 1.0.1 + rails 2.0.2 + mysql 5
a) 安装Ubuntu Linux
b) 安装Ruby (初学者在Ubuntu下推荐用apt-get安装1.8.5版本)
sudo apt-get install ruby
c) 安装RubyGem
Download RubyGem code
url: http://rubyforge.org/frs/?group_id=126
Untar
tar –xzvf rubygems-1.1.0.tgz
Setup
Sudo ruby setup.rb
验证安装
gem –v
which gem
d) 安装rails
安装
sudo gem update –system
sudo gem install rails –y
验证安装
rails -v
e) 安装Netbeans
下载安装文件:
url: http://dlc.sun.com.edgesuite.net/netbeans/6.0/final/
安装
把下载的Bin文件拖入终端即可
运行
/$installDir/bin/netbeans
f) 安装MySQL
sudo apt-get install mysql-common mysql-clients
g) 安装完成,记得在NetBeans里面更改默认的Ruby解释器
———————————————————————————————-
方案三
Windows + e texteditor + cgywin + console2
a) 安装e texteditor
url: http://www.e-texteditor.com/download/e_beta_setup.exe
安装
注意安装途中可能报错,那是个别文件不符合windows命名规则的原因,不用管,ignore掉然后继续就好了,影响不大。
b) 安装cgywin
初次运行e texteditor就会提示安装cgywin,直接选automatic install就好了,e texteditor会自动下载cgywin
c) 安装console2
下载console2
url: http://sourceforge.net/projects/console/
解压即可
配置console和cgywin
选add tab, 在shell里面输入:
c:\cygwin\bin\bash –login –i
将该tab移到最上方,以后每次启动console2都会自动启动该shell
d) 安装RubyGem
Download RubyGem code
url: http://rubyforge.org/frs/?group_id=126
Untar
tar –xzvf rubygems-1.1.0.tgz
Setup
Sudo ruby setup.rb
验证安装
gem –v
which gem
如果出现错误,使用:
unset RUBYOPT

e) 安装rails
安装
sudo gem update –system
sudo gem install rails –include-dependencies
验证安装
rails -v

f) 测试安装
rails blog
cd blog
e .
你将会看到e texteditor 自动启动并将当前目录的项目打开。

====================================================================
updated 2008-04-16

Install sqlite3 and mongrel:

#before install Mongrel,
apt-get install build-essential #we need it to compile mongrel and Sqlite3

#intall Mongrel
gem install mongrel –include-dependencies

#install Sqlite3
apt-get install sqlite3 swig libsqlite3-ruby libsqlite3-dev
gem install sqlite3-ruby #compile this need libsqlite.h

#install Lighttpd
apt-get install lighttpd

===============================================
UPDATED 2008-05-27:
在Linux下有更好的IDE选择了,Gedit可以加几个插件和主题,就可以比较完美的模仿textmate了,具体请看这个帖子
http://www.tzhang.com/blog/2008/04/17/textmate-like-gedit


Mar 20 2008

Ubuntu环境下Ruby, Rails, Waves的安装方法

Reference: http://www.javaeye.com/topic/43228

Ubuntu环境下Ruby, rails, waves的安装方法:

1 ) Ruby 1.8.6
ruby的源代码可以从Ruby官方网站下载:

http://www.ruby-lang.org/en/downloads/

./configure –prefix=/usr/local/ruby

make

sudo make install

export PATH=/usr/local/ruby/bin:$PATH

安装好以后,修改操作系统PATH路径,加入/usr/local/ruby/bin:
export PATH=/usr/local/ruby/bin:$PATH

在Linux上,一般将设置放在/etc/profile中,便于对全局生效
sudo gedit /etc/profile

add the following lines before umask 022

if [ -d /usr/local/ruby/bin ] ; then
PATH=/usr/local/ruby/bin:”${PATH}”
fi

——————————————————

2 ) Rubygems是ruby的在线包管理工具,可以从rubyforge下载rubygems:

http://rubyforge.org/projects/rubygems/

sudo /usr/local/ruby/bin/ruby setup.rb

验证安装:gem -v
which gem

3 ) Install Rails
sudo gem install rails -y

4 ) Install Waves
sudo install waves
注意在Ubuntu环境下虽然在/etc/profile里面有ruby的path, 但是sudo的话还是提示需要ruby 1.8.6以上环境。找乐很多地方都没有解决方法(好把我承认是linux菜鸟,可能大家都不屑于些出来把,最后启动的时候选recovery mode意外的发现可以以root id登入,一切ok啦)

Problem: sudo will not provide the ruby path.
solution: use ubuntu recovery mode and you will have a real root user.

5 ) Install mysql

sudo apt-get install mysql-common mysql-clients


Apr 10 2007

记忆力不行了,随手记一下

老爷级的台式机终于挺不住罢工了–我的屋子终于安静了–光他老人家一个风扇的噪音已经快超过隔壁装修了。

我的Linux环境没有了。今天在laptop上搭建了了RoR的环境,Ruby1.8.6 + Rails 1.2.3 + DB2 V9(这个最BT,呵呵,不过IM们的同事都知道是为什么)+ DB2 adapter bindings + RMagick. 就在laptop上开发了!反正deploy到linux的production environment也很方便。IDE选了RadRails,用起来不怎么顺手,只能忍了,暂时还没有为了rails而败个Mac的打算。


Feb 7 2007

OpenCV的版权问题

以前用openCV的时候,还真没注意过这个事情。真是一不小心就会踩到地雷哦。好久没有用openCV了,不知道现在有哪些improvement了。似乎版本号已经很高了,我用的时候还是3.1呢

http://rafaelmizrahi.blogspot.com/2007/02/intel-opencv-face-detection-license.html

Intel OpenCV is a great free image processing library.(take a look at its license)

but regards face detection, it might be not that free.
looking into $OpenCV\data\ which contains the HAAR cascades, you may find a readme.txt file which goes like this:

This folder contains various data that is used by cv libraries and/or demo applications.
—————————————————————————————-
haarcascades – the folder contains trained classifiers for detecting objects
of a particular type, e.g. faces (frontal, profile), pedestrians etc.
Some of the classifiers have a special license – please,
look into the files for details.

Now lets have some background
(thanks to Sébastien Marcel at idiap)

The face detection method implemented in OpenCV by Rainer Lienhart is very similar to the one published and patented by Paul Viola and Michael Jones (patent 1 and patent 2), namely called Viola-Jones face detection method.

More precisely, Rainer Lienhart proposed an extension of Viola and Jones work which consists essentially in additional haar-like features (center, tilted) and the use of a tree-based classifiers instead of stump-classifiers in the cascade. Indeed, even if the excellent implementation of Lienhart is available in OpenCV, it seems that the classifiers (check carefully the face detection XML models) in the cascade are not trees but stumps and that they don’t contain any “tilted” haar-like features. As a consequence, those “default” models implement a solution very close from Viola and Jones.

Therefore, to differ really from the Viola-Jones patent, you will need to re-train yourself a cascade with tree-based classifiers, and possibly with tilted features.


Sep 29 2006

Ruby

虽然是日本人发明的语言,但是在网上越来越火的趋势,弄得我也好奇一把。google到几个教程,这个给我留下深刻印象:Try Ruby

直接模拟终端,让我想起了18年前第一次在Laser310和AppleII上面敲Basic的时候.

其实学一种语言最好的方式就是由浅入深的练习. 用上面的这个教程,15分钟就可以把基本元素掌握了.一方面是教程的形式好;另一方面,Ruby也确实好学,繁琐的东西都隐藏在幕后.就像这幅广告图拉:

1619

一切回归简单与本质,是种最终理想了.不过,还是为ruby的效率担心,有时间好好研究研究.现在我还没入门呢.

推荐几个链接吧:

http://tryruby.hobix.com/    就是上面的Try Ruby教程

http://poignantguide.net/ruby/   Why’s guide to Ruby

http://www.ruby-lang.org   官方主页,不放怎么行:p
好了就这么多了,太多参考,就不是Ruby了.有没有非IT的朋友来试一下,亲身体验一下Ruby有多好学?


Pages: Prev 1 2