2018年5月30日
摘要: 使用Facebook官方脚手架create-react-app创建React应用,默认只能生成一个SPA,入口是index.html。虽然,SPA的页面切换可以使用前台路由框架方便(比如React-Router)实现,这也是SPA的推荐做法;但某些情况下,仍要将页面切分为多个页面,或者在同一个工程开 阅读全文
posted @ 2018-05-30 17:32 芦苇Reed 阅读(2472) 评论(2) 推荐(0) 编辑
2018年5月19日
摘要: 使用scp: scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的。可能会稍微影响一下速度。 scp作用: 1、我们需要获得远程服务器上的某个文件,远程服务器既没有配置ftp服务器,没有开 阅读全文
posted @ 2018-05-19 01:52 芦苇Reed 阅读(399) 评论(0) 推荐(0) 编辑
摘要: # 使用npm安装serve命令 ~$ npm install serve --global 安装成功 # 可是执行命令会报错 ~$ serve -v bash: serve: command not found 安装其它命令也一样 原因:安装成功了,但使用直接使用时确找不到命令,应该是环境变量问题 阅读全文
posted @ 2018-05-19 01:41 芦苇Reed 阅读(10175) 评论(1) 推荐(1) 编辑
2017年12月18日
摘要: //检测呈现引擎、平台、Windows操作系统、移动设备和游戏系统。 var client = function () { //呈现引擎 var engine = { ie: 0, gecko: 0, webkit: 0, khtml: 0, opera: 0, //完整的版本号 ver: n... 阅读全文
posted @ 2017-12-18 23:02 芦苇Reed 阅读(291) 评论(0) 推荐(0) 编辑
2017年12月11日
摘要: 1 function getQueryStringArgs() { 2 var arr = location.search?location.search.substring(1):'';//取得参数字符串并去掉开头的问号 3 var obj = {}; 4 if(arr){ 5 var arr2 = arr.split('&'); //取得每一... 阅读全文
posted @ 2017-12-11 22:24 芦苇Reed 阅读(219) 评论(0) 推荐(0) 编辑
2017年11月30日
摘要: var arr = [3,1,2,6,7,8]; var maxNum = Math.max.apply(Math,arr); //8 var minNum = Math.min.apply(Math,arr); //1 阅读全文
posted @ 2017-11-30 22:04 芦苇Reed 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1 function selectNum(lowNum,upNum) { 2 var num = upNum-lowNum+1; 3 // Math.floor() 向下取整 4 return Math.floor(Math.random()*num+lowNum); 5 6 } 7 8 var result = selectNum(2,8); //2~8范... 阅读全文
posted @ 2017-11-30 22:01 芦苇Reed 阅读(1848) 评论(0) 推荐(0) 编辑
2017年8月27日
摘要: File file = new File("文件夹路径"); File[] tempList = file.listFiles();for (int i = 0; i < tempList.length; i++) {System.out.println(tempList[i].getName());} 阅读全文
posted @ 2017-08-27 16:00 芦苇Reed 阅读(200) 评论(0) 推荐(0) 编辑
2017年8月22日
摘要: 使用 npm install -g weinre 全局安装 weinre,weinre 安装目录是:C:\Users\Administrator\AppData\Roaming\npm 需要配置环境变量,在系统变量path中加上以下路径: 阅读全文
posted @ 2017-08-22 13:09 芦苇Reed 阅读(718) 评论(0) 推荐(0) 编辑
2017年8月18日
摘要: 在图片路径加上:?random = '随机数(时间戳等)' <img src="abc.jpg?random=随机数(时间戳等)" /> 阅读全文
posted @ 2017-08-18 13:47 芦苇Reed 阅读(455) 评论(0) 推荐(0) 编辑