-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVP10.html
318 lines (291 loc) · 47.6 KB
/
VP10.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<title>
VP10: Non-ideal Capacitor - HackMD
</title>
<link rel="icon" type="image/png" href="https://hackmd.io/favicon.png">
<link rel="apple-touch-icon" href="https://hackmd.io/apple-touch-icon.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css" integrity="sha256-QiWfLIsCT02Sdwkogf6YMiQlj4NE84MKkzEMkZnMGdg=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/themes/prism.min.css" integrity="sha256-vtR0hSWRc3Tb26iuN2oZHt3KRUomwTufNIf5/4oeCyg=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/[email protected]/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<style>
@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i|Source+Code+Pro:300,400,500|Source+Sans+Pro:300,300i,400,400i,600,600i|Source+Serif+Pro&subset=latin-ext);.hljs{display:block;background:#fff;padding:.5em;color:#333;overflow-x:auto}.hljs-comment,.hljs-meta{color:#969896}.hljs-emphasis,.hljs-quote,.hljs-string,.hljs-strong,.hljs-template-variable,.hljs-variable{color:#df5000}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#a71d5d}.hljs-attribute,.hljs-bullet,.hljs-literal,.hljs-number,.hljs-symbol{color:#0086b3}.hljs-built_in,.hljs-builtin-name{color:#005cc5}.hljs-name,.hljs-section{color:#63a35c}.hljs-tag{color:#333}.hljs-attr,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-title{color:#795da3}.hljs-addition{color:#55a532;background-color:#eaffea}.hljs-deletion{color:#bd2c00;background-color:#ffecec}.hljs-link{text-decoration:underline}.markdown-body{font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body:after,.markdown-body:before{display:table;content:""}.markdown-body:after{clear:both}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#c00}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body hr{height:.25em;padding:0;margin:24px 0;background-color:#e7e7e7;border:0}.markdown-body blockquote{font-size:16px;padding:0 1em;color:#777;border-left:.25em solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body kbd,.popover kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .loweralpha{list-style-type:lower-alpha}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#000;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 code,.markdown-body h1 tt,.markdown-body h2 code,.markdown-body h2 tt,.markdown-body h3 code,.markdown-body h3 tt,.markdown-body h4 code,.markdown-body h4 tt,.markdown-body h5 code,.markdown-body h5 tt,.markdown-body h6 code,.markdown-body h6 tt{font-size:inherit}.markdown-body h1{font-size:2em}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body h2{font-size:1.5em}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{font-size:.85em;color:#777}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol.no-list,.markdown-body ul.no-list{padding:0;list-style-type:none}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{padding-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #ddd}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#333}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:0;padding-top:.2em;padding-bottom:.2em;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before,.markdown-body tt:after,.markdown-body tt:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before,.markdown-body pre tt:after,.markdown-body pre tt:before{content:normal}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-line-num{padding:10px 8px 9px;text-align:right;background:#fff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:700;background:#f8f8f8;border-top:0}.news .alert .markdown-body blockquote{padding:0 0 0 40px;border:0 none}.activity-tab .news .alert .commits,.activity-tab .news .markdown-body blockquote{padding-left:0}.task-list-item{list-style-type:none}.task-list-item label{font-weight:400}.task-list-item.enabled label{cursor:pointer}.task-list-item+.task-list-item{margin-top:3px}.task-list-item-checkbox{float:left;margin:.31em 0 .2em -1.3em!important;vertical-align:middle;cursor:default!important}.markdown-body{padding-top:40px;padding-bottom:40px;max-width:758px;overflow:visible!important}.markdown-body .emoji{vertical-align:top}.markdown-body pre{border:inherit!important}.markdown-body code{color:inherit!important}.markdown-body pre code .wrapper{display:-moz-inline-flex;display:-ms-inline-flex;display:-o-inline-flex;display:inline-flex}.markdown-body pre code .gutter{float:left;overflow:hidden;-webkit-user-select:none;user-select:none}.markdown-body pre code .gutter.linenumber{text-align:right;position:relative;display:inline-block;cursor:default;z-index:4;padding:0 8px 0 0;min-width:20px;box-sizing:content-box;color:#afafaf!important;border-right:3px solid #6ce26c!important}.markdown-body pre code .gutter.linenumber>span:before{content:attr(data-linenumber)}.markdown-body pre code .code{float:left;margin:0 0 0 16px}.markdown-body .gist .line-numbers{border-left:none;border-top:none;border-bottom:none}.markdown-body .gist .line-data{border:none}.markdown-body .gist table{border-spacing:0;border-collapse:inherit!important}.markdown-body code[data-gist-id]{background:none;padding:0}.markdown-body code[data-gist-id]:after,.markdown-body code[data-gist-id]:before{content:""}.markdown-body code[data-gist-id] .blob-num{border:unset}.markdown-body code[data-gist-id] table{overflow:unset;margin-bottom:unset}.markdown-body code[data-gist-id] table tr{background:unset}.markdown-body[dir=rtl] pre{direction:ltr}.markdown-body[dir=rtl] code{direction:ltr;unicode-bidi:embed}.markdown-body .alert>p{margin-bottom:0}.markdown-body pre.abc,.markdown-body pre.flow-chart,.markdown-body pre.graphviz,.markdown-body pre.mermaid,.markdown-body pre.sequence-diagram,.markdown-body pre.vega{text-align:center;background-color:inherit;border-radius:0;white-space:inherit}.markdown-body pre.abc>code,.markdown-body pre.flow-chart>code,.markdown-body pre.graphviz>code,.markdown-body pre.mermaid>code,.markdown-body pre.sequence-diagram>code,.markdown-body pre.vega>code{text-align:left}.markdown-body pre.abc>svg,.markdown-body pre.flow-chart>svg,.markdown-body pre.graphviz>svg,.markdown-body pre.mermaid>svg,.markdown-body pre.sequence-diagram>svg,.markdown-body pre.vega>svg{max-width:100%;height:100%}.markdown-body pre>code.wrap{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.markdown-body .alert>p,.markdown-body .alert>ul{margin-bottom:0}.markdown-body summary{display:list-item}.markdown-body summary:focus{outline:none}.markdown-body details summary{cursor:pointer}.markdown-body details:not([open])>:not(summary){display:none}.markdown-body figure{margin:1em 40px}.markdown-body .mark,.markdown-body mark{background-color:#fff1a7}.vimeo,.youtube{cursor:pointer;display:table;text-align:center;background-position:50%;background-repeat:no-repeat;background-size:contain;background-color:#000;overflow:hidden}.vimeo,.youtube{position:relative;width:100%}.youtube{padding-bottom:56.25%}.vimeo img{width:100%;object-fit:contain;z-index:0}.youtube img{object-fit:cover;z-index:0}.vimeo iframe,.youtube iframe,.youtube img{width:100%;height:100%;position:absolute;top:0;left:0}.vimeo iframe,.youtube iframe{vertical-align:middle;z-index:1}.vimeo .icon,.youtube .icon{position:absolute;height:auto;width:auto;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;opacity:.3;transition:opacity .2s;z-index:0}.vimeo:hover .icon,.youtube:hover .icon{opacity:.6;transition:opacity .2s}.slideshare .inner,.speakerdeck .inner{position:relative;width:100%}.slideshare .inner iframe,.speakerdeck .inner iframe{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.MJX_Assistive_MathML{display:none}.ui-infobar{position:relative;z-index:2;max-width:760px;margin:25px auto -25px;padding:0 15px;color:#777}.toc .invisable-node{list-style-type:none}.ui-toc{position:fixed;bottom:20px;z-index:998}.ui-toc-label{opacity:.3;background-color:#ccc;border:none;transition:opacity .2s}.ui-toc .open .ui-toc-label{opacity:1;color:#fff;transition:opacity .2s}.ui-toc-label:focus{opacity:.3;background-color:#ccc;color:#000}.ui-toc-label:hover{opacity:1;background-color:#ccc;transition:opacity .2s}.ui-toc-dropdown{margin-top:23px;margin-bottom:20px;padding-left:10px;padding-right:10px;max-width:45vw;width:25vw;max-height:70vh;overflow:auto;text-align:inherit}.ui-toc-dropdown>.toc{max-height:calc(70vh - 100px);overflow:auto}.ui-toc-dropdown[dir=rtl] .nav{padding-right:0;letter-spacing:.0029em}.ui-toc-dropdown a{overflow:hidden;text-overflow:ellipsis;white-space:pre}.ui-toc-dropdown .nav>li>a{display:block;padding:4px 20px;font-size:13px;font-weight:500;color:#767676}.ui-toc-dropdown .nav>li:first-child:last-child > ul,.ui-toc-dropdown .toc.expand ul{display:block}.ui-toc-dropdown .nav>li>a:focus,.ui-toc-dropdown .nav>li>a:hover{padding-left:19px;color:#000;text-decoration:none;background-color:transparent;border-left:1px solid #000}.ui-toc-dropdown[dir=rtl] .nav>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav>li>a:hover{padding-right:19px;border-left:none;border-right:1px solid #000}.ui-toc-dropdown .nav>.active:focus>a,.ui-toc-dropdown .nav>.active:hover>a,.ui-toc-dropdown .nav>.active>a{padding-left:18px;font-weight:700;color:#000;background-color:transparent;border-left:2px solid #000}.ui-toc-dropdown[dir=rtl] .nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav>.active>a{padding-right:18px;border-left:none;border-right:2px solid #000}.ui-toc-dropdown .nav .nav{display:none;padding-bottom:10px}.ui-toc-dropdown .nav>.active>ul{display:block}.ui-toc-dropdown .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:12px;font-weight:400}.ui-toc-dropdown[dir=rtl] .nav .nav>li>a{padding-right:30px}.ui-toc-dropdown .nav .nav>li>ul>li>a{padding-top:1px;padding-bottom:1px;padding-left:40px;font-size:12px;font-weight:400}.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a{padding-right:40px}.ui-toc-dropdown .nav .nav>li>a:focus,.ui-toc-dropdown .nav .nav>li>a:hover{padding-left:29px}.ui-toc-dropdown[dir=rtl] .nav .nav>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav .nav>li>a:hover{padding-right:29px}.ui-toc-dropdown .nav .nav>li>ul>li>a:focus,.ui-toc-dropdown .nav .nav>li>ul>li>a:hover{padding-left:39px}.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a:hover{padding-right:39px}.ui-toc-dropdown .nav .nav>.active:focus>a,.ui-toc-dropdown .nav .nav>.active:hover>a,.ui-toc-dropdown .nav .nav>.active>a{padding-left:28px;font-weight:500}.ui-toc-dropdown[dir=rtl] .nav .nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>a{padding-right:28px}.ui-toc-dropdown .nav .nav>.active>.nav>.active:focus>a,.ui-toc-dropdown .nav .nav>.active>.nav>.active:hover>a,.ui-toc-dropdown .nav .nav>.active>.nav>.active>a{padding-left:38px;font-weight:500}.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active>a{padding-right:38px}.markdown-body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif}html[lang^=ja] .markdown-body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,Hiragino Kaku Gothic Pro,ヒラギノ角ゴ Pro W3,Osaka,Meiryo,メイリオ,MS Gothic,MS\ ゴシック,sans-serif}html[lang=zh-tw] .markdown-body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,PingFang TC,Microsoft JhengHei,微軟正黑,sans-serif}html[lang=zh-cn] .markdown-body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif}html .markdown-body[lang^=ja]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,Hiragino Kaku Gothic Pro,ヒラギノ角ゴ Pro W3,Osaka,Meiryo,メイリオ,MS Gothic,MS\ ゴシック,sans-serif}html .markdown-body[lang=zh-tw]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,PingFang TC,Microsoft JhengHei,微軟正黑,sans-serif}html .markdown-body[lang=zh-cn]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Roboto,Arial,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif}html[lang^=ja] .ui-toc-dropdown{font-family:Source Sans Pro,Helvetica,Arial,Meiryo UI,MS PGothic,MS\ Pゴシック,sans-serif}html[lang=zh-tw] .ui-toc-dropdown{font-family:Source Sans Pro,Helvetica,Arial,Microsoft JhengHei UI,微軟正黑UI,sans-serif}html[lang=zh-cn] .ui-toc-dropdown{font-family:Source Sans Pro,Helvetica,Arial,Microsoft YaHei UI,微软雅黑UI,sans-serif}html .ui-toc-dropdown[lang^=ja]{font-family:Source Sans Pro,Helvetica,Arial,Meiryo UI,MS PGothic,MS\ Pゴシック,sans-serif}html .ui-toc-dropdown[lang=zh-tw]{font-family:Source Sans Pro,Helvetica,Arial,Microsoft JhengHei UI,微軟正黑UI,sans-serif}html .ui-toc-dropdown[lang=zh-cn]{font-family:Source Sans Pro,Helvetica,Arial,Microsoft YaHei UI,微软雅黑UI,sans-serif}.ui-affix-toc{position:fixed;top:0;max-width:15vw;max-height:70vh;overflow:auto}.back-to-top,.expand-toggle,.go-to-bottom{display:block;padding:4px 10px;margin-top:10px;margin-left:10px;font-size:12px;font-weight:500;color:#999}.back-to-top:focus,.back-to-top:hover,.expand-toggle:focus,.expand-toggle:hover,.go-to-bottom:focus,.go-to-bottom:hover{color:#563d7c;text-decoration:none}.back-to-top,.go-to-bottom{margin-top:0}.ui-user-icon{width:20px;height:20px;display:block;border-radius:3px;margin-top:2px;margin-bottom:2px;margin-right:5px;background-position:50%;background-repeat:no-repeat;background-size:cover}.ui-user-icon.small{width:18px;height:18px;display:inline-block;vertical-align:middle;margin:0 0 .2em}.ui-infobar>small>span{line-height:22px}.ui-infobar>small .dropdown{display:inline-block}.ui-infobar>small .dropdown a:focus,.ui-infobar>small .dropdown a:hover{text-decoration:none}.ui-published-note{color:#337ab7}.ui-published-note .fa{font-size:20px;vertical-align:top}.unselectable{-webkit-user-select:none;-o-user-select:none;user-select:none}@media print{blockquote,div,img,pre,table{page-break-inside:avoid!important}a[href]:after{font-size:12px!important}}.markdown-body.slides{position:relative;z-index:1;color:#222}.markdown-body.slides:before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;background-color:currentColor;box-shadow:0 0 0 50vw}.markdown-body.slides section[data-markdown]{position:relative;margin-bottom:1.5em;background-color:#fff;text-align:center}.markdown-body.slides section[data-markdown] code{text-align:left}.markdown-body.slides section[data-markdown]:before{content:"";display:block;padding-bottom:56.23%}.markdown-body.slides section[data-markdown]>div:first-child{position:absolute;top:50%;left:1em;right:1em;transform:translateY(-50%);max-height:100%;overflow:hidden}.markdown-body.slides section[data-markdown]>ul{display:inline-block}.markdown-body.slides>section>section+section:after{content:"";position:absolute;top:-1.5em;right:1em;height:1.5em;border:3px solid #777}body{font-smoothing:subpixel-antialiased!important;-webkit-font-smoothing:subpixel-antialiased!important;-moz-osx-font-smoothing:auto!important;text-shadow:0 0 1em transparent,1px 1px 1.2px rgba(0,0,0,.004);-webkit-overflow-scrolling:touch;letter-spacing:.025em}.focus,:focus{outline:none!important}::-moz-focus-inner{border:0!important}body{font-family:Source Sans Pro,Helvetica,Arial,sans-serif}html[lang^=ja] body{font-family:Source Sans Pro,Helvetica,Arial,Hiragino Kaku Gothic Pro,ヒラギノ角ゴ Pro W3,Osaka,Meiryo,メイリオ,MS Gothic,MS\ ゴシック,sans-serif}html[lang=zh-tw] body{font-family:Source Sans Pro,Helvetica,Arial,PingFang TC,Microsoft JhengHei,微軟正黑,sans-serif}html[lang=zh-cn] body{font-family:Source Sans Pro,Helvetica,Arial,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}abbr[data-original-title],abbr[title]{cursor:help}body.modal-open{overflow-y:auto;padding-right:0!important}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js" integrity="sha256-g6iAfvZp+nDQ2TdTR/VVKJf3bGro4ub5fvWSWVRi2NE=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-shim.min.js" integrity="sha256-8E4Is26QH0bD52WoQpcB+R/tcWQtpzlCojrybUd7Mxo=" crossorigin="anonymous"></script>
<![endif]-->
</head>
<body>
<div id="doc" class="markdown-body container-fluid comment-enabled" data-hard-breaks="true" style="position: relative;"><h1 id="VP10-Non-ideal-Capacitor"><a class="anchor hidden-xs" href="#VP10-Non-ideal-Capacitor" title="VP10-Non-ideal-Capacitor"><span class="octicon octicon-link"></span></a>VP10: Non-ideal Capacitor</h1><p>這學期程式作業只會有紙本說明,不會有影片講解。但是程式概念不會超出上學期所學,而物理部分則是本學期的內容。</p><ul>
<li>
<p><a href="pdf/VP10.pdf" target="_blank" rel="noopener">官方PDF檔</a></p>
<blockquote>
<p>跟新同學說明一下,上面這是老師提供的 PDF 檔。因為覺得這樣 code 不太好讀,所以我和另一班助教會把作業說明重打成 Markdown 格式(放在網站上的是 html 就是了)。</p>
</blockquote>
</li>
</ul><h3 id="同學們的影片"><a class="anchor hidden-xs" href="#同學們的影片" title="同學們的影片"><span class="octicon octicon-link"></span></a>同學們的影片</h3><ul>
<li><a href="https://www.youtube.com/playlist?list=PLH1vQ79HZo9n4t_mN-TCbz9F6jzuyH-pp" target="_blank" rel="noopener">這部份當然是還沒有啦</a></li>
</ul><h2 id="作業繳交格式"><a class="anchor hidden-xs" href="#作業繳交格式" title="作業繳交格式"><span class="octicon octicon-link"></span></a>作業繳交格式</h2><p>請上傳一個 zip 檔(壓縮檔,請注意副檔名要是 <code>zip</code>)到 CEIBA,zip 檔內需要包含一個<strong>名稱是自己學號的資料夾</strong>,裡面包含一個名為 <code>must.py</code> 的 py 檔。而若本次作業有拍攝說明影片,請<strong>將影片連結寫在</strong> <code>video.txt</code> <strong>裡面,並一併放入學號資料夾中</strong>。</p><p>範例:(zip 檔名可以隨便取,CEIBA 系統會自己把檔名改掉)</p><pre><code>hisashiburi.zip
└── r07222060
├── must.py
└── video.txt
</code></pre><blockquote>
<h4 id="助教註0"><a class="anchor hidden-xs" href="#助教註0" title="助教註0"><span class="octicon octicon-link"></span></a>助教註:</h4>
<p>如果你是用 JuPyter notebook 寫的,請記得將你的程式用 <code>.py</code> 格式下載下來,不要給我 <code>.ipynb</code> 或甚至 <code>.html</code>。</p>
</blockquote><h3 id="繳交期限"><a class="anchor hidden-xs" href="#繳交期限" title="繳交期限"><span class="octicon octicon-link"></span></a>繳交期限</h3><p><code>2020/04/01 WED 21:00</code></p><h2 id="I-Non-ideal-Capacitor-amp-Numerical-Laplacian-Solver"><a class="anchor hidden-xs" href="#I-Non-ideal-Capacitor-amp-Numerical-Laplacian-Solver" title="I-Non-ideal-Capacitor-amp-Numerical-Laplacian-Solver"><span class="octicon octicon-link"></span></a>I. Non-ideal Capacitor & Numerical Laplacian Solver</h2><p>A parallel-plate capacitor, shown in the figure, has an infinite length in z-axis. The distance between the plates is d = 1 mm, the width of both plates is L = 5 mm, and the voltage is 100 Volt on the top plate and -100 Volt on the bottom. If we want to consider the edge effect of the non-ideal capacitor, we need to calculate numerically the total charge on each plate per meter length in z-axis in order to obtain the capacitabce value per meter length in z-axis.</p>
<p><img src="pic/VP10/1.png" alt="1" height=300></p>
<blockquote>
<h4 id="助教註"><a class="anchor hidden-xs" href="#助教註" title="助教註"><span class="octicon octicon-link"></span></a>助教註:</h4>
<p>I’m sorry that the readability here is poor due to the numerous equations. You can go check the PDF file of Professor if you wish.</p>
</blockquote><p>From General Physics course, we already know that anywhere <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\vec{E}&space;=&space;-(\frac{\partial{V}}{\partial{x}}\hat{x}+\frac{\partial{V}}{\partial{y}}\hat{y}+\frac{\partial{V}}{\partial{z}}\hat{z})" title="\vec{E} = -(\frac{\partial{V}}{\partial{x}}\hat{x}+\frac{\partial{V}}{\partial{y}}\hat{y}+\frac{\partial{V}}{\partial{z}}\hat{z})" height="36">. Now we choose an infinitesimal cube of volume <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;dxdydz" title="dxdydz" height="18">. In the two faces perpendicular to the x-axis, we have the net electric flux for the two faces as<br>
<img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;E_{x}(x+dx)dydz&space;-&space;E_{x}(x)dydz&space;=&space;(\frac{\partial{E_{x}}}{\partial{x}}dx)dydz&space;=&space;\frac{\partial{E_{x}}}{\partial{x}}dV" title="E_{x}(x+dx)dydz - E_{x}(x)dydz = (\frac{\partial{E_{x}}}{\partial{x}}dx)dydz = \frac{\partial{E_{x}}}{\partial{x}}dV" height="36">.</p>
<p><img src="pic/VP10/2.png" alt="2" height=250></p>
<p>Similiarly the net flux for the two faces perpendicular to y-axis is <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial{E_{y}}}{\partial{y}}dV" title="\frac{\partial{E_{y}}}{\partial{y}}dV" height="36">, and the two faces to z-axis is <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial{E_{z}}}{\partial{z}}dV" title="\frac{\partial{E_{z}}}{\partial{z}}dV" height="36">. Therefore, the total flux around the cube is <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\phi=(\frac{\partial{E_{x}}}{\partial{x}}+\frac{\partial{E_{y}}}{\partial{y}}+\frac{\partial{E_{z}}}{\partial{z}})dV" title="\phi=(\frac{\partial{E_{x}}}{\partial{x}}+\frac{\partial{E_{y}}}{\partial{y}}+\frac{\partial{E_{z}}}{\partial{z}})dV" height="36">. If no charge is inside this cube, by Gauss’ Law, <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\phi=\frac{q}{\epsilon_{0}}=0" title="\phi=\frac{q}{\epsilon_{0}}=0" height="36">, meaning <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial{E_{x}}}{\partial{x}}+\frac{\partial{E_{y}}}{\partial{y}}+\frac{\partial{E_{z}}}{\partial{z}}=0" title="\frac{\partial{E_{x}}}{\partial{x}}+\frac{\partial{E_{y}}}{\partial{y}}+\frac{\partial{E_{z}}}{\partial{z}}=0" height="36">. With <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\vec{E}&space;=&space;-(\frac{\partial{V}}{\partial{x}}\hat{x}+\frac{\partial{V}}{\partial{y}}\hat{y}+\frac{\partial{V}}{\partial{z}}\hat{z})=E_{x}\hat{x}+E_{y}\hat{y}+E_{z}\hat{z}" title="\vec{E} = -(\frac{\partial{V}}{\partial{x}}\hat{x}+\frac{\partial{V}}{\partial{y}}\hat{y}+\frac{\partial{V}}{\partial{z}}\hat{z})=E_{x}\hat{x}+E_{y}\hat{y}+E_{z}\hat{z}" height="36">, it then becomes <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial^2{V}}{\partial{x^2}}+\frac{\partial^2{V}}{\partial{y^2}}+\frac{\partial^2{V}}{\partial{z^2}}=0" title="\frac{\partial^2{V}}{\partial{x^2}}+\frac{\partial^2{V}}{\partial{y^2}}+\frac{\partial^2{V}}{\partial{z^2}}=0" height="36">, which is called a Laplace’s Equation and is usually written as <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\nabla^2{V}=0" title="\nabla^2{V}=0" height="13">. The operator <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\nabla^2" title="\nabla^2" height="13"> is called an Laplacian operator.</p><p>Since in this problem, there is no charge variation along the z-axis, by symmetry, <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;E_{z}=0" title="E_{z}=0" height="13"> and <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial^2{V}}{\partial{z^2}}=0" title="\frac{\partial^2{V}}{\partial{z^2}}=0" height="36"> everywhere. We can reduce the 3-dimensional Laplace’s Equation to 2-dimensonal, <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial^2{V}}{\partial{x^2}}+\frac{\partial^2{V}}{\partial{y^2}}=0" title="\frac{\partial^2{V}}{\partial{x^2}}+\frac{\partial^2{V}}{\partial{y^2}}=0" height="36">. With the condition that at the position of the top and bottom plates <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;V=+100V" title="V=+100V" height="13"> and <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;-100V" title="-100V" height="13"> respectively, we can try to solve this Laplacian problem by the numerical Laplacian solver. The simplest numerical Laplacian solver is illustrated as the following and starts from the Taylor’s expansion:</p><p><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;V(x+h,y)&space;\approx&space;V(x,y)&space;+&space;h\frac{\partial{V}}{\partial{x}}&space;+&space;\frac{h^2}{2}\frac{\partial^2{V}}{\partial{x^2}}" title="V(x+h,y) \approx V(x,y) + h\frac{\partial{V}}{\partial{x}} + \frac{h^2}{2}\frac{\partial^2{V}}{\partial{x^2}}" height="36"> <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\qquad\qquad" title="\qquad\qquad" height="36"><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\qquad\qquad" title="\qquad\qquad" height="36"><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;V(x,y+h)&space;\approx&space;V(x,y)&space;+&space;h\frac{\partial{V}}{\partial{y}}&space;+&space;\frac{h^2}{2}\frac{\partial^2{V}}{\partial{y^2}}&space;" title="V(x,y+h) \approx V(x,y) + h\frac{\partial{V}}{\partial{y}} + \frac{h^2}{2}\frac{\partial^2{V}}{\partial{y^2}}" height="36"></p><p><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;V(x-h,y)&space;\approx&space;V(x,y)&space;-&space;h\frac{\partial{V}}{\partial{x}}&space;+&space;\frac{h^2}{2}\frac{\partial^2{V}}{\partial{x^2}}" title="V(x-h,y) \approx V(x,y) - h\frac{\partial{V}}{\partial{x}} + \frac{h^2}{2}\frac{\partial^2{V}}{\partial{x^2}}" height="36"><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\qquad\qquad" title="\qquad\qquad" height="36"><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\qquad\qquad" title="\qquad\qquad" height="36"><img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;V(x,y-h)&space;\approx&space;V(x,y)&space;-&space;h\frac{\partial{V}}{\partial{y}}&space;+&space;\frac{h^2}{2}\frac{\partial^2{V}}{\partial{y^2}}&space;" title="V(x,y-h) \approx V(x,y) - h\frac{\partial{V}}{\partial{y}} + \frac{h^2}{2}\frac{\partial^2{V}}{\partial{y^2}}" height="36"></p><p>We add the above four eqations and will obtain<img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;V(x,y)=\frac{1}{4}[V(x+h,y)&space;+&space;V(x-h,y)&space;+&space;V(x,y+h)&space;+&space;V(x,y-h)]&space;\qquad&space;" title="V(x,y)=\frac{1}{4}[V(x+h,y) + V(x-h,y) + V(x,y+h) + V(x,y-h)] \qquad" height="36"></p><p>because <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\frac{\partial^2{V}}{\partial{x^2}}+\frac{\partial^2{V}}{\partial{y^2}}=0" title="\frac{\partial^2{V}}{\partial{x^2}}+\frac{\partial^2{V}}{\partial{y^2}}=0" height="36">.</p><p>Therefore, the potential at each grid-point is simply the mean value of its nearest neighbors. To find the soulution one must fix the values of the grid-points on the boundaries or on the positions according to the required conditions and then iterate the potentials until successive results agree each other to within the desired tolerance. This usually can be done with many enough iterations.</p><h2 id="II-Homework"><a class="anchor hidden-xs" href="#II-Homework" title="II-Homework"><span class="octicon octicon-link"></span></a>II. Homework</h2><h3 id="MUST"><a class="anchor hidden-xs" href="#MUST" title="MUST"><span class="octicon octicon-link"></span></a>MUST</h3><p>In the following program:</p><ol>
<li>We use the finite-difference methods for the grid points on the region of interest and set the potential on the top and bottom plates to be <img src="https://latex.codecogs.com/gif.latex?\dpi{150}&space;\pm&space;100V" title="\pm 100V" height="13">.</li>
<li>We solve the 2-D Laplace’s equation at each grid-point</li>
<li>By taking the gradient of the potential, we obtain the electric field on x-y plane.</li>
<li>By numerically integrating the Gauss surface, we obtain the total charge on the capacitor.</li>
<li>Dividing the total charge by the voltage difference, we obtain the capacitance.</li>
</ol><p>Your job is to complete the template code for <strong>2.</strong>, <strong>4.</strong>, and <strong>5.</strong> and compare the value of <strong>5.</strong> to the value of an ideal parallel-plate capacitor.</p><p>(Note: You can change this program easily to calculate the capacitance of a rectangular parallel-plate capacitor, i.e. the length in z is not infinite)</p><pre><code class="python hljs"><span class="hljs-keyword">from</span> numpy <span class="hljs-keyword">import</span> *
<span class="hljs-keyword">from</span> vpython <span class="hljs-keyword">import</span> *
epsilon = <span class="hljs-number">8.854E-12</span>
N = <span class="hljs-number">101</span>
h = <span class="hljs-number">1E-2</span>/(N<span class="hljs-number">-1</span>)
L, d= <span class="hljs-number">5E-3</span>,<span class="hljs-number">1E-3</span>
V0 = <span class="hljs-number">200</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">solve_laplacian</span><span class="hljs-params">(u, u_cond, h, Niter=<span class="hljs-number">5000</span>)</span>:</span>
V = array(u)
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(Niter):
V[u_cond] = u[u_cond]
V[<span class="hljs-number">1</span>:<span class="hljs-number">-1</span>, <span class="hljs-number">1</span>:<span class="hljs-number">-1</span>] = <span class="hljs-number">0</span> <span class="hljs-comment"># replace this 0 by your Laplacian Solver</span>
<span class="hljs-keyword">return</span> V
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_field</span><span class="hljs-params">(V, h)</span>:</span>
Ex, Ey = gradient(V)
Ex, Ey = -Ex/h, -Ey/h
<span class="hljs-keyword">return</span> Ex, Ey
u = zeros([N, N])
u[int(N/<span class="hljs-number">2</span>)-int(L/h/<span class="hljs-number">2.0</span>):int(N/<span class="hljs-number">2</span>)+int(L/h/<span class="hljs-number">2.0</span>), int(N/<span class="hljs-number">2</span>) - int(d/h/<span class="hljs-number">2.0</span>)] = -V0/<span class="hljs-number">2</span>
u[int(N/<span class="hljs-number">2</span>)-int(L/h/<span class="hljs-number">2.0</span>):int(N/<span class="hljs-number">2</span>)+int(L/h/<span class="hljs-number">2.0</span>), int(N/<span class="hljs-number">2</span>) + int(d/h/<span class="hljs-number">2.0</span>)] = V0/<span class="hljs-number">2</span>
u_cond = not_equal(u, <span class="hljs-number">0</span>)
V = solve_laplacian(u, u_cond, h)
scene = canvas(title=<span class="hljs-string">'non-ideal capacitor'</span>, height=<span class="hljs-number">1000</span>, width=<span class="hljs-number">1000</span>, center = vec(N*h/<span class="hljs-number">2</span>, N*h/<span class="hljs-number">2</span>, <span class="hljs-number">0</span>))
scene.lights = []
scene.ambient=color.gray(<span class="hljs-number">0.99</span>)
box(pos = vec(N*h/<span class="hljs-number">2</span> , N*h/<span class="hljs-number">2</span> - d/<span class="hljs-number">2</span> - h, <span class="hljs-number">0</span>), length = L, height = h/<span class="hljs-number">5</span>, width = h)
box(pos = vec(N*h/<span class="hljs-number">2</span> , N*h/<span class="hljs-number">2</span> + d/<span class="hljs-number">2</span> - h, <span class="hljs-number">0</span>), length = L, height = h/<span class="hljs-number">5</span>, width = h)
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(N):
<span class="hljs-keyword">for</span> j <span class="hljs-keyword">in</span> range(N):
point = box(pos=vec(i*h, j*h, <span class="hljs-number">0</span>), length = h, height= h, width = h/<span class="hljs-number">10</span>, color=vec((V[i,j]+<span class="hljs-number">100</span>)/<span class="hljs-number">200</span>,(<span class="hljs-number">100</span>-V[i,j])/<span class="hljs-number">200</span>,<span class="hljs-number">0.0</span>) )
Ex, Ey = get_field(V, h)
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">0</span>, N):
<span class="hljs-keyword">for</span> j <span class="hljs-keyword">in</span> range(<span class="hljs-number">0</span>, N):
ar = arrow(pos = vec( i*h, j*h, h/<span class="hljs-number">10</span>), axis =vec (Ex[i,j]/<span class="hljs-number">2E9</span>, Ey[i,j]/<span class="hljs-number">2E9</span>, <span class="hljs-number">0</span>), shaftwidth = h/<span class="hljs-number">6.0</span>, color=color.black)
<span class="hljs-comment">#find Q, find C_nonideal = Q/(delta V) </span>
<span class="hljs-comment">#Compare C_nonideal to C_ideal</span>
</code></pre><h2 id="III-Grading-Policy"><a class="anchor hidden-xs" href="#III-Grading-Policy" title="III-Grading-Policy"><span class="octicon octicon-link"></span></a>III. Grading Policy</h2><ol>
<li>Correctly calculated the theoretical capacitance of the ideal capacitor (20%)</li>
<li>The solution of laplace equation is roughly correct (40%)</li>
<li>The simulated value is bigger than theoretical value (20%)</li>
<li>The simulated value is roughly correct (20%)</li>
</ol></div>
<div class="ui-toc dropup unselectable hidden-print" style="display:none;">
<div class="pull-right dropdown">
<a id="tocLabel" class="ui-toc-label btn btn-default" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="Table of content">
<i class="fa fa-bars"></i>
</a>
<ul id="ui-toc" class="ui-toc-dropdown dropdown-menu" aria-labelledby="tocLabel">
<div class="toc"><ul class="nav">
<li class=""><a href="#VP10-Non-ideal-Capacitor" title="VP10: Non-ideal Capacitor">VP10: Non-ideal Capacitor</a><ul class="nav">
<li class="invisable-node"><ul class="nav">
<li><a href="#同學們的影片" title="同學們的影片">同學們的影片</a></li>
</ul>
</li>
<li><a href="#作業繳交格式" title="作業繳交格式">作業繳交格式</a><ul class="nav">
<li><a href="#繳交期限" title="繳交期限">繳交期限</a></li>
</ul>
</li>
<li class=""><a href="#I-Non-ideal-Capacitor-amp-Numerical-Laplacian-Solver" title="I. Non-ideal Capacitor & Numerical Laplacian Solver">I. Non-ideal Capacitor & Numerical Laplacian Solver</a></li>
<li><a href="#II-Homework" title="II. Homework">II. Homework</a><ul class="nav">
<li><a href="#MUST" title="MUST">MUST</a></li>
</ul>
</li>
<li><a href="#III-Grading-Policy" title="III. Grading Policy">III. Grading Policy</a></li>
</ul>
</li>
</ul>
</div><div class="toc-menu"><a class="expand-toggle" href="#">全部展開</a><a class="back-to-top" href="#">回到頂部</a><a class="go-to-bottom" href="#">移至底部</a></div>
</ul>
</div>
</div>
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:17px;display:none;" null null>
<div class="toc"><ul class="nav">
<li class=""><a href="#VP10-Non-ideal-Capacitor" title="VP10: Non-ideal Capacitor">VP10: Non-ideal Capacitor</a><ul class="nav">
<li class="invisable-node"><ul class="nav">
<li><a href="#同學們的影片" title="同學們的影片">同學們的影片</a></li>
</ul>
</li>
<li><a href="#作業繳交格式" title="作業繳交格式">作業繳交格式</a><ul class="nav">
<li><a href="#繳交期限" title="繳交期限">繳交期限</a></li>
</ul>
</li>
<li class=""><a href="#I-Non-ideal-Capacitor-amp-Numerical-Laplacian-Solver" title="I. Non-ideal Capacitor & Numerical Laplacian Solver">I. Non-ideal Capacitor & Numerical Laplacian Solver</a></li>
<li><a href="#II-Homework" title="II. Homework">II. Homework</a><ul class="nav">
<li><a href="#MUST" title="MUST">MUST</a></li>
</ul>
</li>
<li><a href="#III-Grading-Policy" title="III. Grading Policy">III. Grading Policy</a></li>
</ul>
</li>
</ul>
</div><div class="toc-menu"><a class="expand-toggle" href="#">全部展開</a><a class="back-to-top" href="#">回到頂部</a><a class="go-to-bottom" href="#">移至底部</a></div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.6.0/gist-embed.min.js" integrity="sha256-KyF2D6xPIJUW5sUDSs93vWyZm+1RzIpKCexxElmxl8g=" crossorigin="anonymous" defer></script>
<script>
var markdown = $(".markdown-body");
//smooth all hash trigger scrolling
function smoothHashScroll() {
var hashElements = $("a[href^='#']").toArray();
for (var i = 0; i < hashElements.length; i++) {
var element = hashElements[i];
var $element = $(element);
var hash = element.hash;
if (hash) {
$element.on('click', function (e) {
// store hash
var hash = this.hash;
if ($(hash).length <= 0) return;
// prevent default anchor click behavior
e.preventDefault();
// animate
$('body, html').stop(true, true).animate({
scrollTop: $(hash).offset().top
}, 100, "linear", function () {
// when done, add hash to url
// (default click behaviour)
window.location.hash = hash;
});
});
}
}
}
smoothHashScroll();
var toc = $('.ui-toc');
var tocAffix = $('.ui-affix-toc');
var tocDropdown = $('.ui-toc-dropdown');
//toc
tocDropdown.click(function (e) {
e.stopPropagation();
});
var enoughForAffixToc = true;
function generateScrollspy() {
$(document.body).scrollspy({
target: ''
});
$(document.body).scrollspy('refresh');
if (enoughForAffixToc) {
toc.hide();
tocAffix.show();
} else {
tocAffix.hide();
toc.show();
}
$(document.body).scroll();
}
function windowResize() {
//toc right
var paddingRight = parseFloat(markdown.css('padding-right'));
var right = ($(window).width() - (markdown.offset().left + markdown.outerWidth() - paddingRight));
toc.css('right', right + 'px');
//affix toc left
var newbool;
var rightMargin = (markdown.parent().outerWidth() - markdown.outerWidth()) / 2;
//for ipad or wider device
if (rightMargin >= 133) {
newbool = true;
var affixLeftMargin = (tocAffix.outerWidth() - tocAffix.width()) / 2;
var left = markdown.offset().left + markdown.outerWidth() - affixLeftMargin;
tocAffix.css('left', left + 'px');
} else {
newbool = false;
}
if (newbool != enoughForAffixToc) {
enoughForAffixToc = newbool;
generateScrollspy();
}
}
$(window).resize(function () {
windowResize();
});
$(document).ready(function () {
windowResize();
generateScrollspy();
});
//remove hash
function removeHash() {
window.location.hash = '';
}
var backtotop = $('.back-to-top');
var gotobottom = $('.go-to-bottom');
backtotop.click(function (e) {
e.preventDefault();
e.stopPropagation();
if (scrollToTop)
scrollToTop();
removeHash();
});
gotobottom.click(function (e) {
e.preventDefault();
e.stopPropagation();
if (scrollToBottom)
scrollToBottom();
removeHash();
});
var toggle = $('.expand-toggle');
var tocExpand = false;
checkExpandToggle();
toggle.click(function (e) {
e.preventDefault();
e.stopPropagation();
tocExpand = !tocExpand;
checkExpandToggle();
})
function checkExpandToggle () {
var toc = $('.ui-toc-dropdown .toc');
var toggle = $('.expand-toggle');
if (!tocExpand) {
toc.removeClass('expand');
toggle.text('Expand all');
} else {
toc.addClass('expand');
toggle.text('Collapse all');
}
}
function scrollToTop() {
$('body, html').stop(true, true).animate({
scrollTop: 0
}, 100, "linear");
}
function scrollToBottom() {
$('body, html').stop(true, true).animate({
scrollTop: $(document.body)[0].scrollHeight
}, 100, "linear");
}
</script>
</body>
</html>