03 2018 档案

摘要:在读【阮一峰】的 ES6 入门文档的时候,有一段代码是这样的。 文章中,还有一段是这样写的 所以,Promise.resolve(3).finally(()=>{}),解析出来的resolve 就是有值的 3;同理,Promise.reject(3).finally(()=>{}),解析出来的res 阅读全文
posted @ 2018-03-30 14:51 lishidefengchen 编辑
摘要:译: 【语法】 【参数】 参考:https://www.w3schools.com/jsref/met_win_settimeout.asp 阅读全文
posted @ 2018-03-30 09:53 lishidefengchen 编辑
摘要:参考文章:阮一峰 ECMAScript 6 入门 ES6中新增加了 let 声明,它跟 var 的区别如下: 1、作用域不同,let 只在代码块中有效 2、建议在 for 循环中使用 let 申明变量 如果你用的是 var,那么上面的结果就是10 了。 3、for 循环需要注意的是,设置循环的部分是 阅读全文
posted @ 2018-03-29 21:46 lishidefengchen 编辑
摘要:刚开始浏览API的时候,旁边这个图片还真没明白是啥意思。现在才明白过来:),检测工具嘛,哈哈。 阅读全文
posted @ 2018-03-29 14:27 lishidefengchen 编辑
摘要:【ES6解构赋值】:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment 【Joi APi】:https://github.com/hapijs/joi 阅读全文
posted @ 2018-03-29 11:24 lishidefengchen 编辑
摘要:安装: 1、sudo apt install snapd snapd-xdg-open 2、sudo snap install electronic-wechat 运行: electronic-wechat 卸载: sudo snap remove electronic-wechat 阅读全文
posted @ 2018-03-28 16:26 lishidefengchen 编辑
摘要:【一】使用ref必须用在【类型式的组件】才起作用,用在【函数式的组件】是无效的。 下面这个例子用在了【函数式的组件】上,所以是无效的: 下面这个例子是正确的用法: 【二】ref用在普通的 DOM 元素 上时,DOM 元素 作为ref的参数进行使用; ref用在 组件 上时,组件 作为ref的参数进行 阅读全文
posted @ 2018-03-27 20:19 lishidefengchen 编辑
摘要:根据官方文档,满足以下任意条件的模块,就不是State,原文如下: 1、Is it passed in from a parent via props? If so, it probably isn’t state. 2、Does it remain unchanged over time? If 阅读全文
posted @ 2018-03-27 15:29 lishidefengchen 编辑
摘要:函数式的表示: Class式的表示: 对于React来说,上面这两种写法它认为是等价的。 阅读全文
posted @ 2018-03-26 20:30 lishidefengchen 编辑
摘要:与元素(文字颜色、字体等)相关的样式默认会被继承; 与元素在页面上的布局相关的样式默认不会被继承; 【边框】样式,span标签不会默认继承p的样式,需要强行设置继承才可以。 阅读全文
posted @ 2018-03-25 18:25 lishidefengchen 编辑
摘要:查看官网,FQ查看,都没有很好的解决方法,暂时记录下来。 阅读全文
posted @ 2018-03-22 16:13 lishidefengchen 编辑
摘要:请查看你的配置文件中是否包含了特殊字符,通常,复制黏贴过来的配置文件,会带有特殊字符。这个很影响logstash的启动。 linux中查看文件中的特殊字符方法: 使用cat方法 cat -A 文件名 使用vim编辑 vim 打开文件后,执行【:set list】命令 阅读全文
posted @ 2018-03-21 16:12 lishidefengchen 编辑
摘要:Windows系統 學習nodejs創建目錄命令:mkdir 報異常: 問題在哪呢? 原來,nodejs創建目錄需要逐層創建,因爲我當前目錄下,不存在tmp目錄,所以正確的做法應該是—— 阅读全文
posted @ 2018-03-21 13:56 lishidefengchen 编辑
摘要:记录一下大概步骤: 去npm官网注册一个账号 在文件夹下执行npm init 创建 package.json 执行 npm login,并根据提示输入你的npm账号,密码,和邮箱 执行 npm publish,发布你的包到npm官网上去 你可以到官网搜索你的包名,或者你在本地的其他项目中尝试安装一下 阅读全文
posted @ 2018-03-19 15:51 lishidefengchen 编辑
摘要:原文地址:http://www.ruanyifeng.com/blog/2011/05/how_to_choose_free_software_licenses.html 如何为代码选择开源许可证,这是一个问题。 世界上的开源许可证,大概有上百种。很少有人搞得清楚它们的区别。即使在最流行的六种 GP 阅读全文
posted @ 2018-03-18 14:35 lishidefengchen 编辑
摘要:从官方GitHub上克隆下来的源码自己如何发布? 我在Ubuntu系统中进行的开发,安装了yarn。 执行build命令为:$ yarn build 执行release命令为:$ yarn release 其实内部都是grunt在执行的命令(我是菜鸟,不是很懂,这个看命令执行过程中出现的命令符才这么 阅读全文
posted @ 2018-03-17 18:28 lishidefengchen 编辑
摘要:还未找到解决方法,先记录下来。 阅读全文
posted @ 2018-03-17 18:10 lishidefengchen 编辑
摘要:chmod +x file 阅读全文
posted @ 2018-03-17 17:20 lishidefengchen 编辑
摘要:解决方法: 我是修改了grunt的task脚本内容,然后这个警告就消失了,参考下图,左侧是原来的代码,右侧是我修改后的代码。具体的原理还是不太清楚,但现在至少编译这步可以通过了。 刚才我自己实验了一下,发现这个错误也可能是权限导致的,我给这个文件(yarn-1.3.2-with-ignore-fix 阅读全文
posted @ 2018-03-17 14:33 lishidefengchen 编辑
摘要:按如下图所示设置: 用该用户登录后,界面如图所示: 但遗憾的是,根据官方论坛的说法,其它的导航隐藏控制,暂时还不支持。 参考:https://discuss.elastic.co/t/hide-inaccessible-menu-points-in-kibana-left-navigation-ba 阅读全文
posted @ 2018-03-15 16:19 lishidefengchen 编辑
摘要:启动Kibana后,如果你看到如下警告信息: 多半是因为,Kibana没有配置SSL导致的。 关于怎么配置SSL,由于我还没有配置正确,请先参考官方文档,如果后续我配置好了,我会更新上来的。 阅读全文
posted @ 2018-03-15 16:06 lishidefengchen 编辑
摘要:1、发现的第一个警告信息 根据提示,在配置文件kibana.yml中添加【xpack.reporting.encryptionKey】属性: 官方文档:https://www.elastic.co/guide/en/kibana/current/reporting-settings-kb.html 阅读全文
posted @ 2018-03-15 15:16 lishidefengchen 编辑
摘要:错误信息如下: ES启动正常: 解决方法: 连接ES超时,修改配置文件kibana.yml中的【elasticsearch.requestTimeout】属性,修改大一点就可以了,我这里修改成了50000 再执行 yarn start --no-base-path 刚才的错误就不会出现了。 阅读全文
posted @ 2018-03-15 12:13 lishidefengchen 编辑
摘要:右键--属性 权限 允许作为执行文件启动 阅读全文
posted @ 2018-03-15 11:07 lishidefengchen 编辑
摘要:每次启动Kibana时,发现URL都会随机的生成三位字母,比如:【http://localhost:5601/abc/】【http://localhost:5601/dzf/】等等,那么这些随机的字符串是在哪生成的呢? 如图所示,【src/cli/cluster/base_path_proxy.js 阅读全文
posted @ 2018-03-15 09:48 lishidefengchen 编辑
摘要:官方教程:https://www.elastic.co/blog/developing-new-kibana-visualizations GitHub源码:https://github.com/elastic/kibana_sample_visualization 如图所示:在【其它】类型中多了一 阅读全文
posted @ 2018-03-14 10:36 lishidefengchen 编辑
该文被密码保护。
posted @ 2018-03-10 20:29 lishidefengchen 编辑
该文被密码保护。
posted @ 2018-03-10 20:27 lishidefengchen 编辑
摘要:解决方法就是,修改package.json中的name名称,再重新执行安装命令即可。 阅读全文
posted @ 2018-03-10 15:19 lishidefengchen 编辑
摘要:git remote prune origin 阅读全文
posted @ 2018-03-09 17:13 lishidefengchen 编辑
摘要:查看远程分支 git branch -r 使用下面两条命令来删除远程分支 git branch -r -d origin/branch-name git push origin :branch-name 阅读全文
posted @ 2018-03-09 14:25 lishidefengchen 编辑
摘要:本地这样去除文件夹 node_modules 的版本关联:执行:git rm -r --cached "node_modules/"提交: git commit -am 'remove node_modules folder all file out of control'推送:git push 阅读全文
posted @ 2018-03-09 14:14 lishidefengchen 编辑
摘要:clone:从远程服务器克隆一个一模一样的版本库到本地,复制的是整个版本库.(clone是将一个库复制到你的本地,是一个本地从无到有的过程) pull:从远程服务器获取到一个branch分支的更新到本地,并更新本地库.(pull是指同步一个在你本地有版本的库内容更新的部分到你的本地库) git pu 阅读全文
posted @ 2018-03-07 15:59 lishidefengchen 编辑
摘要:命令: git checkout origin/dev .gitignore 从远端 dev 仓库,更新本地签出分支的 .gitignore 文件 阅读全文
posted @ 2018-03-07 15:29 lishidefengchen 编辑
摘要:执行该命令可解决:echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p 阅读全文
posted @ 2018-03-05 16:11 lishidefengchen 编辑
摘要:这个错误就是说,在指定的代码后面有太多无用空格了,你只要把那些空格删掉就行了。 如果你用的是vscode,推荐安装一个ESLint插件,格式话一下你的代码就可以了。 阅读全文
posted @ 2018-03-05 14:42 lishidefengchen 编辑
摘要:ggVG 解释: gg 让光标移到首行,在vim才有效,vi中无效 V 是进入Visual(可视)模式 G 光标移到最后一行 阅读全文
posted @ 2018-03-05 13:50 lishidefengchen 编辑
摘要:在Ubuntu中安装Git后,配置远程Git服务器地址,如果是TFS的Git仓库地址,则需要使用IP地址,否则可能出现识别不出来的问题; 再者,如果你想要在Ubuntu的浏览中访问TFS的Git仓库Url,通常需要我们输入Windows凭证,输入用户名密码时需要注意,我们不用输入域名,直接输入你的用 阅读全文
posted @ 2018-03-05 12:45 lishidefengchen 编辑
摘要:The upgrade needs a total of 99.7 M free space on disk '/boot'. Please free at least an additional 53.7 M of disk space on '/boot'. You can remove old 阅读全文
posted @ 2018-03-05 12:37 lishidefengchen 编辑
摘要:官方地址:https://www.elastic.co/guide/en/kibana/current/development-uiexports.html hacks Any module that should be included in every application visTypes 阅读全文
posted @ 2018-03-05 10:36 lishidefengchen 编辑
摘要:npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! chromedriver@2.34.0 install: `node install.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the ch 阅读全文
posted @ 2018-03-03 10:35 lishidefengchen 编辑

点击右上角即可分享
微信分享提示