查看文件的中间几行
# 查看文件的第100-200行
sed -n '100,200p' filename
nohup使用,后台运行
import com.intellij.database.model.ObjectKind | |
import com.intellij.database.util.DasUtil | |
FILES.chooseDirectoryAndSave("Choose directory", "Choose where to store generated files") { dir -> | |
def schemaMap = new LinkedHashMap<String, Map<String, String>>(); | |
SELECTION.filter { (it.getKind() == ObjectKind.TABLE || it.getKind() == ObjectKind.SCHEMA) }.each { | |
def schemaName = DasUtil.getSchema(it); | |
if (!schemaMap.containsKey(schemaName)) { | |
schemaMap.put(schemaName as String, new LinkedHashMap<String, String>()); |
查看文件的中间几行
# 查看文件的第100-200行
sed -n '100,200p' filename
nohup使用,后台运行
1.格式化JSON
安装 Beautify
插件后,按键 F1
调出命令面板然后输入beautify
,选择 Beautify selection
或者 Beautify file
.
Beautify 可以格式化 javascript, JSON, CSS, Sass, 和 HTML
目前只测试了Mac和Ubuntu
1.安装 privoxy
Mac
brew install privoxy
ubuntu
1. 无法打开文件浏览器
执行 killall nautilus
后,重新打开
2. apt-get和apt区别在哪?
apt是友好版的apt-get,最大特性就是有进度条了。
3. snap 软件包管理
1. 安装proxychains
sudo apt-get update
sudo apt-get install proxychains
2. 修改配置
Stream分为中间操作(Intermediate operations)和终止操作(Terminal operations)
Intermediate
:一个流可以后面跟随零个或多个 intermediate 操作。其目的主要是打开流,做出某种程度的数据映射/过滤,然后返回一个新的流,交给下一个操作使用。这类操作都是惰性化的(lazy),就是说,仅仅调用到这类方法,并没有真正开始流的遍历。常见操作有 map (mapToInt, flatMap 等)、 filter、 distinct、 sorted、 peek、 limit、 skip、 parallel、 sequential、 unordered。
Terminal
:一个流只能有一个 terminal 操作,当这个操作执行后,流就被使用“光”了,无法再被操作。所以这必定是流的最后一个操作。Terminal 操作的执行,才会真正开始流的遍历,并且会生成一个结果,或者一个 side effect。常见操作有 forEach、 forEachOrdered、 toArray、 reduce、 collect、 min、 max、 count、 anyMatch、 allMatch、 noneMatch、 findFirst、 findAny、 iterator。
关于Short-circuiting
Intellij IDEA使用过程中经常有些小问题都不知道怎么去问,本文旨在整理一些琐碎的配置。后续会持续增加,如果恰好你也有,欢迎添加。
1.注释和代码缩进对齐
默认是1,实际想要的是2
public class Test {
public static void main(String[] args) {
From https://httpstatuses.com/
version: '3' | |
services: | |
jenkins: | |
image: jenkins/jenkins:lts | |
ports: | |
- "2017:8080" | |
- "50000:50000" | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro |