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
__author__ = 'bluzky' | |
def name_decorator(f): | |
def wrapper(ten): | |
chuoi_moi = "Ten tui la %s" % ten | |
return f(chuoi_moi) | |
return wrapper | |
# su dung decorator | |
@name_decorator |
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
wstring utf8_to_utf16(string utf8) | |
{ | |
std::vector<unsigned long> unicode; | |
size_t i = 0; | |
while (i < utf8.size()) | |
{ | |
unsigned long uni; | |
size_t todo; | |
bool error = false; | |
unsigned char ch = utf8[i++]; |
NewerOlder