UNIX程式設計中有種PIPE方法可以運用,
在shell中也常用pipe,
ex1: ls |wc
ex2: ls |xargs cat
相關網頁: http://www.unixwiz.net/techtips/remap-pipe-fds.html
星期日, 7月 27, 2008
Fortran and NCAR Graphics
如果你是愛寫程式之人,個人認為不要錯過
Intel Softeare Evaluation Center,
他提供試用版的C++及Fortran Comiler.
什麼是NCAR Graphics:
NCAR Graphics is a Fortran and C based software package for scientific visualization.
安裝好NCAR Graphics,
可以寫一小段程式測試,
ex: world.f
============
program world
call opngks
call supmap(8,0.,180.,0., -90.,0.
+,90.,360.,2,10,4,0,ierr)
call frame
call clsgks
stop
end
=============
編譯方法:
ncargf77 world.f -o world
./world
mv gmeta world.gmeta
測試看圖:
ctrans -d X11 world.gmeta
參考資料1:Building NCAR Graphics* with the Intel® compilers
參考資料2:NCAR Graphics
Intel Softeare Evaluation Center,
他提供試用版的C++及Fortran Comiler.
什麼是NCAR Graphics:
NCAR Graphics is a Fortran and C based software package for scientific visualization.
安裝好NCAR Graphics,
可以寫一小段程式測試,
ex: world.f
============
program world
call opngks
call supmap(8,0.,180.,0., -90.,0.
+,90.,360.,2,10,4,0,ierr)
call frame
call clsgks
stop
end
=============
編譯方法:
ncargf77 world.f -o world
./world
mv gmeta world.gmeta
測試看圖:
ctrans -d X11 world.gmeta
參考資料1:Building NCAR Graphics* with the Intel® compilers
參考資料2:NCAR Graphics
星期二, 7月 22, 2008
星期四, 7月 17, 2008
星期一, 7月 14, 2008
星期六, 7月 12, 2008
星期三, 7月 09, 2008
高鐵,新竹單車之旅
這週日(7/6)跟Chris約到新竹騎單車,
早上騎車從家裡騎車到台北高鐵站前,
把小摺用攜車袋收好,
在自動售票機(可以用VISA,MasterCard,JCB,金融卡或現金)買好高鐵自由座去回車票,
只花40多分鐘就到了新竹六家站.
行程由Chris規劃我們從六家->芎林->竹北,
下午在竹北用餐後,突然下雨於是在餐廳附近的家樂福逛了一圈,
雨後我們從竹北->新埔->義民廟->新埔->關西,
折返回新埔,經過新埔遠紡突然下大雨,
還好及時在新埔與竹北交界的便利商店門口得以避雨,
大概下了一個小時後停雨,趕緊騎到竹北,
這期間遠方不時有雷聲及雷光真是驚悚,
到了Chris租屋處稍停,
Chris開汽車載我,我們一起去竹北市區用餐,
餐後Chris送我去高鐵坐車回台北,
結束一天的單車之旅.
早上騎車從家裡騎車到台北高鐵站前,
把小摺用攜車袋收好,
在自動售票機(可以用VISA,MasterCard,JCB,金融卡或現金)買好高鐵自由座去回車票,
只花40多分鐘就到了新竹六家站.
行程由Chris規劃我們從六家->芎林->竹北,
下午在竹北用餐後,突然下雨於是在餐廳附近的家樂福逛了一圈,
雨後我們從竹北->新埔->義民廟->新埔->關西,
折返回新埔,經過新埔遠紡突然下大雨,
還好及時在新埔與竹北交界的便利商店門口得以避雨,
大概下了一個小時後停雨,趕緊騎到竹北,
這期間遠方不時有雷聲及雷光真是驚悚,
到了Chris租屋處稍停,
Chris開汽車載我,我們一起去竹北市區用餐,
餐後Chris送我去高鐵坐車回台北,
結束一天的單車之旅.
星期一, 7月 07, 2008
subversion 1.5
最近工作需要又要另外安裝一台Subversion Server for linux,
發現Subversion原始碼不久前升級至1.5版,
1.4->1.5版最大不同在merge專案時有更詳細的紀錄.
於是今天早上就忙著裝安裝新版的Subversion Server為新的專案做準備.
安裝Subversion所需的套件及過程:
=======================
1.依subversion說明需要autoconf 2.58 or laster,libtool 1.4 or later.
檢查系統環境libz 1.2.1,autoconf 2.59,libtool 1.5.6,gcc 3.4.6符合條件.
2.收集expat 2.0.1,libxml2 2.6.32,neon 0.28.2,apache2 2.2.9,swig 1.3.31,python 2.4.5.
3.安裝python,swig.
python安裝時設定指令:
./configure --prefix=[path]
make;make test;make install
swig安裝時設定指令:
./configure --prefix=[path] --with-python=[path] --enable-static=yes
make;make install
4.安裝expat,libxml2,neon
expat安裝時設定指令:
./configure --prefix=[path] --enable-shared --with-gnu-ld=yes
make;make install
libxml2安裝時設定指令:
./configure --prefix=[path] --with-python=[path] --with-zlib=[path]
make;make install
neon安裝時設定指令:
./configure --prefix=[path] --with-libs=[path] --enable-shared --with-libxml2 --with-expat
make;make install
5.安裝apache2
apache2安裝時設定指令:
cd [path_apache2_src]/srclib/apr
./configure --prefix=[path]
make;make install
cd ../apr-util
./configure --prefix=[path] --with-apr=../apr --with-expat=[path]
make;make install
cd ../..
./configure --prefix=[path] --enable-mods=all --with-apr=srclib/apr --with-apr-util=srclib/apr-util
make;make install
6.安裝subversion
./configure --prefix=[path] --with-swig=[path] --with-neon=[path] --with-apxs=[path]/bin/apaxs --with-apr=[path]/bin/apr-1-config --with-apr-util=[path]/bin/apu-1-config --with-zlib
make;make install
=======================
設定專案及專案成員方法:
=======================
1.利用htpasswd建立svn-auth-file
2.設定accesscontrol.conf
[groups]
proj1-developers = john,mary
[proj1:/]
@proj-developers = rw
3. httpd.conf尾端加上以下設定
<Location /repos>
DAV svn
SVNParentPath [repos_path]
AuthzSVNAccessFile [path]/accesscontrol.conf
Require valid-user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile [path]/svn-auth-file
</Location>
4. [path]/bin/svnadmin create proj1 --fs-type fsfs
=======================
發現Subversion原始碼不久前升級至1.5版,
1.4->1.5版最大不同在merge專案時有更詳細的紀錄.
於是今天早上就忙著裝安裝新版的Subversion Server為新的專案做準備.
安裝Subversion所需的套件及過程:
=======================
1.依subversion說明需要autoconf 2.58 or laster,libtool 1.4 or later.
檢查系統環境libz 1.2.1,autoconf 2.59,libtool 1.5.6,gcc 3.4.6符合條件.
2.收集expat 2.0.1,libxml2 2.6.32,neon 0.28.2,apache2 2.2.9,swig 1.3.31,python 2.4.5.
3.安裝python,swig.
python安裝時設定指令:
./configure --prefix=[path]
make;make test;make install
swig安裝時設定指令:
./configure --prefix=[path] --with-python=[path] --enable-static=yes
make;make install
4.安裝expat,libxml2,neon
expat安裝時設定指令:
./configure --prefix=[path] --enable-shared --with-gnu-ld=yes
make;make install
libxml2安裝時設定指令:
./configure --prefix=[path] --with-python=[path] --with-zlib=[path]
make;make install
neon安裝時設定指令:
./configure --prefix=[path] --with-libs=[path] --enable-shared --with-libxml2 --with-expat
make;make install
5.安裝apache2
apache2安裝時設定指令:
cd [path_apache2_src]/srclib/apr
./configure --prefix=[path]
make;make install
cd ../apr-util
./configure --prefix=[path] --with-apr=../apr --with-expat=[path]
make;make install
cd ../..
./configure --prefix=[path] --enable-mods=all --with-apr=srclib/apr --with-apr-util=srclib/apr-util
make;make install
6.安裝subversion
./configure --prefix=[path] --with-swig=[path] --with-neon=[path] --with-apxs=[path]/bin/apaxs --with-apr=[path]/bin/apr-1-config --with-apr-util=[path]/bin/apu-1-config --with-zlib
make;make install
=======================
設定專案及專案成員方法:
=======================
1.利用htpasswd建立svn-auth-file
2.設定accesscontrol.conf
[groups]
proj1-developers = john,mary
[proj1:/]
@proj-developers = rw
3. httpd.conf尾端加上以下設定
<Location /repos>
DAV svn
SVNParentPath [repos_path]
AuthzSVNAccessFile [path]/accesscontrol.conf
Require valid-user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile [path]/svn-auth-file
</Location>
4. [path]/bin/svnadmin create proj1 --fs-type fsfs
=======================
訂閱:
文章 (Atom)