#How to plot vertical line in flowchart by tikz
(a- | b)表示和a在同一水平线上且和b在同一竖直线上的坐标点,例如: |
\draw (A.south) -- (A.south|-B.north);
#matplotlib生成pdf有白边的解决办法
##自动裁剪 matplotlib输出结果时有白边(blank space or margin),常用方法皆不好使。生成pdf后,通过一句Latex自带命令可以裁剪掉pdf周围的白边。
pdfcrop input.pdf output.pdf
该命令即可自动生成一个裁剪过的pdf文件。若不指定输出文件名,会自动生成一个带后缀的pdf文件,如foo-crop.pdf
(原文件为foo.pdf
)。
##进阶
###查询包围有效区域的boundingbox大小
通过pdfcrop --verbose foo.pdf
命令可以得到pdf文件中白边boundingbox的范围
engchuhandeMacBook-Pro:eps fengchuhan$ pdfcrop --verbose foo_B.pdf
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
* PDF header: %PDF-1.4
* Running ghostscript for BoundingBox calculation ...
GPL Ghostscript 9.23 (2018-03-21)
Copyright (C) 2018 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
%%BoundingBox: 7 7 432 268
* Page 1: 7 7 432 268
%%HiResBoundingBox: 7.164000 7.164000 431.971440 267.659992
* Running pdfTeX ...
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdftex)
entering extended mode
(./tmp-pdfcrop-88489.tex [1 <./foo_B.pdf>] )
Output written on tmp-pdfcrop-88489.pdf (1 page, 102295 bytes).
Transcript written on tmp-pdfcrop-88489.log.
==> 1 page written on `foo_B-crop.pdf'.
其中,7.164000 7.164000 431.971440 267.659992
即为boundingbox从左手开始顺时针方向各边的坐标,坐标原点位于左上角。
###精确裁剪
通过命令pdfcrop --bbox '6.5 6.5 446 268' foo.pdf
即可精确裁剪空白区域的大小
engchuhandeMacBook-Pro:eps fengchuhan$ pdfcrop --bbox '6.5 6.5 446 268' foo_B.pdf
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `foo_B-crop.pdf'.
#Clean code代码整洁之道
##便于识别和搜索的变量函数名
generationTimestep
MAX_CLASSES_PER_STUDENT
名称长短应与其作用域大小相对应
##函数参数 如果函数需要两个,三个或三个以上参数,就说明其中一些参数应该封装为累了?
##注释
zR
打开所有折叠zM
关闭所有折叠/同时折叠所有subroutine#VS Code 配置
##python
打开settings,搜索python.pythonPath
,将python
改为python3
,可以解决pylint报错E0401 unable to import xxx module
的问题
#Note
Full unsteady ice accretion model was implemented by Aliaga.
##Rime ice New model improves the accuracy of ice prediction, compared to quasi-steady approach.
##Glaze ice This new model requires the implementation of local surface roughness and that previous quasi-steady validations cannot be carried out using a small number of shots.