網頁

2014年5月29日 星期四

ThinkPad E540 技巧

完整關機->Shift+關機
開機時按 F1->進入BIOS
開機時按 F12->開機選擇->此時有 Lenovo Diagnostics
Fn+Esc 選擇 Fn 功能
查詢 S/N -> 開啟命令提示字元 輸入 wmic bios get serialnumber
「Win」+「R」快速鍵,於「開啟」欄位輸入「services.msc」
「Win」+「X」快速鍵,於畫面左下角開啟命令選單
Ctrl+Alt+F12 -> Intel HD 圖形控制台
藍芽開關->Win+C->變更電腦設定->網路->飛航模式->Bluetooth
「Win」+「Shift」+「<-」快速鍵,雙螢幕切換位置




2014年5月23日 星期五

Build OpenCV

  1. Microsoft Visual Studio
  2. Download CMake: www.cmake.org
    ... and install it.
    選 Do not add Cmake to system PATH
  3. 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.
  4. 建立目錄 C:/OpenCV
    Clone the repository to C:\OpenCV from https://github.com/Itseez/opencv.git
    1. 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
    2. 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
    3. Download and install Numpy: http://sourceforge.net/projects/numpy/files/NumPy/1.8.1/
      注意相對 Python 的版本
    4. Download and install Miktex: http://miktex.org/.
      At the fourth step make sure you select for the "Install missing packages" the Yes option.
    5. 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.
    6. Do the same with the eigen files: eigen.tuxfamily.org
    7. And again with the OpenEXR source files: http://www.openexr.com/
      這個好像不用裝。
    8. For OpenNI first download and install the binaries:
      http://www.openni.org/downloadfiles/opennimodules
      Then the PrimeSensor moudle (OpenNI Compliant Hardware Binaries).
      我沒有這個東西。
    9. To use CUDA you need to install the latest CUDA Toolkit...
      and the Cuda Tools SDK.
      CUDA 並不支援 VS2013
    10. 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 (2010) 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-itcg
      Answer 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
  5. 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
  6. 用 VisualStudio2013 開啟 C:\OpenCV\Builds\OpenCV.sln
    Build Debug 會有一個失敗,因為缺少 python27_d.lib
    Build Release
    Build documentation/docs or documentation/html_docs 單獨的
    Build CMakeTargets/INSTALL 單獨的

2014年5月22日 星期四

備份與還原

備份

  1. 放入要備份的硬碟
  2. 按 Win+C
  3. 按 設定
  4. 按 控制台
  5. 按 檔案歷程紀錄,此時要等系統抓取硬碟
  6. 選左下方的 系統映像備份
  7. 選擇 硬碟,按下一步
  8. 按 開始備份,此時要等...
  9. 有遇過備份失敗,如下訊息,找不到解答,最後執行 硬牒右鍵/內容/工具/檢查錯誤,之後再備份一次。
  10. 完成後可在硬碟上發現 WindowImageBackup 目錄
備份失敗
Windows 備份無法在存放位置上建立陰影複製。(0x80780034)

其它資訊:
陰影複製提供者發生錯誤。如需詳細資訊,請檢查系統和應用程式事件紀錄檔。(0x80042306)

備份失敗
錯誤碼:0x81000036
設定 SoftPerfect RAMdisks 安裝為可移除磁碟

還原
  1. 放入原先備份的硬碟
  2. 按 Win+C
  3. 設定
  4. 右下方之 變更電腦設定
  5. 更新與復原
  6. 復原
  7. 進階啟動 之 立即重新啟動
  8. 重新開機後 選 疑難排解
  9. 進階選項
  10. 系統映像修復
  11. 選擇帳戶
  12. 輸入密碼
  13. 可選擇 使用最新可用的系統映像,或 選取系統映像
  14. 選擇 選取系統映像 按下一步
  15. 選取硬碟 按下一步
  16. 此時會列出所有備份的時間點
  17. 選擇後 按下一步
  18. ....
原廠還原
  1. 按 Win+C
  2. 設定
  3. 右下方之 變更電腦設定
  4. 更新與復原
  5. 復原
  6. 移除所有項目並重新安裝 WIndows
  7. 下一步
  8. 選擇磁碟機
  9. 只移除我的檔案

mingrenn@outlook.com


ThinkPad E540 安裝紀錄

0. 右下角出現 未正確設定安全開機 執行完 Windows Update 即會消失
0. ExpressCache
0. 移除 Norton Internet Security,Windows 會自動啟動 Windows Defender
0. 移除 LenovoEMC
0. Lenovo System Update
0.a ThinkVantage Active Protection System
0.b ThinkPad Video Features
0.c Intel(R) HD Graphics Driver
0.d Synaptics UltraNav Driver
0.e ThinkPad Hotkey Features Integration Package Setup
0.f Conexant CX20751 Aduio Driver

1. GnuWin32 OpenSSL-0.9.8h
1. Daemon Tools Lite => 使用 PowerDVD CreateWindows檔案總管 替代
1. EOS Utility
1. SoftPerfect RAM Disk
1. OpenOffice
1. LuCam Capture
1. 7-Zip File Manager
1. UltraEdit-32 => 在本機上無法執行,那就換一台機器吧!
1. UltraVNC
1. VLC media player
1. FileZilla => 這裡面有廣告軟體 ADWARE/InstallCore.Gen7
1. TortoiseSVN
1. Youtube Downloader HD => 小心偷渡軟體
1. Visual Studio 2005
1. Visual Studio 2008
1. Visual Studio 2013
1. HTC Sync Manager
1. Chrome => 參考 chrome & ramdisk 文章
1. Adobe Reader

