const currentPage = dv.current().file;
const dailyPages = dv.pages('"0-Daily"').sort(k=>k.file.name, "asc");
const currentPageName = currentPage.name;
const index = dailyPages.findIndex((e) => {return e.file.name === currentPageName});
if (index < 1) {
dv.table(["File", "Created", "Size"],[]);
} else {
const lastIndex = index - 1;
const lastPage = dailyPages[lastIndex].file;
const allPages = dv.pages().values;
const searchPages = [];
const lastTime = dv.parse(lastPage.name);
const currentTime = dv.parse(currentPage.name);
for (let page of allPages) {
const pageFile = page.file;
if (pageFile.cday > lastTime && pageFile.cday <= currentTime) {
searchPages.push(pageFile);
}
}
dv.table(["File", "Created", "Size"], searchPages.sort((a, b) => a.ctime > b.ctime ? 1 : -1).map(b => [b.link, b.ctime, b.size]));
}
IDL 是什么?
接口描述语言(Interface description language,缩写IDL),是用来描述软件组件[接口]( https://zh.wikipedia.org/wiki/%E4%BB%8B%E9%9D%A2_ (%E7%A8%8B%E5%BC%8F%E8%A8%AD%E8%A8%88) “接口 (程序设计)“)的一种计算机语言。IDL 通过一种独立于编程语言的方式来描述接口,使得在不同平台上运行的对象和用不同语言编写的程序可以相互通信交流;比如,一个组件用C++写成,另一个组件用Java写成。
IDL 通常用于远程调用软件。在这种情况下,一般是由远程客户终端调用不同操作系统上的对象组件,并且这些对象组件可能是由不同计算机语言编写的。IDL 创建起了两个不同操作系统间通信的桥梁。
双工和单工
“单工”是数据传输的一种模式,它与”双工”相对应。在单工模式下,数据只能在一个方向上进行传输,即只能从一个设备发送到另一个设备,而不能进行双向通信。
在单工通信中,数据的传输方向是单向的,类似于单向的”工作”,因此被称为”单工”。这种模式在实际应用中通常用于一些特定场景,例如广播通信或只需要单向数据传输的场合。与全双工和半双工不同的是,单工模式无法同时实现双向的数据传输。
“双工”这个术语来源于通信领域,其中的”双”表示两个,“工”表示工作或传输。因此,“双工”即指的是数据传输中可以在两个设备之间进行双向通信的方式。在全双工模式下,两个设备可以同时发送和接收数据,就像是双向的”工作”一样,实现了双向的数据传输。而在半双工模式下,数据的传输方向只能是单向的,所以被称为半双工。
IDEA 插件开发
- IntelliJ Platform SDK | IntelliJ Platform Plugin SDK
- GitHub - JetBrains/intellij-platform-plugin-template: Template repository for creating plugins for IntelliJ Platform
- 必须是 JDK11 以上
参考 Demo
- GitHub - 3dot141/idea-jmh-plugin: Plugin for Itellij IDEA to make benchmarking with JMH easier.
- inspection
- run configuration
- run execute