慘慘慘...
2014年9月29日 星期一
Eclipse 搬家
因為 Omondo 之 EclipseUML 不能在 Eclipse 4.4 中執行
直接搬舊的版本到新電腦
1.按 Menu/Window/Preferences
2.選 Server/Runtime Environments
3.選擇 Apache Tomcat v6.0
4.按 Edit...
5.按 Browse...
6.重新選擇 Tomcat installation directory
1.按 Menu/Project/Properties
2.選 Java Build Path
3.選 Libraries 頁簽
4.移除 Apache Tomcat v6.0, 並重新安裝
5.移除 JRE System Library, 並重新安裝
執行時出現 "The archive: C:/Program Files/Apache Software Foundation/Tomcat 6.0/bin/bootstrap.jar..." 錯誤
1.按 Menu/Run/Run Configurations...
2.選 Apache Tomcat/Tomcat v6.0 Server at localhost
3.選 Classpath
4.刪除 User Entries 之錯誤的 bootstrap.jar
執行時出現 "Could not load the Tomcat server configuration..." 錯誤
按 Detail 顯示 "resource is out of sync with the filesystem"
1.按 Menu/Window/Preferences
因為要與 64bits Java 共存
新增 exlipse.bat, 指定 32bits Java 所在
PATH=C:\Program Files (x86)\Java\jre7\bin;%PATH%
start c:\eclipse3_32\eclipse.exe
直接搬舊的版本到新電腦
1.按 Menu/Window/Preferences
2.選 Server/Runtime Environments
3.選擇 Apache Tomcat v6.0
4.按 Edit...
5.按 Browse...
6.重新選擇 Tomcat installation directory
1.按 Menu/Project/Properties
2.選 Java Build Path
3.選 Libraries 頁簽
4.移除 Apache Tomcat v6.0, 並重新安裝
5.移除 JRE System Library, 並重新安裝
執行時出現 "The archive: C:/Program Files/Apache Software Foundation/Tomcat 6.0/bin/bootstrap.jar..." 錯誤
1.按 Menu/Run/Run Configurations...
2.選 Apache Tomcat/Tomcat v6.0 Server at localhost
3.選 Classpath
4.刪除 User Entries 之錯誤的 bootstrap.jar
執行時出現 "Could not load the Tomcat server configuration..." 錯誤
按 Detail 顯示 "resource is out of sync with the filesystem"
1.按 Menu/Window/Preferences
2.選 General/Workspace
3.勾選 Refresh automatically
4.按 OK
5.重新取消勾選 Refresh automatically
網址:
http://localhost:8080/DigiChance/LightLog/index.html
http://localhost:8080/Kennel/ym/util/Program.xml
因為要與 64bits Java 共存
新增 exlipse.bat, 指定 32bits Java 所在
PATH=C:\Program Files (x86)\Java\jre7\bin;%PATH%
start c:\eclipse3_32\eclipse.exe
2014年9月25日 星期四
MySQL 的替代者 MariaDB
MySQL 有閉源的風險,用 MariaDB 取代
安裝時在 Custom Setup 時可以設定資料庫位置
MariaDB Server/Database instance
執行 HeidiSQL
按 Menu/文件/加載SQL文件
選擇 sql 檔 和 UTF-8編碼
Linux 下搬移資料位置
1.Stop MariaDB using the following command:
service mariadb stop
2.Copy the existing data directory using the following command:
sudo cp -R -p /oldpath /newpath
3.edit the MariaDB configuration file /etc/my.cnf.d/server.cnf(my.ini)
4.Restart MariaDB with the command:
service mariadb start
使用命令安裝,指定資料位置
msiexec /i path-to-package.msi [PROPERTY_1=VALUE_1 ... PROPERTY_N=VALUE_N] /qn
INSTALLDIR:%ProgramFiles%\MariaDB<version>\
DATADIR:INSTALLDIR\data
安裝時在 Custom Setup 時可以設定資料庫位置
MariaDB Server/Database instance
執行 HeidiSQL
按 Menu/文件/加載SQL文件
選擇 sql 檔 和 UTF-8編碼
Linux 下搬移資料位置
1.Stop MariaDB using the following command:
service mariadb stop
2.Copy the existing data directory using the following command:
sudo cp -R -p /oldpath /newpath
3.edit the MariaDB configuration file /etc/my.cnf.d/server.cnf(my.ini)
4.Restart MariaDB with the command:
service mariadb start
使用命令安裝,指定資料位置
msiexec /i path-to-package.msi [PROPERTY_1=VALUE_1 ... PROPERTY_N=VALUE_N] /qn
INSTALLDIR:%ProgramFiles%\MariaDB<version>\
DATADIR:INSTALLDIR\data
2014年9月24日 星期三
Export apk from Eclipse
1.在專案上按右鍵 > Android Tools > Export Signed Application Package...
2.預設專案名稱,不要動
3.選擇 Create new keystore(因為之前尚未建立)
4.記住 password,等一下要用
5.輸入 Alias, Password, Validity(使用年限), First and Last Name 等
6.選擇apk的位置
2.預設專案名稱,不要動
3.選擇 Create new keystore(因為之前尚未建立)
4.記住 password,等一下要用
5.輸入 Alias, Password, Validity(使用年限), First and Last Name 等
6.選擇apk的位置
JSP in Eclipse
1.進 Eclipse
2.選擇 Help/Install New Software
3.選擇Indigo - http://download.eclipse.org/release/indigo
4.勾選 Pending...
5.勾選 Web, XML, Java EE and OSGi Enterprise Develepment
6.安裝 Tomcat
7.再進Eclipse
8.選擇 Windows/Preference
9.選擇 Server/Runtime Environments
10.選擇 Add...
11.選擇 Tomcat 版本
12.填入 Tomcat 安裝路徑
13.按 Finish
2.選擇 Help/Install New Software
3.選擇Indigo - http://download.eclipse.org/release/indigo
4.勾選 Pending...
5.勾選 Web, XML, Java EE and OSGi Enterprise Develepment
6.安裝 Tomcat
7.再進Eclipse
8.選擇 Windows/Preference
9.選擇 Server/Runtime Environments
10.選擇 Add...
11.選擇 Tomcat 版本
12.填入 Tomcat 安裝路徑
13.按 Finish
2014年9月23日 星期二
Android in Eclipse
1.下載並安裝 Java SE 7
2.至 http://developer.android.com/sdk 下載 SDK Tools Only 並解壓縮
3.下載並安裝 Eclipse Standard 4.4, 使用 zip
4.執行 eclipse
5.按功能表 Help/Install New Software
6.按 Add, Name 輸入 ADT Plugin, Location 輸入 http://dl-ssl.google.com/android/eclipse
7.勾選 Developer Tools, 按 Next
8.選擇 I accept the terms of the license agreements, 按 Finish
9.按 OK, 再按 Yes, 重新啟動 Eclipse
10.重新啟動 Eclipse 後按 Open Preferences, 再按 Proceed
11.按 Browse 選擇步驟2的解壓縮目錄
12.按OK, 按Close, 按Close
13.按Cancel
14.按功能表 Window/Android SDK Manager
15.安裝所需的 Packages
16.按功能表 Window/Android Virtual Device Manager
2.至 http://developer.android.com/sdk 下載 SDK Tools Only 並解壓縮
3.下載並安裝 Eclipse Standard 4.4, 使用 zip
4.執行 eclipse
5.按功能表 Help/Install New Software
6.按 Add, Name 輸入 ADT Plugin, Location 輸入 http://dl-ssl.google.com/android/eclipse
7.勾選 Developer Tools, 按 Next
8.選擇 I accept the terms of the license agreements, 按 Finish
9.按 OK, 再按 Yes, 重新啟動 Eclipse
10.重新啟動 Eclipse 後按 Open Preferences, 再按 Proceed
11.按 Browse 選擇步驟2的解壓縮目錄
12.按OK, 按Close, 按Close
13.按Cancel
14.按功能表 Window/Android SDK Manager
15.安裝所需的 Packages
16.按功能表 Window/Android Virtual Device Manager
17.按 New 建立 Android 模擬裝置
2014年9月11日 星期四
MSB8031 錯誤
Visual Studio 2013 編譯時出現 MSB8031 錯誤
是因為微軟移除了 Visual Studio 2013 MFC 的 Multibyte 支援
可下載 Multibyte MFC Library for Visual Studio 2013 解決
是因為微軟移除了 Visual Studio 2013 MFC 的 Multibyte 支援
可下載 Multibyte MFC Library for Visual Studio 2013 解決
2014年9月2日 星期二
Build OpenCV v2
使用 Python 2.7, 不要用 Python 3.4, 雖然只是無法Build OpenCV documents
Python有32和64位元, 要分別安裝
Python的debug版本, 要下載 Python 的 source, 用 VS2013 開啟 PCbuild/pcbuild.sln
可以建立出32位元 PCbuild/python27_d.dll並且拷貝至 Python27/libs 下
64位元會置於 PCbuild/amd64/python27_d.dll 下
因為 Intel IPP 會 Build 進 OpenCV 的 library
所以在安裝 Intel IPP 之前,可先建立一版沒有 Intel Ipp 的 OpenCV Library
Python有32和64位元, 要分別安裝
Python的debug版本, 要下載 Python 的 source, 用 VS2013 開啟 PCbuild/pcbuild.sln
可以建立出32位元 PCbuild/python27_d.dll並且拷貝至 Python27/libs 下
64位元會置於 PCbuild/amd64/python27_d.dll 下
因為 Intel IPP 會 Build 進 OpenCV 的 library
所以在安裝 Intel IPP 之前,可先建立一版沒有 Intel Ipp 的 OpenCV Library
- Microsoft Visual Studio
- Download CMake: www.cmake.org
... and install it.
選 Do not add Cmake to system PATH
- Download msysgit and install it.
msysgit 已經改成 git for windows
Download TortoiseGit: http://code.google.com/p/tortoisegit/
... and install it.
Note: After this you may need to restart your system. - 建立目錄 C:/OpenCV
Clone the repository to C:\OpenCV from https://github.com/Itseez/opencv.git -
- Download Python: https://www.python.org/downloads/ and install it.
若是使用 Python34 版本,會在建立文件時出錯,為了確認這一點,花了不少時間。
下載x86(32位元)和amd64(64位元)版本,分別安裝於不同目錄。
安裝 Setuptools
下載 ez_setup.py 置於 C:\Python27_32 下
執行 C:\Python27_32>python ez_setup.py - Start up a command window and navigate to your Python install Scripts folder.
Install Sphinx via the command:
C:\Python27_32\Scripts\easy_inatall.exe sphinx - Download and install Numpy: http://sourceforge.net/projects/numpy/files/NumPy/1.8.2/
注意相對 Python 的版本, 只能下載到32位元, 所以一定會找 Python 32位元版 - Download and install Miktex: http://miktex.org/.
At the fourth step make sure you select for the "Install missing packages" the Yes option. - Download the Intel TBB library: https://www.threadingbuildingblocks.org/, 選擇 Windows 版本
Extract it.
Create a dep directory in your OpenCV folder.
And copy the extracted files here. - Do the same with the eigen files: eigen.tuxfamily.org
And again with the OpenEXR source files: http://www.openexr.com/
這個好像不用裝。- For OpenNI first download and install the binaries:
http://www.openni.org/downloadfiles/opennimodules
Then the PrimeSensor moudle (OpenNI Compliant Hardware Binaries).
我沒有這個東西。 - 從 https://developer.nvida.com/cuda-downloads 下載 CUDA Toolkit
它有分成Notebook, Desktop, 32/64 等四個版本,請選一個 - Qt - You first need to download the source files: http://qt-project.org/
Then extract them to a final path (should be a short one).
When finished start up a Visual Studio Command Prompt (2013) from the start menu.
Navigate to your Qt folder.Now enter the command: configure.exe -release -no-webkit -no-phonon -no-phorion -backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-itcgAnswer to the license agreement.Then wait as it could easily take up to a half hour to finish.Once finished just enter the nmake command.
Building the library will take a lot longer then the previous step...
QT5 64bit 參考如下:
add C:\Python27_64 to PATH
開啟 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\VS2013 x64 Native Tools Command Prompt
set QMAKESPEC=C:\OpenCV\dep\qt5_64\qtbase\mkspecs\win32-msvc2013
configure.bat -debug-and-release -platform win32-msvc2013 -nomake examples
nmake
若是失敗要重來,就整個目錄刪除比較快。
add C:\OpenCV\dep\qt5_64 to QTDIR
add C:\OpenCV\dep\qt5_64\qtbase\bin to PATH
QT5 32bit 參考如下:
add C:\Python27_32 to PATH
開啟 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\VS2013 x86 Native Tools Command Prompt
set QMAKESPEC=C:\OpenCV\dep\qt5_32\qtbase\mkspecs\win32-msvc2013
configure.bat -debug-and-release -platform win32-msvc2013 -nomake examples
nmake
若是失敗要重來,就整個目錄刪除比較快。
add C:\OpenCV\dep\qt5_32 to QTDIR
add C:\OpenCV\dep\qt5_32\qtbase\bin to PATH
- Download Python: https://www.python.org/downloads/ and install it.
- Now we can build the OpenCV library.
First start the CMake Gui from the start menu.
Then select where your source files are and where your want your build files to be.
Choose the compiler (IDE) you use.
Note: They are different compiler for 32 and 64 bit.
CMake will try to search for as many libraries as possible.
For the ones he cannot find a NOTFOUND constant is set.
You need to specify these manually.
Under the WITH group you can select which 3th party libraries to use for the build.
Under the BUILD group you can specify which extra OpenCV parts to build.
Set all not found constant to the correct path.
In ENABLE group enable the solution folders in order to make an organized Visual Studio solution.
Look arund the items and set any further not found constants.
Then press the configure button to test them.
This will bring up some new not found constants. specify them manually.
Then press again the configure for validation.
Repeat this procedure until all the entries are accepted.
Then press the Generate to make the solution and project files.
Now in the build directory you have the OpenCV solution. Open it.
Then Build the ALL_BUILD project.
Do it for both the Debug and Release configuration.
Depanding on just how much of OpenCV you are building this can take quite long...
If you haven't yet you might need to add the Intel TBB bin folders content to the system path. Again use the Path Editor.
To test if your build works start up the generated exe files from your build directory.
For example contours.exe...
To collect the built binary files into a single folder built the install project.
In the install folder you will have all the files of OpenCV that you will use inside your projects.
That's it. You are done!
以下步驟紀錄:
Visual Studio 12 ==> VS2013 x86
Visual Studio 12 Win64 ==> VS2013 x64
勾選 Grouped 和 Advanced
SPHINX_BUILD=C:/Python27/Scripts/sphinx-build.exe
EIGEN_INCLUDE_PATH=C:/OpenCV/dep/eigen
選 WITH_QT
QT_QMAKE_EXECUTABLE=C:/OpenCV/dep/qt5_64/qtbase/qmake/qmake.exe
Qt5OpenGL_DIR=C:/OpenCV/dep/qt5_64/qtbase/lib/cmake/Qt5OpenGL
Qt5Concurrent_DIR=C:/OpenCV/dep/qt5_64/qtbase/lib/cmake/Qt5Concurrent
Qt5Core_DIR=C:/OpenCV/dep/qt5_64/qtbase/lib/cmake/Qt5Core
Qt5Gui_DIR=C:/OpenCV/dep/qt5_64/qtbase/lib/cmake/Qt5Gui
Qt5Test_DIR=C:/OpenCV/dep/qt5_64/qtbase/lib/cmake/Qt5Gui
Qt5Widgets_DIR=C:/OpenCV/dep/qt5_64/qtbase/lib/cmake/Qt5Widgets
選 WITH_TBB, 不選 BUILD_TBB
TBB_INCLUDE_DIRS=C:/OpenCV/dep/tbb42_20140122oss/include
TBB_LIB_DIR=C:/OpenCV/dep/tbb42_20140122oss/lib/ia32/vc12
TBB_STDDEF_PATH=C:/OpenCV/dep/tbb42_20140122oss/include/tbb/tbb_stddef.h
選 WITH_IPP, WITH_IPP_A
IPP_A_INCLUDE_DIR=C:/Program Files (x86)/Intel/IPP Preview 2014 February/ipp/include
IPP_A_LIBRARIES=C:/Program Files (x86)/Intel/IPP Preview 2014 February/ipp/lib/intel64/ipp_async_preview.lib
PYTHON_INCLUDE_DIR=C:/Python27/include
PYTHON_LIBRARY=C:/Python27/libs/python27.lib
PYTHON_LIBRARY_RELEASE=C:/Python27/libs/python27.lib
- 用 VisualStudio2013 開啟 C:\OpenCV\Builds\OpenCV.sln
Build Debug 會有一個失敗,因為缺少 python27_d.lib
Build Release
Build documentation/docs or documentation/html_docs 單獨的
Build CMakeTargets/INSTALL 單獨的 - 設定下列環境變數以便 VisualStudio2013專案 使用
TBB_DIR_32=C:\OpenCv\dep\tbb43_20140724oss\bin\ia32\vc12
TBB_DIR_32_ui=C:\OpenCv\dep\tbb43_20140724oss\bin\ia32\vc12_ui
TBB_DIR_64=C:\OpenCv\dep\tbb43_20140724oss\bin\intel64\vc12
TBB_DIR_64_ui=C:\OpenCv\dep\tbb43_20140724oss\bin\intel64\vc12_ui
OPENCV_BIN_32=C:\OpenCv\build_32\install\x86\vc12\bin
OPENCV_BIN_32_IPP=C:\OpenCv\build_32_ipp\install\x86\vc12\bin
OPENCV_BIN_64=C:\OpenCv\build_64\install\x64\vc12\bin
OPENCV_BIN_64_IPP=C:\OpenCv\build_64_ipp\install\x64\vc12\bin
OPENCV_INC_32=C:\OpenCv\build_32\install\include
OPENCV_INC_32_IPP=C:\OpenCv\build_32_ipp\install\include
OPENCV_INC_64=C:\OpenCv\build_64\install\include
OPENCV_INC_64_IPP=C:\OpenCv\build_64_ipp\install\include
OPENCV_LIB_32=C:\OpenCv\build_32\install\x86\vc12\lib
OPENCV_LIB_32_IPP=C:\OpenCv\build_32_ipp\install\x86\vc12\lib
OPENCV_LIB_64=C:\OpenCv\build_64\install\x64\vc12\lib
OPENCV_LIB_64_IPP=C:\OpenCv\build_64_ipp\install\x64\vc12\lib
刪除Path內的C:\OpenCV\dep\qt5_64\qtbase\bin, 另外新增下列兩環境變數
QT5_32=C:\OpenCV\dep\qt5_32\qtbase\bin
QT5_64=C:\OpenCV\dep\qt5_64\qtbase\bin
32/64位元,且有無IPP一樣 Debug Additional Dependencies
opencv_calib3d300d.lib
opencv_core300d.lib
opencv_features2d300d.lib
opencv_flann300d.lib
opencv_highgui300d.lib
opencv_imgcodecs300d.lib
opencv_imgproc300d.lib
opencv_ml300d.lib
opencv_objdetect300d.lib
opencv_photo300d.lib
opencv_shape300d.lib
opencv_stitching300d.lib
opencv_superres300d.lib
opencv_ts300d.lib
opencv_video300d.lib
opencv_videoio300d.lib
opencv_videostab300d.lib
32/64位元,且有無IPP一樣 Release Additional Dependencies
opencv_calib3d300.lib
opencv_core300.lib
opencv_features2d300.lib
opencv_flann300.lib
opencv_highgui300.lib
opencv_imgcodecs300.lib
opencv_imgproc300.lib
opencv_ml300.lib
opencv_objdetect300.lib
opencv_photo300.lib
opencv_shape300.lib
opencv_stitching300.lib
opencv_superres300.lib
opencv_ts300.lib
opencv_video300.lib
opencv_videoio300.lib
opencv_videostab300.lib
2014年9月1日 星期一
系統映像備份
1. Windows 8 提供 系統映像備份
2. 備份目錄:F:\WindowsImageBackup\電腦名稱\Backup 日期時間
3. 第二次備份時會依據電腦名稱備份,但會不預期的合併備份時間
4. 每次備份完成皆對電腦名稱改名
5. 還原時需將電腦名稱改回去
2. 備份目錄:F:\WindowsImageBackup\電腦名稱\Backup 日期時間
3. 第二次備份時會依據電腦名稱備份,但會不預期的合併備份時間
4. 每次備份完成皆對電腦名稱改名
5. 還原時需將電腦名稱改回去
訂閱:
文章 (Atom)