1. Altera Quartus II 9.1sp2 => 安裝 USB-Blaster 驅動 "C:\altera\91sp2\quartus\drivers\usb-blaster"
1. MicroChip MPLAB IDE => 安裝 ICD 3驅動 "C:\Program Files (x86)\Microchip\MPLAB IDE\Drivers64 "
1. Activate or Trial PRO mode

1. Wireshark
1. WinCap

2. WebNavi => 使用管理員執行32位元之IE,進入Signalway安裝WebNaviSetup.exe
2. CMake 2.8.12.2
2. Git for Windows(Git 1.9.4)
2. TortoiseGit
2. Install for OpenCV...
2. Python 2.7.8
2. Python 2.7.8 amd64
2. numpy 1.8.2
2. MikTeX 2.9
2. CUDA Tools SDK 6.5.14 notebook 64
2. Intel IPP Preview 2014

3. Visual Studio InstallShield
3. Multibyte MFC Library for Visual Studio 2013
3. Java EE 7 Web Profile SDK 32&64 bits
3. MariaDB 10.0
3. Tomcat 6
3. Eclipse ->參考 Eclipse 搬家JSP in Eclipse
3. Android -> 參考 Android in Eclipse
3. DirectShow -> 參考 DirectShow 演變
3. DR3_TMConfigurator

4.Eclipse4.4 加入 Web, XML, Java EE and OSGi Enterprise Development

5. VMware Player VMware-player-12.0.1-3160714.exe
5. Arduino arduino-1.6.6-windows.exe
5. HI-TECH C PRO for the PIC18 MCU Family V9.80PL0

2014年5月20日 星期二

2014年5月14日 星期三

英文學習站 使用方式

  1. 用滑鼠點 英文字 會發音。
  2. 用滑鼠快點兩下 英文或中文字 會隱藏或顯示 英文或中文字。
  3. 點選第一列標頭的 中文 或 英文,會隱藏或顯示整欄的 英文或中文。
  4. 點選表格上方隻重排,會重新排列表格。
  5. 再輸入欄位填入英文後按 enter,會發出輸入之音,並檢查輸入英文是否正確。
正式發布 英文學習站

設計過程遇到一大堆的窟窿
本想解決一個,就發佈一篇網誌
但那是不可能的

除了可能根本無法完成 英文學習站 計畫
(當然也可將網誌視為失敗紀錄)
在解決問題的過程中,一關接著一關
整個腦袋想著各種的可能
實在是分不出精神來做這事
目前只能寫寫回憶錄了


  • Google 發音 時靈時不靈,尤其在 Google 的 blogger,後來發現 Google Drive 內的網頁也會,本機的網頁比較不會。直覺的反應就是 Cache,所以在 chrome 的 紀錄/清除瀏覽資料 中勾選 快取圖片和檔案,解決了時靈時不靈的狀況,變成本機正常,Google 內的都不正常。
  • 懷疑是 google 的 blogger 內的某一些 script 導致錯誤,所以將網頁移往 Google Drive。但還是一樣。
  • 利用 chrom 內 網頁中按滑鼠右鍵,選擇 檢查元素,切換 Network 頁簽,檢查網路傳輸的差異,發現不能發音是 Status canceled,利用 chrome://net-internals ,選擇 Events,發現 正不正常 的差異是,HTTP 協議 Header 中 Referer,本機正常 沒有 Referer,Google 內的網頁不正常 都有 Referer,推測是 Google 發現 Referer 來自 Google 本身,所以回覆了404 not found。
  • 本以為 ajax.setRequestHeader("Referer", ""); 能消除 Referer,發現安全性問題使得不能作用,隨後安裝 chrome 的擴充功能 Referer Control,就成功了,但是 IE 怎麼辦?之後又發現 https:// 到 http:// 也有安全性問題,不會傳送 Referer,所以將 https://translate.google.com.tw/translate_tts 改成 http://translate.google.com.tw/translate_tts 就完成了。
  • 雖然 chrome 成功,IE 居然不行,虧我還是從微軟的網站上找到的資料。試試看把 audio 藏在 iframe 吧!
  • 雖然 iframe 把 Referer 移除,但是裡面的 audio 移除了一半,不知為何 IE 連送三次 Request,第三次才移除 Refere_r,但還是不說話。
  • 網路上有人猜測,只要有 Referer,translate_tts 就不動作,害我還懷疑是 google 的 blogger 內的某一些 script 導致錯誤,大動干戈。
  • 最後放棄了,把 IE 獨立出來。
另一個問題是 Google Drive 內的網頁問題,因為一時懶惰,沒有看清說明,直接使用 share 的網址,如下 https://drive.google.com/file/d/0B7u4moMmo8nDOERrYlFDRm9NaUU 一直不成功,直到最後才發現要改成 https://googledrive.com/host/0B7u4moMmo8nDOERrYlFDRm9NaUU。