<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" 
	xmlns="http://purl.org/atom/ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xml:lang="eng">
	<title>yen.cycu.org</title>
	<link rel="alternate" type="text/html" href="http://yen.cycu.org/index.php"/>
	<modified>2009-12-30T01:24:04-05:00</modified>
	<author>
	<name></name>
	<url>http://yen.cycu.org/index.php</url>
	<email></email>
	</author>
	<tagline></tagline>
	<id>tag:,2009:</id>
	<generator url="http://www.pivotlog.net" version="Pivot - 1.24.1: 'Arcee'">Pivot</generator>
	<copyright>Copyright (c) 2009, Authors of yen.cycu.org</copyright>
	
	
	
	<entry>
		<title>NoSQL in Python</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=387" />
		<modified>2009-12-02T12:58:00-05:00</modified>
		<issued>2009-12-02T12:58:00-05:00</issued>
		<created>2009-12-02T12:58:00-05:00</created>
		<id>tag:,2009:.387</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">http://buzhug.sourceforge.net/ 是一個以 Python 建立的資料庫系統,採用剛剛興起的 NoSQL 資料結構.經過 buzhug 作者的初步比較, 資料處理速度,比 KirbyBase(in pure Ruby) 快上10倍,而且比老牌 Python 內建的資料庫系統 Gadlfy,快上 275倍,與 SQLite 比?應該說, buzhug 的資料處理速度直逼 SQLite.UliWeb + buzhug 或許也是網際程式開發者的不錯選擇.</summary>
		<dc:subject>NoSQL in Python</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=387"><![CDATA[ http://buzhug.sourceforge.net/ 是一個以 Python 建立的資料庫系統,採用剛剛興起的 NoSQL 資料結構.<br  /><br  />經過 buzhug 作者的初步比較, 資料處理速度,比 KirbyBase(in pure Ruby) 快上10倍,而且比老牌 Python 內建的資料庫系統 Gadlfy,快上 275倍,與 SQLite 比?<br  /><br  />應該說, buzhug 的資料處理速度直逼 SQLite.<br  /><br  />UliWeb + buzhug 或許也是網際程式開發者的不錯選擇.<br/> ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>推薦 Uliweb</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=386" />
		<modified>2009-11-29T21:25:00-05:00</modified>
		<issued>2009-11-29T21:25:00-05:00</issued>
		<created>2009-11-29T21:25:00-05:00</created>
		<id>tag:,2009:.386</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">源自對於 Ulipad 的推崇,也相信假以時日, UliWeb 會是一套具有舉足輕重地位的 Python Framework.其他幾套值得關注的 Python Framework 則分別是 Eurasia3, Pylons, Django 與 Web2py.</summary>
		<dc:subject>推薦 Uliweb</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=386"><![CDATA[ 源自對於 <a href="http://code.google.com/p/ulipad/"  target='_blank'>Ulipad</a> 的推崇,也相信假以時日, <a href="http://uliwebproject.appspot.com/"  target='_blank'>UliWeb</a> 會是一套具有舉足輕重地位的 Python Framework.<br  /><br  />其他幾套值得關注的 Python Framework 則分別是 <a href="http://code.google.com/p/eurasia/"  target='_blank'>Eurasia3</a>, <a href="http://pylonshq.com/"  target='_blank'>Pylons</a>, <a href="http://www.djangoproject.com/"  target='_blank'>Django</a> 與 <a href="http://mdp.cti.depaul.edu/"  target='_blank'>Web2py</a>.<br/> ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>Google 的新程式語言</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=385" />
		<modified>2009-11-16T00:54:00-05:00</modified>
		<issued>2009-11-16T00:54:00-05:00</issued>
		<created>2009-11-16T00:54:00-05:00</created>
		<id>tag:,2009:.385</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">沒有錯,Google 在上個月底,正式公開近兩年所創建的新程式語言 - Go.Go 所標榜的除了快,還是快,除了要有如 Python 的開發快速外,還要有比 C/C++ 更快的編譯時間,而編譯後的程式,執行速度直逼 C.在這一波訊息發布當中,最令人高興與振奮的則是:-),在第一時間, Google 並沒有考慮到數以幾億計的 Windows 用戶權益,宣稱由於團隊資源有限,並沒有推出視窗版的 Go.由於 Go 是一項開源計畫,照道理說,假如 Windows 環境的開發者對於這項新程式語言有需求,這項平台移轉的工作確實應該是要讓目前宣稱賣 Windows 7,生意好得快要冒煙的微軟公司來做才對.</summary>
		<dc:subject>Google 的新程式語言</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=385"><![CDATA[ 沒有錯,Google 在上個月底,正式公開近兩年所創建的新程式語言 - <a href="http://golang.org"  target='_blank'>Go</a>.<br  /><br  />Go 所標榜的除了快,還是快,除了要有如 Python 的開發快速外,還要有比 C/C++ 更快的編譯時間,而編譯後的程式,執行速度直逼 C.<br  /><br  />在這一波訊息發布當中,最令人高興與振奮的則是:-),在第一時間, Google 並沒有考慮到數以幾億計的 Windows 用戶權益,宣稱由於團隊資源有限,並沒有推出視窗版的 Go.<br  /><br  />由於 Go 是一項開源計畫,照道理說,假如 Windows 環境的開發者對於這項新程式語言有需求,這項平台移轉的工作確實應該是要讓目前宣稱賣 Windows 7,生意好得快要冒煙的微軟公司來做才對.<br/><br/> ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>推薦 Ulipad</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=384" />
		<modified>2009-11-15T21:28:00-05:00</modified>
		<issued>2009-11-15T21:28:00-05:00</issued>
		<created>2009-11-15T21:28:00-05:00</created>
		<id>tag:,2009:.384</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">多年來在編輯 Python 與 PHP 程式大多使用 Vim 與 Scintilla,這兩個系統都是以 C 打造,功能雖然具有彈性,但是隨著整體程式環境變得多元複雜,編譯特性的編輯器開始出現瓶頸,這個時候,利用 Python 與 wxPython 打造的 Ulipad,就成為處理問題的一項利器.難能可貴的是,這個程式編輯器作者來自中國,是一群多年來默默為全球開源社群付出許多的中國Python社群中的一員(limodou).在這裡,強力推薦 Ulipad.目前唯一美中不足的是, wxPython 還沒能支援 Python 3.0 以上的版本,使用 Ulipad,必須暫時採用Python 2.6 以下的版本開啟.</summary>
		<dc:subject>推薦 Ulipad</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=384"><![CDATA[ 多年來在編輯 Python 與 PHP 程式大多使用 Vim 與 Scintilla,這兩個系統都是以 C 打造,功能雖然具有彈性,但是隨著整體程式環境變得多元複雜,編譯特性的編輯器開始出現瓶頸,這個時候,利用 Python 與 wxPython 打造的 Ulipad,就成為處理問題的一項利器.<br  /><br  />難能可貴的是,這個程式編輯器作者來自中國,是一群多年來默默為全球開源社群付出許多的中國Python社群中的一員(limodou).<br  /><br  />在這裡,強力推薦 <a href="http://code.google.com/p/ulipad/"  target='_blank'>Ulipad</a>.<br  /><br  />目前唯一美中不足的是, wxPython 還沒能支援 Python 3.0 以上的版本,使用 Ulipad,必須暫時採用Python 2.6 以下的版本開啟.<br/> ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>自定 Python 3.0  的 cmp 函式</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=383" />
		<modified>2009-11-14T01:35:00-05:00</modified>
		<issued>2009-11-14T01:35:00-05:00</issued>
		<created>2009-11-14T01:35:00-05:00</created>
		<id>tag:,2009:.383</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">Python 3.0 的升級,去除了原先在 2.0 中的 __cmp__() 與 cmp(),使用者可以利用下列程式碼,讓 2.0
