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
原帖地址: 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 |
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
{ | |
"examsites": [ | |
{ | |
"name": "长沙市交警支队科目一考场", | |
"address": "湖南省长沙市望城区普瑞大道", | |
"cartype": "A1, A2, A3, B1, B2, C1, C2, C5" | |
}, | |
{ | |
"name": "长沙支队科目一湘麓分考场", | |
"address": "湖南省长沙市岳麓区岳麓大道岳麓山大酒店旁", |
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
function display.newFrames(pattern, begin, length, isReversed) | |
local frames = {} | |
local step = 1 | |
local last = begin + length - 1 | |
if isReversed then | |
last, begin = begin, last | |
step = -1 | |
end |
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
// 使用CCLabelBMFont创建文字 | |
// arial16.fnt可以在cocos2d-x包里找到 | |
CCLabelBMFont* label = CCLabelBMFont::labelWithString("Hello World", "arial16.fnt"); | |
label->setPosition(ccp(320, 480)); | |
label->setScale(5); | |
addChild(label); | |
// 为每个单独的字设定颜色 | |
for (int i=0; i<label->getChildrenCount(); i++) | |
{ | |
CCSprite* sub = (CCSprite*)label->getChildByTag(i); |
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
// get_pyfiles.cpp : 定义控制台应用程序的入口点。 | |
// | |
#include <Python.h> | |
#include <Windows.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main(int argc, char* argv[]) | |
{ |
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
Show hidden characters
{ | |
"cmd": ["/AutoHotkey/App/AutoHotkey.exe", "/ErrorStdOut", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\",\nline ([0-9]*)", | |
"selector": "source.ahk", | |
"working_dir": "$file_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
void crypt_test() | |
{ | |
zipFile zf = zipOpen("myarch.zip",APPEND_STATUS_ADDINZIP); | |
int ret = zipOpenNewFileInZip(zf, | |
"myfile.txt", | |
&zfi, | |
NULL, 0, | |
NULL, 0, | |
"my comment for this interior file", | |
Z_DEFLATED, |
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
#!/bin/sh | |
#from http://blog.csdn.net/zenghao0708/article/details/24330621 | |
LogFile="/private/var/tmp/VTechMakeProductLog.txt"; | |
fun() | |
{ | |
StateCode=$? | |
c_time=$(date +%Y/%m/%d" "%H:%M:%S) | |
/bin/echo "\n$c_time [build dmg] state=[$StateCode]:$1" >> $LogFile | |
/bin/echo "$2" >> $LogFile 2>&1 | |
} |
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
#if !defined(UTILHY_SINGLETON_INCLUDED_) | |
#define UTILHY_SINGLETON_INCLUDED_ | |
////////////////////////////////////////// | |
// 使用: | |
// 1, 继承 public CSingleton<T> | |
// 2, 增加成员量: friend class CSingleton<T>; | |
////////////////////////////////////////// | |
template <class T> | |
class CSingleton { |
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
class AStar(object): | |
def __init__(self, graph): | |
self.graph = graph | |
def heuristic(self, node, start, end): | |
raise NotImplementedError | |
def search(self, start, end): | |
openset = set() | |
closedset = set() |
NewerOlder