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
# | |
# script to register Python 2.0 or later for use with win32all | |
# and other extensions that require Python registry settings | |
# | |
# written by Joakim Loew for Secret Labs AB / PythonWare | |
# | |
# source: | |
# http://www.pythonware.com/products/works/articles/regpy20.htm | |
# | |
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/[email protected]/msg10512.html |
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
def prn_obj(obj): | |
print ', '.join(['%s:%s' % item for item in obj.__dict__.items()]) |
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 parseURL(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
return { | |
source: url, | |
protocol: a.protocol.replace(':',''), | |
host: a.hostname, | |
port: a.port, | |
query: a.search, | |
params: (function(){ |
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
$('.pagination').jqPaginator({ | |
totalCounts: totalCounts, | |
visiblePages: 8, | |
currentPage: pageNo, | |
pageSize: pageSize, | |
onPageChange: function (arg_num, arg_type) { | |
//type的值有 init 和 change 两种,表示 控件初始化 和 已初始化后的状态改变 | |
console.log('当前第' + arg_num + '页', arg_type); | |
}, | |
first: '<li><a class="btn btn-default" role="button" href="javascript:;">首页</a></li>', |
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 Solution(object): | |
def addDigits_recursion(self, num): | |
""" | |
:type num: int | |
:rtype: int | |
""" | |
num_str = str(num) | |
if len(num_str) == 1: | |
return num | |
new_num = 0 |