2018年7月21日 星期六

[Board Game]


  • 適合下午放空 activities


  • 阿瓦隆

    • 兩大陣營, 猜測角色

    [Video Game] Nintendo Switch




  • 還滿適合招待朋友玩樂 (可以8人同時遊玩) 



  • 馬力歐 


  • 賽車經典, like 跑跑卡丁車, 有道具  


  • 煮糊了啦, 燃燒吧廚房

  • 滿不錯玩的遊戲, 需要分工合作才能完成
  • [Friendship] afternoon activity


    • 桌遊
    • video game: PS4, Nintendo Switch

    [House] 決策參考


    • location, location, location
    • 教育
    • 生活機能 (便利商店、生鮮超市)
    • 地點參考
      • 基隆八斗子
        • 早安國
          • 13W/P, 室內 47P, total 65P, 也才 10xx, 相當不錯

    2018年7月19日 星期四

    [Visual Studio] Error C2471 cannot update program database xxx.pdb


    • Problem: 
      • MSVC下 build code時, 若出現 error C2471: cannot update program database 'xxx.pdb
    • Reason:
      • Program database 的 process 未正常關閉.
    • Solution:
      • Ctrl+Alt+Del 叫出 Task Manager
      • 強制關閉 mspdbsrv.exe (Microsoft Program Database)
    • Ref: mspdsrv living forever

    2018年7月18日 星期三

    [Shell] Bash 攻略

    分類 指令 用途
    移動 Ctrl-A 移到最前面
    Ctrl-a 移到最前面
    Ctrl-e 移到最後面
    Ctrl-u 清除游標前指令
    Ctrl-k 清除游標後指令
    螢幕操作 Ctrl-l 清除畫面
    常用指令 history 顯示歷史操作,
    !num
    可執行該行指令
    df -h 顯示空間容量
    ln -s fileName linkName 建立 symoblic link to fileName
    wc -lword count
    uname -ashow kernel info
    Ref:

    2018年7月7日 星期六

    [Software Engineering] use CMake to add version


    • Problem: 如何在軟體中加入版號?
    • How:
      • 工具: CMake (跨平台的 configuration tool, 可建立各平台的 build solution/project file)
      • 流程:
        • 在 project setting 檔案 (CMakeLists.txt) 內加入版號
        • set (APP_VERSION_MAJOR 1)
          set (APP_VERSION_MINOR 0)
          
        • 在 source code 中新增特定的預設 config.h.in 檔 (config.h 會是 build config.h.in 後的產物)
        • // the configured options and settings for App 
          #define APP_VERSION_MAJOR @APP_VERSION_MAJOR@
          #define APP_VERSION_MINOR @APP_VERSION_MAJOR@
          
        • CMakeLists.txt 中指定此 config.h 檔及預設的 config.h.in參考檔
        • configure_file (
              "${PROJECT_SOURCE_DIR}/config.h.in"
              "${PROJECT_BINARY_DIR}/config.h"
          ))
        • 如此就可以在 source code 中, include config.h 並使用 APP_VERSION_MAJOR, APP_VERSION_MINOR
        • 另外, 若 build成 shared binary 的話, 也可以像 linux一樣設計成 app_3.1.2 這樣的 binary, 然後 app為 symbolic link to app_3.1.2
          • CMakeLists.txt 中加入 target property VERSION 與 SONAME
          • set(APP_VERSION_STRING ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH})
            
            set_target_properties(App PROPERTIES 
                VERSION ${APP_VERSION_STRING} 
                SOVERSION ${APP_VERSION_MAJOR}
            )
            
    • Reference: CMake tutorial

    2018年7月5日 星期四

    [DRM] Content protection


    [Codec] Video Codec container format