跳到主要内容

· 阅读需 1 分钟

上午去参加朋友的婚礼、真是好久没有吃大席了,附美美的新郎新娘。光顾吃了都没拍大餐哈哈哈。


下午去看看五一电影,本来买到票去看喜剧《人生路不熟》,但是进入影厅后看了十多分钟,发现进错了,结果看成了《长空之王》🤣,因为电影开头没有出名字。😂 (:该片讲述了雷宇等飞行员经过严苛选拔正式成为了我国新一代试飞员,他们在队长张挺的带领下参与到尖端新式战斗机的试飞工作中,在不断挑战战机和自我极限的过程中成长的故事)。也不错,效果挺震撼的。

· 阅读需 2 分钟

Motrix 是一款全能的下载工具,支持下载 HTTP、FTP、BT、磁力链等资源,界面清爽,即开即用。拥有 Chrome、Firefox 扩展,可接管浏览器下载。

官网:https://motrix.app/

开源地址:https://github.com/agalwood/Motrix

浏览器插件:https://github.com/gautamkrishnar/motrix-webextension

Motrix上个版本:Motrix v1.6.11 在2021年发布的,经过两年,近日这个开源作者(我是个兴趣使然的桌面应用开发者🤓,利用搬砖之余开发了 Motrix。)又发布了新版本,有好几十项更新,目前软件特色:

  • 🕹 简洁明了的图形操作界面
  • 🦄 支持BT和磁力链任务
  • ☑️ 支持选择性下载BT部分文件
  • 📡 每天自动更新 Tracker 服务器列表
  • 🔌 UPnP & NAT-PMP 端口映射
  • 🎛 最高支持 10 个任务同时下载
  • 🚀 单任务最高支持 64 线程下载
  • 🚥 设置上传/下载限速
  • 🕶 模拟用户代理UA
  • 🔔 下载完成后通知
  • 💻 支持触控栏快捷键 (Mac 专享)
  • 🤖 常驻系统托盘,操作更加便捷
  • 📟 系统托盘速度仪表显示实时速度 (Mac 专享)
  • 🌑 深色模式
  • 🗑 移除任务时可同时删除相关文件
  • 🌍 国际化,查看已可选的语言
  • 🛠 更多特性开发中

· 阅读需 2 分钟

4月23日世界读书日全称“世界图书与版权日”,又称“世界图书日”。最初的创意来自于国际出版商协会。由西班牙转交方案给了联合国教育、科学及文化组织。 --百科

不读书,你的朋友在谈天说地,你就知道说 俺也一样!

"俺也一样"。其出处是83版《三国演义》中,关羽、张飞在遇到刘备并决定跟随他后,关羽噼里啪啦说出了一大堆,什么"得遇明主,关某平生之愿足矣"、什么"某誓与兄患难与共,终身相伴,生死相随",既情真意切又表明了忠心,但一旁从没读过书的张飞再怎么情绪激动,也只能一而再地重复这句"俺也一样!"

如果你不知道读什么📚书的话,不妨看看:

豆瓣 2022 年度读书榜单 !

豆瓣 2021 年度读书榜单 !

或者多看看《人民日报》的公众号,多学习学习。

把你写的:

遇到困难,不要退缩。

转换成人民日报写的:

跋山涉水不改一往直前,山高路远但见风光无限。


“阅读是人类获取知识、启智增慧、培养道德的重要途径,可以让人得到思想启发,树立崇高理想,涵养浩然之气。”

· 阅读需 3 分钟

给文章加上随机的图片作为封面,方式有很多,搭建一个丐版的,能白嫖一下。

既然是丐版,那就表示本地肯定不存储图片了。可以使用第三方的存储,有很多选择比如:又拍云的云存储、SM.MS 的图片存储服务、其他人搭建的图床都可以。

比如我这使用 SM.MS 的服务,可以免费存储5个G的文件,够用!上传自己喜欢的图片,然后得到图片链接。

示例:「博客封面」丐版文章随机封面 API

部署服务

