在使用Random类生成随机数时,我们可能会碰到生成随机数重复的问题。 比如我们要生成6位数字验证码,虽然也是使用Random,但是可能出现111111,999999这样的情况。 这是因为在实例化Random类时,如果随机种子不填写,默认是以时间线作为种子进行伪随机运算,当计算运行速度过快时,导致所 ...
1、到官网下载压缩文件,以rxtx-2.2pre2为例 http://fizzed.com/oss/rxtx-for-java 2、解压缩后得到文件,将RXTXcomm.jar添加到自己的java工程库里,1.右键->2.buildpath->3.config Build Path->4.libra... ...
分类:
编程语言 时间:
2017-06-02 12:47:05
阅读次数:
186
shiro登录认证和权限控制 一、实现类继承AuthorizingRealm 1、实现方法doGetAuthenticationInfo,将定义的用户实体类填充map,realmPrincipals; 2、实现方法doGetAuthorizationInfo,填充roles ,Permissions ...
分类:
其他好文 时间:
2017-06-02 12:40:48
阅读次数:
147
父: html ....... <child :title="sontitle"></child> ...... js data: sontitle 子: html {{title}} js props:['title'] 就是这么明了 ...
分类:
其他好文 时间:
2017-06-02 11:40:38
阅读次数:
146
举例 数组 [1,1,7,4] 去重,并且去掉重复的选项为 [7,4] ...
分类:
编程语言 时间:
2017-06-02 11:25:01
阅读次数:
150
class slice(stop)class slice(start, stop[, step]) Return a slice object representing the set of indices specified by range(start, stop, step). The sta ...
分类:
编程语言 时间:
2017-06-02 09:56:33
阅读次数:
340
Eclipse配置Tomcat 说明: 》电脑已安装了Eclipse 》电脑已安装了Tomcat 》确保Tomcat能正常启动 》解说中的Eclipse版本是3.6的 》解说中的Tomcat版本是6.0.18的 1. 在Eclipse中配置Tomcat 【启动Eclipse】 【菜单中的Window ...
分类:
系统相关 时间:
2017-06-02 09:47:00
阅读次数:
211
转载: http://bbs.reactnative.cn/topic/15/react-react-native-%E7%9A%84es5-es6%E5%86%99%E6%B3%95%E5%AF%B9%E7%85%A7%E8%A1%A8 英文版: https://babeljs.io/blog/2 ...
分类:
其他好文 时间:
2017-06-01 23:39:52
阅读次数:
269
在开始本章内容之前,这里先简单介绍下List的相关内容。 List的简单介绍 有序的collection,用户可以对列表中每个元素的插入位置进行精确的控制。用户可以根据元素的整数索引(在列表中的位置)访问元素,并搜索列表中的元素。列表通常允许重复的元素,且允许null元素的存放。 ArrayList ...
分类:
编程语言 时间:
2017-06-01 22:47:22
阅读次数:
273
二 Class with pointer members(Class String) 1. 测试代码(使用效果) int main() { String s1(), String s2("hello"); //构造函数 String s3(s1); //拷贝构造 cout << s3 << endl ...
分类:
编程语言 时间:
2017-06-01 22:40:59
阅读次数:
239