摘要: Java单例模式 1,懒汉式 例如 2,饿汉式 例如 } 阅读全文
posted @ 2018-03-26 11:22 刘百会 阅读(222) 评论(3) 推荐(0)
摘要: private Session session; private Transport transport; private String mailHost = ""; private String sender_username = ""; private String sender_passwor 阅读全文
posted @ 2018-02-22 11:47 刘百会 阅读(1754) 评论(0) 推荐(0)
摘要: MongoDB数据导入与导出 1、导出工具:mongoexport 1、概念: mongoDB中的mongoexport工具可以把一个collection导出成JSON格式或CSV格式的文件。可以通过参数指定导出的数据项,也可以根据指定的条件导出数据。 2、语法: mongoexport -d db 阅读全文
posted @ 2018-01-22 09:46 刘百会 阅读(332) 评论(0) 推荐(0)
摘要: 产生随机数 例如 [a,b] Math.random*(b-a+1)+a 公式推算 [3,55] [0,52]+3 *53+3 阅读全文
posted @ 2018-01-20 11:25 刘百会 阅读(104) 评论(0) 推荐(0)
摘要: 循环语句 1,for(){} 2,while(){} 3,do{}while() continue和break用法 break是结束循环 continue结束本次循环 阅读全文
posted @ 2018-01-20 11:06 刘百会 阅读(89) 评论(0) 推荐(0)
摘要: 判断语句 1,if条件判断语句 if(){} if(){} else{} if(){}else if(){} else() if判断一共这3张情况。if后面的值是boolen类型 2,switch条件判断语句 switch(){ case 数值1: break case 数值2: break def 阅读全文
posted @ 2018-01-20 10:36 刘百会 阅读(129) 评论(0) 推荐(0)
摘要: 第一步:安装插件 pip install Numpypip install matploatlib 第二步 导入包 import numpy as np import matplotlib.pylot as plt x=np.arange(0,2*np.pi,0.01) y=np.sin(x) pl 阅读全文
posted @ 2017-12-30 16:55 刘百会 阅读(155) 评论(0) 推荐(0)
摘要: CloseableHttpClient httpclient = HttpClients.createDefault(); String url = "https://ml.yiche.com/test_recognize/rest/v1/face_async_register"; HttpPost 阅读全文
posted @ 2017-12-27 17:09 刘百会 阅读(2256) 评论(0) 推荐(0)
摘要: Shell是一种脚步语言,那么,就必须有解释器来执行这些脚步。 Unix/Linux上常见的shell脚步解释器有bash,sh,csh,ksh等,习惯把它们称为shell。 例如: #!/bin/bash echo "Hello world !" chmod +x test.sh ./test.s 阅读全文
posted @ 2017-11-27 10:48 刘百会 阅读(175) 评论(0) 推荐(0)
摘要: 模糊查询:tname包含某个关键字测试' cd /opt/soft/mongodb/bin ./mongo --host 192.168.0.1 --port 17017 test db.test_info.find({"tname": {$regex: '测试', $options:'i'}}) 阅读全文
posted @ 2017-11-10 13:13 刘百会 阅读(24573) 评论(0) 推荐(1)