首先准备好 php 的环境,使用宝塔或者 1Panel,把默认的 index.php 的内容替换成下面的 index.php 代码,上传 photos.txt 和它同级即可。

度娘一个php的代码,返回随机图片有的是,如下:index.php

<?php
$arr=file('photos.txt');
$n=count($arr)-1;
for ($i=1;$i<=1;$i++){
$x=rand(0,$n);header("Location:".$arr[$x],"\n");}
?>

或者

<?php
//存有美图链接的文件名img.txt
$filename = "photos.txt";
if(!file_exists($filename)){
die('文件不存在');
}
//从文本获取链接
$pics = [];
$fs = fopen($filename, "r");
while(!feof($fs)){
$line=trim(fgets($fs));
if($line!=''){
array_push($pics, $line);
}
}
//从数组随机获取链接
$pic = $pics[array_rand($pics)];
//返回指定格式
$type=$_GET['type'];
switch($type){
//JSON返回
case 'json':
header('Content-type:text/json');
die(json_encode(['pic'=>$pic]));

default:
die(header("Location: $pic"));
}
?>

它同级新建个photos.txt 文件,每张图片占一行即可,如下所示:

https://s2.loli.net/2023/04/20/RXmvd7lpYHnuD3x.webp
https://s2.loli.net/2023/04/20/LkyNtFUhI7JlRci.webp

然后,添加域名、ssl证书。最后,访问即可。https://imgapi.lichenghao.cn

小脚本

SM.MS 上批量上传了图片后,批量获取图片链接成了个问题,也不能挨个去 copy。

度娘下 js 调整成批量获取图片链接。适用于网站:https://smms.app/

var links = "";
$('#table-picture tr').each(function (index) {
if (index === 0) {
} else {
var td = this.children[7];
var tt = td.children[0].children[0];
var value = $(tt).val();
links = links + value + "\n"
}
})

var name = 'pictures.txt';
savefiles(links, name);

function savefiles(data, name) {
//Blob为js的一个对象,表示一个不可变的, 原始数据的类似文件对象,这是创建文件中不可缺少的!
const urlObject = window.URL || window.webkitURL || window;
const export_blob = new Blob([data]);
const save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
save_link.href = urlObject.createObjectURL(export_blob);
save_link.download = name;
save_link.click();
}

使用的话:

  1. 谷歌浏览器开发者选项,Sources——> New snippet (右键新建);

  2. 将上面的代码粘贴进去,然后执行即可下载;

  3. 在新建的 snippet 鼠标右键执行即可得到一行一个链接的txt文件。

小问题

解决同一站点访问随机图片相同的问题?

在访问连接后面设置参数,参数可以任意,不重复就可以。

例如:https://imgapi.lichenghao.cn?_r=123

· 阅读需 5 分钟

语法格式

在markdown中展示数学公式,使用一对$$,或者四个$$$$

上下标

^ 表示上标, _ 表示下标。如果上下标的内容多于一个字符,需要用 {} 将这些内容括成一个整体。上下标可以嵌套,也可以同时使用。

上标语法:

$a^b = x^{y^z} = c^{m+n}$

ab=xyz=cm+na^b = x^{y^z} = c^{m+n}

下标语法:

$C_n^2$

Cn2C_n^2

分式与根号

\frac{}{} 表示分式,第一个花括号内容为分子,第二个花括号内容为分母

语法:

$2^\frac{1}{n}$

21n2^\frac{1}{n}

\sqrt{}表示开根号,\sqrt[]{}中括号表示开几次方,后面花括号为开方内容

${\sqrt[n]{a}} = x$

an=x{\sqrt[n]{a}} = x

累加与累乘

使用 \sum 来输入一个累加。与之类似,使用 \prod 来输入累乘。

示例:

$\sum\limits_{i = 1}^nf(x_i)$

i=1nf(xi)\sum\limits_{i = 1}^nf(x_i)

示例:

$\prod\limits_{i = 1}^{n-1}(x_i-1)(x_i + 2)$

i=1n1(xi1)(xi+2)\prod\limits_{i = 1}^{n-1}(x_i-1)(x_i + 2)

积分

