跳到主要内容

· 阅读需 2 分钟
Lichlaughing

SpringBoot 发送邮件方式有很多,比如:JavaMailSender、JavaMail API 来发送邮件(灵活 🐒,支持发送日程提醒)、Apache Commons Email 库、或者 hutool 封装的 MailUtil 等等。

这里使用Spring Framework 提供 JavaMailSender 因为它最简单和 springboot 无缝集成。

· 阅读需 4 分钟
Lichlaughing

在知乎上看到这样一篇文章,讲一个位资深工程师在醉酒状态下发布的关于他十年职业生涯的心得体会。获得了大量的关注和赞同。

· 阅读需 1 分钟
Lichlaughing

尊敬的腾讯云用户,您好!

您的账号(账号ID: 171*******)下的设备,存在对其他服务器端口(TCP:22)的攻击行为,请您做好安全自查整改,并在24小时内停止上述行为。如逾期未处理,我们核实后将按相关法律法规和腾讯云服务协议要求对您停止服务。

· 阅读需 1 分钟
Lichlaughing

作为 Obsidian 使用的新手,目前为止已使用一周多,如果从零开始使用一款笔记软件,你会怎么做?

我一般会先去 B 站大学搜索一下 UP 主们对该笔记软件特点的小总结,然后结合自己的喜好,来决定是否要尝试一下。接下来就是我从零开始使用的过程。

支持全平台这个特性肯定是必须的了,日常 Mac 和 WIN 平台我都在使用,移动端使用 IOS。 还好它全平台都支持。

· 阅读需 1 分钟

兰空图床官网:https://www.lsky.pro/ 兰空图床可以帮您保管大量无处安放的图片,数据可以自由选择储存驱动,支持主流第三方储存。 作为一个助手,它不仅可以将您把图片以指定规则存放在指定位置,还有更多强大的功能来帮助您处理这些图片。

· 阅读需 1 分钟

在线聚合工具:帮小忙(腾讯QQ浏览器在线工具箱) 包含了各种各样的工具,就像网站说的一样:轻松办公,工具助你一臂之力 地址:https//tool.browser.qq.com/ 智图 图片压缩转换工具,下载地址:https//zhitu.isux.us/ 我通常用它压缩转换成 webP 格式,

· 阅读需 2 分钟

两年前,大概2021年初,我入手了极米Z8X投影,当时买的时候还是有点小贵的,使用起来显示效果及音响效果都还不戳~

但是结果这几天它坏了,看着看着还好好的,突然变成了下面这样:

变成这样后,过不了几分钟就自动关机。重启后,画面显示还是上面的样子,过几分钟后又自动关机。

好家伙,我直接好家伙!

于是我赶紧联系京东的客服,然后联系到了极米的售后客服,幸好当时买的时候送了一个两年的延保,返修是免费的。由于极米维修地全国只有一个地方,所以需要客户邮寄到指定位置,

寄修的维修周期很长的,需要大概20多天。我感觉这么大的品牌,用了两年就坏了,还是感觉挺气愤的。然后就在下面问专属客服,能投诉商家不(有点上头了哈哈哈)

经过和京东的客服和极米客服的沟通,他们的态度都还挺好的,积极解决问题,京东给我返还了5千的京豆。其次邮费是可以报销的哦!

第二天就顺丰寄修了,中间有客服跟我确认问题详情。现在等待修理结果......

· 阅读需 2 分钟
Lichlaughing

私有化部署,能选择的工具不多。官网也给了一些工具的对比,除了这些还有一些功能需要花钱的工具,比如FlowUs,语雀等等。

但要是想没有那么多条条框框的限制就得私有部署,选择这种静态网站生成工具,直接部署在github或者白嫖一些其他静态网站托管,成本就几乎为了。说白了就是折腾。

· 阅读需 2 分钟

Sublime Text 在Mac上使用很顺滑,内置的主题看久了有些疲劳,先换个主题 。

安装 Material Theme

Package Control 中搜索主题第一名[Popularity]:Material Theme主题直达→

安装:

  1. command⌘ + shift⇧ + p ,打开命令弹窗;
  2. 弹窗输入:Install Package,选中Package Control: Install Package回车,进入Package 搜索页面,搜索Material Theme安装即可。

然后你会得到如下的主题效果:

主题自带配置功能:

Package Setting —> Material Theme —> Configuration

进入配置页面,选择每一项进行配置即可。

调整侧边栏字体

首先安装:PackageResourceViewer 方式和上面一样。

  1. command⌘ + shift⇧ + p ,打开命令弹窗;

  2. 弹出输入:PackageResourceViewer 选择PackageResourceViewer: Open Resource进入源码列表;

