2016年11月29日 星期二

[Win7] Key

修改產品金鑰

步驟1.修改產品金鑰

 

使用 Windows 7 內建指令 slmgr.vbs 搭配相關參數即可達成。

1. 使用【以系統管理員身份執行】去開啟【命令提示字元】

2. 輸入指令 slmgr.vbs -ipk + 新產品金鑰】 來變更產品金鑰

3. 輸入【slmgr.vbs -ato 來啟用 Windows

4. 輸入【slmgr.vbs -xpr 顯示啟用狀態 (例如:永久啟用,或顯示到期日...)

5. 輸入【slmgr.vbs -dlv 顯示詳細的啟用識別資訊

 

 

                                     

步驟2.確認修改是否生效

執行指令 winver.exe 即可確認授權使用者 (Owner) 及組織 (Organization) 資訊是否生效。

 

 

 

Don't setup:

KB971033

 

 

KEY REF:
http://www.xitongtiandi.net/wenzhang/KEY/7060.html

 

 

Other sol:

 

http://www.inc.ndhu.edu.tw/ezfiles/2/1002/img/3033/WIN7_copyright_solution.pdf

 

Other:

49PB6-6BJ6Y-KHGCQ-7DDY6-TF7CD

 

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.

2016年11月28日 星期一

[Linux] Build andorid

Java版本確認

    Java SE 6 JDK (Ver: 1.6.0_45)

    Java -version

    Java版本切換

    Update-alternatives --config java

    會出現已安裝的java版本跟路徑,選擇適合的版本,並輸入代號

    確認在run檔案裡的路徑是正確的

安裝基本package for Ubuntu 12.04

    在首次buildUbuntu12.04系統上安裝基本package

build@ubuntu$ sudo apt-get update

build@ubuntu$ sudo apt-get install git gnupg flex bison gperf build-essential zip \

curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \

libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \

libgl1-mesa-dev g++-multilib mingw32 tofrodos \

python-markdown libxml2-utils xsltproc zlib1g-dev:i386

 

 

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.

[Linux] P4

操作環境

    Ubuntu 12.04 for 64-bit

    Java SE 6 JDK (Ver: 1.6.0_45)

    若未安裝vim,請下指令並照指令安裝(此時必須連上外網)

    sudo apt-get install vim

    如果連不上外網,參考網路設定

前置作業

    需要以下檔案:p4run.p4settings

    將檔案:p4run .p4settings放在/Home下。

安裝與環境設定

  1. 複製p4檔到/user/local/bin/p4:

    sudo cp P4放置的路徑 /user/local/bin/p4

  1. 更改p4檔權限為可執行檔(/user/local/bin/):

    sudo chmod 777 ./p4

  1. 編輯~/.bashrc:

    vim ~/.bashrc

    進入vim後在最下方加入: export P4CONFIG=.p4settings

功能

指令

插入

ESC+ "i"

存檔離開

ESC+ ":wq!"

不存檔離開

ESC+ ":q!"

建立client workspace

  1. 建立workspace dir(紅字部分請修改成自己的名稱):

    mkdir –p ~/workspace/evankuo_vivapro_workspace1

  1. 編輯.p4setting

    cd workspace/evankuo_vivapro_workspace1

    sudo vim .p4settings

    將"前置作業".p4settings中的文字複製過來,並將"P4CLIENT=… …"修改為自己的路徑後,存檔離開。

P4PORT=10.82.203.32:1666

P4CLIENT=Evan.Kuo_vivapro_workspace1

P4USER=qisda1

P4PASSWD=Qisda12345

P4EDITOR=vim

 

  1. 測試configure,此時應出現user nameclient name等資料

    p4 info

  1. 建立Client,會出現Client Owner等資訊:

    p4 client

  1. 編輯p4 client中的View mapping

//qth/msm8974/viva_pro/dev/android/... //Evan.Kuo_vivapro_workspace1/dev/android...

//qth/msm8974/viva_pro/dev/oem/... //Evan.Kuo_vivapro_workspace1/dev/oem...

//qth/msm8974/viva_pro/dev/amss/... //Evan.Kuo_vivapro_workspace1/dev/amss...

  1. 確認資料:

    p4 where

  1. 開始sync code (server上的檔案下載到workspace目錄)

    p4 sync

  1. 在目錄~/workspace/evankuo_vivapro_workspace1/dev/下會出現androidoem的資料夾

編輯sync下來的檔案

    所有sync下來的檔案(client workspace)預設為"唯讀",使用指令將檔案屬性修改為Read-Write

    p4 edit

    使用編輯器vimgedit開啟檔案來進行編輯

    Check "opened" code,所有使用p4 edit的檔案會列出來

    p4 opened

 

