自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(109)
  • 问答 (2)
  • 收藏
  • 关注

原创 spacemacs auto-complete 自动补全功能

spacemacs auto-complete

2022-08-16 11:02:26 829 1

原创 Phoenix Framework

Phoenix

2022-08-15 09:17:31 1023

原创 Elixir - Module

elixir

2022-08-10 08:39:42 191

原创 Elixir - Map

elixir

2022-08-09 17:57:35 283

原创 Elixir-Basic types 之 Binaries、strings、charlist

elixir

2022-08-04 16:10:27 145

原创 Elixir - case, cond, and if

elixir

2022-08-03 16:03:18 113

原创 Elixir-Pattern matching

elixirpattern-matching

2022-08-02 15:44:35 125

原创 Elixir-Tuples

elixir、tuples

2022-08-02 11:15:18 299

原创 Elixir-List

elixir

2022-08-01 19:35:26 153

原创 Elixir-Atoms

Elixir、atom

2022-08-01 16:24:18 110

原创 Elixir - comprehensions

Elixir

2022-07-14 20:04:21 110

原创 spacemac安装库适配ReScript

Emacs

2022-02-23 14:29:45 669

原创 使用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 1896

原创 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 2954

原创 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 351

原创 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 4842

原创 Flutter - SnackBar

Flutter 之 SnackBarSnackBar 是用户操作后,显示提示信息的控件,默认显示在屏幕底部,默认显示4s后自动隐藏。SnackBar是通过Scaffold的showSnackBar方法来显示,所以想要显示SnackBar必须要先拿到Scaffold。SnackBar 参数详细说明参见官方文档;主要介绍一下,以下2个参数:duration 属性可以设置提示条显示的时间;...

2020-03-04 15:42:50 318

原创 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 710

原创 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 1537 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 791

原创 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 728

原创 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 1863

原创 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 508

原创 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 654

原创 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 5261 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 3471

原创 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 991

原创 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 19653

原创 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 353

原创 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 1289

原创 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 1460

原创 Raspberry Desktop 用户自动登录设置,屏幕禁止休眠设置,浏览器全屏设置

树莓派按照ubuntu-mate 桌面系统,设置如下参数:开机用户自动登录:修改/etc/lightdm 下的 lightdm.conf文件如果没有则自己创建一个 内容为[SeatDefaults]autologin-user=name设置屏幕禁止休眠点击菜单栏 系统 –> 控制中心 –> 硬件 –> 电源管理设置系统启动默认打开chromium浏览器,且访问指定url点击菜单栏 系统 –>

2017-08-18 14:05:22 2321

原创 Cordova 手机App禁止横竖屏转换

禁止手机app横竖屏幕转换,只需在根目录下的 .config.xml 中添加如下内容 portrait纵向 landscape 横向 default 默认转屏

2017-07-25 11:31:53 1772

原创 手把手教你使用 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 1965

原创 手把手教你使用 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 485

原创 手把手教你使用 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 5590 3

原创 Linux 服务器运行监控软件 Monitorix install

将Monitorix安装到Ubuntu/Debian/Linux Mint上Monitorix的安装可以通过两种方式来完成,一种是使用Izzy软件库完成自动安装/更新,另一种是使用手动下载和安装.deb程序包。Izzy软件库是一个试验性的软件库,但是来自该软件库的程序包应该适用于所有版本的Ubuntu和Debian等发行版。不过,我们无法保证绝对正确――所以,风险自负。如果你仍然想通过apt-get

2017-06-06 17:58:42 691

原创 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 3365

原创 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 555

原创 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 3375

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除