接下来找到我们的主题源码文件,不知道主题文件名可以打开配置文件(Settings) 查找theme

比如使用主题Material-Theme:

{

"font_size": 18,
"theme": "Material-Theme-Darker.sublime-theme",
.....
}

找到主题配置文件后,在配置文件中查找到第一个 "class": "sidebar_label",添加自定义配置即可。

{
"class": "sidebar_label",
"color": [97, 97, 97],
"font.bold": false,
"font.italic": false,
"shadow_color": [255, 255, 255, 0],
"shadow_offset": [0, 0],
"font.size": 15, // 自定义文字大小
"font.face":"agave Nerd Font Mono", // 自定义字体
},

同理,有了PackageResourceViewer你可以修改主题的任何地方!

· 阅读需 2 分钟

5G的icloud存储空间,好像也不算小了。但是如果你使用一段时间后,你的照片一定塞满了空间。

白嫖党必然不会充值icloud空间。阿里云盘或者百度网盘都有相册备份的功能,最主要的是他们空间大!再加上下载不限速,阿里云盘就是最终的选择了。(内测用户,上T空间绝对够用了!😄)

解决了照片存放,那么已经在iCloud中的照骗怎么给整出来?

官网给出了答案:https://support.apple.com/zh-cn/HT209454

  1. iCloud.com 上,点按“照片”,然后选择一张照片或一段视频。在 Mac 上按住 Command 键或在 PC 上按住 Control 键,即可选择多张照片或多段视频。
  2. 点按并按住窗口上角的“下载”按钮。如果要下载最初拍摄或导入的照片或视频,请选取“未修改的原片”。如果您需要 JPEG 或 H.264 格式(包括所做的编辑),即使照片或视频的原始格式是 HEIF 或 HEVC 格式,也应选取“兼容性最好”*。
  3. 点按“下载”。

这样就可以备份历史的照片,然后清空iCloud中的照骗了!同时关闭照片同步的功能,那么5G的空间存储一些电子书、备忘录啥的绝对够用了。

· 阅读需 1 分钟

大概快有两岁了,猫粮也干了好几袋了,猫条,罐罐也不少了,但始终是3.6kg (/ω\)。

安排上钙片和各种维生素再看看,什么时候才能成大胖橘?

· 阅读需 2 分钟

有了 「Miniflux」在线 RSS 阅读网站,实现多端同步! 工具后,可以实现在线RSS阅读,但是并不是所有的网站都支持RSS,RSSHub 解决了这个问题。

RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以给任何奇奇怪怪的内容生成 RSS 订阅源。RSSHub 借助于开源社区的力量快速发展中,目前已适配数百家网站的上千项内容。

开源地址:https://github.com/DIYgod/RSSHub

通过这个工具可以让任何没有RSS的网站,拥有RSS订阅的能力。

部署方式有很多,但是国内应该是访问不了他的官方文档了,建议白嫖Vercel部署:

使用一键部署,,点击Vervel 绑定自定义域名(Vercel 给你的域名已被 DNS污染)部署成功后,访问如下表示成功:

部署成功后,接下来就是使用他,比如我们想订阅微博热搜榜,那么RSSHub给出了地址规则:

/weibo/search/hot ,再加上你的RSSHub域名,https://rsshub.lichenghao.cn/weibo/search/hot 这个就是RSS地址。

那么这个地址规则从哪里来?RSSHub官网可以查询到,但是被墙了,所以我们借助一下官网给的谷浏览器插件:RSSHub-Radar ,下载安装到浏览器上。

在规则列表下,可以查询到支持的网站,里面的target就是上面的规则地址,再加上RSSHub域名就是订阅的RSS地址。

将上述的RSS地址添加到Miniflux中即可:

· 阅读需 1 分钟

https://coolshell.cn/ 关注网站好久了,弄Miniflux的时候突然发现皓哥的RSS不稳定了,五月初还更新了博文,最近怎么没有文章了,于是就去网站看了下,结果发现评论说"他走了!"。

然后就立马上网查了下,

MegaEase创始人、资深技术专家、骨灰级程序员陈皓(左耳朵耗子)于上周六突然心梗逝世。

结果是真的!他的最后一篇博客定格在5月8号。

引用其座右铭:

芝兰生于深谷,不以无人而不芳。 君子修身养德,不以穷困而改志。

左耳朵耗子,一路走好!R.I.P. !

· 阅读需 1 分钟

不知道现在还有人喜欢订阅RSS不,我个人比较喜欢,因为简洁!通常我在本地用 Fluent Reader ,但是多端同步是个问题。所以搭建个在线 RSS 服务,Fluent Reader 也可通过 api 来同步数据,这样就实现了多端同步。