版的程式碼得以在 Python 3.0 以上的環境下正確執行:1. (a &amp;gt; b) -
(a &amp;lt; b) 等同 cmp(a, b)2. 自行定義 __cmp__
函式內容,並且輔以 __lt__, __le__, __gt__ 與 __ge__
等函式.def __cmp__(self,
other):&amp;nbsp;&amp;nbsp;&amp;nbsp;
自行定義如何進行比較&amp;nbsp;&amp;nbsp;&amp;nbsp; return
結果def __lt__(self,
other):&amp;nbsp;&amp;nbsp;&amp;nbsp; return
self.__cmp__(other) &amp;lt; 0def __le__(self,
other):&amp;nbsp;&amp;nbsp;&amp;nbsp; return
self.__cmp__(other) &amp;lt;= 0def __gt__(self,
other):&amp;nbsp;&amp;nbsp;&amp;nbsp; return
self.__cmp__(other) &amp;gt; 0def __ge__(self,
other):&amp;nbsp;&amp;nbsp;&amp;nbsp; return
self.__cmp__(other) &amp;gt;= 0 </summary>
		<dc:subject>自定 Python 3.0  的 cmp 函式</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=383"><![CDATA[ Python 3.0 的升級,去除了原先在 2.0 中的 __cmp__() 與 cmp(),使用者可以利用下列程式碼,讓 2.0
