發表文章

目前顯示的是有「程式設計」標籤的文章

AngularJS 學習

http://blog.miniasp.com/post/2013/04/24/Front-end-Engineering-Fineart-An-Introduction-to-AngularJS.aspx http://ithelp.ithome.com.tw/question/10133017 http://jsbin.com/jitugoyipo/1/edit?html,output

Visual Studio 2008 安裝 OpenCV 2.4.6

http://jimju319.blogspot.tw/2013/08/visual-studio-2008-opencv-246.html 2.設定電腦中PATH環境變數 我的電腦->(右鍵)->內容->進階->環境變數->系統變數:Path 新增兩處 D:\desktop\opencv2_4_6\opencv\build\x86\vc9\bin; D:\desktop\opencv2_4_6\opencv\build; project setting configuration properties (release)   c/c++=>additional include directories      "C:\opencv\build\include";"C:\opencv\build\include\opencv";"C:\opencv\build\include\opencv2"   linker=>dditional library directories      "C:\opencv\build\x86\vc9\lib";"C:\opencv\build\x86\vc9\staticlib"   linker=>input=>additional dependencies      opencv_calib3d246.lib opencv_contrib246.lib opencv_core246.lib opencv_features2d246.lib opencv_flann246.lib opencv_gpu246.lib opencv_highgui246.lib opencv_imgproc246.lib opencv_legacy246.lib opencv_ml246.lib opencv_nonfree246.lib opencv_objdetect246.lib opencv_photo246.lib opencv_stitching246.lib opencv_ts246.lib opencv_video246.lib opencv_...

bash for 迴圈