Build之前

    編輯/Home下的run檔案(需確認run檔中的路徑存在)

    sudo gedit run

    執行run檔案

    source ~/run

#!/bin/bash

export PATH=/opt/jdk6/jdk1.6.0_45/bin:~/android-ndk-r9d:$PATH

#export PATH=/home/ada/workdir/Source_Package/APQ8074_M8974AAAAANLYA31050138_JB_V111/out/host/linux-x86/bin:$PATH

export PATH=/home/ada/workspace/evankuo_vivapro_workspace1/dev/android/out/vivapro_evt0R_qisda/host/linux-x86/bin:$PATH

export JAVA_HOME=/opt/jdk6/jdk1.6.0_45/

export ANDROID_JAVA_HOME=/opt/jdk6/jdk1.6.0_45/

source ~/.bashrc

export PATH=~/bin:$PATH

# cd workdir/

    開始build code

    在目錄/home/ada/workspace/evankuo_vivapro_workspace1/dev/oem/vivapro_scripts下執行:

    ./build_android.sh

    evt0/ qisda / release

    build完之後:

    在目錄~/workspace/evankuo_vivapro_workspace1/dev/android/out/ vivapro_evt0R_qisda下,會出現"system .img"等檔案。

    如果要將code燒進版子,在此目錄下需要有"flashall.sh"檔案。

check-in 之前

      check-in 之前,需先將最新的codeserversync下來,在localbuild成功後再check-in

      check-in 之前,需先確認是否有其他人也正在編輯相同檔案,避免conflict發生。

      p4 changes

真正做check-in的動作

    真正做check-in的動作

    p4 submit

    : opened的檔案會被check-inserver, 不修改的檔案請不要下p4 edit

check-in 之後

    check-in之後,最好再sync回來,確定build成功,且download測試ok

 

 

 

Java版本確認

    Java SE 6 JDK (Ver: 1.6.0_45)

    Java -version

    Java版本切換

    Update-alternatives --config java

    會出現已安裝的java版本跟路徑,選擇適合的版本,並輸入代號

    確認在run檔案裡的路徑是正確的

安裝基本package for Ubuntu 12.04

    在首次buildUbuntu12.04系統上安裝基本package

build@ubuntu$ sudo apt-get update

build@ubuntu$ sudo apt-get install git gnupg flex bison gperf build-essential zip \

curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \

libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \

libgl1-mesa-dev g++-multilib mingw32 tofrodos \

python-markdown libxml2-utils xsltproc zlib1g-dev:i386

 

 

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.

[windows] Xming, Putty

Windows系統上安裝軟體,可從remote開啟Linux圖形化介面:

    Xming Version 6.9.0.31 ( \\chrserver1\General\Tools)

    安裝Xming時,將display settings 設定為"multiple windows"

    Putty:免安裝檔

    開啟Xming後再開啟Putty

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.

2016年11月24日 星期四

[Q] andorid

 

App speaker

//qth/msm8974/viva_pro_Android4.4_PostCSII/dev/android/packages/apps/oem_apps/SpeakerTest/

 

 

 

 

printer

//qth/msm8974/viva_pro_Android4.4_PostCSII/factory_dev/android/packages/apps/oem_apps/UltraSound/qisdavivapro/src/com/qisda/viva/report/pdf/PDFPrintManager.java

 

 

 

brainstorm  GenesisBillBoardDisplay

//qth/msm8994/Workspaces/MSM8994_1.1_brainstorm/dev/android/packages/apps/oem_apps/GenesisBillBoardDisplay/GenesisBillBoardDisplay.apk#5 edit

 

 

 

adbLF2

//qth/msm8974/viva_pro_Android4.4_PostCSII/dev/android/external/libVivaProUSB/

 

 

Wifi connect test

int command_WLANconnectAP(void) connect ap

 

P4#66796 @ //qth/msm8974/viva_pro_Android4.4_PostCSII/factory_dev

P4#66795 @ //qth/msm8974/viva_pro_Android4.4_PostCSII/dev

新增了兩個執行檔, WLANscanAP, WLANconnectAP

 

WLANscanAP會掃目前有那些AP, 它的加密方式

 

WLANconnectAP是連上某個IP

使用方法:

WLANconnectAP ssid password encryption_way

Encrypt_wayOPEN, WEP-40-ASCII, WEP-104-ASCII, WEP-40-HEX, WEP-104-HEX, WPA-TKIP, WPA-AES, WPA2-TKIP, WPA2-AES

 

例如:

