<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
	
	<channel>
		<title>嚴家銘的個人網站</title>
		<link>http://yen.mde.nfu.edu.tw/index.php</link>
		<description>國立虎尾科技大學機械設計工程系副教授</description>
		<dc:language>eng</dc:language>
		<dc:creator></dc:creator>
		<dc:rights>Copyright 2008</dc:rights>
		<dc:date>2008-10-16T20:07:43+08:00</dc:date>
		<admin:generatorAgent rdf:resource="http://www.pivotlog.net/?ver=Pivot+-+1.24.1%3A+%27Arcee%27" />
		<admin:errorReportsTo rdf:resource="mailto:rsserrors@pivotlog.net"/>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
		<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
		
		
		
		
		<item>
			<title>CodeBlocks, WinAVR與嵌入式程式</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=331</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=331#comm</comments>
			<description>這裡所要展示的,是結合 CodeBlocks 與 WinAVR,利用 CodeBlocks 整合所有 C 程式的開發,指定 WinAVR作為 iRobot Create 教育機器人所需的嵌入式程式編譯,連結與傳輸器.為了方便,採用可攜的 CodeBlocks與可攜的 WinAVR 版本.</description>
			<guid isPermaLink="false">331@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ 這裡所要展示的,是結合 CodeBlocks 與 WinAVR,利用 CodeBlocks 整合所有 C 程式的開發,指定 WinAVR作為 iRobot Create 教育機器人所需的嵌入式程式編譯,連結與傳輸器.<br  /><br  />為了方便,採用可攜的 CodeBlocks與<a href="http://www.chip45.com/index.pl?page=PortableWinAVR&amp;lang=en"  target='_blank'>可攜的 WinAVR</a> 版本.<br  /><span class="fullpost"><br  />首先,安裝或解開 CodeBlocks 與  WinAVR(可攜版必須解開至隨身碟或硬碟的根目錄),進入 CodeBlocks,在 Settings-&gt;Compilers and  Debugger,選擇 GNU AVR GCC Compiler編譯器設定,點選 Toolchain executives,在  Compiler's installation directory,輸入  WinAVR所在目錄(例如:C:\Portable\WinAVR-20080610),在 CodeBlocks 開啟新專案時,選擇 AVR  Project後,就可以選擇所使用的 AVR Processor型號(iRobot Create使用 <a href="http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf"  target='_blank'>ATmega168</a>),利用 CodeBlocks 編譯連結各種適用於 AVR晶片的嵌入式程式.<br  /><br  />以 iRobot Create 的程式開發為例,程式編譯連結完成後,透過 download.bat檔,內容為:<br  /><br  />C:\Portable\WinAVR-20080610\bin\avrdude.exe -p atmega168 -P com9 -c stk500 -U flash:w:%1<br  /><br  />可以利用download.bat avrtriangle.elf.hex, 將程式碼存入 Command Module晶片 flash空間,就可以在 Create上,按下 Reset按鈕,測試所開發的程式運作情形,以下為 CodeBlocks的設定畫面.<br  /></span><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/codeblocks_winavr_1.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/codeblocks_winavr_1.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/codeblocks_winavr_2.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/codeblocks_winavr_2.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/> ]]></content:encoded>
			<dc:subject>程式設計</dc:subject>
			<dc:date>2008-10-16T19:50:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>Windows環境下的SSL</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=330</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=330#comm</comments>
			<description>SSL(Secure Socket  Layer)是全球資訊網上的安全編碼協定,也是透過網路傳輸重要資料的最基本數位安全機制,一般的應用分為固定與可攜式主機上的設定,固定式的SSL可  以透過安全認證主機商的簽證或自行簽章,至於可攜式主機上的SSL,由於大多在工程師之間短期的傳訊之用,使用臨時的數位簽章即可.</description>
			<guid isPermaLink="false">330@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ SSL(Secure Socket  Layer)是全球資訊網上的安全編碼協定,也是透過網路傳輸重要資料的最基本數位安全機制,一般的應用分為固定與可攜式主機上的設定,固定式的SSL可  以透過安全認證主機商的簽證或自行簽章,至於可攜式主機上的SSL,由於大多在工程師之間短期的傳訊之用,使用臨時的數位簽章即可.<br  /><br  /><span class="fullpost">若以Windows環境下的Apache為例,只要下載內建SSL模組的版本(<a href="http://ftp.mirror.tw/pub/apache/httpd/binaries/win32/apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi"  target='_blank'>Apache 2.2.9/OpenSSL 0.9.8</a>),然後依照一般的安裝流程,即可啟動http模式下的Apache Server.<br  /><br  />接著透過 <a href="http://blog.roodo.com/thinkingmore/archives/4285587.html"  target='_blank'>Apache SSL on Windows</a>與<a href="http://www.madboa.com/geek/openssl/"  target='_blank'>OpenSSL Command-Line Howto</a>的說明操作,就可以加入 SSL模組,將 Apache在 https 的模式下,以自行簽署的數位金鑰及憑證啟動.<br  /><br  />bin\openssl genrsa -out ssl.key\server.key 1024<br  /><br  />的目的,在以 1024bit 的編碼,建立 RSA 格式的私人金鑰,並且將它存在 ssl.key 目錄下的 server.key 檔案中.<br  /><br  />bin\openssl req -new -x509 -key ssl.key\server.key -out ssl.crt\server.crt -config .\openssl.cnf -days 365<br  /><br  />則是利用上述的 server.key,以 X.509 的編碼,自行簽署有效期365天的憑證資料,並且將資料存在 ssl.crt 目錄下的 server.crt 檔案中.<br  /><br  />接著透過<br  /><br  />bin\httpd -k stop <br  /><br  />停止 Apache 服務<br  /><br  />bin\httpd -k uninstall<br  /><br  />移除先前的 Apache服務<br  /><br  />bin\httpd -D SSL -k install<br  /><br  />加入 SSL指令後,重新安裝 Apache 服務.<br  /><br  />bin\httpd -k start<br  /><br  />則可以重新啟動 Apache 服務.<br  /><br  />但是,在重新啟動 Apache 服務之前,必須要將上面建立好的 key 與 certificate,指到 Apache 的設定檔(httpd.conf)中.<br  /><br  />首先就是先將導入 httpd-ssl.conf 設定行前面的 # 取消,讓 httpd.conf 可以結合 httpd-ssl.conf,規範 SSL 的相關設定.<br  /><br  /># Secure (SSL/TLS) connections<br  />Include conf/extra/httpd-ssl.conf<br  /><br  />接著切記要導入 httpd.conf 中的 mod_ssl 模組,也就是將下一行原先的 # 取消,讓 Apache 啟動時,可以順便載入 SSL 模組.<br  /><br  />LoadModule ssl_module modules/mod_ssl.so<br  /><br  />最後則是修改 httpd-ssl.conf 設定檔,<br  /><br  />也就是確定 certificate 與 key 的目錄設定,能夠與實際擺放 server.crt 與 server.key 的位置配合.<br  /><br  />SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl.crt/server.crt"<br  /><br  />SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl.key/server.key"<br  /><br  />再  次啟動 Apache 服務之前,或許要修改一下 httpd.conf 中各 Options 的設定,全部改為 None,以避免某些目錄下沒有  Default Index 檔案時,不至於將目錄結構暴露在外,然後就可以打開各階層防火牆的 443 埠號,讓瀏覽器可以透過 https 連接至  Apache.<br  /><br  />至於可攜式的 SSL,則可以使用 <a href="http://www.stunnel.org/"  target='_blank'>Stunnel</a>,只要確定 stunnel.conf 中的 [https] 設定,能夠與希望啟動的埠號對應,就可以完成設定.<br  /><br  />以下列設定為例:<br  /><br  />[https]<br  />accept  = 443<br  />connect = 8080<br  />TIMEOUTclose = 0<br  /><br  />Stunnel  啟動後,會自動將 8080 埠號的所有資料,轉到 443,也就是說,原本必須透過 http://localhost:8080  連接的資料,可以經由 Stunnel 轉介為 https://localhost,客戶端輸入表單的資料,就會透過 SSL  編碼後傳送,以爭取最基本的數位資料傳遞安全.</span> ]]></content:encoded>
			<dc:subject>企業電子化</dc:subject>
			<dc:date>2008-10-16T19:49:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>AutoDesk Inventor 2008網路版安裝</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=329</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=329#comm</comments>
			<description>安裝網路版的 AutoDesk Inventor Professional1.在配置時確定安裝單機版或網路版.2.安裝網路版Client過程中,只能先行選用某一Server的主機名稱,在此內定使用同一網域下的某一台Server名稱,暫定為myserver.3.安裝完畢後,此一myserver的相關硬體與認證資料,會被寫入bin/LICPATH.LIC.4.根據Server上的License,修改步驟3的前三行,取用Server的IP MAC Port等資訊.</description>
			<guid isPermaLink="false">329@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ 安裝網路版的 AutoDesk Inventor Professional<br  /><br  />1.在配置時確定安裝單機版或網路版.<br  /><br  />2.安裝網路版Client過程中,只能先行選用某一Server的主機名稱,在此內定使用同一網域下的某一台Server名稱,暫定為myserver.<br  /><br  />3.安裝完畢後,此一myserver的相關硬體與認證資料,會被寫入bin/LICPATH.LIC.<br  /><br  />4.根據Server上的License,修改步驟3的前三行,取用Server的IP MAC Port等資訊.<br  /><br  />AutoDesk Inventor網路版支援三種認證模式,依序為:<br  /><br  />1.透過環境變數 ADSKFLEX_LICENSE_FILE<br  />格式:port@認證主機;<br  /><br  />2.透過組態設定,將主機資料存到:<br  />  <br  />  HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm License Manager\ADSKFLEX_LICENSE_FILE<br  /><br  />3.bin目錄下的認證檔案LICPATH.LIC ]]></content:encoded>
			<dc:subject>協同設計</dc:subject>
			<dc:date>2008-10-16T19:25:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>IIS與Tomcat結合設定</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=327</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=327#comm</comments>
			<description>基本上是將IIS與Tomcat,透過Tomcat-connectors(JK)結合應用,讓JSP可以經過isapi_redirect.dll的轉介,將處理結果經由IIS傳回瀏覽器.設定的觀念是:1. IIS透過虛擬目錄啟動isapi-redirect.dll,透過後台的localhost:8009,將Tomcat的資料localhost:8080,經由redirect轉介到localhost:888,其中isapi-redirect.dll必須能在IIS環境下,以ISAPI的方式執行,然後再經過registry與workers.properties及uriworkermap.properties的設定,按照對應協定與目錄的設定,以上述的backend機制傳送封包值,讓IIS可以經由轉介程式,送出瀏覽器所要求的資料.2.先確認Tomcat的執行正常後,再啟動IIS,以便測試redirector是否成功按照設定在背後轉介正確的資料.</description>
			<guid isPermaLink="false">327@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ 基本上是將IIS與Tomcat,透過<a href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/"  target='_blank'>Tomcat-connectors</a>(JK)結合應用,讓JSP可以經過isapi_redirect.dll的轉介,將處理結果經由IIS傳回瀏覽器.<br  /><br  />設定的觀念是:<br  /><br  />1. IIS透過虛擬目錄啟動isapi-redirect.dll,透過後台的localhost:8009,將Tomcat的資料localhost:8080,經由redirect轉介到localhost:888,其中isapi-redirect.dll必須能在IIS環境下,以ISAPI的方式執行,然後再經過registry與workers.properties及uriworkermap.properties的設定,按照對應協定與目錄的設定,以上述的backend機制傳送封包值,讓IIS可以經由轉介程式,送出瀏覽器所要求的資料.<br  /><br  />2.先確認Tomcat的執行正常後,再啟動IIS,以便測試redirector是否成功按照設定在背後轉介正確的資料.其中,workers.properties與uriworkermap.properties位於c:\tomcat55\conf目錄下,且最基本的設定參考檔如下:<br  /><br  />workers.properties<br  /><br  />#----<br  />worker.ajp13.type=ajp13 <br  />worker.list=ajp13 <br  />worker.ajp13.port=8009<br  />worker.ajp13.host=localhost<br  />#----<br  /><br  />uriworkermap.properties<br  /><br  />#----<br  />/portal=ajp13 <br  />/portal/*=ajp13 <br  />/library=ajp13<br  />/library/*=ajp13<br  />#---- ]]></content:encoded>
			<dc:subject>企業電子化</dc:subject>
			<dc:date>2008-03-16T15:39:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>IIS下執行CMSimple</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=324</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=324#comm</comments>
			<description>對於已經在Windows 2003 Server中安裝IIS與MS 2005 SQL Server的用戶,只要讓IIS透過CGI或ISAPI的界面執行PHP,就可以在.NET的程式環境下,同時使用CMSimple.CMSimple延伸程式中使用ADODB編寫的PHP資料庫程式,也能夠直接由MySQL或SQLite轉到SQL Server下使用,這樣的混用環境,不僅可以讓.NET與LAMP的各種程式,同時存在,未來,也能夠設法透過IronPython與Mono-Project的引領,讓使用者不至於因為轉移電腦軟硬體環境,而無法發揮先前異質技術的優勢.首先談IIS的安裝與啟動.</description>
			<guid isPermaLink="false">324@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ 對於已經在Windows 2003 Server中安裝IIS與MS 2005 SQL Server的用戶,只要讓IIS透過CGI或ISAPI的界面執行PHP,就可以在<a href="http://www.microsoft.com/taiwan/net/"  target='_blank'>.NET</a>的程式環境下,同時使用<a href="http://cmsimple.cycu.org/"  target='_blank'>CMSimple</a>.<br  /><br  /><a href="http://cmsimple.cycu.org/"  target='_blank'>CMSimple</a>延伸程式中使用<a href="http://adodb.sourceforge.net/"  target='_blank'>ADODB</a>編寫的PHP資料庫程式,也能夠直接由MySQL或SQLite轉到SQL Server下使用,這樣的混用環境,不僅可以讓<a href="http://www.microsoft.com/taiwan/net/"  target='_blank'>.NET</a>與<a href="http://zh.wikipedia.org/wiki/LAMP"  target='_blank'>LAMP</a>的各種程式,同時存在,未來,也能夠設法透過<a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython"  target='_blank'>IronPython</a>與<a href="http://www.mono-project.com/"  target='_blank'>Mono-Project</a>的引領,讓使用者不至於因為轉移電腦軟硬體環境,而無法發揮先前異質技術的優勢.<br  /><br  />首先談IIS的安裝與啟動.<p><br  /><br  />Windows 2003 Server R2內定安裝完成後,只要透過,開始-&gt;系統管理工具-&gt;管理您的伺服器,就可以利用"新增或移除角色",完成"應用程式伺服器 (IIS,ASP.NET)"的設定.<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_1.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_1.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_2.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_2.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />一旦IIS正確啟動,使用者就可以經由利用瀏覽器檢視"預設的網站內容".<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_3.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_3.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />接著,要讓IIS伺服器執行PHP程式,必須完成以下兩階段的配置與設定:<br  /><br  />1. 配置PHP程式環境,使IIS能夠正確經由php5isapi.dll,執行PHP程式.<br  /><br  />    1-a. 首先下載最新的php-5.2.5-Win32.zip,將程式解開至c:\php-5.2.5目錄,新增c:\php-5.2.5\至系統的環境變數Path中,以便讓IIS能夠直接啟動該路徑下的php5isapi.dll (儘量不要將c:\php-5.2.5\目錄下的.dll直接複製到system32目錄下,以免造成日後PHP升級上的困擾).<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_4.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_4.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />    1-b. 設定c:\php-5.2.5\php.ini (由php.ini-dist複製),將cgi.force_redirect設為0,將session.save_path設為/tmp,將extension_dir設為c:\php-5.2.5\ext,其餘各項PHP的設定,與在Apache環境下的php.ini設定相同.<br  /><br  />    1-c. 讓啟動IIS的Guest帳號 (IUSR_機器名稱),能夠"讀取並執行"c:\php-5.2.5目錄下的程式,設定時,以滑鼠右鍵選擇c:\php-5.2.5目錄內容,透過"安全性-&gt;新增-&gt;進階-&gt;立即尋找",就可以指定"IUSR_機器名稱"的用戶,然後賦予其"讀取及執行"的權限.</p>  <p>(備註:若使用Windows XP(即Internet Information Service),則必須在檔案資料夾中,透過工具-&gt;資料夾選項-&gt;檢視,取消"使用簡易檔案共用(建議使用)"之勾選,才能在檔案夾的內容中,顯示"安全性"選項,並且以滑鼠右鍵所顯示的"屬性"設定,並無法改變WindowsXP環境下檔案或目錄的真實屬性,必須透過Attrib指令才能更改設定,其餘設定與Windows 2003 Server相同)<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_5.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_5.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_6.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_6.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />    1-d. 相同於c.的設定,讓"IUSR_機器名稱"用戶,可以將PHP程式session資料存取至c:\tmp,同時也設定<a href="http://cmsimple.cycu.org/"  target='_blank'>CMSimple</a>系統下,必須讓"IUSR_機器名稱"有權限讀取,執行或寫入的檔案或目錄權限設定,例如:cmsimple/log.txt,cmsimple/config.php,content/content.htm等檔案.<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_7.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_7.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_8.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_8.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_9.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_9.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />2. 設定IIS環境,使W3伺服器能夠辨識PHP程式,然後交由php5isapi.dll進行處理.<br  /><br  />    2-a. 在預設的網站下,設定isapi對應.php,以"預設網站-&gt;內容-&gt;主目錄-&gt;設定-&gt;新增",將.php附檔名,對應至c:\php-5.2.5\php5isapi.dll執行檔路徑.<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_10.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_10.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />    2-b. 在網頁延伸服務,設定isapi對應php,以"網頁服務延伸-&gt;新增網頁服務延伸-&gt;新增PHP網頁服務延伸內容".<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_11.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_11.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />    2-c. 在預設的網站內容,增加內定文件對應index.php,以"預設網站-&gt;內容-&gt;文件-&gt;新增",讓IIS能夠使用index.php作為網際文件的預設內容頁.<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_12.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_12.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />完成上列設定後,便可以在IIS的環境下,使用<a href="http://cmsimple.cycu.org/"  target='_blank'>CMSimple</a>.<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_13.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/iis_cmsimple_20071214_13.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/></p>最後,IIS與PHP結合使用時,截至目前的版本,php5isapi.dll仍會到Windows目錄下抓取php.ini而不會使用c:\php安裝目錄下的php.ini設定檔. ]]></content:encoded>
			<dc:subject>CMSimple</dc:subject>
			<dc:date>2007-12-14T10:30:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>再談Windows下的Proxy Server</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=323</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=323#comm</comments>
			<description>Windows環境下的代理伺服器(Proxy Server),功能最好的,首推Squid,而常見的Apache W3伺服器,雖然也可被設為具有Cache功能的代理主機,但在設定上都需要花一定的時間,之前已經提過,在Windows環境下使用3proxy,可以建立最簡便的Proxy Server,並且可以利用一行的批次指令,啟動Server.</description>
			<guid isPermaLink="false">323@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ Windows環境下的代理伺服器(Proxy Server),功能最好的,首推<a href="http://www.serassio.it/SquidNT.htm"  target='_blank'>Squid</a>,而常見的<a href="http://www.apache.org"  target='_blank'>Apache</a> W3伺服器,雖然也可被設為具有Cache功能的代理主機,但在設定上都需要花一定的時間,之前已經<a href="http://yen.mde.nfu.edu.tw/pivot/entry.php?id=256"  target='_blank'>提過</a>,在Windows環境下使用<a href="http://3proxy.ru/"  target='_blank'>3proxy</a>,可以建立最簡便的Proxy Server,並且可以<a href="http://yen.mde.nfu.edu.tw/pivot/entry.php?id=204"  target='_blank'>利用</a>一行的批次指令,啟動Server.<br  /><br  />也就是在Dos命令提示字元列,執行<br  /><br  />proxy.exe -p3128 -a <br  /><br  />就可以在port 3128啟動anonymous 模式下的proxy server.<br  /><br  />但是若希望將此一無Cache功能的伺服程式設為系統下的Service,還是得要有個設定檔,然後將3Proxy安裝為系統的服務.<br  /><br  />其次,假如希望讓前面這一行的Dos指令,也能透過Service的模式加以管理,就需要instsrv.exe與srvany.exe的協助,這兩支程式可以從微軟的Resource Kit Tools網頁中<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en"  target='_blank'>下載</a>.<br  /><br  />使用的方法很簡單,只要將proxy.exe -p3128 -a 存檔為start_proxy.bat,然後在Dos的指令區中,設定c:\start_proxy.bat為Windows Service,名稱設為SimpleProxyServer,步驟如下:<br  /><br  />c:\instsrv.exe SimpleProxyServer c:\start_proxy.bat<br  /><br  />然後利  用c:\regedit  進入Windows組態設定,在SimpleProxyServer項下,加入Parameters機碼,並在Parameters機碼下設  Application字串值,並將Application字串值設為c:\start_proxy.bat<br  /><br  />之後,就可以利用系統的服務加以管理這個自定的SimpleProxyServer.<br  /><br  />下載<a href="http://yen.mde.nfu.edu.tw/pivot/download/simpleproxy.zip"  target='_blank'>simpleproxy.zip</a><br  /><br  />最後,無論利用哪一種Proxy Server,只要是橫跨兩個不同IP Class的主機,與客戶近端的Defalut Gateway必須空白,然後將Proxy伺服器設定好之後,讓網路封包經由另外一組網路連線進入廣域網路,就可以達到代理連線的目的. ]]></content:encoded>
			<dc:subject>企業電子化</dc:subject>
			<dc:date>2007-10-24T21:58:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>Matlab R2007b與Desktop啟動</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=322</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=322#comm</comments>
			<description>這個月工學院&quot;終於&quot;採購了7.5版的Matlab軟體(R2007b),外帶Control, Image與Symbolic等三個Toolbox,雖然多年來上課都已改採Octave與Maxima取代,但是,能夠在睽違十幾年之後,由記憶中的Mac版本轉為Windows版本,看到以Java編寫的GUI Desktop,感覺還是非常親切.R2007b版已經自帶最新的jre1.6.0,只是在安裝授權主機時,並非由授權單位直接加註主機名稱與鎖卡的資料,而是全部委由安裝程式代為進行.</description>
			<guid isPermaLink="false">322@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ 這個月工學院"終於"採購了7.5版的Matlab軟體(R2007b),外帶Control, Image與Symbolic等三個Toolbox,雖然多年來上課都已改採<a href="http://www.octave.org"  target='_blank'>Octave</a>與<a href="http://maxima.sourceforge.net/"  target='_blank'>Maxima</a>取代,但是,能夠在睽違十幾年之後,由記憶中的Mac版本轉為Windows版本,看到以Java編寫的GUI Desktop,感覺還是非常親切.<br  /><br  />R2007b版已經自帶最新的jre1.6.0,只是在安裝授權主機時,並非由授權單位直接加註主機名稱與鎖卡的資料,而是全部委由安裝程式代為進行.<br  /><br  />客戶端的安裝也很簡單,只要輸入PLP(Personal License Password)與管理者配置好的license.dat,就可以順利完成.<br  /><br  />唯一碰到的問題,是當客戶端採用NVidia顯示卡時(HP工作站),若未能載入設定檔(內定為"無"),以Java編寫的Desktop在啟動時,因為無法得知顯示的設定參數,連錯誤訊息都來不及留下(反而將jre轉至錯誤路徑或不相容的版本時,會轉而啟動Command Window,因此判斷可能不是Matlab程式本身的問題),就快速取得授權之後,馬上又釋出授權.<br  /><br  />解決的方法,是啟用"控制台-&gt;NVIDIA nView Desktop Manager",並載入某一設定檔(畫面中以"default"設定檔為例),就可以順利啟動Matlab Desktop.<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/matlab_r2007b_nvidia_setup1.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/matlab_r2007b_nvidia_setup1.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/matlab_r2007b_nvidia_setup2.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/matlab_r2007b_nvidia_setup2.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />最後,假如將某一已經安裝完成的客戶端目錄直接取下,就可以成為"免安裝"的版本,執行時,只要確定網路可以連至於授權主機(開啟授權連線所需的埠號),將在第一次啟動時安裝Visual C++ 2005版本所需要的dll,之後就可以正常使用. ]]></content:encoded>
			<dc:subject>網路技術</dc:subject>
			<dc:date>2007-10-19T17:08:00+08:00</dc:date>
		</item>
		
		
		
		<item>
			<title>周蟒與RURple</title>
			<link>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=321</link>
			<comments>http://yen.mde.nfu.edu.tw/pivot/entry.php?id=321#comm</comments>
			<description>周蟒是一套允許使用者以中文編寫Python程式的電腦語言,所採用的方法為Python關鍵字的翻譯對照,因此程式可以混用英文,簡繁體中文,日文,甚至是韓文,好處是,可以降低非英語系國家初學用戶,對於純英文電腦程式的排斥與隔閡感,並且隨著英文程度的提升與國際化的需求,逐步接軌至純英文的開放資源與使用環境.想像一下,假如未來的工程師可以使用中文程式延伸各種MCAD的功能,或者結合周蟒與Blender建立新產品互動系統,產量一定比現在更好.</description>
			<guid isPermaLink="false">321@http://yen.mde.nfu.edu.tw/</guid>
			<content:encoded><![CDATA[ <a href="http://code.google.com/p/zhpy/"  target='_blank'>周蟒</a>是一套允許使用者以中文編寫Python程式的電腦語言,所採用的方法為<a href="http://www.python.org"  target='_blank'>Python</a>關鍵字的翻譯對照,因此程式可以混用英文,簡繁體中文,日文,甚至是韓文,好處是,可以降低非英語系國家初學用戶,對於純英文電腦程式的排斥與隔閡感,並且隨著英文程度的提升與國際化的需求,逐步接軌至純英文的開放資源與使用環境.<br  /><br  />想像一下,假如未來的工程師可以使用中文程式延伸各種MCAD的功能,或者結合<a href="http://code.google.com/p/zhpy/"  target='_blank'>周蟒</a>與<a href="http://www.blender.org/"  target='_blank'>Blender</a>建立新產品互動系統,產量一定比現在更好.<br  /><br  />只不過,<a href="http://code.google.com/p/zhpy/"  target='_blank'>周蟒</a>跨平台的特性,對於一般機械設工程師來說,助益不大,因為業界常用的幾套3D繪圖與工程分析軟體,都只能在Windows環境中使用,因此就嘗試讓周蟒與RURple結合,並透過Solid Edge的互動,建立中英文混用的二次開發程式(因為API中的英文函式名稱已經固定,除非再以translator轉為中文).<br  /><br  />其中,<a href="http://code.google.com/p/zhpy/"  target='_blank'>周蟒</a>內定UTF-8輸入與出的轉碼方式,改為UTF-8輸入,但輸出則視Windows系統而定(一般XP標準中文輸出為Big-5),並且將RURple的編輯器內文,改為由zhpy.zh_exec(user_code)取代原有的exec user_code,程式修改的部分如下:<br  /><br  />zhpy.py中convertor程式修改,<br  />...<br  />    result = pythonWord.transformString(utest)<br  />    # 假如要在RURple(Windows XP系統)中使用,則必須要蓋掉下一行,讓程式自行選擇<br  />    <b>#result = result.encode("utf8")</b><br  />    return result<br  />...<br  />RURple editor.py程式修改,<br  />...<br  />import zhpy<br  />...<br  />    def RunProgram(self, event):  <br  />        user_code = self.GetText()<br  />        # Yen add .encode('utf-8')<br  />        user_code = parser.FixLineEnding(user_code<b>.encode('utf-8')</b>)<br  />        #redirect stdout/sdterr by redefining them<br  />        self.parent.log.redirect() <br  />        self.parent.log.Clear()<br  />        myGlobals = globals()<br  />        myGlobals['raw_input'] = self.myRawInput<br  />        myGlobals['input'] = self.myInput<br  />        # To ensure that the usual if '__name__' == '__main__' works...<br  />        myGlobals['__name__'] = '__main__'<br  />        # Yen modified from <b>exec user_code in myGlobals</b><br  />        <b>zhpy.zh_exec(user_code) in myGlobals</b><br  />        self.parent.log.redirect('reset')<br  />...<br  /><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/zhpy_rurple_se_20071015_1.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/zhpy_rurple_se_20071015_1.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/zhpy_rurple_se_20071015_2.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/zhpy_rurple_se_20071015_2.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><center><a href='http://yen.mde.nfu.edu.tw/images/zhpy_rurple_se_20071015_3.jpg'  style='border: 0;' target="_self"  class='pivot-popuptext' ><img src="http://yen.mde.nfu.edu.tw/images/zhpy_rurple_se_20071015_3.thumb.jpg" border="0" alt="" title=""  class='pivot-popupimage'/></a></center><br/><br  /><br  />測試的程式如下:<br  /><br  /># 繪圖應用.py<br  />#<br  />#本程式旨在展示如何透過Python與win32物件,建立三個內定參考平面上的同心圓<br  />#並利用Circle物件的Area變數取得圓的面積(demo功能用,實際應用時,可計算非標準幾何形狀的物理特性值)<br  /><br  />#輸入win32com<br  />導入 win32com.client<br  /><br  />印出 u"本程式畫出九個圓,並計算其面積與周長"<br  />#建立SolidEdge物件<br  />繪圖 = win32com.client.Dispatch('SolidEdge.Application')<br  />文件 = 繪圖.Documents.Add('SolidEdge.PartDocument')<br  />繪圖.Visible=1<br  /><br  />文件 = 繪圖.ActiveDocument<br  /># 建立畫圓物件集合<br  />#請注意,這裡的第一個Add(),在Python中必須使用小括號,不可以如VB中予以省略<br  />#首先在編號為1的參考面上畫圓<br  />圓 = 文件.ProfileSets.Add().Profiles.Add(文件.RefPlanes(1)).Circles2d<br  /># 利用for 迴圈繪製同心圓<br  />取 索引 自 範圍(1,10):<br  />#vb-Set objCirc1 = objCircs.AddByCenterRadius(x:=0.25, y:=0.25, Radius:=0.06)<br  />    第一圓 = 圓.AddByCenterRadius(0,0,0.06*索引)<br  /><br  />#接著在編號為2的參考面上畫圓<br  />#請注意,這裡的第一個Add(),在Python中必須使用小括號,不可以如VB中予以省略<br  />第二圓 = 文件.ProfileSets.Add().Profiles.Add(文件.RefPlanes(2)).Circles2d<br  /># 利用for 迴圈繪製同心圓<br  />取 索引 自 範圍(1,10):<br  />#vb-Set objCirc1 = objCircs.AddByCenterRadius(x:=0.25, y:=0.25, Radius:=0.06)<br  />    畫第二圓 = 第二圓.AddByCenterRadius(0,0,0.06*索引)<br  /><br  />#最後在編號為3的參考面上畫圓<br  />#請注意,這裡的第一個Add(),在Python中必須使用小括號,不可以如VB中予以省略<br  />第三圓 = 文件.ProfileSets.Add().Profiles.Add(文件.RefPlanes(3)).Circles2d<br  /># 利用for 迴圈繪製同心圓<br  />取 索引 自 範圍(1,10):<br  />#vb-Set objCirc1 = objCircs.AddByCenterRadius(x:=0.25, y:=0.25, Radius:=0.06)<br  />    畫第三圓 = 第三圓.AddByCenterRadius(0,0,0.06*索引)<br  />#利用Area變數,取得各圓的面積<br  />    第三圓面積 = 畫第三圓.Area<br  />#利用Circumference變數,取得各圓的外圍長度<br  />    第三圓周長 = 畫第三圓.Circumference<br  />#可以呼叫Delete(),刪除先前所畫的圓<br  />    如果 (索引%2==0):<br  />        畫第三圓.Delete()<br  />    印出 u"第", 索引, u"圓面積 = ", 第三圓面積<br  />    印出 u"第", 索引, u"圓周長 = ", 第三圓周長<br  />#取得圓物件的圓心座標<br  />圓心座標 = 畫第三圓.GetCenterPoint()<br  />#取得圓心的x座標值與y座標值<br  />印出 u"圓心x座標", 圓心座標[0], u"圓心y座標", 圓心座標[1]<br  />#取得圓的KeyPointCount變數<br  />印出 畫第三圓.KeyPointCount<br  />印出 u"已經完成" ]]></content:encoded>
			<dc:subject>程式設計</dc:subject>
			<dc:date>2007-10-15T18:23:00+08:00</dc:date>
		</item>
		
		
		
	</channel>
</rss>