npm install pm2 -gpm2 update 附pm2命令: $ npm install pm2 -g # 命令行安装 pm2 $ pm2 start app.js -i 4 # 后台运行pm2,启动4个app.js # 也可以把'max' 参数传递给 start # 正确的进程数目依赖 ...
分类:
Web程序 时间:
2020-06-25 09:32:15
阅读次数:
76
Find the Duplicate Number (M) 题目 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least ...
分类:
其他好文 时间:
2020-06-25 09:20:33
阅读次数:
64
Pod基本概念: 最小部署单元 一组容器的集合 一个Pod中的容器共享网络命名空间 Pod是短暂的 Pod实现机制与设计模式: 共享网络 共享存储 [root@centos7 demo]# cat b.yml apiVersion: v1 kind: Pod metadata: name: my-p ...
分类:
其他好文 时间:
2020-06-25 00:01:00
阅读次数:
96
一、什么是Shell? shell是外壳的意思,就是操作系统的外壳。我们可以通过shell命令来操作和控制操作系统,比如Linux中的Shell命令就包括ls、cd、pwd等等。总结来说,Shell是一个命令解释器,它通过接受用户输入的Shell命令来启动、暂停、停止程序的运行或对计算机进行控制。 ...
分类:
系统相关 时间:
2020-06-24 23:46:43
阅读次数:
80
假设你得到一个字符串,然后你想要查一下每个字母出现了多少次。 1. 用字典来实现的优势,就是我们不需要知道字符串中有哪些字母,只需要为其中存在的字母来提供存储空间。 $ cat c.py #!/bin/python def histogram(s): d = dict() for c in s: i ...
分类:
编程语言 时间:
2020-06-24 23:44:23
阅读次数:
99
启动hbase shell ./bin/hbase shell 1、创建表,查看表 create 'tableName', 'familykey1','familykey2',.... eg. create 'student','info','course'list #查看表 2、查看表信息 des ...
分类:
系统相关 时间:
2020-06-24 23:41:04
阅读次数:
75
问题描述:左侧是一个ListView控件,用于显示User类的Name属性,右侧显示其SelectedItem的其他属性,包括Age, Address,和Category。其中Category用ComboBox表示。在下拉框选中其他category,可以更改User的属性值。 如果Category是 ...
1、首先创建测试文件 a.txt、b.txt、c.txt 2、 查看空格类型,使用如下命令: cat -A file a.txt 第二行什么都没有 b.txt 的第二行为空格 c.txt文件第二行为tab键 3、使用常规命令 删除空行 sed '/^$/d' file 或者 grep -v '^$' ...
分类:
系统相关 时间:
2020-06-24 23:34:45
阅读次数:
69
本贴记录写shell脚本的时候踩的那些细节坑: 1.变量赋值不要加空格 a=1 #right a = 1 #wrong 2.if判断语句 [] 之间要加空格 if["$1"] then echo "有第一个参数" else echo “没有第一个参数” fi 隐蔽的错误,bash命令执行脚本的时候, ...
分类:
系统相关 时间:
2020-06-24 23:32:11
阅读次数:
80
Spring Boot 使用 spring.profiles.active属性搞定多环境配置。 ...
分类:
编程语言 时间:
2020-06-24 22:07:04
阅读次数:
71