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
"rules": { | |
"no-console": "off", | |
"no-mixed-spaces-and-tabs": 0 | |
}, |
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 humanFileSize(size) { | |
if(size==0){ | |
return '0B'; | |
} | |
var i = Math.floor( Math.log(size) / Math.log(1024) ); | |
return ( size / Math.pow(1024, i) ).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; | |
}; |
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
npm set registry https://registry.npm.taobao.org # 注册模块镜像 | |
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像 | |
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像 | |
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像 | |
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像 | |
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs # phantomjs 二进制包镜像 |
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
//filter eg | |
String strs[] = new String[]{"1","2", "0", "33", "3", "4","abc"}; | |
List list = Arrays.stream(strs).filter(b -> b.length()<3 ).sorted().collect(Collectors.toList()); | |
list.stream().forEach( System.out::println); | |
System.out.println("------------------"); | |
// map eg | |
List list2 = Arrays.stream(strs).map(v->v.substring(0,1)).sorted().collect(Collectors.toList()); | |
list2.stream().forEach( System.out::println); | |
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
分层领域模型规约: | |
DO( Data Object):与数据库表结构一一对应,通过DAO层向上传输数据源对象。 | |
DTO( Data Transfer Object):数据传输对象,Service或Manager向外传输的对象。 | |
BO( Business Object):业务对象。 由Service层输出的封装业务逻辑的对象。 | |
AO( Application Object):应用对象。 在Web层与Service层之间抽象的复用对象模型,极为贴近展示层,复用度不高。 | |
VO( View Object):显示层对象,通常是Web向模板渲染引擎层传输的对象。 | |
POJO( Plain Ordinary Java Object):在本手册中, POJO专指只有setter/getter/toString的简单类,包括DO/DTO/BO/VO等。 | |
Query:数据查询对象,各层接收上层的查询请求。 注意超过2个参数的查询封装,禁止使用Map类来传输。 | |
领域模型命名规约: |