使用 \int 来输入一个积分。

示例:

$\int_0^1 {x^2}dx$

01x2dx\int_0^1 {x^2} dx

极限运算

使用 \lim 来输入一个极限。\to 表示从箭头 ,\infty 表示无穷大,\limits表示范围。

示例:

$\lim\limits_{n \to +\infty} \frac{1}{n(n+1)}$

limn+1n(n+1)\lim\limits_{n \to +\infty} \frac{1}{n(n+1)}

方程组

表达方式1

需要cases环境,起始、结束处以{cases}声明

$\begin{cases}
a_1x+b_1y+c_1z=d_1 \\
a_2x+b_2y+c_2z=d_2 \\
a_3x+b_3y+c_3z=d_3 \\
\end{cases}$

{a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3\begin{cases} a_1x+b_1y+c_1z=d_1\\ a_2x+b_2y+c_2z=d_2\\ a_3x+b_3y+c_3z=d_3\\ \end{cases}

表达方式2

起始、结束处以{align}声明(也可以使用aligned,公式中的&表示对齐)

$f(x,y,z) = \left \{\begin{aligned} &3x + 5y +  z \quad &, x < 0  \\ &7x - 2y + 4z\quad&, x > 0 \\ &-6x + 3y + 2z \quad &,x = 0\end{aligned}\right.$

f(x,y,z)={3x+5y+z,x<07x2y+4z,x>06x+3y+2z,x=0f(x,y,z) = \left \{\begin{aligned} &3x + 5y + z \quad &, x < 0 \\ &7x - 2y + 4z\quad&, x > 0 \\ &-6x + 3y + 2z \quad &,x = 0\end{aligned}\right.

矢量

使用 \vec{矢量} 来自动产生一个矢量。也可以使用 \overrightarrow 等自定义字母上方的符号。\cdot 表示一个点,在公式中往往表示向量乘法。

示例:

$\vec{a} \cdot \vec{b}$

ab\vec{a} \cdot \vec{b}

左箭头,两边箭头,右箭头示例,其中\quad 表示四个空格:

$\overleftarrow{xy} \quad  \overleftrightarrow{xy} \quad \overrightarrow{xy}$

xyxyxy\overleftarrow{xy} \quad \overleftrightarrow{xy} \quad \overrightarrow{xy}

矩阵

使用 \begin{matrix} ... \end{matrix} 生成,每一行以 \\ 结尾表示换行,各元素间以 & 隔开。

123456789{\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9 \end{matrix}}

带大括号

$\left\{\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9 \end{matrix}\right\}$

{123456789}\left\{\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9 \end{matrix}\right\}

或者:

$\begin{Bmatrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{Bmatrix}$

{123456789}\begin{Bmatrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{Bmatrix}

带中括号

$\left[\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{matrix}\right]$

[123456789]\left[\begin{matrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{matrix}\right]

或者:

$\begin{bmatrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{bmatrix}$

[123456789]\begin{bmatrix}1 & 2 & 3\\4 & 5 & 6\\7 & 8 & 9\end{bmatrix}

包含省略号,矩阵:(行省略号\cdots,列省略号\vdots,斜向省略号(左上至右下)\ddots

$\left\{ \begin{matrix}1 & 2 & \cdots & 5 \\ 6 & 7 & \cdots & 10 \\ \vdots & \vdots & \ddots & \vdots \\ \alpha & \alpha+1 & \cdots & \alpha+4\end{matrix} \right\}$

{1256710αα+1α+4}\left\{ \begin{matrix}1 & 2 & \cdots & 5 \\ 6 & 7 & \cdots & 10 \\ \vdots & \vdots & \ddots & \vdots \\ \alpha & \alpha+1 & \cdots & \alpha+4\end{matrix} \right\}

括号

()[]| 表示符号本身,使用 \{\} 来表示 {} 。当要显示大号的括号时,要用 \left\right 命令

示例:

$f(x,y,z) = 2y^3z \left( 7+\frac{5x+8}{4+y^3} \right)$

f(x,y,z)=2y3z(7+5x+84+y3)f(x,y,z) = 2y^3z \left( 7+\frac{5x+8}{4+y^3} \right)

示例:

$\frac{du}{dx}|_{x = 0}$

dudxx=0\frac{du}{dx}|_{x = 0}

省略号

数学公式中常见的省略号有两种,\ldots 表示与文本底线对齐的省略号,\cdots 表示与文本中线对齐的省略号。

示例:

$f(x_1,x_2,\cdots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2$

f(x1,x2,,xn)=x12+x22++xn2f(x_1,x_2,\cdots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2

示例:

$f(x_1,x_2,\ldots,x_n) = x_1^2 + x_2^2 + \ldots + x_n^2$

f(x1,x2,,xn)=x12+x22++xn2f(x_1,x_2,\ldots,x_n) = x_1^2 + x_2^2 + \ldots + x_n^2

常用符号

名称markdown预览
乘法\timesa×ba \times b
除法\diva÷ba \div b
正负号\pm±a\pm a
大于直接写>>
小于直接写<<
大于等于\geaba \ge b
小于等于\leaba \le b
正无穷\infty\infty
负无穷-\infty-\infty
不等于\not=aba \not= b
不等于\neqaba \neq b
约等于\approxa2a \approx 2
因为\becausea=1 \because a=1
所以\thereforeb=1\therefore b=1
小空格\反斜杠后面紧跟空格a b c a\ b\ c\
大空格(四个)\quadabca\quad b\quad c
………………

常用希腊字母

常用希腊字母:

大写markdown小写markdown
A\Alpha$\Alpha$α\alpha$\alpha$
Δ\Delta$\Delta$δ\delta$\delta$
Λ\Lambda$\Lambda$λ$\lambda$
H\Eta$\Eta$η$\eta$
E\Epsilon$\Epsilon$ϵ$\epsilon$
Θ\Theta$\Theta$θ$\theta$
B\Beta$\Beta$β\beta$\beta$
Π$\Pi$π\pi$\pi$
Φ\Phi$\Phi$ϕ\phi$\phi$
Ψ\Psi$\Psi$ψ\psi$\psi$
Ω\Omega$\Omega$ω\omega$\omega$

公式美化

可以用 font 标签对公式进行颜色或者文字大小进行调整。

<font size=6 color= 'green'>$\prod\limits_{i = 1}^{n-1}(x_i-1)(x_i + 2)$</font>

· 阅读需 2 分钟

日前,一场大范围的沙尘天气正在影响我国,多地空气质量已达到严重污染水平。

本次沙尘影响波及18省区市

中央气象台11日6时继续发布沙尘暴蓝色预警:受冷空气大风影响,预计11日8时至12日8时,新疆南部、内蒙古大部、甘肃东部、宁夏、陕西中北部、山西、河北、北京、天津、山东、河南、安徽中北部、江苏、上海、湖北北部、黑龙江西南部、吉林中西部、辽宁中西部等地有扬沙或浮尘天气,其中,内蒙古中东部等地的部分地区有沙尘暴,内蒙古中部局地有强沙尘暴。

来源:http://www.nmc.cn/publish/severeweather/dust.html

为何北方今年以来沙尘天气会如此频繁?

根据预报,本次沙尘天气过程将于4月11日左右逐步结束,但紧随其后在13日至14日,还会再有一次沙尘天气过程现身,西北、华北和东北地区一带将再遭风沙侵扰。

目前的这次沙尘天气过程是今年以来第8次,常年同期的沙尘过程次数大约是5至6次,今年沙尘出现的次数略偏多。为何北方今年以来沙尘天气会如此频繁?气象分析师王伟跃介绍:

  • 从气候条件上来说,前期沙源地的气温偏高、降水偏少,加之植被尚未返青,裸露的沙源地地表条件就容易触发沙尘天气;

  • 从天气条件上来说,进入3至4月份以来,我国冷空气活动仍处在活跃期,在冷空气影响期间,蒙古气旋和地面冷锋成为有利的推手,将沙尘从沙源地带到下游地区,甚至一路输送到更南、更远的地方。

预防?

这几天的北京出门都睁不开眼睛👁,带个防尘眼镜👓差不多。咋预防?别出门最好。

· 阅读需 5 分钟

今天看到一个有意思的回答,馒头、面包为什么会有「皮」?下面是知乎用户的回答^_^

馒头、面包之所以有「皮」,之所以内外不一样,

是因为:内外部的温差,导致面团的内外发生了不一样的反应。

一、面团内、外的温差

当我们蒸馒头、或者烤面包时,面团的内、外会存在温差,而且温差还不小~

以烘焙面包为例:

烘烤5分钟后,表皮的温度已经130℃了,可中心才刚刚超过40℃,还没怎么开始上升。

哪怕再往后,面团的表面和中心也维持着接近90℃的温差。

也就是说,面团的温度是从外到内逐步递减的,处于两者之间。

吃火锅时煮过冻丸子的人应该有类似的体验:

丸子下锅煮了十分钟了,外面已经烫嘴了,里面咬开还是温的、或者是凉的。

有人可能会问,为什么面团的内外温差这么大呢?

因为面团的传热速度是有限的:

传热效率在45-55℃时候就达到了上限,温度再升高时,效率反而会因为蛋白的变性而降低。

既然蒸馒头、烤面包时,面团的内外部存在着巨大的温差,

那么,内外部同时在发生着不同的反应,也就可以理解了。

二、面团内、外部发生的反应

关于面团里面发生的反应,有个有意思的规律:温度越高,发生的反应越单一。

先说温度最高、反应也最单一的面包皮

高温烘烤时,面团的表面在短短3-4分钟内,就经历了快速的失水和升温过程。

升温,让面包表面发生了剧烈的美拉德反应,赋予了面包诱人的黄褐色,和阵阵浓郁的麦香味~

而失水,让面包表面变又「干」又「脆」。

在两者共同的作用下,面团表面就成了我们平时吃到的面包皮了~

馒头皮的形成会稍微复杂一点

在蒸煮的时候,馒头表面的水分会稍微上升。

因为在蒸煮时,馒头表面是蒸笼里温度最低的地方,水蒸气会冷凝在上面。

在充足的水分和高温作用下,

馒头表面的淀粉开始吸水膨胀,填平了一些原本坑洼的地方;而蛋白会开始变性、硬化,像钢筋一般加固了这个表面。

这种变化让馒头表面变得更平整,对光线的反射更整齐,所以肉眼看上去自然更有「光泽」了。

不光是馒头,像米粉、肠粉、饺子等米面制品都会发生类似的反应,形成这种光滑的外表面

所以,与其问馒头为什么会有皮,不如问馒头为什么会有「芯」,因为馒头的「芯」才是和其他米面制品不一样的地方。

接下来我们看面团内部的反应(也是最复杂的反应

首先,是50℃以下、以微生物作用为主的阶段。

这时面团里面的酵母、生物酶还在作用,可以当成面团的「后醒发」过程~

——生物酶在分解蛋白和淀粉,为酵母的代谢提供营养;而酵母在代谢过程不断产气、产酒精。

其次,是50℃以上、以物理作用为主的阶段。

这时,面团的外表面已经凝固或者硬化了(不透气),面团在酵母产气、酒精气化的作用下,像打气球一样一点点地膨胀变大。

体积膨胀了,内部会拉伸开,自然就不如开始时候那么致密了。

会变成像上图那样疏松、多孔的结构,这就是馒头芯、面包芯形成的过程。

最后到了80℃左右,也就是蛋白变性的温度,面团的内部也会像表面那样凝固住,体积就停止膨胀了~

这就是馒头、面包分为「芯」和「皮」的原因了:因为内外部温度不同,各自经历着不同的反应

最后

其实,这个知识点还能侧面拓展一下。

  • 比如,为什么面包内部的孔比馒头大,为什么面包要用高筋粉

是因为高筋粉的蛋白质量更好,能够支撑更大幅度的体积膨胀,而不会崩塌~

  • 比如,为什么水沸腾了再放馒头胚进去蒸?

是为了控制后醒发和物理膨胀的程度。

如果馒头升温速度太慢,后醒发和物理膨胀时间太长,馒头会过度膨胀。

但是中筋粉的蛋白质量不足以支撑这种程度的膨胀,所以会出现馒头不够挺(变塌),甚至体积缩小的情况。

等等...大家也可以自行再拓展一下~

——谢谢阅读!

资料

  1. Steamed Buns
  2. Zeng, Q.; Zhu, J. Analysis of Adhesion at the Interface of Steamed Bread and Eggshell. Molecules. 2022, 27, 8179.
  3. Romano A., Masi P., Nicolai M.A., Falciano A., Ferranti P., 2019, Quinoa (chenopodium Quinoa Willd.) Flour as Novel and Safe Ingredient in Bread Formulation, Chemical Engineering Transactions, 75, 301-306.
  4. Bernarda Seruga · Sandra Budzaki. Determination of thermal conductivity and convective heat transfer coefficient during deep fat frying of “KroÐtula” dough. Eur Food Res Technol (2005) 221:351–356.
  5. V Nicolas, P Salagnac, etc. Modelling heat and mass transfer in bread baking with mechanical deformation. Journal of Physics: Conference Series 395 (2012) 012146.

· 阅读需 6 分钟

这个牛逼的开发工具,又开始整活了。谨慎升级,有部分插件还没适配!

Idea logo

IntelliJ IDEA 2023.1 is now available, and it comes with a host of improvements and valuable new features!

You can download the new version from our website, update directly from the IDE or via the free Toolbox App, or use snaps for Ubuntu.

IntelliJ IDEA 2023.1 includes refinements for the new UI, which has been overhauled based on the valuable feedback we’ve received from users. We’ve also implemented performance enhancements resulting in faster Maven import and IDE features becoming available earlier when opening projects. The new version provides a streamlined commit process thanks to background commit checks. IntelliJ IDEA Ultimate now supports navigation for Spring Security matchers and request mappings. 

This blog post highlights these significant updates and other notable improvements that have been implemented in IntelliJ IDEA 2023.1.

Key updates

  • We’ve implemented a number of updates for the IDE’s new UI to address the most popular requests. Check out this blog post for further details on them.
  • The Scanning files to index process is now performed in smart mode, which makes the IDE’s full functionality available much earlier in the startup process. 
  • The IDE’s performance when importing Maven projects has been notably improved. 
  • Commit checks for Git and Mercurial are now performed in the background after you commit but before you push, which speeds up the overall commit process. 
  • IntelliJ IDEA Ultimate 2023.1 provides easy navigation to security matchers from Spring controllers. 

User experience 

  • In v2023.1 it’s possible to zoom into and out of IntelliJ IDEA entirely, increasing or decreasing the size of all UI elements at once. 
  • You can now save and manage several tool window layouts and switch between them when needed.
  • We’ve introduced a new layout option that allows you to unify the width of the side tool windows or retain the ability to freely adjust their sizes as you customize your layout. Learn about how this setting works for the new and the old UI in this blog post.
  • There’s an option to add in-editor onboarding tips to sample code, making it easier for new users to familiarize themselves with the most essential IDE features after they create a new project.
  • IntelliJ IDEA 2023.1 adds the option to predefine the behavior of Actions on Save for new projects. 
  • ML-powered search for classes in Search Everywhere is enabled by default in IntelliJ IDEA 2023.1.
  • When Microsoft Defender with Real-Time Protection is running, IntelliJ IDEA now suggests reconfiguring the antivirus’ settings for better IDE performance. 

Editor

  • There’s a new setting to control the placement of pasted content that was copied or cut without selection.  
  • There’s now an option to show whitespaces as small dots only when you select code. 
  • With IntelliJ IDEA 2023.1, you can use regular expressions to create your own search and replace inspections.
  • A new intention action allows you to correct the formatting of tables in Markdown files.
  • The Fill Paragraph editor action is now supported for Markdown files, allowing you to break long texts into several lines of even length. 
  • There’s a new dedicated page in Settings/Preferences | Editor | General | Smart Keys to make managing your Markdown preferences easier.
  • The Typo inspection no longer checks the spelling of hashes and special values and doesn’t report them as misspelled.

Java

  • We’ve made a range of changes to Java inspections and added new ones to help keep your code clean and error-free. Learn more about these improvements in this blog post.
  • IntelliJ IDEA 2023.1 supports new features from Java 20. Find out more in this blog post
  • We’ve upgraded the Extract Method refactoring by introducing the option to apply it even when the selected code fragment features several variables that need to be returned. 
  • We’ve integrated auto-completion functionality into the VM Options field of the Run/Debug configuration popup.

Scala

  • IntelliJ IDEA 2023.1 provides better support for Scala 3. It includes updates for working with braceless Scala code, support for the new -Wunused:imports compiler option for enhanced import management, improved Scala code highlighting, and the proper automatic generation of overriding methods with using clauses.

  • The IDE now provides improved support for sbt projects.

  • The Unused declaration and Can be private inspections have been upgraded in v2023.1.

  • IntelliJ IDEA 2023.1 brings numerous fixes and improvements in Scala 3 and Scala 2 decompilers.

Profiler

  • The Flame Graph tab now provides color-coded highlighting for methods that belong to the project, making it easy to distinguish the code that you can modify to resolve a given performance problem. 

Version control systems

  • To make tracking changes to files more convenient, we’ve added VCS status-based, color-coded highlighting in the Structure tool window. 
  • We’ve improved the code review workflow for GitHub by reworking the IDE’s Pull Request tool window.
  • The Branches popup has been updated. 
  • IntelliJ IDEA 2023.1 provides auto-completion in the Create New Branch popup.

Build tools

  • It’s now possible to specify the Gradle version when creating a new project.
  • When importing a project, IntelliJ IDEA 2023.1 can now detect the Gradle toolchain configuration and set up a matching Java SDK in the module’s settings.

Run / Debug

  • You can now assign a custom shortcut to launch the Run with coverage action for the file you currently have open, even if the run configuration hasn’t been created yet.
  • In IntelliJ IDEA 2023.1 you can filter classes in the Coverage view to focus on recently updated classes and methods that require special attention when testing.

Frameworks and technologies 

The following features and updates introduced to support working with frameworks and technologies are only available in IntelliJ IDEA Ultimate 2023.1.

  • In the Spring run configuration, Gradle is now the default option for running and building projects. 
  • It is now possible to share Spring and JPA facet settings via VCS.
  • In v2023.1 you can run MongoDB queries in the Database console from Spring and Micronaut Data repositories. 
  • The new version of the IDE provides improved inspections for reactive code.
  • We’ve implemented a new dedicated plugin that integrates Apache Dubbo, providing the framework’s functionality as part of IntelliJ IDEA’s support for Spring. 
  • If you define additional metadata for APIs using Swagger 2.X annotations in Spring controllers, the IDE now includes these annotations when generating OpenAPI files.
  • It is now possible to edit parts of bigger OpenAPI specifications split over separate files while easily navigating between them.
  • With IntelliJ IDEA Ultimate 2023.1, it is possible to run GRPC requests from proto files that contain imports from .jar archives. Also, code completion has been improved for request bodies, like for OneOf and Map<K,V> types.
  • We’ve added the HTTP Client tab for Protobuf endpoints in the Endpoints tool window. 
  • The IDE now provides all of the editing features necessary to work with application.yaml configuration files in Ktor, including code completion, highlighting, and validation.
  • The XSLT Debugger plugin has been unbundled. You can get it from JetBrains Marketplace or install it directly in the IDE in Settings/Preferences | Plugins

Docker

  • The Dashboard tab of the Docker Сompose node now pulls together logs from every Docker Сompose container and displays them all in one place, updated in real time.
  • In IntelliJ IDEA 2023.1 you can see health statuses of running Docker containers in the Services tool window. 
  • You can now easily connect to Azure Container Registry.
  • There’s a new option to add :z configuration flags to Docker bind mounts, which allows you to connect volumes to Docker containers on SELinux workstations.
  • The Docker debug functionality has been deprecated. To debug your applications using Docker containers, use Run targets instead. 

Kubernetes 

  • The New Kubernetes Resource popup now provides the most popular resource types, such as Pod, Deployment, and ConfigMap, so you can easily create these files. 
  • IntelliJ IDEA Ultimate 2023.1 introduces a new dialog for creating Kubernetes Secrets. 
  • IntelliJ IDEA Ultimate now features color-coded change markers in the gutter for Kubernetes resources loaded from the cluster, allowing you to easily track the changes you make. Additionally, using the Compare with Cluster icon, you can open a full diff view that will fetch the resource’s current version from the cluster and compare it with the local version.
  • IntelliJ IDEA Ultimate 2023.1 provides a refined user experience when working with kubeconfig files.
  • You can now assign shortcuts for most Kubernetes actions in the Services view, like Forward Ports, Delete Resource, and Describe Resource, among others. 

Remote development and collaboration 

  • Code With Me session guests are now provided with extended insight into items that are only available to hosts. 
  • In Code With Me, users can now request permissions and approve them with a single click.
  • IntelliJ IDEA Ultimate 2023.1 provides an improved overview of recent remote development projects.

Web development 

  • IntelliJ IDEA Ultimate 2023.1 adds long-awaited Astro support. You can get it through our new Astro plugin. 
  • We’ve added TypeScript support in Vue templates.
  • The automatic conversion of strings to template literals is now supported in IntelliJ IDEA Ultimate 2023.1.
  • We’ve added support for Tailwind CSS configuration options such as custom class name completion under the classAttributes option, or experimental ones like tailwindCSS.experimental.configFile.

Other

  • The Android plugin bundled with IntelliJ IDEA now provides all of the features of Android Studio Electric Eel, including support for the Android Gradle Plugin (AGP) 7.4.0.

These are the key changes that have been implemented in the IntelliJ IDEA 2023.1 release. For a more detailed overview of all the updates, please refer to the release notes.

We greatly value feedback from our users, as it helps us refine our product. We encourage you to share your thoughts and suggestions on the new features and updates with us. You can do this by posting on Twitter, using our issue tracker, or leaving a comment below.

Happy developing!

· 阅读需 1 分钟

默认情况下,Mac 上的 vim 命令是没有颜色高亮的。但是它是有颜色配置文件的。在

/usr/share/vim/路径下,有个 vimxx 目录下的 color 目录。例如我的路径为:

/usr/share/vim/vim82/colors

README.txt    default.vim   elflord.vim   koehler.vim   murphy.vim    ron.vim       tools
blue.vim delek.vim evening.vim lists pablo.vim shine.vim torte.vim
darkblue.vim desert.vim industry.vim morning.vim peachpuff.vim slate.vim zellner.vim

在当前用户目录下,新增配置文件 .vimrc

vim ~/.vimrc

set nu # 显示行号
colorscheme desert # 颜色配置文件
syntax on # 语法高亮

然后再 vim 文件就会有颜色了!

· 阅读需 1 分钟

使用Chrome浏览器的书签,如果不能访问 google 的话,可以通过插件来完成书签🔖的同步。

参考:Floccus配合坚果云完成浏览器书签同步

随着书签的越来越多,就会变的非常乱,那么就需要给书签分组。可以通过创建文件夹给书签分组,但是文件夹变的多了后,就会使用起来不方便,因为你可能需要点好几次才能找到最终的书签。所以加入分隔符能减少文件夹的创建,也可以让层级变的少,查找也会变得方便,同时也能美观。

默认情况下,谷歌浏览器不支持分隔符。这里的分隔符其实是利用特殊字符+特殊的icon来完成的。有个小哥就完成了这件事情:https://github.com/skrysmanski/chrome-separators

但是该网站在国内访问很慢,知道原理后,自己也可以做一个静态网站。

https://github.com/lichlaughing/chrome-separator

然后利用 Vercel 部署设置自己的域名即可:https://split.lichenghao.cn/index.html

使用,按照提示拖动链接🔗到书签文件中或者书签栏中即可。