- 博客(109)
- 问答 (2)
- 收藏
- 关注
原创 使用yarn创建离线包
环境配置操作系统:Centos7yarn Version:1.22.17操作步骤创建“离线镜像”存储目录# cd 进入工程目录$ cd project# 查看当前工程路径$ pwd#/home/sysadmin/work/myApp$ yarn config set yarn-offline-mirror /home/sysadmin/work/myApp/yarn-offline注:运行以上命令之后,会在当前项目路径生成一个yarn-offline 文件夹用来存放构建的.t
2021-12-23 11:58:29
2055
原创 yarn install error - /usr/local/Cellar/yarn/1.22.11/libexec/lib/cli.js:46104
MacOS Big Sur 操作系统,使用yarn安装时出现以下错误:$ yarn install/usr/local/Cellar/yarn/1.22.11/libexec/lib/cli.js:46104 let { ^SyntaxError: Unexpected token { at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Obje
2021-08-26 10:16:54
3069
原创 JS Promise 使用 注意事项
使用vue出现如下问题 “Uncaught (in promise) Error: 操作成功!”处理方法出现异常捕获错误解决办法一般为在.then()后面添加.catch(() => {})函数 let p = new Promise((resolve, reject) => { setTimeout(()=> { resolve('执行完成') }, 1000) }).catch(() => {})...
2021-04-22 19:24:45
411
原创 ant design vue table表内换行
ant design vue table 表内换行方法使用customRender完成表内换行template 无需特殊操作,如下:<template> <a-table :columns="columns" :data-source="data"> </a-table></template>在表格columns中定义表头如下:data() { return { columns: [ { ti
2021-04-13 10:57:33
5301
原创 Flutter - SnackBar
Flutter 之 SnackBarSnackBar 是用户操作后,显示提示信息的控件,默认显示在屏幕底部,默认显示4s后自动隐藏。SnackBar是通过Scaffold的showSnackBar方法来显示,所以想要显示SnackBar必须要先拿到Scaffold。SnackBar 参数详细说明参见官方文档;主要介绍一下,以下2个参数:duration 属性可以设置提示条显示的时间;...
2020-03-04 15:42:50
403
原创 spacemacs 配置安装
spacemacs 的安装,可以识别dart文件此方法仅限 mac电脑 且已经安装过emacs(version 24以上)的用户根据github上的spacemacs的安装方法,cd ~mv .emacs.d .emacs.d.bakmv .emacs .emacs.bak我们知道在clone 下载之后,还需要切换到develop分支, 所以我们直接下载develop分支git c...
2020-02-12 11:19:28
794
原创 react-navigation RNGestureHandlerModule.State error
react-navigation error最近正在使用react-native开发手机app,初次使用其进行开发中途确实遇到不少问题。按照react-navigation官网实例运行,出现如下错误:undefined is not an object (evaluating ‘RNGestureHandlerModule.State’)进行如下操作,可解决此问题:检查你的项目中是...
2019-01-05 17:17:47
1652
3
原创 如何打包 zeit/micro 程序
使用zeit/pkg 打包 zeit/micro 项目打包 micro 项目与其他 node 项目有所区别,micro程序在执行 node 时要先启动 micro,所以需要将 micro 打包,具体方式如下:package.json{ "name": "ms", "version": "1.0.0", "description": "", "bin": "index.js",
2017-11-09 09:31:27
848
原创 Docker Error with - Cannot connect to the docker daemon, not running ?
系统: ubuntu 16.04,Docker : Client: Version: 17.09.0-ce API version: 1.32 Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:42:18 2017 OS/Arch: linux/amd64Ser
2017-10-13 17:04:45
802
原创 nodejs 中如何使用ES6语法
nodejs中,现在还不兼容es6语法,使用babel进行编译,方法如下:安装如下包:$ npm install babel-core babel-polyfill babel-preset-es2015 --save在创建文件 index.js,内容如下:require('babel-core/register');require('babel-polyfill');require('
2017-09-30 17:29:21
1928
原创 zeit/micro Error -- Cannot find module '../lib/help'
When I use the zeit/micro, I get the error:node: 8.6.0Mac / Ubuntu 16.04Reinstall the micro-dev, I get the error Resolving by remove the .bin/micro-dev, and reinstall the package, it’s working!
2017-09-30 14:20:46
567
原创 zeit/micro connect with Mongo by Mongoose
Micro-Mongoose-exampleMicro + Mongoose + Mongoinstall packages$ npm install micro micro-dev microrouter mongoose --saveUsing Mongoose to verify the data, and save to the MongoDB.package.json{ "name"
2017-09-27 10:44:53
710
原创 RabbitMQ error - rabbitmqctl: command not found
$ rabbitmqctl status-bash: rabbitmqctl: command not foundexport PATH=/usr/local/sbin:$PATHtest with$ rabbitmqctl statushttps://www.rabbitmq.com/man/rabbitmqctl.1.man.html#change_password
2017-09-13 17:21:57
5408
1
原创 Homebrew: Could not symlink, /usr/local/* is not writable
When I used the Homebrew to install RabbitMQ,get the errors ❌:The `brew link` step did not complete successfullyThe formula built, but is not symlinked into /usr/localCould not symlink ./usr/local/o
2017-09-13 15:14:48
3616
原创 Mongoose Warning `open()` is deprecated, `openUri()` instead
nodejs 使用mongoose,程序如下:const mongoose = require('mongoose');const url = `mongodb://192.168.1.198:27017/mean`mongoose.connect(url) // default port 27017错误如下:DeprecationWarning: `open()` is deprecated
2017-09-09 11:42:41
1092
原创 ES6 操作数组的并集/交集/差集
使用ES6 操作数组let a = new Set([1, 2, 3]);let b = new Set([3, 5, 2]); // 并集let unionSet = new Set([...a, ...b]);//[1,2,3,5]// 交集let intersectionSet = new Set([...a].filter(x => b.has(x)));// [2,3]//
2017-09-08 09:55:57
19826
原创 Remote mongo - refused
MongoDB was installed on Ubuntu 16.04.When i connect the mongo on my pc, I get the error:Failed to connect to 192.168.1.118:27017, reason: errno:61 Connection refusedchange /etc/mongod.conffilebind_ip
2017-09-05 17:10:23
395
原创 Ubuntu mate 17.04 - Installation error 5
安装Ubuntu mate 17.04 时,遇到[ Err no 5] input/ out put 应该这样安装使用 Try Ubuntu 模式运行 ubuntu 系统, 然后点击桌面上的 安装Ubuntu 图标,安装Ubuntu 就可以。此解决方案来自: (https://ubuntu-mate.community/t/installation-error-5/6393/3) zambrotta
2017-09-05 16:22:05
1355
原创 Ansible Failed - apt lock
EnvironmentOn Ubuntu 16.04 / Ubuntu 14.04 Ansible 2.3.2.0updateApt.yml- name: APT Update hosts: webservers become: True tasks: - name: Update apt apt: update_cache: yeserror
2017-09-04 18:36:05
1534
原创 Raspberry Desktop 用户自动登录设置,屏幕禁止休眠设置,浏览器全屏设置
树莓派按照ubuntu-mate 桌面系统,设置如下参数:开机用户自动登录:修改/etc/lightdm 下的 lightdm.conf文件如果没有则自己创建一个 内容为[SeatDefaults]autologin-user=name设置屏幕禁止休眠点击菜单栏 系统 –> 控制中心 –> 硬件 –> 电源管理设置系统启动默认打开chromium浏览器,且访问指定url点击菜单栏 系统 –>
2017-08-18 14:05:22
2427
原创 Cordova 手机App禁止横竖屏转换
禁止手机app横竖屏幕转换,只需在根目录下的 .config.xml 中添加如下内容 portrait纵向 landscape 横向 default 默认转屏
2017-07-25 11:31:53
1853
原创 手把手教你使用 Raspberry - Wireless-Access-Point
RPI Wireless-Access-Point将Raspberry Pi3 作为无线路由接入点Install the necessary software. $ sudo apt-get install hostapd udhcpdConfigure DHCP /etc/udhcpd.conf$ sudo nano /etc/udhcpd.conf// 将文件修为为如下内容:start 19
2017-07-20 18:09:44
2050
原创 手把手教你使用 Raspberry - DNS Server
RPI DNS Server将Raspberry配置成DNS serverInstall the dnsmasq$ sudo apt-get install dnsmasqConfigure the /etc/dnsmasq.conf,add the parameters:resolv-file=/etc/resolv.dnsmasq#strict-ordercache-size=1500li
2017-07-20 18:05:39
545
原创 手把手教你使用 Raspberry - 设置开机启动图片/屏蔽彩虹屏/用户自动登录/开机执行程序
Raspberry/jessie设置开机启动图片/屏蔽彩虹屏/用户自动登录/开机执行程序–在 Raspberry 上安装 jessie server制作安装U盘$ diskutil umount /dev/disk1s1$ sudo dd if=ubuntu-16.04-preinstalled-server-armhf+raspi3.img of=/dev/disk1 bs=16m 出现安装成
2017-06-26 09:17:09
5738
1
原创 Linux 服务器运行监控软件 Monitorix install
将Monitorix安装到Ubuntu/Debian/Linux Mint上Monitorix的安装可以通过两种方式来完成,一种是使用Izzy软件库完成自动安装/更新,另一种是使用手动下载和安装.deb程序包。Izzy软件库是一个试验性的软件库,但是来自该软件库的程序包应该适用于所有版本的Ubuntu和Debian等发行版。不过,我们无法保证绝对正确――所以,风险自负。如果你仍然想通过apt-get
2017-06-06 17:58:42
754
原创 JS 获取当天所在月的最后一天日期,所在周的每天的日期,时间的计算
export const getMonthMaxDay = () => { var curDate = new Date(); var curMonth = curDate.getMonth(); /* 生成实际的月份: 由于curMonth会比实际月份小1, 故需加1 */ curDate.setMonth(curMonth + 1); /* 将日期设置为0, 返回当月最后一
2017-05-26 11:33:27
3465
原创 Meteor changePassword
在使用meteor进行用户密码修改设置时,取来的当前的用户信息并不包含密码字段,需要在server部分加上如下发布信息,即可获取到全部用户信息字段;Meteor.publish("getUserData", function () { return Meteor.users.find({_id: this.userId});});import { Accounts } from 'met
2017-05-22 17:46:50
604
原创 ES6 Object Copy
ES6 中对象拷贝方法:方法一: Object.assign()// 对象浅拷贝, 复制所有可枚举对象const obj1 = {a: 1};const obj2 = {b: 2};// copy obj1 and obj2 to a new obj;Object.assign({}, obj1, obj2)方法二 :Res参数//等同于方法一, 属于对象浅拷贝const obj1
2017-05-19 17:13:12
3430
空空如也
google chrome 浏览器事件处理
2015-03-03
Backbone 和 Leaflet 的插件sidebar-v2
2015-02-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人