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