Skip to content

Instantly share code, notes, and snippets.

@xkyii
xkyii / BX.txt
Created July 2, 2011 04:49
JX3-box_macro
/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] 剑气长江
@xkyii
xkyii / SendPad.h
Created July 2, 2011 11:32
动态调试
//发送到记事本
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;
@xkyii
xkyii / byteToHexStr.cpp
Created July 2, 2011 11:34
字符转化
#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;
@xkyii
xkyii / CMainFrame.h
Created July 8, 2011 05:23
控制窗口按钮
//使最小化按钮无效
void CMainFrame::OnDisableMinbox()
{
//获得窗口风格
LONG style = ::GetWindowLong(m_hWnd,GWL_STYLE);
//设置新的风格
style &= ~(WS_MINIMIZEBOX);
::SetWindowLong(m_hWnd,GWL_STYLE,style);
@xkyii
xkyii / GetModuleDirectory.h
Created July 11, 2011 05:26
GetModuleDirectory
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;
}
@xkyii
xkyii / git乱码解决方案汇总.txt
Created July 13, 2011 05:41
git乱码解决方案汇总
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd
@xkyii
xkyii / minus_invite.py
Created October 12, 2011 03:02
pyUtil
# -*- 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():
"""打开邀请地址"""
@xkyii
xkyii / luabind_test.cpp
Created November 25, 2011 04:00
Luabind
#include <luabind/luabind.hpp>
#pragma comment(lib,"libluabindd.lib")
#pragma comment(lib,"lua51.lib")
#include <iostream>
using namespace std;
using namespace luabind;
class testlua
{
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();
@xkyii
xkyii / Button.js
Created January 17, 2012 03:39
A simple Button for Impact.js
// A Button Entity for Impact.js
// Has 4 States:
// * hidden - Not shown
// * idle - just sitting there
// * active - someone is pushing on it
// * deactive - shown, but not usable
// And 3 Events
// * pressedDown - activated when pressed Down
// * pressed - constantly fires when pressing