WLANconnectAP DIR-615 12345678 WPA-TKIP

 

//qth/msm8974/viva_pro_Android4.4_PostCSII/dev/android/system/core/ftd/ft_wlan.c

 

 

 

 

Viva修改藍芽圖示

//qth/msm8974/viva_pro_Android4.4_PostCSII/factory_dev/android/packages/apps/oem_apps/UltraSound/qisdavivapro/src/com/qisda/viva/view/StatusBar.java

 

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.

[電流] 電流、電阻、電感、電容

 

電流從v流向ground

因為ground是電阻無線小,所以將火線與地線相接,壓差太大,會起火花

 

電阻可分壓,降壓

 

 

 

 

VCCC=circuit 表示电路的意思, 即接入电路的电压;

 

VDDD=device 表示器件的意思, 即器件内部的工作电压;

 

VSSS=series 表示公共连接的意思,通常指电路公共接地端电压。

 

 

l  電流(I) Current

l  電阻 Resistance

l  電感(L) inductance (Linkage)

l   電流(I) Current

l  電容 capacitance

 

 

 

 

 

 

 

 

 

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.

[Microsoft] [NET]managed, unmanaged, CLR, CLS,CTS, Framework

l   Windows:dynamic link libraryDLL

l   UNIXLinux:Shared Library

 

 

managed code vs unmanaged  code

 

 

 

 

1.          .NET

2.          .NET Core

3.          Standard Library

 

 

 

 

.NET Framework

 

 

²  C#, VB.net, other .net  Language  and the .NET Framework

 

²  C# Language and the .NET Framework

 

 

l   .NET 架構標準:CLS(Common Language Specification)通用語言架構

l   CLR (Common Language Runtime)特點:(類似java的虛擬機器,jvm)

²  在記憶體回收堆積上具現化

²  基礎類別庫支援 Base Class Library Support

²  記憶體管理 Memory Management

²  執行緒管理 Thread Management

²  記憶體自動回收 Garbage Collection

²  安全性 Security

²  型別檢查 Type Checker

²  異常管理 Exception Manager

²  除錯管理 Debug Engine

²  中間碼(MSIL)到機器碼(Native)編譯

²  類別裝載 Class Loader

 

MSIL:中繼語言(Microsoft InterMediate Language)

Native code:原生碼(機器碼)

 

 

 

 

²  CTS(Common Type System)

CTS,共通型態系統,主要是所有.NET 語言所共通使用的資料型態,這也是跨語言的重要關鍵。

不管是哪一種語言,原本資料型態的定義可能不盡相同,但是經過符合 CLS 的編譯器編譯後,

所產生的結果,包括 MSIL Metadata(詳見後述),都要符合 CTS 的型態

 

 

例如,C#的整數型態為 intVisual Basic 的整數資料型態為 integer,將來只要經過

符合 CLS 的編譯器編譯後,其整數資料型態將會是 int32,因為 int32 CTS 標準的資料型態

 

 

 

Managed Code

代表受到 CLR (Common Languages Runtime) 的管理,泛指基於 .net framework 平台所開發的程式。

 

UnManaged  Code / Native Code

相對於Managed Code, 表示未受到 CLR 的管理,例如:Win32 APIC++VB 6...

 

COM Interop

可以將.net所寫的組件(Assembly)「偽裝」成一般的COM元件,提供Unmanaged Code使用,或者反回來在Managed Code裡引用非.net開發的COM元件。在 Managed Code Unmanaged Code之間,比較簡單的互動即是透過COM元件處理,大多數的windows程式平台幾乎都支援。

 

Registration Free(Reg-Free) COM

免註冊型的COM元件;通常會需要產生 mainifest 檔案,裡面存放組件相關的metadata

 

 

 

l   .NET Framework:WindowsWindows Server.NET Framework版要

l   .NET Core:使用於Windows Store App開發的.NET Framework版本。

 

l   NET參照類型使用一個「控制代碼」來取得南

l   使用新的語法「類名^」代替了MC++的「類名*

 

 

 

ref:

/MD/MT/LD (使用執行階段程式庫)

https://msdn.microsoft.com/zh-tw/library/2kzt1wy3.aspx

 

十分鐘了解.NET

http://www.mpinfo.com.tw/TechnologyColumnFiles/PB_T_201006.pdf

 

通用語言運行庫

https://zh.wikipedia.org/wiki/%E9%80%9A%E7%94%A8%E8%AA%9E%E8%A8%80%E9%81%8B%E8%A1%8C%E5%BA%AB

 

C# Language and the .NET Framework

https://msdn.microsoft.com/zh-tw/library/z1zx9t92.aspx

**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.