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
// | |
// CCProperty.cpp | |
// shilipu | |
// | |
// Created by wang xiaodong on 13-7-9. | |
// | |
// | |
#include "CCProperty.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
// CCLayerLoader.cpp | |
// line: 7 | |
// #define PROPERTY_TOUCH_ENABLED "isTouchEnabled" | |
// ccbreader version 5 | |
// as cocosbuilder 3 alpha 5, is "touchEnabled" | |
#define PROPERTY_TOUCH_ENABLED "touchEnabled" |
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
# ori: | |
#def arg_string(func): | |
# """Returns a nice argstring for a function or method""" | |
# return inspect.formatargspec(*inspect.getargspec(func)) | |
# the module tamplete : | |
# class Template ctor | |
# def __init__(self, text, filename='<template>', filter=None, globals=None, builtins=None, extensions=None): | |
# the '<' and '>' cause the html break | |
# using markdown.htmlquote replace '<' and '>' | |
# work profectly |
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 PKCS7Encoder(): | |
""" | |
Technique for padding a string as defined in RFC 2315, section 10.3, | |
note #2 | |
""" | |
class InvalidBlockSizeError(Exception): | |
"""Raised for invalid block sizes""" | |
pass | |
def __init__(self, block_size=16): |
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
POST /tiaoma/query.php HTTP/1.1 | |
Host: www.liantu.com | |
Cache-Control: no-cache | |
Content-Type: application/x-www-form-urlencoded | |
ean=69012341 |
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
import base64 | |
thunderUrl = raw_input("thunder url:") | |
header = "thunder://" | |
# thunderUrl = "thunder://QUFodHRwOi8vZGwxMTcuODBzLmxhOjkyMC8xNDA3L+S/oeWPty/kv6Hlj7dfaGQubXA0Wlo=" | |
thunderUrl = thunderUrl[len(header):] | |
print base64.b64decode(thunderUrl)[2:-2] |
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 | |
if [ $USER != "root" ]; then | |
echo "The library installation must be under root user." | |
exit 1; | |
fi | |
PKGS="g++ gcc python-dev subversion git" | |
for pkg in $PKGS; do |
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
s = "\u4F60\u8FD8\u6CA1\u9009\u4E2D\u8868\u60C5\uFF0C\u53EB\u6211\u600E\u4E48\u53D1\u9001\u554A\uFF1F" | |
def unicodeToString(uniString): | |
newString = uniString.split("\u") | |
ret = "".join([unichr(int(i, 16)).encode("utf8") for i in newString if i ]) | |
print ret | |
return ret | |
unicodeToString(s) | |
大多数时候看到的unicode字符串都是带\u开头的,处理起来简单的静态的办法就是加入prefix `u` |
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
$ kill -9 `ps aux|grep -E "S.+python.+"|awk '{print $2}'` |
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
{ | |
"terminal": "C:/cygwin/bin/mintty.exe", | |
"parameters": ["/bin/env", "CHERE_INVOKING=1", "/bin/xhere", "/bin/bash", "`%CWD%`"] | |
} |
OlderNewer