Merge pull request #56 from LCTT/master

reflash
This commit is contained in:
Tao Zhou 2023-02-21 11:13:52 +08:00 committed by GitHub
commit 787ad78424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 3379 additions and 1558 deletions

View File

@ -12,6 +12,8 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: ensure source branch is not "master"
run: '[ "${{ github.head_ref }}" != master ]'
- name: "checkout master branch & return to pull request branch"
run: CURRENT=$(echo ${{github.ref}} | sed "s|refs/|refs/remotes/|") && git checkout master && git checkout $CURRENT
- name: run check

View File

@ -0,0 +1,117 @@
[#]: subject: (Try quantum computing with this open source software development kit)
[#]: via: (https://opensource.com/article/21/6/qiskit)
[#]: author: (Gordon Haff https://opensource.com/users/ghaff)
[#]: collector: (lujun9972)
[#]: translator: (cool-summer-021)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-15552-1.html)
借助开源软件开发包尝试量子计算编程
======
> Qiskit 是一个开源 SDK借助它可以免费访问量子模拟器和硬件资源。
![][0]
经典计算机是基于二进制数的,二进制数有 0 和 1 两种形式。这并不是由于二进制逻辑系统比有更多基本状态的逻辑系统(甚至包括模拟计算机)有内在优势。而是,对电路元件的开关操作很容易实现,而且借助先进的半导体技术,可以制造出体积小且价格低廉的计算机。
但它们并非没有局限性。经典计算机求解某些问题的效率并不高,主要是那些时间或内存成本随着问题的规模($n$)呈指数级增长的问题。我们把这种问题称为 $O(2^n)$[大 O 表示法][2])。
大部分现代加密方法甚至依赖这一特性。把两个大素数相乘,耗费的成本低($O(n^2)$),但进行反向操作就非常耗时。所以只要使用的数字足够大,对它分解质因数就非常困难。
### 进入量子世界
量子计算的基础数学和力学知识不在本文的探讨范围内。然而,还是有一些基础知识需要预先说明。
量子计算机以 [量子比特][3] 代替了二进制比特 —— 量子比特是体现量子属性的可控计算单元。构成量子比特的通常是超导元件,或自然界中存在的量子实物(例如电子)。量子比特可以以“<ruby>叠加<rt>superposition</rt></ruby>”状态存在,叠加态是 0 和 1 以某种方式组合起来的复杂状态。你可能听说过,量子比特既为 1 又为 0这种说法并不准确。真实情况是如果进行测量量子比特的状态会坍缩为 0 或 1。在数学上量子比特未测量的状态可以看作 <ruby>[布洛赫球面][4]<rt>Bloch sphere</rt></ruby> 的几何表示上的一个点。
尽管对习惯使用经典计算机的任何人来说,叠加态是一个全新的概念,但一个量子比特本身并没有什么趣味性。量子计算的第二个概念是“<ruby>干涉<rt>interference</rt></ruby>”。真正的量子计算机本质上是统计性质的。量子算法对干涉图案进行编码,增加了可以测量编码方案的状态的概率。
叠加和干涉的概念虽然新颖,但在物理世界中也有对应的现象。而量子力学中的“<ruby>纠缠<rt>entanglement</rt></ruby>”却没有,但它是实现指数级量子加速的真正关键。借助量子纠缠,对一个微观粒子的测量可以影响后续对其他被纠缠的粒子的测量结果 —— 即使是那些物理上没有关联的粒子。
### 量子计算能做什么?
今天的量子计算机就其包含的量子比特的数量而言是相当小的,只有几十到几百个。因此,虽然人们不断开发新的算法,但比同级别经典计算机运行得快的硬件还未问世。
但是在很多领域,量子计算机能带来很大好处。例如,它能提供较好的方法来模拟自然界的量子系统,例如分子,其复杂程度超过了经典计算机的建模能力。量子计算也跟线性代数有关,它是机器学习和很多其他现代优化问题的基础。因此,我们有理由认为量子计算也可以很好地适用于此。
在量子算法相对于普通算法的优势方面,[Shor 算法][5] 是经常被提及的例子,它在较早时候就用于分解质因数。它由 MIT 的数学家 Peter Shor 于 1994 年发明,量子计算机目前还不能在较大的问题上运行该算法。但它已经被证明可以在 $O(n^3)$ 时间内完成工作,而不像经典算法那样需要指数级的时间。
### 从使用 Qiskit 开始
你可能在想:“我身边没有量子计算机,但我很想尝试一下。能做到吗?”
我们来了解一下名称为 [Qiskit][6] 的开源项目(采用 Apache 2.0 许可证。它是一个软件开发包SDK用于访问 IBM 量子实验室的量子计算模拟器和物理硬件(免费)。你只需要注册获得一个 API 密钥。
当然,如果要深入研究 Qiskit需要很多其他方面的知识线性代数只是其中一部分这些都远远超出了本文的范围。如果你需要深入学习网上有很多免费资源其中也不乏完整的教科书。然而体验一下也很简单只需要一些 Python 和 Jupyter notebook 的基础知识即可。
为了增加趣味性,我们全程使用 [Qiskit 教程][8] 的 “Hello, World!” 程序:
首先,安装教程的相关工具和部件:
```
pip install git+https://github.com/qiskit-community/qiskit-textbook.git#subdirectory=qiskit-textbook-src
```
下一步,进行软件包的导入:
```
from qiskit import QuantumCircuit, assemble, Aer
from math import pi, sqrt
from qiskit.visualization import plot_bloch_multivector, plot_histogram
```
`Aer` 是本地模拟器。Qiskit 包括四个组件:`Aer`、基础组件 `Terra`、用于实际的量子系统上的噪音和错误处理的 `Ignis`,以及用于算法开发的 `Aqua`
```
# Let's do an X-gate on a |0> qubit
qc = QuantumCircuit(1)
qc.x(0)
qc.draw()
```
虽然底层数学原理还涉及到矩阵乘法,量子计算机中 X 门也可以认为类似于经典计算机中的非门。(事实上,它经常被称为 "非门")。
现在,运行并测量它。结果跟你预期的一样,因为量子比特的初始状态是 `|0>`,接着反转,然后被测量。(使用 `|0>``|1>` 与经典计算机中的比特区分开来。)
```
# Let's see the result
svsim = Aer.get_backend('statevector_simulator')
qobj = assemble(qc)
state = svsim.run(qobj).result().get_statevector()
plot_bloch_multivector(state)
```
![Bloch sphere showing the expected result][9]
*布洛赫球体显示了预期的运行结果*
### 结论
在某些方面,你可以把量子计算看作用于经典计算机的一种独特的协处理器,跟 GPU 和 FPGA 一样。不同的是,在可预见的未来,量子计算机可以被用户像网络资源一样访问到。另一个差异是,它们的工作有本质的不同,所以不像很多其他你熟悉的加速器那样。因此,人们对算法开发如此感兴趣,并投入大量资源来研究量子在何时何地的性能最好。了解一下这些东西也无妨。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/qiskit
作者:[Gordon Haff][a]
选题:[lujun9972][b]
译者:[cool-summer-021](https://github.com/cool-summer-021)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ghaff
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
[2]: https://en.wikipedia.org/wiki/Big_O_notation
[3]: https://en.wikipedia.org/wiki/Qubit
[4]: https://en.wikipedia.org/wiki/Bloch_sphere
[5]: https://en.wikipedia.org/wiki/Shor%27s_algorithm
[6]: https://qiskit.org/
[7]: https://qiskit.org/learn
[8]: https://qiskit.org/textbook/preface.html
[9]: https://opensource.com/sites/default/files/uploads/bloch-sphere.png (Bloch sphere showing the expected result)
[10]: https://creativecommons.org/licenses/by-sa/4.0/
[0]: https://img.linux.net.cn/data/attachment/album/202302/18/173656shxb63jjx9z5jwxl.jpg

View File

@ -0,0 +1,94 @@
[#]: subject: "How we hired an open source developer"
[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer"
[#]: author: "Mike Bursell https://opensource.com/users/mikecamel"
[#]: collector: "lujun9972"
[#]: translator: "XiaotingHuang22"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15543-1.html"
我们是如何聘请开源开发人员的
======
> 我的团队不再采用标准的算法编程笔试,而是采用一套能够产出更多相关成果的流程。
![][0]
作为初创安全公司 [Profian][2] 的首席执行官和联合创始人,我参与了我们聘请开发人员从事 [Enarx][3] 的工作。Enarx 是一个处理机密信息计算的安全项目,几乎完全用 [Rust 语言][4] 编写少部分用汇编语言。Profian 现在已经在这次招聘找到了所有要找的人一些开发人员将在接下来的几周内开始工作。然而Enarx 绝对欢迎新的贡献者,如果事情继续顺利,公司将来肯定会雇用更多的人。
招聘人员并不容易,加上 Profian 还有一系列特别的要求,这让招人变得更加困难。因此我认为分享我们如何解决这个问题应该还蛮有意思的,而且也会对社区有帮助。
### 我们寻找什么样的人才?
以下就是我前文提到的特别要求:
* **系统编程**Profian 主要需要那些喜欢系统层编程的人。这一层面的编程已经处于栈的底层,有很多直接与硬件或操作系统的交互。例如,要创建客户端-服务器部分,我们必须编写相当多的协议、管理加密等等,而这方面的工具还不是很成熟(请参阅下面的 “Rust” 一节)。
* **Rust**:项目几乎都是用 Rust 语言编写的,那些不是的则是用汇编语言写的(目前只有 x86 平台尽管随着我们添加更多平台情况可能会有所改变。Rust 是一门很新、很酷同时也令人兴奋的编程语言,但它同时也很年轻,并且一些领域没有你想要的所有支持或者没有你希望的那么成熟 —— 这包括从密码学到多线程库到编译器/构建基本架构。
* **分散各地的团队**Profian 正在建立一个能够及时通讯联系的团队。Profian 在德国、芬兰、荷兰、北卡罗来纳州(美国)、马萨诸塞州(美国)、弗吉尼亚州(美国)和乔治亚州(美国)都有开发人员。我在英国,我们的社区经理在巴西,我们有来自印度和尼日利亚的实习生。从一开始我们就知道团队很难聚集在一个地方工作,因此我们需要能够通过视频、聊天和(最不济的情况下)电子邮件与人交流和协作的成员。
* **安全**Enarx 是一个安全项目。虽然我们并不是专门在寻找安全专家,但我们需要能够将安全放在首位去思考和工作,并设计和编写适用于安全环境的代码的人。
* **Git**:我们所有的代码都存储在 Git 中(主要是 [GitHub][5],还有一些存在 GitLab。我们围绕代码的大部分交互都是围绕 Git 进行的,因此任何加入我们团队的人都需要能自如使用它作为日常工作中的标准工具。
* **开源**:开源不仅仅是许可;更是一种心态,同时,这也是一种合作方式。大量开源软件是由不同地域的人创建的,他们甚至可能不认为彼此身处于一个团队。我们需要知道我们招的人不仅能在公司内部凝聚成一个紧密的团队,同时也能够与组织外部的人员协作,并接受 Profian 的“默认开放”文化,这里的开放不仅仅限于代码,还要有开放的讨论、沟通和文档。
### 我们是如何找到人才的?
正如我在其他地方提到的,[招聘很困难][6]。Profian 使用多种方式寻找候选人,它们取得了不同程度的成功:
* 领英招聘广告
* 领英搜索
* 特定语言的讨论板和招聘板例如Reddit
* 外部招募人员(特别致敬来自 [Interstem][7] 公司的 Gerald
* 口耳相传/个人推荐
虽然很难从质量方面判断这些来源如何,但如果没有外部招聘人员,我们肯定会在数量上苦苦挣扎(我们也有一些来自该途径的优秀候选人)。
### 我们如何筛选出想要的人才?
我们需要按照上述的所有要求衡量所有候选人,但并非所有要求都是同等重要的。例如,虽然我们热衷于雇用 Rust 程序员,但那些在系统级别具有强大 C/C++ 技能的人也能成为团队里有用的一份子,因为他们能够很快掌握 Rust 语言。另一方面,熟悉使用 Git 是至关重要的,因为我们无法花时间去培养新团队成员,让他们跟上我们的工作方式。
你可能会觉得很惊讶,但强大的开源背景并不是必需的要求,在类似模式中工作的心态是必需的,而任何有开源参与历史的人都可能对 Git 有很好的了解。同理,在一个分散各地的团队中工作的能力这一条件上,我们认为有过任意开源社区的参与经历都会是个积极的指标,因为有如此多的开源项目都是由分散各地的人们完成的。至于安全这一条件,我们则一致决定这只是一个“锦上添花”的条件。
我们想让这个过程简单快捷。 Profian 没有设置专门的人力资源部门或人力职能,因为我们正忙于编写代码。以下是我们最终使用的招聘流程(实际流程中可能略有不同),我们试图在 1-2 周内完成招聘:
1. 初审:个人履历/简历/GitHub/GitLab/领英主页,决定是否面试
2. 我作为 CEO 和候选人进行一场 30-40 分钟的讨论,了解他们是否适合我们团队的文化,同时让他们有机会了解我们,并了解他们是否真的像在初审提交的材料中所说的那样精通技术
3. 由 Nathaniel 领导的有关技术方面的深入讨论,通常我也在场
4. 与团队其他成员谈话
5. 编码笔试
6. 快速决策(通常在 24 小时内)
编码笔试很关键,但我们决定不采用通常的方法。我们的观点是,许多科技公司钟爱的纯“算法编码”笔试对我们想要的几乎毫无用处:考察候选人是否可以快速理解一段代码,解决一些问题,并与团队合作完成以上的工作。我们创建了一个 GitHub 存储库,其中包含一些几乎可以正常运行的 Rust 代码(事实上,我们最终使用了两个,其中一个用于技术栈上层的人),然后让候选人修复它,在上面执行一些与 Git 相关的过程,并稍作改进,在此过程中添加测试。
测试中一个必不可少的部分是让候选人通过我们的聊天室与团队互动。我们安排了 15 分钟的视频通话时间用于设置和初始问题,两个小时用于做笔试(“开卷”——以及与团队交谈,鼓励候选人使用互联网上所有可用的资源),然后是 30 分钟的总结会议,在这个会议上团队可以提出问题,候选人可以思考任务。这个谈话,结合笔试期间的聊天互动,让我们了解了候选人与团队沟通的能力。候选人挂断电话之后我们通常会在 5-10 分钟内决定是否要雇用他们。
这种方法通常效果很好。一些候选人在任务上遇到困难,一些人沟通不畅,一些人在 Git 交互方面做得不好 —— 这些是我们没有雇佣的人。这并不意味着他们不是优秀的程序员或者以后不适合该项目或公司,但他们不符合我们现在需要的标准。在我们聘用的开发人员中,他们的 Rust 经验水平和与团队互动的需求各不相同,但 Git 专业知识水平以及他们在和我们讨论之后的反应始终足以让我们决定接受他们。
### 感想
总的来说,我不认为我们会对筛选过程进行大的改动 —— 尽管我很确定我们可以在搜寻过程环节做得更好。通过编码笔试,我们可以筛选掉相当多的候选人,而且很好地帮了我们挑选合适的人。希望通过了这次选拔的每个人都很适合这个项目并且产出出色的代码(以及测试和文档等等)。时间会证明一切!
* * *
本文最初发布于 [Alice、Eve 和 Bob 安全博客][8] 上,经许可后重新发布。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/how-we-hired-open-source-developer
作者:[Mike Bursell][a]
选题:[lujun9972][b]
译者:[XiaotingHuang22](https://github.com/XiaotingHuang22)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mikecamel
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team)
[2]: https://profian.com/
[3]: https://enarx.dev/
[4]: https://opensource.com/article/21/3/rust-programmer
[5]: https://github.com/enarx/
[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/
[7]: https://www.interstem.co.uk/
[8]: https://aliceevebob.com/
[0]: https://img.linux.net.cn/data/attachment/album/202302/16/074428qxbm44dxh00x42z7.jpg

View File

@ -0,0 +1,70 @@
[#]: subject: "Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store"
[#]: via: "https://news.itsfoss.com/kde-connect-ios/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "XiaotingHuang22"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15559-1.html"
KDE Connect 登陆苹果应用商店,轻松将你的 iPhone 与 Linux 连接起来
======
> 这是一个令人印象深刻的开源客户端,能帮你将手机与电脑连接起来,现在可用于 iPhone 和 iPad。快来试试看
![kde connect][1]
KDE Connect 是一种开源工具,可让你将手机与电脑连接起来。
最初KDE Connect 支持安卓设备与 Linux 连接。渐渐地,他们增加了对 Windows 的支持。
现在,看起来你可以使用 KDE Connect 让你的 iOS 设备iPhone 或 iPad连接到你的 Windows/Linux 计算机。
需要注意的是 macOS 也在支持的平台列表中。但是,它仍然是早期发布版本。因此它可能不如在其他平台上那么好用。
### 苹果应用商店上的 KDE Connect
![][2]
我们没有注意到任何官方公告。然而,一些用户发现 KDE Connect 在 [版本 0.2.1][4] 发布后,就出现在了 [苹果应用商店][3] 上供 iOS 用户使用。
苹果应用商店上列出了所有基本功能,包括:
* 共享剪贴板:在设备之间复制/粘贴。
* 能够从任何应用程序将文件和 URL 共享到你的计算机。
* 将手机屏幕用作计算机的触摸板(可视触摸板)。
* 远程演示模式。
* 通过手机在计算机上运行命令
* 端到端 TLS 加密以确保安全。
虽然 KDE Connect 依然是一个开源应用程序,但为符合苹果应用商店的要求,该应用程序的许可与 [OMGUbuntu][5] 所发现的有所不同。
同时值得注意的是,这里列出的功能可能与安卓版本不同,但至少我们终于为 iOS 用户提供了 KDE Connect使其成为连接手机和计算机的真正开源跨平台解决方案。
我可以放心将 KDE Connect 推荐给任何想通过手机来对电脑进行操作的人。
点击下方的按钮即可前往应用程序商店开始安装。你还可以在其 [官方下载页面][6] 上找到针对不同支持平台的各种其他安装选项。
> **[KDE ConnectiOS][3]**
你试过 iOS 上的 KDE Connect 了吗?在评论区中让我知道你的想法。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/kde-connect-ios/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[XiaotingHuang22](https://github.com/XiaotingHuang22)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w1304/wordpress/2022/05/kde-connect-on-iphone-ipad.jpg
[2]: https://news.itsfoss.com/content/images/size/w1304/wordpress/2022/05/kde-connect-ios.jpg
[3]: https://apps.apple.com/id/app/kde-connect/id1580245991
[4]: https://invent.kde.org/network/kdeconnect-ios/-/commit/43d2ecbbb7e4e70274849f5ec987721318eb9f57
[5]: https://www.omgubuntu.co.uk/2022/05/kde-connect-iphone-app-available
[6]: https://kdeconnect.kde.org/download.html

View File

@ -0,0 +1,137 @@
[#]: subject: "“Its time to contribute to open source”"
[#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/"
[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/"
[#]: collector: "lkxed"
[#]: translator: "XiaotingHuang22"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15555-1.html"
“是时候为开源做贡献了”
======
![][0]
Nilesh Vaghela 是 AWS 的<ruby>社区英雄<rt>community hero</rt></ruby>,也是一家云计算开源公司 ElectroMech Corporation 的创始人。据 Nilesh 说,为开源做出贡献本身就是一种有意义的事。但是它需要人们的投入和奉献,而这个过程涉及许多步骤,从选择项目到确保你的贡献成果获得关注。在与 OSFY的 Abbinaya Kuzhanthaivel 的对话中,他分享了一些关于开发人员如何帮助提高印度对开源的贡献的技巧。
![Nilesh Vaghela, AWS 的社区英雄以及 ElectroMech 公司的创始人][1]
### 问:你能告诉我们一下你目前的角色和对开源的贡献吗?
**答:** 我目前是一名从事自动化工作的架构师。我领导着多个团队,并且同时主要在开源安全服务平台 Invinsense 上作出贡献。我在 1998 年初创建了开源小组,当时已经有大约 1500 名成员。我现在管理的一个小组 (https://groups.google.com/g/vglug) 自 2014-15 年以来一直非常活跃。
### 问:你是如何开始在开源项目中工作的?
**答:** 我是一名有着从业资格的机械工程师,当时我在我的公司 ElectroMech Corporation 负责调制解调器和 UPS 系统。我慢慢地被拖入负责 PC、网络和 Linux 等等。1996 年,我在核科学中心看到超过 150 台计算机服务器在 Linux 上运行时广受启发,之后便开始尝试。自此我将我的公司完全转变为专注于培训和支持的开源公司。
我可以自豪地说,我是最早一批使用开源的人 —— 帮助客户了解什么是开源、它有什么好处、什么是免费的、安全或代码问题等等。我们在 Vadodara 得到了至少四五个客户,并且最终通过黄页上的广告宣传自己。我们与 Red Hat 合作并且关系一直持续到现在。
### 问:自那以来你认为开源发展如何?
**答:** 我可以说早些时候开源是一种令人着迷的强烈爱好吸引人们参与其中。当一些来自西伯利亚的贡献者致力于改善水资源短缺问题时世界各地的用户都说他们的产品有多么简单易用这给我留下了特别深刻的印象。它更像是一项企业社会责任CSR活动。人们和专家创建一个委员会来管理和推进项目。人们会因为对技术的热爱而加入进来没有任何期望。
那时我并不相信开源可以商业化,但它是当今大多数创新和技术的驱动力,而且越来越多的企业正在采用它。我们期待在贡献和使用开源方面取得很好的平衡,因为我们有个人、社区和大公司参与进来。这才是开源真正的未来和力量。
### 问:你可以分享一些自己遇到的困难吗?
**答:** 最初我是单枪匹马干,但一旦人们知道我的意图是好的,他们就会加入我。我在没有任何期望的情况下创建了很多社区,但确实在声誉或名望方面间接地获得了回报;有人理解我是技术达人,并长期给我项目。在早期,人们刚开始加入社区并且不需要付出很多精力就可以做出贡献。因为我的目标不是做生意,因此可以说我没有真正面临什么障碍。
### 问:作为社区领袖,你的领导格言和经验教训是什么?
**答:** 首先,如果你想建立一个社区,那就保持中立,不要抱有偏见。虽然看起来好像是你作为领导者正在管理一个社区,但请记住,加入社区的人都是平等地做出贡献的。永远不要让成员失去动力。在发表评论和回答问题时要有礼貌。不管是什么问题,如果你不想回答,那就选择沉默。但别让人们停止提问,而是帮助他们建立专业知识。
第二,不要让社区掺杂商业。不要让社区的目标和你个人企业的目标产生混淆和互相匹配。将它们严格区分开来。
始终尝试鼓励人们参与,而不是作为专家提供指导。如果你发现人们有兴趣领导项目并采取主动,请给出舞台让他们发挥。邀请他们参与社区活动。这将帮助你培养更多的社区领袖。此外,让你的社区保持简单,不要在初始阶段让赞助商参与进来。
### 问:你从谁那里得到了灵感?
**答:** 开源运动之父 Richard Stallman 是我的灵感来源,我一直很钦佩他的项目。
除了他之外,我还有一个有趣的事要分享,它激励着我从事开源工作。在我开始从事开源工作的时候,核科学中心的大部分软件都是基于 Windows 操作系统的。然而,许多科学家希望使用基于 Linux 的软件。在两三个月内,他们实际上创建了 Linux 驱动程序。这就是让我着迷的地方——用户可以创建这些驱动程序,这在专有软件中是不太可能发生的。我真的很喜欢开源赋权用户这一点。
### 问:你对印度开源格局以及改进空间有什么看法?
**答:** 印度是使用开源的人最多的国家LCTT 校注:或应加上“之一”),我们正致力于成为贡献者。有这么多开发者,印度却仍然没有软件巨头。我们拥有的主要是服务提供者,而不是创新者。更多的人应该成为开源的贡献者,去开发具有国际标签的东西。
为开源做贡献的想法应该从学校和大学抓起。幸运的是,古吉拉特邦政府已经在 8 年级到 10 年级里推出基于 Linux 的课程。教育年轻一代并让他们了解开源模型很重要。
其次,我们要培养好的导师。当人们开始贡献时,找到一位在这个项目中工作的开源导师很重要。导师给出了一个小任务,尝试代码然后提交。如果一切顺利,成员的贡献会逐渐增加。不幸的是,在印度导师很少。我们需要有很多导师,或者可以与世界各地的导师建立联系。
第三是要鼓励那些踊跃贡献的人。让人们发现,一旦你成为了一位广受认可的开发人员或为开源开发做出贡献的人,你在职业发展和业务上也会有所突破。
通过遵循这些简单的方法,印度可以成为开源的主要贡献者。
### 问:你如何看待为开源做出贡献时编程方面的要求?
**答:** 根据我的经验,如果你知道计算机内部的知识,如何开发应用程序,你应该维护什么样的代码标准,以及如何管理团队和其他最佳做法,你可能不必担心编程专业知识。
在设计、安全维护和整合方面还有其他角色可以担任。看看你合适什么。通过做你喜欢的事情来不断提升加强自己的技能。如果你仍然对编码感兴趣,那么你就在其他开发人员的支持下去学习。
### 问:你如何确定一个你想参与的项目?
**答:** 你需要了解你最感兴趣的几个领域,然后对围绕这些领域发生的项目进行研究。你需要弄清楚哪些领域有招募更多志愿者的需求或职位空缺。 你可以从小处着手练习,然后积累专业知识。
避免随大流;重要的是你的个人兴趣。例如,因为现在 DevOps开发运维一体化的需求量很大你便可能更倾向于选择 DevOps 项目。不要犯这个错误。
你可以在云原生基金会([CNCF][2]、Apache、Fedora、Red Hat 等平台上找到开源项目。通过这种方式,你还可以找到已经在从事项目并可以给出适当指导的导师。
### 问:每个项目有自己的目的和目标受众,有时它们甚至与开源目标不一致。那么,在开始做出贡献之前要核实什么?
**答:** 我同意,当有人开始一个开源项目但随后又将其商业化时,你会感到为开源作出贡献也变得颇有难度。但这样的风险总是会有的,不应让你对此感到挫败。
首先试着去了解该小组 —— 小组中的贡献者有多受欢迎,他们贡献了多长时间,以及他们的声誉如何。一旦你加入,观察每一个人和每一件事是关键。尝试至少学习三到六个月,并了解一切是如何运作的。如果你发现他们的意图不对,你可以随时离开这个项目。但如果你觉得没问题,那就继续做贡献吧。
![ElectroMech 公司的团队][3]
你可以看看他们是否有某些许可证,例如 GPLv3。你还可以查看未修改的许可证版本例如 Apache 开源许可证。
### 问:你觉得大公司会接受应届生投稿吗?
**答:** 是的,当然。公司也喜欢指导新人。他们通常不允许你直接贡献,但可能先会给你一个小任务。导师会首先尝试了解你拥有什么技能以及你的能力如何。一旦他们认可你具备所需的技能,他们将继续指导你或根据你的技能将你分配给其他导师。初始阶段非常关键。很多公司都会做一些筛选,只有在你证明了自己的能力之后,你才会被允许做出贡献。
### 问:贡献者在接手项目时必须克服的最初挑战是什么?
**答:** 首先,你应该非常认真地对待你的贡献。没有书面承诺,贡献者可能倾向于对工作掉以轻心。这种想法是完全错误的。尝试每天投入 8-10 小时或任何可行的时间。如果你因为觉得没有立竿见影的回报而不愿投入其中,那么你就不是一个好的贡献者。
在最初阶段始终严格遵守导师的指导。这对于健康的贡献非常重要。有时你可能会认为自己擅长某事,而你的导师可能不会根据该技能给你分配项目。在这种情况下只需找你的导师,问他你应该做什么,你的角色是什么,以及你可以如何贡献。
### 问:许多开发人员在提交项目贡献后没有得到回复。如何让自己提交的东西被人注意到呢?
**答:** 写一篇关于你计划作出贡献的项目的小博客,包括你喜欢的方面,你不喜欢的地方,以及可以改进的地方。这种积极的推广方式可以帮到你很多。
成为小组的一员并参与与该项目相关的活动。作为贡献的替代,首先尝试参与到团队中去,这将增加你被采纳为贡献者的机会。
一旦你对项目有了更好的了解,你的工作不仅会被接受,而且你将能够更好地适应该项目。
### 问:你如何克服你的贡献不被接受的情况?
**答:** 就是理解发生这种情况的原因有很多 —— 也许你没有在合适的项目中,或者你没有做出正确的贡献。如果项目是国家驱动的,你的请求可能不会被接受。因此,如前所述,请记得列个清单。如果你的贡献没有被接受,请不要担心,因为要么你不适合该项目,要么该项目不适合你。
我会建议尝试找四到五个项目,并且至少有一个项目会接受你所做的工作。
### 问:你对我们的读者有何想说的?
**答:** 开源是当今大多数创新背后的驱动力。让我们根据自己的能力和技能试着做出贡献,而不是仅仅使用开源。贡献可以是代码、文档、测试、博客、金钱等。是时候做出贡献了。
### 问ElectroMech 公司有招人的计划吗?
**答:** 我们在云计算 DevOps开发运维一体化方面有需求正在招聘云架构师、Python 开发人员、Linux 架构师和安全专业人员。
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/
作者:[Abbinaya Kuzhanthaivel][a]
选题:[lkxed][b]
译者:[XiaotingHuang22](https://github.com/XiaotingHuang22)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/abbinaya-swath/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nilesh-Vaghela-AWS-community-hero-and-founder-ElectroMech-Corporation.jpg
[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwib2vvv3dv3AhVa7XMBHfZSCsIQFnoECAgQAQ&url=https%3A%2F%2Fwww.cncf.io%2F&usg=AOvVaw2LnRyH4SZPDHntRLJU_b3q
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/The-team-at-ElectroMech-Corporation.jpg
[0]: https://img.linux.net.cn/data/attachment/album/202302/19/141128wxkesmzesuboso6w.jpg

View File

@ -3,23 +3,26 @@
[#]: author: "Gopala Krishna Behara https://www.opensourceforu.com/author/gopalakrishna-behara/"
[#]: collector: "lkxed"
[#]: translator: "onionstalgia"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15548-1.html"
为什么企业应该选择平台即服务PaaS
======
*<ruby>平台即服务<rt>PaaS</rt></ruby> "能够快速、轻松地创建网络应用,而无需购买和维护其下的软件和基础设施。本文解释了它为什么有用。*
平台即服务(以下简称 PaaS是一种“免去了建立和维护基础设施的复杂工作为客户提供开发、运行和管理应用程序的平台”的云计算服务。这是云原生应用和支持系统所依托的核心平台。
![][0]
> 平台即服务能够快速、轻松地创建网络应用,而无需购买和维护其下的软件和基础设施。本文解释了它为什么有用。
<ruby>平台即服务<rt>PaaS</rt></ruby>(以下简称 PaaS指的是云计算服务它为客户提供了开发、运行和管理应用程序的平台而免去了建立和维护与开发和启动应用程序相关的基础设施的复杂工作。这是云原生应用和支持系统所依托的核心平台。
PaaS 通常包括不同的应用基础功能,包括应用平台、集成平台、业务分析平台、事件流服务和移动后端服务。此外,它还包括一套与监控、管理、部署相关的功能。
开发人员希望他们的开发环境不需要等待而运营团队则更关心性能和稳定性。这经常引起两方间的冲突。PaaS 为这两方创造了和平的环境。作为服务交付的应用平台,即 PaaS被用于部署用户代码。Cloud Foundry、Cloudify 和 OpenShift 这些开源环境都可用作 PaaS。
开发人员希望他们的开发环境不需要等待而运营团队则更关心性能和稳定性。这经常引起两方间的冲突。PaaS 为这两方创造了和平的环境。一个作为服务交付的应用平台被称作 PaaS被用于部署用户代码。Cloud Foundry、Cloudify 和 OpenShift 这些开源环境都可用作 PaaS。
### PaaS 的采用模式
云计算必须满足五个基本特征——按需服务、接入网络、资源池化、弹性和可度量的服务。为此云计算提供了三种服务模式软件即服务SaaS、平台即服务PaaS、基础设施即服务IaaS
云计算必须满足五个基本特征按需服务、接入网络、资源池化、弹性和可度量的服务。为此,云计算提供了三种服务模式:<ruby>软件即服务<rt>Software as a Service</rt></ruby>SaaS<ruby>平台即服务<rt>Platform as a Service</rt></ruby>PaaS<ruby>基础设施即服务<rt>Infrastructure as a Service</rt></ruby>IaaS
业务选用 PaaS 的关键驱动力:
@ -27,25 +30,25 @@ PaaS 通常包括不同的应用基础功能,包括应用平台、集成平台
* 通过减少应用程序的交付时间和提高开发和交付质量,最大限度地降低 IT 成本
* 增加中间件之间的灵活性和集成度
**简单 PaaS** 是踏入 PaaS 领域的入门。它可以提供应用程序服务,并将它们暴露在自助服务的目录中,自动部署和计量服务使用的资源。
*简单 PaaS*:踏入 PaaS 领域的入口。它可以提供应用程序服务,并将它们暴露在自助服务的目录中;自动部署和计量服务使用的资源。
*管理 PaaS* 管理已配置应用程序的<ruby>服务级别协议<rt>SLA</rt></ruby><ruby>服务质量<rt>QoS</rt></ruby>,例如弹性、应用程序性能、安全性等。
*管理 PaaS*管理已配置应用程序的<ruby>服务级别协议<rt>SLA</rt></ruby><ruby>服务质量<rt>QoS</rt></ruby>,例如弹性、应用程序性能、安全性等。
*编程 PaaS* 允许应用程序与外部应用程序或公共云集成,并实现自动扩展和云爆发场景。
*编程 PaaS*允许应用程序与外部应用程序或公共云集成,并实现自动扩展和云爆发场景。
*<ruby>面向流程<rt>Process-oriented</rt></ruby> PaaS* 允许通过创建持续交付流程来实现<ruby>开发运维<rt>DevOps</rt></ruby>流程,该流程可以自动构建、测试应用程序并将其交付到云环境中。
*面向流程 PaaS*允许通过创建持续交付流程来实现<ruby>开发运维<rt>DevOps</rt></ruby>流程,该流程可以自动构建、测试应用程序并将其交付到云环境中。
除了这些采用模式之外,还有其他的 PaaS 变体如下,这些变化可能与上文的模式有一定重合
除了这些采用模式之外,还有其他的 PaaS 变体如下,这些变化可能与上文的模式有一定重合
**<ruby>集成平台即服务<rt>iPaaS</rt></ruby>**是一套能够开发、执行和管理集成流的云服务。集成流可以是个人内部或跨多个组织连接的,可以包含任何企业内部或基于云的流程、服务、应用和数据。这些组合变化可能也符合上述的模式之一,例如 MuleSoft CloudHub 和 BizTalk。
*集成平台即服务iPaaS*一套能够开发、执行和管理集成流的云服务。集成流可以是个人内部或跨多个组织连接的,可以包含任何企业内部或基于云的流程、服务、应用和数据。这些组合变化可能也符合上述的模式之一,例如 MuleSoft CloudHub 和 BizTalk。
**<ruby>移动平台即服务<rt>mPaaS</rt></ruby>**是为开发移动应用提供的<ruby>集成开发环境<rt>IDE</rt></ruby>,并且支持多种移动平台。
*移动平台即服务mPaaS*为开发移动应用提供的集成开发环境IDE,并且支持多种移动平台。
**<ruby>数据库平台即服务<rt>dbPaas</rt></ruby>**是一种按需的、安全且可扩展的自助式数据库平台可自动配置和管理数据库。dbPaaS 使扩展数据库变得更加容易,并使它们更加可靠。
*数据库平台即服务dbPaas*一种按需的、安全且可扩展的自助式数据库平台可自动配置和管理数据库。dbPaaS 使扩展数据库变得更加容易,并使它们更加可靠。
**<ruby>物联网平台即服务<rt>IoTPaaS</rt></ruby>**提供了实现异构物联网拓扑所需的通信、安全、分析和管理的通用基础架构。它为构建物联网解决方案提供了更简单、更敏捷的模型。
*物联网平台即服务IoTPaaS*提供了实现异构物联网拓扑所需的通信、安全、分析和管理的通用基础架构。它为构建物联网解决方案提供了更简单、更敏捷的模型。
**<ruby>业务流程管理平台即服务<rt>bpmPaaS</rt></ruby>**是一个完整的预集成业务流程管理平台,托管在云端并作为服务交付。它被用于开发和执行整个企业的业务流程和以工作流程为中心的应用程序。例如 Pega cloud 和 OpenText Cordys cloud。
*业务流程管理平台即服务bpmPaaS*一个完整的预集成业务流程管理平台,托管在云端并作为服务交付。它被用于开发和执行整个企业的业务流程和以工作流程为中心的应用程序。例如 Pega cloud 和 OpenText Cordys cloud。
PaaS 的一些基本特征:
@ -65,19 +68,19 @@ PaaS 的一些基本特征:
* 应用堆栈的选择
* 语言、数据库和框架支持
* 规模的可扩展性
* <ruby>服务质量<rt>QoS</rt></ruby>
* 服务质量QoS
* 开发和运营的工具
* 它有多适合你的业务
现在让我们快速浏览下流行的开源 PaaS。
**Cloud Foundry**提供了多种云的选择、开发者框架和应用服务。Cloud Foundry 使构建、测试、部署和扩展应用程序变得更快、更容易。
*Cloud Foundry*提供了多种云的选择、开发者框架和应用服务。Cloud Foundry 使构建、测试、部署和扩展应用程序变得更快、更容易。
它有不同的发行版本,其中比较流行的是 Pivotal 和 IBM。它包含应用<ruby>运行时<rt>runtime</rt></ruby>和容器运行时。在 Pivotal 上包含有应用服务和容器服务。
**OpenShift**红帽的云计算 PaaS 产品。这是一个云端的应用平台,应用开发者和团队可以在这里构建、测试、部署和运行他们的应用程序。
*OpenShift*红帽的云计算 PaaS 产品。这是一个云端的应用平台,应用开发者和团队可以在这里构建、测试、部署和运行他们的应用程序。
**Cloudify** 在开放的原则下开发和设计,用以推动 IT 转型革命。它使组织能够在其上设计、建立和提供各种商业应用和网络服务。Cloudify 的最新版本为 4.3,它包含了先进的安全、控制和<ruby>真自服务<rt>true self-service</rt></ruby>等增强功能。Cloudify 4.3 还为 Kubernetes 容器编排引入了全新的概念。
*Cloudify*在开放的原则下开发和设计,用以推动 IT 转型革命。它使组织能够在其上设计、建立和提供各种商业应用和网络服务。Cloudify 的最新版本为 4.3,它包含了先进的安全、控制和<ruby>真自服务<rt>true self-service</rt></ruby>等增强功能。Cloudify 4.3 还为 Kubernetes 容器编排引入了全新的概念。
| 功能 | Cloud Foundry | Cloudify | OpenShift |
| :- | :- | :- | :- |
@ -117,9 +120,11 @@ via: https://www.opensourceforu.com/2022/09/why-enterprises-should-opt-for-platf
作者:[Gopala Krishna Behara][a]
选题:[lkxed][b]
译者:[onionstalgia](https://github.com/onionstalgia)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/gopalakrishna-behara/
[b]: https://github.com/lkxed
[0]: https://img.linux.net.cn/data/attachment/album/202302/17/094352atasztuxqg4t1ctt.jpg

View File

@ -0,0 +1,104 @@
[#]: subject: "How to Install MATE Desktop in Arch Linux [Complete Guide]"
[#]: via: "https://www.debugpoint.com/mate-desktop-arch-linux-install/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "Chao-zhi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15561-1.html"
如何在 Arch Linux 中安装 MATE 桌面
======
![][0]
> 本指南将详细解释你在 Arch Linux 中安装 MATE 桌面所需的步骤。
本指南分为两部分。第一部分讨论安装基础 Arch 系统。第二部分是在 Arch Linux 上安装完整的 MATE 桌面环境。
本文在以下版本中进行了测试MATE 1.24 和 MATE 1.26。
### 什么是 MATE 桌面?
当 GNOME 桌面从 GNOME 2 改变方向到 GNOME 3 时改变了用户交互和界面MATE 桌面仍然延续了“较旧的”或者说“传统的” GNOME 2 的开发方向。因此MATE 桌面环境保留了 Linux 中的传统桌面体验。它速度快内存消耗低。在我看来MATE 桌面环境是一个被低估的桌面环境,需要更多的关注!
MATE 团队一直在继续开发,它是一个基于 GNOME 2 的流行桌面之一,但同时支持更新的技术。你可以在其 [官方网站][1] 上了解更多信息。
### 在 Arch Linux 中安装 MATE 桌面
#### 第一部分: 安装 Arch Linux
如果你已经安装了 Arch Linux则可以跳过此步骤直接转到下面的 MATE 桌面安装部分。
要快速安装 Arch Linux请按照这个自动化的 [archinstall 指南][2] 进行操作,该指南非常容易上手。安装完成后,继续至第二部分。
#### 第二部分:在 Arch Linux 中安装 MATE 桌面
重新启动后,从 GRUB 中选择 Arch Linux。在 Arch Linux 提示符下,按顺序运行以下命令。这些命令将安装 Xorg 服务器、显示管理器、MATE 桌面组件、控制器包以及其他应用程序。
对于所有命令,请使用默认值,即在询问时按 Enter 键。
安装 Xorg。安装大小大约为 80 MB。
```
sudo pacman -S --needed xorg
```
安装显示管理器和 MATE 桌面组件。安装大小大约为 380 MB。
```
sudo pacman -S --needed mate mate-extra ttf-freefont lightdm lightdm-gtk-greeter
```
> LCTT 译注:在 Arch Linux 中,很多时候 lightdm 显示管理器需要额外的配置才能正常启用。可以参考:[LightDM - ArchWiki][5]。除此之外,可以安装 lightdm-gtk-greeter-settings 来对 lightdm-gtk-greeter 进行配置。
![安装 MATE 包][3]
安装应用软件:
这只是一个参考。你也可以安装你所需要的内容。
```
sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper
```
现在是时候以服务的方式启用显示管理器和网络管理器了。这样,下次登录时,它们就可以通过 systemd 自动运行了。
```
systemctl enable lightdm
systemctl enable NetworkManager
```
使用重启命令重启系统:
```
reboot
```
如果一切顺利,你应该在 MATE 桌面上看到登录提示。
现在你可以使用刚刚创建的用户 ID 和密码登录。一个超快速和传统的 MATE 桌面将欢迎你的到来。
![Arch Linux 中的 MATE 桌面][4]
我希望本指南能帮助你从头开始创建自己的 Arch Linux 环境,并使用传统的 MATE 桌面。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/mate-desktop-arch-linux-install/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://mate-desktop.org/
[2]: https://www.debugpoint.com/archinstall-guide/
[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/Installing-MATE-Packages.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2021/08/MATE-Desktop-in-Arch-Linux-1.jpg
[5]: https://wiki.archlinux.org/title/LightDM
[0]: https://img.linux.net.cn/data/attachment/album/202302/21/104424o8p78qj8gp5hqghj.jpg

View File

@ -3,34 +3,36 @@
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "Chao-zhi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15544-1.html"
如何使用 journalctl 查看和分析 Systemd 日志 [附实例] 。
如何使用 journalctl 查看和分析 systemd 日志(附实例)
======
**本指南介绍了 [Systemd][1] 的 journalctl 工具及其各种命令的基础知识。你可以使用这些命令对 Linux 中的桌面和服务器日志进行故障诊断。以下是如何使用 journalctl 查看和分析 Systemd 日志的不同例子。**
![][0]
> 本指南介绍了 [systemd][1] 的 journalctl 工具及其各种命令的基础知识。你可以使用这些命令对 Linux 中的桌面和服务器日志进行故障诊断。以下是如何使用 journalctl 查看和分析 systemd 日志的不同例子。
### 简介
很多人说 Systemd 不好,它对系统的影响很大,这也是一个有争议的话题。但你不能否认的是,它提供了一套完善的工具来管理和排除系统故障。想象一下,当你遇到一个没有 GUI 的坏系统时,你可能会把启动和 GRUB 弄得一团糟。在这种情况下,你可以从一个 live 系统启动,挂上你的 Linux 分区,然后浏览 Systemd 的日志,找出问题所在。
很多人说 systemd 不好,它对系统的影响很大,这也是一个有争议的话题。但你不能否认的是,它提供了一套完善的工具来管理和排除系统故障。想象一下,当你遇到一个没有 GUI 的坏系统时,你可能会把启动和 GRUB 弄得一团糟。在这种情况下,你可以从一个<ruby>立付<rt>Live</rt></ruby>系统启动,挂上你的 Linux 分区,然后浏览 systemd 的日志,找出问题所在。
Systemd有三个基本组件,如下所示:
systemd 有三个基本组件,如下所示:
- **systemd**Linux 操作系统的系统和服务管理器。
- **systemctl**。命令,用于反观和控制 systemd 系统和服务管理器的状态。
- **systemd-analyze**提供系统启动时的性能统计,并从系统和服务管理器中检索其他状态和跟踪信息。
- `systemd`Linux 操作系统的系统和服务管理器。
- `systemctl` :该命令用于反观和控制 systemd 系统和服务管理器的状态。
- `systemd-analyze`:该命令提供系统启动时的性能统计,并从系统和服务管理器中检索其他状态和跟踪信息。
除了这三个服务外systemd 还提供其他服务,如 journald、logind、networkd 等。在本指南中,我们将讨论 systemd 的 journald 服务。
### journald - systemd日志服务
### journald - systemd 日志服务
根据设计systemd 提供了一个集中的方式来处理所有来自进程、应用程序等的操作系统日志。所有这些日志事件都由 systemd 的 journald 守护进程来处理。journald 守护进程收集所有来自 Linux 操作系统各处的日志,并将其作为二进制数据存储在文件中。
集中记录事件、系统问题作为二进制数据的好处有很多。例如,由于系统日志是以二进制而不是文本形式存储的--你可以以多种方式进行翻译如文本、JSON对象,以满足各种需求。另外,由于日志是按顺序存储的,通过对日志的日期/时间操作,超级容易追踪到单个事件。
以二进制数据集中记录事件、系统问题的好处有很多。例如,由于系统日志是以二进制而不是文本形式存储的你可以以文本、JSON 对象等多种方式进行转译,以满足各种需求。另外,由于日志是按顺序存储的,通过对日志的日期/时间操作,超级容易追踪到单个事件。
请记住journald 收集的日志文件有几千行,而且每次开机都会对每个事件进行更新。因此,如果你有一个长期运行的 Linux 操作系统--日志的大小应该以 GB 为单位。由于有着数以千计的日志,最好用基本命令进行过滤,以了解更多系统问题。
请记住journald 收集的日志文件数以千行计,而且不断更新每次开机、每个事件。因此,如果你有一个长期运行的 Linux 操作系统,日志的大小应该以 GB 为单位。由于有着数以千计的日志,最好用基本命令进行过滤,以了解更多系统问题。
#### journald 配置文件
@ -42,7 +44,7 @@ journald 的配置文件存在于以下路径中。它包含了关于如何进
#### journald 存储二进制日志文件的地方
journald 以二进制格式存储日志。它们被保存在这个路径下的一个目录中
journald 以二进制格式存储日志。它们被保存在这个路径下的一个目录中
```
/var/log/journal
@ -52,13 +54,13 @@ journald 以二进制格式存储日志。它们被保存在这个路径下的
![journalctl log file path][2]
不要使用 cat 命令,也不要使用 nano 或 vi 来打开这些文件。它们将无法正常显示。
不要使用 `cat` 命令,也不要使用 `nano``vi` 来打开这些文件。它们(是二进制的),无法正常显示。
### 使用 journalctl 来查看和分析 systemd 日志
#### journald 基本命令
使用 journal daemon 查看日志的基本命令是:
查看 journald 日志的基本命令是:
```
journalctl
@ -66,11 +68,11 @@ journalctl
![journalctl][3]
该命令提供了所有应用程序和进程的日志条目,包括错误、警告等。它显示的列表中,最古老的日志在顶部,当前的日志在底部。你需要不断按回车键来逐行滚动浏览。你也可以使用 PAGE UP 和 PAGE DOWN 键来滚动。按 q 键可以退出这个视图。
该命令提供了所有应用程序和进程的日志条目,包括错误、警告等。它显示的列表中,最的日志在顶部,当前的日志在底部。你需要不断按回车键来逐行滚动浏览。你也可以使用 `PAGE UP``PAGE DOWN` 键来滚动。按 `q` 键可以退出这个视图。
#### 如何以不同时区的时间查看日志条目
默认情况下,journalctl 显示的是当前系统时区的日志时间。然而,你可以很容易地在命令中提供时区,将同一日志转换为不同的时区。例如,要查看 UTC 的日志,请使用以下命令:
默认情况下,`journalctl` 以当前系统时区显示日志的时间。然而,你可以很容易地在命令中提供时区,将同一日志转换为不同的时区。例如,要以 UTC 查看日志,请使用以下命令:
```
journalctl --utc
@ -100,10 +102,10 @@ journalctl -p 0
4: 警告
5: 通知
6: 信息
7调试
7: 调试
```
当你指定错误代码时,它显示该等级及比他等级更高的所有信息。例如,如果你指定下面的命令,它会显示所有优先级为 2、1 和 0 的信息:
当你指定错误代码时,它显示该等级及更高的所有信息。例如,如果你指定下面的命令,它会显示所有优先级为 2、1 和 0 的信息:
```
journalctl -p 2
@ -111,7 +113,7 @@ journalctl -p 2
#### 如何查看特定启动的日志
当你运行 journalctl 命令时,它会显示当前启动的信息,即你正在运行的会话中的信息。但也可以查看过去启动信息。
当你运行 `journalctl` 命令时,它会显示当前启动的信息,即你正在运行的会话中的信息。但也可以查看过去启动信息。
在每次重启时日志都会持续更新。journald 会记录不同启动时的日志。要查看不同启动时的日志,请使用以下命令。
@ -122,12 +124,10 @@ journalctl --list-boots
![journalctl list-boots][6]
- 第一个数字显示的是 journald 的唯一的启动跟踪号码,你可以在下一个命令中使用它来分析该特定的启动。
- 第二个数字是 boot ID你也可以在命令中指定。
- 第二个数字是启动 ID你也可以在命令中指定。
- 接下来的两个日期、时间组合是存储在相应文件中的日志的时间。如果你想找出某个特定日期、时间的日志或错误,这就非常方便了。
要查看一个特定的启动号码,你可以选择第一个号码或启动 ID如下所示。
要查看一个特定的启动号码,你可以选择第一个启动跟踪号码或启动 ID如下所示。
```
journalctl -b -45
@ -149,9 +149,9 @@ journalctl -xb -p 3
#### 如何查看某一特定时间、日期的日志记录
journalctl 功能强大,可以在命令中提供类似 "english" 的参数,用于时间和日期操作。
`journalctl` 功能强大,可以在命令中提供类似英语的参数,用于时间和日期操作。
你可以使用 `--since` 选项与 `“yesterday”, “today”, “tomorrow”, 或 “now”` 组合。
你可以使用 `--since` 选项与 `yesterday`、`today`、`tomorrow` 或 `now` 组合。
下面是一些不同命令的例子。你可以根据你的需要修改它们。它们是不言自明的。以下命令中的日期、时间格式为 `"YYYY-MM-DD HH:MM:SS"`
@ -178,7 +178,7 @@ journalctl --since 09:00 --until "1 hour ago"
#### 如何查看内核特定的日志记录
Linux 内核信息也可以从日志中提取出来。要查看当前启动时的内核信息,请使用以下命令
Linux 内核信息也可以从日志中提取出来。要查看当前启动时的内核信息,请使用以下命令
```
journalctl -k
@ -194,7 +194,7 @@ journalctl -u NetworkManager.service
![journalctl NetworkManager service][10]
如果你不知道服务名称可以使用下面的命令来列出系统中的systemd服务。
如果你不知道服务名称,可以使用下面的命令来列出系统中的 systemd 服务。
```
systemctl list-units --type=service
@ -202,13 +202,13 @@ systemctl list-units --type=service
#### 如何查看用户、组的日志
如果你正在分析服务器日志,在多个用户登录的情况下,这个命令很有帮助。你可以先用下面的命令从用户名中找出用户的 ID。例如要找出用户 "`debugpoint`" 的ID
如果你正在分析服务器日志,在多个用户登录的情况下,这个命令很有帮助。你可以先用下面的命令从用户名中找出用户的 ID。例如要找出用户 `debugpoint`ID
```
id -u debugpoint
```
然后使用 `_UID` 选项指定该ID与来查看该用户产生的日志。
然后使用 `_UID` 选项指定该 ID 与来查看该用户产生的日志。
```
journalctl _UID=1000 --since today
@ -220,7 +220,7 @@ journalctl _UID=1000 --since today
#### 如何查看一个可执行文件的日志
你也可以查看某个特定程序或可执行文件的日志。例如,如果你想找出 gnome-shell 的信息,你可以运行以下命令。
你也可以查看某个特定程序或可执行文件的日志。例如,如果你想找出 `gnome-shell` 的信息,你可以运行以下命令。
```
journalctl /usr/bin/gnome-shell --since today
@ -230,7 +230,7 @@ journalctl /usr/bin/gnome-shell --since today
### 结束语
希望本指南能帮助你使用 journalctl 查看分析 Linux 桌面或服务器上的 systemd 日志排除故障。如果你知道如何使用这些命令systemd 日志管理的功能非常强大,它能让你在调试时的生活变得轻松一些。现在所有主流的 Linux 发行版都使用 systemd。Ubuntu、Debian、Fedora、Arch--它们都使用systemd 作为其默认的操作系统产品。如果你想了解无 systemd 的Linux发行版你可能想看看[MX-Linux][13]、Gentoo、Slackware、Void Linux。
希望本指南能帮助你使用 `journalctl` 查看分析 Linux 桌面或服务器上的 systemd 日志排除故障。如果你知道如何使用这些命令systemd 日志管理的功能非常强大,它能让你在调试时的生活变得轻松一些。现在所有主流的 Linux 发行版都使用 systemd。Ubuntu、Debian、Fedora、Arch 它们都使用 systemd 作为其默认的操作系统组件。如果你想了解不使用 systemd 的 Linux发行版你可能想看看 [MX-Linux][13]、Gentoo、Slackware、Void Linux。
--------------------------------------------------------------------------------
@ -239,7 +239,7 @@ via: https://www.debugpoint.com/systemd-journalctl/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -258,3 +258,4 @@ via: https://www.debugpoint.com/systemd-journalctl/
[11]: https://www.debugpoint.com/wp-content/uploads/2020/12/journalctl-_UID.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2020/12/journalctl-gnome-shell.jpg
[13]: https://www.debugpoint.com/tag/mx-linux
[0]: https://img.linux.net.cn/data/attachment/album/202302/16/085250d5ngtogo2fjjn8o2.jpg

View File

@ -3,20 +3,18 @@
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15545-1.html"
Rnote一个用于笔记和注释的开源绘图应用
======
**_简介_**_Rnote 允许你做笔记、绘图和注释文件。听起来你需要它让我们来探讨一下。_
> Rnote 可以让你做笔记、绘图和注释文件。听起来你需要它?让我们来了解一下。
我们已经介绍了许多记笔记的应用,但支持手写笔记的选项却屈指可数。
Rnote 就是这样一个有用的应用,它可以让你做手写笔记并对文件/图片进行注释。
当然,你需要一个绘图板或一个带有手写笔的设置来使用 Rnote。
Rnote 就是这样一个有用的应用,它可以让你做手写笔记并对文件/图片进行注释。当然,你需要一个绘图板或一个带有手写笔的设置来使用 Rnote。
### Rnote: 基于矢量的绘图应用,用于绘制草图和手写笔记
@ -28,11 +26,11 @@ Rnote 是一个用 Rust 和 GTK 4 编写的令人印象深刻的开源应用。
让我强调一下它能做的一些事情。
### Rnote的特点
### Rnote 的特点
![rnote settings][3]
[Rnote][4] 是一个简单但有很多功能的绘图/记事应用程。一些功能包括:
[Rnote][4] 是一个简洁而有很多功能的绘图/记事应用程序。一些功能包括:
- 支持具有各种笔画风格的压敏笔输入
- 用形状工具添加不同的形状
@ -45,9 +43,9 @@ Rnote 是一个用 Rust 和 GTK 4 编写的令人印象深刻的开源应用。
- 集成的工作区浏览器可快速访问媒体文件
- 支持拖放
- 支持剪贴板
- 支持常见的页面格式A6、A5、US letter 等)
- 从 PDF、位图和 SVG 文件导入
- 原生的 .rnote 文件来保存/加载文件
- 支持常见的页面格式A6、A5、US letter 等)
- 从 PDF、位图和 SVG 文件导入
- 使用原生的 .rnote 文件来保存/加载文件
- 支持导出到 SVG 和 PDF
- 自动保存功能
- 深色/浅色模式
@ -80,7 +78,7 @@ flatpak install flathub com.github.flxzt.rnote
Rnote 正在积极开发,并在其功能设置方面取得了良好的进展。如果你喜欢 Rnote你可能想看看 [Xournal++][9],它是另一个能让你做手写笔记的应用。
_你还知道其他像 Rnote 这样令人兴奋的应用吗?你觉得 Rnote 怎么样?请在下面的评论中分享你的想法。_
你还知道其他像 Rnote 这样令人兴奋的应用吗?你觉得 Rnote 怎么样?请在下面的评论中分享你的想法。
--------------------------------------------------------------------------------
@ -89,16 +87,16 @@ via: https://itsfoss.com/rnote/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/wp-content/uploads/2022/11/rnote-screenshot.png
[3]: https://itsfoss.com/wp-content/uploads/2022/11/rnote-settings.png
[1]: https://itsfoss.com/content/images/wordpress/2022/11/rnote-screenshot.png
[3]: https://itsfoss.com/content/images/wordpress/2022/11/rnote-settings.png
[4]: https://rnote.flxzt.net
[5]: https://itsfoss.com/wp-content/uploads/2022/11/rnote-screenshot-1.png
[5]: https://itsfoss.com/content/images/wordpress/2022/11/rnote-screenshot-1.png
[6]: https://flathub.org/apps/details/com.github.flxzt.rnote
[7]: https://itsfoss.com/flatpak-guide/
[8]: https://github.com/flxzt/rnote

View File

@ -0,0 +1,62 @@
[#]: subject: "Merge design and code with Penpot"
[#]: via: "https://opensource.com/article/23/1/merge-design-code-penpot"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15549-1.html"
用 Penpot 弥合设计和代码之间的鸿沟
======
![][0]
> 用 Penpot 这个开源的设计工作空间来弥合编程和设计之间的鸿沟。
在计算机编程的大部分历史中在创建应用的代码的程序员和创建应用的用户体验UX的设计师之间一直存在着鸿沟。这两个学科接受的培训大不相同他们使用的工具也不同。程序员使用文本编辑器或集成开发环境来编写代码而设计师则经常绘制小部件布局和潜在交互的示意图。虽然一些 IDE像 [Eclipse][1] 和 [Netbeans][2],有界面设计组件,但它们通常专注于小部件的位置而不是小部件的设计。开源设计应用 [Penpot][3] 是一个协作式设计和原型设计平台。它有一套新的功能使设计师和开发者可以很容易地用熟悉的工作流程协同工作。Penpot 的设计界面可以让开发者在设计过程中和谐地编写代码,这是其他工具所无法做到的。自从我们 [上次介绍它][4] 以来,它已经有了长足的进步。它的最新功能不仅改善了你使用 Penpot 的体验,还推动了开源的 Penpot 应用超越类似的专有工具。
### 用 Penpot 做原型
在设计应用的最佳工作方式时,常见问题之一是在设计的时候这个应用还不存在。设计师可以通可视化和故事板来帮助设计团队和程序员了解目标是什么。但这是一个需要迭代和反馈的过程,当开发人员开始实施 UX 设计,设计会发生变化以应对对代码的实际变化。
使用 Penpot你可以为你的网络或移动应用创建一个“可用”原型。你可以将按钮与特定的行动联系起来根据用户的输入触发布局的变化。而这一切都可以在项目的代码存在之前完成。
但是,这方面最重要的不是模拟的能力。在 Penpot 中为应用的设计所做的一切都有可用的布局数据开发人员可以在最终的项目中使用它们。Penpot 不仅仅是一个出色的绘图和布局工具。它为编码过程提供了信息。
Penpot 现在不仅仅是提供了一个设计师特定元素的视觉列表,如属性、颜色和排版,而是将代码输出直接整合到设计工作区(就像 Web 浏览器中的开发者工具)。设计师和开发人员共享设计和前端开发的相同空间,以他们需要的任何格式获得规格。
![Image of the current Penpot interface][5]
### 内存解锁
许多在线设计工具使用专有技术来提供一些花哨的功能,但代价是基本上成为一个应用,你只能运行它,而不能通过浏览器访问。不过 Penpot 使用开放的网络标准,并由你的网络浏览器渲染。这意味着 Penpot 可以访问浏览器可用的最大内存,使得 Penpot 成为第一个具有设计扩展性的在线原型和布局应用。你可以提供更多的选项、更多的模型,和更多的场地。此外,你可以向更多的并发协作者开放你的设计空间,而不必担心应用的内存耗尽。
### 自我托管和 SaaS
Penpot 是开源的,所以你不用必须在云上使用它,如果这不适合你的工作流程。你可以在一个容器中轻松地自我托管 Penpot在你自己的工作站上作为一个本地应用使用或者在你自己的服务器上为你的组织托管它。
### 开源设计
我以前写过一篇 [Penpot 的介绍性文章][6],自那以后,这个应用变得更好了。如果你想把程序员和相关人员带入你的设计过程中,那么请试试 Penpot。
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/1/merge-design-code-penpot
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/20/12/eclipse
[2]: https://opensource.com/article/20/12/netbeans
[3]: http://penpot.app
[4]: https://opensource.com/article/21/9/open-source-design
[5]: https://opensource.com/sites/default/files/2022-07/Current%20Penpot%20interface.png
[6]: https://opensource.com/article/21/12/open-source-design-penpot
[0]: https://img.linux.net.cn/data/attachment/album/202302/17/143544u59tzeqplyhpt08h.jpg

View File

@ -3,13 +3,17 @@
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15554-1.html"
Linux 上的开源视频字幕
Live CaptionsLinux 上的开源视频字幕应用
======
![Image showing Live Captions presenting text from a Jitsi call. ][6]
> Live Captions 是一个用于 Linux 桌面的应用程序,为视频提供即时、本地和开源的字幕。
在一个完美的世界里,所有的视频都会有文字说明,直播视频也会有字幕。这不仅是没有听力的人能够参与流行文化和视频聊天的要求,对于有听力的人来说,这也是一种奢侈,他们只是喜欢阅读所说的内容。但并不是所有的软件都有内置的字幕,有些软件是依靠第三方的云服务来实现的。[Live Captions][1] 是 Linux 桌面上的一个应用,为视频提供即时、本地和开源的字幕。
### 安装 Live Captions
@ -19,8 +23,7 @@ Linux 上的开源视频字幕
如果你的 Linux 发行版没有附带软件中心,请从终端手动安装它。首先,添加 [Flathub][3] 仓库:
```
$ flatpak remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
接下来,安装应用:
@ -49,7 +52,7 @@ $ fuzzpak LiveCaptions
![Image showing preferences in Live Captions.][5]
你可以设置字体、字体大小、颜色等。默认情况下Live Captions 没有 100% 把握的文本会以比你选择的字体颜色更深的颜色呈现。如果你使用实时字幕是为了方便,这可能没有必要,但如果你听不到视频,那么了解一下可能不正确的文字是不错的。
你可以设置字体、字体大小、颜色等。默认情况下Live Captions 不是完全确定的文本会以更深的颜色呈现LCTT 校注:因为有些语音识别结果不能确保完全正确)。如果你使用实时字幕是为了方便,这可能没有必要,但如果你听不到视频的声音,那么知道哪些文本可能不正确是有用的。
你可以随时返回偏好页面,所以你的选择不一定是最终的。
@ -57,15 +60,13 @@ $ fuzzpak LiveCaptions
当 Live Captions 开始运行,任何通过系统声音传来的英语单词都会被打印到 Live Captions 窗口中。
![Image showing Live Captions presenting text from a Jitsi call. ][6]
这不是一项云服务。不需要 API 密钥。没有遥测或间谍活动也没有数据收集。事实上它甚至不需要网络权限。Live Captions 是开源的,所以没有使用专有的服务或库。
这不是一项云服务。不需要 API 密钥。没有遥测或间谍活动也没有数据收集。事实上它甚至不需要网络权限。Live Captions 是开源的,所以没有使用专有服务或库。
要改变声音输入,请点击 **Live Captions** 窗口左上方的**麦克风**图标。要打开**偏好**窗口,请点击 **Live Captions** 窗口左下方的**齿轮**图标。
要改变声音输入,请点击 Live Captions 窗口左上方的麦克风图标。要打开 “<ruby>偏好<rt>Preferences</rt></ruby>” 窗口,请点击 Live Captions 窗口左下方的齿轮图标。
### 开放访问
根据我的经验Live Captions 的结果是好的。它们并不完美,但在小型的 [Jitsi 视频通话][7]中,它很出色。即使是小众的视频(例如战锤 40,000 的激烈比赛),它也做得出奇地好,只在最虚构的科幻术语上磕磕碰碰。
根据我的经验Live Captions 的结果是好的。它们并不完美,但在小型的 [Jitsi 视频通话][7]中,它很出色。即使是小众的视频(例如 Warhammer 40K 的激烈比赛),它也做得出奇地好,只在最虚构的科幻术语上磕磕碰碰。
让开源代码易于访问是至关重要的,最终它有可能使每个人受益。我个人不需要 Live Captions但当我不想听视频的时候我喜欢使用它。当我希望得到帮助以专注于我可能会分心的事情时我也会使用它。Live Captions 不仅仅是一个有趣的开源项目,它也是一个重要的项目。
@ -76,7 +77,7 @@ via: https://opensource.com/article/23/2/live-captions-linux
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -3,25 +3,27 @@
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15556-1.html"
Elementary OS 7 安装指南及截图
elementary OS 7 安装指南(附截图)
======
你好,技术人员,在这篇文章中,我们将介绍如何在笔记本电脑或台式机上一步一步地安装 Elementary OS 7并附有截图。它是基于最新和稳定的 Ubuntu 22.04 LTS。
![][0]
Elementary OS 7 的代号为 “Horus”并带来了很多改进例如
在这篇文章中,我们将介绍如何在笔记本电脑或台式机上一步一步地安装 elementary OS 7并附有截图。它基于最新和稳定的 Ubuntu 22.04 LTS。
elementary OS 7 的代号为 “Horus”并带来了很多改进例如
- 改进了 AppCenter 和安装所有需要的应用。
- 改进了 Sideload 和可选商店 Flathub 的体验。
- 改进了侧载和可选商店Flathub的体验。
- 最新的 GNOME Web 43支持创建网络应用。
- 快速获得操作系统和应用的更新
- 电源配置文件管理
- 应用描述的改进
##### Elementary OS 7 的系统要求
### elementary OS 7 的系统要求
- 双核 64 位处理器
- 4GB 内存或更多
@ -29,57 +31,57 @@ Elementary OS 7 的代号为 “Horus”并带来了很多改进例如
- 互联网接入
- 可启动的 USB 驱动器4GB 存储空间)
闲话少说,让我们进入安装步骤
闲话少说,让我们进入安装步骤
### 1下载 Elementary OS 7
### 1下载 elementary OS 7
使用下面的官方网址来下载 ISO 文件。
- [下载 Elementary OS 7 ISO][1]
> **[下载 elementary OS 7 ISO][1]**
ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动。
在 Windows 操作系统中,用 Rufus 制作可启动的 USB 驱动器。在 Linux 中,请参考以下网址:
在 Windows 操作系统中,用 Rufus 制作可启动的 USB 驱动器。在 Linux 中,请参考以下网址:
- [如何在 Ubuntu/Linux Mint 上创建可启动的 USB 驱动器][2]
> **[如何在 Ubuntu/Linux Mint 上创建可启动的 USB 驱动器][2]**
### 2用可启动媒体启动系统
### 2用可启动介质启动系统
现在用可启动的 USB 驱动器启动目标系统。从 bios 设置中把启动介质从硬盘改为 USB。当系统用 USB 驱动器启动时,我们将看到以下页面。
现在用可启动的 USB 驱动器启动目标系统。从 BIOS 设置中把启动介质从硬盘改为 USB。当系统用 USB 驱动器启动时,我们将看到以下页面。
![][3]
### 3选择安装语言
选择你喜欢的语言,然后点击“选择”。
选择你喜欢的语言,然后点击“<ruby>选择<rt>Select</rt></ruby>”。
![][4]
### 4选择键盘布局
在这一步,你将被要求选择键盘布局,然后点击“选择”。
在这一步,你将被要求选择键盘布局,然后点击“<ruby>选择<rt>Select</rt></ruby>”。
![][5]
### 5 尝试或安装 elementary OS
### 5尝试或安装 elementary OS
我们将看到下面的页面,在这里我们必须选择安装类型。它给了我们以下选项:
- 试用演示模式 试用 Elementary OS 7 而不安装
- 擦除磁盘并安装 安装程序将擦除整个磁盘并自动创建所需分区。
- 自定义安装(高级)– 它将给我们一个选项来创建自定义分区。
- <ruby>试用演示模式<rt>Try Demo Mode</rt></ruby> 试用 elementary OS 7 而不安装
- <ruby>擦除磁盘并安装<rt>Erase disk and Install</rt></ruby> 安装程序将擦除整个磁盘并自动创建所需分区。
- <ruby>自定义安装(高级)<rt>Custom Install (Advanced)</rt></ruby> 它将给我们一个选项来创建自定义分区。
在这篇文章中,我将使用第二个选项(擦除磁盘并安装)。
![][6]
点击“擦除磁盘并安装”。
点击“<ruby>擦除磁盘并安装<rt>Erase disk and Install</rt></ruby>”。
在下面的屏幕上,选择要安装操作系统的驱动器,然后点击“擦除并安装”。
在下面的屏幕上,选择要安装操作系统的驱动器,然后点击“<ruby>擦除并安装<rt>Erase and Install</rt></ruby>”。
![][7]
如果你想对设备的驱动器进行加密,那么点击“选择密码”,否则点击“不加密”。
如果你想对设备的驱动器进行加密,那么点击“<ruby>选择密码<rt>Choose Password</rt></ruby>”,否则点击“<ruby>不加密<rt>Dont Encrypt</rt></ruby>”。
![][8]
@ -93,7 +95,7 @@ ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动
![][10]
点击“重启设备”,不要忘记从 bios 设置中改变启动介质,以便用磁盘启动。
点击“<ruby>重启设备<rt>Restart Device</rt></ruby>”,不要忘记从 BIOS 设置中改变启动介质,以便用磁盘启动。
### 7创建本地用户并设置主机名
@ -103,7 +105,7 @@ ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动
![][11]
点击“完成设置”。
点击“<ruby>完成设置<rt>Finish Setup</rt></ruby>”。
在下面的页面中,你将被提示输入你在上面创建的本地用户凭证。
@ -111,21 +113,21 @@ ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动
输入凭证后,点击回车。
### 8Elementary OS 7 欢迎页
### 8elementary OS 7 欢迎页
我们将看到下面的欢迎页。
![][13]
选择“跳过所有”。
选择“<ruby>跳过所有<rt>Skip All</rt></ruby>”。
![][14]
点击“开始使用”,然后我们会看到下面的桌面。
点击“<ruby>开始使用<rt>Get Started</rt></ruby>”,然后我们会看到下面的桌面。
![][15]
很好,这表明你已经成功地在系统上安装了 Elementary OS 7。这就是本指南的全部内容请探索这个令人兴奋的 Linux 发行版并享受其中的乐趣吧😊。
很好,这表明你已经成功地在系统上安装了 elementary OS 7。这就是本指南的全部内容请探索这个令人兴奋的 Linux 发行版并享受其中的乐趣吧😊。
--------------------------------------------------------------------------------
@ -134,7 +136,7 @@ via: https://www.linuxtechi.com/elementary-os-7-installation-guide/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -154,4 +156,5 @@ via: https://www.linuxtechi.com/elementary-os-7-installation-guide/
[12]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Login-screen-elementaryos7.png?ezimgfmt=ng:webp/ngcb22
[13]: https://www.linuxtechi.com/wp-content/uploads/2023/02/ElementaryOS7-Welcome-Screen.png?ezimgfmt=ng:webp/ngcb22
[14]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Get-Started-ElementaryOS7.png?ezimgfmt=ng:webp/ngcb22
[15]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Desktop-Screen-ElementaryOS7-After-Installation.png
[15]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Desktop-Screen-ElementaryOS7-After-Installation.png
[0]: https://img.linux.net.cn/data/attachment/album/202302/19/143743asfmbfrt7mc1tczb.jpg

View File

@ -0,0 +1,104 @@
[#]: subject: "A brief history of LibreOffice"
[#]: via: "https://opensource.com/article/23/2/libreoffice-history"
[#]: author: "Italo Vignoli https://opensource.com/users/italovignoli"
[#]: collector: "lkxed"
[#]: translator: "onionstalgia"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15558-1.html"
LibreOffice 简史
======
![][0]
> LibreOffice 的起源故事,它是一个开源的办公解决方案,确保你总是能够访问你的数据并控制你的创造力。
在 2009 年初OpenOffice.orgOOo还是微软 Office 在个人办公生产力套件市场的主要竞争对手。这个流行的开源办公套件的社区,期待着 11 月在意大利奥尔维耶托举行的研讨会。事情进展顺利,未来看起来很光明。
可这之后,同年 4 月,<ruby>甲骨文公司<rt>Oracle</rt></ruby> 宣布了对 <ruby>太阳计算机系统公司<rt>Sun Microsystems</rt></ruby> 的收购计划。
就个人而言,我觉得这对 OpenOffice.org 来说是个坏消息。甲骨文对开源套件没有兴趣,我料想它会放弃这个项目。当然,我更希望在研讨会上被证明是我想错了。但到最后,甲骨文只派了一名代表来到奥尔维耶托,乏善可陈,含糊其辞地谈论了货币化和品牌重塑。我和其他社区成员们都觉得,最担心的事情成真了。
那一年,社区成员从奥尔维耶托返程之后决定采取行动。是时候兑现 OpenOffice.org 项目的承诺了。我们决心创建一个独立的基金会来管理项目的资产在社区的保护下促进套件的开发。OpenOffice.org 将不再隶属于哪一家公司,而是属于它的用户和个人贡献者们。
### 建立基金会
当时OpenOffice.org 项目分布在世界各地,在语言社区帮助下进行本地化和推广,其中最主要的四个是:
- 德国:该软件诞生于德国,而且 Star Division负责 OpenOffice.org 的部门)的总部也在汉堡,因此开发者群体和德语支持者之间沟通顺畅。
- 法国:政府支持这个开源软件。
- 意大利:我所在的小组。
- 巴西。
2010 年初,在法国和德国语言社区的倡议下,最活跃的志愿者 —— 连同一些独立开发者和 SUSE 的开发者们 —— 着手建立了一个复刻项目,旨在作为一个额外的选择,让全球社区和投资 OpenOffice.org 的企业能够同时参与进来。
我在国际商业咨询机构已有超过 30 年的工作经验了。在这个项目中负责市场营销和战略沟通。
随后的几个月里,活动越发忙碌。由于从 Star Division 传来的消息越来越负面,每周都得召开一次电话会议。
即使 OpenOffice.org 的解散似乎迫在眉睫我们还是通过发布文章征稿CFP的方式确认了位于布达佩斯的研讨会仍将举办。当然复刻项目的成员在做的也和往年别无二致。他们提交了演讲提案并制定了旅行计划。
### 一个安全的文件存放处
夏初,复刻项目几乎要完成了。我们的小组在布达佩斯开会评估 OpenOffice.org 方面的境况,并召开了第一次面对面的组织会议。
布达佩斯的研讨会进行得很顺利,为期三天日程中举行了会议、主题演讲和技术研讨。一切似乎还算平常。
可其实并不平常。
当几位领头人没去参加会议的主要社交活动 —— 多瑙河上过夜巡游的时候,一些与会者开始有些疑虑了。其实我们没参加这次活动,是因为我们在餐厅开会敲定新基金会的最终细节,有太多事情要确保万无一失。我们必须定下公告日期,并且,为了协调基金会落地的各项任务,需要确定指导委员会的人员组成。
### LibreOffice
从这次会议到 LibreOffice 发布间隔了三周,我们紧锣密鼓地准备。我拟好了发布策略和新闻稿,开发者们为软件做准备。应用的名字甚至是在发布的前几天的一次电话会议上敲定的,那时我在格罗塞托,正在参加意大利开源软件社区会议。
2010 年 9 月 28 日,我把宣布“<ruby>文档基金会<rt>The Document Foundation</rt></ruby>”和 LibreOffice 的新闻稿分发到一个包含约 250 名记者的全球邮件列表中,这列表可是我根据供职过的公共关系机构的来信,花了很大力气整理的。
新闻稿是这样的:
> 开发和推广 OpenOffice.org 的志愿者社区宣布将成立一个独立的基金会推动项目的进一步发展。基金会将成为一个新的生态系统的基石在这里个人和组织都可以为一个真正免费的办公套件做出贡献并从中受益。从用户的利益出发这将带来更多的竞争和选择并推动办公套件市场的创新。从现在开始OpenOffice.org 社区将被称为“<ruby>文档基金会<rt>The Document Foundation</rt></ruby>”。
我们邀请过 Oracle 成为基金会的成员,并捐赠社区在过去十年中发展起来的品牌。而在他们做出决定之前,我们选择了 LibreOffice 作为即将到来的软件的品牌。
媒体界对这一公告的反应非常积极。但另一方面,企业和分析师则倾向于对由社区管理的办公套件表示质疑,这是他们从未完全理解的实体,因为这个组织很扁平、任人唯贤。
公告发布后的两周内,就有 80 位新开发者加入这个项目,推翻了那些认为“仅凭 SUSE 和 Red Hat 的开发者来启动复刻项目并不现实”的预测。不出所料,大多数语言社区都转向了 LibreOffice。
LibreOffice 是基于 OpenOffice.org 的源代码构建的。但新的功能被集成在 <ruby>Go-OO<rt>Go-Open Office</rt></ruby> 的源代码中,而不是在 OpenOffice.orgOOo上。
出于这个原因LibreOffice 的第一个版本(于 2011 年 1 月 25 日发布)为 3.3,以保持与 OpenOffice.org 的一致性。我们认为这对于从第一个版本迁移到新套件的用户很有帮助。由于还有必须解决的明显技术债务,该软件仍有点不成熟,这导致了一些问题和不稳定。这些问题预计将基本上通过 3.x 和 4.x 版本的代码清理和重构得到纠正。到了 5.x 和 6.x 版本,源代码应该已经稳定,并有条件改进用户界面,以及开发移动和云版本。
2011 年春天,甲骨文将 OpenOffice.org 源代码转让给了 Apache 软件基金会。但该项目仅持续了三年,它的上一个新版本已经是将近十年前的事了。
### 未来是开放的
文档基金会的组建过程于 2012 年初结束,并于 2012 年 2 月 17 日在柏林有关部门完成注册。因为创始人希望该项目的志愿者成员们也可以根据贡献成为基金会成员,这让注册过程十分漫长。德国的法规并未考虑到基金会的这一细节,因此需要对章程进行多次修订才能满足现有状况。
基金会成立之初的前两项活动都是委员会成员的选举。这是从单纯的志愿者过渡到基于贡献的文档基金会成员所必经的规程。有委员五人,副委员三人。最后,负责在行政和战略方面领导基金会的董事会,由七名成员和三名副手组成。
2012 年底,基金会聘请了第一位雇员 Florian Effenberger在后来他被提升为执行董事。今天这个团队有十几个成员他们负责日常活动例如协调项目、行政管理、网络基础设施管理、软件发布、指导新的开发人员、协调质量保证、用户界面的演进、以及营销和沟通。
目前,基金会正在寻找开发人员满足企业客户需求,例如 RTL 语言管理和辅助功能。这些功能并不是由 LibreOffice 生态系统中的公司开发的,这些公司为他们提供功能开发服务、三级支持以及为企业需求优化的软件的长期支持版本。
在 LibreOffice 和文档基金会宣布成立已经过去 12 年之后,我们可以说,我们已经实现了开发一个独立的“<ruby>自由和开源软件<rt>free and open source</rt></ruby>FOSS”的项目目标。我们的项目是基于一个由个人志愿者和公司量力而行做出贡献的扩展社区。参与者们帮助创建了无与伦比的免费办公套件并通过采用和发展现有市场上唯一真正的<ruby>标准办公文档格式<rt>Open Document Format</rt></ruby>ODF来支持开放标准。同时该套件也确保了与专有的 OOXML 格式的出色兼容性。
这种模式的可持续性是一个日常问题。身处于与大型科技公司的激烈竞争下我们一直在尝试试图在“希望一切都免费”和“希望每个用户都能力所能及做出贡献”之间达成一种平衡。不过无论如何LibreOffice 都会是开源的办公套件,这提供了竞争之上的额外价值。
试试 LibreOffice 吧捐赠不论是工作还是业余支持它向你的朋友介绍它LibreOffice 是一个开源的办公解决方案,它确保你总是能够访问你的数据,并掌控你的创造力。
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/libreoffice-history
作者:[Italo Vignoli][a]
选题:[lkxed][b]
译者:[onionstalgia](https://github.com/onionstalgia)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/italovignoli
[b]: https://github.com/lkxed/
[0]: https://img.linux.net.cn/data/attachment/album/202302/20/191328egg1odg1gegdgd91.jpg

View File

@ -0,0 +1,83 @@
[#]: subject: "GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago"
[#]: via: "https://news.itsfoss.com/gnome-design-quick-access/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "SJFCS"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15551-1.html"
GNOME 正在(某种程度上)恢复在几年前删除的功能
======
> GNOME 的设计做了一些有意义的变化,它(某种程度上)带回了一个它早先删除的类似功能。
![GNOME 正在(某种程度上)恢复它几年前删除的功能][1]
几年前GNOME 移除了应用程序的菜单和指示器。
如果你不太清楚,应用程序指示器是一种从顶部面板与后台运行的应用程序进行交互的方式。
是的,你可以 [添加一个应用程序指示器的扩展][2] 来获得同样的功能。但是,在使用 GNOME 桌面环境的发行版上,如 Fedora你不再能找到默认的能力。
然而Ubuntu它的一些 [官方版本][3],以及其他发行版如 Pop!_OS支持系统托盘图标尽管 GNOME 放弃了它们。
现在,经过多年的设计变化,看起来我们可能会看到类似的东西。
### GNOME 将添加一个检查后台活动程序的简便方法
目前,在没有活动窗口的情况下,找出在后台运行的应用程序并没有简便的方法。
你必须使用 [任务管理器][4] 或 [系统监控工具][5] 以获得更好的观测能力。
在未来的 GNOME 版本中(可能是 GNOME 44你或许可以期待有一个功能可以直接从顶部面板的菜单面板上监控后台运行的应用程序。
![GNOME 设计模拟图,用于从通知菜单中检查后台应用程序][6]
[Allan Day][7] 的想法仍在讨论中,他分享了一个 [设计模拟图][8]。不过,它很有可能会被接受。
这个想法也促使开发者 [Georges Basile Stavracas Neto][9] 披露了 Flatpak 的 xdg-desktop-portal 组件,它可以使得检测运行中的 Flatpak 应用程序变得容易。
> 📋 检查后台应用程序这个功能的位置或设计仍在进行中;你在上面看到的内容可能会随着最终的实施而改变。
### 这是否也会使应用指示器回归?
并非如此。
通过这个功能GNOME 旨在让你快速看到后台运行的应用程序,并对它们进行管理(关闭它们或访问特定的设置)。
然而,你仍需要少量点击来达到这一点 🖱️。
小程序指示器或系统托盘图标是访问在后台运行的应用程序更快捷的方式,尽管不是每个后台应用程序都被列出。
毕竟,这总比没有好。
而最终,这些设计上的变化可能会产生一种直观的方式,以某种形式让应用指示器回归。
💬 你对这个决定与即将发布的 GNOME 设计变化有何看法?请在下面的评论中分享你的想法。
参考:[Phoronix][10]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/gnome-design-quick-access/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[SJFCS](https://github.com/SJFCS)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/02/gnome-brings-mysterious-features.png
[2]: https://itsfoss.com/enable-applet-indicator-gnome/
[3]: https://itsfoss.com/which-ubuntu-install/
[4]: https://itsfoss.com/task-manager-linux/
[5]: https://itsfoss.com/linux-system-monitoring-tools/
[6]: https://news.itsfoss.com/content/images/2023/02/background-app-running.png
[7]: https://gitlab.gnome.org/aday
[8]: https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191
[9]: https://github.com/GeorgesStavracas
[10]: https://www.phoronix.com/news/GNOME-Monitor-Background-Apps

View File

@ -3,18 +3,22 @@
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15541-1.html"
用我们的新指南开始开发 WebAssembly
跟着我们的新指南学习开发 WebAssembly
======
在过去的几十年里Web 浏览器作为最流行的跨平台应用经久不衰。从另一个角度看浏览器,它是最受欢迎的应用交付平台之一。想想你使用的所有网站,它们取代了你过去用桌面上运行的软件进行的活动。你仍然在使用软件,但你是通过浏览器来访问它,而且是在别人的 Linux 服务器上运行。在优化我们所有人使用的软件的永恒努力中,软件开发世界早在 2019 年就引入了 WebAssembly作为通过 Web 浏览器运行编译代码的一种方式。应用的性能比以往任何时候都要好而且编码的选择远远超出了PHP、Python 和 JavaScript 的通常列表。
![][0]
> 使用 WebAssembly 开发有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。
在过去的几十年里Web 浏览器作为最流行的跨平台应用经久不衰。从另一个角度看浏览器,它是最受欢迎的应用交付平台之一。想想你使用的所有网站,它们取代了你过去用桌面上运行的软件进行的活动。你仍然在使用软件,但你是通过浏览器来访问它,而且是在别人的 Linux 服务器上运行。在优化我们所有人使用的软件的永恒努力中,软件开发世界早在 2019 年就引入了 WebAssembly作为通过 Web 浏览器运行编译代码的一种方式。应用的性能比以往任何时候都要好,而且可以生成 WebAssembly 编码的语言远不只是通常的 PHP、Python 和 JavaScript。
### 一个目标和一种语言
关于 WebAssembly 的一个强大但也最令人困惑的地方是“webassembly ”这个词既指一种语言也指一个目标。WebAssembly 是一种汇编语言,但没有多少人选择直接用汇编写代码。即使是汇编语言,最终也会被转换为二进制格式,这也是计算机运行代码的要求。这种二进制格式也被称为 WebAssembly。不过这很好因为这意味着你可以用你选择的语言来写一些最终以 WebAssembly 交付的东西,包括 C、C++、Rust、Javascript 和其他许多语言。
关于 WebAssembly 的一个强大但也最令人困惑的地方是,“WebAssembly” 这个词既指一种语言也指一个目标。WebAssembly 是一种汇编语言,但没有多少人选择直接用汇编写代码。即使是汇编语言,最终也会被转换为二进制格式,这也是计算机运行代码的要求。这种二进制格式也被称为 WebAssembly。不过这很好因为这意味着你可以用你选择的语言来写一些最终以 WebAssembly 交付的东西,包括 C、C++、Rust、Javascript 和其他许多语言。
进入 WebAssembly 的途径是 Emscripten这是一个 LLVM 编译器工具链,可以从你的代码中产生 WebAssembly。
@ -23,8 +27,7 @@
要在你的 Linux 或 macOS 电脑上安装 Emscripten请使用 Git
```
$ git clone \
https://github.com/emscripten-core/emsdk.git
$ git clone https://github.com/emscripten-core/emsdk.git
```
改变目录进入 `emsdk` 目录并运行安装命令:
@ -34,7 +37,7 @@ $ ./emsdk install latest
$ ./emsdk activate latest
```
Emscripten 工具链中的所有内容都安装在 `emsdk` 目录下,对系统的其他部分没有影响。由于这个原因,在使用 `emsdk` 之前,你必须 source 它的环境:
Emscripten 工具链中的所有内容都安装在 `emsdk` 目录下,对系统的其他部分没有影响。由于这个原因,在使用 `emsdk` 之前,你必须 <ruby>源引<rt>source</rt></ruby> 它的环境:
```
$ source ./emsdk_env.sh
@ -44,11 +47,11 @@ $ source ./emsdk_env.sh
要在 Windows 上安装 Emscripten你可以在 WSL 环境下运行 Linux。
请访问 [Emscripten 网站][1]了解更多安装信息。
请访问 [Emscripten 网站][1] 了解更多安装信息。
### Hello world
### Hello World
下面是一个用 C++ 编写的简单的 “hello world” 应用。
下面是一个用 C++ 编写的简单的 “Hello World” 应用。
```
#include <iostream>
@ -85,7 +88,9 @@ $ emrun ./world.html
### 学习更多关于 WebAssembly 的知识
为 WebAssembly 开发可以有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。如果你了解 C 或 C++,那么你可以用这些来写你的项目。如果你正在学习 Rust那么你可以使用 Rust。甚至 Python 代码也可以使用 Pyodide 模块来作为 WebAssembly 运行。你有很多选择,而且没有错误的开始方式(甚至有 COBOL 到 WebAssembly 的编译器)。如果你渴望开始使用 WebAssembly[请下载我们免费的电子书][2]。
使用 WebAssembly 开发可以有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。如果你了解 C 或 C++,那么你可以用这些来写你的项目。如果你正在学习 Rust那么你可以使用 Rust。甚至 Python 代码也可以使用 Pyodide 模块来作为 WebAssembly 运行。你有很多选择,而且没有错误的开始方式(甚至有 COBOL 到 WebAssembly 的编译器)。如果你渴望开始使用 WebAssembly
> **[请下载我们免费的电子书][2]**
--------------------------------------------------------------------------------
@ -94,7 +99,7 @@ via: https://opensource.com/article/23/2/webassembly-guide
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -102,3 +107,4 @@ via: https://opensource.com/article/23/2/webassembly-guide
[b]: https://github.com/lkxed/
[1]: https://emscripten.org/
[2]: https://opensource.com/downloads/webassembly-ebook
[0]: https://img.linux.net.cn/data/attachment/album/202302/15/204034uy4t9h6z6o06hj6j.jpg

View File

@ -0,0 +1,61 @@
[#]: subject: "Opera Browser Plans to Integrate ChatGPT"
[#]: via: "https://debugpointnews.com/opera-chatgpt-integration/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: "gpchn"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15547-1.html"
Opera 浏览器计划集成 ChatGPT
======
![][1]
> 据报道Opera 浏览器正在寻求将语言模型 ChatGPT 集成到其桌面和移动产品中。
### 摘要
- 据报道,流行的桌面和移动网络浏览器 Opera 浏览器正在探索将语言模型 ChatGPT 集成到其产品中。
- 微软最近宣布将 ChatGPT 的制造商 OpenAI 技术集成到其 Edge 网络浏览器中,为用户添加人工智能功能。
### Opera 与 ChatGPT
[Opera][2],一个被广泛使用的桌面和移动网络浏览器,将把语言模型 ChatGPT 集成到它的软件产品中。Opera 的母公司昆仑科技是这一新闻的幕后推手尽管这次集成的细节仍然有限。Opera 提供了一系列软件产品,包括桌面网络浏览器、移动网络浏览器以及其为 Chromebook 设计的浏览器版本。
最有可能整合 ChatGPT 的是 Opera 的主要桌面浏览器,包括 Opera 浏览器和 Opera GX这是一款为游戏玩家设计的浏览器。然而也有可能集成到 Opera 的移动浏览器中,包括常规的 Opera 移动浏览器、Opera Mini 和 Opera Crypto 浏览器。
### 来自微软和谷歌的最新更新
微软上周宣布将 OpenAI 集成到其 Edge 网络浏览器中,成为头条新闻。这种集成将在未来为 Edge 用户带来两种人工智能功能,即 “<ruby>Chat<rt>聊天</rt></ruby>” 和 “<ruby>撰写<rt>Compose</rt></ruby>”。“聊天”功能可以让用户在浏览器中直接与人工智能交流。同时,“撰写”功能帮助用户进行文本撰写,包括使用不同的语气和长度撰写电子邮件和社交媒体帖子。
在最近的一次演示中,谷歌没有宣布将人工智能聊天机器人直接集成到其 Chrome 浏览器中,这一举措得到的回应并不热烈。
### 下一步是什么
据 Statcounter 统计Opera 浏览器被数亿用户使用,在全球浏览器市场占有 2.4% 的份额。虽然它可能落后于谷歌 Chrome 的 65% 和 Safari 的 18%,但与 Mozilla Firefox 的 3% 相比,它仍然保持着自己的优势。
昆仑科技是一家在深圳证券交易所上市的北京公司。本周,中国搜索巨头百度宣布计划在其搜索产品中集成 ChatGPT 风格的机器人。
总之ChatGPT 与 Opera 浏览器的集成代表着人工智能网络浏览向前迈出的重要一步。随着微软和百度等公司将人工智能技术融入其产品Opera 将自己定位为该领域的领导者。
随着数亿用户和浏览器市场的日益增长ChatGPT 与 Opera 的集成是一项备受期待的发展。
参考:[CNBC][3]
--------------------------------------------------------------------------------
via: https://debugpointnews.com/opera-chatgpt-integration/
作者:[arindam][a]
选题:[lkxed][b]
译者:[gpchn](https://github.com/gpchn)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://debugpointnews.com/author/dpicubegmail-com/
[b]: https://github.com/lkxed
[1]: https://debugpointnews.com/wp-content/uploads/2023/02/opera.jpg
[2]: https://www.opera.com/
[3]: https://www.cnbc.com/2023/02/09/web-browser-opera-is-planning-to-incorporate-chatgpt.html

View File

@ -2,7 +2,7 @@
[#]: via: "https://debugpointnews.com/legacy-os-2023-release/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "Cubik65536"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
@ -56,7 +56,7 @@ via: https://debugpointnews.com/legacy-os-2023-release/
作者:[arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
译者:[Cubik65536](https://github.com/Cubik65536)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,83 +0,0 @@
[#]: subject: "GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago"
[#]: via: "https://news.itsfoss.com/gnome-design-quick-access/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago
======
GNOME design changes makes sense, as it brings back (sort of) a similar functionality that it removed earlier.
![GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago][1]
GNOME removed the application menus and indicators a few years back.
If you are curious, app indicators were a way of interacting with the apps running in the background from the top panel.
Yes, you can [add an extension for app indicators][2] to get the same functionality. But, you will no longer find the ability by default on distributions using stock GNOME desktop environment, like Fedora.
However, Ubuntu, some of its [official flavors][3], and other distributions like Pop!_OS support the system tray icons even though GNOME dropped them.
Now, after years of design changes, it looks like we might be seeing something similar.
### GNOME to Add a Quick Way to Check Active Apps in the Background
Currently, there's no quick way to find out the apps running in the background without an active window.
You must use the [task manager][4] or [system monitoring tools][5] for better insights.
With future GNOME releases (probably GNOME 44), you may expect **a feature to monitor background running apps** right from the **menu panel** of the top panel.
![gnome design mockup for backround app check from the notification menu][6]
The idea by [Allan Day][7] is still in discussion, and a [design mockup][8] has been shared. However, there is a good chance that it will be accepted.
This idea has also prompted developer [Georges Basile Stavracas Neto][9] to expose Flatpak's xdg-desktop-portal component, making it easy to detect running Flatpak applications.
> 📋 The placement or design of checking background apps is still a work in progress; what you see above may change with the final implementation.
### Would This Bring Back App Indicators Too?
Not exactly.
With this feature, GNOME aims to allow you to quickly see the background running apps and manage them (close them or access specific settings).
However, you still have a few clicks to reach this point 🖱️
The applet indicators or the system tray icons were a faster way to access applications running in the background, even though not every background app was listed.
After all, it is better than nothing.
And eventually, these design changes could result in an intuitive way to get app indicators back in some form.
_💬 What do you think about this decision with GNOME design changes for upcoming releases? Share your thoughts in the comments below._
**Via**: [Phoronix][10]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/gnome-design-quick-access/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed/
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/02/gnome-brings-mysterious-features.png
[2]: https://itsfoss.com/enable-applet-indicator-gnome/
[3]: https://itsfoss.com/which-ubuntu-install/
[4]: https://itsfoss.com/task-manager-linux/
[5]: https://itsfoss.com/linux-system-monitoring-tools/
[6]: https://news.itsfoss.com/content/images/2023/02/background-app-running.png
[7]: https://gitlab.gnome.org/aday
[8]: https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191
[9]: https://github.com/GeorgesStavracas
[10]: https://www.phoronix.com/news/GNOME-Monitor-Background-Apps

View File

@ -1,61 +0,0 @@
[#]: subject: "Opera Browser Plans to Integrate ChatGPT"
[#]: via: "https://debugpointnews.com/opera-chatgpt-integration/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Opera Browser Plans to Integrate ChatGPT
======
![][1]
**Opera browser is reportedly looking to integrate the language model ChatGPT into its desktop and mobile products.**
### In brief
- Opera browser, a popular desktop and mobile web browser is reportedly exploring integrating the language model ChatGPT into its products.
- Microsoft recently announced the integration of OpenAI technology, the maker of ChatGPT, into its Microsoft Edge web browser, adding AI-powered features for users.
### Opera and ChatGPT
[Opera][2], a widely-used desktop and mobile web browser is set to integrate the language model ChatGPT into its software products. Operas parent company Kunlun Tech is behind the news, although the details of the integration remain limited. Opera offers a range of software products, including desktop web browsers, mobile web browsers, and a version of its browser designed for Chromebooks.
The most likely candidates for the ChatGPT integration are Operas main desktop browsers, including Opera browser and Opera GX, a browser designed for gamers. However, there is also potential for integration into Operas mobile browsers, including the regular Opera mobile browser, Opera Mini, and Opera Crypto Browser.
### Recent updates from Microsoft and Google
Microsoft made headlines this week by announcing OpenAI integration into its Microsoft Edge web browser. The integration will bring two AI-powered features, Chat and Compose, to Edge users in the future. Chat allows users to communicate directly with the AI in the browser. At the same time, Compose helps users with text composition, including writing emails and social media posts with different tones and lengths.
During a recent presentation, Google did not announce direct AI chatbot integration into its Chrome browser, which received a less-than-enthusiastic response.
### Whats next
Opera browser is used by hundreds of millions of users, with a 2.4% share of the global browser market, according to Statcounter. While it may trail behind Google Chromes 65% and Safaris 18%, it still holds its own compared to Mozilla Firefoxs 3%.
Kunlun Tech is a Beijing-based company listed on the Shenzhen stock exchange. This week, Chinese search giant Baidu announced plans to integrate a ChatGPT-style bot into its search product.
In conclusion, the integration of ChatGPT into the Opera browser represents a significant step forward in AI-powered web browsing. As companies like Microsoft and Baidu integrate AI technology into their products, Opera is positioning itself as a leader in the field.
With hundreds of millions of users and a growing presence in the browser market, the integration of ChatGPT into Opera is a highly-anticipated development.
Via [CNBC][3]
--------------------------------------------------------------------------------
via: https://debugpointnews.com/opera-chatgpt-integration/
作者:[arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://debugpointnews.com/author/dpicubegmail-com/
[b]: https://github.com/lkxed
[1]: https://debugpointnews.com/wp-content/uploads/2023/02/opera.jpg
[2]: https://www.opera.com/
[3]: https://www.cnbc.com/2023/02/09/web-browser-opera-is-planning-to-incorporate-chatgpt.html

View File

@ -1,147 +0,0 @@
[#]: subject: "How to Use a Differential Analyzer (to Murder People)"
[#]: via: "https://twobithistory.org/2020/04/06/differential-analyzer.html"
[#]: author: "Two-Bit History https://twobithistory.org"
[#]: collector: "lujun9972"
[#]: translator: "toknow-gh"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Use a Differential Analyzer (to Murder People)
======
A differential analyzer is a mechanical, analog computer that can solve differential equations. Differential analyzers arent used anymore because even a cheap laptop can solve the same equations much faster—and can do it in the background while you stream the new season of Westworld on HBO. Before the invention of digital computers though, differential analyzers allowed mathematicians to make calculations that would not have been practical otherwise.
It is hard to see today how a computer made out of anything other than digital circuitry printed in silicon could work. A mechanical computer sounds like something out of a steampunk novel. But differential analyzers did work and even proved to be an essential tool in many lines of research. Most famously, differential analyzers were used by the US Army to calculate range tables for their artillery pieces. Even the largest gun is not going to be effective unless you have a range table to help you aim it, so differential analyzers arguably played an important role in helping the Allies win the Second World War.
To understand how differential analyzers could do all this, you will need to know what differential equations are. Forgotten what those are? Thats okay, because I had too.
### Differential Equations
Differential equations are something you might first encounter in the final few weeks of a college-level Calculus I course. By that point in the semester, your underpaid adjunct professor will have taught you about limits, derivatives, and integrals; if you take those concepts and add an equals sign, you get a differential equation.
Differential equations describe rates of change in terms of some other variable (or perhaps multiple other variables). Whereas a familiar algebraic expression like \\(y = 4x + 3\\) specifies the relationship between some variable quantity \\(y\\) and some other variable quantity \\(x\\), a differential equation, which might look like \\(\frac{dy}{dx} = x\\), or even \\(\frac{dy}{dx} = 2\\), specifies the relationship between a _rate of change_ and some other variable quantity. Basically, a differential equation is just a description of a rate of change in exact mathematical terms. The first of those last two differential equations is saying, “The variable \\(y\\) changes with respect to \\(x\\) at a rate defined exactly by \\(x\\),” and the second is saying, “No matter what \\(x\\) is, the variable \\(y\\) changes with respect to \\(x\\) at a rate of exactly 2.”
Differential equations are useful because in the real world it is often easier to describe how complex systems change from one instant to the next than it is to come up with an equation describing the system at all possible instants. Differential equations are widely used in physics and engineering for that reason. One famous differential equation is the heat equation, which describes how heat diffuses through an object over time. It would be hard to come up with a function that fully describes the distribution of heat throughout an object given only a time \\(t\\), but reasoning about how heat diffuses from one time to the next is less likely to turn your brain into soup—the hot bits near lots of cold bits will probably get colder, the cold bits near lots of hot bits will probably get hotter, etc. So the heat equation, though it is much more complicated than the examples in the last paragraph, is likewise just a description of rates of change. It describes how the temperature of any one point on the object will change over time given how its temperature differs from the points around it.
Lets consider another example that I think will make all of this more concrete. If I am standing in a vacuum and throw a tennis ball straight up, will it come back down before I asphyxiate? This kind of question, posed less dramatically, is the kind of thing I was asked in high school physics class, and all I needed to solve it back then were some basic Newtonian equations of motion. But lets pretend for a minute that I have forgotten those equations and all I can remember is that objects accelerate toward earth at a constant rate of \\(g\\), or about \\(10 \;m/s^2\\). How can differential equations help me solve this problem?
Well, we can express the one thing I remember about high school physics as a differential equation. The tennis ball, once it leaves my hand, will accelerate toward the earth at a rate of \\(g\\). This is the same as saying that the velocity of the ball will change (in the negative direction) over time at a rate of \\(g\\). We could even go one step further and say that _the rate of change in the height of my ball above the ground_ (this is just its velocity) will change over time at a rate of negative \\(g\\). We can write this down as the following, where \\(h\\) represents height and \\(t\\) represents time:
\\[\frac{d^2h}{dt^2} = -g\\]
This looks slightly different from the differential equations we have seen so far because this is what is known as a second-order differential equation. We are talking about the rate of change of a rate of change, which, as you might remember from your own calculus education, involves second derivatives. Thats why parts of the expression on the left look like they are being squared. But this equation is still just expressing the fact that the ball accelerates downward at a constant acceleration of \\(g\\).
From here, one option I have is to use the tools of calculus to solve the differential equation. With differential equations, this does not mean finding a single value or set of values that satisfy the relationship but instead finding a function or set of functions that do. Another way to think about this is that the differential equation is telling us that there is some function out there whose second derivative is the constant \\(-g\\); we want to find that function because it will give us the height of the ball at any given time. This differential equation happens to be an easy one to solve. By doing so, we can re-derive the basic equations of motion that I had forgotten and easily calculate how long it will take the ball to come back down.
But most of the time differential equations are hard to solve. Sometimes they are even impossible to solve. So another option I have, given that I paid more attention in my computer science classes that my calculus classes in college, is to take my differential equation and use it as the basis for a simulation. If I know the starting velocity and the acceleration of my tennis ball, then I can easily write a little for-loop, perhaps in Python, that iterates through my problem second by second and tells me what the velocity will be at any given second \\(t\\) after the initial time. Once Ive done that, I could tweak my for-loop so that it also uses the calculated velocity to update the height of the ball on each iteration. Now I can run my Python simulation and figure out when the ball will come back down. My simulation wont be perfectly accurate, but I can decrease the size of the time step if I need more accuracy. All I am trying to accomplish anyway is to figure out if the ball will come back down while I am still alive.
This is the numerical approach to solving a differential equation. It is how differential equations are solved in practice in most fields where they arise. Computers are indispensable here, because the accuracy of the simulation depends on us being able to take millions of small little steps through our problem. Doing this by hand would obviously be error-prone and take a long time.
So what if I were not just standing in a vacuum with a tennis ball but were standing in a vacuum with a tennis ball in, say, 1936? I still want to automate my computation, but Claude Shannon wont even complete his masters thesis for another year yet (the one in which he casually implements Boolean algebra using electronic circuits). Without digital computers, Im afraid, we have to go analog.
### The Differential Analyzer
The first differential analyzer was built between 1928 and 1931 at MIT by Vannevar Bush and Harold Hazen. Both men were engineers. The machine was created to tackle practical problems in applied mathematics and physics. It was supposed to address what Bush described, in [a 1931 paper][1] about the machine, as the contemporary problem of mathematicians who are “continually being hampered by the complexity rather than the profundity of the equations they employ.”
A differential analyzer is a complicated arrangement of rods, gears, and spinning discs that can solve differential equations of up to the sixth order. It is like a digital computer in this way, which is also a complicated arrangement of simple parts that somehow adds up to a machine that can do amazing things. But whereas the circuitry of a digital computer implements Boolean logic that is then used to simulate arbitrary problems, the rods, gears, and spinning discs _directly_ simulate the differential equation problem. This is what makes a differential analyzer an analog computer—it is a direct mechanical analogy for the real problem.
How on earth do gears and spinning discs do calculus? This is actually the easiest part of the machine to explain. The most important components in a differential analyzer are the six mechanical integrators, one for each order in a sixth-order differential equation. A mechanical integrator is a relatively simple device that can integrate a single input function; mechanical integrators go back to the 19th century. We will want to understand how they work, but, as an aside here, Bushs big accomplishment was not inventing the mechanical integrator but rather figuring out a practical way to chain integrators together to solve higher-order differential equations.
A mechanical integrator consists of one large spinning disc and one much smaller spinning wheel. The disc is laid flat parallel to the ground like the turntable of a record player. It is driven by a motor and rotates at a constant speed. The small wheel is suspended above the disc so that it rests on the surface of the disc ever so slightly—with enough pressure that the disc drives the wheel but not enough that the wheel cannot freely slide sideways over the surface of the disc. So as the disc turns, the wheel turns too.
The speed at which the wheel turns will depend on how far from the center of the disc the wheel is positioned. The inner parts of the disc, of course, are rotating more slowly than the outer parts. The wheel stays fixed where it is, but the disc is mounted on a carriage that can be moved back and forth in one direction, which repositions the wheel relative to the center of the disc. Now this is the key to how the integrator works: The position of the disc carriage is driven by the input function to the integrator. The output from the integrator is determined by the rotation of the small wheel. So your input function drives the rate of change of your output function and you have just transformed the derivative of some function into the function itself—which is what we call integration!
If that explanation does nothing for you, seeing a mechanical integrator in action really helps. The principle is surprisingly simple and there is no way to watch the device operate without grasping how it works. So I have created [a visualization of a running mechanical integrator][2] that I encourage you to take a look at. The visualization shows the integration of some function \\(f(x)\\) into its antiderivative \\(F(x)\\) while various things spin and move. Its pretty exciting.
![][3] _A nice screenshot of my visualization, but you should check out the real thing!_
So we have a component that can do integration for us, but that alone is not enough to solve a differential equation. To explain the full process to you, Im going to use an example that Bush offers himself in his 1931 paper, which also happens to be essentially the same example we contemplated in our earlier discussion of differential equations. (This was a happy accident!) Bush introduces the following differential equation to represent the motion of a falling body:
\\[\frac{d^2x}{dt^2} = -k\,\frac{dx}{dt} - g\\]
This is the same equation we used to model the motion of our tennis ball, only Bush has used \\(x\\) in place of \\(h\\) and has added another term that accounts for how air resistance will decelerate the ball. This new term describes the effect of air resistance on the ball in the simplest possible way: The air will slow the balls velocity at a rate that is proportional to its velocity (the \\(k\\) here is some proportionality constant whose value we dont really care about). So as the ball moves faster, the force of air resistance will be stronger, further decelerating the ball.
To configure a differential analyzer to solve this differential equation, we have to start with what Bush calls the “input table.” The input table is just a piece of graphing paper mounted on a carriage. If we were trying to solve a more complicated equation, the operator of the machine would first plot our input function on the graphing paper and then, once the machine starts running, trace out the function using a pointer connected to the rest of the machine. In this case, though, our input is just the constant \\(g\\), so we only have to move the pointer to the right value and then leave it there.
What about the other variables \\(x\\) and \\(t\\)? The \\(x\\) variable is our output as it represents the height of the ball. It will be plotted on graphing paper placed on the output table, which is similar to the input table only the pointer is a pen and is driven by the machine. The \\(t\\) variable should do nothing more than advance at a steady rate. (In our Python simulation of the tennis ball problem as posed earlier, we just incremented \\(t\\) in a loop.) So the \\(t\\) variable comes from the differential analyzers motor, which kicks off the whole process by rotating the rod connected to it at a constant speed.
Bush has a helpful diagram documenting all of this that I will show you in a second, but first we need to make one more tweak to our differential equation that will make the diagram easier to understand. We can integrate both sides of our equation once, yielding the following:
\\[\frac{dx}{dt} = - \int \left(k\,\frac{dx}{dt} + g\right)\,dt\\]
The terms in this equation map better to values represented by the rotation of various parts of the machine while it runs. Okay, heres that diagram:
![][4] _The differential analyzer configured to solve the problem of a falling body in one dimension._
The input table is at the top of the diagram. The output table is at the bottom-right. The output table here is set up to graph both \\(x\\) and \\(\frac{dx}{dt}\\), i.e. height and velocity. The integrators appear at the bottom-left; since this is a second-order differential equation, we need two. The motor drives the very top rod labeled \\(t\\). (Interestingly, Bush referred to these horizontal rods as “buses.”)
That leaves two components unexplained. The box with the little \\(k\\) in it is a multiplier respresnting our proportionality constant \\(k\\). It takes the rotation of the rod labeled \\(\frac{dx}{dt}\\) and scales it up or down using a gear ratio. The box with the \\(\sum\\) symbol is an adder. It uses a clever arrangement of gears to add the rotations of two rods together to drive a third rod. We need it since our equation involves the sum of two terms. These extra components available in the differential analyzer ensure that the machine can flexibly simulate equations with all kinds of terms and coefficients.
I find it helpful to reason in ultra-slow motion about the cascade of cause and effect that plays out as soon as the motor starts running. The motor immediately begins to rotate the rod labeled \\(t\\) at a constant speed. Thus, we have our notion of time. This rod does three things, illustrated by the three vertical rods connected to it: it drives the rotation of the discs in both integrators and also advances the carriage of the output table so that the output pen begins to draw.
Now if the integrators were set up so that their wheels are centered, then the rotation of rod \\(t\\) would cause no other rods to rotate. The integrator discs would spin but the wheels, centered as they are, would not be driven. The output chart would just show a flat line. This happens because we have not accounted for the initial conditions of the problem. In our earlier Python simulation, we needed to know the initial velocity of the ball, which we would have represented there as a constant variable or as a parameter of our Python function. Here, we account for the initial velocity and acceleration by displacing the integrator discs by the appropriate amount before the machine begins to run.
Once weve done that, the rotation of rod \\(t\\) propagates through the whole system. Physically, a lot of things start rotating at the same time, but we can think of the rotation going first to integrator II, which combines it with the acceleration expression calculated based on \\(g\\) and then integrates it to get the result \\(\frac{dx}{dt}\\). This represents the velocity of the ball. The velocity is in turn used as input to integrator I, whose disc is displaced so that the output wheel rotates at the rate \\(\frac{dx}{dt}\\). The output from integrator I is our final output \\(x\\), which gets routed directly to the output table.
One confusing thing Ive glossed over is that there is a cycle in the machine: Integrator II takes as an input the rotation of the rod labeled \\((k\,\frac{dx}{dt} + g)\\), but that rods rotation is determined in part by the output from integrator II itself. This might make you feel queasy, but there is no physical issue here—everything is rotating at once. If anything, we should not be surprised to see cycles like this, since differential equations often describe rates of change in a function as a function of the function itself. (In this example, the acceleration, which is the rate of change of velocity, depends on the velocity.)
With everything correctly configured, the output we get is a nice graph, charting both the position and velocity of our ball over time. This graph is on paper. To our modern digital sensibilities, that might seem absurd. What can you do with a paper graph? While its true that the differential analyzer is not so magical that it can write out a neat mathematical expression for the solution to our problem, its worth remembering that neat solutions to many differential equations are not possible anyway. The paper graph that the machine does write out contains exactly the same information that could be output by our earlier Python simulation of a falling ball: where the ball is at any given time. It can be used to answer any practical question you might have about the problem.
The differential analyzer is a preposterously cool machine. It is complicated, but it fundamentally involves nothing more than rotating rods and gears. You dont have to be an electrical engineer or know how to fabricate a microchip to understand all the physical processes involved. And yet the machine does calculus! It solves differential equations that you never could on your own. The differential analyzer demonstrates that the key material required for the construction of a useful computing machine is not silicon but human ingenuity.
### Murdering People
Human ingenuity can serve purposes both good and bad. As I have mentioned, the highest-profile use of differential analyzers historically was to calculate artillery range tables for the US Army. To the extent that the Second World War was the “Good Fight,” this was probably for the best. But there is also no getting past the fact that differential analyzers helped to make very large guns better at killing lots of people. And kill lots of people they did—if Wikipedia is to be believed, more soldiers were killed by artillery than small arms fire during the Second World War.
I will get back to the moralizing in a minute, but just a quick detour here to explain why calculating range tables was hard and how differential analyzers helped, because its nice to see how differential analyzers were applied to a real problem. A range table tells the artilleryman operating a gun how high to elevate the barrel to reach a certain range. One way to produce a range table might be just to fire that particular kind of gun at different angles of elevation many times and record the results. This was done at proving grounds like the Aberdeen Proving Ground in Maryland. But producing range tables solely through empirical observation like this is expensive and time-consuming. There is also no way to account for other factors like the weather or for different weights of shell without combinatorially increasing the necessary number of firings to something unmanageable. So using a mathematical theory that can fill in a complete range table based on a smaller number of observed firings is a better approach.
I dont want to get too deep into how these mathematical theories work, because the math is complicated and I dont really understand it. But as you might imagine, the physics that governs the motion of an artillery shell in flight is not that different from the physics that governs the motion of a tennis ball thrown upward. The need for accuracy means that the differential equations employed have to depart from the idealized forms weve been using and quickly get gnarly. Even the earliest attempts to formulate a rigorous ballistic theory involve equations that account for, among other factors, the weight, diameter, and shape of the projectile, the prevailing wind, the altitude, the atmospheric density, and the rotation of the earth[1][5].
So the equations are complicated, but they are still differential equations that a differential analyzer can solve numerically in the way that we have already seen. Differential analyzers were put to work solving ballistics equations at the Aberdeen Proving Ground in 1935, where they dramatically sped up the process of calculating range tables.[2][6] Nevertheless, during the Second World War, the demand for range tables grew so quickly that the US Army could not calculate them fast enough to accompany all the weaponry being shipped to Europe. This eventually led the Army to fund the ENIAC project at the University of Pennsylvania, which, depending on your definitions, produced the worlds first digital computer. ENIAC could, through rewiring, run any program, but it was constructed primarily to perform range table calculations many times faster than could be done with a differential analyzer.
Given that the range table problem drove much of the early history of computing even apart from the differential analyzer, perhaps its unfair to single out the differential analyzer for moral hand-wringing. The differential analyzer isnt uniquely compromised by its military applications—the entire field of computing, during the Second World War and well afterward, advanced because of the endless funding being thrown at it by the United States military.
Anyway, I think the more interesting legacy of the differential analyzer is what it teaches us about the nature of computing. I am surprised that the differential analyzer can accomplish as much as it can; my guess is that you are too. It is easy to fall into the trap of thinking of computing as the realm of what can be realized with very fast digital circuits. In truth, computing is a more abstract process than that, and electronic, digital circuits are just what we typically use to get it done. In his paper about the differential analyzer, Vannevar Bush suggests that his invention is just a small contribution to “the far-reaching project of utilizing complex mechanical interrelationships as substitutes for intricate processes of reasoning.” That puts it nicely.
_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][7] on Twitter or subscribe to the [RSS feed][8] to make sure you know when a new post is out._
_Previously on TwoBitHistory…_
> Do you worry that your children are "BBS-ing"? Do you have a neighbor who talks too much about his "door games"?
>
> In this VICE News special report, we take you into the seedy underworld of bulletin board systems:<https://t.co/hBrKGU2rfB>
>
> — TwoBitHistory (@TwoBitHistory) [February 2, 2020][9]
1. Alan Gluchoff. “Artillerymen and Mathematicians: Forest Ray Moulton and Changes in American Exterior Ballistics, 1885-1934.” Historia Mathematica, vol. 38, no. 4, 2011, pp. 506547., <https://www.sciencedirect.com/science/article/pii/S0315086011000279>. [↩︎][10]
2. Karl Kempf. “Electronic Computers within the Ordnance Corps,” 1961, accessed April 6, 2020, <https://ftp.arl.army.mil/~mike/comphist/61ordnance/index.html>. [↩︎][11]
--------------------------------------------------------------------------------
via: https://twobithistory.org/2020/04/06/differential-analyzer.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://twobithistory.org
[b]: https://github.com/lujun9972
[1]: http://worrydream.com/refs/Bush%20-%20The%20Differential%20Analyzer.pdf
[2]: https://sinclairtarget.com/differential-analyzer/
[3]: https://twobithistory.org/images/diff-analyzer-viz.png
[4]: https://twobithistory.org/images/analyzer-diagram.png
[5]: tmp.MoynZsbJ7w#fn:1
[6]: tmp.MoynZsbJ7w#fn:2
[7]: https://twitter.com/TwoBitHistory
[8]: https://twobithistory.org/feed.xml
[9]: https://twitter.com/TwoBitHistory/status/1224014531778826240?ref_src=twsrc%5Etfw
[10]: tmp.MoynZsbJ7w#fnref:1
[11]: tmp.MoynZsbJ7w#fnref:2

View File

@ -1,101 +0,0 @@
[#]: subject: "How curiosity helped me solve a hardware problem"
[#]: via: "https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin"
[#]: author: "David Both https://opensource.com/users/dboth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How curiosity helped me solve a hardware problem
======
Curiosity fuels the quest for knowledge and truth, whether it's about
hardware, open source software, programming, building a PC, optimizing
settings, or just learning a new application.
![Puzzle pieces coming together to form a computer screen][1]
I typically have a dozen computers up and running on my home network—yes, 12. And I am responsible for several more in other locations. With so many computers, there are always failures of various types, and I ultimately diagnose many of them as hardware problems. But it can be difficult to diagnose which hardware component is causing the issue.
Just this week, I had a perplexing problem that I misdiagnosed the cause of on my primary workstation—twice. This article takes you through the process I followed. I show you where and why I went down the wrong path and how easy it can be to do so.
### The first symptoms
I have been working on several projects. Recently, I had many applications open on multiple desktops and was just starting to work when the display went blank. Most (not all) of the fans in my primary workstation came to a stop, and I sucked in a deep breath. I'd never seen anything quite like this before, but I did know that my system was in trouble.
There were two primary clues I had to work with. The display went dark, and several fans had stopped. However, the front-panel power and disk activity LEDs were still on, although at a lower brightness level than usual. Most of the decorative RGB LED lights on my motherboard, memory DIMMs, and fans also went out.
I tried the power and reset buttons with no results. I turned off the power supply directly using the PSU rocker switch. Powering it back on resulted in the same set of symptoms.
### Initial thoughts
These symptoms and decades of experience with all kinds of failures pointed me to the power supply.
I removed the power supply and used my PSU tester to check it. The tester indicated that the PSU was good, and all voltages were within specs. However, I knew the tester could be wrong. PSU testers do not test under full load conditions such as those that exist when the computer is running and drawing a few hundred watts of power. I went with my gut and installed my spare 1000W power supply.
With an average of 12 computers in my home network, I have learned to keep plenty of spare parts on hand. It saves a lot of frustration that I don't have to run to the local computer store or order online and wait for delivery when things break—and things are always breaking with that many computers around.
That replacement power supply solved the problem despite the result I got from the PSU tester. Even though the tester has been correct many times in the past, my experience, my knowledge, and my gut told me differently.
Unfortunately, my gut instinct was wrong.
### Second thoughts
My workstation was exhibiting the same symptoms again. It is very unlikely that two different PSUs would fail exactly the same way.
Next idea: It had to be the motherboard. I don't keep spare motherboards around, so I ordered a new one online and figured that I could use extra memory I already had and move the CPU to the new motherboard along with its all-in-one liquid cooling unit.
### Disciplined troubleshooting
The new motherboard would take a couple of days to arrive, so I decided to prepare by removing the old one from the workstation. But before I unplugged the power feeds to the motherboard, my curiosity took over and forced me to power on the system with only the motherboard, CPU, and memory installed. I had disconnected everything else.
Good troubleshooting demands that you isolate all potential variables, and all I'd done so far was test the PSU. I had to test every component.
This process required me to disconnect the front panel cables for sound and the dashboard media panel that includes various USB, SATA, and memory card slots.
With just the motherboard connected, I got a surprise: Everything worked as normal!
The computer itself wouldn't boot because there were no connected storage drives, and nothing was displayed because I had removed the display adapter. But there were no symptoms of either power or motherboard failure. That piqued my curiosity even more. If the motherboard were truly bad, the symptoms would still exist.
So I started a sequence of powering off, reinstalling one of the removed components, and powering back on.
It turns out that the front panel media dashboard caused the symptoms.
I removed the media dashboard and plugged everything else back in. My workstation booted up properly and performed as expected. I had identified the culprit.
### How it started
Having figured out the actual problem, I immediately understood the root cause. It had started a couple of days previously. I was working with and testing several external USB devices, including various cameras, storage devices that I use for backups, and an external USB hub.
I picked up one USB cable and plugged it into a USB 2.0 slot on the media dashboard. Everything ground to a halt, and most of the lights and fans went out. I unplugged the USB cable, which was now very hot, and burned my fingers. I had inadvertently plugged the type C end into the USB 3.0 type A socket, which had shorted the power.
After unplugging the USB cable, everything went back to "normal"—except it didn't. The media dashboard lasted a few more days and then shorted out completely, having been weakened by my careless mistake.
### Jumping to conclusions
Knowledge and experience can sometimes count for more than tools like PSU testers. Except when they don't. I eventually found the actual cause of the problem, but I should have seen it sooner.
Although I was correct about this being a power problem, I was sidetracked by not correctly reading the symptoms and following that line of inquiry to its logical conclusion. I could have isolated the true cause of the problem sooner than I did and saved the time I spent configuring my laptop to be a temporary primary device until I could fix my primary workstation.
Sysadmins work with complex devices, and it can be easy to jump to conclusions. I have over 50 years of experience in the computer industry, and I still do it. I just need to remember to take a few deep [yoga breaths][2] and keep digging until I isolate the root cause of the problem.
### Curiosity
At least I followed my curiosity while waiting for the replacement motherboard to arrive. That allowed me to return things to normal much sooner than had I waited until the new motherboard arrived. And I might have discarded a perfectly good motherboard by not testing it further.
There is a saying about curiosity killing the cat. I hate that saying because it is all too frequently used by parents, colleagues, pointy-haired bosses, teachers, and others who just want us curious folk to leave them alone. In reality, curiosity fuels the quest for knowledge and truth, whether it's about hardware, open source software, programming, building a PC, optimizing settings, or just learning a new application. Feed your curiosity!
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin
作者:[David Both][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/dboth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen)
[2]: https://opensource.com/article/21/11/linux-yoga

View File

@ -1,134 +0,0 @@
[#]: subject: "“Its time to contribute to open source”"
[#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/"
[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/"
[#]: collector: "lkxed"
[#]: translator: "XiaotingHuang22"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
“Its time to contribute to open source”
======
Nilesh Vaghela is an AWS community hero and founder, ElectroMech Corporation, a cloud and open source company. According to him, contributing to open source is a rewarding act in itself. However, it needs commitment and there are many steps involved in the process, right from selecting a project to ensuring your contribution is noticed. In a conversation with Abbinaya Kuzhanthaivel of OSFY, he shares a few tips on how developers can help to improve Indias contributions to open source.
![Nilesh Vaghela,
AWS community hero and
founder, ElectroMech Corporation][1]
##### Q. Can you tell us a bit about your current role and contributions to open source.
**A.** I am currently an architect working on automation. I lead multiple teams and also contribute majorly to Invinsense, an open source security service platform. I started open source groups in early 1998 and had around 1500 members even then. A group (https://groups.google.com/g/vglug) I am handling now has been very active since 2014-15.
##### Q. How did you start working with open source projects?
**A.** I am a mechanical engineer by qualification, and was dealing with modems and UPS systems at my firm ElectroMech Corporation. I slowly got dragged into handling PCs, networking and Linux. I started experimenting in 1996 after getting inspired by seeing over 150 computer servers running on Linux at a Nuclear Science Centre. Thats when I converted my company entirely, focusing on open source for training and support.
I can proudly say that I was one of the first and early adopters of open source — helping customers to understand what is open source, what are its benefits, whats available for free, security or code issues, and so on. We got at least four or five customers in Vadodara supporting us, and we eventually promoted ourselves through advertisements in the Yellow Pages. We partnered with Red Hat and the journey continues till now.
##### Q. How do you think open source has evolved since then?
A. I can say that, earlier, open source was a passion that fascinated and attracted people to participate. I was particularly impressed hearing user-friendly stories across the world when some Siberian contributors were working to improve water scarcity. It was more like a corporate social responsibility (CSR) activity. A board would be created by people and experts to govern and take projects forward. People would come in for the love of technology without expectations.
I did not believe then that open source could get commercial, but it is the driving force for most of the innovation and technology today, and many more enterprises are adopting it. We are looking forward to a great balance in contribution to and use of open source, as we have people, communities and big companies coming into play. This is the real future and power of open source.
##### Q. Could you share some of your challenges?
A. Initially, I walked alone but people joined once they knew my intentions were good. I created a lot of communities without any expectation, but did get paid indirectly in terms of reputation or fame; some people understood that I was a technical expert and gave projects in the long term. As it was very early days, people started joining the community and contributing without much effort. The goal wasnt to get business and hence I can say I didnt really face any hurdles.
##### Q. What are your leadership mantras and lessons from being a community leader?
**A.** First, if you want to start a community, then be neutral and dont harbour a biased opinion. It may look like you are running a community as a leader, but remember those joining you are contributing equally. And never demotivate anyone. Be polite while making comments and addressing queries. Whatever the question, if you dont want to give an answer, then choose to be quiet. But dont stop anyone from asking. Help them build expertise.
Second, dont involve the community in business. Do not mix and match the goals of your business and community. Have a clear differentiation.
Always try to encourage people to participate instead of delivering instructions as an expert. If you find people are interested to lead and take initiatives, then give them the stage. Invite and engage them in the community. That will help you to make more community leaders. Also, keep your community simple and dont involve sponsors in the initial stages.
##### Q. Who do you look up to for inspiration?
**A.** Richard Stallman, the father of the open source movement, is my inspiration and I have always admired his projects.
Apart from him, I have an interesting incident to share that inspired me to work on open source. At the time when I started working on open source, most of the software for the Nuclear Science Centre was based on the Windows OS. However, many scientists wanted to work with Linux based software. And within two or three months, they actually created Linux drivers. This is what fascinated me that the user can create these drivers which may not be possible in the case of proprietary software. I really liked the fact that open source empowered the user.
##### Q. Your thoughts on the open source landscape in India and the scope for improvement.
**A.** India is the largest consumer of open source and we are focusing on becoming a contributor. With so many developers around, we still do not have software giants in India. What we have mostly are service providers and not innovators. More people should become contributors to open source and develop something with international labels.
The very thought of contributing to open source should begin from the level of schools and colleges. Fortunately, the Gujarat government has already introduced lessons based on Linux from Class 8 to Class 10. It is important to educate and make youngsters aware of open source models.
Second, we have to develop good mentors. When people start contributing, it is important to find an open source mentor working in that particular project. The mentor gives a small assignment, tries the code and then commits it. If everything goes fine, the contribution is increased gradually. Unfortunately, we have very few mentors available in India. We need to prepare a lot of mentors or maybe connect to those across the world.
Third, we need to encourage those who come forward to contribute. Once you are a recognised developer or a person contributing to open source development, you also progress in your career and business.
India can be a major contributor to open source by following such simple methods.
##### Q. What do you think about the coding requirements to contribute to open source?
**A.** From my experience, if you know the internal parts, how to develop the application, what code standard you should maintain, and how to manage the team and other best practices, you may not have to actually worry about coding expertise.
There are other roles too with respect to designing, security maintenance and integration. See what works for you. Develop and strengthen your skill in what you like to do. If you feel coding still interests you, then take the support of fellow developers to learn it.
##### Q. How do you shortlist a project you would like to contribute to?
A. You need to understand your top few interest areas and then do your research on the projects happening around them. You need to figure out the area of requirements or openings for contributors and more volunteers. You can start small to practice and then build expertise.
Avoid going by the trendy topics; whats important is your individual interest. For instance, DevOps is in high demand now and you may tend to go for a DevOps project. Do not make this mistake.
You can find open source projects on Cloud Native Computing Foundation ([CNCF][2]), Apache, Fedora, Red Hat, and so on. This way you can also find mentors who are already working on projects and can get proper guidance.
##### Q. Projects have their own purpose and target audience. Sometimes they even misalign with open source goals. So, what does one check before contributing?
A. I agree it becomes challenging when somebody starts an open source project and then commercialises it. But this is always a risk, and should not discourage you.
First try to check out the group — how popular are the contributors working in the group, how long have they been contributing, and how reputed are they. And once you join, observing everyone and everything is the key. Try to learn at least for three to six months, and understand how everything works. You can always leave the project if you find the intention is wrong. But if you feel its all right, then go ahead and contribute.
![The team at ElectroMech Corporation][3]
There are certain licence checks that you can do, say, like GPL version 3. You can also look at unmodified licence versions like the Apache open source licence.
##### Q. Do you think big companies will accept contributions from freshers?
A. Yes, of course. Companies also like mentoring. They usually dont allow you to contribute directly, but may give you a small assignment initially. A mentor will first try to understand what skill you have and how good you are at it. Once they recognise you have the kind of skill that is needed, they will continue to guide you or assign you to some other mentor based on your skill. The initial stages are very crucial. Many companies do some sort of screening, and you may be allowed to contribute only after you have proved your ability.
##### Q. What are the initial challenges that contributors have to overcome when picking up projects?
A. First, you should be very serious about your contribution. There are no written commitments and contributors may tend to take the work lightly. Thats totally wrong. Try to dedicate 8-10 hours or whatever is feasible each day. If you are skipping this commitment because you feel there are no immediate returns, then you will not be a good contributor.
Always adhere to a mentors guidance strictly at the initial stages. This is very crucial for a healthy contribution. Sometimes it may happen that you believe you are good at something, while your mentor may not assign a project based on that skill. Simply approach your mentor in such scenarios and ask him what you should do, what is your role, and how you can contribute.
##### Q. Many developers do not get replies after submitting the contribution to a project. How does one make a submission noticeable?
A. Write a small blog on the project you are planning to contribute to, covering aspects like what you like in it, what you dont like, and what can be improved. Such a positive and promotional approach can greatly help you.
Be a part of the group and be involved in activities related to that particular project. Instead of contributing, first try to engage with the group, and this will increase the chances for you to get adopted as a contributor.
Once you have a better understanding of the project, not only will your work be accepted but you will be able to better align yourself with that project.
##### Q. How do you overcome a situation where your contribution is not accepted?
A. Just understand that this can happen for many reasons — maybe you are not in the right project or you have not contributed correctly. If the project is country driven, your request may not be accepted. Hence, remember to have a checklist as stated earlier. Dont worry if your contribution is not accepted because either you are not fit for the project or the project is not fit for you.
All I would recommend is try to identify four or five projects, and at least one among those projects you work on will probably be accepted.
##### Q. What is your message for our readers?
A. Open source is the driving force behind most of the innovation happening today. Instead of just using open source, let us try to contribute according to our capacity and skills. Contributions can be in terms of code, documentation, testing, blogs, money, etc. Its time to contribute.
##### Q. Any hiring plans for ElectroMech Corporation — what are the roles and skill expectations?
We have requirements in cloud DevOps, and are hiring cloud architects, Python developers, Linux architects and security professionals.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/
作者:[Abbinaya Kuzhanthaivel][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.opensourceforu.com/author/abbinaya-swath/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nilesh-Vaghela-AWS-community-hero-and-founder-ElectroMech-Corporation.jpg
[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwib2vvv3dv3AhVa7XMBHfZSCsIQFnoECAgQAQ&url=https%3A%2F%2Fwww.cncf.io%2F&usg=AOvVaw2LnRyH4SZPDHntRLJU_b3q
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/The-team-at-ElectroMech-Corporation.jpg

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/10/whats-new-awk"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "connermemory"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,99 +0,0 @@
[#]: subject: "A brief history of LibreOffice"
[#]: via: "https://opensource.com/article/23/2/libreoffice-history"
[#]: author: "Italo Vignoli https://opensource.com/users/italovignoli"
[#]: collector: "lkxed"
[#]: translator: "onionstalgia"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A brief history of LibreOffice
======
In early 2009, OpenOffice.org was the main competitor to Microsoft Office in the individual office productivity suites market. The popular open source office suite's community looked forward to a November conference in Orvieto, Italy. Things were going well, and the future looked bright.
And then, in April of that year, Oracle announced its plans to acquire Sun Microsystems.
Personally, I knew it was bad news for OpenOffice.Org. Oracle had no interest in the open source suite, and I felt confident it would abandon the project. Of course, I hoped to be proved wrong at the upcoming conference. Instead, a single representative from Oracle, with no budget to speak of, arrived in Orvieto and talked vaguely about monetization and re-branding. I felt that my worst fears were confirmed, and my fellow community members agreed.
The community returned home from Orvieto that year and resolved to take action. The time had finally come to turn into reality what the OpenOffice.Org project had promised. We were determined to create an independent foundation to manage the project's assets and promote the development of the suite under the umbrella of the community. OpenOffice.org would no longer belong to a company but to its users and individual contributors.
### Building the foundation
At the time, the OpenOffice.org project had a presence on every continent, with language communities helping to localize and promote it. The four most important:
- German: The software was born in Germany, and StarDivision was based in Hamburg, so there was a natural link between the group of developers and German-speaking supporters.
- French: The government supported the open source software.
- Italian: The group to which I belonged.
- Brazilian
At the beginning of 2010, at the initiative of the French and German language communities, the most active volunteers—together with some independent and SUSE developers—started working on a fork project. The aim was to launch an alternative project involving both the global community and the companies invested in OpenOffice.org.
I have over 30 years of experience working in international business and consultancy agencies. The project brought me in to manage the marketing and communication strategy.
In the months that followed, activity became increasingly hectic. There was a weekly teleconference meeting, as the news coming in from Star Division (the department responsible for OpenOffice.org) was increasingly negative.
Even with the dissolution of OpenOffice.org seemingly imminent, a conference in Budapest was confirmed by the publication of a CFP (Call for Papers). Of course, the fork project members also did nothing different from previous years. They presented their talk proposals and made travel plans.
### A safe place for documents
At the beginning of the summer, the fork was almost ready. Our group met in Budapest to gauge the situation from the OpenOffice.org side and for a first face-to-face organizational meeting.
The Budapest conference ran smoothly, with meetings, keynotes, and technical sessions taking place over the three-day event. Everything seemed more or less normal.
Everything was not normal.
Some attendees were a little suspicious when several leading figures failed to attend the conference's main social event, an overnight cruise on the Danube. We didn't participate in this event because we were meeting in a restaurant to discuss the final details of a new foundation. There was a lot to get right. We had to determine an announcement date and the composition of the Steering Committee that would coordinate the tasks required to bring the foundation to life.
### LibreOffice
The three weeks between the conference and the announcement of LibreOffice were hectic. I prepared the launch strategy and the text of the press release. The developers prepared the software. The application's name had just been decided a few days earlier during a teleconference (which I'd joined from Grosseto, where I was attending the Italian open source software community meeting).
On September 28, 2010, I distributed the press release announcing The Document Foundation and LibreOffice to a global mailing list of about 250 journalists, which I painstakingly put together using input from the public relations agencies where I worked.
Here is the release:
> The community of volunteers developing and promoting OpenOffice.Org announces an independent foundation to drive the further growth of the project. The foundation will be the cornerstone of a new ecosystem where individuals and organisations can contribute to and benefit from the availability of a truly free office suite. It will generate increased competition and choice for the benefit of customers and drive innovation in the office suite market. From now on the OpenOffice.Org community will be known as The Document Foundation.
We invited Oracle to become a member of the foundation and donate the brand the community had grown during the previous ten years. Pending the decision, we chose the brand LibreOffice for the software going forward.
Reactions to the announcement from the press were very positive. On the other hand, companies and analysts tended to be suspicious of an office suite governed by a community, an entity they never fully understood because of its flat, meritocratic organization.
In the two weeks following the announcement, 80 new developers joined the project, disproving the predictions of those who considered it unrealistic to launch a fork relying only on SUSE and Red Hat developers. Unsurprisingly, most of the language communities switched to LibreOffice.
LibreOffice is built from the source code of OpenOffice.org. The new functionalities are integrated in the source code of Go-OO and not on OOo.
For this reason, the first version of LibreOffice—announced on January 25, 2011—was 3.3 to maintain consistency with OpenOffice.org. This was useful for users who had migrated to the new suite since the first version. The software was still a little immature due to significant technical debt that had to be accounted for. This caused problems and instability that would largely be corrected through code cleaning and refactoring throughout the 3.x and 4.x versions. By versions 5.x and 6.x, the source code was considered stable, which allowed the user interface to be improved and the development of mobile and cloud versions.
In the spring of 2011, Oracle transferred the OpenOffice.org source code to the Apache Software Foundation. The project lasted for three years. The last new version was nearly a decade ago.
### The future is open
The formation process of The Document Foundation ended in early 2012, with registration by the Berlin authorities on February 17, 2012. This was a lengthy process because the founders wanted volunteer members of the project also to be members of the foundation based on contributions. This detail hadn't been foreseen for foundations under German law, so it required several revisions of statutes to comply with this condition.
The foundation's first two activities were the membership committee's election. This is the structure that decides on the transition from mere volunteer to member of The Document Foundation on the basis of contributions. There are five members and three deputies. Finally, there's a Board of Directors, which steers the foundation administratively and strategically, consisting of seven members and three deputies.
At the end of 2012, the foundation hired its first employee. This employee was Florian Effenberger, who was later promoted to executive director. Today, the team has a dozen members who take care of day-to-day activities such as coordinating projects, administration, network infrastructure management, software releases, mentoring of new developers, coordination of quality assurance, user interface evolution, and marketing and communications.
Right now, the foundation is looking for developers to handle tasks that do not fit the objectives of enterprise customers, such as RTL language management and accessibility. These features aren't developed by the companies in the LibreOffice ecosystem, which offer them feature development services, Level 3 support, and Long Term Support versions of the software optimized for enterprise needs.
More than 12 years after the announcement of LibreOffice and The Document Foundation, we can say that we have achieved our goal of developing an independent free and open source (FOSS) project. Our project is based on an extended community of individual volunteers and companies contributing according to their abilities. These participants help create the unmatched free office suite and support open standards by adopting and evolving the only true standard office document format on the market (Open Document Format, or ODF) while also ensuring excellent compatibility with the proprietary OOXML format.
The sustainability of this model is a day-to-day problem. There's severe competition from big tech firms. We're always searching for a balance between those who would like everything to be cost-free and those who would like each user to contribute according to their ability. No matter what, though, LibreOffice is an open source office suite, providing added value above and beyond its competition.
Try LibreOffice. Donate. Support it at home and work. Tell your friends about it. LibreOffice is the open source office solution that ensures you always have access to your data and control over your creativity.
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/libreoffice-history
作者:[Italo Vignoli][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/italovignoli
[b]: https://github.com/lkxed/

View File

@ -0,0 +1,305 @@
[#]: subject: "A 10-step guide for a successful hackathon"
[#]: via: "https://opensource.com/article/23/2/hackathon-guide"
[#]: author: "Tiffany Long https://opensource.com/users/tiffany-long"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A 10-step guide for a successful hackathon
======
Hackathons are easy. How much thought do you need to put into them anyway? Just set a date, and people will show up. Well, that is not quite true!
While you may get lucky with that approach, the reality is that hackathons are a keystone experience in the tech industry, and attendees have specific expectations. Not only that, but your organization also has certain needs and should set goals for a hackathon. So, how do you ensure that a hackathon works for your organization and attendees?
A successful hackathon depends on several decisions that tend to be recursive. Decisions about what you want to achieve will impact what resources you allot and how you want to communicate. Those decisions affect whether you go virtual or in person, and that decision will once again impact the resources you need and how you communicate. Alignment when planning hackathons is not just about getting people to agree. You will have a whole suite of decisions that must internally align. For example, a technically difficult hackathon might not be able to attract a large audience (ask me how I know!) and will require a specialized recruitment strategy that requires different resources.
I've done many hackathons over the years, including just a few months back, when my organization hosted a hackathon that led to new features that we will incorporate into the next version of our open source product, Traefik Proxy 3.0. So, trust me when I say planning a hackathon that will enrich attendees and create valuable outcomes for your project is about more than hope, pizza, and chaos.
This article uses the most recent Traefik Labs Hackathon as a blueprint. I share a checklist, tips, and tricks to help you identify your objectives, plan, manage the contest and compensation, share your results, and manage the long tail of the hackathon (the work isn't over when the hackathon ends!)
This guide serves as a model for you to outline best practices so that you, too, can hold a successful hackathon with a sizable target audience that delivers results!
- [Three questions to determine your goals][1]
- [Why are you doing this?][2]
- [Who is your audience?][3]
- [How are you measuring goals?][4]
- [Decide on in-person vs. virtual][5]
- [Build your communication strategy][6]
- [Decide on the prizes][7]
- [Swag it up][8]
- [Get the word out][9]
- [Managing the long tail][10]
**[ Get a PDF and EPUB version of this article. [Download it here.][11] ]**
### 1. Three questions to determine your goals
The first and most crucial step is to set your goals. But this is no simple affair. Before you set goals, you need to coordinate internally on multiple fronts and ask questions such as:
- Why do you want to do a hackathon?
- Who do you want to attend?
- How are you going to measure your success?
#### Identify your internal stakeholders and set expectations
**Hackathons are cross-functional**. No hackathon is run by a community person alone. It is important to ensure everyone is aligned on the goals, what is required to achieve them, and that the necessary resources are committed. This probably sounds super corporate, but these functions exist even within the smallest projects. A project needs adoption and code. It also needs value decisions based on who will be using it. And, of course, projects need passionate contributors.
**Hackathons require cross-functional resources**. One team with a single set of resources cannot successfully run a hackathon. The organization must make various resources available, including:
- Marketing for planning and outreach.
- Product Management for product and industry-specific insight.
- Engineering for deep technical knowledge and community engagement.
For these reasons, hackathons usually support cross-functional goals. Your Community Team, for example, might want to build ownership and convert users to active community members. The Marketing Team might want to enhance awareness and court new users. The Engineering Team might need new perspectives on specific needs or challenges. The Product Team might have goals or no-go areas the community should be aware of.
And last but not least, the hackathon budget is cross-functional. I am sorry to inform you, but hackathons ain't free! Your largest expense is always the dedicated time of your team.
### 2. Why are you doing this?
Setting your goals is the most important part of a successful hackathon. If you don't know what you want to do or why a hackathon is important, at best, it will have a ton of wasted potential and be a disconnected mess at worst.
Communities feed off of ownership. Decide what you need from your community and what ownership stake you want community members to have. Without a clear understanding of this, your hackathon might not reach its full potential in empowering your community.
Be very careful with your hackathon design and goals. Different types of hackathons appeal to different skill levels. If the code you're looking for is very advanced, take the extra time to court the right audience and accept that it will include less overall attendance. Cast a wide net if the contributions can vary in skill and experience.
#### Are you hosting a hackathon to get code and build your project?
- Sometimes, projects hit a critical juncture or acquire a lot of excitement around them, and you want to harness the energy to build something together. A hackathon is a great way to achieve this!
- If you have an active community of users, a hackathon can bring everyone together at the same time to harness that excitement to feed the creative energy of your group.
**Note:** This is more easily achievable with smaller groups who know each other and have a shared experience with the project. You also need to carefully evaluate the skills required to build your project.
#### Are you hosting a hackathon to build your community or re-engage them?
- Maybe you are just building your community or noticed that your community needs a little juice. Hackathons are exciting, and they can help bring that back.
- Above, I said, "Communities feed off of ownership." If your community members do not feel they have a stake or that their needs and voices matter, they will drift away. This is common when projects grow and become more formalized. As the barrier to entry rises, the ability for community members to feel ownership falls, and the project becomes like a product to the user. One way to enhance community membership is by creating events that engage users and lower the bar for entry: Bug round-ups, light requests, and longer timelines.
- Perhaps your user community is growing, but the contributor community is becoming more specialized as your tech becomes more complex. In this case, you need to court sophisticated technologists who understand your tech and the use cases. Look for community members who use your tech in their jobs—especially at companies with large or complex deployments. These people are more likely to understand the needs of users and of the tech itself. They will also have suggestions for significant and valuable enhancements.
- You are free to choose goals that build your community and match your team and community members' energy and time. For example, at Traefik Labs, a hackathon aimed at enthusiastic folks with a small time commitment might target our Plugin Catalog. However, when looking for larger contributions or contributions that take significant expertise, we might target advanced technologistsespecially those we know.
#### Are you hosting a hackathon to celebrate something?
- Hackathons are a great way to celebrate a new launch and hype your community. For example, that is exactly why we hosted the [Traefik Proxy 3.0 Hackaethon][12].
- Hackathons are also great for getting the word out about a new product capability. The [Traefik Plugin Hackaethon][13] is an excellent example here.
- Maybe you want to organize an event to celebrate your top contributors. Do it with a hackathon! Take a look at [this hackathon organized by HackerOne][14]. And if you're thinking, "but this is not about open source software (OSS), how can it be a hackathon?" I've got news for you—hackathons are not just for OSS! Hackathons are for creating with a large community.
#### Are you hosting a hackathon to build awareness?
Hackathons are a great place to begin if you are just starting and want to build awareness around your product/brand. However, there are a few conditions.
- Laser-focused goals and big contributions are unlikely to happen at this stage. Go for a softer, broader focus, and minimize the work required by attendees.
- Reach out to new community members, less experienced users, and users with less exposure to your specific project.
#### Are you hosting a hackathon to connect to users?
I can think of no better way to connect new users to your project than a hackathon. Not only will your users become intimately familiar with your project, but hackathons also have a unique way of engendering a sense of ownership, rarely achievable through other types of events.
### 3. Who is your audience?
Assuming you have pinpointed why you want to host a hackathon and what you want to achieve, it's time to assess the characteristics that a participant needs to be successful. Use your decisions about your goals to identify your audience to ask what type of community member can help you achieve your objectives. Use the list of comparisons below:
- Highly-skilled vs. mixed-skilled vs. low-skilled
- Specialized vs. generalized skill
- Intensive time vs. less intensive time
- Individual contributions vs. group contributions
Your most active community members must look a bit like your target audience.
You might rethink your goals if your target audience doesn't align with at least 80% of the people you know you can attract. Accurately identifying your target audience will go a long way to making your communication strategy around the hackathon and the hackathon itself more successful.
### 4. How are you measuring goals?
Perfect, now that you answered the first two big questions and have your goals laid down, it's time for the third big question—how will you measure those goals? Inspiring your internal teams and your community to work together in building the future of your project, engendering ownership, and increasing engagement are awesome, but you can't determine success if you can't measure your goals.
#### What does success look like immediately after the event?
- A major sign of success is whether attendees connect and engage with each other, co-educate, and build teams during their hackathon.
- Were mentorships built? Through partnership, did several newer users grow into skilled mid-level users, or did mid-level users evolve into expert-tier users? This is the gold ring of success indicators.
- Did your partner organizations (maybe universities) request future hackathons or other events?
- Clearly, the first sign of success is that your attendees had an overall good experience and are motivated to engage more with your project.
- If you are looking for outreach, set a quantity of participants to shoot for and a number of participants who return to contribute more after the event or in three months.
- If building awareness, you might also look for successful follow-up chatter. Who wrote blog posts? Were attendees talking about it on social media?
- If you are looking for contributions, did they work for you? Are these the contributions you want? Did they impact how your team thinks about the problems they face? Will you have ongoing collaborations with these contributors?
#### What will denote success three months after the event?
Defining benchmarks for long-term success is just as important. Here are a few examples of what could indicate long-term success:
- Your hackathon should increase the number of returning contributors to your project. The goal is to get people hooked. If people new to your project came from the hackathon and stayed as users, or if your existing users became more active, you know you won.
- Hackathons are great as self-contained events, but they are supremely valuable as marketing content. They build trust in the community, showing you are responsive and value community input. They are fun loci of activity that let community members bond and look forward to the future, and they are aspirational. People love to see others celebrated and plan to achieve that celebration in the future.
- When you build marketing content around your hackathon (or better yet, others build content around your hackathon), you can expand your reach among second-degree connections.
- Tall poppy syndrome is a shame. Hackathons are a great opportunity to gather those participants who stood out and galvanize them to do other cool things and spread the word about your project.
### 5. Decide on in-person vs. virtual
I know what you're thinking—is in-person even a consideration? We've all gotten so used to doing everything virtually in the post-covid world. So, are the days of in-person gone? I would argue no, they are not. With care and safety measures in place, in-person events are the heart and soul of hackathons.
- In-person means no distractions, lots of pizza, and energy drink-fueled friendship.
- In-person fuels group participation rather than individual contributor participation.
- In-person works well at scale and in miniature: Organizing in-person hackathons for large groups brings high energy and rewards. But they can get quite costly. If you want to organize a large-scale hackathon, you'll be more successful if you target less experienced developers (students, clubs, new careerists) because these folks have the most time and the most to gain when demonstrating their skill and passion.
- In-person also works well for small groups and is great for intense planning and iteration—long nights with new and old friends, usually over food and beer!
And while many pros come with in-person hackathons, it doesn't mean that the virtual experience only comes with cons. Granted, nothing replaces that feeling of late nights with pizza, off-the-cuff remarks that end up changing your entire project, and a friendly set of eyes over your shoulder as you test or debug. But...
- Virtual means you can get a wider group of participants at a significantly lower cost.
- Virtual respects disability.
- Virtual is geolocation friendly.
- Virtual allows for higher individual contributor participation.
- Virtual offers more flexibility in the style and length of the event you cannot have a month-long in-person event!
#### Timelines of virtual hackathons
Did you decide to do a virtual hackathon? Great! Now, you need to determine the type of virtual hackathon you want. Do you envision a prolonged or intensive timeline? Keep in mind that the type of [virtual hackathon][15] you choose will determine, to some extent, your target audience and communication strategy.
**Extended timeline:**
- Allows after-hours tinkering and enables developers to attend without taking time off from work.
- Provides more time to solicit contributions.
- Requires fewer resources for both the organizer and the participants.
- Extended timelines require fewer real-time resources.
**Intense timeline:**
- Recreates that feeling of intensity usually experienced in in-person hackathons.
- Requires a high amount of resources for a short period of time.
- Requires tight management and a communication platform.
- Requires clear one-on-one communication, but also fosters group-to-group or intra-community communication.
### 6. Build your communication strategy
Speaking of communication, once you have your goals, you must decide **who** communicates with participants and **how**. It's common to choose between the popular apps of the day. Your choice impacts the event's feel. Different [chat applications][16] and [collaboration platforms][17] have their own cultures and strengths. The decision you made early on about how to host your hackathon (in-person or virtual, prolonged or intense timeline) is likely to have the most significant impact on your communication strategy.
#### In-person communication plan
If you are running an in-person hackathon, consider it a genuine event—it feels almost like a conference. In-person hackathons often include the following:
- **Workshops/round tables:** Meant to educate and develop new industry standards/best practices for the concerns of the day. These sessions can function as proctored time-bound conversations amongst 6-10 individuals, where they agree upon findings and take notes that are made public to all participants.
- **Planning sessions:** Often used for projects with non-code outcomes, like developing updated standards.
- **Coding sessions:** Used for code-based projects which require work to maintain and enhance.
Each of the above has different communication needs:
- People prepared to facilitate, but not lead, conversations in workshops.
- Note takers and people to make sure that the notes are turned into a publishable product.
- Project managers to ensure the above tasks are done.
- General communication for running the event (food, cleaning, management of resources).
- Masters of ceremonies to move through the agendas.
- For workshops:
Making this all happen requires the resources and specialized knowledge from your Community, Product Managers, and teach-savvy teams. From past experience, it took a team of community members and staff to manage an event of this scope. To be successful, your team will need specialized people as well.
You also need to decide what types of communication you want to foster and who is responsible for it:
- Multiple teams will need to take shifts to perform general support.
- A DevRel, engineering, or support team will need to manage technical communication between triage and participants.
- Community Teams usually spend extensive time connecting participants to help build strong groups by reinforcing skills or points of view. This is one way to ensure that hackathon magic.
- Community Teams also need to support marketing efforts to engage participants and manage follow-up.
#### Virtual communication plan
For virtual hackathons, the choice of a communication platform depends heavily on the outcome you want to achieve, the timeline you've chosen for your hackathon (prolonged or intensive), and the type of communication you wish to facilitate (synchronous or asynchronous).
**Using Pull Requests and Issues on Git hosts (asynchronous):**
- Choosing to communicate through Git pull requests and Issues on your project directly frees up technical staff resources because it keeps the conversations about projects in your current process and allows your team to be responsive rather than instigating communication.
- This approach is great if the team for your hackathon is small or if the expected contributions are relatively small and you do not plan to help participants form teams.
- Using your existing processes is especially great for prolonged hackathons as they do not require additional moderation or require your team to monitor an additional app.
- The downside is that you will only facilitate communication with the individual contributor or group of contributors already working together. It's difficult to connect participants who are working separately. Participants can't find each other as easily on their own, so you lose some of the magic that happens when hackathon participants organically talk to each other in open threads.
**Using a chat application (synchronous):**
- Choosing dedicated chat servers is required for intense hackathons.
- Chat facilitates the team formation and communication necessary for complex projects with fast timelines and sparks the brainstorming that preludes an awesome contribution.
- Additionally, your goal is to build community. People want to join communities where they have ownership, have friends, and feel comfortable. You need a place for participants to feel connected to each other if you want them to return.
- Chat servers can outlast an event, allowing for continued community engagement.
Regardless of which platform you choose, you need a communication plan that identifies when every person on your team is available. Managing a virtual hackathon can get quite tricky, primarily due to the different timezones—people can participate whenever they want, from wherever they want. You must plan to accommodate participants across all time zones and for every occasion. Draw up a plan with who is responsible (and when) for the following:
- Determining response SLAs.
- Animating your virtual space (a dead space guarantees poor communication).
- Encouraging team building.
- Responding to technical questions.
- Checking in on participants.
- Moderating the space to ensure the safety of your participants.
### 7. Decide on the prizes
Is your hackathon a contest? Hackathon participants are often content with grand prizes and "swagpaloozas" for top contributions. But before you decide on the fun stuff (the actual awards), you must determine what your contest values.
- What differentiates a good contribution from a great contribution? If your attendees know how you feel about this, they are more likely to hit it out of the park.
- What do you value? This is your chance to tell participants what you want to see submitted by attaching a prize to it. For example, during the last Traefik Hackaethon, we offered bounties for the most-wanted features. These were, indeed, the ones most people worked on.
- Are there categories of contributions? You need to decide on prizes for each category.
- Create a rubric (a chart or grid defining and ranking achievements, [like this example][18]). This way, participants know what you value and how they are judged. This was one way we improved submissions at HackerOne.
On the other hand, some may argue that competition is overrated. If your goal is participation, feel free to reward every single one of your participants for simply giving back! [Hacktoberfest][19] is a great example of this approach.
### 8. Swag it up
Everyone loves swag! And your participants would certainly appreciate a token to remember this event, whether virtual or in person. Swag has two purposes:
- Swag shows your appreciation: The contributors took their time to engage with you in an intense way; thank them with a gift that shows you value their contributions.
- Swag builds awareness: Gifting swag to your participants helps them spread the love and build awareness of your community by sharing their loot and experience.
The community loves swag, but they don't love boring swag! You probably distributed your existing t-shirts and stickers during another event. Make your hackathon memorable and go for new, exciting, and exclusive designs. Shirts are great, and hoodies reign supreme. But think about cool swag participants may not have already. Think of something that could become their new staple item, like backup batteries or hats (both popular at HackerOne). Personally, my own home features some towels and slippers from hackathons!
### 9. Get the word out
Setting your goals and deciding on amazing grand prizes and swag are all important steps. But how will anyone know your hackathon is happening if you don't get the word out? You need to investigate the available channels carefully, and you need to be bold with your promotion. I'm talking blogs, vlogs, emails, social media—anything you can get your hands on.
However, depending on your defined goals, you need to invest in the appropriate channel. Where you advertise depends on who you want to invite to your hackathon.
- IIf you want to attract more experienced users, target big organizations where your project is used. LinkedIn and email promotion would be most effective here.
- If you want to bring in new and less experienced users, you're better off targeting universities and boot camps. Promoting the event on community-based media, like Mastodon, Matrix, Mattermost, Reddit, Discourse, Discord, and any place your target audience hangs out is a better choice.
### 10. Managing the long tail
Yay, the hackathon is over! Now all hackathon-related activities can stop, and we no longer need to pull resources, right? Wrong! Think of hackathons as only one step of the road in a series of events in your software development and community building. To deem your hackathon a success, you must be prepared to engage in post-event activities.
- Communicating your results: Don't forget to communicate hackathon outcomes internally and externally. Demonstrate the ownership the community members gained during the hackathon to grow trust in your community and project.
- Building community: Lean on your hackathon participants for future community activity.
- Putting together the retrospective: What went well, what went terrible, what was meh, what surprised you? This analysis is how you grow, change, and iterate. Don't forget to do a blameless retro as soon as possible so it is all fresh in your mind.
### Wrap up
If you started reading this article thinking that hackathons aren't that hard to pull off, I'm sorry to have burst your bubble! And although I sincerely believe hackathons are a great way to engage and communicate with your community on so many levels, having just the intention does not guarantee the results.
For a hackathon to be successful, you need to be meticulous and prepared to invest significant resources and effort to plan and execute it properly.
Thank you for reading, and I hope this checklist helps you successfully organize your next hackathon!
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/hackathon-guide
作者:[Tiffany Long][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/tiffany-long
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/23/2/hackathon-guide#set-your-goals
[2]: https://opensource.com/article/23/2/hackathon-guide#why-are-you-doing-this
[3]: https://opensource.com/article/23/2/hackathon-guide#who-is-your-audience
[4]: https://opensource.com/article/23/2/hackathon-guide#how-are-you-measuring-goals
[5]: https://opensource.com/article/23/2/hackathon-guide#decide-on-in-person-vs-virtual
[6]: https://opensource.com/article/23/2/hackathon-guide#build-your-communication-strategy
[7]: https://opensource.com/article/23/2/hackathon-guide#decide-on-the-prizes
[8]: https://opensource.com/article/23/2/hackathon-guide#swag-it-up
[9]: https://opensource.com/article/23/2/hackathon-guide#get-the-word-out
[10]: https://opensource.com/article/23/2/hackathon-guide#managing-the-long-tail
[11]: https://opensource.com/downloads/hackathon-guide
[12]: https://traefik.io/blog/announcing-traefik-proxy-3-0-hackaethon/
[13]: https://traefik.io/blog/announcing-the-inaugural-traefik-hackaethon-2020-in-october/
[14]: https://www.youtube.com/watch?v=9VZCD9TirCg&list=PLxhvVyxYRvibM_KJBPtPsfEcjnP5oGS8H
[15]: https://opensource.com/article/20/8/virtual-hackathon
[16]: https://opensource.com/alternatives/slack
[17]: https://opensource.com/article/21/9/alternatives-zoom
[18]: https://www.isothermal.edu/about/assessment/assets/rubric-present.pdf
[19]: https://hacktoberfest.com/

View File

@ -1,119 +0,0 @@
[#]: subject: (Try quantum computing with this open source software development kit)
[#]: via: (https://opensource.com/article/21/6/qiskit)
[#]: author: (Gordon Haff https://opensource.com/users/ghaff)
[#]: collector: (lujun9972)
[#]: translator: (cool-summer-021)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Try quantum computing with this open source software development kit
======
Qiskit is an open source software development kit for accessing quantum
simulators and hardware for free.
![Tips and gears turning][1]
Classical computing is based on bits. Zeros and ones. This isn't because there's some inherent advantage to a binary logic system over logic systems with more states—or even over analog computers. But on-off switches are easy to make and, with modern semiconductor technology, we can make them very small and very cheap.
But they're not without limits. Some problems just can't be efficiently solved by a classical computer. These tend to be problems where the cost, in time or memory, increases exponentially with the scale (`n`) of the problem. We say such problems are `O(2n)` in [Big O notation][2].
Much of modern cryptography even depends on this characteristic. Multiplying two, even large, prime numbers together is fairly cheap computationally (`O(n2)`). But reversing the operation takes exponential time. Use large enough numbers, and decryption that depends on such a factoring attack is infeasible.
### Enter quantum
A detailed primer on the mathematical and quantum mechanical underpinnings of quantum computing is beyond the scope of this article. However, here are some basics.
A quantum computer replaces bits with [qubits][3]—controllable units of computing that display quantum properties. Qubits are typically made out of either an engineered superconducting component or a naturally occurring quantum object such as an electron. Qubits can be placed into a "superposition" state that is a complex combination of the 0 and 1 states. You sometimes hear that qubits are _both_ 0 and 1, but that's not really accurate. What is true is that, when a measurement is made, the qubit state will collapse into a 0 or 1. Mathematically, the (unmeasured) quantum state of the qubit is a point on a geometric representation called the [Bloch sphere][4].
While superposition is a novel property for anyone used to classical computing, one qubit by itself isn't very interesting. The next unique quantum computational property is "interference." Real quantum computers are essentially statistical in nature. Quantum algorithms encode an interference pattern that increases the probability of measuring a state encoding the solution.
While novel, superposition and interference do have some analogs in the physical world. The quantum mechanical property "entanglement" doesn't, and it's the real key to exponential quantum speedups. With entanglement, measurements on one particle can affect the outcome of subsequent measurements on any entangled particles—even ones not physically connected.
### What can quantum do?
Today's quantum computers are quite small in terms of the number of qubits they contain—tens to hundreds. Thus, while algorithms are actively being developed, the hardware needed to run them faster than their classical equivalents doesn't exist.
But there's considerable interest in quantum computing in many fields. For example, quantum computers may offer a good way to simulate natural quantum systems, like molecules, whose complexity rapidly exceeds the ability of classical computers to model them accurately. Quantum computing is also tied mathematically to linear algebra, which underpins machine learning and many other modern optimization problems. Therefore, it's reasonable to think quantum computing could be a good fit there as well.
One commonly cited example of an existing quantum algorithm likely to outperform classical algorithms is [Shor's algorithm][5], which can do the factoring mentioned earlier. Invented by MIT mathematician Peter Shor in 1994, quantum computers can't yet run the algorithm on larger than trivially sized problems. But it's been demonstrated to work in polynomial `O(n3)` time rather than the exponential time required by classical algorithms.
### Getting started with Qiskit
At this point, you may be thinking: "But I don't have a quantum computer, and I really like to get hands-on. Is there any hope?"
Enter an open source (Apache 2.0 licensed) project called [Qiskit][6]. It's a software development kit (SDK) for accessing both the quantum computing simulators and the actual quantum hardware (for free) in the IBM Quantum Experience. You just need to sign up for an API key.
Certainly, a deep dive into Qiskit, to say nothing of the related linear algebra, is far beyond what I can get into here. If you seek such a dive, there are [many free resources online][7], including a complete textbook. However, dipping a toe in the water is straightforward, requiring only some surface-level knowledge of Python and Jupyter Notebooks.
To give you a taste, let's do a "Hello, World!" program entirely within the [Qiskit textbook][8].
Begin by installing some tools and widgets specific to the textbook:
```
`pip install git+https://github.com/qiskit-community/qiskit-textbook.git#subdirectory=qiskit-textbook-src`
```
Next, do the imports:
```
from qiskit import QuantumCircuit, assemble, Aer
from math import pi, sqrt
from qiskit.visualization import plot_bloch_multivector, plot_histogram
```
Aer is the local simulator. Qiskit consists of four components: **Aer**, the **Terra** foundation, **Ignis** for dealing with noise and errors on real quantum systems, and **Aqua** for algorithm development.
```
# Let's do an X-gate on a |0&gt; qubit
qc = QuantumCircuit(1)
qc.x(0)
qc.draw()
```
An **X-gate** in quantum computing is similar to a **Not gate** in classical computing, although the underlying math actually involves matrix multiplication. (It is, in fact, often called a **NOT-gate**.)
Now, run it and do a measurement. The result is as you would expect because the qubit was initialized in a `|0>` state, then inverted, and measured. (Use `|0>` and `|1>` to distinguish from classic bits.)
```
# Let's see the result
svsim = Aer.get_backend('statevector_simulator')
qobj = assemble(qc)
state = svsim.run(qobj).result().get_statevector()
plot_bloch_multivector(state)
```
![Bloch sphere showing the expected result][9]
Bloch sphere showing the expected result. (Gordon Haff, [CC-BY-SA 4.0][10])
### Conclusion
In some respects, you can think of quantum computing as a sort of exotic co-processor for classical computers in the same manner as graphics processing units (GPUs) and field-programmable gate arrays (FPGAs). One difference is that quantum computers will be accessed almost entirely as network resources for the foreseeable future. Another is that they work fundamentally differently, which makes them unlike most other accelerators you might be familiar with. That's why there's so much interest in algorithm development and significant resources going in to determine where and when quantum fits best. It wouldn't hurt to see what all the fuss is about.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/qiskit
作者:[Gordon Haff][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ghaff
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
[2]: https://en.wikipedia.org/wiki/Big_O_notation
[3]: https://en.wikipedia.org/wiki/Qubit
[4]: https://en.wikipedia.org/wiki/Bloch_sphere
[5]: https://en.wikipedia.org/wiki/Shor%27s_algorithm
[6]: https://qiskit.org/
[7]: https://qiskit.org/learn
[8]: https://qiskit.org/textbook/preface.html
[9]: https://opensource.com/sites/default/files/uploads/bloch-sphere.png (Bloch sphere showing the expected result)
[10]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/21/8/short-option-parsing-c"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "toknow-gh"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,67 +0,0 @@
[#]: subject: "Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store"
[#]: via: "https://news.itsfoss.com/kde-connect-ios/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store
======
The impressive open-source client to help connect mobiles with computers is now available for iPhones and iPad. Try it out!
![kde connect][1]
KDE Connect is an open-source tool that lets you connect your mobile phone with your PC.
Originally, KDE Connect supported Android devices to connect with Linux. Gradually, they added support for Windows.
Now, it looks like you can use KDE Connect with your iOS device (iPhone or iPad) to connect to your Windows/Linux computer.
Note that macOS is also in the list of supported platforms. However, it is still an early release version for macOS. So, it may not work as good as it does with other platforms.
### KDE Connect on the App Store
![][2]
We did not notice any official announcement for this. However, some users spotted KDE Connect being available on the [App Store for iOS users][3] right after the release of [version 0.2.1][4].
The App Store lists all the essential features including:
* Shared clipboard: to copy/paste between devices.
* Ability to share files and URLs to your computer from any app.
* Use your phone screen as your computers touchpad (visual touchpad).
* Remote presentation remote mode.
* Run commands on your computer from your phone
* End-to-end TLS encryption for security.
While this remains as an open-source app, the app licensing is a bit different as spotted by [OMGUbuntu][5] to comply with App Store guidelines.
It is also worth noting that the feature set may not be the same as its Android counterpart, but at least we finally have KDE Connect for iOS users, making it a truly open-source cross-plaform solution to connect mobiles with computers.
Id be comfortable recommending KDE Connect to anyone who wants to keep things in check with their mobile through computers.
Head to the app store from the button below to get started installing it. You can also find various other installation options for different supported platforms on its [official download page][6].
Have you tried KDE Connect on iOS yet? Let me know your thoughts in the comments.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/kde-connect-ios/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kde-connect-on-iphone-ipad.jpg
[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/kde-connect-ios.jpg
[3]: https://apps.apple.com/id/app/kde-connect/id1580245991
[4]: https://invent.kde.org/network/kdeconnect-ios/-/commit/43d2ecbbb7e4e70274849f5ec987721318eb9f57
[5]: https://www.omgubuntu.co.uk/2022/05/kde-connect-iphone-app-available
[6]: https://kdeconnect.kde.org/download.html

View File

@ -1,98 +0,0 @@
[#]: subject: "How to Install MATE Desktop in Arch Linux [Complete Guide]"
[#]: via: "https://www.debugpoint.com/mate-desktop-arch-linux-install/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install MATE Desktop in Arch Linux [Complete Guide]
======
**This guide explains the steps you need to install MATE Desktop in Arch Linux.**
This guide has two parts. The first part deals with installing the base Arch system. The second part is installing the complete MATE desktop environment on top of Arch Linux.
This article tested in the following versions: MATE 1.24, and MATE 1.26.
### What is the MATE Desktop?
When the GNOME desktop changed its direction from GNOME 2 to GNOME 3 by changing the user interaction and interface, the MATE desktop continued the older/Legacy GNOME 2 development. So, the MATE desktop environment continues the GNOME 2 desktop, which preserved the traditional desktop experience in Linux. It is fast and low on memory consumption. In my opinion, one of the underrated desktop environments which need more love!
The MATE team continued development as it is one of the popular GNOME 2 based desktop while supporting newer technologies. You can learn more on its [official website][1].
### Install MATE Desktop in Arch Linux
#### Part 1: Install Arch Linux
If you already have Arch Linux installed, you can skip this step and directly go to the [installation of MATE Desktop section below][2].
For a quick Arch Linux installation, follow this automated archinstall guide which is super easy to follow. And once installed, continue to Part 2.
#### Part 2: Install MATE Desktop in Arch Linux
After reboot, choose Arch Linux from grub. In the Arch Linux prompt, start running the following commands in sequence. These commands install the Xorg server, display manager, MATE desktop components, controller packages, and additional applications.
For all the commands, use default, i.e. press enter when asked.
- **Install Xorg. Approx install size is 80 MB.**
```
sudo pacman -S --needed xorg
```
- **Install display manager, and MATE desktop components. Approx install size is 380 MB.**
```
sudo pacman -S --needed mate mate-extra ttf-freefont lightdm lightdm-gtk-greeter
```
![Installing MATE Packages][3]
- **Install applications**
This is just a reference. You can also install the ones you require.
```
sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper
```
Now its time to enable the display manager and network manager as a service. So that the next time you log on, they can run automatically by systemd.
```
systemctl enable lightdm
systemctl enable NetworkManager
```
Reboot the system using the reboot command.
```
reboot
```
You should see a login prompt on the MATE desktop if all goes well.
And you can now log in using the user ID and password which you just created. A superfast and legacy MATE Desktop would welcome you.
![MATE Desktop in Arch Linux][4]
I hope this guide helps you create your own Arch Linux environment with a legacy MATE desktop from scratch. Please let me know if you run into trouble using the comment box below.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/mate-desktop-arch-linux-install/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://mate-desktop.org/
[2]: https://www.debugpoint.com/archinstall-guide/
[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/Installing-MATE-Packages.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2021/08/MATE-Desktop-in-Arch-Linux-1.jpg

View File

@ -2,7 +2,7 @@
[#]: via: "https://itsfoss.com/use-htop/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "perfiffer"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,144 +0,0 @@
[#]: subject: "Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu"
[#]: via: "https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/"
[#]: author: "Abhishek Prakash https://itsfoss.com/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu
======
If you use a PPA or add an external repository in Ubuntu 22.04 and later versions, chances are that you will see a message like this:
```
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
```
![ubuntu key is stored legacy][1]
First thing first. It is not an error, it is a warning message. A warning does not stop the procedure. You can continue upgrading your system even if you see this warning message during an update.
If you dont like seeing the warning message, you can take some manual steps to get rid of it.
There are two ways; the proper way and the quick and dirty way. Read both methods and see which one you feel comfortable with.
### Method 1: Import the key [Proper but complicated way]
First, list all the GPG keys added to your system.
```
sudo apt-key list
```
This will show a huge list of keys stored in your system. What you have to do here is to look for the keys associated with the warning message.
```
[email protected]:~$ sudo apt-key list
[sudo] password for abhishek:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2014-01-13 [SCEA] [expired: 2019-01-12]
418A 7F2F B0E1 E6E7 EABF 6FE8 C2E7 3424 D590 97AB
uid [ expired] packagecloud ops (production key) <[email protected]>
pub rsa4096 2016-02-18 [SCEA]
DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD
uid [ unknown] https://packagecloud.io/slacktechnologies/slack (https://packagecloud.io/docs#gpg_signing) <[email protected]>
sub rsa4096 2016-02-18 [SEA]
/etc/apt/trusted.gpg.d/audio-recorder-ubuntu-ppa.gpg
----------------------------------------------------
pub rsa4096 2015-08-30 [SC]
42EF 41ED 9813 B713 D4F1 F06D 5CF1 2638 ACF9 669F
uid [ unknown] Launchpad PPA for Team audio-recorder
/etc/apt/trusted.gpg.d/danielrichter2007-ubuntu-grub-customizer.gpg
-------------------------------------------------------------------
pub rsa1024 2010-10-08 [SC]
59DA D276 B942 642B 1BBD 0EAC A8AA 1FAA 3F05 5C03
```
How do you do that? Read the message carefully.
```
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy
```
In my case, the repository has keywords like packagecloud, slacktechnologies. It is shown at the top of the apt-key list output. You may have to scroll a bit in your case.
In this rare case, the external repository added by Slack, has two GPG keys. One of them is expired and Ill ignore it. You may not have such a situation.
You should the last 8 characters (excluding the space) under the line after pub.
```
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2014-01-13 [SCEA] [expired: 2019-01-12]
418A 7F2F B0E1 E6E7 EABF 6FE8 C2E7 3424 D590 97AB
uid [ expired] packagecloud ops (production key) <[email protected]>
pub rsa4096 2016-02-18 [SCEA]
DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD
uid [ unknown] https://packagecloud.io/slacktechnologies/slack (https://packagecloud.io/docs#gpg_signing) <[email protected]>
```
So from the line “DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD”, Ill take the last 8 characters “0386 51BD”, remove the space and then use it to import the GPG key in its dedicated file under the /etc/apt/trusted.gpg.d directory:
```
sudo apt-key export 038651BD | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/slack.gpg
```
I created a new file slack.gpg here, in case you didnt notice it. I named it slack.gpg because it is associated with Slack application I installed earlier. The filename does not matter but its good for identification.
If the command runs successfully, you wont see any message. You can verify that by checking if the newly created gpg file exists or not.
![import gpg key to trusted ubuntu][2]
Run the update again and now you should not see the warning message anymore.
### Method 2: Copy to the trusted.gpd.d directory [Quick and dirty way]
If you dont feel comfortable doing all the above stuff manually, well, you can ignore the warning message. I mean, ignoring it is always an option.
Another option is to copy the /etc/apt/trusted.gpg file to /etc/apt/trusted.gpg.d directory. After all, Ubuntu only complains that it needs the GPG keys in /etc/apt/trusted.gpg.d directory.
Youll still have to use the terminal. Open it and use the following command:
```
sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d
```
Now, if you run the update, you wont see the “Key is stored in legacy trusted.gpg keyring” warning message anymore.
![quick dirty way to fix apt key stored legacy][3]
### Conclusion
I have written a detailed article on [apt-key deprecation][4]. Apparently, that article had some readers confused and hence I wrote this one to give them direct steps for getting rid of the message.
As I said before, it is a warning message and can be ignored for now. The onus to fix this issue lies on the external software developers and Ubuntu developers. The external software developers should make sure that their GPG keys are no longer added in the /etc/apt/trusted.gpg file.
The end users should not take the pain for their laziness.
So, which method did you use to get rid of the key is stored in legacy warning message? The first one or the second one?
--------------------------------------------------------------------------------
via: https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/wp-content/uploads/2022/11/ubuntu-key-is-stored-legacy.png
[2]: https://itsfoss.com/wp-content/uploads/2022/11/import-gpg-key-to-trusted-ubuntu.png
[3]: https://itsfoss.com/wp-content/uploads/2022/11/quick-dirty-way-to-fix-apt-key-stored-legacy.png
[4]: https://itsfoss.com/apt-key-deprecated/

View File

@ -1,54 +0,0 @@
[#]: subject: "Build an interactive timeline in React with this open source tool"
[#]: via: "https://opensource.com/article/22/11/react-timeline-planby"
[#]: author: "Karol Kozer https://opensource.com/users/karolkozer"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Build an interactive timeline in React with this open source tool
======
For several years, I worked in the TV online and video-on-demand (VOD) industry. While working on a scheduler web application, I realized that there were no good solutions for electronic program guides (EPG) and scheduling. Admittedly, this is a niche feature for most web developers, but it's a common requirement for TV applications. I've seen and analyzed a number of websites that have implemented their own EPG or timeline, and I often wondered why everyone seemed to be inventing their own solutions instead of working on a shared solution everyone could use. And that's when I started developing Planby.
[Planby][1] is a React (JavaScript) component to help you create schedules, timelines, and electronic program guides (EPG) for online TV and video-on-demand (VOD) services, music and sporting events, and more. Planby uses a custom virtual view, allowing you to operate on a lot of data, and present it to your viewers in a friendly and useful way.
Planby has a simple API that you can integrate with third party UI libraries. The component theme is customised to the needs of the application design.
### Timeline performance
The most significant thing when implementing a timeline feature is performance. You're potentially handling basically an endless stream of data across many many different channels. Applications can struggle with refreshing, moving, and scrolling. You want the user's interactions with the content to be fluid.
There's also the potential for poor design. Sometimes, an app implements an EPG timeline in the form of a list that you must scroll vertically, meaning you must click on buttons to move left and right through time, which quickly becomes tiring. What's more, sometimes customization for interacting with an EPG (such as rating, choosing your favorite channels, reading right-to-left (RTL), and so on) aren't available at all, or when they are, they cause performance issues.
Another problem I often face is that an app is too verbose in its data transfer. When an app requests data _while_ you scroll through the EPG, the timeline feels slow and can even crash.
### What is Planby?
This is where Planby comes in. Planby is built from scratch, using React and Typescript and a minimal amount of resources. It uses a custom virtual view, allowing you to operate on vast amounts of data. It displays programs and channels to the user, and automatically positions all elements according to hours and assigned channels. When a resource contains no content, Planby calculates the positioning so the time slots are properly aligned.
Planby has a simple interface and includes all necessary features, such as a sidebar, the timeline itself, a pleasant layout, and live program refreshing. In addition, there's an optional feature allowing you to hide any element you don't want to include in the layout.
Planby has a simple API that allows you as the developer to implement your own items along with your user preferences. You can use Planby's theme to develop new features, or you can make custom styles to fit in with your chosen design. You can easily integrate with other features, like a calendar, rating options, a list of user favorites, scroll, "now" buttons, a recording schedule, catch-up content, and much more. What's more, you can add custom global styles, including register-transfer level (RTL) functionality.
And best of all, it uses the open source MIT licensed.
### Try Planby
If you would like to try Planby, or just to learn more about it, visit the [Git repository][1]. There, I've got some examples of what's possible and you can read the documentation for the details. The package is also available with `npm`.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/11/react-timeline-planby
作者:[Karol Kozer][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/karolkozer
[b]: https://github.com/lkxed
[1]: https://github.com/karolkozer/planby

View File

@ -1,153 +0,0 @@
[#]: subject: "Learn Tcl by writing a simple game"
[#]: via: "https://opensource.com/article/23/2/learn-tcl-writing-simple-game"
[#]: author: "James Farrell https://opensource.com/users/jamesf"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Learn Tcl by writing a simple game
======
My path to Tcl started with a recent need to automate a difficult Java-based command-line configuration utility. I do a bit of automation programming using Ansible, and I occasionally use the expect module. Frankly, I find this module has limited utility for a number of reasons including: difficulty with sequencing identical prompts, capturing values for use in additional steps, limited flexibility with control logic, and so on. Sometimes you can get away with using the shell module instead. But sometimes you hit that ill-behaving and overly complicated command-line interface that seems impossible to automate.
In my case, I was automating the installation of one of my company's programs. The last configuration step could only be done through the command-line, through several ill-formed, repeating prompts and data output that needed capturing. The good old traditional Expect was the only answer. A deep understanding of Tcl is not necessary to use the basics of Expect, but the more you know, the more power you can get from it. This is a topic for a follow-up article. For now, I explore the basic language constructs of Tcl, which include user input, output, variables, conditional evaluation, looping, and simple functions.
### Install Tcl
On a Linux system, I use this:
```
# dnf install tcl
# which tclsh
/bin/tclsh
```
On macOS, you can use [Homebrew][1]to install the latest Tcl:
```
$ brew install tcl-tk
$ which tclsh
/usr/local/bin/tclsh
```
### Guess the number in Tcl
Start by creating the basic executable script `numgame.tcl`:
```
$ touch numgame.tcl
$ chmod 755 numgame.tcl
```
And then start coding in your file headed up by the usual shebang script header:
```
#!/usr/bin/tclsh
```
Here are a few quick words about artifacts of Tcl to track along with this article.
The first point is that all of Tcl is considered a series of strings. Variables are generally treated as strings but can switch types and internal representations automatically (something you generally have no visibility into). Functions may interpret their string arguments as numbers ( `expr`) and are only passed in by value. Strings are usually delineated using double quotes or curly braces. Double quotes allow for variable expansion and escape sequences, and curly braces impose no expansion at all.
The next point is that Tcl statements can be separated by semicolons but usually are not. Statement lines can be split using the backslash character. However, it's typical to enclose multiline statements within curly braces to avoid needing this. Curly braces are just simpler, and the code formatting below reflects this. Curly braces allow for deferred evaluation of strings. A value is passed to a function before Tcl does variable substitution.
Finally, Tcl uses square brackets for command substitution. Anything between the square brackets is sent to a new recursive invocation of the Tcl interpreter for evaluation. This is handy for calling functions in the middle of expressions or for generating parameters for functions.
### Procedures
Although not necessary for this game, I start with an example of defining a function in Tcl that you can use later:
```
proc used_time {start} {
return [expr [clock seconds] - $start]
}
```
Using `proc` sets this up to be a function (or procedure) definition. Next comes the name of the function. This is then followed by a list containing the parameters; in this case 1 parameter `{start}` and then followed by the function body. Note that the body curly brace starts on this line, it cannot be on the following line. The function returns a value. The returned value is a compound evaluation (square braces) that starts by reading the system clock `[clock seconds]` and does the math to subtract out the `$start` parameter.
### Setup, logic, and finish
You can add more details to the rest of this game with some initial setup, iterating over the player's guesses, and then printing results when completed:
```
set num [expr round(rand()*100)]
set starttime [clock seconds]
set guess -1
set count 0
puts "Guess a number between 1 and 100"
while { $guess != $num } {
incr count
puts -nonewline "==> "
flush stdout
gets stdin guess
if { $guess < $num } {
puts "Too small, try again"
} elseif { $guess > $num } {
puts "Too large, try again"
} else {
puts "That's right!"
}
}
set used [used_time $starttime]
puts "You guessed value $num after $count tries and $used elapsed seconds"
```
The first `set` statements establish variables. The first two evaluate expressions to discern a random number between 1 and 100, and the next one saves the system clock start time.
The `puts` and `gets` command are used for output to and input from the player. The `puts` I've used imply standard out for output. The `gets` needs the input channel to be defined, so this code specifies `stdin` as the source for terminal input from the user.
The `flush stdout` command is needed when `puts` omits the end-of-line termination because Tcl buffers output and it might not get displayed before the next I/O is needed.
From there the `while` statement illustrates the looping control structure and conditional logic needed to give the player feedback and eventually end the loop.
The final `set` command calls our function to calculate elapsed seconds for gameplay, followed by the collected stats to end the game.
### Play it!
```
$ ./numgame.tcl
Guess a number between 1 and 100
==> 100
Too large, try again
==> 50
Too large, try again
==> 25
Too large, try again
==> 12
Too large, try again
==> 6
Too large, try again
==> 3
That's right!
You guessed value 3 after 6 tries and 20 elapsed seconds
```
### Continue learning
When I started this exercise, I doubted just how useful going back to a late 1990s fad language would be to me. Along the way, I found a few things about Tcl that I really enjoyed — my favorite being the square bracket command evaluation. It just seems so much easier to read and use than many other languages that overuse complicated closure structures. What I thought was a [dead language][2] was actually still thriving and supported on several platforms. I learned a few new skills and grew an appreciation for this venerable language.
Check out the official site over at [https://www.tcl-lang.org][3]. You can find references to the latest source, binary distributions, forums, docs, and information on conferences that are still ongoing.
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/learn-tcl-writing-simple-game
作者:[James Farrell][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jamesf
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/20/6/homebrew-mac
[2]: https://opensource.com/article/19/6/favorite-dead-language
[3]: https://www.tcl-lang.org

View File

@ -0,0 +1,251 @@
[#]: subject: "Learn Expect by writing and automating a simple game"
[#]: via: "https://opensource.com/article/23/2/learn-expect-automate-simple-game"
[#]: author: "James Farrell https://opensource.com/users/jamesf"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Learn Expect by writing and automating a simple game
======
While trying to automate my workflow, I hit upon a configuration utility that defied meaningful automation. It was a Java process that didn't support a silent installer, or support `stdin`, and had an inconsistent set of prompts. Ansible's `expect` module was inadequate for this task. But I found that the `expect` command was just the tool for the job.
My journey to learn Expect meant [learning a bit of Tcl][1]. Now that I have the background to create simple programs, I can better learn to program in Expect. I thought it would be fun to write an article that demonstrates the cool functionality of this venerable utility.
This article goes beyond the typical simple game format. I plan to use parts of Expect to create the game itself. Then I demonstrate the real power of Expect with a separate script to automate playing the game.
This programming exercise shows several classic programming examples of variables, input, output, conditional evaluation, and loops.
### Install Expect
For Linux based systems use:
```
$ sudo dnf install expect
$ which expect
/bin/expect
```
I found that my version of Expect was included in the base operating system of macOS:
```
$ which expect
/usr/bin/expect
```
On macOS, you can also load a slightly newer version using brew:
```
$ brew install expect
$ which expect
/usr/local/bin/expect
```
### Guess the number in Expect
The number guessing game using Expect is not that different from the base Tcl I used in my [previous article][1].
All things in Tcl are strings, including variable values. Code lines are best contained by curly braces (Instead of trying to use line continuation). Square brackets are used for command substitution. Command substitution is useful for deriving values from other functions. It can be used directly as input where needed. You can see all of this in the subsequent script.
Create a new game file `numgame.exp`, set it to be executable, and then enter the script below:
```
#!/usr/bin/expect
proc used_time {start} {
return [expr [clock seconds] - $start]
}
set num [expr round(rand()*100)]
set starttime [clock seconds]
set guess -1
set count 0
send "Guess a number between 1 and 100\n"
while { $guess != $num } {
incr count
send "==> "
expect {
-re "^(\[0-9]+)\n" {
send "Read in: $expect_out(1,string)\n"
set guess $expect_out(1,string)
}
-re "^(.*)\n" {
send "Invalid entry: $expect_out(1,string) "
}
}
if { $guess < $num } {
send "Too small, try again\n"
} elseif { $guess > $num } {
send "Too large, try again\n"
} else {
send "That's right!\n"
}
}
set used [used_time $starttime]
send "You guessed value $num after $count tries and $used elapsed seconds\n"
```
Using `proc` sets up a function (or procedure) definition. This consists of the name of the function, followed by a list containing the parameters (1 parameter `{start}`) and then followed by the function body. The return statement shows a good example of nested Tcl command substitution. The `set` statements define variables. The first two use command substitution to store a random number and the current system time in seconds.
The `while` loop and if-elseif-else logic should be familiar. Note again the particular placement of the curly braces to help group multiple command strings together without needing line continuation.
The big difference you see here (from the previous Tcl program) is the use of the functions `expect` and `send` rather than using `puts` and `gets`. Using `expect` and `send` form the core of Expect program automation. In this case, you use these functions to automate a human at a terminal. Later you can automate a real program. Using the `send` command in this context isn't much more than printing information to screen. The `expect` command is a bit more complex.
The `expect` command can take a few different forms depending on the complexity of your processing needs. The typical use consists of one of more pattern-action pairs such as:
```
expect "pattern1" {action1} "pattern2" {action2}
```
More complex needs can place multiple pattern action pairs within curly braces optionally prefixed with options that alter the processing logic. The form I used above encapsulates multiple pattern-action pairs. It uses the option `-re` to apply regex processing (instead of glob processing) to the pattern. It follows this with curly braces encapsulating one or more statements to execute. I've defined two patterns above. The first is Is intended to match a string of 1 or more numbers:
```
"^(\[0-9]+)\n"
```
The second pattern is designed to match anything else that is not a string of numbers:
```
"^(.*)\n"
```
Take note that this use of `expect` is executed repeatedly from within a `while` statement. This is a perfectly valid approach to reading multiple entries. In the automation, I show a slight variation of Expect that does the iteration for you.
Finally, the `$expect_out` variable is an array used by `expect` to hold the results of its processing. In this case, the variable `$expect_out(1,string)` holds the first captured pattern of the regex.
### Run the game
There should be no surprises here:
```
$ ./numgame.exp
Guess a number between 1 and 100
==> Too small, try again
==> 100
Read in: 100
Too large, try again
==> 50
Read in: 50
Too small, try again
==> 75
Read in: 75
Too small, try again
==> 85
Read in: 85
Too large, try again
==> 80
Read in: 80
Too small, try again
==> 82
Read in: 82
That's right!
You guessed value 82 after 8 tries and 43 elapsed seconds
```
One difference you may notice is the impatiencethis version exhibits. If you hesitate long enough, expect timeouts with an invalid entry. It then prompts you again. This is different from `gets` which waits indefinitely. The `expect` timeout is a configurable feature. It helps deal with hung programs or during an unexpected output.
### Automate the game in Expect
For this example, the Expect automation script needs to be in the same folder as your `numgame.exp` script. Create the `automate.exp` file, make it executable, open your editor, and enter the following:
```
#!/usr/bin/expect
spawn ./numgame.exp
set guess [expr round(rand()*100)]
set min 0
set max 100
puts "I'm starting to guess using the number $guess"
expect {
-re "==> " {
send "$guess\n"
expect {
"Too small" {
set min $guess
set guess [expr ($max+$min)/2]
}
"Too large" {
set max $guess
set guess [expr ($max+$min)/2]
}
-re "value (\[0-9]+) after (\[0-9]+) tries and (\[0-9]+)" {
set tries $expect_out(2,string)
set secs $expect_out(3,string)
}
}
exp_continue
}
"elapsed seconds"
}
puts "I finished your game in about $secs seconds using $tries tries"
```
The `spawn` function executes the program you want to automate. It takes the command as separate strings followed by the arguments to pass to it. I set the initial number to guess, and the real fun begins. The `expect` statement is considerably more complicated and illustrates the power of this utility. Note that there is no looping statement here to iterate over the prompts. Because my game has predictable prompts, I can ask `expect`to do a little more processing for me. The outer `expect` attempts to match the game input prompt of `==>` . Seeing that, it uses `send` to guess and then uses an additional `expect` to figure out the results of the guess. Depending on the output, variables are adjusted and calculated to set up the next guess. When the prompt `==>` is matched, the `exp_continue` statement is invoked. That causes the outer `expect` to be re-evaluated. So a loop here is no longer needed.
This input processing relies on another behavior of Expect's processing. Expect buffers the terminal output until it matches a pattern. This buffering includes any embedded end of line and other unprintable characters. This is different than the typical regex line matching you are used to with Awk and Perl. When a pattern is matched, anything coming after the match remains in the buffer. It's made available for the next match attempt. I've exploited this to cleanly end the outer `expect` statement:
```
-re "value (\[0-9]+) after (\[0-9]+) tries and (\[0-9]+)"
```
You can see that the inner pattern matches the correct guess and does not consume all of the characters printed by the game. The very last part of the string (elapsed seconds) is still buffered after the successful guess. On the next evaluation of the outer `expect` , this string is matched from the buffer to cleanly end (no action is supplied). Now for the fun part, let's run the full automation:
```
$ ./automate.exp
spawn ./numgame.exp
I'm starting to guess with the number 99
Guess a number between 1 and 100
==> 99
Read in: 99
Too large, try again
==> 49
Read in: 49
Too small, try again
==> 74
Read in: 74
Too large, try again
==> 61
Read in: 61
Too small, try again
==> 67
Read in: 67
That's right!
You guessed value 67 after 5 tries and 0 elapsed seconds
I finished your game in about 0 seconds using 5 tries
```
Wow! My number guessing efficiency dramatically increased thanks to automation! A few trial runs resulted in anywhere from 5-8 guesses on average. It also always completed in under 1 second. Now that this pesky, time-consuming fun can be dispatched so quickly, I have no excuse to delay other more important tasks like working on my home-improvement projects :P
### Never stop learning
This article was a bit lengthy but well worth the effort. The number guessing game offered a good base for demonstrating a more interesting example of Expect processing. I learned quite a bit from the exercise and was able to complete my work automation successfully. I hope you found this programming example interesting and that it helps you to further your automation goals.
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/learn-expect-automate-simple-game
作者:[James Farrell][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jamesf
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/23/2/learn-tcl-writing-simple-game

View File

@ -0,0 +1,337 @@
[#]: subject: "Create a modern user interface with the Tkinter Python library"
[#]: via: "https://opensource.com/article/23/2/user-interface-tkinter-python"
[#]: author: "Patrik Dufresne https://opensource.com/users/patrik-dufresne"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Create a modern user interface with the Tkinter Python library
======
Python's Tkinter library isn't exactly known for its good looks. I've developed a library to help create a modern graphical user interface for Python.
I spent a lot of time searching for a simple but modern GUI toolkit before developing a new library called TKVue that creates graphical interfaces for desktop applications. Through my research, I realized that there were [several different libraries][1] to create graphical interfaces. However, most involve adding new dependencies to bind with graphical libraries. For example, there's a library for Qt, another for wxWidgets, and a third for GTK. None are native to Python or entirely coded in Python. That's a problem. If you want to code a GUI with Qt, it's necessary to compile the Qt source code on each platform you want to support. I wanted to target the three leading platforms: Linux, Windows, and Mac.
The big advantage of Tkinter is that it's embedded in Python. There's no need for new dependencies or to compile new libraries. Everything's already done for you.
In short, it is best to use Tkinter to create something portable.
### Tkinter with a modern theme
Creating a GUI with Tkinter is easy, but there's no denying that by default, it looks like a GUI from the 1980s. In addition to creating graphical interfaces that aren't very pleasing to the eye, the programming methodology is also from the 1980s: Programming the Tkinter graphical interface is not declarative.
Motivated by Tkinter's portability, I was determined to use it to create a professional and modern graphical interface. My research led me to discover a whole system for modifying Tkinter's appearance using [themes][2]. Tkinter themes are similar to the CSS file of a web page. They allow you to configure the appearance of the components that make up the graphical interface by declaring new styles. The creation of these styles requires some work, but the system is flexible enough to allow the creation of a modern-looking graphical interface. This work is similar to customizing a CSS theme in web development. If you create a web page without CSS, the appearance is not modern, and a lot of work is needed to improve it. This is why CSS libraries such as bootstrap are used to speed up the creation of the graphic interface.
In the Tkinter universe, there is no CSS library. Some pre-existing themes exist, but it's preferable for any project to customize the color palette to match your product branding and give it a web look-and-feel.
To achieve that, the most important element in creating a modern interface with Tkinter is changing the background color and the buttons' appearance.
Once properly personalized to your liking, the result is a clean and visually attractive graphical interface.
Here is the "default" theme:
![Default theme][3]
The "clam" theme looks like this:
![Clam theme][4]
Then with my personalization:
![Personalized theme][5]
**TKVue:**
```
import tkvue
import tkinter.ttk as ttk
tkvue.configure_tk(theme="clam")
class RootDialog(tkvue.Component):
template = """
<TopLevel title="TKVue Test" geometry="450x200">
<Frame style="default.TFrame" pack-fill="both" pack-expand="1" padding="10">
<Label text="Hello World!" style="H1.TLabel" pack-padx="25" pack-pady="25"/>
<Frame style="default.TFrame" pack-fill="both" pack-expand="1" pack-padx="10" pack-pady="10">
<Button style="default.TButton" text="Continue" pack-side="right" pack-padx="5"/>
<Button style="default.TButton" text="Cancel" pack-side="right"/>
</Frame>
</Frame>
</TopLevel>
"""
def __init__(self, master=None):
super().__init__(master)
s = ttk.Style(master=self.root)
s.configure('H1.TLabel', font=['Lato', '-60'], background='#ffffff')
s.configure('default.TFrame', background='#ffffff')
s.configure(
default.TButton',
foreground='#0E2933',
background='#B6DDE2',
bordercolor='#ACD1D6',
darkcolor='#B6DDE2',
lightcolor='#B6DDE2',
focuscolor='#0E2933',
)
s.map(
default.TButton',
background=[('disabled', '#E9F4F6'), ('hover !disabled', '#9ABBC0'), ('pressed !disabled', '#88A5A9')],
)
if __name__ == "__main__":
dlg = RootDialog()
dlg.mainloop()
```
### Use a declarative language
After discovering the Tkinter style system, another problem to solve is using a declarative language. For a person who develops web interfaces every day, creating a GUI using Python code doesn't make sense. It requires too much code and too many variables, and poorly structured code. Creating a simple button requires many lines of code intertwined through the creation of many other components.
Modifying the GUI is tedious because it requires many variables that are all tangled up.
In comparison, creating a graphical interface using HTML tags is much more declarative and allows the creation of complex graphical interfaces while remaining structured. That's why I decided to use the Markup Language to create a graphical interface easily from the components available in Tkinter.
The initial idea was quite simple; a tag corresponds to a component. If I want to create a button component with the text **Hello**, I just have to make a tag named button with an attribute with the value **Hello**.
**TKVue:**
```
<Button text="Hello" />
```
**Python:**
```
b = Button(parent, text ="Hello")
b.pack()
```
I extrapolated the concept to all the components and functionalities in the Tkinter library from this starting idea. So, to create a more complex graphical interface with different elements, just nest them inside each other by creating a parent-child structure and defining the attributes for each component.
**TKVue:**
```
<TopLevel title="TKVue Test">
<Frame pack-fill="both" pack-expand="1" pack-padx="10" pack-pady="10">
<Label text="Available values: " width="20" pack-side="left"/>
<ComboBox id="label" pack-side="left" pack-expand="1" values="['zero', 'one', 'two', 'three']" />
</Frame>
</TopLevel>
```
**Python:**
```
import tkinter
from tkinter.ttk import Frame, Label, Combobox
top = tkinter.Tk()
top.title = "TKVue Test
frame = tkinter.Frame(top)
frame.pack(fill='both', expand=1, padx=10, pady=10)
l = Label(frame, text="Available values: ", width=20)
l.pack(side='left')
c = Combobox(frame, values=['zero', 'one', 'two', 'three'])
c.pack(side='left', expand=1)
top.mainloop()
```
**Result:**
![Initial result][6]
Using a hierarchical design similar to HTML simplifies the creation of the graphical interface and significantly simplifies the presentation of the parent-child structure created between each component.
### Create a dynamic interface
The other problem I encountered using Tkinter was the non-dynamic side of the interface. Having coded Web GUIs with Jinja2 templates, which allow you to reuse variables and create loops easily, I wanted similar functionality when creating desktop GUIs.
I must admit that the dynamic side of TKVue gave me some problems. My initial plan was to update the GUI dynamically when a variable was changed by the code. So it should be possible to use variables in the markup language. Suppose I select a value from a drop-down list. I want to be able to associate the specified value with a variable and allow that variable to be reused in another component for display. See the code sample below:
**TKVue:**
```
import tkvue
class RootDialog(tkvue.Component):
template = """
<TopLevel title="TKVue Test">
<Frame pack-fill="both" pack-expand="1" pack-padx="10" pack-pady="10">
<Label text="Available values: " width="20" pack-side="left"/>
<ComboBox pack-side="left" pack-expand="1" values="{{myvalues}}" textvariable="{{var1}}" />
</Frame>
<Frame pack-fill="both" pack-expand="1" pack-padx="10" pack-pady="10">
<Label text="{{'Available values:' + var1 }}" />
</Frame>
</TopLevel>
"""
data = tkvue.Context({"myvalues": ["zero", "one", "two", "three"], "var1": ""})
dlg = RootDialog()
dlg.mainloop()
```
**Python:**
```
import tkinter
from tkinter.ttk import Frame, Label, Combobox
top = tkinter.Tk()
top.title = "TKVue Test
frame = tkinter.Frame(top)
frame.pack(fill='both', expand=1, padx=10, pady=10)
l = Label(frame, text="Available values: ", width=20)
l.pack(side='left')
var1 = tkinter.StringVar()
c = Combobox(frame, values=['zero', 'one', 'two', 'three'], textvariable=var1)
c.pack(side='left', expand=1)
frame2 = tkinter.Frame(top)
frame2.pack(fill='both', expand=1, padx=10, pady=10)
s = Label(frame2, text='Value selected:')
s.pack(side='bottom')
var1.trace_add("write", lambda *args: s.configure(text='Value selected: ' + var1.get()))
top.mainloop()
```
**Result:**
![Result][7]
With this in place, it is possible to create a graphical interface that reacts to the user's actions in a simple and declarative way.
### Use loops and conditions
To make the model as dynamic as possible, it was necessary to support the use of loops and conditions to show or hide components depending on variables. TKVue introduces two special attributes to fill this need, the **for** attribute for loop creation and the **visible**attribute.
The following example allows the user to select the number of items to be displayed in the loop from a drop-down list. The following example demonstrates the dynamic side of a loop reacting to the user's actions:
**TKVue:**
```
import tkvue
class RootDialog(tkvue.Component):
template = """
<TopLevel geometry="970x500" title="TKVue Test">
<Frame pack-fill="both" pack-expand="true" padding="10">
<Label text="Selection number of row to display:" />
<Combobox values="{{ list(range(1, 100)) }}" textvariable="{{ count }}"/>
<Frame pack-fill="both" pack-expand="1" pack-side="left">
<Label pack-fill="x" pack-expand="1" for="i in range(1, count)" text="{{ 'row %s' % i }}" />
</Frame>
</Frame>
</TopLevel>
"""
data = tkvue.Context({'count': 5})
if __name__ == "__main__":
dlg = RootDialog()
dlg.mainloop()
```
**Result:**
![Result with rows][8]
The condition declaration is even simpler. You must define an expression in the **visible** attribute as follows:
**TkVue:**
```
import tkvue
class RootDialog(tkvue.Component):
template = """
<TopLevel geometry="970x500" title="TKVue Test">
<Frame pack-fill="both" pack-expand="true" padding="10">
<Checkbutton text="Show Text" variable="{{show}}" />
<Label text="Text is Visible" visible="{{show}}" />
</Frame>
</TopLevel>
"""
data = tkvue.Context({'show': True})
if __name__ == "__main__":
dlg = RootDialog()
dlg.mainloop()
```
**Result:**
![Result with text][9]
### Use localization
Another important aspect of the development of my application is to allow the translation of the graphical interface quickly by using technologies that are already known and widely used in Python: `gettext`.
To do this, the library provides an adapter for Babel, which allows extracting the strings to be translated. You can then find these strings in a translation catalog (.po file).
Here is an example of a configuration file for Babel that allows you to extract strings for translation purposes:
Place the following in `Babel.cfg`:
```
[python: **.py]
[tkvue: **/templates/**.html]
```
I'm using Tkinter and my theming library for my data backup software, Minarca.
The final result is elegant and simple at the same time. The style matches the color palette of the Minarca project.
![Result welcome][10]
### Try TKVue today
The objective of all this work is to bring familiar advantages in web development to traditional development. TKVue saves time while developing the graphical interface and makes it easier to maintain and modify the code afterward.
The work I have done so far in the library is quite rudimentary and needs further modification before being used more widely in projects. I hope that the publication of this article allows someone else to take over the development of a similar library or to continue to develop directly in TKVue to improve its functionality. TKVue's code is available on [GitLab][11].
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/user-interface-tkinter-python
作者:[Patrik Dufresne][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/patrik-dufresne
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/17/4/pyqt-versus-wxpython
[2]: https://tkdocs.com/tutorial/styles.html#usetheme
[3]: https://opensource.com/sites/default/files/2023-02/1default.png
[4]: https://opensource.com/sites/default/files/2023-02/2clam.png
[5]: https://opensource.com/sites/default/files/2023-02/3personalized.png
[6]: https://opensource.com/sites/default/files/2023-02/4result.png
[7]: https://opensource.com/sites/default/files/2023-02/5result.png
[8]: https://opensource.com/sites/default/files/2023-02/6result-rows.png
[9]: https://opensource.com/sites/default/files/2023-02/7result-text.png
[10]: https://opensource.com/sites/default/files/2023-02/8result-welcome.png
[11]: https://gitlab.com/ikus-soft/tkvue

View File

@ -0,0 +1,146 @@
[#]: subject: "Login as Root in Ubuntu GUI"
[#]: via: "https://itsfoss.com/ubuntu-login-root/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Login as Root in Ubuntu GUI
======
By default, Ubuntu disables the root account. You must use the sudo command for any tasks requiring root privileges.
This is for your own security, of course. Using the system as root all the time is like running around with a sword in your hand. It increases the chances of messing up things.
Logging in as root is still common in the servers. On the desktop side, it's quite rare to log in as root. Even Kali Linux has changed it.
And yet, a few desktop users want to log in as root. This is not something advisable but surely doable.
in this guide, I will show you how to **log in as a root in your GNOME desktop** using Ubuntu.
### How to login as a root in the GNOME desktop
🚧
I won't advise login as root on the desktop. You have sudo mechanism for all your root needs. Do it only if you have a good enough reason. This tutorial is for demo purposes only. You have been cautioned.
#### Step 1: Enable root account
You want to log in as root. But the root account is disabled by default. The first step is to enable it.
Change the root account password that will eventually enable the root account for you:
```
sudo passwd root
```
![change the password of root account in ubuntu][1]
It goes without saying that you should not forget the root password.
#### Step 2: Change GDM configuration
🚧
This part of the tutorial is only valid for GNOME. Please
[check your desktop environment][2]
and ensure that it is GNOME.
Ubuntu uses GNOME by default and GNOME uses the GDM display manager.
To allow log in as root into GNOME, you need to make some changes in the GDM configuration file located at `/etc/gdm3/custom.conf`.
Make a backup of the config file:
```
cp /etc/gdm3/custom.conf /etc/gdm3/custom.conf~
```
In the worst case, if you somehow mess things up, the back up file can be used to replace the existing one from the TTY.
Now, open the GDM file with the following command:
```
sudo nano /etc/gdm3/custom.conf
```
And add the following line to allow the root login:
```
AllowRoot=true
```
![configure GDM on ubuntu][3]
Press Ctrl+X to exit Nano while saving it.
#### Step 3: Configure PAM authentication
Now, you will have to configure the PAM authentication daemon file, which can be opened by the following command:
```
sudo nano /etc/pam.d/gdm-password
```
In this file, you will have to comment out the following line with the `#` symbol that denies the root access in GUI:
```
auth required pam_succeed_if.so user != root quiet_success
```
![][4]
[Save changes and exit from the nano][5] text editor.
#### Step 4: Log in as root
Now, reboot your system:
```
reboot
```
At the login screen, select the `Not listed` option, enter `root` in username and enter the password that you configured at the beginning of this guide:
![Login as a root in ubuntu desktop][6]
Once you log in, it will notify you by saying, **"logged in as a privileged user":**
![logged in as a privileged user in Ubuntu][7]
That's it! Now, you are running your Ubuntu system as a root.
### Things you should know when running the system as a root user
There is a reason why Ubuntu disables a root account by default. Want to know why? Here you have it:
Root User in Ubuntu- Important Things You Should KnowHow do you become root user in Ubuntu? Either you run commands with root privilege like this: sudo any_command Or you switch user in Ubuntu to root user like this: sudo su In both cases, youll have to enter your own user accounts password. But theres![][8]It's FOSSAbhishek Prakash![][9]
And again, it is not advisable to log in a s root in your desktop Linux system. Please follow the norms and stay away from such (mis) adventures.
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-login-root/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sagar/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/content/images/2023/01/change-the-password-of-root-account-in-ubuntu.png
[2]: https://itsfoss.com/find-desktop-environment/
[3]: https://itsfoss.com/content/images/2023/01/configure-GDM-on-ubuntu.png
[4]: https://itsfoss.com/content/images/2023/01/configure-PAM-authentication-daemon-in-ubuntu.gif
[5]: https://linuxhandbook.com/nano-save-exit/
[6]: https://itsfoss.com/content/images/2023/01/Login-as-a-root-in-Ubuntu-desktop.png
[7]: https://itsfoss.com/content/images/2023/01/logged-in-as-a-privileged-user-in-Ubuntu.png
[8]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png
[9]: https://itsfoss.com/content/images/wordpress/2020/01/root_user_ubuntu.png

View File

@ -0,0 +1,121 @@
[#]: subject: "5 escape sequences for your Linux shell"
[#]: via: "https://opensource.com/article/23/2/escape-sequences-linux-shell"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
5 escape sequences for your Linux shell
======
I recently read an [article about shell metacharacters][1] by Opensource.com correspondent Don Watkins. His article made me think about all the weird things you could do with shell input. While I probably have yet to discover the extremes, I do often find shell escape sequences, like `\b` and `\t` and `\f` strangely useful.
Escape sequences are a special type of terminal input. They're designed to make it possible for you to enter characters or events that you may not have on your physical keyboard. Here are my favorite escape sequences for the Bash shell.
### 1. Backspace
You can enter a backspace character as part of a command, more or less loading it to trigger once the command executes. For instance, looking casually at this command, you might expect its output to be `ab`, but take a look at the actual output:
```
$ echo a$'\b'b
b
```
Technically, the shell did output `ab` (you can confirm that by appending `| wc -m` to the command) but part of the total output was the `\b` backspace event. The backspace removed `a` before outputting `b`, and so the viewable output is just `b`.
### 2. Newline
A newline character is a signal for your shell to go to column 0 of the next line. This is essential when using a command like [printf][2], which doesn't assume that you want a newline added to the end of your output, the way `echo` does. Look at the difference between a `printf` statement without the `\n` newline character and one with it:
```
$ printf "%03d.txt" 1
001.txt$
$ printf "%03d.txt\n" 1
001.txt
$
```
### 3. Form feed
A `\f` form feed signal is like a newline character, but without the imperative to return to column 0. Here's a `printf` command using a form feed instead of a newline:
```
$ printf "%s\f" hello
hello
$
```
Your shell prompt is on the next line, but not at the start of the line.
### 4. Tab
There are two tab escape sequences: the `\t` horizontal tab and the `\v` vertical tab. The horizontal tab is exactly what you'd expect.
```
$ echo a$'\t'b
a b
```
The vertical tab is, in theory, the same principle but in vertical space. On most consoles, though, the vertical spacing of a line isn't variable, so it usually ends up looking a lot like a form feed:
```
$ echo a$'\v'b
a
b
```
### 5. Unicode
There are a lot of characters available in the Unicode standard, and your keyboard only has about 100 keys. There are a few ways to enter [special characters][3] on Linux, but one way to enter them into the terminal is to use the Unicode escape sequence. You start this escape sequence with `\u` followed by a hexadecimal value. You can find many Unicode values in the file `/usr/share/X11/locale/en_US.UTF-8/Compose`, or you can look at the Unicode specification at [https://www.unicode.org/charts/][4].
This can be a useful trick for entering common symbols like Pi (the ratio of a circle's circumference to its diameter):
```
$ echo $'\u03C0'
π
```
There are lots of other symbols and characters, too.
```
$ echo $'\u270B'
$ echo $'\u2658'
$ echo $'\u2B67'
```
There's Braille notation, musical notation, alphabets, electrical symbols, mathematical symbols, emoji, game symbols, and much more. In fact, there are so many available symbols that sometimes you need the `\U` (note the capital letter) Unicode escape sequence to access Unicode in the high ranges. For instance, this 5-of-Hearts playing card only appears with the `\U` escape sequence:
```
$ echo $'\U1F0B5'
🂵
```
Have a look around on the Unicode specification to find your niche, and use `\u` and `\U` to access all the special symbols you need.
### Escape the shell
There are 18 escape sequences listed in the man page for the Bash shell, and some I find more useful than others. I've covered my favorites in this article, and Don Watkins talked about the metacharacters he uses most often in his article, yet there's still more to be discovered. There are ways to encode ranges of letters and numbers, subshells, mathematical equations, and more. For a good overview of metacharacters available for the shell, download our [metacharacter cheat sheet][5] and keep it handy as you get better at using the most powerful application on your computer: the Linux terminal.
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/escape-sequences-linux-shell
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/22/2/metacharacters-linux
[2]: https://opensource.com/article/20/8/printf
[3]: https://opensource.com/article/22/7/linux-compose-key-cheat-sheet
[4]: https://www.unicode.org/charts/
[5]: https://opensource.com/downloads/linux-metacharacters-cheat-sheet

View File

@ -0,0 +1,369 @@
[#]: subject: "Beginner's Guide to R Markdown Syntax [With Cheat Sheet]"
[#]: via: "https://itsfoss.com/r-markdown/"
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Beginner's Guide to R Markdown Syntax [With Cheat Sheet]
======
You probably already know about the lightweight Markdown markup language. Refer to our [Markdown guide][1], if you're new to the concept. Overall, it is a simple and effective language for creating plain-text documents.
However, Markdown may not be enough to make detailed reports or technical documents.
Hence, **R Markdown** as an **interactive file format** came into existence back in 2014 thanks to packages like [knitr][2] and [Pandoc][3]. It combines plain text with in-line R code, helping you make a dynamic document.
To create R Markdown documents, you can use [various IDEs][4] and extensions to make it possible. However, the official IDE that helps you do it is **RStudio**. So, in this article, we will focus on **learning R Markdown syntax using RStudio**.
💡
If you did not know,
**R programming language**
is used for statistical computing, graphics representation, and reporting.
**Suggested Read 📖**
How to Install and Use R on UbuntuBrief: This tutorial teaches you to install R on Ubuntu. Youll also learn how to run your first R program in Ubuntu using various methods. R, together with Python, is the most commonly used programming language for statistical computing and graphics, making it easy to work with data. With![][5]It's FOSSSergiu![][6]
### Setting RStudio
RStudio makes it easy to work with R Markdown by its setup process. You just need to install a package, and you are done for the most part!
Once you have RStudio installed, head to the Tools menu and select the _Install Packages_ option.
![Select Install Packages option under Tools menu in RStudio][7]
On the new dialog box, search for rmarkdown and install it.
![Install RMarkdown Package by searching it and pressing install button on the new package install dialog box][8]
💡
To use code chunks like python, you need to install additional packages. RStudio will prompt you to install the required packages when you try to include them in your document.
Once installed, you can start a new rmarkdown document by selecting **File > New > RMarkdown**.
![Create a new RMarkdown Document from File menu][9]
This will prompt you to add some information regarding the document (metadata for the file). Fill those up.
![Provide the title and other details for new document in rmarkdown][10]
Or you can create an empty document to start fresh.
### RMarkdown Syntax
Since it is just "**enhanced Markdown**," most syntax remains the same.
There would be some differences when you add things not usually supported with Markdown, like **tables, math equations, code chunks, etc.**
Here's a quick summary of what we will be covering:
Name of the RMarkdown BlockProper Syntax |
| Heading | # Level 1## Level 2### Level 3Level 1=======Level 2------- |
| Emphasis | *Italics*_Italics_**Bold**__Bold__ |
| List | Unordered List* Item* Item + Sub + SubOrdered List1. Item2. Item + Sub + Sub |
| Code Chunk | Normal Code Block```Code Goes Here```R Code Block```{r}R CODE```You can use other languages also.Inline `code` |
| Links | Plain Link: Paste the URLLink with Caption: [Text](URL_Address)Link to a section: [Text](#Name-of-section) |
| Table | | Column | Column | Column || ------ | ------ | ------ || Item | Item | Item || Item | Item | Item | |
| Equations | In line Equations: $Equations$Display Equations: $$Equations$$ |
| Images | Without Caption: ![](Link-to-Image)With Caption : ![optional caption text](Location-of-image) |
| Block Quotes | > Type your Block Quotes |
| Misc | Super Script : Text^Superscript^Horizontal rule or Page Break:========= or ----------For Manual Line break, end line with 2+ spaces |
#### The YAML Header
At the top of a Rmarkdown document, there is a YAML header enclosed within two `---`. This block usually contains a title, author, date, and the file type you want to output, defining the **final look of the document.**
The file type is either **HTML, PDF, or Word.**
```
---
title: "Sample"
author: "It's FOSS"
date: "2023-02-08"
output: pdf_document
---
```
This can be added while setting the new document in RStudio, which is shown in the above section.
#### Heading
In R Markdown, we can give heading in two different methods. Either we can use the # character for different levels of heading like:
```
# Heading Level 1
## Heading Level 2
### Heading Level 3
#### Heading Level 4
##### Heading Level 5
###### Heading Level 6
```
Or, `=` and `-` for level 1 and 2 headings, respectively.
```
Level 1 Heading
===============
Level 2 Heading
---------------
```
![various types of heading levels in rmarkdown file][11]
#### Lists
There are two types of Lists, the first one is an **Unordered list**, or you could call them bullet points:
```
* Item 1
* Item 2
+ Sub 1
+ Sub 2
* Item 3
```
And the second one is the **Ordered list**, which is the numbered type:
```
1. Item 1
2. Item 2
+ Sub 1
+ Sub 2
3. Item 3
```
![order and unordered list example][12]
**Suggested Read 📖**
Read and Organize Markdown Files in Linux Terminal With GlowGlow is a CLI tool that lets you render Markdown files in the Linux terminal. You can also organize Markdown files with it.![][13]It's FOSSAbhishek Prakash![][14]
#### Format text within a paragraph
There are several ways to format text.
![][15]
You can add emphasis to the text like italics or bold using:
- Italics: Place the text in between single asterisks or single underscore
- Bold: Place the text in between double asterisks or double underscores.
```
*This is Italicized text*
_This is Italicized text_
**This is Bold Text**
__This is Bold Text__
```
You can explore on this using our resource on [how to add bold and italic text in Markdown][16].
If you want to add superscript to a text, place the text that should be superscript in between `^` symbol.
```
Normal Text^super_script^
```
Or, if you want to add text strike-through, place the text in between two `~~` symbol.
```
~Strike Through this~~
```
![][17]
#### Adding Code Chunks
Embedding code is the primary purpose of R Markdown. It allows us to add codes in several ways.
**Adding Normal code block.**
If you want to add a normal code block to separate it from other text, use the syntax below:
```
```
Your Code Goes Here
```
```
You can also try [adding code blocks with syntax highlighting][18].
You should append the language in curly braces if you want to add code and embed its output to the document:
```
```{Language}
Your Code Goes Here
```
```
Or, you can add inline codes by placing the respective text between ` symbols.
```
The `code` is a code
```
Here's how it should look like:
![][19]
#### Links
To add a link as plain text, just paste the link as it is in a line.
```
https://itsfoss.com
```
Or, to make a text hyperlink, use the syntax:
```
[Text](URL Address)
```
Another way to add a link is, when you want to link to a section of the page. In this case, use the syntax:
```
[Text](#Name-of-section)
```
![][20]
#### Tables
The syntax for adding tables is similar to that of markdown.
```
|Column|Column|Column|
| --- | --- | --- |
|Item|Item|Item|
|Item|Item|Item|
```
![][21]
📋
Curious to know more? Refer to our guide on
[creating tables in Markdown][22]
.
#### Images
To add an image, use the syntax:
```
![](http://example.com/logo.png)
OR
![optional caption text](figures/img.png)
```
![][23]
#### Block Quotes
RMarkdown allows you to add block quotes. To use this, use the **> (greater than)** symbol in front of the line/paragraph you want to quote.
```
This is a normal text
> This is a Block Quote
```
![][24]
If you want to explore more use cases of blockquote, head to our [Markdown quotes][25] guide.
#### Equations
Using RMarkdown, you can add either equations or display complex LaTex equations.
For example:
```
In line Pythagorean Theorem: $Equation$
Display Equation: $$Equation$$
```
![adding equations in R Markdown document][26]
#### Horizontal Rule / Page Break
Use three or more asterisks or dashes to add a horizontal rule /page break.
```
************
------------
```
If you want to add a manual line break, end that line with two or more spaces.
### Summary
### R Markdown is Useful (Cheat Sheet)
Whether you are working with scientific reports or want to create any other type of dynamic document, R Markdown is your best bet to make the most out of Markdown.
Here's a cheat sheet to help you summarize it all:
![][27]
[R Markdown Cheat SheetR Markdown Cheat Sheet.pdf145 KBdownload-circle][28]
_💬 Did we miss something that you use with R Markdown? Share your thoughts in the comments down below._
--------------------------------------------------------------------------------
via: https://itsfoss.com/r-markdown/
作者:[Sreenath][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sreenath/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/markdown-guide/
[2]: https://www.r-project.org/nosvn/pandoc/knitr.html
[3]: https://itsfoss.comknitr, and Pandoc
[4]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/
[5]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png
[6]: https://itsfoss.com/content/images/wordpress/2019/06/install-r-on-ubuntu.jpg
[7]: https://itsfoss.com/content/images/2023/02/select-install-packages.png
[8]: https://itsfoss.com/content/images/2023/02/install-rmarkdown-1.png
[9]: https://itsfoss.com/content/images/2023/02/new-r-markdown.png
[10]: https://itsfoss.com/content/images/2023/02/new-document-in-rmark.png
[11]: https://itsfoss.com/content/images/2023/02/Headings.png
[12]: https://itsfoss.com/content/images/2023/02/List.png
[13]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png
[14]: https://itsfoss.com/content/images/wordpress/2022/01/glow-cli-markdown.png
[15]: https://itsfoss.com/content/images/2023/02/emphasis.png
[16]: https://itsfoss.com/markdown-bold-italic/
[17]: https://itsfoss.com/content/images/2023/02/superescript.png
[18]: https://itsfoss.com/markdown-code-block/
[19]: https://itsfoss.com/content/images/2023/02/code-chunk.png
[20]: https://itsfoss.com/content/images/2023/02/links.png
[21]: https://itsfoss.com/content/images/2023/02/table.png
[22]: https://itsfoss.com/markdown-table/
[23]: https://itsfoss.com/content/images/2023/02/images.png
[24]: https://itsfoss.com/content/images/2023/02/block-quotes.png
[25]: https://itsfoss.com/markdown-quotes/
[26]: https://itsfoss.com/content/images/2023/02/equations.png
[27]: https://itsfoss.com/content/images/2023/02/R-Markdown-Cheat-Sheet.webp
[28]: https://itsfoss.com/content/files/2023/02/R-Markdown-Cheat-Sheet.pdf

View File

@ -0,0 +1,123 @@
[#]: subject: "Downgrading a Package via apt-get"
[#]: via: "https://itsfoss.com/downgrade-apt-package/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Downgrading a Package via apt-get
======
In a situation where a recently upgraded software is causing issues?
While you can always investigate the issue to fix it, at times, going back to the previous working version saves time and effort.
If the new version introduced a bug, you could do nothing on your end, right?
The good thing is that you can easily downgrade an apt package in Ubuntu and Debian.
All you have to do is to use the apt command like this:
```
sudo apt install package_name=package-version-number
```
That seems easy enough but how would you get the exact version number? Which old versions are supported? You can get that detail with:
```
sudo apt-cache policy package_name
```
Let me explain all this with a real-life example.
### Downgrading apt package
Recently, I was updating the Ubuntu server that hosts It's FOSS Community forum.
I did the usual apt update && apt upgrade and things went bonkers by the time updates were installed.
Apparently, the latest version of Docker didn't support the aufs storage driver. To reduce the downtime, I opted to downgrade to the previous Docker version.
Check the currently installed package version
![Installed Docker version][1]
Then check for the available versions that could be installed:
```
sudo apt-cache policy package_name
```
It may throw a huge list or just a small one:
![All installable versions of an apt package][2]
If it shows at least one older version than the current one, you are in luck.
Now, you may think that the version number of a package would be composed of just the numbers. But that may not always be the case.
Basically, you copy the entire stuff before 500 (the priority number).
```
brave-browser:
Installed: 1.48.158
Candidate: 1.48.164
Version table:
1.48.164 500
500 https://brave-browser-apt-release.s3.brave.com stable/main amd64 Packages
*** 1.48.158 500
500 https://brave-browser-apt-release.s3.brave.com stable/main amd64 Packages
100 /var/lib/dpkg/status
1.47.186 500
500 https://brave-browser-apt-release.s3.brave.com stable/main amd64 Packages
1.47.171 500
500 https://brave-browser-apt-release.s3.brave.com stable/main amd64 Packages
1.46.153 500
```
Once you have got the package number, use it to downgrade the installed package like this:
```
sudo apt install package_name=package-version-number
```
![Downgrading an installed package via apt-get command][3]
You'll see a warning about downgrading the package, of course.
![Downgrading apt package][4]
But once the process completes, your package would have been downgraded to the given older version.
### So, hold it, maybe?
So, you just learned to downgrade apt packages. But if you don't pay attention, the package will be upgraded again with the next system update.
Don't want that? You can [prevent a package from being updated][5]. Use the apt-mark command like this:
```
sudo apt-mark hold package_name
```
I hope this quick tip helps you with downgrading the apt packages when the need arises. Let me know if you have questions or suggestions.
--------------------------------------------------------------------------------
via: https://itsfoss.com/downgrade-apt-package/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed/
[1]: https://itsfoss.com/content/images/2023/02/installed-docker-version.png
[2]: https://itsfoss.com/content/images/2023/02/available-docker-versions.png
[3]: https://itsfoss.com/content/images/2023/02/downgrading-installed-packages.png
[4]: https://itsfoss.com/content/images/2023/02/downgrading-installed-package.png
[5]: https://itsfoss.com/prevent-package-update-ubuntu/

View File

@ -0,0 +1,143 @@
[#]: subject: "How to Use a Differential Analyzer (to Murder People)"
[#]: via: "https://twobithistory.org/2020/04/06/differential-analyzer.html"
[#]: author: "Two-Bit History https://twobithistory.org"
[#]: collector: "lujun9972"
[#]: translator: "toknow-gh"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
怎么用微分分析仪(杀人)
======
微分分析仪是一种能够求解微分方程的机械式模拟计算机。它已经不再使用了,因为如今最便宜的笔记本电脑都能更快地解决相同的问题,并且你还可以同时在线刷剧。然而在数字计算机发明之前,微分分析仪使数学家能够完成一些用其它工具不可能完成的计算。
现如今很难想象一台不是由印刷数字电路组成的计算机竟然是可以正常运作的。机械计算机听起来就像是从蒸汽朋克小说里跑出来的一样。事实证明微分分析仪不但能用,而且还是一些研究领域中必不可少的工具。它最为人所知的应用是曾被美国陆军用于编制火炮射表。如果没有射表辅助瞄准,口径再大的火炮也无法充分发挥效能。所以理论上来说,微分分析仪在帮助同盟国赢得二战上发挥了重要作用。
要弄清微分分析仪是如何做到这些的,你首先得知道什么是微分方程。已经还给学校了?没事,我也一样。
### 微分方程
你首次接触微分方程应该是在大学微积分 I 的最后几周。在学期的这个阶段,你那薪资低微的兼职教授应该已经教授过极限、导数和积分这些概念了。在这些概念之上再引入等号,现在你就得到了一个微分方程。
微分方程描述一个变量相对于另一个(或多个)变量的变化率。形如 $y = 4x + 3$ 的常见代数式表示变量 $y$ 与 变量 $x$ 之间的关系。形如 $\frac{dy}{dx} = x$ 或 $\frac{dy}{dx} = 2$ 的微分方程表示变化率与其它变量间的关系。本质上微分方程就是用纯数学方式来描述变化率。前面第一个方程表示 “变量 $y$ 相对于变量 $x$ 的变化率刚好等于 $x$。”第二个方程表示“无论 $x$ 的值是多少,$y$ 相对于 $x$ 的变化率总是 2。”
微分方程非常有用,因为在面对真实世界中的复杂系统时比起提出一个能够描述系统在任意时刻状态的方程,描述系统从一个时刻到下一个时刻的状态变化要容易得多。因此,微分方程被广泛应用于物理和工程领域。一个著名的微分方程是<ruby>热传导方程<rt>heat equation</rt></ruby>。它能描述热量在物体中的扩散过程。要提出一个完全地描述物体在某时刻 $t$ 的热量分布的函数很困难,但推理热量从某时刻到下一个时刻的扩散过程不太可能会让你绞尽脑汁——近冷者变热,近热者变冷。所以尽管热传导方程在形式上比起前面的例子要复杂得多,它也只是变化率的描述而已。它描述了在给定与周围的温差时,物体上任意一点的温度随时间的变化。
再来举一个更具体的例子。假如我在真空中竖直向上抛出一个网球,在我窒息之前它会落回来吗?这是我在高中物理课上被问到的问题,解决它只需要基本的牛顿运动方程。现在暂且假设我已经忘记了牛顿运动方程,只记得物体以恒定的加速度 $g$ (大约为 $10 \;m/s^2$)向地球加速运动。那么如何用微分方程来解决这个问题呢?
现在把我对高中物理仅存的记忆表示成微分方程。网球在离手后会向地球以 $g$ 加速运动。也就是说网球的速度相对于时间的变化率为 $g$(在负方向上)。进一步,我们可以说球离地高度的变化率(也就是速度)随时间的变化率是负方向的 $g$。其微分方程形式如下,其中 $h$ 表示高度,$t$ 表示时间:
$$
\frac{d^2h}{dt^2} = -g
$$
它跟前面的微分方程看起来略有差别,因为这是所谓的二阶微分方程。我们讨论的是变化率的变化率,也许你还记得微积分课讲过,这需要用到二阶导数。这是方程左边部分看上去像被平方了的原因。但是该方程也仅仅表示了球向下以恒定的加速度 $g$ 加速运动这一事实。
到这里,我可以选择使用微积分来求解微分方程。解微分方程并不是要找满足指定关系的值,而是要找满足关系的函数。对上面的微分方程的另一种理解是存在这样的函数,它的二阶导数为 $-g$。我们想要找到这个函数,因为它能告诉我们球在任意时刻的高度。好在这个微分方程恰巧是容易求解的。通过这样,我们可以重新推导出那些被我遗忘了的运动方程,从而轻松地计算出球落回来所花的时间。
但是大部分情况下微分方程是很难求解的。有时甚至是无法求解的。假设我在大学时把更多的精力花在了计算机科学上,那么我的另一种选择就是用微分方程来做模拟。如果已知球的初速度和加速度,我可以轻易用 Python 写一个 for 循环来逐秒迭代计算球在离手后 $t$ 时刻的速度。在此基础上对循环程序稍加修改,就可以用算出的速度迭代计算出球的高度。运行这个 Python 模拟程序,它就可以计算出球什么时候落回来了。这个模拟并不是完全精确的,但是我可以通过减小计算用的时间步长来提升精度。总之我要做的只是搞清楚当球落回来时我是否还活着。
这就是微分方程的数值解法。这也是大多数领域中求解微分方程时实际采用的方法。对于用数值方法求解微分方程,计算机是必不可少的,因为模拟的精度取决于在微小步长上进行的大量计算。手工计算容易出错并且太耗时。
那如果将这个问题的背景时间设定在 1936 年呢?我仍然希望实现计算过程的自动化。但是此时离 <ruby>克劳德·香农<rt>Claude Shannon</rt></ruby> 完成他的硕士论文还有一年时间。在这篇论文中香农用数字电路实现了布尔 <ruby>代数<rt> boolean algebra</rt></ruby>。没有数字计算机可用,恐怕就只能寄希望于于模拟计算机了。
### 微分分析仪
首台微分分析仪是由 <ruby>范内瓦·布什<rt>Vannevar Bush</rt></ruby><ruby>哈罗德·哈森<rt>Harold Hazen</rt></ruby> 于 1928 年到 1931年在 MIT 建造的。他们两人都是工程师。制造它是为了解决应用数学和物理领域中的实际问题。正如布什在 [1931 年的一篇论文][1] 中所说,微分分析仪是为了解决那些“持续被他们所用方程的复杂度而不是深度所困扰的”的数学家的所面临的当代问题。
微分分析仪是一台由传动轴、齿轮和转盘组成的复杂仪器,它能够求解高达六阶的微分方程。它是一台由简单部件通过复杂组合而成的神奇机器。在这一点上它和数字计算机很像。不同点是,数字计算机通过在电路中实现布尔代数来模拟代数问题,而微分分析仪通过传动轴、齿轮和转盘直接模拟微分方程问题。微分分析仪的本质就是对实际问题的直接机械类比。
那到底怎么用齿轮和转盘来计算微积分呢?其实这是最容易解释的部分。微分分析仪最重要的构件是六个积分器,每一个对应一阶的微分方程。机械积分器的历史可以追溯到 19 世纪,它是一个相对简单的装置,能够对单个简单函数进行积分运算的。下面我们将了解积分器的工作原理,但顺便说一句,布什的巨大成就不是发明了机械积分器,而是发现了一种将积分器串联起来解决高阶微分方程的方法。
机械积分器由一个大转盘和一小得多的转轮组成。转盘像唱片机的转台一样平行于地面平放。它由电机驱动匀速转动。转轮竖直的轻放于转盘表面上,其压力既要足够让转盘驱动转轮,又不能太大以致于阻碍转轮相对于转盘自由侧向滑动。总之当转盘转动时,转轮也跟着转动。
转轮的转速由它距离转盘中心的距离决定。转盘的中心部分自然转动得比边缘部分慢。转轮的位置是固定不动的,而转盘被安装在一个可以来回滑动的底座上。这样就可以调节转轮相对转盘中心的位置。下面就是积分器工作的关键原理:转盘底座的位置由积分器的输入函数控制。积分器输出取决于转轮的转动量。所以输入函数驱动了输出函数的变化率,这就是将某个函数的导数转换成了这个函数本身。这不就是积分运算吗?
如果刚才的解释还没有让你理解积分器的原理,那么直接看到机械积分器实际工作的样子应该对你有所帮助。其实它的原理出乎意料的简单,看一遍它的运行过程你肯定就能窥见其运作机制。因此我制作了一个 [运行中的机械积分器动态原理图][2],强烈建议你看一看。它展示了通过各个部件的旋转和移动求函数 $f(x)$ 的 <ruby>不定积分<rt>antiderivative</rt></ruby> $F(x)$ 的过程。这可太有趣了。
![][3] _A nice screenshot of my visualization, but you should check out the real thing!_
现在我们有了可以做积分运算的组件,但是只靠它还不足以解决微分方程。为了解释求解微分方程的全过程,我将使用布什在他 1931 年的论文中所举的例子。这个例子恰巧跟前面考虑的微分方程是在本质上是一样的。(真是奇妙的巧合!)布什使用下面的微分方程来表示下落物体的运动:
$$
\frac{d^2x}{dt^2} = -k\,\frac{dx}{dt} - g
$$
这跟前面的网球运动的方程基本上是一样的,只不过布什使用 $x$ 代替了 $h$,并且增加了一项来表示空气阻力的减速作用。这个新增项采用了最简单的形式来描述空气阻力的作用:空气减慢球速的比率正比于球的速度(这里 $k$ 是一个常比例系数,我并不关心它的具体取值)。也就说是球运动得越快,空气阻力就越大,对球的减速作用越显著。
为了配置微分分析仪来解决这个微分方程,我们需要从布什称之为“输入面板”的东西开始。输入面板其实就是一张安装在支架上的坐标纸。如果想要解更复杂的方程,首先需要操作员在坐标纸上绘制好输入函数图像,然后在机器启动时用一个与机器主体相连的指针来跟踪函数图像的轨迹。在我们举的例子中,输入是常数 $g$,所以我们只需将指针移动到正确的位置并让它保持不动即可。
剩下的变量 $x$ 和 $t$ 又是什么呢?变量 $x$ 表示球的高度,是微分分析仪的输出。它会被绘制在输出面板上的坐标纸上。输出面板与输入面板类似,只是它没有指针,取而代之的是由微分分析仪驱动的绘图笔。变量 $t$ 仅仅是按固定速率步进。(在前面模拟网球运动 Python 程序中,我们通过循环来增加 $t$。)变量 $t$ 来源于微分分析仪的电机,它通过匀速转动传动轴来驱动整个计算过程。
布什的原理图对于理解我下面要介绍的内容很有帮助。不过为了便于理解,需要先对微分方程再做一次变换。对方程两边同时进行一次积分,得到下式:
$$
\frac{dx}{dt} = - \int \left(k\,\frac{dx}{dt} + g\right)\,dt
$$
现在方程中的各项与微分分析仪运行中各部件转动量所表示的值之间有了更明确的对应关系。布什的原理图如下:
![][4] _The differential analyzer configured to solve the problem of a falling body in one dimension._
在原理图的顶部是输入面板,右下角是输出面板。图中的输出面板被配置成同时绘制高度 $x$ 和速度 $\frac{dx}{dt}$。积分器在左下方,由于这是二阶微分方程,所以我们需要两个积分器。电机驱动顶部标注为 $t$ 的传动轴。(有趣的是,布什将这些水平传动轴称为“总线”。)
现在原理图中还剩下两个部件没有解释了。里边标记了 $k$ 的方框是<ruby>乘法器<rt>multiplier</rt></ruby>$k$ 是比例常数。它获取由 $\frac{dx}{dt}$ 标记的传动轴的转动量,并通过齿轮组进行放缩。用 $\sum$ 标记的方框是<ruby>加法器<rt>adder</rt></ruby>。它通过巧妙的齿轮组合将两个传动轴的的转动叠加起来驱动第三个传动轴。我们的方程中涉及了求两项之和,所以需要引入加法器。这些额外组件的引入确保了微分分析仪有足够的灵活性来模拟由各种各样的项和系数组成的方程。
我发现以慢放的方式来推演电机启动时的级联因果过程对于理解微分分析仪的原理很有帮助。电机启动后立即驱动传动轴 $t$ 匀速旋转。这样我们就有了时间的概念。这个传动轴有三个作用,分别由连接其上的三个竖直传动轴表示:它驱动了两个积分器的转盘的转动,同时带动输出面板的支架让绘图笔作图。
如果积分器的转轮被放置在转盘中心,那么传动轴 $t$ 就不会带动其它传动轴转动。积分器的转盘会转动,但是放置在转盘中心的转轮不会被带动。这时输出图像将会是一条平坦的直线。出现这种情况是因为我们没有明确指定问题的初始条件。在上面的 Python 程序中,我们需要以常量或函数参数的形式用到网球的初始速度。在启动机器之前,我们通过将两个积分器的转盘调整到合适的位置来指定速度和加速度的初始值。
设置好这些之后,传动轴 $t$ 的转动将会传导到整个系统之中。从物理上来说,许多部件会同时开始转动。但是我们可以认为转动首先传导到积分器 II然后与基于 $g$ 计算得到的加速度表达式求积分得到球的速度 $\frac{dx}{dt}$。速度又反过来作为积分器 I 的输入,推动它的转盘让输出转轮以速率 $\frac{dx}{dt}$ 转动。积分器 I 的输出作为最终结果将会被直接导向到输出面板上。
前面我有意避开了一个令人困惑的细节,那就是机器里有一个怪圈。积分器 II 以传动轴 $(k\,\frac{dx}{dt} + g)$ 为输入,但是该传动轴的转动又部分决定于积分器 II 的输出本身。这可能快把你绕吐了,但在物理上这并没有任何问题——因为所有部部件都是一同转动的。出现这种怪圈并没什么奇怪的,因为在用微分方程在描述某函数的变化率时,也经常会用该函数的函数的形式。(在这个例子中,加速度,即速度的变化率,取决于于速度。)
在将所有东西都正确配置好后,机器会输出球的高度和速度随时间变化的函数图像。这个图像是纸质的。用我们的现代数字化思维来看,这可能有点难以理解。画在纸上的函数图像能干什么?微分分析仪确实不能魔术般地给出解的简洁数学表达式,这是事实。但也请记住一点,很多的微分方程根本没有简洁的解析解。纸上的函数图像与前面模拟球下落的 Python 程序包含相同的信息:某时刻球的位置。它可以回答任何关于该问题的实际问题。
微分分析仪简直酷到爆。它虽然结构复杂,但是本质上只是一些传动轴和齿轮外的组合。要理解它的运作过程,你不必是电气工程师或者会制造芯片。然而它确实可以解微积分!它能够求解出那些靠你自己永远无法解决的微分方程问题。它证明建造计算机器的关键材料不是硅而是人类的创造力。
### 杀人
人类的创造力既能为善,也能为恶。正如我提到的,微分分析仪在历史上最知名的应用是为美国陆军计算火炮射表。鉴于二战是一场“正义的战争”,这是最好的结果。但是也不能忽视微分分析仪增强了大口径火炮的杀伤效能。火炮的确杀死了很多人。如果维基百科可信的话,在二战中死于炮火的士兵比被轻武器杀死的更多。
我们稍后再回到道德讨论上来,先快速解释一下为什么计算射表这么困难,以及微分分析仪是怎么帮助计算射表的。这是将微分分析仪应用于实际问题的很好的例子。射表能告诉炮手在射击某个距离外的目标时需要将炮口上抬多高。编制射表的一种方法是在不同的仰角下发射该火炮,并将结果记录下来。这种方法被用在靶场,比如位于马里兰的阿伯丁试验场。但是单纯通过实验观察的方式来编制射表即昂贵又耗时。在考虑到如天气状况或不同弹丸重量等其它因素时,需要进行的射击次数将会随组合爆增到无法实施的程度。所以基于少量观测数据建立数学模型,再基于该模型来填充出完整的射表是一个更好的方法。
我不想太深入讨论这些数学理论,它们实在太难了,我也不懂。但是你应该也想到了,支配飞行中的炮弹和向上抛出的网球运动的物理规律并没有什么不同。由于计算精度的需要,我们使用的微分方程不得不偏离其理想化的形式,并迅速变得面目狰狞起来。即便是最早的精确弹道理论中的公式,除其它因素外,还考虑了弹丸的重量、直径、形状、主风、海拔、大气密度以及地球自转[1][5]。
虽然关于射表计算的方程很复杂但它们跟前面的微分方程一样都可以通过微分分析仪数值求解。1935 年微分分析仪被阿伯丁试验场用于求解弹道方程。这显著加快了计算射表的速度。[2][6] 然而,二战期间对于射表的需求增长太快了,以至于美国陆军计算射表的速度难以满足运往欧洲战场的武器装备的配套需求。这最终导致陆军资助了宾夕法尼亚大学的 ENIAC 项目。这促成了世界上第一台数字计算机的诞生。(译注:严格来说 ENIAC 是第二台电子数字计算机。第一台电子计算机是阿塔纳索夫-贝瑞计算机AtanasoffBerry Computer简称 ABC 计算机ENIAC 能够通过重新布线运行任意程序。但建造它的主要是为了以数倍于微分分析仪的速度来计算射表。
鉴于在微分分析仪之外,射表计算问题极大地推动了早期计算领域的发展,专门挑出微分分析仪的道德问题也许是不公正的。微分分析仪并没有局限于军事领域的应用,在二战期间和二战后的很大一段时间里,由于美国军方投入的大量的拨款,整个计算领域得到了发展。
总之,我认为微分分析仪更有趣的遗产是它告诉了我们计算的本质。我惊叹于于微分分析仪能做到这么多事情,我猜你也一样。我们很容易落入这样的思维陷阱:将计算看作是由快速数字电路实现的领域。事实上,计算是更抽象的过程,电子数字电路只是实现计算的典型手段罢了。在关于微分分析仪的论文中,布什说他的发明不过是在“运用复杂机械结构来类比复杂的推理过程这一影响深远的计划”上的微小贡献。他的总结很贴切。
1. Alan Gluchoff. “Artillerymen and Mathematicians: Forest Ray Moulton and Changes in American Exterior Ballistics, 1885-1934.” Historia Mathematica, vol. 38, no. 4, 2011, pp. 506547., <https://www.sciencedirect.com/science/article/pii/S0315086011000279>. [↩︎][10]
2. Karl Kempf. “Electronic Computers within the Ordnance Corps,” 1961, accessed April 6, 2020, <https://ftp.arl.army.mil/~mike/comphist/61ordnance/index.html>. [↩︎][11]
--------------------------------------------------------------------------------
via: https://twobithistory.org/2020/04/06/differential-analyzer.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[toknow-gh](https://github.com/toknow-gh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://twobithistory.org
[b]: https://github.com/lujun9972
[1]: http://worrydream.com/refs/Bush%20-%20The%20Differential%20Analyzer.pdf
[2]: https://sinclairtarget.com/differential-analyzer/
[3]: https://twobithistory.org/images/diff-analyzer-viz.png
[4]: https://twobithistory.org/images/analyzer-diagram.png
[5]: tmp.MoynZsbJ7w#fn:1
[6]: tmp.MoynZsbJ7w#fn:2
[7]: https://twitter.com/TwoBitHistory
[8]: https://twobithistory.org/feed.xml
[9]: https://twitter.com/TwoBitHistory/status/1224014531778826240?ref_src=twsrc%5Etfw
[10]: tmp.MoynZsbJ7w#fnref:1
[11]: tmp.MoynZsbJ7w#fnref:2

View File

@ -0,0 +1,99 @@
[#]: subject: "How curiosity helped me solve a hardware problem"
[#]: via: "https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin"
[#]: author: "David Both https://opensource.com/users/dboth"
[#]: collector: "lujun9972"
[#]: translator: "toknow-gh"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
好奇心帮我解决了一个硬件问题
======
好奇心能激发人们对于知识和真理的渴求,这可能是关于硬件、开源软件、编程、组装个人电脑、优化系统设置或者学习使用新软件。
![Puzzle pieces coming together to form a computer screen][1]
我通常在家架设运行一个由一打计算机组成的家庭网络——没错,正好 12 台计算机。同时我还负责其它地方的一些计算机维护工作。由于计算机很多,总会出现各种各样的故障,其中有很多最终确诊为硬件问题。但是要判定出是哪个硬件设备引发的故障却是一件难事。
就在这周,我的主工作站上出现了一个棘手的问题,导致我两次误判了问题的原因。本文将带你跟随我排查问题的过程。我将告诉你我在哪一步做了错误的判断以及为什么,还有误判是多么容易发生。
### 最初的症状
我手上一直有好几个项目。最近,我在几台台式机上打开了很多应用程序,我刚开始工作,突然就黑屏了。主工作站的大多数(不是全部)风扇都停了,这让我倒吸一口凉气。我从来没有遇到过这种情况,但显然我的系统出问题了。
我有两条主要线索可以跟进:一是显示黑屏,二是有些风扇不转了。但是前面板上的电源和磁盘活动指示灯还是亮的,只是比平常要暗一点。大多数安装在主板、内存条和风扇上的 RGB 装饰灯也都灭了。
我试过按电源键和重启键,都没有反应。我直接按供电单元的船型开关关闭了电源。重新供电后还是出现了刚才的症状。
### 最初的猜想
问题现象和我数十年处理各类故障的经验将原因指向了供电问题。
我将供电单元拆了下来并用电源测试器对它进行了检查。结果是供电单元没有任何问题,各项电压都符合规范。当然测试器的结果也可能是错误的。测试器没有在满负荷状态下进行测试,比如计算机运行中耗电几百瓦的情况。我凭直觉更换了一个一千瓦的备用电源。
由于我的家庭网络中有 12 台计算机,我已经习惯准备了一些备用配件在身边。这样当有配件损坏时,我就不必非得跑一趟附近的电脑城或者网购后等快递了。由于计算机这么多,配件损坏是经常的事。
虽然电电源测试器告诉我电源没有问题,但更换电源后问题确实消失了。即便检测仪在过去都是正确的,我的经验、知识和直觉告诉我就是电源问题。
不幸的是,我的直觉错了。
### 第二个猜想
没过多久我的工作站再次又了相同的问题。但两个不同的供电单元有相同问题的可能性太低了。
我马上想到那一定是主板出问题了。我没有备用的主板,所以网购了一块新主板。我想到其实可以用上手上多余的内存条,然后把 CPU 连同一体水冷单元一起装到新主板上。
### 专业的故障排查
新主板需要几天天才能送到所以我决定先将工作站上的旧主板拆下来。就在拔掉主板供电之前我的好奇心显现并驱使我给只剩主板、CPU和内存的系统开机。我已经把其它的部分都拆掉了。
好的故障排除过程需要分离所有潜在变量,目前我只是对供电单元进行了测试。我需要对每个组件都进行测试。
这需要我先拔掉前面板上的扬声器和多功能面板连接线。多功能面板上集成了各种 USB、SATA 和内存卡插槽。
令人惊讶的是,当只有主板通电时竟然一切正常。
计算机本身并不会开机,因为根本没有连接存储器。也不会有显示输出,因为我已经把显卡拆掉了。但是没有电源或主板故障的迹象。这进一步激发了我的好奇心。如果主板真的有问题的话,故障现象应该仍然存在才对。
所以我开始一系列的重复试验:断电,安装一个已经拆掉的配件,重新上电。
最终发现问题上由前置多功能面板引发的。
我拆除了多功能面板并将其它零件全部装了回去。工作站开机正常,运行良好。终于让我逮到罪魁祸首了。
### 起因
弄清真正的问题之后,我立刻就明白了问题的根本原因。这还要从几天前说起。那时我正在测试一些外接 USB 设备,包括几种摄像头、几个用于备份的存储设备和一个外接 USB 集线器。
我把一根 USB 连接线插到了多功能面板上的一个 USB 2.0 插口中。所有东西都停摆了大部分灯熄灭了风扇也不转了。USB 连接线发热很严重,我拔掉它时还把手指烫伤了。原来我不小心将连接线的 type C 端插头插到了一个 USB 3.0 type A 插口里,导致了供电短路。
拔掉 USB 连接线之后,一切都恢复了“正常”——但事实并非如此。我粗心的错误对多功能面板造成了损伤,它在坚持了几天之后彻底短路了。
### 妄下结论
知识和经验有时候比电源测试器之类的工具更重要。当然知识跟经验有时候也不管用。我最终找到了问题的真正原因,但其实我本该早就发现的。
尽管我在问题跟供电有关这一点上是对的,但还是误入歧途了。原因是我没能正确解读问题现象并根据线索调查得出逻辑结论导致的。我本可以更早找出问题的根本原因的,这样就不至于在修好主工作站之前浪费那么多时间在将我的笔记本变成临时主要设备上了。
系统管理员总与复杂的设备打交道,过早下结论在所难免。我有超过 50 年的从业经验,还是犯了这样的错误。我只需记住做几个 [深呼吸][2],然后刨根问底直到找到问题的根本原因。
### 好奇心
至少在等待新主板到货期间,我跟随了自己的好奇心。这让我比等新主板到货要早得多将事情恢复正常。同时也避免了我在没有充分测试的情况下把一块完好的主板丢掉。
谚语说好奇心害死猫。我讨厌这个谚语,因为它被家长、学校、见识短浅的老板、老师和那些不想被我们这种好奇宝宝干扰的人用得太多了。事实上,好奇心激发了对于人们对于知识和真理的渴求。这可能是关于硬件、开源软件、编程、组装个人电脑、优化系统设置或者学习使用新软件。满足你的好奇心吧!
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin
作者:[David Both][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/toknow-gh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/dboth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen)
[2]: https://opensource.com/article/21/11/linux-yoga

View File

@ -1,103 +0,0 @@
[#]: subject: "How we hired an open source developer"
[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer"
[#]: author: "Mike Bursell https://opensource.com/users/mikecamel"
[#]: collector: "lujun9972"
[#]: translator: "XiaotingHuang22"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
我们如何聘请开源开发人员
======
我的团队不再采用标准的算法编程练习,而是采用一套能够产出更多相关成果的流程。
![同一团队里来自不同地方的人][1]
作为初创安全公司 [Profian][2] 的首席执行官和联合创始人,我参与了我们聘请开发人员从事 [Enarx][3] 的工作。Enarx是一个处理机密信息计算的安全项目几乎完全用 [Rust语言][4] 编写少部分用Assembly。 Profian 现在已经在这次招聘找到了所有要找的人一些开发人员将在接下来的几周内开始工作。然而Enarx 绝对欢迎新的贡献者,如果事情继续顺利,公司将来肯定会雇用更多的人。
招聘人员并不容易加上Profian还有一系列特别的要求这让招人变得更加困难。因此我认为分享我们如何解决这个问题应该还蛮有意思的而且也会对社区有帮助。
### 我们寻找什么样的人才?
以下就是我前文提到的特别要求:
* **系统编程:** Profian主要需要那些喜欢系统层编程的人。这一层面的编程已经处于栈的底层有很多直接与硬件或操作系统的交互。例如要创建客户端-服务器部分我们必须编写相当多的协议、管理加密等等而这方面的工具还不是很成熟请参阅下面的“Rust”
* * **Rust** 几乎所有项目都是用 Rust 语言编写的那些不是的则是用Assembly写的目前只有 x86尽管随着我们添加更多平台情况可能会有所改变。 Rust是一门很新、很酷同时也令人兴奋的编程语言但它同时也很年轻并且一些领域没有你想要的所有支持或者没有你希望的那么成熟——从多线程库的密码学到编译器/构建基本架构。
* **分散各地的团队:** Profian正在建立一个能够及时通讯联系的团队。 Profian 在德国、芬兰、荷兰、北卡罗来纳州(美国)、马萨诸塞州(美国)、弗吉尼亚州(美国)和乔治亚州(美国)都有开发人员。我在英国,我们的社区经理在巴西,我们有来自印度和尼日利亚的实习生。从一开始我们就知道团队很难聚集在一个地方工作,因此我们需要能够通过视频、聊天和(最不济的情况下)电子邮件与人交流和协作的成员。
* * **安全:** Enarx 是一个安全项目。虽然我们并不是在寻找安全专家,但我们需要能够将安全放在首位去思考和工作,并设计和编写适用于安全环境的代码的人。
* * **Git** 我们所有的代码都存储在 git 中(主要是 [GitHub][5],还有一些存在 GitLab。我们围绕代码的大部分交互都是围绕git进行的因此任何加入我们团队的人都需要能自如使用它作为日常工作中的标准工具。
* **开源:** 开源不仅仅是许可;更是一种心态,同等重要的,这也是一种合作方式。大量开源软件是由不同地域的人创建的,他们甚至可能不认为彼此身处于一个团队。我们需要知道我们招的人不仅能在公司内部凝聚成一个紧密的团队,同时也能够与组织外部的人员协作,并接受 Profian 的“默认开放”文化,这里的开放不仅仅限于代码,还要有开放的讨论、沟通和文档。
### 我们是如何找到人才的?
正如我在其他地方提到的,[招聘很困难][6]。Profian 使用多种方式寻找候选人,它们取得了不同程度的成功:
* 领英招聘广告
* 领英搜索
* 特定语言的讨论板和招聘板例如Reddit
* 外部招募人员(特别致敬来自[Interstem][7]公司的Gerald
* 口口相传/个人推荐
虽然很难从质量方面判断这些来源如何,但如果没有外部招聘人员,我们肯定会在数量上苦苦挣扎(我们也有一些来自该途径的优秀候选人)。
### 我们如何筛选出想要的人才?
我们需要按照上述的所有要求衡量所有候选人,但并非所有要求都是同等重要的。例如,虽然我们热衷于雇用 Rust 程序员,但那些在系统级别具有强大 C/C++ 技能的人也能成为团队里有用的一份子,因为她们能够很快掌握 Rust 语言。另一方面,熟悉使用 git 是至关重要的,因为我们无法花时间去培养新团队成员,让他们跟上我们的工作方式。
你可能会觉得很惊讶,但强大的开源背景并不是必需的要求,但在类似模式中工作的心态是必需的,而任何有开源参与历史的人都可能对 git 有很好的了解。同理,在一个分散各地的团队中工作的能力这一条件上,我们认为有过任意开源社区的参与经历都会是个积极的指标,因为有如此多的开源项目都是由分散各地的人们完成的。至于安全这一条件,我们则一致决定只是一个“锦上添花”的条件。
我们想让这个过程简单快捷。 Profian没有设置专门的人力资源部门或人力职能因为我们正忙于编写代码。以下是我们最终使用的招聘流程实际流程中可能略有不同我们试图在 1-2 周内完成招聘:
1. 初审:个人履历/简历/GitHub/GitLab/领英主页,决定是否面试
2. 我作为CEO和候选人进行一场30-40分钟的讨论了解他们是否适合我们团队的文化同时让他们有机会了解我们并了解他们是否真的像在初审提交的材料中所说的那样精通技术
3. 由 Nathaniel 领导的有关技术方面的深入讨论,通常我也在场
4. 与团队其他成员谈话
5. 编码练习题
6. 快速决策通常在24小时内
编码练习题很关键,但我们决定不采用通常的方法。 我们的观点是,许多科技公司钟爱的纯“算法编码”练习对我们想要的几乎毫无用处:考察候选人是否可以快速理解一段代码,解决一些问题,并与团队合作完成以上的工作。我们创建了一个 GitHub 存储库,其中包含一些几乎可以正常运行的 Rust 代码(事实上,我们最终使用了两个,其中一个用于技术栈上层的人),然后让候选人修复它,在上面执行一些与 git 相关的过程,并稍作改进,在此过程中添加测试。
测试中一个必不可少的部分是让候选人通过我们的聊天室与团队互动。我们安排了 15 分钟的视频通话时间用于设置和初始问题,两个小时用于做习题(“开卷”——以及与团队交谈,鼓励候选人使用互联网上所有可用的资源),然后是 30 分钟的总结会议在这个会议上团队可以提出问题候选人可以反思任务。这次谈话结合练习期间的聊天互动让我们了解了候选人与团队沟通的能力。候选人挂断电话之后我们通常会在5-10分钟内决定是否要雇用他们。
这种方法通常效果很好。一些候选人在任务上遇到困难一些人沟通不畅一些人在git交互方面做得不好——这些是我们没有雇用的人。 这并不意味着他们不是优秀的程序员或者不适合未来的项目或公司但他们不符合我们现在需要的标准。在我们聘用的开发人员中他们的Rust经验水平和与团队互动的需求各不相同但git专业知识水平以及他们在和我们讨论之后的反应始终足以让我们决定接受他们。
### 反思
总的来说,我认为我们不会对筛选过程进行大量更改——尽管我很确定我们可以在搜寻过程环节做得更好。通过编码习题测试,我们可以筛选掉相当多的候选人,而且很好地帮了我们挑选合适的人。希望通过了这次选拔的每个人都很适合这个项目并且产出出色的代码(以及测试和文档等等)。时间会证明一切!
* * *
本文最初出现在 [Alice、Eve 和 Bob 安全博客][8] 上,经许可后重新发布。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/2/how-we-hired-open-source-developer
作者:[Mike Bursell][a]
选题:[lujun9972][b]
译者:[XiaotingHuang22](https://github.com/XiaotingHuang22)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mikecamel
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team)
[2]: https://profian.com/
[3]: https://enarx.dev/
[4]: https://opensource.com/article/21/3/rust-programmer
[5]: https://github.com/enarx/
[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/
[7]: https://www.interstem.co.uk/
[8]: https://aliceevebob.com/

View File

@ -0,0 +1,144 @@
[#]: subject: "Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu"
[#]: via: "https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/"
[#]: author: "Abhishek Prakash https://itsfoss.com/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
修复 Ubuntu 中的 “Key is stored in legacy trusted.gpg keyring” 问题
======
如果你在 Ubuntu 22.04 及以后的版本中使用 PPA 或添加外部仓库,你有可能会看到这样的信息:
```
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
```
![ubuntu key is stored legacy][1]
首先,这不是一个错误,而是一个警告信息。警告并不会停止程序。即使你在更新过程中看到这个警告信息,你也可以继续升级你的系统。
如果你不想看到这个警告信息,你可以采取一些手动步骤来摆脱它。
有两种方法;正确的方法和快速而不优雅的方法。阅读这两种方法,看看你对哪一种感到满意。
### 方法 1导入密钥正确但复杂的方法
首先,列出所有添加到你系统中的 GPG 密钥。
```
sudo apt-key list
```
这将显示一个存储在你系统中的巨大的密钥列表。你在这里要做的是寻找与警告信息相关的密钥。
```
[email protected]:~$ sudo apt-key list
[sudo] password for abhishek:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2014-01-13 [SCEA] [expired: 2019-01-12]
418A 7F2F B0E1 E6E7 EABF 6FE8 C2E7 3424 D590 97AB
uid [ expired] packagecloud ops (production key) <[email protected]>
pub rsa4096 2016-02-18 [SCEA]
DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD
uid [ unknown] https://packagecloud.io/slacktechnologies/slack (https://packagecloud.io/docs#gpg_signing) <[email protected]>
sub rsa4096 2016-02-18 [SEA]
/etc/apt/trusted.gpg.d/audio-recorder-ubuntu-ppa.gpg
----------------------------------------------------
pub rsa4096 2015-08-30 [SC]
42EF 41ED 9813 B713 D4F1 F06D 5CF1 2638 ACF9 669F
uid [ unknown] Launchpad PPA for Team audio-recorder
/etc/apt/trusted.gpg.d/danielrichter2007-ubuntu-grub-customizer.gpg
-------------------------------------------------------------------
pub rsa1024 2010-10-08 [SC]
59DA D276 B942 642B 1BBD 0EAC A8AA 1FAA 3F05 5C03
```
你是怎么做的?仔细阅读该信息。
```
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy
```
在我的例子中,仓库有 packagecloud、slacktechnologies 等关键词。它显示在 apt-key 列表输出的顶部。在你的情况下,你可能需要滚动一下。
在这种罕见的情况下,由 Slack 添加的外部仓库,有两个 GPG 密钥。其中一个已经过期,我会忽略它。你可能不会有这样的情况。
你应该看到 pub 后一行的最后 8 个字符(不包括空格)。
```
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2014-01-13 [SCEA] [expired: 2019-01-12]
418A 7F2F B0E1 E6E7 EABF 6FE8 C2E7 3424 D590 97AB
uid [ expired] packagecloud ops (production key) <[email protected]>
pub rsa4096 2016-02-18 [SCEA]
DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD
uid [ unknown] https://packagecloud.io/slacktechnologies/slack (https://packagecloud.io/docs#gpg_signing) <[email protected]>
```
因此,从 “DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD” 这行中我将提取最后8个字符 “0386 51BD”去掉空格然后用它来导入 /etc/apt/trusted.gpg.d 目录下专用文件中的 GPG 密钥:
```
sudo apt-key export 038651BD | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/slack.gpg
```
我在这里创建了一个新的文件 slack.gpg以防你没有注意到它。我把它命名为 slack.gpg 是因为它与我之前安装的 Slack 应用有关。文件名并不重要,但它对识别有好处。
如果命令运行成功,你将不会看到任何信息。你可以通过检查新创建的 gpg 文件是否存在来验证。
![import gpg key to trusted ubuntu][2]
再次运行更新,现在你应该不会再看到警告信息了。
### 方法 2复制到 trusted.gpd.d 目录中(快速而不优雅的方法)
如果你觉得手动做上面的事情不舒服,那么,你可以忽略这个警告信息。我的意思是,忽略它总是一种选择。
另一个选择是把 /etc/apt/trusted.gpg 文件复制到 /etc/apt/trusted.gpg.d 目录。毕竟Ubuntu 只抱怨说它需要 /etc/apt/trusted.gpg.d 目录下的 GPG 密钥。
你仍然要使用终端。打开它并使用以下命令:
```
sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d
```
现在,如果你运行更新,你就不会再看到 “Key is stored in legacy trusted.gpg keyring” 的警告信息。
![quick dirty way to fix apt key stored legacy][3]
### 总结
我曾经写过一篇关于[apt-key 弃用][4]的详细文章。显然,那篇文章让一些读者感到困惑,因此我写了这篇文章,给他们提供摆脱该信息的直接步骤。
正如我之前所说,这是一个警告信息,目前可以忽略。解决这个问题的责任在于外部软件开发者和 Ubuntu 开发者。外部软件开发者应该确保他们的 GPG 密钥不再被添加到 /etc/apt/trusted.gpg 文件中。
终端用户不应该为他们的懒惰而承担痛苦。
那么,你是用哪种方法来摆脱 “key is stored in legacy” 的警告信息的呢?第一个方法还是第二个方法?
--------------------------------------------------------------------------------
via: https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/wp-content/uploads/2022/11/ubuntu-key-is-stored-legacy.png
[2]: https://itsfoss.com/wp-content/uploads/2022/11/import-gpg-key-to-trusted-ubuntu.png
[3]: https://itsfoss.com/wp-content/uploads/2022/11/quick-dirty-way-to-fix-apt-key-stored-legacy.png
[4]: https://itsfoss.com/apt-key-deprecated/

View File

@ -0,0 +1,54 @@
[#]: subject: "Build an interactive timeline in React with this open source tool"
[#]: via: "https://opensource.com/article/22/11/react-timeline-planby"
[#]: author: "Karol Kozer https://opensource.com/users/karolkozer"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
用这个开源工具在 React 中建立一个互动的时间轴
======
几年来我在电视在线和视频点播VOD行业工作。在开发一个调度器网络应用时我意识到在电子节目指南EPG和调度方面没有好的解决方案。诚然对于大多数网络开发者来说这是一个小众的功能但对于电视应用来说这是一个常见的需求。我看到并分析了许多网站实现了他们自己的 EPG 或时间表,我经常想,为什么每个人似乎都在发明他们自己的解决方案,而不是致力于开发一个大家都能使用的共享解决方案。这就是我开始开发 Planby 的时候。
[Planby][1] 是一个 ReactJavaScript组件帮助你为在线电视和视频点播VOD服务、音乐和体育赛事等创建计划、时间线和电子节目指南EPG。Planby 使用自定义的虚拟视图,允许你对大量的数据进行操作,并以友好和有用的方式呈现给你的观众。
Planby 有一个简单的 API你可以与第三方 UI 库集成。组件的主题是根据应用设计的需要定制的。
### 时间线性能
实现时间线功能时,最重要的是性能。你基本上可能会处理许多不同渠道的无穷无尽的数据流。应用可能难以刷新、移动和滚动。你希望用户与内容的互动是流畅的。
还有一个潜在的问题是设计不当。有时,一个应用以列表的形式实现 EPG 时间线,你必须垂直滚动,这意味着你必须点击按钮在时间上左右移动,这很快就会变得很累。更重要的是,有时与 EPG 互动的自定义功能如评级、选择你最喜欢的频道、从右到左RTL阅读等根本无法使用或者当它们可用时会导致性能问题。
我经常面临的另一个问题是,一个应用的数据传输过于冗长。当一个应用在你滚动浏览 EPG 的时候请求数据,时间线会感觉很慢,甚至会崩溃。
### 什么是 Planby
这就是 Planby 的作用。Planby 是从头开始建立的,使用 React 和 Typescript 以及少量的资源。它使用一个自定义的虚拟视图允许你对大量的数据进行操作。它向用户显示节目和频道并根据时间和指定频道自动定位所有元素。当一个资源不包含任何内容时Planby 会计算定位,使时间段正确对齐。
Planby 有一个简单的界面,包括所有必要的功能,如侧边栏、时间轴本身、愉快的布局和实时节目刷新。此外,还有一个可选的功能,允许你隐藏任何你不想包括在布局中的元素。
Planby 有一个简单的 API允许你作为开发者实现你自己的项目以及用户的偏好。你可以使用 Planby 的主题来开发新的功能也可以制作自定义的样式来配合你选择的设计。你可以很容易地整合其他功能如日历、评级选项、用户最喜欢的列表、滚动、“now” 按钮、录制计划、追播内容等等。更重要的是,你可以添加自定义的全局样式,包括 RTL 功能。
最重要的是,它在 MIT 许可下开源。
### 尝试 Planby
如果你想尝试一下 Planby或者只是想了解一下它请访问 [Git 仓库][1]。在那里,我已经有了一些例子,你可以阅读文档了解详情。该软件包也可以通过 `npm` 获得。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/11/react-timeline-planby
作者:[Karol Kozer][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/karolkozer
[b]: https://github.com/lkxed
[1]: https://github.com/karolkozer/planby

View File

@ -1,58 +0,0 @@
[#]: subject: "Merge design and code with Penpot"
[#]: via: "https://opensource.com/article/23/1/merge-design-code-penpot"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
用 Penpot 合并设计和代码
======
在计算机编程的大部分历史中在创建应用的代码的程序员和创建应用的用户体验UX的设计师之间一直存在着差距。这两个学科接受的培训大不相同他们使用的工具也不同。程序员使用文本编辑器或集成开发环境来编写代码而设计师则经常绘制小部件布局和潜在交互的概念。虽然一些 IDE像 [Eclipse][1] 和 [Netbeans][2],有界面设计组件,但它们通常专注于小部件的位置而不是小部件的设计。开源设计应用 [Penpot][3] 是一个协作式设计和原型设计平台。它有一套新的功能使设计师和开发者可以很容易地用熟悉的工作流程一起工作。Penpot 的设计界面可以让开发者在设计过程中和谐地编写代码,这是其他工具所无法做到的。自从 Opensource.com [最后一次关注它][4]以来,它已经有了长足的进步。它的最新功能不仅改善了你使用 Penpot 的体验,还推动了开源的 Penpot 应用超越类似的专有工具。
### 用 Penpot 做原型
试图设计一个应用如何最好地工作的常见问题之一是,在设计的时候,这个应用还不存在。设计师可以通过视觉化和故事板来帮助设计团队和程序员了解目标是什么。但这是一个需要迭代和反馈的过程,因为开发人员开始实施 UX 概念,并且设计会发生变化以对代码的现实做出反应。
使用 Penpot你可以为你的网络或移动应用创建一个“可用”原型。你可以将按钮与特定的行动联系起来根据用户的输入触发布局的变化。而这一切都可以在项目的代码存在之前完成。
这方面最重要的不是做一个模拟的能力,但是。在 Penpot 中为应用的设计所做的一切都有可用的布局数据开发人员可以在最终的项目中使用。Penpot 不仅仅是一个伟大的绘图和布局工具。它为编码过程提供信息。
Penpot 不是仅仅提供一个设计师特定元素的视觉列表,如属性、颜色和排版,而是现在将代码输出直接整合到设计工作区(就像 Web 浏览器中的开发者工具)。设计师和开发人员共享设计和前端开发的相同空间,以他们需要的任何格式获得规范。
![Image of the current Penpot interface][5]
### 内存解锁
许多在线设计工具使用专有技术来提供一些花哨的功能,但代价是基本上成为一个应用,你不能运行,而只能通过浏览器访问。虽然 Penpot 使用开放的网络标准,并由你的 Web
浏览器渲染。这意味着 Penpot 可以访问 Web 浏览器的最大可用内存,这使得 Penpot 成为第一个具有设计扩展性的在线原型和布局应用。你可以提供更多的选项,更多的模型,和更多的投稿。此外,你可以向更多的并发合作者开放你的设计空间,而不必担心应用的内存耗尽。
### 自我托管和 SaaS
Penpot 是开源的,所以你不必在云上使用它,如果这不适合你的工作流程。你可以在一个容器中轻松地自我托管 Penpot在你自己的工作站上作为一个本地应用使用或者在你自己的服务器上为你的组织托管它。
### 开源设计
我以前写过一篇 [Penpot 的介绍性文章][6],自那以后,这个应用变得更好了。如果你想把程序员和相关人员带入你的设计过程中,那么请试试 Penpot。
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/1/merge-design-code-penpot
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/20/12/eclipse
[2]: https://opensource.com/article/20/12/netbeans
[3]: http://penpot.app
[4]: https://opensource.com/article/21/9/open-source-design
[5]: https://opensource.com/sites/default/files/2022-07/Current%20Penpot%20interface.png
[6]: https://opensource.com/article/21/12/open-source-design-penpot

View File

@ -0,0 +1,153 @@
[#]: subject: "Learn Tcl by writing a simple game"
[#]: via: "https://opensource.com/article/23/2/learn-tcl-writing-simple-game"
[#]: author: "James Farrell https://opensource.com/users/jamesf"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
通过编写一个简单的游戏来学习 Tcl
======
我的 Tcl 之路始于最近需要将一个困难的基于 Java 的命令行配置工具自动化。我使用 Ansible 做了一些自动化编程,偶尔也会使用 expect 模块。坦率地说,我发现这个模块的作用有限,原因包括:难以对相同的提示进行排序,难以捕捉到额外步骤的值,控制逻辑的灵活性有限,等等。有时你可以用 shell 模块来代替。但有时你会遇到那种行为异常、过于复杂的命令行界面,似乎无法实现自动化。
就我而言,我正在自动安装我公司的一个程序。最后的配置步骤只能通过命令行来完成,通过几个不规范的、重复的提示和需要捕捉的数据输出。好在传统的 Expect 是唯一的答案。要使用 Expect 的基本功能,并不需要对 Tcl 有很深的了解,但你了解的越多,你就能从它那里得到更多的力量。这是后续文章的话题。现在,我探讨一下 Tcl 的基本语言结构,包括用户输入、输出、变量、条件判断、循环和简单函数。
### 安装 Tcl
在 Linux 系统上,我使用这个:
```
# dnf install tcl
# which tclsh
/bin/tclsh
```
在 macOS 上,你可以使用 [Homebrew][1] 来安装最新的 Tcl
```
$ brew install tcl-tk
$ which tclsh
/usr/local/bin/tclsh
```
### 在 Tcl 中猜数字
从创建基本的可执行脚本 `numgame.tcl` 开始:
```
$ touch numgame.tcl
$ chmod 755 numgame.tcl
```
接着在你的文件中开始编码,标题是通常的 #!
```
#!/usr/bin/tclsh
```
这里有一些关于 Tcl 的简单介绍,以便与本文一起追踪。
第一点是,所有的 Tcl 都被认为是一系列的字符串。变量通常被当作字符串处理,但可以自动切换类型和内部表示(这一点你通常无法看到)。函数可以把它们的字符串参数解释为数字(`expr`),并且只通过值传递。字符串通常使用双引号或大括号来划分。双引号允许变量扩展和转义序列,而大括号则完全没有扩展。
第二点是 Tcl 语句可以用分号隔开,但通常不是这样。语句行可以用反斜杠字符来分割。然而,典型的做法是将多行语句放在大括号内,以避免需要这样做。大括号只是更简单,下面的代码格式也反映了这一点。大括号允许对字符串进行延迟求值。在 Tcl 进行变量替换之前,一个值被传递给一个函数。
最后Tcl 使用方括号进行命令替换。方括号之间的任何东西都会被送到 Tcl 解释器的一个新的递归调用中进行求值。这对于在表达式中间调用函数或为函数生成参数是很方便的。
### 过程
虽然在这个游戏中没有必要,但我先举一个在 Tcl 中定义函数的例子,你可以在以后使用:
```
proc used_time {start} {
return [expr [clock seconds] - $start]
}
```
使用 `proc` 将其设定为一个函数(或过程)定义。接下来是函数的名称。然后是一个包含参数的列表;在本例中是一个参数 `{start}` ,然后是函数主体。注意,主体的大括号在这一行开始,它不能在下面一行。该函数返回一个值。返回值是一个复合求值(方括号),它从读取系统时钟 `[clock seconds]` 开始,并进行数学运算以减去 `$start` 参数。
### 设置、逻辑和完成
你可以在这个游戏的其余部分增加更多的细节,进行一些初始设置,对玩家的猜测进行迭代,然后在完成后打印结果:
```
set num [expr round(rand()*100)]
set starttime [clock seconds]
set guess -1
set count 0
puts "Guess a number between 1 and 100"
while { $guess != $num } {
incr count
puts -nonewline "==> "
flush stdout
gets stdin guess
if { $guess < $num } {
puts "Too small, try again"
} elseif { $guess > $num } {
puts "Too large, try again"
} else {
puts "That's right!"
}
}
set used [used_time $starttime]
puts "You guessed value $num after $count tries and $used elapsed seconds"
```
前面的 `set` 语句建立变量。前两个求值表达式用于识别 1 到 100 之间的随机数,下一个保存系统时钟启动时间。
`puts``gets` 命令用于来自玩家的输出和输入。我使用的 `puts` 暗示输出是标准输出。`gets` 需要定义输入通道,所以这段代码指定 `stdin` 作为用户的终端输入源。
`puts` 省略行末终止符时,需要 `flush stdout` 命令,因为 Tcl 缓冲了输出,在需要下一个 I/O 之前可能不会被显示。
从这里开始,`while` 语句说明了循环控制结构和条件逻辑,需要给玩家反馈并最终结束循环。
最后的 `set` 命令调用我们的函数来计算游戏的耗时秒数,接着是收集到的统计数字来结束游戏。
### 玩吧!
```
$ ./numgame.tcl
Guess a number between 1 and 100
==> 100
Too large, try again
==> 50
Too large, try again
==> 25
Too large, try again
==> 12
Too large, try again
==> 6
Too large, try again
==> 3
That's right!
You guessed value 3 after 6 tries and 20 elapsed seconds
```
### 继续学习
当我开始这个练习时,我怀疑回到 90 年代末的流行语言对我有多大的帮助。一路走来,我发现 Tcl 有几处让我非常喜欢的地方,我最喜欢的是方括号内的命令求值。与其他许多过度使用复杂闭包结构的语言相比,它似乎更容易阅读和使用。我以为它是一种[死语言][2],但实际上它仍在蓬勃发展,并在多个平台上得到支持。我学到了一些新的技能,并对这种古老的语言有了新的认识。
在 [https://www.tcl-lang.org][3] 上查看官方网站。你可以找到最新的源代码、二进制发行版、论坛、文档,以及仍在进行的会议信息的参考。
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/learn-tcl-writing-simple-game
作者:[James Farrell][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jamesf
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/20/6/homebrew-mac
[2]: https://opensource.com/article/19/6/favorite-dead-language
[3]: https://www.tcl-lang.org

View File

@ -0,0 +1,149 @@
[#]: subject: "Lua loops: how to use while and repeat until"
[#]: via: "https://opensource.com/article/23/2/lua-loops-while-repeat-until"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Lua 循环:如何使用 while 和 repeat until
======
控制结构是编程语言的一个重要特征,因为它们使你能够根据通常在程序运行时动态建立的条件来指导程序的流程。不同的语言提供了不同的控制,在 Lua 中,有 while 循环、for 循环和 repeat until 循环。这篇文章涵盖了 while 和 repeat until 循环。由于它们的灵活性,我在一篇[单独的文章][1]中介绍 for 循环。
条件是由一个使用运算符的表达式来定义的运算符是你在数学课上可能认识的符号的一个花哨的术语。Lua 中有效的运算符有:
- `==` 等于
- `~=`不等于
- `<` 小于
- `>` 大于
- `⇐`小于或等于
- `>=` 大于或等于
这些被称为关系运算符,因为它们比较两个值之间的关联。还有一些逻辑运算符,其含义与英语中的含义相同,可以纳入条件中,进一步描述你想检查的状态:
- `and`
- `or`
下面是一些条件的例子:
- `foo > 3`:变量 `foo` 是否大于 3`foo` 必须是 4 或更大才能满足这个条件。
- `foo >= 3``foo` 是否大于或等于 3`foo` 必须是 3 或更大才能满足这个条件。
- `foo > 3 and bar < 1``foo` 是否大于 3 而 `bar` 小于 1要满足这个条件`foo` 变量必须在 `bar` 为 0 的同时为 4 或更大。
- `foo> 3 or bar < 1``foo` 是否大于 3或者说`bar` 是否小于 1如果 `foo` 是 4 或更大,或者 `bar` 是 0那么这个条件就是真的。如果 `foo` 是 4 或更大,而 `bar` 是 0会怎样答案出现在本文的后面。
### While 循环
只要满足某个条件while 循环就会执行指令。例如,假设你正在开发一个应用来监测正在进行的僵尸末日。当没有剩余的僵尸时,就不再有僵尸末日了:
```
zombie = 1024
while (zombie > 0) do
print(zombie)
zombie = zombie-1
end
if zombie == 0 then
print("No more zombie apocalypse!")
end
```
运行代码,看僵尸消失:
```
$ lua ./while.lua
1024
1023
[...]
3
2
1
No more zombie apocalypse!
```
### Until 循环
Lua 还有一个 repeat until 循环结构,本质上是一个带有 “catch” 语句的 while 循环。假设你在从事园艺工作,你想追踪还剩下什么可以收获的东西:
```
mytable = { "tomato", "lettuce", "brains" }
bc = 3
repeat
print(mytable[bc])
bc = bc - 1
until( bc == 0 )
```
运行代码:
```
$ lua ./until.lua
brains
lettuce
tomato
```
这很有帮助!
### 无限循环
一个无限循环有一个永远无法满足的条件,所以它无限地运行。这通常是一个由错误逻辑或你的程序中的意外状态引起的错误。例如,在本文的开头,我提出了一个逻辑难题。如果一个循环被设定为 `foo > 3 or bar < 1` 运行 ,那么当 `foo` 为 4 或更大而 `bar` 为 0 时,会发生什么?
下面是解决这个问题的代码,为了以防万一,还使用了 `break` 语句安全捕获:
```
foo = 9
bar = 0
while ( foo > 3 or bar < 1 ) do
print(foo)
foo = foo-1
-- safety catch
if foo < -800000 then
break
end
end
```
你可以安全地运行这段代码,但它确实模仿了一个意外的无限循环。有缺陷的逻辑是 `or` 运算符,它允许这个循环在 `foo` 大于 3 和 `bar` 小于 1 的情况下继续进行。`and`运算符有不同的效果,但我让你去探索。
无限循环实际上有其用途。图形应用使用技术上的无限循环来保持应用程序窗口的开放。我们没有办法知道用户打算使用这个程序多久,所以程序无限地运行,直到用户选择**退出**。在这些情况下使用的简单条件显然是一个总是被满足的条件。下面是一个无限循环的例子,为了方便起见,还是内置了一个安全陷阱:
```
n = 0
while true do
print(n)
n = n+1
if n > 100 then
break
end
end
```
条件 `while true` 总是被满足,因为 `true` 总是为真。这是比写 `while 1 == 1` 或类似的永远为真的简洁方式。
### Lua 中的循环
从示例代码中可以看出,尽管有不同的实现方式,但循环基本上都是朝着同一个目标工作。选择一个对你来说有意义的,并且在你需要执行的处理过程中效果最好的。以防万一你需要它:终止失控循环的键盘快捷键是 **Ctrl+C**
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/2/lua-loops-while-repeat-until
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed/
[1]: https://opensource.com/article/22/11/lua-for-loops