git 指令筆記
git clone + clone網址
git fetch
git pull origin
git status
git diff
(關閉案q)
git add --all
git commit
enter + i
編輯完畢後 esc + wq
git push origin head
(edit commit)-----
git commit --amend
git push -f
2020年4月9日 星期四
2019年11月25日 星期一
[工具]Visual studio 初始化 (回到初始設定)
在windows中找到安裝目錄"Visual Studio Tools"下的 "vs2xxx開發人員命令"
並輸入以下 注意空白鍵
devenv.exe /setup /resetuserdata /resetsettings
並輸入以下 注意空白鍵
devenv.exe /setup /resetuserdata /resetsettings
2019年10月22日 星期二
[C++]MFC按鈕添加提示文字
宣告在 *.h
CToolTipCtrl m_ctrlTT;
定義內容: *.cpp
BOOL SerialDlg::OnInitDialog() {......//prompt EnableToolTips(TRUE);//enable use it m_ctrlTT.Create(this); m_ctrlTT.Activate(TRUE); m_ctrlTT.SetDelayTime(150);//delayTime //IDC_BUTTON_SEND2 為要添加的控建IDC ,"Hello"為想添加的提示 m_ctrlTT.AddTool(GetDlgItem(IDC_BUTTON_SEND2), (LPCTSTR)"Hello"); return TRUE; }添加虛擬函示(ClassWizard中選擇虛擬函式 PreTranslateMessage)BOOL SerialDlg::PreTranslateMessage(MSG* pMsg) { // TODO: 在此加入特定的程式碼和 (或) 呼叫基底類別 m_ctrlTT.RelayEvent(pMsg); return CDialog::PreTranslateMessage(pMsg); }測試環境 MFC VC2015
2019年9月1日 星期日
[C++]獲取系統ip
#include"stdio.h" #include"string.h" #include"Winsock2.h" #pragma comment(lib,"WS2_32.lib")
printf("********************************\n"); printf("IP OUTPUT\n"); WSADATA wsaData; if (WSAStartup(MAKEWORD(2, 2), &wsaData) == SOCKET_ERROR) { exit(0); } int nLen = 256; char hostname[20]; gethostname(hostname, nLen); hostent *pHost = gethostbyname(hostname); LPSTR lpAddr = pHost->h_addr_list[0]; struct in_addr inAddr; memmove(&inAddr, lpAddr, 4); printf("有線IP地址:%s\n", inet_ntoa(inAddr)); memmove(&inAddr, lpAddr + 4, 4); printf("無線IP地址:%s\n", inet_ntoa(inAddr)); memmove(&inAddr, lpAddr + 8, 4); printf("環回IP地址:%s\n", inet_ntoa(inAddr)); memmove(&inAddr, lpAddr + 12, 4); printf("虛擬機1 IP地址:%s\n", inet_ntoa(inAddr)); memmove(&inAddr, lpAddr + 16, 4); printf("虛擬機2 IP地址:%s\n", inet_ntoa(inAddr)); printf("********************************\n");
可先參考 cmd 輸入ipconfig 確認ip
測試環境 :MFC 2015
[Windows]註冊密技,快捷指令
提供以下步驟,可以快速知道Windows的註冊狀況 與 註冊
打開cmd : (右鍵 "最高權限")
查詢windows註冊:
slmgr.vbs -xpr
===============================================
步驟1.解除windows註冊:
slmgr.vbs /upk
步驟2.輸入版本註冊序號:
專業版ex: (slmgr /ipk ______)
slmgr /ipk VK7JG-NPHTM-C97JM-9MPGT-3V66T
專業版:VK7JG-NPHTM-C97JM-9MPGT-3V66T
企業版:XGVPP-NMH47-7TTHJ-W3FW7-8HV2C
教育版:YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY
專業版N:2B87N-8KFHP-DKV6R-Y2C8J-PKCKT
企業版N:WGGHN-J84D6-QYCPR-T7PJ7-X766F
教育版N:84NGF-MHBT6-FXBX8-QWJK7-DRR8H
企業版S:FWN7H-PF93Q-4GGP8-M8RF3-MDWWW
步驟3.修改狀態:
slmgr /skms zh.us.to
步驟4.確認註冊:
slmgr /ato
==============================================
測試環境 win10 pro
引用來源
打開cmd : (右鍵 "最高權限")
查詢windows註冊:
slmgr.vbs -xpr
===============================================
步驟1.解除windows註冊:
slmgr.vbs /upk
步驟2.輸入版本註冊序號:
專業版ex: (slmgr /ipk ______)
slmgr /ipk VK7JG-NPHTM-C97JM-9MPGT-3V66T
專業版:VK7JG-NPHTM-C97JM-9MPGT-3V66T
企業版:XGVPP-NMH47-7TTHJ-W3FW7-8HV2C
教育版:YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY
專業版N:2B87N-8KFHP-DKV6R-Y2C8J-PKCKT
企業版N:WGGHN-J84D6-QYCPR-T7PJ7-X766F
教育版N:84NGF-MHBT6-FXBX8-QWJK7-DRR8H
企業版S:FWN7H-PF93Q-4GGP8-M8RF3-MDWWW
步驟3.修改狀態:
slmgr /skms zh.us.to
步驟4.確認註冊:
slmgr /ato
==============================================
測試環境 win10 pro
引用來源
2019年8月28日 星期三
[工具]Visual Studio Code (vscode)
官網下載點:
https://code.visualstudio.com/
推薦套件:
中文化
https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hant
c/c++
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
intelligent
https://marketplace.visualstudio.com/items?itemName=austin.code-gnu-global
參考設定:
https://kw0006667.wordpress.com/2017/01/31/%E9%80%8F%E9%81%8E-msbuild-%E5%9C%A8-visual-studio-code-%E7%B7%A8%E8%BC%AF%E5%9F%B7%E8%A1%8C-cc/
======後記=================
常見問題: 解決開檔亂碼問題
https://blog.xuite.net/anadachien/MyQuilt/490835461-%E5%A6%82%E4%BD%95%E8%A7%A3%E6%B1%BAMicrosoft+Visual+Studio+Code%E4%B8%80%E9%96%8B%E5%95%9F%E6%AA%94%E6%A1%88%E4%B8%AD%E6%96%87%E5%AD%97%E8%AE%8A%E4%BA%82%E7%A2%BC%E7%9A%84%E5%95%8F%E9%A1%8C
參考:解決方法--修改使用者設定檔。請點選[檔案]->[喜好設定]->[設定]->在settings.json檔案的右側[使用者設定]處輸入以下幾行設定。
https://code.visualstudio.com/
推薦套件:
中文化
https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hant
c/c++
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
intelligent
https://marketplace.visualstudio.com/items?itemName=austin.code-gnu-global
參考設定:
https://kw0006667.wordpress.com/2017/01/31/%E9%80%8F%E9%81%8E-msbuild-%E5%9C%A8-visual-studio-code-%E7%B7%A8%E8%BC%AF%E5%9F%B7%E8%A1%8C-cc/
======後記=================
常見問題: 解決開檔亂碼問題
https://blog.xuite.net/anadachien/MyQuilt/490835461-%E5%A6%82%E4%BD%95%E8%A7%A3%E6%B1%BAMicrosoft+Visual+Studio+Code%E4%B8%80%E9%96%8B%E5%95%9F%E6%AA%94%E6%A1%88%E4%B8%AD%E6%96%87%E5%AD%97%E8%AE%8A%E4%BA%82%E7%A2%BC%E7%9A%84%E5%95%8F%E9%A1%8C
參考:解決方法--修改使用者設定檔。請點選[檔案]->[喜好設定]->[設定]->在settings.json檔案的右側[使用者設定]處輸入以下幾行設定。
"files.encoding": "shiftjis",
"files.encoding": "eucjp",
"files.encoding": "big5hkscs",
"files.encoding": "GB18030",
"files.encoding": "GBK",
"files.encoding": "utf8",
"files.encoding": "GB2312",
"files.encoding": "Big5",
"files.autoGuessEncoding": true
訂閱:
文章 (Atom)
[SQL]顯示千分位與小數顯示
CONVERT ( data_type [ ( length ) ] , expression [ , style ] ) CONVERT style參數說明 1 (expression為 money 或 smallmoney型別): 0 : 預設,保留小數位後兩位,並四捨...
-
using System.IO; 取得程式當下檔案目錄資訊: string sPath = this .GetType().Assembly.Location; string filename = @"C:\Users\123.text...
-
SELECT "欄位1", SUM("欄位2") FROM "表格名" GROUP BY "欄位1"; 在我們的範例上, Store_Information 表格 Store_Name Sales...
-
圓角指令 指令 : FILLET 快速鍵 : F 使用方式 輸入半徑 1.輸入F 2.輸入R設定半徑 3.輸 入半徑值 4.點選要圓角的物件位置 (T) : 設定修剪模式 (M) : 多重 (P) : 聚合線圓角 半徑輸入0為尖角 兩平行...