View VAssist
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
Refactor Document Method | |
/** | |
* @desc $end$ | |
* @author $Author$ $DATE$ | |
* @param $MethodArg$ | |
* @return $SymbolType$ | |
**/ | |
File header detailed | |
/******************************************************************** |
View exception_test.cpp
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
// VS2013 c++11 gtest | |
#include <chrono> | |
#include "gtest/gtest.h" | |
class ExceptionTest : public testing::Test | |
{ | |
public: | |
class TimeCounter | |
{ | |
public: |
View BX.txt
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
/skill [tbuff:破剑八刀] 剑转流云 | |
/skill [life<0.6] 天地低昂 | |
/skill [life<0.7] 鹊踏枝 | |
/skill [mana<0.8] 龙池乐 | |
/skill [nobuff:剑舞] 名动四方 | |
/skill [nocd:满堂势,buff:剑舞<3] 满堂势 | |
/skill [mbufftime:急曲<5] 玳弦急曲 | |
/skill [mbufftime:急曲>5,distance<10,nobuff:剑神无我] 剑神无我 | |
/skill [mbufftime:急曲>5,nocd:剑气长江] 繁音急节 | |
/skill [mbufftime:急曲>5,buff:剑舞>7] 剑气长江 |
View SendPad.h
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
//发送到记事本 | |
void SendPad( string str ) | |
{ | |
//std::wstring wstr(str.begin(),str.end()); | |
//_ReportTip( wstr, -1 ); | |
HWND childhandle = NULL; | |
HWND npad = ::FindWindowA("NOTEPAD",NULL); | |
if (npad) | |
{ | |
POINT pt; pt.x=0x14, pt.y=0x14; |
View byteToHexStr.cpp
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 <string> | |
std::string byteToHexStr(unsigned char byte_arr[], int arr_len) | |
{ | |
std::string hexstr; | |
for (int i=0;i<arr_len;i++) | |
{ | |
char hex1; | |
char hex2; | |
int value=byte_arr[i]; //直接将unsigned char赋值给整型的值,系统会自动强制转换 | |
int v1=value/16; |
View CMainFrame.h
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
//使最小化按钮无效 | |
void CMainFrame::OnDisableMinbox() | |
{ | |
//获得窗口风格 | |
LONG style = ::GetWindowLong(m_hWnd,GWL_STYLE); | |
//设置新的风格 | |
style &= ~(WS_MINIMIZEBOX); | |
::SetWindowLong(m_hWnd,GWL_STYLE,style); |
View GetModuleDirectory.h
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
CString GetModuleDirectory(void) | |
{ | |
TCHAR tempstr[1024]; | |
::GetModuleFileName(AfxGetInstanceHandle(),tempstr,sizeof(tempstr)); | |
CString mulu; | |
mulu.Format(_T("%s"),tempstr); | |
mulu = mulu.Left(mulu.ReverseFind('\\')+1); | |
return mulu; | |
} |
View minus_invite.py
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
# -*- coding: utf-8 -*- | |
import urllib2 | |
import urllib | |
import cookielib | |
minus_invite = "http://min.us/rjRVW6n" #邀请地址 | |
commit_url = "http://minus.com/api/login/register" #注册地址 | |
def open_url(): | |
"""打开邀请地址""" |
View luabind_test.cpp
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 <luabind/luabind.hpp> | |
#pragma comment(lib,"libluabindd.lib") | |
#pragma comment(lib,"lua51.lib") | |
#include <iostream> | |
using namespace std; | |
using namespace luabind; | |
class testlua | |
{ |
View read_file.c++
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
std::ifstream in("some.file"); | |
std::istreambuf_iterator<char> beg(in), end; | |
std::string str(beg, end); | |
// or | |
std::ifstream in("some.file"); | |
std::ostringstream tmp; | |
tmp << in.rdbuf(); | |
std::string str = tmp.str(); |
OlderNewer