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
/*base*/ | |
body { | |
background: #fff; | |
} | |
.btn { | |
display: inline-block; | |
padding: 4px 12px; | |
margin-bottom: 0; | |
font-size: 14px; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>自定义滚动条</title> | |
<link rel="stylesheet" href="./css/reset.css"> | |
<link rel="stylesheet" href="./css/1503style.css"> | |
</head> | |
<body> | |
<div id="wrap"> |
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
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
killall Dock |
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://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
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
img { | |
display: block; | |
} | |
html, | |
body { | |
height: 100%; | |
overflow: hidden; | |
} | |
.banner { | |
position: relative; |
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
list(reversed(a)) #reversed(a)返回的是迭代器,所以前面加个list转换为list | |
sorted(a,reverse=True) | |
a[: :-1] #其中[::-1]代表从后向前取值,每次步进值为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
""" | |
普通算数操作符 | |
现在我们仅仅覆盖了普通的二进制操作符:+,-,*和类似符号。这些符号大部分来说都浅显易懂。 | |
__add__(self, other) 实现加法。 | |
__sub__(self, other) 实现减法。 | |
__mul__(self, other) 实现乘法。 | |
__floordiv__(self, other) 实现 // 符号实现的整数除法。 | |
__div__(self, other) 实现 / 符号实现的除法。 | |
__truediv__(self, other) 实现真除法。 |
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 gcd(m, n): | |
if n == 0: | |
m, n = n, m | |
while m != 0: | |
m, n = n%m, m | |
return n | |
""" | |
最著名的寻找最大公因数的方法是欧几里得算法. | |
欧几里得算法规定: |