首页 技术 正文
技术 2022年11月21日
0 收藏 370 点赞 4,128 浏览 17576 个字

目录

目录一、JML语言的理论基础二、应用工具链三、部署SMT Solver四、部署JMLUnitNG/JMLUnit五、三次作业分析第一次作业第二次作业第三次作业六、总结与心得体会

一、JML语言的理论基础

  JMLJava Modeling Language)是一种形式化的、面向Java的行为接口规格语言(Behavior Interface Specification Language,BISL),基于Larch方法构建。BLSL提供了对方法和类型的规格定义手段。它允许在规格中混合使用Java语法成分和JML引入的语法成分。JML使用Javadoc的注释方式,通过一些符号描述方法的预期功能,而不管它如何实现。JML将过程性的思考延伸到方法设计中,从而扩展了面向对象设计的这个原则。

  JML引入了大量描述行为的结构,如前置条件、后置条件、模型域、正常行为、异常行为等,这些结构使得JML非常强大。更多JML行为结构参考OpenJML 基本使用,采用的SMT Solver为z4-4.7.1

  • 符合规格但代码中存在漏洞

    如下是一份符合规格但含有减法溢出的代码

      运行静态检查结果如下

      成功检测出了减法溢出错误

  • 不符合规格的检测

    如下代码逻辑与规格不符

      检测结果如下

  • 符合规格要求且无漏洞的检测

      检测结果如下(没有结果就是好的结果

四、部署JMLUnitNG/JMLUnit

  本节参考了伦佬的贴子:使用 JMLUnitNG 生成 TestNG 测试样例

  以第十次作业为例,采用maven文件结构。

  • 初始文件目录树

  • 使用jmlunitng生成测试文件

jmlunitng -cp specs-homework-2-1.2-raw-jar-with-dependencies.jar -d test/java/ main/java/*.java

  生成测试文件后的文件目录树如下(由于生成的文件比较多,只展示部分)

  • 在IDEA中创建TestNG运行配置并运行测试

  测试结果如下(居然没有一个类完全pass。。。)。以及对于第一行的报错信息,参考伦佬的解释:“测试结果的第一行是 racEnabled 的测试,意在检测我们的主文件是否带有 JML 的运行时检查。”

  • 部分测试结果分析

  以下提取MyGraph的测试结果进行分析。

  第一个被检测出的错误是addPath()方法传入空Path时的错误

  本人的MyGraph.addPath()源代码如下

  该方法调用了父类(本人的MyGraph类继承了第一次作业中的MyPathContainer类)的addPath方法,本以为考虑了path为null的情况,却忘记MyPathContainer.addPath()在path为null时返回的是0,而path为null并没有终止MyGraph.addPath()的行为,故有可能产生错误。

   之后还有一排齐刷刷的报错,但实际上不是getShortestPath()模块中的错误,而是由于按照JML要求抛出了相关异常被捕获报的错(isConnected()方法调用了getShortestPath(),有是否有最短路判断是否连通,故也有报错)。由于Jmlunitng产生的测试用例是单元测试用例,捕捉到异常会报错,而不经过课程提供的I/O接口,所以才会出现这些让人看了极度不适却又无可奈何的报错。

  • 小结

  Jmluning是个十分得力的助手,或许由于没有深入挖掘,看法可能还比较片面。

  Jmlunitng生成的都是一些边缘数据,如int的边界值,null等,对于程序中一些微小的、无法察觉的bug爆破还是有十分可观的作用的。但对于复杂逻辑、模块间依赖的检测,也许就帮不上什么大忙,甚至是帮倒忙(比如上述getShortestPath()抓到本应该抛出的NodeIdNotFound异常,却直接给我Test failed了。。。也许之后随着使用的深入,能够发现它更多的优点,或者是成为改进它的一员。

五、三次作业分析

第一次作业

1. 架构设计

  第一次作业较为简单,但由于没有充分考虑数据结构对时间复杂度的影响,因此在阴沟里翻了船。   第一次作业在MyPath类中用两个ArrayList分别存储路径中所有的结点和不同的结点,在MyPathContainer中采用双HashMap的形式存储路径Map与路径IdMap,并用一个distinctNodeNum域存储不同的结点数,在每次增删时更新(由于更新时采用ArrayList作为存储中间结果的数据结构,导致了TLE,详细分分析在下文叙述)。

2. 类图

3. 经典OO度量

  ev(G) iv(G) v(G)
Total 36 35 47

其中MyPath.compareTo和MyPath.equals方法复杂度较高,原因是在其中使用了许多条件判断语句判断路径等价或大小,后两次作业由于保留了MyPath类,故也保留了这两个高复杂度的方法。

4. Bug修复

  本次作业中强测CTLE了一半的数据,原因是MyPathContainer.countDistinctNodes()方法中使用了不合理的中间数据结构存储不同的结点。

  在该方法中采用ArrayList来临时存储路径中不同的结点,遍历了MyPathContainer中所有的路径,并遍历路径中所有的结点,用ArrayList.contains()方法判断是否已有该点,没有则加入。而问题就出在contains()方法上,它需要遍历ArrayList中的所有元素。总共三层循环,导致了cpu时间的爆炸

  改进方法是将存储中间结果的数据结构改为HashSet,它的contains()方法是O(1)的,且其实不需要调用contains()HashSet.add()会排除重复元素,最终只需两层循环(遍历路径与遍历结点)即可完成distinctNode的计数。

第二次作业

1. 架构设计

  第二次作业为了能够满足课程教学中类型层次迭代的设计,没有选择重构,而是在修复第一次作业的Bug的基础上采用继承的方式实现MyGraph

  在MyGraph类中配置了图计算类MyGraphCalc的对象进行相关图类运算,以及boolean型成员latest记录图计算对象中数据的更新状态。MyGraph中增删路径时对图计算类做相应的更新,获取图相关数据(最短路径、连通状态等)时,先判断数据是否是最新状态,若没有则更新图计算对象,后再从中获取数据。

  MyGraphCalc图计算类采用HashMap<Integer, HashMap<Integer, Integer>>的双层HashMap形式存储图的邻接矩阵、最短路径矩阵,并配置更新、访问方法。考虑到图更新指令数远小于图访问指令数,最短路径的算法选择了Floyd,一劳永逸。

2. 类图

3. 经典OO度量

  ev(G) iv(G) v(G)
Total 60 63 86

4. Bug修复

  强测中虽然有幸没有TLE,但有几组数据居然跑到了15s+的惊人CPU时间,得知HashMap的增删可能比较耗时,遂在MyGraphCalc中采用静态数组存储数据,并配置一个HashMap做下标转换,在Bug修复中预览测试后发现,那几组差点跑崩的数据的CPU时间都减少到了5s左右。

第三次作业

1. 架构设计

  第三次作业依靠讨论区大神给出的不拆点的方法完成(贴子),并使用了Maven创建项目。

  文件目录树如下:

  本次需实现的MyRailwaySystem仍采用继承的方式,在第二次作业的基础上继续填充。在MyRailwaySystem类中仍配置得力助手MyRailwayCalc负责地铁相关数据的存储与运算,他们的协同方式仍如第二次作业一样,MyRailwaySystem接受Path,并提交给MyRailwayCalc进行存储与运算,在申请数据时从MyRailwayCalc中获取。区别在于,本次作业将数据更新状态交由MyRailwayCalc维护,而MyRailwaySystem只行驶领导的职责,分配任务,而不必管工作进度。

  由于本次作业有4种主要数据需要计算,即ConnectBlock, LeastTicketPrice, LeastTransfer, LeastUnpleasant,故将这4种数据抽象为类,并统一继承抽象类RailData。抽象类RailData制定了地铁数据的行为纲领:初始化与更新策略。

  连通块数的运算采用路径压缩的并查集算法实现,三种最短路都采用Floyd最短路算法(Floyd作为静态方法封装在MyGraphCalc中),且都需要在路径内建图获取单条路径内的最短路。对于最少换乘,路径内建图只需将路径变为完全图;对于最少票数,路径内建图边权为最短路,故采用第二次作业已实现的MyGraphCalc进行路径内建图;对于最少不满意度,由于边权运算较复杂,故开了一个新类MyGraphCalcWithWeight继承MyGraphCalc,进行最少不满意度的路径内建图。三个最短路问题都采用静态数组存储数据,并统一使用MYGraphCalc中的下标转换方法进行转换。

2. 类图

  • 总类图

  • calculator包

  • container包

  • raildata包

3. 经典OO度量

  ev(G) iv(G) v(G)
Total 129 145 182

4. Bug修复

  本次作业强测与互测均未被发现Bug。

  本次尝试了Junit单元测试,在强测前达到了96%的代码覆盖率,剩余未覆盖代码为逻辑无法到达的地带,或是无需实现的方法。

六、总结与心得体会

  本单元的三次作业都是在给定规格的基础上,实现代码的填充。总的来说,拥有JML所规约的框架之后,无论是设计的合理性还是正确性的保证,都不会有太大的偏差。

  但是实现JML规格的过程中也面临了一个问题,也就是个人对方法功能的实现与规格规约之间的矛盾。规格采用某种数据结构来描述行为,但是个人实现方法时采用另一种实现功能的逻辑,虽然没有按照规格的逻辑,但完成了相同的功能,此时就无法按照规格的逻辑去检验正确性,使用外部工具(如openjml)也会疯狂报错,这也就失去了规格通过逻辑检验代码正确性的初衷。

  其次,由于需要通过数理逻辑去描述一个模块的功能,在复杂程序设计的过程中,JML规格就变成了一种“加密“,设计者花费心力描述大段规格,实现者也要花费同等甚至更多的时间精力去”解密“这些规格,最后得出这个模块的功能,无疑增加了项目完成的时间成本。对于本人而言,第三次作业的四个大问题更多的是参照指导书给出的解释完成模块的功能,时间与个人能力不允许我去完整阅读所有规格代码之后再去动手实现。

  以上的看法还是比较片面,仅是一个JML初学者的观点。也许在深入学习之后,会发现JML的更多不可思议的强大之处。

html { overflow-x: initial !important }
:root { –bg-color: #ffffff; –text-color: #333333; –select-text-bg-color: #B5D6FC; –select-text-font-color: auto; –monospace: “Lucida Console”,Consolas,”Courier”,monospace }
html { font-size: 14px; background-color: var(–bg-color); color: var(–text-color); font-family: “Helvetica Neue”, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased }
body { margin: 0; padding: 0; height: auto; bottom: 0; top: 0; left: 0; right: 0; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; tab-size: 4 }
iframe { margin: auto }
a.url { word-break: break-all }
a:active, a:hover { outline: 0 }
.in-text-selection, ::selection { text-shadow: none; background: var(–select-text-bg-color); color: var(–select-text-font-color) }
#write { margin: 0 auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px }
#write.first-line-indent p { text-indent: 2em }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0 }
#write.first-line-indent li { margin-left: 2em }
.for-image #write { padding-left: 8px; padding-right: 8px }
body.typora-export { padding-left: 30px; padding-right: 30px }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap }
@media screen and (max-width: 500px) { body.typora-export { padding-left: 0; padding-right: 0 } #write { padding-left: 20px; padding-right: 20px } .CodeMirror-sizer { margin-left: 0 !important } .CodeMirror-gutters { display: none !important } }
#write li>figure:first-child { margin-top: -20px }
#write ol, #write ul { position: relative }
img { max-width: 100%; vertical-align: middle }
button, input, select, textarea { color: inherit; font: inherit inherit inherit inherit inherit / inherit inherit }
input[type=”checkbox”], input[type=”radio”] { line-height: normal; padding: 0 }
*, ::after, ::before { box-sizing: border-box }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2 }
p { orphans: 4 }
h1 { font-size: 2rem }
h2 { font-size: 1.8rem }
h3 { font-size: 1.6rem }
h4 { font-size: 1.4rem }
h5 { font-size: 1.2rem }
h6 { font-size: 1rem }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem }
.hidden { display: none }
.md-blockmeta { color: rgba(204, 204, 204, 1); font-weight: 700; font-style: italic }
a { cursor: pointer }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgba(85, 85, 85, 1); border-radius: 4px; cursor: pointer }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit }
#write input[type=”checkbox”] { cursor: pointer; width: inherit; height: inherit }
figure { overflow-x: auto; margin: 1.2em 0; max-width: calc(100% + 16px); padding: 0 }
figure>table { margin: 0 !important }
tr { break-inside: avoid; break-after: auto }
thead { display: table-header-group }
table { border-collapse: collapse; border-spacing: 0; width: 100%; overflow: auto; break-inside: auto; text-align: left }
table.md-table td { min-width: 32px }
.CodeMirror-gutters { border-right: 0; background-color: inherit }
.CodeMirror-linenumber { user-select: none }
.CodeMirror { text-align: left }
.CodeMirror-placeholder { opacity: 0.3 }
.CodeMirror pre { padding: 0 4px }
.CodeMirror-lines { padding: 0 }
div.hr:focus { cursor: none }
#write pre { white-space: pre-wrap }
#write.fences-no-line-wrapping pre { white-space: pre }
#write pre.ty-contain-cm { white-space: normal }
.CodeMirror-gutters { margin-right: 4px }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; position: relative !important }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0; padding-bottom: 8px; overflow-x: auto }
#write .md-fences.mock-cm { white-space: pre-wrap }
.md-fences.md-fences-with-lineno { padding-left: 0 }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px }
.CodeMirror-line, twitterwidget { break-inside: avoid }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em }
.footnotes+.footnotes { margin-top: 0 }
.md-reset { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: top; background: left top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr }
li div { padding-top: 0 }
blockquote { margin: 1rem 0 }
li .mathjax-block, li p { margin: 0.5rem 0 }
li { margin: 0; position: relative }
blockquote>:last-child { margin-bottom: 0 }
blockquote>:first-child, li>:first-child { margin-top: 0 }
.footnotes-area { color: rgba(136, 136, 136, 1); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal }
#write .footnote-line { white-space: pre-wrap }
@media print { body, html { border: 1px solid rgba(0, 0, 0, 0); height: 99%; break-after: avoid; break-before: avoid } #write { margin-top: 0; padding-top: 0; border-color: rgba(0, 0, 0, 0) !important } .typora-export * { -webkit-print-color-adjust: exact } html.blink-to-pdf { font-size: 13px } .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0; break-after: avoid } .typora-export #write::after { height: 0 } @page { margin-top: 20mm margin-right: 0 margin-bottom: 20mm margin-left: 0 } }
.footnote-line { margin-top: 0.714em; font-size: 0.7em }
a img, img a { cursor: pointer }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgba(204, 204, 204, 1); display: block; overflow-x: hidden }
p>.md-image:only-child:not(.md-img-error) img, p>img:only-child { display: block; margin: auto }
p>.md-image:only-child { display: inline-block; width: 100% }
#write .MathJax_Display { margin: 0.8em 0 0 }
.md-math-block { width: 100% }
.md-math-block:not(:empty)::after { display: none }
[contenteditable=”true”]:active, [contenteditable=”true”]:focus { outline: 0; box-shadow: none }
.md-task-list-item { position: relative; list-style-type: none }
.task-list-item.md-task-list-item { padding-left: 0 }
.md-task-list-item>input { position: absolute; top: 0; left: 0; margin-left: -1.2em; margin-top: calc(1em – 10px); border: none }
.math { font-size: 1rem }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px }
.md-toc-content { position: relative; margin-left: 0 }
.md-toc-content::after, .md-toc::after { display: none }
.md-toc-item { display: block; color: rgba(65, 131, 196, 1) }
.md-toc-item a { text-decoration: none }
.md-toc-inner:hover { text-decoration: underline }
.md-toc-inner { display: inline-block; cursor: pointer }
.md-toc-h1 .md-toc-inner { margin-left: 0; font-weight: 700 }
.md-toc-h2 .md-toc-inner { margin-left: 2em }
.md-toc-h3 .md-toc-inner { margin-left: 4em }
.md-toc-h4 .md-toc-inner { margin-left: 6em }
.md-toc-h5 .md-toc-inner { margin-left: 8em }
.md-toc-h6 .md-toc-inner { margin-left: 10em }
@media screen and (max-width: 48em) { .md-toc-h3 .md-toc-inner { margin-left: 3.5em } .md-toc-h4 .md-toc-inner { margin-left: 5em } .md-toc-h5 .md-toc-inner { margin-left: 6.5em } .md-toc-h6 .md-toc-inner { margin-left: 8em } }
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit }
.footnote-line a:not(.reversefootnote) { color: inherit }
.md-attr { display: none }
.md-fn-count::after { content: “.” }
code, pre, samp, tt { font-family: var(–monospace) }
kbd { margin: 0 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgba(36, 39, 41, 1); background: rgba(255, 255, 255, 1); border: 1px solid rgba(173, 179, 185, 1); border-radius: 3px; box-shadow: 0 1px rgba(12, 13, 14, 0.2), inset 0 0 2px rgba(255, 255, 255, 1); white-space: nowrap; vertical-align: middle }
.md-comment { color: rgba(162, 127, 3, 1); opacity: 0.8; font-family: var(–monospace) }
code { text-align: left; vertical-align: initial }
a.md-print-anchor { white-space: pre !important; border-style: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0 !important; outline: 0 !important; background: left top !important; text-shadow: initial !important }
.md-inline-math .MathJax_SVG .noError { display: none !important }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0; position: relative; text-indent: 0; max-width: none; max-height: none; min-height: 0; min-width: 100%; width: auto; overflow-y: hidden; display: block !important }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; display: inline-block !important }
.MathJax_SVG .MJX-monospace { font-family: var(–monospace) }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0; min-height: 0; border: 0; padding: 0; margin: 0 }
.MathJax_SVG * { }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0 !important }
.os-windows.monocolor-emoji .md-emoji { font-family: “Segoe UI Symbol”, sans-serif }
.md-diagram-panel>svg { max-width: 100% }
[lang=”mermaid”] svg, [lang=”flow”] svg { max-width: 100% }
[lang=”mermaid”] .node text { font-size: 1rem }
table tr th { border-bottom: 0 }
video { max-width: 100%; display: block; margin: 0 auto }
iframe { max-width: 100%; width: 100%; border: none }
.highlight td, .highlight tr { border: 0 }
:root { –side-bar-bg-color: #fafafa; –control-text-color: #777 }
html { font-size: 16px }
body { font-family: “Open Sans”, “Clear Sans”, “Helvetica Neue”, Helvetica, Arial, sans-serif; color: rgba(51, 51, 51, 1); line-height: 1.6 }
#write { max-width: 860px; margin: 0 auto; padding: 30px 30px 100px }
#write>ul:first-child, #write>ol:first-child { margin-top: 30px }
a { color: rgba(65, 131, 196, 1) }
h1, h2, h3, h4, h5, h6 { position: relative; margin-top: 1rem; margin-bottom: 1rem; font-weight: bold; line-height: 1.4; cursor: text }
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { text-decoration: none }
h1 tt, h1 code { font-size: inherit }
h2 tt, h2 code { font-size: inherit }
h3 tt, h3 code { font-size: inherit }
h4 tt, h4 code { font-size: inherit }
h5 tt, h5 code { font-size: inherit }
h6 tt, h6 code { font-size: inherit }
h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid rgba(238, 238, 238, 1) }
h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid rgba(238, 238, 238, 1) }
h3 { font-size: 1.5em; line-height: 1.43 }
h4 { font-size: 1.25em }
h5 { font-size: 1em }
h6 { font-size: 1em; color: rgba(119, 119, 119, 1) }
p, blockquote, ul, ol, dl, table { margin: 0.8em 0 }
li>ol, li>ul { margin: 0 }
hr { height: 2px; padding: 0; margin: 16px 0; background-color: rgba(231, 231, 231, 1); border: 0 none; overflow: hidden; box-sizing: content-box }
li p.first { display: inline-block }
ul, ol { padding-left: 30px }
ul:first-child, ol:first-child { margin-top: 0 }
ul:last-child, ol:last-child { margin-bottom: 0 }
blockquote { border-left: 4px solid rgba(223, 226, 229, 1); padding: 0 15px; color: rgba(119, 119, 119, 1) }
blockquote blockquote { padding-right: 0 }
table { padding: 0; word-break: initial }
table tr { border-top: 1px solid rgba(223, 226, 229, 1); margin: 0; padding: 0 }
table tr:nth-child(2n), thead { background-color: rgba(248, 248, 248, 1) }
table tr th { font-weight: bold; border-top: 1px solid rgba(223, 226, 229, 1); border-right: 1px solid rgba(223, 226, 229, 1); border-bottom: 0; border-left: 1px solid rgba(223, 226, 229, 1); text-align: left; margin: 0; padding: 6px 13px }
table tr td { border: 1px solid rgba(223, 226, 229, 1); text-align: left; margin: 0; padding: 6px 13px }
table tr th:first-child, table tr td:first-child { margin-top: 0 }
table tr th:last-child, table tr td:last-child { margin-bottom: 0 }
.CodeMirror-lines { padding-left: 4px }
.code-tooltip { box-shadow: 0 1px 1px rgba(0, 28, 36, 0.3); border-top: 1px solid rgba(238, 242, 242, 1) }
.md-fences, code, tt { border: 1px solid rgba(231, 234, 237, 1); background-color: rgba(248, 248, 248, 1); border-radius: 3px; padding: 2px 4px 0; font-size: 0.9em }
code { background-color: rgba(243, 244, 244, 1); padding: 0 2px }
.md-fences { margin-bottom: 15px; margin-top: 15px; padding-top: 8px; padding-bottom: 6px }
.md-task-list-item>input { margin-left: -1.3em }
@media print { html { font-size: 13px } table, pre { break-inside: avoid } pre { word-wrap: break-word } }
.md-fences { background-color: rgba(248, 248, 248, 1) }
#write pre.md-meta-block { padding: 1rem; font-size: 85%; line-height: 1.45; background-color: rgba(247, 247, 247, 1); border: 0; border-radius: 3px; color: rgba(119, 119, 119, 1); margin-top: 0 !important }
.mathjax-block>.code-tooltip { bottom: 0.375rem }
.md-mathjax-midline { background: rgba(250, 250, 250, 1) }
#write>h3.md-focus::before { left: -1.5625rem; top: 0.375rem }
#write>h4.md-focus::before { left: -1.5625rem; top: 0.285714rem }
#write>h5.md-focus::before { left: -1.5625rem; top: 0.285714rem }
#write>h6.md-focus::before { left: -1.5625rem; top: 0.285714rem }
.md-image>.md-meta { border-radius: 3px; padding: 2px 0 0 4px; font-size: 0.9em; color: inherit }
.md-tag { color: rgba(167, 167, 167, 1); opacity: 1 }
.md-toc { margin-top: 20px; padding-bottom: 20px }
.sidebar-tabs { border-bottom: none }
#typora-quick-open { border: 1px solid rgba(221, 221, 221, 1); background-color: rgba(248, 248, 248, 1) }
#typora-quick-open-item { background-color: rgba(250, 250, 250, 1); border-top: 1px solid rgba(254, 254, 254, 1); border-right: 1px solid rgba(229, 229, 229, 1); border-bottom: 1px solid rgba(229, 229, 229, 1); border-left: 1px solid rgba(238, 238, 238, 1) }
.on-focus-mode blockquote { border-left-color: rgba(85, 85, 85, 0.12) }
header, .context-menu, .megamenu-content, footer { font-family: “Segoe UI”, Arial, sans-serif }
.file-node-content:hover .file-node-icon, .file-node-content:hover .file-node-open-state { visibility: visible }
.mac-seamless-mode #typora-sidebar { background-color: var(–side-bar-bg-color) }
.md-lang { color: rgba(180, 101, 77, 1) }
.html-for-mac .context-menu { –item-hover-bg-color: #E6F0FE }
#md-notification .btn { border: 0 }
.dropdown-menu .divider { border-color: rgba(229, 229, 229, 1) }
.typora-export li, .typora-export p, .typora-export, .footnote-line { white-space: normal }

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,983
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,500
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,344
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,127
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,761
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,838