## 示意图利器 D2
制作示意图的工具有很多。
我喜欢使用基于文本代码的作图工具,来绘制线框图,比如 Mermaid、Plantuml、Graphviz。
!img
它们都能根据代码,生成图片,非常适合放入代码仓库,进行版本管理。
最近,我发现了一个更易用的同类工具 D2,简单直观,功能强大,下面介绍给大家。
!img
D2 可以命令行使用,也可以浏览器使用。假定你有一个图片代码文件
> $ d2 example.d2
大部分时候,我都通过浏览器使用它。它有一个线上生成器 play.d2lang.com(下图),把代码贴进去,按下"compile"按钮,马上生成图片。
!img
想要 A 节点(节点的名称为 A),直接输入 A 就可以了。
> A
!img
A 只是节点名称,如果要定制节点的内容,就像下面这样写。
> A: 甲
!img
接着,添加一个节点。
> A: 甲
> B: 乙
!img
把它们连起来。
> A: 甲
> B: 乙
> A -> B
!img
连接可以用正箭头(
箭头上还能添加文字。
> A: 甲
> B: 乙
> A -> B: 连接
!img
节点之间可以有多根连线。
> A: 甲
> B: 乙
> A -> B: 请求
> A <- B: 响应
!img
节点的连接也可以写在一行。
> 甲 -> 丙 <- 乙: 连接
!img
> 阶段一 -> 阶段二 -> 阶段三 -> 阶段四
> 阶段四 -> 阶段一: 反馈
!img
这些语法就够画出基本的线框图了,是不是挺简单。
D2 可以绘制非常复杂的图,更多语法参考文档。
!img
最后提一下,如果想修改节点形状,方框改成圆形,就像下面这样写。
> A: 甲
> A.shape: circle
!img
形状甚至可以改成一朵云,表示云服务。
> A: 甲
> A.shape: cloud
!img
线条颜色也可以改。
> A: 甲
> A.style.stroke: red
!img
#tools
制作示意图的工具有很多。
我喜欢使用基于文本代码的作图工具,来绘制线框图,比如 Mermaid、Plantuml、Graphviz。
!img
它们都能根据代码,生成图片,非常适合放入代码仓库,进行版本管理。
最近,我发现了一个更易用的同类工具 D2,简单直观,功能强大,下面介绍给大家。
!img
D2 可以命令行使用,也可以浏览器使用。假定你有一个图片代码文件
example.d2,那么生成图片的命令如下。> $ d2 example.d2
大部分时候,我都通过浏览器使用它。它有一个线上生成器 play.d2lang.com(下图),把代码贴进去,按下"compile"按钮,马上生成图片。
!img
想要 A 节点(节点的名称为 A),直接输入 A 就可以了。
> A
!img
A 只是节点名称,如果要定制节点的内容,就像下面这样写。
> A: 甲
!img
接着,添加一个节点。
> A: 甲
> B: 乙
!img
把它们连起来。
> A: 甲
> B: 乙
> A -> B
!img
连接可以用正箭头(
->)、也可以用反箭头(<-),甚至双向箭头(<->)。如果不需要箭头,就直接连线(--)。箭头上还能添加文字。
> A: 甲
> B: 乙
> A -> B: 连接
!img
节点之间可以有多根连线。
> A: 甲
> B: 乙
> A -> B: 请求
> A <- B: 响应
!img
节点的连接也可以写在一行。
> 甲 -> 丙 <- 乙: 连接
!img
> 阶段一 -> 阶段二 -> 阶段三 -> 阶段四
> 阶段四 -> 阶段一: 反馈
!img
这些语法就够画出基本的线框图了,是不是挺简单。
D2 可以绘制非常复杂的图,更多语法参考文档。
!img
最后提一下,如果想修改节点形状,方框改成圆形,就像下面这样写。
> A: 甲
> A.shape: circle
!img
形状甚至可以改成一朵云,表示云服务。
> A: 甲
> A.shape: cloud
!img
线条颜色也可以改。
> A: 甲
> A.style.stroke: red
!img
#tools
写日记的意义是什么,下面是南希里根的理解:
这一句中:
1. whisked 的意思是 “迅速带走” 或 “匆忙推进”。
- 在这里,它形象地描述了时间或事件迅速将人们带入下一天,给人一种来不及停留的感觉。
2. savor 的意思是 “品味” 或 “享受”。
- 这里指希望更充分地享受或回味当下的时刻和感受。
整句话的意思是:
“我们只是想用一种方法,在匆忙进入下一天之前,捕捉当下的时刻和感受,以便之后还能够回味它。”
说得真好。
We just wanted a way to capture the moment and our feelings before we were whisked on to the next day, so we could savor it a little more.这一句中:
1. whisked 的意思是 “迅速带走” 或 “匆忙推进”。
- 在这里,它形象地描述了时间或事件迅速将人们带入下一天,给人一种来不及停留的感觉。
2. savor 的意思是 “品味” 或 “享受”。
- 这里指希望更充分地享受或回味当下的时刻和感受。
整句话的意思是:
“我们只是想用一种方法,在匆忙进入下一天之前,捕捉当下的时刻和感受,以便之后还能够回味它。”
说得真好。
在英文中,"den" 有几种常见的含义,具体意思取决于上下文:
1. 兽穴、窝
- 指野生动物(如狮子、熊、狐狸等)的栖息地或巢穴。
- 例句:The lion returned to its den after hunting.(狮子捕猎后回到了它的洞穴。)
2. 私密房间或空间
- 指家中一个舒适、私密的小房间,通常用于放松、阅读或工作。
- 例句:He spent the evening reading in his den.(他在自己的小房间里读书度过晚上。)
3. 秘密聚集地
- 可以指某些人(尤其是从事非法活动的人)的聚集地。
- 例句:The police raided the drug den.(警察突袭了毒贩的窝点。)
4. 儿童的游戏室
- 在某些情况下,也可以指孩子们玩耍的房间。
- 例句:The kids are playing in the den.(孩子们在游戏室里玩耍。)
#english
1. 兽穴、窝
- 指野生动物(如狮子、熊、狐狸等)的栖息地或巢穴。
- 例句:The lion returned to its den after hunting.(狮子捕猎后回到了它的洞穴。)
2. 私密房间或空间
- 指家中一个舒适、私密的小房间,通常用于放松、阅读或工作。
- 例句:He spent the evening reading in his den.(他在自己的小房间里读书度过晚上。)
3. 秘密聚集地
- 可以指某些人(尤其是从事非法活动的人)的聚集地。
- 例句:The police raided the drug den.(警察突袭了毒贩的窝点。)
4. 儿童的游戏室
- 在某些情况下,也可以指孩子们玩耍的房间。
- 例句:The kids are playing in the den.(孩子们在游戏室里玩耍。)
#english
In #Oracle SQL Developer, the small gray cross on a table name typically indicates that the table is a temporary table. Temporary tables are used to store data temporarily for the duration of a session or transaction, depending on how they are defined.
!image
There are two types of temporary tables in Oracle:
1. Global Temporary Tables (GTTs):
- These tables are defined with the
- The data in these tables is session-specific or transaction-specific, depending on the
-
-
2. Private Temporary Tables (PTTs) (introduced in Oracle 18c):
- These tables are defined with the
- They are visible only to the session that created them and are automatically dropped at the end of the session or transaction, depending on the
The small gray cross is a visual indicator in SQL Developer to help you quickly identify that the table is temporary and not a permanent table. This can be useful when managing or querying databases with many tables.
Yes, in Oracle, there is a column in the
Here’s how you can use it:
- The
-
-
### Example:
If you want to check if a specific table is temporary, you can run:
This will tell you whether the table is temporary or not. Keep in mind that for Private Temporary Tables (PTTs), they are not listed in
!image
There are two types of temporary tables in Oracle:
1. Global Temporary Tables (GTTs):
- These tables are defined with the
CREATE GLOBAL TEMPORARY TABLE statement.- The data in these tables is session-specific or transaction-specific, depending on the
ON COMMIT clause:-
ON COMMIT DELETE ROWS: Data is removed after each transaction (commit).-
ON COMMIT PRESERVE ROWS: Data persists for the duration of the session.2. Private Temporary Tables (PTTs) (introduced in Oracle 18c):
- These tables are defined with the
CREATE PRIVATE TEMPORARY TABLE statement.- They are visible only to the session that created them and are automatically dropped at the end of the session or transaction, depending on the
ON COMMIT clause.The small gray cross is a visual indicator in SQL Developer to help you quickly identify that the table is temporary and not a permanent table. This can be useful when managing or querying databases with many tables.
Yes, in Oracle, there is a column in the
ALL_TABLES data dictionary view that indicates whether a table is a temporary table. The column is called TEMPORARY.Here’s how you can use it:
SELECT TABLE_NAME, TEMPORARY
FROM ALL_TABLES
WHERE OWNER = 'YOUR_SCHEMA_NAME';
- The
TEMPORARY column will have the value:-
Y: If the table is a temporary table (Global Temporary Table or Private Temporary Table).-
N: If the table is a permanent table.### Example:
If you want to check if a specific table is temporary, you can run:
SELECT TABLE_NAME, TEMPORARY
FROM ALL_TABLES
WHERE TABLE_NAME = 'YOUR_TABLE_NAME'
AND OWNER = 'YOUR_SCHEMA_NAME';
This will tell you whether the table is temporary or not. Keep in mind that for Private Temporary Tables (PTTs), they are not listed in
ALL_TABLES because they are session-specific and not stored in the data dictionary like regular tables. Instead, PTTs are managed dynamically within the session.#english
The phrase "let you off the hook" is an idiomatic expression in English. It means to release someone from a responsibility, obligation, or difficult situation, often when they were expected to face consequences or be held accountable for something.
### Examples of Usage:
1. Responsibility:
- "I was supposed to clean the house today, but my mom let me off the hook because I had to study for exams."
- Here, it means the person was excused from their responsibility.
2. Avoiding Consequences:
- "He was caught speeding, but the officer let him off the hook with just a warning."
- This means the person avoided a penalty or punishment.
3. Social Situation:
- "I thought I’d have to attend the meeting, but my boss let me off the hook."
- This means the person was excused from attending.
### Origin:
The phrase comes from fishing. When a fish is "on the hook," it is caught and cannot escape. To "let it off the hook" means to release it, allowing it to escape. Metaphorically, this idea is applied to people being freed from obligations or consequences.
### Similar Expressions:
- "Off the hook": Can also mean something is exciting or excellent (slang usage).
- "Let someone off the hook": Focuses on releasing someone from responsibility or trouble.
The phrase "let you off the hook" is an idiomatic expression in English. It means to release someone from a responsibility, obligation, or difficult situation, often when they were expected to face consequences or be held accountable for something.
### Examples of Usage:
1. Responsibility:
- "I was supposed to clean the house today, but my mom let me off the hook because I had to study for exams."
- Here, it means the person was excused from their responsibility.
2. Avoiding Consequences:
- "He was caught speeding, but the officer let him off the hook with just a warning."
- This means the person avoided a penalty or punishment.
3. Social Situation:
- "I thought I’d have to attend the meeting, but my boss let me off the hook."
- This means the person was excused from attending.
### Origin:
The phrase comes from fishing. When a fish is "on the hook," it is caught and cannot escape. To "let it off the hook" means to release it, allowing it to escape. Metaphorically, this idea is applied to people being freed from obligations or consequences.
### Similar Expressions:
- "Off the hook": Can also mean something is exciting or excellent (slang usage).
- "Let someone off the hook": Focuses on releasing someone from responsibility or trouble.
#english
"As long as" 是一个常用的英语短语,主要有两种用法:
---
### 1. 表示条件,意思是“只要”
- 用来引导一个条件,表示只要某个条件满足,某事就会成立。
- 例句:
- You can borrow my car as long as you drive carefully.
(只要你小心驾驶,就可以借我的车。)
- I'll help you as long as you promise to try your best.
(只要你答应尽力,我就会帮你。)
---
### 2. 表示时间,意思是“长达……”
- 用来强调某件事情持续的时间很长。
- 例句:
- We waited as long as three hours for the bus.
(我们等公交车等了长达三个小时。)
- He has been working here as long as 10 years.
(他已经在这里工作了长达10年。)
---
### 注意:
- "As long as" 和 "As far as" 的区别:
- "As long as" 强调条件或时间。
- "As far as" 强调范围或限度,通常翻译为“据我所知”或“就……而言”。
- 例句:As far as I know, the meeting is still on.(据我所知,会议仍在进行。)
"As long as" 是一个常用的英语短语,主要有两种用法:
---
### 1. 表示条件,意思是“只要”
- 用来引导一个条件,表示只要某个条件满足,某事就会成立。
- 例句:
- You can borrow my car as long as you drive carefully.
(只要你小心驾驶,就可以借我的车。)
- I'll help you as long as you promise to try your best.
(只要你答应尽力,我就会帮你。)
---
### 2. 表示时间,意思是“长达……”
- 用来强调某件事情持续的时间很长。
- 例句:
- We waited as long as three hours for the bus.
(我们等公交车等了长达三个小时。)
- He has been working here as long as 10 years.
(他已经在这里工作了长达10年。)
---
### 注意:
- "As long as" 和 "As far as" 的区别:
- "As long as" 强调条件或时间。
- "As far as" 强调范围或限度,通常翻译为“据我所知”或“就……而言”。
- 例句:As far as I know, the meeting is still on.(据我所知,会议仍在进行。)