From cca049cee08f85711e533ff248d8e5ff917b0e2a Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Jun 2022 09:02:32 +0800 Subject: [PATCH 001/231] translating --- ...20220601 How to Create Local Yum-DNF Repository on RHEL 9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md b/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md index 990804f3f4..1fabed8d0c 100644 --- a/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md +++ b/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/" [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 91d09d93e68343c4667192526c74dfa7c7c31fdd Mon Sep 17 00:00:00 2001 From: SamMa Date: Thu, 2 Jun 2022 09:08:55 +0800 Subject: [PATCH 002/231] Update 20220525 Machine Learning- Classification Using Python.md --- .../20220525 Machine Learning- Classification Using Python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20220525 Machine Learning- Classification Using Python.md b/translated/tech/20220525 Machine Learning- Classification Using Python.md index bb0d734528..591bdb75f1 100644 --- a/translated/tech/20220525 Machine Learning- Classification Using Python.md +++ b/translated/tech/20220525 Machine Learning- Classification Using Python.md @@ -3,7 +3,7 @@ [#]: author: "Gayatri Venugopal https://www.opensourceforu.com/author/gayatri-venugopal/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " +[#]: reviewer: "turbokernel" [#]: publisher: " " [#]: url: " " @@ -99,7 +99,7 @@ via: https://www.opensourceforu.com/2022/05/machine-learning-classification-usin 作者:[Gayatri Venugopal][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[turbokernel](https://github.com/turbokernel) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ac86d0c2ffe200ed092ff420462b741feb078809 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 2 Jun 2022 10:16:35 +0800 Subject: [PATCH 003/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220601=20Google=20Makes=20Data=20Centre=20Scale=20En?= =?UTF-8?q?cryption=20Open=20Source.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ata Centre Scale Encryption Open Source.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md diff --git a/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md b/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md new file mode 100644 index 0000000000..beb885cdd7 --- /dev/null +++ b/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md @@ -0,0 +1,37 @@ +[#]: subject: "Google Makes Data Centre Scale Encryption Open Source" +[#]: via: "https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Google Makes Data Centre Scale Encryption Open Source +====== +![google-ranking-factors][1] + +Google has made open source an encryption scheme it developed to protect traffic between its data centres. PSP, which stands for PSP Security Protocol, was created to relieve Google’s processors of the growing burden of software-based encryption, according to the company. PSP has been hailed as a success in the company’s own environment, and the company has stated that it is “making PSP open source to encourage broader adoption by the community and hardware implementation by additional NIC [network interface card] vendors.”  PSP offloads encryption to NICs, which was previously possible with existing encryption schemes, but not at the scale or with the traffic coverage required by Google. + +“At Google’s scale,” the company wrote when announcing its decision, “the cryptographic offload must support millions of live transmission control protocol (TCP) connections and sustain 100,000 new connections per second at peak.” + +Existing security protocols, according to Google Cloud’s Amin Vahdat and Soheil Hassas Yeganeh, had flaws. “While TLS meets our security requirements, it is not an offload-friendly solution because of the tight coupling between the connection state in the kernel and the offload state in hardware. TLS also does not support non-TCP transport protocols, such as UDP”, they stated. + +However, the IPSec protocol cannot be offloaded to hardware at the required scale. “IPSec … cannot economically support our scale partly because they store the full encryption state in an associative hardware table with modest update rates,” the post explains. + +Google added a custom header and trailer to standard User Datagram Protocol (UDP) encapsulation to create PSP. PSP is currently implemented in three ways: one for Google’s Andromeda Linux virtualisation kernel, one for its Snap networking system, and an application-layer version, SoftPSP, created so Google Cloud customers could use PSP on computers with traditional NICs. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/ + +作者:[Laveesh Kocher][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/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/google-ranking-factors-e1654074528236.jpg From 1a8a2e9840f0064416de62b62910338e489d2dd2 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 2 Jun 2022 10:18:18 +0800 Subject: [PATCH 004/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220601=20What=20is=20Federated=20Learning-.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20220601 What is Federated Learning-.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20220601 What is Federated Learning-.md diff --git a/sources/tech/20220601 What is Federated Learning-.md b/sources/tech/20220601 What is Federated Learning-.md new file mode 100644 index 0000000000..1f66f8db42 --- /dev/null +++ b/sources/tech/20220601 What is Federated Learning-.md @@ -0,0 +1,60 @@ +[#]: subject: "What is Federated Learning?" +[#]: via: "https://www.opensourceforu.com/2022/06/what-is-federated-learning/" +[#]: author: "Aanchal Narendran https://www.opensourceforu.com/author/aanchal-narendran/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is Federated Learning? +====== +Federated learning is a distributed machine learning approach for developing and training models on a global scale. This article introduces a few open source frameworks that help to explore it, which every newbie must know of. + +![Federated-Learning][1] + +Federated learning helps to develop and train models for distributed machine learning. Loosely translated, federation means a group of objects working towards the same common goal. In federated learning, the model is developed with the help of updates from a large group of devices, usually phones. Prior to the advent of federated learning, devices leveraging various artificial intelligence solutions sent repeated messages embedded with the data stored on the device. This led to two major bottlenecks: + +* Communication: Not all devices in question had constant Internet access. Moreover, the bandwidth was very often insufficient for such a transfer. +* Privacy: Any third party actor with a malicious intent could figure out a way to access the data coming in from a consumer. + +To address all of this and much more, Google introduced federated learning. Originally built into the Google keyboard, it quickly piqued the interest of the research community. The benefits of federated learning are: + +* Leverages the on-device compute power of modern-day electronics +* Protects the privacy of the customer with zero data transfers +* Can function in a decentralised architecture to handle single-point failures +* Trains over a high number of clients even with slow or low-quality Internet +* Is robust and can handle client dropouts up to a threshold value + +Although federated learning was developed and visualised as an enterprise solution, there are quite a few open source frameworks that help you explore it even if you have access to a single desktop. Let’s take a quick look at them. + +### TensorFlow Federated + +TensorFlow is one of the most popular frameworks used for building machine learning and deep learning models. Its popularity is nestled in the ability to run TensorFlow models reliably on any device — from a custom server to a handheld IoT device — and its ease of integration and extensive support for tooling. TensorFlow Federated is an open source framework built to support research and development of machine learning models using federated learning on decentralised data. It allows developers and researchers to simulate existing model architectures as well as test novel architectures for federated learning. It has two main interfaces. + +*Federated Core API:* This is a programming environment for developing distributed computations. It serves as a foundation for the Federated Learning API and is used by systems researchers + +*Federated Learning API:* This high-level interface helps machine learning developers and researchers incorporate federated learning without having to look into the low-level details. + +Further documentation for this framework is available at *https://www.tensorflow.org/federated.* + +### PySyft + PyGrid + +PySyft is a Python library that aids in developing federated learning models for the purpose of research. It uses differential privacy and encrypted communications. It works in tandem with existing deep learning frameworks such as TensorFlow and PyTorch. However, PySyft alone isn’t sufficient to work on problems that involve communications over a network. This is where PyGrid comes in, as it helps to implement federated learning on a wide variety of devices and to deploy PySyft at scale. + +Further documentation is available at *https://github.com/OpenMined/PySyft.* + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/what-is-federated-learning/ + +作者:[Aanchal Narendran][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/aanchal-narendran/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Federated-Learning.jpg From 6bb1f43055ec5f799222e6cd515423b02efd9f0d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Jun 2022 10:20:20 +0800 Subject: [PATCH 005/231] RP @geekpi https://linux.cn/article-14662-1.html --- ...is open source screen reader on Windows.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) rename {translated/tech => published}/20220519 Use this open source screen reader on Windows.md (59%) diff --git a/translated/tech/20220519 Use this open source screen reader on Windows.md b/published/20220519 Use this open source screen reader on Windows.md similarity index 59% rename from translated/tech/20220519 Use this open source screen reader on Windows.md rename to published/20220519 Use this open source screen reader on Windows.md index 27bcf2fe00..a553667e53 100644 --- a/translated/tech/20220519 Use this open source screen reader on Windows.md +++ b/published/20220519 Use this open source screen reader on Windows.md @@ -3,32 +3,32 @@ [#]: author: "Peter Cheer https://opensource.com/users/petercheer" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14664-1.html" -在 Windows 上使用这个开源屏幕阅读器 +在 Windows 上使用开源屏幕阅读器 NVDA ====== -为纪念全球无障碍意识日,了解 NVDA 开源屏幕阅读器,以及你如何参与其中,为所有网络用户提高无障碍性。 -![Working from home at a laptop][1] -图片提供:Opensource.com +![](https://img.linux.net.cn/data/attachment/album/202206/02/101911ds5t1xts1o52vmss.jpg) + +> 为纪念全球无障碍意识日,让我们了解一下 NVDA 开源屏幕阅读器,以及你该如何参与其中,为所有网络用户提高无障碍性。 屏幕阅读器是辅助技术软件的一个专门领域,它可以阅读并说出计算机屏幕上的内容。完全没有视力的人只是视力障碍者的一小部分,屏幕阅读器软件可以帮助所有群体。屏幕阅读器大多特定于操作系统,供有视觉障碍的人和无障碍培训师使用,以及想要测试网站或应用的无障碍访问程度的开发人员和无障碍顾问。 ### 如何使用 NVDA 屏幕阅读器 -[WebAIM 屏幕阅读器用户调查][2]始于 2009 年,一直持续到 2021 年。在第一次调查中,最常用的屏幕阅读器是 JAWS,占 74%。它是 Microsoft Windows 的商业产品,并且是长期的市场领导者。 NVDA 当时是一个相对较新的 Windows 开源屏幕阅读器,仅占 8%。快进到 2021 年,JAWS 占 53.7%,NVDA 占 30.7%。 +[WebAIM 屏幕阅读器用户调查][2] 始于 2009 年,一直持续到 2021 年。在第一次调查中,最常用的屏幕阅读器是 JAWS,占 74%。它是微软 Windows 的商业产品,并且是长期的市场领导者。NVDA 当时是一个相对较新的 Windows 开源屏幕阅读器,仅占 8%。快进到 2021 年,JAWS 占 53.7%,NVDA 占 30.7%。 -你可以从 [NVAccess 网站][3]下载最新版本的 NVDA。为什么我要使用 NVDA 并将它推荐给我使用微软 Windows 的客户?嗯,它是开源的,速度快,功能强大,易于安装,支持多种语言,可以作为便携式应用运行,拥有庞大的用户群,并且有定期发布新版本的周期。 +你可以从 [NVAccess 网站][3] 下载最新版本的 NVDA。为什么我要使用 NVDA 并将它推荐给我使用微软 Windows 的客户?嗯,它是开源的、速度快、功能强大、易于安装、支持多种语言、可以作为便携式应用运行、拥有庞大的用户群,并且有定期发布新版本的周期。 -NVDA 已被翻译成 55 种语言,并在 175 个不同的国家/地区使用。还有一个活跃的开发者社区,拥有自己的[社区插件网站][4]。你选择安装的任何附加组件都将取决于你的需求,并且有很多可供选择,包括常见视频会议平台的扩展。 +NVDA 已被翻译成 55 种语言,并在 175 个不同的国家/地区使用。还有一个活跃的开发者社区,拥有自己的 [社区插件网站][4]。你选择安装的任何附加组件都将取决于你的需求,并且有很多可供选择,包括常见视频会议平台的扩展。 与所有屏幕阅读器一样,NVDA 有很多组合键需要学习。熟练使用任何屏幕阅读器都需要培训和练习。 ![Image of NVDA welcome screen][5] -向熟悉计算机和会使用键盘的人教授 NVDA 并不太难。向一个完全初学者教授基本的计算机技能(没有鼠标、触摸板和键盘技能)和使用 NVDA 是一个更大的挑战。个人的学习方式和偏好不同。此外,如果人们只想浏览网页和使用电子邮件,他们可能不需要学习如何做所有事情。NVDA 教程和资源的一个很好的链接来源是[无障碍中心][6]。 +向熟悉计算机和会使用键盘的人教授 NVDA 并不太难。向一个完全初学者教授基本的计算机技能(没有鼠标、触摸板和键盘技能)和使用 NVDA 是一个更大的挑战。个人的学习方式和偏好不同。此外,如果人们只想浏览网页和使用电子邮件,他们可能不需要学习如何做所有事情。NVDA 教程和资源的一个很好的链接来源是 [无障碍中心][6]。 当你掌握了使用键盘命令操作 NVDA,它就会变得更容易,但是还有一个菜单驱动的系统可以完成许多配置任务。 @@ -36,13 +36,11 @@ NVDA 已被翻译成 55 种语言,并在 175 个不同的国家/地区使用 ### 测试无障碍性 -多年来,屏幕阅读器用户无法访问某些网站一直是个问题,尽管美国残疾人法案(ADA)等残疾人平等立法仍然存在。 NVDA 在有视力的社区中的一个很好的用途是用于网站无障碍性测试。NVDA 可以免费下载,并且通过运行便携式版本,网站开发人员甚至不需要安装它。运行 NVDA,关闭显示器或闭上眼睛,看看你在浏览网站或应用时的表现如何。 +多年来,屏幕阅读器用户无法访问某些网站一直是个问题,尽管美国残疾人法案(ADA)等残疾人平等立法仍然存在。NVDA 在有视力的社区中的一个很好的用途是用于网站无障碍性测试。NVDA 可以免费下载,并且通过运行便携式版本,网站开发人员甚至不需要安装它。运行 NVDA,关闭显示器或闭上眼睛,看看你在浏览网站或应用时的表现如何。 -NVDA 也可用于测试(通常被忽略的)正确[标记 PDF 文档以实现无障碍性][8]任务。 +NVDA 也可用于测试(通常被忽略的)正确 [标记 PDF 文档以实现无障碍性][8] 任务。 -有几个指南专注于使用 NVDA 进行无障碍性测试。我可以推荐[使用 NVDA 测试网页][9]和使用 [NVDA 评估 Web 无障碍性][10]。 - -图片提供:(Peter Cheer,CC BY-SA 4.0) +有几个指南专注于使用 NVDA 进行无障碍性测试。我可以推荐 [使用 NVDA 测试网页][9] 和使用 [NVDA 评估 Web 无障碍性][10]。 -------------------------------------------------------------------------------- @@ -51,7 +49,7 @@ via: https://opensource.com/article/22/5/open-source-screen-reader-windows-nvda 作者:[Peter Cheer][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/) 荣誉推出 From 04fca259ea03f896ecb6916c60112063da0fc750 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Jun 2022 10:59:58 +0800 Subject: [PATCH 006/231] RP @lkxed https://linux.cn/article-14665-1.html --- ...An introduction to Go arrays and slices.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) rename {translated/tech => published}/20180712 An introduction to Go arrays and slices.md (90%) diff --git a/translated/tech/20180712 An introduction to Go arrays and slices.md b/published/20180712 An introduction to Go arrays and slices.md similarity index 90% rename from translated/tech/20180712 An introduction to Go arrays and slices.md rename to published/20180712 An introduction to Go arrays and slices.md index 40e3f9a3b6..9dcac9545c 100644 --- a/translated/tech/20180712 An introduction to Go arrays and slices.md +++ b/published/20180712 An introduction to Go arrays and slices.md @@ -3,17 +3,16 @@ [#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14665-1.html" Go 数组和切片的介绍 ====== -了解使用数组和切片在 Go 中存储数据的优缺点,以及为什么其中一个比另一个更好。 -![][1] +![](https://img.linux.net.cn/data/attachment/album/202206/02/105657zahhco3612vv1bbo.jpg) -图源:carrotmadman6,经 Opensource.com 修改,CC BY-SA 2.0 +> 了解使用数组和切片在 Go 中存储数据的优缺点,以及为什么其中一个更好。 在本系列的第四篇文章中,我将解释 [Go][5] 数组和切片,包括如何使用它们,以及为什么你通常要选择其中一个而不是另一个。 @@ -26,6 +25,7 @@ Go 数组和切片的介绍 ``` anArray := [4]int{-1, 2, 0, -4} ``` + 数组的大小应该在它的类型之前声明,而类型应该在声明元素之前定义。`len()` 函数可以帮助你得到任何数组的长度。上面数组的大小是 4。 如果你熟悉其他编程语言,你可能会尝试使用 `for` 循环来遍历数组。Go 当然也支持 `for` 循环,不过,正如你将在下面看到的,Go 的 `range` 关键字可以让你更优雅地遍历数组或切片。 @@ -39,7 +39,6 @@ twoD := [3][3]int{ {10, 11, 12}} ``` -The `arrays.go` source file explains the use of Go arrays. The most important code in `arrays.go` is: `arrays.go` 源文件中包含了 Go 数组的示例代码。其中最重要的部分是: ``` @@ -101,7 +100,6 @@ Go 切片与 Go 数组类似,但是它没有后者的缺点。 此外,切片是通过引用传递给函数的,这意味着实际传递给函数的是切片变量的内存地址,这样一来,你对函数内部的切片所做的任何修改,都不会在函数退出后丢失。因此,将大切片传递给函数,要比将具有相同数量元素的数组传递给同一函数快得多。这是因为 Go 不必拷贝切片 —— 它只需传递切片变量的内存地址。 -Go slices are illustrated in `slice.go`, which contains the following code: `slice.go` 源文件中有 Go 切片的代码示例,其中包含以下代码: ``` @@ -141,7 +139,7 @@ func main() { } ``` -切片和数组在定义方式上的最大区别就在于:你不需要指定切片的大小。实际上,切片的大小取决于你要放入其中的元素数量。此外,`append()` 函数允许你将元素添加到现有切片 —— 请注意,即使切片的容量允许你将元素添加到该切片,它的长度也不会被修改,除非你调用 `append ()`。上述代码中的 `printSlice()` 函数是一个辅助函数,用于打印切片中的所有元素,而 `negative()` 函数将切片中的每个元素都变为各自的相反数。 +切片和数组在定义方式上的最大区别就在于:你不需要指定切片的大小。实际上,切片的大小取决于你要放入其中的元素数量。此外,`append()` 函数允许你将元素添加到现有切片 —— 请注意,即使切片的容量允许你将元素添加到该切片,它的长度也不会被修改,除非你调用 `append()`。上述代码中的 `printSlice()` 函数是一个辅助函数,用于打印切片中的所有元素,而 `negative()` 函数将切片中的每个元素都变为各自的相反数。 运行 `slice.go` 将得到以下输出: @@ -192,7 +190,7 @@ Array: [1 -2 3 -4 5] 你可以在 [GitHub][6] 上找到 `arrays.go`、`slice.go` 和 `refArray.go` 的源代码。 -如果您有任何问题或反馈,请在下方发表评论或在 [Twitter][7] 上与我联系。 +如果你有任何问题或反馈,请在下方发表评论或在 [Twitter][7] 上与我联系。 -------------------------------------------------------------------------------- @@ -201,7 +199,7 @@ via: https://opensource.com/article/18/7/introduction-go-arrays-and-slices 作者:[Mihalis Tsoukalos][a] 选题:[lkxed][b] 译者:[lkxed](https://github.com/lkxed) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ca1a52a2f1b1bf3e8bf5d28f3b877ad44819d19f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Jun 2022 13:00:30 +0800 Subject: [PATCH 007/231] A --- ...th a New Brand -Murena- for Smartphone and Cloud Services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md b/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md index e3c35985d4..98fde178ed 100644 --- a/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md +++ b/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/murena-e-os/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3e37349f947f6a1e7d122d4355955f737f614d03 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 2 Jun 2022 13:29:03 +0800 Subject: [PATCH 008/231] ONE @wxy https://linux.cn/article-14666-1.html --- ...rena- for Smartphone and Cloud Services.md | 89 +++++++++++++++++++ ...rena- for Smartphone and Cloud Services.md | 88 ------------------ 2 files changed, 89 insertions(+), 88 deletions(-) create mode 100644 published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md delete mode 100644 sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md diff --git a/published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md b/published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md new file mode 100644 index 0000000000..e1412ef77a --- /dev/null +++ b/published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md @@ -0,0 +1,89 @@ +[#]: subject: "de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services" +[#]: via: "https://news.itsfoss.com/murena-e-os/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14666-1.html" + +去谷歌化操作系统 /e/OS v1 及新品牌 Murena 一同发布 +====== + +> Murena 是一个与 e 基金会有关的新品牌,该品牌专注于提供隐私友好的 /e/OS 及新的智能手机和云服务。 + +![murena][1] + +/e/OS 是一个流行的、注重隐私的移动操作系统,是谷歌安卓的替代品之一。 + +这个复刻自 Lineage OS 的操作系统消除了任何与谷歌有关的依赖性,并鼓励你在使用中不要直接依赖任何谷歌的服务。 + +取而代之的是,它提供一些解决方案作为替代品,为你提供一个隐私友好的生态系统。 + +为了精简其产品,负责该操作系统的 e 基金会宣布了一个新的品牌 “Murena”,其中包括了一些以该操作系统为核心的新功能和一个新的智能手机。 + +### Murena 和 e 基金会 + +e 基金会作为一个致力于 /e/OS 的非营利组织将继续存在。因此,可以说这不是一次品牌重塑。 + +然而,[Murena][2] 作为一个新的创业公司,似乎是一个独立的商业实体,将专注于鼓励主流用户尝试 /e/OS,并促进支持该操作系统的智能手机的使用。 + +对该公司,/e/OS 的创建者提及: + +![][3] + +### /e/OS 1.0 有什么新内容? + +随着该操作系统的最新升级发布,他们的目标是让事情变得更容易理解,在提高使用便利性的同时,仍然考虑到隐私。 + +此外,还随同本次更新推出了新的应用程序商店(App Lounge)和新的隐私工具(Advanced Privacy)。 + +**App Lounge**:这个新的应用程序安装程序可以让你安装许多开源应用程序和 PWA(渐进式网页应用Progress Web App)。在你安装之前,它还会告知你每个应用程序中已有的跟踪器。 + +![][4] + +我相信一个量身定做的应用商店的存在将有助于消除新用户是否应该尝试用 /e/OS 安装 Play Store 或 F-Droid 的困惑。 + +除此之外,Advanced Privacy 工具将有助于限制用户在安装第三方应用程序后暴露的数据。 + +如果你想远离科技巨头,你还会发现 Murena 云服务可以用作私人电子邮件账户服务和云存储。该电子邮件服务提供的功能可以隐藏你的原始电子邮件地址。 + +### Murena One + +![][5] + +首款 Murena 品牌的智能手机将于 6 月下旬推出,并将向美国、加拿大、欧洲、英国和瑞士等地的用户发货。 + +这款智能手机将采用 6.5 英寸显示屏,配备 2500 万像素的前置摄像头,后置摄像头设置有三个传感器,分别是 4800 万像素、800 万像素和 500 万像素。 + +我们不太确定是什么处理器,但它提到了是一个八核芯片,加上 4GB 的内存。所有这些都由 4500 毫安时的电池供电。 + +除了它的第一款智能手机,你还可以从它的官方网站上购买 Fairphone 和 Teracube 的智能手机,这些手机预装了 /e/OS。 + +### 总结 + +你可以在其官方网站上了解更多关于新的 /e/OS 升级、云服务和可用的智能手机的信息。 + +> **[Murena][6]** + +该智能手机的定价还没有在新闻发布会上披露。所以,我们建议你如果有兴趣,可以关注一下。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/murena-e-os/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[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/wp-content/uploads/2022/06/murena.jpg +[2]: https://murena.com/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-quote.jpeg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/eos-app-lounge-1024x1024.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-one-1024x576.jpeg +[6]: https://murena.com/ diff --git a/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md b/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md deleted file mode 100644 index 98fde178ed..0000000000 --- a/sources/news/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: subject: "de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services" -[#]: via: "https://news.itsfoss.com/murena-e-os/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services -====== -Murena is a new brand related to the e Foundation that focuses on offering privacy-friendly /e/OS with new smartphones, and cloud services. - -![murena][1] - -/e/OS is a popular privacy-focused mobile operating system as an alternative to Google’s Android. - -The operating system (fork of Lineage OS) eliminates any Google-related dependencies and encourages you to work without relying directly on any Google services. - -Instead, it offers some of its solutions as alternatives to offer you a privacy-friendly ecosystem. - -To streamline its offering, e Foundation responsible for the OS announced a new brand ‘**Murena**‘ that includes the operating system at its core, with new features and a new smartphone as well. - -### Murena or /e/ Foundation? - -The eFoundation is here to stay as a non-profit organization, working on /e/OS. Hence, it is safe to say that this is not a re-brand. - -However, [Murena][2] as a new startup company seems to be a separate commercial entity that will focus on encouraging mainstream users to try e/OS/ and promote the use of smartphones that support the operating system. - -The creator of /e/OS mentioned the following about the company: - -![][3] - -### /e/OS v1.0: What’s New? - -With the latest upgrade to the operating system, they aim to make things more accessible, improving the ease of use while still keeping privacy in mind. - -A new app store (App Lounge) and a new privacy tool (Advanced Privacy) have been introduced with the update. - -**App Lounge**: The new application installer lets you install numerous open-source applications and PWAs (Progress Web Apps). It also informs you of existing trackers in each application before you install it. - -![][4] - -I believe the existence of a tailored app store will help eliminate confusion for new users, whether they should try installing the Play Store or F-Droid with /e/OS. - -In addition to that, the Advanced Privacy tool will help limit exposing users’ data after they install third-party applications. - -You will also find a Murena cloud service as a private email account service and cloud storage if you want to get away from the big tech. The email service offers features to also hide your original email address. - -### Murena One - -![][5] - -The first Murena branded smartphone will be launching later in June and will ship to users in the USA, Canada, Europe, UK, and Switzerland. - -The smartphone will sport a 6.5-inch display, with a 25 Megapixel front shooter, and a rear camera setup with three sensors that include 48 MP, 8 MP, and 5 MP. - -We do not have clarity on the processor, but it mentions an octa-core chip coupled with 4 GB of RAM. All this is powered by a 4500 mAh battery. - -In addition to its first smartphone, you can also purchase smartphones by Fairphone and Teracube from its official website that packs in /e/OS out of the box. - -### Wrapping Up - -You can explore more about the new /e/OS upgrade, cloud services, and available smartphones on its official website. - -[Murena][6] - -The pricing for the smartphone hasn’t been disclosed in the press release. So, we suggest you to keep an eye on it if you’re interested. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/murena-e-os/ - -作者:[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/06/murena.jpg -[2]: https://murena.com/ -[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-quote.jpeg -[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/eos-app-lounge-1024x1024.jpg -[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-one-1024x576.jpeg -[6]: https://murena.com/ From 680fe3f48c083d036104f948911bb806c97e94f3 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 2 Jun 2022 16:13:06 +0800 Subject: [PATCH 009/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220602=20Get=20started=20with=20Cadence,=20an=20open?= =?UTF-8?q?=20source=20workflow=20engine.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Cadence, an open source workflow engine.md | 282 ++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 sources/tech/20220602 Get started with Cadence, an open source workflow engine.md diff --git a/sources/tech/20220602 Get started with Cadence, an open source workflow engine.md b/sources/tech/20220602 Get started with Cadence, an open source workflow engine.md new file mode 100644 index 0000000000..935eb45c94 --- /dev/null +++ b/sources/tech/20220602 Get started with Cadence, an open source workflow engine.md @@ -0,0 +1,282 @@ +[#]: subject: "Get started with Cadence, an open source workflow engine" +[#]: via: "https://opensource.com/article/22/6/cadence-open-source-workflow-engine" +[#]: author: "Ben Slater https://opensource.com/users/ben-slater" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Get started with Cadence, an open source workflow engine +====== +Cadence simplifies the complexity of distributed systems so that developers can focus on creating applications built for high durability, availability, and scalability. + +![Tips and gears turning][1] + +Image by: opensource.com + +Modern applications require complicated interactions between long-running business processes, internal services, and third-party APIs. To say it's been a challenge for developers is putting it mildly. Managing these processes means tracking complex states, preparing responses to asynchronous events, and communicating with often unreliable external dependencies. + +Developers typically take on these complex challenges with solutions that are just as convoluted, assembling unwieldy systems that leverage stateless services, databases, retry algorithms, and job scheduling queues. Because these complex systems obscure their own business logic, availability issues are common, often stemming from the application's dependence on scattered and unproven components. Developer productivity is regularly sacrificed to keep these sprawling, troubled systems from collapsing. + +### Designing a distributed application + +Cadence solves these issues by offering a highly scalable fault-oblivious code platform. Cadence abstracts away the usual challenges of implementing fault tolerance and durability with its fault oblivious code. + +A standard Cadence application includes a Cadence service, workflow, activity workers, and external clients. If needed, it's acceptable to co-locate the roles of workflow workers, activity workers, and external clients in a single application process. + +**Cadence Service** + +![Image of client application and Cadence service][2] + +Image by: (Ben Slater, CC BY-SA 4.0) + +Cadence is centered on its multi-tenant service and the high scalability it enables. A strongly typed [gRPC API][3] exposes all Cadence service functionality. A Cadence cluster can run multiple services on multiple nodes, including: + +* Front end: A stateless service that handles incoming worker requests, with instances backed by an external load balancer. +* History service: Handles core logic for workflow steps and activity orchestration. +* Matching service: Matches workflow or activity tasks with workers ready to complete them. +* Internal worker service: Meets internal requirements (such as archiving) by introducing Cadence workflows and activities. +* Workers: Function as Cadence client apps that execute user-created workflow and activity logic. + +By default, Cadence supports Apache Cassandra, MySQL, PostgreSQL, CockroachDB, and TiDB for use as persistence stores, as well as ElasticSearch and OpenSearch for listing workflows with complex predicates. + +Because the Cadence service is multi-tenant, a single service can serve one or many applications. A local Cadence service instance can be configured with docker-compose for local development. The Cadence service maintains workflow states, associated durable timers, and internal "task list" queues to send tasks to external workers. + +Beyond the Cadence service itself: + +* Workflow workers: hosts fault-oblivious code externally to the Cadence service. The Cadence service sends these workers "decision tasks." The workers deliver the tasks to the workflow code and communicate the completed "decisions" back to the Cadence service. Workflow code can be implemented in any language able to communicate with Cadence API: production-ready Java and Go clients are currently available. +* Activity workers: hosts "activities", or code that perform application specific actions such as service calls, database record updates, and file downloads. Activities feature task routing to specific processes, heartbeats, infinite retries, and unlimited execution time. The Cadence service sends activity tasks to these workers, who complete them and report completion. +* External clients: enable the creation of workflow instances, or "executions". External clients such as UIs, microservices or CLIs use the StartWorkflowExecution Cadence service API call to implement executions. External clients are also capable of notifying workflows about asynchronous external events, synchronous workflow state queries, waiting for synchronous workflow completion, workflow restarts, cancellation, and searching for specific workflows with List API. + +### Getting started with Cadence + +In this example we'll use the Cadence Java client. The client is [available from GitHub][4], and [JavaDoc documentation can be found here][5]. You can also check for the [latest release version][6]. + +To begin, add *cadence-client* as a dependency to your *pom.xml* file like this: + +``` + + com.uber.cadence + cadence-client + LATEST.RELEASE.VERSION + +``` + +Alternatively, you can use *build.gradle*: + +compile group: ‘com.uber.cadence', name: ‘cadence-client', version: ‘LATEST.RELEASE.VERSION' + +**Java Hello World with Cadence** + +The best way to get an idea of what Cadence is capable of is to try it, so here's a simple "Hello World" example you can try. First, add the [Cadence Java client dependency][7] to your Java project. Using Gradle, the dependency looks like this: + +compile group: ‘com.uber.cadence', name: ‘cadence-client', version: ‘' + +Add these dependencies that the cadence-client requires as well: + +compile group: ‘commons-configuration', name: ‘commons-configuration', version: ‘1.9' + +compile group: ‘ch.qos.logback', name: ‘logback-classic', version: ‘1.2.3' + +Then compile this code: + +``` +import com.uber.cadence.workflow.Workflow; +import com.uber.cadence.workflow.WorkflowMethod; +import org.slf4j.Logger; +public class GettingStarted { + private static Logger logger = Workflow.getLogger(GettingStarted.class); + + public interface HelloWorld { + @WorkflowMethod + void sayHello(String name); + } +} +``` + +These [Cadence Java samples][8] are available to help if you encounter issues with the build files. + +Next, put this logback config file into your classpath: + +``` + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + +``` + +Now create the Hello World workflow. Add HelloWorldImpl with the sayHello method, which logs and returns "Hello …": + +``` +import com.uber.cadence.worker.Worker; +import com.uber.cadence.workflow.Workflow; +import com.uber.cadence.workflow.WorkflowMethod; +import org.slf4j.Logger; +public class GettingStarted { + private static Logger logger = Workflow.getLogger(GettingStarted.class); + + public interface HelloWorld { + @WorkflowMethod + void sayHello(String name); + } + + public static class HelloWorldImpl implements HelloWorld { + @Override + public void sayHello(String name) { + logger.info("Hello " + name + "!"); + } + } +} +``` + +Register the workflow implementation to the Cadence framework with a worker connected to a Cadence service. Workers will connect to a Cadence service running locally by default. + +``` +public static void main(String[] args) { + WorkflowClient workflowClient = WorkflowClient.newInstance( + new WorkflowServiceTChannel(ClientOptions.defaultInstance()), + WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build() + ); + // Get worker to poll the task list. + WorkerFactory factory = WorkerFactory.newInstance(workflowClient); + Worker worker = factory.newWorker(TASK_LIST); + worker.registerWorkflowImplementationTypes(HelloWorldImpl.class); + factory.start(); +} +``` + +Now you're ready to run the worker program. Here's an example log: + +``` +13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0 + +13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain="test-domain", type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6} + +13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea} +``` + +"Hello"'isn't printing, because the worker only hosts the workflow code. To execute the workflow, start it with the Cadence CLI: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow start --tasklist HelloWorldTaskList --workflow_type HelloWorld::sayHello --execution_timeout 3600 --input \"World\" +Started Workflow Id: bcacfabd-9f9a-46ac-9b25-83bcea5d7fd7, run Id: e7c40431-8e23-485b-9649-e8f161219efe +``` + +Now the program gives this output: + +``` +13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0 + +13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain=“test-domain”, type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6} + +13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea} + +13:40:28.308 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello World! +``` + +Success! Now run this workflow execution: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow start --tasklist HelloWorldTaskList --workflow_type HelloWorld::sayHello --execution_timeout 3600 --input \"Cadence\" + +Started Workflow Id: d2083532-9c68-49ab-90e1-d960175377a7, run Id: 331bfa04-834b-45a7-861e-bcb9f6ddae3e +``` + +You should get this output: + +``` +13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0 + +13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain="test-domain", type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6} + +13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea} + +13:40:28.308 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello World! + +13:42:34.994 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello Cadence! +``` + +Lastly, use this CLI to list the workflow: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow list + +WORKFLOW TYPE | WORKFLOW ID | RUN ID | START TIME | EXECUTION TIME | END TIME + +HelloWorld::sayHello | d2083532-9c68-49ab-90e1-d960175377a7 | 331bfa04-834b-45a7-861e-bcb9f6ddae3e | 20:42:34 | 20:42:34 | 20:42:35 + +HelloWorld::sayHello | bcacfabd-9f9a-46ac-9b25-83bcea5d7fd7 | e7c40431-8e23-485b-9649-e8f161219efe | 20:40:28 | 20:40:28 | 20:40:29 +``` + +Look over the workflow execution history as well: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow showid 1965109f-607f-4b14-a5f2-24399a7b8fa7 +1 WorkflowExecutionStarted {WorkflowType:{Name:HelloWorld::sayHello}, +TaskList:{Name:HelloWorldTaskList}, +Input:["World"], +ExecutionStartToCloseTimeoutSeconds:3600, +TaskStartToCloseTimeoutSeconds:10, +ContinuedFailureDetails:[], +LastCompletionResult:[], +Identity:cadence-cli@linuxkit-025000000001, +Attempt:0, +FirstDecisionTaskBackoffSeconds:0} +2 DecisionTaskScheduled {TaskList:{Name:HelloWorldTaskList}, +StartToCloseTimeoutSeconds:10, +Attempt:0} +3 DecisionTaskStarted {ScheduledEventId:2, +Identity:45937@maxim-C02XD0AAJGH6, +RequestId:481a14e5-67a4-436e-9a23-7f7fb7f87ef3} +4 DecisionTaskCompleted {ExecutionContext:[], +ScheduledEventId:2, +StartedEventId:3, +Identity:45937@maxim-C02XD0AAJGH6} +5 WorkflowExecutionCompleted {Result:[], +DecisionTaskCompletedEventId:4} +``` + +It may be a simple workflow, but looking at the history is quite informative. The history's value as a troubleshooting, analytics, and compliance tool only increases with the complexity of the workflow. As a best practice, automatically archive the history to a long-term blob store when workflows complete. + +### Try Cadence + +Cadence offers transformative advantages for organizations and application development teams charged with creating and managing high-scale distributed applications built for high durability, availability, and scalability. Cadence is available to all as free and open source software, making it simple for teams to explore its capabilities and determine if Cadence is a strong fit for their organizations. + +Using Cadence is as simple as cloning the [Git repository for the Cadence server][9] or the [container image][10]. For more details on getting started, visit: [https://cadenceworkflow.io/docs/get-started/][11]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/cadence-open-source-workflow-engine + +作者:[Ben Slater][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/ben-slater +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png +[2]: https://opensource.com/sites/default/files/2022-05/cadence1.png +[3]: https://github.com/uber/cadence-idl/tree/master/proto/uber/cadence/api/v1 +[4]: https://github.com/uber/cadence-java-client +[5]: https://www.javadoc.io/doc/com.uber.cadence/cadence-client/latest/index.html +[6]: https://github.com/uber/cadence-java-client/releases +[7]: https://mvnrepository.com/artifact/com.uber.cadence/cadence-client +[8]: https://github.com/uber/cadence-java-samples +[9]: https://github.com/uber/cadence +[10]: https://hub.docker.com/r/ubercadence/server +[11]: https://cadenceworkflow.io/docs/get-started/ From 3059e83cdd5c6dcc9f4fe4f90eb140696f26c9ca Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 2 Jun 2022 16:15:03 +0800 Subject: [PATCH 010/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220602=20The=20only=20Linux=20command=20you=20need?= =?UTF-8?q?=20to=20know.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...The only Linux command you need to know.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 sources/tech/20220602 The only Linux command you need to know.md diff --git a/sources/tech/20220602 The only Linux command you need to know.md b/sources/tech/20220602 The only Linux command you need to know.md new file mode 100644 index 0000000000..eb6364dd7f --- /dev/null +++ b/sources/tech/20220602 The only Linux command you need to know.md @@ -0,0 +1,165 @@ +[#]: subject: "The only Linux command you need to know" +[#]: via: "https://opensource.com/article/22/6/linux-cheat-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +The only Linux command you need to know +====== +The Linux cheat command is a utility to search for and display a list of example tasks you might do with a command. + +![Command line prompt][1] + +Image by: Opensource.com + +Information about Linux and open source abounds on the internet, but when you're entrenched in your work there's often a need for quick documentation. Since the early days of Unix, well before Linux even existed, there's been the `man` (short for "manual") and `info` commands, both of which display official project documentation about commands, configuration files, system calls, and more. + +There's a debate over whether `man` and `info` pages are meant as helpful reminders for users who already know how to use a tool, or an intro for first time users. Either way, both `man` and `info` pages describe tools and how to use them, and rarely address specific tasks and how to accomplish them. It's for that very reason that the `cheat` command was developed. + +For instance, suppose you can't remember how to [unarchive a tar file][2]. The `man` page provides you with all the options you require, but it leaves it up to you to translate this information into a functional command: + +``` +tar -A [OPTIONS] ARCHIVE ARCHIVE +tar -c [-f ARCHIVE] [OPTIONS] [FILE...] +tar -d [-f ARCHIVE] [OPTIONS] [FILE...] +tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...] +tar -r [-f ARCHIVE] [OPTIONS] [FILE...] +tar -u [-f ARCHIVE] [OPTIONS] [FILE...] +tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...] +``` + +That's exactly what some users need, but it confounds other users. The cheat sheet for tar, by contrast, provides complete common commands: + +``` +$ cheat tar + +# To extract an uncompressed archive: +tar -xvf /path/to/foo.tar + +# To extract a .tar in specified Directory: +tar -xvf /path/to/foo.tar -C /path/to/destination/ + +# To create an uncompressed archive: +tar -cvf /path/to/foo.tar /path/to/foo/ + +# To extract a .tgz or .tar.gz archive: +tar -xzvf /path/to/foo.tgz +tar -xzvf /path/to/foo.tar.gz +[...] +``` + +It's exactly what you need, when you need it. + +### The Linux cheat command + +The `cheat` command is a utility to search for and display a list of example tasks you might do with a Linux command. As with many Unix commands, there are different implementations of the same concept, including one [written in Go][3] and one, which I help maintain, [written in just 100 lines of Bash][4]. + +To install the Go version, download [the latest release][5] and put it somewhere in [your path][6], such as `~/.local/bin/` or `/usr/local/bin`. To install the Bash version, download the latest release and run the `install-cheat.sh` script: + +``` +$ sh ./install-cheat.sh +``` + +Or to configure the installation, use [Autotools][7]: + +``` +$ aclocal ; autoconf +$ automake --add-missing ; autoreconf +$ ./configure --prefix=$HOME/.local +$ make +$ make install +``` + +### Get cheat sheets for your Linux terminal + +Cheat sheets are just plain text files containing common commands. The main collection of cheat sheets is available at [Github.com/cheat/cheatsheets][8]. The Go version of cheat downloads cheatsheets for you when you first run the command. If you're using the Bash version of cheat, the `--fetch` option downloads cheatsheets for you: + +``` +$ cheat --fetch +``` + +As with `man` pages, you can have multiple collections of cheat sheets on your system. The Go version of cheat uses a [YAML][9] config file to define where each collection is located. The Bash version defines the path during the install, and by default downloads the [Github.com/cheat/cheatsheets][10] collection as well as [Opensource.com][11]'s own [Gitlab.com/opensource.com/cheatsheets][12] collection. + +### List cheat sheets + +To list the cheat sheets on your system, use the `--list` option: + +``` +$ cheat --list +7z +ab +acl +alias +ansi +ansible +ansible-galaxy +ansible-vault +apk +[...] +``` + +### View a Linux cheat sheet + +Viewing a cheat sheet is as easy as viewing a `man` or `info` page. Just provide the name of the command you need help with: + +``` +$ cheat alias + +# To show a list of your current shell aliases: +alias + +# To alias `ls -l` to `ll`: +alias ll='ls -l' +``` + +By default, the `cheat` command uses your environment's pager. Your pager is set with the `PAGER` [environment variable][13]. You can override that temporarily by redefining the `PAGER` variable before running the `cheat` command: + +``` +$ PAGER=most cheat less +``` + +If you just want to [cat][14] the cheat sheet into your terminal without a pager, the Bash version has a `--cat` option for convenience: + +``` +$ cheat --cat less +``` + +### It's not actually cheating + +The cheat system cuts to the chase. You don't have to piece together clues about how to use a command. You just follow the examples. Of course, for complex commands, it's not a shortcut for a thorough study of the actual documentation, but for quick reference, it's as fast as it gets. + +You can even create your own cheat sheet just by placing a file in one of the cheat sheet collections. Good news! Because the projects are open source, you can contribute your personal cheat sheets to the GitHub collection. And more good news! When there's a new Opensource.com [cheat sheet][15] release, we'll include a plain text version from now on so you can add that to your collection. + +The command is called `cheat`, but as any Linux user will assure you, it's not actually cheating. It's working smarter, the open source way. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/linux-cheat-command + +作者:[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/sites/default/files/lead-images/command_line_prompt.png +[2]: https://opensource.com/article/17/7/how-unzip-targz-file +[3]: https://github.com/cheat/cheat +[4]: https://gitlab.com/slackermedia/cheat +[5]: https://github.com/cheat/cheat/releases +[6]: https://opensource.com/article/17/6/set-path-linux +[7]: https://opensource.com/article/19/7/introduction-gnu-autotools +[8]: https://github.com/cheat/cheatsheets +[9]: https://opensource.com/article/21/9/yaml-cheat-sheet +[10]: https://github.com/cheat/cheatsheets +[11]: http://Opensource.com +[12]: https://gitlab.com/opensource.com/cheatsheets +[13]: https://opensource.com/article/19/8/what-are-environment-variables +[14]: https://opensource.com/article/19/2/getting-started-cat-command +[15]: https://opensource.com/downloads From 0e972852a4670ca70311aab9b41c1e4d73aa547f Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 2 Jun 2022 16:17:16 +0800 Subject: [PATCH 011/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220602=20Linux=20Mint=20to=20Maintain=20Timeshift=20?= =?UTF-8?q?Backup=20Tool=20as=20an=20XApp.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...intain Timeshift Backup Tool as an XApp.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md diff --git a/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md new file mode 100644 index 0000000000..7e41d5cefa --- /dev/null +++ b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md @@ -0,0 +1,72 @@ +[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" +[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Mint to Maintain Timeshift Backup Tool as an XApp +====== +Linux Mint takes over the development of ‘Timeshift’ backup/restore tool. You can now find it in its new GitHub repository. + +![linux mint][1] + +Timeshift is arguably the [best tool to back up and restore the Linux system][2]. + +Linux Mint also utilizes the tool to let users easily take snapshots before updates, and ensure hassle-free operation. + +Of course, that’s not the only thing that makes [Linux Mint potentially better than Ubuntu][3]. + +Unfortunately, the developer ([Tony George][4]) behind Timeshift can no longer maintain the project. The developer plans to focus on other projects instead. + +The Linux Mint team reached out to the developer to help the project in any capacity. And, they finalized to take over the development of Timeshift. + +So, now, the Linux Mint team will be responsible for new releases/fixes, and any development activity associated with Timeshift. + +### Adopting Timeshift as an XApp + +![][5] + +Linux Mint tends to maintain certain applications as an “XApp” to make sure that they work on various desktop environments and are not dependent on a particular desktop. + +Considering that they plan to adopt Timeshift as an XApp, you can expect the tool to continue offering the current look/functionality for a long time, irrespective of your desktop environment. + +Unlike some GNOME apps, which are usually turning into GNOME-only applications for the best experience. + +Timeshift is an essential backup/restore tool. So, Linux Mint taking over the development and maintaining it as an XApp sounds perfect! + +The translations for Timeshift are now done on [Launchpad][6], if you are curious. + +The [new GitHub repository][7] (forked by Linux Mint) can give you more details about the application and its latest development activity. + +You can also check out the official announcement for this in the [recent monthly blog post][8]. + +### Wrapping Up + +With Linux Mint as the maintainer of Timeshift, we could hope for more feature additions and improvements in the near future. + +What do you think about Linux Mint taking over the development of Timeshift as an XApp? You are welcome to share your thoughts on it in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-timeshift/ + +作者:[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/06/linux-mint-time-shift.jpg +[2]: https://itsfoss.com/backup-restore-linux-timeshift/ +[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[4]: https://teejeetech.com/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png +[6]: https://github.com/linuxmint/timeshift +[7]: https://github.com/linuxmint/timeshift +[8]: https://blog.linuxmint.com/?p=4323 From 9b274c21aaeadd174a57d16d6536599d7273adf3 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 2 Jun 2022 21:25:03 +0800 Subject: [PATCH 012/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220602=20Creating=20a=20GitHub=20Action=20from=20Scr?= =?UTF-8?q?atch.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2 Creating a GitHub Action from Scratch.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20220602 Creating a GitHub Action from Scratch.md diff --git a/sources/tech/20220602 Creating a GitHub Action from Scratch.md b/sources/tech/20220602 Creating a GitHub Action from Scratch.md new file mode 100644 index 0000000000..550971f29d --- /dev/null +++ b/sources/tech/20220602 Creating a GitHub Action from Scratch.md @@ -0,0 +1,97 @@ +[#]: subject: "Creating a GitHub Action from Scratch" +[#]: via: "https://www.opensourceforu.com/2022/06/creating-a-github-action-from-scratch/" +[#]: author: "M.V. Karan https://www.opensourceforu.com/author/m-v-karan/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Creating a GitHub Action from Scratch +====== +DevOps practices use automation to carry out repetitive tasks, leaving you free to focus on the more challenging but fun parts of building software. This article will explain how to use GitHub Actions, the automation platform baked into all GitHub projects for free. + +![Creating-a-GitHub-Action-from-Scratch-Featured-image][1] + +gitHub Actions makes it easy to automate all the software workflows that you see in your program — from code reviews, branch management and issue triaging, to even a complete CI/CD pipeline. + +GitHub Actions runs workflows when other events happen in your repository, such as when code is pushed, a pull request is opened or an issue is created. ‘Workflows’ are YAML specs that are defined within the .github/workflows directory in your repository. These workflows contain one or more ‘jobs’ that can be run sequentially or in parallel. Each job will run inside its own virtual machine ‘runner’ or inside a container. Each job has one or more steps that either run a script you define, or run an ‘action’ which is a reusable extension that can simplify your workflow. These actions can be either those that you create yourself, or use for free from the GitHub Marketplace. Figure 1 illustrates how all of this works together in accomplishing the automation that you need. + +![Figure 1: How GitHub Actions work][2] + +Let’s understand this better through an example that many of us might have seen in our CI pipelines — when code is pushed, create a build (Figure 2). + +![Figure 2: Example of push and build][3] + +In this example, the ‘event’ that happens in your repository is a ‘push’ event, and you need automation to create a build of your code. To accomplish this, you need to create a workflow YAML file within the .github/workflows directory, and define all the necessary components of jobs, runners and steps necessary for your build to take place. + +### Workflow files + +Let’s look at how to write workflows in YAML to define the automation that you need. Figure 3 gives an example of what a workflow file will look like, along with all the elements necessary. + +In this example, you can see the ‘on’ key that defines the event in your repository. On clicking this, the workflow is triggered to run automatically using GitHub Actions. Your workflow can have multiple triggers, and even add qualifiers to certain events (like triggering a workflow only when a push event occurs on the main branch). + +Followed by this is a ‘jobs’ key that defines all the jobs in the workflow, with a name for each job. In our example, there is only one job named ‘build’ that runs on its own virtual machine runner with the ubuntu-latest image as defined by the runs-on key. + +Within the job is a list of steps that need to run in sequence on the same virtual machine in order to accomplish the task of the job. In our example, these might be to do whatever is required in order to create a build. + +In Figure 3, the first step uses an ‘action’ from the GitHub Marketplace that does a check of the code; the next two steps run scripts within the shell of the virtual machine runner, and the last step runs a custom action that’s defined in the repository. You can use any combination of these scripts and actions necessary to accomplish the tasks for your job. + +![Figure 3: Example workflow file][4] + +### Why use GitHub Actions? + +GitHub Actions is native to GitHub and integrates well with the common software development workflows you might be familiar with on it. You can accomplish many of your automation needs solely with GitHub Actions, or even combine them with other tools to manage your workflows in a seamless way. + +Actions is independent of the language/framework that you use for your project, and you can use it to automate any of your workflows. Whether you want to run simple linting using JS libraries, create a distributable from your code, build a container image, or do anything else in between, you can accomplish it using GitHub Actions. + +Since workflow jobs run on virtual machine runners, you can run your workflows on Linux, macOS, Windows or even ARM. You can choose which architecture and OS you want for each of your jobs within your workflow, based on your own use case. These virtual machine runners can be hosted by GitHub, or you can even self-host them. Alternatively, you can choose to skip the virtual machine runner altogether and just run a container image when your workflow gets triggered. + +GitHub Actions is used by many developers, open source projects and businesses for their automation needs. If you check out various open source projects on GitHub, you might find that many of them are using Actions for their project management, CI/CD pipelines or other automations. There are more than 12,000 community-powered Actions extensions on the GitHub Marketplace that you can use readily within your own workflows and build on top of. + +Lastly, GitHub Actions is completely free for public repositories, and has free limits for private repositories as well. + +### Why build your own action? + +While there are thousands of actions available on the GitHub Marketplace that you could use, there could be scenarios where you might have to create your own action extension for use within your workflows. + +First, if you want to perform certain tasks or have some custom logic for which an action extension doesn’t already exist on the Marketplace, it is often useful to write your own action. This helps make your workflow modular, and also enables reuse and sharing within your teams, projects or organisations. + +Second, if you want to integrate GitHub and any other services/tools that you might use, you can do this easily by creating a GitHub Action that interacts with the APIs of those services/tools. This makes it easier for you to interact with other tools from within your workflows through GitHub Actions. + +One of the main benefits of GitHub Actions being native to GitHub is that it is accessible to the millions of developers using the latter. If an action that you create on your own can be used by other developers as well, you can publish it yourself for free on the GitHub Marketplace and make it available to everyone on GitHub. + +### How to build your own action + +An action has essentially two components (Figure 4). One is a YAML file called action.yml and the other is the source code of your action. + +![Figure 4: Components of your own GitHub Action][5] + +Let us look at what exactly these two components do. + +The*action.yml* file stores the metadata about the action you are building. It stores details like the name of the action, what are the inputs it needs and the outputs it delivers. It also defines whether the source code of the action is in JavaScript that can be run using Node12, or is a Docker image. It also contains information about where to find the JavaScript files or the Docker image to run the action. + +The source code part of your action contains the actual logic of it. This can be JavaScript files that can run using Node12, a Dockerfile that you are going to build when an action runs, or it can simply be a Docker image that you refer to. It will have access to the event payload that triggered the workflow and also the context of the workflow run through environment variables (ENV). You can easily call GitHub’s APIs or other APIs from within your source code as a part of your logic, to accomplish the action’s task. + +GitHub Actions lets you create your own actions using the millions of open source libraries accessible on GitHub, and allows you to write them in JavaScript or create a container action. It makes software workflow automation easy, which helps you be more productive and eases your development life cycle. + +You can automate various use cases by using GitHub Actions, including API management, code quality, support, chat, code review, publishing, deployment, localisation, continuous integration, learning, project management, monitoring, security, dependency management, and others. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/creating-a-github-action-from-scratch/ + +作者:[M.V. Karan][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/m-v-karan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Creating-a-GitHub-Action-from-Scratch-Featured-image.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-How-GitHub-Actions-work.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Example-of-push-and-build.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Example-workflow-file.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Components-of-your-own-GitHub-Action.jpg From 87c38d677987a013c9f6dc3ac2c8c55e34cbaf02 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 3 Jun 2022 10:18:55 +0800 Subject: [PATCH 013/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20How=20to=20Install=20FFmpeg=20in=20Ubuntu?= =?UTF-8?q?=20and=20Other=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nstall FFmpeg in Ubuntu and Other Linux.md | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md diff --git a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..6713d0f60f --- /dev/null +++ b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md @@ -0,0 +1,163 @@ +[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install FFmpeg in Ubuntu and Other Linux +====== +This tutorial outlines the steps required to install FFmpeg in Ubuntu and Other Linux systems. + +The ffmpeg is a collection library and software program to manipulate multimedia files. The entire ffmpeg is a robust set of libraries that allows you to convert, stream, and manipulate audio and video files. Many frontend Linux applications use it as backend hence depends on it. For example, a screen recording application may need ffmpeg to convert recorded streams to gif images. + +Popular applications and services that use FFmpeg are VLC Media Player, YouTube, Blender, Kodi, Shotcut, and Handbrake – to name a few. + +Fun fact: NASA’s Mars 2020 mission rover Perseverance used FFmpeg to complete and process images and video before beaming back to Earth! + +### About ffmpeg package + +The [ffmpeg][1] itself is a powerful program as a command-line utility. It is available for Linux, Windows, and macOS and supports many architectures. It is written in C and Assembly, providing extensive performance and a cross-platform utility. + +#### The Core + +The core of ffmpeg is the command-line utility or programs. They can be used on the command line or called from any programming language. For example, you can use these from your shell program, python script, etc. + +* ffmpeg: Used to convert audio and video streams, including sources from LIVE streams such as TV cards +* ffplay: Media player bundled in this package to play media +* ffprobe: Command line tool to show media information – can output as txtm csv, xml, json formats + +### FFmpeg Installation + +Installing FFmpeg is easy in Ubuntu and other Linux distributions. Open a terminal prompt and run the following commands to install. + +#### Ubuntu and similar distro + +``` +sudo apt install ffmpeg +``` + +#### Fedora + +For Fedora Linux, you need to add the [RPM Fusion repo][2] for FFmpeg. The official Fedora repo doesn’t have the FFmpeg package. + +``` +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +``` +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree- +``` + +``` +sudo dnf install ffmpeg +``` + +#### Arch Linux + +``` +pacman -S ffmpeg +``` + +After the successful installation, you can verify the installation using the below command. + +``` +ffmpeg --version +``` + +![FFmpeg installed in Ubuntu Linux][3] + +### Example: How to do basic tasks using ffmpeg + +First, let me give you a simple example of the basic syntax. Consider the following example. It simply converts an mp4 file to mkv file. + +1. Convert a basic video file + +``` +ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv +``` + +Of course, this is the easiest method, but it’s not complete because it doesn’t have the bit rate, resolution and other attributes of the video file required for the conversion. + +1. Convert an audio file + +Secondly, you can convert an audio file using a similar command. + +``` +ffmpeg -i sunny_day.ogg sunny_day.mp3 +``` + +1. Convert with an audio and video codec + +Finally, the following example can convert a video file using specified codecs. The parameter `-c` with `a` or `v` defines audio and video, respectively. The below command uses `libvpx` video and `libvorbis` audio codec for conversion. + +``` +ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm +``` + +### How to find out about the available codecs, encoders and decoders in your system? + +#### List all codecs + +To list all the codecs available, run the below command. + +``` +ffmpeg -codecs +``` + +This command lists all the codecs available with their capability, whether they support decoding or encoding, etc. Moreover, they are identified with the position as per the below table. + +``` +D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... = Audio codec..S... = Subtitle codec...I.. = Intra frame-only codec....L. = Lossy compression.....S = Lossless compression +``` + +![FFmpeg Codec list][4] + +#### List all encoders + +Listing all the encoders is accessible via the below command. + +``` +ffmpeg -encoders +``` + +#### List all decoders + +Similarly, the decoders list you can get via the below command. + +``` +ffmpeg -decoders +``` + +#### Details + +You can also get more details about the encoders or decoders using the parameter -h. + +``` +ffmpeg -h decoder=mp3 +``` + +### Summary + +I hope you learned the basics of FFmpeg and its commands. You can learn more about the program via the official [documentation][5]. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/ + +作者:[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://ffmpeg.org/ +[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg +[5]: https://ffmpeg.org/documentation.html From 54cd1c7fba6f8a331a1cf64c086bcb4a2969a2fc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Jun 2022 13:07:03 +0800 Subject: [PATCH 014/231] RP @FYJNEVERFOLLOWS https://linux.cn/article-14668-1.html --- ...awk by coding a -guess the number- game.md | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) rename {translated/tech => published}/20210115 Learn awk by coding a -guess the number- game.md (71%) diff --git a/translated/tech/20210115 Learn awk by coding a -guess the number- game.md b/published/20210115 Learn awk by coding a -guess the number- game.md similarity index 71% rename from translated/tech/20210115 Learn awk by coding a -guess the number- game.md rename to published/20210115 Learn awk by coding a -guess the number- game.md index 30040b9347..24738ff4be 100644 --- a/translated/tech/20210115 Learn awk by coding a -guess the number- game.md +++ b/published/20210115 Learn awk by coding a -guess the number- game.md @@ -1,57 +1,57 @@ [#]: collector: (lujun9972) -[#]: translator: (FYJNEVERFOLLOWS ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: translator: (FYJNEVERFOLLOWS) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14668-1.html) [#]: subject: (Learn awk by coding a "guess the number" game) [#]: via: (https://opensource.com/article/21/1/learn-awk) [#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) -编写一个“猜数”游戏的程序来学习 awk +通过编写“猜数字”游戏来学习 Awk ====== -编程语言往往具有许多共同特征。学习一门新语言的好方法是去写一个熟悉的程序。在本文中,我将会使用 awk 编写一个“猜数”程序来展示熟悉的概念。 -![question mark in chalk][1] +> 编程语言往往具有许多共同特征。学习一门新语言的好方法是去写一个熟悉的程序。在本文中,我将会使用 Awk 编写一个“猜数字”程序来展示熟悉的概念。 + +![](https://img.linux.net.cn/data/attachment/album/202206/03/130545jthh1vtoadahwahd.jpg) 当你学习一门新的编程语言时,最好把重点放在大多数编程语言都有的共同点上: + * 变量 —— 存储信息的地方 * 表达式 —— 计算的方法 * 语句 —— 在程序中表示状态变化的方法 - 这些概念是大多是编程语言的基础。 -一旦你理解了这些概念,你就可以开始把其他的弄清楚。例如,大多数语言都有得到其设计支持的“处理方式”,这些方式在不同语言之间可能有很大的不同。这些方法包括模块化(将相关功能分组在一起)、声明性与命令性、面向对象、低级与高级语法特性等等。许多程序员熟悉的一个例子是“仪式”,即,在处理问题之前设置场景所需的工作量。据说 Java 编程语言有一个重要的仪式要求,这源于它的设计,要求所有代码都在一个类中定义。 +一旦你理解了这些概念,你就可以开始把其他的弄清楚。例如,大多数语言都有由其设计所支持的“处理方式”,这些方式在不同语言之间可能有很大的不同。这些方法包括模块化(将相关功能分组在一起)、声明式与命令式、面向对象、低级与高级语法特性等等。许多程序员比较熟悉的是编程“仪式”,即,在处理问题之前设置场景所需花费的工作。据说 Java 编程语言有一个源于其设计的重要仪式要求,就是所有代码都在一个类中定义。 -但是回到最基本的,编程语言通常有相似之处。一旦你掌握了一种编程语言,就从学习另一种语言的基本知识开始,去品味这种新语言的不同之处。 +但从根本上讲,编程语言通常有相似之处。一旦你掌握了一种编程语言,就可以从学习另一种语言的基本知识开始,品味这种新语言的不同之处。 -继续进行的一个好方法是创建一组基本的测试程序。有了这些,就可以从这些相似之处开始学习。 +一个好方法是创建一组基本的测试程序。有了这些,就可以从这些相似之处开始学习。 你可以选择创建的一个测试程序是“猜数字”程序。电脑从 1 到 100 之间选择一个数字,让你猜这个数字。程序一直循环,直到你猜对为止。 “猜数字”程序练习了编程语言中的几个概念: + * 变量 * 输入 * 输出 * 条件判断 * 循环 - 这是学习一门新的编程语言的一个很好的实践实验。 - -**注**:本文改编自 Moshe Zadka 关于在 [Julia][2] 中使用这种方法的文章和Jim Hall关于在 [Bash][3] 中使用这种方法的文章。 +**注**:本文改编自 Moshe Zadka 在 [Julia][2] 中使用这种方法和 Jim Hall在 [Bash][3] 中使用这种方法的文章。 ### 在 awk 程序中猜数 -让我们编写一个实现“猜数字”游戏的 awk 程序。 -Awk 是动态类型的,是一种面向数据转换的脚本语言,并且对交互使用有着令人惊讶的良好支持。Awk 出现于 20 世纪 70 年代,最初是 Unix 操作系统的一部分。如果你不了解 Awk,但是喜欢电子表格,可以看一下这个链接 [去学习 Awk][4]! +让我们编写一个实现“猜数字”游戏的 Awk 程序。 -您可以通过编写一个版本的“猜数字”游戏来开始对 Awk 的探索。 +Awk 是动态类型的,这是一种面向数据转换的脚本语言,并且对交互使用有着令人惊讶的良好支持。Awk 出现于 20 世纪 70 年代,最初是 Unix 操作系统的一部分。如果你不了解 Awk,但是喜欢电子表格,这就是一个你可以 [去学习 Awk][4] 的信号! + +您可以通过编写一个“猜数字”游戏版本来开始对 Awk 的探索。 以下是我的实现(带有行号,以便我们可以查看一些特定功能): - ```      1    BEGIN {      2        srand(42) @@ -71,20 +71,21 @@ Awk 是动态类型的,是一种面向数据转换的脚本语言,并且对     16        }     17    } ``` + 我们可以立即看到 Awk 控制结构与 C 或 Java 的相似之处,但与 Python 不同。 -在像 *if-then-else*、*while* 这样的语句中,*then*、*else* 和 *while* 部分接受一个语句或一组被 **{** 和 **}** 包围的语句。然而,Awk 有一个很大的区别需要从一开始就了解: +在像 `if-then-else`、`while` 这样的语句中,`then`、`else` 和 `while` 部分接受一个语句或一组被 `{` 和 `}` 包围的语句。然而,Awk 有一个很大的区别需要从一开始就了解: 根据设计,Awk 是围绕数据管道构建的。 这是什么意思呢?大多数 Awk 程序都是一些代码片段,它们接收一行输入,对数据做一些处理,然后将其写入输出。认识到这种转换管道的需要,Awk 默认情况下提供了所有的转换管道。让我们通过关于上面程序的一个基本问题来探索:“从控制台读取数据”的结构在哪里? -答案是——“内置的”。特别的,第 7-17 行告诉 Awk 如何处理被读取的每一行。在这种情况下,很容易看到第 1-6 行在读取任何内容之前被执行。 +答案是——“内置的”。特别的,第 7-17 行告诉 Awk 如何处理被读取的每一行。在这种情况下,很容易看到第 1-6 行是在读取任何内容之前被执行的。 -更具体地说,第 1 行上的 **BEGIN** 关键字是一种“模式”,在本例中,它指示 Awk 在读取任何数据之前,应该先执行 { … } 中 **BEGIN** 后面的内容。另一个类似的关键字 **END**,在这个程序中没有被使用,它指示 Awk 在读取完所有内容后要做什么。 +更具体地说,第 1 行上的 `BEGIN` 关键字是一种“模式”,在本例中,它指示 Awk 在读取任何数据之前,应该先执行 `{ ... }` 中 `BEGIN` 后面的内容。另一个类似的关键字 `END`,在这个程序中没有被使用,它指示 Awk 在读取完所有内容后要做什么。 -回到第 7-17 行,我们看到它们创建了一个类似代码块 { … } 的片段,但前面没有关键字。因为在 **{** 之前没有任何东西可以让 Awk 匹配,所以它将把这一行用于接收每一行输入。每一行的输入都将由用户输入作为猜测。 +回到第 7-17 行,我们看到它们创建了一个类似代码块 `{ ... }` 的片段,但前面没有关键字。因为在 `{` 之前没有任何东西可以让 Awk 匹配,所以它将把这一行用于接收每一行输入。每一行的输入都将由用户输入作为猜测。 -让我们看看正在执行的代码。首先,在读取任何输入之前发生的序言。 +让我们看看正在执行的代码。首先,是在读取任何输入之前发生的序言部分。 在第 2 行,我们用数字 42 初始化随机数生成器(如果不提供参数,则使用系统时钟)。为什么要用 42?[当然要选 42!][5] 第 3 行计算 1 到 100 之间的随机数,第 4 行输出该随机数以供调试使用。第 5 行邀请用户猜一个数字。注意这一行使用的是 `printf`,而不是 `print`。和 C 语言一样,`printf` 的第一个参数是一个用于格式化输出的模板。 @@ -94,7 +95,6 @@ Awk 是动态类型的,是一种面向数据转换的脚本语言,并且对 考虑到 Awk 程序不同寻常的结构,代码片段会对特定的输入行配置做出反应,并处理数据,让我们看看另一种结构,看看过滤部分是如何工作的: - ```      1    BEGIN {      2        srand(42) @@ -120,7 +120,6 @@ Awk 是动态类型的,是一种面向数据转换的脚本语言,并且对 为了完整起见,我们可以使用这些模式将普通的计算与只适用于特定环境的计算分离开来。下面是第三个版本: - ```      1    BEGIN {      2        srand(42) @@ -142,20 +141,21 @@ Awk 是动态类型的,是一种面向数据转换的脚本语言,并且对     18        exit     19    } ``` + 认识到这一点,无论输入的是什么值,都需要将其转换为整数,因此我们创建了第 7-9 行来完成这一任务。现在第 10-12、13-15 和 16-19 行这三组代码,都是指已经定义好的变量 guess,而不是每次都对输入行进行转换。 让我们回到我们想要学习的东西列表: + * 变量 —— 是的,Awk 有这些;我们可以推断出,输入数据以字符串形式输入,但在需要时可以转换为数值 * 输入 —— Awk 只是通过它的“数据转换管道”的方式发送输入来读取数据 * 输出 —— 我们已经使用了 Awk 的 `print` 和 `printf` 函数来将内容写入输出 - * 条件判断 —— 我们已经学习了 Awk 的 *if-then-else* 和对应特定输入行配置的输入过滤器 - * 循环 —— 嗯,想象一下!我们在这里不需要循环,这还是多亏了 Awk 采用的“数据转换管道”方法;循环“就这么发生了”。注意,用户可以通过向 Awk 发送一个文件结束信号(当使用 Linux 终端窗口时可通过快捷键 **CTRL-D**)来提前退出管道。 + * 条件判断 —— 我们已经学习了 Awk 的 `if-then-else` 和对应特定输入行配置的输入过滤器 + * 循环 —— 嗯,想象一下!我们在这里不需要循环,这还是多亏了 Awk 采用的“数据转换管道”方法;循环“就这么发生了”。注意,用户可以通过向 Awk 发送一个文件结束信号(当使用 Linux 终端窗口时可通过快捷键 `CTRL-D`)来提前退出管道。 -考虑不需要循环来处理输入的重要性是非常值得的。Awk 能够长期存在的一个原因是 Awk 程序是紧凑的,而它们紧凑的一个原因是不需要从控制台或文件中读取样板文件。 +不需要循环来处理输入的重要性是非常值得的。Awk 能够长期保持存在的一个原因是 Awk 程序是紧凑的,而它们紧凑的一个原因是不需要从控制台或文件中读取的那些格式代码。 让我们运行下面这个程序: - ``` $ awk -f guess.awk random number is 25 @@ -167,14 +167,15 @@ that's right $ ``` -我们没有涉及的一件事是注释。Awk 注释以“#”开头,以行尾结束。 +我们没有涉及的一件事是注释。Awk 注释以 `#` 开头,以行尾结束。 ### 总结 -Awk 非常强大,这种“猜数字”游戏是入门的好方法。但这不应该是你探索 Awk 的终点。你可以 [阅读关于 Awk 和 Gawk (GNU Awk) 的历史][6],Gawk是 Awk 的扩展版本,如果你在电脑上运行Linux,可能会有这个。或者,你可以 [阅读所有关于它最初开发者的原始版本][7]。 +Awk 非常强大,这种“猜数字”游戏是入门的好方法。但这不应该是你探索 Awk 的终点。你可以看看 [Awk 和 Gawk(GNU Awk)的历史][6],Gawk 是 Awk 的扩展版本,如果你在电脑上运行 Linux,可能会有这个。或者,从它的原始开发者那里阅读关于 [最初版本][7] 的各种信息。 你还可以 [下载我们的备忘单][8] 来帮你记录下你所学的一切。 +> **[Awk 备忘单][8]** -------------------------------------------------------------------------------- @@ -183,7 +184,7 @@ via: https://opensource.com/article/21/1/learn-awk 作者:[Chris Hermansen][a] 选题:[lujun9972][b] 译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 30d739602d747fab559835066c9dd70a58aafede Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 3 Jun 2022 16:38:47 +0800 Subject: [PATCH 015/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20Titan=20Linux-=20A=20Blend=20of=20Debian=20?= =?UTF-8?q?Stable=20and=20KDE=20Plasma.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...A Blend of Debian Stable and KDE Plasma.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md diff --git a/sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md b/sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md new file mode 100644 index 0000000000..31f46dc899 --- /dev/null +++ b/sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md @@ -0,0 +1,127 @@ +[#]: subject: "Titan Linux: A Blend of Debian Stable and KDE Plasma" +[#]: via: "https://www.debugpoint.com/2022/06/titan-linux-review-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Titan Linux: A Blend of Debian Stable and KDE Plasma +====== +We review the Titan Linux – a rising star in the Linux distro space and bring Debian stable with KDE Plasma flavour with its unique tools. + +### Titan Linux – What does it offer? + +Titan Linux is a Debian-stable based Linux distribution which features the KDE Plasma desktop. It is a fairly new distribution which aspires to be user friendly and minimal distribution. Developed by a two-member team, Titan Linux brings a unique experience to Debian’s experience by eliminating several packages and giving out of the box hardware support. + +Moreover, it uses a different installer than what Debian uses and brings some nifty in-house utilities. + +![Titan Linux Desktop][1] + +### Titan Linux Review – 2022 + +#### Download and Installation + +This review is based on the latest stable release of Titan Linux 1.2.1 “Cronus” Stable bases on [Debian 11 bullseye][2]. + +There are no problems while downloading this distro via its torrents. Many budding distros don’t do well while providing download options – such as no server bandwidth, no torrent etc. However, the torrent speed was good, and the ISO of 2.5GB took a reasonable time to download. + +Let’s talk about the installation. + +First, the LIVE desktop gives you a shortcut to kick off the installer. The installer that Titan Linux uses is Calamares. It is not [Debian’s own graphical installer][3]. This is one of the significant advantages of using the popular Calamares for Debian. The installer is configured in a simple manner and should not be a problem for new users or advanced users. + +Second, the Calamares installer took around 4 minutes to install on average in both physical and virtual systems. After the installation is complete, the Grub is well configured, and I can boot into the desktop. + +#### Look and Feel + +Firstly, the desktop gives you a slightly different feel from a KDE Plasma desktop because of the dark colour palette and a somewhat different application menu. In addition, the Dragon Icons and cursors go well with its “Titan” themed desktop look. + +Second, the application menu is the [legacy KDE Plasma kick off][4], which gives you easy access to the applications and system settings. + +In addition, System Settings uses an alternative view than the traditional Plasma system settings. If you are a long term KDE Plasma user, you may feel a little different with these two subtle changes in this desktop. + +Other than that, a nice set of wallpapers will help you further customize your desktop. And finally, the bottom main taskbar is almost the same as the standard Plasma desktop. + +![The KDE Plasma kick off menu shows a legacy view][5] + +![System Settings in Titan Linux][6] + +#### Applications + +Firstly, the application list is more customized than the KDE Plasma desktop apps. A set of different and lightweight applications that gives a lightweight feel. + +Secondly, it is wise for the developers of this distro not to use the KDE Applications but instead use some of the traditional lightweight replacements. + +For example, instead of the KWiter text editor, you get the Featherpad text editor. However, the file manager is Dolphin from KDE Applications. The Gwenview is replaced by the LXImage image viewer from the LXQt desktop. + +Moreover, an exciting addition is the Titan Toolbox. It’s a collection of utilities that is very handy for new and advanced users. The Toolbox contains utilities to tweak the desktop, change repo, APT tools, hardware configuration, etc. YOu can see a glimpse of it in the below image. + +![A side-by-side view of two different options of Titan Toolbox][7] + +For example, the Extra Software option from the Toolbox gives you the below graphical menu items to perform several tasks. It is one of the selling points of this distribution. + +![One of the Titan Toolbox options – Extra Software][8] + +Another item from the Toolbox is my favourite: the Advanced options to manage Kernel and Grub, as you can see below. I must say, this is handy for all users. + +![Advanced Tools][9] + +#### Performance + +The performance metric is exciting considering it is a KDE Plasma desktop. In a fresh install and idle state, it only uses 620 MB of RAM! And the CPU is at around 1%. + +Next, when I pass it through a heavy workload with Firefox, Dolphin file manager, text editor, terminal, VLC media player, and system settings, it uses 1.3 GB of RAM, and the CPU is at 2% to 3% on average. + +Finally, when I close all the applications on a heavy workload, the RAM consumption goes back to 676MB of RAM, and the CPU is at a 1% level. + +I must say, it is well optimized. And surprisingly, KWin is performing better with the Debian base than the Ubuntu or Fedora base. + +It uses 10GB of disk space for a default installation. + +![Titan Linux in Idle State][10] + +![Titan Linux Performance in Heavy Workload][11] + +#### Bugs + +There are no bugs I encountered while reviewing this distribution. It is simply stable well considering it is a new distribution. + +However, I found one weird behaviour while changing resolution in a virtual machine (see below), which I think is a KWin bug and has nothing to do with Titan Linux. + +![][12] + +### Closing Notes + +Having reviewed a large set of distributions over the years, I must say that Titan Linux gives you a stock Debian stable experience with well-optimized KDE Plasma desktop. On top of that, the Titan toolbox is also a handy addition to helping users. + +If you are looking for a Debian stable distribution with KDE Plasma desktop experience, definitely go for it. Thanks to Debian, you can easily use this distro for your daily use and productive work. + +You can download Titan Linux from the [official website][13]. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/titan-linux-review-2022/ + +作者:[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://www.debugpoint.com/wp-content/uploads/2022/06/Titan-Linux-Desktop.jpg +[2]: https://www.debugpoint.com/2021/05/debian-11-features/ +[3]: https://www.debugpoint.com/2021/01/install-debian-buster/ +[4]: https://www.debugpoint.com/2021/02/legacy-kickoff-kde-plasma-5-21/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/The-KDE-Plasma-kick-off-menu-shows-a-legacy-view.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/System-Settings-in-Titan-Linux.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/06/A-side-by-side-view-of-two-different-options-of-Titan-Toolbox.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/One-of-the-Titan-Toolbox-option-Extra-Software.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/06/Advanced-Tools.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/06/Titan-Linux-in-Idle-State.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/06/Titan-Linux-Performance-in-Heavy-Workload.jpg +[12]: +[13]: https://techcafe757.wixsite.com/titanlinux From 372fc79ea6c8890b0972287309ffe4e197071b58 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 3 Jun 2022 16:50:19 +0800 Subject: [PATCH 016/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020220602=20Why=20Do=20Enterprises=20Use=20and=20Contri?= =?UTF-8?q?bute=20to=20Open=20Source=20Software.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This article is collected by lkxed. --- ... and Contribute to Open Source Software.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md diff --git a/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md b/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md new file mode 100644 index 0000000000..1de91d1449 --- /dev/null +++ b/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md @@ -0,0 +1,128 @@ +[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software" +[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/" +[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why Do Enterprises Use and Contribute to Open Source Software +====== +When people find out I work at the Linux Foundation they invariably ask what we do? Sometimes it is couched around the question, As in the Linux operating system? I explain open source software and try to capture the worldwide impact into 20 seconds before I lose their attention. If they happen to stick around for more, we often dig into the question, Why would enterprises want to participate in open source software projects or use open source software? The reality is – they do, whether they know it or not. And the reality is thousands of companies donate their code to open source projects and invest time and resources helping to further develop and improve open source software. + +### How extensively used is open source software + +To quote from our recently released report, A Guide to Enterprise Open Source, “Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world. From the Internet and the mobile apps we use daily to the operating systems and programming languages we use to build the future, OSS has played a vital role. It is the lifeblood of the technology industry. Today, OSS powers the digital economy and enables scientific and technological breakthroughs that improve our lives. It’s in our phones, our cars, our airplanes, our homes, our businesses, and our governments. But just over two decades ago, few people had ever heard of OSS, and its use was limited to a small group of dedicated enthusiasts.” + +Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world. + +But what does this look like practically: + +* In vertical software stacks across industries, open source penetration ranges from 20 to 85 percent of the overall software used. +* Linux fuels 90%+ of web servers and Internet-connected devices. +* The Android mobile operating system is built on the Linux kernel. +* Immensely [popular libraries and tools][1] to build web applications, such as: AMP, Appium, Dojo, jQuery, Marko, Node.js and so many more are open source. +* The world’s top 100 supercomputers run Linux. +* 100% of mainframe customers use Linux. +* The major cloud-service providers – AWS, Google, and Microsoft – all utilize open-source software to run their services and host open-source solutions delivered through the cloud. + +### Why do companies want to participate in open source software projects + +Companies primarily participate in open source software projects in three ways: + +* They donate software they created to the open source community. +* They provide direct funding and/or allocate software developers and other staff to contribute to open source software projects + +The question often asked is, why wouldn’t they want to keep all of their software proprietary or only task their employees to work on their proprietary software? + +The 30,000-foot answer is that it is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate on top of the common baseline. They see that they are better off pooling resources to make the baseline better. Sometimes it is called “coopetition.” It generally means that while companies may be in competition with each other in certain areas, they can still cooperate on others. + +It is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate + +Some old-school examples of this principle: + +* Railroads agreed on a common track size and build so they can all utilize the same lines and equipment was interchangeable. +* Before digital cameras, companies innovated and differentiated on film and cameras, but they all agreed on the spacing for the sprockets to advance the film. +* The entertainment industry united around the VHS and Blu-Ray formats over their rivals. + +Now, we see companies, organizations, and individuals coming together to solve problems while simultaneously improving their businesses and products: + +[Let’s Encrypt][2] is a free, automated, and open certificate authority with the goal of dramatically increasing the use of secure web protocols by making it much easier and less expensive to setup. They are serving 225+ million websites, issuing ~1.5 million certificates each day on average. + +The [Academy Software Foundation][3] [creates value in the film industry][4] through collectively engineering software that powers much of the entertainment, gaming, and media industry productions and open standards needed for growth. + +The Hyperledger Foundation hosts enterprise-grade blockchain software projects, notably [using significantly fewer energy resources][5] than other popular solutions. + +[LF Energy][6] is [making the electric grid more modular, interoperable, and scalable][7] to help increase the use of renewable energy sources. + +[Dronecode][8] is enabling the development of drone software so companies can use their resources to innovate further. + +[OpenSSF][9] is the top technology companies coming together to strengthen the security and resiliency of open source software. + +[Kubernetes][10] was donated by Google and is the go-to solution for managing cloud-based software. + +These are just a small sampling of the open source software projects that enterprises are participating in. You can explore all of the ones hosted at the Linux Foundation [here][11]. + +### How can companies effectively use and participate in open source software projects? + +Enterprises looking to better utilize and participate in open source projects can look to the Linux Foundation’s resources to help. Much of what organizations need to know is provided in the just-published report,[A Guide to Enterprise Open Source][12]. The report is packed with information and insights from open source leaders at top companies with decades of combined experience. It includes chapters on these topics: + +* Leveraging Open Source Software +* Preparing the Enterprise for Open Source +* Developing an Open Source Strategy +* Setting Up Your Infrastructure for Implementation +* Setting Up Your Talent for Success +* Challenges + +Additionally, the Linux Foundation offers many open source [training courses][13], [events][14] throughout the year, the [LFX Platform][15], and hosts projects that help organizations manage open source utilization and participation, such as: + +The [TODO Group][16] provides resources to setup and run an open source program office, including their [extensive guides][17]. + +The [Openchain Project][18] maintains an international standard for sharing what software package licenses are included in a larger package, including information on the various licensing requirements so enterprises can ensure they are complying with all of the legal requirements. + +The [FinOps Foundation][19] is fostering an, “evolving cloud financial management discipline and cultural practice that enables organizations to get maximum business value by helping engineering, finance, technology, and business teams to collaborate on data-driven spending decisions.”. + +The [Software Data Package Exchange (SPDX)][20] is an open standard for communication software bill of materials (SBOMs) so it is clear to every user which pieces of software are included in the overall package. + +Again, this is just a snippet of the projects at the Linux Foundation that are working to help organizations adapt, utilize, contribute, and donate open source projects. + +The bottom line: Enterprises are increasingly turning to open source software projects to solve common problems and innovate beyond the baseline, and the Linux Foundation is here to help. + +The post [Why Do Enterprises Use and Contribute to Open Source Software][21] appeared first on [Linux Foundation][22]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/ + +作者:[Dan Whiting][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.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/ +[b]: https://github.com/lkxed +[1]: https://openjsf.org/projects/ +[2]: https://letsencrypt.org/ +[3]: https://www.aswf.io/ +[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/ +[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/ +[6]: https://www.lfenergy.org/ +[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/ +[8]: https://www.dronecode.org/projects/ +[9]: https://openssf.org/ +[10]: https://kubernetes.io/ +[11]: https://linuxfoundation.org/projects/ +[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/ +[13]: https://training.linuxfoundation.org/ +[14]: https://events.linuxfoundation.org/ +[15]: https://lfx.linuxfoundation.org/ +[16]: https://todogroup.org/ +[17]: https://linuxfoundation.org/resources/open-source-guides/ +[18]: https://www.openchainproject.org/resources +[19]: https://www.finops.org/introduction/what-is-finops/ +[20]: https://spdx.dev/ +[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/ +[22]: https://www.linuxfoundation.org/ From 6df6a88f02f7d2fc99974c972c72b5fafe342eaf Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 3 Jun 2022 16:51:43 +0800 Subject: [PATCH 017/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20Fedora=20Linux=20editions=20part=201-=20Off?= =?UTF-8?q?icial=20Editions.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux editions part 1- Official Editions.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md diff --git a/sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md b/sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md new file mode 100644 index 0000000000..1faefb4e9c --- /dev/null +++ b/sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md @@ -0,0 +1,81 @@ +[#]: subject: "Fedora Linux editions part 1: Official Editions" +[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/" +[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fedora Linux editions part 1: Official Editions +====== +![Fedora Linux editions part 1 Official Editions][1] + +Photo by [Frédéric Perez][2] on [Unsplash][3] + +Fedora Linux provides several variants to meet your needs. You can find an overview of all the Fedora Linux variants in my previous article [Introduce the different Fedora Linux editions][4]. This article will go into a little more detail about the Fedora Linux official editions. There are five *editions* — Fedora Workstation, Fedora Server, Fedora IoT, Fedora CoreOS, and Fedora Silverblue. The Fedora Linux download page currently shows that three of these are *official* editions and the remaining two are *emerging* editions. This article will cover all five editions. + +### Fedora Workstation + +If you are a laptop or desktop computer user, then Fedora Workstation is the right operating system for you. Fedora workstation is very easy to use. You can use this for daily needs such as work, education, hobbies, and more. For example, you can use it to create documents, make presentations, surf the internet, manipulate images, edit videos, and many other things. + +This Fedora Linux edition comes with the GNOME Desktop Environment by default. You can work and do activities comfortably using this appearance concept. You can also customize the appearance of this Fedora Workstation according to your preferences, so you will be more comfortable using it. If you are a new Fedora Workstation user, you can read my previous article [Things to do after installing Fedora 34 Workstation][5]. Through the article, you will find it easier to start with Fedora Workstation. + +More information is available at this link: [https://getfedora.org/en/workstation/][6] + +### Fedora Server + +Many companies require their own servers to support their infrastructure. The Fedora Server edition operating system comes with a powerful web-based management interface called Cockpit that has a modern look. Cockpit enables you to easily view and monitor system performance and status. + +Fedora Server includes some of the latest technology in the open source world and it is backed by an active community. It is very stable and reliable. However, there is no *guarantee* that anyone from the Fedora community will be available or able to help if you encounter problems. If you are running mission critical applications and you might require technical support, you might want to consider [Red Hat Enterprise Linux][7] instead. + +More information is available at this link: [https://getfedora.org/en][8][/server/][9] + +### Fedora IoT + +Operating systems designed specifically for IoT devices have become popular. Fedora IoT is an operating system created in response to this. Fedora IoT is an immutable operating system that uses OSTree Technology with atomic updates. This operating system focuses on security which is very important for IoT devices. Fedora IoT has support for multiple architectures. It also comes with a web-based configuration console so that it can be configured remotely without requiring that a keyboard, mouse or monitor be physically connected to the device. + +More information is available at this link: [https://getfedora.org/en/iot/][10] + +### Fedora CoreOS + +Fedora CoreOS is a container-focused operating system. This operating system is used to run applications safely and reliably in any environment. It is designed for clusters but can also be run as a standalone system. This operating system has high compatibility with Linux Container configurations. + +More information is available at this link: [https://getfedora.org/en/coreos/][11] + +### Fedora Silverblue + +This edition is a variant of Fedora Workstation with an interface that is not much different. However, the difference is that Fedora Silverblue is an immutable operating system with a container-centric workflow. This means that each installation is exactly the same as another installation of the same version. The goal is to make it more stable, less prone to bugs, and easier to test and develop. + +More information is available at this link: [https://silverblue.fedoraproject.org/][12] + +### Conclusion + +Each edition of Fedora Linux has a different purpose. The availability of several editions can help you to get an operating system that suits your needs. The Fedora Linux editions discussed in this article are the operating systems available on the main download page for Fedora Linux. You can find download links and more complete documentation at [https://getfedora.org/][13]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/ + +作者:[Arman Arisman][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://fedoramagazine.org/author/armanwu/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/FedoraMagz-FedoraEditions-1-Official-816x345.png +[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/ +[5]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/ +[6]: https://getfedora.org/en/workstation/ +[7]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[8]: https://getfedora.org/en/server/ +[9]: https://getfedora.org/en/server/ +[10]: https://getfedora.org/en/iot/ +[11]: https://getfedora.org/en/coreos?stream=stable +[12]: https://silverblue.fedoraproject.org/ +[13]: https://getfedora.org/ From 54da7f463a3f8029f8cbca278493f76d22ebd73b Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 3 Jun 2022 16:52:33 +0800 Subject: [PATCH 018/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220603=20Spotify=20Introduces=20an=20Open-Source=20T?= =?UTF-8?q?ool=20to=20Fix=20a=20Big=20Problem=20for=20Modern=20Musicians.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Fix a Big Problem for Modern Musicians.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md diff --git a/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md b/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md new file mode 100644 index 0000000000..782197f1a9 --- /dev/null +++ b/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md @@ -0,0 +1,85 @@ +[#]: subject: "Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians" +[#]: via: "https://news.itsfoss.com/spotify-basic-pitch/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians +====== +Spotify’s new open-source tool helps you convert audio to MIDI version. Explore why it is a big deal for modern musicians. + +![spotify][1] + +Spotify is a leading music streaming platform with several open-source projects. + +While most of the projects/tools are built for niche users, they have finally introduced something that seems enticing to all the modern musicians involved with digital music production. + +‘Basic Pitch’ is a new free and open-source tool by Spotify that lets you convert any audio file to its MIDI (Musical Instrument Digital Interface) version. + +In case you did not know, with MIDI notes, you can easily tweak what’s being played and analyze more to help you in digital music production. + +### Basic Pitch: Making Things Easier + +With Basic Pitch, one can easily have MIDI notes of an audio file they have always wanted, and with better accuracy. + +![spotify basic pitch][2] + +Spotify explains that it is better than existing note-detection systems by offering some advantages that include: + +> **Polyphonic + instrument-agnostic:** Unlike most other note-detection algorithms, Basic Pitch can track multiple notes at a time and across various instruments, including piano, guitar, and ocarina. Many systems limit users to only monophonic output (one note at a time, like a single vocal melody), or are built for only one kind of instrument. + +> **Pitch bend detection:** Instruments, like guitar or the human voice, allow for more expressiveness through pitch-bending: vibrato, glissando, bends, slides, etc. However, this valuable information is often lost when turning audio into MIDI. Basic Pitch supports this right out of the box. + +> **Speed:** Basic Pitch is light on resources, and is able to run faster than real time on most modern computers ([Bittner et al. 2022][3]). + +Basic Pitch uses a machine learning model that turns various instrumental performances into MIDI. The audio file may also contain your voice, but it should still be able to convert the instrument to its MIDI version. + +![Basic Pitch demo: Convert audio into MIDI using ML][4] + +I tried converting an MP3 karaoke file with a single instrument to get the MIDI notes, and it seemed to work pretty well. + +The tool also lets you process more than one audio file at a time and offers a few parameter controls that include note segmentation, confidence threshold, minimum/maximum pitch, and note length. + +### Made for Creators and Researchers + +Spotify mentions that it targets the creators primarily, but they are also interested to learn how machine learning researchers build upon it and help develop better solutions using the [open-source project on GitHub][5]. + +As a creator/musician, you can access the open-source tool on its [official website][6] for a demo. The parameters can be adjusted using the website, and you can also download the MIDI file from there. + +[Basic Pitch][7] + +![spotify basic pitch][8] + +It is also available via [PyPI][9] to install and use via the command-line interface on Linux, Windows, and macOS. + +You can explore its [GitHub page][10] to know more about its usage/commands. + +If you are curious, the [official announcement post][11] provides more technical comparisons and explanations regarding the development of the tool. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/spotify-basic-pitch/ + +作者:[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/06/spotify-midi.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-basic-pitch-1024x531.png +[3]: https://ieeexplore.ieee.org/document/9746549 +[4]: https://youtu.be/DhlvfgS73ZQ?list=PLf1KFlSkDLIAYLdb-SD9s8TdGy0rWIwVr +[5]: https://github.com/spotify/basic-pitch +[6]: https://basicpitch.spotify.com/ +[7]: https://basicpitch.spotify.com/ +[8]: https://news.itsfoss.com/wp-content/uploads/2022/06/basic-pitch-parameters.jpg +[9]: https://pypi.org/ +[10]: https://github.com/spotify/basic-pitch +[11]: https://engineering.atspotify.com/2022/06/meet-basic-pitch/ From 4f582a800e944cc31bf08e8e5c7195c298039b94 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 3 Jun 2022 16:53:25 +0800 Subject: [PATCH 019/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20How=20static=20linking=20works=20on=20Linux?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20603 How static linking works on Linux.md | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 sources/tech/20220603 How static linking works on Linux.md diff --git a/sources/tech/20220603 How static linking works on Linux.md b/sources/tech/20220603 How static linking works on Linux.md new file mode 100644 index 0000000000..00136f9851 --- /dev/null +++ b/sources/tech/20220603 How static linking works on Linux.md @@ -0,0 +1,217 @@ +[#]: subject: "How static linking works on Linux" +[#]: via: "https://opensource.com/article/22/6/static-linking-linux" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How static linking works on Linux +====== +Learn how to combine multiple C object files into a single executable with static libraries. + +![Woman using laptop concentrating][1] + +Image by Mapbox Uncharted ERG, [CC-BY 3.0 US][2] + +Code for applications written using C usually has multiple source files, but ultimately you will need to compile them into a single executable. + +You can do this in two ways: by creating a static library or a dynamic library (also called a shared library). These two types of libraries vary in terms of how they are created and linked. Your choice of which to use depends on your use case. + +In a [previous article][3], I demonstrated how to create a dynamically linked executable, which is the more commonly used method. In this article, I explain how to create a statically linked executable. + +### Using a linker with static libraries + +A linker is a command that combines several pieces of a program together and reorganizes the memory allocation for them. + +The functions of a linker include: + +* Integrating all the pieces of a program +* Figuring out a new memory organization so that all the pieces fit together +* Reviving addresses so that the program can run under the new memory organization +* Resolving symbolic references + +As a result of all these linker functionalities, a runnable program called an executable is created. + +Static libraries are created by copying all necessary library modules used in a program into the final executable image. The linker links static libraries as a last step in the compilation process. An executable is created by resolving external references, combining the library routines with program code. + +### Create the object files + +Here's an example of a static library, along with the linking process. First, create the header file `mymath.h` with these function signatures: + +``` +int add(int a, int b); +int sub(int a, int b); +int mult(int a, int b); +int divi(int a, int b); +``` + +Create `add.c`, `sub.c` , `mult.c` and `divi.c` with these function definitions: + +``` +// add.c +int add(int a, int b){ +return (a+b); +} + +//sub.c +int sub(int a, int b){ +return (a-b); +} + +//mult.c +int mult(int a, int b){ +return (a*b); +} + +//divi.c +int divi(int a, int b){ +return (a/b); +} +``` + +Now generate object files `add.o`, `sub.o`, `mult.o`, and `divi.o` using GCC: + +``` +$ gcc -c add.c sub.c mult.c divi.c +``` + +The `-c` option skips the linking step and creates only object files. + +Create a static library called `libmymath.a`, then remove the object files, as they're no longer required. (Note that using a `trash` [command][4] is safer than `rm`.) + +``` +$ ar rs libmymath.a add.o sub.o mult.o divi.o +$ trash *.o +$ ls +add.c  divi.c  libmymath.a  mult.c  mymath.h  sub.c +``` + +You have now created a simple example math library called `libmymath`, which you can use in C code. There are, of course, very complex C libraries out there, and this is the process their developers use to generate the final product that you and I install for use in C code. + +Next, use your math library in some custom code and then link it. + +### Create a statically linked application + +Suppose you've written a command for mathematics. Create a file called `mathDemo.c` and paste this code into it: + +``` +#include +#include +#include + +int main() +{ +  int x, y; +  printf("Enter two numbers\n"); +  scanf("%d%d",&x,&y); +  +  printf("\n%d + %d = %d", x, y, add(x, y)); +  printf("\n%d - %d = %d", x, y, sub(x, y)); +  printf("\n%d * %d = %d", x, y, mult(x, y)); + +  if(y==0){ +    printf("\nDenominator is zero so can't perform division\n"); +      exit(0); +  }else{ +      printf("\n%d / %d = %d\n", x, y, divi(x, y)); +      return 0; +  } +} +``` + +Notice that the first line is an `include` statement referencing, by name, your own `libmymath` library. + +Create an object file called `mathDemo.o` for `mathDemo.c` : + +``` +$ gcc -I . -c mathDemo.c +``` + +The `-I` option tells GCC to search for header files listed after it. In this case, you're specifying the current directory, represented by a single dot (`.` ). + +Link `mathDemo.o` with `libmymath.a` to create the final executable. There are two ways to express this to GCC. + +You can point to the files: + +``` +$ gcc -static -o mathDemo mathDemo.o libmymath.a +``` + +Alternately, you can specify the library path along with the library name: + +``` +$ gcc -static -o mathDemo -L . mathDemo.o -lmymath +``` + +In the latter example, the `-lmymath` option tells the linker to link the object files present in the `libmymath.a` with the object file `mathDemo.o` to create the final executable. The `-L` option directs the linker to look for libraries in the following argument (similar to what you would do with `-I` ). + +### Analyzing the result + +Confirm that it's statically linked using the `file` command: + +``` +$ file mathDemo +mathDemo: ELF 64-bit LSB executable, x86-64... +statically linked, with debug_info, not stripped +``` + +Using the `ldd` command, you can see that the executable is not dynamically linked: + +``` +$ ldd ./mathDemo +        not a dynamic executable +``` + +You can also check the size of the `mathDemo` executable: + +``` +$ du -h ./mathDemo +932K    ./mathDemo +``` + +In the example from my [previous article][5], the dynamic executable took up just 24K. + +Run the command to see it work: + +``` +$ ./mathDemo +Enter two numbers +10 +5 + +10 + 5 = 15 +10 - 5 = 5 +10 * 5 = 50 +10 / 5 = 2 +``` + +Looks good! + +### When to use static linking + +Dynamically linked executables are generally preferred over statically linked executables because dynamic linking keeps an application's components modular. Should a library receive a critical security update, it can be easily patched because it exists outside of the applications that use it. + +When you use static linking, a library's code gets "hidden" within the executable you create, meaning the only way to patch it is to re-compile and re-release a new executable every time a library gets an update—and you have better things to do with your time, trust me. + +However, static linking is a reasonable option if the code of a library exists either in the same code base as the executable using it or in specialized embedded devices that are expected to receive no updates. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/static-linking-linux + +作者:[Jayashree Huttanagoudar][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/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png +[2]: https://creativecommons.org/licenses/by/3.0/us/ +[3]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux +[4]: https://www.redhat.com/sysadmin/recover-file-deletion-linux +[5]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux From 469cf7b961d686667e5025e2a014152fb5117232 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Jun 2022 17:14:43 +0800 Subject: [PATCH 020/231] A --- ...hes Firefox to Favor Google Chrome as the Default Browser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md b/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md index b36f57c2dd..fc99eb9f7d 100644 --- a/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md +++ b/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/linux-lite-6-0-release/" [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From c8b2aa9e1682170b726b2af0e0785b17b7a01da1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 3 Jun 2022 18:13:25 +0800 Subject: [PATCH 021/231] ONE @wxy https://linux.cn/article-14669-1.html --- ...or Google Chrome as the Default Browser.md | 134 ++++++++++++++++++ ...or Google Chrome as the Default Browser.md | 133 ----------------- 2 files changed, 134 insertions(+), 133 deletions(-) create mode 100644 published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md delete mode 100644 sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md diff --git a/published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md b/published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md new file mode 100644 index 0000000000..85c9e25716 --- /dev/null +++ b/published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md @@ -0,0 +1,134 @@ +[#]: subject: "Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser" +[#]: via: "https://news.itsfoss.com/linux-lite-6-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14669-1.html" + +Linux Lite 6.0 发布:弃用 Firefox,默认浏览器使用 Chrome +====== + +> Linux Lite 6.0 是一个有趣的版本,有一个新的默认浏览器,改进了无障碍性、新的主题、新的系统监视器等等改进。 + +![linux lite][1] + +Linux Lite,是 [最好的类 Windows 发行版][2] 之一,刚刚发布了它的最新版本 6.0。 + +Linux Lite 6.0 基于 [Ubuntu 22.04 LTS][3],内置了 [Linux 内核 5.15 LTS][4]。 + +这次升级包含了相当多的令人兴奋的新功能,包括一个新的窗口主题和无障碍技术。 + +让我们深入了解一下新的内容! + +### Linux Lite 6.0 概述 + +Linux Lite 6.0 包括许多变化,包括: + +* 更新了软件 +* 新的窗口主题 +* 新的屏幕键盘 +* 屏幕阅读器 +* 屏幕放大镜 +* Chrome 取代 Firefox 成为默认浏览器 +* 新的 GRUB 菜单 + +#### 无障碍性的改进 + +![Linux Lite 6.0][5] + +Linux Lite 通过这一改变已经步入了大联盟。无障碍性,在历史上一直是 GNOME 特有的优势,它现在有了很大的改进。这主要体现在三个不同的工具上:一个屏幕键盘,一个屏幕阅读器(Orca),和一个屏幕放大镜。 + +屏幕键盘对于许多触摸屏用户和没有键盘的用户来说是相当有用的。另一方面,屏幕阅读器对于视障用户来说将是完美的。 + +![Linux Lite 6.0][6] + +最后一项无障碍改进屏幕放大镜,也是针对与屏幕阅读器相同的受众。然而,它与传统的桌面理念相当吻合,所以众多用户可能更青睐它,而不是屏幕阅读器。 + +这些无障碍性的改进有助于 Linux Lite 6.0 成为一个主流的选择。 + +#### 更新的软件 + +与几乎所有的发行版升级一样,Linux Lite 6.0 包括更新的软件。最值得注意的是最新的 LibreOffice 稳定版 7.2.6。 + +其他更新包括 VLC 3.0.16、Thunderbird 91.7、Chrome 100、GIMP 2.10.30 等等。 + +虽然本身不一定是大规模的升级,但它表明了所包含的 LibreOffice 版本的重大变化。 + +以前,由于提供了更多的稳定性,Linux Lite 停留在更多老版本上。然而,Linux Lite 的开发者现在觉得使用最新的稳定版本也很放心,因为测试新 LibreOffice 版本的人比以往任何时候都多。 + +#### 新的窗口主题 + +![Linux Lite 6.0][7] + +Linux Lite 6.0 引入了一个新的窗口主题,叫做 “Materia”。那些主题社区的人可能会对它相当熟悉,因为它已经被移植到几乎所有的平台。这些平台包括 GTK 2、3 和 4、GNOME Shell、Budgie、Cinnamon、MATE、Unity、Xfce、LightDM、GDM,甚至是 Chrome 浏览器。 + +改用 Materia 应该会让 ChromeOS 用户感觉界面很熟悉,因为它是基于谷歌开发的 Material UI 的。 + +#### 谷歌 Chrome 浏览器成为新的默认浏览器 + +![Linux Lite 6.0][8] + +随着 Ubuntu 将其 Firefox 版本转移到一个 Snap 应用中,Linux Lite 已经完全抛弃了 Firefox,转而使用谷歌 Chrome。虽然我不能说我是这个变化的粉丝,但它确实有意义,特别是对于一个针对 Windows 用户的发行版来说。 + +虽然你可以自由地安装任何你喜欢的东西,但无论如何,Chrome 是大多数用户的流行选择。 + +此外,如果你想在访问文件之前扫描文件,Linux Lite 的开发者在 Chrome 中包含了一个 Virus Total 扫描器扩展(默认是禁用的)。 + +注意,你可以从 Linux Lite 的软件中心安装 Firefox,但它是 Snap 版本的。 + +#### 系统监控中心替代了任务管理器 + +![Linux Lite 6.0][9] + +Linux Lite 6.0 现在打包了 [系统监控中心][10]System Monitoring Center 来替代任务管理器和进程查看器。 + +请注意,Linux Lite 的开发者复刻了这个应用程序,在系统标签中提供了关于发行版的具体信息。 + +它提供了所有关注你的资源的必要功能。 + +### 其他改进 + +除了基本的变化之外,Linux Lite 6.0 还包括对 GRUB 菜单的更新、推送紧急修复包的能力、新的 whisker 菜单,以及更多的调整。 + +![Linux Lite 6.0][11] + +正如你所注意到的,新的 GRUB 菜单还包括关闭和重启,同时删除了内存测试选项。 + +你可以在其 [官方公告帖子][12] 中了解更多的技术细节。 + +### 总结 + +Linux Lite 6.0 看起来是一个可靠的版本,特别是对于那些等待无障碍功能和新的视觉感受的人。 + +如果你想自己尝试一下,ISO 文件可以从官方下载页面获得。 + +> **[下载Linux Lite][13]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-lite-6-0-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-6.jpg +[2]: https://itsfoss.com/windows-like-linux-distributions/ +[3]: https://news.itsfoss.com/ubuntu-22-04-release/ +[4]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/Screen-Reader-Linux-Lite-6.0.png +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-accessibility.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Materia-Linux-Lite-6.0.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Chrome-Linux-Lite-6.0.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/system-monitoring-center-linux-lite.png +[10]: https://itsfoss.com/system-monitoring-center/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/06/grub-linux-lite-6.png +[12]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-6-0-final-released/ +[13]: https://www.linuxliteos.com/download.php#current diff --git a/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md b/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md deleted file mode 100644 index fc99eb9f7d..0000000000 --- a/sources/news/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: subject: "Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser" -[#]: via: "https://news.itsfoss.com/linux-lite-6-0-release/" -[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lkxed" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser -====== -Linux Lite 6.0 is an interesting release with a new default browser, accessibility improvements, new theme, a new system monitor, and more refinements. - -![linux lite][1] - -Linux Lite, one of the [best Windows-like distros][2], has just released its latest version, 6.0. - -Linux Lite 6.0 is based on [Ubuntu 22.04 LTS][3] and includes [Linux Kernel 5.15][4] LTS out of the box. - -This upgrade packs in a considerable number of exciting new features, including a new window theme and assistive technologies. - -Let’s dive into what’s new! - -### Linux Lite 6.0: Overview - -Linux Lite 6.0 includes numerous changes, including: - -* Updated software -* New window theme -* New on-screen keyboard -* Screen reader -* Screen magnifier -* Firefox replaced by Chrome as the default browser -* New grub menu - -#### Accessibility Improvements - -![Linux Lite 6.0][5] - -Linux Lite has stepped up into the big leagues with this change. Accessibility, which has historically been a GNOME-specific advantage, has greatly improved. This comes in three different tools: An on-screen keyboard, a screen reader (Orca), and a screen magnifier. - -The on-screen keyboard will be pretty useful for many touchscreen users and those without a keyboard. On the other hand, the screen reader will be perfect for sight-impaired users. - -![Linux Lite 6.0][6] - -The final accessibility improvement, the screen magnifier, also targets the same audience as the screen reader. However, it is quite a bit more aligned with the traditional desktop philosophy, so it may be preferred by numerous users over the screen reader. - -These accessibility improvements help bring Linux Lite 6.0 as a mainstream alternative. - -#### Updated Software - -As with almost all distribution upgrades, Linux Lite 6.0 includes updated software. Most notable is the latest stable LibreOffice version, 7.2.6. - -Other updates include VLC 3.0.16, Thunderbird 91.7, Chrome 100, GIMP 2.10.30, and more. - -Although not necessarily a massive upgrade in itself, it demonstrates a significant change in the included LibreOffice version. - -Previously, Linux Lite was held back with an older release due to the increased stability offered. However, the Linux Lite developers now feel comfortable using the latest stable release, with more people testing new LibreOffice versions than ever. - -#### New Window Theme - -![Linux Lite 6.0][7] - -Linux Lite 6.0 introduces a new window theme called ‘**Materia**.’ Those in the theming community will probably be quite familiar with it, as it has been ported to almost every platform. These include GTK 2, 3, and 4, GNOME Shell, Budgie, Cinnamon, MATE, Unity, Xfce, LightDM, GDM, and even Google Chrome. - -The switch to Materia should bring a familiar interface to ChromeOS users, as it is based on the Material UI that Google develops. - -#### Google Chrome is the new default browser - -![Linux Lite 6.0][8] - -With Ubuntu moving its Firefox version to a snap app, Linux Lite has completely ditched Firefox for Google Chrome. While I can’t say I’m a fan of this change, it does make sense, especially for a distro targeting Windows users. - -While you are free to install anything you like, Chrome is a popular option for most users, no matter what. - -Furthermore, Linux Lite developers include a Virus Total scanner extension (disabled by default) with Chrome if you want to scan files before accessing them. - -Note that you can install Firefox from the Linux Lite’s software center, but it will install the snap package. - -#### System Monitor Center as a replacement for Task Manager - -![Linux Lite 6.0][9] - -Linux Lite 6.0 now comes packed with the [System Monitoring Center][10] to replace the task manager and the process viewer. - -Note that Linux Lite developers have forked the application to provide specific information regarding the distribution in the system tab. - -It offers all the essential functionalities to help you keep an eye on your resources. - -### Other Improvements - -In addition to the fundamental changes, Linux Lite 6.0 involves updates to the grub menu, the ability to push emergency fixes to packages, a new whisker menu, and many more tweaks. - -![Linux Lite 6.0][11] - -As you can notice, the new grub menu also includes shut down and reboot while removing the memtest option. - -You can explore more technical details in its [official announcement post][12]. - -### Wrapping Up - -Linux Lite 6.0 appears to be a solid release, especially for those waiting for accessibility features and visual refreshments. - -The ISO file is available from the official download page if you want to try it out for yourself. - -[Download Linux Lite][13] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-lite-6-0-release/ - -作者:[Jacob Crume][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/jacob/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-6.jpg -[2]: https://itsfoss.com/windows-like-linux-distributions/ -[3]: https://news.itsfoss.com/ubuntu-22-04-release/ -[4]: https://news.itsfoss.com/linux-kernel-5-15-release/ -[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/Screen-Reader-Linux-Lite-6.0.png -[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-accessibility.png -[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Materia-Linux-Lite-6.0.png -[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Chrome-Linux-Lite-6.0.png -[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/system-monitoring-center-linux-lite.png -[10]: https://itsfoss.com/system-monitoring-center/ -[11]: https://news.itsfoss.com/wp-content/uploads/2022/06/grub-linux-lite-6.png -[12]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-6-0-final-released/ -[13]: https://www.linuxliteos.com/download.php#current From b0b626a9281459f80225a2161d9c88b1b8087f88 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 4 Jun 2022 00:35:16 +0800 Subject: [PATCH 022/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20Red=20Hat=20Tests=20The=20-NVK-=20Nouveau?= =?UTF-8?q?=20Open=20Source=20Vulkan=20Driver.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-NVK- Nouveau Open Source Vulkan Driver.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md diff --git a/sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md b/sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md new file mode 100644 index 0000000000..413df8c877 --- /dev/null +++ b/sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md @@ -0,0 +1,38 @@ +[#]: subject: "Red Hat Tests The “NVK” Nouveau Open Source Vulkan Driver" +[#]: via: "https://www.opensourceforu.com/2022/06/red-hat-tests-the-nvk-nouveau-open-source-vulkan-driver/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Red Hat Tests The “NVK” Nouveau Open Source Vulkan Driver +====== +![red-hat][1] + +Following the recent news about Nouveau reorganising code to allow their shader compiler to be used outside of Nouveau Gallium3D, Red Hat’s Karol Herbst, a longtime Nouveau developer, has been posting patches for his new “NVK” Nouveau Vulkan driver effort. + +NVK is a brand-new, yet-to-be-merged open source Vulkan driver for NVIDIA graphics hardware. This is a Mesa-based driver that is currently being worked on primarily by Karol Herbst, who joined Red Hat several years ago and has since continued to work heavily on Mesa, including in the areas of OpenCL compute and other features. Aside from NVK, he has recently begun working on Rusticl, a Rust-based OpenCL implementation for Mesa. + +Jason Ekstrand of Collabora, as well as David Airlie of Red Hat, have been making early contributions to NVK. NVK can at least run vulkaninfo, but it is still a work in progress, with the initial code only being committed two weeks ago. + +Aside from performance issues with newer generations of NVIDIA graphics cards, the lack of an open source NVIDIA Vulkan driver has been a major roadblock, given that most Linux games these days are Vulkan-native, and even Steam Play is mostly Vulkan with VKD3D-Proton/DXVK. + +This NVK driver will most likely be updated in the future to support the open source NVIDIA kernel driver as an alternative to the Nouveau DRM driver. The original NVK open source Vulkan driver code is available on [Nouveau’s GitLab repository][2]. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/red-hat-tests-the-nvk-nouveau-open-source-vulkan-driver/ + +作者:[Laveesh Kocher][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/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/red-hat-e1654256924226.jpg +[2]: https://gitlab.freedesktop.org/nouveau/mesa/-/commits/nouveau/vk/ From 1c9f4e44aec6db84ce7a28fc146fbc1d00668116 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 4 Jun 2022 10:54:25 +0800 Subject: [PATCH 023/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20Kubecost=20Releases=20Open=20Source=20Proje?= =?UTF-8?q?ct=20To=20Rein=20in=20K8s=20Costs.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...pen Source Project To Rein in K8s Costs.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md diff --git a/sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md b/sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md new file mode 100644 index 0000000000..7bdbaf04df --- /dev/null +++ b/sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md @@ -0,0 +1,41 @@ +[#]: subject: "Kubecost Releases Open Source Project To Rein in K8s Costs" +[#]: via: "https://www.opensourceforu.com/2022/06/kubecost-releases-open-source-project-to-rein-in-k8s-costs/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kubecost Releases Open Source Project To Rein in K8s Costs +====== +![Hybrid-Cloud-Optimization][1] + +Kubecost’s tool for monitoring and optimizing spending on Kubernetes clusters has been released as an open source project. OpenCost is now available as open source software, according to Alex Thilen, head of business development at Kubecost, and the company has already submitted it to the Cloud Native Computing Foundation (CNCF) for approval as a sandbox-level project. Adobe, Armory, Amazon Web Services (AWS), D2iQ, Google, Mincurv, New Relic, and SUSE are among the project’s founding members, in addition to Kubecost. + +Stackwatch created Kubecost in the beginning. Kubecost later raised $25 million to develop tools and applications on top of what is now OpenCost. Although OpenCost is designed to run within a Kubernetes cluster, no data is sent outside of the cluster without user permission. It can collect data in real-time after only a few minutes of installation. + +The primary issue addressed by OpenCost is overprovisioning of Kubernetes infrastructure. Many developers will overprovision infrastructure to ensure maximum application performance. The problem is that much of that infrastructure will go unused; costs will rise steadily as each new Kubernetes cluster is provisioned. According to Kubecost, organisations can cut Kubernetes-related cloud spending by 60–80 percent without sacrificing application performance. + +Of course, many enterprise IT departments will have signed contracts with cloud service providers that guarantee discounted pricing if a certain number of workloads are run per month. To reduce overall costs, many IT organisations prefer to continuously monitor pricing offered by multiple cloud service providers. Regardless of approach, interest in cost containment is growing as the percentage of workloads running on cloud platforms grows. + +As the percentage of workloads running on Kubernetes clusters grows, it is more likely that those platforms will be managed centrally by an IT operations team. These teams are graded based on how well they optimise cloud infrastructure usage. These teams must also demonstrate to development teams how much Kubernetes infrastructure is consumed by individual applications. + +According to Thilen, changing economic conditions mean that there is a lot more emphasis on cost control today than there was just a few months ago. Finance teams, in particular, are asking tougher questions about IT spending than they did at the start of the COVID-19 pandemic, when the primary focus was shifting as many workloads as possible to the cloud. + +According to Thilen, the primary issue that organisations face in controlling cloud costs is a lack of visibility, which OpenCost can provide. It’s unclear when Kubernetes cost controls will be ubiquitously included in every management tool, but the existence of OpenCost suggests that it’s now a matter of when rather than if those tools will become much more accessible. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/kubecost-releases-open-source-project-to-rein-in-k8s-costs/ + +作者:[Laveesh Kocher][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/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/Hybrid-Cloud-Optimization-e1654241448205.png From d436650669a1c485aa27fd6bf7aff7491dc94c06 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 4 Jun 2022 10:56:57 +0800 Subject: [PATCH 024/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220604=20KDE=20Plasma=205.25-=20Top=20New=20Features?= =?UTF-8?q?=20and=20Release=20Details.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5- Top New Features and Release Details.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md diff --git a/sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md b/sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md new file mode 100644 index 0000000000..a5310fc224 --- /dev/null +++ b/sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md @@ -0,0 +1,147 @@ +[#]: subject: "KDE Plasma 5.25: Top New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/06/kde-plasma-5-25/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma 5.25: Top New Features and Release Details +====== +We will give you the feature summary of the KDE Plasma 5.25 desktop environment (upcoming). + +KDE Plasma 5.25 is the 27th version of KDE Plasma desktop, not an LTS release. This release is followed by the prior [5.24 LTS][1], released in February. KDE Plasma 5.25 brings several exciting updates on the desktop UI, polished applets, widgets, a good set of gesture updates for touch-based devices and a massive list of bug fixes. Plasma 5.25 is based on Qt 5.15.2 and KDE Frameworks 5.94. + +KDE Plasma releases on June 14, 2022, but before that following milestones are to be met: + +* Soft feature freeze: May 5, 2022 (Completed) +* Beta: May 19, 2022 (completed) +* Final release: June 14, 2022 + +The list of bug fixes and features is around 400+, and it’s challenging to cover them in a single article. We filtered out in this article some of the essential and visual changes which are more impactful straightaway to the general user base. + +### KDE Plasma 5.25 – Top New Features + +#### Plasma Workspace & Desktop + +Perhaps the most important visual change in KDE Plasma 5.25 is accent colour change based on the Wallpaper. As reported earlier, this change gives the final touch to the entire accent colour functionality and makes it complete with dynamic colour, custom colour and pre-sets. The option is available in the Appearance module. ([MR#1325)][2] + +![KDE Plasma 5.25 - Accent Colour Change Based on wallpaper][3] + +In addition, the accent colour change to the title bar was [also implemented][4] in the Breeze Classic theme and made it more consistent across the desktop. + +Another exciting change that KDE Plasma 5.25 brings is an option for Themes to make the Panel float. When selected, the Panel detaches itself from the bottom of the screen with rounded corners and gives a floating feeling. The option is available in the additional settings in Edit Panel mode. Here’s how it looks. ([MR#714)][5] + +![Floating Panel in Plasma 5.25][6] + +Here’s a quick video we prepared for you to show the above two features in action. + +![KDE Plasma - Dynamic Accent Colour and Floating Panel Demo][7] + +In addition to that, the power profiles menu in the system tray now has [icons][8] with their names in the [tooltip][9]. + +The login and logout screen see a [small UI change][10] to display avatar and profile name with longer user names. + +Also, the spacing between the avatar icon and name with the logout screen action buttons is [increased][11] to give a more consistent look. + +A fix was made to the Plasma Desktop to prevent widgets from [retaining position][12]when resolution changes back from fullscreen gaming. The widgets remember their position for respective resolutions. + +The plasma Workspace module [reverts][13]to the lock screen behaviour on mouse move, which was removed accidentally earlier. + +The Digital Clock “Copy to Clipboard” menu is now [more clean][14] with the removal of duplicate items and separate entries when seconds are enabled. + +#### KWin Updates + +KWin introduces an [option to hide][15] minimised windows in KDE Plasma 5.25. In addition to that, the desktop grid effect is [completely replaced][16] with the QML Version. + +Furthermore, it is now possible to switch between display specific resolutions which are not visible to the operating system in Wayland. The change adds [libxcvt][17] dependency in Kwin, and details of this change can be found [here][18]. + +With this release, the switching between the dark and light mode is more smooth and animated thanks to this [MR][19], inspired by GNOME. It was not smooth earlier and now looks more professional behaviour. + +#### Changes in Discover + +The application page of Discover is now complete with [more focused details][20] at the top with Application metadata and images. The spacing of the app name, ratings and developer with the image at the header section with the summary in the middle. And rest at the bottom. Here’s a side by side comparison of the earlier version with 5.25. + +![The app page gives more clarity in Plasma 5.25][21] + +One tiny yet impactful change in Discover related to Flatpak apps. Discover now [shows][22] a message with an action button to clean Flatpak data for uninstalled apps. + +![Message to clear the app data (Image credit: KDE Team)][23] + +Moreover, Discover now [shows the required permissions][24]of the Flatpak applications before you install them. In addition, if you are planning to install proprietary software, you get a warning message saying the potential consequences of using those (such as Microsoft Teams). + +#### Application and Applet Changes + +The System Monitor (KSystemStats) shows new [information about your window system][25] whether you are running X11 or Wayland. This should also display on the overview screen of the KSysGuard. + +The Open With Dialog of XGD Portal sees a [complete UI rework][26]. The top section label is merged into one single information line for better clarity. Also, the search field is now visible for all modes, and the Show More button is moved up beside Search with better clarity. You can look at the below image (Credit KDE Team) for this change. + +The Plasma Applet for NetworkManager now [shows][27] the WiFi frequency connection details to help distinguish which frequency you are connected to in the same SSID (same Wi-Fi Router). It’s really helpful if both the band have the same Wifi Accent point name and you cannot distinguish between 4G or 5G. + +The cuttlefish icon viewer now helps you [open the file path via the file manager][28] directly of the selected icon. + +Plasma desktop now gives a [more organised view][29]in “Recent Documents” with the ability to show “non-file” items such as RDP or remote connections. + +Moreover, the spell checker module in KRunner now [detects][30] the search language and gives you results. + +![KRunner spell check for non-English (image credit: KDE team)][31] + +When you run into an error, the KInfocenter now gives you [more information][32] about the error. The new design gives you what is the error, why it happened, whether you can fix it by yourself and how to report it to the devs. This is a nifty change that has a more significant impact. Here’s a side by side view of the change. + +![More help on the error on the way (Image credit: KDE Team)][33] + +### Closing Notes + +Along with the above changes, this release improves several gestures for touch devices and a massive list of performance and bug fixes (counting 150+), which will enhance the KDE Plasma 5.25 experience for all of its users. + +If you want to give a hand on testing, read the [contribution guide][34], and you can try the [unstable edition of KDE Neon][35] until the BETA release. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/kde-plasma-5-25/ + +作者:[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://www.debugpoint.com/2022/03/kde-plasma-5-24-review/ +[2]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Plasma-5.25-Accent-Colour-Change-Based-on-wallpaper-1024x611.jpg +[4]: https://invent.kde.org/plasma/breeze/-/merge_requests/182 +[5]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/714 +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Panel-in-Plasma-5.25.jpg +[7]: https://youtu.be/npfHwMLXXHs +[8]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1585 +[9]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1668 +[10]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1654 +[11]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1647 +[12]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/608 +[13]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1707 +[14]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1693 +[15]: https://invent.kde.org/plasma/kwin/-/merge_requests/2341 +[16]: https://invent.kde.org/plasma/kwin/-/merge_requests/2327 +[17]: https://gitlab.freedesktop.org/xorg/lib/libxcvt +[18]: https://bugs.kde.org/448398 +[19]: https://invent.kde.org/plasma/kwin/-/merge_requests/2088 +[20]: https://invent.kde.org/plasma/discover/-/merge_requests/246 +[21]: https://www.debugpoint.com/wp-content/uploads/2022/05/App-page-gives-more-clarity-in-Plasma-5.25.jpg +[22]: https://invent.kde.org/plasma/discover/-/merge_requests/297 +[23]: https://www.debugpoint.com/wp-content/uploads/2022/05/Message-to-clear-the-app-data.jpg +[24]: https://invent.kde.org/plasma/discover/-/merge_requests/282 +[25]: https://invent.kde.org/plasma/ksystemstats/-/merge_requests/34 +[26]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/94 +[27]: https://invent.kde.org/plasma/plasma-nm/-/merge_requests/112 +[28]: https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/32 +[29]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/551 +[30]: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/122 +[31]: https://www.debugpoint.com/wp-content/uploads/2022/05/KRunner-spell-check-for-non-english.jpg +[32]: https://invent.kde.org/plasma/kinfocenter/-/merge_requests/90 +[33]: https://www.debugpoint.com/wp-content/uploads/2022/05/More-help-on-the-error-on-the-way.jpg +[34]: https://community.kde.org/Get_Involved +[35]: https://neon.kde.org/download From 47c8c5dfdd3a2bd92abaa9b0d7338aac3068f783 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 4 Jun 2022 10:59:13 +0800 Subject: [PATCH 025/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220603=20Simplifying=20Cloud=20Native=20Development?= =?UTF-8?q?=20with=20Skaffold.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Cloud Native Development with Skaffold.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md diff --git a/sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md b/sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md new file mode 100644 index 0000000000..c488316426 --- /dev/null +++ b/sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md @@ -0,0 +1,91 @@ +[#]: subject: "Simplifying Cloud Native Development with Skaffold" +[#]: via: "https://www.opensourceforu.com/2022/06/simplifying-cloud-native-development-with-skaffold/" +[#]: author: "Romin Irani https://www.opensourceforu.com/author/romin-irani/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Simplifying Cloud Native Development with Skaffold +====== +The successful rollout of an application entails several essential steps. If the developer misses any of these in the development stage, it could make the application susceptible to problems later, leading to rework and wastage of the developer’s time. Skaffold automates these steps and assists developers in a hassle-free rollout of their applications. + +![developer-working-on-Cloud-computing][1] + +In a developer’s workflow, a wide variety of changes are first made to the code. Then container images are built, which are pushed to a registry till the application is eventually deployed. This entire process can entail a lot of inefficiencies. This is where Skaffold comes in – it helps to manage the developer workflow. + +### Understanding the developer workflow + +This is what the developer workflow looks like. + +* Code changes: The first step simply involves changing the code. While you are working on your code, you will simply make changes to it as per your own requirements and save it. +* Containerise: Once you are done making changes to your code, you will containerise it to see it actually work. You may use Docker and a build command to make a sample Docker file, then use that file to build the Docker image, and tag that image with a specific version. +* Push: After you have containerised the image, you are supposed to push it into a registry. +* Deploy: If you have got a Kubernetes deployment YAML, you can apply it to the particular environment of the Kubernetes cluster that you are pointing to, using the kubectl command that you can see in Figure 1. Once that is done, your application will be deployed. + +![Figure 1: kubectl command is initiated][2] + +* Connect and view logs: The next thing is to check if everything is working or not. So you will connect to that particular cluster, check the pod forwarding, and then stream the logs to see if everything is working well or not. + +All in all, you will have to keep repeating the same steps as per the number of changes you make and the number of changes you want to look at. So we now need a tool like Skaffold that can detect the activities that are common in nature, and automate and take care of these behind the scenes. Let us understand this from a developer workflow perspective. + +### Automating common activities + +In Figure 2, you can see some key activities marked in green that developers care about – things like coding and configuring the application to make it run. Marked in red are the things that they hope will just get done automatically by a tool to avoid the repetitive work that they are doing as part of the developer workflow. Skaffold allows developers to work on what they care about and takes care of the rest of the things. + +![Figure 2: Steps in the development process][3] + +Skaffold’s end-to-end development pipelines are as follows. + +* $ skaffold dev: Whenever you make a change to your code, the dev cycle automatically gets activated. +* $ skaffold run: Run allows you to run your particular application. +* $ skaffold debug: As the name suggests, debug helps in debugging a particular application that you want as a part of this process. + +Once Skaffold has sensed the changes being made to the code and to the application’s configuration, it will perform all the steps — building the code, filling the containers, pushing it to the registry, applying any configuration deployment and bringing the pods up on its own. It will then stream the logs to you so you can actually see that. It is capable of working with various clusters and registries. + +### A demo + +Here we have got a very straightforward go file (Figure 3). This file contains one main file and one main function, and it is printing out ‘Hello Skaffold’. + +![Figure 3: main.go][4] + +In the same folder, we have got a Dockerfile that you can see in Figure 4. This is a multi-staged Dockerfile. We are essentially just creating an executable for this file in the app, and in the next step we are going to set the default command to run when the container is up, which will in turn generate the output file. This is from a build perspective, as Skaffold really knows what it is supposed to build. + +![Figure 4: Folder consisting of Dockerfile][5] + +In the pod.yaml file (Figure 5), it is just stated that the image that is needed to be created is Skaffold-example. The Skaffold.yaml file will also show you the image that is needed to be built along with the deployment steps. All these steps will let Skaffold pretty much understand and detect the configuration. + +![Figure 5: k8s-pod.yaml][6] + +In Figure 6, you can see that in the terminal inside the demo folder we have the Skaffold.yaml files, the k8s-pod.yaml and the main.go. Since the Skaffold tool is already installed as part of Google Cloud Shell, on typing $skaffold config list you can see (Figure 7) that the current cube context is set to that demo cluster, and the default-repo is also set to the Google container registry. + +![Figure 6: Inside the Cloud Shell terminal][7] + +Now, we have a folder in which we have got our configuration file. All we need to do is run the developer end-to-end pipeline in Skaffold by using the $skaffold dev command. It will build everything up for the first time, and will begin with the deployment process. It will then provide you the relevant output and will wait for the code changes as well. + +![Figure 7: ‘$skaffold config list’ command is applied in the terminal][8] + +Skaffold is just like any other command-line tool that can be deployed on your machine or any other server that you desire; it comes preconfigured with Google Cloud Shell. All in all, Skaffold can automate a lot of steps that you would need to go through manually otherwise. Automating these steps will not only save time so that you can focus on other important things, but also make the application less prone to unwanted bugs and errors. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/simplifying-cloud-native-development-with-skaffold/ + +作者:[Romin Irani][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/romin-irani/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/developer-working-on-Cloud-computing.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-kubectl-command-initiated.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Steps-in-the-development-process.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-main.go_.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Folder-consisting-of-Dockerfile-1.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-k8s-pod.yaml_-2.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Inside-the-Cloud-Shell-terminal.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-‘skaffold-config-list-command-is-applied-in-the-terminal-1.jpg From f3ad7486ba1142b9febcbccac4be74d5caaf69c5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Jun 2022 11:16:07 +0800 Subject: [PATCH 026/231] RP @geekpi https://linux.cn/article-14671-1.html --- ...Linux App to Verify ISO and Other Files.md | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) rename {translated/tech => published}/20220524 Collision- Linux App to Verify ISO and Other Files.md (66%) diff --git a/translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md b/published/20220524 Collision- Linux App to Verify ISO and Other Files.md similarity index 66% rename from translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md rename to published/20220524 Collision- Linux App to Verify ISO and Other Files.md index 7d59ad4431..a60f32620a 100644 --- a/translated/tech/20220524 Collision- Linux App to Verify ISO and Other Files.md +++ b/published/20220524 Collision- Linux App to Verify ISO and Other Files.md @@ -3,21 +3,24 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14671-1.html" Collision:用于验证 ISO 和其他文件的 Linux 应用 ====== -本教程概述了 Collision 的功能和使用指南。它是一个基于 GUI 且易于使用的程序,可让你使用加密哈希函数验证文件。 + +![](https://img.linux.net.cn/data/attachment/album/202206/04/111427jzkwsocv4oug3vso.jpg) + +> 本教程概述了 Collision 的功能和使用指南。它是一个基于 GUI 且易于使用的程序,可让你使用加密哈希函数验证文件。 ### 为什么需要验证文件? -每个人每天都通过 Internet 下载文件。但许多用户从不费心去验证他们的完整性或真实性。这意味着该文件是否合法且未被任何恶意代码篡改。 +人们每天都通过互联网下载文件。但许多用户从不费心去验证他们的完整性或真实性。这意味着不知道该文件是否合法且未被任何恶意代码篡改。 -以作为标准安装镜像的 [Linux 发行版][1]的 ISO 文件为例。所有流行的发行版制造商还提供哈希文件和 ISO 文件。使用该文件,你可以轻松比较下载文件的哈希值。你可以放心,你的文件是正确的并且没有以任何方式损坏。 +以作为标准安装镜像的 [Linux 发行版][1] 的 ISO 文件为例。所有流行的发行版制造商在 ISO 文件还提供哈希文件。使用该文件,你可以轻松比较下载文件的哈希值。让你可以放心你的文件是正确的并且没有以任何方式损坏。 -此外,如果你通过不稳定的互联网连接下载大文件,该文件可能会损坏。在这些情况下,它也有助于验证。 +此外,如果你通过不稳定的互联网连接下载大文件,该文件可能会损坏。在这些情况下,它也有需要验证。 ### Collision – 功能和使用方法 @@ -27,29 +30,29 @@ Collision:用于验证 ISO 和其他文件的 Linux 应用 ![Collision – First Screen][3] -首先,它有两个主要特点。 a) 上传文件以获取校验和和或哈希值 b) 将校验和与上传的文件进行比较。 +首先,它有两个主要特点。 a、上传文件以获取校验和和或哈希值;b、将校验和与上传的文件进行比较。 -例如,如果你有一个简单的文件,你可以通过“打开文件”按钮或“打开”按钮重新上传另一个文件。 +例如,如果你有一个简单的文件,你可以通过“打开文件Open a File”按钮上传一个文件,或“打开Open”按钮重新上传另一个文件。 -如下图所示,文本文件具有以下各种哈希函数的校验和。现在你可以通过互联网/与任何人共享该文件,以及用于验证的校验和值。 +如下图所示,该文本文件具有以下各种哈希函数的校验和。现在你可以通过互联网/与任何人共享该文件,以及用于验证的校验和值。 ![Hash values of a test file][4] 此外,如果有人篡改文件(即使是单个字节)或文件在分发过程中被破坏,那么哈希值就会完全改变。 -其次,如果要验证已下载文件的完整性,请点击“验证”选项卡。然后上传文件,输入你收到的上传文件的哈希值。 +其次,如果要验证已下载文件的完整性,请点击“验证Verify”选项卡。然后上传文件,输入你收到的上传文件的哈希值。 如果匹配,你应该会看到一个绿色勾号,显示其真实性。 ![Collision verifies a sample file with SHA-256][5] -此外,这是另一个示例,我修改了测试文件并保持值相同。这个场景清楚地表明它对该文件无效。 +此外,这是另一个示例,我修改了测试文件并保持大小相同。这个场景清楚地表明它对该文件无效。 ![Collision showing that a file is not valid][6] #### 重要说明 -这里值得一提的是,哈希方法不会验证文件元属性,如修改时间、修改日期等。如果有人篡改了文件并将其还原为原始内容,哈希方法将其称为有效文件。 +这里值得一提的是,哈希方法不会验证文件元属性,如修改时间、修改日期等。如果有人篡改了文件并将其还原为原始内容,这种哈希方式将其称为有效文件。 现在,让我们看一个验证 ISO 文件的典型示例。 @@ -59,21 +62,21 @@ Collision:用于验证 ISO 和其他文件的 Linux 应用 ![Ubuntu server ISO file and checksums][7] -SHA256SUMS 文件具有以下安装程序的校验和值,如上所示。 +`SHA256SUMS` 文件带有上面的该安装程序的以下校验和值: ![SHA-256 value of Ubuntu server ISO image][8] -下载后,打开 Collision 应用并通过验证选项卡上传 ISO 文件。然后复制 SHA-256 值并将其粘贴到左侧的校验和框中。 +下载后,打开 Collision 应用并通过“验证Verify”选项卡上传 ISO 文件。然后复制 SHA-256 值并将其粘贴到左侧的校验和框中。 -如果你已正确下载并按照步骤操作,你应该会看到该文件是真实的。 +如果你已正确下载并按照步骤操作,你应该会看到该文件是真实有效的。 ![Ubuntu server ISO image verified][9] ### 如何安装 Collision -使用 Flatpak 可以轻松安装 Collision 应用。你需要为你的 Linux 发行版[设置 Flatpak][10],并单击以下链接以安装 Collision。 +使用 Flatpak 可以轻松安装 Collision 应用。你需要为你的 Linux 发行版 [设置 Flatpak][10],并单击以下链接以安装 Collision。 -[通过 Flathub 安装 Collision][11] +> **[通过 Flathub 安装 Collision][11]** 安装后,你应该通过发行版的应用菜单找到它。 @@ -101,7 +104,7 @@ sha256sum <文件名> ### 结束语 -我希望本指南可以帮助你使用 Collision GTK 应用验证你的文件。它使用起来很简单。此外,你可以在终端中使用命令行方法来验证您想要的任何文件。另外,最好的做法是尽可能始终检查文件完整性。 +我希望本指南可以帮助你使用 Collision GTK 应用验证你的文件。它使用起来很简单。此外,你可以在终端中使用命令行方法来验证您想要的任何文件。尽可能始终检查文件完整性总是应该的。 -------------------------------------------------------------------------------- @@ -110,7 +113,7 @@ via: https://www.debugpoint.com/2022/05/collision/ 作者:[Arindam][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/) 荣誉推出 From ac36000c82c0a0eef1c89070d4154b8657483bd3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Jun 2022 14:39:19 +0800 Subject: [PATCH 027/231] A --- ...obile- A Promising Start with Huge Expectations [Opinion].md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md b/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md index 3ac9e6a31d..d171657315 100644 --- a/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md +++ b/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 84814f71f42315076b8858f2c35ccd18f102ecba Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 4 Jun 2022 15:26:53 +0800 Subject: [PATCH 028/231] ONE @wxy https://linux.cn/article-14672-1.html --- ... Start with Huge Expectations [Opinion].md | 93 +++++++++++++++++++ ... Start with Huge Expectations [Opinion].md | 92 ------------------ 2 files changed, 93 insertions(+), 92 deletions(-) create mode 100644 published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md delete mode 100644 sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md diff --git a/published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md b/published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md new file mode 100644 index 0000000000..878c857eba --- /dev/null +++ b/published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md @@ -0,0 +1,93 @@ +[#]: subject: "GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion]" +[#]: via: "https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14672-1.html" + +移动版 GNOME Shell:希望之始,期望满满 +====== + +![GNOME Shell 在一台 Pinephone 原型机上运行][3] + +> GNOME 开发人员在最近的一篇博文中提出了将 GNOME Shell 完全移植到手机上的想法。下面是我对这个项目的一些看法。 + +### 移动版 GNOME Shell + +作为一个桌面环境,GNOME 在过去的十年中发展成为了 [GNOME 40][1]。GNOME 40 是一个重要的版本,它以一种现代的方式改变了完整的用户界面设计。 + +看着 GNOME 40 的设计方式,你可能会觉得 Shell 和它的底层技术已经为小屏幕做好了准备。手势驱动的工作区、图标网格和停靠区 —— 在某种程度上感觉更接近于像安卓这样的移动操作系统,而不是桌面环境。 + +此外,系统托盘、日历、通知和原生的应用程序,可以有效地在较小尺寸的设备上工作。得益于 GTK4 和 libadwaita,其设计是响应式的,应用程序和控件的外观与移动平台很匹配。 + +在 GNOME 40 之后,GNOME 开发者为较小尺寸的设备(如平板电脑和手机)设计了几个 GNOME Shell 的概念验证。 + +#### 为什么是现在? + +任何项目的开发和研究工作都要花费时间和金钱。虽然有来自主要科技公司对 GNOME 的捐赠,但这次有一个 “原型基金Prototype Fund” 帮助该团队继续进行这项努力。[原型基金][2] 是德国教育部(BMBF)支持公共利益软件的资助项目。 + +#### 包括什么? + +设计一个完整的移动用户界面,并将其与移动操作系统整合是一个非常复杂的项目。它需要一个精心设计的愿景来支持成千上万的移动硬件和用户支持。更不用说,用户在移动设备上的隐私和安全问题了。 + +因此,有了这个基金,团队可以集中精力进行概念验证,以满足 GNOME Shell 中一些基本的用户互动。 + +* 启动器 +* 应用程序网格 +* 轻扫、手势和导航 +* 用手机键盘搜索 +* 检测屏幕大小和支持屏幕旋转 +* 工作空间和多任务 +* 设置 +* 屏幕键盘 + +![GNOME Shell 移动版模拟图][4] + +始终要记住的是,移动体验远不止用户界面这么简单。另外,GNOME 本身并不是一个操作系统。它由底层的稳定的操作系统组成,它提供了非常需要的隐私和安全。另外,“应用商店”的概念也是如此。手机制造商需要与 GNOME 开发者合作,让他们的产品采用这个概念。 + +#### 进展如何? + +在写这篇文章时,团队给我们快速演示了取得的进展。在下面的视频中可以看到: + +![][5] + +复杂的任务是识别触摸屏手机中的各种手势。例如,你可能会使用长触摸、短触摸、双指轻扫和拖动,以及许多只有在小尺寸设备中才可行的可能性。这需要在各自的 GNOME Shell 组件中推倒重构。 + +而完全在现有的 GNOME Shell 基础上开发它们是很有挑战性的工作。 + +此外,该团队使用著名的 Pinephone Pro 进行开发和测试。Pinephone 已经是一个商业产品,装有 “友商” KDE Plasma 手机和其他 Linux 操作系统。 + +![][6] + +### 结语 + +如果一切按计划进行,我们可能在一个完整的开源手机中获得原生的 GNOME 体验。而你可以重新拥有你的隐私! + +另外,我不确定 Phosh(它也是基于 GNOME 的)会发生什么。虽然 Phosh 是由 Purism 开发和管理的,但看看 GNOME Shell 在移动设备上的努力和 PHosh 在未来一段日子的发展方向将是很有趣的。 + +那么,你对这个项目的前景怎么看?请在下面的评论栏里告诉我。 + +*图片和视频来源:GNOME 开发者 [博客][7]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[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://www.debugpoint.com/tag/gnome-40 +[2]: http://www.prototypefund.de +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Running-on-a-prototype-Pinephone.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Mobile-mock-up.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/phone.webm +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/tablet.webm +[7]: https://blogs.gnome.org/shell-dev/2022/05/30/towards-gnome-shell-on-mobile/ diff --git a/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md b/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md deleted file mode 100644 index d171657315..0000000000 --- a/sources/news/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: subject: "GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion]" -[#]: via: "https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion] -====== -The GNOME devs gave ideas about porting GNOME Shell entirely to a mobile phone in a recent blog post. Here are some insights about the project. - -### GNOME Shell for Mobile Phones - -GNOME as a desktop environment evolved over the last decade to become [GNOME 40][1]. The GNOME 40 was a significant release that changed the complete user interface design with a modern approach. - -Looking at how GNOME 40 is designed, you may feel that the Shell and its underlying tech are ready for smaller screens. Because the gesture-driven workspaces, icons grid, and dock – somehow feel closer to a mobile operating system such as Android than a desktop environment. - -Moreover, the system tray, calendar, notifications and the native apps – can efficiently work well in smaller form factor devices. Thanks to GTK4 and libadwaita, the design is responsive, and the looks of apps and controls match a mobile platform well. - -After GNOME 40, the GNOME developers worked on several concepts of GNOME Shell for smaller form factor devices such as tablets and mobile phones. - -#### Why Now? - -The development and research efforts cost time and money for any project. Although there are donations to GNOME from major tech companies, this time a “Prototype Fund” helped the team to carry on with this effort. The [Prototype Fund][2] is a grant program supporting public interest software by the German Ministry of Education (BMBF). - -#### What is in scope? - -Designing a complete mobile user interface and integrating it with a mobile operating system is a very complex project. It requires a well-designed vision to support thousands of mobile hardware and user support. Not to mention, the privacy and security of users on a mobile device. - -![GNOME Shell Running on a prototype Pinephone][3] - -Hence, with this fund, the team concentrates on a proof of concept that caters to some essential user interactions in GNOME Shell. - -* Launcher -* Application Grids -* Swipe, gestures and navigations -* Search with mobile keyboard -* Detect screen size and screen rotation support -* Workspaces and multitasking -* Settings -* on-screen keyboard - -![GNOME Shell Mobile mock-up][4] - -It is always important to remember that a mobile experience is much more than just the user interface. Also, GNOME itself is not an operating system. It consists of the underlying stable operating system, which gives much-needed privacy and security. Plus, the “App Store” like the concept. The phone manufacturers need to work with GNOME devs for their products to adopt this concept. - -#### The Progress - -The team gave us a quick demo of the progress made while writing this article. See yourself in the below video. - -![][5] - -The complex task is to recognize various gestures in a touchscreen mobile. For example, you may use long touch, a short touch, a two-finger swipe and drag, and many possibilities that are only feasible in a small form factor device. It requires an absolute rework in the respective GNOME shell components. - -And developing them entirely on the existing GNOME Shell base is challenging work. - -Furthermore, the team uses the famous Pinephone Pro for development and testing. The Pinephone is already a commercial product featuring the “friendly neighbour” KDE Plasma mobile and other Linux OSes. - -![][6] - -### Conclusion - -And if all goes according to plan, we all may get a native GNOME experience in a complete open-source mobile phone. And you can have your privacy back! - -On a side note, I am not sure what will happen to Phosh (which is also based on GNOME). Although Phosh is developed and managed by Purism, it will be interesting to see what direction both GNOME Shell for mobile initiative and PHosh takes in the coming days. - -So, what do you think about the prospects of this project? Let me know in the comment box below. - -*[Image and video credits: GNOME Developers. Via blogs.][7]* - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/ - -作者:[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://www.debugpoint.com/tag/gnome-40 -[2]: http://www.prototypefund.de -[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Running-on-a-prototype-Pinephone.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Mobile-mock-up.jpg -[5]: -[6]: -[7]: https://blogs.gnome.org/shell-dev/2022/05/30/towards-gnome-shell-on-mobile/ From f7b3c33040e93f72eaff738ae7668058cab850a4 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 4 Jun 2022 17:50:48 +0800 Subject: [PATCH 029/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020220604=20Attract=20contributors=20to=20your=20open?= =?UTF-8?q?=20source=20project=20with=20authenticity.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r open source project with authenticity.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 sources/talk/20220604 Attract contributors to your open source project with authenticity.md diff --git a/sources/talk/20220604 Attract contributors to your open source project with authenticity.md b/sources/talk/20220604 Attract contributors to your open source project with authenticity.md new file mode 100644 index 0000000000..d97d80f40d --- /dev/null +++ b/sources/talk/20220604 Attract contributors to your open source project with authenticity.md @@ -0,0 +1,141 @@ +[#]: subject: "Attract contributors to your open source project with authenticity" +[#]: via: "https://opensource.com/article/22/6/attract-contributors-open-source-project" +[#]: author: "Rizel Scarlett https://opensource.com/users/blackgirlbytes" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Attract contributors to your open source project with authenticity +====== +Check out these methods that open source maintainers can use to attract contributors in a genuine manner. + +![a big flag flying in a sea of other flags, teamwork][1] + +Image by: Opensource.com + +It's not a secret that maintaining an open source project is often thankless and time-consuming work. However, I've learned that there's one shared joy among open source maintainers: They love building with a group of technologists who passionately believe in their vision. + +### Marketing feels cringey + +Community support and teamwork are major incentives for open source maintainers. However, gaining community support and contributors is a challenge, especially as a new maintainer. The hope is that technologists will find our projects and start contributing by chance. The reality is we have to market our projects. Think about it: Developers create several public repositories daily, but nobody knows those repositories exist. Without adoption, community, or collaboration, we're not truly reaping the benefits of open source. + +Although marketing an open source project is necessary for a project's overall success, developers are hesitant to do it because marketing to other developers often feels inauthentic and cringey. In this article, I explore methods maintainers can use to attract contributors in a genuine manner. + +### Promote your open source project + +If you want people to contribute to your project, you have to tell them your project exists. So what can promotion look like for you? Instead of spamming discord channels or DMs about an open source project, maintainers can promote their projects through many channels, including: + +* Conference talks: People attend conferences to gain inspiration. Don't be afraid; they're not necessarily looking for a PhD-level lecture. Take the stage at an event like [All Things Open][2], [Open Source Series 101][3], [Codeland][4], or [Upstream][5] to talk about what you're building, why you're building it, issues you face, and discoveries you have made. After your talk, people may want to learn more about what you're building and how they can get involved. +* Blogging: Leverage popular developer blogging platforms such as [Aviyel][6], [Dev.to][7], or [Hashnode][8] to talk about your project. Add a link to your project within the blog posts so that the right people can find it. You can also [submit an article][9] to the editors here on Opensource.com to raise awareness about your open source project! +* Twitter: Twitter has a large tech audience, including Developers, UX Designers, Developer Advocates, and InfoSec professionals who want to collaborate and learn from each other. Twitter is the perfect platform to post in an authentic, non-pushy way about your discoveries, new releases, and bug fixes. Folks will learn from you through your tweets and may feel inclined to build with you. +* Podcasts or Twitter Spaces: Like conference talks, use podcasts and Twitter Spaces to build your project's brand. You don't have to talk about it in a marketing way. You can geek out with the host over your vision and the technical hiccups you've faced along the way. +* Twitch Streams: Stream yourself live coding your project to create awareness of its existence and pair the program with your viewers. Eventually, they might tell other people about your product, or they might ask to contribute themselves. +* Hacktoberfest: Hacktoberfest is a month-long event in October that encourages people to make their first contributions to projects. By participating in Hacktoberfest as a maintainer, you may recruit new contributors. +* Sponsorships: Contributions don't always have to include code. Corporations and individuals can contribute by sponsoring you. Learn more about creating an appealing Sponsor profile [here][10]. + +### Gain community support + +The proverb "it takes a village" applies to more than child-rearing. It also takes a village to maintain an open source project. Community is a large part of open source and just general life success. However, community support is a two-way street. To sustain community support, it's a best practice to give back to community members. + +What can community support look like for you? As you promote your project, you will find folks willing to support you. To encourage them to continue supporting and appeal to other potential supporters, you can: + +* Highlight contributors/supporters: Once you start getting contributors, you can motivate more people to contribute to your project by highlighting past, current, or consistent contributors in your README. This acknowledgment shows that you value and support your contributors. Send your contributors swag or a portion of your sponsorship money if you can afford it. Folks will naturally gravitate to your projects if you're known for genuinely supporting your open source community. + +![Acknowledge contributors on a profile page][11] + +* Establish a culture of kindness: Publish a Code of Conduct in your repository to ensure psychological safety for contributors. I strongly suggest you also adhere to those guidelines by responding kindly to people in comments, pull requests, and issues. It's also vital that you enforce your Code of Conduct. If someone in your community is not following the rules, make sure they face the outlined consequences without exception. Don't let a toxic actor ruin your project's environment with unkind language and harassment. +* Provide a space for open discussion: Often, contributors join an open source community to befriend like-minded technologists, or they have a technical question, and you won't always be available to chat. Open source maintainers often use one of the following tools to create a place for contributors to engage with each other and ask questions in the open: + * GitHub Discussions + * Discord + * Matrix.org + * Mattermost + +### Create a "good" open source project + +*Good* is subjective in code or art, but there are a few ways to indicate that your project is well thought out and a good investment. What does creating a good project look like for you? Your project doesn't have to include amazing code or be a life-changing project to indicate quality. Instead, ensure that your project has the following attributes. + +#### Easy to find + +To help other people find and contribute to your project, you can add topics to your repository related to your project's intended purpose, subject area, affinity groups, or other important qualities. When people go to github.com/topics to search for projects, your project has a higher chance of showing up. + +![GitHub Scientist page][12] + +#### Easy to use + +Make your project easy to use with a detailed README. It's the first thing new users and potential contributors see when visiting your project's repository. Your README should serve as a how-to guide for users. I suggest you include the following information in your README: + +* Project title +* Project description +* Installation instructions +* Usage instructions +* Link to your live web app +* Links to related documentation (code of conduct, license, contributing guidelines) +* Contributors highlights + +You can learn more about crafting the perfect README [here][13]. + +#### Easy to contribute to + +Providing guidelines and managing issues help potential contributors understand opportunities to help. + +* Contributing guidelines - Similar to a README, contributors look for a markdown file called Contributing.md for insight on how to contribute to your project. Guidelines are helpful for you and the contributor because they won't have to ask you too many questions. The contributing guidelines should answer frequently asked questions. I suggest including the following information in your Contributing.md file: + * Technologies used + * How to report bugs + * How to propose new features + * How to open a pull request + * How to claim an issue or task + * Environment set up + * Style guide/code conventions + * Link to a discussion forum or how people can ask for help + * Project architecture (nice to have) + * Known issues +* Good first issues - Highlight issues that don't need legacy project knowledge with the label good-first-issue, so new contributors can feel comfortable contributing to your project for the first time. + +![discover issues with GitHub][14] + +### Exercise persistence + +Even if no one contributes to your project, keep it active with your contributions. Folks will be more interested in contributing to an active project. What does exercising persistence look like for your project? Even if no one is contributing, continue to build your project. If you can't think of new features to add and you feel like you fixed all the bugs, set up ways to make your project easy to manage and scale when you finally get a ton of contributors. + +* Scalability: Once you get contributors, it will get harder to balance responding to every issue. While you're waiting for more contributors, automate the tasks that will eventually become time-consuming. You can leverage GitHub Actions to handle the release process, CI/CD, or enable users to self-assign issues. + +### TL;DR + +Attracting contributors to your open source project takes time, so be patient and don't give up on your vision. While you're waiting, promote your project by building in public and sharing your journey through blog posts, tweets, and Twitch streams. Once you start to gain contributors, show them gratitude in the form of acknowledgment, psychological safety, and support. + +### Next steps + +For more information on maintaining an open source project, check out [GitHub's Open Source Guide][15]. + +Image by: (Rizel Scarlett, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/attract-contributors-open-source-project + +作者:[Rizel Scarlett][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/blackgirlbytes +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/leader_flag_people_team_group.png +[2]: https://2021.allthingsopen.org/ +[3]: https://opensource101.com/ +[4]: https://codelandconf.com/ +[5]: https://upstream.live/ +[6]: http://aviyel.com/ +[7]: https://dev.to/ +[8]: https://hashnode.com/ +[9]: https://opensource.com/writers +[10]: https://dev.to/github/how-to-create-the-perfect-sponsors-profile-for-your-open-source-project-3747 +[11]: https://opensource.com/sites/default/files/2022-05/contributors.png +[12]: https://opensource.com/sites/default/files/2022-05/github-scientist.png +[13]: https://dev.to/github/how-to-create-the-perfect-readme-for-your-open-source-project-1k69 +[14]: https://opensource.com/sites/default/files/2022-05/label-issues.png +[15]: https://opensource.guide/ From b915e784ffcc46907dc3a00e42c2b46b132ffc5b Mon Sep 17 00:00:00 2001 From: hanszhao80 <155320754@qq.com> Date: Sun, 5 Jun 2022 15:43:43 +0800 Subject: [PATCH 030/231] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?tech]=2020210210=20Manage=20your=20budget=20on=20Linux=20with?= =?UTF-8?q?=20this=20open=20source=20finance=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux with this open source finance tool.md | 86 ------------------- ...inux with this open source finance tool.md | 86 +++++++++++++++++++ 2 files changed, 86 insertions(+), 86 deletions(-) delete mode 100644 sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md create mode 100644 translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md diff --git a/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md b/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md deleted file mode 100644 index 6e11979896..0000000000 --- a/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (hanszhao80) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your budget on Linux with this open source finance tool) -[#]: via: (https://opensource.com/article/21/2/linux-skrooge) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Manage your budget on Linux with this open source finance tool -====== -Make managing your finances easier with Skrooge, an open source -budgeting tool. -![2 cents penny money currency][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. This article is about personal financial management. - -Personal finances can be difficult to manage. It can be frustrating and even scary when you don't have enough money to get by without financial assistance, and it can be surprisingly overwhelming when you do have the money you need but no clear notion of where it all goes each month. To make matters worse, we're often told to "make a budget" as if declaring the amount of money you can spend each month will somehow manifest the money you need. The bottom line is that making a budget is hard, and not meeting your financial goals is discouraging. But it's still important, and Linux has several tools that can help make the task manageable. - -### Money management - -As with anything else in life, we all have our own ways of keeping track of our money. I used to take a simple and direct approach: My paycheck was deposited into an account, and I'd withdraw some percentage in cash. Once the cash was gone from my wallet, I had to wait until the next payday to spend anything. It only took one day of missing out on lunch to learn that I had to take my goals seriously, and I adjusted my spending behavior accordingly. For the simple lifestyle I had at the time, it was an effective means of keeping myself honest with my income, but it didn't translate well to online business transactions, long-term utility contracts, investments, and so on. - -As I continue to refine the way I track my finances, I've learned that personal accounting is always an evolving process. We each have unique financial circumstances, which inform what kind of solution we can or should use to track our income and debt. If you're out of work, then your budgeting goal is likely to spend as little as possible. If you're working but paying off a student loan, then your goal probably favors sending money to the bank. And if you're working but planning for retirement, then you're probably trying to save as much as you can. - -The thing to remember about a budget is that it's meant to compare your financial reality with your financial _goals_. You can't avoid some expenses, but after those, you get to set your own priorities. If you don't hit your goals, you can adjust your own behavior or rewrite your goals so that they better reflect reality. Adapting your financial plan doesn't mean you've failed. It just means that your initial projection wasn't accurate. During hard times, you may not be able to hit any budget goals, but if you keep up with your budget, you'll learn a lot about what it takes financially to maintain your current lifestyle (whatever it may be). Over time, you can learn to adjust settings you may never have realized were available to you. For instance, people are moving to rural towns for the lower cost of living now that remote work is a widely accepted option. It's pretty stunning to see how such a lifestyle shift can alter your budget reports. - -The point is that budgeting is an often undervalued activity, and in no small part because it's daunting. It's important to realize that you can budget, no matter your level of expertise or interest in finances. Whether you [just use a LibreOffice spreadsheet][2], or try a dedicated financial application, you can set goals, track your own behavior, and learn a lot of valuable lessons that could eventually pay dividends. - -### Open source accounting - -There are several dedicated [personal finance applications for Linux][3], including [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], and [Skrooge][8]. All of these applications are essentially ledgers, a place you can retreat to at the end of each month (or whenever you look at your accounts), import data from your bank, and review how your expenditures align with whatever budget you've set for yourself. - -![Skrooge interface with financial data displayed][9] - -Skrooge - -I use Skrooge as my personal budget tracker. It's an easy application to set up, even with multiple bank accounts. Skrooge, as with most open source finance apps, can import multiple file formats, so my workflow goes something like this: - - 1. Log in to my banks. - 2. Export the month's bank statement as QIF files. - 3. Open Skrooge. - 4. Import the QIF files. Each gets assigned to their appropriate accounts automatically. - 5. Review my expenditures compared to the budget goals I've set for myself. If I've gone over, then I dock next month's goals (so that I'll ideally spend less to make up the difference). If I've come in under my goal, then I move the excess to December's budget (so I'll have more to spend at the end of the year). - - - -I only track a subset of the household budget in Skrooge. Skrooge makes that process easy through a dynamic database that allows me to categorize multiple transactions at once with custom tags. This makes it easy for me to extract my personal expenditures from general household and utility expenses, and I can leverage these categories when reviewing the autogenerated reports Skrooge provides. - -![Skrooge budget pie chart][10] - -Skrooge budget pie chart - -Most importantly, the popular Linux financial apps allow me to manage my budget the way that works best for me. For instance, my partner prefers to use a LibreOffice spreadsheet, but with very little effort, I can extract a CSV file from the household budget, import it into Skrooge, and use an updated set of data. There's no lock-in, no incompatibility. The system is flexible and agile, allowing us to adapt our budget and our method of tracking expenses as we learn more about effective budgeting and about what life has in store. - -### Open choice - -Money markets worldwide differ, and the way we each interact with them also defines what tools we can use. Ultimately, your choice of what to use for your finances is a decision you must make based on your own requirements. And one thing open source does particularly well is provide its users the freedom of choice. - -When setting my own financial goals, I appreciate that I can use whatever application fits in best with my style of personal computing. I get to retain control of how I process the data in my life, even when it's data I don't necessarily enjoy having to process. Linux and its amazing set of applications make it just a little less of a chore. - -Try some financial apps on Linux and see if you can inspire yourself to set some goals and save money! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-skrooge - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[hanszhao80](https://github.com/hanszhao80) -校对:[校对者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/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) -[2]: https://opensource.com/article/20/3/libreoffice-templates -[3]: https://opensource.com/life/17/10/personal-finance-tools-linux -[4]: http://homebank.free.fr/en/index.php -[5]: https://www.moneymanagerex.org/download -[6]: https://opensource.com/article/20/2/gnucash -[7]: https://kmymoney.org/download.html -[8]: https://apps.kde.org/en/skrooge -[9]: https://opensource.com/sites/default/files/skrooge.jpg -[10]: https://opensource.com/sites/default/files/skrooge-pie_0.jpg diff --git a/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md b/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md new file mode 100644 index 0000000000..6a91f26636 --- /dev/null +++ b/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Manage your budget on Linux with this open source finance tool) +[#]: via: (https://opensource.com/article/21/2/linux-skrooge) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +使用这款 Linux 开源财务工具管理你的预算 +====== +使用开源预算工具 Skrooge 让你的财务管理更加轻松。 + +![2 cents penny money currency][1] + +2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在本系列中,我将分享使用 Linux 的 21 个不同理由。本篇介绍的是个人财务管理。 + +个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像申报你每个月的花销就能在某种程度上证明你需要多少钱。底线是:制定预算是困难的,不满足你的财务目标是令人沮丧的。但这仍然很重要,Linux 有几个工具可以帮助使任务变得可管理。 + +### 理财 + +就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我只错过了一天的午餐,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并没有很好地转化为在线商业交易、长期公用事业合同、投资等等。 + +随着我不断完善我的财务跟踪方式,我了解到个人会计始终是一个不断发展的过程。我们每个人都有独特的财务状况,这告诉我们可以或应该使用什么样的解决方案来跟踪我们的收入和债务。如果你失业了,那么你的预算目标可能是尽可能少花钱。如果你在工作,但在还学生贷款,那么你的目标可能是向银行汇款。如果你在工作,但计划退休,那么你可能会尽可能多地存钱。 + +关于预算,要记住的一点是,它意味着将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些费用,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了。这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它可能是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的设置。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这种生活方式的转变如何改变你的预算报告,真是令人震惊。 + +重点是,预算是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。 + +### 开源会计 + +有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], 和 [Skrooge][8]。所有这些应用程序本质上都是分类帐,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。 + +![显示财务数据的 Skrooge 界面][9] + +Skrooge + +我使用 Skrooge 作为我的个人预算跟踪器。即便面对多个银行账户,它也能轻松自如的设置。与大多数开源金融应用程序一样,Skrooge 可以导入多种文件格式,因此我的工作流程大致如下: + + 1. 登录我的银行。 + 2. 将当月的银行对账单导出为 QIF 文件。 + 3. 打开 Skrooge。 + 4. 导入 QIF 文件。每个文件都会自动分配到相应的帐户。 + 5. 对照我为自己设定的预算目标检查我的支出。如果我已经超过了,那么我会停靠在下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。 + + + +在 Skrooge 里我只跟踪了家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个事务进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。 + +![Skrooge 预算饼图][10] + +Skrooge 预算饼图 + +最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我毫不费力地从家庭预算中提取 CSV 文件,将其导入到 Skrooge,并使用一组更新的数据集。不存在锁定和不兼容。该系统灵活敏捷,使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。 + +### 开放选择 + +世界各地的货币市场各不相同,我们每个人与之互动的方式也决定了我们可以使用哪些工具。归根结底,你对财务类软件的选择必须基于自己的需求。开源做得特别好的一件事是为用户提供了选择的自由。 + +在设定自己的财务目标时,我很欣赏我可以使用最适合我个人计算风格的任何应用程序。我可以控制我在生活中如何处理数据,即使是我不一定喜欢处理的数据。Linux 及其令人惊叹的应用程序集使它不再是一件苦差事。 + +在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并省钱吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-skrooge + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[校对者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/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) +[2]: https://opensource.com/article/20/3/libreoffice-templates +[3]: https://opensource.com/life/17/10/personal-finance-tools-linux +[4]: http://homebank.free.fr/en/index.php +[5]: https://www.moneymanagerex.org/download +[6]: https://opensource.com/article/20/2/gnucash +[7]: https://kmymoney.org/download.html +[8]: https://apps.kde.org/en/skrooge +[9]: https://opensource.com/sites/default/files/skrooge.jpg +[10]: https://opensource.com/sites/default/files/skrooge-pie_0.jpg From 5bf05880915721b77faca37d8d445040f8436212 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Jun 2022 15:46:10 +0800 Subject: [PATCH 031/231] RP @geekpi https://linux.cn/article-14675-1.html --- ...manually installed-- What does it Mean-.md | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) rename {translated/tech => published}/20220525 Package is -set to manually installed-- What does it Mean-.md (61%) diff --git a/translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md b/published/20220525 Package is -set to manually installed-- What does it Mean-.md similarity index 61% rename from translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md rename to published/20220525 Package is -set to manually installed-- What does it Mean-.md index 13f06a1f14..127e111531 100644 --- a/translated/tech/20220525 Package is -set to manually installed-- What does it Mean-.md +++ b/published/20220525 Package is -set to manually installed-- What does it Mean-.md @@ -3,62 +3,67 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14675-1.html" -软件包 “set to manually installed”?这是什么意思? +软件包 “被标记为手动安装”?这是什么意思? ====== -如果你使用 apt 命令在终端中安装软件包,你将看到各种输出。 + +![](https://img.linux.net.cn/data/attachment/album/202206/05/154517uqnqdfi79yqidi79.jpg) + +如果你使用 `apt` 命令在终端中安装软件包,你将看到各种输出。 如果你注意并查看输出,有时你会注意到一条消息: -**package_name set to manually installed** +``` +package_name set to manually installed +``` 你有没有想过这条消息是什么意思,为什么你没有在所有包上看到它?让我在本篇中分享一些细节。 -### 理解 “Package set to manually installed” +### 理解 “软件包被标记为手动安装” -当你尝试安装已安装的库或开发包时,你会看到此消息。此依赖包是与另一个包一起自动安装的。如果删除了主包,则使用 apt autoremove 命令删除依赖包。 +当你尝试安装已安装的库或开发包时,你会看到此消息。此依赖包是与另一个包一起自动安装的。如果删除了主包,则使用 `apt autoremove` 命令删除依赖包。 但是由于你试图显式安装依赖包,你的 Ubuntu 系统认为你需要这个包独立于主包。因此,该软件包被标记为手动安装,因此不会自动删除。 -不是很清楚,对吧?以[在 Ubuntu 上安装 VLC][1] 为例。 +不是很清楚,对吧?以 [在 Ubuntu 上安装 VLC][1] 为例。 -由于主 vlc 包依赖于许多其他包,因此这些包会自动安装。 +由于主 VLC 包依赖于许多其他包,因此这些包会自动安装。 ![installing vlc with apt ubuntu][2] -如果你检查名称中包含 vlc 的[已安装软件包列表][3],你会看到除了 vlc,其余都标记为“自动”。这表明这些软件包是自动安装的(使用 vlc),它们将使用 apt autoremove 命令自动删除(当 vlc 被卸载时)。 +如果你检查名称中包含 `vlc` 的 [已安装软件包列表][3],你会看到除了 VLC,其余都标记为“自动”。这表明这些软件包是(跟着 vlc)自动安装的,当 VLC 被卸载时,它们将使用 `apt autoremove` 命令自动删除。 ![list installed packages vlc ubuntu][4] -现在假设你出于某种原因考虑安装 “vlc-plugin-base”。如果你在其上运行 apt install 命令,系统会告诉你该软件包已安装。同时,它将标记从自动更改为手动,因为系统认为你在尝试手动安装时明确需要此 vlc-plugin-base。 +现在假设你出于某种原因考虑安装 `vlc-plugin-base`。如果你在其上运行 `apt install` 命令,系统会告诉你该软件包已安装。同时,它将标记从自动更改为手动,因为系统认为在尝试手动安装表明你明确需要此 `vlc-plugin-base`。 ![package set manually][5] -可以看到它的状态已经从 [installed,automatic] 变成了 [installed]。 +可以看到它的状态已经从 `[installed,automatic]` 变成了 `[installed]`。 ![listing installed packages with vlc][6] -现在,让我删除 VLC 并运行 autoremove 命令。你可以看到 “vlc-plugin-base” 不在要删除的软件包列表中。 +现在,让我删除 VLC 并运行 `autoremove` 命令。你可以看到 `vlc-plugin-base` 不在要删除的软件包列表中。 ![autoremove vlc ubuntu][7] -再次检查已安装软件包的列表。vlc-plugin-base 仍然安装在系统上。 +再次检查已安装软件包的列表。`vlc-plugin-base` 仍然安装在系统上。 ![listing installed packages after removing vlc][8] -你可以在这里看到另外两个与 vlc 相关的包。这些是 vlc-plugin-base 包的依赖项,这就是为什么它们也存在于系统上但标记为 “automatic” 的原因。 +你可以在这里看到另外两个与 VLC 相关的包。这些是 `vlc-plugin-base` 包的依赖项,这就是为什么它们也存在于系统上但标记为 `automatic` 的原因。 -我相信现在有了这些例子,事情就更清楚了。让我给你一个额外提示。 +我相信现在有了这些例子,事情就更清楚了。让我给你一个额外的技巧。 ### 将包重置为自动 如果包的状态从自动更改为手动,你可以通过以下方式将其设置回自动: ``` -sudo apt-mark auto 包名 +sudo apt-mark auto package_name ``` ![set package to automatic][9] @@ -67,7 +72,7 @@ sudo apt-mark auto 包名 这不是一个重大错误,也不会阻止你在系统中进行工作。但是,了解这些小事会增加你的知识。 -**好奇心可能会害死猫,但它会让企鹅变得更聪明**。这是为这篇原本枯燥的文章增添幽默感的原始引述 :) +**好奇心可能会害死猫,但它会让企鹅变得更聪明**。这是为这篇原本枯燥的文章增添幽默感的原始引述 : ) 如果你想阅读更多这样的文章,这些文章可能看起来微不足道,但可以帮助你更好地了解您的 Linux 系统,请告诉我。 @@ -78,7 +83,7 @@ via: https://itsfoss.com/package-set-manually-installed/ 作者:[Abhishek Prakash][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/) 荣誉推出 From 07fe4c8d92786d421ef855132d5e55eeb9b0cc5d Mon Sep 17 00:00:00 2001 From: ZZJ Date: Sun, 5 Jun 2022 15:47:18 +0800 Subject: [PATCH 032/231] translated --- ...programming languages do the same thing.md | 109 ++++++++++++------ 1 file changed, 71 insertions(+), 38 deletions(-) rename {sources => translated}/tech/20210405 How different programming languages do the same thing.md (52%) diff --git a/sources/tech/20210405 How different programming languages do the same thing.md b/translated/tech/20210405 How different programming languages do the same thing.md similarity index 52% rename from sources/tech/20210405 How different programming languages do the same thing.md rename to translated/tech/20210405 How different programming languages do the same thing.md index 01085f7526..62ac87d02c 100644 --- a/sources/tech/20210405 How different programming languages do the same thing.md +++ b/translated/tech/20210405 How different programming languages do the same thing.md @@ -1,37 +1,38 @@ -[#]: subject: (How different programming languages do the same thing) -[#]: via: (https://opensource.com/article/21/4/compare-programming-languages) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (VeryZZJ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How different programming languages do the same thing +[#]: subject: "How different programming languages do the same thing" +[#]: via: "https://opensource.com/article/21/4/compare-programming-languages" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "VeryZZJ" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +不同编程语言是如何完成同一件事 ====== -Compare 13 different programming languages by writing a simple game. + +通过一个简单的小游戏比较13种编程语言 ![Developing code.][1] -Whenever I start learning a new programming language, I focus on defining variables, writing a statement, and evaluating expressions. Once I have a general understanding of those concepts, I can usually figure out the rest on my own. Most programming languages have some similarities, so once you know one programming language, learning the next one is a matter of figuring out the unique details and recognizing the differences. +当我开始学习一种新的编程语言时,会把重点放在定义变量、书写声明以及计算表达式,一旦对这些概念有一个大致的了解,通常就能够自己弄清剩下的部分。大多数编程语言都具有相似性,所以如果你掌握了一种编程语言,学习下一种语言的重点就是弄清楚独有的概念以及区分不同。 -To help me practice a new programming language, I like to write a few test programs. One sample program I often write is a simple "guess the number" game, where the computer picks a number between one and 100 and asks me to guess it. The program loops until I guess correctly. This is a very simple program, as you can see using pseudocode like this: +我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出1到100里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序: -* The computer picks a random number between 1 and 100 -* Loop until I guess the random number - + The computer reads my guess - + It tells me if my guess is too low or too high +* 计算机在1到100之间选出一个随机数字 +* 循环进行直到猜出该随机数字 + + 计算机读取我的猜测 + + 告诉我我的猜测过高还是过低 -Recently, Opensource.com ran an article series that wrote this program in different languages. This was an interesting opportunity to compare how to do the same thing in each language. I also found that most programming languages do things similarly, so learning the next programming language is mostly about learning its differences. +Opensource.com 最近发表了一篇文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。 -C is an early general-purpose programming language, created in 1972 at Bell Labs by Dennis Ritchie. C proved popular and quickly became a standard programming language on Unix systems. Because of its popularity, many other programming languages adopted a similar programming syntax. That's why learning C++, Rust, Java, Groovy, JavaScript, awk, or Lua is easier if you already know how to program in C. +C 语言由 Dennis Ritchie 于1972年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。 -For example, look at how these different programming languages implement the major steps in the "guess the number" game. I'll skip some of the surrounding code, such as assigning temporary variables, to focus on how the basics are similar or different. +接下来我们看看这些不同的编程语言是如何实现 "猜数字 "游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。 -### The computer picks a random number between one and 100 +### 计算机在1到100之间选出一个随机数字 -You can see a lot of similarities here. Most of the programming languages generate a random number with a function like `rand()` that you can put into a range on your own. Other languages use a special function where you can specify the range for the random value. +你可以看到这里有许多相似之处。大多数编程语言使用类似`rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。 C + ```c // Using the Linux `getrandom` system call getrandom(&randval, sizeof(int), GRND_NONBLOCK); @@ -42,45 +43,53 @@ number = rand() % 100 + 1; ``` C++ + ```cpp int number = rand() % 100+1; ``` Rust + ```rust let random = rng.gen_range(1..101); ``` Java + ```java private static final int NUMBER = r.nextInt(100) + 1; ``` Groovy + ```groovy int randomNumber = (new Random()).nextInt(100) + 1 ``` JavaScript + ```javascript const randomNumber = Math.floor(Math.random() * 100) + 1 ``` awk + ```awk randomNumber = int(rand() * 100) + 1 ``` Lua + ```lua number = math.random(1,100) ``` -### Loop until I guess the random number +### 循环进行直到我猜出该随机数字 -Loops are usually done with a flow-control block such as `while` or `do-while`. The JavaScript implementation doesn't use a loop and instead updates the HTML page "live" until the user guesses the correct number. Awk supports loops, but it doesn't make sense to loop to read input because awk is based around data pipelines, so it reads input from a file instead of directly from the user.  +循环通常是用控制流程来实现的,如`while` 或`do-while`。JavaScript 中的实现没有使用循环,而是 "实时 "更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。 C + ```c do { … @@ -88,6 +97,7 @@ do { ``` C++ + ```cpp do { … @@ -95,6 +105,7 @@ do { ``` Rust + ```rust for line in std::io::stdin().lock().lines() { … @@ -103,6 +114,7 @@ for line in std::io::stdin().lock().lines() { ``` Java + ```java while ( guess != NUMBER ) { … @@ -110,6 +122,7 @@ while ( guess != NUMBER ) { ``` Groovy + ```groovy while ( … ) { … @@ -118,27 +131,29 @@ while ( … ) { ``` Lua + ```lua while ( player.guess ~= number ) do … end ``` -### The computer reads my guess +### 计算机读取我的猜测 -Different programming languages handle input differently. So there's some variation here. For example, JavaScript reads values directly from an HTML form, and awk reads data from its data pipeline. +不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 awk 则从数据管道中读取数据。 -C ```c scanf("%d", &guess); ``` C++ + ```cpp cin >> guess; ``` Rust + ```rust let parsed = line.ok().as_deref().map(str::parse::); if let Some(Ok(guess)) = parsed { @@ -147,37 +162,43 @@ if let Some(Ok(guess)) = parsed { ``` Java + ```java guess = player.nextInt(); ``` Groovy + ```groovy response = reader.readLine() int guess = response as Integer ``` JavaScript + ```javascript let myGuess = guess.value ``` awk + ```awk guess = int($0) ``` Lua + ```lua player.answer = io.read() player.guess = tonumber(player.answer) ``` -### Tell me if my guess is too low or too high +### 告诉我我的猜测过高还是过低 -Comparisons are fairly consistent across these C-like programming languages, usually through an `if` statement. There's some variation in how each programming language prints output, but the print statement remains recognizable across each sample. +在这些类 C 语言中,通常是通过`if`语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。 C + ```c if (guess < number) { puts("Too low"); @@ -190,6 +211,7 @@ puts("That's right!"); ``` C++ + ```cpp if ( guess > number) { cout << "Too high.\n" << endl; } else if ( guess < number ) { cout << "Too low.\n" << endl; } @@ -200,6 +222,7 @@ else { ``` Rust + ```rust _ if guess < random => println!("Too low"), _ if guess > random => println!("Too high"), @@ -210,6 +233,7 @@ _ => { ``` Java + ```java if ( guess > NUMBER ) { System.out.println("Too high"); @@ -222,6 +246,7 @@ if ( guess > NUMBER ) { ``` Groovy + ```groovy if (guess < randomNumber) print 'too low, try again: ' @@ -234,6 +259,7 @@ else { ``` JavaScript + ```javascript if (myGuess === randomNumber) { feedback.textContent = "You got it right!" @@ -245,6 +271,7 @@ if (myGuess === randomNumber) { ``` awk + ```awk if (guess < randomNumber) { printf "too low, try again:" @@ -257,6 +284,7 @@ if (guess < randomNumber) { ``` Lua + ```lua if ( player.guess > number ) then print("Too high") @@ -268,13 +296,14 @@ else end ``` -### What about non-C-based languages? +### 非类 C 编程语言会怎么样呢? -Programming languages that are not based on C can be quite different and require learning specific syntax to do each step. Racket derives from Lisp and Scheme, so it uses Lisp's prefix notation and lots of parentheses. Python uses whitespace rather than brackets to indicate blocks like loops. Elixir is a functional programming language with its own syntax. Bash is based on the Bourne shell from Unix systems, which itself borrows from Algol68—and supports additional shorthand notation such as `&&` as a variation of "and." Fortran was created when code was entered using punched cards, so it relies on an 80-column layout where some columns are significant. +非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如`&&`作为 "and " 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的80-列布局。 -As an example of how these other programming languages can differ, I'll compare just the "if" statement that sees if one value is less than or greater than another and prints an appropriate message to the user. +我将通过比较 "if "语句,举例表现这些编程语言的不同。if 判断一个值是否小于或大于另一个值,并向用户打印适当信息。 Racket + ```racket (cond [(> number guess) (displayln "Too low") (inquire-user number)] [(< number guess) (displayln "Too high") (inquire-user number)] @@ -282,6 +311,7 @@ Racket ``` Python + ```python if guess < random: print("Too low") @@ -292,6 +322,7 @@ else: ``` Elixir + ```elixir cond do guess < num -> @@ -306,12 +337,14 @@ end ``` Bash + ```bash [ "0$guess" -lt $number ] && echo "Too low" [ "0$guess" -gt $number ] && echo "Too high" ``` Fortran + ```fortran IF (GUESS.LT.NUMBER) THEN PRINT *, 'TOO LOW' @@ -320,11 +353,11 @@ ELSE IF (GUESS.GT.NUMBER) THEN ENDIF ``` -### Read more +### Read more 更多 -This "guess the number" game is a great introductory program when learning a new programming language because it exercises several common programming concepts in a pretty straightforward way. By implementing this simple game in different programming languages, you can demonstrate some core concepts and compare each language's details. +当你在学习一种新的编程语言时"猜数字 "游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。 -Learn how to write the "guess the number" game in C and C-like languages: +学习如何用 C 和类 C 语言编写 "猜数字 "游戏: * [C][2], by Jim Hall * [C++][3], by Seth Kenlon @@ -335,7 +368,7 @@ Learn how to write the "guess the number" game in C and C-like languages: * [awk][8], by Chris Hermansen * [Lua][9], by Seth Kenlon -And in non-C-based languages: +其他语言: * [Racket][10], by Cristiano L. Fontana * [Python][11], by Moshe Zadka @@ -349,14 +382,14 @@ via: https://opensource.com/article/21/4/compare-programming-languages 作者:[Jim Hall][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[VeryZZJ](https://github.com/VeryZZJ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/jim-hall [b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 "Developing code." [2]: https://opensource.com/article/21/1/learn-c [3]: https://opensource.com/article/20/12/learn-c-game [4]: https://opensource.com/article/20/12/learn-rust From d5f4d2c5aebbc2af4d2705703fd7f35e95d661d4 Mon Sep 17 00:00:00 2001 From: aREversez <53844261+aREversez@users.noreply.github.com> Date: Sun, 5 Jun 2022 16:00:53 +0800 Subject: [PATCH 033/231] translated --- .../20190131 OOP Before OOP with Simula.md | 231 ------------------ .../20190131 OOP Before OOP with Simula.md | 230 +++++++++++++++++ 2 files changed, 230 insertions(+), 231 deletions(-) delete mode 100644 sources/talk/20190131 OOP Before OOP with Simula.md create mode 100644 translated/talk/20190131 OOP Before OOP with Simula.md diff --git a/sources/talk/20190131 OOP Before OOP with Simula.md b/sources/talk/20190131 OOP Before OOP with Simula.md deleted file mode 100644 index 5af32716d9..0000000000 --- a/sources/talk/20190131 OOP Before OOP with Simula.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: subject: "OOP Before OOP with Simula" -[#]: via: "https://twobithistory.org/2019/01/31/simula.html" -[#]: author: "Two-Bit History https://twobithistory.org" -[#]: collector: "lujun9972" -[#]: translator: "aREversez" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -OOP Before OOP with Simula -====== - -Imagine that you are sitting on the grassy bank of a river. Ahead of you, the water flows past swiftly. The afternoon sun has put you in an idle, philosophical mood, and you begin to wonder whether the river in front of you really exists at all. Sure, large volumes of water are going by only a few feet away. But what is this thing that you are calling a “river”? After all, the water you see is here and then gone, to be replaced only by more and different water. It doesn’t seem like the word “river” refers to any fixed thing in front of you at all. - -In 2009, Rich Hickey, the creator of Clojure, gave [an excellent talk][1] about why this philosophical quandary poses a problem for the object-oriented programming paradigm. He argues that we think of an object in a computer program the same way we think of a river—we imagine that the object has a fixed identity, even though many or all of the object’s properties will change over time. Doing this is a mistake, because we have no way of distinguishing between an object instance in one state and the same object instance in another state. We have no explicit notion of time in our programs. We just breezily use the same name everywhere and hope that the object is in the state we expect it to be in when we reference it. Inevitably, we write bugs. - -The solution, Hickey concludes, is that we ought to model the world not as a collection of mutable objects but a collection of _processes_ acting on immutable data. We should think of each object as a “river” of causally related states. In sum, you should use a functional language like Clojure. - -![][2] _The author, on a hike, pondering the ontological commitments -of object-oriented programming._ - -Since Hickey gave his talk in 2009, interest in functional programming languages has grown, and functional programming idioms have found their way into the most popular object-oriented languages. Even so, most programmers continue to instantiate objects and mutate them in place every day. And they have been doing it for so long that it is hard to imagine that programming could ever look different. - -I wanted to write an article about Simula and imagined that it would mostly be about when and how object-oriented constructs we are familiar with today were added to the language. But I think the more interesting story is about how Simula was originally so _unlike_ modern object-oriented programming languages. This shouldn’t be a surprise, because the object-oriented paradigm we know now did not spring into existence fully formed. There were two major versions of Simula: Simula I and Simula 67. Simula 67 brought the world classes, class hierarchies, and virtual methods. But Simula I was a first draft that experimented with other ideas about how data and procedures could be bundled together. The Simula I model is not a functional model like the one Hickey proposes, but it does focus on _processes_ that unfold over time rather than objects with hidden state that interact with each other. Had Simula 67 stuck with more of Simula I’s ideas, the object-oriented paradigm we know today might have looked very different indeed—and that contingency should teach us to be wary of assuming that the current paradigm will dominate forever. - -### Simula 0 Through 67 - -Simula was created by two Norwegians, Kristen Nygaard and Ole-Johan Dahl. - -In the late 1950s, Nygaard was employed by the Norwegian Defense Research Establishment (NDRE), a research institute affiliated with the Norwegian military. While there, he developed Monte Carlo simulations used for nuclear reactor design and operations research. These simulations were at first done by hand and then eventually programmed and run on a Ferranti Mercury.[1][3] Nygaard soon found that he wanted a higher-level way to describe these simulations to a computer. - -The kind of simulation that Nygaard commonly developed is known as a “discrete event model.” The simulation captures how a sequence of events change the state of a system over time—but the important property here is that the simulation can jump from one event to the next, since the events are discrete and nothing changes in the system between events. This kind of modeling, according to a paper that Nygaard and Dahl presented about Simula in 1966, was increasingly being used to analyze “nerve networks, communication systems, traffic flow, production systems, administrative systems, social systems, etc.”[2][4] So Nygaard thought that other people might want a higher-level way to describe these simulations too. He began looking for someone that could help him implement what he called his “Simulation Language” or “Monte Carlo Compiler.”[3][5] - -Dahl, who had also been employed by NDRE, where he had worked on language design, came aboard at this point to play Wozniak to Nygaard’s Jobs. Over the next year or so, Nygaard and Dahl worked to develop what has been called “Simula 0.”[4][6] This early version of the language was going to be merely a modest extension to ALGOL 60, and the plan was to implement it as a preprocessor. The language was then much less abstract than what came later. The primary language constructs were “stations” and “customers.” These could be used to model certain discrete event networks; Nygaard and Dahl give an example simulating airport departures.[5][7] But Nygaard and Dahl eventually came up with a more general language construct that could represent both “stations” and “customers” and also model a wider range of simulations. This was the first of two major generalizations that took Simula from being an application-specific ALGOL package to a general-purpose programming language. - -In Simula I, there were no “stations” or “customers,” but these could be recreated using “processes.” A process was a bundle of data attributes associated with a single action known as the process’ _operating rule_. You might think of a process as an object with only a single method, called something like `run()`. This analogy is imperfect though, because each process’ operating rule could be suspended or resumed at any time—the operating rules were a kind of coroutine. A Simula I program would model a system as a set of processes that conceptually all ran in parallel. Only one process could actually be “current” at any time, but once a process suspended itself the next queued process would automatically take over. As the simulation ran, behind the scenes, Simula would keep a timeline of “event notices” that tracked when each process should be resumed. In order to resume a suspended process, Simula needed to keep track of multiple call stacks. This meant that Simula could no longer be an ALGOL preprocessor, because ALGOL had only once call stack. Nygaard and Dahl were committed to writing their own compiler. - -In their paper introducing this system, Nygaard and Dahl illustrate its use by implementing a simulation of a factory with a limited number of machines that can serve orders.[6][8] The process here is the order, which starts by looking for an available machine, suspends itself to wait for one if none are available, and then runs to completion once a free machine is found. There is a definition of the order process that is then used to instantiate several different order instances, but no methods are ever called on these instances. The main part of the program just creates the processes and sets them running. - -The first Simula I compiler was finished in 1965. The language grew popular at the Norwegian Computer Center, where Nygaard and Dahl had gone to work after leaving NDRE. Implementations of Simula I were made available to UNIVAC users and to Burroughs B5500 users.[7][9] Nygaard and Dahl did a consulting deal with a Swedish company called ASEA that involved using Simula to run job shop simulations. But Nygaard and Dahl soon realized that Simula could be used to write programs that had nothing to do with simulation at all. - -Stein Krogdahl, a professor at the University of Oslo that has written about the history of Simula, claims that “the spark that really made the development of a new general-purpose language take off” was [a paper called “Record Handling”][10] by the British computer scientist C.A.R. Hoare.[8][11] If you read Hoare’s paper now, this is easy to believe. I’m surprised that you don’t hear Hoare’s name more often when people talk about the history of object-oriented languages. Consider this excerpt from his paper: - -> The proposal envisages the existence inside the computer during the execution of the program, of an arbitrary number of records, each of which represents some object which is of past, present or future interest to the programmer. The program keeps dynamic control of the number of records in existence, and can create new records or destroy existing ones in accordance with the requirements of the task in hand. - -> Each record in the computer must belong to one of a limited number of disjoint record classes; the programmer may declare as many record classes as he requires, and he associates with each class an identifier to name it. A record class name may be thought of as a common generic term like “cow,” “table,” or “house” and the records which belong to these classes represent the individual cows, tables, and houses. - -Hoare does not mention subclasses in this particular paper, but Dahl credits him with introducing Nygaard and himself to the concept.[9][12] Nygaard and Dahl had noticed that processes in Simula I often had common elements. Using a superclass to implement those common elements would be convenient. This also raised the possibility that the “process” idea itself could be implemented as a superclass, meaning that not every class had to be a process with a single operating rule. This then was the second great generalization that would make Simula 67 a truly general-purpose programming language. It was such a shift of focus that Nygaard and Dahl briefly considered changing the name of the language so that people would know it was not just for simulations.[10][13] But “Simula” was too much of an established name for them to risk it. - -In 1967, Nygaard and Dahl signed a contract with Control Data to implement this new version of Simula, to be known as Simula 67. A conference was held in June, where people from Control Data, the University of Oslo, and the Norwegian Computing Center met with Nygaard and Dahl to establish a specification for this new language. This conference eventually led to a document called the [“Simula 67 Common Base Language,”][14] which defined the language going forward. - -Several different vendors would make Simula 67 compilers. The Association of Simula Users (ASU) was founded and began holding annual conferences. Simula 67 soon had users in more than 23 different countries.[11][15] - -### 21st Century Simula - -Simula is remembered now because of its influence on the languages that have supplanted it. You would be hard-pressed to find anyone still using Simula to write application programs. But that doesn’t mean that Simula is an entirely dead language. You can still compile and run Simula programs on your computer today, thanks to [GNU cim][16]. - -The cim compiler implements the Simula standard as it was after a revision in 1986. But this is mostly the Simula 67 version of the language. You can write classes, subclass, and virtual methods just as you would have with Simula 67. So you could create a small object-oriented program that looks a lot like something you could easily write in Python or Ruby: - -``` - - ! dogs.sim ; - Begin - Class Dog; - ! The cim compiler requires virtual procedures to be fully specified ; - Virtual: Procedure bark Is Procedure bark;; - Begin - Procedure bark; - Begin - OutText("Woof!"); - OutImage; ! Outputs a newline ; - End; - End; - - Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; - Begin - Procedure bark; - Begin - OutText("Yap yap yap yap yap yap"); - OutImage; - End; - End; - - Ref (Dog) d; - d :- new Chihuahua; ! :- is the reference assignment operator ; - d.bark; - End; - -``` - -You would compile and run it as follows: - -``` - - $ cim dogs.sim - Compiling dogs.sim: - gcc -g -O2 -c dogs.c - gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim - $ ./dogs - Yap yap yap yap yap yap - -``` - -(You might notice that cim compiles Simula to C, then hands off to a C compiler.) - -This was what object-oriented programming looked like in 1967, and I hope you agree that aside from syntactic differences this is also what object-oriented programming looks like in 2019. So you can see why Simula is considered a historically important language. - -But I’m more interested in showing you the process model that was central to Simula I. That process model is still available in Simula 67, but only when you use the `Process` class and a special `Simulation` block. - -In order to show you how processes work, I’ve decided to simulate the following scenario. Imagine that there is a village full of villagers next to a river. The river has lots of fish, but between them the villagers only have one fishing rod. The villagers, who have voracious appetites, get hungry every 60 minutes or so. When they get hungry, they have to use the fishing rod to catch a fish. If a villager cannot use the fishing rod because another villager is waiting for it, then the villager queues up to use the fishing rod. If a villager has to wait more than five minutes to catch a fish, then the villager loses health. If a villager loses too much health, then that villager has starved to death. - -This is a somewhat strange example and I’m not sure why this is what first came to mind. But there you go. We will represent our villagers as Simula processes and see what happens over a day’s worth of simulated time in a village with four villagers. - -The full program is [available here as a Gist][17]. - -The last lines of my output look like the following. Here we are seeing what happens in the last few hours of the day: - -``` - - 1299.45: John is hungry and requests the fishing rod. - 1299.45: John is now fishing. - 1311.39: John has caught a fish. - 1328.96: Betty is hungry and requests the fishing rod. - 1328.96: Betty is now fishing. - 1331.25: Jane is hungry and requests the fishing rod. - 1340.44: Betty has caught a fish. - 1340.44: Jane went hungry waiting for the rod. - 1340.44: Jane starved to death waiting for the rod. - 1369.21: John is hungry and requests the fishing rod. - 1369.21: John is now fishing. - 1379.33: John has caught a fish. - 1409.59: Betty is hungry and requests the fishing rod. - 1409.59: Betty is now fishing. - 1419.98: Betty has caught a fish. - 1427.53: John is hungry and requests the fishing rod. - 1427.53: John is now fishing. - 1437.52: John has caught a fish. - -``` - -Poor Jane starved to death. But she lasted longer than Sam, who didn’t even make it to 7am. Betty and John sure have it good now that only two of them need the fishing rod. - -What I want you to see here is that the main, top-level part of the program does nothing but create the four villager processes and get them going. The processes manipulate the fishing rod object in the same way that we would manipulate an object today. But the main part of the program does not call any methods or modify and properties on the processes. The processes have internal state, but this internal state only gets modified by the process itself. - -There are still fields that get mutated in place here, so this style of programming does not directly address the problems that pure functional programming would solve. But as Krogdahl observes, “this mechanism invites the programmer of a simulation to model the underlying system as a set of processes, each describing some natural sequence of events in that system.”[12][18] Rather than thinking primarily in terms of nouns or actors—objects that do things to other objects—here we are thinking of ongoing processes. The benefit is that we can hand overall control of our program off to Simula’s event notice system, which Krogdahl calls a “time manager.” So even though we are still mutating processes in place, no process makes any assumptions about the state of another process. Each process interacts with other processes only indirectly. - -It’s not obvious how this pattern could be used to build, say, a compiler or an HTTP server. (On the other hand, if you’ve ever programmed games in the Unity game engine, this should look familiar.) I also admit that even though we have a “time manager” now, this may not have been exactly what Hickey meant when he said that we need an explicit notion of time in our programs. (I think he’d want something like the superscript notation [that Ada Lovelace used][19] to distinguish between the different values a variable assumes through time.) All the same, I think it’s really interesting that right there at the beginning of object-oriented programming we can find a style of programming that is not all like the object-oriented programming we are used to. We might take it for granted that object-oriented programming simply works one way—that a program is just a long list of the things that certain objects do to other objects in the exact order that they do them. Simula I’s process system shows that there are other approaches. Functional languages are probably a better thought-out alternative, but Simula I reminds us that the very notion of alternatives to modern object-oriented programming should come as no surprise. - -_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][20] on Twitter or subscribe to the [RSS feed][21] to make sure you know when a new post is out._ - -_Previously on TwoBitHistory…_ - -> Hey everyone! I sadly haven't had time to do any new writing but I've just put up an updated version of my history of RSS. This version incorporates interviews I've since done with some of the key people behind RSS like Ramanathan Guha and Dan Libby. -> -> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22] - - 1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, . [↩︎][23] - - 2. Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24]. [↩︎][25] - - 3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, . [↩︎][26] - - 4. ibid. [↩︎][27] - - 5. Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, . [↩︎][28] - - 6. Dahl and Nygaard (1966), 676. [↩︎][29] - - 7. Dahl and Nygaard (1978), 257. [↩︎][30] - - 8. Krogdahl, 3. [↩︎][31] - - 9. Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, . [↩︎][32] - - 10. Dahl and Nygaard (1978), 265. [↩︎][33] - - 11. Holmevik. [↩︎][34] - - 12. Krogdahl, 4. [↩︎][35] - - - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2019/01/31/simula.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[aREversez](https://github.com/aREversez) -校对:[校对者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]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey -[2]: https://twobithistory.org/images/river.jpg -[3]: tmp.2ZIthXB4S6#fn:1 -[4]: tmp.2ZIthXB4S6#fn:2 -[5]: tmp.2ZIthXB4S6#fn:3 -[6]: tmp.2ZIthXB4S6#fn:4 -[7]: tmp.2ZIthXB4S6#fn:5 -[8]: tmp.2ZIthXB4S6#fn:6 -[9]: tmp.2ZIthXB4S6#fn:7 -[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf -[11]: tmp.2ZIthXB4S6#fn:8 -[12]: tmp.2ZIthXB4S6#fn:9 -[13]: tmp.2ZIthXB4S6#fn:10 -[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf -[15]: tmp.2ZIthXB4S6#fn:11 -[16]: https://www.gnu.org/software/cim/ -[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96 -[18]: tmp.2ZIthXB4S6#fn:12 -[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html -[20]: https://twitter.com/TwoBitHistory -[21]: https://twobithistory.org/feed.xml -[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw -[23]: tmp.2ZIthXB4S6#fnref:1 -[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf -[25]: tmp.2ZIthXB4S6#fnref:2 -[26]: tmp.2ZIthXB4S6#fnref:3 -[27]: tmp.2ZIthXB4S6#fnref:4 -[28]: tmp.2ZIthXB4S6#fnref:5 -[29]: tmp.2ZIthXB4S6#fnref:6 -[30]: tmp.2ZIthXB4S6#fnref:7 -[31]: tmp.2ZIthXB4S6#fnref:8 -[32]: tmp.2ZIthXB4S6#fnref:9 -[33]: tmp.2ZIthXB4S6#fnref:10 -[34]: tmp.2ZIthXB4S6#fnref:11 -[35]: tmp.2ZIthXB4S6#fnref:12 diff --git a/translated/talk/20190131 OOP Before OOP with Simula.md b/translated/talk/20190131 OOP Before OOP with Simula.md new file mode 100644 index 0000000000..d50b95447f --- /dev/null +++ b/translated/talk/20190131 OOP Before OOP with Simula.md @@ -0,0 +1,230 @@ +[#]: subject: "OOP Before OOP with Simula" +[#]: via: "https://twobithistory.org/2019/01/31/simula.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Simula 诞生之前的面向对象程序设计 +====== + +想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。 + +2009 年,Clojure 的创始人 里奇·希基Rich Hickey 发表了[一场精彩的演讲][1],探讨了为什么上文那样的哲学发问会给面向对象程序设计带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:对象是固定不变的。可实际上,许多对象或者说全部对象都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 故障bugs。 + +希基总结道,这一难题的应对办法就是人们应该将世界模拟成对固定数据的 _过程_ 的集合,而不是变化着的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 + +![][2] _作者在远足途中思考面向对象程序设计的本体论问题。_ + +自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。 + +我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计在当时还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;围绕其他的设想,Simula I 首次测试了如何能够将数据和过程捆绑起来。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _过程_,而非相互交互的有着隐藏状态的对象。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 + +### 从 Simula 0 到 Simula 67 + +Simula 是由 克里斯汀·尼加德Kristen Nygaard奥利-王五·达尔Ole-Johan Dahl 两位挪威人开发出来的。 + +20世纪50年代末,尼加德受雇于挪威防务科学研究中心,该研究中心附属于挪威军方。在那里,他负责设计蒙特卡洛模拟方法,用于核反应堆设计与操作研究。最初,那些模拟实验完全通过人工开展;后来,实验在 Ferranti Mercury 电脑[1][3] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。 + +尼加德设计的这种模拟实验就是人们所知的“离散事件模型”,模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等”[2][4] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言”或者“蒙特卡洛编译器”的项目[3][5]。 + +达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[4][6] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。Simula 0 远不及后来的编程语言复杂,其基本语言结构是“stations”与“乘客customers”,这些结构可以用于针对具体某些离散事件网络建立模型。通过模拟飞机起飞的过程,尼加德和达尔给出了一个例子。[5][7] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“站”和“乘客”,也可以为更广泛的模拟建立模型。这就是后来 Simula 的第一个主要版本,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。 + +Simula I 没有“stations”和“乘客customers”的语言结构,但它可以通过使用“进程”再现这些结构。一个进程包含大量数据属性,这些属性与作为进程 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()`。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于协同程序的一种。Simula I 程序会将系统建立为一套进程的模型,在概念上这些进程并行运行。实际上,一个时间点上能称为“当前进程”的只有一个进程。但是,一旦某个进程暂停运行,那么下一个进程就会自动接替它的位置。开展模拟实验时,Simula 会预留出一份 “事件通知event notices” 的时间线,跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 + +尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[6][8] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。这种订单流程的概念被用以例证若干种不同的订单实例,不过这些实例并未调用任何方法。这类程序的主体仅仅是创建进程,并使其运行。 + +历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了挪威计算机中心工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和Burroughs 公司的 B5500 计算机上均可执行。[7][9] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。 + +奥斯陆大学教授 斯坦因·克罗达尔Stein Krogdahl 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是[一篇题为《记录处理》Record Handling的论文][10],作者是英国计算机科学家 查尔斯·安东尼·理查德·霍尔C.A.R. Hoare。[8][11] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,如果没有提起霍尔的大名,那绝对是不可能的。以下内容摘自霍尔的《记录处理》一文: + +> 该方案设想,在程序执行期间,计算机内部存在任意若干条记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。 + +> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。 + +霍尔在这片论文中并未提到子类的概念,但是达尔非常感谢霍尔,是他引导了两人发现了这一概念。[9][12] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 + +1967年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自 控制数据公司Control Data、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 + +Simula 67 编译器的开发由若干家供应商负责。Simula 用户协会The Association of Simula Users(ASU)也随后成立,并于每年举办年会。不久,Simula 67 的用户就遍及了23个国家。[11][15] + +### 21 世纪的 Simula 语言 + +人们至今还记得 Simula,是因为后来那些取代它的编程语言都受到了它的巨大影响。到了今天,你很难找到还在使用 Simula 写程序的人,但是这并不意味着 Simula 已经从这个世界上消失了。得益于 [GNU cim][16],人们在今天依然能够编写和运行 Simula 程序。 + +cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来: + +``` + + ! dogs.sim ; + Begin + Class Dog; + ! The cim compiler requires virtual procedures to be fully specified ; + Virtual: Procedure bark Is Procedure bark;; + Begin + Procedure bark; + Begin + OutText("Woof!"); + OutImage; ! Outputs a newline ; + End; + End; + + Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; + Begin + Procedure bark; + Begin + OutText("Yap yap yap yap yap yap"); + OutImage; + End; + End; + + Ref (Dog) d; + d :- new Chihuahua; ! :- is the reference assignment operator ; + d.bark; + End; + +``` + +你可以按照下面代码执行程序的编译与运行: + +``` + + $ cim dogs.sim + Compiling dogs.sim: + gcc -g -O2 -c dogs.c + gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim + $ ./dogs + Yap yap yap yap yap yap + +``` + +(你可能会注意到,cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。) + +这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。 + +不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67保留了进程模型,不过只有在使用 `进程`类Process class`模拟`块Simulation block 的时候才能调用。 + +为了表现出进程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 + +这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在一天的模拟时间内有着四个村民的村庄里会发生什么。 + +完整程序可以通过此处 [GitHub Gist][17] 的链接获取。 + +我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么: + +``` + + 1299.45: 王五饿了,要了鱼竿。 + 1299.45: 王五正在钓鱼。 + 1311.39: 王五钓到了一条鱼。 + 1328.96: 赵六饿了,要了鱼竿。 + 1328.96: 赵六正在钓鱼。 + 1331.25: 李四饿了,要了鱼竿。 + 1340.44: 赵六钓到了一条鱼。 + 1340.44: 李四饿着肚子等着鱼竿。 + 1340.44: 李四在等鱼竿的时候饿死了。 + 1369.21: 王五饿了,要了鱼竿。 + 1369.21: 王五正在钓鱼。 + 1379.33: 王五钓到了一条鱼。 + 1409.59: 赵六饿了,要了鱼竿。 + 1409.59: 赵六正在钓鱼。 + 1419.98: 赵六钓到了一条鱼。 + 1427.53: 王五饿了,要了鱼竿。 + 1427.53: 王五正在钓鱼。 + 1437.52: 王五钓到了一条鱼。 + +``` + +李四最后饿死了,但是他比张三要长寿,因为张三还没到上午7点就死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 + +这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。 + +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[12][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器”time manager。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 + +这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)不得不承认,尽管我们有了“时间管理器”,我们还是无法实现希基在解释有必要搞清楚程序中的时间概念时所提出的设想。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 + +_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_ + +_TwoBitHistory 文章回顾……_ + +> 嗨,大家好!很遗憾,我最近没有时间写新文章,但是我刚刚更新了我的 RSS 记录,整合了目前为止我私下对一些关键人物的采访,比如 Ramanathan Guha 和 Dan Libby。 +> +> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22] + + 1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, . [↩︎][23] + + 2. Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24]. [↩︎][25] + + 3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, . [↩︎][26] + + 4. ibid. [↩︎][27] + + 5. Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, . [↩︎][28] + + 6. Dahl and Nygaard (1966), 676. [↩︎][29] + + 7. Dahl and Nygaard (1978), 257. [↩︎][30] + + 8. Krogdahl, 3. [↩︎][31] + + 9. Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, . [↩︎][32] + + 10. Dahl and Nygaard (1978), 265. [↩︎][33] + + 11. Holmevik. [↩︎][34] + + 12. Krogdahl, 4. [↩︎][35] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/01/31/simula.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[校对者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]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey +[2]: https://twobithistory.org/images/river.jpg +[3]: tmp.2ZIthXB4S6#fn:1 +[4]: tmp.2ZIthXB4S6#fn:2 +[5]: tmp.2ZIthXB4S6#fn:3 +[6]: tmp.2ZIthXB4S6#fn:4 +[7]: tmp.2ZIthXB4S6#fn:5 +[8]: tmp.2ZIthXB4S6#fn:6 +[9]: tmp.2ZIthXB4S6#fn:7 +[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf +[11]: tmp.2ZIthXB4S6#fn:8 +[12]: tmp.2ZIthXB4S6#fn:9 +[13]: tmp.2ZIthXB4S6#fn:10 +[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf +[15]: tmp.2ZIthXB4S6#fn:11 +[16]: https://www.gnu.org/software/cim/ +[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96 +[18]: tmp.2ZIthXB4S6#fn:12 +[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html +[20]: https://twitter.com/TwoBitHistory +[21]: https://twobithistory.org/feed.xml +[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw +[23]: tmp.2ZIthXB4S6#fnref:1 +[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf +[25]: tmp.2ZIthXB4S6#fnref:2 +[26]: tmp.2ZIthXB4S6#fnref:3 +[27]: tmp.2ZIthXB4S6#fnref:4 +[28]: tmp.2ZIthXB4S6#fnref:5 +[29]: tmp.2ZIthXB4S6#fnref:6 +[30]: tmp.2ZIthXB4S6#fnref:7 +[31]: tmp.2ZIthXB4S6#fnref:8 +[32]: tmp.2ZIthXB4S6#fnref:9 +[33]: tmp.2ZIthXB4S6#fnref:10 +[34]: tmp.2ZIthXB4S6#fnref:11 +[35]: tmp.2ZIthXB4S6#fnref:12 From 867e32768de8181f20cd6f5699e89c4b893355eb Mon Sep 17 00:00:00 2001 From: hanszhao80 <155320754@qq.com> Date: Sun, 5 Jun 2022 16:04:54 +0800 Subject: [PATCH 034/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?tech]20210101=20Djinn-=20A=20Code=20Generator=20and=20Templatin?= =?UTF-8?q?g=20Language=20Inspired=20by=20Jinja2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...de Generator and Templating Language Inspired by Jinja2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md b/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md index d903ef5abf..f5849ac6b2 100644 --- a/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md +++ b/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hanszhao80) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -236,7 +236,7 @@ via: https://theartofmachinery.com/2021/01/01/djinn.html 作者:[Simon Arneaud][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[hanszhao80](https://github.com/hanszhao80) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 70b31478a384b3c2ecb4ecf6a2bbf587ecd2f733 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 5 Jun 2022 16:15:19 +0800 Subject: [PATCH 035/231] RP @geekpi https://linux.cn/article-14676-1.html --- ...e Learning- Classification Using Python.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) rename {translated/tech => published}/20220525 Machine Learning- Classification Using Python.md (65%) diff --git a/translated/tech/20220525 Machine Learning- Classification Using Python.md b/published/20220525 Machine Learning- Classification Using Python.md similarity index 65% rename from translated/tech/20220525 Machine Learning- Classification Using Python.md rename to published/20220525 Machine Learning- Classification Using Python.md index 591bdb75f1..0ae672fac4 100644 --- a/translated/tech/20220525 Machine Learning- Classification Using Python.md +++ b/published/20220525 Machine Learning- Classification Using Python.md @@ -4,18 +4,19 @@ [#]: collector: "lkxed" [#]: translator: "geekpi" [#]: reviewer: "turbokernel" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14676-1.html" 机器学习:使用 Python 进行分类 ====== -在机器学习 (ML) 中,分析一组数据以预测结果。 Python 被认为是 ML 的最佳编程语言选择之一。在本文中,我们将讨论使用 Python 进行分类的机器学习。 + +> 机器学习(ML)就是,分析一组数据以预测结果。Python 被认为是 ML 的最佳编程语言选择之一。在本文中,我们将讨论使用 Python 进行分类的机器学习。 ![machine-learning-classification][1] 假设你想教孩子区分苹果和橙子。有多种方法可以做到这一点。你可以让孩子触摸这两种水果,让他们熟悉形状和柔软度。你还可以向她展示苹果和橙子的多个例子,以便他们可以直观地发现差异。这个过程的技术等价物被称为机器学习。 -机器学习教计算机解决特定问题,并通过经验变得更好。这里讨论的示例是一个分类问题,其中机器被赋予各种标记示例,并期望使用它从标记样本中获得的知识来标记未标记样本。机器学习问题也可以采用回归的形式,其中期望根据已知样本及其解决方案来预测给定问题的实值解决方案。分类和回归被广泛称为监督学习。机器学习也可以是无监督的,机器识别未标记数据中的模式,并形成具有相似模式的样本集群。机器学习的另一种形式是强化学习,机器通过犯错从环境中学习。 +机器学习教计算机解决特定问题,并通过经验变得更好。这里讨论的示例是一个分类问题,其中机器被赋予各种标记示例,并期望使用它从标记样本中获得的知识来对未标记样本进行标记。机器学习问题也可以采用回归的形式,其中期望根据已知样本及其解决方案来预测给定问题的实值real-valued解决方案。分类Classification回归Regression被广泛称为监督学习supervised learning。机器学习也可以是无监督unsupervised的,机器识别未标记数据中的模式,并形成具有相似模式的样本集群。机器学习的另一种形式是强化学习reinforcement learning,机器通过犯错从环境中学习。 ### 分类 @@ -23,41 +24,40 @@ 在该表中,最后一列的值,即贷款批准,预计将基于其他变量进行预测。在接下来的部分中,我们将学习如何使用 Python 训练和评估分类器。 -| - | - | - | - | - | -| :- | :- | :- | :- | :- | | 年龄 | 信用等级 | 工作 | 拥有房产 | 贷款批准 | +| :- | :- | :- | :- | :- | | 35 | 好 | 是 | 是 | 是 | | 32 | 差 | 是 | 不 | 不 | | 22 | 一般 | 不 | 不 | 不 | | 42 | 好 | 是 | 不 | 是 | -表格 1 +*表 1* ### 训练和评估分类器 -为了训练分类器,我们需要一个包含标记示例的数据集。尽管本节不涉及清理数据的过程,但建议你在将数据集输入分类器之前阅读各种数据预处理和清理技术。为了在 Python 中处理数据集,我们将导入 pandas 包和 data frame 结构。然后,你可以从多种分类算法中进行选择,例如决策树、支持向量分类器、随机森林、XG boost、ADA boost 等。我们将看看随机森林分类器,它是使用多个决策树形成的集成分类器。 +为了训练分类器classifier,我们需要一个包含标记示例的数据集。尽管本节不涉及清理数据的过程,但建议你在将数据集输入分类器之前阅读各种数据预处理和清理技术。为了在 Python 中处理数据集,我们将导入 `pandas` 包和数据帧DataFrame结构。然后,你可以从多种分类算法中进行选择,例如决策树decision tree支持向量分类器support vector classifier随机森林random forest、XG boost、ADA boost 等。我们将看看随机森林分类器,它是使用多个决策树形成的集成分类器。 ``` from sklearn.ensemble import RandomForestClassifier from sklearn import metrics - + classifier = RandomForestClassifier() - + #creating a train-test split with a proportion of 70:30 X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33) - -classifier.fit(X_train, y_train) #train the classifier on the training set - -y_pred = classifier.predict(X_test) #evaluate the classifier on unknown data - -print(“Accuracy: “, metrics.accuracy_score(y_test, y_pred)) #compare the predictions with the actual values in the test set + +classifier.fit(X_train, y_train) # 在训练集上训练分类器 + +y_pred = classifier.predict(X_test) # 用未知数据评估分类器 + +print("Accuracy: ", metrics.accuracy_score(y_test, y_pred)) # 用测试计划中的实际值比较准确率 ``` 虽然这个程序使用准确性作为性能指标,但应该使用多种指标的组合,因为当测试集不平衡时,准确性往往会产生非代表性的结果。例如,如果模型对每条记录都给出了相同的预测,而用于测试模型的数据集是不平衡的,即数据集中的大多数记录与模型预测的类别相同,我们就会得到很高的准确率。 ### 调整分类器 -调优是指修改模型的超参数值以提高其性能的过程。超参数是可以改变其值以改进算法的学习过程的参数。 +调优是指修改模型的超参数hyperparameter值以提高其性能的过程。超参数是可以改变其值以改进算法的学习过程的参数。 以下代码描述了随机搜索超参数调整。在此,我们定义了一个搜索空间,算法将从该搜索空间中选择不同的值,并选择产生最佳结果的那个: @@ -71,8 +71,8 @@ grid = {‘min_samples_split’ : min_samples_split, ‘min_samples_leaf’ : mi classifier = RandomizedSearchCV(classifier, grid, n_iter = 100) -#n_iter represents the number of samples to extract from the search space -#result.best_score and result.best_params_ can be used to obtain the best performance of the model, and the best values of the parameters +# n_iter 代表从搜索空间提取的样本数 +# result.best_score 和 result.best_params_ 可以用来获得模型的最佳性能,以及参数的最佳值 classifier.fit(X_train, y_train) ``` @@ -81,7 +81,7 @@ classifier.fit(X_train, y_train) 你也可以使用多个分类器和它们的预测来创建一个模型,根据各个预测给出一个预测。这个过程(只考虑为每个预测投票的分类器的数量)被称为硬投票。软投票是一个过程,其中每个分类器产生一个给定记录属于特定类别的概率,而投票分类器产生的预测是获得最大概率的类别。 -A code snippet for creating a soft voting classifier is given below: +下面给出了一个创建软投票分类器的代码片段: ``` soft_voting_clf = VotingClassifier( From 9d4361059062e8dd95031b4c6797061ce444da7a Mon Sep 17 00:00:00 2001 From: Peaksol <1244050218@qq.com> Date: Sun, 5 Jun 2022 17:18:44 +0800 Subject: [PATCH 036/231] Update 20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md --- ...s! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md index a7e0d70e42..0e3df3c66c 100644 --- a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md +++ b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md @@ -197,7 +197,7 @@ via: https://itsfoss.com/duckduckgo-easter-eggs/ 作者:[sreenath][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Peaksol](https://github.com/TravinDreek) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9ad536179a62cdab0b95298fbeae98abcea15e03 Mon Sep 17 00:00:00 2001 From: Peaksol <1244050218@qq.com> Date: Sun, 5 Jun 2022 19:37:28 +0800 Subject: [PATCH 037/231] Update 20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md --- ...ou Can Do With DuckDuckGo Search Engine.md | 129 +++++++++--------- 1 file changed, 63 insertions(+), 66 deletions(-) diff --git a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md index 0e3df3c66c..535264b4a6 100644 --- a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md +++ b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md @@ -7,190 +7,187 @@ [#]: publisher: " " [#]: url: " " -Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine +隐藏功能!在 DuckDuckGo 搜索引擎中,你可以做这 25 件有趣的事情 ====== -DuckDuckGo is one of the alternative search engines that is less privacy intruding than the omnipresent Google. +比起无处不在的 Google,[有些搜索引擎替代品更加尊重隐私][1],而 DuckDuckGo 就是其中之一。 -DuckDuckGo is one of the [alternative search engines that is less privacy intruding][1] than the omnipresent Google. +最近,这个搜索引擎有了很大的改进,搜索一般网页十分顺畅。在搜索本地地点方面,则还远不及 Google。 -It has improved a lot lately and works quite satisfactorily for general web search. It is nowhere close to Google when it comes to local search. +不过,DuckDuckGo(其爱称为 DDG)有一些很酷的功能,大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。 -However, DuckDuckGo (fondly nicknamed DDG) has some cool features most users are not aware of. If you are an ardent DDG fan, you may enjoy enhancing your search experience with these tricks. +### 1. 跳转特定网页 -### 1. Jump on a specific website +在你最喜欢的网站名称前输入 ! 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。 -Type ! before your favorite website name and directly enter the website. This is like the ‘feeling lucky’ feature of Google but in DDG terms, it’s called ‘bangs.’ - -There are short forms for the websites, which will be suggested when we start typing. +网站有缩写,开始输入时便会提示。 ![duckduckgo bang feature][2] -Entering the search term just after the website name will land you on the required result from that website. +在网站名后面输入搜索词,就可以直接抵达那个网站的搜索结果处。 -### 2. Convert text to ASCII +### 2. 文本转 ASCII -Figlet is one of the [fun Linux commands][3]. It converts any text into a decorated ASCII format. +Figlet 是一个[有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。 -Type **figlet** before any search term; it will print its ASCII output. No need to open the terminal. +在任意搜索词前输入 **figlet**,就会显示 ASCII 输出。无需打开终端。 ![Figlet in DDG][4] -### 3. Check social media status +### 3. 检查社交媒体的状态 -Use ‘@’ in front of the proper twitter name of someone will show their status (followers etc.). +在某个人的 Twitter 名前加上 ‘@’,就会显示 TA 的状态(关注者等)。 ![Itsfoss Twitter][5] -### 4. Generate a strong password +### 4. 生成强密码 -Type ‘password’ followed by the number of characters to be included and it will generate a strong, unique password for you. +输入 ‘password’ 并加上需要的字符数,就可以生成一个独特的强密码。 ![Generating password in DuckDuckGo][6] -### 5. Generate Random Passphrase +### 5. 生成随机密码短语 -Type ‘random passphrase’ to generate a passphrase, usually 4 words long. +输入 ‘random passphrase’ 可生成一段密码短语,通常长度为 4 个词。 ![Random Passphrase][7] -### 6. Get a cheatsheet +### 6. 获取一份速查表 -Type cheatsheet after the term whose cheatsheet you want. If there is a cheat sheet for the searched term, it will show it immediately on the search page. +在需要看速查表的搜索词后面,可输入 cheatsheet。如果要搜索的东西有速查表,就会立即显示在搜索页面。 ![Vim Cheatsheet][8] -### 7. Get color from the color code +### 7. 通过色码获取颜色 -Type ‘color’ followed by the hex code of the color you want to check and it will show what that color looks like. +输入 ‘color’ 并加上你想查的颜色的十六进制码,便可显示这个颜色。 ![Color][9] -### 8. Generate a random number +### 8. 生成随机数 -Searching ‘random number’ will output a random number between 0 and 1 +搜索 ‘random number’ 会输出一个 0 到 1 之间的随机数。 ![Random Number][10] -You can also specify the range to look for. +你也可以指定需要的范围。 ![Random Number between 1 and 1000][11] -### 9. Convert to binary and other formats +### 9. 转换为二进制等形式 -Type a binary number and append it with ‘binary’ will convert it from binary to decimal +输入一个二进制数并加上 ‘binary’,可将其从二进制转换为十进制。 ![Binary to Decimal][12] -Similarly, it works for hexadecimal and oct, but I am confused about their logic. +类似地,它也能用于十六禁止和八进制,但我不清楚它们的处理逻辑。 -### 10. Find rhyming words +### 10. 寻找韵词 -Type ‘what rhymes with ‘ followed by the word you want to get rhymes of. Helps with your poetry skills, no? +输入 ‘what rhymes with ’ 并带上要找同韵词的词语。作诗能力变强了,对吧? ![What rhymes with rain][13] -### 11. Get Ramanujan number, Pi, and other constants +### 11. 获取拉马努金数、圆周率等常数 -Type the name of the constant whose value you want and you get it right in the search result page. +输入想获取数值的常数名,便可在搜索结果中看到它。 ![Ramanujan Number][14] -### 12. Check who is currently in space +### 12. 查询现在谁在太空中 -Type ‘people in space’ and get the list of those currently in space. It also shows how long they have been in space. +输入 ‘people in space’ 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。 ![People in Space][15] -### 13. Check if a website is down +### 13. 查询网页是否无法访问 -If you want to know if a particular website is down for you or for everyone, just use the “is xyz.com is down” search query. +如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 “is xyz.com down”。 ![Is down?][16] -### 14. Get quotes on certain topics +### 14. 获取特定话题的名言 -Type a word followed by quotes, and it will give quotes related to that word. +输入一个词并带上 quotes,就会显示与这个词相关的名言。 ![Get quotes in DDG][17] -### 15. Get Placeholder texts +### 15. 获取占位文本 -Search for ‘lorem ipsum’ and get 5 paragraphs of placeholder texts. Useful for web developers perhaps. +搜索 ‘lorem ipsum’ 就可以获取 5 段占位文本。对 Web 开发者应该会有用。 ![Lorem ipsum][18] -### 16. Get the calendar of any month +### 16. 获取任意月份的日历 -Type calendar followed by day, month, and year and it gives you an interactive calendar of that month. +在年、月、日后面输入 calendar,就会为你显示该月份的交互式日历。 ![Calendar][19] -### 17. Generate QR code +### 17. 生成二维码 -Search ‘qr’ followed by any text, be it a link or anything, will generate the respective QR Code. +在文字、链接等后面输入 ‘qr’,就会生成对应的二维码。 ![QRCode][20] -### 18. Get some CSS Animations +### 18. 获取一些 CSS 动画 -Search for ‘css animations’ to get some CSS animation examples. +搜索 ‘css animations’ 以获取一些 CSS 动画例子。 ![CSS Animations][21] -### 19. Expand a shortened link +### 19. 展开短链接 -Got a bitly or some other shortened link but not sure where it takes you. Instead of landing on a spammy website, expand the shortened URL and see the actual website URL. +如果有一个 Bitly 链接或其他短链接,但不确定它指向哪里,不必再跳转到充满垃圾信息的网页了,只需展开短链接,看看真正的网址。 -Use the keyword expand followed by the shortened URL and it will show the actual destination URL. +在短链接后面输入关键词 expand,就会显示真正的目标 URL。 ![Expand Link][22] -### 20. Get HTML codes for special characters +### 20. 获取特殊字符的 HTML 代码 -Search ‘html chars’ and get a very long list of HTML entities and their description, if pressed show more in the result +搜索 ‘html chars’,可以获取一份很长的列表,上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。 ![HTML Chars][23] -### 21. Why should I use this? +### 21. 我用这东西干啥? -This one is pretty useless. If you enter the term “why should I use this?” it shows “cause it’s awesome” at the top of the search result page. Clearly, DuckDuckGo is referring to itself. +这功能没什么用。如果你输入 “why should I use this?” ,它就会在搜索结果顶部显示 “cause it's awesome”。显然,DuckDuckGo 在说他自己。 ![Why should I use this?][24] -### 22. Convert case +### 22. 转换大小写 -This works in two cases. lowercase will show the lowered case result +大小写都可转换。lowercase <大写搜索词> 就会显示小写的结果 ![Lowercase][25] -uppercase will show an uppercase result. +uppercase <小写搜索词> 就会显示大写的结果。 ![Uppercase][26] -### 23. Encode a URL +### 23. 编码 URL -Search ‘encode’ followed by a URL will give an encoded result +搜索 ‘encode’ 并加上 URL,就会给出编码后的结果 ![URL Encode][27] ### 24. Motherboard -Search for ‘Motherboard’, and you can see that the logo of DuckDuckGo on the left side is changed. It shows a random logo from the selection of a few. +搜索 ‘Motherboard’就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。 ![Motherboard][28] -### 25. Get HTML Color Codes +### 25. 获取 HTML 色码 -Search for ‘color codes’ and you get a chart of colors. Again, this one is more for web developers and designers. +搜索 ‘color codes’ 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。 ![Color Codes][29] -### There are many more… +### 还有很多别的··· -My teammate Sreenath came up with this post idea. He says there are more such ‘easter eggs’ in DuckDuckGo and I believe him. But it won’t be feasible to list them all here. - -If you know more such interesting DDG search features, share them in the comments. If you found your next favorite search feature, do mention that too. +我的伙伴 Sreenath 想到本贴的主意。他说 DuckDuckGo 中还有许多 “彩蛋”,我觉得没错。但全部列出来有诸多不便。 +如果你知道更多这样有趣的 DDG 搜索功能,请在评论中分享。如果你又发现了你喜欢的搜索功能,也提出来吧。 -------------------------------------------------------------------------------- via: https://itsfoss.com/duckduckgo-easter-eggs/ From e0ca4fec56ad1776f11461211a15b7d2ce6afa87 Mon Sep 17 00:00:00 2001 From: Peaksol <1244050218@qq.com> Date: Sun, 5 Jun 2022 19:38:27 +0800 Subject: [PATCH 038/231] missing new line --- ...es! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md index 535264b4a6..64780494e4 100644 --- a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md +++ b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md @@ -188,6 +188,7 @@ uppercase <小写搜索词> 就会显示大写的结果。 我的伙伴 Sreenath 想到本贴的主意。他说 DuckDuckGo 中还有许多 “彩蛋”,我觉得没错。但全部列出来有诸多不便。 如果你知道更多这样有趣的 DDG 搜索功能,请在评论中分享。如果你又发现了你喜欢的搜索功能,也提出来吧。 + -------------------------------------------------------------------------------- via: https://itsfoss.com/duckduckgo-easter-eggs/ From 954b396a5b2e5fc03da80abae73ec752083e1978 Mon Sep 17 00:00:00 2001 From: wangzequan <46700056+hadisi1993@users.noreply.github.com> Date: Sun, 5 Jun 2022 22:10:10 +0800 Subject: [PATCH 039/231] Update 20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申领原文 --- ...2 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md index 7e41d5cefa..baa93e9243 100644 --- a/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md +++ b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "hadisi1993" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From dd0c6ae901db888cb9d8adf886a8251ef816f315 Mon Sep 17 00:00:00 2001 From: aREversez <53844261+aREversez@users.noreply.github.com> Date: Sun, 5 Jun 2022 22:25:11 +0800 Subject: [PATCH 040/231] Being translated by aREversez --- ...0220603 How to Install FFmpeg in Ubuntu and Other Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md index 6713d0f60f..58dcc9ab8d 100644 --- a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md +++ b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "aREversez" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -149,7 +149,7 @@ via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/ 作者:[Arindam][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[aREversez](https://github.com/aREversez) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8962fbfb0e9c88ed00dfed861b29f6d0024a7a0c Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 6 Jun 2022 08:52:25 +0800 Subject: [PATCH 041/231] translated --- ... linking libraries while compiling code.md | 137 ----------------- ... linking libraries while compiling code.md | 138 ++++++++++++++++++ 2 files changed, 138 insertions(+), 137 deletions(-) delete mode 100644 sources/tech/20220530 Dynamically linking libraries while compiling code.md create mode 100644 translated/tech/20220530 Dynamically linking libraries while compiling code.md diff --git a/sources/tech/20220530 Dynamically linking libraries while compiling code.md b/sources/tech/20220530 Dynamically linking libraries while compiling code.md deleted file mode 100644 index b4192ccfa2..0000000000 --- a/sources/tech/20220530 Dynamically linking libraries while compiling code.md +++ /dev/null @@ -1,137 +0,0 @@ -[#]: subject: "Dynamically linking libraries while compiling code" -[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Dynamically linking libraries while compiling code -====== -Compiling software gives you a lot of flexibility in how you run your system. The LD_LIBRARY_PATH variable, along with the -L and -l GCC options, are components of that flexibility. - -![women programming][1] - -Image by: WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0 - -Compiling software is something that developers do a lot, and in open source some users even choose to do it themselves. Linux podcaster Dann Washko calls source code the "universal package format" because it contains all the components necessary to make an application run on any platform. Of course, not all source code is written for all systems, so it's only "universal" within the subset of targeted systems, but the point is that source code is extremely flexible. With open source, you can decide how code is compiled and run. - -When you're compiling code, you're usually dealing with multiple source files. Developers tend to keep different classes or modules in separate files so that they can be maintained separately, and possibly even used by different projects. But when you're compiling these files, many of them get compiled into a single executable. - -This is usually done by creating shared libraries, and then dynamically linking back to them from the executable. This keeps the executable small by keeping modular functions external, and ensures that libraries can be updated independently of the applications that use them. - -### Locating a shared object during compilation - -When you're [compiling with GCC][2], you usually need a library to be installed on your workstation for GCC to be able to locate it. By default, GCC assumes that libraries are in a system library path, such as `/lib64` and `/usr/lib64`. However, if you're linking to a library of your own that's not yet installed, or if you need to link to a library that's not installed in a standard location, then you have to help GCC find the files. - -There are two options significant for finding libraries in GCC: - -* -L (capital L) adds an additional library path to GCC's search locations. -* -l (lowercase L) sets the name of the library you want to link against. - -For example, suppose you've written a library called `libexample.so`, and you want to use it when compiling your application `demo.c`. First, create an object file from `demo.c` : - -``` -$ gcc -I ./include -c src/demo.c -``` - -The `-I` option adds a directory to GCC's search path for header files. In this example, I assume that custom header files are in a local directory called `include`. The `-c` option prevents GCC from running a linker, because this task is only to create an object file. And that's exactly what happens: - -``` -$ ls -demo.o   include/   lib/    src/ -``` - -Now you can use the `-L` option to set a path for your library, and compile: - -``` -$ gcc -L`pwd`/lib -o myDemo demo.o -lexample -``` - -Notice that the `-L` option comes *before* the `-l` option. This is significant, because if `-L` hasn't been added to GCC's search path before you tell GCC to look for a non-default library, GCC won't know to search in your custom location. The compilation succeeds as expected, but there's a problem when you attempt to run it: - -``` -$ ./myDemo -./myDemo: error while loading shared libraries: -libexample.so: cannot open shared object file: -No such file or directory -``` - -### Troubleshooting with ldd - -The `ldd` utility prints shared object dependencies, and it can be useful when troubleshooting issues like this: - -``` -$ ldd ./myDemo -        linux-vdso.so.1 (0x00007ffe151df000) -        libexample.so => not found -        libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000) -        /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000) -``` - -You already knew that `libexample` couldn't be located, but the `ldd` output at least affirms what's expected from a *working* library. For instance, `libc.so.6` has been located, and `ldd` displays its full path. - -### LD_LIBRARY_PATH - -The `LD_LIBRARY_PATH` [environment variable][3] defines the path to libraries. If you're running an application that relies on a library that's not installed to a standard directory, you can add to the system's library search path using `LD_LIBRARY_PATH`. - -There are several ways to set environment variables, but the most flexible is to place them before you run a command. Look at what setting `LD_LIBRARY_PATH` does for the `ldd` command when it's analyzing a "broken" executable: - -``` -$ LD_LIBRARY_PATH=`pwd`/lib ldd ./ -   linux-vdso.so.1 (0x00007ffe515bb000) -   libexample.so => /tmp/Demo/lib/libexample.so (0x0000... -   libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000) -   /lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000) -``` - -It applies just as well to your custom command: - -``` -$ LD_LIBRARY_PATH=`pwd`/lib myDemo -hello world! -``` - -If you move the library file or the executable, however, it breaks again: - -``` -$ mv lib/libexample.so ~/.local/lib64 -$ LD_LIBRARY_PATH=`pwd`/lib myDemo -./myDemo: error while loading shared libraries... -``` - -To fix it, you must adjust the `LD_LIBRARY_PATH` to match the library's new location: - -``` -$ LD_LIBRARY_PATH=~/.local/lib64 myDemo -hello world! -``` - -### When to use LD_LIBRARY_PATH - -In most cases, `LD_LIBRARY_PATH` isn't a variable you need to set. By design, libraries are installed to `/usr/lib64` and so applications naturally search it for their required libraries. You may need to use `LD_LIBRARY_PATH` in two cases: - -* You're compiling software that needs to link against a library that itself has just been compiled and has not yet been installed. Good build systems, such as [Autotools][4] and [CMake][5], can help handle this. -* You're bundling software that's designed to run out of a single directory, with no install script or an install script that places libraries in non-standard directories. Several applications have releases that a Linux user can download, copy to `/opt`, and run with "no install." The `LD_PATH_LIBRARY` variable gets set through wrapper scripts so the user often isn't even aware it's been set. - -Compiling software gives you a lot of flexibility in how you run your system. The `LD_LIBRARY_PATH` variable, along with the `-L` and `-l` GCC options, are components of that flexibility. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/compile-code-ldlibrarypath - -作者:[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/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png -[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs -[3]: https://opensource.com/article/19/8/what-are-environment-variables -[4]: https://opensource.com/article/19/7/introduction-gnu-autotools -[5]: https://opensource.com/article/21/5/cmake diff --git a/translated/tech/20220530 Dynamically linking libraries while compiling code.md b/translated/tech/20220530 Dynamically linking libraries while compiling code.md new file mode 100644 index 0000000000..b9f2239cfc --- /dev/null +++ b/translated/tech/20220530 Dynamically linking libraries while compiling code.md @@ -0,0 +1,138 @@ +[#]: subject: "Dynamically linking libraries while compiling code" +[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +编译代码时动态链接库 +====== +编译软件在你如何运行你的系统方面给你很大的灵活性。LD_LIBRARY_PATH 变量,以及 GCC 的 -L 和 -l 选项,是这种灵活性的组成部分。 + +![women programming][1] + +图片提供:WOCinTech Chat。由 Opensource.com 修改。CC BY-SA 4.0 + +编译软件是开发者经常做的事情,在开源中,一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。 + +当你在编译代码时,你通常要处理多个源文件。开发人员倾向于将不同的类或模块放在不同的文件中,这样它们可以被单独维护,甚至可能被不同的项目使用。但当你编译这些文件时,许多文件会被编译成一个可执行文件。 + +这通常是通过创建共享库来完成的,然后从可执行文件中动态链接回它们。这样可以通过保持模块化功能的外部性来保持可执行文件的小型化,并确保库可以独立于使用它们的应用而被更新。 + +### 在编译过程中定位一个共享对象 + +当你[用 GCC 编译][2]时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下,GCC 假定库在系统库路径中,例如 `/lib64` 和 `/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。 + +有两个选项对于在 GCC 中寻找库很重要: + +* -L(大写字母 L)在 GCC 的搜索位置上增加一个额外的库路径。 +* -l(小写字母 L)设置你要链接的库的名字。 + +例如,假设你写了一个叫做 `libexample.so` 的库,并且你想在编译你的应用 `demo.c` 时使用它。首先,从 `demo.c` 创建一个对象文件: + +``` +$ gcc -I ./include -c src/demo.c +``` + +`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。而这正是所发生的: + +``` +$ ls +demo.o include/ lib/ src/ +``` + +现在你可以使用 `-L` 选项为你的库设置一个路径,然后进行编译: + +``` +$ gcc -L`pwd`/lib -o myDemo demo.o -lexample +``` + +注意,`-L` 选项在 `-l` 选项*之前*。这很重要,因为如果在你告诉 GCC 查找非默认库之前没有将 `-L` 添加到 GCC 的搜索路径中,GCC 就不知道要在你的自定义位置上搜索。编译成功了,但当你试图运行它时,却出现了问题: + +``` +$ ./myDemo +./myDemo: error while loading shared libraries: +libexample.so: cannot open shared object file: +No such file or directory +``` + +### 用 ldd 排除故障 + +`ldd` 工具可以打印出共享对象的依赖关系,它在排除类似问题时很有用: + +``` +$ ldd ./myDemo + linux-vdso.so.1 (0x00007ffe151df000) + libexample.so => not found + libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000) + /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000) +``` + +你已经知道`libexample` 不能被定位,但 `ldd` 输出至少确认了对*工作*库的期望。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。 + +### LD_LIBRARY_PATH + +`LD_LIBRARY_PATH` [环境变量][3]定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。 + +有几种设置环境变量的方法,但最灵活的是在运行命令前放置环境变量。看看设置 `LD_LIBRARY_PATH` 对 `ldd` 命令在分析一个“损坏”的可执行文件时的作用: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib ldd ./ + linux-vdso.so.1 (0x00007ffe515bb000) + libexample.so => /tmp/Demo/lib/libexample.so (0x0000... + libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000) + /lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000) +``` + +这也同样适用于你的自定义命令: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +hello world! +``` + +然而,如果你移动库文件或可执行文件,它又会失效: + +``` +$ mv lib/libexample.so ~/.local/lib64 +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +./myDemo: error while loading shared libraries... +``` + +要修复它,你必须调整 `LD_LIBRARY_PATH` 以匹配库的新位置: + +``` +$ LD_LIBRARY_PATH=~/.local/lib64 myDemo +hello world! +``` + +### 何时使用 LD_LIBRARY_PATH + +在大多数情况下,`LD_LIBRARY_PATH` 不是你需要设置的变量。按照设计,库安装到 `/usr/lib64` 中,因此应用自然会在其中搜索所需的库。在两种情况下,你可能需要使用 `LD_LIBRARY_PATH`: + +* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。好的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。 + +* 你正在使用设计为在单个目录之外运行的软件,没有安装脚本或将库放置在非标准目录中的安装脚本。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。 + +编译软件为你在运行系统方面提供了很大的灵活性。`LD_LIBRARY_PATH` 变量以及 `-L` 和 `-l` GCC 选项是这种灵活性的组成部分。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/compile-code-ldlibrarypath + +作者:[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/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png +[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs +[3]: https://opensource.com/article/19/8/what-are-environment-variables +[4]: https://opensource.com/article/19/7/introduction-gnu-autotools +[5]: https://opensource.com/article/21/5/cmake From 1781f5a17250550e242ec0128702126ad716a2fe Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 6 Jun 2022 09:01:09 +0800 Subject: [PATCH 042/231] translating --- ... yay- error while loading shared libraries- libalpm.so.12.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md index 7808a3994d..2813ccf47f 100644 --- a/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md +++ b/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From ce80c8f2449dc3796efc99cfc7399002d9f423a3 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 6 Jun 2022 10:22:14 +0800 Subject: [PATCH 043/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220606=2010=20Best=20Ubuntu=20Apps=20for=20Everyone?= =?UTF-8?q?=20in=202022=20[Part=202].md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...untu Apps for Everyone in 2022 [Part 2].md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 sources/tech/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md diff --git a/sources/tech/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md b/sources/tech/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md new file mode 100644 index 0000000000..65fc52ec0f --- /dev/null +++ b/sources/tech/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md @@ -0,0 +1,249 @@ +[#]: subject: "10 Best Ubuntu Apps for Everyone in 2022 [Part 2]" +[#]: via: "https://www.debugpoint.com/2022/06/best-ubuntu-apps-2022-part2/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 Best Ubuntu Apps for Everyone in 2022 [Part 2] +====== +This article lists the top 10 best Ubuntu apps for different use cases in 2022. + +If you plan to migrate to Linux permanently, you should be happy knowing that there are thousands of applications that can compete with commercial or paid applications. Also, if you are a Windows user and using Linux first time, then you may not hear of those apps. + +Hence, in this article series, we are highlighting a set of Ubuntu apps at a time to increase collaboration and awareness among the user base. + +This is part 2 of the Ubuntu Apps series. + +### Best Ubuntu Apps in 2022 – Part 2 + +#### 1. OBS Studio + +The first application is the famous [streaming application][1] – OBS Studio. It is a free and open-source application primarily used for streaming over the internet. In addition, using this application, you can create a complex streaming project using multiple sources, overlay banners and more. + +Furthermore, thanks to its support of “Real-Time Messaging Protocol” (RTMP), you can use this app to stream on Facebook, YouTube, Twitch and another supported platform. + +This decade-old application is one of the best apps for Linux. + +![OBS Studio][2] + +You can learn more about OBS Studio here at the [official home page][3] and download or install it via the below methods. + +Via PPA in Ubuntu and related distribution: + +``` +sudo add-apt-repository ppa:obsproject/obs-studio +sudo apt update +sudo apt install obs-studio +``` + +If you wish for Flatpak, then [setup your system for Flatpak][4] and [install via this page][5]. + +For Arch Linux and others, [visit this page for more information.][6] + +#### 2. Inkscape + +The second application in this is the popular Inkscape application. Inkscape is a free and cross-platform vector graphics editor. It is primarily used to create scalable vector graphics. In addition, it is a world-class application which uses basic vector shapes such as rectangles, polygons, spirals and more. You can create world-class drawings using these primitive shapes and their additional tools (see below). + +Furthermore, you can also create [stunning animations][7] using Inkscape with sufficient skills. It is one of the must-have applications for artists. + +![Sample Image – credit-Inkscape][8] + +![Inkscape][9] + +You can learn more about Inkscape here at the [official home page][10] and download or install it via the below methods. + +Via PPA in Ubuntu and other Linux distributions: + +``` +sudo add-apt-repository ppa:inkscape.dev/stable +sudo apt update +sudo apt install inkscape +``` + +For other download methods, visit [this page][11]. + +#### 3. GIMP + +The GIMP aka GNU Image Manipulation Program is a raster graphics editor which is sometimes considered a debatable-[Photoshop alternative][12] in the Linux world. In addition, this two-decade-old application is perfect for basic to advanced image editing. Moreover, it supports layers, filters, decorations, and other advanced image editing features essential for a photography workflow. + +![GIMP Image Editor][13] + +A great way to learn more about GIMP is at the [official home page][14]and download or install via the below methods. + +The recommended way is Flatpak to get the latest GIMP version. You can set up[your system][15] for Flatpak and [click here to install][16]. + +For more download options, visit [this page][17]. + +#### 4. Spotify + +Spotify is a proprietary audio streaming and media services provider. It is one of the most extensive music streaming services, with over 400+ million monthly users. + +Firstly, to access the Spotify streaming service, you need a client. Secondly, If you are a mobile user, you can use the Spotify app from Google Play Store or Apple App Store. + +You can listen to millions of songs on your Linux desktop by installing the desktop client. For Linux distributions, you can install the Spotify client from various sources. + +![Spotify Client in Ubuntu][18] + +The recommended method for Ubuntu and other Linux is using the Snap package. You can install it via the below command. + +``` +snap install spotify +``` + +If you prefer the native deb package, you can install it using the below commands. + +``` +curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list +``` + +There is also an unofficial [Flatpak package available][19], which you can take advantage of. + +#### 5. SimpleScreen recorder + +The simplescreenrecorder is perhaps the best open-source screen recorder available. This application is straightforward to use and loaded with features. In addition, its unique 3-step approach to recording the screen which requires no learning at all. Moreover, you can select the entire screen, a window or a custom shape to record the screen. + +Furthermore, you can also specify the auto/video bit rate, audio source options and different output options. Finally, it is available to install in all Linux distributions. + +![SimpleScreenRecorder][20] + +The [official home page][21] contains more details about SimpleScreenRecorder, and you can download it using the below methods. + +Using the PPA commands below, you can install this application in Ubuntu and other related distributions. + +``` +sudo apt-get updatesudo apt-get install simplescreenrecorder +``` + +For additional download instructions, visit [this page][22]. + +#### 6. Calibre + +Calibre is a free and open-source e-book library management application available in Ubuntu, Linux Mint and other Linux platforms. It brings library management, e-book conversion, sync to your e-book devices and more unique features. Moreover, you can download news and other articles from the web and convert them to e-book formats using Calibre. In addition, it supports a wide range of e-book formats for management. Calibre is one of the best e-book management applications with all these features. + +![Calibre][23] + +A lot of documentation and tutorials are available on the [home page of Calibre][24], and you can download them using the below means. + +* [Download for Linux distributions][25] +* [Download for other operating systems][26] + +#### 7. Scribus + +Desktop publishing changed over the years. Today, there are several applications and web-based services available for desktop publishing. Scribus is one of the early free and open-source desktop publishing applications available for Linux distributions and other operating systems. In addition, it is based on Qt and brings an appealing user interface which you can learn in no time. Furthermore, it can be used by beginners to professionals to create stunning DTP pages. + +And it is still in active development. + +![Scribus][27] + +You can learn more about Scribus here at the [official home page][28] and download or install it via the below methods. + +Scribus is in the main repo for Ubuntu and other related distributions. You can run the below command to install. + +``` +sudo apt install scribus +``` + +For other download options, visit [this page][29]. + +#### 8. MyPaint + +The eighth application in this is MyPaint. MyPaint is a free and open-source drawing program for digital artists. MyPaint supports and can be used in pressure-sensitive tablets and devices. In addition, its unique distraction-free design lets you focus on the drawing instead of the application. Furthermore, it brings a real pencil and brushes emulation with a wide range of brushes, colours and layers. + +![MyPaint 2.0.1][30] + +For more information, visit the [official homepage][31] of MyPaint and download using the below methods. + +The recommended install method is Flatpak. You can set up your [system for Flatpak][32] and install it by [clicking here][33]. + +For other download options, visit [this page][34]. + +#### 9. LibreOffice + +If any professional Office suite comes close to the market leader Microsoft Office is the Document Foundation’s LibreOffice. It is the default Office suite for all Linux Distributions. It comes with a spreadsheet program (Calc), word processor (Writer), presentation (Impress) and Draw (for drawing). Moreover, it also brings a database system LibreOffice Base and Math to prepare mathematical formulas. + +In addition to that, LibreOffice features two editions. Firstly, the community edition is for the community and general uses and comes with the latest features and updates. The second edition is for business, and it’s called the enterprise edition. The enterprise edition is more stable and perfect for professional work. + +LibreOffice office suite is installed by default in Ubuntu. + +![LibreOffice 7.3.x Community Edition in Ubuntu 22.04 LTS Jammy Jellyfish][35] + +[LibreOffice’s official documentation][36] is vast, and you can go through them through any means, including its [friendly forum][37]. You can download LibreOffice [from here][38]. + +Also, if you are planning to upgrade LibreOffice, you can [visit our guide here][39]. + +#### 10. Cawbird + +If you are a heavy Twitter user, you may consider a desktop app. Cawbird is a desktop Twitter client for Linux distributions. Fork of the prior Corebird app (discontinued), Cawbird brings inline image, video preview, list support, etc. In addition, it can do a full-text search on Twitter and support multiple Twitter accounts. + +However, due to Twitter API limitations, it refreshes every two minutes and several other restrictions such as no notification for follows, unfollows, block, mute and other features. Twitter imposed these limitations. + +![Cawbird][40] + +Finally, you can download the Cawbird for all Linux distributions using the [link present here][41]. + +### Closing Notes + +This concludes part 2 of a 5-part series of best Ubuntu Apps in 2022. I expect you get to install and use some of these applications in Ubuntu and other distros for your daily work. Also, let me know which apps you prefer from this list in the comment box below. + +Finally, stay tuned for part 3 of this Ubuntu apps series. If you missed part 1, you could read it here – “[Essential Ubuntu Apps in 2022 – Part 1][42]“. + +Cheers. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/best-ubuntu-apps-2022-part2/ + +作者:[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://www.debugpoint.com/2022/02/live-streaming-applications-linux-2022/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/OBS-Studio.jpg +[3]: https://obsproject.com/ +[4]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[5]: https://flathub.org/apps/details/com.obsproject.Studio +[6]: https://obsproject.com/wiki/unofficial-linux-builds +[7]: https://inkscape.org/gallery/ +[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Sample-Image-credit-Inkscape.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2018/09/Inkscape-Running.png +[10]: https://inkscape.org/ +[11]: https://inkscape.org/release/ +[12]: https://www.debugpoint.com/2018/09/3-best-free-photoshop-alternatives-ubuntu-linux/ +[13]: https://www.debugpoint.com/wp-content/uploads/2018/09/GIMP-Running.png +[14]: https://www.gimp.org/ +[15]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[16]: https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref +[17]: https://www.gimp.org/downloads/ +[18]: https://www.debugpoint.com/wp-content/uploads/2022/06/Spotify-Client-in-Ubuntu.jpg +[19]: https://flathub.org/apps/details/com.spotify.Client +[20]: https://www.debugpoint.com/wp-content/uploads/2022/06/SimpleScreenRecorder.jpg +[21]: https://www.maartenbaert.be/simplescreenrecorder/ +[22]: https://www.maartenbaert.be/simplescreenrecorder/#download +[23]: https://www.debugpoint.com/wp-content/uploads/2019/11/Calibre.png +[24]: https://calibre-ebook.com/ +[25]: https://calibre-ebook.com/download_linux +[26]: https://calibre-ebook.com/download +[27]: https://www.debugpoint.com/wp-content/uploads/2022/06/Scribus.jpg +[28]: https://www.scribus.net/ +[29]: https://www.scribus.net/downloads/stable-branch/ +[30]: https://www.debugpoint.com/wp-content/uploads/2020/05/MyPaint-2.0.1.png +[31]: http://mypaint.org/ +[32]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[33]: https://flathub.org/repo/appstream/org.mypaint.MyPaint.flatpakref +[34]: http://mypaint.org/downloads/ +[35]: https://www.debugpoint.com/wp-content/uploads/2019/09/LibreOffice-7.3.x-Community-Edition-in-Ubuntu-22.04-LTS-Jammy-Jellyfish.jpg +[36]: https://help.libreoffice.org/latest/index.html +[37]: https://ask.libreoffice.org/ +[38]: https://www.libreoffice.org/download/download/ +[39]: https://www.debugpoint.com/2022/06/libreoffice-upgrade-update-latest/ +[40]: https://www.debugpoint.com/wp-content/uploads/2022/06/Cawbird.jpg +[41]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird +[42]: https://www.debugpoint.com/2022/05/essential-ubuntu-apps-2022-part-1/ From 6291c0b1bd8f70bca44ab15ba30939097584b1af Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 6 Jun 2022 10:23:45 +0800 Subject: [PATCH 044/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220605=20Contribute=20at=20the=20Fedora=20Linux=2037?= =?UTF-8?q?=20Test=20Week=20for=20Kernel=205.18.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dora Linux 37 Test Week for Kernel 5.18.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md diff --git a/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md b/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md new file mode 100644 index 0000000000..5eccf563f7 --- /dev/null +++ b/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md @@ -0,0 +1,48 @@ +[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18" +[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/" +[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Contribute at the Fedora Linux 37 Test Week for Kernel 5.18 +====== +![][1] + +The kernel team is working on final integration for Linux kernel 5.18. This version was just recently released, and will arrive soon in Fedora. As a result, the Fedora kernel and QA teams have organized a test week now through **Sunday, June 12, 2022.** Refer to the [wiki][2][page][3] for links to the test images you’ll need to participate. Read below for details. + +### How does a test week work? + +A test week is an event where anyone can help make sure changes in Fedora work well in an upcoming release. Fedora community members often participate, and the public is welcome at these events. If you’ve never contributed before, this is a perfect way to get started. + +To contribute, you only need to be able to do the following things: + +* Download test materials, which include some large files +* Read and follow directions step by step + +The [wiki page][4] for the kernel test day has a lot of good information on what and how to test. After you’ve done some testing, you can log your results in the test day [web][5][application][6]. If you’re available on or around the day of the event, please do some testing and report your results. We have a document which provides [all the steps][7] written. + +Happy testing, and we hope to see you on test day. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/ + +作者:[Sumantro Mukherjee][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://fedoramagazine.org/author/sumantrom/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg +[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week +[3]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week +[4]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week +[5]: https://testdays.fedoraproject.org/events/136 +[6]: https://testdays.fedoraproject.org/events/136 +[7]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/ From a9312cea47e7bfb0c506bbee422a4fc9aab3e0e5 Mon Sep 17 00:00:00 2001 From: wangzequan <46700056+hadisi1993@users.noreply.github.com> Date: Mon, 6 Jun 2022 11:16:22 +0800 Subject: [PATCH 045/231] Update and rename sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md to translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提交翻译 --- ...intain Timeshift Backup Tool as an XApp.md | 72 ------------------- ...intain Timeshift Backup Tool as an XApp.md | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md create mode 100644 translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md diff --git a/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md deleted file mode 100644 index baa93e9243..0000000000 --- a/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" -[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "hadisi1993" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Mint to Maintain Timeshift Backup Tool as an XApp -====== -Linux Mint takes over the development of ‘Timeshift’ backup/restore tool. You can now find it in its new GitHub repository. - -![linux mint][1] - -Timeshift is arguably the [best tool to back up and restore the Linux system][2]. - -Linux Mint also utilizes the tool to let users easily take snapshots before updates, and ensure hassle-free operation. - -Of course, that’s not the only thing that makes [Linux Mint potentially better than Ubuntu][3]. - -Unfortunately, the developer ([Tony George][4]) behind Timeshift can no longer maintain the project. The developer plans to focus on other projects instead. - -The Linux Mint team reached out to the developer to help the project in any capacity. And, they finalized to take over the development of Timeshift. - -So, now, the Linux Mint team will be responsible for new releases/fixes, and any development activity associated with Timeshift. - -### Adopting Timeshift as an XApp - -![][5] - -Linux Mint tends to maintain certain applications as an “XApp” to make sure that they work on various desktop environments and are not dependent on a particular desktop. - -Considering that they plan to adopt Timeshift as an XApp, you can expect the tool to continue offering the current look/functionality for a long time, irrespective of your desktop environment. - -Unlike some GNOME apps, which are usually turning into GNOME-only applications for the best experience. - -Timeshift is an essential backup/restore tool. So, Linux Mint taking over the development and maintaining it as an XApp sounds perfect! - -The translations for Timeshift are now done on [Launchpad][6], if you are curious. - -The [new GitHub repository][7] (forked by Linux Mint) can give you more details about the application and its latest development activity. - -You can also check out the official announcement for this in the [recent monthly blog post][8]. - -### Wrapping Up - -With Linux Mint as the maintainer of Timeshift, we could hope for more feature additions and improvements in the near future. - -What do you think about Linux Mint taking over the development of Timeshift as an XApp? You are welcome to share your thoughts on it in the comments below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-mint-timeshift/ - -作者:[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/06/linux-mint-time-shift.jpg -[2]: https://itsfoss.com/backup-restore-linux-timeshift/ -[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ -[4]: https://teejeetech.com/ -[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png -[6]: https://github.com/linuxmint/timeshift -[7]: https://github.com/linuxmint/timeshift -[8]: https://blog.linuxmint.com/?p=4323 diff --git a/translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md new file mode 100644 index 0000000000..22c4715891 --- /dev/null +++ b/translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md @@ -0,0 +1,72 @@ +[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" +[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "hadisi1993" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +## Linux Mint 将以XApp形式维护Timeshift备份工具 +====== +Linux Mint 接管了Timeshift备份/恢复工具的开发。你可以在它新的Github仓库中找到它。 + +![linux mint][1] +[Timeshift][2]是Linux系统中无可争议的最佳备份和恢复工具。 +Timeshift is arguably the [best tool to back up and restore the Linux system][2]. + +Linux Mint 也利用它帮助用户在系统更新时更方便地创建快照,确保快捷无碍的操作。 + +当然,这不是 [Linux Mint 可能比Ubuntu更好的唯一原因][3]。 + +不幸的是,Timeshift背后的开发者([Tony George][4])计划把注意力集中在其他项目上,将不再继续维护这个项目。 + +Linux Mint团队联系了这位开发者并愿意为这个项目提供任何可能的帮助。最终,它们接管了Timeshift的开发。 + +所以,现在Linux Mint团队会对Timeshift的发布和修复,以及任何与之相关的开发工作负责。 + +### 将Timeshift调整成XApp + +![][5] + +Linux Mint倾向于将某些应用作为“XApp”来维护,以确保它们能在各种不同的桌面环境下工作,不会依赖于某个特殊的桌面。 + +考虑到他们计划将Timeshift调整成一个XApp,你可以期待该工具在很长一段时间内维持当前的外观和功能,而不用顾虑你的桌面环境。 + +不像一些GMOME应用程序,为了获得最好的体验只支持GNOME应用。 + +Timeshift是一个基础的备份/恢复工具。所以,Linux Mint接管Timeshift的开发并将其维护为XApp的计划听上去相当完美! + +如果你好奇的话,那不妨告诉你,Timeshift的迁移已经在[Launchpad][6]上完成了。 + +新的[Github仓库][7](被Linux Mint fork的)可以告诉你这个应用的更多细节以及它最近的开发活动。 + +你也可以在最近[The Linux Mint blog][8]每月发布的博客中查阅官方对此的声明。 + +### 结语 + +作为Timeshift的维护者,Linux Mint希望在不久的将来带来更多的新特性和改进。 + +你如何看待Linux Mint将Timeshift接管开发为一款XApp?欢迎在下方的评论区内分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-timeshift/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[hadisi1993](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/06/linux-mint-time-shift.jpg +[2]: https://itsfoss.com/backup-restore-linux-timeshift/ +[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[4]: https://teejeetech.com/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png +[6]: https://github.com/linuxmint/timeshift +[7]: https://github.com/linuxmint/timeshift +[8]: https://blog.linuxmint.com/?p=4323 From 4ea331744dc4906a2ee766eda80e04629d109971 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 6 Jun 2022 12:04:14 +0800 Subject: [PATCH 046/231] RP @hanszhao80 https://linux.cn/article-14679-1.html --- ...inux with this open source finance tool.md | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) rename {translated/tech => published}/20210210 Manage your budget on Linux with this open source finance tool.md (59%) diff --git a/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md b/published/20210210 Manage your budget on Linux with this open source finance tool.md similarity index 59% rename from translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md rename to published/20210210 Manage your budget on Linux with this open source finance tool.md index 6a91f26636..7434c9614f 100644 --- a/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md +++ b/published/20210210 Manage your budget on Linux with this open source finance tool.md @@ -1,57 +1,52 @@ [#]: collector: (lujun9972) [#]: translator: (hanszhao80) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14679-1.html) [#]: subject: (Manage your budget on Linux with this open source finance tool) [#]: via: (https://opensource.com/article/21/2/linux-skrooge) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -使用这款 Linux 开源财务工具管理你的预算 +使用 Linux 上的开源财务工具 Skrooge 管理你的预算 ====== -使用开源预算工具 Skrooge 让你的财务管理更加轻松。 -![2 cents penny money currency][1] +> 使用开源预算工具 Skrooge 让你的财务管理更加轻松。 + +![](https://img.linux.net.cn/data/attachment/album/202206/06/115449f0uy9guxxokj0umo.jpg) 2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在本系列中,我将分享使用 Linux 的 21 个不同理由。本篇介绍的是个人财务管理。 -个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像申报你每个月的花销就能在某种程度上证明你需要多少钱。底线是:制定预算是困难的,不满足你的财务目标是令人沮丧的。但这仍然很重要,Linux 有几个工具可以帮助使任务变得可管理。 +个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像宣布你每个月的花销就能在某种程度上体现出你需要多少钱。底线是:制定预算是困难的,没有达到你的财务目标是令人沮丧的。但这仍然很重要,Linux 有几个工具可以帮助使任务变得可管理。 ### 理财 -就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我只错过了一天的午餐,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并没有很好地转化为在线商业交易、长期公用事业合同、投资等等。 +就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我用了一天没有午餐的时间,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并不能很好地转化为在线商业交易、长期公用事业合同、投资等等。 随着我不断完善我的财务跟踪方式,我了解到个人会计始终是一个不断发展的过程。我们每个人都有独特的财务状况,这告诉我们可以或应该使用什么样的解决方案来跟踪我们的收入和债务。如果你失业了,那么你的预算目标可能是尽可能少花钱。如果你在工作,但在还学生贷款,那么你的目标可能是向银行汇款。如果你在工作,但计划退休,那么你可能会尽可能多地存钱。 -关于预算,要记住的一点是,它意味着将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些费用,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了。这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它可能是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的设置。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这种生活方式的转变如何改变你的预算报告,真是令人震惊。 +关于预算,要记住的一点是,它是为了将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些开支,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了,这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的变化。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这样一种生活方式的转变可以改变你的预算报告,真是令人震惊。 -重点是,预算是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。 +重点是,预算编制是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。 ### 开源会计 -有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], 和 [Skrooge][8]。所有这些应用程序本质上都是分类帐,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。 +有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4]、[Money Manager EX][5]、[GNUCash][6]、[KMyMoney][7] 和 [Skrooge][8]。所有这些应用程序本质上都是账本,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。 ![显示财务数据的 Skrooge 界面][9] -Skrooge - 我使用 Skrooge 作为我的个人预算跟踪器。即便面对多个银行账户,它也能轻松自如的设置。与大多数开源金融应用程序一样,Skrooge 可以导入多种文件格式,因此我的工作流程大致如下: 1. 登录我的银行。 2. 将当月的银行对账单导出为 QIF 文件。 3. 打开 Skrooge。 4. 导入 QIF 文件。每个文件都会自动分配到相应的帐户。 - 5. 对照我为自己设定的预算目标检查我的支出。如果我已经超过了,那么我会停靠在下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。 + 5. 对照我为自己设定的预算目标审查我的支出。如果我超支了,那么我就会扣减下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。 - - -在 Skrooge 里我只跟踪了家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个事务进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。 +我只跟踪了 Skrooge 中的家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个交易进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。 ![Skrooge 预算饼图][10] -Skrooge 预算饼图 - -最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我毫不费力地从家庭预算中提取 CSV 文件,将其导入到 Skrooge,并使用一组更新的数据集。不存在锁定和不兼容。该系统灵活敏捷,使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。 +最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我只需要付出很少的努力就可以从家庭预算中提取 CSV 文件,将其导入到 Skrooge,并使用一组更新的数据集。不存在供应商锁定和不兼容。该系统灵活敏捷,使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。 ### 开放选择 @@ -59,7 +54,7 @@ Skrooge 预算饼图 在设定自己的财务目标时,我很欣赏我可以使用最适合我个人计算风格的任何应用程序。我可以控制我在生活中如何处理数据,即使是我不一定喜欢处理的数据。Linux 及其令人惊叹的应用程序集使它不再是一件苦差事。 -在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并省钱吧! +在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并节省开支吧! -------------------------------------------------------------------------------- @@ -68,7 +63,7 @@ via: https://opensource.com/article/21/2/linux-skrooge 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[hanszhao80](https://github.com/hanszhao80) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5f3db471540597cdd3370ab70a0c295d65d4ff84 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 6 Jun 2022 15:50:59 +0800 Subject: [PATCH 047/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220606=206=20Linux=20word=20processors=20you=20need?= =?UTF-8?q?=20to=20try.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6 Linux word processors you need to try.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20220606 6 Linux word processors you need to try.md diff --git a/sources/tech/20220606 6 Linux word processors you need to try.md b/sources/tech/20220606 6 Linux word processors you need to try.md new file mode 100644 index 0000000000..4430ac4f3e --- /dev/null +++ b/sources/tech/20220606 6 Linux word processors you need to try.md @@ -0,0 +1,85 @@ +[#]: subject: "6 Linux word processors you need to try" +[#]: via: "https://opensource.com/article/22/6/word-processors-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +6 Linux word processors you need to try +====== +Check out one of my favorite open source word processors to put your ideas to paper. + +![Typewriter with hands][1] + +Image by: rawpixel.com. CC0. + +Writers are always looking for better ways to put their words and ideas into readable formats to share with their readers. My first experiences with word processing came in my Apple II days when I used AppleWorks and later FrEDWriter, which was a free word processing application created in 1985. It was the standard for my students, many of whom came from households that lacked the money to purchase proprietary software. + +### Abiword + +When I made the switch to Linux in the late 1990's, I was looking for high quality writing software that I could use and recommend to students who chose to follow my lead in the world of open source software. The first word processor I became familiar with was [AbiWord][2]. The name AbiWord is derived from the Spanish word, abierto, which means open. It was Initially released in 1998 and it has been under continuous development. It is licensed as GPLv2. It supports basic word processing such as lists, indents and character formats. It supports a variety of import and export file formats including `.doc`, `.html`, `.docx`, and `.odt`. + +![Image of Abiword][3] + +### Etherpad + +[Etherpad][4] is an open source group editing project. It allows you to edit documents in real time much like Google Drive. The main difference is that it is entirely open source. According to their website you can, "write articles, press releases, to-do lists, together with your friends, fellow students or colleagues, all working on the same document at the same time." The source code is readily available to look at. Etherpad is licensed as Apache 2.0. You can use Etherpad in the cloud or download and [install][5] it on your own Linux computer. + +### Cryptpad + +[CryptPad][6] is a collaboration suite that is end-to-end encrypted. It is licensed with GPLv3 and its source code is available on [GitHub][7]. It was developed by [Xwiki][8] Labs. It is an alternative to Google Drive and is self hosted. According to their website, "CryptPad is built to enable collaboration. It synchronizes changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored.” Cryptpad offers extensive [documentation][9] for users. + +### Focuswriter + +[FocusWriter][10] is a simple distraction free editor. It uses a hideaway interface that you access by moving your mouse to the edges of the screen. It is licensed with GPLv3 and it's available on Linux with Flatpak,via DEB on [Ubuntu][11], and RPM on [Fedora][12]. This is an example of the FocusWriter desktop. A very simple and intuitive interface where the menu automatically hides until you move your mouse pointer to the top or sides of the screen. Files are saved by default as an `.odt`, but it also supports plain text, `.docx`, and Rich text. + +![Image of FocusWriter][13] + +### LibreOffice Writer + +[LibreOffice Writer][14] is my favorite. I have been using it for over a dozen years. It has all the features I need including formatting for rich text. It also has the largest array of import and export options I have seen in any word processor. There are dozens of templates available for specialty formats like [APA][15] for research and publication. I love that I can export directly to PDF and ‘epub' from any word processor. LibreOffice Writer is free software with the Mozilla Public License 2.0. The s[ource code][16] for LibreOffice is from the Document Foundation. LibreOffice comes standard with most Linux distribution. It is also available as Flatpak, Snap, and AppImage. In addition, you can download and install it on MacOS and Windows. + +![Image of LibreOffice work space][17] + +### OpenOffice Writer + +Apache [OpenOffice Writer][18] is a complete word processor. It's simple enough for memos yet complex enough to write your first book. According to their website, OpenOffice Writer automatically saves documents in ‘open document format'. Documents can also be saved in `.doc`, `.docx`, Rich Text, and other formats. OpenOffice Writer is licensed with an Apache License 2.0. Source code and is available on [GitHub][19]. + +There is a wealth of free open source software waiting for you to discover. They are great for getting your everyday tasks done and you can also contribute to their development. What is your favorite Linux word processor application? + +Image by: (Don Watkins, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/word-processors-linux + +作者:[Don Watkins][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/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg +[2]: https://www.abisource.com/ +[3]: https://opensource.com/sites/default/files/2022-05/abiword.png +[4]: https://etherpad.org/# +[5]: https://github.com/ether/etherpad-lite#installation +[6]: https://cryptpad.fr/what-is-cryptpad.html +[7]: https://github.com/xwiki-labs/cryptpad +[8]: https://github.com/xwiki-labs +[9]: https://docs.cryptpad.fr/en/user_guide/index.html +[10]: https://gottcode.org/focuswriter/ +[11]: https://packages.ubuntu.com/jammy/focuswriter +[12]: https://src.fedoraproject.org/rpms/focuswriter +[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png +[14]: https://www.libreoffice.org/discover/writer/ +[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template +[16]: https://www.libreoffice.org/about-us/source-code/ +[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png +[18]: https://www.openoffice.org/product/writer.html +[19]: https://github.com/apache/openoffice From a90ff373f46a56f5bd4332a62388e99a6bcc8803 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 6 Jun 2022 16:01:26 +0800 Subject: [PATCH 048/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]=2020220606=20A=20Drupal=20developer-s=20guide=20to=20Prog?= =?UTF-8?q?ressive=20Web=20Apps.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This article is collected by lkxed. --- ...veloper-s guide to Progressive Web Apps.md | 382 ++++++++++++++++++ 1 file changed, 382 insertions(+) create mode 100644 sources/tech/20220606 A Drupal developer-s guide to Progressive Web Apps.md diff --git a/sources/tech/20220606 A Drupal developer-s guide to Progressive Web Apps.md b/sources/tech/20220606 A Drupal developer-s guide to Progressive Web Apps.md new file mode 100644 index 0000000000..aebf40b457 --- /dev/null +++ b/sources/tech/20220606 A Drupal developer-s guide to Progressive Web Apps.md @@ -0,0 +1,382 @@ +[#]: subject: "A Drupal developer's guide to Progressive Web Apps" +[#]: via: "https://opensource.com/article/22/6/drupal-pwa" +[#]: author: "Alex Borsody https://opensource.com/users/alexborsody" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A Drupal developer's guide to Progressive Web Apps +====== +Here is an outlined approach to PWA implementation for a Drupal site, but other options are certainly available with similar designs. + +![Digital creative of a browser on the internet][1] + +The following article is a companion to my presentation at Drupalcon and Drupalcamp covering Progressive Web Apps implementations. + +Progressive Web Apps (PWA) have support from some of the top tech companies, including Google and Microsoft, with the common goal being "[Web apps should be able to do anything iOS, Android, or desktop apps can.][2]" PWAs can add value to businesses at a variety of different stages. All projects have limitations, whether they be development resources, timeline, budget, or technical debt. Even with "unlimited resources," developing an app from a single codebase, using commonly known web technologies, allows for a more frictionless, sane release cycle. + +Disclaimers: + +* PWA is a collection of different techniques combined in a web browser to create an "app-like" experience. +* This information is from an architect's perspective for choosing and implementing various technologies that come together to build a product. +* Below is a high-level end-to-end outline of a path to launch a Drupal website on the app stores. Each section could be its own in-depth blog post. +* The techniques are written with Drupal in mind, but you can apply many of them to all web apps. + +### What is a PWA? + +![What is PWA][3] + +Benefits of a PWA implementation: + +* Increased Lighthouse score and SEO. +* Single codebase. +* Frictionless testing. +* Instant feedback loop for development cycles. +* Use of existing PaaS deployment workflows, including Acquia, Pantheon, Platform.sh etc. +* Use of web technologies that are a familiar skillset for a wide array of developers. +* Provides the only cross-platform development solution that delivers a full-fledged desktop experience. +* Offers unlimited options to customize a design without relying on a cross-platform framework's limited UI components. + +This article covers some basic points for PWA deployment. There are many details to consider both at the architect and developer levels. The following topics are discussed: + +* PWA minimum requirements and Drupal PWA module as a starting point. +* Publishing on app stores. +* Everything you need to know about making your PWA feel [app-like][4]. + +### PWA module on Drupal.org + +The [Drupal PWA module][5] is a solution that generates a service worker for caching strategies and offline capabilities. Its secondary functionality also generates a `manifest.json`, so once installed, it will fulfill the [basic requirements of a PWA][6] out-of-the-box. + +There is functionality in the module's service worker that provides unique solutions to Drupal-specific behavior, although you can also apply these solutions to apps outside of Drupal. + +![Drupal PWA module][7] + +#### Offline caching + +Offline caching with a service worker is one of the functionalities that defines a PWA. + +The following images summarize how a service worker acts as a proxy (sitting between the client and the internet/webserver) to intercept HTTP requests from the browser. + +During the first request to the `/about` page, the browser reaches the network, and upon returning a 200 response from the server, the Javascript service worker calls **cache.put()** to store the HTML and all assets in the [Cache API][8]. + +![Offline caching example in service worker][9] + +On the second trip, the service worker bypasses the network completely and serves the page from the Cache API store in the user's browser, loading the page instantly. It can also load the page offline. + +![Second visit to site][10] + +The browser can precache pages to make them load instantly before the user visits them or even load offline before a visit. However, because in Drupal, the CSS/JS filenames change after compression, the solution must address the problem of identifying these assets before it can precache them via a service worker. It does this by internally requesting the URLs set in the admin panel and extracting assets from the DOM. This allows the service worker [install event][11] to fetch all CSS/JS and images from these documents to store in Cache API. The complete pages will then be viewable offline and load instantly, even if the user never visits them first. + +![Service worker][12] + +![Offline caching demo][13] + +Below, I fetch all the assets from the URLs set in the admin panel to inject later into the service worker precache assets array. In D8, I changed the request to use **Drupal::httpClient()**, which is the updated version of **drupal_http_request()** in D7 and is a wrapper for the PHP Guzzle library. + +``` +foreach ($pages as $page) { +try { +  // URL is validated as internal in ConfigurationForm.php. +  $url = Url::fromUserInput($page, ['absolute' => TRUE])->toString(TRUE); +  $url_string = $url->getGeneratedUrl(); +  $response = \Drupal::httpClient()->get($url_string, array('headers' => array('Accept' => 'text/plain'))); +``` + +This code matches all assets needed: + +``` +// Get all DOM data. +$dom = new \DOMDocument(); +@$dom->loadHTML($data); + +$xpath = new \DOMXPath($dom); + +foreach ($xpath->query('//script[@src]') as $script) { +  $resources[] = $script->getAttribute('src'); +} + +foreach ($xpath->query('//link[@rel="stylesheet"][@href]') as $stylesheet) { +  $resources[] = $stylesheet->getAttribute('href'); +} + +foreach ($xpath->query('//style[@media="all" or @media="screen"]') as $stylesheets) { +  preg_match_all( +    "#(/(\S*?\.\S*?))(\s|\;|\)|\]|\[|\{|\}|,|\"|'|:|\<|$|\.\s)#ie", +    ' ' . $stylesheets->textContent, +    $matches +  ); +  $resources = array_merge($resources, $matches[0]); +} + +foreach ($xpath->query('//img[@src]') as $image) { +  $resources[] = $image->getAttribute('src'); +} +``` + +Below, you can see the final result in the processed `serviceworker.js` file that is output in the browser. The variables in the service worker are replaced with the path to the assets to cache. + +![Final test of offline caching][14] + +#### Phone home uninstall + +The module provides another clever piece of functionality—responsible cleanup when uninstalled. The module sends a request back to a URL created by the module. If the URL does not exist, it means the module has been uninstalled. The service worker then unregisters itself and deletes all related caches left on the user's browser. + +``` +// Fetch phone-home URL and process response. +let phoneHomeUrl = fetch(PWA_PHONE_HOME_URL) + .then(function (response) { + // if no network, don't try to phone-home. + if (!navigator.onLine) { + console.debug('PWA: Phone-home - Network not detected.'); + } + + // if network + 200, do nothing + if (response.status === 200) { + console.debug('PWA: Phone-home - Network detected, module detected.'); + } + + // if network + 404, uninstall + if (response.status === 404) { + console.debug('PWA: Phone-home - Network detected, module NOT detected. UNINSTALLING.'); + // Let SW attempt to unregister itself. + Promise.resolve(pwaUninstallServiceWorker()); + } + + return Promise.resolve(); + }) + .catch(function(error) { + console.error('PWA: Phone-home - ', error); + }); +}; +``` + +### Testing notes + +Disable the module on dev as it provides an extra caching layer. Any changes pushed to production for CSS or other assets with cache first strategies should be followed by incrementing the service worker version to bust the cache. + +You can find additional debugging steps for a service worker on this PWA module [documentation page][15]. + +Using the Chrome console to [remote debug][16] on a mobile device is possible on Android and can be helpful. + +### 2.x version + +The 2.x and 7.2x versions port the service worker to [Workbox][17], where you can set caching strategies. Here, setting caching strategies for different asset types and routes is simplified from about 30 lines of code using just the javascript Fetch API to about five lines. Some people may be resistant to libraries, but this is the direction Google is taking with PWAs. + +Workbox [caching strategies][18] are similar to those in other caching layers such as Varnish. For example, by default, image assets and fonts are set to "cache first," so they are always served instantly. HTML would best be implemented as [stale-while-revalidate][19]. + +![Workbox and PWA module][20] + +There is also functionality in Workbox, such as [background sync][21], where a failed post request will retry upon coming back online. + +![Offline cache][22] + +For more information on what a service worker can do and all the use cases where it may be helpful, check the [W3 Service Workers Demo repo][23] on GitHub. + +### Get your web app in the app stores + +PWA builder is a web application powered by Microsoft where you input your URL and it generates everything you need to submit to the app stores. + +For Android, it uses TWA, and for iOS, it wraps your web app in native SWIFT code using [WebKit's][24] WKWebView. These are techniques I have been using since 2013, way back when Drupal was a buzzy technology and being used by startups. Businesses that had mobile-optimized Drupal websites wanted them on the app stores. Before Android TWA, developers used Webview, and before WKWebView, there was UIWebView. + +Recently PWA builder added a [solution for iOS][25] using WKWebView, which confirms my belief that this is the best option to get your PWA into the App Store. Maximilian Firtman also reveals this as the solution in his course "Creating Progressive Web Apps with Vue," which I purchased to see his answer to the problem. + +The PWA module provides everything you need to run through PWA Builder: + +* For Android, it creates a lightweight .apk/.aap using TWA to submit to the Play Store 800kb. +* For iOS, it wraps your website in WKWebView to submit to the App Store. + +A live demo I put together of PWA builder is here. **[[EDITORS - MISSING LINK]]** + +### Android and TWA + +The Google and Chromium teams are currently the strongest driving forces behind PWAs. Therefore, TWA is designed specifically to get your PWA into the Play Store. On the contrary, WKWebView is essentially a workaround not explicitly supported by Apple. However, WKWebView is extremely powerful, even though Apple doesn't advertise this or have much documentation on its capabilities. + +Trusted Web Activity is essentially a Chrome process running in full screen with a status bar and loading screen. The thread is running in the same process as the Chrome app on your phone. For example, if you are logged in on your Chrome browser, you will be logged in on your TWA app. To clear up any possible confusion resulting from this, the TWA team has added a "toast," meaning the first time the user opens the app, a notification shows "Running in Chrome." This only happens the first time the app is installed. This annoyance is enough for some teams to ditch TWA and use the WebView class instead; however, Google [discouraged this][26] as you lose out on everything baked into the Chrome web browser. + +The [main points][27] Google makes about using TWA are: + +* Chrome is feature complete. +* Faster than Webview. +* Evergreen (always the up-to-date version of Chrome). + +Additional useful functionality. + +* Chrome handles frictionless OAuth requests. +* Share cookies, local storage, and saved settings with the preferred browser. + +Below is a comparison chart of everything you get when using TWA instead of a Webview wrapper. + +![Google TWA][28] + +### Webkit: WKWebView + +There are several considerations for publishing on the App Store. WKWebView is essentially a workaround and not a method implicitly endorsed by Apple to launch a native app. Some caveats come with this. The most important is to be mindful of Apple's [minimal functionality guidelines][29]. + +From my experience, you will be approved if you do everything you can to make your web app "app-like" with useful functionality. Using the Webkit API to enhance your web app is another way to provide additional functionality outside of your website. + +One technique is to set a cookie depending on the **start_url**. For example, add a parameter like **myapp.com?ios_app** and set a cookie to determine a separate stylesheet or customize logic. + +Consider the following sample implementation. + +**Note**: This technique should not be confused with Apple's limited [add to homescreen][30] support, which you usually hear about with Apple + PWAs. I won't cover this as it's not the experience a user would expect. + +PWA builder provides the minimum functionality required to wrap a website in WKWebView for App Store submission. For features such as biometric or push notifications, you need a custom implementation of WKWebView. + +In the graphic below, you can see the source files provided. You can then easily compile your app in XCode and submit it to the app store. + +![Source code][31] + +[PWA Builder provides][32]: + +* No Bounce when scrolling out of view with wKWebView.scrollView.bounces = false +* Service worker support +* Shortcuts URL capture +* Permitted navigation scopes +* Status bar customization +* Splash screen from manifest props +* iOS app awareness from JS code +* Mac Store support + +A custom implementation of WKWebView can provide: + +* Push notifications: Push notifications are possible by posting the device ID matched to the Drupal UID, which can be extracted from the URL /user/{uid}/edit, for example. +* [Biometric][33]: Biometric is implemented on all pages except for user/login and user/register, and the cookie max expiration is extended. Biometric is shown every time the app is closed and reopened. +* [WKUIDelegate][34]: Present native UI elements, such as alerts, inputs, or contextual menus. +* [evaluateJavaScript()][35]: Execute any Javascript. The possibilities here are endless. +* Password management using [associated domains][36]: Placing a public keypair in your `/.well-known` directory will allow your native app to trust your website and autofill passwords. + +View the [README.md][37] of WKWebView+, a project I am working on that makes it easy to integrate this enhanced functionality into any iOS PWA. + +#### Cons of WKWebView + +Give the following considerations attention before implementing WKWebView: + +* There is a paradigm shift in thinking required for frontend developers to debug a PWA correctly. Though it relies on web technologies, there is a learning curve. +* Without a native iOS developer, certain features are not possible to implement. However, [WKWebView+][38] was designed to solve this. +* Though the outlook for Apple and PWAs [looks positive][39], as usual, you are at the mercy of the next Safari release. + +### Moving forward + +Many of the features available with TWA are only available on Chromium-based browsers. Webkit mobile/WKWebView lags. This lag includes push notifications, "add to home screen," and overall web browser standards. Maximilian Firtman's blog is currently one of the best resources for a summary of the updates in the latest Safari, even if they [were not announced in the release notes][40]. + +The optimistic outlook is that WKWebView is based on the open-source project Webkit, and there is a collaboration among the developers that work on both Chromium and WebKit. Anyone can create an issue and pull request. Often, features already [implemented in Chrome][41] have patches submitted to Webkit that do the same. + +#### Make it app-like + +Websites that took all the right vitaminsA PWA is essentially a collection of web technologies that combine to make your web experience app-like, as if the website "took all the right vitamins." Below I have identified points that make up a good PWA: + +* UX/UI: Visual problem solving is at the core of making your website feel like an app. A great CSS developer with an eye for design and detail, such as animations, input/font sizes, and scrolling issues, is essential. +* Stay current with app-like enhancements: Keeping frontend code updated and compatible across WebKit/Chrome requires research and periodic updates, particularly when a new version of the iPhone is released. +* Implement expanded web capabilities: The Chromium team constantly improves the browser experience. This can be tracked in [Project Fugu][42], the overarching web capabilities project. The closest thing there is to comprehensive documentation on PWAs is on [webdev][43]. +* Page speed: I covered caching with a service worker, but there are countless other technologies and techniques. + +Some examples of app-like enhancements include using HTML/CSS/JS technologies commonly available to web developers, and then making them frictionless to implement, test, and deploy. You can find a good example of a web application using many of these suggestions [here][44]. + +Suggestions include: + +* [Javascript touch events][45]: Disable pinch zoom and add swipe/multitouch gestures. +* CSS: + + Minify/optimize CSS and apply [Lighthouse][46] suggestions. + + "App-like" input/font sizes and make sure everything fits in the viewport; make it visually look like an app. + + Tactful use of preloaders. +* Utilize cookies: Set cookie based on app start URL. +* HTML attributes: + + autocomplete="username" + + [autocomplete="current-password"][48] + + [autocomplete="one-time-code"][49] - WebOTP API + + input type="tel" +* Ajax API (Drupal specific), Websockets, or SPA framework. +* iPhone specific suggestions: + + [Status bar on iPhone X][52] and Viewport meta tag. + + Apple-specific [meta tags][53]. + +![iPhone X status bar][61] + +### Wrap up + +PWA brings together different techniques to create an app-like experience in a web browser. I outlined an approach to PWA implementation for a Drupal site, but other options are certainly available with similar designs. What implementations of PWA might help your organization's user experience? + +View the [README.md][62] of WKWebView+, a project I am working on that makes it easy to integrate this enhanced functionality into any iOS PWA. + +Ionic the spiritual successor to Cordova is a popular framework that also utilizes [WKWebView][63] to build native iOS. + +Image by: (Alex Borsody, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/drupal-pwa + +作者:[Alex Borsody][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/alexborsody +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/browser_web_internet_website.png +[2]: https://developer.chrome.com/blog/fugu-status/ +[3]: https://opensource.com/sites/default/files/2022-06/what-is-pwa.jpeg +[4]: https://web.dev/app-like-pwas/ +[5]: https://www.drupal.org/project/pwa +[6]: https://web.dev/lighthouse-pwa/ +[7]: https://opensource.com/sites/default/files/2022-05/2DrupalModule.jpg +[8]: https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage +[9]: https://opensource.com/sites/default/files/2022-05/3OfflineCache.png +[10]: https://opensource.com/sites/default/files/2022-05/4SecondVisit.jpg +[11]: https://developer.mozilla.org/en-US/docs/Web/API/InstallEvent +[12]: https://opensource.com/sites/default/files/2022-05/5SvcWorker.jpg +[13]: https://opensource.com/sites/default/files/2022-05/6Test.jpg +[14]: https://opensource.com/sites/default/files/2022-05/7Test-code.jpg +[15]: https://www.drupal.org/docs/7/modules/progressive-web-app-pwa/troubleshooting +[16]: https://developer.chrome.com/docs/devtools/remote-debugging/ +[17]: https://developers.google.com/web/tools/workbox +[18]: https://developers.google.com/web/ilt/pwa/caching-files-with-service-worker +[19]: https://developer.chrome.com/docs/workbox/modules/workbox-strategies/ +[20]: https://opensource.com/sites/default/files/2022-05/8Workbox.jpg +[21]: https://developer.chrome.com/docs/workbox/modules/workbox-background-sync/ +[22]: https://opensource.com/sites/default/files/2022-05/9OfflineCache.jpg +[23]: https://github.com/w3c-webmob/ServiceWorkersDemos +[24]: https://developer.apple.com/documentation/webkit +[25]: https://blog.pwabuilder.com/docs/ios-platform/ +[26]: https://twitter.com/andreban/status/1232204535835303936 +[27]: https://youtu.be/6lHBw3F4cWs?t=179 +[28]: https://opensource.com/sites/default/files/2022-05/10GoogleTWA.png +[29]: https://developer.apple.com/app-store/review/guidelines/#minimum-functionality +[30]: https://support.apple.com/guide/shortcuts/add-a-shortcut-to-the-home-screen-apd735880972/ios +[31]: https://opensource.com/sites/default/files/2022-05/11sourcefiles.jpg +[32]: https://blog.pwabuilder.com/docs/ios-platform/ +[33]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md#biometrics +[34]: https://developer.apple.com/documentation/webkit/wkuidelegate +[35]: https://developer.apple.com/documentation/webkit/wkwebview/1415017-evaluatejavascript +[36]: https://developer.apple.com/documentation/xcode/supporting-associated-domains +[37]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md +[38]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md +[39]: https://firt.dev/pwa-2021/#tim-cook-promoting-pwas +[40]: https://www.macworld.com/article/610673/ios-15-4-safari-push-notifications.html +[41]: https://www.google.com/search?q=site:https://webkit.org/+chromium&source=lnt&tbs=qdr:y&sa=X&ved=2ahUKEwjGwrDj2Nj2AhXHrHIEHfBQD5wQpwV6BAgBEBk&biw=1638&bih=897&dpr=2 +[42]: https://www.chromium.org/teams/web-capabilities-fugu/ +[43]: https://web.dev/progressive-web-apps/ +[44]: https://carbonpay.io/ +[45]: https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Multi-touch_interaction +[46]: https://developers.google.com/web/tools/lighthouse +[47]: https://developers.google.com/web/tools/lighthouse +[48]: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element +[49]: https://web.dev/web-otp/ +[50]: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element +[51]: https://web.dev/web-otp/ +[52]: https://webkit.org/blog/7929/designing-websites-for-iphone-x/ +[53]: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html +[54]: https://webkit.org/blog/7929/designing-websites-for-iphone-x/ +[55]: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html +[56]: https://developers.google.com/web/tools/lighthouse +[57]: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element +[58]: https://web.dev/web-otp/ +[59]: https://webkit.org/blog/7929/designing-websites-for-iphone-x/ +[60]: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html +[61]: https://opensource.com/sites/default/files/2022-05/12iPhoneStatusBar.png +[62]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md +[63]: https://ionicframework.com/docs/v3/wkwebview/ From b1a07564be645b0b6bc3c92744dbc557e2f56b33 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 6 Jun 2022 20:43:52 +0800 Subject: [PATCH 049/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220606=20Amberol=20is=20a=20Stunning=20Looking=20Mus?= =?UTF-8?q?ic=20Player=20for=20Linux=20That=20Just=20Plays=20Music=20and?= =?UTF-8?q?=20Nothing=20Else.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... That Just Plays Music and Nothing Else.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md diff --git a/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md b/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md new file mode 100644 index 0000000000..bbb3eb36f1 --- /dev/null +++ b/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md @@ -0,0 +1,110 @@ +[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else" +[#]: via: "https://itsfoss.com/amberol-music-player/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else +====== +Though the world of music is dominated by streaming services, it has not discouraged developers from creating music players for desktop computers. + +Recently, I came across a beautiful looking new music player for the Linux desktop. It’s called Amberol and I was awestruck by its beauty. + +![amberol music player interface][1] + +Looks good, no? Let’s take a closer look at it. + +### Amberol, the cute looking music player for Linux + +Looking good is one of the two (or few) things it does. The other thing is playing music. + +And that’s about it. [Amberol][2] doesn’t have additional fancy (and useful) features like album art generation, metadata editing, lyrics display or playlists and library management. + +It’s not like these features will be added in future releases. Amberol just wants to play music. That’s it. + +#### The stunning UI + +Amberol is written in Rust and GTK like most new GNOME applications. + +It has an adaptive UI that changes color based on the album color you are playing. The gradient effect gives it a modern, sleek look that would surely be part of your Linux ricing screenshots. + +![amberol music player][3] + +Since the UI does not have the traditional handlebar and menu, it gives the application a unified look. + +#### Playlists + +It generates a playlist automatically from the files present in the folder you add. It is displayed in the lefthand sidebar. + +![amberol playlist][4] + +You can see how long the entire playlist will play the music in the top left corner. Clicking on the ‘correct sign’ allows you to select songs and remove them from the playlist. + +If you want, you can hide the playlist sidebar. + +![amberol without playlist][5] + +#### Music playing options + +You can see the progress of the songs on the interface. The player integrates well with the media control buttons on the keyboard. You can play/pause and change tracks with the dedicated media keys (if you have it on your system). + +Amberol does give you a few more options for playing the music. You can turn on the shuffle to play music in random order. You may also put a song on repeat and keep on playing it till you get bored of it. + +![amberol music playing options][6] + +The handlebar menu at the bottom gives you the option to add a file or folder and show available keyboard shortcuts. + +![amberol keyboard shortcuts][7] + +You may also disable the UI color changing to match the album art from here. + +### Installing Amberol on Linux + +Amberol is [available as Flatpak][8]. Please ensure that [your system has Flatpak support enabled][9]. + +To install Amberol, open a terminal and use the following command: + +``` +flatpak install flathub io.bassi.Amberol +``` + +Once installed search for the application in the menu and start from here. + +On the first run, it asks you to add music files or folders. You can also drag and drop files. + +![amberol first run][10] + +### Conclusion + +Personally, I prefer streaming services because I don’t have a good collection of local music. But I know there are people who have/had a huge collection of CDs that are now saved on the hard disk. + +Amberol is a beautiful-looking application and it is good enough for playing local music. The main attraction is the adaptive UI based on the album art. + +I let you play with it and share your experience in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/amberol-music-player/ + +作者:[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/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png +[2]: https://apps.gnome.org/app/io.bassi.Amberol/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png +[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png +[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png +[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png +[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png +[8]: https://flathub.org/apps/details/io.bassi.Amberol +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png From b1fc24525edba588b254f68648927c0ad6f1324d Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 6 Jun 2022 20:46:38 +0800 Subject: [PATCH 050/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220606=20Cloud=20Storage=20Service=20Internxt=20Has?= =?UTF-8?q?=20a=20Photos=20Feature=20as=20a=20Google=20Photos=20Alternativ?= =?UTF-8?q?e.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Feature as a Google Photos Alternative.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md diff --git a/sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md b/sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md new file mode 100644 index 0000000000..6a737060e0 --- /dev/null +++ b/sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md @@ -0,0 +1,69 @@ +[#]: subject: "Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative" +[#]: via: "https://news.itsfoss.com/internxt-photos/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative +====== +Internxt is already an interesting cloud storage service. It also has a Photos feature that can be a replacement to Google Photos for some. + +![internxt photos][1] + +Internxt is an open-source encrypted cloud service with a native Linux client. Our [older article][2] explaining its cloud storage service can be an interesting read if you did not know about it. + +Initially, we focused on their cloud storage offering. And, it seems like we missed out on another product “Photos” that was unveiled by them last month in a tweet. + +[Internxt Photos][3] pitches itself as an open-source Google Photo alternative with privacy and security in mind. + +*The post includes an affiliate link for Internxt. If you get a subscription through our link, we get a commission, and you get to support us at no extra cost to you.* + +### Internxt Photos with Zero-Knowledge Encryption + +![][4] + +Internxt Photos claims that it puts privacy and security at its core compared to some competitors in the industry. + +While respecting user privacy, they also try to offer the basic features that help you easily organize the photos you upload to the service. + +Note that the Photos service is included with the cloud storage subscription. Unlike Google’s offering, there are no separate pricing plans for just storing the Photos. + +Likewise, you need to rely on the same Internxt app to access your Photo gallery. + +You should not have anything to worry about considering the Internxt app is available on the Google Play Store, and the App Store as well. + +The photos you upload to the gallery get synced across multiple devices. So, even if you do not have access to one of your devices, it should not be a problem. + +![][5] + +The look of the photo gallery seems inspired by Apple’s Photos app, but that’s a good approach for simplicity and usability. The Photos also provide you the ability to share photos with your friends and family using a link. You can also customize the link to tweak the open limit to control access to your shared links. + +Considering it as an open-source encrypted alternative with a primary cloud storage offering to mainstream Photo storage services, does this sound like something interesting to you? + +You can get started using our link to the product page to explore more about it and get started. The [GitHub page][6] can also be useful if you’re curious. + +[Internxt Photos][7] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/internxt-photos/ + +作者:[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/06/internxt-photos.jpg +[2]: https://itsfoss.com/internxt-cloud-service/ +[3]: https://itsfoss.com/go/internxt-photos/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/internxt-gallery.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/mobile-photos-share-mockup-506x1024.webp +[6]: https://github.com/internxt +[7]: https://itsfoss.com/go/internxt-photos/ From 46a9a2cfd1c69fdb6aa69d277b12b4c54706c111 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Mon, 6 Jun 2022 21:25:51 +0800 Subject: [PATCH 051/231] Update 20210131 How to teach open source beyond business.md --- .../tech/20210131 How to teach open source beyond business.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md index f9563e14ff..63063b4104 100644 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ b/sources/tech/20210131 How to teach open source beyond business.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (duoluoxiaosheng ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 80c39903104b59ce25981e008c78d04d9ff42ef0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Jun 2022 08:18:52 +0800 Subject: [PATCH 052/231] RP @hadisi1993 https://linux.cn/article-14681-1.html --- ...intain Timeshift Backup Tool as an XApp.md | 73 +++++++++++++++++++ ...intain Timeshift Backup Tool as an XApp.md | 72 ------------------ 2 files changed, 73 insertions(+), 72 deletions(-) create mode 100644 published/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md delete mode 100644 translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md diff --git a/published/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/published/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md new file mode 100644 index 0000000000..b12e5175e9 --- /dev/null +++ b/published/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md @@ -0,0 +1,73 @@ +[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" +[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "hadisi1993" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14681-1.html" + +Linux Mint 接管 Timeshift 备份工具的开发,并作为一款 XApp 来维护 +====== + +> Linux Mint 接管了 Timeshift 备份/恢复工具的开发。你可以在它新的 GitHub 仓库中找到它。 + +![linux mint][1] + +Timeshift 可以说是 [备份和恢复 Linux 系统的最佳工具][2]。 + +Linux Mint 也利用它帮助用户在系统更新时更方便地创建快照,确保快捷无碍的操作。 + +当然,这不是 [Linux Mint 可能比 Ubuntu 更好的唯一原因][3]。 + +不幸的是,Timeshift 背后的开发者([Tony George][4])计划把注意力集中在其他项目上,将不再继续维护这个项目。 + +Linux Mint 团队联系了这位开发者,并愿意为这个项目提供任何可能的帮助。最终,它们接管了 Timeshift 的开发。 + +所以,现在 Linux Mint 团队会对 Timeshift 的发布和修复,以及任何与之相关的开发工作负责。 + +### 将 Timeshift 调整成 XApp + +![][5] + +Linux Mint 倾向于将某些应用作为“XApp”来维护,以确保它们能在各种不同的桌面环境下工作,不会依赖于某个特殊的桌面。 + +考虑到他们计划将 Timeshift 调整成一个XApp,你可以期待该工具在很长一段时间内维持当前的外观和功能,而不用顾虑你的桌面环境是什么。 + +不像一些 GNOME 应用程序,为了获得最好的体验,它们通常会变成 GNOME 专用的应用程序。 + +Timeshift 是一个必不可少的备份/恢复工具。所以,Linux Mint 接管 Timeshift 的开发并作为一个 XApp 来维护的计划听上去相当完美! + +如果你想知道的话,那不妨告诉你,Timeshift 的迁移已经在 [Launchpad][6] 上完成了。 + +新的 [GitHub仓库][7](由 Linux Mint 复刻的)可以给你提供这个应用的更多细节以及它最近的开发活动。 + +你也可以在 [最近每月发布的博文][8] 中查阅官方对此的声明。 + +### 结语 + +作为 Timeshift 的维护者,Linux Mint 希望在不久的将来带来更多的新特性和改进。 + +你如何看待 Linux Mint 将 Timeshift 接管为一款 XApp?欢迎在下方的评论区内分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-timeshift/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[hadisi1993](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/06/linux-mint-time-shift.jpg +[2]: https://itsfoss.com/backup-restore-linux-timeshift/ +[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[4]: https://teejeetech.com/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png +[6]: https://github.com/linuxmint/timeshift +[7]: https://github.com/linuxmint/timeshift +[8]: https://blog.linuxmint.com/?p=4323 diff --git a/translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md deleted file mode 100644 index 22c4715891..0000000000 --- a/translated/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" -[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "hadisi1993" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -## Linux Mint 将以XApp形式维护Timeshift备份工具 -====== -Linux Mint 接管了Timeshift备份/恢复工具的开发。你可以在它新的Github仓库中找到它。 - -![linux mint][1] -[Timeshift][2]是Linux系统中无可争议的最佳备份和恢复工具。 -Timeshift is arguably the [best tool to back up and restore the Linux system][2]. - -Linux Mint 也利用它帮助用户在系统更新时更方便地创建快照,确保快捷无碍的操作。 - -当然,这不是 [Linux Mint 可能比Ubuntu更好的唯一原因][3]。 - -不幸的是,Timeshift背后的开发者([Tony George][4])计划把注意力集中在其他项目上,将不再继续维护这个项目。 - -Linux Mint团队联系了这位开发者并愿意为这个项目提供任何可能的帮助。最终,它们接管了Timeshift的开发。 - -所以,现在Linux Mint团队会对Timeshift的发布和修复,以及任何与之相关的开发工作负责。 - -### 将Timeshift调整成XApp - -![][5] - -Linux Mint倾向于将某些应用作为“XApp”来维护,以确保它们能在各种不同的桌面环境下工作,不会依赖于某个特殊的桌面。 - -考虑到他们计划将Timeshift调整成一个XApp,你可以期待该工具在很长一段时间内维持当前的外观和功能,而不用顾虑你的桌面环境。 - -不像一些GMOME应用程序,为了获得最好的体验只支持GNOME应用。 - -Timeshift是一个基础的备份/恢复工具。所以,Linux Mint接管Timeshift的开发并将其维护为XApp的计划听上去相当完美! - -如果你好奇的话,那不妨告诉你,Timeshift的迁移已经在[Launchpad][6]上完成了。 - -新的[Github仓库][7](被Linux Mint fork的)可以告诉你这个应用的更多细节以及它最近的开发活动。 - -你也可以在最近[The Linux Mint blog][8]每月发布的博客中查阅官方对此的声明。 - -### 结语 - -作为Timeshift的维护者,Linux Mint希望在不久的将来带来更多的新特性和改进。 - -你如何看待Linux Mint将Timeshift接管开发为一款XApp?欢迎在下方的评论区内分享你的想法。 - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-mint-timeshift/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[hadisi1993](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/06/linux-mint-time-shift.jpg -[2]: https://itsfoss.com/backup-restore-linux-timeshift/ -[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ -[4]: https://teejeetech.com/ -[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png -[6]: https://github.com/linuxmint/timeshift -[7]: https://github.com/linuxmint/timeshift -[8]: https://blog.linuxmint.com/?p=4323 From 0e2924582dcd87a740b20e3514e70ddcf9edf273 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 7 Jun 2022 08:43:54 +0800 Subject: [PATCH 053/231] translated --- ...loading shared libraries- libalpm.so.12.md | 65 ------------------- ...loading shared libraries- libalpm.so.12.md | 65 +++++++++++++++++++ 2 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md create mode 100644 translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md diff --git a/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md deleted file mode 100644 index 2813ccf47f..0000000000 --- a/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12" -[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Fix yay: error while loading shared libraries: libalpm.so.12 -====== -This quick guide is to help you to fix yay error – while loading shared libraries: libalpm.so.12. - -If you are running [Arch Linux][1] in a system for longer, things can break due to its rolling release nature combined with your hardware support. If you use the AUR Helper Yay, then sometimes, yay can be corrupted due to several installations upgrades of other packages. - -The YAY helper is very stable, but sometimes it gets messed up, and you can not do any installation using it until you fix it. And one of the nagging errors is this: - -``` -yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory -``` - -This error particularly comes after upgrading to pacman 6.0 due to incompatibility of shared libraries. - -![error while loading shared libraries - yay][2] - -### How to fix yay error – while loading shared libraries: libalpm.so.12 - -* This error can only be fixed by uninstalling yay completely, including its dependencies. -* Then re-installing yay. - -* There is no other way to solve this error. - -* We already have a guide [how to install Yay][3], however, here are the steps to fix. -* Clone the yay repo from AUR and build. Run the following command in sequence from a terminal window. - -``` -cd /tmp -git clone 'https://aur.archlinux.org/yay.git' -cd /tmp/yay -makepkg -si -cd ~ -rm -rf /tmp/yay/ -``` - -After installation, you can try running the command which gave you this error. And you should be all set. If you still have this error, let me know in the comment box below. - -Many people have encountered this, and [several discussions][4] happened across the web. Above is the only solution to this error. And I could not find the exact root cause of the problem anywhere except it started after pacman 6.0 update. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/ - -作者:[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://archlinux.org/ -[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg -[3]: https://www.debugpoint.com/2021/01/install-yay-arch/ -[4]: https://github.com/Jguer/yay/issues/1519 diff --git a/translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md new file mode 100644 index 0000000000..090a8b48aa --- /dev/null +++ b/translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md @@ -0,0 +1,65 @@ +[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12" +[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何修复 yay: error while loading shared libraries: libalpm.so.12 +====== +这篇快速指南是为了帮助你修复 yay error: while loading shared libraries: libalpm.so.12. + +如果你在系统中运行 [Arch Linux][1] 的时间更长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR Helper Yay,那么有时,由于其他软件包的多次安装升级,yay 可能会损坏。 + +YAY helper 是非常稳定的,但有时它会被搞乱,你不能使用它进行任何安装,直到你修复它。而其中一个令人头疼的错误是这样的: + +``` +yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory +``` + +这个错误特别是在升级到 pacman 6.0 后出现的,因为共享库不兼容。 + +![error while loading shared libraries - yay][2] + +### 如何解决 yay: error while loading shared libraries: libalpm.so.12 + +* 这个错误只能通过完全卸载 yay 来解决,包括它的依赖。 +* 然后重新安装 yay。 + +* 没有其他方法来解决这个错误。 + +* 我们已经有一个指南[如何安装 Yay][3],然而,以下是修复的步骤。 +* 从 AUR 克隆 yay 仓库并构建。在终端窗口中依次运行以下命令。 + +``` +cd /tmp +git clone 'https://aur.archlinux.org/yay.git' +cd /tmp/yay +makepkg -si +cd ~ +rm -rf /tmp/yay/ +``` + +安装完成后,你可以尝试运行给你带来这个错误的命令。然后就完成了。如果你仍然有这个错误,请在下面的评论区告诉我。 + +很多人都遇到了这个问题,网络上有[几个讨论][4]。以上是解决这个错误的唯一办法。而且我在任何地方都找不到这个问题的确切根源,除了它是在 pacman 6.0 更新后开始的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/ + +作者:[Arindam][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://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://archlinux.org/ +[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg +[3]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[4]: https://github.com/Jguer/yay/issues/1519 From 96e83c35ce46ead7601f229e3f6a06dbd4ede069 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 7 Jun 2022 08:44:58 +0800 Subject: [PATCH 054/231] translating --- ...c Player for Linux That Just Plays Music and Nothing Else.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md b/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md index bbb3eb36f1..5c2aa21088 100644 --- a/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md +++ b/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/amberol-music-player/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From c73c1874dafc74148ec0d4d42896869e9c8e7650 Mon Sep 17 00:00:00 2001 From: wangzequan <46700056+hadisi1993@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:11:30 +0800 Subject: [PATCH 055/231] Update 20210630 9 reasons I love to use the Qt Creator IDE.md --- .../tech/20210630 9 reasons I love to use the Qt Creator IDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md b/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md index 44a5b4ad73..e542de2f38 100644 --- a/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md +++ b/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/6/qtcreator) [#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hadisi1993) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 059afb872ea0a9156fabf6a6ee9d8e0aa9db2c48 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Jun 2022 10:19:11 +0800 Subject: [PATCH 056/231] R PART 1 --- .../20190131 OOP Before OOP with Simula.md | 112 ++++++------------ 1 file changed, 38 insertions(+), 74 deletions(-) diff --git a/translated/talk/20190131 OOP Before OOP with Simula.md b/translated/talk/20190131 OOP Before OOP with Simula.md index d50b95447f..490a8cb02b 100644 --- a/translated/talk/20190131 OOP Before OOP with Simula.md +++ b/translated/talk/20190131 OOP Before OOP with Simula.md @@ -3,7 +3,7 @@ [#]: author: "Two-Bit History https://twobithistory.org" [#]: collector: "lujun9972" [#]: translator: "aREversez" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " @@ -12,43 +12,45 @@ Simula 诞生之前的面向对象程序设计 想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。 -2009 年,Clojure 的创始人 里奇·希基Rich Hickey 发表了[一场精彩的演讲][1],探讨了为什么上文那样的哲学发问会给面向对象程序设计带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:对象是固定不变的。可实际上,许多对象或者说全部对象都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 故障bugs。 +2009 年,Clojure 的创始人 里奇·希基Rich Hickey 发表了 [一场精彩的演讲][1],探讨了为什么上文那样的哲学窘境会给面向对象程序的编程范式带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:我们想象对象是固定不变的,即使对象的许多或者说全部的属性都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有明确的时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 故障bug。 -希基总结道,这一难题的应对办法就是人们应该将世界模拟成对固定数据的 _过程_ 的集合,而不是变化着的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 +希基总结道,这一难题的应对办法就是人们应该将世界建模成作用于不可变数据的 过程process 的集合,而不是可变的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 -![][2] _作者在远足途中思考面向对象程序设计的本体论问题。_ +![][2] + +_作者在远足途中思考面向对象程序设计的本体论问题。_ 自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。 -我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计在当时还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;围绕其他的设想,Simula I 首次测试了如何能够将数据和过程捆绑起来。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _过程_,而非相互交互的有着隐藏状态的对象。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 +我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;但 Simula I 是一个初稿,它实验了如何能够将数据和过程捆绑起来的其他设想。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _过程_,而非有着隐藏状态的对象之间的相互作用。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 ### 从 Simula 0 到 Simula 67 -Simula 是由 克里斯汀·尼加德Kristen Nygaard奥利-王五·达尔Ole-Johan Dahl 两位挪威人开发出来的。 +Simula 是由两位挪威人 克里斯汀·尼加德Kristen Nygaard奥利-约翰·达尔Ole-Johan Dahl 创建的。 -20世纪50年代末,尼加德受雇于挪威防务科学研究中心,该研究中心附属于挪威军方。在那里,他负责设计蒙特卡洛模拟方法,用于核反应堆设计与操作研究。最初,那些模拟实验完全通过人工开展;后来,实验在 Ferranti Mercury 电脑[1][3] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。 +20 世纪 50 年代末,尼加德受雇于 挪威防务科学研究中心Norwegian Defense Research Establishment(NDRE),该研究中心隶属于挪威军方。在那里,他负责设计 蒙特卡洛模拟方法Monte Carlo simulations,用于核反应堆设计与操作研究。最初,那些模拟实验是由人工完成的;后来,实验在 Ferranti Mercury 电脑 [^1] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。 -尼加德设计的这种模拟实验就是人们所知的“离散事件模型”,模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等”[2][4] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言”或者“蒙特卡洛编译器”的项目[3][5]。 +尼加德设计的这种模拟实验就是人们所知的“离散事件模型discrete event model”,这种模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等” [^2] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言Simulation Language”或者“蒙特卡洛编译器Monte Carlo Compiler”的项目 [^3]。 -达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[4][6] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。Simula 0 远不及后来的编程语言复杂,其基本语言结构是“stations”与“乘客customers”,这些结构可以用于针对具体某些离散事件网络建立模型。通过模拟飞机起飞的过程,尼加德和达尔给出了一个例子。[5][7] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“站”和“乘客”,也可以为更广泛的模拟建立模型。这就是后来 Simula 的第一个主要版本,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。 +达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目,扮演“沃兹尼亚克”的角色(LCTT 译注:指苹果公司联合创始人斯蒂夫·盖瑞·沃兹尼亚克)。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[^4] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。当时的语言要比后来的编程语言抽象得多,其基本语言结构是“车站stations”与“乘客customers”,这些结构可以用于针对具体某些离散事件网络建立模型。尼加德和达尔给出了一个模拟飞机离港的例子。[^5] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“车站”和“乘客”,也可以为更广泛的模拟建立模型。这是两个主要的概括,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。 -Simula I 没有“stations”和“乘客customers”的语言结构,但它可以通过使用“进程”再现这些结构。一个进程包含大量数据属性,这些属性与作为进程 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()`。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于协同程序的一种。Simula I 程序会将系统建立为一套进程的模型,在概念上这些进程并行运行。实际上,一个时间点上能称为“当前进程”的只有一个进程。但是,一旦某个进程暂停运行,那么下一个进程就会自动接替它的位置。开展模拟实验时,Simula 会预留出一份 “事件通知event notices” 的时间线,跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 +Simula I 没有“车站stations”和“乘客customers”的语言结构,但它可以通过使用“过程process”再现这些结构。一个过程包含大量数据属性,这些属性与作为过程的 _操作规程_ 的单个行为相联系。你可能会把过程当作是只有单个方法的对象,比如 `run()` 之类的。不过,这种类比并不全面,因为每个过程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于 协程coroutine 的一种。Simula I 程序会将系统建立为一套过程的模型,在概念上这些过程并行运行。实际上,一个时间点上能称为“当前过程”的只有一个过程。但是,一旦某个过程暂停运行,那么下一个过程就会自动接替它的位置。随着模拟的运行,Simula 会保持一个 “事件通知event notices” 的时间线,跟踪记录每个过程恢复的时间。为了恢复暂停运行的过程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 -尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[6][8] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。这种订单流程的概念被用以例证若干种不同的订单实例,不过这些实例并未调用任何方法。这类程序的主体仅仅是创建进程,并使其运行。 +尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[^6] 在该案例中,过程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。有一个订单过程的定义,用来实例化若干种不同的订单实例,不过这些实例并未调用任何方法。该程序的主体仅仅是创建过程,并使其运行。 -历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了挪威计算机中心工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和Burroughs 公司的 B5500 计算机上均可执行。[7][9] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。 +历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了 挪威计算机中心Norwegian Computer Center 工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和 Burroughs 公司的 B5500 计算机上均可执行。[^7] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。 -奥斯陆大学教授 斯坦因·克罗达尔Stein Krogdahl 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是[一篇题为《记录处理》Record Handling的论文][10],作者是英国计算机科学家 查尔斯·安东尼·理查德·霍尔C.A.R. Hoare。[8][11] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,如果没有提起霍尔的大名,那绝对是不可能的。以下内容摘自霍尔的《记录处理》一文: - -> 该方案设想,在程序执行期间,计算机内部存在任意若干条记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。 +奥斯陆大学University of Oslo教授 斯坦因·克罗达尔Stein Krogdahl 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是 [一篇题为《记录处理》Record Handling的论文][10],作者是英国计算机科学家 查尔斯·安东尼·理查德·霍尔C.A.R. Hoare。[^8] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,一定会经常提起霍尔的大名。以下内容摘自霍尔的《记录处理》一文: +> 该方案设想,在程序执行期间,计算机内部存在任意数量的记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。 +> > 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。 -霍尔在这片论文中并未提到子类的概念,但是达尔非常感谢霍尔,是他引导了两人发现了这一概念。[9][12] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 +霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的过程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“过程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的过程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 -1967年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自 控制数据公司Control Data、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 +1967 年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自控制数据公司、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 -Simula 67 编译器的开发由若干家供应商负责。Simula 用户协会The Association of Simula Users(ASU)也随后成立,并于每年举办年会。不久,Simula 67 的用户就遍及了23个国家。[11][15] +Simula 67 编译器的开发由若干家供应商负责。Simula 用户协会The Association of Simula Users(ASU)也随后成立,并于每年举办年会。不久,Simula 67 的用户就遍及了 23 个国家。[^11] ### 21 世纪的 Simula 语言 @@ -104,11 +106,11 @@ cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simu 这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。 -不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67保留了进程模型,不过只有在使用 `进程`类Process class`模拟`块Simulation block 的时候才能调用。 +不过,我更想介绍一下 Simula I 的核心概念——过程模型。Simula 67保留了过程模型,不过只有在使用 `过程`类Process class`模拟`块Simulation block 的时候才能调用。 -为了表现出进程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 +为了表现出过程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 -这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在一天的模拟时间内有着四个村民的村庄里会发生什么。 +这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个过程,观察在一天的模拟时间内有着四个村民的村庄里会发生什么。 完整程序可以通过此处 [GitHub Gist][17] 的链接获取。 @@ -139,11 +141,11 @@ cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simu 李四最后饿死了,但是他比张三要长寿,因为张三还没到上午7点就死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 -这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。 +这里,我要说明,这个程序最重要的部分只是创建了过程(四个村民),并让它们运行下去。各个过程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改过程的任何属性。过程本身具有内部状态,但是这种内部状态的改变只有过程自身才能做到。 -在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[12][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器”time manager。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列过程,每个过程表示了系统内的自然事件顺序。”[12][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的过程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器”time manager。因此,尽管我们仍然在适当地改变过程,但是没有任何过程可以假设其他过程的状态。每个过程只能间接地与其他过程进行交互。 -这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)不得不承认,尽管我们有了“时间管理器”,我们还是无法实现希基在解释有必要搞清楚程序中的时间概念时所提出的设想。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 +这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)不得不承认,尽管我们有了“时间管理器”,我们还是无法实现希基在解释有必要搞清楚程序中的时间概念时所提出的设想。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的过程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 _如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_ @@ -153,32 +155,18 @@ _TwoBitHistory 文章回顾……_ > > — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22] - 1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, . [↩︎][23] - - 2. Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24]. [↩︎][25] - - 3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, . [↩︎][26] - - 4. ibid. [↩︎][27] - - 5. Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, . [↩︎][28] - - 6. Dahl and Nygaard (1966), 676. [↩︎][29] - - 7. Dahl and Nygaard (1978), 257. [↩︎][30] - - 8. Krogdahl, 3. [↩︎][31] - - 9. Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, . [↩︎][32] - - 10. Dahl and Nygaard (1978), 265. [↩︎][33] - - 11. Holmevik. [↩︎][34] - - 12. Krogdahl, 4. [↩︎][35] - - - +[^1]: Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, .  +[^2]: Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24].  +[^3]: Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, .  +[^4]: ibid.  +[^5]: Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, .  +[^6]: Dahl and Nygaard (1966), 676.  +[^7]: Dahl and Nygaard (1978), 257.  +[^8]: Krogdahl, 3.  +[^9]: Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, .  +[^10]: Dahl and Nygaard (1978), 265.  +[^11]: Holmevik.  +[^12]: Krogdahl, 4.  -------------------------------------------------------------------------------- @@ -195,36 +183,12 @@ via: https://twobithistory.org/2019/01/31/simula.html [b]: https://github.com/lujun9972 [1]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey [2]: https://twobithistory.org/images/river.jpg -[3]: tmp.2ZIthXB4S6#fn:1 -[4]: tmp.2ZIthXB4S6#fn:2 -[5]: tmp.2ZIthXB4S6#fn:3 -[6]: tmp.2ZIthXB4S6#fn:4 -[7]: tmp.2ZIthXB4S6#fn:5 -[8]: tmp.2ZIthXB4S6#fn:6 -[9]: tmp.2ZIthXB4S6#fn:7 [10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf -[11]: tmp.2ZIthXB4S6#fn:8 -[12]: tmp.2ZIthXB4S6#fn:9 -[13]: tmp.2ZIthXB4S6#fn:10 [14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf -[15]: tmp.2ZIthXB4S6#fn:11 [16]: https://www.gnu.org/software/cim/ [17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96 -[18]: tmp.2ZIthXB4S6#fn:12 [19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html [20]: https://twitter.com/TwoBitHistory [21]: https://twobithistory.org/feed.xml [22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw -[23]: tmp.2ZIthXB4S6#fnref:1 [24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf -[25]: tmp.2ZIthXB4S6#fnref:2 -[26]: tmp.2ZIthXB4S6#fnref:3 -[27]: tmp.2ZIthXB4S6#fnref:4 -[28]: tmp.2ZIthXB4S6#fnref:5 -[29]: tmp.2ZIthXB4S6#fnref:6 -[30]: tmp.2ZIthXB4S6#fnref:7 -[31]: tmp.2ZIthXB4S6#fnref:8 -[32]: tmp.2ZIthXB4S6#fnref:9 -[33]: tmp.2ZIthXB4S6#fnref:10 -[34]: tmp.2ZIthXB4S6#fnref:11 -[35]: tmp.2ZIthXB4S6#fnref:12 From 6ece58ee8fb8782da094e104e7b81b9eacdd7f21 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Jun 2022 10:37:57 +0800 Subject: [PATCH 057/231] R PART 2 --- .../20190131 OOP Before OOP with Simula.md | 117 ++++++++---------- 1 file changed, 53 insertions(+), 64 deletions(-) diff --git a/translated/talk/20190131 OOP Before OOP with Simula.md b/translated/talk/20190131 OOP Before OOP with Simula.md index 490a8cb02b..864dfef7f5 100644 --- a/translated/talk/20190131 OOP Before OOP with Simula.md +++ b/translated/talk/20190131 OOP Before OOP with Simula.md @@ -46,7 +46,7 @@ Simula I 没有“车站stations”和“乘客c > > 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。 -霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的过程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“过程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的过程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 +霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的过程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“过程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的过程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[^10] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 1967 年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自控制数据公司、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 @@ -59,106 +59,95 @@ Simula 67 编译器的开发由若干家供应商负责。Simula 用户协 cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来: ``` - - ! dogs.sim ; +! dogs.sim ; +Begin + Class Dog; + ! The cim compiler requires virtual procedures to be fully specified ; + Virtual: Procedure bark Is Procedure bark;; Begin - Class Dog; - ! The cim compiler requires virtual procedures to be fully specified ; - Virtual: Procedure bark Is Procedure bark;; + Procedure bark; Begin - Procedure bark; - Begin - OutText("Woof!"); - OutImage; ! Outputs a newline ; - End; + OutText("Woof!"); + OutImage; ! Outputs a newline ; End; - - Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; - Begin - Procedure bark; - Begin - OutText("Yap yap yap yap yap yap"); - OutImage; - End; - End; - - Ref (Dog) d; - d :- new Chihuahua; ! :- is the reference assignment operator ; - d.bark; End; + Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; + Begin + Procedure bark; + Begin + OutText("Yap yap yap yap yap yap"); + OutImage; + End; + End; + + Ref (Dog) d; + d :- new Chihuahua; ! :- is the reference assignment operator ; + d.bark; +End; ``` 你可以按照下面代码执行程序的编译与运行: ``` - - $ cim dogs.sim - Compiling dogs.sim: - gcc -g -O2 -c dogs.c - gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim - $ ./dogs - Yap yap yap yap yap yap - +$ cim dogs.sim +Compiling dogs.sim: +gcc -g -O2 -c dogs.c +gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim +$ ./dogs +Yap yap yap yap yap yap ``` (你可能会注意到,cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。) 这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。 -不过,我更想介绍一下 Simula I 的核心概念——过程模型。Simula 67保留了过程模型,不过只有在使用 `过程`类Process class`模拟`块Simulation block 的时候才能调用。 +不过,我更想介绍一下 Simula I 的核心概念——过程模型。Simula 67 保留了过程模型,不过只有在使用 `Process` 类 和 `Simulation` 块 的时候才能调用。 -为了表现出过程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 +为了表现出过程是如何运行的,我决定模拟下述场景。想象一下,有这么一座住满了村民的村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里的村民却只有一条鱼竿。村民们胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 -这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个过程,观察在一天的模拟时间内有着四个村民的村庄里会发生什么。 +这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个过程,观察在有着四个村民的村庄里,一天的模拟时间内会发生什么。 完整程序可以通过此处 [GitHub Gist][17] 的链接获取。 我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么: ``` - - 1299.45: 王五饿了,要了鱼竿。 - 1299.45: 王五正在钓鱼。 - 1311.39: 王五钓到了一条鱼。 - 1328.96: 赵六饿了,要了鱼竿。 - 1328.96: 赵六正在钓鱼。 - 1331.25: 李四饿了,要了鱼竿。 - 1340.44: 赵六钓到了一条鱼。 - 1340.44: 李四饿着肚子等着鱼竿。 - 1340.44: 李四在等鱼竿的时候饿死了。 - 1369.21: 王五饿了,要了鱼竿。 - 1369.21: 王五正在钓鱼。 - 1379.33: 王五钓到了一条鱼。 - 1409.59: 赵六饿了,要了鱼竿。 - 1409.59: 赵六正在钓鱼。 - 1419.98: 赵六钓到了一条鱼。 - 1427.53: 王五饿了,要了鱼竿。 - 1427.53: 王五正在钓鱼。 - 1437.52: 王五钓到了一条鱼。 - +1299.45: 王五饿了,要了鱼竿。 +1299.45: 王五正在钓鱼。 +1311.39: 王五钓到了一条鱼。 +1328.96: 赵六饿了,要了鱼竿。 +1328.96: 赵六正在钓鱼。 +1331.25: 李四饿了,要了鱼竿。 +1340.44: 赵六钓到了一条鱼。 +1340.44: 李四饿着肚子等着鱼竿。 +1340.44: 李四在等鱼竿的时候饿死了。 +1369.21: 王五饿了,要了鱼竿。 +1369.21: 王五正在钓鱼。 +1379.33: 王五钓到了一条鱼。 +1409.59: 赵六饿了,要了鱼竿。 +1409.59: 赵六正在钓鱼。 +1419.98: 赵六钓到了一条鱼。 +1427.53: 王五饿了,要了鱼竿。 +1427.53: 王五正在钓鱼。 +1437.52: 王五钓到了一条鱼。 ``` -李四最后饿死了,但是他比张三要长寿,因为张三还没到上午7点就死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 +可怜的李四最后饿死了,但是他比张三要长寿,因为张三还没到上午 7 点就饿死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 这里,我要说明,这个程序最重要的部分只是创建了过程(四个村民),并让它们运行下去。各个过程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改过程的任何属性。过程本身具有内部状态,但是这种内部状态的改变只有过程自身才能做到。 -在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列过程,每个过程表示了系统内的自然事件顺序。”[12][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的过程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器”time manager。因此,尽管我们仍然在适当地改变过程,但是没有任何过程可以假设其他过程的状态。每个过程只能间接地与其他过程进行交互。 +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列过程,每个过程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的过程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器time manager”。因此,尽管我们仍然在适当地改变过程,但是没有任何过程可以假设其他过程的状态。每个过程只能间接地与其他过程进行交互。 -这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)不得不承认,尽管我们有了“时间管理器”,我们还是无法实现希基在解释有必要搞清楚程序中的时间概念时所提出的设想。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的过程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 +这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的过程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 _如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_ -_TwoBitHistory 文章回顾……_ - -> 嗨,大家好!很遗憾,我最近没有时间写新文章,但是我刚刚更新了我的 RSS 记录,整合了目前为止我私下对一些关键人物的采访,比如 Ramanathan Guha 和 Dan Libby。 -> -> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22] [^1]: Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, .  [^2]: Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24].  [^3]: Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, .  -[^4]: ibid.  +[^4]: 出处同上。  [^5]: Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, .  [^6]: Dahl and Nygaard (1966), 676.  [^7]: Dahl and Nygaard (1978), 257.  From ef90fafb88449ad15172fbbc864208b371e489bf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Jun 2022 11:05:22 +0800 Subject: [PATCH 058/231] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 综合考虑,并参考维基百科,Process 还是翻译为“进程”,而非“过程”。只是此进程非彼进程。 --- .../20190131 OOP Before OOP with Simula.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/talk/20190131 OOP Before OOP with Simula.md b/translated/talk/20190131 OOP Before OOP with Simula.md index 864dfef7f5..ea34fa3e92 100644 --- a/translated/talk/20190131 OOP Before OOP with Simula.md +++ b/translated/talk/20190131 OOP Before OOP with Simula.md @@ -14,7 +14,7 @@ Simula 诞生之前的面向对象程序设计 2009 年,Clojure 的创始人 里奇·希基Rich Hickey 发表了 [一场精彩的演讲][1],探讨了为什么上文那样的哲学窘境会给面向对象程序的编程范式带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:我们想象对象是固定不变的,即使对象的许多或者说全部的属性都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有明确的时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 故障bug。 -希基总结道,这一难题的应对办法就是人们应该将世界建模成作用于不可变数据的 过程process 的集合,而不是可变的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 +希基总结道,这一难题的应对办法就是人们应该将世界建模成作用于不可变数据的 进程process 的集合,而不是可变的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 ![][2] @@ -22,7 +22,7 @@ _作者在远足途中思考面向对象程序设计的本体论问题。_ 自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。 -我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;但 Simula I 是一个初稿,它实验了如何能够将数据和过程捆绑起来的其他设想。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _过程_,而非有着隐藏状态的对象之间的相互作用。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 +我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;但 Simula I 是一个初稿,它实验了如何能够将数据和进程捆绑起来的其他设想。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _进程_,而非有着隐藏状态的对象之间的相互作用。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 ### 从 Simula 0 到 Simula 67 @@ -30,13 +30,13 @@ Simula 是由两位挪威人 克里斯汀·尼加德Kristen Nygaard挪威防务科学研究中心Norwegian Defense Research Establishment(NDRE),该研究中心隶属于挪威军方。在那里,他负责设计 蒙特卡洛模拟方法Monte Carlo simulations,用于核反应堆设计与操作研究。最初,那些模拟实验是由人工完成的;后来,实验在 Ferranti Mercury 电脑 [^1] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。 -尼加德设计的这种模拟实验就是人们所知的“离散事件模型discrete event model”,这种模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等” [^2] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言Simulation Language”或者“蒙特卡洛编译器Monte Carlo Compiler”的项目 [^3]。 +尼加德设计的这种模拟实验就是人们所知的“离散事件模型discrete event model”,这种模拟记录了一系列事件随着时间改变系统状态的进程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等” [^2] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言Simulation Language”或者“蒙特卡洛编译器Monte Carlo Compiler”的项目 [^3]。 达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目,扮演“沃兹尼亚克”的角色(LCTT 译注:指苹果公司联合创始人斯蒂夫·盖瑞·沃兹尼亚克)。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[^4] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。当时的语言要比后来的编程语言抽象得多,其基本语言结构是“车站stations”与“乘客customers”,这些结构可以用于针对具体某些离散事件网络建立模型。尼加德和达尔给出了一个模拟飞机离港的例子。[^5] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“车站”和“乘客”,也可以为更广泛的模拟建立模型。这是两个主要的概括,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。 -Simula I 没有“车站stations”和“乘客customers”的语言结构,但它可以通过使用“过程process”再现这些结构。一个过程包含大量数据属性,这些属性与作为过程的 _操作规程_ 的单个行为相联系。你可能会把过程当作是只有单个方法的对象,比如 `run()` 之类的。不过,这种类比并不全面,因为每个过程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于 协程coroutine 的一种。Simula I 程序会将系统建立为一套过程的模型,在概念上这些过程并行运行。实际上,一个时间点上能称为“当前过程”的只有一个过程。但是,一旦某个过程暂停运行,那么下一个过程就会自动接替它的位置。随着模拟的运行,Simula 会保持一个 “事件通知event notices” 的时间线,跟踪记录每个过程恢复的时间。为了恢复暂停运行的过程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 +Simula I 没有“车站stations”和“乘客customers”的语言结构,但它可以通过使用“进程process”再现这些结构。(LCTT 译注:此处使用的“进程”,与当前计算机中用来指代一个已执行程序的实体的概念不同,大致上,你可以将本文中所说的“进程”理解为一种“对象”。)一个进程包含大量数据属性,这些属性与作为进程的 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()` 之类的。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于 协程coroutine 的一种。Simula I 程序会将系统建立为一套进程的模型,在概念上这些进程并行运行。实际上,一个时间点上能称为“当前进程”的只有一个进程。但是,一旦某个进程暂停运行,那么下一个进程就会自动接替它的位置。随着模拟的运行,Simula 会保持一个 “事件通知event notices” 的时间线,跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 -尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[^6] 在该案例中,过程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。有一个订单过程的定义,用来实例化若干种不同的订单实例,不过这些实例并未调用任何方法。该程序的主体仅仅是创建过程,并使其运行。 +尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[^6] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。有一个订单进程的定义,用来实例化若干种不同的订单实例,不过这些实例并未调用任何方法。该程序的主体仅仅是创建进程,并使其运行。 历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了 挪威计算机中心Norwegian Computer Center 工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和 Burroughs 公司的 B5500 计算机上均可执行。[^7] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。 @@ -46,7 +46,7 @@ Simula I 没有“车站stations”和“乘客c > > 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。 -霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的过程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“过程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的过程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[^10] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 +霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[^10] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 1967 年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自控制数据公司、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 @@ -102,11 +102,11 @@ Yap yap yap yap yap yap 这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。 -不过,我更想介绍一下 Simula I 的核心概念——过程模型。Simula 67 保留了过程模型,不过只有在使用 `Process` 类 和 `Simulation` 块 的时候才能调用。 +不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67 保留了进程模型,不过只有在使用 `Process` 类 和 `Simulation` 块的时候才能调用。 -为了表现出过程是如何运行的,我决定模拟下述场景。想象一下,有这么一座住满了村民的村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里的村民却只有一条鱼竿。村民们胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 +为了表现出进程是如何运行的,我决定模拟下述场景。想象一下,有这么一座住满了村民的村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里的村民却只有一条鱼竿。村民们胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 -这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个过程,观察在有着四个村民的村庄里,一天的模拟时间内会发生什么。 +这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在有着四个村民的村庄里,一天的模拟时间内会发生什么。 完整程序可以通过此处 [GitHub Gist][17] 的链接获取。 @@ -135,11 +135,11 @@ Yap yap yap yap yap yap 可怜的李四最后饿死了,但是他比张三要长寿,因为张三还没到上午 7 点就饿死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 -这里,我要说明,这个程序最重要的部分只是创建了过程(四个村民),并让它们运行下去。各个过程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改过程的任何属性。过程本身具有内部状态,但是这种内部状态的改变只有过程自身才能做到。 +这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。 -在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列过程,每个过程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的过程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器time manager”。因此,尽管我们仍然在适当地改变过程,但是没有任何过程可以假设其他过程的状态。每个过程只能间接地与其他过程进行交互。 +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器time manager”。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 -这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的过程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 +这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 _如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_ From 3cf28dc7c0506dbd3d6ff48d948b0b25e83f2470 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Jun 2022 11:12:10 +0800 Subject: [PATCH 059/231] P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @aREversez 翻译的很棒!翻译这种具有长久价值的文章是我认为 LCTT 最具价值的地方。 https://linux.cn/article-14682-1.html --- .../20190131 OOP Before OOP with Simula.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/talk => published}/20190131 OOP Before OOP with Simula.md (98%) diff --git a/translated/talk/20190131 OOP Before OOP with Simula.md b/published/20190131 OOP Before OOP with Simula.md similarity index 98% rename from translated/talk/20190131 OOP Before OOP with Simula.md rename to published/20190131 OOP Before OOP with Simula.md index ea34fa3e92..c5d9c97a84 100644 --- a/translated/talk/20190131 OOP Before OOP with Simula.md +++ b/published/20190131 OOP Before OOP with Simula.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "aREversez" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14682-1.html" Simula 诞生之前的面向对象程序设计 ====== @@ -137,7 +137,7 @@ Yap yap yap yap yap yap 这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。 -在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器time manager”。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器time manager”。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 From 707fba78b3f435c2d1a86b648a5f39626d06efa9 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Tue, 7 Jun 2022 12:50:37 +0800 Subject: [PATCH 060/231] Update 20210131 How to teach open source beyond business.md --- .../tech/20210131 How to teach open source beyond business.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md index 63063b4104..f879204d56 100644 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ b/sources/tech/20210131 How to teach open source beyond business.md @@ -30,10 +30,13 @@ The value of open source methodologies in the tech industry is well-established ### Moving open source culture 'Beyond' business When I met [Liora Milbaum][3], a senior principal software engineer at Red Hat, I learned we shared an interest in bringing open source culture and principles into academics. Liora had previously founded [DevOps Loft][4], in which she shared DevOps practices with people interested in stepping into this world, and wished to start a similar initiative to teach open source to university students. We decided to launch the [Beyond][5] program to connect future talents in the tech industry with open source culture as Red Hat practices it. +当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,向大学生教授开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 We started the Beyond program at the [Academic College of Tel Aviv-Yafo][6], where we were warmly welcomed by the information systems faculty. We started by teaching an "Introduction to DevOps'' course to introduce elements of the DevOps tech stack. Our biggest challenge at the start was deciding how to teach what open source is. The answer was simple: by practicing it, of course. We didn't want to deliver yet another old-school academic course; rather, we wanted to expose students to industry standards. +我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的“DevOps入门”开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 We created a syllabus that incorporated common open source projects and tools to teach the DevOps stack. The course consisted of lectures and hands-on participation taught by engineers. The students were divided into groups, each one mentored and supported by an engineer. They practiced working in teams, sharing knowledge (both inside and outside of their groups), and collaborating effectively. +我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 During our second course, "Open source development pillars," for students in the computer science department, we encountered another big obstacle. Two weeks after the course started, we became fully remote as the COVID pandemic hit the globe. We solved this problem by using the same remote collaboration tools with our students that we were using for our daily work at Red Hat. We were amazed at how simple and smooth the transition was. @@ -42,6 +45,7 @@ During our second course, "Open source development pillars," for students in the (Irit Goihman, [CC BY-SA 4.0][8]) ### Successful early outcomes +### 成果展示 The two courses were a huge success, and we even hired one of the top students we taught. The feedback we received was amazing; the students said we positively impacted their knowledge, thinking, and soft skills. A few students were hired for their first tech job based on their open source contributions during the course. From d029bad9241a7d643cf9337a7306c14daaaa45fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 7 Jun 2022 13:44:33 +0800 Subject: [PATCH 061/231] Translated --- ...al Boot Ubuntu 22.04 LTS and Windows 11.md | 194 ------------------ ...al Boot Ubuntu 22.04 LTS and Windows 11.md | 194 ++++++++++++++++++ 2 files changed, 194 insertions(+), 194 deletions(-) delete mode 100644 sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md create mode 100644 translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md diff --git a/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md deleted file mode 100644 index 0a13767da7..0000000000 --- a/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11" -[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/" -[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Dual Boot Ubuntu 22.04 LTS and Windows 11 -====== -Hey guys, in this guide we will demonstrate how to configure a dual-boot setup of Ubuntu 22.04 LTS (Jammy Jellyfish) alongside Windows 11. - -For this to work, you need to have Windows 11 already installed on your PC.  You will then need to create a separate partition on your hard drive on which Ubuntu 22.04 will be installed. We will go over all this, so don’t worry. - -##### Prerequisites  - -Before setting sail with the dual-boot setup, here is what you need. - -* A bootable USB drive of Ubuntu 22.04 You can download Ubuntu 22.04 ISO image by heading over to the [Ubuntu 22.04 download page][1]. With the ISO image in place, grab a 16GB USB drive and use  Rufus application to make it bootable. - -* A fast and stable internet connection - -### Step 1) Create a Free Partition on Your Hard Drive  - -As mentioned in the introduction, we first and foremost need to create a separate partition on the hard drive on which we are going to install Ubuntu 22.04. - -So, open the disk management utility by pressing Windows Key + R - -In the dialogue box, type diskmgmt.msc and hit ENTER. - -![][2] - -The disk management console displays the current disk partitions as you can see below. We are going to create a partition for installing Ubuntu by Shrinking ‘Volume E’. This might be different in your setup, but just follow along and you will get the drift. - -![][3] - -So, right-click on the volume that you want to shrink and select ‘Shrink’. - -![][4] - -A pop-up dialogue box will appear as shown below. Specify the amount of space to shrink in MB and click ‘Shrink’. - -This is the space that is designated for the Ubuntu 22.04 installation. - -![][5] - -After shrinking the space, it will appear as ‘Unallocated’ or ‘Free Space’ as shown. - -![][6] - -With the free space in place, now plug the bootable USB medium into your PC and reboot your system. Also, be sure to access the BIOS setup and modify the boot priority to have the USB drive as the first priority. Save the BIOS changes and proceed to boot. - -### Step 2) Begin the installation - -On the first screen, you will get the GRUB menu displayed as shown. Select the first option ‘Try or Install Ubuntu’ and press ENTER. - -![][7] - -Ubuntu 22.04 will start loading as shown below. This takes a minute at most. - -![][8] - -Thereafter, the installation wizard will pop open providing you with two options: ‘Try Ubuntu’ and ‘Install Ubuntu’.  Since our mission is to install Ubuntu, select the latter. - -![][9] - -Next, select your preferred Keyboard layout and click ‘Continue’. - -![][10] - -In the ‘Updates and Other Software’ step, select ‘Normal Installation’ in order to install the GUI version of Ubuntu and check the rest of the options to allow download of updates and installation of third-party software for graphics, WiFi hardware and other utilities. - -Then click ‘Continue’. - -![][11] - -The next step provides two options for installation. The first option -’Erase disk and install Ubuntu’ – completely wipes out your drive and installs Ubuntu’. But since this is a dual boot setup, this option will be disastrous to your existing Windows installation. - -Therefore, select ‘Something else’ and click ‘Continue’. - -![][12] - -The partition table will be displayed with all the existing disk partitions. So far, we only have the NTFS partitions and the free space we shrunk earlier. - -For Ubuntu 22.04, we will create the following partitions: - -* /boot        –        1 GB -* /home        –        10 GB -* /            –        12 GB -* Swap         –         2 GB -* EFI          –       300 MB - -To get started with the partitions, click on the [ + ] sign below the ‘Free Space’ partition. - -![][13] - -Fill in the /boot partition details as shown then click ‘OK’. - -![][14] - -Next up, specify the /home partition and click ‘OK’. - -![][15] - -Next, define the / ( root ) partition and click ‘OK’. - -![][16] - -To define swap space, set the size and select ‘Swap area’ for the ‘Use as:’ option. - -![][17] - -Finally, create an EFI system partition if you are using UEFI boot mode. We will assign 300 MB to the EFI partition. - -![][18] - -Below is a summary of the partitions in our partition table. - -![][19] - -To continue with the installation, click ‘Install Now’. On the pop-up shown below, click ‘Continue’ to save the changes to the disk. - -![][20] - -Next, the installation wizard will auto-detect your location. Simply click ‘Continue’. - -![][21] - -Next, create a login user by specifying the name, computer’s name and password. Then click ‘Continue’. - -![][22] - -At this point, the installation wizard will copy all the Ubuntu files and packages to the manually created hard drive partitions and install the required software packages. - -This process takes quite a while, so be patient. In our case, it took roughly 30 minutes. - -![][23] - -Once the installation is completed, click on ‘Restart Now’ to reboot the system. - -![][24] - -At this point, remove your bootable USB drive and press ‘ENTER’ - -![][25] - -When the system restarts, you will find all options for both Ubuntu and Windows 11. - -Select ‘Ubuntu’ to boot into your new Ubuntu 22.04 installation. To boot into Windows 11, select the entry labeled ‘Windows Recovery Environment. - -![][26] - -And there you have it. We have demonstrated how to dual-boot Windows 11 with Ubuntu 22.04. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/ - -作者:[James Kiarie][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.linuxtechi.com/author/james/ -[b]: https://github.com/lkxed -[1]: https://releases.ubuntu.com/22.04/ -[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png -[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png -[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png -[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png -[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png -[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png -[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png -[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png -[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png -[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png -[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png -[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png -[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png -[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png -[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png -[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png -[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png -[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png -[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png -[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png -[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png -[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png -[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png -[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png -[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png diff --git a/translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md new file mode 100644 index 0000000000..0a27cd46b5 --- /dev/null +++ b/translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md @@ -0,0 +1,194 @@ +[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11" +[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何双启动 Ubuntu 22.04 LTS 和 Windows 11 +====== +嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的旁侧配置 Ubuntu 22.04 LTS (Jammy Jellyfish) 的双启动设置 + +为使其能工作,你需要在你的计算机上安装 windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。 + +##### 必要条件  + +在设置双启动前,这些是你所需要的。 + +* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,抓取一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。 + +* 快速稳定的因特网连接 + +### 步骤 1、在你的硬盘驱动器上创建一个可用的分区  + +正如介绍中所提到的,我们首先需要在硬盘驱动器上创建一个单独的分区,我们将在其中安装 Ubuntu 22.04 。 + +因此,通过按下 **Windows + R** 组合键来打开磁盘管理器实用程序 + +在对话框中,输入 diskmgmt.msc ,并按下 回车键ENTER 按键。 + +![][2] + + 磁盘管理disk management控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 ‘卷 E’ 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。 + +![][3] + +因此,在你想要压缩的磁盘驱动器卷上右键,并在弹出的菜单中选择 压缩卷Shrink 选项。 + +![][4] + +一个弹出对话框将会出现,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单 压缩卷Shrink 。 + +这是指定给 Ubuntu 22.04 安装所用的空间. + +![][5] + +在缩小磁盘空间后,它将显示为 未分配Unallocated可用空间Free Space,如图所示。 + +![][6] + +随着可用空间的到来,现在将可启动 USB 媒介盘插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。 + +### 步骤 2、开始安装 + +在第一屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 尝试或安装 UbuntuTry or Install Ubuntu ,并按下 回车键ENTER 按键。 + +![][7] + +Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 + +![][8] + +此后,安装程序向导将弹出,向你提供两个选项: 尝试 UbuntuTry Ubuntu安装 UbuntuInstall Ubuntu。因为我们的使命是安装 Ubuntu ,所以选择后者。 + +![][9] + +接下来,选择你的首选键盘布局,并单击 继续Continue 按钮。 + +![][10] + +在 更新和其它软件Updates and Other Software 步骤中,选择 正常安装Normal Installation以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包 + +接下来,单击 继续Continue 按钮。 + +![][11] + +下一步提供两个安装选项。第一个选项 - 清除整个磁盘并安装 UbuntuErase disk and install Ubuntu – 完全地擦除你的驱动器并安装。但是由于这是一个双启动设置,这个选项对于你现有安装的 Windows 系统来说会是灾难性的。 + +因此,选择 其它选项Something else,单击 继续Continue 按钮。 + +![][12] + +分区表将显示所有现有的磁盘分区。到目前为止,我们仅有 NTFS 分区和我们之前压缩出来的可用分区。 + +针对 Ubuntu 22.04 ,我们将创建下面的分区: + +* /boot        –        1 GB +* /home        –        10 GB +* /            –        12 GB +* Swap         –         2 GB +* EFI          –       300 MB + +为开始使用这些分区,单击 可用空间Free Space分区下面的 [ + ] 符号。 + +![][13] + +如图显示填写 /boot 分区的详细信息,然后单击 确定OK 按钮。 + +![][14] + +接下来,具体指定 /home 分区,并单击 确定OK 按钮。 + +![][15] + +接下来,定义 / ( root ) 分区,并单击 确定OK 按钮。 + +![][16] + +为定义 swap 空间,设置大小,并在 使用为Use as:选项中选择 交换区域Swap area。 + +![][17] + +最后,如果你正在使用 UEFI 启动模式,那么创建一个 EFI 系统分区。我们将分配 300MB 到 EFI 分区。 + +![][18] + +下图是一份我们的分区表的分区摘要。 + +![][19] + +为继续安装,单击 现在安装Install Now。在下图显示的弹出窗口中,单击 继续Continue来保存更改到磁盘。 + +![][20] + +接下来,安装程序向导将自动侦测出你的位置,只需要单击 继续Continue 按钮。 + +![][21] + +接下来,通过具体指定姓名、计算机的名称和密码来创建一个登录用户。接下来单击 继续Continue 按钮。 + +![][22] + +此时,安装程序向导将复制所有的 Ubuntu 文件和软件包到手动创建的硬盘驱动器分区,并安装必要的软件包。 + +这个过程将需要很长一段时间,因此,要有耐心。在我们的实例中,它需要大约 30 分钟。 + +![][23] + +在安装过程完成后,单击 立刻重新启动Restart Now 按钮来重新启动系统。 + +![][24] + +在这时,移除你的可启动 USB 驱动器,并按下 回车键ENTER 按键。 + +![][25] + +在系统重新启动时,你将找到 Ubuntu 和 Windows 11 的所有选项。 + +选择 ‘Ubuntu’ 来启动到你的新 Ubuntu 22.04 安装。为启动到 Windows 11,选择标有 Windows 恢复环境Windows Recovery Environment 的条目。 + +![][26] + +就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://releases.ubuntu.com/22.04/ +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png +[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png +[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png +[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png +[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png +[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png +[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png +[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png From 4b3c8ff432cb695899eb770ad15db07f36c8c1da Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Jun 2022 14:41:55 +0800 Subject: [PATCH 062/231] RP @geekpi https://linux.cn/article-14683-1.html --- ...loading shared libraries- libalpm.so.12.md | 68 +++++++++++++++++++ ...loading shared libraries- libalpm.so.12.md | 65 ------------------ 2 files changed, 68 insertions(+), 65 deletions(-) create mode 100644 published/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md delete mode 100644 translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md diff --git a/published/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/published/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md new file mode 100644 index 0000000000..befb210be1 --- /dev/null +++ b/published/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md @@ -0,0 +1,68 @@ +[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12" +[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14683-1.html" + +如何修复 “yay: error while loading shared libraries: libalpm.so.12” +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/07/144052x9tpvo93zhthdh6x.jpg) + +> 这篇快速指南是为了帮助你修复 “yay error: while loading shared libraries: libalpm.so.12” 错误。 + +如果你在系统中运行 [Arch Linux][1] 的时间比较长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR 助手 Yay,那么有时,由于其他软件包的多次安装升级,Yay 可能会损坏。 + +Yay 助手一般是非常稳定的,但有时它会被搞乱,在修复好之前,你不能使用它安装任何程序。而其中一个令人头疼的错误是这样的: + +``` +yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory +``` + +这个错误特别是在升级到 pacman 6.0 后出现的,因为共享库不兼容。 + +![error while loading shared libraries - yay][2] + +### 如何解决 “yay: error while loading shared libraries: libalpm.so.12” + +这个错误只能通过完全卸载 `yay` 来解决,包括它的依赖。然后重新安装 `yay`。 + +没有其他方法来解决这个错误。 + +我们已经有一个 [如何安装 Yay][3] 的指南,然而,以下是修复的步骤。 + +从 AUR 克隆 yay 仓库并构建。在终端窗口中依次运行以下命令。 + +``` +cd /tmp +git clone 'https://aur.archlinux.org/yay.git' +cd /tmp/yay +makepkg -si +cd ~ +rm -rf /tmp/yay/ +``` + +安装完成后,你可以尝试运行给你带来这个错误的命令。然后就好了。如果你仍然有这个错误,请在下面的评论区告诉我。 + +很多人都遇到了这个问题,网络上有 [几个讨论][4]。以上是解决这个错误的唯一办法。而且我在任何地方都找不到这个问题的确切根源,除了它是在 pacman 6.0 更新后开始的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/ + +作者:[Arindam][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://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://archlinux.org/ +[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg +[3]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[4]: https://github.com/Jguer/yay/issues/1519 diff --git a/translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md deleted file mode 100644 index 090a8b48aa..0000000000 --- a/translated/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12" -[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -如何修复 yay: error while loading shared libraries: libalpm.so.12 -====== -这篇快速指南是为了帮助你修复 yay error: while loading shared libraries: libalpm.so.12. - -如果你在系统中运行 [Arch Linux][1] 的时间更长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR Helper Yay,那么有时,由于其他软件包的多次安装升级,yay 可能会损坏。 - -YAY helper 是非常稳定的,但有时它会被搞乱,你不能使用它进行任何安装,直到你修复它。而其中一个令人头疼的错误是这样的: - -``` -yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory -``` - -这个错误特别是在升级到 pacman 6.0 后出现的,因为共享库不兼容。 - -![error while loading shared libraries - yay][2] - -### 如何解决 yay: error while loading shared libraries: libalpm.so.12 - -* 这个错误只能通过完全卸载 yay 来解决,包括它的依赖。 -* 然后重新安装 yay。 - -* 没有其他方法来解决这个错误。 - -* 我们已经有一个指南[如何安装 Yay][3],然而,以下是修复的步骤。 -* 从 AUR 克隆 yay 仓库并构建。在终端窗口中依次运行以下命令。 - -``` -cd /tmp -git clone 'https://aur.archlinux.org/yay.git' -cd /tmp/yay -makepkg -si -cd ~ -rm -rf /tmp/yay/ -``` - -安装完成后,你可以尝试运行给你带来这个错误的命令。然后就完成了。如果你仍然有这个错误,请在下面的评论区告诉我。 - -很多人都遇到了这个问题,网络上有[几个讨论][4]。以上是解决这个错误的唯一办法。而且我在任何地方都找不到这个问题的确切根源,除了它是在 pacman 6.0 更新后开始的。 - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/ - -作者:[Arindam][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://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lkxed -[1]: https://archlinux.org/ -[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg -[3]: https://www.debugpoint.com/2021/01/install-yay-arch/ -[4]: https://github.com/Jguer/yay/issues/1519 From 07326a3a6dcc79ec4c573e14a330b8c67e48e791 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Mon, 6 Jun 2022 22:15:38 +0800 Subject: [PATCH 063/231] Update 20210131 How to teach open source beyond business.md --- .../20210131 How to teach open source beyond business.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md index f879204d56..f4bb9cc7dd 100644 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ b/sources/tech/20210131 How to teach open source beyond business.md @@ -9,17 +9,25 @@ How to teach open source beyond business ====== +开源不是生意 +===== The Beyond program connects future talents in the tech industry with open source culture. +The Beyond Program 连接起未来科技行业拥抱开源文化的人才。 + ![Teacher or learner?][1] When I was a university student, I didn't understand the fuss about open source software. I used Linux and open source software but didn't really understand the open source model, how to contribute to projects, or how it could benefit my future career. My development experience consisted mainly of homework assignments and a large final project required for my degree. +那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的模式,如何参加一个开源项目,并且它是如何影响我点职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 So, when I took my first steps in the tech industry, there was a big learning curve before I felt comfortable. I needed to understand how to join established, sometimes large, and distributed teams working on an ongoing project. I also needed to know how to communicate properly so that my efforts could be recognized. +所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个正在进行中的项目,可能团队很大,并且分散在不同地方。我还要学会正确的沟通以保证我付出点努力不白费。 I am not special in this regard. This is a common situation among new graduates. +我在这个行业并不特殊。我只是众多毕业生中的一员。 ### Open source gives students a head start +### 开源让毕业生点起点更高 Since then, as an engineer and later as a manager, I have helped onboard many junior engineers. One of the things I've noticed is that the new graduates who have already contributed to open source projects could onboard quickly and start contributing faster than those without this experience. From 0458e678ff8d75e6127636f711409260d9446ea5 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Tue, 7 Jun 2022 10:45:27 +0800 Subject: [PATCH 064/231] Update 20210131 How to teach open source beyond business.md --- ...210131 How to teach open source beyond business.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md index f4bb9cc7dd..8e79263813 100644 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ b/sources/tech/20210131 How to teach open source beyond business.md @@ -9,8 +9,8 @@ How to teach open source beyond business ====== -开源不是生意 -===== +商业之上是开源 +====== The Beyond program connects future talents in the tech industry with open source culture. The Beyond Program 连接起未来科技行业拥抱开源文化的人才。 @@ -30,12 +30,17 @@ I am not special in this regard. This is a common situation among new graduates. ### 开源让毕业生点起点更高 Since then, as an engineer and later as a manager, I have helped onboard many junior engineers. One of the things I've noticed is that the new graduates who have already contributed to open source projects could onboard quickly and start contributing faster than those without this experience. +作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。 By incorporating open source methodology into academic studies, students can gain experience relevant to the industry, learn to reuse their existing knowledge, and establish a good platform for formulating ideas and sharing knowledge. Practicing open source can make a positive impact on students' technical knowledge and experience. This can help them become more successful in bootstrapping their careers. +通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会复用他们自己的知识,并建立一个陈述观点和分享知识的平台。 The value of open source methodologies in the tech industry is well-established and shapes the culture of software companies worldwide. Involvement in open source projects and adoption of the [open organization culture][2] has become an industry standard. Companies seek fresh-minded, talented employees who know how to work in open source and cultivate its culture. Therefore, the tech industry must drive the academic world to embrace open source culture as one of the fundamental methodologies to learn in tech studies. +开源在科技行业的价值是塑造并完善全球软件公司的文化。参与开源项目并采用[开放组织文化][2]正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖,才华横溢的员工。 +因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 ### Moving open source culture 'Beyond' business +### 商业之上是开源文化 When I met [Liora Milbaum][3], a senior principal software engineer at Red Hat, I learned we shared an interest in bringing open source culture and principles into academics. Liora had previously founded [DevOps Loft][4], in which she shared DevOps practices with people interested in stepping into this world, and wished to start a similar initiative to teach open source to university students. We decided to launch the [Beyond][5] program to connect future talents in the tech industry with open source culture as Red Hat practices it. 当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,向大学生教授开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 @@ -67,7 +72,7 @@ via: https://opensource.com/article/21/1/open-source-beyond-business 作者:[Irit Goihman][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/duoluoxiaosheng) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From efd5e856ad3a612dd8a071ec71296b301743eae3 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Tue, 7 Jun 2022 15:06:34 +0800 Subject: [PATCH 065/231] Update 20210131 How to teach open source beyond business.md --- ...ow to teach open source beyond business.md | 33 +++++-------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md index 8e79263813..a6c4ed13bc 100644 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ b/sources/tech/20210131 How to teach open source beyond business.md @@ -7,64 +7,49 @@ [#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) [#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) -How to teach open source beyond business -====== 商业之上是开源 ====== -The Beyond program connects future talents in the tech industry with -open source culture. -The Beyond Program 连接起未来科技行业拥抱开源文化的人才。 + +The Beyond Program 连接起未来科技行业的人才和开源文化。 ![Teacher or learner?][1] -When I was a university student, I didn't understand the fuss about open source software. I used Linux and open source software but didn't really understand the open source model, how to contribute to projects, or how it could benefit my future career. My development experience consisted mainly of homework assignments and a large final project required for my degree. -那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的模式,如何参加一个开源项目,并且它是如何影响我点职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 +那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我点职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 -So, when I took my first steps in the tech industry, there was a big learning curve before I felt comfortable. I needed to understand how to join established, sometimes large, and distributed teams working on an ongoing project. I also needed to know how to communicate properly so that my efforts could be recognized. 所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个正在进行中的项目,可能团队很大,并且分散在不同地方。我还要学会正确的沟通以保证我付出点努力不白费。 -I am not special in this regard. This is a common situation among new graduates. 我在这个行业并不特殊。我只是众多毕业生中的一员。 -### Open source gives students a head start ### 开源让毕业生点起点更高 -Since then, as an engineer and later as a manager, I have helped onboard many junior engineers. One of the things I've noticed is that the new graduates who have already contributed to open source projects could onboard quickly and start contributing faster than those without this experience. 作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。 -By incorporating open source methodology into academic studies, students can gain experience relevant to the industry, learn to reuse their existing knowledge, and establish a good platform for formulating ideas and sharing knowledge. Practicing open source can make a positive impact on students' technical knowledge and experience. This can help them become more successful in bootstrapping their careers. -通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会复用他们自己的知识,并建立一个陈述观点和分享知识的平台。 +通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。 -The value of open source methodologies in the tech industry is well-established and shapes the culture of software companies worldwide. Involvement in open source projects and adoption of the [open organization culture][2] has become an industry standard. Companies seek fresh-minded, talented employees who know how to work in open source and cultivate its culture. Therefore, the tech industry must drive the academic world to embrace open source culture as one of the fundamental methodologies to learn in tech studies. 开源在科技行业的价值是塑造并完善全球软件公司的文化。参与开源项目并采用[开放组织文化][2]正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖,才华横溢的员工。 因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 -### Moving open source culture 'Beyond' business ### 商业之上是开源文化 -When I met [Liora Milbaum][3], a senior principal software engineer at Red Hat, I learned we shared an interest in bringing open source culture and principles into academics. Liora had previously founded [DevOps Loft][4], in which she shared DevOps practices with people interested in stepping into this world, and wished to start a similar initiative to teach open source to university students. We decided to launch the [Beyond][5] program to connect future talents in the tech industry with open source culture as Red Hat practices it. 当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,向大学生教授开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 -We started the Beyond program at the [Academic College of Tel Aviv-Yafo][6], where we were warmly welcomed by the information systems faculty. We started by teaching an "Introduction to DevOps'' course to introduce elements of the DevOps tech stack. Our biggest challenge at the start was deciding how to teach what open source is. The answer was simple: by practicing it, of course. We didn't want to deliver yet another old-school academic course; rather, we wanted to expose students to industry standards. 我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的“DevOps入门”开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 -We created a syllabus that incorporated common open source projects and tools to teach the DevOps stack. The course consisted of lectures and hands-on participation taught by engineers. The students were divided into groups, each one mentored and supported by an engineer. They practiced working in teams, sharing knowledge (both inside and outside of their groups), and collaborating effectively. 我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 -During our second course, "Open source development pillars," for students in the computer science department, we encountered another big obstacle. Two weeks after the course started, we became fully remote as the COVID pandemic hit the globe. We solved this problem by using the same remote collaboration tools with our students that we were using for our daily work at Red Hat. We were amazed at how simple and smooth the transition was. +在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础”中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。 我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。 ![Beyond teaching online][7] (Irit Goihman, [CC BY-SA 4.0][8]) -### Successful early outcomes ### 成果展示 -The two courses were a huge success, and we even hired one of the top students we taught. The feedback we received was amazing; the students said we positively impacted their knowledge, thinking, and soft skills. A few students were hired for their first tech job based on their open source contributions during the course. +这两个课程去得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程器件的开源贡献而得到了他们第一份技术工作。 -Other academic institutions have expressed interest in adopting these courses, so we've expanded the program to another university. +其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。 -I am fortunate to co-lead this successful initiative with Liora, accompanied by a team of talented engineers. Together, we are helping increase the open source community a bit more. +很荣幸,在一群优秀工程师的参与下,与 Liora 一起领导这个成功的项目。我们一起助力开源社区的成长。 -------------------------------------------------------------------------------- @@ -72,7 +57,7 @@ via: https://opensource.com/article/21/1/open-source-beyond-business 作者:[Irit Goihman][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/duoluoxiaosheng) +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9be1e6095922eb69b661017cc3e2bbfa296e591f Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Tue, 7 Jun 2022 15:15:34 +0800 Subject: [PATCH 066/231] Update 20210131 How to teach open source beyond business.md --- ...0210131 How to teach open source beyond business.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md index a6c4ed13bc..b1688ced71 100644 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ b/sources/tech/20210131 How to teach open source beyond business.md @@ -14,11 +14,11 @@ The Beyond Program 连接起未来科技行业的人才和开源文化。 ![Teacher or learner?][1] -那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我点职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 +那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我的职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 -所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个正在进行中的项目,可能团队很大,并且分散在不同地方。我还要学会正确的沟通以保证我付出点努力不白费。 +所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个可能拥有很大的团队,并且分散在不同地方的正在进行中的项目。我还要学会正确的沟通以保证我付出点努力不白费。 -我在这个行业并不特殊。我只是众多毕业生中的一员。 +我在这个行业并不优秀。我只是众多毕业生中的一员。 ### 开源让毕业生点起点更高 @@ -31,9 +31,9 @@ The Beyond Program 连接起未来科技行业的人才和开源文化。 ### 商业之上是开源文化 -当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,向大学生教授开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 +当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 -我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的“DevOps入门”开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 +我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 From c131fc377acfbb42c0b910f410002287a5f0ec81 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Tue, 7 Jun 2022 15:23:38 +0800 Subject: [PATCH 067/231] Rename sources/tech/20210131 How to teach open source beyond business.md to translated/tech/20210131 How to teach open source beyond business.md --- .../tech/20210131 How to teach open source beyond business.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20210131 How to teach open source beyond business.md (100%) diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/translated/tech/20210131 How to teach open source beyond business.md similarity index 100% rename from sources/tech/20210131 How to teach open source beyond business.md rename to translated/tech/20210131 How to teach open source beyond business.md From 26126ea052f73a781d5d11a118915dae9f4e1dc5 Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 7 Jun 2022 15:28:33 +0800 Subject: [PATCH 068/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220607=20Linux=20Kernel=205.19=20RC1=20Released,=20C?= =?UTF-8?q?oncluding=20ARM=20Generic=20Kernel=20Work.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sed, Concluding ARM Generic Kernel Work.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md diff --git a/sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md b/sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md new file mode 100644 index 0000000000..8f58b6aa8a --- /dev/null +++ b/sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md @@ -0,0 +1,101 @@ +[#]: subject: "Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work" +[#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work +====== +Linus Torvalds releases Linux Kernel 5.19 RC1 for testing, bringing a vast amount of changes. + +Following the [Linux Kernel 5.18][1] release last month, Linus Torvalds announced the first release candidate availability of Linux Kernel 5.19. With this announcement, the official merge window of Linux Kernel 5.19 closes, meaning no new features are to be accepted unless it’s critical. + +A brief look at the new items in Linux Kernel 5.19 shows regular updates across CPU, GPU, networking, storage and core modules. In addition, the code cleanups, removal of obsolete hardware and continuous support for future chipsets are the highlight of this release. + +Without further introduction, let’s take a look at the new features. + +### Linux Kernel 5.19 – New Features (RC1) + +#### Processor + +First and foremost, Linux Kernel 5.19 begins [initial support][2]for the LoongArch CPU family. It is developed by the Chinese company [Loongson][3]. LoongArch CPUs are the general general-purpose, MIPS architecture-compatible microprocessors. Although the support is now available, you can not boot Linux in these CPUs because some code is still under review. And hopefully, they will be already in the 5.20 version. + +The new [Intel IFS driver lands][4] in this version which helps to detect hardware issues before deployment and after. It will help detect CPU faults at the circuit level at an early stage. + +The power management and thermal work have continued for the last couple of Kernel releases for Intel CPUs. And [this release][5] also is no exception. Firstly, the Intel Run-Time Average Power Limiting (RAPL) support was added for Raptor and Alder Lake family. Second, the P-state driver is improved to handle frequency variance and CPU based scaling support is added to the passive devfreq. + +While the thermal and power dominated Intel CPUs, AMD sees more performance updates in its own CPU families. Firstly, more updates were [introduced][6] in the Instruction-Based Sampling (IBS) module for AMD Zen 4 CPUs are planned for the end of this year. Moreover, PerfMonV2 is introduced in this release giving more performance monitoring capabilities. + +Furthermore, the a.out support is removed in this release. Also, the Renesas H8/300 CPU architecture support is removed as its obsolete by now. + +#### Major ARM update + +Finally, the mainline Linux Kernel can [support multiple ARM platforms][7] with this release. This is a big step in this version, which is heard in Linus’s opening note on this Rc1 release. This is a long process that started with Linux 3.7 and spanned more than a decade of work and patches. + +![Linux Kernel 5.19 Rc1 release announcement mentions ARM changes][8] + +#### Graphics and Storage Updates + +The storage subsystem sees performance improvements across popular file systems. The significant changes include Apple M1 NVMe controller support and better support for the XFS file system. In addition, enhancements arrive for Btrfs, F2FS and exFAT file systems. + +One of the exciting metrics in terms of LOC is Linux Kernel 5.19 adds around [half-million lines of code][9] for the Graphics driver alone. It includes graphics updates across AMD RDNA, CDNA, Intel’s Raptor Lake, Intel’s DG2/Alchemist and more. + +#### Important Networking Changes + +Looking at the massive growth in the data transmission, the support for Big TCP lands which helps the data centre traffic at a range of 400GBit. It also aims to give lower latency in high-performance networking environments. + +The Multi-Path TCP (MPTCP) continues its improvements. In addition to that, Qualcomm ath11k WiFi driver adds wake-on-lan support in this version. Also, support is added for Realtek 8852ce chipset, MediaTek T700 modems and Rensas RZ/V2M + +#### Other Notable Features + +Firstly, the famous random number generator in Kernel [continues][10] its improvements in this release. + +Second, the famous and emerging Framework Modular Laptop gets this release Chrome OS EC Driver support. The Framework laptop now can take advantage of ChromeOS’s embedded controller as a non-Chromebook device. + +Moreover, more updates arrive at Wacom tabs and other related devices. It [includes][11] improved support for Lenovo Thinkpad TrackPoint II, Google Whiskers Touchpad, Lenovo X12 TrackPoint, etc. + +### Linux Kernel 5.19 Download + +If you want to test and try this release candidate, download the release tarball [here][12]. Or refer below for a direct link to tar and diffs. + +| - | - | - | - | - | - | - | - | - | +| :- | :- | :- | :- | :- | :- | :- | :- | :- | +| mainline: | 5.19-rc1 | 2022-06-06 | [tarball][13] | | [patch][14] | | [view diff][15] | [browse][16] | + +There will be multiple kernel iterations until the final release, expected around July 2022. + +*[Via Kernel mailing list.][17]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/ + +作者:[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://www.debugpoint.com/2022/05/linux-kernel-5-18/ +[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e975804360665d973211e4d9390cb +[3]: http://www.loongson.cn/ +[4]: https://lore.kernel.org/lkml/13e61c61-0d4b-5f48-6373-f056bf8b603f@redhat.com/ +[5]: https://lore.kernel.org/linux-acpi/CAJZ5v0hKBt3js65w18iKxzWoN5QuEc84_2xcM6paSv-ZHwe3Rw@mail.gmail.com/ +[6]: https://lore.kernel.org/lkml/You6yGPUttvBcg8s@gmail.com/ +[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ecf0aa5317b0ad6bb015128a5b763c954fd58708 +[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Linux-Kernel-5.19-Rc1-release-announcement-mentions-ARM-changes.jpg +[9]: https://lore.kernel.org/lkml/CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com/ +[10]: https://lore.kernel.org/lkml/20220522214457.37108-1-Jason@zx2c4.com/T/#u +[11]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2205241107530.28985@cbobk.fhfr.pm/ +[12]: https://www.kernel.org/ +[13]: https://git.kernel.org/torvalds/t/linux-5.19-rc1.tar.gz +[14]: https://git.kernel.org/torvalds/p/v5.19-rc1/v5.18 +[15]: https://git.kernel.org/torvalds/ds/v5.19-rc1/v5.18 +[16]: https://git.kernel.org/torvalds/h/v5.19-rc1 +[17]: https://lore.kernel.org/lkml/CAHk-=wgZt-YDSKfdyES2p6A_KJoG8DwQ0mb9CeS8jZYp+0Y2Rw@mail.gmail.com/T/#u From 61f6040fdae86c2a0aeb5a9eb4070d450ba9c97f Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 7 Jun 2022 18:07:17 +0800 Subject: [PATCH 069/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220607=20Integrating=20Zeek=20with=20ELK=20Stack.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0220607 Integrating Zeek with ELK Stack.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 sources/tech/20220607 Integrating Zeek with ELK Stack.md diff --git a/sources/tech/20220607 Integrating Zeek with ELK Stack.md b/sources/tech/20220607 Integrating Zeek with ELK Stack.md new file mode 100644 index 0000000000..3654c2a9a7 --- /dev/null +++ b/sources/tech/20220607 Integrating Zeek with ELK Stack.md @@ -0,0 +1,141 @@ +[#]: subject: "Integrating Zeek with ELK Stack" +[#]: via: "https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/" +[#]: author: "Tridev Reddy https://www.opensourceforu.com/author/tridev-reddy/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Integrating Zeek with ELK Stack +====== +Zeek is an open source network security monitoring tool. This article discusses how to integrate Zeek with ELK. + +![Integrating-Zeek-with-ELK-Stack-Featured-image][1] + +In the article titled ‘Network Security Monitoring Made Easy with Zeek’ published in the March 2022 edition of this magazine, we looked into the capabilities of Zeek and learned how to get started with it. We will now take our learning experience a bit further and see how to integrate it with ELK (also know as Elasticsearch, Kibana, Beats, and Logstash). + +For this, we will use a tool called Filebeat, which monitors, collects and forwards the logs to Elasticsearch. We will configure Filebeat with Zeek, so that the data collected by the latter will be forwarded and centralised in our Kibana dashboard. + +### Installing Filebeat + +Let’s first set up Filebeat with Zeek. To install Filebeat using *apt*, give the following command: + +``` +sudo apt install filebeat +``` + +Next, we need to configure the *.yml* file, which is present in the etc*/filebeat/* folder: + +``` +sudo nano /etc/filebeat/filebeat.yml +``` + +We need to configure only two things here. In the *Filebeat* Input section, change the type to log and uncomment the *enabled*: false and change it to true. We also need to specify the path of where the logs are stored, i.e., we need to specify */opt/zeek/logs/current/*.log* + +Once this is done, the first part of the settings should look similar to what’s shown in Figure 1. + +![Figure 1: Filebeat config (a)][2] + +The second thing to be changed in the Elasticsearch output section is under *Outputs.* Uncomment the output.elasticsearch and hosts. Make sure the URL of the host and port number are similar to what you configured while installing ELK. We kept it as localhost with port number 9200. + +In the same section, uncomment the user name and password at the bottom, and enter the user name and password of the elastic user that you generated while configuring ELK after installation. Once this is done, refer to Figure 2 and check the settings. + +![Figure 2: Filebeat config (b)][3] + +Now that we have completed installing and configuring , we need to configure Zeek so that it stores the logs in JSON format. For that, ensure your Zeek instance is stopped. If it’s not, execute the command given below to stop it: + +``` +cd /opt/zeek/bin +./zeekctl stop +``` + +Now we need to add a small line in the local.zeek, which is present in the *opt/zeek/share/zeek/site/* directory. + +Open the file as root and add the following line: + +``` +@load policy/tuning/json-logs.zeek +``` + +Refer to Figure 3 and make sure the settings are done correctly. + +![Figure 3: local.zeek file][4] + +As we have changed a few configurations of Zeek, we need to re-deploy it, which can be done by executing the following command: + +``` +cd /opt/zeek/bin +./zeekctl deploy +``` + +Now we need to enable the Zeek module in Filebeat so that it forwards the logs from Zeek. Execute the following command: + +``` +sudo filebeat modules enable zeek +``` + +We are almost ready; in the last step, configure the *zeek.yml* file to mention what type of data is to be logged. This can be done by modifying the */etc/filebeat/modules.d/zeek.yml* file. + +In this *.yml file*, we must mention the directory where these specified logs are stored. We know that the logs are stored in the current folder, which has several files like *dns.log*, *conn.log, dhcp.log,* and many more. We need to mention each path in each section. You can leave unwanted files by changing the enabled value to false, if and only if you don’t want logs from that file/program. + +For example, for *dns*, make sure the enabled value is true and the path is mentioned as: + +``` +var.paths: [ “/opt/zeek/logs/current/dns.log”, “/opt/zeek/logs/*.dns.json” ] +``` + +Repeat this for the rest of the files. We did this for a few that we needed. We added everything that was mainly required. You can do the same. Refer to Figure 4. + +![Figure 4: zeek.yml configuration][5] + +Now it’s time to start the Filebeat. Execute the following commands: + +``` +sudo filebeat setup +sudo service filebeat start +``` + +Now that everything is done, let’s move to our Kibana dashboard and check whether we are receiving the data from Zeek via Filebeat or not. + +![Figure 5: Dashboard of Kibana (Destination Geo)][6] + +Navigate to the dashboard; you can see a clear statistical analysis of the data it has captured (Figure 5 and Figure 6). + +![Figure 6: Dashboard of Kibana (Network)][7] + +Now let’s move to the Discover tab and check the results by filtering using the query: + +``` +event.module: “zeek” +``` + +This query will filter all the data it received in a certain time and show us only the data from the module named Zeek (Figure 7). + +![Figure 7: Filtered data by event.module query][8] + +### Acknowledgements + +*The authors are grateful to Sibi Chakkaravarthy Sethuraman, Sudhakar Ilango, Nandha Kumar R. and Anupama Namburu at the School of Computer Science and Engineering, VIT-AP for their continuous guidance and support. A special thanks to the Center for Excellence in Artificial Intelligence and Robotics (AIR).* + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/ + +作者:[Tridev Reddy][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/tridev-reddy/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Integrating-Zeek-with-ELK-Stack-Featured-image.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Filebeat-config-a.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Filebeat-config-b.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-local.zeek-file-1.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-zeek.yml-configuration.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Dashboard-of-Kibana-Destination-Geo.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Dashboard-of-Kibana-Network-1.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Filtered-data-by-event.jpg From 2aa97899c4601db8f23d10e5ff405609b0910feb Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 7 Jun 2022 20:38:19 +0800 Subject: [PATCH 070/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220607=20OpenInfra=20Foundation=20Launches=20-direct?= =?UTF-8?q?ed=20funding-=20To=20Support=20Open=20Source=20Projects.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...unding- To Support Open Source Projects.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md diff --git a/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md b/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md new file mode 100644 index 0000000000..887fd972a7 --- /dev/null +++ b/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md @@ -0,0 +1,47 @@ +[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects" +[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects +====== +![open-infra-berlin-event][1] + +The OpenInfra Foundation, formerly known as the OpenStack Foundation until it expanded its scope beyond its flagship project a few years ago, announced today an intriguing new way for companies to fund open source projects within the foundation. Corporate members of open source foundations have traditionally supported the organisation by paying a membership fee, which the foundations then distribute as they see fit. The OpenInfra foundation is now launching a new ‘Directed Funding’ model that allows members to direct their funds directly to a project. + +The foundation previously did not allow this because, as Bryce pointed out, it can create mixed incentives and a pay-for-play dynamic, which the organisation has always tried to avoid. However, there was a lot of interest in the community to support specific projects, which makes sense given that the foundation is now home to a wider variety of projects, but not every member is heavily invested in every project. + +Bryce stated that the foundation’s leadership and board spent a significant amount of time considering how to reconcile the foundation’s core principles with this new model. As a result, the model tries to combine the best of the OpenStack/OpenInfra technical governance model, which has worked well over the last decade, with these new financial considerations. + +Under this ‘directed funding’ model, each new project will have its own legal entity that will hold the project funding. To ensure that the new projects are legitimate, an OpenInfra Platinum member (currently nine, including Ant Group, Huawei, Meta, Microsoft, and Red Hat) must serve as the project’s sponsor, after which other organisations can join the project fund. If a sponsoring company is not already an OpenInfra member, it must become one. All of these funding members then form a project fund governing board, which decides on the fees for creating a budget. Meanwhile, the OpenInfra Foundation will provide these projects with community-building services. + +This new model will, for the time being, only apply to new projects that join the foundation. Bryce and Collier noted that there may be some existing projects where the organisation could retroactively apply this new model, but that is not currently on the roadmap. + +The OpenInfra foundation has added projects such as Kata Containers for increased container security, Airship for infrastructure lifecycle management, the Startling X edge compute stack, and the Zuul CI/CD platform since it expanded beyond OpenStack. + +“The most important thing we’ve learned from each of these successful projects is that collaboration is key and the more breadth in the ecosystem of support the better,” said Thierry Carrez, general manager of the OpenInfra Foundation. “In fact, we’ve found that the most successful open source projects are funded by multiple companies, because they are able to combine their resources to achieve a much stronger rate of return.” + +This new model is clearly a way for the OpenInfra Foundation to bring new projects — and new members — into the fold. Its models for managing open source projects in a multi-party ecosystem — both through the new directed funds and its more traditional approach — may not be suitable for every project, as the leadership team readily admits. Even if the OpenInfra Foundation only receives a small percentage of projects, the number of open-source projects is increasing as the demand for these sophisticated cloud infrastructure projects grows, all while they become more complex. + +The Foundation also announced a couple of milestone releases for its various projects, including version 2.0 of Kata Containers, version 5.0 of Zuul, and the release of StarlingX 6.0. + +“The Foundation celebrates its 10 anniversary this year, and as we look to our next decade of open infrastructure, we’re building momentum on what makes our model so successful: aligning companies and individuals who wish to work together, providing them with a framework and tools to effectively collaborate, and helping them invest their funds to best help the project they care about,” said Collier. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/ + +作者:[Laveesh Kocher][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/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png From 8e673990ad59a78b1ca8fe3e5c509e126f01fb6c Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 7 Jun 2022 20:43:38 +0800 Subject: [PATCH 071/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220605=20Contribute=20at=20the=20Fedora=20Linux=2037?= =?UTF-8?q?=20Test=20Week=20for=20Kernel=205.18.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ntribute at the Fedora Linux 37 Test Week for Kernel 5.18.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md b/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md index 5eccf563f7..7fe20dbeec 100644 --- a/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md +++ b/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md @@ -2,7 +2,7 @@ [#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/" [#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From c0e9c52a782984e540de13b1bc0fb62da81a507f Mon Sep 17 00:00:00 2001 From: lkxed Date: Tue, 7 Jun 2022 21:04:56 +0800 Subject: [PATCH 072/231] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220605=20Contribute=20at=20the=20Fedora=20Linux=2037?= =?UTF-8?q?=20Test=20Week=20for=20Kernel=205.18.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dora Linux 37 Test Week for Kernel 5.18.md | 48 ------------------- ...dora Linux 37 Test Week for Kernel 5.18.md | 45 +++++++++++++++++ 2 files changed, 45 insertions(+), 48 deletions(-) delete mode 100644 sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md create mode 100644 translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md diff --git a/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md b/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md deleted file mode 100644 index 7fe20dbeec..0000000000 --- a/sources/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md +++ /dev/null @@ -1,48 +0,0 @@ -[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18" -[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/" -[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Contribute at the Fedora Linux 37 Test Week for Kernel 5.18 -====== -![][1] - -The kernel team is working on final integration for Linux kernel 5.18. This version was just recently released, and will arrive soon in Fedora. As a result, the Fedora kernel and QA teams have organized a test week now through **Sunday, June 12, 2022.** Refer to the [wiki][2][page][3] for links to the test images you’ll need to participate. Read below for details. - -### How does a test week work? - -A test week is an event where anyone can help make sure changes in Fedora work well in an upcoming release. Fedora community members often participate, and the public is welcome at these events. If you’ve never contributed before, this is a perfect way to get started. - -To contribute, you only need to be able to do the following things: - -* Download test materials, which include some large files -* Read and follow directions step by step - -The [wiki page][4] for the kernel test day has a lot of good information on what and how to test. After you’ve done some testing, you can log your results in the test day [web][5][application][6]. If you’re available on or around the day of the event, please do some testing and report your results. We have a document which provides [all the steps][7] written. - -Happy testing, and we hope to see you on test day. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/ - -作者:[Sumantro Mukherjee][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://fedoramagazine.org/author/sumantrom/ -[b]: https://github.com/lkxed -[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg -[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week -[3]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week -[4]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week -[5]: https://testdays.fedoraproject.org/events/136 -[6]: https://testdays.fedoraproject.org/events/136 -[7]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/ diff --git a/translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md b/translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md new file mode 100644 index 0000000000..acc721cec7 --- /dev/null +++ b/translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md @@ -0,0 +1,45 @@ +[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18" +[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/" +[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fedora Linux 37 的内核 5.18 测试周到了,一起来做贡献吧! +====== +![][1] + +Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此,Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [wiki page][2] 来获取你将要参与的测试镜像链接。继续阅读下文,可了解更多细节~ + +### 测试周是如何运作的? + +测试周是一个人人都可以参与的活动。在测试周,任何人都可以为 Fedora 即将发布的版本查漏补缺,确保它最终能够运行良好。Fedora 社区成员会经常参与这个活动,我们同时也欢迎公众参加这些活动。如果你以前从未做过贡献,那么这是一个绝佳的上手机会。 + +要想做出贡献,你只需要能够执行以下操作即可: + +* 下载测试资料,包括一些大文件 +* 阅读并按照说明一步一步地进行操作 + +内核测试日的 [维基页面][2] 提供了很多关于测试内容和测试方法的有用信息。完成一些测试后,你可以在测试日的 [Web 应用][3] 上记录下你的测试结果。如果你在活动的当天或前后有空,请进行一些测试并报告你的结果。不知道该怎么做?没关系,我们有一份文件,其中提供了 [所有步骤][4]。 + +希望能在测试日见到你,预祝测试愉快~ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/ + +作者:[Sumantro Mukherjee][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/sumantrom/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg +[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week +[3]: https://testdays.fedoraproject.org/events/136 +[4]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/ From 464b27f5b2f009a228e512d98d78077af3e24cfa Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 8 Jun 2022 08:47:34 +0800 Subject: [PATCH 073/231] translated --- ...eate Local Yum-DNF Repository on RHEL 9.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) rename {sources => translated}/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md (54%) diff --git a/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md b/translated/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md similarity index 54% rename from sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md rename to translated/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md index 1fabed8d0c..994b53dc05 100644 --- a/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md +++ b/translated/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md @@ -7,23 +7,23 @@ [#]: publisher: " " [#]: url: " " -How to Create Local Yum/DNF Repository on RHEL 9 +如何在 RHEL 9 上创建本地 Yum/DNF 仓库 ====== -Hello techies, recently Red Hat has released its latest operating system RHEL 9. RHEL 9 fulfill all the requirements of hybrid cloud. It can be installed on physical server, virtual machine and inside the container image. +你好,技术人员,最近红帽发布了最新的操作系统 RHEL 9,RHEL 9 满足了混合云的所有要求。它可以安装在物理服务器、虚拟机和容器镜像中。 -When we don’t have subscription and want to install packages for doing the POCs then setting up local yum or dnf repository will be handy. +当我们没有订阅的时候,想安装软件包来做 POC,那么设置本地的 yum 或 dnf 仓库将是很方便的。 -In this guide, we will cover how to create local yum/dnf repository on RHEL 9 using DVD or ISO file step by step. +在本指南中,我们将介绍如何在 RHEL 9 上使用 DVD 或 ISO 文件一步一步地创建本地 yum/dnf 资源库。 -Prerequisites for creating local Yum/DNF repository +创建本地 yum/dnf 资源库的先决条件: -* Minimal Install RHEL 9 system -* Sudo User with admin privileges -* RHEL 9 DVD or ISO file +* 最小化安装 RHEL 9 系统 +* 具有管理权限的 sudo 用户 +* RHEL 9 DVD 或 ISO 文件 -### 1 ) Mount RHEL 9 ISO File or DVD +### 1)挂载 RHEL 9 ISO 文件或 DVD -We are assuming RHEL 9 iso file is already copied into the system. Run following mount command to mount ISO file on /opt/repo folder. +我们假设 RHEL 9 iso 文件已经被复制到系统中。运行下面的挂载命令,将 ISO 文件挂载到 /opt/repo 文件夹。 ``` $ sudo mkdir /var/repo @@ -32,15 +32,15 @@ $ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/ ![Mount-RHEL9-ISO-File-Command][1] -In case of  dvd, run +如果是 dvd,运行: ``` $ sudo mount /dev/sr0 /var/repo/ ``` -### 2) Create Repo File in ‘/etc/yum.repos.d/’ Directory +### 2)在 “/etc/yum.repos.d/” 目录中创建仓库文件 -Create a repo file with name ‘rhel9-local.repo’ under the folder /etc/yum.repos.d/ with following content +在 /etc/yum.repos.d/ 目录下创建一个名为 “rhel9-local.repo” 的仓库文件,内容如下: ``` $ sudo vi /etc/yum.repos.d/rhel9-local.repo @@ -61,13 +61,13 @@ baseurl=file:///var/repo//AppStream/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ``` -Save and close the file. +保存并关闭该文件。 ![RHEL8-Local-Repo-File][2] -### 3) Flush Yum/DNF & Subscription Manager Cache +### 3)刷新 yum/dnf 和订阅管理器的缓存 -Execute following commands to clean yum or dnf and subscription manager cache. +执行以下命令来清理 yum 或 dnf 和订阅管理器的缓存。 ``` $ sudo dnf clean all @@ -76,7 +76,7 @@ $ sudo subscription-manager clean ![DNF-Subscription-Manager-Clean][3] -In the above output, we are getting a warning message ‘This system is not registered with an entitlement’. So, to suppress this warning message, edit the file  ‘/etc/yum/pluginconf.d/subscription-manager.conf’ , change the parameter ‘enabled=1’ to ‘enabled=0’. +在上面的输出中,我们得到一个警告信息 “This system is not registered with an entitlement”(系统没有注册权限)。所以,为了抑制这个警告信息,编辑文件 “/etc/yum/pluginconf.d/subscription-manager.conf”,将参数 “enabled=1” 改为 “enabled=0”。 ``` $ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf @@ -84,35 +84,35 @@ $ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf ![Disable-Subscription-Parameter-RHEL-9][4] -Save and exit the file. +保存并退出该文件。 -### 4) Install Packages using Local Repository +### 4)使用本地仓库安装软件包 -Now we are all set to test our local repository. Run beneath command to view configure repository. +现在我们都准备好测试我们的本地仓库了。运行下面的命令来查看配置仓库。 ``` $ sudo dnf repolist ``` -Output, +输出: ![DNF-Repolist-RHEL-9][5] -Now, try Install packages using dnf command via above configure local repository. +现在,试试用 dnf 命令通过上面配置的本地仓库安装软件包。 ``` $ sudo dnf install nfs-utils ``` -Output, +输出: ![Install-RPM-Package-via-local-repo-rhel9][6] ![Package-Installation-Completion-RHEL9-DNF-Command][7] -Perfect, above output confirms that nfs-utils package along with its dependencies are installed successfully via locally configured yum or dnf repository. +完美,上述输出证实了 nfs-utils 包及其依赖项已经通过本地配置的 yum 或 dnf 仓库成功安装。 -That’s all from this guide. I hope you have found it informative. Kindly do post your queries and feedback in below comments section. +这就是本指南的全部内容。我希望你觉得它有参考价值。请在下面的评论区发表你的疑问和反馈。 -------------------------------------------------------------------------------- @@ -120,7 +120,7 @@ via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/ 作者:[Pradeep Kumar][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1e1ff02b7f3dc6ad1e0aed5e4347f85b34937901 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 8 Jun 2022 08:49:05 +0800 Subject: [PATCH 074/231] translating --- .../20210725 How to Recover Arch Linux Install via chroot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md b/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md index bf684b6e08..36572fc15a 100644 --- a/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md +++ b/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f8c365667257d6e5fb35d88935967867f629b252 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Jun 2022 09:12:33 +0800 Subject: [PATCH 075/231] RP @lkxed https://linux.cn/article-14685-1.html --- ...at the Fedora Linux 37 Test Week for Kernel 5.18.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/news => published}/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md (90%) diff --git a/translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md b/published/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md similarity index 90% rename from translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md rename to published/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md index acc721cec7..41a873dfc9 100644 --- a/translated/news/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md +++ b/published/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md @@ -3,15 +3,15 @@ [#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14685-1.html" Fedora Linux 37 的内核 5.18 测试周到了,一起来做贡献吧! ====== ![][1] -Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此,Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [wiki page][2] 来获取你将要参与的测试镜像链接。继续阅读下文,可了解更多细节~ +Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此,Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [维基页面][2] 来获取你将要参与的测试镜像链接。继续阅读下文,可了解更多细节~ ### 测试周是如何运作的? @@ -33,7 +33,7 @@ via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for- 作者:[Sumantro Mukherjee][a] 选题:[lkxed][b] 译者:[lkxed](https://github.com/lkxed) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4afaf1eaaf8003faaed918a94f8caf31817a3a59 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Jun 2022 09:53:18 +0800 Subject: [PATCH 076/231] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @duoluoxiaosheng 感谢您,完成了第一篇翻译贡献! --- ...ow to teach open source beyond business.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/translated/tech/20210131 How to teach open source beyond business.md b/translated/tech/20210131 How to teach open source beyond business.md index b1688ced71..c36cde575b 100644 --- a/translated/tech/20210131 How to teach open source beyond business.md +++ b/translated/tech/20210131 How to teach open source beyond business.md @@ -1,43 +1,42 @@ [#]: collector: (lujun9972) -[#]: translator: (duoluoxiaosheng ) -[#]: reviewer: ( ) +[#]: translator: (duoluoxiaosheng) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to teach open source beyond business) [#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) [#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) -商业之上是开源 +在商业之外,为学生们教授开源知识 ====== -The Beyond Program 连接起未来科技行业的人才和开源文化。 +> Beyond 计划连接起未来科技行业的人才和开源文化。 -![Teacher or learner?][1] +![](https://img.linux.net.cn/data/attachment/album/202206/08/095200eezhuq7ssd4x4d66.jpg) -那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我的职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 +那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,不知道如何参加一个开源项目,也不知道这对我未来的职业有什么好处。我的开发经验主要是家庭作业和学位需要的一个大型期末项目。 -所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个可能拥有很大的团队,并且分散在不同地方的正在进行中的项目。我还要学会正确的沟通以保证我付出点努力不白费。 +所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要了解如何加入一个既定的、可能很大并且分散在不同地方的团队,为一个正在进行中的项目工作。我还要学会正确的沟通以保证我付出的努力不白费。 -我在这个行业并不优秀。我只是众多毕业生中的一员。 +在这方面,我并不特别。我只是众多毕业生中的一员。 -### 开源让毕业生点起点更高 +### 开源让毕业生的起点更高 作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。 通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。 -开源在科技行业的价值是塑造并完善全球软件公司的文化。参与开源项目并采用[开放组织文化][2]正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖,才华横溢的员工。 -因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 +开源在科技行业的价值是公认的,它塑造了全球软件公司的文化。参与开源项目并采用 [开放组织文化][2] 正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖、才华横溢的员工。因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 ### 商业之上是开源文化 -当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 +当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] 计划,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 -我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 +我们在 [Tel Aviv-Yafo 技术学院][6] 开始了 Beyond 计划,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps 入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,相反,我们想让学生接触到行业标准。 我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 -在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础”中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。 我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。 +在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础” 中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。 ![Beyond teaching online][7] @@ -45,7 +44,7 @@ The Beyond Program 连接起未来科技行业的人才和开源文化。 ### 成果展示 -这两个课程去得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程器件的开源贡献而得到了他们第一份技术工作。 +这两个课程取得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程期间的开源贡献而得到了他们第一份技术工作。 其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。 @@ -58,7 +57,7 @@ via: https://opensource.com/article/21/1/open-source-beyond-business 作者:[Irit Goihman][a] 选题:[lujun9972][b] 译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6e7c780753ca1118563f8906b68b5456e8a4aff9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Jun 2022 09:54:14 +0800 Subject: [PATCH 077/231] P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @duoluoxiaosheng 本文首发地址:https://linux.cn/article-14686-1.html 您的 LCTT 专页:https://linux.cn/lctt/duoluoxiaosheng --- .../20210131 How to teach open source beyond business.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210131 How to teach open source beyond business.md (98%) diff --git a/translated/tech/20210131 How to teach open source beyond business.md b/published/20210131 How to teach open source beyond business.md similarity index 98% rename from translated/tech/20210131 How to teach open source beyond business.md rename to published/20210131 How to teach open source beyond business.md index c36cde575b..1e8afecdf6 100644 --- a/translated/tech/20210131 How to teach open source beyond business.md +++ b/published/20210131 How to teach open source beyond business.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (duoluoxiaosheng) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14686-1.html) [#]: subject: (How to teach open source beyond business) [#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) [#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) From fce0df8eb3309ca6707633269ad07f110b62dde4 Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 10:27:05 +0800 Subject: [PATCH 078/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220607=20How=20Garbage=20Collection=20works=20inside?= =?UTF-8?q?=20a=20Java=20Virtual=20Machine.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ion works inside a Java Virtual Machine.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md diff --git a/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md b/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md new file mode 100644 index 0000000000..c88b70876d --- /dev/null +++ b/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md @@ -0,0 +1,155 @@ +[#]: subject: "How Garbage Collection works inside a Java Virtual Machine" +[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How Garbage Collection works inside a Java Virtual Machine +====== +Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances. + +![Coffee beans][1] + +Image by: Pixabay. CC0. + +Automatic Garbage Collection (GC) is one of the most important features that makes Java so popular. This article explains why GC is essential. It includes automatic and generational GC, how the Java Virtual Machine (JVM) divides heap memory, and finally, how GC works inside the JVM. + +### Java memory allocation + +Java memory is divided into four sections: + +1. Heap: The memory for object instances is allocated in the heap. When the object declaration is made, there won't be any memory allocated in the heap. Instead, a reference is created for that object in the stack. +2. Stack: This section allocates the memory for methods, local variables, and class instance variables. +3. Code: Bytecode resides in this section. +4. Static: Static data and methods are placed in this section. + +### What is automatic Garbage Collection (GC)? + +Automatic GC is a process in which the referenced and unreferenced objects in heap memory are identified, and then unreferenced objects are considered for deletion. The term *referenced objects* means some part of your program is using those objects. *Unreferenced objects* are not currently being used by the program. + +Programming languages like C and C++ require manual allocation and deallocation of memory. This is automatically handled by GC in Java, although you can trigger GC manually with the `system.gc();` call in your code. + +The fundamental steps of GC are: + +#### 1. Mark used and unused objects + +In this step, the used and unused objects are marked separately. This is a time-consuming process, as all objects in memory must be scanned to determine whether they're in use or not. + +![Marking used and unused objects][2] + +#### 2. Sweep/Delete objects + +There are two variations of sweep and delete. + +**Simple deletion**: Only unreferenced objects are removed. However, the memory allocation for new objects becomes difficult as the free space is scattered across available memory. + +![Normal deleting process][3] + +**Deletion with compaction**: Apart from deleting unreferenced objects, referenced objects are compacted. Memory allocation for new objects is relatively easy, and memory allocation performance is improved. + +![Deletion with compacting][4] + +### What is generational Garbage Collection (GC), and why is it needed? + +As seen in the sweep and delete model, scanning all objects for memory reclamation from unused objects becomes difficult once the objects keep growing. An experimental study shows that most objects created during the program execution are short-lived. + +The existence of short-lived objects can be used to improve the performance of GC. For that, the JVM divides the memory into different generations. Next, it categorizes the objects based on these memory generations and performs the GC accordingly. This approach is known as *generational GC*. + +### Heap memory generations and the generational Garbage Collection (GC) process + +To improve the performance of the GC mark and sweep steps, the JVM divides the heap memory into three generations: + +* Young Generation +* Old Generation +* Permanent Generation + +![Hotspot heap structure][5] + +Here is a description of each generation and its key features. + +#### Young Generation + +All created objects are present here. The young generation is further divided into: + +1. Eden: All newly created objects are allocated with the memory here. +2. Survivor space (S0 and S1): After surviving one GC, the live objects are moved to one of these survivor spaces. + +![Object allocation][6] + +The generational GC that happens in the Young Generation is known as *Minor GC*. All Minor GC cycles are "Stop the World" events that cause the other applications to pause until it completes the GC cycle. This is why Minor GC cycles are faster. + +To summarize: Eden space has all newly created objects. Once Eden is full, the first Minor GC cycle is triggered. + +![Filling Eden space][7] + +Minor GC: The live and dead objects are marked during this cycle. The live objects are moved to survivor space S0. Once all live objects are moved to S0, the unreferenced objects are deleted. + +![Copying referenced objects][8] + +The age of objects in S0 is 1 because they have survived one Minor GC. Now Eden and S1 are empty. + +Once cleared, the Eden space is again filled with new live objects. As time elapses, some objects in Eden and S0 become dead (unreferenced), and Eden's space is full again, triggering the Minor GC. + +![Object aging][9] + +This time the dead and live objects in Eden and S0 are marked. The live objects from Eden are moved to S1 with an age increment of 1. The live objects from S0 are also moved to S1 with an age increment of 2 (because they've now survived two Minor GCs). At this point, S0 and Eden are empty. After every Minor GC, Eden and one of the survivor spaces are empty. + +The same cycle of creating new objects in Eden continues. When the next Minor GC occurs, Eden and S1 are cleared by moving the aged objects to S0. The survivor spaces switch after every Minor GC. + +![Additional aging][10] + +This process continues until the age of one of the surviving objects reaches a certain threshold, at which point it is moved to the so-called the Old Generation with a process called *promotion*. + +Further, the `-Xmn` flag sets the Young Generation size. + +### Old Generation (Tenured Generation) + +This generation contains the objects that have survived several Minor GCs and aged to reach an expected threshold. + +![Promotion][11] + +In the example diagram above, the threshold is 8. The GC in the Old Generation is known as a *Major GC*. Use the flags `-Xms` and `-Xmx` to set the initial and maximum size of the heap memory. + +### Permanent Generation + +The Permanent Generation space stores metadata related to library classes and methods of an application, J2SE, and what's in use by the JVM itself. The JVM populates this data at runtime based on which classes and methods are in use. Once the JVM finds the unused classes, they are unloaded or collected, making space for used classes. + +Use the flags `-XX:PermGen` and `-XX:MaxPermGen` to set the initial and maximum size of the Permanent Generation. + +#### Metaspace + +Metaspace was introduced in Java 8u and replaced PermGen. The advantage of this is automatic resizing, which avoids OutOfMemory errors. + +### Wrap up + +This article discusses the various memory generations of JVM and how they are helpful for automatic generational Garbage Collection (GC). Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances. This understanding allows you to plan and troubleshoot your code and comprehend potential limitations inherent in a specific platform. + +Image by: (Jayashree Huttanagoudar, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine + +作者:[Jayashree Huttanagoudar][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/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg +[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png +[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png +[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png +[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png +[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png +[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png +[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png +[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png +[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png +[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png From fab77a0ef8b818d2b396da61683ca8b5b5250146 Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 10:28:50 +0800 Subject: [PATCH 079/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220607=20How=20to=20Boot=20Ubuntu=2022.04=20into=20R?= =?UTF-8?q?escue=20-=20Emergency=20Mode.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...untu 22.04 into Rescue - Emergency Mode.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md diff --git a/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md b/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md new file mode 100644 index 0000000000..fdec52f3de --- /dev/null +++ b/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md @@ -0,0 +1,85 @@ +[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode" +[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Boot Ubuntu 22.04 into Rescue / Emergency Mode +====== +Hello geeks, booting Ubuntu 22.04 (Jammy Jellyfish) into rescue and emergency mode helps to reset the forgotten user password, fix the file system errors and disabling or enabling systemd service during boot. + +In this post, we will learn how to boot Ubuntu 22.04 LTS system into rescue and emergency mode. Rescue mode is similar to single user mode where are all troubleshooting steps are executed. Rescue mode loads the minimal environment and mount root file system. + +Whereas in emergency mode, we get the single user shell without starting any system services. So emergency mode is required when we can’t boot the system into rescue mode. + +### Boot Ubuntu 22.04 into Rescue or Single User Mode + +Head to target system which you want to boot into rescue or single user mode. At the boot press ‘SHIFT & ESC’ key to enter into grub bootloader screen. + +![Default-Grub-Screen-Ubuntu-22-04][1] + +Choose the first option Ubuntu and press ‘e’ to enter edit mode. + +Go the end of line which starts with linux and delete the string ‘$vt_handoff’ and add the string ‘systemd.unit=rescue.target’ + +![rescue-target-ubuntu-22-04][2] + +After making the changes, either press Ctrl+x or F10 to boot in rescue mode, + +![Troubleshooting-Commands-in-Rescue-Mode][3] + +Once you enter into rescue mode, run all troubleshooting commands and to reboot the system run ‘systemctl reboot’ command + +### Alternate Way to Boot System into Rescue Mode + +Reboot the system and press ‘ESC & Shift’ Key to go to grub boot screen. + +Choose the 2nd option ‘Advanced Options for Ubuntu’ –> Choose recovery mode option and hit enter –> Choose Root (Drop to root shell prompt). + +Example is show below + +![Boot-Ubuntu-22-04-Rescue-Mode][4] + +Once you have root shell, run commands to recover and fix the system issues and finally use ‘systemctl reboot’ to reboot the system. + +### Boot Ubuntu 22.04 into Emergency Mode + +To boot the system into emergency mode, first go to grub screen. + +![Default-Grub-Screen-Ubuntu-22-04][5] + +Select the first option as ‘Ubuntu’ and press ‘e’ to edit. Look for the line which starts with linux word, go to the end of that line, remove the string $vt_handoff and add the string ‘systemd.unit=emergency.target’ + +![Emergency-Mode-Ubuntu-22-04][6] + +Press Ctrl+x or F10 to boot the system into emergency mode, + +![Command-in-Emergency-Mode-Ubuntu-22-04][7] + +Similarly in rescue mode, you can perform all the troubleshooting in this mode and once done reboot the system with command ‘systemctl reboot’. + +That’s all from this post. I found it informative and don’t hesitate to share this among your technical friends. Kindly post your queries and feedback in below comments section. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/ + +作者:[Pradeep Kumar][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.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png From 83decca0ddd69476c60035c52482365752e7ad0f Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 10:32:24 +0800 Subject: [PATCH 080/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?tech]:=2020220607=20How=20Garbage=20Collection=20works=20inside?= =?UTF-8?q?=20a=20Java=20Virtual=20Machine.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ow Garbage Collection works inside a Java Virtual Machine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md b/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md index c88b70876d..c99ed4df0e 100644 --- a/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md +++ b/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine" [#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8a091e1df77ff3c66986b302ac30748302ef4309 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Jun 2022 11:39:54 +0800 Subject: [PATCH 081/231] RP @VeryZZJ https://linux.cn/article-14687-1.html --- ...programming languages do the same thing.md | 212 +++++++++--------- 1 file changed, 108 insertions(+), 104 deletions(-) rename {translated/tech => published}/20210405 How different programming languages do the same thing.md (63%) diff --git a/translated/tech/20210405 How different programming languages do the same thing.md b/published/20210405 How different programming languages do the same thing.md similarity index 63% rename from translated/tech/20210405 How different programming languages do the same thing.md rename to published/20210405 How different programming languages do the same thing.md index 62ac87d02c..0d8a476397 100644 --- a/translated/tech/20210405 How different programming languages do the same thing.md +++ b/published/20210405 How different programming languages do the same thing.md @@ -3,37 +3,39 @@ [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lujun9972" [#]: translator: "VeryZZJ" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14687-1.html" + 不同编程语言是如何完成同一件事 ====== -通过一个简单的小游戏比较13种编程语言 -![Developing code.][1] +> 通过一个简单的小游戏比较 13 种编程语言。 + +![](https://img.linux.net.cn/data/attachment/album/202206/08/113845fs81srd5s8rjryt5.jpg) 当我开始学习一种新的编程语言时,会把重点放在定义变量、书写声明以及计算表达式,一旦对这些概念有一个大致的了解,通常就能够自己弄清剩下的部分。大多数编程语言都具有相似性,所以如果你掌握了一种编程语言,学习下一种语言的重点就是弄清楚独有的概念以及区分不同。 -我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出1到100里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序: +我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出 1 到 100 里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序: -* 计算机在1到100之间选出一个随机数字 +* 计算机在 1 到 100 之间选出一个随机数字 * 循环进行直到猜出该随机数字 + 计算机读取我的猜测 + 告诉我我的猜测过高还是过低 -Opensource.com 最近发表了一篇文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。 +我们发表了一些文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。 -C 语言由 Dennis Ritchie 于1972年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。 +C 语言由 Dennis Ritchie 于 1972 年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。 -接下来我们看看这些不同的编程语言是如何实现 "猜数字 "游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。 +接下来我们看看这些不同的编程语言是如何实现 “猜数字” 游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。 -### 计算机在1到100之间选出一个随机数字 +### 计算机在 1 到 100 之间选出一个随机数字 -你可以看到这里有许多相似之处。大多数编程语言使用类似`rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。 +你可以看到这里有许多相似之处。大多数编程语言使用类似 `rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。 -C +C: -```c +``` // Using the Linux `getrandom` system call getrandom(&randval, sizeof(int), GRND_NONBLOCK); number = randval % maxval + 1; @@ -42,97 +44,97 @@ number = randval % maxval + 1; number = rand() % 100 + 1; ``` -C++ +C++: -```cpp +``` int number = rand() % 100+1; ``` -Rust +Rust: -```rust +``` let random = rng.gen_range(1..101); ``` -Java +Java: -```java +``` private static final int NUMBER = r.nextInt(100) + 1; ``` -Groovy +Groovy: -```groovy +``` int randomNumber = (new Random()).nextInt(100) + 1 ``` -JavaScript +JavaScript: -```javascript +``` const randomNumber = Math.floor(Math.random() * 100) + 1 ``` -awk +awk: -```awk +``` randomNumber = int(rand() * 100) + 1 ``` -Lua +Lua: -```lua +``` number = math.random(1,100) ``` ### 循环进行直到我猜出该随机数字 -循环通常是用控制流程来实现的,如`while` 或`do-while`。JavaScript 中的实现没有使用循环,而是 "实时 "更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。 +循环通常是用控制流程来实现的,如 `while` 或 `do-while`。JavaScript 中的实现没有使用循环,而是 “实时 ”更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 Awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。 -C +C: -```c +``` do { … } while (guess != number); ``` -C++ +C++: -```cpp +``` do { … } while ( number != guess ); ``` -Rust +Rust: -```rust +``` for line in std::io::stdin().lock().lines() { … break; } ``` -Java +Java: -```java +``` while ( guess != NUMBER ) { … } ``` -Groovy +Groovy: -```groovy +``` while ( … ) { … break; } ``` -Lua +Lua: -```lua +``` while ( player.guess ~= number ) do … end @@ -140,66 +142,68 @@ end ### 计算机读取我的猜测 -不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 awk 则从数据管道中读取数据。 +不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 Awk 则从数据管道中读取数据。 -```c +C: + +``` scanf("%d", &guess); ``` -C++ +C++: -```cpp +``` cin >> guess; ``` -Rust +Rust: -```rust +``` let parsed = line.ok().as_deref().map(str::parse::); if let Some(Ok(guess)) = parsed { … } ``` -Java +Java: -```java +``` guess = player.nextInt(); ``` -Groovy +Groovy: -```groovy +``` response = reader.readLine() int guess = response as Integer ``` -JavaScript +JavaScript: -```javascript +``` let myGuess = guess.value ``` -awk +Awk: -```awk +``` guess = int($0) ``` -Lua +Lua: -```lua +``` player.answer = io.read() player.guess = tonumber(player.answer) ``` -### 告诉我我的猜测过高还是过低 +### 告诉我猜测过高还是过低 -在这些类 C 语言中,通常是通过`if`语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。 +在这些类 C 语言中,通常是通过 `if` 语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。 -C +C: -```c +``` if (guess < number) { puts("Too low"); } @@ -210,9 +214,9 @@ else if (guess > number) { puts("That's right!"); ``` -C++ +C++: -```cpp +``` if ( guess > number) { cout << "Too high.\n" << endl; } else if ( guess < number ) { cout << "Too low.\n" << endl; } else { @@ -221,9 +225,9 @@ else { } ``` -Rust +Rust: -```rust +``` _ if guess < random => println!("Too low"), _ if guess > random => println!("Too high"), _ => { @@ -232,9 +236,9 @@ _ => { } ``` -Java +Java: -```java +``` if ( guess > NUMBER ) { System.out.println("Too high"); } else if ( guess < NUMBER ) { @@ -245,9 +249,9 @@ if ( guess > NUMBER ) { } ``` -Groovy +Groovy: -```groovy +``` if (guess < randomNumber) print 'too low, try again: ' else if (guess > randomNumber) @@ -258,9 +262,9 @@ else { } ``` -JavaScript +JavaScript: -```javascript +``` if (myGuess === randomNumber) { feedback.textContent = "You got it right!" } else if (myGuess > randomNumber) { @@ -270,9 +274,9 @@ if (myGuess === randomNumber) { } ``` -awk +Awk: -```awk +``` if (guess < randomNumber) { printf "too low, try again:" } else if (guess > randomNumber) { @@ -283,9 +287,9 @@ if (guess < randomNumber) { } ``` -Lua +Lua: -```lua +``` if ( player.guess > number ) then print("Too high") elseif ( player.guess < number) then @@ -298,21 +302,21 @@ end ### 非类 C 编程语言会怎么样呢? -非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如`&&`作为 "and " 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的80-列布局。 +非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如 `&&` 作为 `and` 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的 80 列布局。 -我将通过比较 "if "语句,举例表现这些编程语言的不同。if 判断一个值是否小于或大于另一个值,并向用户打印适当信息。 +我将通过比较 `if` 语句,举例表现这些编程语言的不同。`if` 判断一个值是否小于或大于另一个值,并向用户打印适当信息。 -Racket +Racket: -```racket +``` (cond [(> number guess) (displayln "Too low") (inquire-user number)] [(< number guess) (displayln "Too high") (inquire-user number)] [else (displayln "Correct!")])) ``` -Python +Python: -```python +``` if guess < random: print("Too low") elif guess > random: @@ -321,9 +325,9 @@ else: print("That's right!") ``` -Elixir +Elixir: -```elixir +``` cond do guess < num -> IO.puts "Too low!" @@ -336,16 +340,16 @@ cond do end ``` -Bash +Bash: -```bash +``` [ "0$guess" -lt $number ] && echo "Too low" [ "0$guess" -gt $number ] && echo "Too high" ``` -Fortran +Fortran: -```fortran +``` IF (GUESS.LT.NUMBER) THEN PRINT *, 'TOO LOW' ELSE IF (GUESS.GT.NUMBER) THEN @@ -353,28 +357,28 @@ ELSE IF (GUESS.GT.NUMBER) THEN ENDIF ``` -### Read more 更多 +### 更多 -当你在学习一种新的编程语言时"猜数字 "游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。 +当你在学习一种新的编程语言时 “猜数字” 游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。 -学习如何用 C 和类 C 语言编写 "猜数字 "游戏: +学习如何用 C 和类 C 语言编写 “猜数字” 游戏: -* [C][2], by Jim Hall -* [C++][3], by Seth Kenlon -* [Rust][4], by Moshe Zadka -* [Java][5], by Seth Kenlon -* [Groovy][6], by Chris Hermansen -* [JavaScript][7], by Mandy Kendall -* [awk][8], by Chris Hermansen -* [Lua][9], by Seth Kenlon +* [C][2], Jim Hall +* [C++][3], Seth Kenlon +* [Rust][4], Moshe Zadka +* [Java][5], Seth Kenlon +* [Groovy][6], Chris Hermansen +* [JavaScript][7], Mandy Kendall +* [awk][8], Chris Hermansen +* [Lua][9], Seth Kenlon 其他语言: -* [Racket][10], by Cristiano L. Fontana -* [Python][11], by Moshe Zadka -* [Elixir][12], by Moshe Zadka -* [Bash][13], by Jim Hall -* [Fortran][14], by Jim Hall +* [Racket][10], Cristiano L. Fontana +* [Python][11], Moshe Zadka +* [Elixir][12], Moshe Zadka +* [Bash][13], Jim Hall +* [Fortran][14], Jim Hall -------------------------------------------------------------------------------- @@ -383,7 +387,7 @@ via: https://opensource.com/article/21/4/compare-programming-languages 作者:[Jim Hall][a] 选题:[lujun9972][b] 译者:[VeryZZJ](https://github.com/VeryZZJ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fd0e5dd4aab816166e66a2dd0afca1878a8c5beb Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 15:17:22 +0800 Subject: [PATCH 082/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220608=20How=20I=20gave=20my=20old=20laptop=20new=20?= =?UTF-8?q?life=20with=20the=20Linux=20Xfce=20desktop.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...op new life with the Linux Xfce desktop.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/tech/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md diff --git a/sources/tech/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md b/sources/tech/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md new file mode 100644 index 0000000000..b835faca42 --- /dev/null +++ b/sources/tech/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md @@ -0,0 +1,96 @@ +[#]: subject: "How I gave my old laptop new life with the Linux Xfce desktop" +[#]: via: "https://opensource.com/article/22/6/linux-xfce-old-laptop" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I gave my old laptop new life with the Linux Xfce desktop +====== +While I installed Linux to use my laptop for a few demos at a conference, I found Linux and the Xfce desktop made this old laptop feel quite snappy. + +![Person drinking a hat drink at the computer][1] + +Image by: [Jonas Leupe][2] on [Unsplash][3] + +A few weeks ago, I needed to give a conference presentation that included a brief demonstration of a small app I'd written for Linux. I needed a Linux laptop to bring to the conference, so I dug out an old laptop and installed Linux on it. I used the [Fedora 36 Xfce spin][4], which worked great. + +The laptop I used was purchased in 2012. The 1.70 GHz CPU, 4 GB memory, and 128 GB drive may seem small compared to my current desktop machine, but Linux and the Xfce desktop gave this old machine new life. + +### Xfce desktop for Linux + +The [Xfce desktop][5] is a lightweight desktop that provides a sleek, modern look. The interface is familiar, with a taskbar or “panel” across the top to launch applications, change between virtual desktops, or access notifications in the system tray. The quick access dock at the bottom of the screen lets you launch frequently used applications like the terminal, file manager, and web browser. + +![Image of Xfce desktop][6] + +To start a new application, click the Applications button in the upper-left corner. This opens a menu of application launchers, with the most frequently used applications like the terminal and file manager at the top. Other applications are organized into groups, so you can navigate to the one you want. + +![Image of desktop applications][7] + +### Managing files + +Xfce's file manager is called Thunar, and it does a great job of organizing my files. I like that Thunar can also make connections to remote systems. At home, I use a Raspberry Pi using SSH as a [personal file server][8]. Thunar lets me open an SSH file transfer window so I can copy files between my laptop and the Raspberry Pi. + +![Image of Thunar remote][9] + +Another way to access files and folders is via the quick access dock at the bottom of the screen. Click the folder icon to bring up a menu of common actions such as opening a folder in a terminal window, creating a new folder, or navigating into a specific folder. + +![Image of desktop with open folders][10] + +### Other applications + +I loved exploring the other applications provided in Xfce. The Mousepad text editor looks like a simple text editor, but it contains useful features for editing more than just plain text. Mousepad recognizes many file types that programmers and other power users may appreciate. Check out this partial list of programming languages available in the Document menu. + +![Image of Mousepad file types][11] + +If you prefer a different look and feel, you can adjust the interface options such as font, color scheme, and line numbers using the View menu. + +![Image of Mousepad in color scheme solarized][12] + +The disk utility lets you manage storage devices. While I didn't need to modify my system disk, the disk tool is a great way to initialize or reformat a USB flash drive. I found the interface very easy to use. + +![Image of disk utility][13] + +I was also impressed with the Geany integrated development environment. I was a bit surprised that a full IDE ran so well on an older system. Geany advertises itself as a “powerful, stable and lightweight programmer's text editor that provides tons of useful features without bogging down your workflow.” And that's exactly what Geany provided. + +I started a simple “hello world” program to test out Geany, and was pleased to see that the IDE popped up syntax help as I typed each function name. The pop-up message is unobtrusive and provides just enough syntax information where I need it. While the `printf` function is easy for me to remember, I always forget the order of options to other functions like `fputs` and `realloc`. This is where I need the pop-up syntax help. + +![Image of Geany workspace][14] + +Explore the menus in Xfce to find other applications to make your work easier. You'll find apps to play music, access the terminal, or browse the web. + +While I installed Linux to use my laptop for a few demos at a conference, I found Linux and the Xfce desktop made this old laptop feel quite snappy. The system performed so well that when the conference was over, I decided to keep the laptop around as a second machine. + +I just love working in Xfce and using the apps. Despite the low overhead and minimal approach, I don't feel underpowered. I can do everything I need to do using Xfce and the included apps. If you have an older machine that needs new life, try installing Linux to bring new life to old hardware. + +Image by: (Jim Hall, CC BY-SA 40) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/linux-xfce-old-laptop + +作者:[Jim Hall][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/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png +[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://spins.fedoraproject.org/xfce/download/index.html +[5]: https://opensource.com/article/19/12/xfce-linux-desktop +[6]: https://opensource.com/sites/default/files/2022-06/Linuxlaptop1.png +[7]: https://opensource.com/sites/default/files/2022-06/linuxlaptopDesktopApps.png +[8]: https://opensource.com/article/20/3/personal-file-server-ssh +[9]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopThunarremote.png +[10]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopDesk.png +[11]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopMousepadfiletype.png +[12]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopmousepadsolarized.png +[13]: https://opensource.com/sites/default/files/2022-06/linuxlaptopdisks.png +[14]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopgeany.png From 0ccaaa82adae1ebbb75f096a61b6f2c0938e60be Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 15:23:48 +0800 Subject: [PATCH 083/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220608=20Using=20Ansible=20to=20automate=20software?= =?UTF-8?q?=20installation=20on=20my=20Mac.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...utomate software installation on my Mac.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20220608 Using Ansible to automate software installation on my Mac.md diff --git a/sources/tech/20220608 Using Ansible to automate software installation on my Mac.md b/sources/tech/20220608 Using Ansible to automate software installation on my Mac.md new file mode 100644 index 0000000000..4427ccb9bd --- /dev/null +++ b/sources/tech/20220608 Using Ansible to automate software installation on my Mac.md @@ -0,0 +1,154 @@ +[#]: subject: "Using Ansible to automate software installation on my Mac" +[#]: via: "https://opensource.com/article/22/6/install-software-macos-ansible-homebrew" +[#]: author: "Servesha Dudhgaonkar https://opensource.com/users/serveshadudhgaonkar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Using Ansible to automate software installation on my Mac +====== +In this demo, I install one of my must-have writing tools, Asciidoctor, on macOS using Ansible. + +![Getting started with Perlbrew][1] + +Image by: freephotocc via Pixabay CC0 + +On most systems, there are several ways to install software. Which one you use depends on the source of the application you're installing. Some software comes as a downloadable wizard to walk you through an install process, while others are files you just download and run immediately. + +On macOS, a whole library of open source applications is available from Unix commands like [Homebrew][2] and [MacPorts][3]. The advantage of using commands for software installation is that you can automate them, and my favorite tool for automation is Ansible. Combining Ansible with Homebrew is an efficient and reproducible way to install your favorite open source applications. + +This article demonstrates how to install one of my must-have writing tools, Asciidoctor, on macOS using Ansible. Asciidoctor is an open source text processor, meaning that it takes text written in a specific format (in this case, Asciidoc) and transforms it into other popular formats (such as HTML, PDF, and so on) for publishing. Ansible is an open source, agentless, and easy-to-understand automation tool. By using Ansible, you can simplify and automate your day-to-day tasks. + +Note: While this example uses macOS, the information applies to all kinds of open source software on all platforms compatible with Ansible (including Linux, Windows, Mac, and BSD). + +### Installing Ansible + +You can install Ansible using `pip`, the Python package manager. First, install `pip` : + +``` +$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +$ python ./get-pip.py +``` + +Next, install Ansible using `pip` : + +``` +$ sudo python -m pip install --user ansible +``` + +#### Installing Ansible using Homebrew + +Alternately, you can install Ansible using the [Homebrew package manager][4]. If you've already installed Ansible with `pip`, skip this step because you've already achieved the same result! + +``` +$ brew install ansible +``` + +### Configuring Ansible + +To set up Ansible, you first must create an inventory file specifying which computer or computers you want your Ansible script (called a playbook) to operate on. + +Create an inventory file in a terminal or using your favorite text editor. In a terminal, type the following, replacing `your-host-name` with the name of your computer: + +``` +$ cat << EOF >> inventory +[localhost\] +your-host-name +EOF +``` + +If you don't know your computer's hostname, you can get it using the `hostname` command. Alternately, go to the Apple menu, open System Preferences, then click Sharing. Your computer's hostname is beneath the computer name at the top of Sharing preference pane. + +### Installing Asciidoctor using Ansible + +In this example, I'm only installing applications on the computer I'm working on, which is also known by the term localhost. To start, create a `playbook.yml` file and copy the following content: + +``` +- name: Install software + hosts: localhost + become: false + vars: + Brew_packages: + - asciidoctor + install_homebrew_if_missing: false +``` + +In the first [YAML sequence][5], you name the playbook (`Install software` ), provide the target (`localhost` ), and confirm that administrative privileges are not required. You also create two variables that you can use later in the playbook: `Brew_packages` and`install_homebrew_if_missing`. + +Next, create a YAML mapping called `pre_tasks`, containing the logic to ensure that Homebrew itself is installed on the computer where you're running the playbook. Normally, Ansible can verify whether an application is installed or not, but when that application is the package manager that helps Ansible make that determination in the first place, you have to do it manually: + +``` +pre_tasks: + - name: Ensuring Homebrew Is Installed + stat: + path: /usr/local/bin/brew + register: homebrew_check + + - name: Fail If Homebrew Is Not Installed and install_homebrew_if_missing Is False + fail: + msg: Homebrew is missing, install from http://brew.sh + when: + - not homebrew_check.stat.exists + - not install_homebrew_if_missing + + - name: Installing Homebrew + shell: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + when: +   - not homebrew_check.stat.exists + - install_homebrew_if_missing +``` + +Finally, create a YAML mapping called `tasks` containing a call to the Homebrew module (it's a built-in module from Ansible) to install Asciidoctor in the event that it's not already present: + +``` +tasks: + - name: Install Asciidoctor + homebrew: + name: asciidoctor + state: present +``` + +### Running an Ansible playbook + +You run an Ansible playbook using the `ansible-playbook` command: + +``` +$ ansible-playbook -i inventory playbook.yml +``` + +The `-i` option specifies the `inventory` file you created when setting up Ansible. You can optionally add `-vvvv` to direct Ansible to be extra verbose when running the playbook, which can be useful when troubleshooting. + +After the playbook has run, verify that Ansible has successfully installed Asciidoctor on your host: + +``` +$ asciidoctor -v +Asciidoctor X.Y.Z https://asciidoctor.org +Runtime Environment (ruby 2.6.8p205 (2021-07-07 revision 67951)... +``` + +### Adapt for automation + +You can add more software to the `Brew_packages` variable in this article's example playbook. As long as there's a Homebrew package available, Ansible installs it. Ansible only takes action when required, so you can leave all the packages you install in the playbook, effectively building a manifest of all the packages you have come to expect on your computer. + +Should you find yourself on a different computer, perhaps because you're at work or you've purchased a new one, you can quickly install all the same applications in one go. Better still, should you switch to Linux, the Ansible playbook is still valid either by using Homebrew for Linux or by making a few simple updates to switch to a different package manager. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/install-software-macos-ansible-homebrew + +作者:[Servesha Dudhgaonkar][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/serveshadudhgaonkar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_cafe_brew_laptop_desktop.jpg +[2]: https://opensource.com/article/20/6/homebrew-mac +[3]: https://opensource.com/article/20/11/macports +[4]: https://opensource.com/article/20/6/homebrew-mac +[5]: https://www.redhat.com/sysadmin/yaml-beginners From e5e57f8b386767d0ca7c75ca0aa69722ac19cf3c Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Wed, 8 Jun 2022 15:37:13 +0800 Subject: [PATCH 084/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87]2?= =?UTF-8?q?0220606=206=20Linux=20word=20processors=20you=20need=20to=20try?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20220606 6 Linux word processors you need to try.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220606 6 Linux word processors you need to try.md b/sources/tech/20220606 6 Linux word processors you need to try.md index 4430ac4f3e..5a6f767f0d 100644 --- a/sources/tech/20220606 6 Linux word processors you need to try.md +++ b/sources/tech/20220606 6 Linux word processors you need to try.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/6/word-processors-linux" [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "duoluoxiaosheng" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From e04a2e237d1d0cb299f1be025b94742e88e13dd7 Mon Sep 17 00:00:00 2001 From: lkskjjk <45534262+lkskjjk@users.noreply.github.com> Date: Wed, 8 Jun 2022 20:46:29 +0800 Subject: [PATCH 085/231] Update 20220510 6 easy ways to make your first open source contribution with LibreOffice.md --- ...make your first open source contribution with LibreOffice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20220510 6 easy ways to make your first open source contribution with LibreOffice.md b/sources/talk/20220510 6 easy ways to make your first open source contribution with LibreOffice.md index df7c631f1e..663254a93e 100644 --- a/sources/talk/20220510 6 easy ways to make your first open source contribution with LibreOffice.md +++ b/sources/talk/20220510 6 easy ways to make your first open source contribution with LibreOffice.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/5/first-open-source-contribution-libreoffice" [#]: author: "Klaatu https://opensource.com/users/klaatu" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkskjjk" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From de1434f906bfb0b9ace515edb63338b1f60837ac Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 21:24:46 +0800 Subject: [PATCH 086/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220608=20Rufus=20for=20Linux-=20Here=20Are=20the=20B?= =?UTF-8?q?est=20Live=20USB=20Creating=20Tools.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...re Are the Best Live USB Creating Tools.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sources/tech/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md diff --git a/sources/tech/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md b/sources/tech/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md new file mode 100644 index 0000000000..8b1844b50d --- /dev/null +++ b/sources/tech/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md @@ -0,0 +1,137 @@ +[#]: subject: "Rufus for Linux? Here Are the Best Live USB Creating Tools" +[#]: via: "https://itsfoss.com/live-usb-creator-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Rufus for Linux? Here Are the Best Live USB Creating Tools +====== +Rufus is an open-source utility to create bootable USB drives. It is straightforward to use, with available options to tweak as per your requirements. Not just the ease of use, it is also incredibly fast to make bootable USB drives. + +Unfortunately, Rufus is not available for Linux, it is only exclusive to Windows. So, most of us who have used it on Windows, look for Rufus alternatives on Linux. + +If you are in the same boat, fret not, we have some excellent alternatives for various use-cases. + +Let us explore some Rufus alternatives for Linux: + +### 6 Best Live USB Creation Tools for Linux + +All the options listed are entirely open-source and work perfectly fine with Linux distributions. + +**Note:** *The list is in no particular order of ranking.* + +#### 1. BalenaEtcher + +![balena etcher 2022][1] + +BalenaEtcher or Etcher is a good option for multiple platforms (Windows, macOS), including Linux users. + +You do not get any advanced options here. Hence, it is pleasantly easy to use. Simply select the ISO (image file) and proceed to flash it on the target USB drive. + +It is completely open-source and validates your drive after the process. Furthermore, it auto-selects connected USB drives to avoid choosing any hard disk if you accidentally wipe it. + +You can refer to our [handy guide][2] to install it on Linux. + +[BalenaEtcher][3] + +#### 2. Fedora Media Writer + +![fedora media writer][4] + +Fedora Media Writer is particularly known to help you create live USB for Fedora Linux distribution. It can download the ISO file for you if you do not have it already. + +It is also an excellent utility to fix your USB drive if you cannot format it for an issue caused by other bootable USB creation tools. + +Fret not, you can also select a custom image (apart from Fedora Linux) to create a bootable USB. + +You can find the [Flatpak][5] package on Flathub for the latest version on any Linux distribution. Refer to our [Flatpak guide][6] if you’re new to this. + +[Fedora Media Writer][7] + +#### 3. Startup Disk Creator + +![startup disk creator][8] + +If you are using Ubuntu on your system, you already have a bootable USB creator pre-installed, i.e., Startup Disk Creator. + +You can use it to select the desired ISO file (preferably any Ubuntu version) and choose the target USB device to proceed. + +Once you confirm the action, it will proceed with writing the data to complete the bootable drive. + +#### 4. SUSE Studio Imagewriter + +![imagewriter suse][9] + +SUSE Studio Imagewriter is a simple live USB creator. + +I did not find it in the software center for Ubuntu, but it was available in the community repositories (Manjaro) and AUR. So, you can take a look at it if it is available for your Linux distribution. + +[SUSE Studio Imagewriter][10] + +#### 5. UNetbootin + +![unetbootin][11] + +UNetbootin is a live USB creator that supports Linux, Windows, and macOS. You get a few options to tweak, in case you want to explore all the available drives, and can also select a distribution to download the ISO file automatically. + +It is not specific for any Linux distribution, unlike some options above. So, it supports a wide variety of distributions and system utilities. + +[UNetbootin][12] + +#### 6. Ventoy + +![ventoy screenshot 2022][13] + +Ventoy is an interesting bootable USB solution that lets you simply copy-paste the image to create a live USB drive. + +You only have to install Ventoy to the USB drive, which makes two separate partitions. One of the partitions is used to store ISO images that you can simply paste into the USB drive to make it bootable. + +Interestingly, you can also use it to [create multiboot USB][14]. + +It is available for Windows and Linux. + +[Ventoy][15] + +### Wrapping Up + +Ventoy seems like an exciting choice among the options above if you need multiple Linux distributions on your USB drive without needing to repeatedly flash it. + +For simplicity, distro-specific tools can be a good pick, like Startup Disk Creator for Ubuntu, and Fedora Image Writer for Fedora Linux. + +SUSE Image Studio is an interesting option, but may not be the most convenient one. + +If you do not have any specific preferences, BalenaEtcher should be a straightforward option, with UNetbootin as a suitable alternative to it. + +What do you prefer to create a bootable USB drive? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/live-usb-creator-linux/ + +作者:[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://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/balena-etcher-2022-800x537.png +[2]: https://itsfoss.com/install-etcher-linux/ +[3]: https://www.balena.io/etcher/ +[4]: https://itsfoss.com/wp-content/uploads/2022/06/fedora-media-writer.png +[5]: https://itsfoss.com/what-is-flatpak/ +[6]: https://itsfoss.com/flatpak-guide/ +[7]: https://flathub.org/apps/details/org.fedoraproject.MediaWriter +[8]: https://itsfoss.com/wp-content/uploads/2022/06/startup-disk-creator.png +[9]: https://itsfoss.com/wp-content/uploads/2022/06/imagewriter-suse.png +[10]: https://software.opensuse.org/package/imagewriter +[11]: https://itsfoss.com/wp-content/uploads/2022/06/unetbootin.png +[12]: https://unetbootin.github.io/ +[13]: https://itsfoss.com/wp-content/uploads/2022/06/ventoy-screenshot-2022.png +[14]: https://itsfoss.com/multiple-linux-one-usb/ +[15]: https://www.ventoy.net/ From 9f6a2f58b2780a54dcf405a9e4a8842aafccb3bb Mon Sep 17 00:00:00 2001 From: lkxed Date: Wed, 8 Jun 2022 21:30:53 +0800 Subject: [PATCH 087/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220608=20WiFi=206=20Promises=20Much=20More=20than=20?= =?UTF-8?q?Faster=20Speeds.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6 Promises Much More than Faster Speeds.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sources/tech/20220608 WiFi 6 Promises Much More than Faster Speeds.md diff --git a/sources/tech/20220608 WiFi 6 Promises Much More than Faster Speeds.md b/sources/tech/20220608 WiFi 6 Promises Much More than Faster Speeds.md new file mode 100644 index 0000000000..ba0801c1a2 --- /dev/null +++ b/sources/tech/20220608 WiFi 6 Promises Much More than Faster Speeds.md @@ -0,0 +1,95 @@ +[#]: subject: "WiFi 6 Promises Much More than Faster Speeds" +[#]: via: "https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/" +[#]: author: "Sharon Katta https://www.opensourceforu.com/author/sharon-katta/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +WiFi 6 Promises Much More than Faster Speeds +====== +WiFi 6 increases the network connectivity, and has been developed to ensure the trillions of devices connected in the near future continue to work seamlessly and efficiently. Though it was certified in 2019, it faced a few challenges in testing due to the pandemic. This article gives an overview of this technology. + +![WiFi-6][1] + +The next-generation standard in WiFi technology, termed ‘WiFi 6’, is also known as ‘AX WiFi’ or ‘802.11ax’. Developed to meet the exponential increase in demand for devices in the world, it can be used for virtual reality (VR) and smart home devices as well. It is an improvement on the current 802.11ac WiFi standard and meets current challenges in terms of capacity, efficiency, coverage and performance. + +![Figure 1: WiFi 6][2] + +Researched in 2014, this standard was invented in 2018 and launched by the IEEE High Efficiency WLAN Study Group (HEW SG). It began certifications in late 2019, with Samsung’s Galaxy Note 10 and Ruckus R750 employing this technology. Specified to operate between the 1GHz and 6GHz bands, WiFi 6 focuses mainly between the 2.4GHz and 5GHz frequencies. + +In an average household today, nine devices are connected to WiFi. WiFi 6 aims at improving the network rather than boosting the speed for individual devices. + +### Features of WiFi 6 + +**Multi-user, multi-input, multi-output (MU-MIMO):** This communication between routers and multiple devices concurrently. It supports four simultaneous data streams, added to which one user can have a considerable bandwidth of incoming data from a smart router, both on the 2.4GHz and 5GHz frequencies. +**1024-QAM:** This helps WiFi 6 encode more bits per packet. There is a 25 per cent increase in throughput. Not only does it improve efficiency in high-traffic situations, it also maximises data rates. This is a huge advantage for modern enterprise applications. +**Orthogonal frequency-division multiplexing (OFDM):** This allows four times as many subcarriers and increases speed by 11 per cent. The expanded signal allows for greater simultaneous packet delivery across users. Hence, the wait time between packets and latency is reduced. +*Increased channel width:* The 160MHz channel communication is added to the 80MHz band, thus doubling the channel width. This allows routers to handle more users and provide larger streams per user. +*Target wake time (TWT):* This feature is unique to WiFi 6. It allows each device to independently negotiate wake time for transmission and reception. This helps to increase total sleep time and maximise battery life. TWT enables many additional networking options, especially for IoT devices. +*Improved security:* All WiFi 6 devices will need to include Wi-Fi Protected Access 3 (WPA3). This will lead to encryption of unauthenticated traffic, robust password protection against brute-force dictionary attacks, and superior data reliability for sensitive information with 192-bit encryption. +*Beamforming:* With eight support antennas, beamforming helps to improve data rates, and the range is extended by directing signals towards specific clients at once. It offers a backup for rapidly moving devices that may face issues with MU-MIMO. Beamforming also helps to control transmissions from antennas that cause signals to interfere on purpose. The signal can then be redirected to a new direction. + +### Devices that support WiFi 6 + +Until recently, WiFi 5 was the standard used for routers, repeaters, mesh networks and many WiFi clients. WiFi 6 was launched in 2019. There will be some compatibility issues for the earlier devices that supported WiFi 5 — they will be able to utilise the WiFi 6 network but not be able to receive support for the same. + +WiFi 6 routers are backward-compatible, and it is better to make sure that the network is ready for that. + +WiFi 6 enables lower battery consumption, making it a great choice for any environment, including the Internet of Things (IoT). It reduces unnecessary data activity, and tells devices when to put their data to sleep and when to be active. As a result, unnecessary data activity is reduced, and performance and battery life are maximised. + +The Samsung Galaxy Note 10 and Ruckus R750 were the world’s first smartphone and access point certified to support Wi-Fi 6, with the latest generation of the Apple iPhone following suit. The Wi-Fi Alliance has set up its certification programme, and new wireless products hitting the market are expected to start applying for compliance certification. The devices listed below are already WiFi 6 enabled: + +* iPhone 11 and after +* Samsung Galaxy S10, S20, Note 10, and Note 20 +* Apple computers with M1 processors +* Smart TVs + +> To take advantage of the improvements in the 802.11ax standard fully, both hardware and software functionalities have to be built on this WiFi technology. + +### Hardware testing + +To unlock the full potential of the latest devices, a WiFi 6 router is needed to run the network. This was an expensive affair a few years ago, but now we have a number of options even for mesh systems, gaming routers, range extenders, and more. The best purchase can be made only when hands-on testing is done. Beating all its competitors, the current king in terms of speed for WiFi 6 routers is TP-Link Archer AX6000. This router was able to transmit data wirelessly at a rate of 1523 Mbps up to a distance of 1.5 metres (5 feet). + +One important thing to remember here is that these routers do not magically increase speeds. The theoretical maximum of achieving 9.6 Gbps is unlikely. This high theoretical speed can be split up across a whole network of devices. + +WiFi 6 emphasises quality connectivity in areas where connected devices are densely populated. It does not increase the speed of each device exponentially but ensures these operate at an optimum level. + +Only the combination of a faster plan from the Internet service providers (ISPs) along with the WiFi 6 router, can fulfil its true potential. The real challenge is for the ISPs, as they need new fibre rollouts to capitalise on this next-gen technology. An important question is: when faster ISP speeds come, will the existing hardware become redundant? + +### Applications of WiFi 6 + +**Large public venues (LPVs):** Stadiums and convention centres are a few of the common areas where thousands of devices connect to WiFi at the same time. WiFi 6 can help to improve attendee experiences, increase customer interactions, and create value-added services like viewing instant replays or ordering food from one’s seat at an event. WiFi 6 allows LPV owners to create new business opportunities. +**Transport hubs:** Public transport stations are also an area where people attempt to connect to the network simultaneously. OFDMA and BSS colouring in WiFi 6 provide the necessary tools needed to overcome this challenge. +**IoT and smart city deployments:** Power efficiencies in WiFi 6 enable IoT devices to go into sleep mode and turn on their transmitters at predefined intervals to prolong field time without much maintenance. +**Education:** Libraries, auditoriums, and lecture halls at college and university campuses have the highest density of WiFi users during the day, and almost no one at night. WiFi 6 is a perfect choice in this situation. + +### The challenges + +WiFi 6 does not promise an increase in speed, but is an upgrade designed to make sure the speeds of our devices within a given range/area doesn’t slow down a few years down the road. There are three major challenges it faces though, which are often overlooked. +Improving the functionality of unsupported devices: Even though WiFi 6 is backward- compatible, justice to it can only be done when this technology is used to the maximum. This means devices need to be upgraded each time. + +Speed and performance outside the internal network: WiFi 6 can provide excellent connectivity for services like cloud file shares. However, the assets and resources of ISPs can affect speed and performance. + +*Coverage issues:* Transmission and bandwidths are capped according to the regulations prevalent in each country. Hence, the coverage of WiFi 6 may be restricted to ensure this cap is met. + +In spite of these challenges, companies like Aruba, Asus, AT&T, Boingo, Broadcom, Cisco, Comcast, CommScope, Cypress, Extreme Networks, Intel, Netgear, Orange, Qualcomm, TP-Link and Xiaomi are all focusing on the potential WiFi 6 has. + +(LCTT 译注:选题删除了原文中的相关产品推荐部分。) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/ + +作者:[Sharon Katta][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/sharon-katta/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6-1.jpg From b5db1e0a8fd97836286c8a66378054ad8828d357 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Jun 2022 08:37:15 +0800 Subject: [PATCH 088/231] translated --- ... That Just Plays Music and Nothing Else.md | 110 ------------------ ... That Just Plays Music and Nothing Else.md | 110 ++++++++++++++++++ 2 files changed, 110 insertions(+), 110 deletions(-) delete mode 100644 sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md create mode 100644 translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md diff --git a/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md b/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md deleted file mode 100644 index 5c2aa21088..0000000000 --- a/sources/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md +++ /dev/null @@ -1,110 +0,0 @@ -[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else" -[#]: via: "https://itsfoss.com/amberol-music-player/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else -====== -Though the world of music is dominated by streaming services, it has not discouraged developers from creating music players for desktop computers. - -Recently, I came across a beautiful looking new music player for the Linux desktop. It’s called Amberol and I was awestruck by its beauty. - -![amberol music player interface][1] - -Looks good, no? Let’s take a closer look at it. - -### Amberol, the cute looking music player for Linux - -Looking good is one of the two (or few) things it does. The other thing is playing music. - -And that’s about it. [Amberol][2] doesn’t have additional fancy (and useful) features like album art generation, metadata editing, lyrics display or playlists and library management. - -It’s not like these features will be added in future releases. Amberol just wants to play music. That’s it. - -#### The stunning UI - -Amberol is written in Rust and GTK like most new GNOME applications. - -It has an adaptive UI that changes color based on the album color you are playing. The gradient effect gives it a modern, sleek look that would surely be part of your Linux ricing screenshots. - -![amberol music player][3] - -Since the UI does not have the traditional handlebar and menu, it gives the application a unified look. - -#### Playlists - -It generates a playlist automatically from the files present in the folder you add. It is displayed in the lefthand sidebar. - -![amberol playlist][4] - -You can see how long the entire playlist will play the music in the top left corner. Clicking on the ‘correct sign’ allows you to select songs and remove them from the playlist. - -If you want, you can hide the playlist sidebar. - -![amberol without playlist][5] - -#### Music playing options - -You can see the progress of the songs on the interface. The player integrates well with the media control buttons on the keyboard. You can play/pause and change tracks with the dedicated media keys (if you have it on your system). - -Amberol does give you a few more options for playing the music. You can turn on the shuffle to play music in random order. You may also put a song on repeat and keep on playing it till you get bored of it. - -![amberol music playing options][6] - -The handlebar menu at the bottom gives you the option to add a file or folder and show available keyboard shortcuts. - -![amberol keyboard shortcuts][7] - -You may also disable the UI color changing to match the album art from here. - -### Installing Amberol on Linux - -Amberol is [available as Flatpak][8]. Please ensure that [your system has Flatpak support enabled][9]. - -To install Amberol, open a terminal and use the following command: - -``` -flatpak install flathub io.bassi.Amberol -``` - -Once installed search for the application in the menu and start from here. - -On the first run, it asks you to add music files or folders. You can also drag and drop files. - -![amberol first run][10] - -### Conclusion - -Personally, I prefer streaming services because I don’t have a good collection of local music. But I know there are people who have/had a huge collection of CDs that are now saved on the hard disk. - -Amberol is a beautiful-looking application and it is good enough for playing local music. The main attraction is the adaptive UI based on the album art. - -I let you play with it and share your experience in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/amberol-music-player/ - -作者:[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/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png -[2]: https://apps.gnome.org/app/io.bassi.Amberol/ -[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png -[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png -[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png -[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png -[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png -[8]: https://flathub.org/apps/details/io.bassi.Amberol -[9]: https://itsfoss.com/flatpak-guide/ -[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png diff --git a/translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md b/translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md new file mode 100644 index 0000000000..772796fee7 --- /dev/null +++ b/translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md @@ -0,0 +1,110 @@ +[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else" +[#]: via: "https://itsfoss.com/amberol-music-player/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不做其他事情 +====== +虽然音乐世界被流媒体服务所主导,但这并没有阻止开发者为桌面电脑创建音乐播放器。 + +最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼了。 + +![amberol music player interface][1] + +看起来不错,不是吗?让我们仔细看看它。 + +### Amberol,Linux 上的可爱的音乐播放器 + +看起来不错是它所做的两件(或几件)事情中的一件。另一件事是播放音乐。 + +这就是它。[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。 + +这些功能也不像会在未来的版本中加入。Amberol 只想播放音乐。就是这样。 + +#### 令人惊叹的用户界面 + +Amberol 和大多数新的 GNOME 应用一样,是用 Rust 和 GTK 编写的。 + +它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux rice 截图的一部分。 + +![amberol music player][3] + +由于 UI 没有传统的手柄和菜单,它给应用一个统一的外观。 + +#### 播放列表 + +它从你添加的文件夹中存在的文件自动生成一个播放列表。它显示在左手边的侧边栏。 + +![amberol playlist][4] + +你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选符号”,你可以选择歌曲,并从播放列表中删除它们。 + +如果你愿意,你可以隐藏播放列表的侧边栏。 + +![amberol without playlist][5] + +#### 音乐播放选项 + +你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键播放/暂停和改变曲目(如果你的系统上有)。 + +Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以把一首歌放在重复的位置,一直播放,直到你厌倦它。 + +![amberol music playing options][6] + +底部的手柄菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。 + +![amberol keyboard shortcuts][7] + +你也可以从这里禁用 UI 颜色变化以配合专辑封面。 + +### 在 Linux 上安装 Amberol + +Amberol 是[以 Flatpak 形式提供][8]。请确保[你的系统已启用 Flatpak 支持][9]。 + +要安装 Amberol,请打开终端并使用以下命令: + +``` +flatpak install flathub io.bassi.Amberol +``` + +安装完毕后,在菜单中搜索该应用,并点击启动。 + +第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件。 + +![amberol first run][10] + +### 总结 + +就个人而言,我更喜欢流媒体服务,因为我没有一个很好的本地音乐收藏。但我知道有的人有/有大量的 CD 收藏,现在都保存在硬盘上。 + +Amberol 是一个外观漂亮的应用,对于播放本地音乐来说,它足够好。最吸引人的是基于专辑封面的自适应用户界面。 + +我请你试试它,并在评论区分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/amberol-music-player/ + +作者:[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/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png +[2]: https://apps.gnome.org/app/io.bassi.Amberol/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png +[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png +[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png +[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png +[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png +[8]: https://flathub.org/apps/details/io.bassi.Amberol +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png From 041b32ae2f936991eeb96be61b6b8800612a8cd2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Jun 2022 08:38:57 +0800 Subject: [PATCH 089/231] translating --- ...607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md b/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md index fdec52f3de..70ff4e6105 100644 --- a/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md +++ b/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/" [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 328052580dfde2c1cee8fca76d747d1c55ae8047 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Jun 2022 08:52:45 +0800 Subject: [PATCH 090/231] RP @geekpi https://linux.cn/article-14689-1.html --- ...hine Learning Model to Make Predictions.md | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) rename {translated/tech => published}/20220530 Using a Machine Learning Model to Make Predictions.md (74%) diff --git a/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/published/20220530 Using a Machine Learning Model to Make Predictions.md similarity index 74% rename from translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md rename to published/20220530 Using a Machine Learning Model to Make Predictions.md index 94a7feb229..7fb0ad690d 100644 --- a/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md +++ b/published/20220530 Using a Machine Learning Model to Make Predictions.md @@ -3,13 +3,16 @@ [#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14689-1.html" -使用机器学习模型进行预测 +机器学习:使用 Python 进行预测 ====== -机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。 + +> 机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。 + +当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。 ![Machine-learning][1] @@ -28,14 +31,15 @@ import matplotlib.pyplot as plt ``` from google.colab import files uploaded = files.upload() -for fn in uploaded.keys(): print(‘User uploaded file “{name}” with length {length} bytes’.format( -name=fn, length=len(uploaded[fn]))) -Choose files No file chosen +for fn in uploaded.keys(): + print('User uploaded file "{name}" with length {length} bytes'.format(name=fn, length=len(uploaded[fn]))) ``` -只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 *“Hoppers Crossing-Hourly-River-Level.csv”*,大小 2207036 字节。 +如果没有选择文件的话,选择上传的文件。 -完成后,我们就可以使用 *sklearn 库*来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。 +只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 `Hoppers Crossing-Hourly-River-Level.csv`,大小 2207036 字节。 + +完成后,我们就可以使用 `sklearn` 库来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。 ![Figure 1: Training the model][2] @@ -51,7 +55,7 @@ regressor.fit(X_train, y_train) ### 在 Java 中使用 ML 模型 -我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 sklearn2pmml 的库可以帮助我们做到这一点: +我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 `sklearn2pmml` 的库可以帮助我们做到这一点: ``` # Install the library @@ -75,7 +79,7 @@ via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-ma 作者:[Jishnu Saurav Mittapalli][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/) 荣誉推出 From ed3feb863324d2c44a46288c0359d6916f2ae25b Mon Sep 17 00:00:00 2001 From: Peaksol <1244050218@qq.com> Date: Thu, 9 Jun 2022 09:43:16 +0800 Subject: [PATCH 091/231] moved to `translated` --- ...res! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md (100%) diff --git a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/translated/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md similarity index 100% rename from sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md rename to translated/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md From 944a4fe251d9be567f3419364df90323a281070d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Jun 2022 09:47:26 +0800 Subject: [PATCH 092/231] RP @geekpi https://linux.cn/article-14690-1.html --- ... linking libraries while compiling code.md | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) rename {translated/tech => published}/20220530 Dynamically linking libraries while compiling code.md (67%) diff --git a/translated/tech/20220530 Dynamically linking libraries while compiling code.md b/published/20220530 Dynamically linking libraries while compiling code.md similarity index 67% rename from translated/tech/20220530 Dynamically linking libraries while compiling code.md rename to published/20220530 Dynamically linking libraries while compiling code.md index b9f2239cfc..200b9a7fda 100644 --- a/translated/tech/20220530 Dynamically linking libraries while compiling code.md +++ b/published/20220530 Dynamically linking libraries while compiling code.md @@ -3,19 +3,18 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14690-1.html" -编译代码时动态链接库 +编译代码时动态地链接库 ====== -编译软件在你如何运行你的系统方面给你很大的灵活性。LD_LIBRARY_PATH 变量,以及 GCC 的 -L 和 -l 选项,是这种灵活性的组成部分。 -![women programming][1] +![](https://linux.cn/article-14690-1.html) -图片提供:WOCinTech Chat。由 Opensource.com 修改。CC BY-SA 4.0 +> 编译软件在你如何运行你的系统方面给你很大的灵活性。`LD_LIBRARY_PATH` 变量,以及 GCC 的 `-L` 和 `-l` 选项,是这种灵活性的组成部分。 -编译软件是开发者经常做的事情,在开源中,一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。 +编译软件是开发者经常做的事情,在开源世界中,一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。 当你在编译代码时,你通常要处理多个源文件。开发人员倾向于将不同的类或模块放在不同的文件中,这样它们可以被单独维护,甚至可能被不同的项目使用。但当你编译这些文件时,许多文件会被编译成一个可执行文件。 @@ -23,12 +22,12 @@ ### 在编译过程中定位一个共享对象 -当你[用 GCC 编译][2]时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下,GCC 假定库在系统库路径中,例如 `/lib64` 和 `/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。 +当你 [用 GCC 编译][2] 时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下,GCC 假定库在系统库路径中,例如 `/lib64` 和 `/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。 有两个选项对于在 GCC 中寻找库很重要: -* -L(大写字母 L)在 GCC 的搜索位置上增加一个额外的库路径。 -* -l(小写字母 L)设置你要链接的库的名字。 +* `-L`(大写字母 L)在 GCC 的搜索位置上增加一个额外的库路径。 +* `-l`(小写字母 L)设置你要链接的库的名字。 例如,假设你写了一个叫做 `libexample.so` 的库,并且你想在编译你的应用 `demo.c` 时使用它。首先,从 `demo.c` 创建一个对象文件: @@ -36,7 +35,7 @@ $ gcc -I ./include -c src/demo.c ``` -`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。而这正是所发生的: +`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。结果如下: ``` $ ls @@ -70,11 +69,11 @@ $ ldd ./myDemo /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000) ``` -你已经知道`libexample` 不能被定位,但 `ldd` 输出至少确认了对*工作*库的期望。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。 +你已经知道定位不到 `libexample`,但 `ldd` 输出至少确认了它对*工作*库的期望位置。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。 ### LD_LIBRARY_PATH -`LD_LIBRARY_PATH` [环境变量][3]定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。 +`LD_LIBRARY_PATH` [环境变量][3] 定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。 有几种设置环境变量的方法,但最灵活的是在运行命令前放置环境变量。看看设置 `LD_LIBRARY_PATH` 对 `ldd` 命令在分析一个“损坏”的可执行文件时的作用: @@ -112,9 +111,8 @@ hello world! 在大多数情况下,`LD_LIBRARY_PATH` 不是你需要设置的变量。按照设计,库安装到 `/usr/lib64` 中,因此应用自然会在其中搜索所需的库。在两种情况下,你可能需要使用 `LD_LIBRARY_PATH`: -* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。好的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。 - -* 你正在使用设计为在单个目录之外运行的软件,没有安装脚本或将库放置在非标准目录中的安装脚本。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。 +* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。良好设计的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。 +* 你正在使用设计为在单个目录之外运行的软件,它没有安装脚本,或安装脚本将库放置在非标准目录中。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。 编译软件为你在运行系统方面提供了很大的灵活性。`LD_LIBRARY_PATH` 变量以及 `-L` 和 `-l` GCC 选项是这种灵活性的组成部分。 @@ -125,7 +123,7 @@ via: https://opensource.com/article/22/5/compile-code-ldlibrarypath 作者:[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/) 荣誉推出 From 9f4958b21a91af393223e0e2ebf438a5d4ebd053 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 9 Jun 2022 12:32:23 +0800 Subject: [PATCH 093/231] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E6=96=B0=E9=97=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Matrix to Enable Cross-App Messaging.md | 81 ------------------ ...ata Centre Scale Encryption Open Source.md | 37 -------- ... Fix a Big Problem for Modern Musicians.md | 85 ------------------- ... Feature as a Google Photos Alternative.md | 69 --------------- 4 files changed, 272 deletions(-) delete mode 100644 sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md delete mode 100644 sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md delete mode 100644 sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md delete mode 100644 sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md diff --git a/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md b/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md deleted file mode 100644 index 8e6dbfde37..0000000000 --- a/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: subject: "Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging" -[#]: via: "https://news.itsfoss.com/rocket-chat-matrix/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging -====== -Rocket.Chat is embracing the Matrix protocol to enable decentralized communication for the platform. That’s a huge change, isn’t it? - -![rocket chat matrix][1] - -Rocket.Chat is an excellent open-source messaging (collaboration) platform. - -In fact, it is one of the [best open-source Slack alternatives][2] available. We use it as well for internal communication. - -Rocket.Chat is also making good progress compared to some of its open-source competitors. For instance, they [teamed up with Nextcloud to provide an alternative to Office 365][3]. - -And recently announced a switch to Matrix protocol to introduce federation capabilities that allow its users to communicate with users on other platforms. In other words, [Rocket.Chat][4] will be utilizing a decentralized network for communication with the Matrix integration. - -As a Rocket.Chat user; you can talk to users on any other app using the Matrix protocol. - -### Rocket.Chat is Switching to a Decentralized Protocol to Enhance Collaboration - -![][5] - -Matrix protocol is a fantastic choice to enable an interoperable federation. Now, with Rocket.Chat onboard; the decentralized network should be stronger than ever. - -Not to forget, we already have [Element][6], and [Gitter][7], as some of the platforms that already utilize Matrix. So, Rocket.Chat joining the network sounds exciting! - -The [official announcement][8] further explains the collaboration: - -> The Rocket.Chat adoption of Matrix makes it simple for organizations to easily connect with external parties, whether they’re using Rocket.Chat or any other Matrix compatible platform. This initiative is another step forward on Rocket.Chat’s journey to let every conversation flow without compromise and enable full interoperability with its ecosystem. - -The new change with the Matrix network is already available in the latest [alpha release for Rocket.Chat 4.7.0][9]. Unless you want to experiment with it, you should wait for the stable release to introduce the Matrix network support. - -**Aron Ogle** (*Core Developer at Rocket.Chat*) has put together a [guide][10] and a video to help you out if you want to explore the technical details of Rocket.Chat integration with the Matrix. Here’s the video for it: - -![Setting up Rocket Chat to talk with Matrix][11] - -### Is This a Good Move? - -While decentralized tech hasn’t taken the internet by storm, it is promising and makes more sense with its reliability and decentralized capabilities. Matrix protocol has been getting all the praise for a couple of years now, and it seems to be heading in the right direction. - -As of now, most of the big platforms rely on centralized infrastructure to make things work. - -And, with the current implementations, cross-communication is not possible with most of the chat applications. - -So, Rocket.Chat will be making a difference by offering cross-app interactions, like the ability to chat with an Element user on **matrix.org,** as shown in the image above. - -Rocket.Chat entering the scene with Matrix protocol could open up the potential for its competitors or other services to give a second thought to solutions like Matrix protocol. - -*What do you think about Rocket.Chat adopting the Matrix protocol? Share your thoughts in the comments section below.* - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/rocket-chat-matrix/ - -作者:[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/rocketchat-matrix-protocol.jpg -[2]: https://itsfoss.com/open-source-slack-alternative/ -[3]: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/ -[4]: https://itsfoss.com/rocket-chat/ -[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocket-chat-matrix.jpg -[6]: https://itsfoss.com/element/ -[7]: https://itsfoss.com/gitter/ -[8]: https://rocket.chat/press-releases/rocket-chat-leverages-matrix-protocol-for-decentralized-and-interoperable-communications -[9]: https://github.com/RocketChat/Rocket.Chat/releases/tag/4.7.0 -[10]: https://geekgonecrazy.com/2022/05/30/rocketchat-and-the-matrix-protocol/ -[11]: https://youtu.be/oQhIH8kql9I diff --git a/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md b/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md deleted file mode 100644 index beb885cdd7..0000000000 --- a/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md +++ /dev/null @@ -1,37 +0,0 @@ -[#]: subject: "Google Makes Data Centre Scale Encryption Open Source" -[#]: via: "https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/" -[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Google Makes Data Centre Scale Encryption Open Source -====== -![google-ranking-factors][1] - -Google has made open source an encryption scheme it developed to protect traffic between its data centres. PSP, which stands for PSP Security Protocol, was created to relieve Google’s processors of the growing burden of software-based encryption, according to the company. PSP has been hailed as a success in the company’s own environment, and the company has stated that it is “making PSP open source to encourage broader adoption by the community and hardware implementation by additional NIC [network interface card] vendors.”  PSP offloads encryption to NICs, which was previously possible with existing encryption schemes, but not at the scale or with the traffic coverage required by Google. - -“At Google’s scale,” the company wrote when announcing its decision, “the cryptographic offload must support millions of live transmission control protocol (TCP) connections and sustain 100,000 new connections per second at peak.” - -Existing security protocols, according to Google Cloud’s Amin Vahdat and Soheil Hassas Yeganeh, had flaws. “While TLS meets our security requirements, it is not an offload-friendly solution because of the tight coupling between the connection state in the kernel and the offload state in hardware. TLS also does not support non-TCP transport protocols, such as UDP”, they stated. - -However, the IPSec protocol cannot be offloaded to hardware at the required scale. “IPSec … cannot economically support our scale partly because they store the full encryption state in an associative hardware table with modest update rates,” the post explains. - -Google added a custom header and trailer to standard User Datagram Protocol (UDP) encapsulation to create PSP. PSP is currently implemented in three ways: one for Google’s Andromeda Linux virtualisation kernel, one for its Snap networking system, and an application-layer version, SoftPSP, created so Google Cloud customers could use PSP on computers with traditional NICs. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/ - -作者:[Laveesh Kocher][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/laveesh-kocher/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/google-ranking-factors-e1654074528236.jpg diff --git a/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md b/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md deleted file mode 100644 index 782197f1a9..0000000000 --- a/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians" -[#]: via: "https://news.itsfoss.com/spotify-basic-pitch/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians -====== -Spotify’s new open-source tool helps you convert audio to MIDI version. Explore why it is a big deal for modern musicians. - -![spotify][1] - -Spotify is a leading music streaming platform with several open-source projects. - -While most of the projects/tools are built for niche users, they have finally introduced something that seems enticing to all the modern musicians involved with digital music production. - -‘Basic Pitch’ is a new free and open-source tool by Spotify that lets you convert any audio file to its MIDI (Musical Instrument Digital Interface) version. - -In case you did not know, with MIDI notes, you can easily tweak what’s being played and analyze more to help you in digital music production. - -### Basic Pitch: Making Things Easier - -With Basic Pitch, one can easily have MIDI notes of an audio file they have always wanted, and with better accuracy. - -![spotify basic pitch][2] - -Spotify explains that it is better than existing note-detection systems by offering some advantages that include: - -> **Polyphonic + instrument-agnostic:** Unlike most other note-detection algorithms, Basic Pitch can track multiple notes at a time and across various instruments, including piano, guitar, and ocarina. Many systems limit users to only monophonic output (one note at a time, like a single vocal melody), or are built for only one kind of instrument. - -> **Pitch bend detection:** Instruments, like guitar or the human voice, allow for more expressiveness through pitch-bending: vibrato, glissando, bends, slides, etc. However, this valuable information is often lost when turning audio into MIDI. Basic Pitch supports this right out of the box. - -> **Speed:** Basic Pitch is light on resources, and is able to run faster than real time on most modern computers ([Bittner et al. 2022][3]). - -Basic Pitch uses a machine learning model that turns various instrumental performances into MIDI. The audio file may also contain your voice, but it should still be able to convert the instrument to its MIDI version. - -![Basic Pitch demo: Convert audio into MIDI using ML][4] - -I tried converting an MP3 karaoke file with a single instrument to get the MIDI notes, and it seemed to work pretty well. - -The tool also lets you process more than one audio file at a time and offers a few parameter controls that include note segmentation, confidence threshold, minimum/maximum pitch, and note length. - -### Made for Creators and Researchers - -Spotify mentions that it targets the creators primarily, but they are also interested to learn how machine learning researchers build upon it and help develop better solutions using the [open-source project on GitHub][5]. - -As a creator/musician, you can access the open-source tool on its [official website][6] for a demo. The parameters can be adjusted using the website, and you can also download the MIDI file from there. - -[Basic Pitch][7] - -![spotify basic pitch][8] - -It is also available via [PyPI][9] to install and use via the command-line interface on Linux, Windows, and macOS. - -You can explore its [GitHub page][10] to know more about its usage/commands. - -If you are curious, the [official announcement post][11] provides more technical comparisons and explanations regarding the development of the tool. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/spotify-basic-pitch/ - -作者:[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/06/spotify-midi.jpg -[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-basic-pitch-1024x531.png -[3]: https://ieeexplore.ieee.org/document/9746549 -[4]: https://youtu.be/DhlvfgS73ZQ?list=PLf1KFlSkDLIAYLdb-SD9s8TdGy0rWIwVr -[5]: https://github.com/spotify/basic-pitch -[6]: https://basicpitch.spotify.com/ -[7]: https://basicpitch.spotify.com/ -[8]: https://news.itsfoss.com/wp-content/uploads/2022/06/basic-pitch-parameters.jpg -[9]: https://pypi.org/ -[10]: https://github.com/spotify/basic-pitch -[11]: https://engineering.atspotify.com/2022/06/meet-basic-pitch/ diff --git a/sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md b/sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md deleted file mode 100644 index 6a737060e0..0000000000 --- a/sources/news/20220606 Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: subject: "Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative" -[#]: via: "https://news.itsfoss.com/internxt-photos/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative -====== -Internxt is already an interesting cloud storage service. It also has a Photos feature that can be a replacement to Google Photos for some. - -![internxt photos][1] - -Internxt is an open-source encrypted cloud service with a native Linux client. Our [older article][2] explaining its cloud storage service can be an interesting read if you did not know about it. - -Initially, we focused on their cloud storage offering. And, it seems like we missed out on another product “Photos” that was unveiled by them last month in a tweet. - -[Internxt Photos][3] pitches itself as an open-source Google Photo alternative with privacy and security in mind. - -*The post includes an affiliate link for Internxt. If you get a subscription through our link, we get a commission, and you get to support us at no extra cost to you.* - -### Internxt Photos with Zero-Knowledge Encryption - -![][4] - -Internxt Photos claims that it puts privacy and security at its core compared to some competitors in the industry. - -While respecting user privacy, they also try to offer the basic features that help you easily organize the photos you upload to the service. - -Note that the Photos service is included with the cloud storage subscription. Unlike Google’s offering, there are no separate pricing plans for just storing the Photos. - -Likewise, you need to rely on the same Internxt app to access your Photo gallery. - -You should not have anything to worry about considering the Internxt app is available on the Google Play Store, and the App Store as well. - -The photos you upload to the gallery get synced across multiple devices. So, even if you do not have access to one of your devices, it should not be a problem. - -![][5] - -The look of the photo gallery seems inspired by Apple’s Photos app, but that’s a good approach for simplicity and usability. The Photos also provide you the ability to share photos with your friends and family using a link. You can also customize the link to tweak the open limit to control access to your shared links. - -Considering it as an open-source encrypted alternative with a primary cloud storage offering to mainstream Photo storage services, does this sound like something interesting to you? - -You can get started using our link to the product page to explore more about it and get started. The [GitHub page][6] can also be useful if you’re curious. - -[Internxt Photos][7] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/internxt-photos/ - -作者:[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/06/internxt-photos.jpg -[2]: https://itsfoss.com/internxt-cloud-service/ -[3]: https://itsfoss.com/go/internxt-photos/ -[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/internxt-gallery.jpg -[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/mobile-photos-share-mockup-506x1024.webp -[6]: https://github.com/internxt -[7]: https://itsfoss.com/go/internxt-photos/ From c32ef34e6122bbd17a831b545de623a0f63f0d98 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 9 Jun 2022 12:34:30 +0800 Subject: [PATCH 094/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220609=20openSUSE=20Leap=2015.4=20Release=20Adds=20L?= =?UTF-8?q?eap=20Micro=205.2,=20Updated=20Desktop=20Environments,=20and=20?= =?UTF-8?q?More.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Updated Desktop Environments, and More.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md diff --git a/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md new file mode 100644 index 0000000000..543a4d4dbd --- /dev/null +++ b/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md @@ -0,0 +1,99 @@ +[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More" +[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More +====== +openSUSE Leap 15.4 is here to catch up with SUSE Linux Enterprise Service Pack 4 with new upgrades, and essential improvements. + +![opensuse 15.4][1] + +The upcoming openSUSE minor release is finally here. If you use OpenSUSE as your daily driver for desktop or server, you might have already tested the release candidate version available for a couple of weeks now. + +The openSUSE Leap 15.4 focuses on software package updates to match the SUSE Linux Enterprise 15 Service Pack 4. So, you will notice several deprecated packages, and new upgrades available to replace them. + +Of course, you should have some packages available to ensure compatibility. But, most of the older ones have been removed. + +### openSUSE Leap 15.4: What’s New? + +To match the latest SUSE Linux Enterprise (SLE), packages like Python 2 and KDE 4 have been removed. You can find newer desktop environments with this release. + +Furthermore, for containers and AI/ML use-cases, podman, containerd, Tensorflow,and Grafana have been updated. + +#### Leap Micro 5.2 + +Leap Micro is the latest version of its lightweight operating system tailored for container and virtualized workloads. It is a new offering of [MicroOS][2] for Leap, which is a variant of Tumbleweed, providing automated administration and patching. + +#### Desktop Environments + +Xfce 4.16 is here to stay, but you can find additions for new major features that include new icons, and palettes. + +The settings manager in Xfce 4.16 also received a visual refresh. Similarly, there were some improvements to file manager (Thunar), dark mode support for a new status tray plugin, and more. + +KDE 4 packages have been dropped, Plasma 5.24 LTS has been included as an LTS release. + +To explore the changes, you can check out our original coverage for [KDE Plasma 5.24 LTS][3]. Overall, the new KDE Plasma experience should be impressive for desktop users. + +When it comes to GNOME, you can find GNOME 41 included with Leap 15.4 with a range of improvements and new features. Learn more about [GNOME 41][4] to know what you can expect. + +For other available desktop environments, Leap 15.4 includes: + +* MATE 1.26 +* Enlightenment 0.25.3 +* Deepin Desktop Environment 20.3 + +#### Dropped Packages + +Some essential packages removed include python 2 (end of life), digikam, tensorflow 1.x, and Qt 4 packages. + +You will find Qt 5 and Plasma 5 available to update the system. + +#### Updated Packages + +Many vital packages have been updated for Leap 15.4, some of the popular ones include: + +* TensorFlow 2.6.2 +* podman 3.4.4 +* GNU Health 4.0 +* sudo 1.9.9 +* systemd 249.10 +* AppArmor 3.04 +* DNF 4.10.0 +* LibreOffice 7.2.5 + +So, you should notice useful upgrades for both server users and desktop users with various application updates. Many multimedia applications like VLC, and GNOME MPV have also received upgrades. + +#### Other Improvements + +Along with essential updates, and clean up, you can also find a newer Linux Kernel 5.14.21 maintained by SUSE. + +The hardware support should see an improvement with the updated kernel. + +For more information, you can refer to the release notes for [openSUSE Leap 15.4][5]. + +[Download openSUSE Leap 15.4][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/opensuse-leap-15-4-release/ + +作者:[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/06/opensuse-leap-15-4.jpg +[2]: https://microos.opensuse.org/ +[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[4]: https://news.itsfoss.com/gnome-41-release/ +[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes +[6]: https://get.opensuse.org/leap/15.4/ From d65e16eaff7390c8bc490bdeb003b3a6a060542e Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Thu, 9 Jun 2022 12:42:57 +0800 Subject: [PATCH 095/231] Mywork (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update 20210131 How to teach open source beyond business.md * Update 20210131 How to teach open source beyond business.md * Update 20210131 How to teach open source beyond business.md * Update 20210131 How to teach open source beyond business.md * Rename sources/tech/20210131 How to teach open source beyond business.md to translated/tech/20210131 How to teach open source beyond business.md * Update 20220606 6 Linux word processors you need to try.md * Update 20220606 6 Linux word processors you need to try.md * Update 20220606 6 Linux word processors you need to try.md * Update 20220606 6 Linux word processors you need to try.md * Update 20220606 6 Linux word processors you need to try.md * 翻译 * Rename sources/tech/20220606 6 Linux word processors you need to try.md to translated/tech/20220606 6 Linux word processors you need to try.md --- ...6 Linux word processors you need to try.md | 85 ------------------ ...ow to teach open source beyond business.md | 74 ++++++++++++++++ ...6 Linux word processors you need to try.md | 88 +++++++++++++++++++ 3 files changed, 162 insertions(+), 85 deletions(-) delete mode 100644 sources/tech/20220606 6 Linux word processors you need to try.md create mode 100644 translated/tech/20210131 How to teach open source beyond business.md create mode 100644 translated/tech/20220606 6 Linux word processors you need to try.md diff --git a/sources/tech/20220606 6 Linux word processors you need to try.md b/sources/tech/20220606 6 Linux word processors you need to try.md deleted file mode 100644 index 5a6f767f0d..0000000000 --- a/sources/tech/20220606 6 Linux word processors you need to try.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "6 Linux word processors you need to try" -[#]: via: "https://opensource.com/article/22/6/word-processors-linux" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lkxed" -[#]: translator: "duoluoxiaosheng" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -6 Linux word processors you need to try -====== -Check out one of my favorite open source word processors to put your ideas to paper. - -![Typewriter with hands][1] - -Image by: rawpixel.com. CC0. - -Writers are always looking for better ways to put their words and ideas into readable formats to share with their readers. My first experiences with word processing came in my Apple II days when I used AppleWorks and later FrEDWriter, which was a free word processing application created in 1985. It was the standard for my students, many of whom came from households that lacked the money to purchase proprietary software. - -### Abiword - -When I made the switch to Linux in the late 1990's, I was looking for high quality writing software that I could use and recommend to students who chose to follow my lead in the world of open source software. The first word processor I became familiar with was [AbiWord][2]. The name AbiWord is derived from the Spanish word, abierto, which means open. It was Initially released in 1998 and it has been under continuous development. It is licensed as GPLv2. It supports basic word processing such as lists, indents and character formats. It supports a variety of import and export file formats including `.doc`, `.html`, `.docx`, and `.odt`. - -![Image of Abiword][3] - -### Etherpad - -[Etherpad][4] is an open source group editing project. It allows you to edit documents in real time much like Google Drive. The main difference is that it is entirely open source. According to their website you can, "write articles, press releases, to-do lists, together with your friends, fellow students or colleagues, all working on the same document at the same time." The source code is readily available to look at. Etherpad is licensed as Apache 2.0. You can use Etherpad in the cloud or download and [install][5] it on your own Linux computer. - -### Cryptpad - -[CryptPad][6] is a collaboration suite that is end-to-end encrypted. It is licensed with GPLv3 and its source code is available on [GitHub][7]. It was developed by [Xwiki][8] Labs. It is an alternative to Google Drive and is self hosted. According to their website, "CryptPad is built to enable collaboration. It synchronizes changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored.” Cryptpad offers extensive [documentation][9] for users. - -### Focuswriter - -[FocusWriter][10] is a simple distraction free editor. It uses a hideaway interface that you access by moving your mouse to the edges of the screen. It is licensed with GPLv3 and it's available on Linux with Flatpak,via DEB on [Ubuntu][11], and RPM on [Fedora][12]. This is an example of the FocusWriter desktop. A very simple and intuitive interface where the menu automatically hides until you move your mouse pointer to the top or sides of the screen. Files are saved by default as an `.odt`, but it also supports plain text, `.docx`, and Rich text. - -![Image of FocusWriter][13] - -### LibreOffice Writer - -[LibreOffice Writer][14] is my favorite. I have been using it for over a dozen years. It has all the features I need including formatting for rich text. It also has the largest array of import and export options I have seen in any word processor. There are dozens of templates available for specialty formats like [APA][15] for research and publication. I love that I can export directly to PDF and ‘epub' from any word processor. LibreOffice Writer is free software with the Mozilla Public License 2.0. The s[ource code][16] for LibreOffice is from the Document Foundation. LibreOffice comes standard with most Linux distribution. It is also available as Flatpak, Snap, and AppImage. In addition, you can download and install it on MacOS and Windows. - -![Image of LibreOffice work space][17] - -### OpenOffice Writer - -Apache [OpenOffice Writer][18] is a complete word processor. It's simple enough for memos yet complex enough to write your first book. According to their website, OpenOffice Writer automatically saves documents in ‘open document format'. Documents can also be saved in `.doc`, `.docx`, Rich Text, and other formats. OpenOffice Writer is licensed with an Apache License 2.0. Source code and is available on [GitHub][19]. - -There is a wealth of free open source software waiting for you to discover. They are great for getting your everyday tasks done and you can also contribute to their development. What is your favorite Linux word processor application? - -Image by: (Don Watkins, CC BY-SA 4.0) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/6/word-processors-linux - -作者:[Don Watkins][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/don-watkins -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg -[2]: https://www.abisource.com/ -[3]: https://opensource.com/sites/default/files/2022-05/abiword.png -[4]: https://etherpad.org/# -[5]: https://github.com/ether/etherpad-lite#installation -[6]: https://cryptpad.fr/what-is-cryptpad.html -[7]: https://github.com/xwiki-labs/cryptpad -[8]: https://github.com/xwiki-labs -[9]: https://docs.cryptpad.fr/en/user_guide/index.html -[10]: https://gottcode.org/focuswriter/ -[11]: https://packages.ubuntu.com/jammy/focuswriter -[12]: https://src.fedoraproject.org/rpms/focuswriter -[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png -[14]: https://www.libreoffice.org/discover/writer/ -[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template -[16]: https://www.libreoffice.org/about-us/source-code/ -[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png -[18]: https://www.openoffice.org/product/writer.html -[19]: https://github.com/apache/openoffice diff --git a/translated/tech/20210131 How to teach open source beyond business.md b/translated/tech/20210131 How to teach open source beyond business.md new file mode 100644 index 0000000000..b1688ced71 --- /dev/null +++ b/translated/tech/20210131 How to teach open source beyond business.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: (duoluoxiaosheng ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to teach open source beyond business) +[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) +[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) + +商业之上是开源 +====== + +The Beyond Program 连接起未来科技行业的人才和开源文化。 + +![Teacher or learner?][1] + +那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我的职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 + +所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个可能拥有很大的团队,并且分散在不同地方的正在进行中的项目。我还要学会正确的沟通以保证我付出点努力不白费。 + +我在这个行业并不优秀。我只是众多毕业生中的一员。 + +### 开源让毕业生点起点更高 + +作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。 + +通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。 + +开源在科技行业的价值是塑造并完善全球软件公司的文化。参与开源项目并采用[开放组织文化][2]正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖,才华横溢的员工。 +因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 + +### 商业之上是开源文化 + +当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 + +我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 + +我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 + +在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础”中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。 我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。 + +![Beyond teaching online][7] + +(Irit Goihman, [CC BY-SA 4.0][8]) + +### 成果展示 + +这两个课程去得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程器件的开源贡献而得到了他们第一份技术工作。 + +其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。 + +很荣幸,在一群优秀工程师的参与下,与 Liora 一起领导这个成功的项目。我们一起助力开源社区的成长。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/open-source-beyond-business + +作者:[Irit Goihman][a] +选题:[lujun9972][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/iritgoihman +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?) +[2]: https://opensource.com/open-organization/resources/open-org-definition +[3]: https://www.linkedin.com/in/lioramilbaum +[4]: https://www.devopsloft.io/ +[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/ +[6]: https://www.int.mta.ac.il/ +[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/translated/tech/20220606 6 Linux word processors you need to try.md b/translated/tech/20220606 6 Linux word processors you need to try.md new file mode 100644 index 0000000000..d4e4a3e35b --- /dev/null +++ b/translated/tech/20220606 6 Linux word processors you need to try.md @@ -0,0 +1,88 @@ +[#]: subject: "6 Linux word processors you need to try" +[#]: via: "https://opensource.com/article/22/6/word-processors-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +6 Linux word processors you need to try +====== +值得尝试的六款Linux文字处理程序 +====== + +选择一款最中意的文字处理程序把你的想法打印到纸上。 + +![Typewriter with hands][1] + +Image by: rawpixel.com. CC0. + +作家们总是在寻找更好的方法将他们的文字和想法以更好的方式呈现给他们的读者。我对文字处理程序最早的印象是在 Apple II 上使用 AppleWorks 和 FrEDWriter,一个1985年的免费的文字处理程序。这是我的学生的标配,他们中的许多人来自没有钱购买专用软件的家庭。 + +### Abiword + +在20世纪90年代时,我开始使用 Linux, 我开始寻找高质量的写作程序,以推荐给在开源软件世界跟随我的学生。我首先接触的文字处理程序是 [AbiWord][2]。 AbiWord 来自西班牙语 Abierto,是打开的意思。最早发布于1998年,并且之后一直在升级。使用 GPLv2 开源协议。支持列表,缩进,字符格式等基本功能。支持比如 ".doc", ".html", ".docx", ".odt" 等多种格式文件的导入和导出。 + +![Image of Abiword][3] + +### Etherpad + +[Etherpad][4] 是一个开源项目。它可以让您像 Google Drive 那样实时编辑文档。它完全开源。据它的网站上介绍,您可以用它来写文章,新闻稿和待办清单,还可以和您的朋友,同学或者同事一起同时编辑同一个文档。源代码可查看。Etherpad 采用 Apache 2.0 开源协议。您可以直接在线使用它,或者把它下载并[安装][5]到您的 Linux 电脑上。 + +### Cryptpad + +[CryptPad][6] 是一个端到端加密的写作套件。使用 GPLv3 开源协议,并且源代码在 [GitHub][7] 上公开。 由 [Xwiki][8] 实验室开发。可替代 Google Drive 并且自主托管。根据网站描述 “CryptPad 旨在实现协作办公。实时同步文档的更改。由于所有数据都已加密,因此服务及其管理员无法查看正在编辑和存储的内容。” Cryptpad 为用户提供了[丰富的文档][9]。 + +### Focuswriter + +[FocusWriter][10] 是一个简单的免干扰的编辑器。它使用隐藏的界面,鼠标移动到屏幕边界时可以显示。使用 GPLv3 开源协议并提供 Linux 通用软件安装包(Flatpak),比如 [Ubuntu][11] 的 DEB 和 [Fedora][12] 的 RPM。这是一个 FocusWriter 桌面的例子。 一个非常简单直观的界面,菜单自动隐藏,鼠标指向屏幕顶部或边缘时才显示。文件默认保存为 ".odt" 格式,也支持纯文本, ".docx",和富文本。 + +![Image of FocusWriter][13] + +### LibreOffice Writer + +[LibreOffice Writer][14]是我最喜欢的。我已经使用了十多年了。他拥有我需要的富文本的所有特性。他还拥有我见过的最大的导入导出列表。类似 [APA][15]这样的问卷和出版模板它拥有十多种。最喜欢它的是他可以将文件导出为 PDF 和 “epub”。 LibreOffice Writer 是一个免费软件,使用 Mozilla Public Liceense 2.0 开源协议。 [源代码][16]由 Document Foundation 提供。LibreOffice 支持大多数 Linux 发行版。 同时它也提供 Flatpak,Snap 和 AppImage。另外,您也可以把它下载并安装到 MacOs 和 Windows 上。 + +![Image of LibreOffice work space][17] + +### OpenOffice Writer + +Apache [OpenOffice Writer][18] 是一个全功能点文字处理程序。作为一个备忘录来说它足够简单,但对于编写你的第一本书来说它又足够复杂。依据官网的描述,OpenOffice Writer 将文档自动保存为 “open document format”. 它还支持将文档保存为 ".doc", ".docx", 富文本和其他格式。OpenOffice Writer 使用 Apache License 2.0 开源协议。源代码在 [GitHub][19] 上公开。 + +这里还有许多免费的开源软件等着大家去发现。它们非常适合完成您的日常任务,您也可以为它们的发展做出贡献。您最喜欢的 Linux 文字处理器程序是什么呢? + +Image by: (Don Watkins, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/word-processors-linux + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg +[2]: https://www.abisource.com/ +[3]: https://opensource.com/sites/default/files/2022-05/abiword.png +[4]: https://etherpad.org/# +[5]: https://github.com/ether/etherpad-lite#installation +[6]: https://cryptpad.fr/what-is-cryptpad.html +[7]: https://github.com/xwiki-labs/cryptpad +[8]: https://github.com/xwiki-labs +[9]: https://docs.cryptpad.fr/en/user_guide/index.html +[10]: https://gottcode.org/focuswriter/ +[11]: https://packages.ubuntu.com/jammy/focuswriter +[12]: https://src.fedoraproject.org/rpms/focuswriter +[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png +[14]: https://www.libreoffice.org/discover/writer/ +[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template +[16]: https://www.libreoffice.org/about-us/source-code/ +[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png +[18]: https://www.openoffice.org/product/writer.html +[19]: https://github.com/apache/openoffice From b8ed9b319281191de35f7807bd4afcff063b2a50 Mon Sep 17 00:00:00 2001 From: duoluoxiaosheng <554765662@qq.com> Date: Thu, 9 Jun 2022 12:47:07 +0800 Subject: [PATCH 096/231] Delete 20210131 How to teach open source beyond business.md --- ...ow to teach open source beyond business.md | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 translated/tech/20210131 How to teach open source beyond business.md diff --git a/translated/tech/20210131 How to teach open source beyond business.md b/translated/tech/20210131 How to teach open source beyond business.md deleted file mode 100644 index b1688ced71..0000000000 --- a/translated/tech/20210131 How to teach open source beyond business.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (duoluoxiaosheng ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to teach open source beyond business) -[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) -[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) - -商业之上是开源 -====== - -The Beyond Program 连接起未来科技行业的人才和开源文化。 - -![Teacher or learner?][1] - -那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我的职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。 - -所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个可能拥有很大的团队,并且分散在不同地方的正在进行中的项目。我还要学会正确的沟通以保证我付出点努力不白费。 - -我在这个行业并不优秀。我只是众多毕业生中的一员。 - -### 开源让毕业生点起点更高 - -作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。 - -通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。 - -开源在科技行业的价值是塑造并完善全球软件公司的文化。参与开源项目并采用[开放组织文化][2]正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖,才华横溢的员工。 -因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 - -### 商业之上是开源文化 - -当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] program,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 - -我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,而是向学生们展示了一套工业标准。 - -我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 - -在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础”中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。 我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。 - -![Beyond teaching online][7] - -(Irit Goihman, [CC BY-SA 4.0][8]) - -### 成果展示 - -这两个课程去得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程器件的开源贡献而得到了他们第一份技术工作。 - -其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。 - -很荣幸,在一群优秀工程师的参与下,与 Liora 一起领导这个成功的项目。我们一起助力开源社区的成长。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/open-source-beyond-business - -作者:[Irit Goihman][a] -选题:[lujun9972][b] -译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/iritgoihman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?) -[2]: https://opensource.com/open-organization/resources/open-org-definition -[3]: https://www.linkedin.com/in/lioramilbaum -[4]: https://www.devopsloft.io/ -[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/ -[6]: https://www.int.mta.ac.il/ -[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ From 43bfb57bb9c871b65f3392af1e78efe5f27de2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 9 Jun 2022 13:46:17 +0800 Subject: [PATCH 097/231] Translating --- ...ds Leap Micro 5.2, Updated Desktop Environments, and More.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md index 543a4d4dbd..fff90f5370 100644 --- a/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md +++ b/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 824c36252ed42721752b37847b116de2ab010693 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 9 Jun 2022 15:47:47 +0800 Subject: [PATCH 098/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220609=20Edit=20PDFs=20on=20Linux=20with=20these=20o?= =?UTF-8?q?pen=20source=20tools.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s on Linux with these open source tools.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20220609 Edit PDFs on Linux with these open source tools.md diff --git a/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md b/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md new file mode 100644 index 0000000000..c19cb5da59 --- /dev/null +++ b/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md @@ -0,0 +1,90 @@ + [#]: subject: "Edit PDFs on Linux with these open source tools" +[#]: via: "https://opensource.com/article/22/6/open-source-pdf-editors-linux" +[#]: author: "Michael Korotaev https://opensource.com/users/michaelk" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Edit PDFs on Linux with these open source tools +====== +Open source alternatives to Adobe Acrobat have all the necessary features for creating, editing, and annotating PDFs. + +![a checklist for a team][1] + +Image by: Opensource.com + +Open source reading and editing tools for PDFs are often more secure and reliable alternatives to the applications residing in the first pages of "PDF editor" search results. There, you're likely to see proprietary applications with hidden limitations and tariffs, lacking sufficient information about data protection policies and hosting. You can have better. + +Here are five applications that can be installed on your Linux system (and others) or hosted on a server. Each is free and open source, with all the necessary features for creating, editing, and annotating PDF files. + +### LibreOffice + +With the [LibreOffice][2] suite, your choice of application depends on the initial task. While LibreOffice Writer, a word processor, lets you create PDF files with export from text formats like ODF and others, Draw is better for working with existing PDF files. + +Draw is meant for creating and editing graphic documents, such as brochures, magazines, and posters. The toolset is therefore mainly focused on visual objects and layouts. For PDF editing, however, LibreOffice Draw offers tools for modifying and adding content in PDFs when the file has editing attributes. You can still add new text fields on the existing content layers and annotate or finish the documents if it doesn't. + +Draw and Writer are both bundled in a LibreOffice desktop suite available for installation on Linux systems, macOS, and Windows. + +### ONLYOFFICE Docs + +ONLYOFFICE has been improving work with PDFs for a while and introduced a brand new reader for PDFs and eBooks in version 7.1 of [ONLYOFFICE Docs][3]. + +The document editor allows creating PDF files from scratch using DOCX as a base for files that can then be converted to PDF or PDF/A. With built-in form-creation functionality, ONLYOFFICE Docs also makes it possible to build fillable document templates and export them as editable PDFs with fillable fields for different types of content: text, images, dates, and more. + +In addition to recognizing text within PDFs to copy and extract it, ONLYOFFICE Docs can convert PDFs to DOCX, which allows you to continue using the documents in fully editable text formats. ONLYOFFICE also lets you secure the files with passwords, add watermarks, and use digital signatures available in the desktop version. + +ONLYOFFICE Docs can be used as a web suite (on-premises or in the cloud) integrated into a document management system (DMS) or as a standalone desktop application. You can install the latter as a DEB or RPM file, AppImage, Flatpack, and several other formats for Linux. + +### PDF Arranger + +[PDF Arranger][4] is a front-end application for the PikePDF library. It doesn't edit the content of a PDF the way LibreOffice and ONLYOFFICE do, but it's great for re-ordering pages, splitting a PDF into smaller documents, merging several PDFs into one, rotating or cropping pages, and so on. Its interface is intuitive and easy to use. + +PDF Arranger is available for Linux and Windows. + +### Okular + +[Okular][5] is a free open source viewer for documents developed by the KDE community. The app features very mature functionality and allows viewing PDFs, eBooks, images, and comics. + +Okular has full or partial support for most popular PDF features and use cases, such as adding annotations and inline notes or inserting text boxes, shapes, and stamps. You can also add a digitally encrypted signature to your document so your readers can be sure of the document's source. + +In addition to adding texts and images in PDFs, it's also possible to retrieve them from the document to copy and paste somewhere else. The Area Selection tool in Okular can identify the components within a selected area so you can extract them from the PDF independently of one another. + +You can install Okular using your distribution's package manager or as a Flatpak. + +### Xournal++ + +[Xournal++][6] is a handwriting journal software with annotation tools for PDF files. + +Created to be notetaking software with enhanced handwriting features, it may not be the best option for working with text-based content and professional layouts. However, its ability to render graphics and support for stylus input in writing and drawing make it stand out as a niche productivity tool. + +PDF annotation and sketching are made comfortable with layer management tools, customizable pen point settings, and support for stylus mappings. Xournal++ also has a text tool for adding text boxes and the ability to insert images. + +Xournal++ has installation options for Linux systems (Ubuntu, Debian, Arch, SUSE), macOS, and Windows (10 and above). + +### Summary + +If you're looking for a free and safe alternative to proprietary PDF viewing and editing software, it is not hard to find an open source option, whether for desktop or online use. Just keep in mind that the currently available solutions have their own advantages for different use cases, and there's no single tool that is equally great at all possible tasks. + +These five solutions stand out for their functionality or usefulness for niche PDF tasks. For enterprise use and collaboration, I suggest ONLYOFFICE or LibreOffice Draw. PDF Arranger is a simple, lightweight tool for working with pages when you don't need to alter text. Okular offers great viewer features for multiple file types, and Xournal++ is the best choice if you want to sketch and take notes in your PDFs. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/open-source-pdf-editors-linux + +作者:[Michael Korotaev][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/michaelk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/checklist_hands_team_collaboration.png +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/20/12/onlyoffice-docs +[4]: https://flathub.org/apps/details/com.github.jeromerobert.pdfarranger +[5]: https://opensource.com/article/22/4/linux-kde-eco-certification-okular +[6]: http://xournal.sourceforge.net/ From 450608b6f3ce98ef09d0b1d4b44166a57e59d2bd Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 9 Jun 2022 15:49:58 +0800 Subject: [PATCH 099/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220609=20A=20guide=20to=20container=20orchestration?= =?UTF-8?q?=20with=20Kubernetes.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...container orchestration with Kubernetes.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sources/tech/20220609 A guide to container orchestration with Kubernetes.md diff --git a/sources/tech/20220609 A guide to container orchestration with Kubernetes.md b/sources/tech/20220609 A guide to container orchestration with Kubernetes.md new file mode 100644 index 0000000000..6050ced755 --- /dev/null +++ b/sources/tech/20220609 A guide to container orchestration with Kubernetes.md @@ -0,0 +1,137 @@ +[#]: subject: "A guide to container orchestration with Kubernetes" +[#]: via: "https://opensource.com/article/22/6/container-orchestration-kubernetes" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A guide to container orchestration with Kubernetes +====== +To learn all about container orchestration with Kubernetes, download our new eBook. + +![CC-BY-SA William Kenlon http://www.williamkenlon.com][1] + +Image by: William Kenlon. CC BY-SA 4.0 + +The term orchestration is relatively new to the IT industry, and it still has nuance that eludes or confuses people who don't spend all day orchestrating. When I describe orchestration to someone, it usually sounds like I'm just describing automation. That's not quite right. In fact, I wrote a whole article differentiating [automation and orchestration][2]. + +An easy way to think about it is that orchestration is just a form of automation. To understand how you can benefit from orchestration, it helps to understand what specifically it automates. + +### Understanding containers + +A container is an image of a file system containing only what's required to run a specific task. Most people don't build containers from scratch, although reading about [how it's done][3] can be elucidating. Instead, it's more common to pull an existing image from a public container hub. + +A container engine is an application that runs a container. When a container is run, it's launched with a kernel mechanism called a `cgroup`, which keeps processes within the container separate from processes running outside the container. + +### Run a container + +You can run a container on your own Linux computer easily with [Podman][4], [Docker][5], or [LXC][6]. They all use similar commands. I recommend Podman, as it's daemonless, meaning a process doesn't have to be running all the time for a container to launch. With Podman, your container engine runs only when necessary. Assuming you have a container engine installed, you can run a container just by referring to a container image you know to exist on a public container hub. + +For instance, to run an Nginx web server: + +``` +$ podman run -p 8080:80 nginx +10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf +10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf +[...] +``` + +Open a separate terminal to test it using [curl][7]: + +``` +$ curl --no-progress-meter localhost:8080 | html2text +# Welcome to nginx! + +If you see this page, the nginx web server is successfully installed and +working. Further configuration is required. + +For online documentation and support please refer to +[nginx.org](http://nginx.org/).   +Commercial support is available at [nginx.com](http://nginx.com/). + +_Thank you for using nginx._ +``` + +As web server installs go, that's pretty easy. + +Now imagine that the website you've just deployed gets an unexpected spike in traffic. You hadn't planned for that, and even though Nginx is a very resilient web server, everything has its limits. With enough simultaneous traffic, even Nginx can crash. Now what? + +### Sustaining containers + +Containers are cheap. In other words, as you've just experienced, they're trivial to launch. + +You can use systemd to make a container resilient, too, so that a container automatically relaunches even in the event of a crash. This is where using Podman comes in handy. Podman has a command to generate a systemd service file based on an existing container: + +``` +$ podman create --name mynginx -p 8080:80 nginx +$ podman generate systemd mynginx \ +--restart-policy=always -t 5 -f -n +``` + +You can launch your container service as a regular user: + +``` +$ mkdir -p ~/.config/systemd/user +$ mv ./container-mynginx.service ~/.config/systemd/user/ +$ systemctl enable --now --user container-mynginx.service +$ curl --head localhost:8080 | head -n1 +HTTP/1.1 200 OK +``` + +### Run pods of containers + +Because containers are cheap, you can readily launch more than one container to meet the demand for your service. With two (or more) containers offering the same service, you increase the likelihood that better distribution of labor will successfully manage incoming requests. + +You can group containers together in pods, which Podman (as its name suggests) can create: + +``` +$ systemctl stop --user container-myngnix +$ podman run -dt --pod new:mypod -p 8080:80 nginx +$ podman pod ps +POD ID     NAME   STATUS  CREATED  INFRA ID  # OF CONTAINERS +26424cc... mypod  Running 22m ago  e25b3...   2 +``` + +This can also be automated using systemd: + +``` +$ podman generate systemd mypod \ +--restart-policy=always -t 5 -f -n +``` + +### Clusters of pods and containers + +It's probably clear that containers offer diverse options for how you deploy networked applications and services, especially when you use the right tools to manage them. Both Podman and systemd integrate with containers very effectively, and they can help ensure that your containers are available when they're needed. + +But you don't really want to sit in front of your servers all day and all night just so you can manually add containers to pods any time the whole internet decides to pay you a visit. Even if you could do that, containers are only as robust as the computer they run on. Eventually, containers running on a single server do exhaust that server's bandwidth and memory. + +The solution is a Kubernetes cluster: lots of servers, with one acting as a "control plane" where all configuration is entered and many, many others acting as compute nodes to ensure your containers have all the resources they need. Kubernetes is a big project, and there are many other projects, like [Terraform][8], [Helm][9], and [Ansible][10], that interface with Kubernetes to make common tasks scriptable and easy. It's an important topic for all levels of systems administrators, architects, and developers. + +To learn all about container orchestration with Kubernetes, download our free eBook: **[A guide to orchestration with Kubernetes][11]**. The guide teaches you how to set up a local virtual cluster, deploy an application, set up a graphical interface, understand the YAML files used to configure Kubernetes, and more. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/container-orchestration-kubernetes + +作者:[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/sites/default/files/lead-images/kenlon-music-conducting-orchestra.png +[2]: https://opensource.com/article/20/11/orchestration-vs-automation +[3]: https://opensource.com/article/22/2/build-your-own-container-linux-buildah +[4]: https://opensource.com/article/18/12/podman-and-user-namespaces +[5]: https://opensource.com/business/14/8/docker-beginner-guide +[6]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[7]: https://opensource.com/article/20/5/curl-cheat-sheet +[8]: https://opensource.com/article/20/7/terraform-kubernetes +[9]: https://opensource.com/article/20/3/helm-kubernetes-charts +[10]: https://opensource.com/article/22/1/learn-ansible +[11]: https://opensource.com/downloads/guide-orchestration-kubernetes From 2aab23195ba0e0fa6d034ce1e23e4ceb678de242 Mon Sep 17 00:00:00 2001 From: aREversez <53844261+aREversez@users.noreply.github.com> Date: Thu, 9 Jun 2022 16:44:54 +0800 Subject: [PATCH 100/231] translated --- ...nstall FFmpeg in Ubuntu and Other Linux.md | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md index 58dcc9ab8d..633fe2b0ec 100644 --- a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md +++ b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md @@ -1,47 +1,47 @@ [#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" -[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/" +[#]: via: "https://www.debugpoint.com/2022/06/install-FFmpeg-ubuntu/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: "aREversez" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " -How to Install FFmpeg in Ubuntu and Other Linux +在 Ubuntu 等 Linux 发行版上安装 FFmpeg ====== -This tutorial outlines the steps required to install FFmpeg in Ubuntu and Other Linux systems. +本教程介绍了 FFmpeg 在 Ubuntu 及其他 Linux 发行版上的安装步骤。 -The ffmpeg is a collection library and software program to manipulate multimedia files. The entire ffmpeg is a robust set of libraries that allows you to convert, stream, and manipulate audio and video files. Many frontend Linux applications use it as backend hence depends on it. For example, a screen recording application may need ffmpeg to convert recorded streams to gif images. +FFmpeg 是一套处理多媒体文件的软件库。凭借这些强大的库,FFmpeg 能够转换格式、推流以及处理音频和视频文件。许多 Linux 的前端应用都使用 FFmpeg 作为后端支持,所以这些应用对 FFmpeg 的依赖度非常高。举个例子,录屏软件可能会用到 FFmpeg 将录屏转换为 gif 动图。 -Popular applications and services that use FFmpeg are VLC Media Player, YouTube, Blender, Kodi, Shotcut, and Handbrake – to name a few. +VLC 多媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等流行的应用与服务都在使用 FFmpeg。 -Fun fact: NASA’s Mars 2020 mission rover Perseverance used FFmpeg to complete and process images and video before beaming back to Earth! +趣事:NASA 火星 2020 计划的探测器“毅力”号在将图像和视频发送到地球之前,会先使用 FFmpeg 对其进行处理。 -### About ffmpeg package +### 关于 FFmpeg -The [ffmpeg][1] itself is a powerful program as a command-line utility. It is available for Linux, Windows, and macOS and supports many architectures. It is written in C and Assembly, providing extensive performance and a cross-platform utility. +[FFmpeg][1] 本身是一款非常强大的命令行实用程序,在 Linux 发行版、Windows 以及 macOS 等系统上均可运行,支持多种架构。FFmpeg 是用 C 语言和汇编语言编写的,性能强大,提供跨平台支持。 -#### The Core +#### 核心 -The core of ffmpeg is the command-line utility or programs. They can be used on the command line or called from any programming language. For example, you can use these from your shell program, python script, etc. +FFmpeg 的核心是命令行实用程序,既可在命令行上使用,也可以经由任何程序语言调用。比如,你可以在 Shell 程序或 python 脚本中使用 FFmpeg。 -* ffmpeg: Used to convert audio and video streams, including sources from LIVE streams such as TV cards -* ffplay: Media player bundled in this package to play media -* ffprobe: Command line tool to show media information – can output as txtm csv, xml, json formats +* FFmpeg: 用于转换音视频格式,包括视频直播资源。 +* ffplay: FFmpeg 配套使用的媒体播放器 +* ffprobe: 显示媒体文件信息的命令行工具,可将信息输出为 csv、xml、json 等格式。 -### FFmpeg Installation +### FFmpeg 安装 -Installing FFmpeg is easy in Ubuntu and other Linux distributions. Open a terminal prompt and run the following commands to install. +在 Ubuntu 等 Linux 发行版上, FFmpeg 的安装比较简单。打开终端,运行以下命令安装即可。 -#### Ubuntu and similar distro +#### Ubuntu 及与其相似的发行版 ``` -sudo apt install ffmpeg +sudo apt install FFmpeg ``` #### Fedora -For Fedora Linux, you need to add the [RPM Fusion repo][2] for FFmpeg. The official Fedora repo doesn’t have the FFmpeg package. +在 Fedora Linux 上安装 FFmpeg,你需要添加 [RPM Fusion 仓库][2],因为 Fedora 官方仓库没有 FFmpeg 软件包。 ``` sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm @@ -52,62 +52,62 @@ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfre ``` ``` -sudo dnf install ffmpeg +sudo dnf install FFmpeg ``` #### Arch Linux ``` -pacman -S ffmpeg +pacman -S FFmpeg ``` -After the successful installation, you can verify the installation using the below command. +安装完成后,可输入以下命令查看安装是否成功。 ``` -ffmpeg --version +FFmpeg --version ``` ![FFmpeg installed in Ubuntu Linux][3] -### Example: How to do basic tasks using ffmpeg +### 案例:FFmpeg 的基本操作 -First, let me give you a simple example of the basic syntax. Consider the following example. It simply converts an mp4 file to mkv file. +首先,我们先来看看 FFmpeg 语法的一个简单例子。如下,该语法可以将 mp4 文件转换为 mkv 文件。 -1. Convert a basic video file +1. 视频文件格式转换 ``` -ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv +FFmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv ``` -Of course, this is the easiest method, but it’s not complete because it doesn’t have the bit rate, resolution and other attributes of the video file required for the conversion. +当然,这种写法最为简单易懂,但它并不完整,因为没有输入 比特率bit rate分辨率resolution 以及其他的视频文件属性。 -1. Convert an audio file +2. 音频文件格式转换 -Secondly, you can convert an audio file using a similar command. +第二,输入与上面相似的命令可以转换音频文件的格式。 ``` -ffmpeg -i sunny_day.ogg sunny_day.mp3 +FFmpeg -i sunny_day.ogg sunny_day.mp3 ``` -1. Convert with an audio and video codec +3. 使用音视频 codec 执行格式转换 -Finally, the following example can convert a video file using specified codecs. The parameter `-c` with `a` or `v` defines audio and video, respectively. The below command uses `libvpx` video and `libvorbis` audio codec for conversion. +最后,在下面的例子中,我们可以使用特定的 编解码器codec 来转换视频格式。参数 `-c` 搭配 `a` 或者 `v`,可以分别定义音频和视频文件。以下转换命令使用 `libvpx` 视频编解码器和 `libvorbis` 音频编解码器。 ``` -ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm +FFmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm ``` -### How to find out about the available codecs, encoders and decoders in your system? +### 如何确定自己系统中有哪些编码器和解码器? -#### List all codecs +#### 显示所有编解码器 -To list all the codecs available, run the below command. +输入以下命令,打印所有编解码器。 ``` -ffmpeg -codecs +FFmpeg -codecs ``` -This command lists all the codecs available with their capability, whether they support decoding or encoding, etc. Moreover, they are identified with the position as per the below table. +该命令可以打印出所有可用的编解码器,并显示每个编解码器对应的功能信息,比如是否支持解码或编码。此外,如以下输出结果所示,打印出来的信息还会按照首字母顺序标注出每个编码器和解码器的位置。 ``` D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... = Audio codec..S... = Subtitle codec...I.. = Intra frame-only codec....L. = Lossy compression.....S = Lossless compression @@ -115,49 +115,49 @@ D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... ![FFmpeg Codec list][4] -#### List all encoders +#### 显示所有编码器 -Listing all the encoders is accessible via the below command. +输入下列命令,打印出所有编码器 ``` -ffmpeg -encoders +FFmpeg -encoders ``` -#### List all decoders +#### 显示所有解码器 -Similarly, the decoders list you can get via the below command. +同样,输入下列命令,打印出所有解码器。 ``` -ffmpeg -decoders +FFmpeg -decoders ``` -#### Details +#### 更多信息 -You can also get more details about the encoders or decoders using the parameter -h. +输入参数 `-h`,获取更多关于编码器或解码器的信息。 ``` -ffmpeg -h decoder=mp3 +FFmpeg -h decoder=mp3 ``` -### Summary +### 总结 -I hope you learned the basics of FFmpeg and its commands. You can learn more about the program via the official [documentation][5]. +我希望这篇文章可以帮助你了解 FFmpeg 的基本知识及基本命令。若要了解更多信息,可前往 FFmpeg 官方网站,浏览 [帮助文章Documentation][5]。 -------------------------------------------------------------------------------- -via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/ +via: https://www.debugpoint.com/2022/06/install-FFmpeg-ubuntu/ 作者:[Arindam][a] 选题:[lkxed][b] -译者:[aREversez](https://github.com/aREversez) +译者:[译者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://ffmpeg.org/ +[1]: https://FFmpeg.org/ [2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ [3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg [4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg -[5]: https://ffmpeg.org/documentation.html +[5]: https://FFmpeg.org/documentation.html From a09543bfde783697f9547ac516897571d4d12ebc Mon Sep 17 00:00:00 2001 From: aREversez <53844261+aREversez@users.noreply.github.com> Date: Thu, 9 Jun 2022 16:48:37 +0800 Subject: [PATCH 101/231] translated --- .../20220603 How to Install FFmpeg in Ubuntu and Other Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md (100%) diff --git a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md b/translated/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md similarity index 100% rename from sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md rename to translated/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md From 8b62e4299f9fb1a173a5214fd56bc9569dd94edc Mon Sep 17 00:00:00 2001 From: Donkey <58808837+Donkey-Hao@users.noreply.github.com> Date: Thu, 9 Jun 2022 18:53:52 +0800 Subject: [PATCH 102/231] Translated a news This is my first time translating in LCTT group. --- ...sed, Concluding ARM Generic Kernel Work.md | 101 ----------------- ...sed, Concluding ARM Generic Kernel Work.md | 103 ++++++++++++++++++ 2 files changed, 103 insertions(+), 101 deletions(-) delete mode 100644 sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md create mode 100644 translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md diff --git a/sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md b/sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md deleted file mode 100644 index 8f58b6aa8a..0000000000 --- a/sources/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: subject: "Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work" -[#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work -====== -Linus Torvalds releases Linux Kernel 5.19 RC1 for testing, bringing a vast amount of changes. - -Following the [Linux Kernel 5.18][1] release last month, Linus Torvalds announced the first release candidate availability of Linux Kernel 5.19. With this announcement, the official merge window of Linux Kernel 5.19 closes, meaning no new features are to be accepted unless it’s critical. - -A brief look at the new items in Linux Kernel 5.19 shows regular updates across CPU, GPU, networking, storage and core modules. In addition, the code cleanups, removal of obsolete hardware and continuous support for future chipsets are the highlight of this release. - -Without further introduction, let’s take a look at the new features. - -### Linux Kernel 5.19 – New Features (RC1) - -#### Processor - -First and foremost, Linux Kernel 5.19 begins [initial support][2]for the LoongArch CPU family. It is developed by the Chinese company [Loongson][3]. LoongArch CPUs are the general general-purpose, MIPS architecture-compatible microprocessors. Although the support is now available, you can not boot Linux in these CPUs because some code is still under review. And hopefully, they will be already in the 5.20 version. - -The new [Intel IFS driver lands][4] in this version which helps to detect hardware issues before deployment and after. It will help detect CPU faults at the circuit level at an early stage. - -The power management and thermal work have continued for the last couple of Kernel releases for Intel CPUs. And [this release][5] also is no exception. Firstly, the Intel Run-Time Average Power Limiting (RAPL) support was added for Raptor and Alder Lake family. Second, the P-state driver is improved to handle frequency variance and CPU based scaling support is added to the passive devfreq. - -While the thermal and power dominated Intel CPUs, AMD sees more performance updates in its own CPU families. Firstly, more updates were [introduced][6] in the Instruction-Based Sampling (IBS) module for AMD Zen 4 CPUs are planned for the end of this year. Moreover, PerfMonV2 is introduced in this release giving more performance monitoring capabilities. - -Furthermore, the a.out support is removed in this release. Also, the Renesas H8/300 CPU architecture support is removed as its obsolete by now. - -#### Major ARM update - -Finally, the mainline Linux Kernel can [support multiple ARM platforms][7] with this release. This is a big step in this version, which is heard in Linus’s opening note on this Rc1 release. This is a long process that started with Linux 3.7 and spanned more than a decade of work and patches. - -![Linux Kernel 5.19 Rc1 release announcement mentions ARM changes][8] - -#### Graphics and Storage Updates - -The storage subsystem sees performance improvements across popular file systems. The significant changes include Apple M1 NVMe controller support and better support for the XFS file system. In addition, enhancements arrive for Btrfs, F2FS and exFAT file systems. - -One of the exciting metrics in terms of LOC is Linux Kernel 5.19 adds around [half-million lines of code][9] for the Graphics driver alone. It includes graphics updates across AMD RDNA, CDNA, Intel’s Raptor Lake, Intel’s DG2/Alchemist and more. - -#### Important Networking Changes - -Looking at the massive growth in the data transmission, the support for Big TCP lands which helps the data centre traffic at a range of 400GBit. It also aims to give lower latency in high-performance networking environments. - -The Multi-Path TCP (MPTCP) continues its improvements. In addition to that, Qualcomm ath11k WiFi driver adds wake-on-lan support in this version. Also, support is added for Realtek 8852ce chipset, MediaTek T700 modems and Rensas RZ/V2M - -#### Other Notable Features - -Firstly, the famous random number generator in Kernel [continues][10] its improvements in this release. - -Second, the famous and emerging Framework Modular Laptop gets this release Chrome OS EC Driver support. The Framework laptop now can take advantage of ChromeOS’s embedded controller as a non-Chromebook device. - -Moreover, more updates arrive at Wacom tabs and other related devices. It [includes][11] improved support for Lenovo Thinkpad TrackPoint II, Google Whiskers Touchpad, Lenovo X12 TrackPoint, etc. - -### Linux Kernel 5.19 Download - -If you want to test and try this release candidate, download the release tarball [here][12]. Or refer below for a direct link to tar and diffs. - -| - | - | - | - | - | - | - | - | - | -| :- | :- | :- | :- | :- | :- | :- | :- | :- | -| mainline: | 5.19-rc1 | 2022-06-06 | [tarball][13] | | [patch][14] | | [view diff][15] | [browse][16] | - -There will be multiple kernel iterations until the final release, expected around July 2022. - -*[Via Kernel mailing list.][17]* - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/ - -作者:[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://www.debugpoint.com/2022/05/linux-kernel-5-18/ -[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e975804360665d973211e4d9390cb -[3]: http://www.loongson.cn/ -[4]: https://lore.kernel.org/lkml/13e61c61-0d4b-5f48-6373-f056bf8b603f@redhat.com/ -[5]: https://lore.kernel.org/linux-acpi/CAJZ5v0hKBt3js65w18iKxzWoN5QuEc84_2xcM6paSv-ZHwe3Rw@mail.gmail.com/ -[6]: https://lore.kernel.org/lkml/You6yGPUttvBcg8s@gmail.com/ -[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ecf0aa5317b0ad6bb015128a5b763c954fd58708 -[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Linux-Kernel-5.19-Rc1-release-announcement-mentions-ARM-changes.jpg -[9]: https://lore.kernel.org/lkml/CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com/ -[10]: https://lore.kernel.org/lkml/20220522214457.37108-1-Jason@zx2c4.com/T/#u -[11]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2205241107530.28985@cbobk.fhfr.pm/ -[12]: https://www.kernel.org/ -[13]: https://git.kernel.org/torvalds/t/linux-5.19-rc1.tar.gz -[14]: https://git.kernel.org/torvalds/p/v5.19-rc1/v5.18 -[15]: https://git.kernel.org/torvalds/ds/v5.19-rc1/v5.18 -[16]: https://git.kernel.org/torvalds/h/v5.19-rc1 -[17]: https://lore.kernel.org/lkml/CAHk-=wgZt-YDSKfdyES2p6A_KJoG8DwQ0mb9CeS8jZYp+0Y2Rw@mail.gmail.com/T/#u diff --git a/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md b/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md new file mode 100644 index 0000000000..07bd40ff4e --- /dev/null +++ b/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md @@ -0,0 +1,103 @@ +[#]: subject: "Linux Kernel 5.19 系列第一个候选版本(RC1)发布,包含 ARM 通用工作" +[#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " Donkey-Hao " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Kernel 5.19 系列第一个候选版本(RC1)发布,包含 ARM 通用工作 +====== +Linus Torvalds 发布了 Linux Kernel 5.19 RC1 进行测试,带来了重大变化。 + +继上个月 [Linux Kernel 5.18][1] 发布之后,Linus Torvalds 宣布 Linux Kernel 5.19 系列第一个候选版本可用。同时,Linux Kernel 5.19 官方合并窗口关闭,这意味着只有很关键的特性才会被接受。 + +简要介绍一下 Linux Kernel 5.19 的项目,会发现 CPU、GPU、网络、存储和核心模块会定期更新。 此外,代码清理、淘汰过时硬件和对以后芯片组的持续支持是此版本的亮点。 + +让我们简单来看一下这些新特性。 + +### Linux Kernel 5.19(RC1) 的新特性 + +#### 处理器 + +最重要的是,Linux Kernel 5.19 开始对龙芯架构 CPU 的 [初步支持][2]。龙芯由中国龙芯中科公司设计开发。龙芯架构下的 CPU 是通用 MIPS 架构兼容微处理器。尽管现在提供了支持,但是你仍不能在龙芯 CPU 上启动 Linux 因为一些代码还在审核中。希望在 5.20 版本中能够使用。 + + +[Intel IFS 驱动 ][4] 在该版本中落地,这有助于在部署前后发现硬件问题。它能够在早期发现 CPU 关键部分的错误。 + + +电源管理和散热工作在英特尔 CPU 的最后几个内核版本中继续进行。 在 [这个版本][5] 也不例外。首先,为 Raptor 和 Alder Lake 家族添加了英特尔运行时平均功率限制(RAPL)的支持。其次,为了处理频率变化升级了 P-state 驱动,并且基于 CPU 的缩放支持被添加到被动的 devfreq 中。 + + +虽然散热和供电主导着英特尔 CPU ,但 AMD 看到了自己 CPU 系列更多的性能更新。首先,计划在今年年底完成 ZMD Zen 4 CPUs 的 Instruction-Based Sampling (IBS) 模块的很多更新。此外,此版本引入了 PerfMonV2 ,提供了更多性能监视能力。 + +此外,该版本中移除了 a.out 支持。同样,过时的 Renesas H8/300 CPU 也被移除了。 +#### 主要 ARM 更新 + +最后,主线 Linux Kernel 能够 [支持多个 ARM 平台][7]。在 Linus 的 RC1 开场白中可以看到,这是此版本中的巨大改变!从 Linux 3.7 开始跨越了十多年的工作,这是多么漫长的过程。 + +![Linux Kernel 5.19 Rc1 发布公告提到了 ARM 更改][8] + +#### 图像和存储升级 + +存储子系统实现了跨越流行文件系统的性能提升。最主要的变化包括苹果 M1 NVMe 控制器支持和对 XFS 文件系统的更好支持。此外,提升了 Btrfs , F2FS 以及 exFAT 文件系统。 + +关于 LOC 有一个令人兴奋的指标是仅图像驱动程序, Linux Kernel 5.19 增加了大约[50 万行代码][9] 。包括 AMD RDNA, CDNA, 英特尔的 Raptor Lake, DG2/Alchemist 等图形架构更新。 + +#### 重要的网络变化 + +鉴于数据传输大幅增长,对 Big TCP 的支持有助于数据中心流量达到 400 GBit 的范围。它还可以在高性能网络环境中降低延迟。 + +继续改进了 Multi-Path TCP (MPTCP) 。此外,高通 ath11k WiFi 驱动程序在此版本中添加了网络唤醒功能。同样增加了对瑞昱的 8852ce 芯片,联发科的 T700 调制解调器以及瑞萨科技的 RZ/V2M 的支持。 + +#### 其他值得注意的功能 + +首先,内核中著名的随机函数生成器在此版本中 [继续][10] 改进。 + +其次,著名的初创公司 Framework 模块化笔记本电脑获得了此版本 Chrome OS EC 驱动支持。 Framework 笔记本现在可以利用 ChromeOS 的嵌入式控制器作为 non-Chromebook 设备。 + +此外, Wacom 绘画板以及其他相关设备也有众多更新。 [包括][11] 对联想 Thinkpad TrackPoint II, 谷歌 Whiskers Touchpad, 联想 X12 TrackPoint 等设备支持的提升。 + +### Linux Kernel 5.19 下载 + +如果你想要测试并尝试该候选版本,可以在 [这里][12] 下载。或者参考下面的链接。 + +| - | - | - | - | - | - | - | - | - | +| :- | :- | :- | :- | :- | :- | :- | :- | :- | +| mainline: | 5.19-rc1 | 2022-06-06 | [tarball][13] | | [patch][14] | | [view diff][15] | [browse][16] | + +预计在2022年7月左右最终版本发布前,将会有多个版本更迭。 + +*[Kernel 邮件列表.][17]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[校对者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://www.debugpoint.com/2022/05/linux-kernel-5-18/ +[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e975804360665d973211e4d9390cb +[3]: http://www.loongson.cn/ +[4]: https://lore.kernel.org/lkml/13e61c61-0d4b-5f48-6373-f056bf8b603f@redhat.com/ +[5]: https://lore.kernel.org/linux-acpi/CAJZ5v0hKBt3js65w18iKxzWoN5QuEc84_2xcM6paSv-ZHwe3Rw@mail.gmail.com/ +[6]: https://lore.kernel.org/lkml/You6yGPUttvBcg8s@gmail.com/ +[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ecf0aa5317b0ad6bb015128a5b763c954fd58708 +[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Linux-Kernel-5.19-Rc1-release-announcement-mentions-ARM-changes.jpg +[9]: https://lore.kernel.org/lkml/CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com/ +[10]: https://lore.kernel.org/lkml/20220522214457.37108-1-Jason@zx2c4.com/T/#u +[11]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2205241107530.28985@cbobk.fhfr.pm/ +[12]: https://www.kernel.org/ +[13]: https://git.kernel.org/torvalds/t/linux-5.19-rc1.tar.gz +[14]: https://git.kernel.org/torvalds/p/v5.19-rc1/v5.18 +[15]: https://git.kernel.org/torvalds/ds/v5.19-rc1/v5.18 +[16]: https://git.kernel.org/torvalds/h/v5.19-rc1 +[17]: https://lore.kernel.org/lkml/CAHk-=wgZt-YDSKfdyES2p6A_KJoG8DwQ0mb9CeS8jZYp+0Y2Rw@mail.gmail.com/T/#u From 8f61c980ac54cb4248d9e24131107817f6c1cd06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 9 Jun 2022 19:32:18 +0800 Subject: [PATCH 103/231] Transalted --- ... Updated Desktop Environments, and More.md | 99 ------------------- ... Updated Desktop Environments, and More.md | 99 +++++++++++++++++++ 2 files changed, 99 insertions(+), 99 deletions(-) delete mode 100644 sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md create mode 100644 translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md diff --git a/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md deleted file mode 100644 index fff90f5370..0000000000 --- a/sources/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More" -[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More -====== -openSUSE Leap 15.4 is here to catch up with SUSE Linux Enterprise Service Pack 4 with new upgrades, and essential improvements. - -![opensuse 15.4][1] - -The upcoming openSUSE minor release is finally here. If you use OpenSUSE as your daily driver for desktop or server, you might have already tested the release candidate version available for a couple of weeks now. - -The openSUSE Leap 15.4 focuses on software package updates to match the SUSE Linux Enterprise 15 Service Pack 4. So, you will notice several deprecated packages, and new upgrades available to replace them. - -Of course, you should have some packages available to ensure compatibility. But, most of the older ones have been removed. - -### openSUSE Leap 15.4: What’s New? - -To match the latest SUSE Linux Enterprise (SLE), packages like Python 2 and KDE 4 have been removed. You can find newer desktop environments with this release. - -Furthermore, for containers and AI/ML use-cases, podman, containerd, Tensorflow,and Grafana have been updated. - -#### Leap Micro 5.2 - -Leap Micro is the latest version of its lightweight operating system tailored for container and virtualized workloads. It is a new offering of [MicroOS][2] for Leap, which is a variant of Tumbleweed, providing automated administration and patching. - -#### Desktop Environments - -Xfce 4.16 is here to stay, but you can find additions for new major features that include new icons, and palettes. - -The settings manager in Xfce 4.16 also received a visual refresh. Similarly, there were some improvements to file manager (Thunar), dark mode support for a new status tray plugin, and more. - -KDE 4 packages have been dropped, Plasma 5.24 LTS has been included as an LTS release. - -To explore the changes, you can check out our original coverage for [KDE Plasma 5.24 LTS][3]. Overall, the new KDE Plasma experience should be impressive for desktop users. - -When it comes to GNOME, you can find GNOME 41 included with Leap 15.4 with a range of improvements and new features. Learn more about [GNOME 41][4] to know what you can expect. - -For other available desktop environments, Leap 15.4 includes: - -* MATE 1.26 -* Enlightenment 0.25.3 -* Deepin Desktop Environment 20.3 - -#### Dropped Packages - -Some essential packages removed include python 2 (end of life), digikam, tensorflow 1.x, and Qt 4 packages. - -You will find Qt 5 and Plasma 5 available to update the system. - -#### Updated Packages - -Many vital packages have been updated for Leap 15.4, some of the popular ones include: - -* TensorFlow 2.6.2 -* podman 3.4.4 -* GNU Health 4.0 -* sudo 1.9.9 -* systemd 249.10 -* AppArmor 3.04 -* DNF 4.10.0 -* LibreOffice 7.2.5 - -So, you should notice useful upgrades for both server users and desktop users with various application updates. Many multimedia applications like VLC, and GNOME MPV have also received upgrades. - -#### Other Improvements - -Along with essential updates, and clean up, you can also find a newer Linux Kernel 5.14.21 maintained by SUSE. - -The hardware support should see an improvement with the updated kernel. - -For more information, you can refer to the release notes for [openSUSE Leap 15.4][5]. - -[Download openSUSE Leap 15.4][6] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/opensuse-leap-15-4-release/ - -作者:[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/06/opensuse-leap-15-4.jpg -[2]: https://microos.opensuse.org/ -[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ -[4]: https://news.itsfoss.com/gnome-41-release/ -[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes -[6]: https://get.opensuse.org/leap/15.4/ diff --git a/translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md new file mode 100644 index 0000000000..c6ab275f1c --- /dev/null +++ b/translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md @@ -0,0 +1,99 @@ +[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More" +[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +openSUSE Leap 15.4 发布版本添加了 Leap Micro 5.2、更新桌面环境等等 +====== +为奋起直追 SUSE Linux Enterprise 的 Service Pack 4 ,openSUSE Leap 15.4 到来了,带来了新的升级和极其重要的改善。 + +![opensuse 15.4][1] + +即将到来的 openSUSE 小发布版本终于要来了。如果你使用 OpenSUSE 作为你日常驱动的桌面或服务器版本,你现在可能已经测试候选版本好几周了。 + +openSUSE Leap 15.4 专注于软件包的更新,用以奋起直追 SUSE Linux Enterprise 的 Service Pack 4 。因此,你将注意到一些弃用的软件包,以及可用于替换它们的新的升级。 + +当然,你应该有一些可用的软件包来确保兼容性。但是,大多数较旧的版本已经被移除。 + +### openSUSE Leap 15.4: 有什么新的变化? + +为与最新的 SUSE Linux Enterprise (SLE) 相适应,像 Python 2 和 KDE 4 一样的软件包已经被移除。你可以在这次的发布版本中找到较新的桌面环境。 + +此外,在容器和 AI/ML 用例方面,更新 podman、containerd、Tensorflow 和 Grafana。 + +#### Leap Micro 5.2 + +Leap Micro 是针对容器和虚拟化工作负载定制的轻量级操作系统的最新版本。它也是一个针对 leap 的 [MicroOS][2] 的新作品,它是 Tumbleweed 的一种变体, 提供自动地管理和修补。 + +#### 桌面环境 + +Xfce 4.16 继续保留,但是你可以找到下一个主要版本中的一些的特色功能,包括新图标和调色板。 + +在 Xfce 4.16 中的设置管理器也获得了视觉上的刷新。类似地,文件管理器 (Thunar) 也有一些改善,暗黑模式支持一个新的状态托盘插件等等。 + +KDE 4 软件包已经被弃用,Plasma 5.24 LTS 已经包含在一个 LTS 发布版本中。 + +为探索这些更改,你可以查看我们针对 [KDE Plasma 5.24 LTS][3] 的原始的新闻报道。总得来说,新的 KDE Plasma 体验应该会令桌面用户赞叹。 + +当它来到 GNOME 时,你可以发现包含在 openSUSE Leap 15.4 中的 GNOME 41 带来了一系列的改善和新的特色功能。了解更多关于 [GNOME 41][4] 的信息来知道你可以期待哪些新的特色功能。 + +对于其它的可用的桌面环境来说,Leap 15.4 包括: + +* MATE 桌面环境 1.26 +* Enlightenment 桌面环境0.25.3 +* 深度Deepin 桌面环境 20.3 + +#### 弃用的软件包 + +一些极其重要的软件包已经被移除,包括 python 2 (生命终结)、digika、tensorflow 1.x 和 Qt 4 等软件包。 + +在更新系统后,你将找到可用的 Qt 5 和 Plasma 5 。 + +#### 更新的软件包 + +针对 Leap 15.4 更新了很多重要的软件包, 包含一些流行的软件包: + +* TensorFlow 2.6.2 +* podman 3.4.4 +* GNU Health 4.0 +* sudo 1.9.9 +* systemd 249.10 +* AppArmor 3.04 +* DNF 4.10.0 +* LibreOffice 7.2.5 + +因此,你应该会注意到一些有用的针对服务器用户和桌面用户的各种各样的应用程序的更新的升级。很多多媒体应用程序,像 VLC、GNOME MPV 等,都接受到了升级。 + +#### 其它改善 + +随着极其重要的软件的更新和清理,你也可以找到一个较新的由 SUSE 维护的 Linux 内核 5.14.21 版本。 + +随着内核的更新,硬件的支持也会带来改善。 + +更多信息,你可以参考针对 [openSUSE Leap 15.4][5] 的发布版本说明。 + +[下载 openSUSE Leap 15.4][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/opensuse-leap-15-4-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者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/06/opensuse-leap-15-4.jpg +[2]: https://microos.opensuse.org/ +[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[4]: https://news.itsfoss.com/gnome-41-release/ +[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes +[6]: https://get.opensuse.org/leap/15.4/ From f04fa6ce81c8fc08047f01f6c5f22c6acadd2c97 Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 9 Jun 2022 20:17:36 +0800 Subject: [PATCH 104/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220609=20Atom=20Text=20Editor=20Will=20Officially=20?= =?UTF-8?q?Be=20Terminated=20Later=20This=20Year.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...fficially Be Terminated Later This Year.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md diff --git a/sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md b/sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md new file mode 100644 index 0000000000..94ecc00027 --- /dev/null +++ b/sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md @@ -0,0 +1,41 @@ +[#]: subject: "Atom Text Editor Will Officially Be Terminated Later This Year" +[#]: via: "https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Atom Text Editor Will Officially Be Terminated Later This Year +====== +![github-cover][1] + +On December 15, Microsoft’s GitHub will shut down Atom, its open source text editor that inspired and influenced widely used commercial apps such as Microsoft Visual Studio Code, Slack, and GitHub Desktop. The social code company stated that it is doing so to focus on cloud-based software. + +GitHub Codespaces is a cloud-hosted development environment with Visual Studio Code integration. When Microsoft acquired Github in June 2018, Nat Friedman, the CEO at the time, reassured the GitHub community that Atom was still alive and well. + +Atom has come to a halt after four years of progress. Apart from maintenance and security updates, the project hasn’t seen significant feature development in several years, according to GitHub. Community involvement has declined during this time, and the business of locally installed software now appears less appealing than the potential recurring revenue, vendor lock-in, and information gathering enabled by cloud-based apps. + +The Atom shell – a separate component for integrating with Chromium, Node.js, and native APIs – was renamed Electron (a cross-platform app framework based on web tech) in 2015, and Microsoft began working with GitHub on Atom and Electron and what would become Visual Studio Code. + +That relationship has now followed the famous Microsoft model of embrace, extend, and extinguish, though Atom’s demise appears to be more like pushing dead weight out of a cloud-bound balloon than a strategically advantageous hit. + +Atom’s influence should be felt through the Electron framework. Electron.js is still the foundation for apps such as Discord, Skype, Slack, Trello, and Visual Studio Code, among others. However, technology evolves. Microsoft previously stated that it intends to abandon Electron in Teams. Other cross-platform frameworks, such as Flutter, Tauri, and Microsoft’s recently announced.NET Multi-platform App UI (.NET MAUI), may gain traction as well. + +Nonetheless, Atom is expected to operate past its December 15, 2022 decommissioning date. GitHub intends to archive the Atom repository, but the code is open source and available to anyone who wants to champion the project. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/ + +作者:[Laveesh Kocher][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/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/github-cover-e1654769639273.jpg From 6a763c4b83b2138e5d2d620adfc34e5f6b43a874 Mon Sep 17 00:00:00 2001 From: Donkey <58808837+Donkey-Hao@users.noreply.github.com> Date: Thu, 9 Jun 2022 20:22:44 +0800 Subject: [PATCH 105/231] Update 20210319 Create a countdown clock with a Raspberry Pi.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申领原文 --- .../20210319 Create a countdown clock with a Raspberry Pi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md b/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md index bc376bd374..6b042c6d86 100644 --- a/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md +++ b/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock) [#]: author: (Chris Collins https://opensource.com/users/clcollins) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: ( Donkey-Hao ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 34aedd6b1fdaa1aaa87cd22dac4bc1a1d4fbd33b Mon Sep 17 00:00:00 2001 From: lkxed Date: Thu, 9 Jun 2022 20:32:44 +0800 Subject: [PATCH 106/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020220609=20SSL=20Certificates-=20=20Make=20the=20Right?= =?UTF-8?q?=20Choice.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...SL Certificates- Make the Right Choice.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sources/talk/20220609 SSL Certificates- Make the Right Choice.md diff --git a/sources/talk/20220609 SSL Certificates- Make the Right Choice.md b/sources/talk/20220609 SSL Certificates- Make the Right Choice.md new file mode 100644 index 0000000000..7f66bd67f9 --- /dev/null +++ b/sources/talk/20220609 SSL Certificates- Make the Right Choice.md @@ -0,0 +1,120 @@ +[#]: subject: "SSL Certificates: Make the Right Choice" +[#]: via: "https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/" +[#]: author: "Jitendra Bhojwani https://www.opensourceforu.com/author/jitendra-bhojwani/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +SSL Certificates: Make the Right Choice +====== +Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers’ data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation. + +![SSL-certificate][1] + +*Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers’ data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation.* + +SSL certificates are an apt solution for securing data in transit. They create an automated mechanism to encrypt the transfer of data between the server and browser (or site and visitor). This encryption can only be decrypted by the intended system. So it discourages hackers from stealing data, and offers complete security against transit attacks on it. + +Along with securing communication, SSL certificates also build trust with customers and help you emerge as a credible business by displaying virtual trust icons like a padlock, HTTPS prefix, and a green address bar. So let’s learn about the major types of SSL certificates and how to choose the one that works best for you. + +### SSL certificate options: Similarities and differences + +Let’s first discuss the basic similarity all SSL certificates share. Regardless of their type, price and scope, every SSL certificate encrypts the to-and-fro communication between the site’s server and the Internet browser of your visitor. + +The difference lies in the terms and conditions of the validation process and the number of domains/subdomains it covers, etc. Proceeding to purchase an SSL certificate without first reviewing your present and future needs may result in costly mistakes, and you may end up paying a hefty amount for advanced features that are irrelevant to your business. Or you may get tempted to buy a cheap certificate that isn’t a perfect fit for your business needs. +Due to the crucial role it plays, an SSL certificate is issued by an official certificate authority after a thorough verification procedure to confirm the legitimacy of ownership. So, this certificate not only encrypts the communication between websites and audiences, but also ensures the legal position of a site. It plays a vital role in building trust. + +As you have now understood why we need a SSL certificate, we can discuss the different types of popular SSL certificates, along with their benefits and issuance procedures. + +### Domain validation (DV) SSL certificate + +The most basic of the three types of SSL certificates, the DV or domain validation certificate confirms the ownership of a domain through an automated online process. All you have to do is to complete a few basic steps to prove that you are the legitimate owner of the domain to get this certificate. Though easiest to get, this type of certificate helps in building only a basic level of trust. + +After completing the DV certification procedure, you are allocated trust-building visual elements — a static seal, a padlock icon, and an HTTPS prefix in your URL. + +Cheapest prices and quick, automated processes are the two major benefits of a DV certificate. On the flip side, you get only the basic trust signs that aren’t enough to satisfy the security concerns of more demanding customers or visitors. + +*Important to know:* DV misses the most important trust sign — vetting the real, legal business that owns the domain name. For instance, suppose Mr X buys a domain ‘abc.com’ to lure gullible people into investing money in a business that seems genuine. Being a legitimate domain owner, he can get a DV through an automated process. With HTTPS URLs and other trust signs, it is easy to gain people’s trust too. However, the company (or fraud mechanism) behind this domain isn’t vetted/verified, which makes it easier for Mr X to continue duping investors of their hard-earned money. + +Is DV SSL the right choice for you?: DV is best for a small and general website, which doesn’t demand or require any sensitive information that can be misused like credit card numbers, social security information, or details of a financial portfolio. For websites that post children’s stories, general e-magazines, personal blogs, professional portfolios, and other static websites on general topics, a DV certificate is a perfect and cheap solution. Securing more mission-critical sites that collect sensitive data like credit card numbers and social security details is a different story though. + +### Organisation validation (OV) SSL certificate + +As the name suggests, the OV certificate not only validates the domain ownership but also vets the real identity of the organisation to which the domain officially belongs. It builds an extra layer of trust for visitors who have stronger concerns, by displaying the key information about the business. Interested visitors just need to check the details of the certificate to ascertain the credibility of the company. + +As compared to a DV certificate, an OV certification requires a more detailed process carried out by an authorised certificate authority that demands and vets key documents representing the legal status of the company. Hence, along with domain ownership, this certificate also assures that it is owned by a legitimate organisation. + +Though the issuance process is more expensive and demanding, this type of certificate does empower you to position your company as a legal, real company doing legitimate business. It makes you stand out and even more concerned visitors are able to trust your organisation. + +Is OV the right choice for you?: Sites that ask for sensitive data that can be misused by threat actors should obtain this certificate. E-commerce sites with online payment gateways, digital health practitioners, government websites that demand citizens’ information, defence-related websites, online trading platforms, or professional networking sites are all the right candidates for obtaining an OV certificate. + +### Extended validation (EV) SSL certificate + +In the digital domain, visuals matter a lot. A company seal, security icons, or even assuring colours (like green) can go a long way in leaving a lasting impression, winning you a big deal or helping you forge business relations with dynamic brands. + +The vetting procedure for issuing an EV SSL certificate is quite stringent and involves a manual process as well. It starts by verifying the ownership of the domain. After that, the certification authority asks for your identification number. Next, it gets your legal working contact number from relevant authentic sources. That contact number is manually verified by calling your office and talking with the real person. Only after satisfying all such verification parameters can you get the EV certificate. + +Unlike an OV certificate, you don’t just get a static site seal with a basic look, but get dynamic seals as well. Additionally, the full legal company name is displayed in the address bar along with a green-coloured padlock. Added to this, the entire address bar turns green as soon as your site loads. All these visible signs vouch for the legality of your firm, build a ‘visual comfort zone’ and reaffirm the credibility of your organisation. + +Such certificates satisfy the sophisticated digital security vetting parameters of global brands and corporate conglomerates. If highly expensive items like gold and diamond jewellery are being sold on a website, then such superior trust factors satisfy the higher trust demands of buyers. Though this certificate is the most expensive among all the SSL certificates, it is worth investing in the extra dollars as it has the potential to significantly boost your sales revenue. + +### Scope of different SSL certificates + +Apart from the type of certificate, the other crucial question is: how many digital properties you want your certificate to cover? If you own a single domain property and do not want to expand in the foreseeable future, then a single DV would do for you. But what if you own, say, 20 different domains — most of which deal with e-commerce or collect sensitive client information? It wouldn’t be practical to buy the more expensive EV certificate for each of these domains. Here is some guidance on that. + +### Wildcard SSL certificate + +With a single wildcard SSL certificate you can protect the main domain and practically unlimited sub-domains related to it. For instance, yoursite.com (the main domain) may have three subdomains: + +* mail.yoursite.com +* login.yoursite.com +* ftp.yoursite.com + +This certificate relieves you from the stress and expenses of purchasing a separate certificate for every domain after going through the complete validation process, followed by an installation process for each. It also saves you a lot of time on repetitive processes and almost eliminates potential errors. + +| - | +| :- | +| Note: Both DV and OV offer wildcard certificate options. | + +### Multi-domain (or SAN SSL) certificate + +One level above the wildcard SSL certificate is the multi-domain certificate, which helps to secure primary domains and their related subdomains. It does everything that a wildcard certificate can do, and more. If you own multiple domains and want a uniform and standard SSL security for all, then a multi-domain certificate is the right choice for you. + +### Is SSL certification only about visual trust signs? + +Obviously, when you spend significant money on an SSL certificate you would like to get more than security icons or trust signals. Well, your certification authority does offer a specific amount of warranty or a payback if your customers become victims of a fraud. The amount of this warranty depends upon the type of certificate and how much it costs. + +### How to choose the ideal certificate authority (CA) for SSL + +The next question is: who can judge the judge? It is you. Carefully consider some of the prime factors while finding the right SSL certificate provider/CA for your site. Before buying any certificate, thoroughly vet the reputation, credentials and experience of the certificate authority. + +Also, ask questions. Do they have a credible history? What type of customers do they have in their repertoire? Do they have an impressive portfolio of regular customers? Most importantly, is the company passively following old industry standards, or is it actively investing in research and development on how to prevent the latest cyber frauds? All such questions will help you to make informed decisions and get the best value for your money. + +Also make another very important check: Has any major browser banned the CA? The very objective of the SSL certificate is defeated if the CA has been banned by a major browser. + +### How long does it take for an SSL certificate to be issued? + +The time taken to issue a certificate varies and depends upon the validation procedure and its requirements. A DV certificate, for instance, is issued within minutes as it has the least verification requirements. An OV SSL, with more detailed vetting requirements, can take up to three days for issuance. Since it has the most demanding vetting process, the EV certificate can take up to four days for issuance. + +The validation period of the certificate, along with its credibility and scope, plays an important role in influencing its price. It is always best to use your discretion, and find a fine balance between the price and value of the certificate. + +A few reputed SSL certificates go the extra mile and also offer extra security measures to customers. You can never be secure enough on a digital platform. So it is always best to see if such additional security elements will be helpful. However, your prime focus should be the credibility and portfolio of the company. It isn’t wise to compromise with that just to get some extra security elements. + +SSL certificates encrypt the data and information that customers share with organisations. They help to save customers from data theft and misuse by threat actors. But it’s always advisable to check the credibility and reviews of a certificate authority carefully before buying a SSL certificate from it. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/ + +作者:[Jitendra Bhojwani][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/jitendra-bhojwani/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/SSL-certificate.jpg From 29ad27d2cfe5a8b4f421cc1bfb3d06637a155340 Mon Sep 17 00:00:00 2001 From: aREversez <53844261+aREversez@users.noreply.github.com> Date: Thu, 9 Jun 2022 23:39:20 +0800 Subject: [PATCH 107/231] Being translated --- ... Enterprises Use and Contribute to Open Source Software.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md b/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md index 1de91d1449..939f7865be 100644 --- a/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md +++ b/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/" [#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "aREversez" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -97,7 +97,7 @@ via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-so 作者:[Dan Whiting][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[aREversez](https://github.com/aREversez) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 78c78c9263e56fd7789ebc4a7715f35e62c5aa68 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Jun 2022 05:02:41 +0800 Subject: [PATCH 108/231] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220609=20?= =?UTF-8?q?Cloudflare=20Has=20Something=20New=20to=20Replace=20Annoying=20?= =?UTF-8?q?CAPTCHAs=20on=20the=20Internet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md --- ...place Annoying CAPTCHAs on the Internet.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md diff --git a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md new file mode 100644 index 0000000000..a5cc2dafe7 --- /dev/null +++ b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md @@ -0,0 +1,85 @@ +[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet" +[#]: via: "https://news.itsfoss.com/cloudflare-pat/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet +====== + +Cloudflare, the internet services giant, has [just announced][1] Private Access Tokens. These aim to reduce the number of CAPTCHAs you see on the web while improving your privacy. + +As you may have found out, CAPTCHAs are a horrible experience on mobile. They often end up occupying the entire screen and can be impossible to complete at times. + +As an alternative, websites can elect to collect uniquely identifying data to prove that you are a human. Of course, from a privacy standpoint, this practice is terrible, leaving many privacy-valuing companies with little to prevent them from bot attacks. + +Fortunately, the release of Private Access Tokens, or PATs, is set to change this. + +### What Impact Will Private Access Tokens Have? + +In short, PATs will: + + * Reduce the number of CAPTCHAs on supported devices + * Increase user privacy + * Allow website owners to ensure that visitors are coming from actual devices + + + +However, diving in a little deeper, we can see that PATs are much more impactful than at first glance. With traditional CAPTCHAs, there are multiple entities that can access your data. + +Firstly, the website you are visiting knows your IP address and the URL you are visiting. Of course, this data is the minimum required to establish a connection. Additionally, for more advanced functionality, websites are also sent some user agent data, which is not uniquely identifiable. + +However, the second party, the CAPTCHA provider, can collect a lot more data. Like with the website you want to visit, it knows your IP address, user agent data, and the URL you visit. Unfortunately, they also collect additional data, like your device information and interaction data. When tied back with previous times you have completed a CAPTCHA, they can build up an astonishingly detailed profile of you. + +Fortunately, PATs by Cloudflare prevent such data from being collected, by ultimately bypassing the CAPTCHA altogether. + +### How Do PATs Work? + +![Image credit: Cloudflare][2] + +Unlike the CAPTCHA method of aggregating as much data as possible, PATs decentralize the data so that no single party can uniquely identify you. Before you mention data sharing, Cloudflare has specifically mentioned that data is not shared between parties. + +When you go on to a website utilizing Cloudflare and PATs, a total of three parties will handle different portions of your data. + + 1. The website. This will only know your IP, URL, and user agent, which again, is required for establishing a connection. + 2. Your device manufacturer. This will only know the device data required to verify that your device is genuine. They will NOT know what website you are visiting, or your IP address. After verifying your device, they will generate a token, which will be sent to Cloudflare. + 3. Cloudflare. Cloudflare will receive the token, which does not contain any of your device data, only a ‘guarantee’ of sorts from the manufacturer that it is genuine. The only other data they know is the website you are visiting, which is required to serve you the content. + + + +The result of this is a system that gives Cloudflare confidence in you being a human, without ever having to touch your data. + +### Supported Operating Systems: No Linux? + +As you may have realized, PATs need specific operating system features to work. Currently, they are only present on the latest operating systems by Apple, namely iOS and iPadOS 16, as well as macOS Ventura. This is because Apple’s operating systems run on a limited set of hardware, making device verification significantly easier. + +Linux, on the other hand, is a general-purpose operating system designed to run on a wide range of hardware. As a result, I don’t expect to see it support PATs in the near future. + +Going back to Apple, it occurs to me that PATs could also cause some issues with consumers’ right to repair their devices. If, for example, I replaced a worn-out iPhone battery with a non-genuine one, would this be flagged by the PAT system? + +What about Linux Phones? Manufacturers of these, like Pine64 and Purism, may not have the infrastructure to support such a system. Will it be possible to use PATs on these? + +In the [announcement post][1], Cloudflare mentions: + +> We are actively working to get other clients and device makers utilizing the PAT framework as well. Any time a new client begins utilizing the PAT framework, traffic coming to your site from that client will automatically start asking for tokens, and your visitors will automatically see fewer CAPTCHAs. + +So, we hope to see it being adopted by more devices, and operating systems. What do you think about PATs by Cloudflare? Let me know your thoughts in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cloudflare-pat/ + +作者:[Jacob Crume][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://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY1MCIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ From 9e2c893ec26c4610f00d06e87cd83fcd453d1c25 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Jun 2022 05:02:51 +0800 Subject: [PATCH 109/231] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220609=20?= =?UTF-8?q?System76=20Hardware=20is=20Making=20its=20Way=20to=20Europe=20S?= =?UTF-8?q?oon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md --- ...rdware is Making its Way to Europe Soon.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md diff --git a/sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md b/sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md new file mode 100644 index 0000000000..aae786e98b --- /dev/null +++ b/sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md @@ -0,0 +1,63 @@ +[#]: subject: "System76 Hardware is Making its Way to Europe Soon" +[#]: via: "https://news.itsfoss.com/system76-europe/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +System76 Hardware is Making its Way to Europe Soon +====== + +System76’s [recent partnership with HP][1] for a developer-focused laptop made users think that it should enable users across the globe to get their hands on a laptop with Pop!_OS pre-installed. + +Unfortunately, the HP Dev One laptop is limited to U.S. customers as of now. But, it seems like you can expect System76 hardware to be available in Europe very soon. + +### System76 to Make its Mechanical Keyboard Available First + +As per an [interview][2] with System76’s principal engineer, Jeremy Soller, System76 has plans to come up with a distribution center for Europe in the coming months. + +Unfortunately, they will not be making laptops/desktops available. The process of minimizing shipping charges, taxes, and other stuff with computers needs time. + +Hence, they plan to start with the [Launch mechanical keyboard][3] and an upcoming Launch Lite edition by System76. + +![][4] + +Not to forget, Europe will need a different keyboard layout as well. So, you could be in for something comfortable as per your requirements. + +Note that the planned European distribution hub by System76 does not aim to make its collaborative projects available (like HP Dev On). It is most likely that they will be focusing on making their hardware available. + +However, no clarity has been provided on that front. So, you can expect System76 to expand to other regions, or they could improve their collaboration with laptop manufacturers to let more users experience Pop!_OS. + +### Wrapping Up + +If you cannot wait to get your hands on a System76 product, and you happen to live in the U.S. or Canada, you may want to explore the summer sale going on at [System76’s official website][5]. + +Europe’s customers need to wait for a couple of months to get System76’s Launch keyboard easily. + +Hopefully, the laptops/desktops get available in the near future. + +_Would you be willing to grab System76’s mechanical keyboard when it’s available for European users?_ _Share your thoughts in the comments below._ + +**Via:** [OMG!Ubuntu!][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/system76-europe/ + +作者:[Ankush Das][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://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/hp-dev-one-system76/ +[2]: https://tweakers.net/reviews/10108/jeremy-soller-van-system76-over-pop_os-de-cosmic-desktop-en-hardware.html +[3]: https://news.itsfoss.com/system76-launch-mechanical-keyboard/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MCIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ +[5]: https://system76.com/ +[6]: https://www.omgubuntu.co.uk/2022/06/system76-is-opening-a-european-distribution-center From aa78ee1e367bfa26e8505a441da68224b9d8502b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Jun 2022 08:42:37 +0800 Subject: [PATCH 110/231] translated --- ...o Recover Arch Linux Install via chroot.md | 118 ----------------- ...o Recover Arch Linux Install via chroot.md | 120 ++++++++++++++++++ 2 files changed, 120 insertions(+), 118 deletions(-) delete mode 100644 sources/tech/20210725 How to Recover Arch Linux Install via chroot.md create mode 100644 translated/tech/20210725 How to Recover Arch Linux Install via chroot.md diff --git a/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md b/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md deleted file mode 100644 index 36572fc15a..0000000000 --- a/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: subject: "How to Recover Arch Linux Install via chroot" -[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Recover Arch Linux Install via chroot -====== -This quick guide explains some of the steps which may come in handy to recover an Arch Linux Install. - -Being a rolling release, sometimes things breaks in [Arch Linux][1]. Not because of your own actions, but hundreds of other reasons such as new Kernel vs your hardware, or software compatibility. But still, Arch Linux is still better and provides the latest packages and applications. - -But sometimes, it gives you trouble and you end up with a blinking cursor and nothing else. - -So, in those scenarios, instead of re-formatting or reinstalling, you may want to try to recover the installation including the data before giving up your hope. This guide outlines some steps in that direction. - -### Recover Arch Linux Installation - -* First step is to create a bootable LIVE USB with Arch Linux. Download the .ISO from this link and create a bootable .ISO. You can check out this guide on [how to create bootable .ISO using Etcher][2]. Remember this step require another working stable system obviously as your current system is not usable. - -[download arch linux][3] - -* You need to know on which partition your Arch Linux is installed. This is a very important step. If you don’t know, you can use GParted to find out. Or check in your Grub menu, Or you can run the below command to find out. This will list all of your disk partitions with their size, labels. - -``` -sudo lsblk -o name,mountpoint,label,size,uuid -``` - -* Once done, plug-in the USB stick and boot from it. And you should see the Arch Linux prompt in the LIVE medium. - -* Now, mount to the Arch Linux partition using below. Change the /dev/sda3 to your respective partition. - -``` -/dev/sda3 -``` - -``` -mount /dev/sda3 /mntarch-chroot /mnt -``` - -* The arch-chroot command will mount your Arch Linux partition in the terminal, so login using your Arch credentials. Now, at this stage, you have the following options, based on what you want. - -* You can take backups of your data by going through /home folders. In case, troubleshooter doesn’t work. You may copy the files to external USB or another partition. - -* Verify the log files, specially the pacman logs. Because, unstable system may be caused by upgrading some packages such graphics driver or any other driver. Based on the log, you may want to downgrade any specific package if you want. -* You may use the below command to view last 200 lines of the pacman log file to find out any failing items or dependency removal. - -``` -tail -n 200 /var/log/pacman.log | less -``` - -* The above command gives you the 200 lines from the end of the pacman.log file to verify. Now, carefully check which of the packages were updates since your successful boot. - -* And note down the package name and version somewhere. And you may try to downgrade packages one-by-one or if you think a specific package created a problem. Use the -U switch of pacman command to downgrade. - -``` -pacman -U -``` - -* You can run the following to start your Arch system after downgrading, if any. - -``` -exec /sbin/init -``` - -* Check the status of your display manager, whether if there are any errors. Sometimes, display manager creates a problem which can’t communicate with X Server. For example, if you are using lightdm, then you can check its status via below. - -``` -systemctl status lightdm -``` - -* Or, may want to start it via below command and check what is the error. - -``` -lightdm --test-mode --debug -``` - -* Here is an example of lightdm failure which caused an unstable Arch system. - -![lightdm - test mode][4] - -* Or check via kicking off the X server using startx. - -``` -startx -``` - -* In my experience, if you see errors in the above command, try to install another display manager such as sddm and enable it. It may eliminate the error. - -* Try the above steps, based on the state of your system, and troubleshoot. For errors specific to display manager lightdm, we have a [guide][5] which you may want to check out. -* If you are using sddm, then check out [these troubleshooting steps][6] if something works. - -### Closing Notes - -Every installation is different. And above steps may/may not work for you. But it is worth a try and as per experience, it works. If it works, well, good for you. Either way, do let me know in the comment box below, how it goes. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2021/07/recover-arch-linux/ - -作者:[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://www.debugpoint.com/tag/arch-linux -[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ -[3]: https://archlinux.org/download/ -[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg -[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/ -[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting diff --git a/translated/tech/20210725 How to Recover Arch Linux Install via chroot.md b/translated/tech/20210725 How to Recover Arch Linux Install via chroot.md new file mode 100644 index 0000000000..09b51220ff --- /dev/null +++ b/translated/tech/20210725 How to Recover Arch Linux Install via chroot.md @@ -0,0 +1,120 @@ +[#]: subject: "How to Recover Arch Linux Install via chroot" +[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何通过 chroot 恢复 Arch Linux 的安装 +====== +这个快速指南解释了恢复 Arch Linux 安装的一些步骤。 + +作为一个滚动发布的版本,[Arch Linux][1] 中有时会出现一些问题。不是因为你自己的行为,而是数以百计的其他原因,如新内核与你的硬件,或软件的兼容性。但是,Arch Linux 仍然是更好的,它提供了最新的软件包和应用。 + +但有时,它也会给你带来麻烦,你最终只能看到一个闪烁的光标,其他什么都没有。 + +所以,在这种情况下,与其重新格式化或重新安装,不如在放弃希望之前尝试恢复安装和数据。本指南概述了这个方向的一些步骤。 + +### 恢复 Arch Linux 安装 + +* 第一步是用 Arch Linux 创建一个可启动的 Live USB。从这个链接下载 .ISO 并创建一个可启动的 .ISO。你可以查看这个指南[如何使用 Etcher 创建可启动的 .ISO][2]。记住这一步需要另一个稳定的工作系统,因为你目前的系统不能使用。 + +[下载 arch linux][3] + +* 你需要知道你的 Arch Linux 安装在哪个分区上。这是一个非常重要的步骤。如果你不知道,你可以用 GParted 来查找。或者在你的 Grub 菜单中查看,或者你可以运行下面的命令来了解。这将列出你所有的磁盘分区及其大小、标签。 + +``` +sudo lsblk -o name,mountpoint,label,size,uuid +``` + +* 完成后,插入 U 盘并从它启动。你应该在 Live 介质中看到 Arch Linux 的提示。 + +* 现在,用下面的方法挂载到 Arch Linux 分区。把 /dev/sda3 改成你各自的分区。 + +``` +/dev/sda3 +``` + +``` +mount /dev/sda3 /mntarch-chroot /mnt +``` + +* arch-chroot 命令将在终端挂载你的 Arch Linux 分区,所以用你的 Arch 凭证登录。现在,在这个阶段,根据你的需要,你有以下选择。 + +* 你可以通过 /home 文件夹来备份你的数据。如果,故障排除器无效的话。你可以把文件复制到外部 USB 或其他分区。 + +* 核查日志文件,特别是 pacman 日志。因为,不稳定的系统可能是由升级某些软件包引起的,如图形驱动或任何其他驱动。根据日志,如果你想降级任何特定的软件包,你可能要降级。 + +* 你可以使用下面的命令来查看 pacman 日志文件的最后 200 行,以找出任何失败的项目或依赖性删除。 + +``` +tail -n 200 /var/log/pacman.log | less +``` + +* 上面的命令给了你从 pacman.log 文件末尾的 200 行来验证。现在,仔细检查哪些软件包在你成功启动后被更新了。 + +* 并记下软件包的名称和版本。你可以尝试逐一降级软件包,或者如果你认为某个特定的软件包产生了问题。使用 pacman 命令的 -U 开关来降级。 + +``` +pacman -U +``` + +* 如果有的话,你可以在降级后运行以下命令来启动你的 Arch 系统。 + +``` +exec /sbin/init +``` + +* 检查你的显示管理器的状态,是否有任何错误。有时,显示管理器会产生一个问题,无法与 X 服务器通信。例如,如果你正在使用 lightdm,那么你可以通过以下方式检查它的状态。 + +``` +systemctl status lightdm +``` + +* 或者,可以通过下面的命令启动它,并检查什么是错误。 + +``` +lightdm --test-mode --debug +``` + +、* 下面是一个 lightdm 失败的例子,它导致了一个不稳定的 Arch 系统。 + +![lightdm - test mode][4] + +* 或者通过使用 startx 启动 X 服务器来检查。 + +``` +startx +``` + +* 根据我的经验,如果你在上述命令中看到错误,尝试安装另一个显示管理器,如 sddm 并启用它。它可能会消除这个错误。 + +* 根据你的系统状态,尝试上述步骤,并进行故障排除。对于特定于显示管理器 lightdm 的错误,我们有一个[指南][5],你可能想查看一下。 + +* 如果你使用的是 sddm,那么请查看[这些故障排除步骤][6]是否可以。 + +### 结束语 + +每个安装都是不同的。上述步骤可能对你不起作用。但它值得一试,根据经验,它是有效的。如果它起作用,那么,对你来说是好事。无论哪种方式,请在下面的评论区中告诉我,它结果如何。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/07/recover-arch-linux/ + +作者:[Arindam][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://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/tag/arch-linux +[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ +[3]: https://archlinux.org/download/ +[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg +[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/ +[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting From 34d4ca7e82fb3b37f85c293d7938e6b56009b815 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Jun 2022 08:44:33 +0800 Subject: [PATCH 111/231] translating --- .../20220609 Edit PDFs on Linux with these open source tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md b/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md index c19cb5da59..9ef5f97640 100644 --- a/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md +++ b/sources/tech/20220609 Edit PDFs on Linux with these open source tools.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/6/open-source-pdf-editors-linux" [#]: author: "Michael Korotaev https://opensource.com/users/michaelk" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f1b765aafbcdefb91b81287cb685cef87d905b35 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Jun 2022 10:04:45 +0800 Subject: [PATCH 112/231] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Donkey-Hao 感谢您,完成了第一篇翻译贡献! --- ...sed, Concluding ARM Generic Kernel Work.md | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md b/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md index 07bd40ff4e..8ff01dc481 100644 --- a/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md +++ b/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md @@ -1,75 +1,72 @@ -[#]: subject: "Linux Kernel 5.19 系列第一个候选版本(RC1)发布,包含 ARM 通用工作" +[#]: subject: "Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work" [#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " Donkey-Hao " -[#]: reviewer: " " +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " -Linux Kernel 5.19 系列第一个候选版本(RC1)发布,包含 ARM 通用工作 +Linux 内核 5.19 RC1 发布,完成了 ARM 通用内核的工作 ====== -Linus Torvalds 发布了 Linux Kernel 5.19 RC1 进行测试,带来了重大变化。 -继上个月 [Linux Kernel 5.18][1] 发布之后,Linus Torvalds 宣布 Linux Kernel 5.19 系列第一个候选版本可用。同时,Linux Kernel 5.19 官方合并窗口关闭,这意味着只有很关键的特性才会被接受。 +![](https://img.linux.net.cn/data/attachment/album/202206/10/100401b0t82bd0ww0o2tgn.jpg) -简要介绍一下 Linux Kernel 5.19 的项目,会发现 CPU、GPU、网络、存储和核心模块会定期更新。 此外,代码清理、淘汰过时硬件和对以后芯片组的持续支持是此版本的亮点。 +> Linus Torvalds 发布了用来测试的 Linux 内核 5.19 RC1,带来了一些重大变化。 -让我们简单来看一下这些新特性。 +继上个月 [Linux 内核 5.18][1] 发布之后,Linus Torvalds 宣布了 Linux 内核 5.19 系列第一个候选版本。与此同时,Linux 内核 5.19 官方合并窗口关闭,这意味着除非是关键性的,否则不会再接受任何新功能。 -### Linux Kernel 5.19(RC1) 的新特性 +简单看一下 Linux 内核 5.19 的新内容,会发现 CPU、GPU、网络、存储和核心模块都有常规的更新。此外,代码清理、淘汰过时硬件和对以后芯片组的持续支持是此版本的亮点。 -#### 处理器 +在进一步介绍之前,让我们简单来看一下这些新特性。 -最重要的是,Linux Kernel 5.19 开始对龙芯架构 CPU 的 [初步支持][2]。龙芯由中国龙芯中科公司设计开发。龙芯架构下的 CPU 是通用 MIPS 架构兼容微处理器。尽管现在提供了支持,但是你仍不能在龙芯 CPU 上启动 Linux 因为一些代码还在审核中。希望在 5.20 版本中能够使用。 +### Linux 内核 5.19(RC1)的新特性 +#### CPU -[Intel IFS 驱动 ][4] 在该版本中落地,这有助于在部署前后发现硬件问题。它能够在早期发现 CPU 关键部分的错误。 +首先需要提及的是,Linux 内核 5.19 开始 [初步支持][2] 龙芯架构的 CPU 系列。龙芯由中国龙芯中科公司设计开发。龙芯架构的 CPU 是兼容 MIPS 架构的通用微处理器。不过虽然现在提供了支持,但是你仍不能在龙芯 CPU 上启动 Linux,因为一些代码还在审核中。希望在 5.20 版本中能够使用。 +新的 [英特尔 IFS 驱动][4] 在该版本中落地,这有助于在部署前后发现硬件问题。它能够在早期阶段检测电路层面的 CPU 错误。 -电源管理和散热工作在英特尔 CPU 的最后几个内核版本中继续进行。 在 [这个版本][5] 也不例外。首先,为 Raptor 和 Alder Lake 家族添加了英特尔运行时平均功率限制(RAPL)的支持。其次,为了处理频率变化升级了 P-state 驱动,并且基于 CPU 的缩放支持被添加到被动的 devfreq 中。 +在前几个针对英特尔 CPU 的内核版本中一直在对电源管理和散热方面进行开发,[这个版本][5] 也不例外。首先,为 Raptor 和 Alder Lake 家族添加了英特尔 运行时平均功率限制Run-Time Average Power Limiting(RAPL)的支持。其次,改进了 P-state 驱动以处理频率变化,并且基于 CPU 的缩放支持被添加到被动 devfreq 中。 - -虽然散热和供电主导着英特尔 CPU ,但 AMD 看到了自己 CPU 系列更多的性能更新。首先,计划在今年年底完成 ZMD Zen 4 CPUs 的 Instruction-Based Sampling (IBS) 模块的很多更新。此外,此版本引入了 PerfMonV2 ,提供了更多性能监视能力。 +虽然英特尔 CPU 主要是散热和电源管理方面的工作,但对 AMD CPU 系列来说有更多的性能更新。首先,计划在今年年底完成 ZMD Zen 4 CPU 的 基于指令的采样Instruction-Based Sampling(IBS)模块引入了更多更新。此外,此版本引入了 PerfMonV2,提供了更多性能监视能力。 此外,该版本中移除了 a.out 支持。同样,过时的 Renesas H8/300 CPU 也被移除了。 + #### 主要 ARM 更新 -最后,主线 Linux Kernel 能够 [支持多个 ARM 平台][7]。在 Linus 的 RC1 开场白中可以看到,这是此版本中的巨大改变!从 Linux 3.7 开始跨越了十多年的工作,这是多么漫长的过程。 +终于,主线 Linux 内核能够 [支持 ARM 多平台][7] 了。在 Linus 的 RC1 开场白中可以看到,这是该版本中的巨大改变!从 Linux 3.7 开始,跨越了十多年的工作,这是多么漫长的过程。 -![Linux Kernel 5.19 Rc1 发布公告提到了 ARM 更改][8] +![Linux 内核 5.19 Rc1 发布公告提到了 ARM 变化][8] -#### 图像和存储升级 +#### 图形和存储升级 -存储子系统实现了跨越流行文件系统的性能提升。最主要的变化包括苹果 M1 NVMe 控制器支持和对 XFS 文件系统的更好支持。此外,提升了 Btrfs , F2FS 以及 exFAT 文件系统。 +存储子系统在各种流行的文件系统中都有性能提升。最主要的变化包括苹果 M1 NVMe 控制器支持和对 XFS 文件系统的更好支持。此外,Btrfs、F2FS 以及 exFAT 文件系统也有增强。 -关于 LOC 有一个令人兴奋的指标是仅图像驱动程序, Linux Kernel 5.19 增加了大约[50 万行代码][9] 。包括 AMD RDNA, CDNA, 英特尔的 Raptor Lake, DG2/Alchemist 等图形架构更新。 +在代码行数方面,有一个令人兴奋的指标是仅是图形驱动程序 Linux 内核 5.19 就增加了大约[50 万行代码][9]。它包括 AMD 的 RDNA、CDNA,英特尔的 Raptor Lake、DG2/Alchemist 等图形驱动更新。 #### 重要的网络变化 -鉴于数据传输大幅增长,对 Big TCP 的支持有助于数据中心流量达到 400 GBit 的范围。它还可以在高性能网络环境中降低延迟。 +鉴于数据传输大幅增长,对 Big TCP 的支持有助于支持数据中心 400 GBit 级别的流量。它还可以在高性能网络环境中降低延迟。 -继续改进了 Multi-Path TCP (MPTCP) 。此外,高通 ath11k WiFi 驱动程序在此版本中添加了网络唤醒功能。同样增加了对瑞昱的 8852ce 芯片,联发科的 T700 调制解调器以及瑞萨科技的 RZ/V2M 的支持。 +继续改进了 多路径 TCPMulti-Path TCP(MPTCP)。此外,高通 ath11k WiFi 驱动程序在此版本中添加了网络唤醒功能。同样增加了对瑞昱的 8852ce 芯片、联发科的 T700 调制解调器以及瑞萨科技的 RZ/V2M 的支持。 #### 其他值得注意的功能 -首先,内核中著名的随机函数生成器在此版本中 [继续][10] 改进。 +首先,内核中著名的随机函数生成器(RNG)在此版本中 [继续][10] 改进。 -其次,著名的初创公司 Framework 模块化笔记本电脑获得了此版本 Chrome OS EC 驱动支持。 Framework 笔记本现在可以利用 ChromeOS 的嵌入式控制器作为 non-Chromebook 设备。 +其次,著名的新兴的 Framework 模块化笔记本电脑获得了此版本 Chrome OS EC 驱动支持。Framework 笔记本现在可以作为一个非 Chromebook 设备利用 ChromeOS 的嵌入式控制器。 -此外, Wacom 绘画板以及其他相关设备也有众多更新。 [包括][11] 对联想 Thinkpad TrackPoint II, 谷歌 Whiskers Touchpad, 联想 X12 TrackPoint 等设备支持的提升。 +此外,Wacom 绘画板以及其他相关设备也有众多更新。[包括][11] 对联想 Thinkpad TrackPoint II、谷歌 Whiskers Touchpad、联想 X12 TrackPoint 等设备支持的提升。 -### Linux Kernel 5.19 下载 +### Linux 内核 5.19 下载 -如果你想要测试并尝试该候选版本,可以在 [这里][12] 下载。或者参考下面的链接。 +如果你想要测试并尝试该候选版本,可以在 [这里][12] 下载。 -| - | - | - | - | - | - | - | - | - | -| :- | :- | :- | :- | :- | :- | :- | :- | :- | -| mainline: | 5.19-rc1 | 2022-06-06 | [tarball][13] | | [patch][14] | | [view diff][15] | [browse][16] | +预计在 2022 年 7 月左右最终版本发布前,将会有多个版本更迭。 -预计在2022年7月左右最终版本发布前,将会有多个版本更迭。 - -*[Kernel 邮件列表.][17]* +参考自:[内核邮件列表][17] -------------------------------------------------------------------------------- @@ -78,7 +75,7 @@ via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[Donkey-Hao](https://github.com/Donkey-Hao) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 952faed3253892cdd1c4120496555c9bb599e8db Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Jun 2022 10:05:46 +0800 Subject: [PATCH 113/231] P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Donkey-Hao 本文首发地址:https://linux.cn/article-14692-1.html 您的 LCTT 专页:https://linux.cn/lctt/Donkey-Hao --- ...l 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md (98%) diff --git a/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md b/published/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md similarity index 98% rename from translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md rename to published/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md index 8ff01dc481..3e2c88b021 100644 --- a/translated/news/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md +++ b/published/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md @@ -4,8 +4,8 @@ [#]: collector: "lkxed" [#]: translator: "Donkey-Hao" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14692-1.html" Linux 内核 5.19 RC1 发布,完成了 ARM 通用内核的工作 ====== From 8f1bf5fb6b499133f97d7640d61c5d121ab92992 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Jun 2022 12:02:41 +0800 Subject: [PATCH 114/231] RP @duoluoxiaosheng https://linux.cn/article-14693-1.html --- ...6 Linux word processors you need to try.md | 82 +++++++++++++++++ ...6 Linux word processors you need to try.md | 88 ------------------- 2 files changed, 82 insertions(+), 88 deletions(-) create mode 100644 published/20220606 6 Linux word processors you need to try.md delete mode 100644 translated/tech/20220606 6 Linux word processors you need to try.md diff --git a/published/20220606 6 Linux word processors you need to try.md b/published/20220606 6 Linux word processors you need to try.md new file mode 100644 index 0000000000..9fd712d06f --- /dev/null +++ b/published/20220606 6 Linux word processors you need to try.md @@ -0,0 +1,82 @@ +[#]: subject: "6 Linux word processors you need to try" +[#]: via: "https://opensource.com/article/22/6/word-processors-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14693-1.html" + +值得尝试的六款 Linux 文字处理程序 +====== + +> 选择一款最中意的文字处理程序把你的想法打印到纸上。 + +![](https://img.linux.net.cn/data/attachment/album/202206/10/120032h7jlo1ozm37fdyfv.jpg) + +作家们总是在寻找更好的方法将他们的文字和想法以更好的方式呈现给他们的读者。我对文字处理程序最早的印象是在 Apple II 上使用 AppleWorks 和后来的 FrEDWriter,后者是一个创建于 1985 年的免费文字处理程序。这是我的学生们的标配,他们许多人来自没有钱购买专有软件的家庭。 + +### Abiword + +在 20 世纪 90 年代时,我开始使用 Linux,寻找我可以使用的高质量的写作程序,并推荐给跟随我进入开源软件世界的学生们。我首先接触的文字处理程序是 [AbiWord][2]。AbiWord 来自西班牙语 Abierto,意思是“开放”。它最早发布于 1998 年,并且之后一直在升级。它使用 GPLv2 开源协议。它支持列表、缩进,字符格式等基本功能,支持 .doc、.html、.docx、.odt 等多种格式文件的导入和导出。 + +![Image of Abiword][3] + +### Etherpad + +[Etherpad][4] 是一个开源协作编辑项目。它可以让你像 Google Drive 那样实时编辑文档,主要的区别是它是完全开源的。据它的网站上介绍,你可以“与你的朋友、同学或同事一起写文章、新闻稿、待办事项,同时在同一个文件上工作”。其源代码可随时查看。Etherpad 采用 Apache 2.0 开源协议。你可以直接在线使用它,或者把它下载并 [安装][5] 到你的 Linux 电脑上。 + +### Cryptpad + +[CryptPad][6] 是一个端到端加密的写作套件。使用 GPLv3 开源协议,并且源代码公开在 [GitHub][7] 上。它由 [Xwiki][8] 实验室开发。可替代 Google Drive,并且是自主托管的。根据其网站描述,“CryptPad 旨在实现协作办公。实时同步文档的更改。由于所有数据都已加密,因此该服务及其管理员无法查看正在编辑和存储的内容。” Cryptpad 为用户提供了 [丰富的文档][9]。 + +### Focuswriter + +[FocusWriter][10] 是一个简单的免干扰的编辑器。它使用隐藏式界面,鼠标移动到屏幕边界时才显示界面。它使用 GPLv3 开源协议,并为 Linux 提供了 Flatpak 软件包,也为 [Ubuntu][11] 和 [Fedora][12] 提供了 DEB 和 RPM。下图是一个 FocusWriter 桌面的例子。这是一个非常简单直观的界面,菜单自动隐藏,当鼠标指向屏幕顶部或边缘时才会显示。文件默认保存为 .odt 格式,也支持纯文本、.docx 和富文本。 + +![Image of FocusWriter][13] + +### LibreOffice Writer + +[LibreOffice Writer][14] 是我最喜欢的,我已经使用了十多年了。它拥有我需要的所有特性,包括富文本格式化。它还拥有我见过的最多的导入、导出方式。类似于 [APA][15] 这样的问卷和出版模板它拥有十多种。我最喜欢的是它可以将文件导出为 PDF 和 epub。 LibreOffice Writer 是一个自由软件,使用 Mozilla 公开许可证(MPL)2.0 开源协议。其 [源代码][16] 由文档基金会提供。LibreOffice 支持大多数 Linux 发行版。同时它也提供 Flatpak、Snap 和 AppImage 软件包。另外,你也可以把它下载并安装到 MacOS 和 Windows 上。 + +![Image of LibreOffice work space][17] + +### OpenOffice Writer + +Apache [OpenOffice Writer][18] 是一个全功能的文字处理程序。它可以简单地用于备忘录,也可以复杂到足以编写你的第一本书。依据官网的描述,OpenOffice Writer 将文档自动保存为 .odt。它还支持将文档保存为 .doc、.docx、富文本和其他格式。OpenOffice Writer 使用 Apache 许可证 2.0 开源协议。源代码在 [GitHub][19] 上公开。 + +还有许多自由开源软件等着大家去发现。它们非常适合完成你的日常任务,你也可以为它们的发展做出贡献。你最喜欢的 Linux 文字处理器程序是什么呢? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/word-processors-linux + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg +[2]: https://www.abisource.com/ +[3]: https://opensource.com/sites/default/files/2022-05/abiword.png +[4]: https://etherpad.org/# +[5]: https://github.com/ether/etherpad-lite#installation +[6]: https://cryptpad.fr/what-is-cryptpad.html +[7]: https://github.com/xwiki-labs/cryptpad +[8]: https://github.com/xwiki-labs +[9]: https://docs.cryptpad.fr/en/user_guide/index.html +[10]: https://gottcode.org/focuswriter/ +[11]: https://packages.ubuntu.com/jammy/focuswriter +[12]: https://src.fedoraproject.org/rpms/focuswriter +[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png +[14]: https://www.libreoffice.org/discover/writer/ +[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template +[16]: https://www.libreoffice.org/about-us/source-code/ +[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png +[18]: https://www.openoffice.org/product/writer.html +[19]: https://github.com/apache/openoffice diff --git a/translated/tech/20220606 6 Linux word processors you need to try.md b/translated/tech/20220606 6 Linux word processors you need to try.md deleted file mode 100644 index d4e4a3e35b..0000000000 --- a/translated/tech/20220606 6 Linux word processors you need to try.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: subject: "6 Linux word processors you need to try" -[#]: via: "https://opensource.com/article/22/6/word-processors-linux" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lkxed" -[#]: translator: "duoluoxiaosheng" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -6 Linux word processors you need to try -====== -值得尝试的六款Linux文字处理程序 -====== - -选择一款最中意的文字处理程序把你的想法打印到纸上。 - -![Typewriter with hands][1] - -Image by: rawpixel.com. CC0. - -作家们总是在寻找更好的方法将他们的文字和想法以更好的方式呈现给他们的读者。我对文字处理程序最早的印象是在 Apple II 上使用 AppleWorks 和 FrEDWriter,一个1985年的免费的文字处理程序。这是我的学生的标配,他们中的许多人来自没有钱购买专用软件的家庭。 - -### Abiword - -在20世纪90年代时,我开始使用 Linux, 我开始寻找高质量的写作程序,以推荐给在开源软件世界跟随我的学生。我首先接触的文字处理程序是 [AbiWord][2]。 AbiWord 来自西班牙语 Abierto,是打开的意思。最早发布于1998年,并且之后一直在升级。使用 GPLv2 开源协议。支持列表,缩进,字符格式等基本功能。支持比如 ".doc", ".html", ".docx", ".odt" 等多种格式文件的导入和导出。 - -![Image of Abiword][3] - -### Etherpad - -[Etherpad][4] 是一个开源项目。它可以让您像 Google Drive 那样实时编辑文档。它完全开源。据它的网站上介绍,您可以用它来写文章,新闻稿和待办清单,还可以和您的朋友,同学或者同事一起同时编辑同一个文档。源代码可查看。Etherpad 采用 Apache 2.0 开源协议。您可以直接在线使用它,或者把它下载并[安装][5]到您的 Linux 电脑上。 - -### Cryptpad - -[CryptPad][6] 是一个端到端加密的写作套件。使用 GPLv3 开源协议,并且源代码在 [GitHub][7] 上公开。 由 [Xwiki][8] 实验室开发。可替代 Google Drive 并且自主托管。根据网站描述 “CryptPad 旨在实现协作办公。实时同步文档的更改。由于所有数据都已加密,因此服务及其管理员无法查看正在编辑和存储的内容。” Cryptpad 为用户提供了[丰富的文档][9]。 - -### Focuswriter - -[FocusWriter][10] 是一个简单的免干扰的编辑器。它使用隐藏的界面,鼠标移动到屏幕边界时可以显示。使用 GPLv3 开源协议并提供 Linux 通用软件安装包(Flatpak),比如 [Ubuntu][11] 的 DEB 和 [Fedora][12] 的 RPM。这是一个 FocusWriter 桌面的例子。 一个非常简单直观的界面,菜单自动隐藏,鼠标指向屏幕顶部或边缘时才显示。文件默认保存为 ".odt" 格式,也支持纯文本, ".docx",和富文本。 - -![Image of FocusWriter][13] - -### LibreOffice Writer - -[LibreOffice Writer][14]是我最喜欢的。我已经使用了十多年了。他拥有我需要的富文本的所有特性。他还拥有我见过的最大的导入导出列表。类似 [APA][15]这样的问卷和出版模板它拥有十多种。最喜欢它的是他可以将文件导出为 PDF 和 “epub”。 LibreOffice Writer 是一个免费软件,使用 Mozilla Public Liceense 2.0 开源协议。 [源代码][16]由 Document Foundation 提供。LibreOffice 支持大多数 Linux 发行版。 同时它也提供 Flatpak,Snap 和 AppImage。另外,您也可以把它下载并安装到 MacOs 和 Windows 上。 - -![Image of LibreOffice work space][17] - -### OpenOffice Writer - -Apache [OpenOffice Writer][18] 是一个全功能点文字处理程序。作为一个备忘录来说它足够简单,但对于编写你的第一本书来说它又足够复杂。依据官网的描述,OpenOffice Writer 将文档自动保存为 “open document format”. 它还支持将文档保存为 ".doc", ".docx", 富文本和其他格式。OpenOffice Writer 使用 Apache License 2.0 开源协议。源代码在 [GitHub][19] 上公开。 - -这里还有许多免费的开源软件等着大家去发现。它们非常适合完成您的日常任务,您也可以为它们的发展做出贡献。您最喜欢的 Linux 文字处理器程序是什么呢? - -Image by: (Don Watkins, CC BY-SA 4.0) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/6/word-processors-linux - -作者:[Don Watkins][a] -选题:[lkxed][b] -译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg -[2]: https://www.abisource.com/ -[3]: https://opensource.com/sites/default/files/2022-05/abiword.png -[4]: https://etherpad.org/# -[5]: https://github.com/ether/etherpad-lite#installation -[6]: https://cryptpad.fr/what-is-cryptpad.html -[7]: https://github.com/xwiki-labs/cryptpad -[8]: https://github.com/xwiki-labs -[9]: https://docs.cryptpad.fr/en/user_guide/index.html -[10]: https://gottcode.org/focuswriter/ -[11]: https://packages.ubuntu.com/jammy/focuswriter -[12]: https://src.fedoraproject.org/rpms/focuswriter -[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png -[14]: https://www.libreoffice.org/discover/writer/ -[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template -[16]: https://www.libreoffice.org/about-us/source-code/ -[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png -[18]: https://www.openoffice.org/product/writer.html -[19]: https://github.com/apache/openoffice From 7547cdfec18c41ebd599773d5730e46ac899bcb4 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 12:29:03 +0800 Subject: [PATCH 115/231] Update 20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md --- ...place Annoying CAPTCHAs on the Internet.md | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md index a5cc2dafe7..80fe54aece 100644 --- a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md +++ b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md @@ -1,7 +1,7 @@ [#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet" [#]: via: "https://news.itsfoss.com/cloudflare-pat/" [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,8 +9,11 @@ Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet ====== +Don’t want to complete CAPTCHA challenges to prove that you are a human? Cloudflare might have a solution for that. -Cloudflare, the internet services giant, has [just announced][1] Private Access Tokens. These aim to reduce the number of CAPTCHAs you see on the web while improving your privacy. +![cloudflare][1] + +Cloudflare, the internet services giant, has [just announced][2] Private Access Tokens. These aim to reduce the number of CAPTCHAs you see on the web while improving your privacy. As you may have found out, CAPTCHAs are a horrible experience on mobile. They often end up occupying the entire screen and can be impossible to complete at times. @@ -22,11 +25,9 @@ Fortunately, the release of Private Access Tokens, or PATs, is set to change thi In short, PATs will: - * Reduce the number of CAPTCHAs on supported devices - * Increase user privacy - * Allow website owners to ensure that visitors are coming from actual devices - - +* Reduce the number of CAPTCHAs on supported devices +* Increase user privacy +* Allow website owners to ensure that visitors are coming from actual devices However, diving in a little deeper, we can see that PATs are much more impactful than at first glance. With traditional CAPTCHAs, there are multiple entities that can access your data. @@ -38,17 +39,15 @@ Fortunately, PATs by Cloudflare prevent such data from being collected, by ultim ### How Do PATs Work? -![Image credit: Cloudflare][2] +![][3] Unlike the CAPTCHA method of aggregating as much data as possible, PATs decentralize the data so that no single party can uniquely identify you. Before you mention data sharing, Cloudflare has specifically mentioned that data is not shared between parties. When you go on to a website utilizing Cloudflare and PATs, a total of three parties will handle different portions of your data. - 1. The website. This will only know your IP, URL, and user agent, which again, is required for establishing a connection. - 2. Your device manufacturer. This will only know the device data required to verify that your device is genuine. They will NOT know what website you are visiting, or your IP address. After verifying your device, they will generate a token, which will be sent to Cloudflare. - 3. Cloudflare. Cloudflare will receive the token, which does not contain any of your device data, only a ‘guarantee’ of sorts from the manufacturer that it is genuine. The only other data they know is the website you are visiting, which is required to serve you the content. - - +1. The website. This will only know your IP, URL, and user agent, which again, is required for establishing a connection. +2. Your device manufacturer. This will only know the device data required to verify that your device is genuine. They will NOT know what website you are visiting, or your IP address. After verifying your device, they will generate a token, which will be sent to Cloudflare. +3. Cloudflare. Cloudflare will receive the token, which does not contain any of your device data, only a ‘guarantee’ of sorts from the manufacturer that it is genuine. The only other data they know is the website you are visiting, which is required to serve you the content. The result of this is a system that gives Cloudflare confidence in you being a human, without ever having to touch your data. @@ -62,7 +61,7 @@ Going back to Apple, it occurs to me that PATs could also cause some issues with What about Linux Phones? Manufacturers of these, like Pine64 and Purism, may not have the infrastructure to support such a system. Will it be possible to use PATs on these? -In the [announcement post][1], Cloudflare mentions: +In the [announcement post][4], Cloudflare mentions: > We are actively working to get other clients and device makers utilizing the PAT framework as well. Any time a new client begins utilizing the PAT framework, traffic coming to your site from that client will automatically start asking for tokens, and your visitors will automatically see fewer CAPTCHAs. @@ -73,13 +72,15 @@ So, we hope to see it being adopted by more devices, and operating systems. What via: https://news.itsfoss.com/cloudflare-pat/ 作者:[Jacob Crume][a] -选题:[lujun9972][b] +选题:[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/jacob/ -[b]: https://github.com/lujun9972 -[1]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY1MCIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg +[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png +[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ From cc6f6fb3db72738c202c186771287a57b0f11eb3 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 13:22:33 +0800 Subject: [PATCH 116/231] Delete 20220609 System76 Hardware is Making its Way to Europe Soon.md --- ...rdware is Making its Way to Europe Soon.md | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md diff --git a/sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md b/sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md deleted file mode 100644 index aae786e98b..0000000000 --- a/sources/news/20220609 System76 Hardware is Making its Way to Europe Soon.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: subject: "System76 Hardware is Making its Way to Europe Soon" -[#]: via: "https://news.itsfoss.com/system76-europe/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -System76 Hardware is Making its Way to Europe Soon -====== - -System76’s [recent partnership with HP][1] for a developer-focused laptop made users think that it should enable users across the globe to get their hands on a laptop with Pop!_OS pre-installed. - -Unfortunately, the HP Dev One laptop is limited to U.S. customers as of now. But, it seems like you can expect System76 hardware to be available in Europe very soon. - -### System76 to Make its Mechanical Keyboard Available First - -As per an [interview][2] with System76’s principal engineer, Jeremy Soller, System76 has plans to come up with a distribution center for Europe in the coming months. - -Unfortunately, they will not be making laptops/desktops available. The process of minimizing shipping charges, taxes, and other stuff with computers needs time. - -Hence, they plan to start with the [Launch mechanical keyboard][3] and an upcoming Launch Lite edition by System76. - -![][4] - -Not to forget, Europe will need a different keyboard layout as well. So, you could be in for something comfortable as per your requirements. - -Note that the planned European distribution hub by System76 does not aim to make its collaborative projects available (like HP Dev On). It is most likely that they will be focusing on making their hardware available. - -However, no clarity has been provided on that front. So, you can expect System76 to expand to other regions, or they could improve their collaboration with laptop manufacturers to let more users experience Pop!_OS. - -### Wrapping Up - -If you cannot wait to get your hands on a System76 product, and you happen to live in the U.S. or Canada, you may want to explore the summer sale going on at [System76’s official website][5]. - -Europe’s customers need to wait for a couple of months to get System76’s Launch keyboard easily. - -Hopefully, the laptops/desktops get available in the near future. - -_Would you be willing to grab System76’s mechanical keyboard when it’s available for European users?_ _Share your thoughts in the comments below._ - -**Via:** [OMG!Ubuntu!][6] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/system76-europe/ - -作者:[Ankush Das][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://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/hp-dev-one-system76/ -[2]: https://tweakers.net/reviews/10108/jeremy-soller-van-system76-over-pop_os-de-cosmic-desktop-en-hardware.html -[3]: https://news.itsfoss.com/system76-launch-mechanical-keyboard/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MCIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ -[5]: https://system76.com/ -[6]: https://www.omgubuntu.co.uk/2022/06/system76-is-opening-a-european-distribution-center From aaee36827fcb162d00947ad1252c2295e48170c2 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 17:22:49 +0800 Subject: [PATCH 117/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220610=20Handling=20maps=20in=20Groovy=20vs=20Java.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0220610 Handling maps in Groovy vs Java.md | 374 ++++++++++++++++++ 1 file changed, 374 insertions(+) create mode 100644 sources/tech/20220610 Handling maps in Groovy vs Java.md diff --git a/sources/tech/20220610 Handling maps in Groovy vs Java.md b/sources/tech/20220610 Handling maps in Groovy vs Java.md new file mode 100644 index 0000000000..6a4faa3770 --- /dev/null +++ b/sources/tech/20220610 Handling maps in Groovy vs Java.md @@ -0,0 +1,374 @@ +[#]: subject: "Handling maps in Groovy vs Java" +[#]: via: "https://opensource.com/article/22/6/maps-groovy-vs-java" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Handling maps in Groovy vs Java +====== +Discover the differences in map handling between Groovy and Java with this hands-on demo. + +![women programming][1] + +Image by: WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0 + +Java is a great programming language, but sometimes I want a Java-like language that's just a bit more flexible and compact. That's when I opt for [Groovy][2]. + +In a recent article, I reviewed some of the differences between [creating and initializing maps in Groovy][3] and doing the same thing in Java. In brief, Groovy has a concise syntax for setting up maps and accessing map entries compared to the effort necessary in Java. + +This article will delve into more differences in map handling between Groovy and Java. For that purpose, I will use the [sample table of employees][4] used for demoing the JavaScript DataTables library. To follow along, start by making sure you have recent versions of Groovy and Java installed on your computer. + +### Install Java and Groovy + +Groovy is based on Java and requires a Java installation as well. A recent and/or decent version of Java and Groovy might already be in your Linux distribution's repositories, or you can download and install Groovy from the [Apache Groovy website][5]. A good option for Linux users is [SDKMan][6], which can be used to get multiple versions of Java, Groovy, and many other related tools. For this article, I'm using SDK's releases of: + +* Java: version 11.0.12-open of OpenJDK 11 +* Groovy: version 3.0.8. + +### Back to the problem: maps + +First, in my experience, maps and lists (or at least arrays) often end up in the same program. For example, processing an input file is very similar to passing over a list; often, I do that when I want to categorize data encountered in the input file (or list), storing some kind of value in lookup tables, which are just maps. + +Second, Java 8 introduced the whole Streams functionality and lambdas (or anonymous functions). In my experience, converting input data (or lists) into maps often involves using Java Streams. Moreover, Java Streams are at their most flexible when dealing with streams of typed objects, providing grouping and accumulation facilities out of the box. + +### Employee list processing in Java + +Here's a concrete example based on those fictitious employee records. Below is a Java program that defines an Employee class to hold the employee information, builds a list of Employee instances, and processes that list in a few different ways: + +``` +1  import java.lang.*; +2  import java.util.Arrays; + +3  import java.util.Locale; +4  import java.time.format.DateTimeFormatter; +5  import java.time.LocalDate; +6  import java.time.format.DateTimeParseException; +7  import java.text.NumberFormat; +8  import java.text.ParseException; +  +9  import java.util.stream.Collectors; +  +10  public class Test31 { + +11 static public void main(String args[]) { +   +12     var employeeList = Arrays.asList( +13   new Employee("Tiger Nixon", "System Architect", +14 "Edinburgh", "5421", "2011/04/25", "$320,800"), +15   new Employee("Garrett Winters", "Accountant", +6 "Tokyo", "8422", "2011/07/25", "$170,750"), +   ... +    +81   new Employee("Martena Mccray", "Post-Sales support", +82 "Edinburgh", "8240", "2011/03/09", "$324,050"), +83   new Employee("Unity Butler", "Marketing Designer", +84 "San Francisco", "5384", "2009/12/09", "$85,675") +85     ); +   +86     // calculate the average salary across the entire company +   +87     var companyAvgSal = employeeList. +88   stream(). +89   collect(Collectors.averagingDouble(Employee::getSalary)); +90     System.out.println("company avg salary = " + companyAvgSal); +   +91     // calculate the average salary for each location, +92     //     compare to the company average +   +93     var locationAvgSal = employeeList. +94   stream(). +95   collect(Collectors.groupingBy((Employee e) -> +96 e.getLocation(), +97     Collectors.averagingDouble(Employee::getSalary))); +98     locationAvgSal.forEach((k,v) -> +99   System.out.println(k + " avg salary = " + v + +100 "; diff from avg company salary = " + +101 (v - companyAvgSal))); +   +102     // show the employees in Edinburgh approach #1 +   +103     System.out.print("employee(s) in Edinburgh (approach #1):"); +104     var employeesInEdinburgh = employeeList. +105   stream(). +106   filter(e -> e.getLocation().equals("Edinburgh")). +107   collect(Collectors.toList()); +108     employeesInEdinburgh. +109   forEach(e -> +110 System.out.print(" " + e.getSurname() + "," + +111     e.getGivenName())); +112     System.out.println(); +   +   +113     // group employees by location + +114     var employeesByLocation = employeeList. +115   stream(). +116   collect(Collectors.groupingBy(Employee::getLocation)); + +117     // show the employees in Edinburgh approach #2 + +118     System.out.print("employee(s) in Edinburgh (approach #2):"); +119     employeesByLocation.get("Edinburgh"). +120   forEach(e -> +121 System.out.print(" " + e.getSurname() + "," + +122     e.getGivenName())); +123     System.out.println(); + +124 } +125  } +   +126  class Employee { +127 private String surname; +128 private String givenName; +129 private String role; +130 private String location; +131 private int extension; +132 private LocalDate hired; +133 private double salary; +   +134 public Employee(String fullName, String role, String location, +135     String extension, String hired, String salary) { +136     var nn = fullName.split(" "); +137     if (nn.length > 1) { +138   this.surname = nn[1]; +139   this.givenName = nn[0]; +140     } else { +141   this.surname = nn[0]; +142   this.givenName = ""; +143     } +144     this.role = role; +145     this.location = location; +146     try { +147   this.extension = Integer.parseInt(extension); +148     } catch (NumberFormatException nfe) { +149   this.extension = 0; +150     } +151     try { +152   this.hired = LocalDate.parse(hired, +153 DateTimeFormatter.ofPattern("yyyy/MM/dd")); +154     } catch (DateTimeParseException dtpe) { +155   this.hired = LocalDate.EPOCH; +156     } +157     try { +158   this.salary = NumberFormat.getCurrencyInstance(Locale.US). +159 parse(salary).doubleValue(); +160     } catch (ParseException pe) { +161   this.salary = 0d; +162     } +163 } +   +164 public String getSurname() { return this.surname; } +165 public String getGivenName() { return this.givenName; } +166 public String getLocation() { return this.location; } +167 public int getExtension() { return this.extension; } +168 public LocalDate getHired() { return this.hired; } +169 public double getSalary() { return this.salary; } +170  } +``` + +Wow, that's a lot of code for a simple demo program! I'll go through it in chunks first. + +Starting at the end, lines 126 through 170 define the `Employee` class used to store employee data. The most important thing to mention here is that the fields of the employee record are of different types, and in Java that generally leads to defining this type of class. You could make this code a bit more compact by using [Project Lombok's @Data][7] annotation to automatically generate the getters (and setters) for the `Employee` class. In more recent versions of Java, I can declare these sorts of things as a record rather than a class, since the whole point is to store data. Storing the data as a list of `Employee` instances facilitates the use of Java streams. + +Lines 12 through 85 create the list of `Employee` instances, so now you've already dealt with 119 of 170 lines. + +There are nine lines of import statements up front. Interestingly, there are no map-related imports! This is partly because I'm using stream methods that yield maps as their results, and partly because I'm using the `var` keyword to declare variables, so the type is inferred by the compiler. + +The interesting parts of the above code happen in lines 86 through 123. + +In lines 87-90, I convert `employeeList` into a stream (line 88) and then use `collect()` to apply the `Collectors.averagingDouble()` method to the `Employee::getSalary` (line 89) method to calculate the average salary across the whole company. This is pure functional list processing; no maps are involved. + +In lines 93-101, I convert `employeeList` into a stream again. I then use the `Collectors.groupingBy()` method to create a map whose keys are employee locations, returned by `e.getLocation()`, and whose values are the average salary for each location, returned by `Collectors.averagingDouble()` again applied to the `Employee::getSalary` method applied to each employee in the location subset, rather than the entire company. That is, the `groupingBy()` method creates subsets by location, which are then averaged. Lines 98-101 use `forEach()` to step through the map entries printing location, average salary, and the difference between the location averages and company average. + +Now, suppose you wanted to look at just those employees located in Edinburgh. One way to accomplish this is shown in lines 103-112, where I use the stream `filter()` method to create a list of only those employees based in Edinburgh and the `forEach()` method to print their names. No maps here, either. + +Another way to solve this problem is shown in lines 113-123. In this method, I create a map where each entry holds a list of employees by location. First, in lines 113-116, I use the `groupingBy()` method to produce the map I want with keys of employee locations whose values are sublists of employees at that location. Then, in lines 117-123, I use the `forEach()` method to print out the sublist of names of employees at the Edinburgh location. + +When we compile and run the above, the output is: + +``` +company avg salary = 292082.5 +San Francisco avg salary = 284703.125; diff from avg company salary = -7379.375 +New York avg salary = 410158.3333333333; diff from avg company salary = 118075.83333333331 +Singapore avg salary = 357650.0; diff from avg company salary = 65567.5 +Tokyo avg salary = 206087.5; diff from avg company salary = -85995.0 +London avg salary = 322476.25; diff from avg company salary = 30393.75 +Edinburgh avg salary = 261940.7142857143; diff from avg company salary = -30141.78571428571 +Sydney avg salary = 90500.0; diff from avg company salary = -201582.5 +employee(s) in Edinburgh (approach #1): Nixon,Tiger Kelly,Cedric Frost,Sonya Flynn,Quinn Rios,Dai Joyce,Gavin Mccray,Martena +employee(s) in Edinburgh (approach #2): Nixon,Tiger Kelly,Cedric Frost,Sonya Flynn,Quinn Rios,Dai Joyce,Gavin Mccray,Martena +``` + +### Employee list processing in Groovy + +Groovy has always provided enhanced facilities for processing lists and maps, partly by extending the Java Collections library and partly by providing closures, which are somewhat like lambdas. + +One outcome of this is that maps in Groovy can easily be used with different types of values. As a result, you can't be pushed into making the auxiliary Employee class; instead, you can just use a map. Let's examine a Groovy version of the same functionality: + +``` +1  import java.util.Locale +2  import java.time.format.DateTimeFormatter +3  import java.time.LocalDate +4  import java.time.format.DateTimeParseException +5  import java.text.NumberFormat +6  import java.text.ParseException +   +7  def employeeList = [ +8 ["Tiger Nixon", "System Architect", "Edinburgh", +9     "5421", "2011/04/25", "\$320,800"], +10 ["Garrett Winters", "Accountant", "Tokyo", +11     "8422", "2011/07/25", "\$170,750"], + +    ... + +76 ["Martena Mccray", "Post-Sales support", "Edinburgh", +77     "8240", "2011/03/09", "\$324,050"], +78 ["Unity Butler", "Marketing Designer", "San Francisco", +79     "5384", "2009/12/09", "\$85,675"] +80  ].collect { ef -> +81 def surname, givenName, role, location, extension, hired, salary +82 def nn = ef[0].split(" ") +83 if (nn.length > 1) { +84     surname = nn[1] +85     givenName = nn[0] +86 } else { +87     surname = nn[0] +88     givenName = "" +89 } +90 role = ef[1] +91 location = ef[2] +92 try { +93     extension = Integer.parseInt(ef[3]); +94 } catch (NumberFormatException nfe) { +95     extension = 0; +96 } +97 try { +98     hired = LocalDate.parse(ef[4], +99   DateTimeFormatter.ofPattern("yyyy/MM/dd")); +100 } catch (DateTimeParseException dtpe) { +101     hired = LocalDate.EPOCH; +102 } +103 try { +104     salary = NumberFormat.getCurrencyInstance(Locale.US). +105   parse(ef[5]).doubleValue(); +106 } catch (ParseException pe) { +107     salary = 0d; +108 } +109 [surname: surname, givenName: givenName, role: role, +110     location: location, extension: extension, hired: hired, salary: salary] +111  } +   +112  // calculate the average salary across the entire company +   +113  def companyAvgSal = employeeList.average { e -> e.salary } +114  println "company avg salary = " + companyAvgSal +   +115  // calculate the average salary for each location, +116  //     compare to the company average +   +117  def locationAvgSal = employeeList.groupBy { e -> +118 e.location +119  }.collectEntries { l, el -> +120 [l, el.average { e -> e.salary }] +121  } +122  locationAvgSal.each { l, a -> +123 println l + " avg salary = " + a + +124     "; diff from avg company salary = " + (a - companyAvgSal) +125  } +   +126  // show the employees in Edinburgh approach #1 +   +127  print "employee(s) in Edinburgh (approach #1):" +128  def employeesInEdinburgh = employeeList.findAll { e -> +129 e.location == "Edinburgh" +130  } +131  employeesInEdinburgh.each { e -> +132 print " " + e.surname + "," + e.givenName +133  } +134  println() +   +135  // group employees by location +   +136  def employeesByLocation = employeeList.groupBy { e -> +137 e.location +138  } +   +139  // show the employees in Edinburgh approach #2 +   +140  print "employee(s) in Edinburgh (approach #1):" +141  employeesByLocation["Edinburgh"].each { e -> +142 print " " + e.surname + "," + e.givenName +143  } +144  println() +``` + +Because I am just writing a script here, I don't need to put the program body inside a method inside a class; Groovy handles that for us. + +In lines 1-6, I still need to import the classes needed for the data parsing. Groovy imports quite a bit of useful stuff by default, including `java.lang.*` and `java.util.*`. + +In lines 7-90, I use Groovy's syntactic support for lists as comma-separated values bracketed by `[` and `]`. In this case, there is a list of lists; each sublist is the employee data. Notice that you need the `\` in front of the `$` in the salary field. This is because a `$` occurring inside a string surrounded by double quotes indicates the presence of a field whose value is to be interpolated into the string. An alternative would be to use single quotes. + +But I don't want to work with a list of lists; I would rather have a list of maps analogous to the list of Employee class instances in the Java version. I use the Groovy Collection`.collect()` method in lines 90-111 to take apart each sublist of employee data and convert it into a map. The collect method takes a Groovy Closure argument, and the syntax for creating a closure surrounds the code with `{` and `}` and lists the parameters as `a, b, c ->` in a manner similar to Java's lambdas. Most of the code looks quite similar to the constructor method in the Java Employee class, except that there are items in the sublist rather than arguments to the constructor. However, the last two lines— + +``` +[surname: surname, givenName: givenName, role: role, + +    location: location, extension: extension, hired: hired, salary: salary] +``` + +—create a map with keys `surname`, `givenName`, `role`, `location`, `extension`, `hired`, and `salary`. And, since this is the last line of the closure, the value returned to the caller is this map. No need for a return statement. No need to quote these key values; Groovy assumes they are strings. In fact, if they were variables, you would need to put them in parentheses to indicate the need to evaluate them. The value assigned to each key appears on its right side. Note that this is a map whose values are of different types: The first four are `String`, then `int`, `LocalDate`, and `double`. It would have been possible to define the sublists with elements of those different types, but I chose to take this approach because the data would often be read in as string values from a text file. + +The interesting bits appear in lines 112-144. I've kept the same kind of processing steps as in the Java version. + +In lines 112-114, I use the Groovy Collection `average()` method, which like `collect()` takes a Closure argument, here iterating over the list of employee maps and picking out the `salary` value. Note that using these methods on the Collection class means you don't have to learn how to transform lists, maps, or some other element to streams and then learn the stream methods to handle your calculations, as in Java. For those who like Java Streams, they are available in newer Groovy versions. + +In lines 115-125, I calculate the average salary by location. First, in lines 117-119, I transform `employeeList`, which is a list of maps, into a map, using the Collection`groupBy()` method, whose keys are the location values and whose values are linked sublists of the employee maps pertaining to that location. Then I process those map entries with the `collectEntries()` method, using the `average()` method to compute the average salary for each location. + +Note that `collectEntries()` passes each key (location) and value (employee sublist at that location) into the closure (the `l, el ->` string) and expects a two-element list of key (location) and value (average salary at that location) to be returned, converting those into map entries. Once I have the map of average salaries by location, `locationAvgSal`, I can print it out using the Collection `each()` method, which also takes a closure. When `each()` is applied to a map, it passes in the key (location) and value (average salary) in the same way as `collectEntries()`. + +In lines 126-134, I filter the `employeeList` to get a sublist of `employeesInEdinburgh`, using the `findAll()` method, which is analogous to the Java Streams `filter()` method. And again, I use the `each()` method to print out the sublist of employees in Edinburgh. + +In lines 135-144, I take the alternative approach of grouping the `employeeList` into a map of employee sublists at each location, `employeesByLocation`. Then in lines 139-144, I select the employee sublist at Edinburgh, using the expression `employeesByLocation[“Edinburgh”]` and the `each()` method to print out the sublist of employee names at that location. + +### Why I often prefer Groovy + +Maybe it's just my familiarity with Groovy, built up over the last 12 years or so, but I feel more comfortable with the Groovy approach to enhancing Collection with all these methods that take a closure as an argument, rather than the Java approach of converting the list, map, or whatever is at hand to a stream and then using streams, lambdas, and data classes to handle the processing steps. I seem to spend a lot more time with the Java equivalents before I get something working. + +I'm also a huge fan of strong static typing and parameterized types, such as `Map,employee>`  `,employee>` as found in Java. However, on a day-to-day basis, I find that the more relaxed approach of lists and maps accommodating different types does a better job of supporting me in the real world of data without requiring a lot of extra code. Dynamic typing can definitely come back to bite the programmer. Still, even knowing that I can turn static type checking on in Groovy, I bet I haven't done so more than a handful of times. Maybe my appreciation for Groovy comes from my work, which usually involves bashing a bunch of data into shape and then analyzing it; I'm certainly not your average developer. So is Groovy really a more Pythonic Java? Food for thought. + +I would love to see in both Java and Groovy a few more facilities like `average()` and `averagingDouble()`. Two-argument versions to produce weighted averages and statistical methods beyond averaging—like median, standard deviation, and so forth—would also be helpful. [Tabnine][8] offers interesting suggestions on implementing some of these. + +### Groovy resources + +The [Apache Groovy site][9] has a lot of great documentation. Other good sources include the reference page for [Groovy enhancements to the Java Collection class][10], the more tutorial-like introduction to [working with collections][11], and [Mr. Haki][12]. The [Baeldung site][13] provides a lot of helpful how-tos in Java and Groovy. And a really great reason to learn Groovy is to learn [Grails][14], a wonderfully productive full-stack web framework built on top of excellent components like Hibernate, Spring Boot, and Micronaut. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/maps-groovy-vs-java + +作者:[Chris Hermansen][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/clhermansen +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png +[2]: https://groovy-lang.org/ +[3]: https://opensource.com/article/22/3/maps-groovy-vs-java +[4]: https://datatables.net/ +[5]: https://groovy.apache.org/download.html +[6]: https://opensource.com/article/22/3/manage-java-versions-sdkman +[7]: https://projectlombok.org/features/Data +[8]: https://www.tabnine.com/code/java/methods/java.util.stream.Collectors/averagingDouble +[9]: https://groovy-lang.org/ +[10]: https://docs.groovy-lang.org/latest/html/groovy-jdk/java/util/Collection.html +[11]: https://groovy-lang.org/groovy-dev-kit.html#_working_with_collections +[12]: https://blog.mrhaki.com/ +[13]: https://www.baeldung.com/ +[14]: https://grails.org/ From d7e04666239b3f8574db3b9b90154aa8cb6cace7 Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 17:24:32 +0800 Subject: [PATCH 118/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020220610=20To=20Favor=20Microsoft=20VS=20Code,=20Micro?= =?UTF-8?q?soft-s=20GitHub=20is=20Killing=20GitHub-s=20Atom=20Editor.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... GitHub is Killing GitHub-s Atom Editor.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md diff --git a/sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md b/sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md new file mode 100644 index 0000000000..c10578130c --- /dev/null +++ b/sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md @@ -0,0 +1,80 @@ +[#]: subject: "To Favor Microsoft VS Code, Microsoft’s GitHub is Killing GitHub’s Atom Editor" +[#]: via: "https://news.itsfoss.com/atom-being-discontinued/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +To Favor Microsoft VS Code, Microsoft’s GitHub is Killing GitHub’s Atom Editor +====== +We all knew this day would be coming sooner or later. + +![Microsoft kills GitHub's Atom][1] + +Coder, coder in the hall, which is the best editor of them all! + +Sorry for the really cheesy opening line. I could not prevent myself from writing that. Just as we all could not prevent the certain demise of the most loved open source code editor of the last decade, Atom. + +### A brief history of Atom + +Atom, released in 2014 by the then independent Git Hub team, was a huge hit among the programmers. + +Its neat UI, features, and numerous add-ons made it the hot favorite of the developers. + +It continued its popular run despite getting tough competition from Microsoft’s recently open-sourced VS Code editor. + +Atom’s loyal fanbase didn’t budge despite the rising popularity of the VS Code until[Microsoft acquired GitHub in 2018][2]. + +People started wondering how long will Microsoft continue developing two similar projects that don’t make any money for it directly. + +In the last four years, it did seem that Atom was losing its charm. It didn’t have any significant feature development while VS Code got more attractive as features after features landed in every release. + +The writing was on the wall. Microsoft branded VS Code was being favored over Atom. + +Though I don’t have any stats to back my claim, it did seem that Atom’s userbase was declining in the last couple of years. VS Code is like the default editor for young developers. + +It was only time that Microsoft pulled the plug on Atom and it did that finally. + +### GitHub discontinues Atom + +On June 8, Microsoft-owned GitHub [announced][3] that it is going to archive the entire Atom project on December 15, 2022. + +> …we’ve decided to retire Atom in order to further our commitment to bringing fast and reliable software development to the cloud via Microsoft Visual Studio Code and GitHub Codespaces. + +The stated reason is the same we all know; “Atom has not had significant feature development for the past several years” and “focus on enhancing the developer experience in the cloud with GitHub Codespaces”. + +The Atom project was more than just an editor though. For good or bad, whatever you feel like, Atom also gave birth to Electron framework. + +> It’s worth reflecting that Atom has served as the foundation for the Electron framework, which paved the way for the creation of thousands of apps, including Microsoft Visual Studio Code, Slack, and our very own GitHub Desktop. However, reliability, security, and performance are core to GitHub, and in order to best serve the developer community, we are archiving Atom to prioritize technologies that enable the future of software development. + +### Atom dies a slow death and its fork will likely meet the same fate + +Atom is open source so it’s not going to ‘rest in peace’ immediately. It will be resurrected (read forked) for sure. + +However, even if someone forks the project and continues to keep it alive, it’s not going to match up to VS Code anymore. At best, it will get a few bug fixes and minor new features. That’s not entirely bad for the hard-core Atom lovers but it won’t attract newer, younger coders. + +Ultimately, the forked projects will also be shut down eventually. It’s not possible for a couple of volunteer developers to match the might of a billion-dollar organization with huge infrastructure. [Atom won’t get compared to VS Code][4] any longer. + +Atom will be missed. Maybe not by as many people as it would have been if it was to discontinue in 2018. The noose was tightened around its neck slowly and we all witnessed it. + +Anyway, are you still using Atom? Will you move to VS Code or choose some other non-Microsoft editor? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/atom-being-discontinued/ + +作者:[Abhishek][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/root/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/microsoft-kills-github-atom.png +[2]: https://itsfoss.com/microsoft-github/ +[3]: https://github.blog/2022-06-08-sunsetting-atom/ +[4]: https://itsfoss.com/visual-studio-code-vs-atom/ From fe36bbbe020f1a3bea63fef549e6b94da045876e Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 17:26:38 +0800 Subject: [PATCH 119/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220610=20Manage=20Flatpak=20Permission=20Using=20Fla?= =?UTF-8?q?tseal.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...anage Flatpak Permission Using Flatseal.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md diff --git a/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md b/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md new file mode 100644 index 0000000000..0101e22235 --- /dev/null +++ b/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md @@ -0,0 +1,113 @@ +[#]: subject: "Manage Flatpak Permission Using Flatseal" +[#]: via: "https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Manage Flatpak Permission Using Flatseal +====== +Learn how to manage Flatpak permission using the Flatseal app, which gives you a friendly GUI and additional features. + +Installing applications can be challenging in Linux from a new user standpoint. The primary reason is there are so many [Linux distributions][1]. And you need different installation methods or instructions for various Linux distributions. It can be overwhelming for some users. In addition, it’s also difficult for developers to create separate packages and builds for different distributions. + +### Flatpak solved this problem. How? + +It uses container tech so that the same application executable runs similarly on all Linux platforms. For example, one single executable can run in Ubuntu, Fedora, OpenSUSE, Arch Linux and many others. + +Moreover, the developers also spend fewer efforts on packaging the same app for different platforms. And they can concentrate on the app features rather than the distributions or deployments. + +In addition, Flatpak apps also get updates instantly, and you get the newest version as soon as it’s available. + +All these benefits also open up an important question. What is the permission a Flatpak app needs? How do you manage them easily? For example, one app may require only network access, not disk space. Or another may have access to take screenshots, but it might not be required at all. + +So, it is essential to review the permission of a Flatpak app. This is similar to your Android or iOS app permission. + +Finally, even if you are a new user, it’s not that difficult to manage and review the permissions, thanks to the graphical app – Flatseal. + +### What is Flatseal? + +Flatseal is a Flatpak application which gives you a friendly user interface to view and change permissions of all the Flatpak apps in your system. + +It is an excellent little app with an easy-to-use toggle button for each of the permission sections per application. Here’s how it looks (Figure 1). + +![Figure 1 – Flatseal App][2] + +### How do you use Flatseal to manage Flatpak Permission? + +When opening the Flatseal app, it should list all the Flatpak apps at the left navigation bar. And once you select one application, it shows the available permission settings in the main window at the right. + +Now, for each Flatpak permission control, the current value is shown in the toggle switch. If the permission is in use, it should be set. Otherwise, it should be greyed out. + +First, to set permission, you must navigate to your system’s application. Then, you can enable or disable any respective control from the permission list. + +Second, if you want to set a global control that applies to all the Flatpak in your system, you can choose “All Applications” at the left-top and apply the global setting (Figure 2). + +![Figure 2: Manage Flatpak Permission using Flatseal][3] + +It’s super easy. Isn’t it? + +### Example of Managing Flatpak Permission using Flatseal + +Let’s take an example. + +In my system, I have the above Flatpak installed (Figure 2). Let’s pick the Telegram Desktop app. Currently, the Telegram desktop does not have permission to access any home directory or user files (Figure 3). + +![Figure 3: Telegram Desktop Flatpak App does not have permission to the home folders][4] + +Now, if I want to permit all user files and any specific folder (e.g. /home/Downloads), you can give it by turning the enable switch on. See the Figure 4 below. + +![Figure 4: Permission changed of Telegram Desktop to give access to folders][5] + +Similarly, you can enable or disable the permission you want. Under the hood, Flatseal performs the internal Flatpak commands to achieve this. + +For example, the above scenario may translate to the following command. + +``` +flatpak override org.telegram.desktop --filesystem=/home/Downloads +``` + +And to remove: + +``` +flatpak override org.telegram.desktop --nofilesystem=/home/Downloads +``` + +There is also another cool feature of Flatseal which shows a small alert icon beside the user-specific permission changes (See Figure 4). + +### Can I install Flatseal in all Linux distributions? + +Yes, you can install [Flatseal][6] in all Linux Distributions as Flatpak. You can set up your system using [this guide][7] and run the following command to install. Or, [click here][8] to launch the system-specific installer directly. + +``` +flatpak install flathub com.github.tchx84.Flatseal +``` + +### Closing Notes + +I hope the above guide to managing Flatpak permission is easy enough for you to understand and start with Flatpak. It’s super easy to control and far easier to use. Also, you may want to visit our more Flatpak [guide here][9]. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/ + +作者:[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://www.debugpoint.com/category/distributions +[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/Flatseal-App.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Manage-Flatpak-Permission-using-Flatseal.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Telegram-Desktop-Flatpak-App-does-not-have-permission-to-the-home-folders.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/Permission-changed-of-Telegram-Desktop-to-give-access-to-folders.jpg +[6]: https://flathub.org/apps/details/com.github.tchx84.Flatseal +[7]: https://flatpak.org/setup/ +[8]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref +[9]: https://www.debugpoint.com/tag/flatpak/ From 9b3ee12b3cbf4ec3582a45ffe6f770512cf612dd Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 17:30:12 +0800 Subject: [PATCH 120/231] Delete 20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md --- ...fficially Be Terminated Later This Year.md | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md diff --git a/sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md b/sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md deleted file mode 100644 index 94ecc00027..0000000000 --- a/sources/news/20220609 Atom Text Editor Will Officially Be Terminated Later This Year.md +++ /dev/null @@ -1,41 +0,0 @@ -[#]: subject: "Atom Text Editor Will Officially Be Terminated Later This Year" -[#]: via: "https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/" -[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Atom Text Editor Will Officially Be Terminated Later This Year -====== -![github-cover][1] - -On December 15, Microsoft’s GitHub will shut down Atom, its open source text editor that inspired and influenced widely used commercial apps such as Microsoft Visual Studio Code, Slack, and GitHub Desktop. The social code company stated that it is doing so to focus on cloud-based software. - -GitHub Codespaces is a cloud-hosted development environment with Visual Studio Code integration. When Microsoft acquired Github in June 2018, Nat Friedman, the CEO at the time, reassured the GitHub community that Atom was still alive and well. - -Atom has come to a halt after four years of progress. Apart from maintenance and security updates, the project hasn’t seen significant feature development in several years, according to GitHub. Community involvement has declined during this time, and the business of locally installed software now appears less appealing than the potential recurring revenue, vendor lock-in, and information gathering enabled by cloud-based apps. - -The Atom shell – a separate component for integrating with Chromium, Node.js, and native APIs – was renamed Electron (a cross-platform app framework based on web tech) in 2015, and Microsoft began working with GitHub on Atom and Electron and what would become Visual Studio Code. - -That relationship has now followed the famous Microsoft model of embrace, extend, and extinguish, though Atom’s demise appears to be more like pushing dead weight out of a cloud-bound balloon than a strategically advantageous hit. - -Atom’s influence should be felt through the Electron framework. Electron.js is still the foundation for apps such as Discord, Skype, Slack, Trello, and Visual Studio Code, among others. However, technology evolves. Microsoft previously stated that it intends to abandon Electron in Teams. Other cross-platform frameworks, such as Flutter, Tauri, and Microsoft’s recently announced.NET Multi-platform App UI (.NET MAUI), may gain traction as well. - -Nonetheless, Atom is expected to operate past its December 15, 2022 decommissioning date. GitHub intends to archive the Atom repository, but the code is open source and available to anyone who wants to champion the project. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/ - -作者:[Laveesh Kocher][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/laveesh-kocher/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/github-cover-e1654769639273.jpg From c7c98ab61b1ddc0e30440ec1da5974535d68a9aa Mon Sep 17 00:00:00 2001 From: lkxed Date: Fri, 10 Jun 2022 22:37:08 +0800 Subject: [PATCH 121/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220610=20Run=20Windows=20Apps=20And=20Games=20Using?= =?UTF-8?q?=20WineZGUI=20On=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Apps And Games Using WineZGUI On Linux.md | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 sources/tech/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md diff --git a/sources/tech/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md b/sources/tech/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md new file mode 100644 index 0000000000..2b15be39c0 --- /dev/null +++ b/sources/tech/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md @@ -0,0 +1,181 @@ +[#]: subject: "Run Windows Apps And Games Using WineZGUI On Linux" +[#]: via: "https://ostechnix.com/winezgui-run-windows-apps-and-games-on-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Run Windows Apps And Games Using WineZGUI On Linux +====== +WineZGUI - A Wine GUI Frontend Using Zenity + +A while ago we wrote about **[Bottles][1]**, an opensource graphical application easily to run Windows software and Games on Linux operating systems. Today, we will discuss about a similar interesting project. Say hello to **WineZGUI**, a Wine GUI frontend to **[run windows apps and games with wine on Linux][2]**. + +#### Contents + +1. What Is WineZGUI? +2. Bottles Vs WineZGUI +3. How To Install WineZGUI In Linux +4. Run Windows Apps And Games With WineZGUI In Linux +5. Conclusion + +### What Is WineZGUI? + +WineZGUI is a collection of Bash scripts that allows you to easily manage wine prefixes and provides easier wine gaming experience on Linux using **Zenity**. + +Using WineZGUI, we can directly launch the Windows exe files or games from File manager without installing them. + +WineZGUI creates shortcut for each application or game for easier access and also creates separate prefixes for each exe binary file. + +When you launch a Windows exe file with WineZGUI, it will prompt you whether to use the default wine prefix or create a new one. The default prefix is `~/.local/share/winezgui/default`. + +If you choose to create a new prefix for the windows binary or exe, WineZGUI will try to extract the product name and icon from the exe file and it creates a desktop shortcut. + +When you launch the same exe or binary file later, it will recommend you to run it with the associated prefix earlier. + +To put this layman terms, WineZGUI is simply a Wine and winetricks simple GUI for official vanilla wine. Wine prefix setup is automatic when we launch an exe to play a game. + +You simply open an exe and it creates a prefix and a desktop shortcut with name and icon extracted from that exe. + +It uses **exiftool** and **icotool** utilities to extract the name and icon respectively. Either you can open an exe to launch that game from existing prefix, or use desktop shortcut. + +WineZGUI is a shell script that is freely hosted in GitHub. You can grab the source code, improve it, fix bugs and add features. + +### Bottles Vs WineZGUI + +You might wonder how does WineZGUI compare with Bottles. There is a subtle difference between these applications though. + +**Bottles is prefix oriented** and **runner oriented**. Meaning - Bottles first creates a prefix then use different exe files with it. Bottles does not remember exe's prefix. Bottles uses different runners. + +**WineZGUI is exe oriented**. It uses exe to create one prefix for that exe only. Next time we open an exe, it will ask whether to launch with existing exe prefix. + +WineZGUI does not offer advanced features like **bottles** or **[lutris][3]** do, like runners, online installers, etc. + +### How To Install WineZGUI In Linux + +Make sure you have installed the necessary prerequisites for WineZGUI. + +**Debian/Ubuntu:** + +``` +$ sudo dpkg --add-architecture i386 +$ sudo apt install zenity wine winetricks libimage-exiftool-perl icoutils gnome-terminal +``` + +**Fedora:** + +``` +$ sudo dnf install zenity wine winetricks perl-Image-ExifTool icoutils gnome-terminal +``` + +The officially recommended way to install WineZGUI is by using **[Flatpak][4]**. + +After installing Flatpak, run the following commands one by one to install WineZGUI in Linux. + +``` +$ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +``` +$ flatpak --user -y install flathub org.winehq.Wine/x86_64/stable-21.08 +``` + +``` +$ wget https://github.com/fastrizwaan/WineZGUI-Releases/releases/download/WineZGUI-0.4_20220608/io.github.WineZGUI_0_4_20220608.flatpak +``` + +``` +$ flatpak --user -y install io.github.WineZGUI_0_4_20220608.flatpak +``` + +### Run Windows Apps And Games With WineZGUI In Linux + +Launch WineZGUI from Dash or Menu. + +![Launch WineZGUI][5] + +This is how the default interface of WineZGUI looks like. + +![WineZGUI Interface][6] + +As you can see in the above screenshot, WineZGUI interface is very simple and easy to understand. From the main window, you can, + +* Open an EXE file, +* Open Winetricks GUI and CLI, +* Launch Wine configuration, +* Launch explorer, +* Open BASH shell, +* Kill all apps/games including WineZGUI interface, +* Delete wine prefix, +* View installed WineZGUI version. + +For the purpose of the demonstration, I am going to open an .exe file. + +In the next window, choose the EXE file to run. In my case, it is WinRAR. + +![Choose The EXE File To Run][7] + +Next, whether you want to run the EXE file with default prefix or create a new prefix. I choose default prefix. + +![Run WinRAR With Default Prefix][8] + +A few seconds later, the WinRAR setup wizard will appear. Click Install to continue. + +![Install WinRAR In Linux][9] + +Click OK to complete the WinRAR installation. + +![Complete WinRAR Installation][10] + +Click "Run WinRAR" to launch it. + +![Run WinRAR][11] + +Here is WinRAR running in my Fedora 36 desktop! + +![WinRAR Is Running In Fedora Using Wine][12] + +### Conclusion + +WineZGUI is a newcomer to the club. If you're looking for an easier way to run Windows apps and games using Wine on a Linux desktop, WineZGUI might be a good choice. + +With the help of WineZGUI, the users have an option to create a wine prefix right at same folder as the `.exe` and creating a relatively-linked `.desktop` entry to automatically do so. + +The reason being that it's easier to back up and delete a game along with the wine prefix, and having it generate a `.desktop` would make it resilient to being moved and transferred. + +A cool use-case would be to setup using the app, then share the wine prefix to your friend and others who just want a working wine prefix with all the dependencies, saves, etc. + +Give it a try and let us know what do you think about this project in the comment section below. + +**Resource:** + +* [WineZGUI GitHub Repository][13] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/winezgui-run-windows-apps-and-games-on-linux/ + +作者:[sk][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://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/run-windows-software-on-linux-with-bottles/ +[2]: https://ostechnix.com/run-windows-games-softwares-ubuntu-16-04/ +[3]: https://ostechnix.com/manage-games-using-lutris-linux/ +[4]: https://ostechnix.com/how-to-install-and-use-flatpak-in-linux/ +[5]: https://ostechnix.com/wp-content/uploads/2022/06/Launch-WineZGUI.png +[6]: https://ostechnix.com/wp-content/uploads/2022/06/WineZGUI-Interface.png +[7]: https://ostechnix.com/wp-content/uploads/2022/06/Choose-The-EXE-File-To-Run.png +[8]: https://ostechnix.com/wp-content/uploads/2022/06/Run-WinRAR-With-Default-Prefix.png +[9]: https://ostechnix.com/wp-content/uploads/2022/06/Install-WinRAR-In-Linux.png +[10]: https://ostechnix.com/wp-content/uploads/2022/06/Complete-WinRAR-Installation.png +[11]: https://ostechnix.com/wp-content/uploads/2022/06/Run-WinRAR.png +[12]: https://ostechnix.com/wp-content/uploads/2022/06/WinRAR-Is-Running-In-Fedora-Using-Wine.png +[13]: https://github.com/fastrizwaan/WineZGUI From 93e1d2e49ac74c7df5ec50ca754fe4f92a3811ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 11 Jun 2022 09:50:43 +0800 Subject: [PATCH 122/231] Translated --- ...cy Mode In Ubuntu 22.04 - 20.04 - 18.04.md | 273 ------------------ ...cy Mode In Ubuntu 22.04 - 20.04 - 18.04.md | 273 ++++++++++++++++++ 2 files changed, 273 insertions(+), 273 deletions(-) delete mode 100644 sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md create mode 100644 translated/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md diff --git a/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md b/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md deleted file mode 100644 index 0824725cdf..0000000000 --- a/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md +++ /dev/null @@ -1,273 +0,0 @@ -[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04" -[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/" -[#]: author: "sk https://ostechnix.com/author/sk/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04 -====== -This tutorial explains how to boot into **rescue mode** or **emergency mode**in Ubuntu 22.04, 20.04 and 18.04 LTS editions. - -As you might already know, **Runlevels** are replaced with **Systemd targets** in many Linux distributions such as RHEL 7 / RHEL 8 and Ubuntu 16.04 LTS and newer versions. For more details about runlevels and systemd target, refer to [this guide][1]. - -This guide is specifically written for Ubuntu, however the steps given below should work on most Linux distributions that use **Systemd** as the default service manager. - -Before getting into the topic, let us have a brief understanding about what is rescue mode and emergency mode and what is the purpose of these both modes. - -### What Is Rescue Mode? - -The **rescue mode** is equivalent to **single user mode** in Linux distributions that use **SysV** as the default service manager. In rescue mode, all local filesystems will be mounted, only some important services will be started. However, no normal services (E.g network services) won't be started. - -The rescue mode is helpful in situations where the system can't boot normally. Also, we can perform some important rescue operations, such as [reset root password][2], in rescue mode. - -### What Is Emergency Mode? - -In contrast to the rescue mode, nothing is started in the **emergency mode**. No services are started, no mount points are mounted, no sockets are established, nothing. All you will have is just a **raw shell**. Emergency mode is suitable for debugging purposes. - -First, we will see how to boot into rescue mode and emergency mode in Ubuntu 22.04 and 20.04 LTS distributions. The procedure for entering rescue mode in Ubuntu 22.04 and 20.04 LTS is exactly the same! - -### Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS - -We can boot into rescue mode in two ways. - -#### Method 1 - -Power on your Ubuntu system. Hit the ESC key right after the BIOS logo disappears to display the Grub menu. - -In the GRUB menu, choose the first entry and press **"e"** to edit it. - -![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3] - -Hit the DOWN arrow and find the line that starts with the word **"linux"** and add the following line at the end of it. To reach the end, just press **CTRL+e** or use the **END** key or **LEFT/RIGHT** arrows in your keyboard. - -``` -systemd.unit=rescue.target -``` - -![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4] - -After adding the above line, hit **Ctrl+x** or**F10** to boot into rescue mode. - -After a few seconds, you will be landed in the rescue mode (single user mode) as root user. You will be prompted to press ENTER to enter the maintenance mode. - -Here is how rescue mode looks like in Ubuntu 22.04 / 20.04 LTS systems: - -![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5] - -Now do whatever you want to do in the rescue mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in rescue mode. - -``` -mount -n -o remount,rw / -``` - -![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6] - -Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode. - -``` -systemctl default -``` - -Or, - -``` -exit -``` - -If you want to reboot the system instead of booting into normal mode, enter: - -``` -systemctl reboot -``` - -#### Method 2 - -In this method, you don't need to edit the grub boot menu entries. - -Power on the system and choose **"Advanced options for Ubuntu"** from the Grub boot menu. - -![Choose Advanced Options For Ubuntu From Grub Boot Menu][7] - -Next, you will see the list of available Ubuntu versions with Kernel versions. Choose the **"Recovery mode"** in the grub boot menu in Ubuntu. - -![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8] - -After a few seconds, you will see the Ubuntu recovery menu. From the recovery menu, choose **"Drop to root shell prompt"** option and hit the ENTER key. - -![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9] - -Now you will be landed in the rescue mode. - -![Ubuntu Maintenance Mode][10] - -Mount the root (**/**) file system in read/write mode by entering the following command: - -``` -mount -n -o remount,rw / -``` - -![Mount Root File System In Read Write Mode In Ubuntu][11] - -Do whatever you want to do in the rescue mode. - -Once done, type exit to return back to the recovery menu. - -``` -exit -``` - -Finally, choose **"Resume normal boot"** option and hit the ENTER key. - -![Boot Into Normal Mode In Ubuntu][12] - -Press ENTER key again to exit recovery mode and continue booting into normal mode. - -![Exit The Recovery Mode In Ubuntu][13] - -If you don't want to boot into normal mode, type **"reboot"** and press ENTER from the maintenance mode to restart your system. - -### Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS - -When the GRUB boot menu appears, press **"e"** to edit it. - -![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14] - -Find the line that starts with the word **"linux"** and add the following line at the end of it. - -``` -systemd.unit=emergency.target -``` - -![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15] - -After adding the above line, hit **Ctrl+x** or**F10** to boot into emergency mode. - -After a few seconds, you will be landed in the emergency mode as `root` user. You will be prompted to press ENTER to enter the maintenance mode. - -Here is how emergency mode looks like in Ubuntu 22.04 / 20.04 LTS system: - -![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16] - -Now do whatever you want to do in the emergency mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in this mode. - -``` -mount -n -o remount,rw / -``` - -Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode. - -``` -systemctl default -``` - -Or, - -``` -exit -``` - -If you want to reboot the system instead of booting into normal mode, enter: - -``` -systemctl reboot -``` - -### Boot Into Rescue Mode In Ubuntu 18.04 LTS - -Boot your Ubuntu system. When the Grub menu appears, choose the first entry and press **e** to edit. (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard): - -![Grub Menu][17] - -If you don't see the Grub menu, just hit ESC key right after the BIOS logo disappears. - -Find the line that starts with word **"linux"**and add the following line at the end of that line (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard): - -``` -systemd.unit=rescue.target -``` - -![Edit Grub Menu][18] - -Once you added the above line, just press **CTRL+x** or **F10** to continue to boot into rescue mode. After a few seconds, you will be landed in the rescue mode (single user mode) as root user. - -Here is how rescue mode looks like in Ubuntu 18.04 LTS server: - -![Ubuntu Rescue Mode][19] - -Next, type the following command to mount root (**/**) file system into read/write mode. - -``` -mount -n -o remount,rw / -``` - -### Boot Into Emergency Mode - -Booting your Ubuntu into emergency is as same as above method. All you have to do is replace **"systemd.unit=rescue.target"** with **"systemd.unit=emergency.target"** when editing grub menu. - -![Edit Grub Menu][20] - -Once you added "systemd.unit=emergency.target", press **Ctrl+x** or **F10** to continue booting into emergency mode. - -![Ubuntu Emergency Mode][21] - -Finally, you can mount root filesystem into read/write mode with command: - -``` -mount -n -o remount,rw / -``` - -### Switch Between Rescue And Emergency Modes - -If you are in rescue mode, you don't have to edit the grub boot entry as I mentioned above. Instead, just type the following command to switch to emergency mode instantly: - -``` -systemctl emergency -``` - -Similarly, to switch from emergency to rescue mode, type: - -``` -systemctl rescue -``` - -### Conclusion - -You know now what is rescue and emergency modes and how to boot into those modes in Ubuntu 22.04, 20.04 and 18.04 LTS systems. Like I already mentioned, the steps provided here will work on many recent Linux versions that uses Systemd. - --------------------------------------------------------------------------------- - -via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ - -作者:[sk][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://ostechnix.com/author/sk/ -[b]: https://github.com/lkxed -[1]: https://ostechnix.com/check-runlevel-linux/ -[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/ -[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png -[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png -[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png -[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png -[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png -[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png -[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png -[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png -[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png -[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png -[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png -[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png -[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png -[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png -[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png -[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png -[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png -[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png -[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png diff --git a/translated/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md b/translated/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md new file mode 100644 index 0000000000..ea5639d149 --- /dev/null +++ b/translated/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md @@ -0,0 +1,273 @@ +[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04" +[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + 如何在 Ubuntu 22.04 / 20.04 / 18.04 中启动到 救援Rescue 模式 或 紧急Emergency 模式 +====== +这篇教程将介绍如何在 Ubuntu 22.04、20.04 和 18.04 LTS 版本中启动到 救援Rescue 模式 或 紧急Emergency 模式。 + +你可能已经知道,在 Linux 发行版中 **运行等级Runlevels** 已经被 **系统目标Systemd targets** 所替代,例如, RHEL 7 、RHEL 8 、Ubuntu 16.04 LTS 及其更新的版本。更多关于 运行等级Runlevels系统目标Systemd targets 的信息,参考 [这篇指南][1] 。 + +这篇指南是针对 Ubuntu 编写的,但是,下面所给的步骤应该也适用于大多数使用 **Systemd** 作为默认服务管理器的 Linux 发行版。 + +在进入主题前,让我们简单的理解:什么是 救援rescue 模式 和 紧急Emergency 模式,以及这两种模式的目的是什么。 + +### 什么是 救援rescue 模式? + +在 Linux 发行版中,救援rescue 模式 等效于 单用户single user 模式,它使用 **SysV** 作为默认的服务器管理器。在 救援rescue 模式 中,将挂载所有的本地文件系统,将仅启动一些重要的服务。但是,不会启动一般的服务 (例如,网络服务)。 + +救援rescue 模式 在不能正常启动系统的情况下是很有用的。此外,我们可以在 救援rescue 模式 下执行一些重要的 救援rescue 操作,例如,[重新设置 root 密码][2] 。 + +### 什么是 紧急Emergency 模式? + +与 救援rescue 模式相比, 在 紧急Emergency 模式中,不会启动任何的东西。不会启动服务,不会挂载挂载点,不会建立套接字,什么都不会启动。你将所拥有的只是一个 **原始的 shell** 。紧急Emergency 模式适用于调试目的。 + +首先,我们将看到如何在 Ubuntu 22.04 和 20.04 LTS 发行版中启动到 救援Rescue 模式 或 紧急Emergency 模式。在 Ubuntu 22.04 和 20.04 LTS 中进入 救援rescue 模式 的过程是完全相同的! + +### 在 Ubuntu 22.04 / 20.04 LTS 中启动到 救援rescue 模式 + +我们可以使用两种方法来启动到 救援rescue 模式。 + +#### 方法 1 + +打开你的 Ubuntu 系统。在 BIOS 徽标出现后,按下 ESC 按键来显示 GRUB 菜单。 + +在 GRUB 菜单中,选择第一项,并按下 **"e"** 按键来编辑它。 + +![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3] + +按下 **下箭头** 按键,并找到以单词 **"linux"** 开头的一行代码,并在其结尾处添加下面的一行代码。为到达其结尾处,只需要按下 **CTRL+e** 组合键,或使用你键盘上的 **END** 按键或 **左箭头/右箭头** 按键。 + +``` +systemd.unit=rescue.target +``` + +![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4] + +在添加上面的代码行后,按下 **Ctrl+x** 组合键 或按下 **F10** 按键来启动到 救援rescue 模式. + +数秒后,你将作为 root 用户来登陆到 救援rescue 模式 (单用户single user 模式) 。将会提示你按下 回车ENTER 按键来进入维护模式。 + +下图是 Ubuntu 22.04 / 20.04 LTS 系统的 救援rescue 模式 的样子: + +![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5] + +现在,在 救援rescue 模式 中做你想做的任何事。在 救援rescue 模式 中,在你执行任何操作前,你可能需要以 读/写 模式 的方式来挂载 root (**/**) 文件系统。 + +``` +mount -n -o remount,rw / +``` + +![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6] + +在完成后,按下 **"Ctrl+d"** 组合键来启动到正常模式。或者,你可以输入下面的任意一个命令来启动到正常模式。 + +``` +systemctl default +``` + +或者, + +``` +exit +``` + +如果你想重新启动系统,而不是启动到正常的模式,输入: + +``` +systemctl reboot +``` + +#### 方法 2 + +在这种方法中,你不需要编辑 GRUB 启动菜单项目。 + +打开系统电源,并从 GRUB 启动菜单中选择 Ubuntu 高级选项Advanced options for Ubuntu。 + +![Choose Advanced Options For Ubuntu From Grub Boot Menu][7] + +接下来,你将看到一个带有内核版本的可用的 Ubuntu 版本的列表。在 Ubuntu 中的 GRUB 启动菜单中选择 恢复Recovery 模式。 + +![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8] + +数秒后,你将看到 Ubuntu 的 恢复Recovery 菜单。从 恢复Recovery 菜单中,选择 **进入 root 的 shell 提示符Drop to root shell prompt** 选项 ,并按下 回车ENTER 按键。 + +![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9] + +现在,你将登陆到 救援rescue 模式。 + +![Ubuntu Maintenance Mode][10] + +通过输入下面的命令来 以 读/写 模式的方式 来挂载 root (**/**) 文件系统: + +``` +mount -n -o remount,rw / +``` + +![Mount Root File System In Read Write Mode In Ubuntu][11] + +在 救援rescue 模式 中做你想做的任何事。 + +在完成后,输入 **exit** 来返回到 恢复Recovery 菜单。 + +``` +exit +``` + +最后,选择 **救援正常启动Resume normal boot** 选项,并按下 回车ENTER 按键。 + +![Boot Into Normal Mode In Ubuntu][12] + +再次按下 回车ENTER 按键来退出 恢复Recovery 模式,并继续启动到正常模式。 + +![Exit The Recovery Mode In Ubuntu][13] + +如果你不想启动到正常模式,输入 **reboot** 并从维护模式中按下 回车ENTER 按键来重新启动你的系统。 + +### 在 Ubuntu 22.04 / 20.04 LTS 中启动到 紧急Emergency 模式 + +当 GRUB 菜单出现时,按下 **"e"** 按键来编辑它。 + +![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14] + +找到以单词 **"linux"** 开头的一行代码,并在其结尾处添加下面的一行代码。 + +``` +systemd.unit=emergency.target +``` + +![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15] + +在添加上面的代码行后,按下 **Ctrl+x** 组合键,或按下 **F10** 按键来启动到 紧急Emergency 模式。 + +数秒后,你将作为 `root` 用户来登陆到 紧急Emergency 模式。将会提示你按下 回车ENTER 按键来进入维护模式。 + +下图是 Ubuntu 22.04 / 20.04 LTS 系统的 紧急Emergency 模式 的样子: + +![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16] + +现在,在 紧急Emergency 模式 中做你想做的任何事。在 紧急Emergency 模式 中,在你执行任何操作前,你可能需要以 读/写 模式 的方式来挂载 root (**/**) 文件系统。 + +``` +mount -n -o remount,rw / +``` + +在完成后,按下 **"Ctrl+d"** 组合键来启动到正常模式。或者,你可以输入下面的任意一个命令来启动到正常模式。 + +``` +systemctl default +``` + +或者, + +``` +exit +``` + +如果你想重新启动系统,而不是启动到正常的模式,输入: + +``` +systemctl reboot +``` + +### 在 Ubuntu 18.04 LTS 中启动到 救援rescue 模式 + +启动你的 Ubuntu 系统。当 GRUB 菜单出现时,选择第一项并按下按键 **"e"** 来编辑。(为到达其结尾处,只需要按下 **CTRL+e** 组合键,或使用你键盘上的 **END** 按键或 **左箭头/右箭头** 按键): + +![Grub Menu][17] + +如果你没有看到 GRUB 菜单,只需要在 BIOS 徽标出现后,按下 ESC 按键来显示 GRUB 菜单。 + +找到以单词 **"linux"** 开头的一行代码,并在其结尾处添加下面的一行代码 (为到达其结尾处,只需要按下 **CTRL+e** 组合键,或使用你键盘上的 **END** 按键或 **左箭头/右箭头** 按键): + +``` +systemd.unit=rescue.target +``` + +![Edit Grub Menu][18] + +在添加上面的代码行后,只需要按下 **Ctrl+x** 组合键,或按下 **F10** 按键来启动到 救援rescue 模式。数秒后,你将作为 `root` 用户来登陆到 救援rescue 模式 (单用户single user 模式) 。 + +下图是 Ubuntu 18.04 LTS 服务器 系统的 救援rescue 模式 的样子: + +![Ubuntu Rescue Mode][19] + +接下来,输入下面的命令来挂载 root (**/**) 文件系统为 读/写 模式。 + +``` +mount -n -o remount,rw / +``` + +### 启动到 紧急Emergency 模式 + +启动你的 Ubuntu 到 紧急Emergency 模式 基本与上述方法相同。你所需要做的全部工作是,在编辑 GRUB 菜单时,将 **"systemd.unit=rescue.target"** 替换为 **"systemd.unit=emergency.target"** 。 + +![Edit Grub Menu][20] + +在你添加 "systemd.unit=emergency.target" 后,按下 **Ctrl+x** 组合键,或按下 **F10** 按键来启动到 紧急Emergency 模式。 + +![Ubuntu Emergency Mode][21] + +最后,你可以使用下面的命令来以 读/写 模式的方式 来挂载 root (**/**) 文件系统: + +``` +mount -n -o remount,rw / +``` + +### 在 救援rescue 模式 和 紧急Emergency 模式 之间切换 + +如果你正在 救援rescue 模式 中,你不必像我上述提到的那样来编辑 GRUB 的菜单启动项。相反,你只想要输入下面的命令来立刻切换到 紧急Emergency 模式: + +``` +systemctl emergency +``` + +同样,为从 紧急Emergency 模式 切换到 救援rescue 模式,输入: + +``` +systemctl rescue +``` + +### 总结 + +现在,你知道了什么是 救援Rescue 模式 和 紧急Emergency 模式,以及如何在 Ubuntu 22.04 、20.04 和 18.04 LTS 系统中启动到这些模式。 正如我已经提到的,在这里提供的这些步骤应该也适用于大多数当前使用 **Systemd** 作为默认服务管理器的 Linux 发行版。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/check-runlevel-linux/ +[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png +[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png +[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png +[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png +[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png +[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png +[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png +[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png +[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png +[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png +[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png +[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png +[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png +[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png +[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png +[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png +[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png +[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png From 98cf738392397120adce8c341385a54d88941a01 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Jun 2022 11:18:17 +0800 Subject: [PATCH 123/231] RP @robsean https://linux.cn/article-14695-1.html --- ... Updated Desktop Environments, and More.md | 100 ++++++++++++++++++ ... Updated Desktop Environments, and More.md | 99 ----------------- 2 files changed, 100 insertions(+), 99 deletions(-) create mode 100644 published/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md delete mode 100644 translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md diff --git a/published/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/published/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md new file mode 100644 index 0000000000..740bfc4082 --- /dev/null +++ b/published/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md @@ -0,0 +1,100 @@ +[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More" +[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14695-1.html" + +openSUSE Leap 15.4 发布版本添加了 Leap Micro 5.2、更新桌面环境等等 +====== + +> 为奋起直追 SUSE Linux Enterprise 的 SP 4 ,openSUSE Leap 15.4 到来了,带来了新的升级和极其重要的改善。 + +![opensuse 15.4][1] + +即将到来的 openSUSE 小发布版本终于来了。如果你使用 openSUSE 作为你日常使用的桌面或服务器版本,你现在可能已经测试候选版本好几周了。 + +openSUSE Leap 15.4 的重点是软件包的更新,用以奋起直追 SUSE Linux Enterprise 的 SP 4 。因此,你将注意到一些弃用的软件包,以及可用于替换它们的新的升级。 + +当然,你应该有一些可用的软件包来确保兼容性。但是,大多数较旧的版本已经被移除。 + +### openSUSE Leap 15.4: 有什么新的变化? + +为与最新的 SUSE Linux Enterprise(SLE)相适应,像 Python 2 和 KDE 4 一样的软件包已经被移除。你可以在这次的发布版本中找到较新的桌面环境。 + +此外,在容器和 AI/ML 用例方面,更新了 Podman、Containerd、Tensorflow 和 Grafana。 + +#### Leap Micro 5.2 + +Leap Micro 是针对容器和虚拟化工作负载定制的轻量级操作系统的最新版本。它也是 Leap 版的 [MicroOS][2],是 Tumbleweed 的一种变体,提供了自动管理和修补。 + +#### 桌面环境 + +Xfce 4.16 继续保留,但你可以找到主要功能的一些新补充,包括新图标和调色板。 + +Xfce 4.16 中的设置管理器也获得了视觉上的刷新。类似地,文件管理器(Thunar)也有一些改善,新的状态托盘插件的深色模式支持等等。 + +KDE 4 软件包已经被弃用,Plasma 5.24 LTS 已经作为长期支持版本中包含于其中。 + +要深入了解这些变化,你可以查看我们之前针对 [KDE Plasma 5.24 LTS][3] 的报道。总体来说,新的 KDE Plasma 体验应该会令桌面用户赞叹。 + +说到 GNOME,你可以发现包含在 openSUSE Leap 15.4 中的 GNOME 41 带来了一系列的改善和新的特色功能。了解更多关于 [GNOME 41][4] 的信息,你可以期待它的一些新的特色功能。 + +对于其它的可用的桌面环境来说,Leap 15.4 包括: + +* MATE 桌面环境 1.26 +* Enlightenment 桌面环境0.25.3 +* 深度桌面环境 20.3 + +#### 弃用的软件包 + +移除了一些基础的软件包,包括 Python 2(生命终结)、Digikam、TensorFlow 1.x 和 Qt 4 等软件包。 + +在更新系统后,你可以使用 Qt 5 和 Plasma 5 。 + +#### 更新的软件包 + +很多重要的软件包在 Leap 15.4 中得到了更新,包含一些流行的软件包: + +* TensorFlow 2.6.2 +* Podman 3.4.4 +* GNU Health 4.0 +* sudo 1.9.9 +* systemd 249.10 +* AppArmor 3.04 +* DNF 4.10.0 +* LibreOffice 7.2.5 + +因此,你应该会注意到一些针对服务器用户和桌面用户的各种应用程序的有用更新。很多多媒体应用程序,像 VLC、GNOME MPV 等,都得到了升级。 + +#### 其它改善 + +随着基本软件的更新和清理,你也可以找到一个由 SUSE 维护的较新的 Linux 内核 5.14.21。 + +更新后的内核对硬件的支持应该会有改善。 + +更多信息,你可以参考针对 [openSUSE Leap 15.4][5] 的发布版本说明。 + +> **[下载 openSUSE Leap 15.4][6]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/opensuse-leap-15-4-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[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/wp-content/uploads/2022/06/opensuse-leap-15-4.jpg +[2]: https://microos.opensuse.org/ +[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[4]: https://news.itsfoss.com/gnome-41-release/ +[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes +[6]: https://get.opensuse.org/leap/15.4/ diff --git a/translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md deleted file mode 100644 index c6ab275f1c..0000000000 --- a/translated/news/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More" -[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -openSUSE Leap 15.4 发布版本添加了 Leap Micro 5.2、更新桌面环境等等 -====== -为奋起直追 SUSE Linux Enterprise 的 Service Pack 4 ,openSUSE Leap 15.4 到来了,带来了新的升级和极其重要的改善。 - -![opensuse 15.4][1] - -即将到来的 openSUSE 小发布版本终于要来了。如果你使用 OpenSUSE 作为你日常驱动的桌面或服务器版本,你现在可能已经测试候选版本好几周了。 - -openSUSE Leap 15.4 专注于软件包的更新,用以奋起直追 SUSE Linux Enterprise 的 Service Pack 4 。因此,你将注意到一些弃用的软件包,以及可用于替换它们的新的升级。 - -当然,你应该有一些可用的软件包来确保兼容性。但是,大多数较旧的版本已经被移除。 - -### openSUSE Leap 15.4: 有什么新的变化? - -为与最新的 SUSE Linux Enterprise (SLE) 相适应,像 Python 2 和 KDE 4 一样的软件包已经被移除。你可以在这次的发布版本中找到较新的桌面环境。 - -此外,在容器和 AI/ML 用例方面,更新 podman、containerd、Tensorflow 和 Grafana。 - -#### Leap Micro 5.2 - -Leap Micro 是针对容器和虚拟化工作负载定制的轻量级操作系统的最新版本。它也是一个针对 leap 的 [MicroOS][2] 的新作品,它是 Tumbleweed 的一种变体, 提供自动地管理和修补。 - -#### 桌面环境 - -Xfce 4.16 继续保留,但是你可以找到下一个主要版本中的一些的特色功能,包括新图标和调色板。 - -在 Xfce 4.16 中的设置管理器也获得了视觉上的刷新。类似地,文件管理器 (Thunar) 也有一些改善,暗黑模式支持一个新的状态托盘插件等等。 - -KDE 4 软件包已经被弃用,Plasma 5.24 LTS 已经包含在一个 LTS 发布版本中。 - -为探索这些更改,你可以查看我们针对 [KDE Plasma 5.24 LTS][3] 的原始的新闻报道。总得来说,新的 KDE Plasma 体验应该会令桌面用户赞叹。 - -当它来到 GNOME 时,你可以发现包含在 openSUSE Leap 15.4 中的 GNOME 41 带来了一系列的改善和新的特色功能。了解更多关于 [GNOME 41][4] 的信息来知道你可以期待哪些新的特色功能。 - -对于其它的可用的桌面环境来说,Leap 15.4 包括: - -* MATE 桌面环境 1.26 -* Enlightenment 桌面环境0.25.3 -* 深度Deepin 桌面环境 20.3 - -#### 弃用的软件包 - -一些极其重要的软件包已经被移除,包括 python 2 (生命终结)、digika、tensorflow 1.x 和 Qt 4 等软件包。 - -在更新系统后,你将找到可用的 Qt 5 和 Plasma 5 。 - -#### 更新的软件包 - -针对 Leap 15.4 更新了很多重要的软件包, 包含一些流行的软件包: - -* TensorFlow 2.6.2 -* podman 3.4.4 -* GNU Health 4.0 -* sudo 1.9.9 -* systemd 249.10 -* AppArmor 3.04 -* DNF 4.10.0 -* LibreOffice 7.2.5 - -因此,你应该会注意到一些有用的针对服务器用户和桌面用户的各种各样的应用程序的更新的升级。很多多媒体应用程序,像 VLC、GNOME MPV 等,都接受到了升级。 - -#### 其它改善 - -随着极其重要的软件的更新和清理,你也可以找到一个较新的由 SUSE 维护的 Linux 内核 5.14.21 版本。 - -随着内核的更新,硬件的支持也会带来改善。 - -更多信息,你可以参考针对 [openSUSE Leap 15.4][5] 的发布版本说明。 - -[下载 openSUSE Leap 15.4][6] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/opensuse-leap-15-4-release/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[robsean](https://github.com/robsean) -校对:[校对者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/06/opensuse-leap-15-4.jpg -[2]: https://microos.opensuse.org/ -[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ -[4]: https://news.itsfoss.com/gnome-41-release/ -[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes -[6]: https://get.opensuse.org/leap/15.4/ From e1d273314470eb8e1d99d30464b017c80179aa0d Mon Sep 17 00:00:00 2001 From: lkxed Date: Sat, 11 Jun 2022 13:32:31 +0800 Subject: [PATCH 124/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220611=20Don-t=20Be=20Afraid=20of=20Linux=20Terminal?= =?UTF-8?q?.=20Embrace=20it..md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Afraid of Linux Terminal. Embrace it..md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md diff --git a/sources/tech/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md b/sources/tech/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md new file mode 100644 index 0000000000..4d7f707a1d --- /dev/null +++ b/sources/tech/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md @@ -0,0 +1,144 @@ +[#]: subject: "Don’t Be Afraid of Linux Terminal. Embrace it." +[#]: via: "https://itsfoss.com/love-thy-terminal/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Don’t Be Afraid of Linux Terminal. Embrace it. +====== +Most of our focus goes into avoiding the Linux terminal, at least, for new users comfortable with Graphical User Interfaces (GUIs). + +While it is good to make things easy and convenient, there are a few reasons why you should not be afraid of dipping your toes into the Linux terminal. + +Here, I shall highlight some of them to encourage you to try a few things in the terminal that should help you eventually. + +### 1. Quick Access to Information on Commands + +![quick info terminal][1] + +At times, you may need to use a command in the terminal to perform something. Sure, you can just copy-paste without knowing what it actually does. + +But, what if you are interested to know a bit more about the command? + +Well, you just need to type in: + +``` +man +``` + +For instance: man apt + +It will give you all the essential details right on the same screen, without needing an internet connection or scouring the web to find out what it does. You save time, you get to know stuff. + +And, that makes things convenient, giving you more confidence in using the terminal. + +These are often referred to as “man pages”. You can read one of our resources to[learn about man pages on Linux][2]. + +Thanks to the terminal. + +### 2. Troubleshooting Problems + +![troubleshoting illustration][3] + +When you search for a fix on the internet, most of the solutions provide you with commands to get it fixed. + +Hence, one of the best use-cases of the terminal is to resolve several system issues quite easily. You will have to be careful here, because + +While there are things that you can tweak around with GUI programs, the majority of the easy fixes go through the terminal. + +Considering we have several [troubleshooting guides][4] on our portal, some examples include: + +* [Checking network adapter manufacturer][5] +* [Fixing long shutdown time][6] +* [Fix no Wi-Fi with broadcom adapters][7] + +### 3. Easily Work With a Remote Server + +![remote server illustration][8] + +You will end up accessing the command line (or the terminal) to access a remote server and perform various operations, including file transfers. + +Compared to a GUI method for a remote server, you minimize bandwidth issues and ensure that you get to perform anything you need faster using the Linux terminal. + +There are also options to open a GUI program on the remote server via the terminal. Even if it is slow, the terminal gives you plenty of abilities to interact comfortably with a remote server. + +### 4. Resource Efficient + +It does not matter whether you use one of the [best Linux distributions][9], a Linux terminal is always resource-efficient and consumes the least amount of memory. + +If you are low on resources or may have a graphics driver conflict with a GUI program, you can always rely on the Linux terminal. + +This should help you through critical tasks without taking much system resources. + +### 5. Fast + +![fast illustration][10] + +Not just limited to the memory usage, but you can get things done faster with a terminal over a GUI, you know? + +Some tasks you can try include installing an application, launching a program, performing complex file operations, and more. + +### 6. Stable and Reliable Command-line Programs + +Compared to GUI programs, terminal programs are stable and more reliable. Why? + +Fewer factors influence the program with crashes/bugs when it comes to a terminal. + +While the terminal tools could be unintuitive, they are often built for servers in mind. So, the tools do not receive frequent experience breaking updates and do not quickly fail to work. + +### 7. More Tools for CLI + +We do not have a GUI program for everything on Linux. However, there are several [CLI tools][11] to perform a wide range of operations, some fun and critical tasks as well. + +You need to get something done; chances are, you will find a command-line tool for it. + +### 8. Various Terminal Emulators to Try + +![variety illustration][12] + +While you should not have any trouble with the default terminal emulator installed on your Linux distribution, you have plenty of other options. + +If you prefer a different look, more advanced features, or tailored for a specific use, you can look at some of the [best terminal emulators][13] available. + +If you thought using the terminal was boring, you must try some of them. + +### Wrapping Up + +Personally, I feared the terminal when I was a new Linux user. But, as I got comfortable with it for small tasks, I got to realize the perks mentioned above. + +You do not need to use the terminal over GUI for everything. Nevertheless, it is good to prefer the terminal for a few things because you might save your time, and get things done faster, and in a hassle-free manner. + +Abhishek has written an [excellent guide on various small things that make you get more comfortable with the Linux terminal][14]. + +*What do you think are the benefits of a terminal over a GUI? What are your reasons to prefer the terminal? Let me know your thoughts in the comments section below.* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/love-thy-terminal/ + +作者:[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://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/quick-info-terminal.png +[2]: https://itsfoss.com/linux-man-page-guide/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/troubleshoting-illustration.jpg +[4]: https://itsfoss.com/tag/troubleshoot/ +[5]: https://itsfoss.com/find-network-adapter-ubuntu-linux/ +[6]: https://itsfoss.com/long-shutdown-linux/ +[7]: https://itsfoss.com/fix-no-wireless-network-ubuntu/ +[8]: https://itsfoss.com/wp-content/uploads/2022/06/remote-server-illustration.jpg +[9]: https://itsfoss.com/best-linux-distributions/ +[10]: https://itsfoss.com/wp-content/uploads/2022/06/fast-illustration.jpg +[11]: https://itsfoss.com/tag/cli-tools/ +[12]: https://itsfoss.com/wp-content/uploads/2022/06/variety-illustration.jpg +[13]: https://itsfoss.com/linux-terminal-emulators/ +[14]: https://itsfoss.com/basic-terminal-tips-ubuntu/ From 1acc3c1f99f8dcaf9774f848c18e247d6094ec5b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Jun 2022 14:31:44 +0800 Subject: [PATCH 125/231] RP @TravinDreek https://linux.cn/article-14696-1.html --- ...ou Can Do With DuckDuckGo Search Engine.md | 121 +++++++++--------- 1 file changed, 62 insertions(+), 59 deletions(-) rename {translated/tech => published}/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md (55%) diff --git a/translated/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/published/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md similarity index 55% rename from translated/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md rename to published/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md index 64780494e4..af80f8bfac 100644 --- a/translated/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md +++ b/published/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md @@ -2,70 +2,73 @@ [#]: via: "https://itsfoss.com/duckduckgo-easter-eggs/" [#]: author: "sreenath https://itsfoss.com/author/sreenath/" [#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: translator: "TravinDreek" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14696-1.html" 隐藏功能!在 DuckDuckGo 搜索引擎中,你可以做这 25 件有趣的事情 ====== + +![](https://img.linux.net.cn/data/attachment/album/202206/11/142806ebr5xtzgcwcr5955.jpg) + 比起无处不在的 Google,[有些搜索引擎替代品更加尊重隐私][1],而 DuckDuckGo 就是其中之一。 最近,这个搜索引擎有了很大的改进,搜索一般网页十分顺畅。在搜索本地地点方面,则还远不及 Google。 -不过,DuckDuckGo(其爱称为 DDG)有一些很酷的功能,大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。 +不过,DuckDuckGo(简称为 DDG)有一些很酷的功能,大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。 -### 1. 跳转特定网页 +### 1、跳转到特定网页 -在你最喜欢的网站名称前输入 ! 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。 +在你最喜欢的网站名称前输入 `!` 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。 -网站有缩写,开始输入时便会提示。 +有一些网站有缩写形式,开始输入时便会提示。 ![duckduckgo bang feature][2] 在网站名后面输入搜索词,就可以直接抵达那个网站的搜索结果处。 -### 2. 文本转 ASCII +### 2、文本转 ASCII -Figlet 是一个[有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。 +Figlet 是一个 [有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。 -在任意搜索词前输入 **figlet**,就会显示 ASCII 输出。无需打开终端。 +在任意搜索词前输入 `figlet`,就会显示 ASCII 输出。无需打开终端。 ![Figlet in DDG][4] -### 3. 检查社交媒体的状态 +### 3、检查社交媒体的状态 -在某个人的 Twitter 名前加上 ‘@’,就会显示 TA 的状态(关注者等)。 +在某个人的 Twitter 名前加上 `@`,就会显示 TA 的状态(关注者等)。 ![Itsfoss Twitter][5] -### 4. 生成强密码 +### 4、生成强密码 -输入 ‘password’ 并加上需要的字符数,就可以生成一个独特的强密码。 +输入 `password` 并加上需要的字符数,就可以生成一个独特的强密码。 ![Generating password in DuckDuckGo][6] -### 5. 生成随机密码短语 +### 5、生成随机密码短语 -输入 ‘random passphrase’ 可生成一段密码短语,通常长度为 4 个词。 +输入 `random passphrase` 可生成一段密码短语,通常长度为 4 个词。 ![Random Passphrase][7] -### 6. 获取一份速查表 +### 6、获取一份速查表 -在需要看速查表的搜索词后面,可输入 cheatsheet。如果要搜索的东西有速查表,就会立即显示在搜索页面。 +在需要看速查表的搜索词后面,可输入 `cheatsheet`。如果要搜索的东西有速查表,就会立即显示在搜索页面。 ![Vim Cheatsheet][8] -### 7. 通过色码获取颜色 +### 7、通过色码获取颜色 -输入 ‘color’ 并加上你想查的颜色的十六进制码,便可显示这个颜色。 +输入 `color` 并加上你想查的颜色的十六进制码,便可显示这个颜色。 ![Color][9] -### 8. 生成随机数 +### 8、生成随机数 -搜索 ‘random number’ 会输出一个 0 到 1 之间的随机数。 +搜索 `random number` 会输出一个 0 到 1 之间的随机数。 ![Random Number][10] @@ -73,113 +76,113 @@ Figlet 是一个[有趣的 Linux 命令][3],可以将任意文本转换为漂 ![Random Number between 1 and 1000][11] -### 9. 转换为二进制等形式 +### 9、转换为二进制等形式 -输入一个二进制数并加上 ‘binary’,可将其从二进制转换为十进制。 +输入一个二进制数并加上 `binary`,可将其从二进制转换为十进制。 ![Binary to Decimal][12] -类似地,它也能用于十六禁止和八进制,但我不清楚它们的处理逻辑。 +类似地,它也能用于十六进制和八进制,但我不清楚它们的处理逻辑。 -### 10. 寻找韵词 +### 10、寻找韵词 -输入 ‘what rhymes with ’ 并带上要找同韵词的词语。作诗能力变强了,对吧? +输入 `what rhymes with` 并带上要找同韵词的词语。作诗能力变强了,对吧? ![What rhymes with rain][13] -### 11. 获取拉马努金数、圆周率等常数 +### 11、获取拉马努金数、圆周率等常数 输入想获取数值的常数名,便可在搜索结果中看到它。 ![Ramanujan Number][14] -### 12. 查询现在谁在太空中 +### 12、查询现在谁在太空中 -输入 ‘people in space’ 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。 +输入 `people in space` 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。 ![People in Space][15] -### 13. 查询网页是否无法访问 +### 13、查询网页是否无法访问 -如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 “is xyz.com down”。 +如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 `is xyz.com down`。 ![Is down?][16] -### 14. 获取特定话题的名言 +### 14、获取特定话题的名言 -输入一个词并带上 quotes,就会显示与这个词相关的名言。 +输入一个词并带上 `quotes`,就会显示与这个词相关的名言。 ![Get quotes in DDG][17] -### 15. 获取占位文本 +### 15、获取占位文本 -搜索 ‘lorem ipsum’ 就可以获取 5 段占位文本。对 Web 开发者应该会有用。 +搜索 `lorem ipsum` 就可以获取 5 段占位文本。对 Web 开发者应该会有用。 ![Lorem ipsum][18] -### 16. 获取任意月份的日历 +### 16、获取任意月份的日历 -在年、月、日后面输入 calendar,就会为你显示该月份的交互式日历。 +在年、月、日后面输入 `calendar`,就会为你显示该月份的交互式日历。 ![Calendar][19] -### 17. 生成二维码 +### 17、生成二维码 -在文字、链接等后面输入 ‘qr’,就会生成对应的二维码。 +在文字、链接等后面输入 `qr`,就会生成对应的二维码。 ![QRCode][20] -### 18. 获取一些 CSS 动画 +### 18、获取一些 CSS 动画 -搜索 ‘css animations’ 以获取一些 CSS 动画例子。 +搜索 `css animations` 以获取一些 CSS 动画例子。 ![CSS Animations][21] -### 19. 展开短链接 +### 19、展开短链接 如果有一个 Bitly 链接或其他短链接,但不确定它指向哪里,不必再跳转到充满垃圾信息的网页了,只需展开短链接,看看真正的网址。 -在短链接后面输入关键词 expand,就会显示真正的目标 URL。 +在短链接后面输入关键词 `expand`,就会显示真正的目标 URL。 ![Expand Link][22] -### 20. 获取特殊字符的 HTML 代码 +### 20、获取特殊字符的 HTML 代码 -搜索 ‘html chars’,可以获取一份很长的列表,上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。 +搜索 `html chars`,可以获取一份很长的列表,上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。 ![HTML Chars][23] -### 21. 我用这东西干啥? +### 21、我用这东西干啥? -这功能没什么用。如果你输入 “why should I use this?” ,它就会在搜索结果顶部显示 “cause it's awesome”。显然,DuckDuckGo 在说他自己。 +这功能没什么用。如果你输入 `why should I use this?` ,它就会在搜索结果顶部显示 `cause it's awesome`。显然,DuckDuckGo 在说他自己。 ![Why should I use this?][24] -### 22. 转换大小写 +### 22、转换大小写 -大小写都可转换。lowercase <大写搜索词> 就会显示小写的结果 +大小写都可转换。`lowercase <大写搜索词>` 就会显示小写的结果 ![Lowercase][25] -uppercase <小写搜索词> 就会显示大写的结果。 +`uppercase <小写搜索词>` 就会显示大写的结果。 ![Uppercase][26] -### 23. 编码 URL +### 23、编码 URL -搜索 ‘encode’ 并加上 URL,就会给出编码后的结果 +搜索 `encode` 并加上 URL,就会给出编码后的结果 ![URL Encode][27] -### 24. Motherboard +### 24、Motherboard -搜索 ‘Motherboard’就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。 +搜索 `Motherboard` 就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。 ![Motherboard][28] -### 25. 获取 HTML 色码 +### 25、获取 HTML 色码 -搜索 ‘color codes’ 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。 +搜索 `color codes` 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。 ![Color Codes][29] @@ -196,7 +199,7 @@ via: https://itsfoss.com/duckduckgo-easter-eggs/ 作者:[sreenath][a] 选题:[lkxed][b] 译者:[Peaksol](https://github.com/TravinDreek) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7d97372e54dbbe7bd6873afd8f7df91850410f90 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Jun 2022 16:42:45 +0800 Subject: [PATCH 126/231] RP @geekpi https://linux.cn/article-14697-1.html --- ...eate Local Yum-DNF Repository on RHEL 9.md | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) rename {translated/tech => published}/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md (69%) diff --git a/translated/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md b/published/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md similarity index 69% rename from translated/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md rename to published/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md index 994b53dc05..328acf878a 100644 --- a/translated/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md +++ b/published/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md @@ -3,19 +3,22 @@ [#]: 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-14697-1.html" 如何在 RHEL 9 上创建本地 Yum/DNF 仓库 ====== -你好,技术人员,最近红帽发布了最新的操作系统 RHEL 9,RHEL 9 满足了混合云的所有要求。它可以安装在物理服务器、虚拟机和容器镜像中。 -当我们没有订阅的时候,想安装软件包来做 POC,那么设置本地的 yum 或 dnf 仓库将是很方便的。 +![](https://img.linux.net.cn/data/attachment/album/202206/11/164149y9zzm7kkxwsxgszw.jpg) -在本指南中,我们将介绍如何在 RHEL 9 上使用 DVD 或 ISO 文件一步一步地创建本地 yum/dnf 资源库。 +你好,技术兄弟,最近红帽发布了最新的操作系统 RHEL 9,RHEL 9 满足了混合云的所有要求。它可以安装在物理服务器、虚拟机和容器镜像中。 -创建本地 yum/dnf 资源库的先决条件: +当我们没有订阅的时候,想安装软件包来做实验,那么设置本地的 Yum 或 DNF 仓库将是很方便的。 + +在本指南中,我们将介绍如何在 RHEL 9 上使用 DVD 或 ISO 文件一步一步地创建本地 Yum/DNF 资源库。 + +创建本地 Yum/DNF 资源库的先决条件: * 最小化安装 RHEL 9 系统 * 具有管理权限的 sudo 用户 @@ -23,7 +26,7 @@ ### 1)挂载 RHEL 9 ISO 文件或 DVD -我们假设 RHEL 9 iso 文件已经被复制到系统中。运行下面的挂载命令,将 ISO 文件挂载到 /opt/repo 文件夹。 +我们假设 RHEL 9 iso 文件已经被复制到系统中。运行下面的挂载命令,将 ISO 文件挂载到 `/opt/repo` 文件夹。 ``` $ sudo mkdir /var/repo @@ -32,15 +35,15 @@ $ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/ ![Mount-RHEL9-ISO-File-Command][1] -如果是 dvd,运行: +如果是 DVD 光盘,运行: ``` $ sudo mount /dev/sr0 /var/repo/ ``` -### 2)在 “/etc/yum.repos.d/” 目录中创建仓库文件 +### 2)在 /etc/yum.repos.d/ 目录中创建仓库文件 -在 /etc/yum.repos.d/ 目录下创建一个名为 “rhel9-local.repo” 的仓库文件,内容如下: +在 `/etc/yum.repos.d/` 目录下创建一个名为 “rhel9-local.repo` 的仓库文件,内容如下: ``` $ sudo vi /etc/yum.repos.d/rhel9-local.repo @@ -65,9 +68,9 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ![RHEL8-Local-Repo-File][2] -### 3)刷新 yum/dnf 和订阅管理器的缓存 +### 3)刷新 Yum/DNF 和订阅管理器的缓存 -执行以下命令来清理 yum 或 dnf 和订阅管理器的缓存。 +执行以下命令来清理 Yum 或 DNF 和订阅管理器的缓存。 ``` $ sudo dnf clean all @@ -76,7 +79,7 @@ $ sudo subscription-manager clean ![DNF-Subscription-Manager-Clean][3] -在上面的输出中,我们得到一个警告信息 “This system is not registered with an entitlement”(系统没有注册权限)。所以,为了抑制这个警告信息,编辑文件 “/etc/yum/pluginconf.d/subscription-manager.conf”,将参数 “enabled=1” 改为 “enabled=0”。 +在上面的输出中,我们得到一个警告信息 `This system is not registered with an entitlement`(系统没有注册权限)。所以,为了抑制这个警告信息,编辑文件 `/etc/yum/pluginconf.d/subscription-manager.conf`,将参数 `enabled=1` 改为 `enabled=0`。 ``` $ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf @@ -98,7 +101,7 @@ $ sudo dnf repolist ![DNF-Repolist-RHEL-9][5] -现在,试试用 dnf 命令通过上面配置的本地仓库安装软件包。 +现在,试试用 `dnf` 命令通过上面配置的本地仓库安装软件包。 ``` $ sudo dnf install nfs-utils @@ -110,7 +113,7 @@ $ sudo dnf install nfs-utils ![Package-Installation-Completion-RHEL9-DNF-Command][7] -完美,上述输出证实了 nfs-utils 包及其依赖项已经通过本地配置的 yum 或 dnf 仓库成功安装。 +完美,上述输出证实了 `nfs-utils` 包及其依赖项已经通过本地配置的 Yum 或 DNF 仓库成功安装。 这就是本指南的全部内容。我希望你觉得它有参考价值。请在下面的评论区发表你的疑问和反馈。 @@ -121,7 +124,7 @@ via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/ 作者:[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/) 荣誉推出 From c4caf88706b3fbba21cfcb32698457ad70c3f832 Mon Sep 17 00:00:00 2001 From: lightchaserhy <107302656+lightchaserhy@users.noreply.github.com> Date: Sat, 11 Jun 2022 18:38:11 +0800 Subject: [PATCH 127/231] Translating --- sources/talk/20220523 7 pieces of Linux advice for beginners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20220523 7 pieces of Linux advice for beginners.md b/sources/talk/20220523 7 pieces of Linux advice for beginners.md index bc902926eb..73fe5790cc 100644 --- a/sources/talk/20220523 7 pieces of Linux advice for beginners.md +++ b/sources/talk/20220523 7 pieces of Linux advice for beginners.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/5/linux-advice-beginners" [#]: author: "Opensource.com https://opensource.com/users/admin" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lightchaserhy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From bb8dbc59a6edb1194598a86345d24c0c1715c55d Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 10:39:10 +0800 Subject: [PATCH 128/231] Delete 20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md --- ... GitHub is Killing GitHub-s Atom Editor.md | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md diff --git a/sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md b/sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md deleted file mode 100644 index c10578130c..0000000000 --- a/sources/news/20220610 To Favor Microsoft VS Code, Microsoft-s GitHub is Killing GitHub-s Atom Editor.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: subject: "To Favor Microsoft VS Code, Microsoft’s GitHub is Killing GitHub’s Atom Editor" -[#]: via: "https://news.itsfoss.com/atom-being-discontinued/" -[#]: author: "Abhishek https://news.itsfoss.com/author/root/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -To Favor Microsoft VS Code, Microsoft’s GitHub is Killing GitHub’s Atom Editor -====== -We all knew this day would be coming sooner or later. - -![Microsoft kills GitHub's Atom][1] - -Coder, coder in the hall, which is the best editor of them all! - -Sorry for the really cheesy opening line. I could not prevent myself from writing that. Just as we all could not prevent the certain demise of the most loved open source code editor of the last decade, Atom. - -### A brief history of Atom - -Atom, released in 2014 by the then independent Git Hub team, was a huge hit among the programmers. - -Its neat UI, features, and numerous add-ons made it the hot favorite of the developers. - -It continued its popular run despite getting tough competition from Microsoft’s recently open-sourced VS Code editor. - -Atom’s loyal fanbase didn’t budge despite the rising popularity of the VS Code until[Microsoft acquired GitHub in 2018][2]. - -People started wondering how long will Microsoft continue developing two similar projects that don’t make any money for it directly. - -In the last four years, it did seem that Atom was losing its charm. It didn’t have any significant feature development while VS Code got more attractive as features after features landed in every release. - -The writing was on the wall. Microsoft branded VS Code was being favored over Atom. - -Though I don’t have any stats to back my claim, it did seem that Atom’s userbase was declining in the last couple of years. VS Code is like the default editor for young developers. - -It was only time that Microsoft pulled the plug on Atom and it did that finally. - -### GitHub discontinues Atom - -On June 8, Microsoft-owned GitHub [announced][3] that it is going to archive the entire Atom project on December 15, 2022. - -> …we’ve decided to retire Atom in order to further our commitment to bringing fast and reliable software development to the cloud via Microsoft Visual Studio Code and GitHub Codespaces. - -The stated reason is the same we all know; “Atom has not had significant feature development for the past several years” and “focus on enhancing the developer experience in the cloud with GitHub Codespaces”. - -The Atom project was more than just an editor though. For good or bad, whatever you feel like, Atom also gave birth to Electron framework. - -> It’s worth reflecting that Atom has served as the foundation for the Electron framework, which paved the way for the creation of thousands of apps, including Microsoft Visual Studio Code, Slack, and our very own GitHub Desktop. However, reliability, security, and performance are core to GitHub, and in order to best serve the developer community, we are archiving Atom to prioritize technologies that enable the future of software development. - -### Atom dies a slow death and its fork will likely meet the same fate - -Atom is open source so it’s not going to ‘rest in peace’ immediately. It will be resurrected (read forked) for sure. - -However, even if someone forks the project and continues to keep it alive, it’s not going to match up to VS Code anymore. At best, it will get a few bug fixes and minor new features. That’s not entirely bad for the hard-core Atom lovers but it won’t attract newer, younger coders. - -Ultimately, the forked projects will also be shut down eventually. It’s not possible for a couple of volunteer developers to match the might of a billion-dollar organization with huge infrastructure. [Atom won’t get compared to VS Code][4] any longer. - -Atom will be missed. Maybe not by as many people as it would have been if it was to discontinue in 2018. The noose was tightened around its neck slowly and we all witnessed it. - -Anyway, are you still using Atom? Will you move to VS Code or choose some other non-Microsoft editor? - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/atom-being-discontinued/ - -作者:[Abhishek][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/root/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/microsoft-kills-github-atom.png -[2]: https://itsfoss.com/microsoft-github/ -[3]: https://github.blog/2022-06-08-sunsetting-atom/ -[4]: https://itsfoss.com/visual-studio-code-vs-atom/ From 72a090dafe34d3b62d0f2c09769cc4fc92650823 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 10:42:20 +0800 Subject: [PATCH 129/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220607=20OpenInfra=20Foundation=20Launches=20-direct?= =?UTF-8?q?ed=20funding-=20To=20Support=20Open=20Source=20Projects.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...unches -directed funding- To Support Open Source Projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md b/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md index 887fd972a7..8275cdbda4 100644 --- a/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md +++ b/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md @@ -2,7 +2,7 @@ [#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/" [#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b4c2df3e9a15e086885ea88f435e46b0dfd375f5 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 11:05:24 +0800 Subject: [PATCH 130/231] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220607=20OpenInfra=20Foundation=20Launches=20-direct?= =?UTF-8?q?ed=20funding-=20To=20Support=20Open=20Source=20Projects.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...unding- To Support Open Source Projects.md | 47 ------------------- ...unding- To Support Open Source Projects.md | 47 +++++++++++++++++++ 2 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md create mode 100644 translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md diff --git a/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md b/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md deleted file mode 100644 index 8275cdbda4..0000000000 --- a/sources/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md +++ /dev/null @@ -1,47 +0,0 @@ -[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects" -[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/" -[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects -====== -![open-infra-berlin-event][1] - -The OpenInfra Foundation, formerly known as the OpenStack Foundation until it expanded its scope beyond its flagship project a few years ago, announced today an intriguing new way for companies to fund open source projects within the foundation. Corporate members of open source foundations have traditionally supported the organisation by paying a membership fee, which the foundations then distribute as they see fit. The OpenInfra foundation is now launching a new ‘Directed Funding’ model that allows members to direct their funds directly to a project. - -The foundation previously did not allow this because, as Bryce pointed out, it can create mixed incentives and a pay-for-play dynamic, which the organisation has always tried to avoid. However, there was a lot of interest in the community to support specific projects, which makes sense given that the foundation is now home to a wider variety of projects, but not every member is heavily invested in every project. - -Bryce stated that the foundation’s leadership and board spent a significant amount of time considering how to reconcile the foundation’s core principles with this new model. As a result, the model tries to combine the best of the OpenStack/OpenInfra technical governance model, which has worked well over the last decade, with these new financial considerations. - -Under this ‘directed funding’ model, each new project will have its own legal entity that will hold the project funding. To ensure that the new projects are legitimate, an OpenInfra Platinum member (currently nine, including Ant Group, Huawei, Meta, Microsoft, and Red Hat) must serve as the project’s sponsor, after which other organisations can join the project fund. If a sponsoring company is not already an OpenInfra member, it must become one. All of these funding members then form a project fund governing board, which decides on the fees for creating a budget. Meanwhile, the OpenInfra Foundation will provide these projects with community-building services. - -This new model will, for the time being, only apply to new projects that join the foundation. Bryce and Collier noted that there may be some existing projects where the organisation could retroactively apply this new model, but that is not currently on the roadmap. - -The OpenInfra foundation has added projects such as Kata Containers for increased container security, Airship for infrastructure lifecycle management, the Startling X edge compute stack, and the Zuul CI/CD platform since it expanded beyond OpenStack. - -“The most important thing we’ve learned from each of these successful projects is that collaboration is key and the more breadth in the ecosystem of support the better,” said Thierry Carrez, general manager of the OpenInfra Foundation. “In fact, we’ve found that the most successful open source projects are funded by multiple companies, because they are able to combine their resources to achieve a much stronger rate of return.” - -This new model is clearly a way for the OpenInfra Foundation to bring new projects — and new members — into the fold. Its models for managing open source projects in a multi-party ecosystem — both through the new directed funds and its more traditional approach — may not be suitable for every project, as the leadership team readily admits. Even if the OpenInfra Foundation only receives a small percentage of projects, the number of open-source projects is increasing as the demand for these sophisticated cloud infrastructure projects grows, all while they become more complex. - -The Foundation also announced a couple of milestone releases for its various projects, including version 2.0 of Kata Containers, version 5.0 of Zuul, and the release of StarlingX 6.0. - -“The Foundation celebrates its 10 anniversary this year, and as we look to our next decade of open infrastructure, we’re building momentum on what makes our model so successful: aligning companies and individuals who wish to work together, providing them with a framework and tools to effectively collaborate, and helping them invest their funds to best help the project they care about,” said Collier. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/ - -作者:[Laveesh Kocher][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/laveesh-kocher/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png diff --git a/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md b/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md new file mode 100644 index 0000000000..afb2eadb4f --- /dev/null +++ b/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md @@ -0,0 +1,47 @@ +[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects" +[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +OpenInfra 基金会启动“定向资助”以支持开源项目 +====== +![OpenInfra][1] + +OpenInfra 基金会的前身为 OpenStack 基金会,几年前它将范围扩展到其旗舰项目之外,于是改了名字。今天(2022 年 6 月 7 日),它宣布了一种有趣的新方式,以供公司在基金会内资助开源项目。一般来说,开源基金会的企业成员通过支付会员费来支持该组织,然后基金会按照他们认为合适的方式分发这些费用。OpenInfra 基金会现在推出了一种新的“定向资助”模式,允许成员将他们的资金直接用于项目。 + +此前,基金会并不允许这样做,因为正如 Bryce 指出的那样,它可能会产生混合激励和付费游戏动态,而该组织一直试图避免这种情况。然而,社区对支持特定项目有很大的兴趣,这是有道理的,因为该基金会现在拥有更多种类的项目,但并不是每个成员都对每个项目进行了投入了大量精力。 + +Bryce 表示,基金会的领导层和董事会,花费了大量时间来考虑,如何使基金会的核心原则与这种新模式相协调。因此,该模型试图将过去十年运行良好的 OpenStack/OpenInfra 技术治理模型的优点,与这些新的财务考虑相结合。 + +在这种“定向资助”模式下,每个新项目都将拥有自己的法人实体来持有项目资金。为确保新项目的合法性,OpenInfra Platinum 会员(目前为 9 家,包括蚂蚁集团、华为、Meta、微软和红帽)必须担任项目的发起人,之后其他组织才能加入项目基金。如果赞助公司还不是 OpenInfra 成员,则必须成为其中的成员。然后,所有这些资助成员组成一个项目基金管理委员会,决定创建预算的费用。与此同时,OpenInfra 基金会将为这些项目提供社区建设服务。 + +这种新模式暂时只适用于加入基金会的新项目。 Bryce 和 Collier 指出,组织可能会在一些现有项目中追溯应用这种新模式,但这个考虑目前不在路线图上。 + +自从将范围扩展到 OpenStack 之后,OpenInfra 基金会增加了一些新项目,例如用于提高容器安全性的 Kata Containers、用于基础设施生命周期管理的 Airship、Startling X 边缘计算堆栈以及 Zuul CI/CD 平台。 + +“我们从每个成功的项目中学到的最重要的一点是,协作是关键,支持生态系统的范围越广越好,” OpenInfra 基金会总经理 Thierry Carrez 说, “事实上,我们发现最成功的开源项目是由多家公司资助的,因为他们能够整合资源以实现更高的回报率。” + +这种新模式显然是 OpenInfra 基金会引入新项目和新成员的一种方式。正如领导团队欣然承认的那样,其在多方生态系统中管理开源项目的模型 —— 无论是通过新的定向资金还是更传统的方法 —— 可能并不适合每个项目。即使 OpenInfra 基金会只收到一小部分项目,随着对这些复杂云基础设施项目需求的增长,开源项目的数量也在增加,同时它们也变得更加复杂。 + +基金会还宣布了其各个项目的几个里程碑版本,包括 Kata Containers 2.0 版、Zuul 5.0 版和 StarlingX 6.0 的发布。 + +Collier 说:“基金会今年庆祝成立 10 周年,在展望下一个十年的开放基础设施之际,我们正在推动我们的模型如此成功的关键,那就是:将希望合作的公司和个人联合起来,为他们提供一个框架和有效协作的工具,并帮助他们投资资金以最好地帮助他们关心的项目。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png From aa08bec3bab9f9f45bc92b88f6850ffe448ca609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sun, 12 Jun 2022 11:06:56 +0800 Subject: [PATCH 131/231] Update 20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md --- ...ches -directed funding- To Support Open Source Projects.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md b/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md index afb2eadb4f..19d35cc4fb 100644 --- a/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md +++ b/translated/news/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md @@ -19,11 +19,11 @@ Bryce 表示,基金会的领导层和董事会,花费了大量时间来考 在这种“定向资助”模式下,每个新项目都将拥有自己的法人实体来持有项目资金。为确保新项目的合法性,OpenInfra Platinum 会员(目前为 9 家,包括蚂蚁集团、华为、Meta、微软和红帽)必须担任项目的发起人,之后其他组织才能加入项目基金。如果赞助公司还不是 OpenInfra 成员,则必须成为其中的成员。然后,所有这些资助成员组成一个项目基金管理委员会,决定创建预算的费用。与此同时,OpenInfra 基金会将为这些项目提供社区建设服务。 -这种新模式暂时只适用于加入基金会的新项目。 Bryce 和 Collier 指出,组织可能会在一些现有项目中追溯应用这种新模式,但这个考虑目前不在路线图上。 +这种新模式暂时只适用于加入基金会的新项目。Bryce 和 Collier 指出,组织可能会在一些现有项目中追溯应用这种新模式,但这个考虑目前不在路线图上。 自从将范围扩展到 OpenStack 之后,OpenInfra 基金会增加了一些新项目,例如用于提高容器安全性的 Kata Containers、用于基础设施生命周期管理的 Airship、Startling X 边缘计算堆栈以及 Zuul CI/CD 平台。 -“我们从每个成功的项目中学到的最重要的一点是,协作是关键,支持生态系统的范围越广越好,” OpenInfra 基金会总经理 Thierry Carrez 说, “事实上,我们发现最成功的开源项目是由多家公司资助的,因为他们能够整合资源以实现更高的回报率。” +“我们从每个成功的项目中学到的最重要的一点是,协作是关键,支持生态系统的范围越广越好,” OpenInfra 基金会总经理 Thierry Carrez 说,“事实上,我们发现最成功的开源项目是由多家公司资助的,因为他们能够整合资源以实现更高的回报率。” 这种新模式显然是 OpenInfra 基金会引入新项目和新成员的一种方式。正如领导团队欣然承认的那样,其在多方生态系统中管理开源项目的模型 —— 无论是通过新的定向资金还是更传统的方法 —— 可能并不适合每个项目。即使 OpenInfra 基金会只收到一小部分项目,随着对这些复杂云基础设施项目需求的增长,开源项目的数量也在增加,同时它们也变得更加复杂。 From c41cd568259bcf8cd5df3e0d9c5aaec4ea192a04 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Jun 2022 11:07:29 +0800 Subject: [PATCH 132/231] RP @robsean https://linux.cn/article-14699-1.html --- ...al Boot Ubuntu 22.04 LTS and Windows 11.md | 68 ++++++++++--------- 1 file changed, 35 insertions(+), 33 deletions(-) rename {translated/tech => published}/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md (66%) diff --git a/translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md similarity index 66% rename from translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md rename to published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md index 0a27cd46b5..3908d3ef57 100644 --- a/translated/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md +++ b/published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md @@ -3,45 +3,47 @@ [#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" [#]: collector: "lkxed" [#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14699-1.html" 如何双启动 Ubuntu 22.04 LTS 和 Windows 11 ====== -嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的旁侧配置 Ubuntu 22.04 LTS (Jammy Jellyfish) 的双启动设置 -为使其能工作,你需要在你的计算机上安装 windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。 +![](https://img.linux.net.cn/data/attachment/album/202206/12/110546fff10ck07e2p0z2f.jpg) -##### 必要条件  +嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的之外配置 Ubuntu 22.04 LTS(Jammy Jellyfish)的双启动设置。 -在设置双启动前,这些是你所需要的。 +为使其能工作,你需要在你的计算机上已经安装好了 Windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。 -* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,抓取一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。 +**前置条件:** -* 快速稳定的因特网连接 +在设置双启动前,这些是你所需要的: + +* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,拿一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。 +* 快速稳定的互联网连接 ### 步骤 1、在你的硬盘驱动器上创建一个可用的分区  正如介绍中所提到的,我们首先需要在硬盘驱动器上创建一个单独的分区,我们将在其中安装 Ubuntu 22.04 。 -因此,通过按下 **Windows + R** 组合键来打开磁盘管理器实用程序 +因此,通过按下 `Windows + R` 组合键来打开磁盘管理器实用程序。 -在对话框中,输入 diskmgmt.msc ,并按下 回车键ENTER 按键。 +在对话框中,输入 `diskmgmt.msc` ,并按下回车键。 ![][2] - 磁盘管理disk management控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 ‘卷 E’ 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。 +磁盘管理disk management控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 “卷 E” 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。 ![][3] -因此,在你想要压缩的磁盘驱动器卷上右键,并在弹出的菜单中选择 压缩卷Shrink 选项。 +因此,在你想要压缩的磁盘驱动器卷上点击鼠标右键,并在弹出的菜单中选择 压缩卷Shrink 选项。 ![][4] -一个弹出对话框将会出现,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单 压缩卷Shrink 。 +将会出现一个弹出对话框,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单击 压缩卷Shrink 。 -这是指定给 Ubuntu 22.04 安装所用的空间. +这是指定给 Ubuntu 22.04 安装所用的空间。 ![][5] @@ -49,11 +51,11 @@ ![][6] -随着可用空间的到来,现在将可启动 USB 媒介盘插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。 +随着有了可用空间,现在将可启动 USB 驱动器插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。 ### 步骤 2、开始安装 -在第一屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 尝试或安装 UbuntuTry or Install Ubuntu ,并按下 回车键ENTER 按键。 +在第一个屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 尝试或安装 UbuntuTry or Install Ubuntu ,并按下 回车键ENTER 按键。 ![][7] @@ -69,7 +71,7 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 ![][10] -在 更新和其它软件Updates and Other Software 步骤中,选择 正常安装Normal Installation以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包 +在 更新和其它软件Updates and Other Software 步骤中,选择 正常安装Normal Installation 以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包。 接下来,单击 继续Continue 按钮。 @@ -85,29 +87,29 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 针对 Ubuntu 22.04 ,我们将创建下面的分区: -* /boot        –        1 GB -* /home        –        10 GB -* /            –        12 GB -* Swap         –         2 GB -* EFI          –       300 MB +* `/boot`        –        1 GB +* `/home`        –        10 GB +* `/`            –        12 GB +* 交换分区        –         2 GB +* EFI           –       300 MB -为开始使用这些分区,单击 可用空间Free Space分区下面的 [ + ] 符号。 +为开始使用这些分区,单击 可用空间Free Space分区下面的 “+” 符号。 ![][13] -如图显示填写 /boot 分区的详细信息,然后单击 确定OK 按钮。 +如图显示填写 `/boot` 分区的详细信息,然后单击 确定OK 按钮。 ![][14] -接下来,具体指定 /home 分区,并单击 确定OK 按钮。 +接下来,具体指定 `/home` 分区,并单击 确定OK 按钮。 ![][15] -接下来,定义 / ( root ) 分区,并单击 确定OK 按钮。 +接下来,定义 `/`(根)分区,并单击 确定OK 按钮。 ![][16] -为定义 swap 空间,设置大小,并在 使用为Use as:选项中选择 交换区域Swap area。 +为定义交换空间,设置大小,并在 使用为Use as:选项中选择 交换区域Swap area。 ![][17] @@ -115,7 +117,7 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 ![][18] -下图是一份我们的分区表的分区摘要。 +下图是一份我们的分区表的分区摘要: ![][19] @@ -141,13 +143,13 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 ![][24] -在这时,移除你的可启动 USB 驱动器,并按下 回车键ENTER 按键。 +在这时,移除你的可启动 USB 驱动器,并按下回车键。 ![][25] -在系统重新启动时,你将找到 Ubuntu 和 Windows 11 的所有选项。 +在系统重新启动时,你将找到包括 Ubuntu 和 Windows 11 在内的各种选项。 -选择 ‘Ubuntu’ 来启动到你的新 Ubuntu 22.04 安装。为启动到 Windows 11,选择标有 Windows 恢复环境Windows Recovery Environment 的条目。 +选择 “Ubuntu” 来启动到你的新 Ubuntu 22.04 安装。要启动到 Windows 11,请选择标有 Windows 恢复环境Windows Recovery Environment 的条目。 ![][26] @@ -160,7 +162,7 @@ via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/ 作者:[James Kiarie][a] 选题:[lkxed][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2db2ad64f7329cbd45361a7be510dab084ddaa8f Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 11:07:44 +0800 Subject: [PATCH 133/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?news]:=2020220609=20Cloudflare=20Has=20Something=20New=20to=20R?= =?UTF-8?q?eplace=20Annoying=20CAPTCHAs=20on=20the=20Internet.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...omething New to Replace Annoying CAPTCHAs on the Internet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md index 80fe54aece..6016018ea8 100644 --- a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md +++ b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/cloudflare-pat/" [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6e9bf784792a54cb214e1bf9cdec52a11f272c53 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Jun 2022 11:11:03 +0800 Subject: [PATCH 134/231] R --- ...20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md index 3908d3ef57..4004bcb938 100644 --- a/published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md +++ b/published/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md @@ -153,7 +153,7 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 ![][26] -就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04. +就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04。 -------------------------------------------------------------------------------- From 4f45bc2638fc688a6968d67092c3fe82eec22f68 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 11:54:59 +0800 Subject: [PATCH 135/231] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?news]:=2020220609=20Cloudflare=20Has=20Something=20New=20to=20R?= =?UTF-8?q?eplace=20Annoying=20CAPTCHAs=20on=20the=20Internet.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...place Annoying CAPTCHAs on the Internet.md | 86 ------------------- ...place Annoying CAPTCHAs on the Internet.md | 86 +++++++++++++++++++ 2 files changed, 86 insertions(+), 86 deletions(-) delete mode 100644 sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md create mode 100644 translated/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md diff --git a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md b/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md deleted file mode 100644 index 6016018ea8..0000000000 --- a/sources/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet" -[#]: via: "https://news.itsfoss.com/cloudflare-pat/" -[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet -====== -Don’t want to complete CAPTCHA challenges to prove that you are a human? Cloudflare might have a solution for that. - -![cloudflare][1] - -Cloudflare, the internet services giant, has [just announced][2] Private Access Tokens. These aim to reduce the number of CAPTCHAs you see on the web while improving your privacy. - -As you may have found out, CAPTCHAs are a horrible experience on mobile. They often end up occupying the entire screen and can be impossible to complete at times. - -As an alternative, websites can elect to collect uniquely identifying data to prove that you are a human. Of course, from a privacy standpoint, this practice is terrible, leaving many privacy-valuing companies with little to prevent them from bot attacks. - -Fortunately, the release of Private Access Tokens, or PATs, is set to change this. - -### What Impact Will Private Access Tokens Have? - -In short, PATs will: - -* Reduce the number of CAPTCHAs on supported devices -* Increase user privacy -* Allow website owners to ensure that visitors are coming from actual devices - -However, diving in a little deeper, we can see that PATs are much more impactful than at first glance. With traditional CAPTCHAs, there are multiple entities that can access your data. - -Firstly, the website you are visiting knows your IP address and the URL you are visiting. Of course, this data is the minimum required to establish a connection. Additionally, for more advanced functionality, websites are also sent some user agent data, which is not uniquely identifiable. - -However, the second party, the CAPTCHA provider, can collect a lot more data. Like with the website you want to visit, it knows your IP address, user agent data, and the URL you visit. Unfortunately, they also collect additional data, like your device information and interaction data. When tied back with previous times you have completed a CAPTCHA, they can build up an astonishingly detailed profile of you. - -Fortunately, PATs by Cloudflare prevent such data from being collected, by ultimately bypassing the CAPTCHA altogether. - -### How Do PATs Work? - -![][3] - -Unlike the CAPTCHA method of aggregating as much data as possible, PATs decentralize the data so that no single party can uniquely identify you. Before you mention data sharing, Cloudflare has specifically mentioned that data is not shared between parties. - -When you go on to a website utilizing Cloudflare and PATs, a total of three parties will handle different portions of your data. - -1. The website. This will only know your IP, URL, and user agent, which again, is required for establishing a connection. -2. Your device manufacturer. This will only know the device data required to verify that your device is genuine. They will NOT know what website you are visiting, or your IP address. After verifying your device, they will generate a token, which will be sent to Cloudflare. -3. Cloudflare. Cloudflare will receive the token, which does not contain any of your device data, only a ‘guarantee’ of sorts from the manufacturer that it is genuine. The only other data they know is the website you are visiting, which is required to serve you the content. - -The result of this is a system that gives Cloudflare confidence in you being a human, without ever having to touch your data. - -### Supported Operating Systems: No Linux? - -As you may have realized, PATs need specific operating system features to work. Currently, they are only present on the latest operating systems by Apple, namely iOS and iPadOS 16, as well as macOS Ventura. This is because Apple’s operating systems run on a limited set of hardware, making device verification significantly easier. - -Linux, on the other hand, is a general-purpose operating system designed to run on a wide range of hardware. As a result, I don’t expect to see it support PATs in the near future. - -Going back to Apple, it occurs to me that PATs could also cause some issues with consumers’ right to repair their devices. If, for example, I replaced a worn-out iPhone battery with a non-genuine one, would this be flagged by the PAT system? - -What about Linux Phones? Manufacturers of these, like Pine64 and Purism, may not have the infrastructure to support such a system. Will it be possible to use PATs on these? - -In the [announcement post][4], Cloudflare mentions: - -> We are actively working to get other clients and device makers utilizing the PAT framework as well. Any time a new client begins utilizing the PAT framework, traffic coming to your site from that client will automatically start asking for tokens, and your visitors will automatically see fewer CAPTCHAs. - -So, we hope to see it being adopted by more devices, and operating systems. What do you think about PATs by Cloudflare? Let me know your thoughts in the comments down below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/cloudflare-pat/ - -作者:[Jacob Crume][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/jacob/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg -[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ -[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png -[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ diff --git a/translated/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md b/translated/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md new file mode 100644 index 0000000000..cd45d29858 --- /dev/null +++ b/translated/news/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md @@ -0,0 +1,86 @@ +[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet" +[#]: via: "https://news.itsfoss.com/cloudflare-pat/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Cloudflare 有了一个新东西,它可以替代互联网上烦人的验证码 +====== +不想通过正确输入 验证码CAPTCHA 来证明自己是个人类吗?Cloudflare 可能有了一个解决方案。 + +![Cloudflare][1] + +互联网服务巨头 Cloudflare(在 6 月 9 日)[刚刚宣布了][2] 私有访问令牌Private Access Tokens 功能。这项功能旨在减少你在网络上看到的验证码数量,同时改善你的隐私。 + +你可能已经发现,验证码在移动设备上是一种可怕的体验。通常,它们会最终会占据整个屏幕,有时甚至也无法完成。 + +作为替代方案,网站可以选择收集唯一识别数据,以证明你是人类。当然,从隐私的角度来看,这种做法是很糟糕的。如果这么做,许多重视隐私的公司都几乎无法避免 僵尸攻击bot attacks。 + +幸运的是,私有访问令牌(PATs)的发布将改变这一点。 + +### 私有访问令牌会产生什么影响? + +简而言之,私有访问令牌能够做到下面这些事: + +* 在支持设备上减少验证码数量 +* 增强用户隐私 +* 允许网站所有者确保访问者来自真实设备 + +然而,深入观察,我们可以看到私有访问令牌的影响力远不止于此。若使用传统的验证码,就有多个实体可以访问你的数据。 + +首先,你正在访问的网站知道你的 IP 地址和你正在访问的 URL。当然,这些数据是建立连接所需的最低要求。此外,对于更高级的功能,网站还会发送一些用户代理数据,还好这些数据并不是唯一可识别的。 + +然而,另一方,也就是验证码提供者,却可以收集更多的数据。与你要访问的网站一样,它也知道你的 IP 地址、用户代理数据和你访问的 URL。不幸的是,除此之外,他们还会收集其他数据,例如你的设备信息和交互数据。如果把这些信息,与你之前完成验证码的时间联系起来,你就会惊讶的发现,他们可以建立一个非常详细的属于你的个人资料。 + +幸运的是,有了 Cloudflare 的私有访问令牌,你就可以完全绕过验证码,从而阻止验证码提供者收集此类数据。 + +### 私有访问令牌是如何工作的? + +![][3] + +验证码的理念是集中尽可能多的数据,私人访问令牌则恰恰相反,它将数据去中心化,因此任何一方都无法唯一识别你。在你提到数据共享之前,Cloudflare 就已经特别指出了,数据不会在各方之间共享。 + +当你访问使用 Cloudflare 和私人访问令牌的网站的时候,共有三方将处理你的数据的不同部分。 + +1. 网站。它只会知道你的 IP、URL 和用户代理,这也是建立连接所必需的。 +2. 你的设备制造商。他们只会知道那些用于验证设备是否真实所需的设备数据,而不会知道你正在访问哪个网站,或你的 IP 地址是什么。验证了你的设备后,他们将生成一个令牌,该令牌将发送到 Cloudflare。 +3. Cloudflare。他们将收到这个令牌,令牌中不包含你的任何设备数据,只有制造商对它是正品的“保证”。他们知道的唯一其他数据,就是你正在访问的网站,同样,这是为你提供内容所必需的。 + +通过这种方式,Cloudflare 无需接触你的数据,就可以对“你是一个人”充满信心。 + +### 支持的操作系统:没有 Linux? + +你可能已经意识到,私人访问令牌需要特定的操作系统功能才能工作。目前,它们仅存在于苹果最新的操作系统上,即 iOS 和 iPadOS 16,以及 macOS Ventura。这是因为苹果的操作系统只在有限的硬件上运行,设备验证会更加容易。 + +另一方面,Linux 是一种通用操作系统,旨在在各种硬件上运行。因此,我认为,在可预见的未来,它都不会支持私人访问令牌。 + +回到苹果,我想到私人访问令牌也可能导致消费者维修设备的权利出现一些问题。例如,如果我用第三方的非正品电池更换了老旧的 iPhone 原装电池,私人访问令牌系统会特殊对待这种情况吗? + +如果是 Linux 手机呢?这些制造商,如 Pine64 和 Purism,可能没有支持这样一个系统的基础设施。是否可以在这些上使用私人访问令牌呢? + +Cloudflare 在 [公告帖][4] 中提到: + +> 我们正在积极努力让其他客户和设备制造商也使用私人访问令牌框架。每当新客户开始使用它时,从该客户进入你网站的流量将自动开始要求令牌,你的访问者将自动看到更少的验证码。 + +因此,我们希望看到它被更多的设备和操作系统采用。你如何看待 Cloudflare 的私人访问令牌呢?在下面的评论中发表你的看法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cloudflare-pat/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg +[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png +[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ From 2b85954120dab9ce1e957d666f6c66106e3e35c1 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 14:27:21 +0800 Subject: [PATCH 136/231] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?tech]:=2020220607=20How=20Garbage=20Collection=20works=20inside?= =?UTF-8?q?=20a=20Java=20Virtual=20Machine.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ion works inside a Java Virtual Machine.md | 155 ----------------- ...ion works inside a Java Virtual Machine.md | 157 ++++++++++++++++++ 2 files changed, 157 insertions(+), 155 deletions(-) delete mode 100644 sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md create mode 100644 translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md diff --git a/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md b/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md deleted file mode 100644 index c99ed4df0e..0000000000 --- a/sources/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: subject: "How Garbage Collection works inside a Java Virtual Machine" -[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine" -[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How Garbage Collection works inside a Java Virtual Machine -====== -Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances. - -![Coffee beans][1] - -Image by: Pixabay. CC0. - -Automatic Garbage Collection (GC) is one of the most important features that makes Java so popular. This article explains why GC is essential. It includes automatic and generational GC, how the Java Virtual Machine (JVM) divides heap memory, and finally, how GC works inside the JVM. - -### Java memory allocation - -Java memory is divided into four sections: - -1. Heap: The memory for object instances is allocated in the heap. When the object declaration is made, there won't be any memory allocated in the heap. Instead, a reference is created for that object in the stack. -2. Stack: This section allocates the memory for methods, local variables, and class instance variables. -3. Code: Bytecode resides in this section. -4. Static: Static data and methods are placed in this section. - -### What is automatic Garbage Collection (GC)? - -Automatic GC is a process in which the referenced and unreferenced objects in heap memory are identified, and then unreferenced objects are considered for deletion. The term *referenced objects* means some part of your program is using those objects. *Unreferenced objects* are not currently being used by the program. - -Programming languages like C and C++ require manual allocation and deallocation of memory. This is automatically handled by GC in Java, although you can trigger GC manually with the `system.gc();` call in your code. - -The fundamental steps of GC are: - -#### 1. Mark used and unused objects - -In this step, the used and unused objects are marked separately. This is a time-consuming process, as all objects in memory must be scanned to determine whether they're in use or not. - -![Marking used and unused objects][2] - -#### 2. Sweep/Delete objects - -There are two variations of sweep and delete. - -**Simple deletion**: Only unreferenced objects are removed. However, the memory allocation for new objects becomes difficult as the free space is scattered across available memory. - -![Normal deleting process][3] - -**Deletion with compaction**: Apart from deleting unreferenced objects, referenced objects are compacted. Memory allocation for new objects is relatively easy, and memory allocation performance is improved. - -![Deletion with compacting][4] - -### What is generational Garbage Collection (GC), and why is it needed? - -As seen in the sweep and delete model, scanning all objects for memory reclamation from unused objects becomes difficult once the objects keep growing. An experimental study shows that most objects created during the program execution are short-lived. - -The existence of short-lived objects can be used to improve the performance of GC. For that, the JVM divides the memory into different generations. Next, it categorizes the objects based on these memory generations and performs the GC accordingly. This approach is known as *generational GC*. - -### Heap memory generations and the generational Garbage Collection (GC) process - -To improve the performance of the GC mark and sweep steps, the JVM divides the heap memory into three generations: - -* Young Generation -* Old Generation -* Permanent Generation - -![Hotspot heap structure][5] - -Here is a description of each generation and its key features. - -#### Young Generation - -All created objects are present here. The young generation is further divided into: - -1. Eden: All newly created objects are allocated with the memory here. -2. Survivor space (S0 and S1): After surviving one GC, the live objects are moved to one of these survivor spaces. - -![Object allocation][6] - -The generational GC that happens in the Young Generation is known as *Minor GC*. All Minor GC cycles are "Stop the World" events that cause the other applications to pause until it completes the GC cycle. This is why Minor GC cycles are faster. - -To summarize: Eden space has all newly created objects. Once Eden is full, the first Minor GC cycle is triggered. - -![Filling Eden space][7] - -Minor GC: The live and dead objects are marked during this cycle. The live objects are moved to survivor space S0. Once all live objects are moved to S0, the unreferenced objects are deleted. - -![Copying referenced objects][8] - -The age of objects in S0 is 1 because they have survived one Minor GC. Now Eden and S1 are empty. - -Once cleared, the Eden space is again filled with new live objects. As time elapses, some objects in Eden and S0 become dead (unreferenced), and Eden's space is full again, triggering the Minor GC. - -![Object aging][9] - -This time the dead and live objects in Eden and S0 are marked. The live objects from Eden are moved to S1 with an age increment of 1. The live objects from S0 are also moved to S1 with an age increment of 2 (because they've now survived two Minor GCs). At this point, S0 and Eden are empty. After every Minor GC, Eden and one of the survivor spaces are empty. - -The same cycle of creating new objects in Eden continues. When the next Minor GC occurs, Eden and S1 are cleared by moving the aged objects to S0. The survivor spaces switch after every Minor GC. - -![Additional aging][10] - -This process continues until the age of one of the surviving objects reaches a certain threshold, at which point it is moved to the so-called the Old Generation with a process called *promotion*. - -Further, the `-Xmn` flag sets the Young Generation size. - -### Old Generation (Tenured Generation) - -This generation contains the objects that have survived several Minor GCs and aged to reach an expected threshold. - -![Promotion][11] - -In the example diagram above, the threshold is 8. The GC in the Old Generation is known as a *Major GC*. Use the flags `-Xms` and `-Xmx` to set the initial and maximum size of the heap memory. - -### Permanent Generation - -The Permanent Generation space stores metadata related to library classes and methods of an application, J2SE, and what's in use by the JVM itself. The JVM populates this data at runtime based on which classes and methods are in use. Once the JVM finds the unused classes, they are unloaded or collected, making space for used classes. - -Use the flags `-XX:PermGen` and `-XX:MaxPermGen` to set the initial and maximum size of the Permanent Generation. - -#### Metaspace - -Metaspace was introduced in Java 8u and replaced PermGen. The advantage of this is automatic resizing, which avoids OutOfMemory errors. - -### Wrap up - -This article discusses the various memory generations of JVM and how they are helpful for automatic generational Garbage Collection (GC). Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances. This understanding allows you to plan and troubleshoot your code and comprehend potential limitations inherent in a specific platform. - -Image by: (Jayashree Huttanagoudar, CC BY-SA 4.0) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine - -作者:[Jayashree Huttanagoudar][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/jayashree-huttanagoudar -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg -[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png -[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png -[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png -[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png -[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png -[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png -[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png -[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png -[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png -[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png diff --git a/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md b/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md new file mode 100644 index 0000000000..97ab13a20c --- /dev/null +++ b/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md @@ -0,0 +1,157 @@ +[#]: subject: "How Garbage Collection works inside a Java Virtual Machine" +[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +JVM 垃圾回收的工作原理 +====== +对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 是如何处理程序中的变量和类实例的。 + +![咖啡豆][1] + +图源:Pixabay. CC0. + +Java 之所以能够如此流行,自动 垃圾回收Garbage Collection(GC)功不可没,它也是 Java 最重要的几个特性之一。在这篇文章中,我将说明为什么垃圾回收如此重要。本文的主要内容为:自动的分代垃圾回收、JVM 划分内存的依据,以及 JVM 垃圾回收的工作原理。 + +### Java 内存分配 + +Java 程序的内存空间被划分为以下四个区域: + +1. 堆区(Heap):对象实例就是在这个区域分配的。不过,当我们声明一个对象时,堆中不会有任何内存分配发生,只是在栈中创建了一个对象的引用而已。 +2. 栈区(Stack):方法、局部变量和类的实例变量就是在这个区域分配的。 +3. 代码区(Code):这个区域存放了程序的字节码。 +4. 静态区(Static):这个区域存放了程序的静态数据和静态方法。 + +### 什么是自动垃圾回收? + +自动垃圾回收是这样一个过程:首先,堆中的所有对象会被分类为“被引用的”和“未被引用的”;接着,“未被引用的对象”就会被做上标记,以待之后删除。其中,“被引用的对象”是指程序中的某一部分仍在使用的对象,“未被引用的对象”是指目前没有正在被使用的对象。 + +许多编程语言,例如 C 和 C++,都需要程序员手动管理内存的分配和释放。在 Java 中,这一过程是通过垃圾回收机制来自动完成的(尽管你也可以在代码中调用 `system.gc();` 来手动触发垃圾回收)。 + +垃圾回收的基本步骤如下: + +#### 1. 标记已使用和未使用的对象 + +在这一步骤中,已使用和未使用的对象会被分别做上标记。这是一个及其耗时的过程,因为需要扫描内存中的所有对象,才能够确定它们是否正在被使用。 + +![标记已使用和未使用的对象][2] + +#### 2. 扫描/删除对象 + +有两种不同的扫描和删除算法: + +**简单删除(标记清除)**:它的过程很简单,我们只需要删除未被引用的对象即可。但是,后续给新对象分配内存就会变得很困难了,因为可用空间被分割成了一块块碎片。 + +![标记清除的过程][3] + +**删除压缩(标记整理)**:除了会删除未被引用的对象,我们还会压缩被引用的对象(未被删除的对象)。这样以来,新对象的内存分配就相对容易了,并且内存分配的效率也有了提升。 + +![标记整理的过程][4] + +### 什么是分代垃圾收集,为什么需要它? + +正如我们在“扫描删除”模型中所看到的,一旦对象不断增长,我们就很难扫描所有未使用的对象以回收内存。不过,有一项实验性研究指出,在程序执行期间创建的大多数对象,它们的存活时间都很短。 + +既然大多数对象的存活时间都很短,那么我们就可以利用这个事实,从而提升垃圾回收的效率。该怎么做呢?首先,JVM 将内存划分为不同的“代”。接着,它将所有的对象都分类到这些内存“代”中,然后对这些“代”分别执行垃圾回收。这就是“分代垃圾回收”。 + +### 堆内存的“代”和分代垃圾回收过程 + +为了提升垃圾回收中的“标记清除”的效率,JVM 将对内存划分成以下三个“代”: + +* 年轻代 +* 老年代 +* 永久代 + +![Hotspot 堆内存结构][5] + +下面我将介绍每个“代”及其主要特征。 + +#### 年轻代 + +所有创建不久的对象都存放在这里。年轻代被进一步分为以下两个区域: + +1. 伊甸区(Eden):所有新创建的对象都在此处分配内存。 +2. 幸存者区(Survivor,分为 S0 和 S1):经历过一次垃圾回收后,仍然存活的对象会被移动到两个幸存者区中的一个。 + +![对象分配][6] + +在年轻代发生的分代垃圾收集被称为 “Minor GC”。Minor GC 过程中的每个阶段都是“停止世界Stop The World”(STW)的,这会导致其他应用程序暂停运行,直到垃圾回收结束。这也是 Minor GC 更快的原因。 + +一句话总结:伊甸区存放了所有新创建的对象,当它的可用空间被耗尽,第一次垃圾回收就会被触发。 + +![填充伊甸区][7] + +Minor GC:在该垃圾回收过程中,所有存活和死亡的对象都会被做上标记。其中,存活对象会被移动到 S0 幸存者区。当所有存活对象都被移动到了 S0,未被引用的对象就会被删除。 + +![拷贝被引用的对象][8] + +S0 中的对象年龄为 1,因为它们挺过了一次 Minor GC。此时,伊甸区和 S1 都是空的。 + +每当完成清理后,伊甸区就会再次接受新的存活对象。随着时间的推移,伊甸区和 S0 中的某些对象被宣判死亡(不再被引用),并且伊甸区的可用空间也再次耗尽(填满了),那么 Minor GC 又将再次被触发。 + +![对象年龄增长][9] + +这一次,伊甸区和 S0 中的死亡和存活的对象会被做上标记。其中,伊甸区的存活对象会被移动到 S1,并且年龄增加至 1。S0 中的存活对象也会被移动到 S1,并且年龄增加至 2(因为它们挺过了两次 Minor GC)。此时,伊甸区和 S0 又是空的了。每次 Minor GC 之后,伊甸区和两个幸存者区中的一个都会是空的。 + +新对象总是在伊甸区被创建,周而复始。当下一次垃圾回收发生时,伊甸区和 S1 都会被清理,它们中的存活对象会被移动到 S0 区。每次 Minor GC 之后,这两个幸存者区(S0 和 S1)就会交换一次。 + +![额外年龄增长][10] + +这个过程会一直进行下去,直到某个存活对象的年龄达到了某个阈值,然后它就会被移动到一个叫做“老年代”的地方,这是通过一个叫做“晋升”的过程来完成的。 + +使用 `-Xmn` 选项可以设置年轻代的大小。 + +### 老年代 + +这个区域存放着那些挺过了许多次 Minor GC,并且达到了某个年龄阈值的对象。 + +![晋升][11] + +在上面这个示例图表中,晋升的年龄阈值为 8。在老年代发生的垃圾回收被称为 “Major GC”。 + +使用 `-Xms` 和 `-Xmx` 选项可以分别设置堆内存大小的初始值和最大值。(LCTT 译注:结合上面的 `-Xmn` 选项,就可以间接设置老年代的大小了。) + +### 永久代 + +永久代存放着一些元数据,它们与应用程序、Java 标准环境以及 JVM 自用的库类及其方法相关。JVM 会在运行时,用到了什么类和方法,就会填充相应的数据。当 JVM 发现有未使用的类,就会卸载或是回收它们,从而为正在使用的类腾出空间。 + +使用 `-XX:PermGen` 和 `-XX:MaxPerGen` 选项可以分别设置永久代大小的初始值和最大值。 + +#### 元空间 + +Java 8 引入了元空间,并用它替换了永久代。这么做的好处是自动调整大小,避免了 内存不足OutOfMemory(OOM)错误。 + +### 总结 + +本文讨论了各种不同的 JVM 内存“代”,以及它们是如何在分代垃圾回收算法中起作用的。对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 处理程序中的变量和类实例的方式。这种理解使你能够规划和排除代码故障,并理解特定平台固有的潜在限制。 + +正文配图来自:Jayashree Huttanagoudar,CC BY-SA 4.0 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg +[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png +[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png +[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png +[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png +[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png +[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png +[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png +[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png +[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png +[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png From 965a0978e10460c98ec1c093c737cd52cafa7e88 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 14:32:17 +0800 Subject: [PATCH 137/231] Update 20220607 How Garbage Collection works inside a Java Virtual Machine.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一使用“垃圾回收”而不是“垃圾收集” --- ... Garbage Collection works inside a Java Virtual Machine.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md b/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md index 97ab13a20c..e102895b7c 100644 --- a/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md +++ b/translated/tech/20220607 How Garbage Collection works inside a Java Virtual Machine.md @@ -52,7 +52,7 @@ Java 程序的内存空间被划分为以下四个区域: ![标记整理的过程][4] -### 什么是分代垃圾收集,为什么需要它? +### 什么是分代垃圾回收,为什么需要它? 正如我们在“扫描删除”模型中所看到的,一旦对象不断增长,我们就很难扫描所有未使用的对象以回收内存。不过,有一项实验性研究指出,在程序执行期间创建的大多数对象,它们的存活时间都很短。 @@ -79,7 +79,7 @@ Java 程序的内存空间被划分为以下四个区域: ![对象分配][6] -在年轻代发生的分代垃圾收集被称为 “Minor GC”。Minor GC 过程中的每个阶段都是“停止世界Stop The World”(STW)的,这会导致其他应用程序暂停运行,直到垃圾回收结束。这也是 Minor GC 更快的原因。 +在年轻代发生的分代垃圾回收被称为 “Minor GC”。Minor GC 过程中的每个阶段都是“停止世界Stop The World”(STW)的,这会导致其他应用程序暂停运行,直到垃圾回收结束。这也是 Minor GC 更快的原因。 一句话总结:伊甸区存放了所有新创建的对象,当它的可用空间被耗尽,第一次垃圾回收就会被触发。 From 34dc20c1125b6131a129961baa19b287a00d3059 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 14:51:31 +0800 Subject: [PATCH 138/231] Update 20210503 Learn the Lisp programming language in 2021.md --- ...n the Lisp programming language in 2021.md | 173 ++++++++---------- 1 file changed, 79 insertions(+), 94 deletions(-) diff --git a/sources/tech/20210503 Learn the Lisp programming language in 2021.md b/sources/tech/20210503 Learn the Lisp programming language in 2021.md index a1de95ead8..b4694df247 100644 --- a/sources/tech/20210503 Learn the Lisp programming language in 2021.md +++ b/sources/tech/20210503 Learn the Lisp programming language in 2021.md @@ -1,83 +1,79 @@ -[#]: subject: (Learn the Lisp programming language in 2021) -[#]: via: (https://opensource.com/article/21/5/learn-lisp) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Learn the Lisp programming language in 2021" +[#]: via: "https://opensource.com/article/21/5/learn-lisp" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " -Learn the Lisp programming language in 2021 +Learn the Lisp programming language in 2022 ====== -A lot of Lisp code lurks inside big codebases, so it's smart to get -familiar with the language. -![Woman sitting in front of her laptop][1] +A lot of Lisp code lurks inside big codebases, so it's smart to get familiar with the language. + +![Women in tech and computing][1] + +Image by: kris krüg Lisp was invented in 1958, which makes it the second-oldest computer programming language. It has spawned several modern derivatives, including Common Lisp, Emacs Lisp (Elisp), Clojure, Racket, Scheme, Fennel, and GNU Guile. -People who love thinking about the design of programming languages often love Lisp because of how its syntax and data share the same structure: Lisp code is essentially a list of lists, and its name is an acronym for _LISt Processing_. People who love thinking about the aesthetics of programming languages often hate Lisp because of its frequent use of parentheses for scoping; in fact, it's a common joke that Lisp stands for _Lots of Irritating Superfluous Parentheses_. +People who love thinking about the design of programming languages often love Lisp because of how its syntax and data share the same structure: Lisp code is essentially a list of lists, and its name is an acronym for *LISt Processing*. People who love thinking about the aesthetics of programming languages often hate Lisp because of its frequent use of parentheses for scoping; in fact, it's a common joke that Lisp stands for *Lots of Irritating Superfluous Parentheses*. Whether you love or hate its design philosophies, Lisp is an interesting glimpse at the past and, thanks to Clojure and Guile, into the future. You might be surprised how much Lisp code there is lurking within big codebases in any given industry, so it's a good idea to have at least a passing familiarity with the language. ### Install Lisp -There are many implementations of Lisp. Popular open source versions include [SBCL][2] and [GNU Common Lisp][3] (GCL). You can install either of these with your distribution's package manager. +There are many implementations of Lisp. Popular open source versions include [SBCL][2], [GNU Lisp][3], and [GNU Common Lisp][4] (GCL). You can install any of these with your distribution's package manager, but for this article I use `clisp`. On Fedora Linux: - ``` -`$ sudo dnf install gcl` +$ sudo dnf install clisp ``` On Debian: - ``` -`$ sudo apt install gcl` +$ sudo apt install clisp ``` -For macOS, you can use [MacPorts][4] or [Homebrew][5]: - +For macOS, you can use [MacPorts][5] or [Homebrew][6]: ``` -`$ sudo port install gcl` +$ sudo port install clisp ``` -For Windows, download a binary from [gnu.org/software/gcl][6]. +For Windows, you can either use [clisp on Cygwin][7] or download a GCL binary from [gnu.org/software/gcl][8]. -For this article, I'm using GCL and its `clisp` command, but most of the principles apply to any Lisp. +Even though I'm using the `clisp` command, most of the principles in this article apply to any Lisp. Should you choose to use a different Lisp implementation, the command to run Lisp code is different from what I use in this article (`gcl` or `sbcl` instead of `clisp`, for example) but everything else is the same. ### List processing -The basic unit of Lisp source code is an _expression_, which is written as a list. For instance, this is a list of an operator (`+`) and two integers (`1` and `2`): - +The basic unit of Lisp source code is an *expression*, which is written as a list. For instance, this is a list of an operator (`+` ) and two integers (`1` and `2` ): ``` -`(+ 1 2)` +(+ 1 2) ``` -It's also a Lisp expression, using a symbol (`+`) that evaluates to a function (addition) and two arguments (`1` and `2`). You can run this expression and others in an interactive Common Lisp environment called REPL (read-eval-print loop). If you're familiar with Python's IDLE, Lisp's REPL should feel somewhat familiar to you. +It's also a Lisp expression, using a symbol (`+` ) that evaluates to a function (addition) and two arguments (`1` and `2` ). You can run this expression and others in an interactive Common Lisp environment called REPL (read-eval-print loop). If you're familiar with Python's IDLE, Lisp's REPL should feel somewhat familiar to you. To launch a REPL, launch Common Lisp: - ``` $ clisp -[1]> +[1]> ``` At the REPL prompt, type a few expressions: - ``` -[1]> (+ 1 2) +[1]> (+ 1 2) 3 -[2]> (- 1 2) +[2]> (- 1 2) -1 -[3]> (- 2 1) +[3]> (- 2 1) 1 -[4]> (+ 2 3 4) +[4]> (+ 2 3 4) 9 ``` @@ -85,109 +81,100 @@ At the REPL prompt, type a few expressions: Now that you know the basic structure of a Lisp expression, you can utilize Lisp functions in useful ways. The `print` function takes any argument you provide and displays it on your terminal, while the `pprint` function "pretty" prints it. There are other variations on the print function, but `pprint` is nice in REPL: - ``` -[1]> (pprint "hello world") +[1]> (pprint "hello world") "hello world" -[2]> +[2]> ``` You can create your own functions with `defun`. The `defun` function requires a name for your function and any parameters you want your function to accept: - ``` -[1]> (defun myprinter (s) (pprint s)) +[1]> (defun myprinter (s) (pprint s)) MYPRINTER -[2]> (myprinter "hello world") +[2]> (myprinter "hello world") "hello world" -[3]> +[3]> ``` ### Variables -You can create variables in Lisp with `setf`: - +You can create variables in Lisp with `setf` : ``` -[1]> (setf foo "hello world") +[1]> (setf foo "hello world") "hello world" -[2]> (pprint foo) +[2]> (pprint foo) "hello world" -[3]> +[3]> ``` You can nest expressions within expressions in a kind of pipeline. For instance, you can pretty print the contents of your variable after invoking the `string-upcase` function to convert its characters to uppercase: - ``` -[3]> (pprint (string-upcase foo)) +[3]> (pprint (string-upcase foo)) "HELLO WORLD" -[4]> +[4]> ``` Lisp is dynamically typed in the sense that you don't have to declare variable types when setting them. Lisp treats integers as integers by default: - ``` -[1]> (setf foo 2) -[2]> (setf bar 3) -[3]> (+ foo bar) +[1]> (setf foo 2) +[2]> (setf bar 3) +[3]> (+ foo bar) 5 ``` If you intend for an integer to be interpreted as a string, you can quote it: - ``` -[4]> (setf foo "2")                                                                                                                       -"2"                                                                                                                                       -[5]> (setf bar "3")                                                                                                                       +[4]> (setf foo "2") +"2" +[5]> (setf bar "3") "3" -[6]> (+ foo bar) +[6]> (+ foo bar) *** - +: "2" is not a number The following restarts are available: USE-VALUE      :R1      Input a value to be used instead. ABORT          :R2      Abort main loop -Break 1 [7]> +Break 1 [7]> ``` In this sample REPL session, both `foo` and `bar` are set to quoted numbers, so Lisp interprets them as strings. Math operators can't be used on strings, so REPL drops into a debugger mode. To get out of the debugger, press **Ctrl+D** on your keyboard. -You can do some introspection on objects using the `typep` function, which tests for a specific data type. The tokens `T` and `NIL` represent _True_ and _False_, respectively. - +You can do some introspection on objects using the `typep` function, which tests for a specific data type. The tokens `T` and `NIL` represent *True* and *False*, respectively. ``` -[4]> (typep foo 'string) +[4]> (typep foo 'string) NIL -[5]> (typep foo 'integer) +[5]> (typep foo 'integer) T ``` -The single quote (`'`) before `string` and `integer` prevents Lisp from (incorrectly) evaluating those keywords as variables: - +The single quote (`'` ) before `string` and `integer` prevents Lisp from (incorrectly) evaluating those keywords as variables: ``` -[6]> (typep foo string) +[6]> (typep foo string) *** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value [...] ``` It's a shorthand way to protect the terms, normally done with the `quote` function: - ``` -[7]> (typep foo (quote string)) +[7]> (typep foo (quote string)) NIL -[5]> (typep foo (quote integer)) +[5]> (typep foo (quote integer)) T ``` @@ -195,19 +182,17 @@ T Unsurprisingly, you can also create lists in Lisp: - ``` -[1]> (setf foo (list "hello" "world")) +[1]> (setf foo (list "hello" "world")) ("hello" "world") ``` Lists can be indexed with the `nth` function: - ``` -[2]> (nth 0 foo) +[2]> (nth 0 foo) "hello" -[3]> (pprint (string-capitalize (nth 1 foo))) +[3]> (pprint (string-capitalize (nth 1 foo))) "World" ``` @@ -216,19 +201,17 @@ Lists can be indexed with the `nth` function: To end a REPL session, press **Ctrl+D** on your keyboard, or use the `quit` keyword in Lisp: - ``` -[99]> (quit) +[99]> (quit) $ ``` ### Scripting -Lisp can be compiled or used as an interpreted scripting language. The latter is probably the easiest option when you're starting, especially if you're already familiar with Python or [shell scripting][7]. +Lisp can be compiled or used as an interpreted scripting language. The latter is probably the easiest option when you're starting, especially if you're already familiar with Python or [shell scripting][9]. Here's a simple dice roller script written in GNU Common Lisp: - ``` #!/usr/bin/clisp @@ -241,26 +224,24 @@ Here's a simple dice roller script written in GNU Common Lisp: (roller userput) ``` -The first line tells your [POSIX][8] terminal what executable to use to run the script. +The first line tells your [POSIX][10] terminal what executable to use to run the script. The `roller` function, created with `defun`, uses the `random` function to print a pseudo-random number up to, and not including, the zeroth item of the `num` list. The `num` list hasn't been created yet in the script, but the function doesn't get executed until it's called. The next line assigns any argument provided to the script at launch time to a variable called `userput`. The `userput` variable is a list, and it's what becomes `num` once it's passed to the `roller` function. -The penultimate line of the script starts a _random seed_. This provides Lisp with enough entropy to generate a mostly random number. +The penultimate line of the script starts a *random seed*. This provides Lisp with enough entropy to generate a mostly random number. The final line invokes the custom `roller` function, providing the `userput` list as its sole argument. Save the file as `dice.lisp` and mark it executable: - ``` -`$ chmod +x dice.lisp` +$ chmod +x dice.lisp ``` Finally, try running it, providing it with a maximum number from which to choose its random number: - ``` $ ./dice.lisp 21 @@ -275,9 +256,11 @@ $ ./dice.lisp 21 Not bad! +You may notice that your emulated die has a pontential value of 0, and never reaches the maximum number you provide to it as an argument. In other words, this script never rolls 20 on a 20-sided die (unless you count 0 as 20). There's a simple fix to this, and you only need the knowledge gained from this article to do it. Can you fix this bug? + ### Learn Lisp -Whether you can imagine using Lisp as a utilitarian language for personal scripts, to advance your career, or just as a fun experiment, you can see some particularly inventive uses at the annual [Lisp Game Jam][9] (most submissions are open source, so you can view the code to learn from what you play). +Whether you can imagine using Lisp as a utilitarian language for personal scripts, to advance your career, or just as a fun experiment, you can see some particularly inventive uses at the annual [Lisp Game Jam][11] (most submissions are open source, so you can view the code to learn from what you play). Lisp is a fun and unique language with an ever-growing developer base and enough historic and emerging dialects to keep programmers from all disciplines happy. @@ -286,20 +269,22 @@ Lisp is a fun and unique language with an ever-growing developer base and enough via: https://opensource.com/article/21/5/learn-lisp 作者:[Seth Kenlon][a] -选题:[lujun9972][b] +选题:[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/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_4.png [2]: http://sbcl.org -[3]: https://www.gnu.org/software/gcl/ -[4]: https://opensource.com/article/20/11/macports -[5]: https://opensource.com/article/20/6/homebrew-linux -[6]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable -[7]: https://opensource.com/article/20/4/bash-programming-guide -[8]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[9]: https://itch.io/jam/spring-lisp-game-jam-2021 +[3]: http://clisp.org +[4]: https://www.gnu.org/software/gcl/ +[5]: https://opensource.com/article/20/11/macports +[6]: https://opensource.com/article/20/6/homebrew-linux +[7]: https://cygwin.fandom.com/wiki/Clisp +[8]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable +[9]: https://opensource.com/article/20/4/bash-programming-guide +[10]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[11]: https://itch.io/jam/spring-lisp-game-jam-2021 From 1daa2dd5a938888edc81ae17628180b27cf1fb0b Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 15:02:54 +0800 Subject: [PATCH 139/231] Update 20210503 Learn the Lisp programming language in 2021.md --- .../20210503 Learn the Lisp programming language in 2021.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210503 Learn the Lisp programming language in 2021.md b/sources/tech/20210503 Learn the Lisp programming language in 2021.md index b4694df247..6f73c62d9c 100644 --- a/sources/tech/20210503 Learn the Lisp programming language in 2021.md +++ b/sources/tech/20210503 Learn the Lisp programming language in 2021.md @@ -7,7 +7,7 @@ [#]: publisher: " " [#]: url: " " -Learn the Lisp programming language in 2022 +Let's learn the Lisp programming language ====== A lot of Lisp code lurks inside big codebases, so it's smart to get familiar with the language. From c30ef8918f3b517b17cd406b14243725062d7015 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Jun 2022 15:59:55 +0800 Subject: [PATCH 140/231] RP @geekpi https://linux.cn/article-14700-1.html --- ... That Just Plays Music and Nothing Else.md | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) rename {translated/tech => published}/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md (68%) diff --git a/translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md b/published/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md similarity index 68% rename from translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md rename to published/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md index 772796fee7..0ccbb7c9bc 100644 --- a/translated/tech/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md +++ b/published/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md @@ -3,15 +3,18 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14700-1.html" Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不做其他事情 ====== + +![](https://img.linux.net.cn/data/attachment/album/202206/12/155846b0sbsvtt1et70ttf.jpg) + 虽然音乐世界被流媒体服务所主导,但这并没有阻止开发者为桌面电脑创建音乐播放器。 -最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼了。 +最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼。 ![amberol music player interface][1] @@ -21,41 +24,41 @@ Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不 看起来不错是它所做的两件(或几件)事情中的一件。另一件事是播放音乐。 -这就是它。[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。 +这就是它,[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。 -这些功能也不像会在未来的版本中加入。Amberol 只想播放音乐。就是这样。 +这些功能也不像是会在未来的版本中加入。Amberol 只想播放音乐。就是这样。 #### 令人惊叹的用户界面 Amberol 和大多数新的 GNOME 应用一样,是用 Rust 和 GTK 编写的。 -它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux rice 截图的一部分。 +它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux 美化Ricing截图的一部分。 ![amberol music player][3] -由于 UI 没有传统的手柄和菜单,它给应用一个统一的外观。 +由于其 UI 没有传统的手柄和菜单,它给应用一个统一的外观。 #### 播放列表 -它从你添加的文件夹中存在的文件自动生成一个播放列表。它显示在左手边的侧边栏。 +它会从你添加的文件夹中的文件自动生成一个播放列表,显示在左手边的侧边栏。 ![amberol playlist][4] -你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选符号”,你可以选择歌曲,并从播放列表中删除它们。 +你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选”符号,你可以选择歌曲,并从播放列表中删除它们。 -如果你愿意,你可以隐藏播放列表的侧边栏。 +如果你愿意,可以隐藏播放列表的侧边栏。 ![amberol without playlist][5] #### 音乐播放选项 -你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键播放/暂停和改变曲目(如果你的系统上有)。 +你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键来播放、暂停和改变曲目(如果你的系统上有)。 -Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以把一首歌放在重复的位置,一直播放,直到你厌倦它。 +Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以单曲循环,直到你厌倦它。 ![amberol music playing options][6] -底部的手柄菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。 +底部的汉堡菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。 ![amberol keyboard shortcuts][7] @@ -63,7 +66,7 @@ Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放 ### 在 Linux 上安装 Amberol -Amberol 是[以 Flatpak 形式提供][8]。请确保[你的系统已启用 Flatpak 支持][9]。 +Amberol 是 [以 Flatpak 形式提供的][8]。请确保 [你的系统已启用 Flatpak 支持][9]。 要安装 Amberol,请打开终端并使用以下命令: @@ -73,17 +76,17 @@ flatpak install flathub io.bassi.Amberol 安装完毕后,在菜单中搜索该应用,并点击启动。 -第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件。 +第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件播放。 ![amberol first run][10] ### 总结 -就个人而言,我更喜欢流媒体服务,因为我没有一个很好的本地音乐收藏。但我知道有的人有/有大量的 CD 收藏,现在都保存在硬盘上。 +就个人而言,我更喜欢流媒体服务,因为我没有本机音乐珍藏。但我知道有的人有大量的 CD 收藏,现在都保存在硬盘上。 -Amberol 是一个外观漂亮的应用,对于播放本地音乐来说,它足够好。最吸引人的是基于专辑封面的自适应用户界面。 +Amberol 是一个外观漂亮的应用,对于播放本机音乐来说,它足够好。最吸引人的是它基于专辑封面的自适应用户界面。 -我请你试试它,并在评论区分享你的经验。 +请你试试它,并在评论区分享你的经验。 -------------------------------------------------------------------------------- @@ -92,7 +95,7 @@ via: https://itsfoss.com/amberol-music-player/ 作者:[Abhishek Prakash][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/) 荣誉推出 From a328549a9f11323152f89bd0bebbf18844432645 Mon Sep 17 00:00:00 2001 From: Donkey-Hao Date: Sun, 12 Jun 2022 20:31:54 +0800 Subject: [PATCH 141/231] translated --- ...e a countdown clock with a Raspberry Pi.md | 393 ------------------ ...e a countdown clock with a Raspberry Pi.md | 384 +++++++++++++++++ 2 files changed, 384 insertions(+), 393 deletions(-) delete mode 100644 sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md create mode 100644 translated/tech/20210319 Create a countdown clock with a Raspberry Pi.md diff --git a/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md b/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md deleted file mode 100644 index 6b042c6d86..0000000000 --- a/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md +++ /dev/null @@ -1,393 +0,0 @@ -[#]: subject: (Create a countdown clock with a Raspberry Pi) -[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock) -[#]: author: (Chris Collins https://opensource.com/users/clcollins) -[#]: collector: (lujun9972) -[#]: translator: ( Donkey-Hao ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Create a countdown clock with a Raspberry Pi -====== -Start counting down the days to your next holiday with a Raspberry Pi -and an ePaper display. -![Alarm clocks with different time][1] - -For 2021, [Pi Day][2] has come and gone, leaving fond memories and [plenty of Raspberry Pi projects][3] to try out. The days after any holiday can be hard when returning to work after high spirits and plenty of fun, and Pi Day is no exception. As we look into the face of the Ides of March, we can long for the joys of the previous, well, day. But fear no more, dear Pi Day celebrant! For today, we begin the long countdown to the next Pi Day! - -OK, but seriously. I made a Pi Day countdown timer, and you can too! - -A while back, I purchased a [Raspberry Pi Zero W][4] and recently used it to [figure out why my WiFi was so bad][5]. I was also intrigued by the idea of getting an ePaper display for the little Zero W. I didn't have a good use for one, but, dang it, it looked like fun! I purchased a little 2.13" [Waveshare display][6], which fit perfectly on top of the Raspberry Pi Zero W. It's easy to install: Just slip the display down onto the Raspberry Pi's GIPO headers and you're good to go. - -I used [Raspberry Pi OS][7] for this project, and while it surely can be done with other operating systems, the `raspi-config` command, used below, is most easily available on Raspberry Pi OS. - -### Set up the Raspberry Pi and the ePaper display - -Setting up the Raspberry Pi to work with the ePaper display requires you to enable the Serial Peripheral Interface (SPI) in the Raspberry Pi software, install the BCM2835 C libraries (to access the GPIO functions for the Broadcom BCM 2835 chip on the Raspberry Pi), and install Python GPIO libraries to control the ePaper display. Finally, you need to install the Waveshare libraries for working with the 2.13" display using Python. - -Here's a step-by-step walkthrough of how to do these tasks. - -#### Enable SPI - -The easiest way to enable SPI is with the Raspberry Pi `raspi-config` command. The SPI bus allows serial data communication to be used with devices—in this case, the ePaper display: - - -``` -`$ sudo raspi-config` -``` - -From the menu that pops up, select **Interfacing Options** -> **SPI** -> **Yes** to enable the SPI interface, then reboot. - -#### Install BCM2835 libraries - -As mentioned above, the BCM2835 libraries are software for the Broadcom BCM2385 chip on the Raspberry Pi, which allows access to the GPIO pins and the ability to use them to control devices. - -As I'm writing this, the latest version of the Broadcom BCM 2835 libraries for the Raspberry Pi is v1.68. To install the libraries, you need to download the software tarball and build and install the software with `make`: - - -``` -# Download the BCM2853 libraries and extract them -$ curl -sSL -o - | tar -xzf - - -# Change directories into the extracted code -$ pushd bcm2835-1.68/ - -# Configure, build, check and install the BCM2853 libraries -$ sudo ./configure -$ sudo make check -$ sudo make install - -# Return to the original directory -$ popd -``` - -#### Install required Python libraries - -You also need some Python libraries to use Python to control the ePaper display, the `RPi.GPIO` pip package. You also need the `python3-pil` package for drawing shapes. Apparently, the PIL package is all but dead, but there is an alternative, [Pillow][8]. I have not tested Pillow for this project, but it may work: - - -``` -# Install the required Python libraries -$ sudo apt-get update -$ sudo apt-get install python3-pip python3-pil -$ sudo pip3 install RPi.GPIO -``` - -_Note: These instructions are for Python 3. You can find Python 2 instructions on Waveshare's website_ - -#### Download Waveshare examples and Python libraries - -Waveshare maintains a Git repository with Python and C libraries for working with its ePaper displays and some examples that show how to use them. For this countdown clock project, you will clone this repository and use the libraries for the 2.13" display: - - -``` -# Clone the WaveShare e-Paper git repository -$ git clone -``` - -If you're using a different display or a product from another company, you'll need to use the appropriate software for your display. - -Waveshare provides instructions for most of the above on its website: - - * [WaveShare ePaper setup instructions][9] - * [WaveShare ePaper libraries install instructions][10] - - - -#### Get a fun font (optional) - -You can display your timer however you want, but why not do it with a little style? Find a cool font to work with! - -There's a ton of [Open Font License][11] fonts available out there. I am particularly fond of Bangers. You've seen this if you've ever watched YouTube—it's used _all over_. It can be downloaded and dropped into your user's local shared fonts directory to make it available for any application, including this project: - - -``` -# The "Bangers" font is a Open Fonts License licensed font by Vernon Adams () from Google Fonts -$ mkdir -p ~/.local/share/fonts -$ curl -sSL -o fonts/Bangers-Regular.ttf -``` - -### Create a Pi Day countdown timer - -Now that you have installed the software to work with the ePaper display and a fun font to use, you can build something cool with it: a timer to count down to the next Pi Day! - -If you want, you can just grab the [countdown.py][12] Python file from this project's [GitHub repo][13] and skip to the end of this article. - -For the curious, I'll break down that file, section by section. - -#### Import some libraries - - -``` -#!/usr/bin/python3 -# -*- coding:utf-8 -*- -import logging -import os -import sys -import time - -from datetime import datetime -from pathlib import Path -from PIL import Image,ImageDraw,ImageFont - -logging.basicConfig(level=logging.INFO) - -basedir = Path(__file__).parent -waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python') -libdir = waveshare_base.joinpath('lib') -``` - -At the start, the Python script imports some standard libraries used later in the script. You also need to add `Image`, `ImageDraw`, and `ImageFont` from the PIL package, which you'll use to draw some simple geometric shapes. Finally, set some variables for the local `lib` directory that contains the Waveshare Python libraries for working with the 2.13" display, and which you can use later to load the library from the local directory. - -#### Font size helper function - -The next part of the script has a helper function for setting the font size for your chosen font: Bangers-Regular.ttf. It takes an integer for the font size and returns an ImageFont object you can use with the display: - - -``` -def set_font_size(font_size): -    logging.info("Loading font...") -    return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size) -``` - -#### Countdown logic - -Next is a small function that calculates the meat of this project: how long it is until the next Pi Day. If it were, say, January, it would be relatively straightforward to count how many days are left, but you also need to consider whether Pi Day has already passed for the year (sadface), and if so, count how very, very many days are ahead until you can celebrate again: - - -``` -def countdown(now): -    piday = datetime(now.year, 3, 14) - -    # Add a year if we're past PiDay -    if piday < now: -        piday = datetime((now.year + 1), 3, 14) - -    days = (piday - now).days - -    logging.info(f"Days till piday: {days}") -    return day -``` - -#### The main function - -Finally, you get to the main function, which initializes the display and begins writing data to it. In this case, you'll write a welcome message and then begin the countdown to the next Pi Day. But first, you need to load the Waveshare library: - - -``` -def main(): - -    if os.path.exists(libdir): -        sys.path.append(f"{libdir}") -        from waveshare_epd import epd2in13_V2 -    else: -        logging.fatal(f"not found: {libdir}") -        sys.exit(1) -``` - -The snippet above checks to make sure the library has been downloaded to a directory alongside the countdown script, and then it loads the `epd2in13_V2` library. If you're using a different display, you will need to use a different library. You can also write your own if you are so inclined. I found it kind of interesting to read the Python code that Waveshare provides with the display. It's considerably less complicated than I would have imagined it to be, if somewhat tedious. - -The next bit of code creates an EPD (ePaper Display) object to interact with the display and initializes the hardware: - - -``` -    logging.info("Starting...") -    try: -        # Create an a display object -        epd = epd2in13_V2.EPD() - -        # Initialize the displace, and make sure it's clear -        # ePaper keeps it's state unless updated! -        logging.info("Initialize and clear...") -        epd.init(epd.FULL_UPDATE) -        epd.Clear(0xFF) -``` - -An interesting aside about ePaper: It uses power only when it changes a pixel from white to black or vice-versa. This means when the power is removed from the device or the application stops for whatever reason, whatever was on the screen remains. That's great from a power-consumption perspective, but it also means you need to clear the display when starting up, or your script will just write over whatever is already on the screen. Hence, `epd.Clear(0xFF)` is used to clear the display when the script starts. - -Next, create a "canvas" where you will draw the rest of your display output: - - -``` -    # Create an image object -    # NOTE: The "epd.heigh" is the LONG side of the screen -    # NOTE: The "epd.width" is the SHORT side of the screen -    # Counter-intuitive... -    logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}") -    image = Image.new('1', (epd.height, epd.width), 255)  # 255: clear the frame -    draw = ImageDraw.Draw(image) -``` - -This matches the width and height of the display—but it is somewhat counterintuitive, in that the short side of the display is the width. I think of the long side as the width, so this is just something to note. Note that the `epd.height` and `epd.width` are set by the Waveshare library to correspond to the device you're using. - -#### Welcome message - -Next, you'll start to draw something. This involves setting data on the "canvas" object you created above. This doesn't draw it to the ePaper display yet—you're just building the image you want right now. Create a little welcome message celebrating Pi Day, with an image of a piece of pie, drawn by yours truly just for this project: - -![drawing of a piece of pie][14] - -(Chris Collins, [CC BY-SA 4.0][15]) - -Cute, huh? - - -``` -    logging.info("Set text text...") -    bangers64 = set_font_size(64) -    draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0) - -    logging.info("Set BMP...") -    bmp = Image.open(basedir.joinpath("img", "pie.bmp")) -    image.paste(bmp, (150,2)) -``` - -Finally, _finally_, you get to display the canvas you drew, and it's a little bit anti-climactic: - - -``` -    logging.info("Display text and BMP") -    epd.display(epd.getbuffer(image)) -``` - -That bit above updates the display to show the image you drew. - -Next, prepare another image to display your countdown timer. - -#### Pi Day countdown timer - -First, create a new image object that you can use to draw the display. Also, set some new font sizes to use for the image: - - -``` -    logging.info("Pi Date countdown; press CTRL-C to exit") -    piday_image = Image.new('1', (epd.height, epd.width), 255) -    piday_draw = ImageDraw.Draw(piday_image) - -    # Set some more fonts -    bangers36 = set_font_size(36) -    bangers64 = set_font_size(64) -``` - -To display a ticker like a countdown, it's more efficient to update part of the image, changing the display for only what has changed in the data you want to draw. The next bit of code prepares the display to function this way: - - -``` -    # Prep for updating display -    epd.displayPartBaseImage(epd.getbuffer(piday_image)) -    epd.init(epd.PART_UPDATE) -``` - -Finally, you get to the timer bit, starting an infinite loop that checks how long it is until the next Pi Day and displays the countdown on the ePaper display. If it actually _is_ Pi Day, you can handle that with a little celebration message: - - -``` -    while (True): -        days = countdown(datetime.now()) -        unit = get_days_unit(days) - -        # Clear the bottom half of the screen by drawing a rectangle filld with white -        piday_draw.rectangle((0, 50, 250, 122), fill = 255) - -        # Draw the Header -        piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0) - -        if days == 0: -            # Draw the Pi Day celebration text! -            piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0) -        else: -            # Draw how many days until Pi Day -            piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0) - -        # Render the screen -        epd.displayPartial(epd.getbuffer(piday_image)) -        time.sleep(5) -``` - -The last bit of the script does some error handling, including some code to catch keyboard interrupts so that you can stop the infinite loop with **Ctrl**+**C** and a small function to print "day" or "days" depending on whether or not the output should be singular (for that one, single day each year when it's appropriate): - - -``` -    except IOError as e: -        logging.info(e) - -    except KeyboardInterrupt: -        logging.info("Exiting...") -        epd.init(epd.FULL_UPDATE) -        epd.Clear(0xFF) -        time.sleep(1) -        epd2in13_V2.epdconfig.module_exit() -        exit() - -def get_days_unit(count): -    if count == 1: -        return "day" - -    return "days" - -if __name__ == "__main__": -    main() -``` - -And there you have it! A script to count down and display how many days are left until Pi Day! Here's an action shot on my Raspberry Pi (sped up by 86,400; I don't have nearly enough disk space to save a day-long video): - -![Pi Day Countdown Timer In Action][16] - -(Chris Collins, [CC BY-SA 4.0][15]) - -#### Install the systemd service (optional) - -If you'd like the countdown display to run whenever the system is turned on and without you having to be logged in and run the script, you can install the optional systemd unit as a [systemd user service][17]). - -Copy the [piday.service][18] file on GitHub to `${HOME}/.config/systemd/user`, first creating the directory if it doesn't exist. Then you can enable the service and start it: - - -``` -$ mkdir -p ~/.config/systemd/user -$ cp piday.service ~/.config/systemd/user -$ systemctl --user enable piday.service -$ systemctl --user start piday.service - -# Enable lingering, to create a user session at boot -# and allow services to run after logout -$ loginctl enable-linger $USER -``` - -The script will output to the systemd journal, and the output can be viewed with the `journalctl` command. - -### It's beginning to look a lot like Pi Day! - -And _there_ you have it! A Pi Day countdown timer, displayed on an ePaper display using a Raspberry Pi Zero W, and starting on system boot with a systemd unit file! Now there are just 350-something days until we can once again come together and celebrate the fantastic device that is the Raspberry Pi. And we can see exactly how many days at a glance with our tiny project. - -But in truth, anyone can hold Pi Day in their hearts year-round, so enjoy creating some fun and educational projects with your own Raspberry Pi! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock - -作者:[Chris Collins][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/clcollins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) -[2]: https://en.wikipedia.org/wiki/Pi_Day -[3]: https://opensource.com/tags/raspberry-pi -[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/ -[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi -[6]: https://www.waveshare.com/product/displays/e-paper.htm -[7]: https://www.raspberrypi.org/software/operating-systems/ -[8]: https://pypi.org/project/Pillow/ -[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT -[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi -[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL -[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py -[13]: https://github.com/clcollins/epaper-pi-ex/ -[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie) -[15]: https://creativecommons.org/licenses/by-sa/4.0/ -[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action) -[17]: https://wiki.archlinux.org/index.php/systemd/User -[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service diff --git a/translated/tech/20210319 Create a countdown clock with a Raspberry Pi.md b/translated/tech/20210319 Create a countdown clock with a Raspberry Pi.md new file mode 100644 index 0000000000..a888429ccd --- /dev/null +++ b/translated/tech/20210319 Create a countdown clock with a Raspberry Pi.md @@ -0,0 +1,384 @@ +[#]: subject: (Create a countdown clock with a Raspberry Pi) +[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock) +[#]: author: (Chris Collins https://opensource.com/users/clcollins) +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +使用树莓派做一个倒计时闹钟 +====== +使用树莓派和 ePaper 显示器开始倒计时您的下一个假期。 +![Alarm clocks with different time][1] + +2021年[ Pi Day ][2]来了又走,留下美好的回忆以及[许多树莓派项目][3]等待我们去尝试。在任何令人精神振奋、充满欢乐的假期后回到工作中都很难, Pi Day 也不例外。当我们回望三月的时候,渴望那些天的快乐。但是不用害怕,亲爱的 Pi Day 庆祝者们,我们开始下一个 Pi Day 的漫长倒计时! + +好了,严肃点。我做了一个 Pi Day 倒计时器,你也可以! + +不久前,我购买了一个 [树莓派 Zero W][4] 并且用它来 [解决 WiFi 较差的原因][5] 。我也对使用 ePaper 来作为显示器十分感兴趣。而我却没有一个很好的用途,但是那看起来很有趣!我买了一个十分适合放在树莓派的顶部的 2.13 英寸的 [ WaveShare 显示器][6] 。安装很简单:只需要将显示器接到树莓派的 GPIO 上即可。 + +我使用 [树莓派系统][7] 来实现该项目,虽然其他的操作系统肯定也能完成。但是下面的 `raspi-config` 指令在树莓派系统上很容易使用。 + +### 设置树莓派和 ePaper 显示器 + +设置树莓派和 ePaper 显示器一起工作,需要你在树莓派上启用串行外设接口 (SPI) 软件,安装 BCM2835 C 库(来访问树莓派上的 Broadcom BCM 2835 芯片的 GPIO 函数),安装 Python GPIO 库来控制 ePaper 显示器。最后,你需要安装 WaveShare 的库来使用 Python 控制 2.13 英寸的显示器。 + +下面是完成这些的步骤。 + +#### 启用 SPI + +树莓派上启用 SPI 最简单的方式是使用`raspi-config` 命令。SPI 总线允许串行数据通信与设备一起使用——在本例中,ePaper 显示: + + +``` +`$ sudo raspi-config` +``` + +从弹出的菜单中, 选择 **Interfacing Options** -> **SPI** -> **Yes** 来启用 SPI 接口,然后启动。 + +#### 安装 BCM2835 库 + +如上所述,BCM2835 库是用在树莓派 Broadcom BCM2385 芯片的软件,它允许访问 GPIO 引脚来控制设备。 + +在我写这篇文章之时,用于树莓派的最新 Broadcom BCM2385 库版本是 v1.68 。安装此库需要下载软件压缩包然后使用 `make` 来安装: + + +``` +# 下载 BCM2853 库并解压 +$ curl -sSL -o - | tar -xzf - + +# 进入解压后的文件夹 +$ pushd bcm2835-1.68/ + +# 配置、检查并安装 BCM2853 库 +$ sudo ./configure +$ sudo make check +$ sudo make install + +# 返回上级目录 +$ popd +``` + +#### 安装需要的 Python 库 + +你用 Python 控制 ePaper 显示器需要安装 Python 库 `RPi.GPIO` ,还需要 `python3-pil` 包画图。显然, PIL 包已经不行了, Pillow 可以作为代替方案。我还没有为该项目测试 Pillow ,但它可行: + + +``` +# 安装需要的 Python 库 +$ sudo apt-get update +$ sudo apt-get install python3-pip python3-pil +$ sudo pip3 install RPi.GPIO +``` + +_注意:这些是 Python3 的指令。你可以在 WaveShare 网站查到 Python2 的指令。_ + +#### 下载 WaveShare 示例和 Python 库 + +Waveshare 维护一个 Python 和 C 的 Git 库,用于使用其 ePaper 显示器和一些展示如何使用它们的示例。对这个倒计时时钟而言,你需要克隆这个库并用于 2.13 英寸的显示器: + +``` +# 克隆这个 WaveShare e-Paper git 库 +$ git clone +``` + +如果你用不同的显示器或者其他公司产品,需要使用适配软件。 + +Waveshare 提供了很多指导: + + * [WaveShare ePaper 设置指导][9] + * [WaveShare ePaper 库安装指导][10] + + + +#### 获得有趣的字体(选做) + +你可以随心所欲的使用显示器,为什么不搞点花样?找一个炫酷的字体! + +这有大量 [开放字体许可][11] 的字体可用。我十分喜爱 Bangers 字体。如果你看过 YouTube 那你见过这种字体了,它十分流行。你可以下载到本地的共享字体目录文件中,并且所有的应用都可以使用,包括这个项目: + +``` +# “Bangers” 字体是 Vernon Adams 用 Google 字体开放许可授权的字体 +$ mkdir -p ~/.local/share/fonts +$ curl -sSL -o fonts/Bangers-Regular.ttf +``` + +### 创建一个 Pi Day 倒计时器 + +现在你已经安装好了软件,可以使用带有炫酷字体的 ePaper 显示器了。你可以创建一个有趣的项目:倒计时到下一个 Pi Day ! + +如果你想,你可以从该项目的 [GitHub repo][13] 直接下载 [countdown.py][12] 这个 Python 文件并跳到文章结尾。 + +为了满足大家的好奇心,我将逐步讲解。 + +#### 导入一些库 + + +``` +#!/usr/bin/python3 +# -*- coding:utf-8 -*- +import logging +import os +import sys +import time + +from datetime import datetime +from pathlib import Path +from PIL import Image,ImageDraw,ImageFont + +logging.basicConfig(level=logging.INFO) + +basedir = Path(__file__).parent +waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python') +libdir = waveshare_base.joinpath('lib') +``` + +开始先导入一些标准库之后脚本中用。也需要你添加一些 PIL 的包: `Image`, `ImageDraw` ,和 `ImageFont` ,你会 用到这些包来画一些简单的图形。最后,为包含用于 2.13 英寸显示器的 Waveshare Python 库的本地 `lib` 目录设置一些变量,稍后你可以使用这些变量从本地目录加载库。 + +#### 字体大小辅助函数 + +下一部分是为你选择的字体建立一个修改大小的辅助函数: Bangers-Regular.ttf 。该函数将整型变量作为大小参数并返回一个图形字体对象来用于显示: + +``` +def set_font_size(font_size): +    logging.info("Loading font...") +    return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size) +``` + +#### 倒计时逻辑 + +接下来是计算这个项目的一个函数:距下次 Pi Day 还有多久。如果 Pi Day 在一月,那么计算剩余天数将很简单。但是你需要考虑是否今年的 Pi Day 这一天已经过去了。如果是这样的话,那么计算量将会很大: + + +``` +def countdown(now): +    piday = datetime(now.year, 3, 14) + +    # 如果错过了就增加一年 +    if piday < now: +        piday = datetime((now.year + 1), 3, 14) + +    days = (piday - now).days + +    logging.info(f"Days till piday: {days}") +    return day +``` + +#### 主函数 + +最后,到了主函数,需要初始化显示器并向它写数据。这时,你应该写一个欢迎语然后再开始倒计时。但是首先,你需要加载 Waveshare 库: + + +``` +def main(): + +    if os.path.exists(libdir): +        sys.path.append(f"{libdir}") +        from waveshare_epd import epd2in13_V2 +    else: +        logging.fatal(f"not found: {libdir}") +        sys.exit(1) +``` + +上面的代码片段检查以确保该库已下载到倒计时脚本旁边的目录中,然后加载“epd2in13_V2”库。 如果你使用不同的显示器,则需要使用不同的库。 如果你愿意,也可以自己编写。我发现阅读 Waveshare 随显示器提供的 Python 代码很有趣,它比我想象的要简单得多。 + +下一段代码创建一个 EPD( ePaper 显示器)对象以与显示器交互并初始化硬件: + +``` +    logging.info("Starting...") +    try: +        # 创建一个显示对象 +        epd = epd2in13_V2.EPD() + +        # 初始化并清空显示 +        # ePaper 保持它的状态处分更新 +        logging.info("Initialize and clear...") +        epd.init(epd.FULL_UPDATE) +        epd.Clear(0xFF) +``` + +关于 ePaper 的一个有趣之处:它仅在将像素从白色变为黑色或从黑色变为白色时才使用电源。这意味着当设备断电或应用程序因任何原因停止时,屏幕上的任何内容都会保留下来。从功耗的角度来看,这很好,但这也意味着您需要在启动时清除显示,否则您的脚本只会覆盖屏幕上已有的内容。 因此,`epd.Clear(0xFF)` 用于在脚本启动时清除显示。 + +接下来,创建一个“画布”来绘制剩余的显示输出: + + +``` +    # 创建一个图形对象 + # 注意:"epd.heigh" 是屏幕的长边 + # 注意:"epd.width" 是屏幕的短边 +    # 真是反直觉… +    logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}") +    image = Image.new('1', (epd.height, epd.width), 255)  # 255: clear the frame +    draw = ImageDraw.Draw(image) +``` + +这与显示器的宽度和高度相匹配——但它有点反直觉,因为显示器的短边是宽度。我认为长边是宽度,所以这只是需要注意的一点。 请注意,`epd.height` 和 `epd.width` 由 Waveshare 库设置以对应于你使用的设备。 + +#### 欢迎语 + +接下来,你将开始画一些画。这涉及在你之前创建的“画布”对象上设置数据。这还没有将它绘制到 ePaper 显示器上——你现在只是在构建你想要的图像。由你为这个项目绘制带有一块馅饼的图像,来创建一个庆祝 Pi Day 的欢迎信息: + +![画一块馅饼][14] + +(Chris Collins, [CC BY-SA 4.0][15]) + +很可爱,不是吗? + + +``` +    logging.info("Set text text...") +    bangers64 = set_font_size(64) +    draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0) + +    logging.info("Set BMP...") +    bmp = Image.open(basedir.joinpath("img", "pie.bmp")) +    image.paste(bmp, (150,2)) +``` +最后,_最后_,你可以展示你画的图画: + +``` +    logging.info("Display text and BMP") +    epd.display(epd.getbuffer(image)) +``` + +That bit above updates the display to show the image you drew. + +接下来,准备另一幅图像展示你的倒计时: + +#### Pi Day 倒计时 +首先,创建一个用来展示倒计时的项目。也需要设置数字的字体大小: + + +``` +    logging.info("Pi Date countdown; press CTRL-C to exit") +    piday_image = Image.new('1', (epd.height, epd.width), 255) +    piday_draw = ImageDraw.Draw(piday_image) + +    # 设置字体大小 +    bangers36 = set_font_size(36) +    bangers64 = set_font_size(64) +``` + +为了使它显示的时候更像一个倒计时,更新图像的一部分是更加有效的手段,仅更改已经改变的显示数据部分。下面的代码准备以这样方式运行: + + +``` +    # 准备更新显示 +    epd.displayPartBaseImage(epd.getbuffer(piday_image)) +    epd.init(epd.PART_UPDATE) +``` + +最后,需要计时,开始一个无限循环来检查据下次 Pi Day 还有多久并显示在 ePaper上。如果到了 Pi Day ,你可以输出一些庆祝短语: + + +``` +    while (True): +        days = countdown(datetime.now()) +        unit = get_days_unit(days) + +        # 通过绘制一个填充有白色的矩形来清除屏幕的下半部分 +        piday_draw.rectangle((0, 50, 250, 122), fill = 255) + +        # 绘制页眉 +        piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0) + +        if days == 0: +            # 绘制庆祝语 +            piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0) +        else: +            # 绘制距下一次 Pi Day 的时间 +            piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0) + +        # 渲染屏幕 +        epd.displayPartial(epd.getbuffer(piday_image)) +        time.sleep(5) +``` + +脚本最后做了一些错误处理,包括捕获键盘中断,这样你可以使用 **Ctrl**+**C** 来结束无限循环,以及一个根据计数来打印 'day' 或 'days' 的函数: + +``` +    except IOError as e: +        logging.info(e) + +    except KeyboardInterrupt: +        logging.info("Exiting...") +        epd.init(epd.FULL_UPDATE) +        epd.Clear(0xFF) +        time.sleep(1) +        epd2in13_V2.epdconfig.module_exit() +        exit() + +def get_days_unit(count): +    if count == 1: +        return "day" + +    return "days" + +if __name__ == "__main__": +    main() +``` + +现在你已经拥有一个倒计时脚本并显示剩余天数!这是在我的树莓派上的显示(视频经过加速,我没有足够的磁盘空间来保存一整天的视频): + +![Pi Day Countdown Timer In Action][16] + +(Chris Collins, [CC BY-SA 4.0][15]) + +#### 安装 systemd 服务(选做) + +如果你希望在系统打开时运行倒计时显示并且无需登录并运行脚本,您可以将可选的 systemd 单元安装为 [systemd 用户服务][17]. + +将 GitHub 上的 [piday.service][18] 文件复制到 `${HOME}/.config/systemd/user`,如果该目录不存在,请先创建该目录。然后你可以启用该服务并启动它: + + +``` +$ mkdir -p ~/.config/systemd/user +$ cp piday.service ~/.config/systemd/user +$ systemctl --user enable piday.service +$ systemctl --user start piday.service + +# Enable lingering, to create a user session at boot +# and allow services to run after logout +$ loginctl enable-linger $USER +``` + +该脚本将输出到 systemd 日志,可以使用 `journalctl` 命令查看输出。 + +### 它开始看起来很像 Pi Day ! + +现在你拥有了一个树莓派 Zero W 显示在 ePaper显示器上的 Pi Day 倒计时器!并在系统启动时使用 systemd 单元文件启动!现在只有 350 天左右我们才可以再次相聚庆祝奇妙的设备———树莓派。通过我们的小项目,我们可以一目了然地看到确切的天数。 + +但事实上,任何人都可以全年都在心中举行 Pi Day,因此请享受使用自己的树莓派创建一些有趣且具有教育意义的项目吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock + +作者:[Chris Collins][a] +选题:[lujun9972][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clcollins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) +[2]: https://en.wikipedia.org/wiki/Pi_Day +[3]: https://opensource.com/tags/raspberry-pi +[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/ +[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi +[6]: https://www.waveshare.com/product/displays/e-paper.htm +[7]: https://www.raspberrypi.org/software/operating-systems/ +[8]: https://pypi.org/project/Pillow/ +[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT +[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi +[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL +[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py +[13]: https://github.com/clcollins/epaper-pi-ex/ +[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie) +[15]: https://creativecommons.org/licenses/by-sa/4.0/ +[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action) +[17]: https://wiki.archlinux.org/index.php/systemd/User +[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service From 4afc372fb3fd9fe2fa32ad4294cb02d9c9ce786b Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 12 Jun 2022 22:08:26 +0800 Subject: [PATCH 142/231] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020220612=20LibreOffice=207.4-=20Top=20New=20Features?= =?UTF-8?q?=20and=20Release=20Details.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4- Top New Features and Release Details.md | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sources/tech/20220612 LibreOffice 7.4- Top New Features and Release Details.md diff --git a/sources/tech/20220612 LibreOffice 7.4- Top New Features and Release Details.md b/sources/tech/20220612 LibreOffice 7.4- Top New Features and Release Details.md new file mode 100644 index 0000000000..cd0c22d2a7 --- /dev/null +++ b/sources/tech/20220612 LibreOffice 7.4- Top New Features and Release Details.md @@ -0,0 +1,151 @@ +[#]: subject: "LibreOffice 7.4: Top New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/06/libreoffice-7-4/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +LibreOffice 7.4: Top New Features and Release Details +====== +This post contains the top new features of LibreOffice 7.4 (upcoming) across Writer, Calc, Impress and other core modules. + +**This post contains the top new features of LibreOffice 7.4 (upcoming) across Writer, Calc, Impress and other core modules.** + +The LibreOffice team improves the famous free and open-source office product with each iteration. Perhaps the only stable and well-managed open-source project as a replacement to Microsoft Office. + +The LibreOffice 7.4 version (planned in August), bringing regular updates to core modules including Calc, Writer and Impress with features and enhancements. Furthermore, in this release, the compatibility with Microsoft Office improved with changes to the core filters and platform updates. + +Before we round up the new features, here’s a tentative schedule for LibreOffice 7.4: + +### Schedule + +| Milestone | Release Date | +| :- | :- | +| Alpha 1 | May 9, 2022 – May 15, 2022 | +| Feature Freeze | Jun 6, 2022 – Jun 12, 2022 | +| Beta 1 | Jun 6, 2022 – Jun 12, 2022 | +| RC1 | Jul 4, 2022 – Jul 10, 2022 | +| RC2 | Jul 25, 2022 – Jul 31, 2022 | +| RC3 | Aug 8, 2022 – Aug 14, 2022 | +| Release 7.4 | Aug 15, 2022 – Aug 21, 2022 | + +### LibreOffice 7.4 Features + +#### Calc + +First and foremost, the most crucial change coming in 7.4 is the support of 16k columns in LibreOffice Calc. It was available in earlier LibreOffice 7.3 but hidden as an experimental option. Finally, it is open to support 16384 columns, i.e. up to XFD. Additional columns are going to help several high-volume data work. + +![LibreOffice 7.4 Calc now supports 16k columns.][1] + +Second, the Autosum button gets the following [additional functions][2] to improve productivity and save time. + +* COUNTA +* PRODUCT +* STDEV +* STDEVP +* VAR +* VARP + +![Additional options in Autosum button][3] + +Moreover, the height of the formula bar is now part of the *.ods files. Hence, you can see the height retained after saving the file and opening it. Earlier, it was being reset to the default height. It is one of the small changes but has a more significant impact on heavy Calc users. + +![Height of Calc Formula bar][4] + +In addition, a new menu option `Sheet > Navigate > Go to Sheet` shows an entire new dialog which is similar to the Writer’s Go to Page. + +#### Writer + +Firstly, the hyphenation settings get three new options. You can now specify the size of the hyphenation zone, minimum word length and ability to stop hyphenating the last word. + +![New Hyphenation settings][5] + +*Image credit: LibreOffice Team* + +Secondly, the menu item Tools > Update > Update now updates the preview of all OLE objects. Also, if you are importing a DOCX file in LibreOffice 7.4, the paragraph borders bring more clarity. In addition, the import also improves the Rich text and checkbox contents inside the text box for DOCX imports. Moreover, Write 7.4 now supports clearing breaks from Word files improving layout consistency. + +Secondly, the menu item `Tools > Update > Update all` now updates the preview of all OLE objects. + +Also, if you are importing a DOCX file in LibreOffice 7.4, the paragraph borders bring more clarity. In addition, the import also improves the Rich text and checkbox contents inside the text box for DOCX imports. + +Moreover, Writer 7.4 now supports clearing breaks from Word files improving layout consistency. + +#### Impress + +The significant change in Impress is a new Theme tab in the Slide properties for the master slide. It contains several accent colour options which control all the sildes in your presentation. It will be a really neat feature in this version. + +![New Theme option in Slide Master Properties][6] + +### Common Updates (across all modules) + +Firstly, the most important change as a standard feature is LibreOffice now supports WEBP images officially. You can directly export and import WebP images across Writer, Calc, Draw etc. Now you do not need additional software to convert WEBP images, especially in Linux systems. + +Moreover, the support for Windows compressed enhanced meta file (EMZ/WMZ) also lands in this release. + +![New WEBP Image Support][7] + +Secondly, the Fille > Recent Documents can remember the state of the last opened document, whether it was read-only or editable. + +The 3D shapes lighting gets some bug fixes and corrections corresponding to the ODF specifications. + +### Performance Updates + +A bunch of performance boosts also makes this an important release of LibreOffice. Here’s a quick recap of the performance boosts. + +* [The Text Layout performance gets around a 60% boost][8] +* [Calc formula re-calculation][9] +* Improved performance of [VLOOKUP][10], COUNTIF and SUMIF +* [And CSV file import][11] + +That’s not all. LibreOffice 7.4 also brings a huge set of filters (export and import) for Microsoft Office 365 file types, extended PDF export options (such as a sign) via command line, updated language support and API changes. + +### Download LibreOffice 7.4 for Testing + +You can download the development version of LibreOffice 7.4 using the respective links and help to test. + +* [RPM Package for Fedora and related distributions][12] +* [DEB packages for Ubuntu, Linux Mint and others][13] +* [Windows 10, 11 – 64-bit][14] +* [macOS 64 bit][15] +* [Mac OS X – ARM and Apple SIlicon, M1][16] + +If you need assistance, you can refer to our [guide here][17] to install the development version in Linux. Make sure to report any issues or bugs in the [official bug tracker.][18] + +LibreOffice 7.4 is planned for release between Aug 15, 2022, and Aug 21, 2022. + +*[Via Release Notes][19]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/libreoffice-7-4/ + +作者:[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://www.debugpoint.com/wp-content/uploads/2022/06/LibreOffice-7.4-Calc-now-supports-16k-columns.jpg +[2]: https://bugs.documentfoundation.org/show_bug.cgi?id=139602 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Additional-formula-in-Autosum-tool.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Height-of-Calc-Formula-bar.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/New-Hyphenation-settings.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/New-Theme-option-in-Slide-Master-Properties.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/06/New-WEBP-Image-Support.jpg +[8]: http://llunak.blogspot.com/2022/04/improving-text-layout-performance.html +[9]: https://bugs.documentfoundation.org/show_bug.cgi?id=119083 +[10]: https://bugs.documentfoundation.org/show_bug.cgi?id=146546 +[11]: https://bugs.documentfoundation.org/show_bug.cgi?id=94677 +[12]: https://www.libreoffice.org/download/download/?type=rpm-x86_64&version=7.4.0&lang=en-US +[13]: https://www.libreoffice.org/download/download/?type=deb-x86_64&version=7.4.0&lang=en-US +[14]: https://www.libreoffice.org/download/download/?type=win-x86_64&version=7.4.0&lang=en-US +[15]: https://www.libreoffice.org/download/download/?type=mac-x86_64&version=7.4.0&lang=en-US +[16]: https://www.libreoffice.org/download/download/?type=mac-aarch64&version=7.4.0&lang=en-US +[17]: https://www.debugpoint.com/2022/06/install-latest-libreoffice-ubuntu-linux/ +[18]: https://bugs.documentfoundation.org/ +[19]: https://wiki.documentfoundation.org/ReleaseNotes/7.4 From 3c26deb6bcee45e2f40b2c6a3a03681ad5ea604e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Jun 2022 08:41:20 +0800 Subject: [PATCH 143/231] translatedd --- ...untu 22.04 into Rescue - Emergency Mode.md | 85 ------------------- ...untu 22.04 into Rescue - Emergency Mode.md | 85 +++++++++++++++++++ 2 files changed, 85 insertions(+), 85 deletions(-) delete mode 100644 sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md create mode 100644 translated/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md diff --git a/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md b/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md deleted file mode 100644 index 70ff4e6105..0000000000 --- a/sources/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode" -[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/" -[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Boot Ubuntu 22.04 into Rescue / Emergency Mode -====== -Hello geeks, booting Ubuntu 22.04 (Jammy Jellyfish) into rescue and emergency mode helps to reset the forgotten user password, fix the file system errors and disabling or enabling systemd service during boot. - -In this post, we will learn how to boot Ubuntu 22.04 LTS system into rescue and emergency mode. Rescue mode is similar to single user mode where are all troubleshooting steps are executed. Rescue mode loads the minimal environment and mount root file system. - -Whereas in emergency mode, we get the single user shell without starting any system services. So emergency mode is required when we can’t boot the system into rescue mode. - -### Boot Ubuntu 22.04 into Rescue or Single User Mode - -Head to target system which you want to boot into rescue or single user mode. At the boot press ‘SHIFT & ESC’ key to enter into grub bootloader screen. - -![Default-Grub-Screen-Ubuntu-22-04][1] - -Choose the first option Ubuntu and press ‘e’ to enter edit mode. - -Go the end of line which starts with linux and delete the string ‘$vt_handoff’ and add the string ‘systemd.unit=rescue.target’ - -![rescue-target-ubuntu-22-04][2] - -After making the changes, either press Ctrl+x or F10 to boot in rescue mode, - -![Troubleshooting-Commands-in-Rescue-Mode][3] - -Once you enter into rescue mode, run all troubleshooting commands and to reboot the system run ‘systemctl reboot’ command - -### Alternate Way to Boot System into Rescue Mode - -Reboot the system and press ‘ESC & Shift’ Key to go to grub boot screen. - -Choose the 2nd option ‘Advanced Options for Ubuntu’ –> Choose recovery mode option and hit enter –> Choose Root (Drop to root shell prompt). - -Example is show below - -![Boot-Ubuntu-22-04-Rescue-Mode][4] - -Once you have root shell, run commands to recover and fix the system issues and finally use ‘systemctl reboot’ to reboot the system. - -### Boot Ubuntu 22.04 into Emergency Mode - -To boot the system into emergency mode, first go to grub screen. - -![Default-Grub-Screen-Ubuntu-22-04][5] - -Select the first option as ‘Ubuntu’ and press ‘e’ to edit. Look for the line which starts with linux word, go to the end of that line, remove the string $vt_handoff and add the string ‘systemd.unit=emergency.target’ - -![Emergency-Mode-Ubuntu-22-04][6] - -Press Ctrl+x or F10 to boot the system into emergency mode, - -![Command-in-Emergency-Mode-Ubuntu-22-04][7] - -Similarly in rescue mode, you can perform all the troubleshooting in this mode and once done reboot the system with command ‘systemctl reboot’. - -That’s all from this post. I found it informative and don’t hesitate to share this among your technical friends. Kindly post your queries and feedback in below comments section. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/ - -作者:[Pradeep Kumar][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.linuxtechi.com/author/pradeep/ -[b]: https://github.com/lkxed -[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png -[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png -[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png -[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif -[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png -[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png -[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png diff --git a/translated/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md b/translated/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md new file mode 100644 index 0000000000..86f542b747 --- /dev/null +++ b/translated/tech/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md @@ -0,0 +1,85 @@ +[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode" +[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何启动 Ubuntu 22.04 进入救援/紧急模式 +====== +极客们好,将 Ubuntu 22.04(Jammy Jellyfish)启动到救援和紧急模式有助于重置忘记的用户密码,修复文件系统错误以及在启动过程中禁用或启用 systemd 服务。 + +在这篇文章中,我们将学习如何启动 Ubuntu 22.04 LTS 系统进入救援和应急模式。救援模式类似于单用户模式,所有的故障排除步骤都在这里进行。救援模式加载最小的环境并挂载根文件系统。 + +而在紧急模式下,我们得到的是单用户 shell,而不启动任何系统服务。因此,当我们无法启动系统进入救援模式时,就需要紧急模式。 + +### 启动 Ubuntu 22.04 进入救援或单用户模式 + +前往你想启动到救援或单用户模式的目标系统。在启动时按下 “SHIFT+ESC” 键,进入 grub bootloader 页面。 + +![Default-Grub-Screen-Ubuntu-22-04][1] + +选择第一个选项 Ubuntu,并按 “e” 键进入编辑模式。 + +在以 linux 开头的一行末尾,删除字符串 “$vt_handoff” 并添加字符串 “systemd.unit=rescue.target”。 + +![rescue-target-ubuntu-22-04][2] + +做完修改后,按 Ctrl+x 或 F10 在救援模式下启动。 + +![Troubleshooting-Commands-in-Rescue-Mode][3] + +进入救援模式后,运行所有的故障排除命令,并运行 “systemctl reboot” 命令来重启系统。 + +### 另一种启动系统进入救援模式的方法 + +重新启动系统并按下 “ESC+Shift” 键,进入 grub 启动界面。 + +选择第二个选项 “Advanced Options for Ubuntu”->选择恢复模式选项并点击回车->选择 Root(进入 root shell 提示)。 + +下面是一个例子 + +![Boot-Ubuntu-22-04-Rescue-Mode][4] + +当你有了 root shell,运行命令来恢复和修复系统问题,最后使用 “systemctl reboot” 来重启系统。 + +### 引导 Ubuntu 22.04 进入紧急模式 + +要启动系统进入紧急模式,首先进入 grub 页面。 + +![Default-Grub-Screen-Ubuntu-22-04][5] + +选择第一个选项 “Ubuntu” 并按 “e” 键进行编辑。寻找以 linux 开头的一行,移到该行的末尾,删除字符串 $vt_handoff 并添加字符串 “systemd.unit=emergency.target”。 + +![Emergency-Mode-Ubuntu-22-04][6] + +按 Ctrl+x 或 F10 将系统启动到紧急模式。 + +![Command-in-Emergency-Mode-Ubuntu-22-04][7] + +同样,在救援模式下,你可以在这个模式下执行所有的故障排除,完成后,就用 “systemctl reboot” 命令重启系统。 + +这篇文章的内容就这些。我发现它内容丰富,不要犹豫,在你的技术朋友中分享这个。请在下面的评论区发表你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/ + +作者:[Pradeep Kumar][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://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png From ffba8cfc77911c24e748747126a873cb2923068e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Jun 2022 08:44:14 +0800 Subject: [PATCH 144/231] translating --- .../tech/20220610 Manage Flatpak Permission Using Flatseal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md b/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md index 0101e22235..893db83b87 100644 --- a/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md +++ b/sources/tech/20220610 Manage Flatpak Permission Using Flatseal.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b3c33934e3577e1e6b813c4739f32e6a8ae3bf9b Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 13 Jun 2022 11:23:54 +0800 Subject: [PATCH 145/231] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...210722 Write your first JavaScript code.md | 182 ++++++++---------- 1 file changed, 82 insertions(+), 100 deletions(-) diff --git a/sources/tech/20210722 Write your first JavaScript code.md b/sources/tech/20210722 Write your first JavaScript code.md index d02ca214cd..9e1af727df 100644 --- a/sources/tech/20210722 Write your first JavaScript code.md +++ b/sources/tech/20210722 Write your first JavaScript code.md @@ -1,18 +1,19 @@ -[#]: subject: (Write your first JavaScript code) -[#]: via: (https://opensource.com/article/21/7/javascript-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Write your first JavaScript code" +[#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Write your first JavaScript code ====== -JavaScript was created for the web, but it can do so much more. Learn -the basics, then download our cheat sheet so you always have the details -at hand. -![Code with javascript on white background][1] +JavaScript was created for the web, but it can do so much more. Learn the basics, then download our cheat sheet so you always have the details at hand. + +![open source programming][1] + +Image by: Opensource.com JavaScript is a programming language full of pleasant surprises. Many people first encounter JavaScript as a language for the web. There's a JavaScript engine in all the major browsers, there are popular frameworks such as JQuery, Cash, and Bootstrap to help make web design easier, and there are even programming environments written in JavaScript. It seems to be everywhere on the internet, but it turns out that it's also a useful language for projects like [Electron][2], an open source toolkit for building cross-platform desktop apps with JavaScript. @@ -26,50 +27,44 @@ As you progress with JavaScript, you may find yourself wanting advanced JavaScri To write your first JavaScript code, open your favorite text editor, such as [Notepad++][3], [Atom][4], or [VSCode][5]. Because it was developed for the web, JavaScript works well with HTML, so first, just try some basic HTML: - ``` -<[html][6]> -  <[head][7]> -    <[title][8]>JS</[title][8]> -  </[head][7]> -  <[body][9]> -    <[p][10] id="example">Nothing here.</[p][10]> -  </[body][9]> -</[html][6]> + +  +    JS +  +  +   

Nothing here.

+  + ``` Save the file, and then open it in a web browser. -![HTML displayed in browser][11] - -(Seth Kenlon, [CC BY-SA 4.0][12]) - -To add JavaScript to this simple HTML page, you can either create a JavaScript file and refer to it in the page's `head` or just embed your JavaScript code in the HTML using the ` + +  + ``` Reload the page in your browser. -![HTML with JavaScript displayed in browser][14] - -(Seth Kenlon, [CC BY-SA 4.0][12]) +![HTML with JavaScript displayed in browser][7] As you can see, the `

` tag as written still contains the string "Nothing here," but when it's rendered, JavaScript alters it so that it contains "Hello world" instead. Yes, JavaScript has the power to rebuild (or just help build) a webpage. @@ -77,30 +72,29 @@ The JavaScript in this simple script does two things. First, it creates a variab Of course, using a custom variable isn't necessary. It's just as easy to populate the HTML element with something being dynamically created. For instance, you could populate it with a timestamp: - ``` -<[html][6]> -  <[head][7]> -    <[title][8]>JS</[title][8]> -  </[head][7]> -  <[body][9]> -    <[p][10] id="example">Date and time appears here.</[p][10]> + +  +    JS +  +  +   

Date and time appears here.

-    <[script][13]> +    +    +  + ``` Reload the page to see a timestamp generated at the moment the page is rendered. Reload a few times to watch the seconds increment. ### JavaScript syntax -In programming, **syntax** refers to the rules of how sentences (or "lines") are written. In JavaScript, each line of code must end in a semicolon (`;`) so that the JavaScript engine running your code understands when to stop reading. +In programming, **syntax** refers to the rules of how sentences (or "lines") are written. In JavaScript, each line of code must end in a semicolon (`;` ) so that the JavaScript engine running your code understands when to stop reading. -Words (or "strings") must be enclosed in quotation marks (`"`), while numbers (or "integers") go without. +Words (or "strings") must be enclosed in quotation marks (`"` ), while numbers (or "integers") go without. Almost everything else is a convention of the JavaScript language, such as variables, arrays, conditional statements, objects, functions, and so on. @@ -110,95 +104,83 @@ Variables are containers for data. You can think of a variable as a box where yo JavaScript's built-in `typeof` function can help you identify what kind of data a variable contains. Using the first example, you can find out what kind of data `myvariable` contains by modifying the displayed text to: - ``` -<string> + let myvariable = "Hello world!"; document.getElementById("example").innerHTML = typeof(myvariable); -</string> + ``` This renders "string" in your web browser because the variable contains "Hello world!" Storing different kinds of data (such as an integer) in `myvariable` would cause a different data type to be printed to your sample web page. Try changing the contents of `myvariable` to your favorite number and then reloading the page. ### Creating functions in JavaScript -Functions in programming are self-contained data processors. They're what makes programming _modular_. It's because functions exist that programmers can write generic libraries that, for instance, resize images or keep track of the passage of time for other programmers (like you) to use in their own code. +Functions in programming are self-contained data processors. They're what makes programming *modular*. It's because functions exist that programmers can write generic libraries that, for instance, resize images or keep track of the passage of time for other programmers (like you) to use in their own code. You create a function by providing a custom name for your function followed by any amount of code enclosed within braces. -Here's a simple web page featuring a resized image and a button that analyzes the image and returns the true image dimensions. In this example code, the ` +    +    +   
+      +   
    -    <[div][15]> -      <[img][17] style="width: 15%" id="myimg" src="penguin.png" /> -    </[div][15]> -    -    <[script][13]> +    +    +  + ``` Save the file and load it into your web browser to try the code. -![Custom get_size function returns image dimensions][18] - -(Seth Kenlon, [CC BY-SA 4.0][12]) +![Custom get_size function returns image dimensions][8] ### Cross-platform apps with JavaScript You can see from the code sample how JavaScript and HTML work closely together to create a cohesive user experience. This is one of the great strengths of JavaScript. When you write code in JavaScript, you inherit one of the most common user interfaces of modern computing regardless of platform: the web browser. Your code is cross-platform by nature, so your application, whether it's just a humble image size analyzer or a complex image editor, video game, or whatever else you dream up, can be used by everyone with a web browser (or a desktop, if you deliver an Electron app). -Learning JavaScript is easy and fun. There are lots of websites with tutorials available. There are also over a million JavaScript libraries to help you interface with devices, peripherals, the Internet of Things, servers, file systems, and lots more. And as you're learning, keep our [**JavaScript cheat sheet**][19] close by so you remember the fine details of syntax and structure. +Learning JavaScript is easy and fun. There are lots of websites with tutorials available. There are also over a million JavaScript libraries to help you interface with devices, peripherals, the Internet of Things, servers, file systems, and lots more. And as you're learning, keep our [JavaScript cheat sheet][9] close by so you remember the fine details of syntax and structure. + +Image by: (Seth Kenlon, CC BY-SA 4.0) -------------------------------------------------------------------------------- via: https://opensource.com/article/21/7/javascript-cheat-sheet 作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[lixin555](https://github.com/lixin555) +选题:[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/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code2.png?itok=JCJTJszs (Code with javascript on white background) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/code2.png [2]: https://www.electronjs.org/ [3]: https://opensource.com/article/16/12/notepad-text-editor [4]: https://opensource.com/article/20/12/atom [5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code -[6]: http://december.com/html/4/element/html.html -[7]: http://december.com/html/4/element/head.html -[8]: http://december.com/html/4/element/title.html -[9]: http://december.com/html/4/element/body.html -[10]: http://december.com/html/4/element/p.html -[11]: https://opensource.com/sites/default/files/pictures/plain-html.jpg (HTML displayed in browser) -[12]: https://creativecommons.org/licenses/by-sa/4.0/ -[13]: http://december.com/html/4/element/script.html -[14]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg (HTML with JavaScript displayed in browser) -[15]: http://december.com/html/4/element/div.html -[16]: http://december.com/html/4/element/button.html -[17]: http://december.com/html/4/element/img.html -[18]: https://opensource.com/sites/default/files/uploads/get-size.jpg (Custom get_size function returns image dimensions) -[19]: https://opensource.com/downloads/javascript-cheat-sheet +[6]: https://opensource.com/sites/default/files/pictures/plain-html.jpg +[7]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg +[8]: https://opensource.com/sites/default/files/uploads/get-size.jpg +[9]: https://opensource.com/downloads/javascript-cheat-sheet From c8b31062dd2c060d39b0bb6772a7ca9996a7ba39 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 13 Jun 2022 11:26:40 +0800 Subject: [PATCH 146/231] =?UTF-8?q?[=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87][?= =?UTF-8?q?tech]:=2020210722=20Write=20your=20first=20JavaScript=20code.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20210722 Write your first JavaScript code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210722 Write your first JavaScript code.md b/sources/tech/20210722 Write your first JavaScript code.md index 9e1af727df..0b74edb1d2 100644 --- a/sources/tech/20210722 Write your first JavaScript code.md +++ b/sources/tech/20210722 Write your first JavaScript code.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lkxed" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From ecf91319c392bc62e1e71afd248f2c762eab208d Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 13 Jun 2022 12:33:59 +0800 Subject: [PATCH 147/231] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87][?= =?UTF-8?q?tech]:=2020210722=20Write=20your=20first=20JavaScript=20code.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...210722 Write your first JavaScript code.md | 186 ----------------- ...210722 Write your first JavaScript code.md | 187 ++++++++++++++++++ 2 files changed, 187 insertions(+), 186 deletions(-) delete mode 100644 sources/tech/20210722 Write your first JavaScript code.md create mode 100644 translated/tech/20210722 Write your first JavaScript code.md diff --git a/sources/tech/20210722 Write your first JavaScript code.md b/sources/tech/20210722 Write your first JavaScript code.md deleted file mode 100644 index 0b74edb1d2..0000000000 --- a/sources/tech/20210722 Write your first JavaScript code.md +++ /dev/null @@ -1,186 +0,0 @@ -[#]: subject: "Write your first JavaScript code" -[#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lkxed" -[#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Write your first JavaScript code -====== -JavaScript was created for the web, but it can do so much more. Learn the basics, then download our cheat sheet so you always have the details at hand. - -![open source programming][1] - -Image by: Opensource.com - -JavaScript is a programming language full of pleasant surprises. Many people first encounter JavaScript as a language for the web. There's a JavaScript engine in all the major browsers, there are popular frameworks such as JQuery, Cash, and Bootstrap to help make web design easier, and there are even programming environments written in JavaScript. It seems to be everywhere on the internet, but it turns out that it's also a useful language for projects like [Electron][2], an open source toolkit for building cross-platform desktop apps with JavaScript. - -JavaScript is a surprisingly multipurpose language with a wide assortment of libraries for much more than just making websites. Learning the basics of the language is easy, and it's a gateway to building whatever you imagine. - -### Install JavaScript - -As you progress with JavaScript, you may find yourself wanting advanced JavaScript libraries and runtimes. When you're just starting, though, you don't have to install JavaScript at all. All major web browsers include a JavaScript engine to run the code. You can write JavaScript using your favorite text editor, load it into your web browser, and see what your code does. - -### Get started with JavaScript - -To write your first JavaScript code, open your favorite text editor, such as [Notepad++][3], [Atom][4], or [VSCode][5]. Because it was developed for the web, JavaScript works well with HTML, so first, just try some basic HTML: - -``` - -  -    JS -  -  -   

Nothing here.

-  - -``` - -Save the file, and then open it in a web browser. - -![HTML displayed in browser][6] - -To add JavaScript to this simple HTML page, you can either create a JavaScript file and refer to it in the page's `head`  or just embed your JavaScript code in the HTML using the ` - -  - -``` - -Reload the page in your browser. - -![HTML with JavaScript displayed in browser][7] - -As you can see, the `

` tag as written still contains the string "Nothing here," but when it's rendered, JavaScript alters it so that it contains "Hello world" instead. Yes, JavaScript has the power to rebuild (or just help build) a webpage. - -The JavaScript in this simple script does two things. First, it creates a variable called `myvariable` and places the string "Hello world!" into it. Finally, it searches the current document (the web page as the browser is rendering it) for any HTML element with the ID `example`. When it locates `example`, it uses the `innerHTML` function to replace the contents of the HTML element with the contents of `myvariable`. - -Of course, using a custom variable isn't necessary. It's just as easy to populate the HTML element with something being dynamically created. For instance, you could populate it with a timestamp: - -``` - -  -    JS -  -  -   

Date and time appears here.

- -    -    -  - -``` - -Reload the page to see a timestamp generated at the moment the page is rendered. Reload a few times to watch the seconds increment. - -### JavaScript syntax - -In programming, **syntax** refers to the rules of how sentences (or "lines") are written. In JavaScript, each line of code must end in a semicolon (`;` ) so that the JavaScript engine running your code understands when to stop reading. - -Words (or "strings") must be enclosed in quotation marks (`"` ), while numbers (or "integers") go without. - -Almost everything else is a convention of the JavaScript language, such as variables, arrays, conditional statements, objects, functions, and so on. - -### Creating variables in JavaScript - -Variables are containers for data. You can think of a variable as a box where you can put data to share with your program. Creating a variable in JavaScript is done with two keywords you choose based on how you intend to use the variable: `let` and `var`. The `var` keyword denotes a variable intended for your entire program to use, while `let` creates variables for specific purposes, usually inside functions or loops. - -JavaScript's built-in `typeof` function can help you identify what kind of data a variable contains. Using the first example, you can find out what kind of data `myvariable` contains by modifying the displayed text to: - -``` - -let myvariable = "Hello world!"; -document.getElementById("example").innerHTML = typeof(myvariable); - -``` - -This renders "string" in your web browser because the variable contains "Hello world!" Storing different kinds of data (such as an integer) in `myvariable` would cause a different data type to be printed to your sample web page. Try changing the contents of `myvariable` to your favorite number and then reloading the page. - -### Creating functions in JavaScript - -Functions in programming are self-contained data processors. They're what makes programming *modular*. It's because functions exist that programmers can write generic libraries that, for instance, resize images or keep track of the passage of time for other programmers (like you) to use in their own code. - -You create a function by providing a custom name for your function followed by any amount of code enclosed within braces. - -Here's a simple web page featuring a resized image and a button that analyzes the image and returns the true image dimensions. In this example code, the ` -    -    -   
-      -   
-    -    -    -  - -``` - -Save the file and load it into your web browser to try the code. - -![Custom get_size function returns image dimensions][8] - -### Cross-platform apps with JavaScript - -You can see from the code sample how JavaScript and HTML work closely together to create a cohesive user experience. This is one of the great strengths of JavaScript. When you write code in JavaScript, you inherit one of the most common user interfaces of modern computing regardless of platform: the web browser. Your code is cross-platform by nature, so your application, whether it's just a humble image size analyzer or a complex image editor, video game, or whatever else you dream up, can be used by everyone with a web browser (or a desktop, if you deliver an Electron app). - -Learning JavaScript is easy and fun. There are lots of websites with tutorials available. There are also over a million JavaScript libraries to help you interface with devices, peripherals, the Internet of Things, servers, file systems, and lots more. And as you're learning, keep our [JavaScript cheat sheet][9] close by so you remember the fine details of syntax and structure. - -Image by: (Seth Kenlon, CC BY-SA 4.0) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/javascript-cheat-sheet - -作者:[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/sites/default/files/lead-images/code2.png -[2]: https://www.electronjs.org/ -[3]: https://opensource.com/article/16/12/notepad-text-editor -[4]: https://opensource.com/article/20/12/atom -[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code -[6]: https://opensource.com/sites/default/files/pictures/plain-html.jpg -[7]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg -[8]: https://opensource.com/sites/default/files/uploads/get-size.jpg -[9]: https://opensource.com/downloads/javascript-cheat-sheet diff --git a/translated/tech/20210722 Write your first JavaScript code.md b/translated/tech/20210722 Write your first JavaScript code.md new file mode 100644 index 0000000000..4d607cb6f1 --- /dev/null +++ b/translated/tech/20210722 Write your first JavaScript code.md @@ -0,0 +1,187 @@ +[#]: subject: "Write your first JavaScript code" +[#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +编写你的第一段 JavaScript 代码 +====== +JavaScript 是为 Web 而生的,但它可以做的事远不止于此。本文将带领你了解它的基础知识,然后你可以下载我们的备忘清单,以便随时掌握详细信息。 + +![开源编程][1] + +图源:Opensource.com + +JavaScript 是一种充满惊喜的编程语言。许多人第一次遇到 JavaScript 时,它通常是作为一种 Web 语言出现的。所有主流浏览器都有一个 JavaScript 引擎;并且,还有一些流行的框架,如 JQuery、Cash 和 Bootstrap 等,它们可以帮助简化网页设计;甚至还有用 JavaScript 编写的编程环境。它似乎在互联网上无处不在,但事实证明,它对于 [Electron][2] 等项目来说也是一种有用的语言。Electron 是一个构建跨平台桌面应用程序的开源工具包,它使用的语言就是 JavaScript。 + +JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而不仅仅是用于制作网站。它的基础知识十分容易掌握,因此,它可以一个起点,助你跨出构建你想象中的东西的第一步。 + +### 安装 JavaScript + +随着你的 JavaScript 水平不断提高,你可能会发现自己需要高级的 JavaScript 库和运行时。不过,刚开始学习的时候,你是根本不需要安装 JavaScript 的。因为所有主流的 Web 浏览器都包含一个 JavaScript 引擎来运行代码。你可以使用自己喜欢的文本编辑器编写 JavaScript,将其加载到 Web 浏览器中,接着你就能看到代码的作用。 + +### 上手 JavaScript + +要编写你的第一个 JavaScript 代码,请打开你喜欢的文本编辑器,例如 [Notepad++][3]、[Atom][4] 或 [VSCode][5] 等。因为它是为 Web 开发的,所以 JavaScript 可以很好地与 HTML 配合使用。因此,我们先来尝试一些基本的 HTML: + +``` + +  +    JS +  +  +   

Nothing here.

+  + +``` + +保存这个文件,然后在 Web 浏览器中打开它。 + +![浏览器中显示的 HTML][6] + +要将 JavaScript 添加到这个简单的 HTML 页面,你可以创建一个 JavaScript 文件并在页面的 `` 中引用它,或者只需使用 ` + +  + +``` + +在浏览器中重新加载页面。 + +![在浏览器中显示带有 JavaScript 的 HTML][7] + +如你所见,`

` 标签仍然包含字符串 “Nothing here”,但是当它被渲染时,JavaScript 会改变它,使其包含 “Hello world”。是的,JavaScript 具有重建​​(或只是帮助构建)网页的能力。 + +这个简单脚本中的 JavaScript 做了两件事。首先,它创建一个名为 `myvariable` 的变量,并将字符串 “Hello world!” 放置其中。然后,它会在当前文档(浏览器呈现的网页)中搜索 ID 为 “example” 的所有 HTML 元素。当它找到 `example` 时,它使用了 `innerHTML` 函数将 HTML 元素的内容替换为 `myvariable` 的内容。 + +当然,我们也可以不用自定义变量。因为,使用动态创建的内容来填充 HTML 元素也是容易的。例如,你可以使用当前时间戳来填充它: + +``` + +  +    JS +  +  +   

Date and time appears here.

+ +    +    +  + +``` + +重新加载页面,你就可以看到在呈现页面时生成的时间戳。再重新加载几次,你可以观察到秒数会不断增加。 + +### JavaScript 语法 + +在编程中,语法syntax 指的是如何编写句子(或“行”)的规则。在 JavaScript 中,每行代码必须以分号(`;`)结尾,以便运行代码的 JavaScript 引擎知道何时停止阅读。(LCTT 译注:从实用角度看,此处的“必须”其实是不正确的,大多数 JS 引擎都支持不加分号。Vue.js 的作者尤雨溪认为“没有应该不应该,只有你自己喜欢不喜欢”,他同时表示,“Vue.js 的代码全部不带分号”。详情可以查看他在知乎上对于此问题的 [回答][10]。) + +单词(或
“字符串”strings
)必须用引号(`"`)括起来,而数字(或 “整数”integers)则不用。 + +几乎所有其他东西都是 JavaScript 语言的约定,例如变量、数组、条件语句、对象、函数等等。 + +### 在 JavaScript 中创建变量 + +变量是数据的容器。你可以将变量视为一个盒子,你在其中放置数据,以便与程序的其他部分共享它。要在 JavaScript 中创建变量,你可以选用关键字 `let` 和 `var` 中的一个,请根据你打算如何使用变量来选择:`var` 关键字用于创建一个供整个程序使用的变量,而 `let` 只为特定目的创建变量,通常在函数或循环的内部使用。(LCTT 译注:还有 `const` 关键字,它用于创建一个常量。) + +JavaScript 内置的 `typeof` 函数可以帮助你识别变量包含的数据的类型。使用第一个示例,你可以修改显示文本,来显示 `myvariable` 包含的数据的类型: + +``` + +let myvariable = "Hello world!"; +document.getElementById("example").innerHTML = typeof(myvariable); + +``` + +接着,你就会发现 Web 浏览器中显示出 “string” 字样,因为该变量包含的数据是 “Hello world!”。在 `myvariable` 中存储不同类型的数据(例如整数),浏览器就会把不同的数据类型打印到示例网页上。尝试将 `myvariable` 的内容更改为你喜欢的数字,然后重新加载页面。 + +### 在 JavaScript 中创建函数 + +编程中的函数是独立的数据处理器。正是它们使编程得以 *模块化*。因为函数的存在,程序员可以编写通用库,例如​​,调整图像大小或统计时间花费的库,以供其他和你一样的程序员在他们的代码中使用。 + +要创建一个函数,你可以为函数提供一个自定义名称,后面跟着用大括号括起来的、任意数量的代码。 + +下面是一个简单的网页,其中包含了一个剪裁过的图像,还有一个分析图像并返回真实图像尺寸的按钮。在这个示例代码中,` +    +    +   
+      +   
+    +    +    +  + +``` + +保存这个文件,并将其加载到 Web 浏览器中以尝试这段代码。 + +![自定义的 get_size 函数返回了图像尺寸][8] + +### 使用 JavaScript 的跨平台应用程序 + +您可以从代码示例中看到,JavaScript 和 HTML 紧密协作,从而创建了有凝聚力的用户体验。这是 JavaScript 的一大优势。当您使用 JavaScript 编写代码时,您继承了现代计算中最常见的用户界面之一,而它与平台无关,那就是 Web 浏览器。您的代码本质上是跨平台的,因此您的应用程序,无论是简单的图像大小分析器还是复杂的图像编辑器、视频游戏,或者您梦想的任何其他东西,都可以被所有人使用,无论是通过 Web 浏览器,还是桌面(如果你同时提供了一个 Electron 应用)。 + +学习 JavaScript 既简单又有趣。网络上有很多网站提供了相关教程,还有超过一百万个 JavaScript 库可帮助您与设备、外围设备、物联网、服务器、文件系统等进行交互。在您学习的过程中,请将我们的 [JavaScript 备忘单][9] 放在身边,以便记住语法和结构的细节。 + +正文配图源自:Seth Kenlon,CC BY-SA 4.0 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/7/javascript-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者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/sites/default/files/lead-images/code2.png +[2]: https://www.electronjs.org/ +[3]: https://opensource.com/article/16/12/notepad-text-editor +[4]: https://opensource.com/article/20/12/atom +[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[6]: https://opensource.com/sites/default/files/pictures/plain-html.jpg +[7]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg +[8]: https://opensource.com/sites/default/files/uploads/get-size.jpg +[9]: https://opensource.com/downloads/javascript-cheat-sheet +[10]: https://www.zhihu.com/question/20298345/answer/49551142 From f14f9ceae59d3827ea742037047180af697d23e9 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 13 Jun 2022 12:36:43 +0800 Subject: [PATCH 148/231] Update 20210722 Write your first JavaScript code.md --- translated/tech/20210722 Write your first JavaScript code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20210722 Write your first JavaScript code.md b/translated/tech/20210722 Write your first JavaScript code.md index 4d607cb6f1..ea49e75a22 100644 --- a/translated/tech/20210722 Write your first JavaScript code.md +++ b/translated/tech/20210722 Write your first JavaScript code.md @@ -17,7 +17,7 @@ JavaScript 是为 Web 而生的,但它可以做的事远不止于此。本文 JavaScript 是一种充满惊喜的编程语言。许多人第一次遇到 JavaScript 时,它通常是作为一种 Web 语言出现的。所有主流浏览器都有一个 JavaScript 引擎;并且,还有一些流行的框架,如 JQuery、Cash 和 Bootstrap 等,它们可以帮助简化网页设计;甚至还有用 JavaScript 编写的编程环境。它似乎在互联网上无处不在,但事实证明,它对于 [Electron][2] 等项目来说也是一种有用的语言。Electron 是一个构建跨平台桌面应用程序的开源工具包,它使用的语言就是 JavaScript。 -JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而不仅仅是用于制作网站。它的基础知识十分容易掌握,因此,它可以一个起点,助你跨出构建你想象中的东西的第一步。 +JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而不仅仅是用于制作网站。它的基础知识十分容易掌握,因此,它可以作为一个起点,助你跨出构建你想象中的东西的第一步。 ### 安装 JavaScript From 6fdf7f091c27fb342cf784c6a90a77931d1aca07 Mon Sep 17 00:00:00 2001 From: lkxed Date: Mon, 13 Jun 2022 12:37:52 +0800 Subject: [PATCH 149/231] Update 20210722 Write your first JavaScript code.md --- translated/tech/20210722 Write your first JavaScript code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20210722 Write your first JavaScript code.md b/translated/tech/20210722 Write your first JavaScript code.md index ea49e75a22..ef08bc948a 100644 --- a/translated/tech/20210722 Write your first JavaScript code.md +++ b/translated/tech/20210722 Write your first JavaScript code.md @@ -42,7 +42,7 @@ JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而 ![浏览器中显示的 HTML][6] -要将 JavaScript 添加到这个简单的 HTML 页面,你可以创建一个 JavaScript 文件并在页面的 `` 中引用它,或者只需使用 `