Ubuntu下安裝snap包

我想在Ubuntu上用Mathpix Snipping Tool,官網上提示在Ubuntu中用以下命令安裝.

sudo snap install mathpix-snipping-tool

但是一直卡在如下命令.

Download snap "core" (6673) from channel "stable"

於是去這個第三方平臺下了mathpix-snipping-tool.snap文件,想直接安裝.snap文件.又報錯.

snap install mathpix-snipping-tool.snap

error: cannot find signatures with metadata for snap "mathpix-snipping-tool.snap"

這個論壇中,說是要

snap ack snipping-tool.assert

但是我在第三方平臺中只能下.snap包,沒有.assert文件.

If you don’t care about the assertion, you can run snap install --dangerous <the darktable snap you downloaded>, but then you won’t receive updates.

但是可以用 --dangerous參數.不管更新.

snap install --dangerous mathpix-snipping-tool.snap

半小時後,終於安裝好了(淚).
在這裏插入圖片描述

常用命令

  • snap changes 查看正在進行的change
  • sudo snap abort ID 殺死某個進程

效果

我一般在Ubuntu下寫代碼,所以想在Ubuntu下寫筆記,同時用公式來解釋代碼非常直觀.這是我在Ubuntu下安裝Mathpix Snipping Tool的初衷.下面的公式就是用 ctr+alt+M組合鍵得到的公式.
Ri=(cos(θi)sin(θi)sin(θi)cos(θi)) \mathbf{R}_{i}=\left( \begin{array}{cc}{\cos \left(\theta_{i}\right)} &amp; {-\sin \left(\theta_{i}\right)} \\ {\sin \left(\theta_{i}\right)} &amp; {\cos \left(\theta_{i}\right)}\end{array}\right)

Aij=eij(x)xi=(RijRiRijRiθi(tjti)01) \mathbf{A}_{i j}=\frac{\partial \mathbf{e}_{i j}(\mathbf{x})}{\partial \mathbf{x}_{i}}=\left( \begin{array}{cc}{-\mathbf{R}_{i j}^{\top} \mathbf{R}_{i}^{\top}} &amp; {\mathbf{R}_{i j}^{\top} \frac{\partial \mathbf{R}_{i}^{\top}}{\partial \theta_{i}}\left(\mathbf{t}_{j}-\mathbf{t}_{i}\right)} \\ {\mathbf{0}^{\top}} &amp; {-1}\end{array}\right)
對應代碼

Eigen::Matrix2d Rij_inv = (Zij.topLeftCorner(2,2)).transpose();
Eigen::Matrix2d Ri_inv = (Xi.topLeftCorner(2,2)).transpose();

Eigen::Matrix2d JR_theta;
JR_theta << -Xi(1,0), Xi(0,0),
-Xi(0,0), -Xi(1,0);

Ai.setZero();
Ai.topLeftCorner(2,2) = -Rij_inv * Ri_inv;
Ai.topRightCorner(2,1) = Rij_inv * JR_theta * (Xj.topRightCorner(2,1) - Xi.topRightCorner(2,1));
Ai(2,2) = -1;

Bi.setZero();
Bi.topLeftCorner(2,2) = Rij_inv * Ri_inv;
Bi(2,2) = 1; 

參考

  • snap教程https://itsfoss.com/use-snap-packages-ubuntu-16-04/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章