版的程式碼得以在 Python 3.0 以上的環境下正確執行:<br  /><br  />1. (a &gt; b) -
(a &lt; b) 等同 cmp(a, b)<br  /><br  />2. 自行定義 __cmp__
函式內容,並且輔以 __lt__, __le__, __gt__ 與 __ge__
等函式.<br  /><blockquote><br  />def __cmp__(self,
other):<br  />   
自行定義如何進行比較<br  />    return
結果<br  /><br  />def __lt__(self,
other):<br  />    return
self.__cmp__(other) &lt; 0<br  /><br  />def __le__(self,
other):<br  />    return
self.__cmp__(other) &lt;= 0<br  /><br  />def __gt__(self,
other):<br  />    return
self.__cmp__(other) &gt; 0<br  /><br  />def __ge__(self,
other):<br  />    return
self.__cmp__(other) &gt;= 0 <br  /></blockquote><br  />實際範例:<br  /><blockquote><br  />def
__cmp__(self, other):<br  />    if
self.optimization ==
MINIMIZE:<br  />       
#return cmp(self.score,
other.score)<br  />       
return (self.score &gt; other.score) - (self.score &lt;
other.score)<br  />    else: #
MAXIMIZE<br  />       
#return cmp(other.score,
self.score)<br  />       
return (other.score &gt; self.score) - (other.score &lt;
self.score)<br  />           
<br  />def __lt__(self,
other):<br  />    return
self.__cmp__(other) &lt; 0<br  /><br  />def __le__(self,
other):<br  />    return
self.__cmp__(other) &lt;= 0<br  /><br  />def __gt__(self,
other):<br  />    return
self.__cmp__(other) &gt; 0<br  /><br  />def __ge__(self,
other):<br  />    return
self.__cmp__(other) &gt;= 0 <br  /></blockquote> ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>Md5 與 Sha1 字詞轉換</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=380" />
		<modified>2009-11-10T00:12:00-05:00</modified>
		<issued>2009-11-10T00:12:00-05:00</issued>
		<created>2009-11-10T00:12:00-05:00</created>
		<id>tag:,2009:.380</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">利用 easygui, md5 與 hashlib 編寫的 Python 字詞轉換應用程式,此一基本流程可以用來建立各種簡單的跨平台視窗程式.</summary>
		<dc:subject>Md5 與 Sha1 字詞轉換</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=380"><![CDATA[ 利用 easygui, md5 與 hashlib 編寫的 Python 字詞轉換應用程式,此一基本流程可以用來建立各種簡單的跨平台視窗程式.<br  /></p><center><a href='http://yen.cycu.org/images/python_md5_easygui_1.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/python_md5_easygui_1.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  /><center><a href='http://yen.cycu.org/images/python_md5_easygui_2.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/python_md5_easygui_2.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  /><center><a href='http://yen.cycu.org/images/python_md5_easygui_3.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/python_md5_easygui_3.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><blockquote>#coding=utf-8<br  /><br  />import os, sys, md5, hashlib<br  />import easygui<br  /><br  />while(1):<br  />    keyword = easygui.enterbox(msg="請輸入您要轉換的關鍵字")<br  />    if(keyword !=None):<br  />        Md5 = hashlib.md5()<br  />        Md5.update(keyword)<br  />        Md5 = Md5.hexdigest()<br  /><br  />        Sha1 = hashlib.sha1()<br  />        Sha1.update(keyword)<br  />        Sha1 = Sha1.hexdigest()<br  />        printed_text = "Md5: "+Md5+"\nSha1: "+Sha1<br  />        easygui.textbox(msg=keyword+" 的 Md5 與 Sha1 為:",text=printed_text,codebox=0)<br  />    else:<br  />        easygui.msgbox("即將退出!", ok_button="退出!")<br  />        sys.exit(0)<br  />#print 'md5:',Md5<br  />#print 'sha1:',Sha1<br  />else:<br  />    sys.exit(0)<br  /></blockquote><br  />假如是在 Python 3.0 以上的版本執行(最新版的 easygui 已經支援 Python 3.0 以上版本),則 keyword 必須先行 encode()才可以執行,修改為:<br  /><blockquote><br  />#coding=utf-8<br  /><br  />import os, sys, md5, hashlib<br  />import easygui<br  /><br  />while(1):<br  />    keyword = easygui.enterbox(msg="請輸入您要轉換的關鍵字")<br  />    if(keyword !=None):<br  />        Md5 = hashlib.md5()<br  />        Md5.update(keyword.encode("utf-8"))<br  />        Md5 = Md5.hexdigest()<br  /><br  />        Sha1 = hashlib.sha1()<br  />        Sha1.update(keyword.encode("utf-8"))<br  />        Sha1 = Sha1.hexdigest()<br  />        printed_text = "Md5: "+Md5+"\nSha1: "+Sha1<br  />        easygui.textbox(msg=keyword+" 的 Md5 與 Sha1 為:",text=printed_text,codebox=0)<br  />    else:<br  />        easygui.msgbox("即將退出!", ok_button="退出!")<br  />        sys.exit(0)<br  />#print 'md5:',Md5<br  />#print 'sha1:',Sha1<br  />else:<br  />    sys.exit(0)<br  /></blockquote> ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>開源社群的堅持與成功</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=379" />
		<modified>2009-11-08T22:17:00-05:00</modified>
		<issued>2009-11-08T22:17:00-05:00</issued>
		<created>2009-11-08T22:17:00-05:00</created>
		<id>tag:,2009:.379</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">許多人都知道,去年微軟除了資助 Apache 基金會美金 10萬元,也首度主動釋出連接 MS SQL 的驅動程式碼給 ADODB 社群,這種情形雖然不能視為開源社群的&quot;成功&quot;,但至少,連全球市值最高的軟體公司,終於體認到,開源社群不容忽視.儘管微軟近幾年來,對於開源社群所進行的諸多舉動,最終目的仍在於為自身產品的前途著想,但是無論如何,只要開源社群,堅持自由與永續發展的精神,微軟帝國的持續退守,只是時間問題.</summary>
		<dc:subject>開源社群的堅持與成功</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=379"><![CDATA[ 許多人都知道,去年微軟除了資助 Apache 基金會美金 10萬元,也首度主動釋出連接 MS SQL 的驅動程式碼給 <a href="http://adodb.sourceforge.net/"  target='_blank'>ADODB</a> 社群,這種情形雖然不能視為開源社群的"成功",但至少,連全球市值最高的軟體公司,終於體認到,開源社群不容忽視.<br  /><br  />儘管微軟近幾年來,對於開源社群所進行的諸多舉動,最終目的仍在於為自身產品的前途著想,但是無論如何,只要開源社群,堅持自由與永續發展的精神,微軟帝國的持續退守,只是時間問題.<br  /><br  /><center><a href='http://yen.cycu.org/images/microsoft_give_money1.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/microsoft_give_money1.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.cycu.org/images/microsoft_give_money2.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/microsoft_give_money2.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  /><center><a href='http://yen.cycu.org/images/microsoft_give_money3.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/microsoft_give_money3.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />過去,使用者利用 ASP+ODBC(或DSNless)+Access 的簡單網際程式,早就已經被 PHP+<a href="http://adodb.sourceforge.net/"  target='_blank'>ADODB</a>+SQLite3+<a href="https://addons.mozilla.org/zh-TW/firefox/addon/5817"  target='_blank'>SQLite Manager</a>+Firefox 所取代,而 MS SQL 在 Windows 的地位,早就已經可以用 MySQL 加以取代,甚或可以轉而使用 PostgreSQL,功能不僅沒有較差,反而得到跨平台的好處,就連 Mac OS X 的主機,都能使用.<br  /><br  />至於在單機執行的許多 C/C++ 程式開發, Windows 雖然掌握 .NET 發展的生殺大權,但是只要慎選圖形介面,無論是 Qt, wxWidget, FLTK 或者 GTK+(Glade2),都已經有專業系統的水準,而又可讓程式碼自由進出 Windows, Linux, Sloaris, OS X, 就連 IDE,無論是 CodeBlocks, Eclipse CDT,都能取代 Visual C++.<br  /><br  />而 Java 陣營就更不在乎操作系統,可以完全無視 Windows 的存在,自由靠著 Eclipse, PostgreSQL,開發各種單機與網際服務程式.<br  /><br  />總之,隨著網際網路將許許多多,屬於開源社群的正面且自由永續的資訊,不斷向全球放送,某一特定公司想要利用價值低,無法永續且毫不自由的開發方案,來操弄全球大多數的用戶,早已經是一件不可能的任務,未來幾年,微軟唯一止跌回升的機會,除了偶爾拿小錢資助自由開源社群外,最好的商業策略,就是逐步將各種手上的主力程式,一一開源出來,並且採用與其對手相同的自由永續授權方案,否則帝國的頹敗,一定指日可待.<br  /><br  />後記:<br  /><br  />其實 .NET 與 Windows 都是性能不錯的工具,只是眼看著在微軟的商業考量下,得吋進呎,百般愚弄電腦用戶,才會讓自由開源社群,視其為邪惡帝國,而最近幾年也陸續有以 .NET 開發的免費優質系統釋出, <a href="http://www.getpaint.net/"  target='_blank'>Paint.NET</a> 就是其中之一,除了無法跨平台外,功能直逼 GIMP,但是速度明顯比 GIMP 快很多. ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
	<entry>
		<title>Unladen Swallow</title>
		<link rel="alternate" type="text/html" href="http://yen.cycu.org/pivot/entry.php?id=378" />
		<modified>2009-11-08T16:55:00-05:00</modified>
		<issued>2009-11-08T16:55:00-05:00</issued>
		<created>2009-11-08T16:55:00-05:00</created>
		<id>tag:,2009:.378</id>
		<link rel="related" type="text/html" href="" title="" />
		<summary type="text/plain">Unladen Swallow (身輕如燕)是一個積極改進 Python 執行速度的系統.根據 Pyevolve 的測試, 2009年Q2 釋出的系統,果然比其他 Python 解譯系統都快.</summary>
		<dc:subject>Unladen Swallow</dc:subject>
		<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://yen.cycu.org/pivot/entry.php?id=378"><![CDATA[ <a href="http://code.google.com/p/unladen-swallow/"  target='_blank'>Unladen Swallow</a> (身輕如燕)是一個積極改進 Python 執行速度的系統.<br  /><br  />根據 Pyevolve 的<a href="http://pyevolve.sourceforge.net/wordpress/?p=862"  target='_blank'>測試</a>, 2009年Q2 釋出的系統,果然比其他 Python 解譯系統都快.<br  /><br  /></p><center><a href='http://yen.cycu.org/images/pyevolve_pyvms.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.cycu.org/images/pyevolve_pyvms.thumb.jpg" border="1" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  />這個專案是由三位 Google 公司的員工所打造(後來又加入第四位),專案啟動的原因當然是因為 Google 在內部用了許多 Python 程式(之前發現 Google 也使用 ASP), 因此讓 Python 系統能夠提升運行速度,就可以增加工作效能,由於目前所使用的源碼仍以 Python 2.X 為主,因此與最新的 CPython 3.0 並不相容. ]]></content>
		<author>
			<name>admin</name>
		</author>
	</entry>
	
	
	
</feed>