搭建服务

使用的服务就是:Miniflux

官网:https://miniflux.app/

安装 Docker,Docker-Compose。

准备配置文件 docker-compose.yml

services:
miniflux:
image: miniflux/miniflux:latest
ports:
- "8901:8080"
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=postgres://miniflux:pwd@db/miniflux?sslmode=disable
- RUN_MIGRATIONS=1
- CREATE_ADMIN=1
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=test123
db:
image: postgres:14
environment:
- POSTGRES_USER=miniflux
- POSTGRES_PASSWORD=pwd
volumes:
- /opt/miniflux/db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "miniflux"]
interval: 10s
start_period: 30s

以下为自定义配置:

  1. 对外端口为 8091;
  2. 设置数据库的用户名密码 miniflux:pwd;
  3. 设置 miniflux 应用的账户 admin:test123;
  4. 数据库文件挂载地址:/opt/miniflux/db 。

启动服务

docker-compose up -d

查看 (设置中可以设置为中文)

在"源"选项中添加 RSS 源就可以订阅浏览了!

同步订阅源

然后在设置——>API秘钥,新建一个秘钥,在 Fluent Reader 服务中添加站点及秘钥,即可同步订阅源了!

(除此之外,还支持Fever API )

· 阅读需 1 分钟

黄瓜切条去籽,加入食盐抓拌均匀,腌制20分钟(至少),杀出水分。

清水洗净,攥干。

放入姜片蒜片小米辣香菜根小葱

放入生抽陈醋耗油白糖提鲜

准备花椒干辣椒蒜末熟芝麻,倒入热油 炸香

趁黄瓜不注意,浇在上面,搅拌均匀腌制。(放冰箱冷藏会更佳!)

· 阅读需 2 分钟

Mac 上的截图工具天花乱坠从免费到收费,功能层出不穷。作为白嫖党必然是选择免费的工具,比如我使用的免费截图工具 Snipaste首选项[免费版] 这个工具在window上使用体验不戳,在Mac上也能用。毕竟是免费的,能用就行了。

通常情况下免费的截图工具都没有滚动截图 以及复杂操作的功能!所以我找到了一个免费的并且有滚动截图的截图工具Shottr

Shottr (Shottr is a small, fast, human-sized screenshot app built for those who care about pixels. It was crafted with Swift, optimized for M1, and is distributed for free.),它不仅是一个单纯的截图工具,还支持滚动截长图、量像素、取色、OCR 等很多付费工具才提供的功能。没错,它是完全免费的!

我们先来看看 Shottr 支持的截图模式,它们分别是:

  • 全屏截图,或延时全屏截图(3 秒)
  • 区域截图,或重复上一区域截图
  • 窗口截图,支持活动窗口和任意窗口
  • 滚动截图,支持向下滚动及向上滚动

就这么说吧,这几种截图完全够用了!

如果你想深入了解如何使用,可以参考官网或者少数派的文章:

  1. https://shottr.cc/
  2. macOS 免费轻量级截图工具 Shottr —— 少数派 bakamio

· 阅读需 1 分钟

五天到假期怎么这么快!!!五一假期快要结束了,不过还有一群人5月4日还能放假,因为国家明确规定14周岁-28周岁,五四青年节放假半天。我就没有这个机会了!!!

总结这个小假期,不是在吃,就是在去吃的路上......

那么最后一天吃个云南菜,不戳!

最后去西站送朋友回家,五一的假期就这么结束了啦啦!

· 阅读需 1 分钟

假期第四天了,怎么也得出去转转了!

早上到南城香简单吃个早餐,因为他家有个3元的饮品不限量活动,包括牛奶啊,各种粥啥的,还挺合适。

简单休息下,就出发去天安门看人,放假期间地铁天安门东西站都不停,只能从王府井站下了,然后就是下面的场面:

经过长途跋涉,终于来到了天安门(限流:必须绕着走)。

虽然约不到故宫及周边的门票,但是的喝一瓶天安门的水,然后坐在端门前看人山人海。

看到下午,饿了去吃个山东菜。去不了山东淄博啥的,就在北京吃个山东菜。好快,假期余额不足啦!!!

· 阅读需 1 分钟

早起整个鸡蛋糕、粗粮馒头、八宝菜简单解决下三个人的早餐。

中午来电影院看《人生路不熟》,剧情就那样(该剧讲述的是一家四口意外开启的一段有笑有泪的卡车之旅),后期还算搞笑。

下午简单吃个小海鲜自助,狂炫小龙虾、各种虾、牛排。

· 阅读需 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!