for fileDir in 1 2; do rm ./$fileDir/*.mann; done; for ((i=1;i<=20;i=i+1)) ;    do rm ./$i/*.txt; done

用C寫matlab function

在 Matlab 的 Command Window 輸入 mex -setup #include #include"mex.h" void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { printf("Hello, world.\n"); } 存成 hello.c 在 Command Window 輸入 mex hello.c hello

windows mysql 忘記密碼

open cmd >> .\mysqld.exe --skip-grant-tables open a new cmd >> .\mysql.exe -uroot -p enter mysql> update mysql.user set password=PASSWORD('yourpasswd') where User='root'; mysql> flush privileges;

以 CGI or wsgi 的方式執行 Python

reference http://blog.xuite.net/autosun/study/42871538-%5BUbuntu%5D+%E5%AE%89%E8%A3%9D+Apache2+%2B+Python+%2B+MySQL   Python 也可以 CGI 的方式來執行,首先,我們寫了一個簡單的 Hi Python 程式,儲存成 /var/www/cgi-bin/hi.cgi #!/usr/bin/python print "Content-type: text/html\n\n" print "Hi, Python."   其中,第一行是指定 Python 直譯器的版本,在此這行非常重要,如果沒有加入這行,那系統不知道該用哪種方式去執行該份文件,儲存完畢後修改權限為可執行    sudo chmod a+x hi.cgi 在瀏覽器中鍵入 http://127.0.0.1/cgi-bin/hi.cgi,就可以顯示出 Hi, Python. 了 一般 Python 執行指令為 python 檔名.py 加入此行、並修改權限後可用 ./檔名.py 的方式執行 在 /etc/apache2/httpd.conf 中加入 AddHandler cgi-script .cgi .py 重新啟動 Apache 後,則 Apache 也可將 .py 檔視為 CGI 來執行,因此上述 hi.cgi 可改成 hi.py,接著在瀏覽器中鍵入 http://127.0.0.1/cgi-bin/hi.py,就可以顯示出 Hi, Python. 了 以wsgi 執行python 在 python.conf加入 == LoadModule wsgi_module modules/mod_wsgi.so DirectoryIndex  index.wsgi default.wsgi index.py default.py WSGIPythonPath "{$path}\python" WSGIPythonHome "{$path}\python\Lib;{$path}\python\Lib\site-packages;{$path}\python...

Windows xp 安裝 Apache with HTTPS (SSL)

reference http://blog.changyy.org/2009/05/windows-apache-with-https-ssl-windows-xp.html 建立憑證 openssl genrsa -des3 -out server.key 2048 openssl req -new -key server.key -out server.csr openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt openssl rsa -in server.key -out server.key 以 Windows XP 為例,預設的 Apache HTTP Server 2.2.11 安裝目錄是 "C:\Program Files\Apache Software Foundation\Apache2.2",以該目錄為基準,簡寫為 "~\Apache2.2" 所謂的 openssl 是在 "~\Apache2.2\bin\openssl.exe" 上述部份指令執行時會說找不到 config 檔案,config 檔是在 "~\Apache2.2\conf\openssl.cnf" ,請多加參數 -config "~\Apache2.2\conf\openssl.cnf" 切換到 "~\Apache2.2" 去執行上述指令,如 cmd mode 下執行 bin\openssl genrsa -des3 -out server.key 4096  碰到要增加 config 則用  -config conf\openssl.cnf 囉 建立 server.key 時記得輸入一下密碼,該密碼後面還會詢問到。 簡單的詢問範例,"()"內不用打,是簡單的敘述註解 Country Name (2 letter code) [AU]:TW State or Province Name (full name) [Some-State]:Taiwan Locality Name...

JavaScript and SQL 教學網頁資源

http://taiwantc.com/js/index.html http://www.1keydata.com/tw/sql/sql.html

Use EditPlus for PHP

 http://www.editplus.com/download.html  This option is under View > Code Folding (Ctrl+shift+F)

Eclipse環境設定

文摘 http://www.ewdna.com/2011/09/eclipse.html http://itekblog.com/code-folding-in-eclipse-tutorial/ folding tools The Coffee-Bytes plugin by Alex Popescu can add folding functionality to Eclipse IDE. download link is here . the .zip file should contain a “com.cb.eclipse.folding” folder. extract it to “eclipse\plugins”, so you should have now a “c:\eclipse\plugins\com.cb.eclipse.folding\” folder with several files inside. Is there a way to collapse all code blocks in Eclipse? There is a hotkey, mapped by default to Ctrl+Shift+NUM_KEYPAD_DIVIDE. You can change it to something else via Window -> Preferences, search for "Keys", then for "Collapse All". To open all code blocks the shortcut is Ctrl+Shift+NUM_KEYPAD_MULTIPLY. go to line number N in the source file: Ctrl + L in Eclipse you can use Shift+Alt+↑ to mark the surrounding block to the current block (and Shift+Alt+↓ to narrow down again). Then ← will place you at the beginning of the block...

如何開啟phpJavabriadge

php/java bridge 安裝教學 參考文獻 http://etcse888.blogspot.tw/2010/10/phpjava-bridge.html php-java-bridge 是可以讓PHP在Server端和Java溝通的工具 即是可以在PHP裡直接使用JAVA編譯好的class檔 1、首先確定你的PHP和Apache伺服器及JDK(or JRE也可)都已安裝完成 2、上網下載php-java-bridge (http://sourceforge.net/project/showfiles.php?group_id=117793 ) 3、將下載回來的 php-java-bridge解壓縮,解壓後資料匣裡會有一個JavaBridge.war,再同樣將這個JavaBridge.war解壓縮 4、解壓後可從 WEB-INF資料匣裡的cgi資料匣找到java-x86-windows.dll,及WEB-INF資料匣裡的lib資料匣找到JavaBridge.jar 5、將java-x86-windows.dll和JavaBridge.jar 複制到PHP的外掛資料匣(我這邊是C:\AppServ\php\ext),並將java-x86-windows.dll改成php_java.dll 6、修改php.ini檔案 如果php.ini原本沒有以下內容,請自行加上,如果原本就有以下內容,請修改成如下 extension=php_java.dll [Java] java.socketname = 9267 java.java = C:\Program Files\Java\jdk1.5.0_08\bin\java java.java_home = C:\Program Files\Java\jdk1.5.0_08 java.java = C:\Program Files\Java\jre1.5.0_07\bin\javaw java.java_home = C:\Program Files\Java\jre1.5.0_07 java.log_level = 2 7、重新起動Apache 8、從解壓的JavaBridge.war資料匣裡找到test.php,把它放到Apache伺服器的網頁目錄下去執行(ex: http://...

不需 server TortoiseSVN 應用及設定

簡單 SVN (Subversion , TortoiseSVN)應用及設定 在完全個人的環境下,在沒有多人共用及網路的需求下 參考文件 http://blog.jostudio.net/2006/12/svn-subversion-tortoisesvn.html "其實不需要 Subversion 去架設Server ,僅僅使用 TortoiseSVN 即可 可以在自己電腦上進行檔案版本的控制, 不過建議至少要兩顆以上硬碟,並將檔案庫及工作目錄分開放置 假設工作目錄為 C:\MyDocuments ,檔案庫目錄為 D:\SVN 首先先到 TortoiseSVN 的官方網站下載最新版軟體 並且安裝 建立好目錄後,在檔案總管 D:\SVN 當中 按下滑鼠右鍵 選擇 TortoiseSVN ->在此建立檔案庫 選擇原生檔案系統 按下確定 再來到 C:\MyDocuments 按下滑鼠右鍵選擇 SVN取出 (SVN Check Out) 在檔案庫URL中輸入 "file:///D:/SVN" (或是點擊 "..."按鈕直接選取) 按下確定完成第一次的Check Out 之後就可以在 C:\MyDocuments 目錄下進行工作 另外 記得 D:\SVN目錄要備份定時備份"

HEVC development resource

HEVC 是由JCT-VC (Joint Collaborative Team) 所制定,是結合兩個國際標準主組織MPEG與ITU(H.264)來制定的下一代視訊壓縮標準(Video Compression Standard)(Video Coding Standard) HEVC chair 的會議紀錄 http://wftp3.itu.int/av-arch/jctvc-site/ JCT-VC 文件管理系統 http://phenix.int-evry.fr/jct/ HEVC reference software下載網址 (source code) https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/ http://hevc.kw.bbc.co.uk/ HEVC 的reflector,很多的討論都在上面,有興趣的人可以去訂閱 jct-vc@lists.rwth-aachen.de http://mailman.rwth-aachen.de/mailman/listinfo/jct-vc HEVC的 wiki http://en.wikipedia.org/wiki/High_Efficiency_Video_Coding HEVC paper "Overview of the High Efficiency Video Coding (HEVC) Standard" My contribution in H265: New functional block -- Sample Adaptive Offset C.-M. Fu, E. Alshina, A. Alshin, Y.-W. Huang, C.-Y. Chen, C.-Y. Tsai, C.-W. Hsu, S. Lei, J. H. Park, and W.-J. Han, "Sample adaptive offset in the HEVC standard," IEEE Trans. Circuits Syst. Video Technol. 2012. [ PDF ] ITU 265 網頁 http://www.itu.int/rec/T-REC-H.265 PDF (acrob...

Porting MFC applications to Linux

圖片
A step-by-step guide to using wxWindows Level: Introductory Markus Neifer ( howlingmad@users.sourceforge.net ), Software engineer 01 Apr 2002 Porting Windows applications to Linux doesn't have to involve a retraining nightmare. Markus Neifer shows how to port MFC using wxWindows, giving a user's guide to this open source GUI toolkit and providing a complete, step-by-step porting example. Still maintaining that legacy Windows application built using Microsoft Foundation Classes (MFC), but now you have clients requesting a Linux version? You may have highly skilled MFC developers on your team, but how do you come up to speed with Linux development? Don't panic; this article is for you. With the help of wxWindows, a portable GUI toolkit for C++ and Python, I'll show you how to port a Windows-only MFC application to Linux using a Multiple Document Interface (MDI) text editor as an example. A small application like this helps focus the discussion on the n...