git config --global core.autocrlf false
git config --global core.safecrlf true
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
#include <shlwapi.h> | |
#include <iomanip> | |
#pragma comment(lib, "Shlwapi.lib") | |
// 显示内存保护的方法。 | |
// 保护标记指示:允许应用程序对内存进行访问的类型以及操作系统强制访问的类型 | |
inline bool TestSet(DWORD dwTarget, DWORD dwMask) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
// 句柄事件 | |
static LPCTSTR g_szContinueEvent = "event.Continue"; | |
// 创建了一个进程的副本,以子进程模式 (由命令行指定) 工作 | |
BOOL CreateChild() | |
{ | |
// 提取当前可执行文件的文件名 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
// 利用互斥体来保护同时访问的共享资源 | |
class CCountUpDown | |
{ | |
public: | |
// 创建者创建两个线程来访问共享值 | |
CCountUpDown(int nAccesses) : | |
m_hThreadInc(INVALID_HANDLE_VALUE), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
#include <stdio.h> | |
// 创建传递过来的进程的克隆进程并赋于其ID值 | |
void StartClone(int nCloneID) | |
{ | |
// 提取用于当前可执行文件的文件名 | |
TCHAR szFilename[MAX_PATH]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
#include <stdio.h> | |
// 创建传递过来的进程的克隆进程并赋于其ID值 | |
void StartClone(int nCloneID) | |
{ | |
// 提取用于可执行文件的文件名 | |
TCHAR szFilename[MAX_PATH]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
// 进程和操作系统版本信息的简单示例 | |
int main(int argc, char* argv[]) | |
{ | |
// 提取这个进程的ID号 | |
DWORD dwIdThis = ::GetCurrentProcessId(); | |
// 获得和报告这一进程所需的版本,也可以用0表示当前进程 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <math.h> | |
#include <algorithm> | |
using namespace std; | |
void hex_to_oct(const string &str) { | |
// 十六进制转二进制 | |
string bin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add origin https://github.com/igaozp/vue-v2ex.git | |
git push -u origin master |