From a0e7de5ecf8bc0e779975d03fc34c36ac51b61a6 Mon Sep 17 00:00:00 2001 From: Bright Huang Date: Wed, 8 Feb 2023 13:25:07 +0800 Subject: [PATCH 001/318] D --- ...blishing- Platinum open access journals.md | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md diff --git a/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md b/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md deleted file mode 100644 index da6d702522..0000000000 --- a/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: subject: "When open source meets academic publishing: Platinum open access journals" -[#]: via: "https://opensource.com/article/22/5/platinum-open-access-academic-journals" -[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" -[#]: collector: "lkxed" -[#]: translator: "CanYellow" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -当开源遇到学术出版:白金开放获取期刊 -====== - -学者现在可以免费发表(文章),免费阅读(文章),与此同时仍然能够在专业成就的道路上持续进步。 - -![Stack of books for reading][1] -图自:Opensource.com - -学者们经常将他们的作品免费提供给公司,然后却要花钱购买它!你能想象农民在免费送出他们的食物之后再重新花钱买回来做晚餐吗?可能不能吧。像我这样的学者陷入这样的阴谋中几十年了,我们以工作安全为交换免费提供我们的作品,然后却要每年花几百万美元来阅读我们自己的文章。 - -幸运的是,情况正在发生改变。我刚刚完成的一项[研究][2]的结果显示:对于学者来说,获得工作安全保障的同时而不对此付出代价是可能的。我的研究发现数百种期刊是 *白金开放获取* (platinum open access,译注:源自中文网络)的——也就是说,它们不需要作者或者读者就同行评议的文章付费,却仍然享有声望和读者群以帮助学者在他们的职业生涯中取得成功。 - -这一趋势正在扩张:[开放获取期刊目录][3]罗列了超过17300种期刊,这些期刊均提供了某种程度上的开放获取(OA)方式。该目录还提供了超过12250种无须文章处理费(APC)的期刊。我使用一段简易的开源[Python 脚本][4]来将该列表与另一按照期刊发表的文章被其他文章引用的频次排名的期刊列表(期刊影响因子列表)进行比较。很明显,最近几年来,总体的开放获取(OA)期刊与白金开放获取(OA)期刊均呈上升趋势。这一趋势可能有助于在避免学术奴役的同时加速科学发展。 - -### 学者的窘境 - -学者们通常是相当聪慧的,那么他们为什么如此长时间地投身于这种不利体系中呢?简而言之,学者陷于这样一个陷阱中:为了维系他们的工作和获得终身教职,他们需要在高影响因子(impact factor)的期刊上发表文章。影响因子是一种基于最近两年间在给定期刊上发表的文章的平均引用数量的衡量指标。影响因子由 Web of Science 索引。对学者而言,影响因子是一个有影响力的衡量指标。 - -历史上,学术出版由一小部分主要出版商统治。他们采用基于订阅制的商业模式。在这样的商业模式中,学术作者撰写文章,评审同行的文章,也经常进行这些文章的编辑工作。这些工作都是没有任何报酬的。这些文章出版了,它们的版权则由那些主要的出版公司所有。即使是参与上述工作的学者也需要个人付费阅读这些文章(~每篇文章35美元),或者由他们所在学校的图书馆付费订阅期刊上的所有文章。(订阅)所花的费用是相当可观的:单一出版商的所有文章的订阅费用通常超过一百万每年。 - -有很多显然的理由都说明这一体制是毫无意义的。限制对隐匿在付费专区后的受版权保护的科学文献的访问使得科学进程陷于停滞。如果你因为无法查看而不知道前沿科技是什么的话,你就无法进行相应的前沿技术研究。科学家分为能够负担访问这些文章的费用的人以及不能负担(这些费用的人)。在这个发展的世界中,学者一般都努力负担这些费用,不过即使是财力雄厚的[哈佛大学][5]也已经采取行动控制它的年度期刊费用。 - -文章作者的花费也同样高昂。每篇文章的文章处理费从几百美元到骇人听闻的几千美元不等。文章处理费对一些资金不足的学科尤其有害,比如人文学科与社会学科(与物理学、医学和工程学相比而言)。大量的文章处理费也强化了学术界的贫富差距,使得(学者的)专业成就依赖于其所拥有的将收入投入文章发表的能力。还有其他的要求从业者付费为他人制造产品的职业吗? - -### 开放获取,解决之道! - -开放获取行动可以解决上述问题,开放获取行动倡导使所有的学术文献对任何人都能自由自由获取。开放获取的出版量有明显上升:它占了当前同行评议文章的将近三分之一。 - -开放获取的优势分两个方面。首先,开放获取有利于科学整体,因为它提供了一个不受阻碍地阅读前沿技术的方式。这些技术有助于进一步做出重要的认知进步。其次,就学者个人层面而言,通过让他们的作品在网络上轻而易举地免费获得,开放获取提供了最大化他们作品的潜在受众的实际优势。 - -基于上述原因,资助者已经开始要求开放获取,尤其是科学领域的公共资助者。如果一项研究的公共资助者还需要在阅读研究内容时二次付费,这种做法很难站得住脚。 - -### 学术出版目前身处何方,以后又去向何处? - -传统出版商仍然掌控着目前的局面,主要是因为认为他们垄断了具有影响因子的期刊这一认知。很多学者无视传统出版方式的缺点,仍然持续在基于订阅制的期刊上发表文章或者支付高昂的文章处理费,因为他们知道在高影响因子的期刊上发表文章是至关重要的,它能够提供赖以获取补助、终身教职与职位晋升的专业性的证明。 - -多年以前,学术界完全没有选择的余地:要么在具有影响因子的期刊上发表,要么在通过开放获取方式发表。现在他们可以通过开放获取方式发表并仍然能够通过以下三种方式之一享受影响因子的益处: - -* 绿色开放获取模式(Green OA):以传统方式出版后,再通过上传预印版或者接受版论文至开放仓库或者服务器完成自行归档。一些高校拥有用于上述目的的公共仓库。举例而言,韦仕敦大学(Western University,译注:来自中文网络)拥用[Scholarship@Western][6]公共仓库,该校的任何教师都可以在上面分享他们的作品。没有属于自己的公共仓库的学者可以使用诸如[preprints.org][7], [arXiv][8], or  [OSF preprints][9]等网络服务器。我也会将社交媒体用于学术,比如将[Academia][10] 或 [ResearchGate][11] 用于自行存档。由于不同的出版商设计了不同的规则,这是不方便查阅的,而且某种程度上是耗时耗时耗力的。 - -* 金色开放获取模式(Gold OA):在日益壮大的具有影响因子的期刊列表上选一份期刊发表,它将使你的文章发表后可以自由获取但是需要文章处理费。这种方式易于查阅:开放获取设置内建于出版过程中,只需要像往常一样进行学术出版。这种方式的缺点是用于文章处理的费用可能会从研究活动中挪用。 - -* 白金开放获取模式(Platinum OA):在具有影响因子的白金开放获取期刊上发表。不需要为出版和阅读付费。挑战在于在您的学科中找到符合上述标准的期刊,不过情况正在持续变化。 - -目前已经有数以万计的期刊,但是具有影响因子的白金开放获取期刊仅仅几百种。对于学者,困难可能在于在他们的研究与符合他们预期的期刊之间找到一个合适的平衡。你可以在我研究的附录中找到本文提到的列表,或者使用上文提到的 Python 脚本自行更新列表数量。白金开放获取期刊的数量正在快速增长,因此如果你目前尚未找到合适的期刊,仍然可能在不久以后拥有一些可靠的期刊以供选择。祝你享受出版的乐趣! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/platinum-open-access-academic-journals - -作者:[Joshua Pearce][a] -选题:[lkxed][b] -译者:[CanYellow](https://github.com/CanYellow) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jmpearce -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/books_read_list_stack_study.png -[2]: https://doi.org/10.3390/knowledge2020013 -[3]: https://doaj.org/ -[4]: https://osf.io/mh4bx/ -[5]: https://www.theguardian.com/science/2012/apr/24/harvard-university-journal-publishers-prices -[6]: https://ir.lib.uwo.ca/ -[7]: https://www.preprints.org/ -[8]: https://arxiv.org/ -[9]: https://osf.io/preprints/ -[10]: https://westernu.academia.edu/JoshuaPearce/Papers -[11]: https://www.researchgate.net/profile/Joshua-Pearce -[12]: https://www.mdpi.com/2673-9585/2/2/13 From cdacc2c2b7372a09fd2e1d898b1ec60e0df091eb Mon Sep 17 00:00:00 2001 From: Bright Huang Date: Sat, 18 Feb 2023 09:48:54 +0800 Subject: [PATCH 002/318] W2 --- ...Fielding-s Misappropriated REST Dissertation.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index 406b7049c6..3950cde9be 100644 --- a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -7,15 +7,29 @@ [#]: via: (https://twobithistory.org/2020/06/28/rest.html) [#]: author: (Two-Bit History https://twobithistory.org) +被错误使用的罗伊·菲尔丁的有关描述性状态迁移的博士论文 +====== + +TD Roy Fielding's Misappropriated REST Dissertation ====== +符合描述性状态迁移的 (RESTful,REST译自审定公布名词数据库) 应用程序接口 (API) 无处不在。有趣的是又有多少人真正了解“描述性状态迁移”的应有之义呢? + +DN RESTful APIs are everywhere. This is funny, because how many people really know what “RESTful” is supposed to mean? +大概我们中的大多数人都会跟[黑客新闻网站上的这篇公开问答][1]产生共鸣: I think most of us can empathize with [this Hacker News poster][1]: +> 我阅读了几篇介绍描述性状态迁移的文章,甚至包括原始论文的部分章节。然而我仍然对描述性状态迁移到底是什么只有一个相当模糊的想法。我开始认为没有人真的了解描述性状态迁移,它仅仅是一个定义相当不充分的概念。 + +DN > I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept. +我曾经计划写一篇有关描述性状态迁移的博客,在里面探讨描述性状态迁移是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读[2000年发表的罗伊·菲尔丁的博士论文][2]开始我的研究,这篇博士论文向世人介绍了描述性状态迁移的概念。在读过菲尔丁的博士论文以后, + + I had planned to write a blog post exploring how REST came to be such a dominant paradigm for communication across the internet. I started my research by reading [Roy Fielding’s 2000 dissertation][2], which introduced REST to the world. After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood. Many more people know that Fielding’s dissertation is where REST came from than have read the dissertation (fair enough), so misconceptions about what the dissertation actually contains are pervasive. From 0d710199a5e9b574a8be1fada3332febd147c26a Mon Sep 17 00:00:00 2001 From: perfiffer Date: Sat, 25 Feb 2023 17:37:45 +0800 Subject: [PATCH 003/318] move files --- .../tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md (100%) diff --git a/sources/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md b/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md similarity index 100% rename from sources/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md rename to translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md From d65cd66b768c8c3ae4d18726984e62974e540450 Mon Sep 17 00:00:00 2001 From: CanYellow Date: Mon, 27 Feb 2023 13:26:40 +0800 Subject: [PATCH 004/318] h0227 --- ... Fielding-s Misappropriated REST Dissertation.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index 3950cde9be..c26b86d313 100644 --- a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -7,7 +7,7 @@ [#]: via: (https://twobithistory.org/2020/06/28/rest.html) [#]: author: (Two-Bit History https://twobithistory.org) -被错误使用的罗伊·菲尔丁的有关描述性状态迁移的博士论文 +被错误应用的罗伊·菲尔丁的有关描述性状态迁移的博士论文 ====== TD @@ -27,15 +27,22 @@ I think most of us can empathize with [this Hacker News poster][1]: DN > I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept. -我曾经计划写一篇有关描述性状态迁移的博客,在里面探讨描述性状态迁移是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读[2000年发表的罗伊·菲尔丁的博士论文][2]开始我的研究,这篇博士论文向世人介绍了描述性状态迁移的概念。在读过菲尔丁的博士论文以后, - +我曾经计划写一篇有关描述性状态迁移的博客,在里面探讨描述性状态迁移是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读[2000年发表的罗伊·菲尔丁的博士论文][2]开始我的研究,这篇博士论文向世人介绍了描述性状态迁移的概念。在读过菲尔丁的博士论文以后,我意识到,相比之下,更引人注意的是菲尔丁的理论缘何受到如此普遍的误解。 +DN I had planned to write a blog post exploring how REST came to be such a dominant paradigm for communication across the internet. I started my research by reading [Roy Fielding’s 2000 dissertation][2], which introduced REST to the world. After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood. +(相对公平地说)很多人知道描述性状态迁移源自菲尔丁的博士论文,但并没有读过该论文。因此对于这篇博士论文的原始内容的误解才得以流行。 + +DN Many more people know that Fielding’s dissertation is where REST came from than have read the dissertation (fair enough), so misconceptions about what the dissertation actually contains are pervasive. +最大的误解是:这篇博士论文直接讨论了(译注:广义的)构建应用程序接口的问题,我此前一直认为描述性状态迁移从一开始就打算成为构建在超文本传输协议(HTTP)之上的网络应用程序接口(Web API)的架构模型,我相信很多人也这样认为。我猜测此前可能存在一个混乱的试验时期,开发人员采用完全错误的方式在超文本传输协议基础上开发应用程序接口,然后菲尔丁出现了并提出了将描述性状态迁移做为网络应用程序开发的正确方式。但是这种想法的时间线对不上:我们今天所熟知的网络服务的应用程序接口并非是在菲尔丁出版他的博士论文之后才出现的新生事物。 + +DN The biggest of these misconceptions is that the dissertation directly addresses the problem of building APIs. I had always assumed, as I imagine many people do, that REST was intended from the get-go as an architectural model for web APIs built on top of HTTP. I thought perhaps that there had been some chaotic experimental period where people were building APIs on top of HTTP all wrong, and then Fielding came along and presented REST as the sane way to do things. But the timeline doesn’t make sense here: APIs for web services, in the sense that we know them today, weren’t a thing until a few years after Fielding published his dissertation. +菲尔丁的博士论文(名为“架构风格与基于网络的软件架构设计”)(译者注,网络中文版的中文译名)不是讨论如何在超文本传输协议的基础上构建应用程序接口,而恰恰是讨论超文本协议本身菲尔丁是超文本传输协议1.0版规范的贡献者同时也是超文本传输协议1.1版的共同作者。有感于从HTTP协议的设计中获得的架构经验,他的博士论文将描述性状态迁移视为指导HTTP/1.1的标准化过程的架构原则的精华。举例而言,他拒绝了使用`MGET`和`MHEAD`方法进行批量请求的提议,因为他认为这违反了REST所定义的约束条件,尤其是在一个符合REST的系统中传递的消息应该是易于代理和缓存的约束条件。[1][3]因此,HTTP/1.1转而围绕持久性连接设计,在此基础上可以发送多个HTTP请求。(菲尔丁同时认为) Fielding’s dissertation (titled “Architectural Styles and the Design of Network-based Software Architectures”) is not about how to build APIs on top of HTTP but rather about HTTP itself. Fielding contributed to the HTTP/1.0 specification and co-authored the HTTP/1.1 specification, which was published in 1999. He was interested in the architectural lessons that could be drawn from the design of the HTTP protocol; his dissertation presents REST as a distillation of the architectural principles that guided the standardization process for HTTP/1.1. Fielding used these principles to make decisions about which proposals to incorporate into HTTP/1.1. For example, he rejected a proposal to batch requests using new `MGET` and `MHEAD` methods because he felt the proposal violated the constraints prescribed by REST, especially the constraint that messages in a REST system should be easy to proxy and cache.[1][3] So HTTP/1.1 was instead designed around persistent connections over which multiple HTTP requests can be sent. (Fielding also felt that cookies are not RESTful because they add state to what should be a stateless system, but their usage was already entrenched.[2][4]) REST, for Fielding, was not a guide to building HTTP-based systems but a guide to extending HTTP. This isn’t to say that Fielding doesn’t think REST could be used to build other systems. It’s just that he assumes these other systems will also be “distributed hypermedia systems.” This is another misconception people have about REST: that it is a general architecture you can use for any kind of networked application. But you could sum up the part of the dissertation where Fielding introduces REST as, essentially, “Listen, we just designed HTTP, so if you also find yourself designing a _distributed hypermedia system_ you should use this cool architecture we worked out called REST to make things easier.” It’s not obvious why Fielding thinks anyone would ever attempt to build such a thing given that the web already exists; perhaps in 2000 it seemed like there was room for more than one distributed hypermedia system in the world. Anyway, Fielding makes clear that REST is intended as a solution for the scalability and consistency problems that arise when trying to connect hypermedia across the internet, _not_ as an architectural model for distributed applications in general. From 1e7b3a66c24b933d32cbfe713bc6ff1735f4b290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Tue, 28 Feb 2023 20:32:06 +0800 Subject: [PATCH 005/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230227.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ni?= =?UTF-8?q?xOS=20Series=202=20How=20to=20Install=20NixOS=20on=20a=20Virtua?= =?UTF-8?q?l=20Machine.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ies 2 How to Install NixOS on a Virtual Machine.md | 245 ++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md diff --git a/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md b/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md new file mode 100644 index 0000000000..38d3d76454 --- /dev/null +++ b/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md @@ -0,0 +1,245 @@ +[#]: subject: "NixOS Series #2: How to Install NixOS on a Virtual Machine?" +[#]: via: "https://itsfoss.com/install-nixos-vm/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +NixOS Series #2: How to Install NixOS on a Virtual Machine? +====== + +If you can use the Nix package manager on any Linux distro, why should you install the NixOS? + +I often wondered about the same before using NixOS for a few days. + +Once I realized the benefits, I wrote about it to help you know [why you might consider using NixOS][1]. If you have read the first article of the series, you already know what you want. + +So, how to get started with it? Considering it can be a new experience for many, should you replace your daily driver with it or install it as a virtual machine? + +I recommend using NixOS on a VM before you want to replace it as your primary operating system. This holds for anything new that you want to try, but specifically for [advanced Linux distributions][2] like NixOS. + +### Install NixOS in the VM Using VirtualBox + +In this tutorial, I will be using VirtualBox. + +And if you are using Ubuntu and don't care about having the latest version, VirtualBox can be installed using a single command: + +``` +sudo apt install virtualbox +``` + +Want to install the latest version? You can refer to the given guide: + +And if you are using anything besides Ubuntu, you can[follow the download instructions from its official downloads page.][3] + +Once you have successfully installed VirtualBox, let us start with the first step. + +#### Step 1: Get the ISO image of NixOS + +You need to head to NixOS [official download page][4]. + +And under the `NixOS: the Linux distribution` section, you will find ISO with GNOME and KDE desktops. + +Sure, there is a minimal ISO, too, but I would recommend going with either of the two (GNOME and KDE): + +![Download NixOS ISO file][5] + +For the sake of this tutorial, I will be using GNOME. + +Remember, you are given GNOME and KDE options for the live desktop! + +And during installation, you get the option to choose your favorite desktop environment, including **Xfce, Pantheon, Cinnamon, MATE**, and more! + +#### Step 2: Create a virtual in VirtualBox + +Open VirtualBox and click on the `New` button to add a new virtual machine: + +![screenshot that shows you how to click on new button to add new virtual machine][6] + +And it will open a prompt asking you to add information about the VM you want to add. + +You can start by naming your VM: + +- **Name your VM so that you can identify it is a NixOS install. So I named it `NixOS`.** +- **Choose the ISO image that you've downloaded recently.** +- **Select `Linux` as a type of ISO.** +- **And choose `Other Linux (64-bit)` for version.** + +![][7] + +Once you select everything, click on the `Next` button. + +Next, you will be asked to choose the Base memory (RAM), processors you want to allocate to this VM, and storage space for this install. + +While NixOS mentions no official requirements, I recommend you to have at least **4 gigs of RAM**, **2-4 processor cores**, and **30 GB of space** for this install: + +![select hardware for NixOS VM][8] + +And in the end, it will show you the summary of the choices you made for this VM: + +![summary of NixOS VM install][9] + +If everything seems fine, click on the `Finish` button and it will create a NixOS virtual machine for you. + +#### Step 3: Installing NixOS + +Once you are done creating the VM, the name you gave to your NixOS VM should start reflecting in the VirtualBox list of VMs. + +Select the NixOS VM and click on the start button: + +![start the NixOS VM][10] + +And it will start the NixOS live so you can try the Linux distro. + +##### Select installer language + +Once you boot into the NixOS, the installer will start and ask you to set the preferred language for the installer: + +![choose preferred language for NixOS install][11] + +##### Choose region and timezone + +Next, choose your region and zone. If you don't know this, you can select your country from the map, which will set things for you. + +Once you select the region and zone, it will also select the preferred language, numbers, and date locale. + +Sure, you can change if you want to, but for most users, the selected options will work just fine: + +![choose the region and zone for NixOS][12] + +##### Select Keyboard layout + +Next, you will have to set the keyboard layout. For most users, `English (US)` with default setting should work fine. + +If you are going with something else, you can test your keyboard configuration before proceeding. + +![select Keyboard layout for NixOS][13] + +After that, you are asked to create a user and set a password for that user. + +You can choose to keep a strong password or just anything random for the VM. + +![create a user for NixOS][14] + +##### Select your favorite Desktop Environment + +With NixOS, you are given the following choices for the desktop environment: + +- GNOME +- KDE (best choice for customization) +- Xfce +- Pantheon (a desktop environment that ships with ElementaryOS) +- Cinnamon +- Enlightenment +- LXQt + +![choose desktop environment for NixOS][15] + +##### Use non-free software on NixOS + +NixOS follows a similar approach to Fedora, where you have to choose whether you want the non-free software. + +I would recommend you enable non-free packages: + +![enable non-free package in NixOS][16] + +##### The partitions part + +As this is a VM guide, I will recommend you go with the `Erase disk` option that should partition the disk automatically! + +![automatic partition the disk for NixOS][17] + +Once done, it will get you the summary of the choices you went with: + +![summery of NixOS installation options in VM][18] + +And if everything seems correct, click on the `Install` button, and it will start the installation button. + +##### Don't Reboot but turn off the VM + +Once the installation is finished, you will be given the option to restart the VM. + +And if you do so, **it will load the installer again**! + +To solve this issue, you must make changes in the boot sequence. + +And to do that, power off your VM once the installation is complete. + +To power off the VM, select the `Close` option from the **File menu** and select the `Power off the machine` option: + +![][19] + +##### Change the boot order in VirtualBox + +To change the boot order in the NixOS VM, open the settings for that VM: + +![][20] + +In settings, select `System` and you will find the boot order. + +Here, select the `Hard Disk` and use the **up arrow** icon next to the options and make it the first option to boot: + +![change boot order in VirtualBox][21] + +Press `OK` and it will save the changes you made. + +**Alternatively**, you can remove the optical disk (ISO image) that we added to start the installation. + +#### Step 4: Boot from NixOS install + +Now, start your NixOS VM, and you will see a GRUB screen: + +![NixOS grub screen][22] + +Select the default option, and it will get you into the fresh install of NixOS with the GNOME desktop. + +![running NixOS in VM][23] + +That's it! **Go on exploring NixOS!** + +### Wrapping Up + +This was a quick guide on how you can install NixOS on VirtualBox. + +For the next part of the NixOS tutorial series, I shall share pointers on **installing and removing packages**. + +💬 _Stay tuned for the next part of the series. Until then, feel free to share your thoughts on NixOS and if you face any issues following the guide!_ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-nixos-vm/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/why-use-nixos/ +[2]: https://itsfoss.com/advanced-linux-distros/ +[3]: https://www.virtualbox.org/wiki/Linux_Downloads +[4]: https://nixos.org/download.html +[5]: https://itsfoss.com/content/images/2023/02/Download-NixOS-ISO-file.png +[6]: https://itsfoss.com/content/images/2023/02/click-on-new-to-add-new-virtual-machine.png +[7]: https://itsfoss.com/content/images/2023/02/Add-NixOS-ISO-to-VirtualBox.png +[8]: https://itsfoss.com/content/images/2023/02/select-hardware-for-NixOS-VM-1.png +[9]: https://itsfoss.com/content/images/2023/02/summery-of-NixOS-VM-install.png +[10]: https://itsfoss.com/content/images/2023/02/start-the-NixOS-VM.png +[11]: https://itsfoss.com/content/images/2023/02/1.-choose-the-language-of-NixOS-installer.png +[12]: https://itsfoss.com/content/images/2023/02/2.-choose-the-region-and-zone-for-NixOS.png +[13]: https://itsfoss.com/content/images/2023/02/3.-select-Keyboard-layout-for-NixOS.png +[14]: https://itsfoss.com/content/images/2023/02/4.-create-user-and-set-password-for-NixOS.png +[15]: https://itsfoss.com/content/images/2023/02/5.-choose-desktop-environment-for-NixOS.png +[16]: https://itsfoss.com/content/images/2023/02/6.-Allow-unfree-software.png +[17]: https://itsfoss.com/content/images/2023/02/7.-select-erase-disk-option-while-installing-NixOS.png +[18]: https://itsfoss.com/content/images/2023/02/8.-summery-of-NixOS-installation-options-in-VM.png +[19]: https://itsfoss.com/content/images/2023/02/poweroff-VM.png +[20]: https://itsfoss.com/content/images/2023/02/open-settings-for-VM-in-VirtualBox.png +[21]: https://itsfoss.com/content/images/2023/02/how-to-change-the-boot-order-in-VirtualBox.gif +[22]: https://itsfoss.com/content/images/2023/02/NixOS-grub-screen.png +[23]: https://itsfoss.com/content/images/2023/02/running-NixOS-in-VM.png \ No newline at end of file From 4b37a464a02eb7df0a15ca989417c6d1d3ab8a06 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Mon, 6 Mar 2023 14:49:30 +0800 Subject: [PATCH 006/318] Update and rename sources/tech/20211014 9 ways to use open source every day.md to translated/tech/20211014 9 ways to use open source every day.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Translated by XiaotingHuang22. 提交翻译,辛苦审稿啦! --- ...014 9 ways to use open source every day.md | 112 ----------------- ...014 9 ways to use open source every day.md | 118 ++++++++++++++++++ 2 files changed, 118 insertions(+), 112 deletions(-) delete mode 100644 sources/tech/20211014 9 ways to use open source every day.md create mode 100644 translated/tech/20211014 9 ways to use open source every day.md diff --git a/sources/tech/20211014 9 ways to use open source every day.md b/sources/tech/20211014 9 ways to use open source every day.md deleted file mode 100644 index 169656e876..0000000000 --- a/sources/tech/20211014 9 ways to use open source every day.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: subject: "9 ways to use open source every day" -[#]: via: "https://opensource.com/article/21/10/open-source-tools" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -9 ways to use open source every day -====== -You may be surprised to learn that the tools you use every day are open -source. -![Tools illustration][1] - -Recently I was invited to present on free and open resources that are available on the web. This presentation was part of a local effort to keep our community working—sponsored by the [Foster Center][2] at St. Bonaventure University near my home. Some of the resources I shared were not open source and merely cost $0, but many of the tools were also open source. - -It was interesting to see how many folks recognized the tools I mentioned. Many people are unaware that the tools they use every day are open source, and they can share them with others.  - -### Open source browsers - -Using the web requires a good browser, and [Firefox is open source][3], which some of the folks I was presenting to were unaware of. In addition to being open source, Firefox is strongly conscious of privacy, which is a growing concern for many users. Interestingly, though, even Microsoft's new browser is based on the open source Chromium project.  - -### Open source web privacy - -Another way to protect your privacy and improve your web experience, in general, is to use uBlock Origin to block advertisements. According to their website: - -> uBlock Origin is a free and open source, cross-platform browser extension for content filtering—primarily aimed at neutralizing privacy invasion in an efficient, user-friendly method. - -The code is [GPL v. 3.0][4].  - -The Electronic Frontier Foundation (EFF) also maintains [Privacy Badger][5], a web browser extension licensed under the GPL v.3.0. According to their Github repository, it's: - -> A browser extension that automatically learns to block invisible trackers. Instead of keeping lists of what to block, Privacy Badger automatically discovers trackers based on their behavior. - -In addition to privacy, my presentation shared the importance of secure passwords. My audience learned about [Bitwarden][6]. Many folks had no idea how to generate secure passwords, differentiate from one website to another, and store them securely. I demonstrated how the software worked to create passwords and use Bitwarden to store those passwords in the cloud. I explained how users could access those credentials as browser plugins, desktop and laptop applications, and on Android or iOS mobile devices.  - -### Open source messaging - -I spoke of the ubiquity of text messaging but also its inherent insecurity. The audience was not aware of [Signal][7]. I have been using Signal for a couple of years and regularly encourage others to consider it as a secure messaging platform. It is easy to [install Signal][8] on Linux, macOS, Windows, [Android][9], and [iOS][10], and it offers excellent support [documentation][11] with detailed installation instructions for each operating system. Signal uses your existing mobile number, provided it can send and receive SMS and phone calls. The first time you set up Signal on your mobile phone, the application can search your address books for any of your contacts using Signal.  - -### Open source office tools - -No presentation on open source tools is complete without mentioning my favorite content creation tool, which is [LibreOffice][12]. Despite its popularity, many are unaware that it exists and the freedom that comes with its use. I use it every day to write articles. I use it instead of Excel, and sometimes I used it for presentations. You can download it and install it for Linux, macOS, and Windows. One of the beauties of LibreOffice is that you really own your documents. You don't need an expensive program to access them. - -### Open source blog builder - -[WordPress][13] is my favorite blogging engine, and there are myriad ways you can use it, whether sharing your own opinions on world events, a low-cost writing platform for your [students][14], or a web presence for your [business][15]. - -### Open source media repository - -While creating content, you will need images that you can easily and legally share to illustrate your work. [OpenClipart][16] is my go-to. There are thousands of images available in various popular formats for inclusion in your LibreOffice documents and blog posts. In addition, you can find images that you can share with the proper attribution by visiting [Creative Commons][17]. Creative Commons offers licensing that makes sharing easier. Creative Commons is an extension of copyright that makes sharing easier. Be sure to familiarize yourself with the nuances of the licenses.  - -### Open source video conferencing - -The pandemic has changed the paradigm for conferences and meetups. Jitsi, Big Blue Button, and several others have revolutionized how we interact and learn as reported [here][18] by Chris Hermansen.  - -### Open source educational resources - -Open educational resources have liberated learning. With [OER Commons][19], you can find content to meet your needs, from pre-kindergarten to graduate and professional degrees, and it is openly licensed so that you can use it and share it with others. Massachusetts Institute of Technology (MIT) Open Courseware is nearly all of MIT's undergraduate and graduate content offered under a Creative Commons [non-commercial share-alike][20] license. [OpenStax][21], an open textbook initiative at Rice University, offers peer-reviewed textbooks that are openly licensed and available for free.  - -### Open source podcast tools - -Podcasts have become a great way to catch up on the latest [open source news][22] for me. Have you thought of starting your own podcast? There are a couple of great open source tools that I am familiar with that provide ways to make that a reality. [Audacity][23] is my favorite recording application. I have used it to flip my classroom instruction, record interviews, and experiment with sound effects. It is a 16-track audio editor that you can use in a variety of ways. If you have something to say or a skill to teach, you should use [Open Broadcaster Software][24]. - -### Linux - -Finally, introduce your friends to Linux, which many of them still don't know about, and let them experience all the readily available free software.  - -In addition to the talk recorded and shared on [YouTube][25], I compiled a list of links to the resources and shared them on [GitHub][26]. - -There are lots of non-code ways to contribute to open source: Here are three alternatives. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/10/open-source-tools - -作者:[Don Watkins][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/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl (Tools illustration) -[2]: https://www.sbu.edu/academics/schools-at-sbu/school-of-business/foster-center-for-responsible-leadership/foster-center-events -[3]: https://opensource.com/article/21/9/switch-to-firefox -[4]: https://github.com/gorhill/uBlock -[5]: https://privacybadger.org/ -[6]: https://github.com/bitwarden -[7]: https://opensource.com/article/19/10/secure-private-messaging -[8]: https://signal.org/download/ -[9]: https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms&referrer=utm_source%3DOWS%26utm_medium%3DWeb%26utm_campaign%3DNav -[10]: https://apps.apple.com/us/app/signal-private-messenger/id874139669 -[11]: https://support.signal.org/ -[12]: https://opensource.com/article/21/9/libreoffice-tips -[13]: https://opensource.com/article/18/10/setting-wordpress-raspberry-pi -[14]: https://opensource.com/article/20/4/wordpress-virtual-machine -[15]: https://opensource.com/article/21/3/wordpress-plugins-retail -[16]: https://openclipart.org/ -[17]: https://search.creativecommons.org/ -[18]: https://opensource.com/article/20/5/open-source-video-conferencing -[19]: https://www.oercommons.org/ -[20]: https://ocw.mit.edu/help/faq-cite-ocw-content/ -[21]: https://openstax.org/ -[22]: https://opensource.com/article/19/10/linux-podcasts-Jupiter-Broadcasting -[23]: https://opensource.com/article/20/4/audacity -[24]: https://opensource.com/article/20/4/open-source-live-stream -[25]: https://youtu.be/aUgaYtN_sUU -[26]: https://github.com/donwatkins/Presentations/blob/master/fostercenter.md diff --git a/translated/tech/20211014 9 ways to use open source every day.md b/translated/tech/20211014 9 ways to use open source every day.md new file mode 100644 index 0000000000..cd78014dcf --- /dev/null +++ b/translated/tech/20211014 9 ways to use open source every day.md @@ -0,0 +1,118 @@ +[#]: subject: "9 ways to use open source every day" +[#]: via: "https://opensource.com/article/21/10/open-source-tools" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +每天使用开源的9种方法 +====== +你可能会惊奇地发现,那些你每天使用的工具竟是开源的。 +![工具插图][1] + +最近,我受邀介绍网络上可用的免费和开放资源。这次演讲是当地为保持我们社区的正常运转而做出的部分尝试——由我家附近的圣文德大学 [Foster Center][2] 赞助。 我分享的一些资源不是开源的且基本不用花钱,但许多工具是开源的。 + + +看到有不少人认出我所提到的工具真的很有趣。 很多人并不知道他们每天使用的工具都是开源的,并且他们还可以与他人分享。 + +### 开源浏览器 + +使用网络需要一个好的浏览器,而 [Firefox 是开源的][3],这一点很多在场的人并不清楚。 除了是开源,Firefox 还具有强烈的隐私意识,这是许多用户越来越关注的问题。 不过,有趣的是,即使是 Microsoft 的新浏览器也是基于开源 Chromium 项目的。 + +### 开源网络隐私 + +通常,保护您的隐私和改善您的网络体验的另一种方法是使用 uBlock Origin 来阻止广告。 根据他们的网站: + +> uBlock Origin 是一个免费、开源、跨平台的内容过滤浏览器扩展——主要旨在以一种高效、用户友好的方法消除隐私侵犯。 + +> 代码是 [GPL v. 3.0][4]。 + +Electronic Frontier Foundation (电子前沿基金会 EFF) 还维护 [Privacy Badger][5]———— 这是一个根据 GPL v.3.0 获得许可的网络浏览器扩展程序。 根据他们的 Github 存储库,它是: + +> 一个自动学习阻止隐形跟踪器的浏览器扩展程序。 Privacy Badger 不会保存阻止的列表,而是根据它们的行为自动发现跟踪器。 + +除了隐私之外,我的演讲还分享了安全密码的重要性。 我的听众了解到 [Bitwarden][6]。 许多人不知道如何生成安全密码、区分不同网站的密码以及如何安全地存储它们。 我演示了该软件如何创建密码并使用 Bitwarden 将这些密码存储在云中。 我解释了用户如何通过浏览器插件、台式机和笔记本电脑应用程序以及在 Android 或 iOS 移动设备上访问这些凭据。 + +### 开源通讯工具 + +本次演讲中,我谈到了通讯工具在我们生活中的无处不在,但同时它本身固有的不安全性。 观众不知道 [Signal 信号][7]。 我已经使用 Signal 几年了,并经常鼓励其他人将其视为一个安全的消息传递平台。 在 Linux、macOS、Windows、[Android][9] 和 [iOS][10] 上[安装 Signal][8] 很容易,它提供了出色的[文档][11]支持,对不同的操作系统都有着详细的安装说明。 Signal 使用您现有的手机号码,前提是它可以发送和接收短信和电话。 当您第一次在手机上设置 Signal 时,它会在您的通讯录上搜索同样使用 Signal 的联系人。 + + +### 开源办公工具 + +如果不提及我最喜欢的内容创建工具,即 [LibreOffice][12],任何关于开源工具的介绍都是不完整的。 尽管它很受欢迎,但还是有许多人并不知道它的存在以及使用它所带来的自由。 我每天都用它来写文章。 我使用它来做表格而不是 Excel,有时我用它来做演示文稿。 您可以在 Linux、macOS 和 Windows 上下载并安装它。 LibreOffice 的优点之一是您真正拥有自己的文档, 不需要昂贵的程序来访问它们。 + + +### 开源博客构建器 + +[WordPress][13] 是我最喜欢的博客引擎,您可以通过多种方式使用它,无论是分享您对世界大事的看法、为您的[学生][14] 提供低成本写作平台,还是在网上为您的[业务][15]做宣传。 + + +### 开源媒体库 + +在创建内容时,您需要可以轻松合法共享的图片来说明您的作品。 [OpenClipart][16] 是我的首选。 有数以千计的各种广为使用的格式的图像可以放在您的 LibreOffice 文档和博客文章中。 此外,您可以通过访问 [Creative Commons][17] 找到可以与合适的归属共享的图像。 Creative Commons 提供许可,使共享变得更容易。 Creative Commons 是版权的延伸,让分享图片变得更容易。 请务必熟悉许可证之间的细微差别。 + + +### 开源视频会议 + +疫情改变了会议和聚会的模式。 正如 Chris Hermansen [此处][18] 所报告的那样,Jitsi、Big Blue Button 和其他一些软件已经彻底改变了我们互动和学习的方式。 + + +### 开源教育资源 + +开放教育资源解放了学习。 通过 [OER Commons][19],您可以找到满足您需求的内容,从学前班到研究生和专业学位,它是公开许可的,因此您可以使用它并与他人分享。 麻省理工学院 (MIT) 开放课件提供了麻省理工学院几乎所有的本科生和研究生项目内容,均根据知识共享 [非商业性共享方式][20] 许可提供。 [OpenStax][21] 是莱斯大学的一项开放教科书计划,提供经过同行评审的教科书,这些教科书已公开许可并免费提供。 + + +### 开源播客工具 + +播客已成为了解最新 [开源新闻][22] 的好方法。 你有没有想过做自己的播客? 我熟悉一些很棒的开源工具能够帮你实现这一目标。 [Audacity][23] 是我最喜欢的录音应用程序。 我用它来翻转我的课堂教学、记录访谈和试验音效。 它是一个 16 轨音频编辑器,您可以通过多种方式使用它。 如果您有话要说或有技能要传授,您应该使用 [Open Broadcaster Software][24]。 + +### Linux + +最后,向您的朋友介绍他们中还有许多人不知道的 Linux,让他们体验所有现成的免费软件。 + +除了在 [YouTube][25] 上录制和分享的演讲外,我还编制了一份资源链接列表,并在 [GitHub][26] 上分享。 + +有很多非代码方式可以为开源做出贡献:这里有三种选择。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/10/open-source-tools + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl (Tools illustration) +[2]: https://www.sbu.edu/academics/schools-at-sbu/school-of-business/foster-center-for-responsible-leadership/foster-center-events +[3]: https://opensource.com/article/21/9/switch-to-firefox +[4]: https://github.com/gorhill/uBlock +[5]: https://privacybadger.org/ +[6]: https://github.com/bitwarden +[7]: https://opensource.com/article/19/10/secure-private-messaging +[8]: https://signal.org/download/ +[9]: https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms&referrer=utm_source%3DOWS%26utm_medium%3DWeb%26utm_campaign%3DNav +[10]: https://apps.apple.com/us/app/signal-private-messenger/id874139669 +[11]: https://support.signal.org/ +[12]: https://opensource.com/article/21/9/libreoffice-tips +[13]: https://opensource.com/article/18/10/setting-wordpress-raspberry-pi +[14]: https://opensource.com/article/20/4/wordpress-virtual-machine +[15]: https://opensource.com/article/21/3/wordpress-plugins-retail +[16]: https://openclipart.org/ +[17]: https://search.creativecommons.org/ +[18]: https://opensource.com/article/20/5/open-source-video-conferencing +[19]: https://www.oercommons.org/ +[20]: https://ocw.mit.edu/help/faq-cite-ocw-content/ +[21]: https://openstax.org/ +[22]: https://opensource.com/article/19/10/linux-podcasts-Jupiter-Broadcasting +[23]: https://opensource.com/article/20/4/audacity +[24]: https://opensource.com/article/20/4/open-source-live-stream +[25]: https://youtu.be/aUgaYtN_sUU +[26]: https://github.com/donwatkins/Presentations/blob/master/fostercenter.md From 647eac6674aed3489149efb4d8a45826a32b123e Mon Sep 17 00:00:00 2001 From: cool-summer-021 Date: Mon, 6 Mar 2023 15:13:39 +0800 Subject: [PATCH 007/318] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dation (OpenSSF)- Reflection and Future.md | 89 ------------------- ...dation (OpenSSF)- Reflection and Future.md | 89 +++++++++++++++++++ 2 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 sources/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md create mode 100644 translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md diff --git a/sources/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md b/sources/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md deleted file mode 100644 index f0e03c9672..0000000000 --- a/sources/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (cool-summer-021) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open Source Security Foundation (OpenSSF): Reflection and Future) -[#]: via: (https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/) -[#]: author: (The Linux Foundation https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/) - -Open Source Security Foundation (OpenSSF): Reflection and Future -====== - -The [Open Source Software Foundation (OpenSSF)][1] officially [launched on August 3, 2020][2]. In this article, we’ll look at why the OpenSSF was formed, what it’s accomplished in its first six months, and its plans for the future. - -The world depends on open source software (OSS), so OSS security is vital. Various efforts have been created to help improve OSS security. These efforts include the Core Infrastructure Initiative (CII) in the Linux Foundation, the Open Source Security Coalition (OSSC) founded by the GitHub Security Lab, and the Joint Open Source Software Initiative (JOSSI) founded by Google and others. - -It became apparent that progress would be easier if these efforts merged into a single effort. The OpenSSF was created in 2020 as a merging of these three groups into “a cross-industry collaboration that brings together leaders to improve the security of open source software (OSS).” - -The OpenSSF has certainly gained that “cross-industry collaboration”; its dozens of members include (alphabetically) Canonical, GitHub, Google, IBM, Intel, Microsoft, and Red Hat. Its governing board also includes a Security Community Individual Representative to represent those not represented in other ways specifically. It’s also created some structures to help people work together: it’s established active working groups, identified (and posted) its values, and agreed on its technical vision. - -But none of that matters unless they actually _produce_ results. It’s still early, but they already have several accomplishments. They have released: - - * [Secure Software Development Fundamentals courses][3]. This set of 3 freely-available courses on the edX platform is for software developers to learn to develop secure software. It focuses on practical steps that any software developer can easily take, not theory or actions requiring unlimited resources.  Developers can also pay a fee to take tests to attempt to earn certificates to prove they understand the material. - * [Security Scorecards][4]. This auto-generates a “security score” for open source projects to help users as they decide the trust, risk, and security posture for their use case. - * [Criticality Score][5]. This project auto-generates a criticality score for open source projects based on a number of parameters. The goal is to better understand the most critical open source projects the world depends on. - * [Security metrics dashboard][6]. This early-release work provides a dashboard of security and sustainment information about OSS projects by combining the Security ScoreCards, CII Best Practices, and other data sources. - * [OpenSSF CVE Benchmark][7]. This benchmark consists of vulnerable code and metadata for over 200 historical JavaScript/TypeScript vulnerabilities (CVEs). This will help security teams evaluate different security tools on the market by enabling teams to determine false positive and false negative rates with real codebases instead of synthetic test code. - * [OWASP Security Knowledge Framework (SKF)][8]. In collaboration with OWASP, this work is a knowledge base that includes projects with checklists and best practice code examples in multiple programming languages. It includes training materials for developers on how to write secure code in specific languages and security labs for hands-on work. - * [Report on the 2020 FOSS Contributor Survey][9], The OpenSSF and the Laboratory for Innovation Science at Harvard (LISH) released a report that details the findings of a contributor survey to study and identify ways to improve OSS security and sustainability. There were nearly 1,200 respondents. - - - -The existing [CII Best Practices badge][10] project has also been folded into the OpenSSF and continues to be improved. The project now has more Chinese translators, a new ongoing Swahili translation, and various small refinements that clarify the badging requirements. - -The [November 2020 OpenSSF Town Hall][11] discussed the OpenSSF’s ongoing work. The OpenSSF currently has the following working groups: - - * Vulnerability Disclosures - * Security Tooling - * Security Best Practices - * Identifying Security Threats to Open Source Projects (focusing on a metrics dashboard) - * Securing Critical Projects - * Digital Identity Attestation - - - -Future potential work, other than continuously improving work already released, includes: - - * Identifying overlapping and related security requirements in various specifications to reduce duplicate effort. This is to be developed in collaboration with OWASP as lead and is termed the [Common Requirements Enumeration (CRE)][12]. The CRE is to “link sections of standard[s] and guidelines to each other, using a mutual topic identifier, enabling standard and scheme makers to work efficiently, enabling standard users to find the information they need, and attaining a shared understanding in the industry of what cyber security is.” [Source: “Common Requirements Enumeration”] - * Establishing a website for no-install access to a security metrics OSS dashboard. Again, this will provide a single view of data from multiple data sources, including the Security Scorecards and CII Best Practices. - * Developing improved identification of critical OSS projects. Harvard and the LF have previously worked to identify critical OSS projects. In the coming year, they will refine their approaches and add new data sources to identify critical OSS projects better. - * Funding specific critical OSS projects to improve their security. The expectation is that this will focus on critical OSS projects that are not otherwise being adequately funded and will work to improve their overall sustainability. - * Identifying and implementing improved, simplified techniques for digitally signing commits and verifying those identity attestations. - - - -As with all Linux Foundation projects, the work by the OpenSSF is decided by its participants. If you are interested in the security of the OSS we all depend on, check out the OpenSSF and participate in some way. The best way to get involved is to attend the working group meetings — they are usually every other week and very casual. By working together we can make a difference. For more information, see [https://openssf.org][1] - -_[**David A. Wheeler,**][13]_* Director of Open Source Supply Chain Security at the Linux Foundation*** - -The post [Open Source Security Foundation (OpenSSF): Reflection and Future][14] appeared first on [Linux Foundation][15]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/ - -作者:[The Linux Foundation][a] -选题:[lujun9972][b] -译者:[cool-summer-021](https://github.com/cool-summer-021) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ -[b]: https://github.com/lujun9972 -[1]: https://openssf.org/ -[2]: https://www.linuxfoundation.org/en/press-release/technology-and-enterprise-leaders-combine-efforts-to-improve-open-source-security/ -[3]: https://openssf.org/blog/2020/10/29/announcing-secure-software-development-edx-course-sign-up-today/ -[4]: https://openssf.org/blog/2020/11/06/security-scorecards-for-open-source-projects/ -[5]: https://github.com/ossf/criticality_score -[6]: https://github.com/ossf/Project-Security-Metrics -[7]: https://openssf.org/blog/2020/12/09/introducing-the-openssf-cve-benchmark/ -[8]: https://owasp.org/www-project-security-knowledge-framework/ -[9]: https://www.linuxfoundation.org/en/press-release/new-open-source-contributor-report-from-linux-foundation-and-harvard-identifies-motivations-and-opportunities-for-improving-software-security/ -[10]: https://bestpractices.coreinfrastructure.org/ -[11]: https://openssf.org/blog/2020/11/23/openssf-town-hall-recording-now-available/ -[12]: https://owasp.org/www-project-integration-standards/ -[13]: mailto:dwheeler@linuxfoundation.org -[14]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ -[15]: https://www.linuxfoundation.org/ diff --git a/translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md b/translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md new file mode 100644 index 0000000000..a234118bfe --- /dev/null +++ b/translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md @@ -0,0 +1,89 @@ +[#]: collector: (lujun9972) +[#]: translator: (cool-summer-021) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Open Source Security Foundation (OpenSSF): Reflection and Future) +[#]: via: (https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/) +[#]: author: (The Linux Foundation https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/) + +开源安全基金会(OpenSSF):回顾和展望 +====== + +[开源软件基金会(OpenSSF)][1]正式[成立于2020年8月3日][2]。本文将讨论 OpenSSF 创立的初衷,它成立之初六个月内的成就,以及它未来的愿景。 + +全世界都在推行开源(OSS)理念,所以开源软件的安全也至关重要。为了提升开源软件的安全性,业界已经做了大量工作,并取得了一些成果。这些成果包括:Linux 基金会的核心基础设施计划(CII)、GitHub 安全实验室的开源安全联盟(OSSC)和由 Google 以及其他公司创立的联合开源软件计划(JOSSI)。 + +显然,如果这些成果合为一体,软件行业将发展得更加顺利。这三项成果在 2020 年合并为“旨在促进开源软件安全性的、由各行业巨头主导的跨行业联盟”。 + +OpenSSF的确受益于这种“跨行业联盟”;它有几十个成员,包括 Canonical, GitHub, Google, IBM, Intel, Microsoft 和 Red Hat。联盟的理事会成员还包括安全社区个人代表,这些个人代表是那些不能以企业名义作为联盟成员的个人。该联盟也创造了一些便于人们合作的组织结构:建立一些活跃的工作组,这种工作组需要确定(并公布)它存在的价值,其中的成员应当就该组织的技术愿景形成一致意见。 + +但是这并不重要,除非它们有实际成果。当时虽然处于早期,它们也确实取得了一些成果。它们发布了: + + * [安全软件开发基础课程][3]。在开放在线课堂平台有3门免费课程,旨在教授软件开发人员软件安全方面的知识。这些课程注重实际操作,任何开发人员都可以较轻松地学习,而不是那些需要耗费大量资源的理论或案例。开发人员也可以付费进行测试,从而获得认证,表明自己掌握了这些课程地内容。 + * [安全评分卡][4]。为开源项目自动生成“安全分数”,帮助用户进行信任、风险和安全方面的决策。 + * [临界分数][5]。基于一些参数,为开源项目自动生成临界分数。临界分数可以让人们对世界上最重要的开源项目有更好的理解。 + * [安全度量仪表盘][6]。这是较早时候发布的成果,它结合安全评分卡、CII 最佳实践和其他数据来源,提供与 OSS 项目有关的安全和支持信息的仪表盘。 + * [OpenSSF CVE基准测试][7]。基准测试由超过200个历史JavaScript/TypeScript漏洞(CVE)的脆弱代码和元数据组成。这将帮助安全团队评估市场上的各种安全工具,使他们能够用真实的代码库(而不是合成的测试代码)确定假阳性和假阴性率。 + * [OWASP 安全知识框架][8]。由于与 OWASP 的合作,这项成果是一个知识库,它包含了带检查清单的项目和使用多种编程语言的最佳代码样例。它还提供针对开发者的如何使用特定的语言编写安全代码的培训材料,以及用于实际操作的安全实验室。 + * 2020 年自由/开源软件贡献者调查报告,OpenSSF 和 LISH 发布了一份报告,其中详细说明了对开源软件贡献者的调查结果,并以此为依据,研究和确定提高OSS安全性和可持续性的方法。一共调查了1200名受访者。 + + + +现有的 [CII 最佳实践徽章][10] 项目已经与 OpenSSF合并,将继续升级。现在项目有很多中文译者,翻译为斯瓦希里语的工作也在进行中,项目也进行了很多小改进,详细阐明获得徽章的要求。 + +2020年11月举行的 OpenSSF 大会讨论了 OpenSSF 正在进行中的工作。最近,OpenSSF 有这些工作组: + + * 系统的脆弱性信息披露 + * 安全工具 + * 安全最佳实践 + * 对开源项目安全漏洞的识别(重点关注指标仪表盘) + * 对关键项目的保障 + * 数字身份认证 + + + +除了持续更新已发布的项目,未来可能的工作还包括: + + * 为减少重复工作,在多种技术指标中确定哪些是重复和关联的安全需求。这就是作为领导者与 OWASP 协作开发,也称为[通用需求枚举(CRE)][12]。CRE 旨在使用一种公共主题标识符将标准和指南的各个部分联系起来,这种公共主题标识符的作用是令标准和方案制定者高效工作,令标准使用者能搜索到需要的信息,从而使双方对网络安全有相同的理解。 + * 建一个网站,提供对安全度量仪表盘的免安装访问。再次强调,这将会提供各种来源(包括安全计分卡和CII 最佳实践)的数据的简单展示。 + * 开发对关键 OSS 项目的识别功能。哈佛大学和LF已经做过一些识别关键 OSS 项目的工作。未来一年内,他们会改进方法,添加新的数据来源,从而更好地进行鉴别工作。 + * 资助一些关键的OSS项目,提高它们的安全性。预期将关注那些财力不足的项目,帮助这些项目提升整体性能。 + * 识别和实现已改进和简化的技术,用于数字签名的提交和对身份的校验。 + + + +跟所有的 Linux 基金会项目一样,OpenSSF 的工作是由其成员决定的。如果你对大家所依赖的 OSS 安全有兴趣,你可以访问 OpenSSF网站并以某种方式加入它们。参与的最好方式是出席工作组会议——会议每隔一周就举行,而且非常随意。通过合作,我们可以有所作为。欲了解更多信息,可以访问 [https://openssf.org][1]。 + +_[**David A. Wheeler,**][13]_* Director of Open Source Supply Chain Security at the Linux Foundation*** + +[本文][14] 首次发表于 [Linux 基金会网站][15]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/ + +作者:[The Linux Foundation][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ +[b]: https://github.com/lujun9972 +[1]: https://openssf.org/ +[2]: https://www.linuxfoundation.org/en/press-release/technology-and-enterprise-leaders-combine-efforts-to-improve-open-source-security/ +[3]: https://openssf.org/blog/2020/10/29/announcing-secure-software-development-edx-course-sign-up-today/ +[4]: https://openssf.org/blog/2020/11/06/security-scorecards-for-open-source-projects/ +[5]: https://github.com/ossf/criticality_score +[6]: https://github.com/ossf/Project-Security-Metrics +[7]: https://openssf.org/blog/2020/12/09/introducing-the-openssf-cve-benchmark/ +[8]: https://owasp.org/www-project-security-knowledge-framework/ +[9]: https://www.linuxfoundation.org/en/press-release/new-open-source-contributor-report-from-linux-foundation-and-harvard-identifies-motivations-and-opportunities-for-improving-software-security/ +[10]: https://bestpractices.coreinfrastructure.org/ +[11]: https://openssf.org/blog/2020/11/23/openssf-town-hall-recording-now-available/ +[12]: https://owasp.org/www-project-integration-standards/ +[13]: mailto:dwheeler@linuxfoundation.org +[14]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ +[15]: https://www.linuxfoundation.org/ From a0c2487336f6886ef8bdcf7df3cb33b7c085d9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Mon, 6 Mar 2023 20:53:19 +0800 Subject: [PATCH 008/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230306.0=20=E2=AD=90=EF=B8=8F=20Xubuntu=20Minimal=20?= =?UTF-8?q?Opportunity=20to=20Build=20Your=20Own=20Distro.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inimal Opportunity to Build Your Own Distro.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md diff --git a/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md b/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md new file mode 100644 index 0000000000..28c0ad6a66 --- /dev/null +++ b/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md @@ -0,0 +1,109 @@ +[#]: subject: "Xubuntu Minimal: Opportunity to Build Your Own Distro" +[#]: via: "https://www.debugpoint.com/xubuntu-minimal/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Xubuntu Minimal: Opportunity to Build Your Own Distro +====== + +**Xubuntu team introduces a minimal ISO with few components from the 23.04 releases onwards. Here are all the details.** + +![][1] + +A few days back, Canonical [announced][2] that an official minimal ISO installation file for the Ubuntu 23.04 “Lunar Lobster” release is in the works. While the image is not yet available as of publishing this, the Xubuntu team managed to work out their own minimal ISO installation image. + +Xubuntu is used by millions of people and has been a baseline for many other distributions. For some users, the default installation may come with too many pre-installed packages and features, leading to a bloated system that can slow down the computer’s performance. That’s where Xubuntu minimal install comes into play. In this article, we will take a hands-on approach to installing and explore the features of Ubuntu minimal. + +Let’s look at what you get in the minimal Xubuntu installation and a comparison with the regular desktop installer. + +### Xubuntu minimal install + +The first obvious difference is the ISO image size of the minimal installation with the standard desktop installer. It’s around 39% less in size. + +| minimal | standard | +| Desktop installer (ISO) size | 1.7 GB | 2.8 GB | + +While installing Xubuntu using the minimal install, you won’t get the option of “minimal install” in Ubiquity. And rest of the installation steps are the same—no such difference. + +However, the main difference is in the installed system. The minimal install takes only 7.2 GB of disk space compared to the standard installation of the same version, which is 11 GB. + +| minimal | standard | +| Disk space used | 7.2 GB | 11 GB | + +Because many applications are stripped off. + +![Xubuntu minimal and standard install - comparison][3] + +In the minimal installation of Xubuntu, you get the following: + +- Terminal +- File manager +- All settings apps +- Synaptic package manager +- Screenshot app + +That’s it. + +If you compare this to the standard version, you won’t have the following applications: + +- Firefox web browser +- Thunderbird email client +- Media players (audio and video) +- LibreOffice suite +- Transmission torrent client +- GNOME Software +- Games +- Gigolo remote connection client +- Disk usage tool + +### Snap packages on Minimal Xubuntu + +To my surprise, Xubuntu minimal doesn’t have Snap installed! Not even the snap daemon. And no Flatpak, either. + +So, effectively you get a Snap-free Xubuntu system with a core Ubuntu base. + +![Look - no snap][4] + +But I am not sure the main Ubuntu minimal ISO will have the same. I guess we need to wait and see. + +### What’s next? + +So, now you have an elementary Xubuntu desktop. Using the Synaptic package manager, you can start building and installing your favourite applications. + +For example, you might [set up Flatpak][5] and start with a basic browser, media player, LibreOffice, etc. + +If you are a developer, you can install Visual Studio code or some IDEs. + +With this version as a baseline, you can build any distribution for your workflow. + +### Conclusion + +Xubuntu minimal Install is an excellent choice for users who want complete control over what is installed on their system and prefer a faster and more efficient Ubuntu-based distro. + +Xfce’s customizability, lightweight nature, and package management using synaptic make it an ideal choice for any custom build. + +You can download the minimal ISO from this [page][6]. Remember, it is not yet officially released and it’s a daily build copy. So use it with **caution**. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/xubuntu-minimal/ + +作者:[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/2023/03/xubuntu1.jpg +[2]: https://debugpointnews.com/ubuntu-mini-iso-announcement/ +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/Look-no-snap.jpg +[5]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[6]: https://cdimage.ubuntu.com/xubuntu/daily-live/current/ \ No newline at end of file From 2f83c2c5d7c7a28a167c2d328414db81e8c563e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Mon, 6 Mar 2023 20:55:12 +0800 Subject: [PATCH 009/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230306.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Bu?= =?UTF-8?q?ild=20a=20Raspberry=20Pi=20monitoring=20dashboard=20in=20under?= =?UTF-8?q?=2030=20minutes.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rry Pi monitoring dashboard in under 30 minutes.md | 497 ++++++++++++++++++ 1 file changed, 497 insertions(+) create mode 100644 sources/tech/20230306.1 ⭐️⭐️ Build a Raspberry Pi monitoring dashboard in under 30 minutes.md diff --git a/sources/tech/20230306.1 ⭐️⭐️ Build a Raspberry Pi monitoring dashboard in under 30 minutes.md b/sources/tech/20230306.1 ⭐️⭐️ Build a Raspberry Pi monitoring dashboard in under 30 minutes.md new file mode 100644 index 0000000000..80cb3ea761 --- /dev/null +++ b/sources/tech/20230306.1 ⭐️⭐️ Build a Raspberry Pi monitoring dashboard in under 30 minutes.md @@ -0,0 +1,497 @@ +[#]: subject: "Build a Raspberry Pi monitoring dashboard in under 30 minutes" +[#]: via: "https://opensource.com/article/23/3/build-raspberry-pi-dashboard-appsmith" +[#]: author: "Keyur Paralkar https://opensource.com/users/keyur-paralkar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Build a Raspberry Pi monitoring dashboard in under 30 minutes +====== + +If you’ve ever wondered about the performance of your Raspberry Pi, then you might need a dashboard for your Pi. In this article, I demonstrate how to quickly building an on-demand monitoring dashboard for your Raspberry Pi so you can see your CPU performance, memory and disk usage in real time, and add more views and actions later as you need them. + +If you’re already using Appsmith, you can also import the [sample app][1] directly and get started. + +### Appsmith + +Appsmith is an open source, [low-code][2] app builder that helps developers build internal apps like dashboards and admin panels easily and quickly. It’s a great choice for your dashboard, and reduces the time and complexity of traditional coding approaches. + +For the dashboard in this example, I display usage stats for: + +- Percentage utilization +- Frequency or clock speed +- Count +- Temperature + +- Percentage utilization +- Percentage available memory +- Total memory +- Free memory + +- Percentage disk utilization +- Absolute disk space used +- Available disk space +- Total disk space + +- CPU +- Memory +- Disk + +### Creating an endpoint + +You need a way to get this data from your Raspberry Pi (RPi) and into Appsmith. The [psutils][3] Python library is useful for monitoring and profiling, and the [Flask-RESTful][4] Flask extension creates a [REST API][5]. + +Appsmith calls the REST API every few seconds to refresh data automatically, and gets a JSON object in response with all desired stats as shown: + +``` +{ "cpu_count": 4, +"cpu_freq": [ +600.0, +600.0, +1200.0 ], +"cpu_mem_avail": 463953920, +"cpu_mem_free": 115789824, +"cpu_mem_total": 971063296, +"cpu_mem_used": 436252672, +"cpu_percent": 1.8, +"disk_usage_free": 24678121472, +"disk_usage_percent": 17.7, +"disk_usage_total": 31307206656, +"disk_usage_used": 5292728320, +"sensor_temperatures": 52.616 } +``` + +### 1. Set up the REST API + +If your Raspberry Pi doesn’t have Python on it yet, open a terminal on your Pi and run this install command: + +``` +$ sudo apt install python3 +``` + +Now set up a [Python virtual environment][6] for your development: + +``` +$ python -m venv PiData +``` + +Next, activate the environment. You must do this after rebooting your Pi. + +``` +$ source PiData/bin/activate +$ cd PiData +``` + +To install Flask and Flask-RESTful and dependencies you’ll need later, create a file in your Python virtual environment called `requirements.txt` and add these lines to it: + +``` +flask +flask-restful +gunicorn +``` + +Save the file, and then use `pip` to install them all at once. You must do this after rebooting your Pi. + +``` +(PyData)$ python -m pip install -r requirements.txt +``` + +Next, create a file named `pi_stats.py` to house the logic for retrieving the RPi’s system stats with `psutils`. Paste this code into your `pi_stat.py` file: + +``` +from flask import Flask +from flask_restful import Resource, Api +import psutil +app = Flask(__name__) + +api = Api(app) +class PiData(Resource): + def get(self): + return "RPI Stat dashboard" + +api.add_resource(PiData, '/get-stats') + +if __name__ == '__main__': + app.run(debug=True) +``` + +Here’s what the code is doing: + +- Use app = Flask(**name**) to define the app that nests the API object. +- Use Flask-RESTful’s [API method][7] to define the API object. +- Define PiData as a concrete [Resource class][8] in Flask-RESTful to expose methods for each supported HTTP method. +- Attach the resource, `PiData`, to the API object, `api`, with `api.add_resource(PiData, '/get-stats')`. +- Whenever you hit the URL `/get-stats`, `PiData` is returned as the response. + +### 2. Read stats with psutils + +To get the stats from your Pi, you can use these built-in functions from `psutils`: + +- `cpu_percentage`, `cpu_count`, `cpu_freq`, and `sensors_temperatures` functions for the percentage utilization, count, clock speed, and temperature respectively, of the CPU `sensors_temperatures` reports the temperature of all the devices connected to the RPi. To get just the CPU’s temperature, use the key `cpu-thermal`. +- `virtual_memory` for total, available, used, and free memory stats in bytes. +- `disk_usage` to return the total, used, and free stats in bytes. + +Combining all of the functions in a Python dictionary looks like this: + +``` +system_info_data = { +'cpu_percent': psutil.cpu_percent(1), +'cpu_count': psutil.cpu_count(), +'cpu_freq': psutil.cpu_freq(), +'cpu_mem_total': memory.total, +'cpu_mem_avail': memory.available, +'cpu_mem_used': memory.used, +'cpu_mem_free': memory.free, +'disk_usage_total': disk.total, +'disk_usage_used': disk.used, +'disk_usage_free': disk.free, +'disk_usage_percent': disk.percent, +'sensor_temperatures': psutil.sensors_temperatures()\['cpu-thermal' +][0].current, } +``` + +The next section uses this dictionary. + +### 3. Fetch data from the Flask-RESTful API + +To see data from your Pi in the API response, update `pi_stats.py` to include the dictionary `system_info_data` in the class `PiData`: + +``` +from flask import Flask +from flask_restful import Resource, Api +import psutil +app = Flask(__name__) +api = Api(app) + +class PiData(Resource): + def get(self): + memory = psutil.virtual_memory() + disk = psutil.disk_usage('/') + system_info_data = { + 'cpu_percent': psutil.cpu_percent(1), + 'cpu_count': psutil.cpu_count(), + 'cpu_freq': psutil.cpu_freq(), + 'cpu_mem_total': memory.total, + 'cpu_mem_avail': memory.available, + 'cpu_mem_used': memory.used, + 'cpu_mem_free': memory.free, + 'disk_usage_total': disk.total, + 'disk_usage_used': disk.used, + 'disk_usage_free': disk.free, + 'disk_usage_percent': disk.percent, + 'sensor_temperatures': psutil.sensors_temperatures()['cpu-thermal'][0].current, } + + return system_info_data + +api.add_resource(PiData, '/get-stats') + +if __name__ == '__main__': + app.run(debug=True) +``` + +Your script’s ready. Run the `PiData.py` script: + +``` +$ python PyData.py + * Serving Flask app "PiData" (lazy loading) + * Environment: production + WARNING: This is a development server. Do not run this in a production environment. + + * Debug mode: on + * Running on http://127.0.0.1:5000 (Press CTRL+C to quit) + * Restarting with stat + * Debugger is active! +``` + +You have a working API! + +### 4. Make the API available to the internet + +You can interact with your API on your local network. To reach it over the internet, however, you must open a port in your firewall and forward incoming traffic to the port made available by Flask. However, as the output of your test advised, running a Flask app from Flask is meant for development, not for production. To make your API available to the internet safely, you can use the `gunicorn` production server, which you installed during the project setup stage. + +Now you can start your Flask API. You must do this any time you’ve rebooted your Pi. + +``` +$ gunicorn -w 4 'PyData:app' +Serving on http://0.0.0.0:8000 +``` + +To reach your Pi from the outside world, open a port in your network firewall and direct incoming traffic to the IP address of your PI, at port 8000. + +First, get the internal IP address of your Pi: + +``` +$ ip addr show | grep inet +``` + +Internal IP addresses start with 10 or 192 or 172. + +Next, you must configure your firewall. There’s usually a firewall embedded in the router you get from your internet service provider (ISP). Generally, you access your home router through a web browser. Your router’s address is sometimes printed on the bottom of the router, and it begins with either 192.168 or 10. Every device is different, though, so there’s no way for me to tell you exactly what you need to click on to adjust your settings. For a full description of how to configure your firewall, read Seth Kenlon’s article [Open ports and route traffic through your firewall][9]. + +Alternately, you can use [localtunnel][10] to use a dynamic port-forwarding service. + +Once you’ve got traffic going to your Pi, you can query your API: + +``` +$ curl https://example.com/get-stats +{ + "cpu_count": 4, + "cpu_freq": [ + 600.0, + 600.0, + 1200.0 ], + "cpu_mem_avail": 386273280, + ... +``` + +If you have gotten this far, the toughest part is over. + +### 5. Repetition + +If you reboot your Pi, you must follow these steps: + +- Reactivate your Python environment with `source` +- Refresh the application dependencies with `pip` +- Start the Flask application with `gunicorn` + +Your firewall settings are persistent, but if you’re using localtunnel, then you must also start a new tunnel after a reboot. + +You can automate these tasks if you like, but that’s a whole other tutorial. The final section of this tutorial is to build a UI on Appsmith using the drag-and-drop widgets, and a bit of Javascript, to bind your RPi data to the UI. Believe me, it’s easy going from here on out! + +### Build the dashboard on Appsmith. + +![A hardware monitoring dashboard][11] + +To get to a dashboard like this, you need to connect the exposed API endpoint to Appsmith, build the UI using Appsmith’s widgets library, and bind the API’s response to your widgets. If you’re already using Appsmith, you can just import the [sample app][1] directly and get started. + +If you haven’t done so already, [sign up][12] for a free Appsmith account. Alternately, you can [self-host Appsmith][13]. + +### Connect the API as an Appsmith datasource + +Sign in to your Appsmith account. + +- Find and click the **+** button next to **QUERIES/JS** in the left nav. +- Click **Create a blank API.** +- At the top of the page, name your project **PiData**. +- Get your API’s URL. If you’re using localtunnel, then that’s a `localtunnel.me` address, and as always append `/get-stats` to the end for the stat data. Paste it into the first blank field on the page, and click the **RUN** button. + +Confirm that you see a successful response in the **Response** pane. + +![The Appsmith interface][14] + +### Build the UI + +The interface for AppSmith is pretty intuitive, but I recommend going through [building your first application on Appsmith][15] tutorial if you feel lost. + +For the title, drag and drop a Text, Image, and Divider widget onto the canvas. Arrange them like this: + +![Set your project title][16] + +The Text widget contains the actual title of your page. Type in something cooler than “Raspberry Pi Stats”. + +The Image widget houses a distinct logo for the dashboard. You can use whatever you want. + +Use a Switch widget for a toggled live data mode. Configure it in the **Property** pane to get data from the API you’ve built. + +For the body, create a place for CPU Stats with a Container widget using the following widgets from the Widgets library on the left side: + +- Progress Bar +- Stat Box +- Chart + +Do the same for the Memory and Disk stats sections. You don’t need a Chart for disk stats, but don’t let that stop you from using one if you can find uses for it. + +Your final arrangement of widgets should look something like this: + +![Property settings in Appsmith][17] + +The final step is to bind the data from the API to the UI widgets you have. + +### Bind data to the widgets + +Head back to the canvas and find your widgets in sections for the three categories. Set the CPU Stats first. + +To bind data to the Progress Bar widget: + +- Click the Progress Bar widget to see the Property pane on the right. +- Look for the Progress property. +- Click the **JS** button to activate Javascript. +- Paste `{{PiData.data.cpu_percent ?? 0}}` in the field for **Progress**. That code references the stream of data from of your API named `PiData`. Appsmith caches the response data within the `.data` operator of `PiData`. The key `cpu_percent` contains the data Appsmith uses to display the percentage of, in this case, CPU utilization. +- Add a Text widget below the Progress Bar widget as a label. + +![Binding data in the config screen][18] + +There are three Stat Box widgets in the CPU section. Binding data to each one is the exact same as for the Progress Bar widget, except that you bind a different data attribute from the `.data` operator. Follow the same procedure, with these exceptions: + +- `{{${PiData.data.cpu_freq[0]} ?? 0 }}` to show clock speed. +- `{{${PiData.data.cpu_count} ?? 0 }}` for CPU count. +- `{{${(PiData.data.sensor_temperatures).toPrecision(3)} ?? 0 }}` for CPU temperature data. + +Assuming all goes to plan, you end up with a pretty dashboard like this one: + +![A dashboard for your Raspberry Pi][19] + +### CPU utilization trend + +You can use a Chart widget to display the CPU utilization as a trend line, and have it automatically update over time. + +First, click the widget, find the Chart Type property on the right, and change it to LINE CHART. To see a trend line, store `cpu_percent` in an array of data points. Your API currently returns this as a single data point in time, so use Appsmith’s `storeValue` function (an Appsmith-native implementation of a browser’s `setItem` method) to get an array. + +Click the **+** button next to **QUERIES/JS** and name it **utils**. + +Paste this Javascript code into the **Code** field: + +``` +export default { + getLiveData: () => { + //When switch is on: + if (Switch1.isSwitchedOn) { + setInterval(() => { + let utilData = appsmith.store.cpu_util_data; + + PiData.run() + storeValue("cpu_util_data", [...utilData, { + x: PiData.data.cpu_percent, + y: PiData.data.cpu_percent + }]); + }, 1500, 'timerId') + } else { + clearInterval('timerId'); + } +}, +initialOnPageLoad: () => { + storeValue("cpu_util_data", []); + } +} +``` + +To initialize the `Store`, you’ve created a JavaScript function in the object called `initialOnPageLoad`, and you’ve housed the `storeValue` function in it. + +You store the values from `cpu_util_data` into the `storeValue` function using `storeValue("cpu_util_data", []);`. This function runs on page load. + +So far, the code stores one data point from `cpu_util_data` in the `Store` each time the page is refreshed. To store an array, you use the `x` and `y` subscripted variables, both storing values from the `cpu_percent` data attribute. + +You also want this data stored automatically by a set interval between stored values. When the function [setInterval][20] is executed: + +- The value stored in `cpu_util_data` is fetched. +- The API `PiData` is called. +- `cpu_util_data` is updated as `x` and `y` variables with the latest `cpu_percent` data returned. +- The value of `cpu_util_data` is stored in the key `utilData`. +- Steps 1 through 4 are repeated if and only if the function is set to auto-execute. You set it to auto-execute with the Switch widget, which explains why there is a `getLiveData` parent function. + +Navigate to the **Settings** tab to find all the parent functions in the object and set `initialOnPageLoad` to **Yes** in the **RUN ON PAGE LOAD** option. + +![Set the function to execute on page load][21] + +Now refresh the page for confirmation + +Return to the canvas. Click the Chart widget and locate the Chart Data property. Paste the binding `{{ appsmith.store.disk_util_data }}` into it. This gets your chart if you run the object `utils` yourself a few times. To run this automatically: + +- Find and click the **Live Data Switch** widget in your dashboard’s title. +- Look for the `onChange` event. +- Bind it to `{{ utils.getLiveData() }}`. The Javascript object is `utils`, and `getLiveData` is the function that activates when you toggle the Switch on, which fetches live data from your Raspberry Pi. But there’s other live data, too, so the same switch works for them. Read on to see how. + +### Bind all the data + +Binding data to the widgets in the Memory and Disk sections is similar to how you did it for the CPU Stats section. + +For Memory, bindings change to: + +- `{{( PiData.data.cpu_mem_avail/1000000000).toPrecision(2) \* 100 ?? 0 }}` for the Progress Bar. +- `{{ \${(PiData.data.cpu_mem_used/1000000000).toPrecision(2)} ?? 0 }} GB`, `{{ \${(PiData.data.cpu_mem_free/1000000000).toPrecision(2)} ?? 0}} GB`, and `{{ \${(PiData.data.cpu_mem_total/1000000000).toPrecision(2)} ?? 0 }} GB` for the three Stat Box widgets. + +For Disk, bindings on the Progress Bar, and Stat Box widgets change respectively to: + +- `{{ PiData.data.disk_usage_percent ?? 0 }}` +- `{{ \${(PiData.data.disk_usage_used/1000000000).toPrecision(2)} ?? 0 }} GB` +- `{{ \${(PiData.data.disk_usage_free/1000000000).toPrecision(2)} ?? 0 }} GB` and `{{ \${(PiData.data.disk_usage_total/1000000000).toPrecision(2)} ?? 0 }} GB` for the three Stat Box widgets. + +The Chart here needs updating the `utils` object you created for CPU Stats with a `storeValue` key called `disk_util_data` nested under `getLiveData` that follows the same logic as `cpu_util_data`. For the disk utilization chart, we store disk_util_data that follows the same logic as that of the CPU utilization trend chart. + +``` +export default { + getLiveData: () => { + //When switch is on: + if (Switch1.isSwitchedOn) { + setInterval(() => { + const cpuUtilData = appsmith.store.cpu_util_data; + const diskUtilData = appsmith.store.disk_util_data; + + PiData.run(); + + storeValue("cpu_util_data", [...cpuUtilData, { x: PiData.data.cpu_percent,y: PiData.data.cpu_percent }]); + storeValue("disk_util_data", [...diskUtilData, { x: PiData.data.disk_usage_percent,y: PiData.data.disk_usage_percent }]); + }, 1500, 'timerId') + } else { + clearInterval('timerId'); + } +}, + initialOnPageLoad: () => { + storeValue("cpu_util_data", []); + storeValue("disk_util_data", []); + } +} +``` + +Visualizing the flow of data triggered by the Switch toggling live data on and off with the `utils` Javascript object looks like this: + +![Toggling][22] + +Toggled on, the charts change like this: + +![Live data display][23] + +Pretty, minimalistic, and totally useful. + +### Enjoy + +As you get more comfortable with `psutils`, Javascript, and Appsmith, I think you’ll find you can tweak your dashboard easily and endlessly to do really cool things like: + +- See trends from the previous week, month, quarter, year, or any custom range that your RPi data allows +- Build an alert bot for threshold breaches on any stat +- Monitor other devices connected to your Raspberry Pi +- Extend `psutils` to another computer with Python installed +- Monitor your home or office network using another library +- Monitor your garden +- Track your own life habits + +Until the next awesome build, happy hacking! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/build-raspberry-pi-dashboard-appsmith + +作者:[Keyur Paralkar][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/keyur-paralkar +[b]: https://github.com/lkxed/ +[1]: https://github.com/appsmithorg/foundry/tree/main/resources/blogs/Raspberry%20Pi%20Dashboard +[2]: https://www.redhat.com/architect/low-code-platform?intcmp=7013a000002qLH8AAM +[3]: https://psutil.readthedocs.io/en/latest/ +[4]: https://flask-restful.readthedocs.io/en/latest/ +[5]: https://www.redhat.com/en/topics/api/what-is-a-rest-api?intcmp=7013a000002qLH8AAM +[6]: https://opensource.com/article/20/10/venv-python +[7]: https://flask-restful.readthedocs.io/en/latest/api.html#id1 +[8]: https://flask-restful.readthedocs.io/en/latest/api.html#flask_restful.Resource +[9]: https://opensource.com/article/20/9/firewall +[10]: https://theboroer.github.io/localtunnel-www/ +[11]: https://opensource.com/sites/default/files/2023-02/dashboard.png +[12]: https://appsmith.com/sign-up +[13]: https://docs.appsmith.com/getting-started/setup +[14]: https://opensource.com/sites/default/files/2023-02/success.webp +[15]: https://docs.appsmith.com/getting-started/start-building +[16]: https://opensource.com/sites/default/files/2023-02/TITLE.webp +[17]: https://opensource.com/sites/default/files/2023-02/property.webp +[18]: https://opensource.com/sites/default/files/2023-02/config.webp +[19]: https://opensource.com/sites/default/files/2023-02/final.webp +[20]: https://docs.appsmith.com/reference/appsmith-framework/widget-actions/intervals-time-events#setinterval +[21]: https://opensource.com/sites/default/files/2023-02/load-on-page.webp +[22]: https://opensource.com/sites/default/files/2023-02/toggle.gif +[23]: https://opensource.com/sites/default/files/2023-02/final.gif \ No newline at end of file From 24b9750c68bebfae0c3d18cefd9aa46059c2638b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Mon, 6 Mar 2023 21:07:33 +0800 Subject: [PATCH 010/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230306.2=20=E2=AD=90=EF=B8=8F=20How=20Wikipedia=20he?= =?UTF-8?q?lps=20keep=20the=20internet=20open.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How Wikipedia helps keep the internet open.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md diff --git a/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md b/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md new file mode 100644 index 0000000000..4c5795892f --- /dev/null +++ b/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md @@ -0,0 +1,76 @@ +[#]: subject: "How Wikipedia helps keep the internet open" +[#]: via: "https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open" +[#]: author: "Srishti Sethi https://opensource.com/users/srishakatux-0" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How Wikipedia helps keep the internet open +====== + +Wikipedia is one of the most significant open source software projects, in part because it's a lot bigger than you may realize. And yet anyone can contribute content, and anyone can contribute code to many technical areas of the projects that work behind the curtain to keep Wikipedia running. + +[Over 870 Wikipedia and umbrella sites][1] are available in different languages, and all of them operate with a common goal of “developing free educational content and disseminating it effectively and globally.” For example, Wikimedia Commons is a repository of free media files, and as of today, it has over 68 million images. Wikisource is a free library of textual sources with over 5 million articles and website subdomains active for 72 languages. Wikidata is an accessible repository of over 99 million data items used across [several Wikipedia-related sites][2]. + +These projects are supported and maintained by Wikimedia Foundation, a non-profit organization headquartered in San Francisco. The organization also empowers hundreds of thousands of volunteers worldwide to contribute free knowledge to these projects. Behind this community of knowledge gatherers and producers, a lot of work goes into maintenance, technical support, and administrative work to keep these sites up and running. From the outside looking in, you might still wonder what more work could remain in developing Wikipedia’s software. After all, it’s one of the top ten most visited internet websites in the world, and serves its purpose well and provides access to the best possible information. + +The truth is that every article on Wikipedia leverages thousands of software tools for its creation, editing, and maintenance. These are crucial steps in ensuring equitable, reliable, and fast access to information no matter where you are in the world. When you browse Wikipedia or any other Wikimedia sites, the software you interact with is called [MediaWiki][3], a powerful collaboration and documentation software that powers the content of Wikipedia. It comes with a default set of features. To further enhance the software’s capabilities, you can install various extensions. They’re too numerous to mention, but two notable extensions are: + +- VisualEditor: A WYSIWYG rich-text editor for MediaWiki-powered wikis +- Wikibase: Allows storing, managing, and accessing structured data which Wikipedia pulls from Wikidata. + +All of this apparent ancillary tooling makes the modern Wikipedia, and each one is important for its functioning. + +### Wikimedia and Mediawiki + +Overall, Wikipedia’s technology ecosystem is vast! As MediaWiki, one of the most popular software in the Wikimedia world, is available under an open source license, [over four hundred thousand projects][4] and organizations use it for hosting their content. For example, [NASA uses it][5] to organize its content around space missions and their knowledge base! + +In addition, there are many other bots, tools, desktop and mobile apps that help with content access, creation, editing, and maintenance. For example, bots in particular help drastically reduce the workload of editors by automating repetitive and tedious tasks, such as fighting vandalism, suggesting articles to newcomers, fact-checking articles, and more. InternetArchiveBot is a popular bot that frequently communicates with the Wayback Machine to fix dead links on Wikipedia. + +Tools are software applications that support various contributors in their work. For example, organizers can access tools for conducting editathons, running campaigns, educational courses around Wikipedia editing, and so on. As of May 2022, bots and tools contribute 36.6% of edits made to 870 Wikimedia wikis, demonstrating their significant impact on the ecosystem. + +[Kiwix][6] is a well-known offline reader and a desktop application that provides access to Wikipedia in limited internet access regions, particularly in educational settings. Mobile apps for Wikipedia and Wikimedia Commons allow editors to contribute articles and media files through their devices too, making our knowledge platforms accessible to a larger audience around the world. + +The next time you are browsing a Wikipedia article and notice frequent changes being made to it in real-time in the wake of a recent event, you might be able to visualize better what might be happening behind the scenes. + +### Wikipedia’s technical community + +Wikipedia was launched in 2001. It had about ten developers at that time. Since the inception of the Wikimedia Foundation in 2003, the developer pool has vastly grown over these years. About a thousand developers are now contributing to various projects within our knowledge movement. This number fluctuates yearly, depending on the number of active contributors and staff members, initiatives supporting volunteer developers, global events such as the pandemic, and so on. + +Members in the technical community contribute in various ways and roles. There are code contributors, documentarians, designers, advocates, mentors, community organizers, testers, translators, site administrators, and more. + +According to a survey conducted for new developers, Wikimedia draws a lot of contributors from the United States, Europe, and India like other open source projects and is growing in different regions of the world. + +Volunteer developers have similar motivations as Wikipedia editors. They join as contributors to support the free knowledge mission, learn and gain new skills, improve the experience of other editors, and so on. One of the volunteer developers from India says, “While I joined as an editor, I started to familiarize myself with the tech behind Wikipedia because there were significantly fewer contributors in the Hindi Wikipedia community who could address our local language needs through technology.” + +Between July 2021 and June 2022, looking only at code repositories hosted in Wikimedia’s Gerrit instance, 514 developers contributed 45,621 merged software changes to 1225 repositories. Of these contributions, 48.52% came from outside the Wikimedia Foundation by other organizations and [independent developers][7]. Some of these developers are also part of various user groups, chapters, and affiliate bodies working in different regions to promote the use and encourage contributions to Wikimedia projects. These numbers do not include the additional developers who chose to host their code externally instead, or code that is hosted directly on wiki pages, such as gadgets or modules. + +### Making a difference + +Wikipedia is a vast repository of knowledge, available to everyone. In many ways, it’s the embodiment of the original vision of what the internet can and should be: A source of information, understanding, and collaboration. + +You can be a part of Wikipedia as a contributor, either by sharing your knowledge in articles, or by helping to build the software that makes it all possible. If you’re interested in joining Wikimedia’s technical community, then explore the resources on our developer site, and learn how to [get involved][8]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open + +作者:[Srishti Sethi][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/srishakatux-0 +[b]: https://github.com/lkxed/ +[1]: https://wikimediafoundation.org/our-work/wikimedia-projects/#a1-reference +[2]: https://meta.wikimedia.org/wiki/Wikimedia_wikis +[3]: https://www.mediawiki.org/wiki/MediaWiki +[4]: https://wikistats.wmcloud.org/ +[5]: https://wikimediafoundation.org/news/2016/05/05/mediawiki-nasa/ +[6]: https://meta.wikimedia.org/wiki/Kiwix +[7]: https://wikimedia.biterg.io/ +[8]: https://developer.wikimedia.org/ \ No newline at end of file From 87abcd66cdee392f44c1f0a35a165860c2acdeae Mon Sep 17 00:00:00 2001 From: Cubik Date: Mon, 6 Mar 2023 15:31:33 -0500 Subject: [PATCH 011/318] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7][?= =?UTF-8?q?tech]:=2020230305.0=20=E2=AD=90=EF=B8=8F=20Install=20DOSBox=20i?= =?UTF-8?q?n=20Ubuntu=20to=20Play=20Retro=20Games.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md b/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md index 1d401e54fd..6ee19f693a 100644 --- a/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md +++ b/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/ubuntu-dosbox/" [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Cubik65536" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -135,7 +135,7 @@ via: https://itsfoss.com/ubuntu-dosbox/ 作者:[Sagar Sharma][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Cubik65536](https://github.com/Cubik65536) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -152,4 +152,4 @@ via: https://itsfoss.com/ubuntu-dosbox/ [8]: https://learnubuntu.com/unzip-file/?ref=its-foss [9]: https://itsfoss.com/content/images/2023/02/mount-the-game-to-the-virtual-C-drive.png [10]: https://itsfoss.com/content/images/2023/02/switch-to-the-virtual-drive-C.png -[11]: https://itsfoss.com/content/images/2023/02/play-mario-on-Linux.gif \ No newline at end of file +[11]: https://itsfoss.com/content/images/2023/02/play-mario-on-Linux.gif From e7d997e7d98d83950e9d8bb9bc7c8657b3089943 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Mar 2023 08:40:30 +0800 Subject: [PATCH 012/318] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @cool-summer-021 https://linux.cn/article-15603-1.html 下回尽量不要选已经过时内容。 --- ...dation (OpenSSF)- Reflection and Future.md | 90 +++++++++++++++++++ ...dation (OpenSSF)- Reflection and Future.md | 89 ------------------ 2 files changed, 90 insertions(+), 89 deletions(-) create mode 100644 published/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md delete mode 100644 translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md diff --git a/published/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md b/published/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md new file mode 100644 index 0000000000..2b3c42b461 --- /dev/null +++ b/published/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md @@ -0,0 +1,90 @@ +[#]: collector: (lujun9972) +[#]: translator: (cool-summer-021) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15603-1.html) +[#]: subject: (Open Source Security Foundation \(OpenSSF\): Reflection and Future) +[#]: via: (https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/) +[#]: author: (The Linux Foundation https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/) + +开源安全基金会(OpenSSF):回顾和展望 +====== + +![][0] + +[开源安全基金会][1](OpenSSF)正式 [成立于 2020 年 8 月 3 日][2]。本文将讨论 OpenSSF 创立的初衷,它成立之初六个月内的成就,以及它未来的愿景。 + +(LCTT 校注:原文发表于 2 年前, 但时至今日仍然有一些值得了解的信息。) + +全世界都在推行开源软件(OSS)理念,所以开源软件的安全也至关重要。为了提升开源软件的安全性,业界已经做了大量工作,并取得了一些成果。这些成果包括:Linux 基金会的 核心基础设施计划Core Infrastructure Initiative(CII)、GitHub 安全实验室的 开源安全联盟Open Source Security Coalition(OSSC)和由谷歌以及其他公司创立的 联合开源软件计划Joint Open Source Software Initiative(JOSSI)。 + +显然,如果这些成果合为一体,软件行业将发展得更加顺利。这三项成果在 2020 年合并为“旨在促进开源软件安全性的、由各行业巨头主导的跨行业联盟”。 + +OpenSSF 的确受益于这种“跨行业联盟”;它有几十个成员,(按字母顺序)包括 Canonical、 GitHub、谷歌、IBM、英特尔、微软和红帽。联盟的理事会成员还包括安全社区个人代表,这些个人代表是那些不能以企业名义作为联盟成员的个人。该联盟也创造了一些便于人们合作的组织结构:建立一些活跃的工作组,这种工作组确定(并公布)它存在的价值,其中的成员应当就该组织的技术愿景形成一致意见。 + +但是这并不重要,除非它们有实际成果。当时虽然处于早期,它们也确实取得了一些成果。它们发布了: + + * [安全软件开发基础课程][3]:在 edX 平台上有 3 门免费课程,旨在教授软件开发人员软件安全方面的知识。这些课程注重实际操作,任何开发人员都可以较轻松地学习,而不是那些需要耗费大量资源的理论或案例。开发人员也可以付费参加测试,从而获得认证,表明自己掌握了这些课程地内容。 + * [安全评分卡][4]:为开源项目自动生成“安全分数”,帮助用户进行信任、风险和安全方面的决策。 + * [关键性分数][5]:基于一些参数,为开源项目自动生成关键性分数。临界分数可以让人们对世界上最重要的开源项目有更好的理解。 + * [安全度量仪表盘][6]:这是较早时候发布的成果,它结合安全评分卡、CII 最佳实践和其他数据来源,提供与 OSS 项目有关的安全和支持信息的仪表盘。 + * [OpenSSF CVE 基准测试][7]:基准测试由超过 200 个历史上的 JavaScript/TypeScript 漏洞(CVE)的脆弱代码和元数据组成。这将帮助安全团队评估市场上的各种安全工具,使他们能够用真实的代码库(而不是合成的测试代码)确定误报和漏报率。 + * [OWASP 安全知识框架][8]:与 OWASP 的合作成果,它是一个知识库,包含了带检查清单的项目和使用多种编程语言的最佳代码样例。它还提供针对开发者如何使用特定的语言编写安全代码的培训材料,以及用于实际操作的安全实验室。 + * 2020 年自由/开源软件贡献者调查报告:OpenSSF 和 LISH 发布了一份报告,其中详细说明了对开源软件贡献者的调查结果,并以此为依据,研究和确定提高 OSS 安全性和可持续性的方法。一共调查了 1200 名受访者。 + +现有的 [CII 最佳实践徽章][10] 项目已经与 OpenSSF 合并,将继续升级。现在项目有很多中文译者,翻译为斯瓦希里语的工作也在进行中,项目也进行了很多小改进,详细阐明获得徽章的要求。 + +2020 年 11 月举行的 OpenSSF 大会讨论了 OpenSSF 正在进行中的工作。最近,OpenSSF 有这些工作组: + + * 漏洞披露 + * 安全工具 + * 安全最佳实践 + * 对开源项目安全漏洞的识别(重点关注指标仪表盘) + * 对关键项目的保障 + * 数字身份认证 + +除了持续更新已发布的项目,未来可能的工作还包括: + + * 为减少重复工作,在多种技术指标中确定哪些是重复和关联的安全需求。这就是作为领导者与 OWASP 协作开发,也称为 [通用需求枚举][12]Common Requirements Enumeration(CRE)。CRE 旨在使用一种公共主题标识符,将标准和指南的各个部分联系起来,这种公共主题标识符的作用是令标准和方案制定者高效工作,令标准使用者能搜索到需要的信息,从而使双方对网络安全有相同的理解。 + * 建一个网站,提供对安全度量仪表盘的免安装访问。再次强调,这将会提供各种来源(包括安全计分卡和 CII 最佳实践)的数据的简单展示。 + * 开发对关键 OSS 项目的识别功能。哈佛大学和 LF 已经做过一些识别关键 OSS 项目的工作。未来一年内,他们会改进方法,添加新的数据来源,从而更好地进行鉴别工作。 + * 资助一些关键的 OSS 项目,提高它们的安全性。预期将关注那些财力不足的项目,帮助这些项目提升整体性能。 + * 识别和实现已改进和简化的技术,用于数字签名的提交和对身份的校验。 + +跟所有的 Linux 基金会项目一样,OpenSSF 的工作是由其成员决定的。如果你对大家所依赖的 OSS 安全有兴趣,你可以访问 OpenSSF 网站并以某种方式加入它们。参与的最好方式是出席工作组会议——会议每隔一周就举行,而且非常随意。通过合作,我们可以有所作为。欲了解更多信息,可以访问: + +> **[https://openssf.org][1]** + +作者:[David A. Wheeler][13] Linux 基金会开源供应链安全总监 + +[本文][14] 首次发表于 [Linux 基金会网站][15]。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/ + +作者:[The Linux Foundation][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ +[b]: https://github.com/lujun9972 +[1]: https://openssf.org/ +[2]: https://www.linuxfoundation.org/en/press-release/technology-and-enterprise-leaders-combine-efforts-to-improve-open-source-security/ +[3]: https://openssf.org/blog/2020/10/29/announcing-secure-software-development-edx-course-sign-up-today/ +[4]: https://openssf.org/blog/2020/11/06/security-scorecards-for-open-source-projects/ +[5]: https://github.com/ossf/criticality_score +[6]: https://github.com/ossf/Project-Security-Metrics +[7]: https://openssf.org/blog/2020/12/09/introducing-the-openssf-cve-benchmark/ +[8]: https://owasp.org/www-project-security-knowledge-framework/ +[9]: https://www.linuxfoundation.org/en/press-release/new-open-source-contributor-report-from-linux-foundation-and-harvard-identifies-motivations-and-opportunities-for-improving-software-security/ +[10]: https://bestpractices.coreinfrastructure.org/ +[11]: https://openssf.org/blog/2020/11/23/openssf-town-hall-recording-now-available/ +[12]: https://owasp.org/www-project-integration-standards/ +[13]: mailto:dwheeler@linuxfoundation.org +[14]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ +[15]: https://www.linuxfoundation.org/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/07/083725e6zk5pc2atq86qt9.jpg \ No newline at end of file diff --git a/translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md b/translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md deleted file mode 100644 index a234118bfe..0000000000 --- a/translated/tech/20210128 Open Source Security Foundation (OpenSSF)- Reflection and Future.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (cool-summer-021) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open Source Security Foundation (OpenSSF): Reflection and Future) -[#]: via: (https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/) -[#]: author: (The Linux Foundation https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/) - -开源安全基金会(OpenSSF):回顾和展望 -====== - -[开源软件基金会(OpenSSF)][1]正式[成立于2020年8月3日][2]。本文将讨论 OpenSSF 创立的初衷,它成立之初六个月内的成就,以及它未来的愿景。 - -全世界都在推行开源(OSS)理念,所以开源软件的安全也至关重要。为了提升开源软件的安全性,业界已经做了大量工作,并取得了一些成果。这些成果包括:Linux 基金会的核心基础设施计划(CII)、GitHub 安全实验室的开源安全联盟(OSSC)和由 Google 以及其他公司创立的联合开源软件计划(JOSSI)。 - -显然,如果这些成果合为一体,软件行业将发展得更加顺利。这三项成果在 2020 年合并为“旨在促进开源软件安全性的、由各行业巨头主导的跨行业联盟”。 - -OpenSSF的确受益于这种“跨行业联盟”;它有几十个成员,包括 Canonical, GitHub, Google, IBM, Intel, Microsoft 和 Red Hat。联盟的理事会成员还包括安全社区个人代表,这些个人代表是那些不能以企业名义作为联盟成员的个人。该联盟也创造了一些便于人们合作的组织结构:建立一些活跃的工作组,这种工作组需要确定(并公布)它存在的价值,其中的成员应当就该组织的技术愿景形成一致意见。 - -但是这并不重要,除非它们有实际成果。当时虽然处于早期,它们也确实取得了一些成果。它们发布了: - - * [安全软件开发基础课程][3]。在开放在线课堂平台有3门免费课程,旨在教授软件开发人员软件安全方面的知识。这些课程注重实际操作,任何开发人员都可以较轻松地学习,而不是那些需要耗费大量资源的理论或案例。开发人员也可以付费进行测试,从而获得认证,表明自己掌握了这些课程地内容。 - * [安全评分卡][4]。为开源项目自动生成“安全分数”,帮助用户进行信任、风险和安全方面的决策。 - * [临界分数][5]。基于一些参数,为开源项目自动生成临界分数。临界分数可以让人们对世界上最重要的开源项目有更好的理解。 - * [安全度量仪表盘][6]。这是较早时候发布的成果,它结合安全评分卡、CII 最佳实践和其他数据来源,提供与 OSS 项目有关的安全和支持信息的仪表盘。 - * [OpenSSF CVE基准测试][7]。基准测试由超过200个历史JavaScript/TypeScript漏洞(CVE)的脆弱代码和元数据组成。这将帮助安全团队评估市场上的各种安全工具,使他们能够用真实的代码库(而不是合成的测试代码)确定假阳性和假阴性率。 - * [OWASP 安全知识框架][8]。由于与 OWASP 的合作,这项成果是一个知识库,它包含了带检查清单的项目和使用多种编程语言的最佳代码样例。它还提供针对开发者的如何使用特定的语言编写安全代码的培训材料,以及用于实际操作的安全实验室。 - * 2020 年自由/开源软件贡献者调查报告,OpenSSF 和 LISH 发布了一份报告,其中详细说明了对开源软件贡献者的调查结果,并以此为依据,研究和确定提高OSS安全性和可持续性的方法。一共调查了1200名受访者。 - - - -现有的 [CII 最佳实践徽章][10] 项目已经与 OpenSSF合并,将继续升级。现在项目有很多中文译者,翻译为斯瓦希里语的工作也在进行中,项目也进行了很多小改进,详细阐明获得徽章的要求。 - -2020年11月举行的 OpenSSF 大会讨论了 OpenSSF 正在进行中的工作。最近,OpenSSF 有这些工作组: - - * 系统的脆弱性信息披露 - * 安全工具 - * 安全最佳实践 - * 对开源项目安全漏洞的识别(重点关注指标仪表盘) - * 对关键项目的保障 - * 数字身份认证 - - - -除了持续更新已发布的项目,未来可能的工作还包括: - - * 为减少重复工作,在多种技术指标中确定哪些是重复和关联的安全需求。这就是作为领导者与 OWASP 协作开发,也称为[通用需求枚举(CRE)][12]。CRE 旨在使用一种公共主题标识符将标准和指南的各个部分联系起来,这种公共主题标识符的作用是令标准和方案制定者高效工作,令标准使用者能搜索到需要的信息,从而使双方对网络安全有相同的理解。 - * 建一个网站,提供对安全度量仪表盘的免安装访问。再次强调,这将会提供各种来源(包括安全计分卡和CII 最佳实践)的数据的简单展示。 - * 开发对关键 OSS 项目的识别功能。哈佛大学和LF已经做过一些识别关键 OSS 项目的工作。未来一年内,他们会改进方法,添加新的数据来源,从而更好地进行鉴别工作。 - * 资助一些关键的OSS项目,提高它们的安全性。预期将关注那些财力不足的项目,帮助这些项目提升整体性能。 - * 识别和实现已改进和简化的技术,用于数字签名的提交和对身份的校验。 - - - -跟所有的 Linux 基金会项目一样,OpenSSF 的工作是由其成员决定的。如果你对大家所依赖的 OSS 安全有兴趣,你可以访问 OpenSSF网站并以某种方式加入它们。参与的最好方式是出席工作组会议——会议每隔一周就举行,而且非常随意。通过合作,我们可以有所作为。欲了解更多信息,可以访问 [https://openssf.org][1]。 - -_[**David A. Wheeler,**][13]_* Director of Open Source Supply Chain Security at the Linux Foundation*** - -[本文][14] 首次发表于 [Linux 基金会网站][15]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/open-source-security-foundation-openssf-reflection-and-future/ - -作者:[The Linux Foundation][a] -选题:[lujun9972][b] -译者:[cool-summer-021](https://github.com/cool-summer-021) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ -[b]: https://github.com/lujun9972 -[1]: https://openssf.org/ -[2]: https://www.linuxfoundation.org/en/press-release/technology-and-enterprise-leaders-combine-efforts-to-improve-open-source-security/ -[3]: https://openssf.org/blog/2020/10/29/announcing-secure-software-development-edx-course-sign-up-today/ -[4]: https://openssf.org/blog/2020/11/06/security-scorecards-for-open-source-projects/ -[5]: https://github.com/ossf/criticality_score -[6]: https://github.com/ossf/Project-Security-Metrics -[7]: https://openssf.org/blog/2020/12/09/introducing-the-openssf-cve-benchmark/ -[8]: https://owasp.org/www-project-security-knowledge-framework/ -[9]: https://www.linuxfoundation.org/en/press-release/new-open-source-contributor-report-from-linux-foundation-and-harvard-identifies-motivations-and-opportunities-for-improving-software-security/ -[10]: https://bestpractices.coreinfrastructure.org/ -[11]: https://openssf.org/blog/2020/11/23/openssf-town-hall-recording-now-available/ -[12]: https://owasp.org/www-project-integration-standards/ -[13]: mailto:dwheeler@linuxfoundation.org -[14]: https://www.linuxfoundation.org/en/blog/openssf-reflection-and-future/ -[15]: https://www.linuxfoundation.org/ From 7294f82f243814feae0f9d81b77ad5e881b4c9be Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 7 Mar 2023 08:46:51 +0800 Subject: [PATCH 013/318] translated --- ...l IDLE Python IDE in Ubuntu and Other Linux.md | 111 ------------------ ...l IDLE Python IDE in Ubuntu and Other Linux.md | 111 ++++++++++++++++++ 2 files changed, 111 insertions(+), 111 deletions(-) delete mode 100644 sources/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md create mode 100644 translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md diff --git a/sources/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md b/sources/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md deleted file mode 100644 index 7333a261f1..0000000000 --- a/sources/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md +++ /dev/null @@ -1,111 +0,0 @@ -[#]: subject: "How to Install IDLE Python IDE in Ubuntu and Other Linux" -[#]: via: "https://www.debugpoint.com/install-idle-ubuntu-linux/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install IDLE Python IDE in Ubuntu and Other Linux -====== - -**Python’s default IDE IDLE is not installed by default in Ubuntu and other distros. Learn how to install it in this guide.** - -IDLE (**I**ntegrated **D**evelopment and **L**earning **E**nvironment) is a [Python IDE][1], written in Python language itself and usually gets installed in Windows as part of [Python installation][2]. It is ideal for beginners and straightforward to use. For those who are learning Python, such as students, it can be a good IDE to start with. - -Basic features such as syntax highlighting, smart ident, and auto-completion are some of the features of this IDE. You can always learn more about the IDLE features in the official [documentation][3]. - -### IDLE in Ubuntu and other Linux - -All Linux distributions, including Ubuntu, come with Python pre-installed. Even if you manually upgrade or install Python versions, the IDLE IDE doesn’t come with that. You have to install it manually. - -For **Debian, Ubuntu, Linux Mint and related distribution** open a terminal and run the following command to install IDLE. - -``` -sudo apt update -``` - -``` -sudo apt install idle3 -``` - -Hit yes when the command asks you whether you want to install IDLE or not. After the command is complete, IDLE will be installed in your Ubuntu system. - -For **Fedora, RHEL, CentOS**, use the following command to install it. - -``` -sudo dnf update -``` - -``` -sudo dnf install idle3 -``` - -**Arch Linux** users can install it using the following command. - -``` -sudo pacman -S python tk -``` - -![IDLE install and run in Ubuntu][4] - -### Launching IDLE and writing a sample program to test - -After the installation in Ubuntu, Debian, Linux Mint, and Fedora – you can find the IDLE icon in the application menu. See below. - -![IDLE icon in the application menu][5] - -If you are using Arch Linux, you need to run below from the command line to launch IDLE. - -``` -idle -``` - -Once you launch IDLE, you should see the main window, as shown in the image below. - -![IDLE editor main window][6] - -By default, it shows you a shell where you can directly execute Python codes in each line. It works like any shell interpreter. And when you hit enter, you get the output, and the three “>” symbols go to the next line for the next command. - -![Running a simple Python statement in IDLE][7] - -IDLE also allows you to open any .py file from its file menu. It will open the file in a separate window where you can make changes and run it directly. You can run using F5 or from the option Run > Run Module. - -![A python file opened from IDLE][8] - -![Option to Run the file using menu][9] - -The output is shown in a separate output window. From the output window, you can start debugging, step into a line or file, view stack trace and other options. - -![Output is shown in a separate output window of IDLE][10] - -### Closing Notes - -Now you learned how to install the IDLE IDE in Ubuntu and other distributions and how to run a statement or a Python program. IDLE can be a good starting point for beginners to grasp the basics before heading over to more complex IDEs. - -I hope this guide helps you on your Python journey. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/install-idle-ubuntu-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/5-best-python-ide-code-editor/ -[2]: https://www.debugpoint.com/install-python-windows/ -[3]: https://docs.python.org/3/library/idle.html -[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/IDLE-install-and-run-in-Ubuntu.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/IDLE-icon-in-the-application-menu.jpg -[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/IDLE-editor-main-window.jpg -[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-a-simple-Python-statement-in-IDLE.jpg -[8]: https://www.debugpoint.com/wp-content/uploads/2023/02/A-python-file-opened-from-IDLE.jpg -[9]: https://www.debugpoint.com/wp-content/uploads/2023/02/Option-to-Run-the-file-using-menu.jpg -[10]: https://www.debugpoint.com/wp-content/uploads/2023/02/Output-is-shown-in-a-separate-output-window-of-IDLE.jpg \ No newline at end of file diff --git a/translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md b/translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..ae9f9977fb --- /dev/null +++ b/translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md @@ -0,0 +1,111 @@ +[#]: subject: "How to Install IDLE Python IDE in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/install-idle-ubuntu-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Ubuntu 和其他 Linux 下安装 IDLE Python IDE +====== + +**在 Ubuntu 和其他发行版中,Python 的默认 IDE IDLE 没有被默认安装。在本指南中了解如何安装它。** + +IDLE (**I**ntegrated **D**evelopment and **L**earning **E**nvironment)(集成开发学习环境)是一个 [Python IDE][1],由 Python 语言本身编写,通常作为 [Python 安装][2]的一部分被安装在 Windows 中。它是初学者的理想选择,使用起来很简单。对于那些正在学习 Python 的人,比如学生,它可以作为一个很好的 IDE 来开始使用。 + +语法高亮、智能识别和自动补全等基本功能是这个 IDE 的一些特点。你可以随时在官方[文档][3]中了解更多关于 IDLE 的功能。 + +### Ubuntu 和其他 Linux 中的 IDLE + +所有的 Linux 发行版,包括 Ubuntu,都预装了 Python。即使你手动升级或安装了 Python 版本,IDLE IDE 也不会自带。你必须手动安装它。 + +对于 **Debian、Ubuntu、Linux Mint 和相关发行版**,打开终端,运行以下命令来安装 IDLE。 + +``` +sudo apt update +``` + +``` +sudo apt install idle3 +``` + +当命令询问你是否要安装 IDLE 时,点击 Yes。命令完成后,IDLE 将被安装在你的 Ubuntu 系统中。 + +对于 **Fedora、RHEL、CentOS**,使用下面的命令来安装它。 + +``` +sudo dnf update +``` + +``` +sudo dnf install idle3 +``` + +**Arch Linux** 用户可以使用以下命令进行安装。 + +``` +sudo pacman -S python tk +``` + +![IDLE 在 Ubuntu 的安装和运行][4] + +### 启动 IDLE 并编写一个测试程序 + +在 Ubuntu、Debian、Linux Mint 和 Fedora 中安装后,你可以在应用菜单中找到 IDLE 的图标。见下图。 + +![应用菜单中的 IDLE 图标][5] + +如果你使用的是 Arch Linux,你需要在命令行中运行以下内容来启动 IDLE。 + +``` +idle +``` + +启动 IDLE 后,你应该看到主窗口,如下图所示。 + +![IDLE 编辑器主窗口][6] + +默认情况下,它会显示一个 shell,你可以直接在每一行中执行 Python 代码。它的工作方式和任何 shell 解释器一样。而当你点击回车键时,你会得到输出,还有三个 “>” 符号进入下一行,执行下一个命令。 + +![在 IDLE 中运行一个简单的 Python 语句][7] + +IDLE 也允许你从它的文件菜单中打开任何 .py 文件。它将在一个单独的窗口中打开该文件,在那里你可以进行修改并直接运行它。你可以使用 F5 或者从选项 “Run > Run Module” 来运行。 + +![从 IDLE 中打开的一个 Python 文件][8] + +![使用菜单运行该文件的选项][9] + +输出会显示在一个单独的输出窗口中。在输出窗口中,你可以开始调试,进入一行或文件,查看堆栈跟踪和其他选项。 + +![输出显示在 IDLE 的一个单独的输出窗口中][10] + +### 总结 + +现在你学会了如何在 Ubuntu 和其他发行版中安装 IDLE IDE,以及如何运行一条语句或一个 Python 程序。对于初学者来说,IDLE 是一个很好的起点,在进入更复杂的 IDE 之前,可以先掌握基础知识。 + +我希望这篇指南对你的 Python 之旅有所帮助。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-idle-ubuntu-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/5-best-python-ide-code-editor/ +[2]: https://www.debugpoint.com/install-python-windows/ +[3]: https://docs.python.org/3/library/idle.html +[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/IDLE-install-and-run-in-Ubuntu.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/IDLE-icon-in-the-application-menu.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/IDLE-editor-main-window.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-a-simple-Python-statement-in-IDLE.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2023/02/A-python-file-opened-from-IDLE.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2023/02/Option-to-Run-the-file-using-menu.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/02/Output-is-shown-in-a-separate-output-window-of-IDLE.jpg \ No newline at end of file From 55c79b02991b6b29b9d56a28ef0b474d29d7a2ab Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 7 Mar 2023 08:59:12 +0800 Subject: [PATCH 014/318] translating --- ...0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md b/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md index 28c0ad6a66..be26a39ffa 100644 --- a/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md +++ b/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/xubuntu-minimal/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 5a7f92d67f10bce4d8d57f98ff286ebaf361ba1c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 7 Mar 2023 15:36:29 +0800 Subject: [PATCH 015/318] RP @XiaotingHuang22 https://linux.cn/article-15604-1.html --- ...014 9 ways to use open source every day.md | 112 +++++++++++++++++ ...014 9 ways to use open source every day.md | 118 ------------------ 2 files changed, 112 insertions(+), 118 deletions(-) create mode 100644 published/20211014 9 ways to use open source every day.md delete mode 100644 translated/tech/20211014 9 ways to use open source every day.md diff --git a/published/20211014 9 ways to use open source every day.md b/published/20211014 9 ways to use open source every day.md new file mode 100644 index 0000000000..e47acbba80 --- /dev/null +++ b/published/20211014 9 ways to use open source every day.md @@ -0,0 +1,112 @@ +[#]: subject: "9 ways to use open source every day" +[#]: via: "https://opensource.com/article/21/10/open-source-tools" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15604-1.html" + +每天使用开源的 9 种方法 +====== + +> 你可能会惊奇地发现,那些你每天使用的工具竟是开源的。 + +![][0] + +最近,我受邀介绍网络上可用的免费和开放资源。这次演讲是当地为保持我们社区的正常运转而做出的部分尝试 —— 由我家附近的 圣文德大学St. Bonaventure University [Foster Center][2] 赞助。 我分享的一些资源不是开源的而是免费的,但许多工具是开源的。 + +看到有不少人知道我所提到的工具真的很有趣。很多人并不知道他们每天使用的工具都是开源的,并且他们还可以与他人分享。 + +### 开源浏览器 + +使用网络需要一个好的浏览器,而 [Firefox 是开源的][3],这一点很多在场的人并不清楚。除了是开源,Firefox 还具有强烈的隐私意识,这是许多用户越来越关注的问题。不过,有趣的是,即使是微软的新浏览器也是基于开源 Chromium 项目的。 + +### 开源网络隐私 + +通常,保护你的隐私和改善你的网络体验的另一种方法是使用 uBlock Origin 来阻止广告。根据他们的网站: + +> uBlock Origin 是一个免费、开源、跨平台的内容过滤浏览器扩展——主要旨在以一种高效、用户友好的方法消除隐私侵犯。 + +其代码采用 [GPL v. 3.0][4] 许可证。 + +电子前沿基金会Electronic Frontier Foundation(EFF)还维护 [Privacy Badger][5]———— 这是一个根据 GPL v.3.0 许可的网络浏览器扩展程序。根据他们的 GitHub 存储库,它是: + +> 一个可以自动学习阻止隐形的跟踪器的浏览器扩展程序。Privacy Badger 没有一个要阻止的列表,而是根据它们的行为自动发现跟踪器。 + +除了隐私之外,我的演讲还分享了安全密码的重要性。我的听众了解到了 [Bitwarden][6]。许多人不知道如何生成安全密码、区分不同网站的密码以及如何安全地存储它们。我演示了该软件如何创建密码并使用 Bitwarden 将这些密码存储在云中。我解释了用户如何通过浏览器插件、台式机和笔记本电脑应用程序以及在安卓或 iOS 移动设备上访问这些凭证。 + +### 开源通讯工具 + +本次演讲中,我谈到了通讯工具在我们生活中的无处不在,但同时它本身固有的不安全性。观众不知道 [Signal][7]。我已经使用 Signal 几年了,并经常鼓励其他人将其视为一个安全的消息传递平台。在 Linux、macOS、Windows、[安卓][9] 和 [iOS][10] 上 [安装 Signal][8] 很容易,它提供了出色的 [文档][11] 支持,对不同的操作系统都有着详细的安装说明。Signal 使用你现有的手机号码,只要它可以发送和接收短信和打电话。当你第一次在手机上设置 Signal 时,它会在你的通讯录上搜索同样使用 Signal 的联系人。 + +### 开源办公工具 + +如果不提及我最喜欢的内容创建工具 [LibreOffice][12],那么关于开源工具的介绍是不完整的。尽管它很受欢迎,但还是有许多人并不知道它的存在以及使用它所带来的自由。我每天都用它来写文章。我使用它来做表格而不是 Excel,有时我用它来做演示文稿。你可以在 Linux、macOS 和 Windows 上下载并安装它。LibreOffice 的优点之一是你真正拥有自己的文档,不需要昂贵的程序来访问它们。 + +### 开源博客软件 + +[WordPress][13] 是我最喜欢的博客引擎,你可以通过多种方式使用它,无论是分享你对世界大事的看法、为你的 [学生][14] 提供低成本写作平台,还是在网上为你的 [业务][15] 做宣传。 + +### 开源媒体库 + +在创建内容时,你需要可以轻松合法共享的图片来说明你的作品。[OpenClipart][16] 是我的首选。这里有数以千计的各种流行格式的图片,可以放在你的 LibreOffice 文档和博客文章中。此外,你可以通过 [知识共享][17]Creative Commons 找到你可以分享的图片,并注明适当的出处。知识共享提供的许可,使共享变得更容易。它是版权的延伸,让分享图片变得更容易。但请务必熟悉许可证之间的细微差别。 + +### 开源视频会议 + +疫情改变了会议和聚会的模式。正如 Chris Hermansen [此处][18] 所报告的那样,Jitsi、Big Blue Button 和其他一些软件已经彻底改变了我们互动和学习的方式。 + +### 开源教育资源 + +开放教育资源解放了学习。通过 [OER Commons][19],你可以找到满足你需求的内容,从学前班到研究生和专业学位,它是公开许可的,因此你可以使用它并与他人分享。麻省理工学院(MIT)开放课件提供了麻省理工学院几乎所有的本科生和研究生项目内容,均根据知识共享 [非商业性共享方式][20] 许可提供。[OpenStax][21] 是莱斯大学的一项开放教科书计划,提供经过同行评审的教科书,这些教科书已公开许可并免费提供。 + +### 开源播客工具 + +播客已成为了解最新 [开源新闻][22] 的好方法。你有没有想过做自己的播客?我熟悉一些很棒的开源工具能够帮你实现这一目标。[Audacity][23] 是我最喜欢的录音应用程序。我用它来翻录我的课堂教学、记录访谈和试验音效。它是一个 16 轨音频编辑器,你可以通过多种方式使用它。如果你有话要说或有技能要传授,你应该使用 [Open Broadcaster Software][24](OBS)。 + +### Linux + +最后,向你的朋友介绍 Linux,他们中的许多人仍然不了解 Linux,让他们体验所有现成的免费软件。 + +除了在 [YouTube][25] 上录制和分享的演讲外,我还编制了一份资源链接列表,并在 [GitHub][26] 上分享。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/10/open-source-tools + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl (Tools illustration) +[2]: https://www.sbu.edu/academics/schools-at-sbu/school-of-business/foster-center-for-responsible-leadership/foster-center-events +[3]: https://opensource.com/article/21/9/switch-to-firefox +[4]: https://github.com/gorhill/uBlock +[5]: https://privacybadger.org/ +[6]: https://github.com/bitwarden +[7]: https://opensource.com/article/19/10/secure-private-messaging +[8]: https://signal.org/download/ +[9]: https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms&referrer=utm_source%3DOWS%26utm_medium%3DWeb%26utm_campaign%3DNav +[10]: https://apps.apple.com/us/app/signal-private-messenger/id874139669 +[11]: https://support.signal.org/ +[12]: https://opensource.com/article/21/9/libreoffice-tips +[13]: https://opensource.com/article/18/10/setting-wordpress-raspberry-pi +[14]: https://opensource.com/article/20/4/wordpress-virtual-machine +[15]: https://opensource.com/article/21/3/wordpress-plugins-retail +[16]: https://openclipart.org/ +[17]: https://search.creativecommons.org/ +[18]: https://opensource.com/article/20/5/open-source-video-conferencing +[19]: https://www.oercommons.org/ +[20]: https://ocw.mit.edu/help/faq-cite-ocw-content/ +[21]: https://openstax.org/ +[22]: https://opensource.com/article/19/10/linux-podcasts-Jupiter-Broadcasting +[23]: https://opensource.com/article/20/4/audacity +[24]: https://opensource.com/article/20/4/open-source-live-stream +[25]: https://youtu.be/aUgaYtN_sUU +[26]: https://github.com/donwatkins/Presentations/blob/master/fostercenter.md +[0]: https://img.linux.net.cn/data/attachment/album/202303/07/153419u0nfxeogevozebfv.jpg \ No newline at end of file diff --git a/translated/tech/20211014 9 ways to use open source every day.md b/translated/tech/20211014 9 ways to use open source every day.md deleted file mode 100644 index cd78014dcf..0000000000 --- a/translated/tech/20211014 9 ways to use open source every day.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: subject: "9 ways to use open source every day" -[#]: via: "https://opensource.com/article/21/10/open-source-tools" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -每天使用开源的9种方法 -====== -你可能会惊奇地发现,那些你每天使用的工具竟是开源的。 -![工具插图][1] - -最近,我受邀介绍网络上可用的免费和开放资源。这次演讲是当地为保持我们社区的正常运转而做出的部分尝试——由我家附近的圣文德大学 [Foster Center][2] 赞助。 我分享的一些资源不是开源的且基本不用花钱,但许多工具是开源的。 - - -看到有不少人认出我所提到的工具真的很有趣。 很多人并不知道他们每天使用的工具都是开源的,并且他们还可以与他人分享。 - -### 开源浏览器 - -使用网络需要一个好的浏览器,而 [Firefox 是开源的][3],这一点很多在场的人并不清楚。 除了是开源,Firefox 还具有强烈的隐私意识,这是许多用户越来越关注的问题。 不过,有趣的是,即使是 Microsoft 的新浏览器也是基于开源 Chromium 项目的。 - -### 开源网络隐私 - -通常,保护您的隐私和改善您的网络体验的另一种方法是使用 uBlock Origin 来阻止广告。 根据他们的网站: - -> uBlock Origin 是一个免费、开源、跨平台的内容过滤浏览器扩展——主要旨在以一种高效、用户友好的方法消除隐私侵犯。 - -> 代码是 [GPL v. 3.0][4]。 - -Electronic Frontier Foundation (电子前沿基金会 EFF) 还维护 [Privacy Badger][5]———— 这是一个根据 GPL v.3.0 获得许可的网络浏览器扩展程序。 根据他们的 Github 存储库,它是: - -> 一个自动学习阻止隐形跟踪器的浏览器扩展程序。 Privacy Badger 不会保存阻止的列表,而是根据它们的行为自动发现跟踪器。 - -除了隐私之外,我的演讲还分享了安全密码的重要性。 我的听众了解到 [Bitwarden][6]。 许多人不知道如何生成安全密码、区分不同网站的密码以及如何安全地存储它们。 我演示了该软件如何创建密码并使用 Bitwarden 将这些密码存储在云中。 我解释了用户如何通过浏览器插件、台式机和笔记本电脑应用程序以及在 Android 或 iOS 移动设备上访问这些凭据。 - -### 开源通讯工具 - -本次演讲中,我谈到了通讯工具在我们生活中的无处不在,但同时它本身固有的不安全性。 观众不知道 [Signal 信号][7]。 我已经使用 Signal 几年了,并经常鼓励其他人将其视为一个安全的消息传递平台。 在 Linux、macOS、Windows、[Android][9] 和 [iOS][10] 上[安装 Signal][8] 很容易,它提供了出色的[文档][11]支持,对不同的操作系统都有着详细的安装说明。 Signal 使用您现有的手机号码,前提是它可以发送和接收短信和电话。 当您第一次在手机上设置 Signal 时,它会在您的通讯录上搜索同样使用 Signal 的联系人。 - - -### 开源办公工具 - -如果不提及我最喜欢的内容创建工具,即 [LibreOffice][12],任何关于开源工具的介绍都是不完整的。 尽管它很受欢迎,但还是有许多人并不知道它的存在以及使用它所带来的自由。 我每天都用它来写文章。 我使用它来做表格而不是 Excel,有时我用它来做演示文稿。 您可以在 Linux、macOS 和 Windows 上下载并安装它。 LibreOffice 的优点之一是您真正拥有自己的文档, 不需要昂贵的程序来访问它们。 - - -### 开源博客构建器 - -[WordPress][13] 是我最喜欢的博客引擎,您可以通过多种方式使用它,无论是分享您对世界大事的看法、为您的[学生][14] 提供低成本写作平台,还是在网上为您的[业务][15]做宣传。 - - -### 开源媒体库 - -在创建内容时,您需要可以轻松合法共享的图片来说明您的作品。 [OpenClipart][16] 是我的首选。 有数以千计的各种广为使用的格式的图像可以放在您的 LibreOffice 文档和博客文章中。 此外,您可以通过访问 [Creative Commons][17] 找到可以与合适的归属共享的图像。 Creative Commons 提供许可,使共享变得更容易。 Creative Commons 是版权的延伸,让分享图片变得更容易。 请务必熟悉许可证之间的细微差别。 - - -### 开源视频会议 - -疫情改变了会议和聚会的模式。 正如 Chris Hermansen [此处][18] 所报告的那样,Jitsi、Big Blue Button 和其他一些软件已经彻底改变了我们互动和学习的方式。 - - -### 开源教育资源 - -开放教育资源解放了学习。 通过 [OER Commons][19],您可以找到满足您需求的内容,从学前班到研究生和专业学位,它是公开许可的,因此您可以使用它并与他人分享。 麻省理工学院 (MIT) 开放课件提供了麻省理工学院几乎所有的本科生和研究生项目内容,均根据知识共享 [非商业性共享方式][20] 许可提供。 [OpenStax][21] 是莱斯大学的一项开放教科书计划,提供经过同行评审的教科书,这些教科书已公开许可并免费提供。 - - -### 开源播客工具 - -播客已成为了解最新 [开源新闻][22] 的好方法。 你有没有想过做自己的播客? 我熟悉一些很棒的开源工具能够帮你实现这一目标。 [Audacity][23] 是我最喜欢的录音应用程序。 我用它来翻转我的课堂教学、记录访谈和试验音效。 它是一个 16 轨音频编辑器,您可以通过多种方式使用它。 如果您有话要说或有技能要传授,您应该使用 [Open Broadcaster Software][24]。 - -### Linux - -最后,向您的朋友介绍他们中还有许多人不知道的 Linux,让他们体验所有现成的免费软件。 - -除了在 [YouTube][25] 上录制和分享的演讲外,我还编制了一份资源链接列表,并在 [GitHub][26] 上分享。 - -有很多非代码方式可以为开源做出贡献:这里有三种选择。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/10/open-source-tools - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl (Tools illustration) -[2]: https://www.sbu.edu/academics/schools-at-sbu/school-of-business/foster-center-for-responsible-leadership/foster-center-events -[3]: https://opensource.com/article/21/9/switch-to-firefox -[4]: https://github.com/gorhill/uBlock -[5]: https://privacybadger.org/ -[6]: https://github.com/bitwarden -[7]: https://opensource.com/article/19/10/secure-private-messaging -[8]: https://signal.org/download/ -[9]: https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms&referrer=utm_source%3DOWS%26utm_medium%3DWeb%26utm_campaign%3DNav -[10]: https://apps.apple.com/us/app/signal-private-messenger/id874139669 -[11]: https://support.signal.org/ -[12]: https://opensource.com/article/21/9/libreoffice-tips -[13]: https://opensource.com/article/18/10/setting-wordpress-raspberry-pi -[14]: https://opensource.com/article/20/4/wordpress-virtual-machine -[15]: https://opensource.com/article/21/3/wordpress-plugins-retail -[16]: https://openclipart.org/ -[17]: https://search.creativecommons.org/ -[18]: https://opensource.com/article/20/5/open-source-video-conferencing -[19]: https://www.oercommons.org/ -[20]: https://ocw.mit.edu/help/faq-cite-ocw-content/ -[21]: https://openstax.org/ -[22]: https://opensource.com/article/19/10/linux-podcasts-Jupiter-Broadcasting -[23]: https://opensource.com/article/20/4/audacity -[24]: https://opensource.com/article/20/4/open-source-live-stream -[25]: https://youtu.be/aUgaYtN_sUU -[26]: https://github.com/donwatkins/Presentations/blob/master/fostercenter.md From 82cee055bd464ada5257782e38f1556f96d1e5be Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 8 Mar 2023 08:38:51 +0800 Subject: [PATCH 016/318] translated --- ...istributed computing with Raspberry Pi clusters.md | 66 ------------------- ...istributed computing with Raspberry Pi clusters.md | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 sources/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md create mode 100644 translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md diff --git a/sources/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md b/sources/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md deleted file mode 100644 index 0bc1ac60d5..0000000000 --- a/sources/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: subject: "Parallel and distributed computing with Raspberry Pi clusters" -[#]: via: "https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters" -[#]: author: "Peter Cheer https://opensource.com/users/visimpscot2" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Parallel and distributed computing with Raspberry Pi clusters -====== - -Since the Raspberry Pi's launch, creators have based countless computer science education projects on the humble pocket-sized system on a chip. These have included many projects exploring low-cost Raspberry Pi clusters to introduce parallel and distributed computing (PDC) concepts. - -The UK Open University (OU) provides distance education to students of diverse ages, experiences, and backgrounds, which raises some issues not faced in more traditional universities. The OU experiment using Raspberry Pi clusters to introduce PDC concepts to distance learning students began in 2019 and has been featured in an [academic paper][1] but deserves to be known more widely. - -The project uses Raspberry Pi clusters based on the [OctaPi instructions][2], released under a Creative Commons Licence by GCHQ. Eight Raspberry Pis are connected in a private network using a router and a switch. One of the Raspberry Pis acts as the lead, while the others are servers providing results back to the lead device. Programs written in Python run on the lead Pi, and the `dispy` package distributes activities across cores in the cluster. - -Three programs have been developed for the clusters, and you can download them from the [Git repository][3]. - -Two of the programs are text-based and linked to search problems: The traveling salesperson and password hashing. As complete search problems, these are ideal for teaching PDC concepts. The third program is graphical. The image combiner takes three images as input, with non-overlapping obstructions. It constructs an image without any obstructions by comparing the RGBA values pixel-by-pixel across the three images and selecting the median. - -### Using the cluster - -The Open University is a distance learning institution, so students access the clusters through a web interface. Remote access to the clusters uses the OpenSTEM Labs infrastructure at the university. Ten clusters (eight built with Pi 4, two built with Pi 3B+) are installed into racks, with webcams pointed at each cluster. - -The students select which program to run, the number of cores to use, and the parameters for the selected program. As output, they see the time the program takes to run on an individual Raspberry Pi compared to the cluster using the number of cores selected. The student also sees the output from the program, either the password hashing result, the minimal and maximal traveling salesperson route, or the non-occluded image. - -![Generating a fourth image from information in three images][4] - -A webcam shows a live stream of the cluster. The lead Pi has an LED display to show the program's state as it runs. The webcam makes it clear to students that they are experimenting with real dedicated hardware rather than getting simulated or pre-recorded results. - -![Raspberry Pi cluster][5] - -Each program has two activities associated with it, illustrating different aspects of program design and PDC operations. One of the main learning points is that PDC computing can provide significant performance advantages but at a cost in the time and resources taken to divide and distribute a problem and, in reverse, to recombine the results. The second learning point is that efficiency is significantly affected by the program design. - -### Students like it - -Currently, the use of the Raspberry Pi clusters is optional. Based on the findings so far, though, students enjoy it and are motivated by having remote access to physical hardware. - -One student has said, "It was really interesting to be able to use real clusters instead of having it virtualized." - -Another adds, "It was really exciting to be able to actually see a cluster working and see the real effects of working with multiple cores. It was great to be able to try this out for myself, not just to read the theory about it!" - -Students are using the clusters to undertake learning activities designed to teach the principles of PDC rather than writing and running their own programs. The experience of developing a low-cost Raspberry Pi cluster for use with open-distance university students demonstrates the benefits remote practical activities can have for teaching PDC concepts and engaging students. - -When I asked Daniel Gooch, one of the team members behind the project, about it, he said: "For me, where we differ is that we've taken an existing set of Raspberry Pi instructions and worked on integrating in additional wrap-around material to ensure it can cope with the distance and scale we operate on." - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters - -作者:[Peter Cheer][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/visimpscot2 -[b]: https://github.com/lkxed/ -[1]: https://doi.org/10.1080/02680513.2022.2118573 -[2]: https://projects.raspberrypi.org/en/projects/build-an-octapi -[3]: https://github.com/dg7692/TM129 -[4]: https://opensource.com/sites/default/files/2023-02/image-project.png -[5]: https://opensource.com/sites/default/files/2023-02/cluster.png \ No newline at end of file diff --git a/translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md b/translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md new file mode 100644 index 0000000000..303684daba --- /dev/null +++ b/translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md @@ -0,0 +1,66 @@ +[#]: subject: "Parallel and distributed computing with Raspberry Pi clusters" +[#]: via: "https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters" +[#]: author: "Peter Cheer https://opensource.com/users/visimpscot2" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用树莓派集群进行并行和分布式计算 +====== + +自从树莓派推出以来,创造者们已经在这个简陋的袖珍芯片系统上开展了无数的计算机科学教育项目。其中包括许多探索低成本树莓派集群的项目,以介绍并行和分布式计算(PDC)概念。 + +英国开放大学(OU)为不同年龄、经历和背景的学生提供远程教育,这就提出了一些在更传统的大学中没有面临的问题。开放大学使用树莓派集群向远程教育学生介绍 PDC 概念的实验始于 2019 年,并在一篇[学术论文][1]中进行了介绍,但值得更广泛地了解。 + +该项目使用基于 [OctaPi 指令][2]的树莓派集群,该指令由 GCHQ 在知识共享许可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当领导,而其他的是服务器,将结果反馈给领导设备。用 Python 编写的程序在领头,而其他的是服务器,将结果反馈给可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当领导,而其他的是服务器,将结果反馈给领导设备。用 Python 编写的程序在领头设备。用 Python 编写的程序在领头的树莓派上运行,`dispy` 包将活动分布在集群的各个核心上。 + +已经为集群开发了三个程序,你可以从 [Git 仓库][3]下载它们。 + +其中两个程序是基于文本的,并与搜索问题有关:旅行推销员和密码散列。作为完整的搜索问题,这些是教授 PDC 概念的理想选择。第三个程序是图形化的。图像组合器将三幅图像作为输入,其中有不重叠的障碍物。它通过对三幅图像的 RGBA 值进行逐个像素的比较并选择中位数来构建一个没有任何障碍物的图像。 + +### 使用集群 + +开放大学是一个远程学习机构,所以学生通过网络界面访问集群。对集群的远程访问使用大学的 OpenSTEM 实验室的基础设施。10 个集群(8 个用树莓派 4 构建,2 个用树莓派 3B+ 建造)被安装在机架上,用网络摄像头对准每个集群。 + +学生们选择要运行的程序,使用的核心数量,以及所选程序的参数。作为输出,他们可以看到该程序在单个树莓派上运行的时间与使用所选核数的集群的时间相比。学生还可以看到程序的输出,要么是密码散列结果,要么是最小和最大的旅行推销员路线,或未遮挡的图像。。 + +![Generating a fourth image from information in three images][4] + +网络摄像头显示了集群的实时流。领头的树莓派有一个 LED 显示屏,显示程序运行时的状态。网络摄像头让学生清楚地知道,他们是在用真正的专用硬件做实验,而不是得到模拟的或预先录制的结果。 + +![Raspberry Pi cluster][5] + +每个程序都有两个与之相关的活动,说明了程序设计和 PDC 操作的不同方面。其中一个主要的学习点是,PDC 计算可以提供显著的性能优势,但代价是划分和分配问题以及反过来重新组合结果所花费的时间和资源。第二个学习点是,效率受程序设计的影响很大。 + +### 学生喜欢 + +目前,树莓派集群的使用是可选的。不过根据目前的研究结果,学生们很喜欢它,并因能远程接触到物理硬件而受到激励。 + +一位学生说:“能够使用真正的集群,而不是让它虚拟化,这真的很有趣”。 + +另一名学生补充说:“能够真正看到集群的工作,看到多核工作的真实效果,这真的很令人兴奋。能够亲自尝试,而不仅仅是阅读有关理论,这真是太好了!” + +学生们正在使用集群开展旨在教授 PDC 原理的学习活动,而不是编写和运行他们自己的程序。开发低成本的树莓派集群供远程大学学生使用的经验表明,远程实践活动对教授 PDC 概念和吸引学生有好处。 + +当我向该项目背后的团队成员之一 Daniel Gooch 询问时,他说:"对我来说,我们的不同之处在于,我们采用了一套现有的树莓派指令,并致力于整合额外的环绕材料,以确保它能够应对我们操作的距离和规模。" + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters + +作者:[Peter Cheer][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/visimpscot2 +[b]: https://github.com/lkxed/ +[1]: https://doi.org/10.1080/02680513.2022.2118573 +[2]: https://projects.raspberrypi.org/en/projects/build-an-octapi +[3]: https://github.com/dg7692/TM129 +[4]: https://opensource.com/sites/default/files/2023-02/image-project.png +[5]: https://opensource.com/sites/default/files/2023-02/cluster.png \ No newline at end of file From 92a77a995059709b0b6aab315e23667aa9f8d361 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 8 Mar 2023 08:43:39 +0800 Subject: [PATCH 017/318] translating --- ...230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md b/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md index 7439b28ab1..9d95cccba3 100644 --- a/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md +++ b/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/raspberry-pi-streaming-server" [#]: author: "Sven Erbeck https://opensource.com/users/erbeck" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7d17c87a0798694da9e02219209cad896dc30cea Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Mar 2023 15:02:20 +0800 Subject: [PATCH 018/318] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi https://linux.cn/article-15606-1.html @lkxed 请继续选题后继文章~ --- ...OS Series 1 Why Should You Consider Using NixOS.md | 77 ++++++++++--------- 1 file changed, 40 insertions(+), 37 deletions(-) rename {translated/tech => published}/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md (60%) diff --git a/translated/tech/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md b/published/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md similarity index 60% rename from translated/tech/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md rename to published/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md index cea2a60d1e..e0e0db9ea5 100644 --- a/translated/tech/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md +++ b/published/20230222.0 ⭐️⭐️ NixOS Series 1 Why Should You Consider Using NixOS.md @@ -3,30 +3,32 @@ [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15606-1.html" NixOS 系列 #1:你为什么要考虑使用 NixOS? ====== -NixOS... 又是一个使用不同软件包管理器的发行版?**🤯** +![][0] -好吧,NixOS 是[高级 Linux 发行版][1]中的一个。 +NixOS……又一个使用不同软件包管理器的发行版?🤯 -所以如果我写这个,我一定有一个充分的理由,对吗?嗯,有很多 +好吧,NixOS 是 [高级 Linux 发行版][1] 之一。 + +所以如果我写这个,我一定有一个充分的理由,对吗?嗯,有很多! 我已经使用它 3 个月了,它是如此之好,以至于我正在考虑从我一直以来最喜欢的 **Pop!_OS 切换到 NixOS**。 -在本指南中,我将分享 NixOS 在众多 Linux 发行版中脱颖而出的主要特点,。 +在本指南中,我将分享 NixOS 在众多 Linux 发行版中脱颖而出的主要特点。 -别担心,在我们继续之前,让我告诉你什么是NixOS: +别担心,在我们继续之前,让我告诉你什么是 NixOS: -> 它是一个以 Nix 包管理器为核心的 Linux 发行版,为你省去了在不同 Linux 发行版上设置的麻烦,让你充分利用 Nix 的优势。由开发 Nix 的同一个团队构建。 +> 它是一个以 Nix 包管理器为核心的 Linux 发行版,为你省去了在其它的 Linux 发行版上设置 Nix 的麻烦,可以让你充分利用它的优势。由开发 Nix 的同一个团队构建。 ### 使用 NixOS 的 6 个理由 -NixOS 是一个有趣的从零开始构建的[独立 Linux 发行版][2]。 +NixOS 是一个有趣的从零开始构建的 [独立 Linux 发行版][2]。 每个人都可以通过使用 NixOS 学到很多东西,但**在我看来**,如果你是一个开发人员或计算机科学的学生,NixOS 应该非常合适。 @@ -34,7 +36,7 @@ NixOS 是一个有趣的从零开始构建的[独立 Linux 发行版][2]。 让我告诉你为什么。 -#### 1. 不易损坏/易于恢复 +#### 1、不易损坏/易于恢复 就其核心而言,NixOS 是为长期使用而构建的。 @@ -42,25 +44,25 @@ NixOS 是一个有趣的从零开始构建的[独立 Linux 发行版][2]。 为了理解 NixOS 为何如此稳定,让我们谈谈用户一般是如何破坏他们的系统的,即“_依赖性问题或软件包冲突_” -在更新系统或安装一个新的软件包时,你一般会面临明显的系统崩溃。主要是因为你的软件包管理器无法满足依赖性,或者安装的软件包与现有系统冲突。 +在更新系统或安装一个新的软件包时,你一般会面临系统崩溃的风险。主要是因为你的软件包管理器无法满足依赖性,或者安装的软件包与现有系统冲突导致的。 -**而 NixOS 有一个非常聪明的方法来处理这个问题**。 +**而 NixOS 有一个非常聪明的方法来处理这个问题。** -你看,每当你升级你的系统或安装一个软件包时,**系统的状态就会被重建**,被称为“**新的一代**”,超过当前的。 +你看,每当你升级你的系统或安装一个软件包时,**系统的状态就会被重建**,被称为超过当前的“新世代new generation”。 ![nix os listing generations via terminal][4] -因此,如果你在使用新的软件包或更新时遇到任何麻烦,你可以随时回滚到旧的一代,在那里你会找到**系统的以前的状态**。 +因此,如果你在使用新的软件包或更新时遇到任何麻烦,你可以随时回滚到“旧世代old generation”,在那里你会找到**系统以前的状态**。 -即使系统无法访问,你也能在启动时找到以前的几代包。 +即使系统无法访问,你也能在启动时找到以前几代。 -#### 2. 可重复性 +#### 2、可重复性 通过一个配置文件,你可以为其他物理系统创建一个你当前环境的副本。 -为了从这个功能中获益,你可以使用 Nix 配置文件进行安装和配置。 +这个功能给你带来的好处是,你可以使用 Nix 配置文件进行安装和配置。 -当你有了适合你的目的的配置文件,将该文件发送到新的安装中,用你的配置文件替换默认的配置文件。就是这么简单! +当你有了适合你的用途的配置文件,将该文件发送到新的系统中,用你的配置文件替换默认的配置文件。就是这么简单! **重建配置,升级系统,并通过给定的命令进行切换:** @@ -70,15 +72,15 @@ sudo nixos-rebuild switch --upgrade 你将在几分钟内拥有与你的主机上完全相同的开发环境,并进行复制。 -#### 3. 轻松回滚 +#### 3、轻松回滚 -虽然你可能已经从 NixOS 的 “**Generations**” 特性中得到了灵感。 +虽然你可能已经从 NixOS 的 “世代generation” 特性中得到了灵感。 -这还有更多的内容。**🕵️** +但还有更多的内容。🕵️ NixOS 在很大程度上依赖于符号链接。如果这对你来说是一个新概念,请参考下面的指南: -[如何在Linux中创建符号链接(完整指南)][5] +> **[如何在 Linux 中创建符号链接(完整指南)][5]** 一般来说,在其他 Linux 发行版中,当你升级一个软件包时,新的软件包会取代旧的。 @@ -88,41 +90,41 @@ NixOS 在很大程度上依赖于符号链接。如果这对你来说是一个 每当你升级一个软件包时,**NixOS 会调整符号链接来定位新的软件包,但不会删除旧的**。 -因此,如果你面临与新包的冲突,只需切换到旧的一代,符号链接有助于定位旧版本的包。😌 +因此,如果你面临与新包的冲突,只需切换到旧世代,符号链接有助于定位旧版本的包。😌 -#### 4. Nix 包管理器 +#### 4、Nix 包管理器 -Nix 包管理器允许你访问超过 80,000 个软件包! 不仅仅局限于 Linux,它还可以在 **macOS、WSL2、Docker 等平台**上使用。 +Nix 包管理器允许你访问超过 80,000 个软件包!不仅仅局限于 Linux,它还可以在 **macOS、WSL2、Docker 等平台**上使用。 -而且,软件包的可用性与 AUR 相似,甚至比 AUR 更好,因为你应该在 Nix 包管理器上找到几乎所有的东西(我的认真的)。 +而且,软件包的可用性与 AUR 相似,甚至比 AUR 更好,因为你应该在 Nix 包管理器上找到几乎所有的东西(我是认真的)。 例如,我想安装 Librewolf 浏览器,这在大多数 Linux 发行版的默认仓库中是不可用的。 -但是,Nix 有它! 这意味着你可以依靠 Nix 包管理器来安装几乎所有的软件包。 +但是,Nix 有它!这意味着你可以依靠 Nix 包管理器来安装几乎所有的软件包。 如果你有先前的 Linux 经验,它也相对容易理解。总而言之,**Nix 包管理器令人印象深刻**! -#### 5. 使用同一软件包的多个版本 +#### 5、使用同一软件包的多个版本 这对开发者来说可能是至关重要的,有些应用需要特定依赖的旧版本,而有些则需要最新的版本。 -而且,正如我前面提到的,nix将包安装到一个特定的子目录中,每个包都是隔离的,所以一个包不会干扰另一个包! +而且,正如我前面提到的,Nix 将包安装到一个特定的子目录中,每个包都是隔离的,所以一个包不会干扰另一个包! 在使用 Nix 之前,我使用虚拟机和容器来满足同一软件包的不同依赖性,尤其是 PHP,但 NixOS 为我的工作流程带来了奇迹。 -#### 6. 无需安装就能测试软件包的能力 +#### 6、无需安装就能测试软件包的能力 -你可以使用 [nix-shell][9],它将临时修改 $PATH 环境变量,用来临时测试一个包。 +你可以使用 [nix-shell][9],它通过临时修改 `$PATH` 环境变量来测试一个包。 -而且没有任何限制。你被允许测试每一个可供安装的软件包! +而且没有任何限制。你能够测试每一个可供安装的软件包! ### NixOS 系列:让我们探索更多! 这是我们 Nix 系列的第一部分,我介绍了使用 NixOS 的原因。我相信更多的 Linux 用户应该去了解它,如果他们还没有了解的话。 -在下一部分,我将解释如何在你的虚拟机中安装 NixOS。敬请关注我们的社交媒体或 RSS 订阅,以便在我们发布时阅读。 +在下一部分,我将解释如何在你的虚拟机中安装 NixOS。 -💬 _欢迎在下面的评论中分享关于 NixOS 的其他内容的建议。_ +💬 欢迎在下面的评论中分享关于 NixOS 的其他内容的建议。 -------------------------------------------------------------------------------- @@ -131,7 +133,7 @@ via: https://itsfoss.com/why-use-nixos/ 作者:[Sagar Sharma][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/) 荣誉推出 @@ -142,4 +144,5 @@ via: https://itsfoss.com/why-use-nixos/ [3]: https://itsfoss.com/content/images/2023/02/nix-os-gnome.png [4]: https://itsfoss.com/content/images/2023/02/nix-os-generations.png [5]: https://linuxhandbook.com/symbolic-link-linux/ -[9]: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html \ No newline at end of file +[9]: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html +[0]: https://img.linux.net.cn/data/attachment/album/202303/08/150044jhtdyahoax5ghbxn.jpg \ No newline at end of file From 45775a1144edcdf3d79ef66b80c589251e02307d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Mar 2023 15:27:48 +0800 Subject: [PATCH 019/318] RP @geekpi https://linux.cn/article-15607-1.html --- ... Wordsmith on the Linux command line with dict.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename {translated/tech => published}/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md (85%) diff --git a/translated/tech/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md b/published/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md similarity index 85% rename from translated/tech/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md rename to published/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md index c9c30650da..349301908e 100644 --- a/translated/tech/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md +++ b/published/20230206.1 ⭐️⭐️ Wordsmith on the Linux command line with dict.md @@ -3,20 +3,24 @@ [#]: author: "David Both https://opensource.com/users/dboth" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15607-1.html" 在 Linux 命令行上使用 dict 文字工具 ====== +![][0] + +> Linux 上的 dict 命令对作家来说非常有用,可以为他们的选词提供大量的字典和同义词。 + 作为一个作家,我经常需要确定单词的正确拼写或定义。我还需要使用词库来寻找替代词,这些词的内涵可能与我可能使用的词有些不同。因为我经常使用 Linux 命令行和文本模式工具来完成我的大部分工作,所以使用命令行词典是有意义的。 我非常喜欢使用命令行,原因有很多,其中最主要的原因是它对我来说更有效率。它也比任何一本或多本实体纸质字典,都要全面得多。我使用 Linux 的 `dict` 命令已经很多年了,我已经开始依赖它了。 ### 在 Linux 上安装 dict -dict 程序在 Fedora 上没有默认安装,但它很容易安装。以下是如何在 Fedora 或类似发行版上安装: +`dict` 程序在 Fedora 上没有默认安装,但它很容易安装。以下是如何在 Fedora 或类似发行版上安装: ``` $ sudo dnf install dictd @@ -24,12 +28,11 @@ $ sudo dnf install dictd 在 Debian 和类似发行版上,你还必须安装字典定义: - ``` $ sudo apt install dictd dict-gcide ``` -不需要额外的配置。最简单的 `/usr/share/doc/dictd/dict1.conf` 文件指定了字典数据库的远程服务器。这个工具使用字典服务器协议(DICT),端口为 2628。 +不需要额外的配置。这个非常简单的 `/usr/share/doc/dictd/dict1.conf` 文件指定了字典数据库的远程服务器。这个工具使用字典服务器协议(DICT),端口为 2628。 ### 在 Linux 上使用 dict @@ -105,7 +108,7 @@ $ dict "air gapped" ### 字典 -`dict` 命令使用一些在线字典,包括法律和技术字典。许多语言的字典也是可用的。你可以`列出`可用的字典数据库,如下面所示: +`dict` 命令使用一些在线字典,包括法律和技术字典。许多语言的字典也是可用的。你可以“列出”可用的字典数据库,如下面所示: ``` $ dict -D | less @@ -143,7 +146,7 @@ $ dict -d gcide 有时使用词库中的词汇并不是最好的写作方法,因为它可能会混淆你的意思。但我确实发现 `dict` 命令在为特定的意思选择最好的词方面有极大的帮助。它还能确保我使用的单词拼写正确。 -关于 dict 的信息很匮乏。 这个 URL [http://www.dict.org/][1] 只提供了一个基于网络的字典界面。手册页涵盖了语法。但是这个命令是一个有用的、有趣的命令,可以随身携带。我承认在发现 `dict` 命令后,我花了很多时间尝试不同的东西,看看结果会是什么。我就是那个读百科全书和字典的孩子。是的,我是_那个_孩子。除了在写作或阅读时是一个有用的工具外,dict 也可以是一个有趣的工具来满足一下好奇心。 +关于 dict 的信息很匮乏。 这个 URL [http://www.dict.org/][1] 只提供了一个基于网络的字典界面。手册页涵盖了语法。但是这个命令是一个有用的、有趣的命令,可以随身携带。我承认在发现 `dict` 命令后,我花了很多时间尝试不同的东西,看看结果会是什么。我就是那个通读百科全书和字典的孩子。是的,我是_那个_孩子。除了在写作或阅读时是一个有用的工具外,`dict` 也可以是一个有趣的工具来满足一下好奇心。 -------------------------------------------------------------------------------- @@ -152,11 +155,11 @@ via: https://opensource.com/article/23/2/linux-dict-command 作者:[David Both][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/dboth [b]: https://github.com/lkxed [1]: http://www.dict.org/ - +[0]: https://img.linux.net.cn/data/attachment/album/202303/08/152653jojqqmv7x7wxzox7.jpg \ No newline at end of file From 2d7b051787119897ce69e972434669d5eb15b4eb Mon Sep 17 00:00:00 2001 From: toknow-gh Date: Thu, 9 Mar 2023 00:28:03 +0800 Subject: [PATCH 020/318] Translating sources/tech/20210204 How to implement business requirements in software development.md --- ...o implement business requirements in software development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210204 How to implement business requirements in software development.md b/sources/tech/20210204 How to implement business requirements in software development.md index 38845d0cb4..c3a49e052a 100644 --- a/sources/tech/20210204 How to implement business requirements in software development.md +++ b/sources/tech/20210204 How to implement business requirements in software development.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (toknow-gh) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From bc65f4013fab63e1fc4104e3c63186f1efa5e2c0 Mon Sep 17 00:00:00 2001 From: toknow-gh Date: Thu, 9 Mar 2023 00:31:44 +0800 Subject: [PATCH 021/318] Translating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210205.0 ⭐️⭐️ Why simplicity is critical to delivering sturdy applications.md --- ...️ Why simplicity is critical to delivering sturdy applications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210205.0 ⭐️⭐️ Why simplicity is critical to delivering sturdy applications.md b/sources/tech/20210205.0 ⭐️⭐️ Why simplicity is critical to delivering sturdy applications.md index 0caa009171..ac4433957f 100644 --- a/sources/tech/20210205.0 ⭐️⭐️ Why simplicity is critical to delivering sturdy applications.md +++ b/sources/tech/20210205.0 ⭐️⭐️ Why simplicity is critical to delivering sturdy applications.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/2/simplicity" [#]: author: "Alex Bunardzic https://opensource.com/users/alex-bunardzic" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "toknow-gh" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3e2558089de58a4af9b30899581aad38e51ded3d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Mar 2023 08:41:23 +0800 Subject: [PATCH 022/318] translated --- ...inimal Opportunity to Build Your Own Distro.md | 109 ------------------ ...inimal Opportunity to Build Your Own Distro.md | 109 ++++++++++++++++++ 2 files changed, 109 insertions(+), 109 deletions(-) delete mode 100644 sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md create mode 100644 translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md diff --git a/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md b/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md deleted file mode 100644 index be26a39ffa..0000000000 --- a/sources/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md +++ /dev/null @@ -1,109 +0,0 @@ -[#]: subject: "Xubuntu Minimal: Opportunity to Build Your Own Distro" -[#]: via: "https://www.debugpoint.com/xubuntu-minimal/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Xubuntu Minimal: Opportunity to Build Your Own Distro -====== - -**Xubuntu team introduces a minimal ISO with few components from the 23.04 releases onwards. Here are all the details.** - -![][1] - -A few days back, Canonical [announced][2] that an official minimal ISO installation file for the Ubuntu 23.04 “Lunar Lobster” release is in the works. While the image is not yet available as of publishing this, the Xubuntu team managed to work out their own minimal ISO installation image. - -Xubuntu is used by millions of people and has been a baseline for many other distributions. For some users, the default installation may come with too many pre-installed packages and features, leading to a bloated system that can slow down the computer’s performance. That’s where Xubuntu minimal install comes into play. In this article, we will take a hands-on approach to installing and explore the features of Ubuntu minimal. - -Let’s look at what you get in the minimal Xubuntu installation and a comparison with the regular desktop installer. - -### Xubuntu minimal install - -The first obvious difference is the ISO image size of the minimal installation with the standard desktop installer. It’s around 39% less in size. - -| minimal | standard | -| Desktop installer (ISO) size | 1.7 GB | 2.8 GB | - -While installing Xubuntu using the minimal install, you won’t get the option of “minimal install” in Ubiquity. And rest of the installation steps are the same—no such difference. - -However, the main difference is in the installed system. The minimal install takes only 7.2 GB of disk space compared to the standard installation of the same version, which is 11 GB. - -| minimal | standard | -| Disk space used | 7.2 GB | 11 GB | - -Because many applications are stripped off. - -![Xubuntu minimal and standard install - comparison][3] - -In the minimal installation of Xubuntu, you get the following: - -- Terminal -- File manager -- All settings apps -- Synaptic package manager -- Screenshot app - -That’s it. - -If you compare this to the standard version, you won’t have the following applications: - -- Firefox web browser -- Thunderbird email client -- Media players (audio and video) -- LibreOffice suite -- Transmission torrent client -- GNOME Software -- Games -- Gigolo remote connection client -- Disk usage tool - -### Snap packages on Minimal Xubuntu - -To my surprise, Xubuntu minimal doesn’t have Snap installed! Not even the snap daemon. And no Flatpak, either. - -So, effectively you get a Snap-free Xubuntu system with a core Ubuntu base. - -![Look - no snap][4] - -But I am not sure the main Ubuntu minimal ISO will have the same. I guess we need to wait and see. - -### What’s next? - -So, now you have an elementary Xubuntu desktop. Using the Synaptic package manager, you can start building and installing your favourite applications. - -For example, you might [set up Flatpak][5] and start with a basic browser, media player, LibreOffice, etc. - -If you are a developer, you can install Visual Studio code or some IDEs. - -With this version as a baseline, you can build any distribution for your workflow. - -### Conclusion - -Xubuntu minimal Install is an excellent choice for users who want complete control over what is installed on their system and prefer a faster and more efficient Ubuntu-based distro. - -Xfce’s customizability, lightweight nature, and package management using synaptic make it an ideal choice for any custom build. - -You can download the minimal ISO from this [page][6]. Remember, it is not yet officially released and it’s a daily build copy. So use it with **caution**. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/xubuntu-minimal/ - -作者:[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/2023/03/xubuntu1.jpg -[2]: https://debugpointnews.com/ubuntu-mini-iso-announcement/ -[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/Look-no-snap.jpg -[5]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ -[6]: https://cdimage.ubuntu.com/xubuntu/daily-live/current/ \ No newline at end of file diff --git a/translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md b/translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md new file mode 100644 index 0000000000..9d4392a1a5 --- /dev/null +++ b/translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md @@ -0,0 +1,109 @@ +[#]: subject: "Xubuntu Minimal: Opportunity to Build Your Own Distro" +[#]: via: "https://www.debugpoint.com/xubuntu-minimal/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Xubuntu Minimal:建立你自己的发行版的机会 +====== + +**Xubunt 团队从 23.04 版本开始推出了一个包含少量组件的最小 ISO。以下是所有的细节**。 + +![][1] + +几天前,Canonical [宣布][2],Ubuntu 23.04 “Lunar Lobster” 版本的官方最小 ISO 安装文件正在制作中。虽然截至发稿时,该镜像还没有出现,但 Xubuntu 团队设法解决了他们自己的最小 ISO 安装镜像。 + +Xubuntu 被数百万人使用,并且一直是许多其他发行版的基线。对于一些用户来说,默认安装可能带有太多的预装包和功能,导致一个臃肿的系统,会降低计算机的性能。这就是 Xubuntu 最小化安装发挥作用的地方。在这篇文章中,我们将采取实践的方式来安装和探索 Ubuntu minimal 的功能。 + +让我们看看你在 Xubuntu 最小化安装中得到了什么,以及与普通桌面安装程序的比较。 + +### Xubuntu 最小化安装 + +第一个明显的区别是最小安装与标准桌面安装程序的 ISO 镜像大小。它的大小大约减少了 39%。 + +| | 最小化 | 标准版 | +| 桌面安装程序(ISO)大小 | 1.7 GB | 2.8 GB | + +在使用最小安装程序安装 Xubuntu 时,你不会在 Ubiquity 中看到“最小化安装”的选项。其余的安装步骤都是一样的,没有区别。 + +然而,主要的区别是在安装的系统上。最小安装只需要 7.2GB 的磁盘空间,而同一版本的标准安装则需要 11GB。 + +| | 最小化 | 标准版 | +| 磁盘使用空间 | 7.2 GB | 11 GB | + +因为许多应用程序被剥离了。 + +![Xubuntu最小和标准安装比较][3] + +在 Xubuntu 的最小安装中,你会得到以下东西: + +- 终端 +- 文件管理器 +- 所有的设置应用 +- Synaptic 包管理器 +- 屏幕截图应用 + +就这些了。 + +如果你把它与标准版相比,你就不会有以下的应用: + +- Firefox 浏览器 +- Thunderbird 邮件客户端 +- 媒体播放器(音频和视频) +- LibreOffice 套件 +- Transmission torrent 客户端 +- GNOME 软件 +- 游戏 +- Gigolo 远程连接客户端 +- 磁盘使用工具 + +### 最小 Xubuntu 上的 Snap 包 + +令我惊讶的是,Xubuntu 最小版本没有安装 Snap!甚至连 snap 守护程序都没有。而且也没有 Flatpak。 + +所以,实际上你得到的是一个没有 Snap 的 Xubuntu 系统,但有一个核心的 Ubuntu 基础。 + +![看,没有snap][4] + +但我不确定主 Ubuntu 的最小 ISO 会有同样的情况。我想我们需要等待和观察。 + +### 接下来是什么? + +所以,现在你有了一个初级的 Xubuntu 桌面。使用 Synaptic 包管理器,你可以开始构建和安装你喜欢的应用。 + +例如,你可以[设置 Flatpak][5]并从一个基本的浏览器、媒体播放器、LibreOffice 等开始。 + +如果你是一个开发者,你可以安装 Visual Studio Code 或一些 IDE。 + +以这个版本为基线,你可以为你的工作流程建立任何发行版。 + +### 总结 + +Xubuntu 最小化安装对于那些想要完全控制他们系统上安装的东西,并且喜欢更快、更有效的基于 Ubuntu 的发行版的用户来说是一个很好的选择。 + +Xfce 的可定制性、轻量级特性和使用 synaptic 的包管理使它成为任何定制构建的理想选择。 + +你可以从这个[页面][6]下载最小的 ISO。记住,它还没有正式发布,而且是一个日常构建的副本。所以使用它要**谨慎**。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/xubuntu-minimal/ + +作者:[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/wp-content/uploads/2023/03/xubuntu1.jpg +[2]: https://debugpointnews.com/ubuntu-mini-iso-announcement/ +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/Look-no-snap.jpg +[5]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[6]: https://cdimage.ubuntu.com/xubuntu/daily-live/current/ \ No newline at end of file From 72ff8e60dde61a0081080ce5598c68f34daee56e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Mar 2023 08:46:39 +0800 Subject: [PATCH 023/318] translating --- ...⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md b/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md index 38d3d76454..824905ed0d 100644 --- a/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md +++ b/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/install-nixos-vm/" [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f7656ad4247911c6d5c20f1dd87bab89cab67962 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Mar 2023 10:32:26 +0800 Subject: [PATCH 024/318] RP @geekpi https://linux.cn/article-15609-1.html --- ...istributed computing with Raspberry Pi clusters.md | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) rename {translated/tech => published}/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md (55%) diff --git a/translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md b/published/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md similarity index 55% rename from translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md rename to published/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md index 303684daba..34623cdd51 100644 --- a/translated/tech/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md +++ b/published/20230302.0 ⭐️⭐️ Parallel and distributed computing with Raspberry Pi clusters.md @@ -3,36 +3,40 @@ [#]: author: "Peter Cheer https://opensource.com/users/visimpscot2" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15609-1.html" 用树莓派集群进行并行和分布式计算 ====== -自从树莓派推出以来,创造者们已经在这个简陋的袖珍芯片系统上开展了无数的计算机科学教育项目。其中包括许多探索低成本树莓派集群的项目,以介绍并行和分布式计算(PDC)概念。 +![][0] -英国开放大学(OU)为不同年龄、经历和背景的学生提供远程教育,这就提出了一些在更传统的大学中没有面临的问题。开放大学使用树莓派集群向远程教育学生介绍 PDC 概念的实验始于 2019 年,并在一篇[学术论文][1]中进行了介绍,但值得更广泛地了解。 +> 这个使用树莓派集群的学术实验向远程教育学生介绍了并行和分布式计算(PDC)的概念。 -该项目使用基于 [OctaPi 指令][2]的树莓派集群,该指令由 GCHQ 在知识共享许可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当领导,而其他的是服务器,将结果反馈给领导设备。用 Python 编写的程序在领头,而其他的是服务器,将结果反馈给可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当领导,而其他的是服务器,将结果反馈给领导设备。用 Python 编写的程序在领头设备。用 Python 编写的程序在领头的树莓派上运行,`dispy` 包将活动分布在集群的各个核心上。 +自从树莓派推出以来,创造者们已经在这个简陋的袖珍芯片系统上开展了无数的计算机科学教育项目。其中包括许多探索低成本树莓派集群的项目,以介绍 并行和分布式计算Parallel and Distributed Computing(PDC)概念。 -已经为集群开发了三个程序,你可以从 [Git 仓库][3]下载它们。 +英国 开放大学Open University(OU)为不同年龄、经历和背景的学生提供远程教育,这就提出了一些在更传统的大学中没有面临的问题。开放大学使用树莓派集群向远程教育学生介绍 PDC 概念的实验始于 2019 年,并在一篇 [学术论文][1] 中进行了介绍,但值得更广泛地了解。 + +该项目使用基于 [OctaPi 教程][2] 的树莓派集群,该指令由 GCHQ 在知识共享许可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当主控,而其他的是服务器,将结果反馈给主控设备。用 Python 编写的程序运行在主控树莓派,而 `dispy` 包将活动分发在集群的各个处理核心上。 + +他们为该集群开发了三个程序,你可以从 [Git 仓库][3] 下载它们。 其中两个程序是基于文本的,并与搜索问题有关:旅行推销员和密码散列。作为完整的搜索问题,这些是教授 PDC 概念的理想选择。第三个程序是图形化的。图像组合器将三幅图像作为输入,其中有不重叠的障碍物。它通过对三幅图像的 RGBA 值进行逐个像素的比较并选择中位数来构建一个没有任何障碍物的图像。 ### 使用集群 -开放大学是一个远程学习机构,所以学生通过网络界面访问集群。对集群的远程访问使用大学的 OpenSTEM 实验室的基础设施。10 个集群(8 个用树莓派 4 构建,2 个用树莓派 3B+ 建造)被安装在机架上,用网络摄像头对准每个集群。 +开放大学是一个远程学习机构,所以学生通过网页界面访问集群。对集群的远程访问使用大学的 OpenSTEM 实验室的基础设施。10 个集群(8 个用树莓派 4 构建,2 个用树莓派 3B+ 建造)被安装在机架上,用网络摄像头对准每个集群。 -学生们选择要运行的程序,使用的核心数量,以及所选程序的参数。作为输出,他们可以看到该程序在单个树莓派上运行的时间与使用所选核数的集群的时间相比。学生还可以看到程序的输出,要么是密码散列结果,要么是最小和最大的旅行推销员路线,或未遮挡的图像。。 +学生们选择要运行的程序,使用的核心数量,以及所选程序的参数。作为输出,他们可以看到该程序在单个树莓派上运行的时间与使用所选核数的集群的时间相比。学生还可以看到程序的输出,如密码散列结果、最小和最大的旅行推销员路线,或未遮挡的图像。 ![Generating a fourth image from information in three images][4] -网络摄像头显示了集群的实时流。领头的树莓派有一个 LED 显示屏,显示程序运行时的状态。网络摄像头让学生清楚地知道,他们是在用真正的专用硬件做实验,而不是得到模拟的或预先录制的结果。 +网络摄像头显示了集群的实时流。主控树莓派有一个 LED 显示屏,显示程序运行时的状态。网络摄像头让学生清楚地知道,他们是在用真正的专用硬件做实验,而不是得到模拟的或预先录制的结果。 ![Raspberry Pi cluster][5] -每个程序都有两个与之相关的活动,说明了程序设计和 PDC 操作的不同方面。其中一个主要的学习点是,PDC 计算可以提供显著的性能优势,但代价是划分和分配问题以及反过来重新组合结果所花费的时间和资源。第二个学习点是,效率受程序设计的影响很大。 +每个程序都有两个与之相关的活动,描述了程序设计和 PDC 操作的不同方面。其中一个主要的学习点是,PDC 计算可以提供显著的性能优势,但代价是划分和分发问题以及反过来重新组合结果所花费的时间和资源。第二个学习点是,效率受程序设计的影响很大。 ### 学生喜欢 @@ -44,7 +48,7 @@ 学生们正在使用集群开展旨在教授 PDC 原理的学习活动,而不是编写和运行他们自己的程序。开发低成本的树莓派集群供远程大学学生使用的经验表明,远程实践活动对教授 PDC 概念和吸引学生有好处。 -当我向该项目背后的团队成员之一 Daniel Gooch 询问时,他说:"对我来说,我们的不同之处在于,我们采用了一套现有的树莓派指令,并致力于整合额外的环绕材料,以确保它能够应对我们操作的距离和规模。" +当我向该项目背后的团队成员之一 Daniel Gooch 询问时,他说:“对我来说,我们的不同之处在于,我们采用了一套现有的树莓派教程,并致力于整合更多外围材料,以确保它能够应对我们操作的距离和规模。” -------------------------------------------------------------------------------- @@ -53,7 +57,7 @@ via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberr 作者:[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/) 荣誉推出 @@ -63,4 +67,5 @@ via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberr [2]: https://projects.raspberrypi.org/en/projects/build-an-octapi [3]: https://github.com/dg7692/TM129 [4]: https://opensource.com/sites/default/files/2023-02/image-project.png -[5]: https://opensource.com/sites/default/files/2023-02/cluster.png \ No newline at end of file +[5]: https://opensource.com/sites/default/files/2023-02/cluster.png +[0]: https://img.linux.net.cn/data/attachment/album/202303/09/103012m05dzitda8581bcj.jpg \ No newline at end of file From 360add98f1fa97982bfedcb73b558297427159ba Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Mar 2023 11:56:05 +0800 Subject: [PATCH 025/318] RP @wxy https://linux.cn/article-15610-1.html --- ... I automate graphics creation with Inkscape.md | 99 +++++++++++++++++++ ... I automate graphics creation with Inkscape.md | 94 ------------------ 2 files changed, 99 insertions(+), 94 deletions(-) create mode 100644 published/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md delete mode 100644 sources/tech/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md diff --git a/published/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md b/published/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md new file mode 100644 index 0000000000..3e651ca0e6 --- /dev/null +++ b/published/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md @@ -0,0 +1,99 @@ +[#]: subject: "How I automate graphics creation with Inkscape" +[#]: via: "https://opensource.com/article/23/3/automate-graphics-production-inkscape" +[#]: author: "Máirín Duffy https://opensource.com/users/mairin" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15610-1.html" + +我如何用 Inkscape 实现图形创作自动化 +====== + +![][0] + +> 跟随这个 Inkscape 教程,大量创建会议讲座卡图形。 + +我录制了一个 [15 分钟长的教程][1],演示如何在 [Inkscape][2] 中从 CSV 文件或电子表格中自动生成图形(基本上是邮件合并类图形)。它使用了 Maren Hachmann 的 [Next Generator Inkscape 扩展][3]。 + +你可以在 [Fedora 设计团队在 Linux Rocks 上的 PeerTube 频道][4](PeerTube 是开源的!)或下面的嵌入式 YouTube 视频中观看。 + +![][4a] + +在这篇文章中,我提供了一些关于这个教程相关的背景。我还包括了对视频中内容的一个非常简要的总结,以防你宁愿草草浏览文字而不看视频。 + +### 会议讲座卡图形 + +每个 Flock/Nest 都需要为你在举办虚拟会议的在线平台上的每个讲座提供一个图形。像这样的大型活动,通常有大约 50 个或更多的讲座。这需要大量手工制作的图形。 + +通过本教程,你将学习如何在 Inkscape 中制作这样的模板。 + +![图片显示 Inkscape 模板的一个例子][5] + +CSV 文件类似这样: + +| CONFERENCENAME | TALKNAME | PRESENTERNAMES | +| :- | :- | :- | +| BestCon | The Pandas Are Marching | Beefy D. Miracle | +| Fedora Nest | Why Fedora is the Best Linux | Colúr and Badger | +| BambooFest 2022 | Bamboo Tastes Better with Fedora | Panda | +| AwesomeCon | The Best Talk You Ever Heard | Dr. Ver E. Awesome | + +将它们结合起来,CSV 中的每一行生成一个图形,像这样: + +![在 Inkscape 模板上显示 CSV 的图片][6] + +会议图形是你如何应用这个教程的一个好例子。你也可以用它来生成名片(它输出的是 PDF)、个性化的生日邀请函、教室里学生的个性化图形(比如贴在学生课桌上的名卡),以及办公室的铭牌。你也可以用它来创建用于标记物品的图形。[作为 Fedora 设计团队的成员][7],你甚至可以用它来为 Fedora 制作很棒的横幅和图片!你可以用它来制作大量的不同用途。你可以应用这种技术的用途有很多,所以让你的想象力飞翔吧。 + +### Inkscape Next Generator 扩展 + +创建这些图片的第一步是安装 Maren Hachmann 为Inkscape 创建的 [Next Generator 扩展][3]。 + +- 到网站上下载 [next_gen.inx][8] 和 [next_gen.py][9]。 +- 然后进入 Inkscape的 “编辑Edit > 首选项Preferences > 系统System”对话框。搜索 “用户扩展User Extensions” 目录列表并点击 “打开Open” 图标。将 .inx 和 .py 文件拖入该文件夹。 +- 最后,你应该关闭所有打开的 Inkscape 窗口并重新启动 Inkscape。新的扩展在 “扩展Extensions” 菜单下: “扩展Extensions > 输出Export > Next Generator”。 + +### 创建一个模板 + +你的 CSV 文件的每个标题(在我的例子中:`ConferenceName`、`TalkName`、`PresenterNames`)都是一个变量,你可以把它放在 Inkscape 文件中,作为你的模板。[看一下 SVG 模板文件的例子][10],以获得指导。如果你想让 `TalkName` 出现在你的模板中,在 Inkscape中创建一个文本对象,并将以下内容放入其中: + +``` +%VAR_TalkName% +``` + +当你运行扩展时,`%VAR_TalkName%` 文本将被替换为 CSV 中每一行列出的 `TalkName`。因此,对于第一行,`%VAR_TalkName%` 被替换为第一个图形的文本 `The Pandas Are Marching`。对于第二个图形,`TalkName` 是 `Why Fedora is the Best Linux`。继续,直到给每个图形的加上 `TalkName` 列。 + +### 运行生成器 + +一旦你的模板准备好了,通过加载你的 CSV,运行 `Next Generator` 扩展。然后,选择你想在每个文件名中使用的变量(标题名称),点击 “应用Apply” 按钮。 + +在后面的文章中,我将提供一个关于这个扩展的更高级使用的教程,比如改变每个文件中包含的颜色和图形。 + +本文最初发表在作者的 [博客][11]上,经许可后重新发表。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/automate-graphics-production-inkscape + +作者:[Máirín Duffy][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://opensource.com/users/mairin +[b]: https://github.com/lkxed/ +[1]: https://peertube.linuxrocks.online/w/sf8Vqgg3aRkPKpb7KMsHgH +[2]: http://inkscape.org +[3]: https://gitlab.com/Moini/nextgenerator +[4]: https://peertube.linuxrocks.online/c/fedora_design/videos +[4a]: https://youtu.be/IxZC4gNwFyM +[5]: https://opensource.com/sites/default/files/2023-02/InkscapeTemplateExample.png +[6]: https://opensource.com/sites/default/files/2023-02/Bamboo-Tastes-Better-with-FedoraINKSCAPE.png +[7]: https://matrix.to/#/#design:fedoraproject.org +[8]: https://gitlab.com/Moini/nextgenerator/-/raw/master/next_gen.inx?inline=false +[9]: https://gitlab.com/Moini/nextgenerator/-/raw/master/next_gen.py?inline=false +[10]: https://gitlab.com/fedora/design/team/tutorials/inkscape-automation/-/blob/main/template-simple.svg +[11]: https://blog.linuxgrrl.com/2022/07/19/how-to-automate-graphics-production-with-inkscape/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/09/113944o6m8mdqmgmq1ey8y.jpg \ No newline at end of file diff --git a/sources/tech/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md b/sources/tech/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md deleted file mode 100644 index 363c96dd6a..0000000000 --- a/sources/tech/20230303.1 ⭐️ How I automate graphics creation with Inkscape.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: subject: "How I automate graphics creation with Inkscape" -[#]: via: "https://opensource.com/article/23/3/automate-graphics-production-inkscape" -[#]: author: "Máirín Duffy https://opensource.com/users/mairin" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How I automate graphics creation with Inkscape -====== - -I recorded a [15-minute long tutorial][1] demonstrating how to automate the production of graphics from a CSV file or spreadsheet (basically a mailmerge type deal for graphics) in [Inkscape][2]. It uses the [Next Generator Inkscape extension][3] from Maren Hachmann. - -You can watch it on the [Fedora Design Team Linux Rocks PeerTube channel][4] (PeerTube is open source!) or the embedded YouTube video below: - -![][4a] - -In this article, I provide some context for how this tutorial is useful. I also include a very high-level summary of the content in the video in case you'd rather skim text and not watch a video. - -### Conference talk card graphics - -Each Flock/Nest needs a graphic for each talk for the online platform you use to host a virtual conference. There are usually about 50 or more talks for large events like this. That's a lot of graphics to produce manually. - -With this tutorial, you learn how to make a template like this in Inkscape: - -![Image showing an example of an Inkscape template.][5] - -And a CSV file like this: - -| CONFERENCENAME | TALKNAME | PRESENTERNAMES | -| :- | :- | :- | -| BestCon | The Pandas Are Marching | Beefy D. Miracle | -| Fedora Nest | Why Fedora is the Best Linux | Colúr and Badger | -| BambooFest 2022 | Bamboo Tastes Better with Fedora | Panda | -| AwesomeCon | The Best Talk You Ever Heard | Dr. Ver E. Awesome | - -Combine them to generate one graphic per row in the CSV, like so: - -![Image displaying a CSV on an Inkscape template.][6] - -Conference graphics are a good example of how you can apply this tutorial. You could also use it to generate business cards (it outputs a PDF), personalized birthday invitations, personalized graphics for students in your classroom (like student name cards for their desks), and signage for your office. You can use it to create graphics for labeling items, too. You can even use it to create awesome banners and graphics for Fedora [as a member of the Fedora Design Team][7]! There are a ton of possibilities for how you can apply this technique, so let your imagination soar. - -### The Inkscape Next Generator extension - -The first step to create these images is to install [the Next Generator extension][3] for Inkscape created by Maren Hachmann: - -- Go to the website and download the [next_gen.inx][8]and [next_gen.py][9] from the top level of the repo. -- Then go into the **Edit > Preferences > System** dialog in Inkscape. Search for the **User Extensions** directory listing and click the **Open** icon. Drag the .inx and .py files into that folder. -- Finally, you should close all open Inkscape windows and restart Inkscape. The new extension is under the **Extensions** menu: **Extensions > Export > Next Generator**. - -### Create a template - -Each header of your CSV file (in my example: ConferenceName, TalkName, PresenterNames) is a variable you can place in an Inkscape file that serves as your template. [Take a look at the example SVG template file][10] for directions. If you want the TalkName to appear in your template, create a text object in Inkscape and put the following content into it: - -``` -%VAR_TalkName% -``` - -When you run the extension, the _%VAR_TalkName%_ text is replaced with the _TalkName_ listed for each row of the CSV. So for the first row, _%VAR_TalkName%_ is replaced with the text _The Pandas Are Marching_ for the first graphic. For the second graphic, the _TalkName_ is _Why Fedora is the Best Linux_. You continue doing this until you get to the _TalkName_ column for each graphic. - -### Run the generator - -Once your template is ready, run the Next Generator extension by loading your CSV. Then, select which variables (header names) you want to use in each file name and hit the **Apply** button. - -In a future article, I will provide a tutorial on more advanced use of this extension, like changing colors and graphics included in each file. - -_This article was originally published on the author's [blog][11] and has been republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/automate-graphics-production-inkscape - -作者:[Máirín Duffy][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/mairin -[b]: https://github.com/lkxed/ -[1]: https://peertube.linuxrocks.online/w/sf8Vqgg3aRkPKpb7KMsHgH -[2]: http://inkscape.org -[3]: https://gitlab.com/Moini/nextgenerator -[4]: https://peertube.linuxrocks.online/c/fedora_design/videos -[4a]: https://youtu.be/IxZC4gNwFyM -[5]: https://opensource.com/sites/default/files/2023-02/InkscapeTemplateExample.png -[6]: https://opensource.com/sites/default/files/2023-02/Bamboo-Tastes-Better-with-FedoraINKSCAPE.png -[7]: https://matrix.to/#/#design:fedoraproject.org -[8]: https://gitlab.com/Moini/nextgenerator/-/raw/master/next_gen.inx?inline=false -[9]: https://gitlab.com/Moini/nextgenerator/-/raw/master/next_gen.py?inline=false -[10]: https://gitlab.com/fedora/design/team/tutorials/inkscape-automation/-/blob/main/template-simple.svg -[11]: https://blog.linuxgrrl.com/2022/07/19/how-to-automate-graphics-production-with-inkscape/ From 9775e14d5cdea145360b581726cc43f73059d830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:04:30 +0800 Subject: [PATCH 026/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230307.1=20=E2=AD=90=EF=B8=8F=20Switch=20from=20iClo?= =?UTF-8?q?ud=20to=20Nextcloud.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...07.1 ⭐️ Switch from iCloud to Nextcloud.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md diff --git a/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md b/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md new file mode 100644 index 0000000000..aad9d8e751 --- /dev/null +++ b/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md @@ -0,0 +1,88 @@ +[#]: subject: "Switch from iCloud to Nextcloud" +[#]: via: "https://opensource.com/article/23/3/switch-icloud-nextcloud" +[#]: author: "Heike Jurzik https://opensource.com/users/hej" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Switch from iCloud to Nextcloud +====== + +If you're wary of committing your data to cloud services controlled by a corporation but love the convenience of remote storage and easy web-based access, you're not alone. The cloud is popular because of what it can do. But the [cloud doesn't have to be closed][1]. Luckily, the open source Nextcloud project provides a personal and private cloud application suite. + +It's easy to [install][2] and import data—including contacts, calendars, and photos. The real trick is getting your data from cloud providers like iCloud. In this article, I demonstrate the steps you need to take to migrate your digital life to Nextcloud. + +### Migrate your data to Nextcloud + +As with [Android devices][3], first you must transfer existing data from Apple's iCloud to Nextcloud. Then you can set up two new accounts for your Apple devices to fully automatically synchronize address books and appointments. Apple supports CalDAV for calendars and CardDAV for contacts, so you don't even need to install an extra app. + +To export your address book, you can either open the **Contacts** app on your iPhone/iPad or log into iCloud in your web browser: + +- Select all address book entries you want to transfer to Nextcloud and choose **File > Export > Export vCard** to save a .`vcf` file on your local disk. +- Import the .`vcf` file into Nextcloud. To do this, select the **Contacts** app, click **Settings** at the bottom left and select the **Import contacts** button. In the following dialogue window, click **Select local file**, and open the previously saved vCard. + +To set up a CardDAV account on your iPhone or iPad, go to**_Settings_ > _Contacts_ > _Accounts_ > _Add Account_**: + +- Select **Other** and then **Add CardDAV account**. In the **Server** field, enter the URL of Nextcloud (for example, [https://nextcloudpi.local][4]). Below this is space for the username and password of the Nextcloud account. Open the **Advanced Settings** for the new account. +- Ensure the **Use SSL option** is enabled. The account URL is usually set correctly. It contains, amongst other things, the host name of your Nextcloud and your user name. + +To create a new account on macOS for synchronizing address books, open the **Contacts** app and select **Add Account** from the **Contacts** menu. Activate the checkbox **Other Contacts Account** and click on **Continue**. You can accept the **CardDAV** entry. In the **Account Type** drop-down menu, select **Manual** entry. + +![Image of advanced settings in Nextcloud.][5] + +Enter your Nextcloud user name, password, and server address. The current macOS version requires you to specify port 443 (for SSL) in the server address. For example, if the address of your Nextcloud is [https://nextcloudpi.local][6] and the username is hej, then enter the following in the field: + +[https://nextcloudpi.local:443/remote.php/dav/principals/users/hej][7] + +### Syncing your calendars + +Exporting your calendars works similarly. Through the Calendar app, you can do this with iCloud in the browser, on your smartphone/tablet, or the macOS desktop. + +First, set the calendar to **public**. This doesn't mean that everyone can access your calendar. It's only used to generate a link for the calendar subscription. Copy the URL to the clipboard. It's not yet possible to import the calendar directly into Nextcloud because you don't need a link for this, but an `.ics` file (iCalendar). Here is how to generate such a file from the link: + +- Copy the link to the clipboard +- Paste the link into the address bar of a web browser +- Change the beginning of the URL and replace `webcal` with `http` +- Press **Enter** and save the `.ics` file on your disk + +![Image showing how to save the .ics file on your disk.][8] + +You can now import the `.ics` file. To do this, open the **Calendar** app in Nextcloud, click **Calendar settings** at the bottom left and then **Import calendar**. Select the `.ics` file you saved in the file manager. + +Repeat this process for all iCloud calendars. After that, it's time to replace the old iCloud synchronization service. + +### Synchronizing events + +To synchronize new events with Nextcloud, set up a new account on your client devices (smartphone, tablet, desktop): + +- **iPhone/iPad: _Settings_ / _Calendar_ / _Accounts_ / _Add Account_, select _Other_** and then choose **Add CalDAV Account**. In the **Server** field, enter your local Nextcloud URL, which is `https://nextcloudpi.local`. You can see a space for the username and password of the Nextcloud account. +- macOS: Open the Calendar app and select **Add Account** from the **Calendar** menu. Activate the checkbox **Other CalDAV Account** and click **Continue**. From the **Account Type** drop-down menu, select **Manual** entry. Enter your Nextcloud username and password as well as the Nextcloud server address. Don't forget to specify the port 443 (for SSL) in the server address; otherwise the account setup will fail. + +**Tip:** If you want to synchronize other files like documents, photos, videos, and so on, in addition to your contacts and calendars, you can install the Nextcloud app offered in the App Store. + +This article has been adapted from Heike Jurzik's book, [Nextcloud on the Raspberry Pi][9]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/switch-icloud-nextcloud + +作者:[Heike Jurzik][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/hej +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/20/10/keep-cloud-open +[2]: https://opensource.com/article/21/1/nextcloud-productivity +[3]: https://opensource.com/article/23/3/switch-google-nextcloud +[4]: https://nextcloudpi.local/ +[5]: https://opensource.com/sites/default/files/2023-02/advancedSettings-Nextcloud.png +[6]: https://nextcloudpi.local +[7]: https://nextcloudpi.local:443/remote.php/dav/principals/users/hej +[8]: https://opensource.com/sites/default/files/2023-02/NextcloudSaveIcsfile.png +[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 \ No newline at end of file From e459ce7015d490505ad3fc199c868aa387c087b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:05:25 +0800 Subject: [PATCH 027/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230307.2=20=E2=AD=90=EF=B8=8F=20Terminal=20Basics=20?= =?UTF-8?q?Series=204=20Creating=20Files=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nal Basics Series 4 Creating Files in Linux.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md diff --git a/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md b/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md new file mode 100644 index 0000000000..b094dfe77c --- /dev/null +++ b/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md @@ -0,0 +1,133 @@ +[#]: subject: "Terminal Basics Series #4: Creating Files in Linux" +[#]: via: "https://itsfoss.com/create-files/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Terminal Basics Series #4: Creating Files in Linux +====== + +So far, in this Terminal Basics series, you have learned to: + +- [Change directories][1] +- [Make new directories][2] +- [List directory contents][3] + +Let's now learn about creating files in the Linux command line. I'll briefly discuss adding content to the file. However, details on editing text files will be covered later. + +### Create a new empty file with touch command + +Using the touch command is pretty straightforward. + +``` +touch filename +``` + +Switch to your home directory and create a new directory called `practice_files` and switch to this directory: + +``` +mkdir practice_files && cd practice_files +``` + +💡 + +The && is a way to combine two commands. The second command only runs when the first command is executed successfully. + +Now, create a new file named new_file: + +``` +touch new_file +``` + +That's it. You have just created a new empty file. + +List the directory content and check the properties of the file with ls -l command. + +![Using touch command to create new files][4] + +💡 + +The touch command's original purpose is to 'touch' a file and change its timestamp. If the provided file does not exist, it creates a new file with the name. + +### Create a new file using the echo command + +I should have introduced you to the echo command long back. Better late than never. The echo command displays whatever you provide to it. Hence the name echo. + +``` +echo Hello World +``` + +You can use redirection and route the output to a file. And hence creating a new file in the process: + +``` +echo "Hello World" >> other_new_file +``` + +This way, you create a new file named `other_new_file` with the text `Hello World` in it. + +![Using echo command to create new file][5] + +Remember, if the provided file already exists, with >> redirection, you add a new line to the file. You can also use > redirection but then it will replace the existing content of the file. + +More on redirection can be found in the below tutorial. + +### Create new files using the cat command + +The original purpose of the cat command was to concatenate files. However, it is primarily used for displaying the contents of a file. + +It can also be used to create a new file with the option to add content. For that, you can use the same > and >> redirections. + +``` +cat >> another_file +``` + +But this one will create a new file and allow you to add some text to it. Adding text is optional. **You can exit the cat entering mode by using Ctrl+d keys.** + +![Using cat command to create new file][6] + +Again, the append mode >> adds new text at the end of file content while the clobber mode > replaces the existing content with new. + +🖥️ + +Use the long listing display with ls -l and notice the timestamps. Now touch the file + +``` +touch other_new_file +``` + +. Do you see the difference in the timestamps? + +### Test your knowledge + +You have learned about creating new files. Here are a few simple exercises to practice what you just learned. It includes a little bit of the previous chapters as well. + +- Use the touch command to create three new files named file1, file2 and file3. Hint: You don't need to run touch three times. +- Create a directory called files and create a file named my_file in it. +- Use the cat command to create a file called `your_file` and add the following text in it "This is your file". +- Use the echo command to add a new line "This is our file" to your_file. +- Display all the files in reverse chronological order (refer to chapter 3). Now use the touch command to modify the timestamp of file2 and file3. Now display the content in reverse chronological order again. + +That's pretty fun. You are making good progress. You have learned to create new files in this chapter. Next, you'll learn about viewing the contents of a file. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/create-files/ + +作者:[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/change-directories/ +[2]: https://itsfoss.com/make-directories/ +[3]: https://itsfoss.com/list-directory-content/ +[4]: https://itsfoss.com/content/images/2023/03/touch-example.svg +[5]: https://itsfoss.com/content/images/2023/03/echo-example.svg +[6]: https://itsfoss.com/content/images/2023/03/cat-example.svg \ No newline at end of file From d509be285b940808f72001144e57c6485dbd262c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:05:58 +0800 Subject: [PATCH 028/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230308.0=20=E2=AD=90=EF=B8=8F=20Garuda=20Linux=20?= =?UTF-8?q?=E2=80=9CRaptor=E2=80=9D=20230305=20Release=20Drops=20Latte=20D?= =?UTF-8?q?ock,=20Brings=20Key=20Changes.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...05 Release Drops Latte Dock, Brings Key Changes.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md diff --git a/sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md b/sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md new file mode 100644 index 0000000000..546bef643f --- /dev/null +++ b/sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md @@ -0,0 +1,85 @@ +[#]: subject: "Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes" +[#]: via: "https://debugpointnews.com/garuda-linux-raptor-230305/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes +====== + +![][1] + +**Garuda Linux, the popular Arch-based Linux distribution, has released a new version, “Raptor” 200305, with new features and updates.** + +![Garuda Linux Raptor 230305][2] + +Garuda Linux is an Arch-based Linux distribution that has become increasingly popular among Arch Linux enthusiasts due to its out-of-the-box experience, gaming support and user-friendly interface. Garuda Linux is known for its focus on performance, speed, and stability. + +Recently, Garuda Linux released a new version, “Raptor” 200305, packed with new features and updates. In this article, we’ll explore the latest release of Garuda Linux and what’s new in this version. + +### Garuda “Raptor” 200305: What’s New + +Garuda’s main flagship edition was the “dr460nized” edition featuring the KDE Plasma desktop environment. But it was heavily customized with Latte-dock, icon themes, etc. + +Since the Latte dock is now out of support, the Garuda team completely removed the Latte dock and replaced it with standard Plasma panels. As per the team, it _“takes away somewhat from the dr460nized edition’s eye candy appeal factor by losing features like top bar colors/transparency”._ + +Which is indeed true. But there’s no other dock like Latte dock. I mean, there are, but none of them comes closer to the features and flexibility that Latte dock used to provide. But the advantage is that KDE Plasma may become more stable in Garuda since it now uses a native dock and panels. And it’s looks great also! + +![New native KDE panel][3] + +So, what if you are already running an earlier version of Garuda with Latte dock? + +To trap that use case, the team tweaked “_Garuda System Maintenance_” application to detect that you are already running the Latte dock and offer you step-by-step migration to new panels. It also backs up your configurations once you confirm migration from Latte dock, in case something goes wrong during migration. More information on this can be found in this [guide][4]. + +In addition to the above change, Garuda Linux “Raptor” 230305 also brings a rewritten set-up assistance with an improved tabbed interface and the ability to detect NVIDIA hardware. + +One critical update on this version is that Garuda now uses Dracut to create the initramfs instead of mkiniticpio which is common for the majority of Arch distros, including the vanilla Arch install. + +That’s not all. Starting from this release, a new repo, “garuda”, is created for packages exclusive to Garuda Linux and moved away from the current Chaotic-AUR repo. This is one of the biggest changes and it happens automatically via garuda-update. Learn more about this [here][5]. + +![Current pacman repo order][6] + +At the core, this version comes with the latest [KDE Plasma 5.27.2][7] desktop and Linux Kernel 6.2.2. So, you get all the latest packages, thanks to rolling releases. + +You can read the entire changelog [here][8], if you want to explore more updates. + +To download, visit the following page and choose your variant. + +[Download Garuda Linux][9] + +If you are already running Garuda Linux, then launch Gaurda Assistance from the welcome app and hit system update. + +### Conclusion + +It’s a significant Garuda release which touches all the main components of its flagship KDE edition. The core updates to pacman preferences and Dracut impact all the flavours. + +However, all the changes aim to make it a more stable system than before. I hope it continues to bring in such updates to be relevant as one of the best Arch Linux distros out there. + +Via [announcement][10] + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/garuda-linux-raptor-230305/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/03/garuda-head.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2023/03/Garuda-Linux-22Raptor22-230305.jpg +[3]: https://debugpointnews.com/wp-content/uploads/2023/03/New-native-KDE-panel.jpg +[4]: https://wiki.garudalinux.org/en/dr460nized-migration +[5]: https://forum.garudalinux.org/t/separating-garuda-packages-from-chaotic-aur/20506 +[6]: https://debugpointnews.com/wp-content/uploads/2023/03/Current-pacman-repo-order.jpg +[7]: https://debugpointnews.com/kde-plasma-5-27-release/ +[8]: https://forum.garudalinux.org/t/garuda-linux-raptor-230305/26929#you-want-to-read-the-exhaustive-changelog-sure-it-can-be-found-below-as-usual-laughing-10 +[9]: https://garudalinux.org/downloads.html +[10]: https://forum.garudalinux.org/t/garuda-linux-raptor-230305/26929 \ No newline at end of file From 0b883c34df6d7a7af83e175d85022b657efca3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:06:13 +0800 Subject: [PATCH 029/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230308.1=20=E2=AD=90=EF=B8=8F=20Vanilla=20OS=20Drops?= =?UTF-8?q?=20Ubuntu,=20Welcomes=20Debian=20Sid.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...anilla OS Drops Ubuntu, Welcomes Debian Sid.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md diff --git a/sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md b/sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md new file mode 100644 index 0000000000..761320adbc --- /dev/null +++ b/sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md @@ -0,0 +1,64 @@ +[#]: subject: "Vanilla OS Drops Ubuntu, Welcomes Debian Sid" +[#]: via: "https://debugpointnews.com/vanilla-os-debian/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Vanilla OS Drops Ubuntu, Welcomes Debian Sid +====== + +![][1] + +**The upcoming Vanilla OS 2.0 “Orchid” will be based on Debian sid instead of Ubuntu Linux.** + +The aftershock from Ubuntu’s Flatpak decision continues! The Vanilla OS team today announced that the next release of Vanilla OS would not be based on Ubuntu anymore. It will be based on Debian sid, the “rolling” release or unstable version of Debian Linux. + +If you don’t know, the Vanilla OS is a new immutable Linux distribution which had its debut release last year. It aims to be the “vanilla” experience of the GNOME desktop with its unique set of tools such as apx package manager, ABRoot technology, stock GNOME experience and more. It was based on the standard Ubuntu release cycle and versions. + +![Vanilla OS 22.10 Kinetic Desktop][2] + +### Vanilla OS plans for Debian base + +The next release of Vanilla OS will be named “2.0” “Orchid” because of these major changes. But why move away from Ubuntu? + +As the team says, more difficulties and effort have been spent _“to revert Canonical’s opinionated workflow_” which takes more development time. Also, the GNOME shipped by Ubuntu is customized as per Canonical’s needs and vision. So, not much of a “vanilla” experience. + +The second reason is the problem handling “snap”. After several testing and community feedback, the team feels that the current snap problem doesn’t fit the use case of Vanilla OS. For example, the “slow startups, centralization” problems are not fixed in core snap, and snap doesn’t run inside Vanilla OS’s apx container. + +### Release model + +In addition, moving away from the Ubuntu base give you a much more flexible release cadence. You don’t need to follow the two releases per year cycle. It gives some breathing space to the small FOSS developers and contributors team. + +But what would be the release model for future releases? The team will follow an ad-hoc release method which means the famous term applies – “it will be released when needed or ready”. For example, if some Debian sid PACKAGE gets a critical CVE fix, then you may get an immediate point release of Vanilla OS. So, it’s up to the situation and should be need basis. + +Furthermore, the team is also planning to reduce the number of packages in the ISO file to minimize the risks of the “unstable” nature of packages. But with my experience with Debian sid, if you follow proper updates and be cautious, it works as a “stable” distro. + +Also, part of the other changes is OCI updates to the ABRoot for greater control of updates. A new express and advanced options in set up are notable ones which are planned for the upcoming release. + +At the core, the new release is planned to have GNOME 44 and mainline Kernel 6+ based on the situation of Debian sid packages. + +### Conclusion + +In conclusion, it’s indeed a great move for the Debian base. While it does give more flexibility on release cadence, it also brings more careful testing of sid packages before offering a stable release to users. Overall, exciting time ahead as we wait for the testing copy of Vanilla OS 2.0 “Orchid”. + +Via [announcement][3] + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/vanilla-os-debian/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2022/12/vanilla-os-logo.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Vanilla-OS-22.10-22Kinetic22-Desktop.jpg +[3]: https://vanillaos.org/2023/03/07/vanilla-os-2.0-orchid-initial-work.html \ No newline at end of file From 7416c2c931a74e6db1c31324b9a2c21196127291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:06:38 +0800 Subject: [PATCH 030/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230308.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20to=20Install=20MiniKube=20on=20RHEL=208Rocky=20Linux=208Alm?= =?UTF-8?q?aLinux=208.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tall MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md diff --git a/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md b/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md new file mode 100644 index 0000000000..8040a12213 --- /dev/null +++ b/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md @@ -0,0 +1,201 @@ +[#]: subject: "How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8" +[#]: via: "https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8 +====== + +In this post, we will cover how to install minikube on RHEL 8, Rocky Linux 8 or AlmaLinux 8 step by step. + +Minikubeis a cross-platform and open-source tool that makes it possible for you to deploy a single-node Kubernetes cluster on your local machine. + +Kubernetes, also known as k8sor simply as Kube, is an open-source container orchestration platform used for the automation scaling and deployment of containers.Minikube cluster helps developers and admins to build their test environment in minikube cluster. + +##### Prerequisites of MiniKube + +- Minimal Installed RHEL 8 or Rocky Linux 8 or AlmaLinux 8 +- Locally Configured Repo or Subscription for RHEL 8. +- Minimum of 2 GB RAM and 2 vCPUs +- 20 GB hard disk space +- Sudo User with admin +- A stable internet connection +- Docker or virtual machine manager like VirtualBox, KVM,and VMware etc. + +In this post, we will be using docker as driver for minikube. With all the prerequisites met, it’s time now to roll up our sleeves and get our hands dirty. + +### Step 1) Enable Official Docker Repository + +To enable docker official repository run, + +``` +$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo +$ sudo dnf repolist +``` + +### Step 2) Install Docker CE (Community Edition) + +Run the following dnf command to install docker and its dependencies, + +``` +$ sudo dnf install docker-ce docker-ce-cli containerd.io -y +``` + +output, + +Once docker is installed the start and enable it’s service, run following systemctl commands, + +``` +$ sudo systemctl start docker +$ sudo systemctl start docker +``` + +Allow your local user to run docker commands without sudo, run + +``` +$ sudo usermod -aG docker $USER +$ newgrp docker +``` + +### Step 3) Install Kubectl Binary + +Kubectl is a command-line tool which interacts with Kubernetes cluster via APIs. Using kubectl we deploy our applications as deployment. By default, kubectl is not included in RHEL 8 , Rocky Linux 8 or AlmaLinux 8 package repositories. Therefore, we are going to manually install it using beneath commands, + +``` +$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +$ sudo cp kubectl /usr/local/bin/ && sudo chmod +x /usr/local/bin/kubectl +$ kubectl version --client +``` + +Output of above commands would be something like below, + +### Step 4) Download MiniKube Binary and Start Cluster + +After installing the kubectl, let’s download and install minikube binary using the following commands, + +``` +$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 +$ sudo install minikube-linux-amd64 /usr/local/bin/minikube +``` + +Now start minikube cluster using the beneath command, + +``` +$ minikube start --driver docker +``` + +Output above confirms that minikube command has started the single node Kubernetes cluster using docker as driver. + +Run below minikube command to verify the status of your local Kubernetes cluster, + +``` +[[email protected] ~]$ minikube status +minikube +type: Control Plane +host: Running +kubelet: Running +apiserver: Running +kubeconfig: Configured +[[email protected] ~]$ +[[email protected] ~]$ minikube ip +192.168.49.2 +[[email protected] ~]$ +``` + +To stop stop the minikube cluster, execute, + +``` +$ minikube stop +``` + +Execute the “kubectl” commands to view cluster and node information + +``` +$ kubectl cluster-info +$ kubectl get nodes +``` + +### Step 5) Test and Verify Kubernetes Cluster + +To test Kubernetes cluster, let try to create k8s deployment using echo server image, it is equivalent to http web server and expose it as a service on port 8080, + +``` +[[email protected] ~]$ kubectl create deployment test-minikube --image=k8s.gcr.io/echoserver:1.10 +deployment.apps/test-minikube created +[[email protected] ~]$ +``` + +To access test-minikube deployment, expose it as service, run the following command, + +``` +[[email protected] ~]$ kubectl expose deployment test-minikube --type=NodePort --port=8080 +service/test-minikube exposed +[[email protected] ~]$ +``` + +Run below kubectl command to get deployment,pods and service  information for above created deployment, + +``` +$ kubectl get deployment,pods,svc +``` + +To access service, get its url by running the beneath command. + +``` +[[email protected] ~]$ minikube service test-minikube --url +http://192.168.49.2:32291 +[[email protected] ~]$ +[[email protected] ~]$ curl http://192.168.49.2:32291/ +``` + +Great, it means our Kubernetes cluster is working fine as we are able to access our sample application. + +##### Step 6) Enable MiniKube Addons + +Minikube offers addons which can add additional functionality to our clusters. To list all available addons run, + +``` +$ minikube addons list +``` + +Kubernetes ships with a dashboard that allows you to manage your cluster. In Minikube, dashboard has been added as an addons. So to enable it, run + +``` +$ minikube addons enable dashboard +``` + +Also to enable nginx ingress controller, run + +``` +$ minikube addons enable ingress +``` + +To access the dashboard, run + +``` +$ minikube dashbaord --url +``` + +This will start the dashboard in your systems’s web vrowser. + +And that’s just about it. We have managed to successfully install Kubernetes with Minikube on RHEL 8, Rocky Linux 8 or AlmaLinux 8. You are welcome to share your feedback and comments in below comments section. + +**Also Read**: How to Configure NFS based Persistent Volume in Kubernetes + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/ + +作者:[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/ From 5c1ae23b50c3257c85c9efff1b0edf2072c2fd31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:07:03 +0800 Subject: [PATCH 031/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230308.3=20=E2=AD=90=EF=B8=8F=208=20examples=20of=20?= =?UTF-8?q?influential=20women=20in=20tech.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️ 8 examples of influential women in tech.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md diff --git a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md new file mode 100644 index 0000000000..15df17b493 --- /dev/null +++ b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md @@ -0,0 +1,96 @@ +[#]: subject: "8 examples of influential women in tech" +[#]: via: "https://opensource.com/article/23/3/international-womens-day-tech-influence" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +8 examples of influential women in tech +====== + +A journey through open source is rarely something you do alone. Your hobby, career, and your life has been affected by others in the tech space, and statistically some of those people have been women. That's one of the many reasons International Women's Day exists, and it's a good excuse to reflect upon the women who have inspired your career in tech. We asked Opensource.com contributors for their thoughts. + +### Inspirational women + +#### Dr. Kathleen Greenaway + +One of the women that inspired me was my university professor, [Dr. Kathleen Greenaway][1]. She was exactly who I wanted to be. I remember her saying at a women's event about breaking the glass ceiling that she couldn't believe that we were still talking about it so many years later. I now find myself thinking the very same thing. This is just one example, but she was it. + +**—[Shanta Nathwani][2]** + +#### Hilary Mason + +I owe my knowledge and start in PHP to [Hilary Mason][3]. While she was a professor at Johnson & Wales in Providence RI, she ran an elective study on server-side programming. She showed us PHP, and for a final project had us build something using a database. I think I built a simple login system and a commenting tool or something. I love telling folks I learned PHP from a woman (the lead data scientist at bit.ly, at that!) + +**—[John E. Picozzi][4]** + +#### Carie Fisher + +The most inspirational woman in tech for me is [Carie Fisher][5]. I met her when I first started getting involved in the accessibility community. She invited me to help with projects and helped me through my impostor syndrome when applying to jobs, getting certified, and speaking at conferences. Her compassion and devotion to digital inclusion is matched by only a few. + +**—[AmyJune Hineline][6]** + +#### Kanopi Studios + +I've been working in tech for 25 years and have often been the only female developer in a company or department. Then I joined Kanopi Studios, a women-owned and led agency with many smart, tech-savvy women from whom I am inspired every day. My gender is no longer a barrier to my career success. I feel respected and heard, and my accomplishments are recognized. + +**—[Cindy Williams][7]** + +#### Barbara Liskov and Sandi Metz + +I think Barbara Liskov is one of the most influential figures in our field I also really really like Sandi Metz, whose speaking and teaching skills helped me a lot in my career. I recommend any of her books or conference videos. + +**—[benelori][8]** + +#### Family + +I have been inspired by a number of women in my life, both personally and professionally. I always say that my mother, my sister and my grandmother have been great references for me in everything. But I have great colleagues with whom I work today who, for me are my references. I always think something like: Those people who have been important to you, try to keep them close. When I was studying development, we had no references. No one taught us that the [first programmer was a woman][9] or that we have WiFi or GPS, thanks to a woman. There is a very good book that I am reading right now [The Invisible Woman][10] that I highly recommend. + +**—[Marta Torre][11]** + +#### Sarah Drasner + +Written by an amazing woman in tech, it brought to my attention to another amazing woman in tech, [Engineering Management for the Rest of Us][12] by Sarah Drasner. This book (and the amazing dev manager, Jody, who sent copies to all the leads) is the reason I am going to be facilitating some discussions about how we experience feedback differently. We realized that a lot of folks may not even really know how to talk about what they need or what works for them, so an open/casual chat where we share some good and bad experiences (optionally, of course) and look at some examples of different styles will hopefully be a really helpful collaborative learning experience. + +**—[Fei Lauren][13]** + +#### Sheryl Sandberg + +My first book about women in tech, which was recommended to me at the WomenPower conference in Hannover, Germany, was [Lean In: Women, Work and the Will to Lead][14] by Sheryl Sandberg. Not only was I impressed by her own way but very much by how she managed to use the powers we as women are given and what makes us different for her own success and the company's success. + +**—[Anne Faulhaber][15]** + +### Your own influence + +In open source, maybe more than anywhere, we all are influences on each other. Sharing and collaborating are built into the process of open source. Tell us about the influences you've had during your open source journey. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/international-womens-day-tech-influence + +作者:[AmyJune Hineline][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/amyjune +[b]: https://github.com/lkxed/ +[1]: https://www.linkedin.com/in/kathleen-greenaway-4076247/ +[2]: https://opensource.com/users/shanta +[3]: https://en.wikipedia.org/wiki/Hilary_Mason_(data_scientist)?wprov=sfti1 +[4]: https://opensource.com/users/johnpicozzi +[5]: https://www.linkedin.com/in/cariefisher +[6]: https://opensource.com/users/amyjune +[7]: https://opensource.com/users/cindytwilliams +[8]: https://opensource.com/users/benelori +[9]: https://opensource.com/article/18/10/first-computer-programmer-ada-lovelace +[10]: https://www.penguinrandomhouse.com/books/623964/the-invisible-woman-by-erika-robuck/ +[11]: https://opensource.com/users/martatorredev +[12]: https://www.engmanagement.dev/ +[13]: https://opensource.com/users/feilauren +[14]: https://leanin.org/book +[15]: https://opensource.com/users/afaulhab \ No newline at end of file From 16d19846fa797961cebc3bd99190798611455266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:07:26 +0800 Subject: [PATCH 032/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230308.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Wh?= =?UTF-8?q?at=20cloud=20developers=20need=20to=20know=20about=20hardware.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...at cloud developers need to know about hardware.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md diff --git a/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md b/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md new file mode 100644 index 0000000000..b6880b246b --- /dev/null +++ b/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md @@ -0,0 +1,64 @@ +[#]: subject: "What cloud developers need to know about hardware" +[#]: via: "https://opensource.com/article/23/3/cloud-hardware" +[#]: author: "Jay Faulkner https://opensource.com/users/jayf" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What cloud developers need to know about hardware +====== + +It's easy to forget the progress that people in tech have made. In the early 2000s, most local user groups held regular install fests. Back then, to configure a single machine to run Linux well, we had to know intimate details about hardware and how to configure it. Now, almost twenty years later, we represent a project whose core ideal is to make getting a single computer to run Linux as easy as an API call. In this new world, operators and developers alike no longer have to worry about the hardware in their servers. This change has had a profound impact on the next generation of operators and developers. + +In the early days of computer technology, you had to put your hands on the hardware frequently. If a computer needed more memory, you just added it. As time passed, technology also evolved in big ways. This ended up moving the operator further from the hardware. What used to be a trip to the data center is now a support ticket to have remote hands on the hardware. Eventually, hardware was disposed of altogether. Instead, you now summon and destroy "servers" with simple commands and no longer have to worry about hardware. + +Here is the real truth: hardware exists because it is needed to power clouds. But what is a cloud, really? + +### Why hardware is critical to the cloud + +A cloud is a centralization of foundational resources built upon utilizing abstractions. It can range from being as simple as a hypervisor running a few VMs in your [homelab][1] to levels of complexity that include custom servers, networking gear, containers, and technology that's been designed from the ground up to focus on efficiencies of scale. + +They are nebulous. They evolve. + +Those entering technology today don't have the same hands-on experiences as more experienced developers had. Many are trained to use clouds from their earliest interactions with computers. They don't know a world without a button to change the memory allocation. They can point their attention to higher levels in the technology stack. Yet without an understanding of the foundations the infrastructure they use is built upon, they are implicitly giving away their opportunity to learn the lower levels of the stack, including hardware. No fault exists here because the implementer and operator of the cloud infrastructure have made specific choices to intentionally make their products easier to use. + +This means that now, more than ever, you have to think intentionally about what trade-offs you make — or others make — when choosing to use cloud technologies. Most people will not know what trade-offs have been made until they get their first oversized cloud bill or first outage caused by a "noisy neighbor". Can businesses trust their vendors to make trade-offs that are best for their operations? Will vendors suggest more efficient or more profitable services? Let the buyer (or engineer!) beware. + +**[ Related read [5 things open source developers should know about cloud services providers][2] ]** + +Thinking intentionally about trade-offs requires looking at your requirements and goals from multiple perspectives. Infrastructure decisions and the trade-offs therein are inherent to the overall process, design, or use model for that project. This is why they must be planned for as soon as possible. Multiple different paths must be considered in order to find your project a good home. + +First, there is the axis of the goal to be achieved, or the service provided. This may come with requirements around speed, quality, or performance. This can in itself drive a number of variables. You may need specialized hardware such as GPUs to process a request with acceptable speed. Will this workload need to auto-scale, or not? Of course, these paths are intertwined. The question already jumps to "Will my wallet auto-scale?" + +Business requirements are another part of this to consider. Your project may have specific security or compliance requirements which dictate where data is stored. Proximity to related services is also a potential concern. This includes ensuring a [low-latency connection][3] to a nearby stock exchange or ability to provide a high-quality local video cache as part of a content delivery network. + +Then there is the final part which is the value and cost of the service provided — how much one wishes to or can spend to meet the requirements. This is tightly bound  with the first path. The "what" your business is and "how" your business operates. This can be something as mundane as whether your business prefers CapEx versus OpEx. + +**[ Also read [Cloud services: 4 ways to get the most from your committed spend][4] ]** + +When looking at these options it is easy to see how changing any one variable can begin to change the other variables. They are inherently intertwined, and some technologies may allow for these variables to shift dynamically. Without understanding lower layers of substrate, you risk taking paths that further this dynamic model of billing. For some, this is preferred. For others, it can be dreaded. + +Even though learning hardware-specific knowledge has become more optional in modern technology stacks, we hope this article has encouraged you to look into what you may be missing out on without even knowing. Hardware improvements have been a large part of feature delivery and efficiency gains, shrinking computers from room-sized monstrosities to small enough to implant inside a human. We hope you take time to stop, learn, and consider what hardware platform your next project will be running on, even if you don't control it. + +If you are a student who hasn't gotten their head out of the clouds yet, go find an [old computer][5], install a stick of RAM, and challenge yourself to learn something new. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/cloud-hardware + +作者:[Jay Faulkner][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/jayf +[b]: https://github.com/lkxed/ +[1]: https://www.redhat.com/sysadmin/linux-homelab-rhel?intcmp=7013a000002qLH8AAM +[2]: https://opensource.com/article/22/3/cloud-services-providers +[3]: https://enterprisersproject.com/article/2022/5/edge-computing-latency-matters?intcmp=7013a000002qLH8AAM +[4]: https://enterprisersproject.com/article/2022/8/cloud-services-get-most-your-committed-spend?intcmp=7013a000002qLH8AAM +[5]: https://opensource.com/article/22/4/how-linux-saves-earth \ No newline at end of file From 493c0a10ec79c9e630298adff94d822b2571a3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:08:06 +0800 Subject: [PATCH 033/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230308.5=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=20Own=20your=20cloud=20with=20NextcloudPi=20?= =?UTF-8?q?on=20the=20Raspberry=20Pi.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Own your cloud with NextcloudPi on the Raspberry Pi.md | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 sources/tech/20230308.5 ⭐️⭐️⭐️ Own your cloud with NextcloudPi on the Raspberry Pi.md diff --git a/sources/tech/20230308.5 ⭐️⭐️⭐️ Own your cloud with NextcloudPi on the Raspberry Pi.md b/sources/tech/20230308.5 ⭐️⭐️⭐️ Own your cloud with NextcloudPi on the Raspberry Pi.md new file mode 100644 index 0000000000..d28dce21b1 --- /dev/null +++ b/sources/tech/20230308.5 ⭐️⭐️⭐️ Own your cloud with NextcloudPi on the Raspberry Pi.md @@ -0,0 +1,217 @@ +[#]: subject: "Own your cloud with NextcloudPi on the Raspberry Pi" +[#]: via: "https://opensource.com/article/23/3/nextcloudpi-nextcloud-raspberry-pi" +[#]: author: "Heike Jurzik https://opensource.com/users/hej" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Own your cloud with NextcloudPi on the Raspberry Pi +====== + +You can now say goodbye to big commercial cloud providers and manage your appointments, contacts, and other data in your own home network. Install NextcloudPi on your Raspberry Pi in less than 30 minutes, synchronize your mobile devices with your own Nextcloud, and gain total digital sovereignty and privacy! + +I remember when the first Raspberry Pi hit the market in 2012. My Linux friends and I were absolutely thrilled: a tiny computer, available for little money, but with enough computing power to be useful. It has a fully-fledged Linux system running on it, too! We started all sorts of DIY projects, set up [media centers][1], [web servers][2], blogs, control centers for our [smart homes][3], and even a monitoring solution for bee hives. + +Last year in December, I decided to install and run my own cloud on the Raspberry Pi. After some digging around, I settled on [NextcloudPi][4], a ready-made instance of [Nextcloud][5]. The open source software runs not only on the Raspberry Pi, but on many other single-board computers and other operating systems. + +This article shows how to install and configure NextcloudPi. I also explain how to secure the system and talk about different backup and restore methods. + +In addition to this tutorial, you can check out how to synchronize data from [Google Workspace][6] and [Apple iCloud][7] with Nextcloud in my previous articles. + +### Prerequisites + +To run NextcloudPi on a Raspberry Pi, you need at least a Raspberry Pi 2. However, newer models like the Raspberry Pi 3, Pi 3+, and especially the Raspberry Pi 4 are much faster. At my home, I use a Raspberry Pi 3, Model B+ with a 64 Bit quad-core processor (1,4 GHz) and 1 GB of RAM. Since I don't use a graphical desktop environment, this equipment is completely sufficient for my purposes (maximum 10 users/devices). + +What else do you need? Here is a checklist: + +- A microSD card with 8 GB minimum capacity +- A computer to write the NextcloudPi image to the SD card +- An Ethernet cable (NextcloudPi also works via WLAN, but a direct connection is much more stable and faster) +- An optional additional external storage to store the data of your own cloud. This depends on the amount of data you have. You should choose a USB stick or an external hard drive of sufficient size + +Normally, you don't need a monitor or an external keyboard. After you have flashed the NextcloudPi image onto the SD card, the rest of the setup and operation is done with a web interface. You can also access the Raspberry Pi over SSH from Linux, Windows, and macOS. You can also access it from your mobile devices. + +### Nextcloud vs. NextcloudPi + +Of course, you can always install Nextcloud on Raspberry Pi OS (formerly Raspbian) or another operating system on the mini computer. However, this means you have to install the operating system, set up a database server and a database — a complex task that scares off many beginners. The process is easier and faster with NextcloudPi. The open source project offers ready-made images for various single-board computers. It also has an installation script that allows you to set up your own cloud in no time at all. + +NextcloudPi takes a lot of work off your hands. It installs and configures Nextcloud so that you can start right away. The developers have published a list of supported hardware/systems on their [website][4]. For example, Raspberry Pi (all models, there are also Berryboot images to run NextcloudPi directly from an external hard drive), Odroid, Rock64, RockPro64, Banana Pi, and so on. They also offer a [container image][8] that runs on all architectures and operating systems that run containers. + +In addition to the current Nextcloud version, NextcloudPi includes a web server with a pre-configured database connection. An administration interface for the web browser is also included so that beginners can quickly find their way around. Those who prefer administration on the command-line can activate SSH access. NextcloudPi has a number of useful presets, including automatic HTTPS forwarding, HSTS (HTTP Strict-Transport-Security, a security mechanism for HTTPS connections), PHP extensions to improve performance, and more. The configuration wizard assists you with the first steps and the formatting of external USB media as well as access from outside using various Dynamic DNS services. + +Nextcloud itself has a number of pre-installed apps, including a calendar, address book, dashboard, file sharing, PDF viewer, image and file management, notes and tasks, and Nextcloud Activities. + +### Flash the image to the SD card + +The [GitHub repository][9] contains ready-made images for the Raspberry Pi and other devices. After downloading and unpacking the `zip` file, you can use the `dd` command on Linux or macOS to write the image to the SD card: + +``` +sudo dd bs=4M conv=fsync if=NextCloudPi[…].img of=/dev/mmcblkXX +``` + +Replace the device name of the SD card with the correct name. Be careful to choose the correct device name, because `dd` does not ask for confirmation! + +Alternatively, you can use the open source program [Etcher][10] to write the image to the SD card. It runs on Linux, Windows, and macOS. Simply select the image on your hard drive (**Flash from file**) or enter the address of the NextcloudPi image in GitHub (**Flash from URL**). After that, click **Select target**, **select the SD card**, and Flash starts the writing process. + +![Image of etcher.][11] + +### Boot and activate NextcloudPi + +Insert the prepared SD card into the slot of the Raspberry Pi, connect the Ethernet cable to a free port on your network switch or router, and connect the Raspberry Pi to the power supply to boot it. First, you need to find out the IP address of the Raspberry Pi. This is how you access both the web interface for setting up NextcloudPi and Nextcloud itself. + +If you are using a router equipped with a DHCP server, you can look in the router's administration interface to see which address it has assigned to the Raspberry Pi. + +Alternatively, use a network scanner like `nmap` on the command-line to find out the IP. + +Open a web browser and enter the IP address or hostname of your Pi. This opens the configuration wizard. By default, NextcloudPi only has a self-signed SSL/TLS certificate that hasn't been signed by a known certificate authority (CA). Most web browsers warn against such self-signed certificates. In this case, it's safe to ignore the warning, accept the risk and continue. + +Next, you see the NextcloudPi Activation screen. The web interface contains information about the two accounts it has created: one for the NextcloudPi administrator and one for Nextcloud. At this point, it's a good idea to take notes or save the passwords in a password manager so you can change them later. Click on the **Activate** button, log in as the user `ncp` along with the associated password to start the configuration wizard. + +![Image showing Nextcloud browser activation.][12] + +### NextcloudPi configuration wizard + +The first time you navigate to your Pi in your browser, click the **Run** button to start the configuration wizard. + +![Image of the NextCloud configuration wizard.][13] + +Switch to the **USB Configuration** tab to set up an external USB device (for example, an external hard disk or a USB stick) for the Nextcloud data. If the USB medium already has a suitable file system (Ext2, Ext3, Ext4 or Btrfs), you can continue by clicking **Skip.** Otherwise, instruct NextcloudPi with the **Format USB** button to format the disk with the Btrfs file system. Caution! Formatting erases all data on medium! + +In the **External access** tab, you can set up NextcloudPi so that the system can be accessed from outside (the internet). At this point, I recommend selecting **no**. You can always connect various dynamic DNS services through the NextcloudPi **NETWORKING** menu. After this last step, the initial setup is complete. The **Finish** tab offers two links to access your new Nextcloud installation and the NextcloudPi dashboard: + +- [https://nextcloudpi.local][14]: your Nextcloud +- [https://nextcloudpi.local:4443][15]: NextcloudPi administration interface + +### First steps in NextcloudPi + +The NextcloudPi administration interface is very intuitive. The menu bar shows the version number, a language switcher, a search function, and icons that link to your own Nextcloud installation. You can also find information about the system, access existing backups and snapshots, display an overview of the Nextcloud configuration, log files, and re-start the configuration wizard. Use the icon on the far right to shut down or restart the operating system. + +In the left sidebar, there are seven menus containing essential options for managing the NextcloudPi system: + +- **BACKUPS**: (Automatic) backups, configure backup media, define a backup schedule, export and import the NextcloudPi configuration, create a snapshot of the Btrfs file system, restore existing backups +- **CONFIG**: Display and (re)set the password for the administrator account ncp, move the Nextcloud database to an external (USB) device, move the Nextcloud data directory, force secure HTTPS connections, restart Nextcloud with a clean configuration, and configure system limits +- **NETWORKING**: Activate NFS, SSH access, various DNS services and providers, TLS/SSL certificates with Let's Encrypt, port forwarding for access from the outside, a static IP address, trusted proxy servers, and Samba +- **SECURITY**: Configure the firewall and the intrusion prevention system Fail2ban, and initiate a manual security check +- **SYSTEM**: Activate the monitoring for Prometheus and automatic mounting of USB devices, check the status of external hard disks and save the system logs in RAM to protect the SD card, define the size and location of the swap space, and activate compressed RAM to improve swap performance +- **TOOLS**: Uses various utilities for fixing permissions of Nextcloud data files, formatting USB drives (Btrfs file system) and switching Nextcloud's maintenance mode on and off +- **UPDATES**: Enables automatic Nextcloud and NextcloudPi updates, notifications about new versions and regular updates of all installed Nextcloud apps, update the current instance to a new Nextcloud version, install NextcloudPi updates, and activate the automatic installation of security updates + +### Starting Nextcloud + +You can log into your Nextcloud with the username `ncp` and the password displayed in the activation window. The Nextcloud dashboard offers quick access to certain files and folders, your calendar, and your online status (Online, Away, Do not disturb, and so on). You can also select your location for a weather forecast. + +All installed Nextcloud apps are listed in the top menu bar: **Files, Photos, Activity, Contacts, Calendar, Notes**, and so on. If you select an app, a menu in the left sidebar provides filters and tasks associated with it. In the **Files** app, for example, you get search functions and filters that provide quick access to your own files and folders or those shared with you. In the **Contacts** app, on the other hand, there is a button for creating new contacts and managing groups and circles. At the bottom left, you can access the app's settings. + +All Nextcloud users can find their personal settings by clicking on the profile picture or the initials of the username in the top right corner. The administrator account ncp may also (un)install apps, manage user accounts, and perform other administrative tasks. + +![Image of Nextcloud control page.][16] + +Before you start importing your address book and calendars, it's a good idea to create a new user account without administrator privileges for your daily work. For security reasons, you should only use the ncp account when you change something in the configuration. This includes installing and updating Nextcloud apps, creating users and groups, and so on. + +To create a new user, click on the icon with the **N** in the top right corner to open the settings and select the **Users** entry there. In the left sidebar, click the **New user** button, enter the username, first and last name, a password, and an email address. You can also add the account to an existing group. In the **Default quota** field, you can define how much hard disk space is granted to the user in the cloud. + +### Synchronize + +Once you have Nextcloud up and running, you can synchronize your Android or Apple devices. You can read about how to do that in my previous articles, [Switch from Google Workspace to Nextcloud][6] and [Switch from iCloud to Nextcloud][7]. + +### Set access to your system + +Even if you operate Nextcloud in the local network only and no services are accessible from the outside, it's vital to consider additional security measures. Here are some suggestions: + +- **Activate SSH access**: To enable SSH access for the Raspberry Pi, go to **NETWORKING > SSH** in the NextcloudPi web interface. Click the **Active** checkbox and enter a password for the pi account. Finally, click **Apply** to start the SSH service on the Raspberry Pi. By default, the password raspberry is set up for the user pi. You must change it to something different. After your first login through SSH, the system prompts you to change this password as well! +- **Set up a Firewall**: You can activate the firewall in the **Security > UFW** section. The Uncomplicated Firewall (UFW) is a frontend for the powerful but quite complex Netfilter firewall Iptables. The NextcloudPi developers simplify the setup by entering the three essential ports in the web interface that UFW should allow: 80 (HTTP), 443 (HTTPS), and 22 (SSH). Click **Active** and then **Apply** to start the firewall. In the dialogue window you can see messages from the operating system about added rules. +- **Fail2ban**: If you only use Nextcloud on your home network, you can do without the setup. If, on the other hand, Nextcloud is accessible from the Internet, then set up this additional protective measure via **SECURITY / fail2ban**. Fail2ban secures services against DoS attacks. For this purpose, the program blocks IP addresses after a certain number of failed connection attempts — first temporarily and then permanently. +- **TLS/SSL Certificates**: By default, NextcloudPi includes self-signed SSL/TLS certificates.This can lead to a warning. In the case of NextcloudPi in your local network, the warning is merely a technicality and you can define an exception for the respective web browser. Alternatively, you can generate valid TLS/SSL certificates with the [Let's Encrypt][17] certification authority (or set up your own Certification Authority). +- **Enable 2FA for Nextcloud**: You can activate the [two-factor authentication][18] (2FA) through the menu **Administration > Security**. In the [security section][19] of the Nextcloud app catalog, there are numerous apps that set up a second factor for logging in — provided by an app or as hardware (with a YubiKey, for example). If you have enabled two-factor authentication, set up an app password under **Personal > Security**. You can use this password for authentication in the Apple or Android devices so that the synchronization of contacts and calendars succeeds. For security reasons, the password is only displayed once. +- **Password Policies**: You can also set up password policies for Nextcloud in **Administration > Security**. For example, you can define a minimum password length, the number of days until a user password expires, and the number of login attempts before an account gets blocked. Additionally, you can forbid common passwords and enforce combinations of upper and lower case, numeric, and special characters. + +![Image showing how to update Nextcloud security.][20] + +For the security of an operating system, it is essential to install security updates promptly. For NextcloudPi, there are a total of three different updates: NextcloudPi updates, Nextcloud updates, and the apps installed. There are also updates for the underlying operating system (Raspberry Pi OS). Use the menu **Updates** in the NextcloudPi interface to activate notifications about new versions, automatic updates, and manual updates of Nextcloud apps. + +### Backup and restore + +Now that you have your own cloud, ideally within your own four walls — that's the end of the setup. The article could end right here. It could, that is, if there weren't one more essential topic to discuss: backups! The small SD cards in the Raspberry Pi are particularly prone to hardware defects compared to standard disks, but there can also be other reasons for hardware failure. NextcloudPi contains all the necessary tools to create automated backups and restore them in an emergency. + +You can immediately back up your data at any time via the NextcloudPi web interface. To do this, open the _nc-backup_ entry from the **BACKUPS** menu. The backups are better off on an external USB device than on the SD card — an external hard drive not only has more space but is also more reliable. To create a full backup that includes not only the NextcloudPi configuration but also the Nextcloud database, the Nextcloud apps and the users' data (calendar, contacts, and other files), activate the **Include data** checkbox. Optionally compress the data by ticking the checkbox **Compress**. An alternative to the full backup is to simply export the NextcloudPi configuration via the menu entry **BACKUPS > nc-export-ncp**. This way you only save the NextcloudPi settings — without the Nextcloud database, its configuration, and user data. + +To make things easier, you can activate automatic backups (**BACKUPS > nc-backup-auto**). Again, it's up to you whether you want to include the users' data and whether you want to compress the backups. In the default settings, NextcloudPi creates a full backup every seven days after clicking **Apply**. After four weeks, it overwrites the oldest version. Both methods, the manual backup and the automatic backup, have the advantage that they can be set up quickly. However, the backups can — depending on the amount of data in your Nextcloud — take up a large amount of space, even if they are compressed. As the amount of data grows, NextcloudPi also needs more time to create the backups. The cloud is in maintenance mode during this time and cannot be used. + +As an alternative, you can create incremental backups by creating and synchronizing Btrfs snapshots. This backup method saves disk space and is significantly more performant than the other approaches. Especially for large amounts of data in the cloud. This variant has a real advantage: during the backup, Nextcloud does not have to be put into maintenance mode, so there is no downtime. The B-tree FS (also called Butter FS) is a so-called Copy-On-Write file system (COW) and allows snapshots of the current data to be created from the running system. These are frozen images of a subvolume at the time of creation. They do not require any additional disk space. + +Please note: To do this, the Nextcloud data directory must be moved from the SD card (or another data medium) to a USB drive with a Btrfs file system. You may have already configured this in the configuration wizard, otherwise you can move the data: + +- Format the external USB drive with the Btrfs file system (**TOOLS > nc-format-USB**). +- Move the Nextcloud data directory to the external USB disk (**CONFIG > nc-datadir**). You should see the message `The NC data directory has been moved successfully` in the window below. +- As a test, you can now create a snapshot (**BACKUPS > nc-snapshot**) before activating the automatic snapshots feature. +- To create the snapshots automatically, open the **nc-snapshot-auto** entry from the **BACKUPS** menu, check **Active** and click **Apply**. NextcloudPi now automatically creates a Btrfs snapshot of the Nextcloud data directory every hour. + +The newly cloned directories only ever take up as much additional storage space as new files have been added since the last snapshot — so the whole thing is extremely efficient in terms of space. You can incrementally send the snapshots to another Btrfs file system. NextcloudPi supports you with the setup (**BACKUPS > nc-snapshot-sync**). You can choose either another external drive or a directory on a remote computer. This must be accessible over SSH (without a password) and the disk must also be formatted with Btrfs. + +After you have set up your backup strategy, you should always test whether you can restore your data with the NextcloudPi web interface. For almost all methods presented here, there is a corresponding menu item for recovery: + +- **nc-import-ncp:** import your NextcloudPi configuration +- **nc-restore-snapshot**: restore a specific snapshot +- **nc-restore**: restore a full backup of your Nextcloud + +![Image of a snapshot of Nextcloud.][21] + +### Explore Nextcloud + +There is an active Nextcloud community out there: + +- [Nextcloud forum][22] +- [NextcloudPi topics][23] in the Nextcloud forum +- [Bug reports and feature requests][24] for NextcloudPi +- [Matrix chat][25] + +The NextcloudPi developers have put together a [website][26] explaining which questions are best asked where. + +NextcloudPi offers a cost-effective and robust alternative to commercial cloud providers. By installing it on a Raspberry Pi, you can have control over your data and ensure privacy. With its compatibility with Android and Apple devices, it makes it easy to synchronize your appointments, contacts, and other data. The installation process is straightforward and can be completed in under 30 minutes. By taking the necessary steps to secure the system and implementing backup and restore methods, you can have peace of mind knowing your data is safe. + +For more in-depth information on NextcloudPi, you can check out my book_Nextcloud on the Raspberry Pi: Set up your own cloud with NextcloudPi_. It provides a comprehensive guide to setting up and using NextcloudPi, and will help you get the most out of your personal cloud solution — take the first step towards digital sovereignty! + +This article has been adapted from Heike Jurzik's book, [Nextcloud on the Raspberry Pi][27]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/nextcloudpi-nextcloud-raspberry-pi + +作者:[Heike Jurzik][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/hej +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/19/3/raspberry-pi-entertainment +[2]: https://opensource.com/article/21/1/minimal-server-raspberry-pi +[3]: https://opensource.com/article/22/9/home-automation-traefik-raspberry-pi +[4]: https://nextcloudpi.com/ +[5]: https://nextcloud.com/ +[6]: https://opensource.com/article/23/3/switch-google-nextcloud +[7]: https://opensource.com/article/23/3/switch-icloud-nextcloud +[8]: https://hub.docker.com/r/ownyourbits/nextcloudpi +[9]: https://github.com/nextcloud/nextcloudpi +[10]: https://opensource.com/article/18/7/getting-started-etcherio +[11]: https://opensource.com/sites/default/files/2023-02/Neztcloudetcher.png +[12]: https://opensource.com/sites/default/files/2023-02/Nextcloudbrowseractivation.png +[13]: https://opensource.com/sites/default/files/2023-02/NextCloudConfiguration-Wizard.png +[14]: https://nextcloudpi.local +[15]: https://nextcloudpi.local:4443 +[16]: https://opensource.com/sites/default/files/2023-02/Nextcludcontrol.Page_.png +[17]: https://letsencrypt.org/ +[18]: https://docs.nextcloud.com/server/latest/user_manual/en/user_2fa.html +[19]: https://apps.nextcloud.com/categories/security +[20]: https://opensource.com/sites/default/files/2023-02/Nextcloudsecuringdata.png +[21]: https://opensource.com/sites/default/files/2023-02/Nextcloudsnapshot.png +[22]: https://help.nextcloud.com/ +[23]: https://help.nextcloud.com/tag/ncp +[24]: https://github.com/nextcloud/nextcloudpi/issues +[25]: https://matrix.to/#/%23nextcloudpi:matrix.org +[26]: https://help.nextcloud.com/t/forum-github-or-chat-which-to-use-when/126318 +[27]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 \ No newline at end of file From 4d9274a2ff28f371ee96631dcf7f231bf9b30736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:08:25 +0800 Subject: [PATCH 034/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230308.6=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Th?= =?UTF-8?q?e=20power=20of=20sisterhood=20and=20allyship=20in=20open=20sour?= =?UTF-8?q?ce.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...power of sisterhood and allyship in open source.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/talk/20230308.6 ⭐️⭐️ The power of sisterhood and allyship in open source.md diff --git a/sources/talk/20230308.6 ⭐️⭐️ The power of sisterhood and allyship in open source.md b/sources/talk/20230308.6 ⭐️⭐️ The power of sisterhood and allyship in open source.md new file mode 100644 index 0000000000..3f3653e8bc --- /dev/null +++ b/sources/talk/20230308.6 ⭐️⭐️ The power of sisterhood and allyship in open source.md @@ -0,0 +1,110 @@ +[#]: subject: "The power of sisterhood and allyship in open source" +[#]: via: "https://opensource.com/article/23/3/power-sisterhood-allyship-open-source" +[#]: author: "Paloma Oliveira https://opensource.com/users/discombobulateme" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +The power of sisterhood and allyship in open source +====== + +A little more than two years ago, I switched my career from artist to [software developer][1]. I didn’t do it alone. I had the support of PyLadies Berlin, the local Berlin chapter of an international volunteer-based group made to support women in technology. + +We are used to the term “career change” as if it were a break in a trajectory. But in my experience, that’s never really the case. A person cannot erase themselves from what they consist of, and this richness of diverse backgrounds resulted in several breaking points. Individual journeys, often far from computer science, hold accountability for the social implication of technology and bring richness and creativity to the technology industry. + +Being an artist has always given me freedom and opened doors to explore several fields, from architecture to sciences. A great part of my artistic experience took place in hackerspaces in Brazil, surrounded by the Free/Libre Open Source Software (FLOSS) ideology, the open free/libre culture of sharing. Nowadays, for several ideological and practical reasons that do not fall within the scope of this article, the most common term is “open source”. And lucky for me, my career switch started with an internship in an Open Source Program Office (OSPO), which made this switch feel — almost — like home. + +### Standing on the shoulders of giants + +We all benefit from open source. Whether you code or not, the software you use relies on it. Since it is an open culture where everything is built upon the work of others, it’s common to hear the term “standing on the shoulders of giants”, which refers to the idea that advancements are built upon the work and contributions of those who came before us. This highlights the importance of learning from the experiences and accomplishments of others. + +This article is meant to unveil whose shoulders I am standing on. And this is not only to show my gratitude to them but also to answer a question I was asked while being interviewed by Kevin Ball and Christopher Hiller at JSParty: What can you do to improve diversity in your surroundings? + +“Standing on the shoulder of giants” regards not only to open source but its the base of sisterhood in technology by recognizing female pioneers and leaders’ roles in the field. By acknowledging the contributions of women who came before us, we can gain inspiration and insight into the challenges they faced and learn from their experiences in overcoming some shackles. In this way, we “stand on the shoulders of giants” and build upon their work to create a more inclusive and supportive environment for women and _underestimated_ [2] people in technology. + +By supporting one another, recognizing the importance of learning from the experiences of others, and forming a supportive network, we can work together to overcome challenges and build a better future for all by creating a more equitable environment. By doing so, we are creating new giants for others to stand upon in the future. + +### Organizing a local community: Meili Triantafyllidi and Jessica Greene + +I joined PyLadies Berlin, which was founded by Meili in 2013. Jessica, one of the organizers, was a junior software engineer at Ecosia. Being a community organizer means using your free time to passionately do all the work needed to create a safe, supportive networking and learning space. It includes finding a hosting place, promoting the event, curating themes, finding speakers, and most importantly, listening to the needs of the community. + +Being new in a multicultural city and trying to find my place in it, PyLadies was less a place to learn Python and more a center to be welcomed and understood. + +According to the narrative we are told, tech is the new promise land everyone is heading to, with infinite job postings, freedom to switch countries, and a well-paid careers. This isn’t being offered in other sectors, or at least not at this scale. And communities focused on bringing diversity to the space offer to make this a realistic possibility for everyone. + +Every event starts with community announcements, a simple slide containing an agenda, and promotions for similar events. Two of the events I heard guided me to my career path: the Rail Girls Summer of Code program and the FrauenLoop. Feeling compelled to contribute back to the supportive community I’d already received, I became one of the co-organizers. + +### Networking and learning: FrauenLoop + +Founded by Dr. Nakeema Stefflbauer in 2016, FrauenLoop has committed to changing the face of EU-based tech companies. The program is divided in 3 months cycles, which are composed of weekly evening classes and weekend workshops to train women who don’t have a tech industry connection. + +The learning curriculum is developed around the professional needs of women, from technical industry-focused classes to workshops delivered by women on how the tech industry really works and how to successfully navigate it. Some common topics are salary negotiation and practicing technical interviews. Most recently, in response to the layoffs, there was a workshop run with the Berlin Tech Workers Coalition about Demystifying the Termination Challenge Process. + +The focus is on women, especially migrants, the ones changing family status and careers who are really ready to go job searching. + +Being around Nakeema is itself an inspiration. The program was a starting point for understanding what coding means and learning the basics of web development. But the greatest part was connecting with others who would later become PyLadies co-organizers, speakers, mentors in side projects, and friends. + +FrauenLoop also gives its students the opportunity to go back as mentors. For me, this was the breaking point that definitively set my path. I have been a mentor for over a year, and it has improved my confidence in myself and reinforced my own learning. Being challenged by the responsibility to facilitate the learning to others, you inevitably have to learn. + +There I met Victoria Hodder, who was my partner applying to Rail Girls Summer of Code. + +### Diversity programs: from Rail Girls Summer of Code to Ecosia Summer of Code + +Rail Girls Summer of Code was a global fellowship program for women and non-binary coders where successful applicants received a three-month scholarship to work on existing open source projects. The program was active from 2013 to 2020. + +The application was submitted by a team, meaning two people from the same city. While it was a remote program, having a local peer ensured accountability and support. + +It also required a place to work, an environment suitable for working for three months. This place could be your home, a co-working space, a work office, or in the best-case scenario, a coaching company. Although the coaching company had no obligation beyond offering a space to work, it connected us with a local company and gave us a space to have visibility and network with people within the industry we wanted to enter. + +Jessica, my PyLadies Berlin co-organizer, had kick-started her career in tech with the program. She proposed Ecosia, her then and current company, to be the coaching company for two teams. One team was myself and Victoria (we focused on web development) and the other was Taciana Cruz and Karina Cordeiro (they focused on data). + +During the three month application period, the COVID-19 pandemic hit hard. Victoria and I had been _sort of_ selected for the Rail Girls Program after getting involved with the [if-me][2] project. _Sort of selected._ Communication with Rail Girls got really messy by the end of the selection period until they finally canceled the program at the last minute. + +We were all devastated. The weight of the pandemic hit us hard, crushing not only a chance for a paid job but a dream of starting a new career that had been cultivated for so long. + +Jessica, a junior software developer at the time, knew that. So she took a step further and, instead of feeling powerless, she took a stand. She piled more work on top of her personal struggles navigating her new role and created the [Ecosia Summer of Code][3]. + +Ecosia couldn’t cover scholarships, but Jessica developed a mentorship instead. The program used the company’s available resources, offering mentorship from highly qualified professionals to fill gaps in our knowledge. As Victoria and Karina dropped the initiative, needing paid jobs, Taciana and I managed to continue on individual projects. We found common themes to work on and supported each other. + +About a year later, I was invited by one of those mentors, Jakiub Fialla, to talk about open source to the company. I am still connected with a few others, and every now and then, I stop by and meet some of them when they host PyLadies Berlin events. How sweet is that? + +### Sponsoring diversity: Coyotiv and Armagan Amcalar + +When Rail Girls was canceled, I saw an Instagram post about a bootcamp offering a full stack web development program scholarship. + +The application was fairly simple, so I applied. I quickly received a spontaneous invite for an interview. Depressed, messy, and hopeless, I attended without any preparation, so I was brutally honest. The conversation was equally honest, which I highly appreciated. + +The interviewer was Armagan Amcalar, the founder of the [Coyotiv School Of Software Engineering][4]. Coming from a music background, Armagan is creative and thinks critically about the world around him. The school itself started after he offered free crash courses in Women Techmakers Berlin for three years. He doesn’t use a rote diversity speech, he acts upon it, offering scholarships to all full-time participants. + +I got the scholarship, and together with four other people (3 of them women), the first cohort was formed. Bootcamp lasted for 17 super intense weeks. This was fundamental in changing my perspective on code. Unlike other places I had tried to learn, the least of Armagan’s concerns is about the framework we choose. Instead, it was all about understanding what we were doing, and thinking about software engineering as a creative, powerful tool shaping the world we live in. I didn’t get just a scholarship, I got a friend and a mentor for life who offered me a turn and opened a door for a better life. + +Do you think I am overreacting? Talk to people around me. My partner, who has known me for about 14 years at this point, commented on how much I had changed. Disciplined, vibrating, happy about the things I was learning along the way, having deep conversations about software and its surroundings, not being conflicted, letting go a life-long career in arts, and finding a purpose. It was so remarkable that he joined a few cohorts after me. + +The school provided me with technical knowledge, interview training, CV support, and public speaking training. Graduation was not only about developing a personal full-stack project. You also had to give back to open source, in recognition that so much software is built upon it, by publishing a library on npm. Node Package Manager (npm), is a Javascript package repository that allows you to reuse code by easily installing it within your Javascript-based projects. Although I have been involved with the free software movement and open source for over a decade, I’d never thought I could give back to it with actual code. + +### My contribution + +This is how [rainbow-penguin][5] was born. It’s an npm library that sends motivational messages to developers while coding. Maybe it’s not a very functional tool. Still, to me, it was a needed tool based on my personal experience wading through the frustrations of learning to code, contributing to the if-me project, and hearing so many similar stories from other learners. + +Through my experiences in these programming communities, I learned that code is much bigger than the lines of code, and how powerful and necessary it is to have allies. No matter who you are or what you think you know, there are opportunities within the free and open source software communities. Your participation doesn't have to be big, because together our contributions are greater than their sum. Take the first step. Find your allies within open source. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/power-sisterhood-allyship-open-source + +作者:[Paloma Oliveira][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/discombobulateme +[b]: https://github.com/lkxed/ +[1]: https://enterprisersproject.com/article/2022/9/software-developer-day-life?intcmp=7013a000002qLH8AAM +[2]: https://www.if-me.org/ +[3]: https://blog.ecosia.org/ecosia-summer-of-code-mentoring/ +[4]: https://www.coyotiv.com/ +[5]: https://www.npmjs.com/package/rainbow-penguin \ No newline at end of file From 8029e70718970e9427d4a3285be217d4caf0d50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:17:45 +0800 Subject: [PATCH 035/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230308.7=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20To?= =?UTF-8?q?p=205=20Best=20EPUB=20Readers=20for=20Linux=20[Compared].md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Top 5 Best EPUB Readers for Linux [Compared].md | 272 ++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md diff --git a/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md b/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md new file mode 100644 index 0000000000..270d1331f7 --- /dev/null +++ b/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md @@ -0,0 +1,272 @@ +[#]: subject: "Top 5 Best EPUB Readers for Linux [Compared]" +[#]: via: "https://www.debugpoint.com/epub-readers-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 5 Best EPUB Readers for Linux [Compared] +====== + +**Are you looking for the best EPUB readers for Linux? Here are the best FOSS EPUB readers for you.** + +Are you an avid Linux user who loves reading ebooks? If yes, you must know that the default document viewer on most of the Linux distros may not meet all your requirements for being a bookworm. + +EPUB is a widely used open ebook format supported by most ebook readers. Thankfully, several EPUB reader apps are available in the Ubuntu software centre and other repositories that you can download for free. + +But remember, there are only a couple of good readers available. Not many! + +In this article, we’ll discuss the best EPUB readers for Ubuntu Linux that will enhance your reading experience. We’ll also explore their features and benefits, so you can choose the one that suits your needs. + +But before that, what features should you look for in a “good” EPUB reader? + +### Features to Look for in an EPUB Reader + +- **User Interface**: A good EPUB reader should have a clean and intuitive user interface that makes navigating and customising your reading experience easy. It’s not a physical book you are reading, so the user interface is essential for the “physical book” reading experience! +- **Customization**: The ability to customize the font size, font type, background colour, and other settings is an essential feature that enhances your reading experience. +- **Bookshelf**: A bookshelf is a handy feature that allows you to organize your EPUB files and keep track of your reading progress. +- **Annotation**: The ability to highlight, underline, and add notes to your EPUB files is a valuable feature that helps you remember important points. +- **Syncing**: If you read EPUB files on multiple devices, syncing your reading progress and bookmarks are essential to avoid losing track of your progress. + +Now, let’s take a look at the best EPUB readers for Ubuntu and other Linux that offer all the features mentioned above. + +### Best EPUB readers for Ubuntu and other Linux distros + +#### Calibre + +The first on this list is Calibre which is the best & complete ebook management solution. It is a powerful EPUB reader that also serves as an ebook management tool. It is a popular choice among users due to its extensive feature set, including the ability to convert EPUB files to different formats, edit EPUB files, and even create your own EPUB files. Calibre also has a user-friendly interface and allows you to customize your reading experience. + +![Calibre welcome wizard][1] + +Calibre is continuously updated, with features and enhancements pouring in every month. It is very active in its development and one of the best on this list. + +- Supports several ebook devices (Android, iOS based) +- EPUB reader and manager +- Custom rating and tagging for your ebook library +- Fetch ebook metadata from the internet +- Read news from popular news sources and make ebooks! +- Upload ebooks to Kindle and other readers with the auto converter (with download as well) +- Built-in browser to shop ebooks + +![Calibre main window][2] + +![Uploading books to Calibre][3] + +You can download Calibre from the official website. Alternatively, you can [set up Flatpak & Flathub][4] for your Linux distribution and hit the below button to install (or use the command): + +[Install Calibre as Flatpak][5] + +``` +flatpak install com.calibre_ebook.calibre +``` + +For other download options (Windows, macOS and native Linux packages), visit [this page][6]. + +#### Foliate + +We featured Foliate in [part 3 of best Ubuntu apps][7] series earlier. It is a lightweight and modern EPUB reader that offers a range of customization options. It’s based on GTK4 and seamlessly integrates itself with the GNOME desktop. It has a sleek interface that is easy to navigate and the ability to customize font size, font type, and line spacing. + +![Foliate main window and settings][8] + +Foliate also includes a dark mode for nighttime reading and the option to adjust the colour temperature built-in to reduce eye strain. + +**Feature summary:** + +- Immersive view with autohide feature of main top bar for reading +- Catalogue view with direct download support from major ebook websites +- Multiple views – two-page and scrolling view +- Custom font and line-spacing +- Built-in brightness control, which applies to the app only! +- Reading progress sliders +- Bookmark, annotation support +- Search inside book +- Quick dictionary lookup + +![Foliate reader view][9] + +![Foliate library view][10] + +The best way to download Okular is using Flatpak. Set up your [system for Flatpak & Flathub][4] and using the below link to install it (or use the command mentioned below): + +[Install Foliate using Flatpak][11] + +``` +flatpak install com.github.johnfactotum.Foliate +``` + +To learn more about Foliate, visit the official [website][12]. + +#### Okular + +KDE’s own document viewer is Okular which also supports EPUB files. It is a feature-rich application that offers a range of customization options, including font size, font type, and background colour. Okular also has a built-in annotation feature, which you can use to annotate your EPUB files. It also supports a wide range of file formats: + +- EPUB +- PDF +- DjVU +- Image files: JPEG, PNG, GIF, Tiff, WebP +- Comics files: CBR and CBZ + +However, you can’t manage ebook collections or download ebooks using Okular. + +![Okular][13] + +You can install Okular in Ubuntu and other related distribution using: + +``` +sudo apt install okular +``` + +For Fedora and related distros: + +``` +sudo dnf install okular +``` + +If you prefer Flatpak, set up your system as Flatpak and install it using the below link (or use the command mentioned below): + +[Install Okular as Flatpak][14] + +``` +flatpak install org.kde.okular +``` + +#### Bookworm + +The next EPUB reader on this list is Bookwork, which is totally underrated in my opinion. It is actually an elementary OS app but available for installation for all Linux distributions. + +It has a clean interface and offers a range of customization options, including font size, font type, and background colour. Bookworm also allows you to organize your EPUB files into collections and keep track of your reading progress. + +![Bookworm library view][15] + +In addition, you can easily manage your EPUB books using a built-in tag editor and rating system. Also, it has support for annotation, search, chapter and keyboard-driven browsing. + +Last but not least, it supports EPUB, MOBI, PDF, EB2, CBR and CBZ files. + +![Bookworm EPUB reader view][16] + +Installation is easy. If you are an elementary OS user, you can search for “bookworm” in AppCenter. + +For Ubuntu and related distros, you can install it using the below PPA: + +``` +sudo add-apt-repository ppa:bookworm-team/bookwormsudo apt-get updatesudo apt-get install com.github.babluboy.bookworm +``` + +If you prefer Flatpak, set up your system for Flathub & Flatpak and install it using the below command: + +``` +flatpak install com.github.babluboy.bookworm +``` + +To learn more, visit the [official website][17]. + +#### FBReader + +The final app in this best EPUB readers list is FBReader. Before you read, note that it was open source until 2015. But now, it is not open source. However, a developer SDK is available. + +It is a popular and versatile EPUB reader that is available for all Linux distros. It has a simple and user-friendly interface allows you to customize your reading experience. FBReader also supports various ebook formats, including EPUB, MOBI, FB2 and HTML. It also offers a bookshelf feature that allows you to organize your ebooks and keep track of your reading progress. + +FBRedaer also supports cloud sync of your library between your devices. + +![FBReader][18] + +Installing FBReader is a little difficult for Linux since it is only available as a Snap package. You can install it using snap as below after [setting up your system for Snap][19]. + +``` +sudo snap install fbreader +``` + +To learn more about FBReader, visit the official [website][20]. + +### More EPUB readers for Linux + +**Koodo reader** + +It’s a fairly new FOSS EPUB reader with tons of features. And it looks great too. The only thing is it is built using Javascript, HTML and TypeScript. So, not a native app, but it’s fast. You might want to give it a try. Koodo reader comes with AppImage, native deb and RPM files for Linux. + +You can [download here][21], and here are some screenshots. + +![Koodo EPUB reader][22] + +![Koodo - reader view][23] + +![Koodo options][24] + +There are two other EPUB readers but they are now discontinued, unfortunately. + +- [GNOME Books][25] +- [epub CLI reader][26] + +### Comparison Table of the EPUB readers + +To make it easier for you to choose the right EPUB reader for your needs, we’ve created a comparison table highlighting each EPUB reader’s key features described above. + +| EPUB Reader | User Interface | Customization | Bookshelf | Annotation | Syncing | +| :- | :- | :- | :- | :- | :- | +| Calibre | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| Foliate | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | +| Bookworm | ✔️ | ✔️ | ✔️ | ❌ (limited) | ❌ | +| Okular | ✔️ | ✔️ | ❌ | ❌ (limited) | ❌ | +| FBReader | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | + +### Where to get free ebooks? + +Many websites give you vast collections of comics and novels from prominent authors. The best website is “Project Gutenberg”. Here you can download 60,000+ ebooks from all categories. + +Visit the website using the link below. Once you have downloaded it, you can use any of the above EPUB readers to make your personal ebook collection and enjoy. + +[Project Gutenberg][27] + +You can also try _standard ebooks_with a refined collection of free e-books. + +[Standard eBooks][28] + +### Conclusion + +In conclusion, several EPUB readers are available for Linux that offer a range of features to enhance your reading experience. Calibre is an excellent choice if you’re looking for a feature-rich EPUB reader that also functions as an ebook management tool. Foliate & Bookworm is a lightweight and modern app perfect for those who value customization options. + +I hope with the above comparison and detailed descriptions; you can now choose the best EPUB reader for your needs. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/epub-readers-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/wp-content/uploads/2023/03/Calibre-welcome-wizard.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2023/03/Calibre-main-window.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Uploading-books-to-Calibre.jpg +[4]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[5]: https://dl.flathub.org/repo/appstream/com.calibre_ebook.calibre.flatpakref +[6]: https://calibre-ebook.com/download +[7]: https://www.debugpoint.com/necessary-ubuntu-apps-2022/ +[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-main-window-and-settings.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-reader-view.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-library-view.jpg +[11]: https://dl.flathub.org/repo/appstream/com.github.johnfactotum.Foliate.flatpakref +[12]: https://johnfactotum.github.io/foliate/ +[13]: https://www.debugpoint.com/wp-content/uploads/2023/03/Okular.jpg +[14]: https://dl.flathub.org/repo/appstream/org.kde.okular.flatpakref +[15]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bookworm-library-view.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bookworm-EPUB-reader-view.jpg +[17]: https://babluboy.github.io/bookworm/ +[18]: https://www.debugpoint.com/wp-content/uploads/2023/03/FBReader.jpg +[19]: https://www.debugpoint.com/how-to-install-and-use-snap-packages-in-ubuntu/ +[20]: https://fbreader.org/en +[21]: https://koodo.960960.xyz/en +[22]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-EPUB-reader.jpg +[23]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-reader-view.jpg +[24]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-options.jpg +[25]: https://gitlab.gnome.org/Archive/gnome-books +[26]: https://github.com/rupa/epub +[27]: https://www.gutenberg.org/ +[28]: https://standardebooks.org/ebooks From 504847f43ed026a870e4a9afccbd2f7b92e5dcd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:18:28 +0800 Subject: [PATCH 036/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230309.0=20=E2=AD=90=EF=B8=8F=20Postgres=20DevOps=20?= =?UTF-8?q?database=20administrator=20A=20day=20in=20the=20life.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ps database administrator A day in the life.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md diff --git a/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md b/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md new file mode 100644 index 0000000000..20fc52b725 --- /dev/null +++ b/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md @@ -0,0 +1,71 @@ +[#]: subject: "Postgres DevOps database administrator: A day in the life" +[#]: via: "https://opensource.com/article/23/3/postgres-devops-dba" +[#]: author: "Doug Ortiz https://opensource.com/users/dougortiz" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Postgres DevOps database administrator: A day in the life +====== + +A Postgres DevOps DBA plays a critical role in modern IT organizations that rely on Postgres as their primary database management system. The role of a Postgres DevOps DBA involves many responsibilities, skills, and tasks. A few of these include: Managing the database design and architecture, infrastructure management, ensuring high availability, security, and performing routine maintenance tasks (tuning, backup and recovery, and monitoring). + +This article summarizes the common responsibilities and skills expected of a Postgres DevOps DBA in today's enterprise environments. + +### Database design and architecture + +Two primary responsibilities of a Postgres DevOps DBA are database design and architecture. This role must have a greater understanding of the application's data storage requirements and the business logic involved. This knowledge includes designing and creating database schemas and tables. It also means configuring indexes and other database objects to optimize query performance, and choosing the right version of Postgres to use. The role must ensure the database is designed for scalability and maintainability, considering future growth and data retention needs. + +### Performance tuning + +Another critical area of responsibility is performance tuning. A Postgres DevOps DBA must be able to identify and resolve performance issues by monitoring database performance metrics and analyzing query performance. The role must also have a deep understanding of the database and be able to configure it for optimal performance, including optimizing queries and indexes, tuning memory settings, and identifying and addressing performance bottlenecks. + +### Backup and recovery + +Backup and recovery are also key areas of responsibility. The DBA must have a solid understanding of backup and recovery solutions and must design and implement a backup strategy that ensures that data is always recoverable in the event of data loss. They must also validate the recovery process and implement high-availability and disaster recovery solutions to minimize downtime and data loss. + +### Security + +Security is another critical area of responsibility. The DBA ensures the database is secure by implementing access controls, encryption, and other security measures to protect the data. They must also stay up-to-date with the latest security trends and best practices and implement them to protect against potential threats. + +### Infrastructure management + +Infrastructure management is also a key responsibility. These DBAs must manage the hardware, network, and storage infrastructure and provision the infrastructure to support Postgres. They must also configure the infrastructure for performance and availability and scale the infrastructure as necessary to accommodate data growth. + +**[ Related read: [3 tips to manage large Postgres databases][1] ]** + +### Automation and scripting + +This role must be able to automate repetitive tasks such as backups, monitoring, and patching using tools like [Ansible][2], Terraform, and [Kubernetes][3]. They must also be familiar with automation best practices to ensure tasks are automated efficiently and effectively. Automation reduces the potential for human error, improves efficiency, and allows the DBA to focus on more complex tasks. + +### Monitor and configure alerts + +Monitoring the database and infrastructure and setting up alerts to notify them of issues is extremely important. The role must also take proactive measures to prevent downtime and data loss, using monitoring tools like Nagios, Zabbix, and Prometheus to detect potential issues. + +### Collaboration + +In addition to these technical responsibilities, a PostgreSQL DevOps DBA must also collaborate with other IT teams, such as developers, operations, and security, to integrate the database into the larger IT ecosystem. The DBAs must also document their work and stay up-to-date with the latest trends and best practices in Postgres and [DevOps][4]. This involves engaging with stakeholders to gather requirements, establish priorities, and align the database with the organization's broader goals. + +### Wrap up + +In conclusion, a Postgres DevOps DBA plays a critical role in modern IT organizations that rely on Postgres as their primary database management system. How do your current skills and expectations match this list? Are you on the right track to excel as a DBA in modern database environment? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/postgres-devops-dba + +作者:[Doug Ortiz][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/dougortiz +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/manage-large-postgres-databases +[2]: https://opensource.com/article/19/2/quickstart-guide-ansible +[3]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=7013a000002qLH8AAM +[4]: https://opensource.com/article/20/12/remote-devops \ No newline at end of file From c0f57551f4f3ec567f0cc9207f78e9b64a1add09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:20:22 +0800 Subject: [PATCH 037/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230309.1=20=E2=AD=90=EF=B8=8F=20Contribute=20to=20op?= =?UTF-8?q?en=20source=20without=20code.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️ Contribute to open source without code.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/talk/20230309.1 ⭐️ Contribute to open source without code.md diff --git a/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md b/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md new file mode 100644 index 0000000000..8af8044d1d --- /dev/null +++ b/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md @@ -0,0 +1,91 @@ +[#]: subject: "Contribute to open source without code" +[#]: via: "https://opensource.com/article/23/3/non-code-contribution-open-source" +[#]: author: "Debra Chen https://opensource.com/users/debra-chen" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Contribute to open source without code +====== + +An open source "community" means different things to different people. I think of open source a little like "falling in love" because it is about people and relationships. Treat open source as a community because, without people, there is no source, open or otherwise. + +I'm a member of the [Apache DolphinScheduler][1] community. Because that project is intentionally low-code, it appeals to many [people who aren't software developers][2]. Sometimes, people who don't write code aren't sure whether there's a meaningful way to contribute to an open source project that exists mainly because of source code. I know from experience that there is, and I will explain why in this article. + +### Contributions to the community + +In the Apache DolphinScheduler project, I'm mainly responsible for global operation, influence, and caring for the community. + +Some people say that projects are big trees, with open source being the soil. That's an apt analogy, and it demonstrates the importance of actively nurturing the thing you're trying to help grow. + +I have a simpler idea: Do everything possible to make it good. + +A community requires constant attention, not because it's needy but because it is part of life. Community is the people living amongst you, whether in your physical or online space. + +Since joining the open source community, I have independently initiated and organized events, including: + +- Coordinated on average one meetup in China a month. +- Recommended the community participate in the technology shares within the big data field. +- Coordinated with almost all of the open source projects within China's "big data" field, visiting and communicating with those communities individually. + +In my opinion, an excellent project should grow in a good ecology. And a community needs to go out to exchange ideas, share resources, and cooperate with other excellent communities. Everyone should feel the benefits brought to the community in their work. + +My overseas expansion follows the same pattern. Of course, it's difficult to do that effectively due to differences in cultures and languages. It takes energy, but it's worth it. + +So far, we have successfully held meetups overseas, including in the United States, India, Singapore, Germany, France, Finland, and more. + +So how do I contribute to DolphinScheduler? Am I committing code to the project? Am I a community manager? Do I have an official title? + +I think of myself as an assistant. I foster communication and connection, and that, as much as any code contribution, is an example of the "Apache Way." + +### Get started with DolphinScheduler + +I first learned about open source when I worked at OpenAtom Foundation as an open source education operation manager. As China's first open source foundation, OpenAtom operates many projects, exemplified by [OpenHarmony][3]. + +I joined the DolphinScheduler community and found a group of people who were eager to share knowledge, provide guidance and support, and keen to help others discover a tool they would find useful in their own lives. + +DolphinScheduler aims to be an influential scheduler worldwide, helping teams work in an [Agile][4] and efficient way. + +### First impressions of the community + +It's common to hear complaints from the community about project development. We all have complaints from time to time. Maybe you reported a bug, but the developers didn't address your problem. Or maybe you had a great idea for a feature, but the team ignored it. If you're a member of an open source community, you've heard these grievances before, and if you haven't, you eventually will. + +I've learned that these voices are all important to an open source community. It's a good sign when you hear this feedback because it means the community is willing to find bugs, report them, and ask and answer questions. Hearing those complaints may reveal places in the project's structure that need to be improved. Is there a volunteer from the community who can respond to bug reports and triage them so they get to the right developer? Is there a volunteer group waiting to be formed to respond promptly to questions from newcomers in your project's Discourse or forum? + +A greeter at the door of your open source project can help invite tentative community members in. A greeter can also ensure that there's no "gatekeeping" happening. Everyone's welcome and everyone has something to contribute, even if all they can offer is an atmosphere of helping one another. + +As much as you or I wish we could solve technical issues for everyone, it's not practical. But anyone can be willing to help find a solution—that's one of the great strengths of a community. These users spontaneously serve as their community's "customer service" department. + +Within the DolphinScheduler project, we have many (Yan Jiang, Xu Zhiwu, Zhang Qichen, Wang Yuxiang, Xiang Zihao, Yang Qiyu, Yang Jiahao, Gao Chufeng, and Gao Feng, in no particular order!). Even though they don't develop the solution, they work tirelessly to find the person who can. + +### Words to the community + +If you want to become a committer through non-code contributions or don't have time to make a code contribution, then the first step is to join the community. There's no sign-up form or approval process, but there's also no fast track. You join a community by participating. Through reliable and consistent participation, you develop relationships with others. + +I'm available for a chat and always eager to talk about global event organization, documentation, feedback, and more. + +### Become a committer + +Apache DolphinScheduler faces many challenges. Many companies, even ones that support open source, choose non-open business tooling. I want to work with community partners to make DolphinScheduler a world-class scheduling tool. I hope everyone can harvest the technical achievements they want and that DolphinScheduler helps get them there. + +Join our community and help us promote an open and Agile way of working. Or find a project in need of your non-coding skills. Find out just how cool and fun it is to empower a community of your peers! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/non-code-contribution-open-source + +作者:[Debra Chen][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/debra-chen +[b]: https://github.com/lkxed/ +[1]: https://dolphinscheduler.apache.org/en-us +[2]: https://opensource.com/article/21/2/what-technical +[3]: https://gitee.com/openharmony +[4]: https://opensource.com/article/22/5/practical-tips-agile \ No newline at end of file From 406410a77eaabf2ad28c451127b9e810bd86e09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:20:58 +0800 Subject: [PATCH 038/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230309.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Co?= =?UTF-8?q?mpiler=20optimization=20and=20its=20effect=20on=20debugger=20li?= =?UTF-8?q?ne=20information.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ion and its effect on debugger line information.md | 334 ++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 sources/tech/20230309.2 ⭐️⭐️ Compiler optimization and its effect on debugger line information.md diff --git a/sources/tech/20230309.2 ⭐️⭐️ Compiler optimization and its effect on debugger line information.md b/sources/tech/20230309.2 ⭐️⭐️ Compiler optimization and its effect on debugger line information.md new file mode 100644 index 0000000000..62b8dc1406 --- /dev/null +++ b/sources/tech/20230309.2 ⭐️⭐️ Compiler optimization and its effect on debugger line information.md @@ -0,0 +1,334 @@ +[#]: subject: "Compiler optimization and its effect on debugger line information" +[#]: via: "https://opensource.com/article/23/3/compiler-optimization-debugger-line-information" +[#]: author: "Will Cohen https://opensource.com/users/wcohen" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Compiler optimization and its effect on debugger line information +====== + +In my [previous article][1], I described the DWARF information used to map regular and inlined functions between an executable binary and its source code. Functions can be dozens of lines, so you might like to know specifically where the processor is in your source code. The compiler includes information mapping between instructions and specific lines in the source code to provide a precise location. In this article, I describe line mapping information, and some of the issues caused by compiler optimizations. + +Start with the same example code from the previous article: + +``` +#include +#include + +int a; +double b; + +int +main(int argc, char* argv[]) +{ + a = atoi(argv[1]); + b = atof(argv[2]); + a = a + 1; + b = b / 42.0; + printf ("a = %d, b = %f\n", a, b); + return 0; +} +``` + +The compiler only includes the line mapping information when the code is compiled with debugging information enabled (the `-g` option): + +``` +$ gcc -O2 -g example.c -o example +``` + +### Examining line number information + +Line information is stored in a machine readable format, but human readable output can be generated with `llvm-objdump` or `odjdump`. + +``` +$ llvm-objdump --line-numbers example +``` + +For the main function, you get output listing the assembly code instruction with the file and line number associated with the instruction: + +``` +0000000000401060
: +; main(): +; /home/wcohen/present/202207youarehere/example.c:9 + 401060: 53 pushq %rbx +; /usr/include/stdlib.h:364 + 401061: 48 8b 7e 08 movq 8(%rsi), %rdi +; /home/wcohen/present/202207youarehere/example.c:9 + 401065: 48 89 f3 movq %rsi, %rbx +; /usr/include/stdlib.h:364 + 401068: ba 0a 00 00 00 movl $10, %edx + 40106d: 31 f6 xorl %esi, %esi + 40106f: e8 dc ff ff ff callq 0x401050 +; /usr/include/bits/stdlib-float.h:27 + 401074: 48 8b 7b 10 movq 16(%rbx), %rdi + 401078: 31 f6 xorl %esi, %esi +; /usr/include/stdlib.h:364 + 40107a: 89 05 c8 2f 00 00 movl %eax, 12232(%rip) # 0x404048 +; /usr/include/bits/stdlib-float.h:27 + 401080: e8 ab ff ff ff callq 0x401030 +; /home/wcohen/present/202207youarehere/example.c:12 + 401085: 8b 05 bd 2f 00 00 movl 12221(%rip), %eax # 0x404048 +; /home/wcohen/present/202207youarehere/example.c:14 + 40108b: bf 10 20 40 00 movl $4202512, %edi # imm = 0x402010 +; /home/wcohen/present/202207youarehere/example.c:13 + 401090: f2 0f 5e 05 88 0f 00 00 divsd 3976(%rip), %xmm0 # 0x402020 <__dso_handle+0x18> + 401098: f2 0f 11 05 a0 2f 00 00 movsd %xmm0, 12192(%rip) # 0x404040 +; /home/wcohen/present/202207youarehere/example.c:12 + 4010a0: 8d 70 01 leal 1(%rax), %esi +; /home/wcohen/present/202207youarehere/example.c:14 + 4010a3: b8 01 00 00 00 movl $1, %eax +; /home/wcohen/present/202207youarehere/example.c:12 + 4010a8: 89 35 9a 2f 00 00 movl %esi, 12186(%rip) # 0x404048 +; /home/wcohen/present/202207youarehere/example.c:14 + 4010ae: e8 8d ff ff ff callq 0x401040 +; /home/wcohen/present/202207youarehere/example.c:16 + 4010b3: 31 c0 xorl %eax, %eax + 4010b5: 5b popq %rbx + 4010b6: c3 +``` + +The first instruction at `0x401060` maps to the original source code file `example.c` line 9, the opening `{` for the main function. + +The next instruction `0x401061` maps to line 364 of `stdlib.h` line 364, the inlined `atoi` function. This is setting up one of the arguments to the later `strtol` call. + +The instruction `0x401065` is also associated with the opening `{` of the main function. + +Instructions `0x401068` and `0x40106d` set the remaining arguments for the `strtol` call that takes place at `0x40106f`. In this case, you can see that the compiler has reordered the instructions and causes some bouncing between line 9 of `example.c` and line 364, or the `stdlib.h` include file, as you step through the instructions on the debugger. + +You can also see some mixing of instructions for lines 12, 13, and 14 from `example.c` in the output of `llvm-objdump` above. The compiler has moved the divide instructions (`0x40190`) for line 13 before some of the instructions for line 12 to hide the latency of the divide. As you step through the instructions in the debugger for this code, you see the debugger jump back and forth between lines rather than doing all the instructions from one line before moving on to the next line. Also notice as you step though that line 13 with the divide operation was not shown, but the divide definitely occurred to produce the output. You can see GDB bouncing between lines when stepping through the  program's main function: + +``` +(gdb) run 1 2 +Starting program: /home/wcohen/present/202207youarehere/example 1 2 +[Thread debugging using libthread_db enabled] +Using host libthread_db library "/lib64/libthread_db.so.1". + +Breakpoint 1, main (argc=3, argv=0x7fffffffdbe8) at /usr/include/stdlib.h:364 +364 return (int) strtol (__nptr, (char **) NULL, 10); +(gdb) print $pc +$10 = (void (*)()) 0x401060
+(gdb) next +10 a = atoi(argv[1]); +(gdb) print $pc +$11 = (void (*)()) 0x401061 +(gdb) next +11 b = atof(argv[2]); +(gdb) print $pc +$12 = (void (*)()) 0x401074 +(gdb) next +10 a = atoi(argv[1]); +(gdb) print $pc +$13 = (void (*)()) 0x40107a +(gdb) next +11 b = atof(argv[2]); +(gdb) print $pc +$14 = (void (*)()) 0x401080 +(gdb) next +12 a = a + 1; +(gdb) print $pc +$15 = (void (*)()) 0x401085 +(gdb) next +14 printf ("a = %d, b = %f\n", a, b); +(gdb) print $pc +$16 = (void (*)()) 0x4010ae +(gdb) next +a = 2, b = 0.047619 +15 return 0; +(gdb) print $pc +$17 = (void (*)()) 0x4010b3 +``` + +With this simple example, you can see that the order of instructions does not match the original source code. When the program is running normally, you would never observe those changes. However, they are quite visible when using a debugger to step through the code. The boundaries between lines of code become blurred. This has other implications. When you decide to set a breakpoint to a line following a line with variable update, the compiler scheduler may have moved the variable after the location you expect the variable to be updated, and you don’t get the expected value for the variable at the breakpoint. + +### Which of the instructions for a line get the breakpoint? + +With the previous `example.c`, the compiler generated multiple instructions to implement individual lines of code. How does the debugger know which of those instructions should be the one that it places the breakpoint on? There’s an additional statement flag in the line information that marks the recommended locations to place the breakpoints. You can see those instructions marked with `S` in the column below `SBPE` in `eu-readelf --debug-dump=decodedline example`: + +``` +DWARF section [31] '.debug_line' at offset 0x50fd: + + CU [c] example.c + line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End) + /home/wcohen/present/202207youarehere/example.c (mtime: 0, length: 0) + 9:1 S 0 0 0 0x0000000000401060
+ 10:2 S 0 0 0 0x0000000000401060
+ /usr/include/stdlib.h (mtime: 0, length: 0) + 362:1 S 0 0 0 0x0000000000401060
+ 364:3 S 0 0 0 0x0000000000401060
+ /home/wcohen/present/202207youarehere/example.c (mtime: 0, length: 0) + 9:1 0 0 0 0x0000000000401060
+ /usr/include/stdlib.h (mtime: 0, length: 0) + 364:16 0 0 0 0x0000000000401061 + 364:16 0 0 0 0x0000000000401065 + /home/wcohen/present/202207youarehere/example.c (mtime: 0, length: 0) + 9:1 0 0 0 0x0000000000401065 + /usr/include/stdlib.h (mtime: 0, length: 0) + 364:16 0 0 0 0x0000000000401068 + 364:16 0 0 0 0x000000000040106f + 364:16 0 0 0 0x0000000000401074 + /usr/include/bits/stdlib-float.h (mtime: 0, length: 0) + 27:10 0 0 0 0x0000000000401074 + /usr/include/stdlib.h (mtime: 0, length: 0) + 364:10 0 0 0 0x000000000040107a + /home/wcohen/present/202207youarehere/example.c (mtime: 0, length: 0) + 11:2 S 0 0 0 0x0000000000401080 + /usr/include/bits/stdlib-float.h (mtime: 0, length: 0) + 25:1 S 0 0 0 0x0000000000401080 + 27:3 S 0 0 0 0x0000000000401080 + 27:10 0 0 0 0x0000000000401080 + 27:10 0 0 0 0x0000000000401085 + /home/wcohen/present/202207youarehere/example.c (mtime: 0, length: 0) + 12:2 S 0 0 0 0x0000000000401085 + 12:8 0 0 0 0x0000000000401085 + 14:2 0 0 0 0x000000000040108b + 13:8 0 0 0 0x0000000000401090 + 13:4 0 0 0 0x0000000000401098 + 12:8 0 0 0 0x00000000004010a0 + 14:2 0 0 0 0x00000000004010a3 + 12:4 0 0 0 0x00000000004010a8 + 13:2 S 0 0 0 0x00000000004010ae + 14:2 S 0 0 0 0x00000000004010ae + 15:2 S 0 0 0 0x00000000004010b3 + 16:1 0 0 0 0x00000000004010b3 + 16:1 0 0 0 0x00000000004010b6 + 16:1 * 0 0 0 0x00000000004010b6 +``` + +- Groups of instructions are delimited by the path to the source file for those instructions. +- The left column contains the line number and column that the instruction maps back to, followed by the flags. +- The hexadecimal number is the address of the instruction, followed by the offset into the function of the instruction. + +If you look carefully at the output, you see that some instructions map back to multiple lines in the code. For example, `0x0000000000401060` maps to both line 9 and 10 of `example.c`. The same instruction also maps to lines 362 and 364 of `/usr/include/stdlib.h`. The mappings are not one-to-one. One line of source code may map to multiple instructions, and one instruction may map to multiple lines of code. When the debugger decides to print out a single line mapping for an instruction, it might not be the one that you expect. + +### Merging and eliminating of lines + +As you saw in the output of the detailed line mapping information, mappings are not one-to-one. There are cases where the compiler can eliminate instructions because they have no effect on the final result of the program. The compiler may also merge instructions from separate lines through optimizations, such as common subexpression elimination (CSE), and omit that the instruction could have come from more than one place in the code. + +The following example was compiled on an x86_64 Fedora 36 machine, using GCC-12.2.1. Depending on the particular environment, you may not get the same results, because different versions of compilers may optimize the code differently. + +Note the **if-else** statement in the code. Both have statements doing the same expensive divides. The compiler factors out the divide operation. + +``` +#include +#include + +int +main(int argc, char* argv[]) +{ + int a,b,c; + a = atoi(argv[1]); + b = atoi(argv[2]); + if (b) { + c = 100/a; + } else { + c = 100/a; + } + printf ("a = %d, b = %d, c = %d\n", a, b, c); + return 0; +} +``` + +Looking at `objdump -dl whichline`, you see one divide operation in the binary: + +``` +/home/wcohen/present/202207youarehere/whichline.c:13 + 401085: b8 64 00 00 00 mov $0x64,%eax + 40108a: f7 fb idiv %ebx +``` + +Line 13 is one of the lines with a divide, but you might suspect that there are other line numbers associated with those addresses. Look at the output of `eu-readelf --debug-dump=decodedline whichline` to see whether there are other line numbers associated with those addresses. + +Line 11, where the other divide occurs, is not in this list: + +``` +/usr/include/stdlib.h (mtime: 0, length: 0) + 364:16 0 0 0 0x0000000000401082 + 364:16 0 0 0 0x0000000000401085 + /home/wcohen/present/202207youarehere/whichline.c (mtime: 0, length: 0) + 10:2 S 0 0 0 0x0000000000401085 + 13:3 S 0 0 0 0x0000000000401085 + 15:2 S 0 0 0 0x0000000000401085 + 13:5 0 0 0 0x0000000000401085 +``` + +If the results are unused, the compiler may completely eliminate generating code for some lines. + +Consider the following example, where the **else** clause computes `c = 100 * a`, but does not use it: + +``` +#include +#include + +int +main(int argc, char* argv[]) +{ + int a,b,c; + a = atoi(argv[1]); + b = atoi(argv[2]); + if (b) { + c = 100/a; + printf ("a = %d, b = %d, c = %d\n", a, b, c); + } else { + c = 100 * a; + printf ("a = %d, b = %d\n", a, b); + } + return 0; +} +``` + +Compile `eliminate.c` with GCC: + +``` +$ gcc -O2 -g eliminate.c -o eliminate +``` + +When looking through the output generated by `objdump -dl eliminate`, there’s no sign of the multiplication for `100 * a` (line 14) of `eliminate.c`. The compiler has determined that the value was not used and eliminated it. + +When looking through the output of `objdump -dl eliminate`, there is no: + +``` +/home/wcohen/present/202207youarehere/eliminate.c:14 +``` + +Maybe it’s hidden as one of the other views of line information. You can use `eu-readelf` with the `--debug-dump` option to get a complete view of the line information: + +``` +$ eu-readelf --debug-dump=decodedline eliminate > eliminate.lines +``` + +It turns out that GCC did record some mapping information. It seems that `0x4010a5` maps to the multiplication statement, in addition to the [printf][2] at line 15: + +``` +/home/wcohen/present/202207youarehere/eliminate.c (mtime: 0, length: 0) +… + 18:1 0 0 0 0x00000000004010a4 + 14:3 S 0 0 0 0x00000000004010a5 + 15:3 S 0 0 0 0x00000000004010a5 + 15:3 0 0 0 0x00000000004010b0 + 15:3 * 0 0 0 0x00000000004010b6 +``` + +### Optimization affects line information + +The line information included into compiled binaries is helpful when pinpointing where in code the processor is. However, optimization can affect the line information, and what you see when debugging the code. + +When using a debugger, expect that boundaries between lines of code are fuzzy, and the debugger is likely to bounce between them when stepping through the code. An instruction might map to multiple lines of source code, but the debugger may only reports one. The compiler may entirely eliminate instructions associated with a line of code, and it may or may not include line mapping information. The line information generated by the compiler is helpful, but keep in mind that something might be lost in translation. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/compiler-optimization-debugger-line-information + +作者:[Will Cohen][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/wcohen +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/function-name +[2]: https://opensource.com/article/20/8/printf From e3080f361b43f71298ae84b83a7c0d0c6c96ccfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 9 Mar 2023 20:22:27 +0800 Subject: [PATCH 039/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230306.3=20=E2=AD=90=EF=B8=8F=20NixOS=20Series=203?= =?UTF-8?q?=20Install=20and=20Remove=20Packages=20in=20NixOS.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ries 3 Install and Remove Packages in NixOS.md | 290 ++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md diff --git a/sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md b/sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md new file mode 100644 index 0000000000..c9c1e551e2 --- /dev/null +++ b/sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md @@ -0,0 +1,290 @@ +[#]: subject: "NixOS Series #3: Install and Remove Packages in NixOS" +[#]: via: "https://itsfoss.com/nixos-package-management/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +NixOS Series #3: Install and Remove Packages in NixOS +====== + +The packaging system in NixOS is its strongest point. The Nix package manager uses a vastly different syntax than apt, dnf and other package managers. + +It is also [one of the reasons why one should try using NixOS][1]. + +In this guide, I will share two ways to install and remove packages on NixOS: + +- **Using the Nix package manager** +- **Using `configuration.nix` config file** + +> ⚠️ Using the Nix package manager, you can only install packages but not services like SSH or Plex server. For the installation of services, you'd have to use a Nix configuration file. + +To install any package, it is necessary to know its exact name, and for that purpose, I will start with how you can search for packages in NixOS. + +### Search packages + +To look for packages, you can use its [web search][2] using your preferred browser. + +You can utilize its web search using the given steps: + +- **Enter the name of the package in the search bar** +- **Select the appropriate package (decide from the given description)** +- **Click on `nix-env` option** +- **And copy the command for `NixOS` (first one)** + +For example, if I want `librewolf` package, I will perform the following: + +![searching for package using nix package manager web search][3] + +You can do the same through the **terminal**. + +To search packages using the terminal, you can follow the given command syntax: + +``` +nix-env -qaP --description [package_name] +``` + +For example, here, I searched for the `librewolf`: + +![search packages in nixos using terminal][4] + +You will have to copy the first line of the output as that is the name for the package you need to install. + +For me, it was `nixos.librewolf`. + +Yes, **it may not sound as convenient as the package names** when using [APT][5] or DNF. But, it is not too bad, I think. + +Some compromises for some benefits, I guess? + +### Install a package in NixOS + +To install a package, all you have to do is use the following command syntax: + +``` +nix-env -iA [package_name] +``` + +And if you use the web search to look for the package, you will already have the exact command you need for the installation. + +So let's say I want to install `librewolf`, so I will be using the following command: + +``` +nix-env -iA nixos.librewolf +``` + +And if you want to perform a system-wide install (make this package available for every user), execute the installation command with `sudo`: + +``` +sudo nix-env -iA nixos.librewolf +``` + +That's it! You will have your favorite package installed in no time. + +### Uninstall a Package in NixOS + +To remove a package, you can refer to the given command syntax: + +``` +nix-env --uninstall [package_name] +``` + +So if I have to remove the `librewolf` package, I have to use the following command: + +``` +nix-env --uninstall librewolf +``` + +If you notice closely, I have used `librewolf` instead of `nixos.librewolf` what I used for the installation. + +This means you will have to skip the `nixos` part during removal of the package, which makes things easy and quick. + +### Install services in NixOS + +As I mentioned earlier, you can not use the nix package manager to install services like OpenSSH, Plex server, [Flatpak][6], etc. + +From searching for the service to the installation process, it differs from what you saw above. + +So let me start with how you can **search for a service**: + +- **To search for the service, head [over to the web page][2] for the Nix package search.** +- **Select `NixOS options` (3rd option in the top-menu row of the page).** +- **Enter the name of the service you are looking for.** +- **Copy the name of the service.** + +For example, here, I'm searching for OpenSSH service: + +![search for openssh service in NixOS][7] + +Once you have the name, open the `configuration.nix` file using the following command: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +And add the name of the service at the end of the line (before `}`) in the following manner: + +``` +[service_name] = true; +``` + +As **I want to enable OpenSSH**, I will be adding the following: + +``` +services.openssh.enable = true; +``` + +![enable openssh on NixOS][8] + +Once you are done adding the service to the config file, [save the changes and exit from the nano][9] text editor. + +To enable the service, rebuild the config file and switch to the changes using the following command: + +``` +sudo nixos-rebuild switch +``` + +That's it! You have the service enabled. + +### Uninstall services from NixOS + +To uninstall a service, all you have to do is remove or comment out the line for that service from `configuration.nix` file. + +So first, open the config file using the following command: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +Look for the service and remove the line or comment it out with `#`: + +![remove service from NixOS][10] + +With the added comment #, I am ignoring the OpenSSH service to load up as I no longer want it on my system. + +Once done, **save the change and exit from the text editor.** + +And finally, rebuild the config file and make the switch: + +``` +sudo nixos-rebuild switch +``` + +### Install packages using Nix config file + +The configuration file lets you **easily manage packages in one go**. + +To install a package using the Nix config file, you have to enter the package's name in the config file, rebuild, and switch to the config file, and that's it. + +First, open the `configuration.nix` file: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +If you want to **install a package for a specific logged-in user,** add the package's name to the user's profile. + +The user profile looks like this: + +``` +users.users.sagar = { + isNormalUser = true; + description = "Sagar"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + firefox + ]; + }; +``` + +Sure, it will show your username instead of `sagar`. + +And you are supposed to add the name of the package using the syntax  `packages = with pkgs; [package_name];` + +So let's suppose I want to install `Thunderbird` as well, then I will add its name as shown below: + +![install a package in NixOS using the Nix config file][11] + +You must add **all the package names inside the square bracket** without commas. It has to be on a new line as the screenshot describes. + +But **if you want to install this package system-wide**, then you will have to add the package name under **environment.systemPackages** like: + +`environment.systemPackages = with pkgs; [package_name]`; + +![install package systemwide in NixOS using Nix configuration file][12] + +Once you are done adding the name of the required package in the system profile or user profile, or even both, you will have to follow the same command to complete the installation: + +``` +sudo nixos-rebuild switch +``` + +And you have it! + +### Remove packages using the Nix config file + +To remove the package, all you have to do is follow the given simple steps: + +- **Open the Nix config file** +- **Remove or comment out the name of the package** +- **Rebuild the config and make a switch** + +So let's start with the first step (opening the config file): + +``` +sudo nano /etc/nixos/configuration.nix +``` + +Next, comment out the name of the packet from the user profile or system profile: + +![remove package using nix config file on NixOS][13] + +Save changes and exit from the config file. + +And finally, rebuild the config and make a switch to remove the package: + +``` +sudo nixos-rebuild switch +``` + +That's it! + +> 📋 Currently, there are no official GUI tools to help you with installing/removing packages. You might find some projects like [nix-gui][14] and [nix42b][15] developed by the community, but they are no longer maintained or simply in their early stages of development. + +### Next Up... + +I hope you enjoy reading the NixOS series as much as I do writing it. + +In the next part, I will highlight some **important things you need to do right after installing NixOS**. + +_💬 If you think I'm missing out on something or have any other suggestions, please let me know in the comments._ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/nixos-package-management/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/why-use-nixos/ +[2]: https://search.nixos.org/packages?ref=its-foss +[3]: https://itsfoss.com/content/images/2023/02/search-packages-for-nixos-1.png +[4]: https://itsfoss.com/content/images/2023/02/search-packages-in-nixos.png +[5]: https://itsfoss.com/apt-command-guide/ +[6]: https://itsfoss.com/what-is-flatpak/ +[7]: https://itsfoss.com/content/images/2023/02/Search-the-service-for-nixos-1.png +[8]: https://itsfoss.com/content/images/2023/02/enable-openssh-on-NixOS.png +[9]: https://linuxhandbook.com/nano-save-exit/?ref=its-foss +[10]: https://itsfoss.com/content/images/2023/02/remove-service-from-NixOS.png +[11]: https://itsfoss.com/content/images/2023/02/install-a-package-in-NixOS-using-the-Nix-config-file.png +[12]: https://itsfoss.com/content/images/2023/02/install-package-systemwide-in-NixOS-using-Nix-configuration-file-1.png +[13]: https://itsfoss.com/content/images/2023/02/remove-package-using-nix-config-file-on-NixOS.png +[14]: https://github.com/nix-gui/nix-gui?ref=its-foss +[15]: https://gitlab.com/juliendehos/nix42b?ref=its-foss From 9e57852f81b24d818f78b2a313e3817e7f7b12f0 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Fri, 10 Mar 2023 00:40:03 +0800 Subject: [PATCH 040/318] =?UTF-8?q?Update=2020230307.1=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=20Switch=20from=20iCloud=20to=20Nextcloud.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xiaoting Huang is translating. 任务申领。 --- .../tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md b/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md index aad9d8e751..0e46e2a139 100644 --- a/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md +++ b/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/switch-icloud-nextcloud" [#]: author: "Heike Jurzik https://opensource.com/users/hej" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -70,7 +70,7 @@ via: https://opensource.com/article/23/3/switch-icloud-nextcloud 作者:[Heike Jurzik][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -85,4 +85,4 @@ via: https://opensource.com/article/23/3/switch-icloud-nextcloud [6]: https://nextcloudpi.local [7]: https://nextcloudpi.local:443/remote.php/dav/principals/users/hej [8]: https://opensource.com/sites/default/files/2023-02/NextcloudSaveIcsfile.png -[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 \ No newline at end of file +[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 From ab1bd055318f4534344f12e51862d383888952a6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Mar 2023 08:49:53 +0800 Subject: [PATCH 041/318] translating --- ...️ Use your Raspberry Pi as a streaming server.md | 119 ------------------ ...️ Use your Raspberry Pi as a streaming server.md | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 119 deletions(-) delete mode 100644 sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md create mode 100644 translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md diff --git a/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md b/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md deleted file mode 100644 index 9d95cccba3..0000000000 --- a/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: subject: "Use your Raspberry Pi as a streaming server" -[#]: via: "https://opensource.com/article/23/3/raspberry-pi-streaming-server" -[#]: author: "Sven Erbeck https://opensource.com/users/erbeck" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Use your Raspberry Pi as a streaming server -====== - -There are various reasons to stream live video transmissions from webcams. The Raspberry Pi platform is perfect for such applications. It requires little power for continuous applications such as live-streaming servers. Communication with a Raspicam camera module, USB cam, or other network video signals is possible. The system is an RTMP, HLS, and SRT server. This article shows how to set up the Raspberry Pi as a streaming server to use HLS streaming. You need a video source to use it as a streaming server. - -Even without a Raspberry Pi, you can do the steps described here. In addition, there are further installation instructions for [Windows][1], [Linux][2], and [macOS][3] available. - -### Setup - -The application is datarhei [Restreamer][4], a graphical user interface for the datarhei [Core][5]. The datarhei Core runs the well-known media framework FFmpeg under the hood. The easiest way to start with datarhei Restreamer is to install the official Docker container. The download and installation of the program via Docker Hub are automatic with the `pull` command. Restreamer starts immediately after the installation. If you don't have a Raspberry Pi, use one of the other Docker containers on the datarhei [Restreamer GitHub][4] page (e.g., AMD64 or GPU Cuda support). - -datarhei Restreamer and datarhei Core are both open source software under the [Apache License 2.0][6]. - -Here's the command for an installation on a Raspberry Pi 3 and above with GPU support: - -``` -docker run -d --restart=always --name restreamer \ - -v /opt/restreamer/config:/core/config -v /opt/restreamer/data:/core/data \ - --privileged \ - -p 8080:8080 -p 8181:8181 \ - -p 1935:1935 -p 1936:1936 \ - -p 6000:6000/udp \ - datarhei/restreamer:rpi-latest -``` - -Regardless of which command you use, you only need the `--privileged` option to access local devices, like a USB camera. - -After installation, connect the Raspberry Pi to the local network. Then open the web-based GUI in a browser by navigating to [http://device-ip:8181/ui][7]. - -You should see the following screen: - -![First login into datarhei Restreamer][8] - -Assign the password, and the system is ready for the first login. A wizard is starting to configure the first video source. - -Hint: The above Docker command permanently stores the configuration data with the login name and password in the `/opt/restreamer/config` folder. - -### Implementation - -The application consists of three logical parts: Video input, system dashboard, and video output. The video input and output run independently of each other. - -### Video input - -The wizard will help you to create a video source right from the start. This can be a USB video source, the Raspberry Pi camera, or a network source like an IP cam or an m3u8 file from a network. HLS, RTMP, and real-time SRT protocol are ready to use. The wizard helps to configure the video resolution and sound correctly. In the last step, you can assign different licenses from Creative Commons. It is worth taking a look at the video signal settings. You will find several options, like transcoding or rotating the video for vertical video platforms. - -### Dashboard - -After successfully creating the video signal, you will land in the dashboard. - -![datarhei Restreamer dashboard][9] - -It is the central starting point for all other settings. To see the program's full functionality, you can switch to expert mode in system preferences. - -The dashboard contains the following: - -- Video signal settings. -- Active content URL for RTMP, SRT, HLS server, and snapshot. -- All active Publication Services for restreaming. -- Start the wizard to create additional video sources. -- The system menu. -- Live-Statistics for the video signal. -- Live-System monitoring. - -### Video output - -There are different ways to play the video signal. - -The [publication website][10] is the simplest, immediately-ready, and internally hosted landing page by Restreamer. The player page can also transmit to Chromecast and AirPlay. Basic settings like adjusting the background image and adding a logo in the player are possible directly in the Restreamer. Those who know HTML can customize the page for themselves. Advanced users can inject code to use the site with external modules like a chat. A statistics module under the video player shows the active viewers and all views. The **Share** button supports the distribution of the live stream. HTTPS certificates for the website are active with Let's Encrypt without much effort. With a simple port forwarding for HTTPS to the LAN IP of the Raspberry Pi, the website is publicly accessible. - -![Landingpage from datahrei Restreamer][11] - -The publication services are a great way to restream content. There are numerous ready-made modules for popular websites like YouTube, Twitch, or PeerTube. Likewise, for other streaming software, to popular CDNs. Complete control over the video protocols allows streaming to all RTMP, HLS, and SRT-capable destination addresses. An HTML snippet code with the video player works on web pages. - -![Presets for publication services][12] - -### Save power while streaming with Raspberry Pi - -This article shows how to turn the Raspberry Pi into a streaming server. The Raspberry Pi platform allows you to interact with various video signals in a power-saving way. The pre-settings make it easy to configure the server, and advanced users can make some adjustments to the system. You can use it for restreaming, hosting for live-streaming on a website, or integration into system landscapes with [OBS][13]. Using different video sources and transport protocols offer great flexibility as a basis for a project and make this system highly customizable. Furthermore, the datarhei Core with FFmpeg makes it easy for software developers to extend all application processes. - -The program turns the Raspberry Pi into a dedicated streaming server. Depending on your internet upload, you can live stream to websites or multi-stream to different video networks independently and without an additional video provider. - -Test a fully functional [demo][14] before installation on the project website with the login name **admin** and password **demo**. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/raspberry-pi-streaming-server - -作者:[Sven Erbeck][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/erbeck -[b]: https://github.com/lkxed/ -[1]: https://docs.datarhei.com/restreamer/installing/windows -[2]: https://docs.datarhei.com/restreamer/installing/linux -[3]: https://docs.datarhei.com/restreamer/installing/mac -[4]: https://github.com/datarhei/restreamer -[5]: https://github.com/datarhei/core -[6]: https://github.com/datarhei/restreamer/blob/2.x/LICENSE -[7]: http://device-ip:8181/ui -[8]: https://opensource.com/sites/default/files/2023-01/fig2-first-login-datarhei.jpg -[9]: https://opensource.com/sites/default/files/2023-01/fig1-title-dashboard-datarhei.jpg -[10]: https://demo.datarhei.com/ -[11]: https://opensource.com/sites/default/files/2023-01/fig3-int-publication-website-datarhei.jpg -[12]: https://opensource.com/sites/default/files/2023-01/fig4-preset-publication-services-datarhei.jpg -[13]: https://opensource.com/article/20/6/obs-websockets-streaming -[14]: https://demo.datarhei.com/ui \ No newline at end of file diff --git a/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md b/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md new file mode 100644 index 0000000000..63faa3a7e8 --- /dev/null +++ b/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md @@ -0,0 +1,119 @@ +[#]: subject: "Use your Raspberry Pi as a streaming server" +[#]: via: "https://opensource.com/article/23/3/raspberry-pi-streaming-server" +[#]: author: "Sven Erbeck https://opensource.com/users/erbeck" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +把你的树莓派当作流媒体服务器使用 +====== + +从网络摄像头流式传输实时视频有多种原因。树莓派平台很适合此类应用。对于实时流媒体服务器等连续应用,它只需要很少的电力。可以与 Raspicam 相机模块、USB 摄像头或其他网络视频信号进行通信。该系统是一个 RTMP、HLS 和 SRT 服务器。这篇文章展示了如何将树莓派设置为流媒体服务器以使用 HLS 流媒体。你需要一个视频源才能把它作为流媒体服务器使用。 + +即使没有树莓派,你也可以完成这里描述的步骤。此外,还有针对 [Windows][1]、[Linux][2] 和 [macOS][3] 的进一步安装说明。 + +### 设置 + +该应用程序是 datarhei [Restreamer][4],是 datarhei [Core][5] 的图形用户界面。datarhei Core 在底层运行著名的媒体框架 FFmpeg。开始使用 datarhei Restreamer 的最简单方法是安装官方 Docker 容器。通过 Docker Hub 的程序下载和安装是通过 `pull` 命令自动进行的。安装后,Restreamer 立即启动。如果你没有树莓派,可以使用 datarhei [Restreamer GitHub][4] 页面上的其他 Docker 容器之一(例如,支持 AMD64 或 GPU Cuda)。 + +datarhei Restreamer 和 datarhei Core 都是 [Apache License 2.0][6] 下的开源软件。 + +以下是在支持 GPU 的树莓派 3 及以上机型上的安装命令: + +``` +docker run -d --restart=always --name restreamer \ + -v /opt/restreamer/config:/core/config -v /opt/restreamer/data:/core/data \ + --privileged \ + -p 8080:8080 -p 8181:8181 \ + -p 1935:1935 -p 1936:1936 \ + -p 6000:6000/udp \ + datarhei/restreamer:rpi-latest +``` + +无论你使用哪条命令,你只需要 `--privileged` 选项来访问本地设备,如 USB 摄像头。 + +安装后,将 Raspberry Pi 连接到本地网络。然后在浏览器中进入 [http://device-ip:8181/ui][7] 打开基于 Web 的 GUI。 + +你应该看到以下屏幕: + +![First login into datarhei Restreamer][8] + +分配好密码,系统就可以进行首次登录了。向导正在开始配置第一个视频源。 + +提示:上述 Docker 命令将带有登录名和密码的配置数据永久保存在 `/opt/restreamer/config` 文件夹中。 + +### 实施 + +该应用程序由三个逻辑部分组成:视频输入、系统仪表板和视频输出。视频输入和输出相互独立运行。 + +### 视频输入 + +该向导将帮助你从一开始就创建一个视频源。这可以是一个 USB 视频源、树莓派摄像头,或者是一个网络源,如 IP 摄像头或来自网络的 m3u8 文件。HLS、RTMP 和实时 SRT 协议都可以使用。该向导帮助正确配置视频分辨率和声音。在最后一步,你可以从 Creative Commons 分配不同的许可证。值得看一下视频信号的设置。你会发现几个选项,例如为垂直视频平台转码或旋转视频。 + +### 仪表板 + +成功创建视频信号后,你将进入仪表板。 + +![datarhei Restreamer dashboard][9] + +它是所有其他设置的中心起点。要看到程序的全部功能,你可以在系统偏好中切换到专家模式。 + +仪表板包含以下内容: + +- 视频信号设置。 +- RTMP、SRT、HLS 服务器和快照的活动内容 URL。 +- 用于重新流式传输的所有活动发布服务。 +- 启动向导来创建额外的视频源。 +- 系统菜单。 +- 实时视频信号统计。 +- 实时系统监控。 + +### 视频输出 + +有不同的方法来播放视频信号。 + +[发布网站][10] 是 Restreamer 最简单、即时可用且内部托管的登录页面。播放页面也可以传输到 Chromecast 和 AirPlay。基本设置,如调整背景图片和在播放器中添加标识,可以直接在 Restreamer 中进行。那些懂 HTML 的人可以为自己定制页面。高级用户可以注入代码,以使用网站的外部模块,如聊天。视频播放器下的统计模块显示活跃的观众和所有视图。**分享**按钮支持直播流的分发。网站的 HTTPS 证书通过 Let's Encrypt 激活,无需太多努力。通过简单的 HTTPS 端口转发到树莓派的 LAN IP,网站就可以公开访问。 + +![Landingpage from datahrei Restreamer][11] + +发布服务是重新传输内容的一个好方法。对于流行的网站,如 YouTube、Twitch 或 PeerTube,有许多现成的模块。同样,对于其他流媒体软件,对流行的 CDN 也是如此。对视频协议的完全控制允许流式传输到所有支持 RTMP、HLS 和 SRT 的目标地址。一个带有视频播放器的 HTML 片段代码在网页上工作。 + +![Presets for publication services][12] + +### 使用树莓派播放流媒体节省电力 + +这篇文章展示了如何将树莓派变成一个流媒体服务器。树莓派平台允许你以省电的方式与各种视频信号互动。预先的设置使配置服务器变得很容易,高级用户可以对系统进行一些调整。你可以用它来做重播,在网站上托管实时流式传输,或使用 [OBS][13] 集成到系统环境中。使用不同的视频源和传输协议作为项目的基础,提供了极大的灵活性,使这个系统具有高度的可定制性。此外,带有 FFmpeg 的 datarhei Core 使软件开发者很容易扩展所有的应用进程。 + +该程序将树莓派变成一个专门的流媒体服务器。你可以独立地直播到网站或多路直播到不同的视频网络,而无需额外的视频提供商。 + +使用登录名 **admin** 和密码 **demo** 在项目网站上安装之前测试功能齐全的 [demo][14]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/raspberry-pi-streaming-server + +作者:[Sven Erbeck][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/erbeck +[b]: https://github.com/lkxed/ +[1]: https://docs.datarhei.com/restreamer/installing/windows +[2]: https://docs.datarhei.com/restreamer/installing/linux +[3]: https://docs.datarhei.com/restreamer/installing/mac +[4]: https://github.com/datarhei/restreamer +[5]: https://github.com/datarhei/core +[6]: https://github.com/datarhei/restreamer/blob/2.x/LICENSE +[7]: http://device-ip:8181/ui +[8]: https://opensource.com/sites/default/files/2023-01/fig2-first-login-datarhei.jpg +[9]: https://opensource.com/sites/default/files/2023-01/fig1-title-dashboard-datarhei.jpg +[10]: https://demo.datarhei.com/ +[11]: https://opensource.com/sites/default/files/2023-01/fig3-int-publication-website-datarhei.jpg +[12]: https://opensource.com/sites/default/files/2023-01/fig4-preset-publication-services-datarhei.jpg +[13]: https://opensource.com/article/20/6/obs-websockets-streaming +[14]: https://demo.datarhei.com/ui \ No newline at end of file From 40c529c361be5ad1d203950ebb5b4212eabd97c0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Mar 2023 08:56:47 +0800 Subject: [PATCH 042/318] translating --- ...307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md b/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md index b094dfe77c..f07af2a09e 100644 --- a/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md +++ b/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/create-files/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7c625e0697419f571a70e271218fe7a84beb810c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Mar 2023 09:43:22 +0800 Subject: [PATCH 043/318] ATRP @wxy https://linux.cn/article-15612-1.html --- ...anilla OS Drops Ubuntu, Welcomes Debian Sid.md | 65 +++++++++++++++++++ ...anilla OS Drops Ubuntu, Welcomes Debian Sid.md | 64 ------------------ 2 files changed, 65 insertions(+), 64 deletions(-) create mode 100644 published/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md delete mode 100644 sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md diff --git a/published/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md b/published/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md new file mode 100644 index 0000000000..6cdb49ec0e --- /dev/null +++ b/published/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md @@ -0,0 +1,65 @@ +[#]: subject: "Vanilla OS Drops Ubuntu, Welcomes Debian Sid" +[#]: via: "https://debugpointnews.com/vanilla-os-debian/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15612-1.html" + +Vanilla OS 放弃 Ubuntu,转投 Debian Sid +====== + +![][1] + +> 即将推出的 Vanilla OS 2.0 “Orchid” 将基于 Debian Sid 而不是 Ubuntu Linux。 + +来自 Ubuntu 的 [Flatpak 决定][1a] 的余震仍在继续!Vanilla OS 团队宣布,Vanilla OS 的下一个版本将不再基于 Ubuntu。它将基于 Debian Sid,这是 Debian Linux 的 “滚动” 版本,或者说 “不稳定” 版本。 + +> 如果你不知道,Vanilla OS 是一个新的不可变 Linux 发行版,它首次发布于去年。它的目标是提供 GNOME 桌面的 “原味” 体验。它有一套独特的工具,如 apx 软件包管理器、ABRoot 技术、原装 GNOME 体验等等。它基于标准的 Ubuntu 发布周期和版本进行发布。 + +![Vanilla OS 22.10 Kinetic 桌面][2] + +### Vanilla OS 计划基于 Debian + +由于这些重大变化,Vanilla OS 的下一个版本将被命名为 “2.0” “兰花Orchid”。但为什么要远离 Ubuntu 呢? + +正如该团队所说,花了更多的困难和精力 **“来恢复 Canonical 武断的工作流程”**,这需要更多的开发时间。另外,Ubuntu 提供的 GNOME 是根据 Canonical 的需求和愿景定制的。所以,没有太多的 “原味” 体验。 + +第二个原因是处理 Snap 的问题。经过几次测试和社区反馈,团队认为目前的 Snap 并不适合 Vanilla OS 的使用情况。例如,“启动慢、集中化” 的问题在 Snap 核心里没有得到解决,而且 Snap 不能在 Vanilla OS 的 apx 容器内运行。 + +### 发布模式 + +此外,脱离 Ubuntu 的基础会带来一个更灵活的发布周期,将不需要遵循每年两个版本的周期。这给了小型 FOSS 开发者和贡献者团队一些喘息的空间。 + +但是未来的发布模式是什么呢?团队将遵循一种临时性的发布方式,用著名的术语来说就是 —— “当需要或准备好时就会发布”。例如,如果某个 Debian Sid 软件包得到一个关键的 CVE 修复,那么你可能会立即得到一个 Vanilla OS 的小版本。所以,这要视情况而定,应该以需求为基础。 + +此外,该团队还计划减少 ISO 文件中的软件包数量,以减少软件包 “不稳定” 因素的风险。但根据我使用 Debian Sid 的经验,如果你遵循适当的更新并谨慎行事,它可以视作一个 “稳定” 的发行版。 + +另外,其他变化还有对 ABRoot 的 OCI 更新,以加强对更新的控制。在设置中的一个新的快速的高级选项是即将发布的版本中值得注意的内容。 + +在核心方面,基于 Debian Sid 软件包情况,新版本计划采用 GNOME 44 和主线内核 6+。 + +### 结论 + +总之,基于 Debian 的确是一个大的进步。虽然它确实在发布周期上提供了更多的灵活性,但在向用户提供稳定版之前,它也会对 Sid 软件包进行更仔细的测试。总的来说,在我们等待 Vanilla OS 2.0 “Orchid” 的测试版本时,未来的时间是令人期待的。 + +参考自 [公告][3]。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/vanilla-os-debian/ + +作者:[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://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2022/12/vanilla-os-logo.jpg +[1a]: https://linux.cn/article-15570-1.html +[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Vanilla-OS-22.10-22Kinetic22-Desktop.jpg +[3]: https://vanillaos.org/2023/03/07/vanilla-os-2.0-orchid-initial-work.html \ No newline at end of file diff --git a/sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md b/sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md deleted file mode 100644 index 761320adbc..0000000000 --- a/sources/news/20230308.1 ⭐️ Vanilla OS Drops Ubuntu, Welcomes Debian Sid.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: subject: "Vanilla OS Drops Ubuntu, Welcomes Debian Sid" -[#]: via: "https://debugpointnews.com/vanilla-os-debian/" -[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Vanilla OS Drops Ubuntu, Welcomes Debian Sid -====== - -![][1] - -**The upcoming Vanilla OS 2.0 “Orchid” will be based on Debian sid instead of Ubuntu Linux.** - -The aftershock from Ubuntu’s Flatpak decision continues! The Vanilla OS team today announced that the next release of Vanilla OS would not be based on Ubuntu anymore. It will be based on Debian sid, the “rolling” release or unstable version of Debian Linux. - -If you don’t know, the Vanilla OS is a new immutable Linux distribution which had its debut release last year. It aims to be the “vanilla” experience of the GNOME desktop with its unique set of tools such as apx package manager, ABRoot technology, stock GNOME experience and more. It was based on the standard Ubuntu release cycle and versions. - -![Vanilla OS 22.10 Kinetic Desktop][2] - -### Vanilla OS plans for Debian base - -The next release of Vanilla OS will be named “2.0” “Orchid” because of these major changes. But why move away from Ubuntu? - -As the team says, more difficulties and effort have been spent _“to revert Canonical’s opinionated workflow_” which takes more development time. Also, the GNOME shipped by Ubuntu is customized as per Canonical’s needs and vision. So, not much of a “vanilla” experience. - -The second reason is the problem handling “snap”. After several testing and community feedback, the team feels that the current snap problem doesn’t fit the use case of Vanilla OS. For example, the “slow startups, centralization” problems are not fixed in core snap, and snap doesn’t run inside Vanilla OS’s apx container. - -### Release model - -In addition, moving away from the Ubuntu base give you a much more flexible release cadence. You don’t need to follow the two releases per year cycle. It gives some breathing space to the small FOSS developers and contributors team. - -But what would be the release model for future releases? The team will follow an ad-hoc release method which means the famous term applies – “it will be released when needed or ready”. For example, if some Debian sid PACKAGE gets a critical CVE fix, then you may get an immediate point release of Vanilla OS. So, it’s up to the situation and should be need basis. - -Furthermore, the team is also planning to reduce the number of packages in the ISO file to minimize the risks of the “unstable” nature of packages. But with my experience with Debian sid, if you follow proper updates and be cautious, it works as a “stable” distro. - -Also, part of the other changes is OCI updates to the ABRoot for greater control of updates. A new express and advanced options in set up are notable ones which are planned for the upcoming release. - -At the core, the new release is planned to have GNOME 44 and mainline Kernel 6+ based on the situation of Debian sid packages. - -### Conclusion - -In conclusion, it’s indeed a great move for the Debian base. While it does give more flexibility on release cadence, it also brings more careful testing of sid packages before offering a stable release to users. Overall, exciting time ahead as we wait for the testing copy of Vanilla OS 2.0 “Orchid”. - -Via [announcement][3] - --------------------------------------------------------------------------------- - -via: https://debugpointnews.com/vanilla-os-debian/ - -作者:[arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://debugpointnews.com/author/dpicubegmail-com/ -[b]: https://github.com/lkxed/ -[1]: https://debugpointnews.com/wp-content/uploads/2022/12/vanilla-os-logo.jpg -[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Vanilla-OS-22.10-22Kinetic22-Desktop.jpg -[3]: https://vanillaos.org/2023/03/07/vanilla-os-2.0-orchid-initial-work.html \ No newline at end of file From e54a937c868d64c8a7085f72a5d5b45f31fd232a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Mar 2023 10:36:51 +0800 Subject: [PATCH 044/318] RP @geekpi https://linux.cn/article-15613-1.html --- ...inimal Opportunity to Build Your Own Distro.md | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) rename {translated/tech => published}/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md (54%) diff --git a/translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md b/published/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md similarity index 54% rename from translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md rename to published/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md index 9d4392a1a5..772d29449c 100644 --- a/translated/tech/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md +++ b/published/20230306.0 ⭐️ Xubuntu Minimal Opportunity to Build Your Own Distro.md @@ -3,42 +3,44 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15613-1.html" -Xubuntu Minimal:建立你自己的发行版的机会 +精简版 Xubuntu:建立你自己的发行版的机会 ====== -**Xubunt 团队从 23.04 版本开始推出了一个包含少量组件的最小 ISO。以下是所有的细节**。 +> Xubuntu 团队从 23.04 版本开始推出了一个包含少量组件的精简 ISO。以下是它的情况。 ![][1] -几天前,Canonical [宣布][2],Ubuntu 23.04 “Lunar Lobster” 版本的官方最小 ISO 安装文件正在制作中。虽然截至发稿时,该镜像还没有出现,但 Xubuntu 团队设法解决了他们自己的最小 ISO 安装镜像。 +几天前,Canonical [宣布][2],Ubuntu 23.04 “Lunar Lobster” 版本官方的精简 ISO 安装文件正在制作中。虽然截至发稿时,该镜像还没有出现,但 Xubuntu 团队设法推出了他们自己的精简 ISO 安装镜像。 -Xubuntu 被数百万人使用,并且一直是许多其他发行版的基线。对于一些用户来说,默认安装可能带有太多的预装包和功能,导致一个臃肿的系统,会降低计算机的性能。这就是 Xubuntu 最小化安装发挥作用的地方。在这篇文章中,我们将采取实践的方式来安装和探索 Ubuntu minimal 的功能。 +Xubuntu 被数百万人使用,并且一直是许多其他发行版的基础。对于一些用户来说,默认安装可能带有太多的预装包和功能,导致系统臃肿,计算机性能降低。这就是 Xubuntu 精简安装发挥作用的地方。在这篇文章中,我们将采取实践的方式来安装和探索精简版 Ubuntu 的功能。 -让我们看看你在 Xubuntu 最小化安装中得到了什么,以及与普通桌面安装程序的比较。 +让我们看看你在 Xubuntu 精简安装中得到了什么,以及与普通桌面安装程序的比较。 -### Xubuntu 最小化安装 +### Xubuntu 精简安装 -第一个明显的区别是最小安装与标准桌面安装程序的 ISO 镜像大小。它的大小大约减少了 39%。 +第一个明显的区别是精简安装与标准桌面安装程序的 ISO 镜像大小。它的大小大约减少了 39%。 -| | 最小化 | 标准版 | +| | 精简版 | 标准版 | +| - | - | - | | 桌面安装程序(ISO)大小 | 1.7 GB | 2.8 GB | -在使用最小安装程序安装 Xubuntu 时,你不会在 Ubiquity 中看到“最小化安装”的选项。其余的安装步骤都是一样的,没有区别。 +在使用精简版安装程序安装 Xubuntu 时,你不会在 Ubiquity 中看到“精简安装minimal install”的选项。其余的安装步骤都是一样的,没有区别。 然而,主要的区别是在安装的系统上。最小安装只需要 7.2GB 的磁盘空间,而同一版本的标准安装则需要 11GB。 -| | 最小化 | 标准版 | +| | 精简版 | 标准版 | +| - | - | - | | 磁盘使用空间 | 7.2 GB | 11 GB | 因为许多应用程序被剥离了。 -![Xubuntu最小和标准安装比较][3] +![Xubuntu 精简和标准安装比较][3] -在 Xubuntu 的最小安装中,你会得到以下东西: +在 Xubuntu 的精简安装中,你会得到以下东西: - 终端 - 文件管理器 @@ -54,39 +56,39 @@ Xubuntu 被数百万人使用,并且一直是许多其他发行版的基线。 - Thunderbird 邮件客户端 - 媒体播放器(音频和视频) - LibreOffice 套件 -- Transmission torrent 客户端 +- Transmission Torrent 客户端 - GNOME 软件 - 游戏 - Gigolo 远程连接客户端 - 磁盘使用工具 -### 最小 Xubuntu 上的 Snap 包 +### 精简版 Xubuntu 上的 Snap 包 -令我惊讶的是,Xubuntu 最小版本没有安装 Snap!甚至连 snap 守护程序都没有。而且也没有 Flatpak。 +令我惊讶的是,精简版 Xubuntu 没有安装 Snap!甚至连 Snap 守护程序都没有。而且也没有 Flatpak。 所以,实际上你得到的是一个没有 Snap 的 Xubuntu 系统,但有一个核心的 Ubuntu 基础。 -![看,没有snap][4] +![看,没有 Snap][4] -但我不确定主 Ubuntu 的最小 ISO 会有同样的情况。我想我们需要等待和观察。 +但我不确定主 Ubuntu 的精简 ISO 会有同样的情况。我想我们需要等待和观察。 ### 接下来是什么? 所以,现在你有了一个初级的 Xubuntu 桌面。使用 Synaptic 包管理器,你可以开始构建和安装你喜欢的应用。 -例如,你可以[设置 Flatpak][5]并从一个基本的浏览器、媒体播放器、LibreOffice 等开始。 +例如,你可以 [设置 Flatpak][5] 并从一个基本的浏览器、媒体播放器、LibreOffice 等开始。 如果你是一个开发者,你可以安装 Visual Studio Code 或一些 IDE。 -以这个版本为基线,你可以为你的工作流程建立任何发行版。 +以这个版本为基础,你可以为你的工作流程建立任何发行版。 ### 总结 -Xubuntu 最小化安装对于那些想要完全控制他们系统上安装的东西,并且喜欢更快、更有效的基于 Ubuntu 的发行版的用户来说是一个很好的选择。 +Xubuntu 精简安装对于那些想要完全控制他们系统上安装的东西,并且喜欢更快、更有效的基于 Ubuntu 的发行版的用户来说是一个很好的选择。 Xfce 的可定制性、轻量级特性和使用 synaptic 的包管理使它成为任何定制构建的理想选择。 -你可以从这个[页面][6]下载最小的 ISO。记住,它还没有正式发布,而且是一个日常构建的副本。所以使用它要**谨慎**。 +你可以从这个 [页面][6] 下载精简版 ISO。记住,它还没有正式发布,而且是一个日常构建的副本。所以使用它要**谨慎**。 -------------------------------------------------------------------------------- @@ -95,14 +97,14 @@ via: https://www.debugpoint.com/xubuntu-minimal/ 作者:[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/) 荣誉推出 [a]: https://www.debugpoint.com/author/admin1/ [b]: https://github.com/lkxed/ [1]: https://www.debugpoint.com/wp-content/uploads/2023/03/xubuntu1.jpg -[2]: https://debugpointnews.com/ubuntu-mini-iso-announcement/ +[2]: https://linux.cn/article-15588-1.html [3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg [4]: https://www.debugpoint.com/wp-content/uploads/2023/03/Look-no-snap.jpg [5]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ From d59c6df9486e80f3c8063d2a068d244f8bf5c478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 10 Mar 2023 16:10:28 +0800 Subject: [PATCH 045/318] Translating --- ...30308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md b/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md index 270d1331f7..8e5b587194 100644 --- a/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md +++ b/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/epub-readers-linux/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6bf89e26b72686bedb4df70ecb830969b7d85591 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Mar 2023 09:51:20 +0800 Subject: [PATCH 046/318] ATRP @wxy https://linux.cn/article-15615-1.html --- ...05 Release Drops Latte Dock, Brings Key Changes.md | 85 +++++++++++++++++++ ...05 Release Drops Latte Dock, Brings Key Changes.md | 85 ------------------- 2 files changed, 85 insertions(+), 85 deletions(-) create mode 100644 published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md delete mode 100644 sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md diff --git a/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md b/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md new file mode 100644 index 0000000000..26de7fa669 --- /dev/null +++ b/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md @@ -0,0 +1,85 @@ +[#]: subject: "Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes" +[#]: via: "https://debugpointnews.com/garuda-linux-raptor-230305/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15615-1.html" + +Garuda Linux “Raptor” 230305 版本发布 +====== + +![][1] + +> Garuda Linux 是流行的基于 Arch Linux 的发行版,它刚刚发布了一个新的版本 “Raptor” 200305,带来了新的功能和更新。 + +![Garuda Linux Raptor 230305][2] + +Garuda Linux 是一个基于 Arch Linux 的发行版,由于其开箱即用的体验、游戏支持和用户友好界面,在 Arch Linux 爱好者中越来越受欢迎。Garuda Linux 以其对性能、速度和稳定性的关注而闻名。 + +最近,Garuda Linux 发布了一个新的版本 “Raptor” 200305,带来了新的功能和更新。在这篇文章中,我们将介绍 Garuda Linux 的最新版本的新内容。 + +### Garuda “Raptor” 200305 的新内容 + +Garuda 的主要旗舰版是 dr460nized 版,采用 KDE Plasma 桌面环境,但它用 Latte Dock、图标主题等进行了大量定制。 + +由于 Latte Dock 现在已经没有支持了,Garuda 团队完全删除了 Latte Dock,用标准的 Plasma 面板取代了它。按照该团队的说法,“由于失去了顶栏颜色/透明度等功能,在一定程度上削弱了 dr460nized 版的吸睛因素”。 + +这的确是事实。但是,没有其他停靠区软件能像 Latte Dock 一样。我的意思是,虽然有,但它们都没有接近 Latte Dock 曾经提供的功能和灵活性。但好处是,KDE Plasma 在 Garuda 中可能会变得更稳定,因为它现在使用了原生的停靠区和面板。而且它看起来也很好! + +![新的原生 KDE 面板][3] + +那么,如果你已经在运行带有 Latte Dock 的早期版本的 Garuda 呢? + +为了解决这个问题,团队调整了 “Garuda 系统维护Garuda System Maintenance” 应用程序,以检测你是否已经在运行 Latte Dock,并为你提供逐步迁移到新的面板的方法。一旦你确认从 Latte Dock 迁移,它还会备份你的配置,以防迁移过程中出现问题。这方面的更多信息可以在这个 [指南][4] 中找到。 + +除了上述变化,Garuda Linux “Raptor” 230305 还重写了设置帮助,改进了标签式界面和检测英伟达硬件的能力。 + +这个版本的一个重要更新是,Garuda 现在使用 Dracut 来创建 initramfs,而不是像包括原本的 Arch Linux 在内的大多数 Arch 发行版常见的 mkiniticpio。 + +不止如此。从这个版本开始有了一个新的 “garuda” 软件库,它是为 Garuda Linux 专属的软件包创建的,并从当前的 Chaotic-AUR 软件库中移出。这是最大的变化之一,它通过 “garuda-update” 自动处理的。可以在 [这里][5] 了解更多。 + +![当前的 pacman 软件库顺序][6] + +在核心部分,这个版本带有最新的 [KDE Plasma 5.27.2][7] 桌面和 Linux 内核 6.2.2。所以,由于滚动发布,你可以得到所有最新的软件包。 + +如果你想探索更多的更新,你可以 [在此][8] 阅读整个更新日志。 + +要下载它,请访问以下页面并选择你要下载的变体: + +> [下载 Garuda Linux][9] + +如果你已经在运行 Garuda Linux,那么从欢迎程序中启动 Gaurda 帮助Gaurda Assistance,并点击 “系统更新system update”。 + +### 总结 + +这是一个重要的 Garuda 版本,涉及到其旗舰 KDE 版的所有主要组件。对 pacman 偏好和 Dracut 的核心更新更是影响了所有的版本。 + +然而,所有的变化都是为了使它成为一个比以前更稳定的系统。我希望它能继续带来这样的更新,成为最好的 Arch Linux 发行版之一。 + +参考自 [发布公告][10]。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/garuda-linux-raptor-230305/ + +作者:[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://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/03/garuda-head.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2023/03/Garuda-Linux-22Raptor22-230305.jpg +[3]: https://debugpointnews.com/wp-content/uploads/2023/03/New-native-KDE-panel.jpg +[4]: https://wiki.garudalinux.org/en/dr460nized-migration +[5]: https://forum.garudalinux.org/t/separating-garuda-packages-from-chaotic-aur/20506 +[6]: https://debugpointnews.com/wp-content/uploads/2023/03/Current-pacman-repo-order.jpg +[7]: https://debugpointnews.com/kde-plasma-5-27-release/ +[8]: https://forum.garudalinux.org/t/garuda-linux-raptor-230305/26929#you-want-to-read-the-exhaustive-changelog-sure-it-can-be-found-below-as-usual-laughing-10 +[9]: https://garudalinux.org/downloads.html +[10]: https://forum.garudalinux.org/t/garuda-linux-raptor-230305/26929 \ No newline at end of file diff --git a/sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md b/sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md deleted file mode 100644 index 546bef643f..0000000000 --- a/sources/news/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes" -[#]: via: "https://debugpointnews.com/garuda-linux-raptor-230305/" -[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes -====== - -![][1] - -**Garuda Linux, the popular Arch-based Linux distribution, has released a new version, “Raptor” 200305, with new features and updates.** - -![Garuda Linux Raptor 230305][2] - -Garuda Linux is an Arch-based Linux distribution that has become increasingly popular among Arch Linux enthusiasts due to its out-of-the-box experience, gaming support and user-friendly interface. Garuda Linux is known for its focus on performance, speed, and stability. - -Recently, Garuda Linux released a new version, “Raptor” 200305, packed with new features and updates. In this article, we’ll explore the latest release of Garuda Linux and what’s new in this version. - -### Garuda “Raptor” 200305: What’s New - -Garuda’s main flagship edition was the “dr460nized” edition featuring the KDE Plasma desktop environment. But it was heavily customized with Latte-dock, icon themes, etc. - -Since the Latte dock is now out of support, the Garuda team completely removed the Latte dock and replaced it with standard Plasma panels. As per the team, it _“takes away somewhat from the dr460nized edition’s eye candy appeal factor by losing features like top bar colors/transparency”._ - -Which is indeed true. But there’s no other dock like Latte dock. I mean, there are, but none of them comes closer to the features and flexibility that Latte dock used to provide. But the advantage is that KDE Plasma may become more stable in Garuda since it now uses a native dock and panels. And it’s looks great also! - -![New native KDE panel][3] - -So, what if you are already running an earlier version of Garuda with Latte dock? - -To trap that use case, the team tweaked “_Garuda System Maintenance_” application to detect that you are already running the Latte dock and offer you step-by-step migration to new panels. It also backs up your configurations once you confirm migration from Latte dock, in case something goes wrong during migration. More information on this can be found in this [guide][4]. - -In addition to the above change, Garuda Linux “Raptor” 230305 also brings a rewritten set-up assistance with an improved tabbed interface and the ability to detect NVIDIA hardware. - -One critical update on this version is that Garuda now uses Dracut to create the initramfs instead of mkiniticpio which is common for the majority of Arch distros, including the vanilla Arch install. - -That’s not all. Starting from this release, a new repo, “garuda”, is created for packages exclusive to Garuda Linux and moved away from the current Chaotic-AUR repo. This is one of the biggest changes and it happens automatically via garuda-update. Learn more about this [here][5]. - -![Current pacman repo order][6] - -At the core, this version comes with the latest [KDE Plasma 5.27.2][7] desktop and Linux Kernel 6.2.2. So, you get all the latest packages, thanks to rolling releases. - -You can read the entire changelog [here][8], if you want to explore more updates. - -To download, visit the following page and choose your variant. - -[Download Garuda Linux][9] - -If you are already running Garuda Linux, then launch Gaurda Assistance from the welcome app and hit system update. - -### Conclusion - -It’s a significant Garuda release which touches all the main components of its flagship KDE edition. The core updates to pacman preferences and Dracut impact all the flavours. - -However, all the changes aim to make it a more stable system than before. I hope it continues to bring in such updates to be relevant as one of the best Arch Linux distros out there. - -Via [announcement][10] - --------------------------------------------------------------------------------- - -via: https://debugpointnews.com/garuda-linux-raptor-230305/ - -作者:[arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://debugpointnews.com/author/dpicubegmail-com/ -[b]: https://github.com/lkxed/ -[1]: https://debugpointnews.com/wp-content/uploads/2023/03/garuda-head.jpg -[2]: https://debugpointnews.com/wp-content/uploads/2023/03/Garuda-Linux-22Raptor22-230305.jpg -[3]: https://debugpointnews.com/wp-content/uploads/2023/03/New-native-KDE-panel.jpg -[4]: https://wiki.garudalinux.org/en/dr460nized-migration -[5]: https://forum.garudalinux.org/t/separating-garuda-packages-from-chaotic-aur/20506 -[6]: https://debugpointnews.com/wp-content/uploads/2023/03/Current-pacman-repo-order.jpg -[7]: https://debugpointnews.com/kde-plasma-5-27-release/ -[8]: https://forum.garudalinux.org/t/garuda-linux-raptor-230305/26929#you-want-to-read-the-exhaustive-changelog-sure-it-can-be-found-below-as-usual-laughing-10 -[9]: https://garudalinux.org/downloads.html -[10]: https://forum.garudalinux.org/t/garuda-linux-raptor-230305/26929 \ No newline at end of file From d724e49eea0cbc2d57189b17bda8cdccfef96e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 11 Mar 2023 10:06:05 +0800 Subject: [PATCH 047/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230213.2=20=E2=AD=90=EF=B8=8F=20Terminal=20Basics=20?= =?UTF-8?q?Series=201=20Changing=20Directories=20in=20Linux=20Terminal.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...es 1 Changing Directories in Linux Terminal.md | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 sources/tech/20230213.2 ⭐️ Terminal Basics Series 1 Changing Directories in Linux Terminal.md diff --git a/sources/tech/20230213.2 ⭐️ Terminal Basics Series 1 Changing Directories in Linux Terminal.md b/sources/tech/20230213.2 ⭐️ Terminal Basics Series 1 Changing Directories in Linux Terminal.md new file mode 100644 index 0000000000..d3ae61799a --- /dev/null +++ b/sources/tech/20230213.2 ⭐️ Terminal Basics Series 1 Changing Directories in Linux Terminal.md @@ -0,0 +1,215 @@ +[#]: subject: "Terminal Basics Series #1: Changing Directories in Linux Terminal" +[#]: via: "https://itsfoss.com/change-directories/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Terminal Basics Series #1: Changing Directories in Linux Terminal +====== + +The cd command in Linux allows you to change directories (folders). You just have to give the path to the directory. + +``` +cd path_to_directory +``` + +And here comes the first challenge if you are new to Linux. You are probably not sure about the path. + +Let's tackle that first. + +### Understanding paths in Linux + +The path traces the location in the Linux directory structure. Everything starts at the root and then goes from there. + +You can check your current location with the following: + +``` +pwd +``` + +It should show an output like /home/username. Of course, it will be your username. + +As you can see, paths are composed of / and directory names. Path `/home/abhishek/scripts` means the folder scripts is inside the folder `abhishek`, which is inside the folder `home`. The first `/` is for root (from where the filesystem starts), the trailing / are separators for the directories. + +![Path in Linux][1] + +> 🖥️ Type `ls /` in the terminal and press enter. It will show you the content of the root directory. Try it. + +Now, there are two ways to specify a path: absolute and relative. + +**Absolute path**: It starts with the root and then traces the location from there. If a path starts with /, it is an absolute path. + +**Relative path**: This path originates from your current location in the filesystem. If I am in the location /home/abhishek and I have to go to /home/abhishek/Documents, I can simply go to Documents instead of specifying the absolute path /home/abhishek/Documents. + +Before I show you the difference between the two, you should get familiar with two special directory notations: + +- . (single dot) denotes the current directory. +- .. (two dots) denote the parent directory taking you one directory above the current one. + +Here's a pictorial representation. + +![Absolute path vs relative path][2] + +### Changing directory with cd command + +Now that you are familiar with the concept of path, let's see how you can change the directory. + +> 🖥️ If you **just type cd and press enter**, it will take you to your home directory from any location. Go on, try it. + +Enter the following command to see the directories inside your home directories: + +``` +ls +``` + +This is what it shows to me: + +``` +[email protected]:~$ ls +Desktop Downloads Pictures Templates VirtualBoxVMs +Documents Music Public Videos +``` + +Yours may be similar but not exactly the same. + +Let's say you want to go to the Documents directory. Since it is available under the current directory, it will be easier to use the relative path here: + +``` +cd Documents +``` + +> 💡 The default terminal emulators of most Linux distributions show you the current location in the prompt itself. You don't have to use pwd all the time just to know where you are. + +![Most Linux terminal prompts show the current location][3] + +Now, let's say you want to switch to the Templates directory that was located in your home directory. + +You can use the relative path `../Templates` (.. takes you to the one directory above Documents to /home/username and from there you go to Templates). + +But let's go for the absolute path instead. Please change 'abhishek' with your username. + +``` +cd /home/abhishek/Templates +``` + +Now you are in the Templates directory. How about going to the Downloads directory? Use the relative path this time: + +``` +cd ../Templates +``` + +Here's a replay of all the above directory change examples you just read. + +![cd command example][4] + +> 💡 Utilize the tab completion in the terminal. Start typing a few letters of the command and directory and hit the tab key. It will try to autocomplete or show you the possible options.  + +### Troubleshooting + +You may encounter a few common errors while changing the directories in Linux terminal. + +#### No such file or directory + +If you see an error like this while changing the directories: + +> bash: cd: directory_name: No such file or directory + +Then you made mistake with the path or name of the directories. Here are a few things to note. + +- Make sure there is no typo in the directory name. +- Linux is case sensitive. Downloads and downloads are not the same. +- You are not specifying the correct path. Perhaps you are in some other location? Or did you miss the first / in the absolute path? + +![Common examples of "no such file or directory" error][5] + +#### Not a directory + +If you see an error like this: + +> bash: cd: filename: Not a directory + +It means that you are trying to use the cd command with a file, not a directory (folder). Clearly, you cannot enter a file the same way you enter a folder and hence this error. + +![Not a directory error with the cd command][6] + +#### Too many arguments + +Another common rookie Linux mistake: + +> bash: cd: too many arguments + +The cd commands take only one argument. That means that you can only specify one directory to the command. + +If you specify more than one or mistyped a path by adding a space to the path, you'll see this error. + +![Too many arguments error in Linux terminal][7] + +> 🏋🏻 If you press `cd -`, it will take you to your previous directory. It's quite handy when you are switching between two distant locations. You don't have to type the long paths again. + +### Special directory notations + +Before ending this tutorial, let me quickly tell you about the special notation `~`. In Linux, ~ is a shortcut for the user's home directory. + +If user `abhi` is running it, ~ would mean `/home/abhi` and if user `prakash` was running it, it would mean `/home/prakash`. + +To summarize all the special directory notations you learned in this chapter of the terminal basics series: + +| Notation | Description | +| :- | :- | +| . | Current directory | +| .. | Parent directory | +| ~ | Home directory | +| - | Previous directory | + +### Test your knowledge + +Here are a few simple exercises to test your newly learned knowledge of the path and the cd command. + +Move to your home directory and create a nested directory structure with this command: + +``` +mkdir -p sample/dir1/dir2/dir3 +``` + +Now, try this one by one: + +- Go to the dir3 using either absolute or relative path +- Move to dir1 using relative path +- Now go to dir2 using the shortest path you can imagine +- Change to the sample directory using absolute path +- Go back to your home directory + +> 🔑 Want to know if you got all of them right or not? Feel free to [share your answers in the It's FOSS Community][8]. + +Now that you know how to change directories, how about you learn about creating them? + +I highly recommend reading this article to learn small but useful things about the terminals and the commands. + +Stay tuned for more chapters in the Linux Terminal Basics series if you want to learn the essentials of the Linux command line. + +And, of course, your feedback on this new series is welcome. What can I do to improve it? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/change-directories/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/content/images/2023/02/path-linux.webp +[2]: https://itsfoss.com/content/images/2023/02/absolute-and-relative-path.png +[3]: https://itsfoss.com/content/images/2023/02/linux-terminal-prompt.png +[4]: https://itsfoss.com/content/images/2023/02/cd-command-example.svg +[5]: https://itsfoss.com/content/images/2023/02/common-errors-with-cd.png +[6]: https://itsfoss.com/content/images/2023/02/not-a-directory-error-linux.png +[7]: https://itsfoss.com/content/images/2023/02/too-many-arguments.png +[8]: https://itsfoss.community/t/exercise-in-changing-directories-in-linux-terminal/10177?ref=its-foss From 810a182ccd361808ee9ea667d55eb9e77086e404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 11 Mar 2023 10:11:36 +0800 Subject: [PATCH 048/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230309.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ar?= =?UTF-8?q?ch=20Linux=20vs=20Other=20Linux=20Distros=20Which=20is=20Right?= =?UTF-8?q?=20for=20You.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...x vs Other Linux Distros Which is Right for You.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md diff --git a/sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md b/sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md new file mode 100644 index 0000000000..2feeadeb4b --- /dev/null +++ b/sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md @@ -0,0 +1,144 @@ +[#]: subject: "Arch Linux vs Other Linux Distros: Which is Right for You?" +[#]: via: "https://www.debugpoint.com/arch-linux-vs-other-distros/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Arch Linux vs Other Linux Distros: Which is Right for You? +====== + +**If you plan to use Arch Linux as a daily driver, you should consider several benefits of Arch vs other distros. Here’s a quick comparison.** + +If you think about switching to Linux, you will come across hundreds of Linux distributions or “distros”. Each Linux distribution has its unique features, strengths, and weaknesses. + +They offer users a choice of unique features, tools, and interfaces to cater to different needs. The choice of the right Linux distribution can be overwhelming if you want to compare it with Arch Linux. + +In this article, I will focus on Arch Linux, one of the most popular Linux distributions and compare it with other popular Linux distributions. + +### A few notes about Arch Linux + +Arch Linux is a lightweight and highly customizable Linux distribution, initially released in 2002. Unlike other popular distributions, Arch Linux is a minimalist distribution with a do-it-yourself (DIY) approach. It is designed for intermediate to advanced Linux users who prefer control and flexibility over ease of use. + +Arch Linux follows a rolling release model, meaning you can often update your system with the latest software packages. + +#### Benefits of Arch Linux + +There are many benefits of Arch Linx. However, the advantages of a distro always depend on your use case or taste. It varies. But in my opinion, Arch Linux offers several advantages over other Linux distributions, such as: + +- Lightweight and fast (the vanilla install of Arch, especially with Xfce desktop) +- Flexibility and customization +- Up-to-date software packages +- Reliable and stable (if used and maintained correctly) +- The most extensive collection of packages via Arch User Repository (AUR) +- Availability of development packages via testing repo and installation + +Now, let’s have a brief overview of major & popular Linux distributions. + +### A brief overview of other main distros + +#### Ubuntu + +Created by Canonical, Ubuntu is one of the most popular Linux distributions, designed for all users and use cases. You can use Ubuntu for daily work, development environment, casual browsing and more. It is based on Debian and offers a user-friendly GNOME desktop environment interface with excellent software management tools. Ubuntu releases two versions every year, with a long-term-version in every two years. + +#### Fedora + +Developed and funded by Red hat, Fedora is another popular Linux distribution. It is built for intermediate to advanced users. It offers the latest software packages and features a cutting-edge desktop environment. Many users prefer Fedora because it is always at the forefront while adopting modern technology. For example, Wayland display server, Piperwire sound server, out-of-memory handling, and many other techs are first adopted by Fedora. And Ubuntu follows after that. + +#### Debian + +Termed as a “Universal operating system”, Debian Linux has been around for more than two decades. It is stable, reliable and features vast repo of software packages. Debian is known for supporting all computer architectures. Debian’s “stable” version is known to be the best stable Linux distro today. Although, its release cadence is a little slower than others in this list. + +#### CentOS + +CentOS is known for its stability, security, and reliability and is widely used in enterprise environments for server deployment and management. Based on Red Hat Linux, CentOS provides a robust and scalable platform for running web servers, databases, and critical applications. Its long-term support and frequent updates make it popular among developers, system administrators, and businesses. + +### Arch Linux vs Other Linux Distros: Comparison + +Now that you have some idea about some of the popular Linux distributions, let’s compare Arch Linux with other Linux distributions. + +#### Installation Process + +Over the years, Arch Linux has had a reputation for being challenging to install compared to other distributions, as it requires manual installation and configuration. However, the Arch Linux installation process offers users greater control and customization options. + +But recently, the Arch Linux team introduced a menu-driven easy-to-follow installer via the “[archinstall][1]” script. Using this and some basic knowledge, it is now straightforward to install Arch Linux. Furthermore, Arch Linux also provides [VM and docker images][2] which is very useful for faster deployment of Arch Linux. + +![Final partition table for archinstall][3] + +On the other hand, distributions such as Ubuntu, Linux Mint and Fedora have graphical installation wizards that are easier to use, making them suitable for beginners. + +#### Package Manager + +The default package manager of Arch Linux is [Pacman][4], which is known for its speed and reliability. It also features the [Arch User Repository (AUR)][5], a vast community-driven repository of user-contributed packages. + +In contrast, other distributions like Ubuntu and Debian use the Advanced Package Tool (APT), and FEdora uses DNF, which is also reliable and fast. + +But as per my experience, pacman is faster than apt and dnf package manager if you choose the mirrors carefully. + +#### Rolling Release vs Fixed Release + +One of the significant differences between Arch Linux and other distributions is its rolling release model. Arch Linux provides continuous updates, so users can always access the latest software packages. In contrast, distributions like Ubuntu and Fedora takes time to make it available via their standard release plans. + +Fedora has fixed releases that come out every six months or so. Ubuntu also have two releases per year. While fixed releases provide stability, they may not have the latest software packages available. + +So, it boils down to your own need and workflow. + +#### Customization and Control + +Arch Linux is designed for users who want complete control and customization over their system. The vanilla Arch Linux install only installs essential software packages, leaving the user to add additional software as per their needs. + +Based on your use case, you can choose to install your favourite browser, text editor, media player, image editors and so on. Nothing is forced upon you. + +Other distributions like Ubuntu and Fedora offer more pre-installed software packages, making them easier to use for beginners. However, they may not provide as much control and customization as Arch Linux. + +But providing pre-installed software makes it easier many users, schools, students and older people who wants a system with pre-build items. + +#### Stability and Security + +Arch Linux is known for its stability and security, primarily due to its minimalist approach to package installation. Users have complete control over which packages they install, making it less susceptible to security vulnerabilities. + +Furthermore, Linux mainline Kernel releases (major and minor) always reaches first in Arch repo every month. So, overall you can be assured that you are almost safe if you keep your Arch Linux updated regularly. + +Other distributions like Debian and CentOS are also known for their stability and security, but they may not have as up-to-date packages as Arch Linux. + +### Which Linux Distro is Right for You? + +The choice of the suitable Linux distribution depends on your needs and expertise level. + +If you are an experienced Linux user looking for complete control and customization, Arch Linux is an excellent choice. And if you know basics way of handling errors, get around of system failures in case of wrong upgrades, then it’s the best choice. + +However, if you are a [beginner][6] or prefer an out-of-the-box experience, distributions like Ubuntu, Linux Mint or Fedora may be better. + +### Conclusion + +Choosing the suitable Linux distribution can be challenging, but understanding their differences can help you make an informed decision. + +Arch Linux is a unique and powerful distribution that offers complete control and customization, but it may not be suitable for everyone. + +Popular distributions like Ubuntu and Fedora offer ease of use and more pre-installed software packages, making them an excellent choice for beginners. + +Finally, I hope this guide you a basic guidance on Arch Linux compared to other distros. + +Cheers. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/arch-linux-vs-other-distros/ + +作者:[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/archinstall-guide/ +[2]: https://archlinux.org/download/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/01/Final-partition-table-for-archinstall.jpg +[4]: https://www.debugpoint.com/pacman-command-arch-examples/ +[5]: https://www.debugpoint.com/aur-arch-linux/ +[6]: https://www.debugpoint.com/linux-distro-beginners/ \ No newline at end of file From 843deeb77c59b0f3e78f88926b438a752511a102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 11 Mar 2023 10:12:03 +0800 Subject: [PATCH 049/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230310.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Wh?= =?UTF-8?q?at=20is=20an=20edge-native=20application.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...⭐️⭐️ What is an edge-native application.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/tech/20230310.0 ⭐️⭐️ What is an edge-native application.md diff --git a/sources/tech/20230310.0 ⭐️⭐️ What is an edge-native application.md b/sources/tech/20230310.0 ⭐️⭐️ What is an edge-native application.md new file mode 100644 index 0000000000..19152b306d --- /dev/null +++ b/sources/tech/20230310.0 ⭐️⭐️ What is an edge-native application.md @@ -0,0 +1,106 @@ +[#]: subject: "What is an edge-native application?" +[#]: via: "https://opensource.com/article/23/3/what-edge-native-application" +[#]: author: "Frédéric Desbiens https://opensource.com/users/fdesbiens" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is an edge-native application? +====== + +Cloud-native. Those two simple words redefined how we build, deploy, and even consume software. Twenty-five years ago, when I had hair I could pull on when having trouble with my code, the idea that I would use an [office suite contained in my web browser][1] would have sounded like science fiction. And yet, here we are. Gone are the days of installing an office suite from a pile of floppy disks. Naturally, the three or four years gap between releases is also a thing of the past. Nowadays, new features may appear anytime and anywhere, with no installation required. It's an understatement to say that the velocity of the software industry increased by an order of magnitude. + +This evolution is a tremendous achievement from my perspective. Of course, if you are a bit younger than me or even one of those "cloud-native" developers who never experienced anything else, you surely see things differently. At this point, [cloud-native][2] is de facto how things are done—even for me. It is not exciting or new, just assumed. However, there are still applications living outside the cloud. Those applications are increasingly impacting our personal and professional lives. You see, software is eating the world. And this means cloud-native applications are increasingly supplemented with edge-native ones. + +In this article, I will define edge applications and describe their characteristics. But before I get to that, it's important to understand how the cloud and edge environments differ. + +### What's the difference between edge and cloud? + +We are increasingly surrounded by everyday objects powered by software. This is why I think the term _Internet of Things_ will eventually be replaced by _Software Defined Everything_. This idea has profound implications for the way applications and services are built. In most cases, connecting things directly to the cloud doesn't make sense. This concept is where [edge computing][3] comes into play. Edge computing, at its core, provides compute, networking, and storage capabilities at the network's border, closer to the source of the data. It makes it possible to reduce latency and optimize bandwidth usage. It makes applications more resilient and lets users control where their data is located physically. + +The edge and the cloud are two very different computing environments. The cloud is defined by the on-demand availability of resources. You can create new virtual machine instances, add network capacity, or change the network topology anytime. Cloud resources are naturally limited, but those limits are so high that most users will never bump into them. By nature, the cloud is heterogeneous, centralized, and large-scale. + +- Heterogeneous: The cloud is heterogeneous since the compute resources available fit into several predefined types. It's possible to create hundreds or even thousands of instances of the same type, all identical unless customized. From a developer's perspective, they represent a stable and predictable hardware platform. +- Centralized: The cloud is centralized. You can deploy resources in specific data centers or geographical zones, but everything is managed from a central console. +- Large-scale: Finally, the cloud is inherently a large-scale environment. Your specific deployment may be small, but the resources at your disposal are immense in terms of capacity and performance. + +The edge is the polar opposite of the cloud. It is heterogeneous, distributed, and small-scale. When designing edge computing solutions, picking the right hardware for the job is critical. In particular, battery-operated devices require top-notch power efficiency, which means that processors based on the ARM and [RISC-V][4] architectures are much more common than in the cloud. Moreover, many edge devices must interact with legacy equipment; they usually feature ports not found on IT equipment and leverage protocols specific to operational technology. For these reasons, edge hardware often differs from one physical location to another. By definition, edge computing implies distributed applications; data processing is performed in various physical locations across the whole edge-to-cloud continuum. Lastly, the edge is a small-scale environment. Of course, deploying thousands of edge nodes to support a solution is possible. However, the compute, networking, and storage resources will be severely limited in any specific location. + +The distinctions between the two environments mean that edge-native applications differ greatly from cloud-native ones. Let's now look more closely at them. + +### Edge-native application characteristics + +Edge-native applications share some characteristics with cloud-native ones. Both application types rely on microservices. They expose APIs, often in a RESTful way, which enables service composition. Both types of applications consist of loosely coupled services. This design prevents the creation of affinities between the services and enhances the overall resiliency of the application. Finally, teams leveraging a DevOps approach focused on continuous integration build them. Edge-native applications, however, will often avoid continuous deployment—especially for applications driven by real-time or mission-critical requirements. + +Edge-native applications naturally possess specific characteristics setting them apart. Specifically, these are lifespan, heterogeneity, and constraints. + +- Lifespan: Edge-native applications typically have a long lifespan. Edge-native applications usually include significant capital investments, such as heavy machinery or industrial equipment. This means they must be maintained and operated for years, if not decades. +- Heterogeneity: Edge-native applications exhibit heterogeneity. Here, I am not only referring to the edge node themselves but also to the origin of all the components of the solution. No one supplier can provide you with the sensors, actuators, microcontrollers, edge nodes, software, and networking equipment needed to build and deploy a solution. At a minimum, you must deal with several vendors with different support lifecycles and commitments to your particular market. +- Constraints: Edge-native applications are constrained by the realities that edge hardware and software face in the field. It's a harsh world outside the data center. The list of threats is long: Extreme temperatures, humidity, electromagnetic interference, water or dust ingress, and vibrations all contribute to shortening the life of the equipment and falsifying sensor readings. Power consumption is also a huge concern, and not just for battery-operated devices. Higher consumption results in more heat, which requires a beefier cooling system which, in turn, is an additional cost and point of failure. Finally, since edge computing applications are inherently distributed, they are completely dependent on the network. You must assume the network will be unstable and unreliable and design the solution accordingly. + +Another important consideration is that edge computing bridges the world of information technology (IT) and operational technology (OT). The latter provides the components of industrial control systems used to operate factories, pipelines, water distribution systems, and wind farms, for example. In other words, OT is part of the technology universe where Programmable Logic Controllers (PLCs) and Supervisory Control and Data Acquisition Systems (SCADA) reign supreme. IT and OT embody two different approaches to computing. IT relies on off-the-shelf components that are replaceable and updated frequently. A three-year lifecycle for laptops is common in many organizations. On the other hand, OT is about purpose-built solutions controlling critical infrastructure, which means updates are infrequent. Thus, one could say that, for many organizations, IT is a service to the business, while OT is the business itself. + +Not all edge-native applications target OT use cases. But since they may exist outside of the cloud and the corporate data center, they are exposed to many of the dangers OT applications must face and must fulfill many of the same requirements. This requires a change of mindset from developers. + +### Defining edge-native + +We now have a solid understanding of the edge environment and the characteristics of edge-native applications. Now is the time to answer the question in this article's title: What is an edge-native application? + +My answer to this question goes like this: + +> A distributed application made of virtualized or containerized microservices that are deployed outside the cloud and the corporate data center. Edge-native applications are optimized for field use, resilient, adapted to mobility, orchestrated and leverage zero trust and zero touch operational models. + +This definition implies that it is not enough to have distributed nodes processing data locally to have an edge-native application. Such applications, after all, are built from the ground up for the edge using a specific approach. Think about it: Is any random transactional website a cloud-native application? Of course not. + +#### Optimized for field use + +Because they often run on constrained hardware, edge-native applications are optimized for size and power consumption. There is little to no elasticity at the edge, meaning you must manage resources carefully, especially considering the longer lifespan expected from the solution. You could be tempted to future-proof your edge nodes by providing them with additional compute power, memory, and storage. However, this is not cost-effective and, in any case, will probably not be viable over the long term. + +#### Resilient + +Edge-native applications possess great resiliency, given their distributed nature. They assume that nodes, services, and even the network may fail anytime. They manage such outages as seamlessly as possible by buffering outbound transactions and data for later. Nodes near a failed system should be able to take over, although with reduced quality of service. + +#### Adapted to mobility + +Edge-native applications can connect to mobile networks and be deployed on nodes onboard vehicles. They are location-aware, meaning they can dynamically take advantage of services available in the local environment. They can also adapt their behavior according to local regulations and requirements. Moreover, they can leverage location-based routing when needed. This enables them to pick the most cost-effective option to transmit data and receive commands. + +#### Orchestrated + +The components of edge-native applications may be deployed inside containers, but virtual machines, serverless functions, and binaries also play a role. The lifecycle of all these deployment artifacts must be carefully orchestrated to scale up or down certain services or to stage incremental updates. Naturally, this reliance on orchestration makes the whole application more resilient since additional service instances can be spun up to face adverse conditions or operational challenges. + +#### Zero trust + +The [zero trust][5] model implies that, by default, no device is trusted. Every device and node is seen as a potential attack vector. The zero trust model involves systematic device authentication and authorization, with limitations on the scope and timeframe of the access granted. In addition, data must be encrypted in motion and at rest. + +#### Zero touch + +Edge-native applications require credentials for authentication, authorization, and even device attestation. The latter involves using certificates or similar means to prove a device's unique identity and trustworthiness. Zero touch onboarding means that such credentials are deployed automatically from a central location as soon as a device connects to the network. Manual manipulations are error-prone and potential attack vectors, so eliminating them is an important priority. + +### Wrap up + +If you are a cloud-native developer, I hope you now realize how the edge computing space differs from what you are familiar with. These differences should not prevent you from jumping in, however. The languages and techniques you know are certainly applicable at the edge. With the right mindset and a willingness to learn, you can become a productive edge-native developer. + +If you are looking for a community of experienced edge-native developers to strike up a conversation with, join the [Edge Native working group][6] at the [Eclipse Foundation][7]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/what-edge-native-application + +作者:[Frédéric Desbiens][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/fdesbiens +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/20/12/onlyoffice-docs +[2]: https://www.redhat.com/en/topics/cloud-native-apps?intcmp=7013a000002qLH8AAM +[3]: https://www.redhat.com/en/topics/edge-computing/what-is-edge-computing?intcmp=7013a000002qLH8AAM +[4]: https://developers.redhat.com/blog/2018/11/09/why-you-should-care-about-risc-v?intcmp=7013a000002qLH8AAM +[5]: https://www.redhat.com/en/topics/security/what-is-zero-trust?intcmp=7013a000002qLH8AAM +[6]: https://edgenative.eclipse.org/ +[7]: https://www.eclipse.org/org/foundation/ \ No newline at end of file From 7713e4b7c646debb785a62d00280df58f683457a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 11 Mar 2023 10:12:51 +0800 Subject: [PATCH 050/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230310.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20the=20GDB=20debugger=20and=20other=20tools=20use=20call=20f?= =?UTF-8?q?rame=20information=20to=20determine=20the=20active=20function?= =?UTF-8?q?=20calls.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ormation to determine the active function calls.md | 247 ++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 sources/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md diff --git a/sources/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md b/sources/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md new file mode 100644 index 0000000000..2f483f7941 --- /dev/null +++ b/sources/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md @@ -0,0 +1,247 @@ +[#]: subject: "How the GDB debugger and other tools use call frame information to determine the active function calls" +[#]: via: "https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function-calls" +[#]: author: "Will Cohen https://opensource.com/users/wcohen" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How the GDB debugger and other tools use call frame information to determine the active function calls +====== + +In my [previous article][1], I showed how debuginfo is used to map between the current instruction pointer (IP) and the function or line containing it. That information is valuable in showing what code the processor is currently executing. However, having more context for the calls that lead up to the current function and line being executed is also extremely helpful. + +For example, suppose a function in a library has an illegal memory access due to a null pointer being passed as a parameter into the function. Just looking at the current function and line shows that the fault was triggered by attempted access through a null pointer. However, what you really want to know is the full context of the active function calls leading up to that null pointer access, so you can determine how that null pointer was initially passed into the library function. This context information is provided by a backtrace, and allows you to determine which functions could be responsible for the bogus parameter. + +One thing’s certain: Determining the currently active function calls is a non-trivial operation. + +### Function activation records + +Modern programming languages have local variables and allow for recursion where a function can call itself. Also, concurrent programs have multiple threads that may have the same function running at the same time. The local variables cannot be stored in global locations in these situations. The locations of the local variables must be unique for each invocation of the function. Here’s how it works: + +- The compiler produces a function activation record each time a function is called to store local variables in a unique location. +- For efficiency, the processor stack is used to store the function activation records. +- A new function activation record is created at the top of the processor stack for the function when it’s called. +- If that function calls another function, then a new function activation record is placed above the existing function activation record. +- Each time there is a return from a function, its function activation record is removed from the stack. + +The creation of the function activation record is created by code in the function called the prologue. The removal of the function activation record is handled by the function epilogue. The body of the function can make use of the memory set aside on the stack for it for temporary values and local variables. + +Function activation records can be variable size. For some functions, there’s no need for space to store local variables. Ideally, the function activation record only needs to store the return address of the function that called _this_ function. For other functions, significant space may be required to store local data structures for the function in addition to the return address. This variation in frame sizes leads to compilers using frame pointers to track the start of the function’s activation frame. Now the function prologue code has the additional task of storing the old frame pointer before creating a new frame pointer for the current function, and the epilogue has to restore the old frame pointer value. + +The way that the function activation record is laid out, the return address and old frame pointer of the calling function are constant offsets from the current frame pointer. With the old frame pointer, the next function’s activation frame on the stack can be located. This process is repeated until all the function activation records have been examined. + +### Optimization complications + +There are a couple of disadvantages to having explicit frame pointers in code. On some processors, there are relatively few registers available. Having an explicit frame pointer causes more memory operations to be used. The resulting code is slower because the frame pointer must be in one of the registers. Having explicit frame pointers may constrain the code that the compiler can generate, because the compiler may not intermix the function prologue and epilogue code with the body of the function. + +The compiler’s goal is to generate fast code where possible, so compilers typically omit frame pointers from generated code. Keeping frame pointers can significantly lower performance, as shown by [Phoronix’s benchmarking][2]. The downside of omitting frame pointers is that finding the previous calling function’s activation frame and return address are no longer simple offsets from the frame pointer. + +### Call Frame Information + +To aid in the generation of function backtraces, the compiler includes DWARF Call Frame Information (CFI) to reconstruct frame pointers and to find return addresses. This supplemental information is stored in the `.eh_frame` section of the execution. Unlike traditional debuginfo for function and line location information, the `.eh_frame` section is in the executable even when the executable is generated without debug information, or when the debug information has been stripped from the file. The call frame information is essential for the operation of language constructs like **throw-catch** in C++. + +The CFI has a Frame Description Entry (FDE) for each function. As one of its steps, the backtrace generation process finds the appropriate FDE for the current activation frame being examined. Think of the FDE as a table, with each row representing one or more instructions, with these columns: + +- Canonical Frame Address (CFA), the location the frame pointer would point to +- The return address +- Information about other registers + +The encoding of the FDE is designed to minimize the amount of space required. The FDE describes the changes between rows rather than fully specify each row. To further compress the data, starting information common to multiple FDEs is factored out and placed in Common Information Entries (CIE). This makes the FDE more compact, but it also requires more work to compute the actual CFA and find the return address location. The tool must start from the uninitialized state. It steps through the entries in the CIE to get the initial state on function entry, then it moves on to process the FDE by starting at the FDE’s first entry, and processes operations until it gets to the row that covers the instruction pointer currently being analyzed. + +### Example use of Call Frame Information + +Start with a simple example with a function that converts Fahrenheit to Celsius. Inlined functions do not have entries in the CFI, so the `__attribute__((noinline))` for the `f2c` function ensures the compiler keeps `f2c` as a real function. + +``` +#include + +int __attribute__ ((noinline)) f2c(int f) +{ + int c; + printf("converting\n"); + c = (f-32.0) * 5.0 /9.0; + return c; +} + +int main (int argc, char *argv[]) +{ + int f; + scanf("%d", &f); + printf ("%d Fahrenheit = %d Celsius\n", + f, f2c(f)); + return 0; +} +``` + +Compile the code with: + +``` +$ gcc -O2 -g -o f2c f2c.c +``` + +The `.eh_frame` is there as expected: + +``` +$ eu-readelf -S f2c |grep eh_frame +[17] .eh_frame_hdr PROGBITS 0000000000402058 00002058 00000034 0 A 0 0 4 +[18] .eh_frame PROGBITS 0000000000402090 00002090 000000a0 0 A 0 0 8 +``` + +We can get the CFI information in human readable form with: + +``` +$ readelf --debug-dump=frames f2c > f2c.cfi +``` + +Generate a disassembly file of the `f2c` binary so you can look up the addresses of the `f2c` and `main` functions: + +``` +$ objdump -d f2c > f2c.dis +``` + +Find the following lines in `f2c.dis` to see the start of `f2c` and `main`: + +``` +0000000000401060
: +0000000000401190 : +``` + +In many cases, all the functions in the binary use the same CIE to define the initial conditions before a function’s first instruction is executed. In this example, both `f2c` and `main` use the following CIE: + +``` +00000000 0000000000000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + DW_CFA_def_cfa: r7 (rsp) ofs 8 + DW_CFA_offset: r16 (rip) at cfa-8 + DW_CFA_nop + DW_CFA_nop +``` + +For this example, don’t worry about the Augmentation or Augmentation data entries. Because x86_64 processors have variable length instructions from 1 to 15 bytes in size, the “Code alignment factor” is set to 1. On a processor that only has 32-bit (4 byte instructions), this would be set to 4 and would allow more compact encoding of how many bytes a row of state information applies to. In a similar fashion, there is the “Data alignment factor” to make the adjustments to where the CFA is located more compact. On x86_64, the stack slots are 8 bytes in size. + +The column in the virtual table that holds the return address is 16. This is used in the instructions at the tail end of the CIE. There are four `DW_CFA` instructions. The first instruction, `DW_CFA_def_cfa` describes how to compute the Canonical Frame Address (CFA) that a frame pointer would point at if the code had a frame pointer. In this case, the CFA is computed from `r7 (rsp)` and `CFA=rsp+8`. + +The second instruction `DW_CFA_offset` defines where to obtain the return address `CFA-8`. In this case, the return address is currently pointed to by the stack pointer `(rsp+8)-8`. The CFA starts right above the return address on the stack. + +The `DW_CFA_nop` at the end of the CIE is padding to keep alignment in the DWARF information. The FDE can also have padding at the end of the for alignment. + +Find the FDE for `main` in `f2c.cfi`, which covers the `main` function from `0x40160` up to, but not including, `0x401097`: + +``` +00000084 0000000000000014 00000088 FDE cie=00000000 pc=0000000000401060..0000000000401097 + DW_CFA_advance_loc: 4 to 0000000000401064 + DW_CFA_def_cfa_offset: 32 + DW_CFA_advance_loc: 50 to 0000000000401096 + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop +``` + +Before executing the first instruction in the function, the CIE describes the call frame state. However, as the processor executes instructions in the function, the details will change. First the instructions `DW_CFA_advance_loc` and `DW_CFA_def_cfa_offset` match up with the first instruction in `main` at `401060`. This adjusts the stack pointer down by `0x18` (24 bytes). The CFA has not changed location but the stack pointer has, so the correct computation for CFA at `401064` is `rsp+32`. That’s the extent of the prologue instruction in this code. Here are the first couple of instructions in `main`: + +``` +0000000000401060
: + 401060: 48 83 ec 18 sub $0x18,%rsp + 401064: bf 1b 20 40 00 mov $0x40201b,%edi +``` + +The `DW_CFA_advance_loc` makes the current row apply to the next 50 bytes of code in the function, until `401096`. The CFA is at `rsp+32` until the stack adjustment instruction at `401092` completes execution. The `DW_CFA_def_cfa_offset` updates the calculations of the CFA to the same as entry into the function. This is expected, because the next instruction at `401096` is the return instruction `(ret`) and pops the return value off the stack. + +``` +401090: 31 c0 xor %eax,%eax + 401092: 48 83 c4 18 add $0x18,%rsp + 401096: c3 ret +``` + +This FDE for `f2c` function uses the same CIE as the `main` function, and covers the range of `0x41190` to `0x4011c3`: + +``` +00000068 0000000000000018 0000006c FDE cie=00000000 pc=0000000000401190..00000000004011c3 + DW_CFA_advance_loc: 1 to 0000000000401191 + DW_CFA_def_cfa_offset: 16 + DW_CFA_offset: r3 (rbx) at cfa-16 + DW_CFA_advance_loc: 29 to 00000000004011ae + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop +``` + +The `objdump` output for the `f2c` function in the binary: + +``` +0000000000401190 : + 401190: 53 push %rbx + 401191: 89 fb mov %edi,%ebx + 401193: bf 10 20 40 00 mov $0x402010,%edi + 401198: e8 93 fe ff ff call 401030 + 40119d: 66 0f ef c0 pxor %xmm0,%xmm0 + 4011a1: f2 0f 2a c3 cvtsi2sd %ebx,%xmm0 + 4011a5: f2 0f 5c 05 93 0e 00 subsd 0xe93(%rip),%xmm0 # 402040 <__dso_handle+0x38> + 4011ac: 00 + 4011ad: 5b pop %rbx + 4011ae: f2 0f 59 05 92 0e 00 mulsd 0xe92(%rip),%xmm0 # 402048 <__dso_handle+0x40> + 4011b5: 00 + 4011b6: f2 0f 5e 05 92 0e 00 divsd 0xe92(%rip),%xmm0 # 402050 <__dso_handle+0x48> + 4011bd: 00 + 4011be: f2 0f 2c c0 cvttsd2si %xmm0,%eax + 4011c2: c3 ret +``` + +In the FDE for `f2c`, there’s a single byte instruction at the beginning of the function with the `DW_CFA_advance_loc`. Following the advance operation, there are two additional operations. A `DW_CFA_def_cfa_offset` changes the CFA to `%rsp+16` and a `DW_CFA_offset` indicates that the initial value in `%rbx` is now at `CFA-16` (the top of the stack). + +Looking at this `fc2` disassembly code, you can see that a `push` is used to save `%rbx` onto the stack. One of the advantages of omitting the frame pointer in the code generation is that compact instructions like `push` and `pop` can be used to store and retrieve values from the stack. In this case, `%rbx` is saved because the `%rbx` is used to pass arguments to the `printf` function (actually converted to a `puts` call), but the initial value of `f` passed into the function needs to be saved for the later computation. The `DW_CFA_advance_loc` 29 bytes to `4011ae` shows the next state change just after `pop %rbx`, which recovers the original value of `%rbx`. The `DW_CFA_def_cfa_offset` notes the pop changed CFA to be `%rsp+8`. + +### GDB using the Call Frame Information + +Having the CFI information allows [GNU Debugger (GDB)][3] and other tools to generate accurate backtraces. Without CFI information, GDB would have a difficult time finding the return address. You can see GDB making use of this information, if you set a breakpoint at line 7 of `f2c.c`. GDB puts the breakpoint before the `pop %rbx` in the `f2c` function is done and the return value is not at the top of the stack. + +GDB is able to unwind the stack, and as a bonus is also able to fetch the argument `f` that was currently saved on the stack: + +``` +$ gdb f2c +[...] +(gdb) break f2c.c:7 +Breakpoint 1 at 0x40119d: file f2c.c, line 7. +(gdb) run +Starting program: /home/wcohen/present/202207youarehere/f2c +[Thread debugging using libthread_db enabled] +Using host libthread_db library "/lib64/libthread_db.so.1". +98 +converting + +Breakpoint 1, f2c (f=98) at f2c.c:8 +8 return c; +(gdb) where +#0 f2c (f=98) at f2c.c:8 +#1 0x000000000040107e in main (argc=, argv=) + at f2c.c:15 +``` + +### Call Frame Information + +The DWARF Call Frame Information provides a flexible way for a compiler to include information for accurate unwinding of the stack. This makes it possible to determine the currently active function calls. I’ve provided a brief introduction in this article, but for more details on how the DWARF implements this mechanism, see the [DWARF specification][4]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function-calls + +作者:[Will Cohen][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/wcohen +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/compiler-optimization-debugger-line-information +[2]: https://www.phoronix.com/review/fedora-frame-pointer +[3]: https://opensource.com/article/21/3/debug-code-gdb +[4]: https://dwarfstd.org/Download.php From 52406bb02b8afc14a271dadf79b85bc79344dcaa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Mar 2023 10:19:55 +0800 Subject: [PATCH 051/318] RP @geekpi https://linux.cn/article-15616-1.html --- ...️ Use your Raspberry Pi as a streaming server.md | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) rename {translated/tech => published}/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md (60%) diff --git a/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md b/published/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md similarity index 60% rename from translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md rename to published/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md index 63faa3a7e8..1140dfcbc7 100644 --- a/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md +++ b/published/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md @@ -3,22 +3,26 @@ [#]: author: "Sven Erbeck https://opensource.com/users/erbeck" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15616-1.html" -把你的树莓派当作流媒体服务器使用 +将你的树莓派用作流媒体服务器 ====== -从网络摄像头流式传输实时视频有多种原因。树莓派平台很适合此类应用。对于实时流媒体服务器等连续应用,它只需要很少的电力。可以与 Raspicam 相机模块、USB 摄像头或其他网络视频信号进行通信。该系统是一个 RTMP、HLS 和 SRT 服务器。这篇文章展示了如何将树莓派设置为流媒体服务器以使用 HLS 流媒体。你需要一个视频源才能把它作为流媒体服务器使用。 +![][0] + +> 用树莓派串流网络摄像头的实时视频,并将视频重新串流到社交网络。 + +出于各种原因,人们需要流式传输网络摄像头的实时视频。树莓派平台很适合此类应用。对于实时流媒体服务器等连续应用,它只需要很少的电力。可以与 Raspicam 相机模块、USB 摄像头或其他网络视频信号进行通信。该系统是一个 RTMP、HLS 和 SRT 服务器。这篇文章展示了如何将树莓派设置为流媒体服务器以使用 HLS 流媒体。你需要一个视频源才能把它作为流媒体服务器使用。 即使没有树莓派,你也可以完成这里描述的步骤。此外,还有针对 [Windows][1]、[Linux][2] 和 [macOS][3] 的进一步安装说明。 ### 设置 -该应用程序是 datarhei [Restreamer][4],是 datarhei [Core][5] 的图形用户界面。datarhei Core 在底层运行著名的媒体框架 FFmpeg。开始使用 datarhei Restreamer 的最简单方法是安装官方 Docker 容器。通过 Docker Hub 的程序下载和安装是通过 `pull` 命令自动进行的。安装后,Restreamer 立即启动。如果你没有树莓派,可以使用 datarhei [Restreamer GitHub][4] 页面上的其他 Docker 容器之一(例如,支持 AMD64 或 GPU Cuda)。 +该应用程序是 datarhei [Restreamer][4],是 datarhei [Core][5] 的图形用户界面。datarhei Core 在底层运行著名的媒体框架 FFmpeg。开始使用 datarhei Restreamer 的最简单方法是安装官方的 Docker 容器。通过 Docker Hub 的程序下载和安装是通过 ` docker pull` 命令自动进行的。安装后,Restreamer 立即启动。如果你没有树莓派,可以使用 datarhei [Restreamer GitHub][4] 页面上的其他 Docker 容器之一(例如,支持 AMD64 或 GPU Cuda)。 -datarhei Restreamer 和 datarhei Core 都是 [Apache License 2.0][6] 下的开源软件。 +datarhei Restreamer 和 datarhei Core 都是 [Apache 许可证 2.0][6] 下的开源软件。 以下是在支持 GPU 的树莓派 3 及以上机型上的安装命令: @@ -50,7 +54,7 @@ docker run -d --restart=always --name restreamer \ ### 视频输入 -该向导将帮助你从一开始就创建一个视频源。这可以是一个 USB 视频源、树莓派摄像头,或者是一个网络源,如 IP 摄像头或来自网络的 m3u8 文件。HLS、RTMP 和实时 SRT 协议都可以使用。该向导帮助正确配置视频分辨率和声音。在最后一步,你可以从 Creative Commons 分配不同的许可证。值得看一下视频信号的设置。你会发现几个选项,例如为垂直视频平台转码或旋转视频。 +该向导将帮助你从头开始创建一个视频源。这可以是一个 USB 视频源、树莓派摄像头,或者是一个网络源,如 IP 摄像头或来自网络的 m3u8 文件。HLS、RTMP 和实时 SRT 协议都可以使用。该向导可以帮助正确配置视频分辨率和声音。在最后一步,你可以分配不同 知识共享Creative Commons 许可证。值得看一下视频信号的设置。你会发现几个选项,例如为垂直视频平台转码或旋转视频。 ### 仪表板 @@ -74,21 +78,21 @@ docker run -d --restart=always --name restreamer \ 有不同的方法来播放视频信号。 -[发布网站][10] 是 Restreamer 最简单、即时可用且内部托管的登录页面。播放页面也可以传输到 Chromecast 和 AirPlay。基本设置,如调整背景图片和在播放器中添加标识,可以直接在 Restreamer 中进行。那些懂 HTML 的人可以为自己定制页面。高级用户可以注入代码,以使用网站的外部模块,如聊天。视频播放器下的统计模块显示活跃的观众和所有视图。**分享**按钮支持直播流的分发。网站的 HTTPS 证书通过 Let's Encrypt 激活,无需太多努力。通过简单的 HTTPS 端口转发到树莓派的 LAN IP,网站就可以公开访问。 +这个 [发布网站][10] 是 Restreamer 最简单、即时可用且内部托管的登录页面。播放页面也可以传输到 Chromecast 和 AirPlay。调整背景图片和在播放器中添加标识等基本设置可以直接在 Restreamer 中进行。那些懂 HTML 的人可以为自己定制页面。高级用户可以注入代码,以使用网站的外部模块,如聊天。视频播放器下的统计模块显示活跃的观众和所有视图。“分享Share” 按钮支持直播流的分发。网站的 HTTPS 证书通过 Let's Encrypt 激活,无需太多努力。通过简单的 HTTPS 端口转发到树莓派的 LAN IP,网站就可以公开访问。 ![Landingpage from datahrei Restreamer][11] -发布服务是重新传输内容的一个好方法。对于流行的网站,如 YouTube、Twitch 或 PeerTube,有许多现成的模块。同样,对于其他流媒体软件,对流行的 CDN 也是如此。对视频协议的完全控制允许流式传输到所有支持 RTMP、HLS 和 SRT 的目标地址。一个带有视频播放器的 HTML 片段代码在网页上工作。 +发布服务是重新传输内容的一个好方法。对于流行的网站,如 YouTube、Twitch 或 PeerTube,有许多现成的模块。同样,对于其他流媒体软件、流行的 CDN 也是如此。对视频协议的完全控制允许流式传输到所有支持 RTMP、HLS 和 SRT 的目标地址。一个带有视频播放器的 HTML 片段代码在网页上工作。 ![Presets for publication services][12] ### 使用树莓派播放流媒体节省电力 -这篇文章展示了如何将树莓派变成一个流媒体服务器。树莓派平台允许你以省电的方式与各种视频信号互动。预先的设置使配置服务器变得很容易,高级用户可以对系统进行一些调整。你可以用它来做重播,在网站上托管实时流式传输,或使用 [OBS][13] 集成到系统环境中。使用不同的视频源和传输协议作为项目的基础,提供了极大的灵活性,使这个系统具有高度的可定制性。此外,带有 FFmpeg 的 datarhei Core 使软件开发者很容易扩展所有的应用进程。 +这篇文章展示了如何将树莓派变成一个流媒体服务器。树莓派平台允许你以省电的方式与各种视频信号互动。预先的设置使配置服务器变得很容易,高级用户可以对系统进行一些调整。你可以用它来做回放,在网站上托管实时流式传输,或使用 [OBS][13] 集成到系统环境中。使用不同的视频源和传输协议作为项目的基础,提供了极大的灵活性,使这个系统具有高度的可定制性。此外,带有 FFmpeg 的 datarhei Core 使软件开发者很容易扩展所有的应用进程。 该程序将树莓派变成一个专门的流媒体服务器。你可以独立地直播到网站或多路直播到不同的视频网络,而无需额外的视频提供商。 -使用登录名 **admin** 和密码 **demo** 在项目网站上安装之前测试功能齐全的 [demo][14]。 +可以使用登录名 “admin” 和密码 “demo” 在项目网站上安装之前测试功能齐全的 [演示][14]。 -------------------------------------------------------------------------------- @@ -97,7 +101,7 @@ via: https://opensource.com/article/23/3/raspberry-pi-streaming-server 作者:[Sven Erbeck][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/) 荣誉推出 @@ -116,4 +120,5 @@ via: https://opensource.com/article/23/3/raspberry-pi-streaming-server [11]: https://opensource.com/sites/default/files/2023-01/fig3-int-publication-website-datarhei.jpg [12]: https://opensource.com/sites/default/files/2023-01/fig4-preset-publication-services-datarhei.jpg [13]: https://opensource.com/article/20/6/obs-websockets-streaming -[14]: https://demo.datarhei.com/ui \ No newline at end of file +[14]: https://demo.datarhei.com/ui +[0]: https://img.linux.net.cn/data/attachment/album/202303/11/101802ajd68nnzn6788h6i.jpg \ No newline at end of file From 3f8cbf133dbf4ad7c58df73e11efbbdba9a96140 Mon Sep 17 00:00:00 2001 From: Cubik Date: Sat, 11 Mar 2023 01:22:38 -0500 Subject: [PATCH 052/318] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91][?= =?UTF-8?q?tech]:=2020230305.0=20=E2=AD=90=EF=B8=8F=20Install=20DOSBox=20i?= =?UTF-8?q?n=20Ubuntu=20to=20Play=20Retro=20Games.md=20(#28837)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [正在翻译][tech]: 20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md * [翻译完成][tech]: 20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md * [移动翻译][tech]: 20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md --- ...nstall DOSBox in Ubuntu to Play Retro Games.md | 155 ------------------ ...nstall DOSBox in Ubuntu to Play Retro Games.md | 155 ++++++++++++++++++ 2 files changed, 155 insertions(+), 155 deletions(-) delete mode 100644 sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md create mode 100644 translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md diff --git a/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md b/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md deleted file mode 100644 index 6ee19f693a..0000000000 --- a/sources/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: subject: "Install DOSBox in Ubuntu to Play Retro Games" -[#]: via: "https://itsfoss.com/ubuntu-dosbox/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: "Cubik65536" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Install DOSBox in Ubuntu to Play Retro Games -====== - -DOSBox is free and open-source software that allows you to emulate the MS-DOS operating systems from the previous century. - -Why would you want that? For nostalgia as it allows you to play the 8-bit games that were popular in the 80s and 90s. - -That includes legendary games like Mario, Contra, DOOM, etc. - -Sounds good? Let me walk you through how you can install DOSBox on Ubuntu. I will also show how you can install and play retro games. - -**Dosbox is also available in other Linux distributions. Apart from the installation, the rest of the instructions should be valid for all distros.** - -✋🏻 - -DOS was primarily command line based operating system. Using DOSbox requires using the terminal. - -### Installing DOSBox on Ubuntu - -The DOSBox package is available in [the universe repository][1]. Which should already be enabled so DOSBox can be installed using the following command: - -``` -sudo apt install dosbox -``` - -Once done, start the DOSBox from the system menu. - -Alternatively, you can use the terminal for the same: - -``` -dosbox -``` - -**The first run is essential as it will create a configuration file for us. Actually, there is nothing to do on the first launch as it creates the configuration file.** - -So close the DOSBox by executing `exit` on the DOSBox terminal: - -``` -exit -``` - -![][2] - -If you want to tweak the configuration, the file is located at `~/.dosbox/dosbox-[version].conf`. - -Using this configuration, you can tweak almost everything, like entering full screen when you start DOSBox, changing cores, etc. - -But enabling the full screen made things worse (for me) and had to log back in to get to the default: - -![full screen error on DOSBox][3] - -**So know what you are doing or leave the config to default.** - -### Install games on DOSBox - -You can access hundreds of popular games from the software library of the internet archive. - -[Download games from Internet Archive][4] - -Each game comes in its own zip file containing .exe file. Download the ones you like. - -Next, [create a new directory][5] named `dosbox` inside your home directory and also make directories for the games you have downloaded: - -``` -mkdir ~/dosbox && cd ~/dosbox -mkdir [game_name] -``` - -I have downloaded Mario. You can name the directories anything. There is no rules here., It's for organizing games. That's it. - -![create a directory in linux][6] - -Now, extract the `.zip` file to the `dosbox` directory that you've just created: - -![extract file to the dosbox directory][7] - -You can do the same [using the unzip command][8] in the terminal if you want: - -``` -unzip ~/Downloads/MARIO.zip -d ~/dosbox/mario/ -``` - -Once you are done, start DOSBox: - -``` -dosbox -``` - -Next, mount the game to the virtual C drive: - -``` -mount c ~/dosbox/mario -``` - -![mount the game to the virtual C drive][9] - -Now, switch to the virtual C drive: - -``` -c: -``` - -![switch to the virtual drive C][10] - -And finally, start the game by typing the filename of the game: - -``` -mario -``` - -And enjoy the game. - -![play mario on Ubuntu][11] - -### Want more retro stuff? - -If you have an old system or a Raspberry Pi that you are not using anymore, you can turn that machine into a retro gaming console. There are various Linux projects just for this purpose. - -And why stop at games? You can get the vintage computer terminals back as well. - -I hope you will find this guide helpful. How do you game on Linux? Let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntu-dosbox/ - -作者:[Sagar Sharma][a] -选题:[lkxed][b] -译者:[Cubik65536](https://github.com/Cubik65536) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sagar/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/ubuntu-repositories/ -[2]: https://itsfoss.com/content/images/2023/02/run-DOSBox-on-ubuntu.png -[3]: https://itsfoss.com/content/images/2023/02/full-screen-error-on-DOSBox.png -[4]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection&ref=its-foss -[5]: https://itsfoss.com/make-directories/ -[6]: https://itsfoss.com/content/images/2023/02/create-a-directory-in-linux--1.png -[7]: https://itsfoss.com/content/images/2023/02/extract-file-to-the-dosbox-directory-1.png -[8]: https://learnubuntu.com/unzip-file/?ref=its-foss -[9]: https://itsfoss.com/content/images/2023/02/mount-the-game-to-the-virtual-C-drive.png -[10]: https://itsfoss.com/content/images/2023/02/switch-to-the-virtual-drive-C.png -[11]: https://itsfoss.com/content/images/2023/02/play-mario-on-Linux.gif diff --git a/translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md b/translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md new file mode 100644 index 0000000000..c997261351 --- /dev/null +++ b/translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md @@ -0,0 +1,155 @@ +[#]: subject: "Install DOSBox in Ubuntu to Play Retro Games" +[#]: via: "https://itsfoss.com/ubuntu-dosbox/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Ubuntu 中安装 DOSBox 来玩复古游戏 +====== + +DOSBox 是一款免费且开源的软件,它允许你模拟上个世纪的 MS-DOS 操作系统。 + +你为什么要这么做呢?因为怀旧:它可以让你游玩在 80 年代和 90 年代流行的 8 位游戏。 + +这其中包含了马里奥、魂斗罗、DOOM 等传奇游戏。 + +听起来不错吧?让我介绍一下如何在 Ubuntu 中安装 DOSBox。我还会向你展示如何在 DOSBox 中安装并游玩复古游戏。 + +**DOSBox 也可以在其他 Linux 发行版中使用。除了安装部分,其余的指令应该对所有发行版都有效。** + +✋🏻 + +DOS 是一个主要基于命令行的操作系统。使用 DOSbox 需要使用终端。 + +### 在 Ubuntu 中安装 DOSBox + +DOSBox 包可以在 [Universe 软件仓库][1]中找到。这个仓库应该已经被启用了,所以可以使用下面的命令来安装 DOSBox: + +``` +sudo apt install dosbox +``` + +完成之后,从系统菜单中启动 DOSBox。 + +或者,你也可以使用终端来启动 DOSBox: + +``` +dosbox +``` + +**第一次运行是必要的,因为它会为我们创建一个配置文件。实际上,第一次启动时不需要做任何事情,因为它会创建配置文件。** + +然后在 DOSBox 终端中执行 `exit` 命令来关闭 DOSBox: + +``` +exit +``` + +![][2] + +如果你想要调整配置,配置文件位于 `~/.dosbox/dosbox-[版本].conf`。 + +在这个配置文件中,你可以调整几乎所有的东西,比如在启动 DOSBox 时进入全屏模式,更改核心等等。 + +但是(对我来说)启用全屏模式会使事情变得更糟,并且必须重新登录才能进入默认模式: + +![DOSBox 全屏模式错误][3] + +**所以,除非你知道你在做什么,否则不要修改配置。** + +### 在 DOSBox 中安装游戏 + +你可以从互联网档案馆的软件库中访问数百款流行游戏。 + +[从互联网档案馆下载游戏][4] + +每款游戏都有自己的 zip 文件,其中包含 .exe 文件。下载你喜欢的游戏。 + +然后,在你的主目录中[创建一个新目录][5],命名为 `dosbox`,并为你下载的游戏创建目录: + +``` +mkdir ~/dosbox && cd ~/dosbox +mkdir [游戏名称] +``` + +我下载了马里奥。你可以给目录起任何名字。这里没什么要求,只是为了管理游戏而已。 + +![在 Linux 中创建目录][6] + +然后,将 `.zip` 文件解压到你刚刚创建的 `dosbox` 目录中: + +![解压文件到 dosbox 目录][7] + +如果你想的话,你也可以在终端中 [使用 unzip 命令][8] 来做同样的事情: + +``` +unzip ~/Downloads/MARIO.zip -d ~/dosbox/mario/ +``` + +当你完成之后,启动 DOSBox: + +``` +dosbox +``` + +然后,将游戏挂载到虚拟 C 驱动器上: + +``` +mount c ~/dosbox/mario +``` + +![将游戏挂载到虚拟 C 驱动器上][9] + +然后,切换到虚拟 C 驱动器: + +``` +c: +``` + +![切换到虚拟 C 驱动器][10] + +最后,通过输入游戏的文件名来启动游戏: + +``` +mario +``` + +然后,享受游戏吧。 + +![在 Ubuntu 中玩马里奥][11] + +### 想要更多复古的东西? + +如果你有不再使用的旧电脑或者树莓派,你可以把它们变成复古游戏机。有很多 Linux 项目就是为了这个目的而存在的。 + +为什么只玩游戏呢?你也可以把复古的计算机终端带回来。 + +希望该指南对你有所帮助。你是如何在 Linux 上玩游戏的?在评论中告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-dosbox/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/ubuntu-repositories/ +[2]: https://itsfoss.com/content/images/2023/02/run-DOSBox-on-ubuntu.png +[3]: https://itsfoss.com/content/images/2023/02/full-screen-error-on-DOSBox.png +[4]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection&ref=its-foss +[5]: https://itsfoss.com/make-directories/ +[6]: https://itsfoss.com/content/images/2023/02/create-a-directory-in-linux--1.png +[7]: https://itsfoss.com/content/images/2023/02/extract-file-to-the-dosbox-directory-1.png +[8]: https://learnubuntu.com/unzip-file/?ref=its-foss +[9]: https://itsfoss.com/content/images/2023/02/mount-the-game-to-the-virtual-C-drive.png +[10]: https://itsfoss.com/content/images/2023/02/switch-to-the-virtual-drive-C.png +[11]: https://itsfoss.com/content/images/2023/02/play-mario-on-Linux.gif From 8ba9b5a1e7ce4f4b6a0f67cbeb2bb04e70a7018e Mon Sep 17 00:00:00 2001 From: perfiffer Date: Sat, 11 Mar 2023 14:24:17 +0800 Subject: [PATCH 053/318] translated by perfiffer --- ...️⭐️ How to Install and Use htop in Linux.md | 159 +++++++++--------- 1 file changed, 79 insertions(+), 80 deletions(-) diff --git a/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md b/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md index e6c7b75fd5..522e5bc010 100644 --- a/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md +++ b/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md @@ -7,163 +7,162 @@ [#]: publisher: " " [#]: url: " " -How to Install and Use htop in Linux + +如何在 Linux 中安装和使用 htop ====== +Windows 有其著名的任务管理器。Linux 有几个 GUI 和 [命令行系统监视器][1]。每个 Linux 系统都带有其中的几个。 -Windows has its famous task manager. Linux has several GUI and [command line system monitors][1]. Every Linux system comes with a couple of them. +在命令行中,top 命令可能是用于快速检查系统资源使用情况的goto命令。 -On the command line, the top command is perhaps the goto command for checking the system resource utilization quickly. +除了查看进程之外,[使用 top 命令][2]可能会很棘手。这就是 htop 最顶尖的地方。抛开双关语不谈,htop 是一个类似于 top 的实用程序,但具有更好和用户友好的界面。 -[Using top command][2] apart from viewing the processes could be tricky. And this is where htop tops top. Pun aside, htop is a top-like utility but with a better and user-friendly interface. +在本指南中,我将向你展示如何在 Linux 中安装和使用 htop。 -In this guide, I will be showing you how you can install and use htop in Linux. +### 在 Linux 中安装 htop 实用程序 -### Install htop utility in Linux - -You won’t find htop pre-installed on the majority of Linux distributions but being one of the most popular utilities, you will find htop in default repositories of almost every Linux distro. - -So if your machine is powered by something that is based on Debian/Ubuntu, the following command should get your job done: +你不会在大多数的 Linux 发行版中找到预安装的 htop,但作为最流行的实用程序之一,你会在几乎每个 Linux 发行版的默认存储库中找到 htop。 + +因此,如果你的机器由基于 Debian/Ubuntu 驱动的,则以下命令应该可以完成你的工作: ``` sudo apt install htop ``` -Similarly, if you’re on Fedora, you can use the given command: +类似的,如果你使用的是 Fedora,则可以使用以下的命令: ``` sudo dnf install htop ``` -And there’s also a snap package available if you like to avoid building packages from the source: +如果你想避免从源代码构建包,还有一个 snap 包可用: ``` sudo snap install htop ``` -If you’re on something else or want to build from a source, you can always refer to [htop’s GitHub page][3] for detailed instructions. +如果你使用的是其它的发行版或者想从源代码构建,你可以随时参考 [htop 的 GitHub 页面][3]以获得详细说明。 -Once you’re done with the installation, you just have to use the htop command in the terminal, and it will reflect all the ongoing processes in your system: +完成安装后,你只需在终端中使用 htop 命令,它将反映系统中所有正在运行的进程: ``` htop ``` -![install and use htop][4] +![安装和使用 htop][4] -In htop, there is a color coding for the individual section, so let’s have a look at what each color indicates while using htop. +在 htop 中,每个部分都有颜色编码,所以让我们看看使用 htop 时每种颜色表示什么。 -##### What different colors and statistics indicate in htop +##### htop 中不同的颜色和统计信息表示什么 -So let’s start with the CPU usage bar, as it utilizes the maximum number of colors. +让我们从 CPU 使用率栏开始,因为它使用了最大数量的颜色。 -#### CPU usage bar +#### CPU 使用率栏 -![cpu process in htop][5] +![htop 中的 cpu 进程][5] -- **Green:** Resources consumed by user processes. -- **Blue:** Indicates low-priority threads. -- **Red:** CPU resources used by system (kernel) processes. -- **Aqua blue:** Indicates virtualized processes. +- **绿色:** 用户进程消耗的资源。 +- **蓝色:** 表示低优先级线程。 +- **红色:** 系统(内核)进程使用的 CPU 资源。 +- **水蓝色:** 表示虚拟化进程。 -#### Memory bar +#### 内存使用率栏 -![memory bar in htop][6] +![htop 中的内存栏][6] -- **Green:** Memory being utilized by system processes. -- **Blue:** Memory used by buffer pages. -- **Orange:** Memory allocated for cache pages. +- **绿色:** 系统进程正在使用的内存。 +- **蓝色:** 缓冲页面使用的内存。 +- **橙色:** 分配给缓存页面的内存。 -#### Statistics +#### 统计数据 -![task statistics in htop][7] +![htop 中的任务统计][7] -- **1.86** is the average load for the last minute. -- **1.75** is the average load for the last 4 minutes. -- **1.47** is the average load for the last 15 minutes. +- **1.86** 是最后 1 分钟的平均负载。 +- **1.75** 是最后 4 分钟的平均负载。 +- **1.47** 是最后 15 分钟的平均负载。 +- **Tasks: 166** 表示一共有 166 个正在运行的进程。 +- **1249 thr** 表示这 166 个进程由 1249 个线程处理。 +- **1 running** 表示在这 166 个进程中,只有 +- **The load average** 表示一段时间内的平均系统负载。由于我的系统是 Hexa-Core,所以 6.0 以下的都可以。这个数字可能会超过,比如 6.1,所以即将要运行的进程必须等待正在进行的任务完成。 +- **Uptime** 表示你登录后运行的时长。 -- **Tasks: 166** shows there is a total of 166 ongoing processes. -- **1249 thr** indicates that those 166 processes are handled by 1249 threads. -- **1 running** indicates that from those 166 processes, only one task is in a state of running. -- **The load** average indicates the average system load over a period of time. Since my system is Hexa-Core, anything under 6.0 is ok. This number may exceed, such as 6.1, so the upcoming processes have to wait for ongoing tasks to be completed. -- **Uptime** is nothing but hours since you logged in. +现在,让我们跳到实际的实现部分。 -Now, let’s jump to the actual implementation part. +### 如何在 Linux 中使用 htop -### How to use htop in Linux +由于 htop 主要用于检查系统资源,让我们看看如何根据资源消耗对进程进行排序。 -As the htop is mainly used to check for system resources, let’s have a look at how you can sort the processes based on resource consumption. +#### 根据资源消耗对进程进行排序 -#### Sort processes based on Resource Consumption +根据 CPU 和内存使用情况对进程进行排序最简单的方法是使用鼠标指针。将光标悬停在 CPU 或内存部分上,然后单击其中任何一个。 -The easiest way to sort processes based on CPU and memory usage is to use your mouse pointer. Hover the cursor over the CPU or Memory section and click on any of those. +在那里你会看到一个三角形的图标 `△`,你可以根据它从最高到最低的资源消耗对进程进行排序: -And there you will see an icon of a triangle `△` and based on that you can sort the process based on highest to lowest resource consumption: +但是,如果你正在处理远程服务器,你可能无法使用鼠标,在这种情况下,你可以使用键盘快捷键。 -But if you are dealing with remote servers, you might not have the privilege to use a mouse and in those cases, you can use keyboard shortcuts. +按 **F6**,它将显示每个可用的选项来对正在进行的进程进行排序: -Press **F6** and it will bring up every option available to sort the ongoing processes: +![使用键盘快捷键对 htop 中的进程进行排序][8] -![sort processes in htop using keyboard shortcut][8] +你可以使用方向键选择一个首选的排序选项,然后按 Enter 键,结果应该会如预期的那样反映出来。 -You can use arrow keys to select a preferred sorting option and then press the Enter key, results should reflect as intended. +#### 搜索特定进程 -#### Search for a specific process +如果你想查找一个特定的进程及其资源消耗,你可以按 **F3**,它会给你一个搜索提示,如下所示: -If you want to look for a specific process and its resource consumption, you can press **F3** and it will get you a search prompt as shown below: +![在 htop 中搜索进程][9] -![search processes in htop][9] +例如,我搜索 htop,它用浅橙色高亮显示了进程。你可以按 **F3** 获得下一个结果。 -For example, I searched for htop, and it highlighted the process with light orange color. And you can press **F3** for the next result. +#### 过滤正在运行的进程 -#### Filter ongoing processes +虽然搜索可能会让你获得预期的结果,但我发现使用关键字的过滤过程更加有效,因为它提供了一个过程列表。 -While searching may get you the intended results, I find the filtering process using keywords even more effective as it presents a list of processes. +要过滤进程,你必须按 **F4** 并输入进程的名称。例如,我过滤了与 gnome-boxes 相关的进程: -To filter processes, you have to press **F4** and type the name of the process. For example, I filtered processes related to gnome-boxes: +![在 htop 中过滤进程][10] -![filter processes in htop][10] +#### 杀死进程 -#### Kill process +一旦找到最耗资源和不必要的进程,你只需按 **F9**,它就会向你显示终止信号: -Once you made it to find the most resource-hungry and unnecessary process, you just have to press **F9**, and it will present you with termination signals: +![在 htop 中杀死进程][11] -![kill process in htop][11] +我无法涵盖所有的 15 个终止信号,我们有一个关于[不同终止信息][12]的单独指南,因此如果你想了解更多信息,可以参考该指南。 -I can’t cover all 15 termination signals, we have a separate guide on [different termination signals][12], so you can refer to that guide if you intend to learn more about them. +但我会建议你首先使用 SIGTERM,因为它是终止进程的最有效和友好的方式。 -But I will recommend you use SIGTERM first, as it is the most efficient and friendly way to kill the process. +#### 自定义 htop -#### Customize htop +在这里,我的目标是添加日期和时间并将配色方案更改为单色。 -Here, my aim is to add a date and time and change the color scheme to monochrome. +首先,按 **F2**,它会出现设置提示,允许用户更改 htop 的外观: -First, press **F2**, and it will being setup prompt allowing users to change how htop looks: +![在 ubuntu 中自定义 htop][13] -![customize htop in ubuntu][13] +首先,将鼠标悬停在各个 `Colors` 部分并按 Enter 键,这将允许我们更改配色方案。从那里,选择单色选项并按 Enter 键保存更改: -First, hover to the `Colors` sections and press Enter and it will allow us to change the color scheme. From there, select the Monochrome option and press Enter to save changes: +![在 Linux 中更改 htop 颜色][14] -![change htop colors in linux][14] +现在,返回到设置选项,然后使用向左方向键探索可用的仪表: -Now, go back to the setup option, and from there, use the left arrow key to explore available meters: +![探索 htop 中可用的仪表][15] -![explore available meters in htop][15] +因为我打算添加日期和时间,所以我必须在找到它的选项后按 Enter 键。 -As I intend to add the Date and time, I have to press Enter once I find the option for it. +在这里,它允许你将日期和时间放置在左右两列中,你可以使用向上和向下的方向键更改列的顺序。 -Here, it will allow you to place the date and time in any of the left and right columns and you can use the up and down arrow keys to change the order of columns. +所以我将日期和时间仪表放在最后一个样式选项中(你可以使用空格键更改样式): -So I placed the date and time meter with the last styling option (you can change styles using the spacebar): +![在 htop 中添加日期和时间][16] -![add date and time htop][16] +完成日期和时间仪表的对齐后,按 Enter 键保存更改,然后按 **F10** 关闭设置提示。 -Once you are done aligning the date and time meter, press the enter key to save changes and **F10** to close the setup prompt. +### 总结 -### Wrapping Up +在本指南中,我解释了如何在不同的 Linux 发行版中安装 htop 实用程序,以及如何使用 htop 的一些基本功能来有效的管理系统资源。 -In this guide, I explained how you can install the htop utility in different Linux distributions and how you can use some basic functionalities of htop to manage system resources efficiently. - -But htop can do a lot more and for that and to learn more, you can always refer to its man page, and we have a detailed guide on [how you can get the most out of the man page in Linux][17]. +但是 htop 可以做更多的事情,要了解更多信息,你可以随时参考它的手册页,我们有一个详细的指南,告诉你如何[在 Linux 中充分利用手册页][17]。 -------------------------------------------------------------------------------- @@ -171,7 +170,7 @@ via: https://itsfoss.com/use-htop/ 作者:[Sagar Sharma][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[perfiffer](https://github.com/perfiffer) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 07e05515edfa962c610dcf223a5ecd5799099e48 Mon Sep 17 00:00:00 2001 From: perfiffer Date: Sat, 11 Mar 2023 14:31:28 +0800 Subject: [PATCH 054/318] translated by perfiffer --- .../20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md b/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md index 522e5bc010..679cc501a6 100644 --- a/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md +++ b/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md @@ -12,7 +12,7 @@ ====== Windows 有其著名的任务管理器。Linux 有几个 GUI 和 [命令行系统监视器][1]。每个 Linux 系统都带有其中的几个。 -在命令行中,top 命令可能是用于快速检查系统资源使用情况的goto命令。 +在命令行中,top 命令可能是用于快速检查系统资源使用情况的 goto 命令。 除了查看进程之外,[使用 top 命令][2]可能会很棘手。这就是 htop 最顶尖的地方。抛开双关语不谈,htop 是一个类似于 top 的实用程序,但具有更好和用户友好的界面。 @@ -22,7 +22,7 @@ Windows 有其著名的任务管理器。Linux 有几个 GUI 和 [命令行系 你不会在大多数的 Linux 发行版中找到预安装的 htop,但作为最流行的实用程序之一,你会在几乎每个 Linux 发行版的默认存储库中找到 htop。 -因此,如果你的机器由基于 Debian/Ubuntu 驱动的,则以下命令应该可以完成你的工作: +因此,如果你的机器是基于 Debian/Ubuntu 驱动的,则以下命令应该可以完成你的工作: ``` sudo apt install htop @@ -82,7 +82,7 @@ htop - **1.47** 是最后 15 分钟的平均负载。 - **Tasks: 166** 表示一共有 166 个正在运行的进程。 - **1249 thr** 表示这 166 个进程由 1249 个线程处理。 -- **1 running** 表示在这 166 个进程中,只有 +- **1 running** 表示在这 166 个进程中,只有一个进程处于运行中。 - **The load average** 表示一段时间内的平均系统负载。由于我的系统是 Hexa-Core,所以 6.0 以下的都可以。这个数字可能会超过,比如 6.1,所以即将要运行的进程必须等待正在进行的任务完成。 - **Uptime** 表示你登录后运行的时长。 From 6b29443babffbfd9b7d054305e22bd277cfff02c Mon Sep 17 00:00:00 2001 From: onionstalgia <35531128+onionstalgia@users.noreply.github.com> Date: Sat, 11 Mar 2023 18:03:11 +0800 Subject: [PATCH 055/318] translating --- ...0230306.2 ⭐️ How Wikipedia helps keep the internet open.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md b/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md index 4c5795892f..2c4ea735dc 100644 --- a/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md +++ b/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open" [#]: author: "Srishti Sethi https://opensource.com/users/srishakatux-0" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "onionstalgia" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -73,4 +73,4 @@ via: https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open [5]: https://wikimediafoundation.org/news/2016/05/05/mediawiki-nasa/ [6]: https://meta.wikimedia.org/wiki/Kiwix [7]: https://wikimedia.biterg.io/ -[8]: https://developer.wikimedia.org/ \ No newline at end of file +[8]: https://developer.wikimedia.org/ From 4ce2220d2c82a71bb82f8894eddedb5f3b1750d0 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sat, 11 Mar 2023 22:42:16 +0800 Subject: [PATCH 056/318] APL --- ...⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md b/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md index 1c049a4c47..8011186f98 100644 --- a/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md +++ b/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/r-markdown/" [#]: author: "Sreenath https://itsfoss.com/author/sreenath/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lxbwolf" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 95c38d6c56ec14bbdf336ffbb918c23229da853f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Mar 2023 08:23:25 +0800 Subject: [PATCH 057/318] RP @geekpi https://linux.cn/article-15618-1.html --- ... to Install PgAdmin4 on RHEL 9 Step by Step.md | 100 ++++++++++-------- 1 file changed, 53 insertions(+), 47 deletions(-) rename {translated/tech => published}/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md (52%) diff --git a/translated/tech/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md b/published/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md similarity index 52% rename from translated/tech/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md rename to published/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md index 0503a07dff..74398a0a84 100644 --- a/translated/tech/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md +++ b/published/20230301.0 ⭐️ How to Install PgAdmin4 on RHEL 9 Step by Step.md @@ -3,46 +3,48 @@ [#]: 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-15618-1.html" 如何在 RHEL 9 上分步安装 PgAdmin4 ====== -Pgadmin4 是一个免费和开源的基于网络的 PostgreSQL 管理和开发平台。它与本地和远程服务器上的 PostgreSQL 数据库服务器进行交互,并使用直观和交互式的仪表板显示服务器的统计数据。 +![][0] -Pgadmin4 是对 Pgadmin3 的重写,提供了以下显著的特点: +PgAdmin4 是一个自由开源的基于网络的 PostgreSQL 管理和开发平台。它可以与本地或远程的服务器上的 PostgreSQL 数据库服务器进行交互,并使用直观的交互式仪表板显示服务器的统计数据。 -- 一个具有直观和实时监控仪表盘的响应式 Web UI。 -- 一个改进的 Web 界面,具有很酷的新面板和图标。 +PgAdmin4 是对 PgAdmin3 的重写,提供了以下显著的功能: + +- 具有直观的实时监控仪表盘的响应式 Web UI。 +- 改进的 Web 界面,具有很酷的新面板和图标。 - 带有语法高亮的 SQL 查询编辑器。 - 全面的文档。 - 帮助你入门的有用提示。 -在本指南中,我们将演示如何在 RHEL 9 上安装 Pgadmin4。 +在本指南中,我们将演示如何在 RHEL 9 上安装 PgAdmin4。 -##### 先决条件 +### 先决条件 -在开始之前,确保你有一台 RHEL 9 服务器实例并安装了 PostgreSQL 数据库。请查看如何在 RHEL 9 上安装 PostgreSQL 15 的指南。 +在开始之前,确保你有一台 RHEL 9 服务器实例并安装了 PostgreSQL 数据库。请查看如何在 RHEL 9 上 [安装 PostgreSQL 15][13] 的指南。 在安装了 PostgreSQL 服务器后,继续执行以下步骤。 -### 步骤 1)在 RHEL 9 上添加 Pgadmin4 仓库 +### 步骤 1)在 RHEL 9 上添加 PgAdmin4 仓库 -第一步是在 RHEL 9 上添加 Pgadmin4 仓库。但首先要安装 EPEL 仓库,它提供了基本的软件包。 +第一步是在 RHEL 9 上添加 PgAdmin4 仓库。但首先要安装 EPEL 仓库,它提供了基本的软件包。 ``` $ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` -接下来,安装 Pgadmin4 仓库,如下所示。 +接下来,安装 PgAdmin4 仓库,如下所示: ``` $ sudo dnf install -y https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-redhat-repo-2-1.noarch.rpm ``` -完成后,为 Pgadmin4 和 EPEL 仓库建立一个缓存,如下所示。 +完成后,为 PgAdmin4 和 EPEL 仓库建立一个缓存,如下所示: ``` $ sudo dnf makecache @@ -50,17 +52,17 @@ $ sudo dnf makecache ### 步骤 2)在 RHEL 9 上安装 PgAdmin4 -安装好 Pgadmin4 和 EPEL 仓库后,继续使用 DNF 包管理器安装 Pgadmin4,如下所示。 +安装好 PgAdmin4 和 EPEL 仓库后,继续使用 DNF 包管理器安装 PgAdmin4,如下所示: ``` $ sudo dnf install pgadmin4 -y ``` -这将安装许多软件包,包括 Pgadmin4、Apache HTTP web 服务器和 Python 软件包,仅举几例。 +这将安装许多软件包,包括 PgAdmin4、Apache HTTP web 服务器和 Python 软件包,仅举几例: ![][1] -要确认 Pgadmin4 是否已经安装,请运行以下命令: +要确认 PgAdmin4 是否已经安装,请运行以下命令: ``` $ rpm -qi pgadmin4 @@ -70,9 +72,9 @@ $ rpm -qi pgadmin4 ![][2] -### 步骤 3) 在 RHEL 9 上启动/启用 PgAdmin4 +### 步骤 3)在 RHEL 9 上启动/启用 PgAdmin4 -此时,Pgadmin4 已成功安装。然而,你需要更进一步,让它运行起来。要启动 Pgadmin4 服务,请运行以下命令: +此时,PgAdmin4 已成功安装。然而,你需要更进一步,让它运行起来。要启动 PgAdmin4 服务,请运行以下命令: ``` $ sudo systemctl start httpd @@ -84,7 +86,7 @@ $ sudo systemctl start httpd $ sudo systemctl enable httpd ``` -要确认 Pgadmin4 正在运行,请执行以下命令: +要确认 PgAdmin4 正在运行,请执行以下命令: ``` $ sudo systemctl status httpd @@ -94,9 +96,9 @@ $ sudo systemctl status httpd ### 步骤 4)在 RHEL 9 上初始化 PgAdmin4 -Pgadmin4 软件包提供了一个可配置的脚本来设置 pgAdmin 网络服务。这允许你创建一个用户账户,用来验证和配置 SELinux 策略和 Apache Web 服务器。 +PgAdmin4 软件包提供了一个可配置的脚本来设置 PgAdmin 网络服务。这允许你创建一个用户账户,用来验证和配置 SELinux 策略和 Apache Web 服务器。 -因此,如下运行该脚本。 +因此,如下运行该脚本: ``` $ sudo /usr/pgadmin4/bin/setup-web.sh @@ -104,29 +106,29 @@ $ sudo /usr/pgadmin4/bin/setup-web.sh 提供你将在登录页面上作为登录凭证使用的电子邮件和密码。 -注意:有时,你可能会遇到如下 “semanage: command not found” 的错误。这表明缺少 semanage 包。 +注意:有时,你可能会遇到如下 “semanage: command not found” 的错误。这表明缺少 `semanage` 包。 ![][4] Semanage 是 SELinux(安全增强型 Linux)策略管理工具的简称,是一个用于配置 SELinux 策略某些方面的工具,不需要对策略源进行修改或重新编译。 -为了解决这个错误,你需要检查提供 semanage 的软件包。你可以通过运行以下命令来完成: +为了解决这个错误,你需要检查提供 `semanage` 的软件包。你可以通过运行以下命令来完成: ``` $ sudo dnf provides /usr/sbin/semanage ``` -从输出中,你可以看到 semanage 是由 policycoreutils-python-utils-3.3-6.el9_0.noarch 包提供的。 +从输出中,你可以看到 `semanage` 是由 `policycoreutils-python-utils-3.3-6.el9_0.noarch` 包提供的。 ![][5] -要安装这个软件包,请运行以下命令。 +要安装这个软件包,请运行以下命令: ``` $ sudo dnf install policycoreutils-python-utils -y ``` -再一次如下运行 Pgadmn4 安装脚本。 提供电子邮件地址和密码,在提示时输入 “y”。 +再一次如下运行 Pgadmin4 安装脚本。 提供电子邮件地址和密码,在提示时输入 `y`。 ``` $ sudo /usr/pgadmin4/bin/setup-web.sh @@ -134,37 +136,39 @@ $ sudo /usr/pgadmin4/bin/setup-web.sh ![][6] -### 步骤 5) 访问 Pgadmin4 的 Web 界面 +### 步骤 5)访问 PgAdmin4 的 Web 界面 -此时,Pgadmin4 已经成功安装。要从网络浏览器访问它,请前往以下地址: +此时,PgAdmin4 已经成功安装。要从网络浏览器访问它,请前往以下地址: +``` http://server-ip/pgadmin4 +``` -你会看到登录网页界面。请确保提供你在运行安装脚本时提供的 Email 和密码,并点击 “Login”。 +你会看到登录网页界面。请确保提供你在运行安装脚本时提供的 Email 和密码,并点击 “登录Login”: ![][7] -登录后,Pgadmin4的仪表板将出现在视图中,如图所示。 +登录后,PgAdmin4 的仪表板将出现在视图中,如图所示: ![][8] -要添加一个可以由 Pgadmin4 管理的服务器,请点击 “Add New Server”。 +要添加一个可以由 PgAdmin4 管理的服务器,请点击 “添加新服务器Add New Server”: ![][9] -在 “General” 选项卡中,填写服务器的名称,并添加注释,以便更好地描述。 +在 “通用General” 选项卡中,填写服务器的名称,并添加注释,以便更好地描述: ![][10] -接下来,点击 “Connection”,填写主机名/地址、端口、维护数据库、用户名和密码。然后最后点击 “Save”。 +接下来,点击 “连接Connection”,填写主机名/地址、端口、维护数据库、用户名和密码。然后最后点击 “保存Save”: ![][11] -此后,你会看到 PosrgreSQL 服务器的统计数据显示在互动和直观的仪表板上。在左边的侧边栏,你可以浏览各种 PostgreSQL 参数。 +此后,你会看到 PosrgreSQL 服务器的统计数据显示在互动和直观的仪表板上。在左边的侧边栏,你可以浏览各种 PostgreSQL 参数: ![][12] -##### 总结 +### 总结 我们希望你觉得本指南内容丰富,请在下面的评论部分发表你的疑问和反馈。 @@ -175,7 +179,7 @@ via: https://www.linuxtechi.com/how-to-install-pgadmin-on-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/) 荣誉推出 @@ -183,13 +187,15 @@ via: https://www.linuxtechi.com/how-to-install-pgadmin-on-rhel/ [b]: https://github.com/lkxed/ [1]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Install-pgadmin4-rhel9-dnf-command.png [2]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Pgadmin4-RPM-Package-Information-RHEL9.png -[3]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Start-Enable-Http-Pgadmin-RHEL9.png?ezimgfmt=ng:webp/ngcb22 -[4]: https://www.linuxtechi.com/wp-content/uploads/2023/03/semange-not-found-pgadmin4-rhel9.png?ezimgfmt=ng:webp/ngcb22 -[5]: https://www.linuxtechi.com/wp-content/uploads/2023/03/DNF-Whatprovides-semanage-RHEL9.png?ezimgfmt=ng:webp/ngcb22 -[6]: https://www.linuxtechi.com/wp-content/uploads/2023/03/pgadmin-setup-web-script-rhel9.png?ezimgfmt=ng:webp/ngcb22 -[7]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Pgadmin4-Login-Page-RHEL9.png?ezimgfmt=ng:webp/ngcb22 -[8]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Dashboard-Pgadmin4-RHEL9.png?ezimgfmt=ng:webp/ngcb22 -[9]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Add-New-PostgreSQL-to-Pgadmin4-RHEL9.png?ezimgfmt=ng:webp/ngcb22 -[10]: https://www.linuxtechi.com/wp-content/uploads/2023/03/General-Description-Pgadmin-New-PostgreSQL.png?ezimgfmt=ng:webp/ngcb22 -[11]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Connection-Details-PostgreSQL-Pgadmin4-GUI.png?ezimgfmt=ng:webp/ngcb22 -[12]: https://www.linuxtechi.com/wp-content/uploads/2023/03/PostgreSQL-Statistics-Dashboard-Pgadmin4.png?ezimgfmt=ng:webp/ngcb22 \ No newline at end of file +[3]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Start-Enable-Http-Pgadmin-RHEL9.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2023/03/semange-not-found-pgadmin4-rhel9.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2023/03/DNF-Whatprovides-semanage-RHEL9.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2023/03/pgadmin-setup-web-script-rhel9.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Pgadmin4-Login-Page-RHEL9.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Dashboard-Pgadmin4-RHEL9.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Add-New-PostgreSQL-to-Pgadmin4-RHEL9.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2023/03/General-Description-Pgadmin-New-PostgreSQL.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2023/03/Connection-Details-PostgreSQL-Pgadmin4-GUI.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2023/03/PostgreSQL-Statistics-Dashboard-Pgadmin4.png +[13]: https://www.linuxtechi.com/how-to-install-postgresql-on-rhel/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/12/080937o03a11xsz99zawzm.jpg \ No newline at end of file From 8ab4d0822c7487a52d1545235998378df3e5bf7a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Mar 2023 09:12:53 +0800 Subject: [PATCH 058/318] RP @Cubik65536 https://linux.cn/article-15619-1.html --- ...nstall DOSBox in Ubuntu to Play Retro Games.md | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) rename {translated/tech => published}/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md (79%) diff --git a/translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md b/published/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md similarity index 79% rename from translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md rename to published/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md index c997261351..eb2ec3d0ba 100644 --- a/translated/tech/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md +++ b/published/20230305.0 ⭐️ Install DOSBox in Ubuntu to Play Retro Games.md @@ -3,14 +3,16 @@ [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" [#]: translator: "Cubik65536" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15619-1.html" 在 Ubuntu 中安装 DOSBox 来玩复古游戏 ====== -DOSBox 是一款免费且开源的软件,它允许你模拟上个世纪的 MS-DOS 操作系统。 +![][0] + +DOSBox 是一款自由开源的软件,它可以让你模拟上个世纪的 MS-DOS 操作系统。 你为什么要这么做呢?因为怀旧:它可以让你游玩在 80 年代和 90 年代流行的 8 位游戏。 @@ -18,15 +20,13 @@ DOSBox 是一款免费且开源的软件,它允许你模拟上个世纪的 MS- 听起来不错吧?让我介绍一下如何在 Ubuntu 中安装 DOSBox。我还会向你展示如何在 DOSBox 中安装并游玩复古游戏。 -**DOSBox 也可以在其他 Linux 发行版中使用。除了安装部分,其余的指令应该对所有发行版都有效。** +DOSBox 也可以在其他 Linux 发行版中使用。除了安装部分,其余的指令应该对所有发行版都有效。 -✋🏻 - -DOS 是一个主要基于命令行的操作系统。使用 DOSbox 需要使用终端。 +> ✋🏻 DOS 是一个主要基于命令行的操作系统。使用 DOSbox 需要使用终端。 ### 在 Ubuntu 中安装 DOSBox -DOSBox 包可以在 [Universe 软件仓库][1]中找到。这个仓库应该已经被启用了,所以可以使用下面的命令来安装 DOSBox: +DOSBox 包可以在 [Universe 软件仓库][1] 中找到。这个仓库应该已经被启用了,所以可以使用下面的命令来安装 DOSBox: ``` sudo apt install dosbox @@ -40,7 +40,7 @@ sudo apt install dosbox dosbox ``` -**第一次运行是必要的,因为它会为我们创建一个配置文件。实际上,第一次启动时不需要做任何事情,因为它会创建配置文件。** +**需要首先运行一次,因为它会为我们创建一个配置文件。实际上,第一次启动时不需要做任何事情,因为它会创建配置文件。** 然后在 DOSBox 终端中执行 `exit` 命令来关闭 DOSBox: @@ -64,7 +64,7 @@ exit 你可以从互联网档案馆的软件库中访问数百款流行游戏。 -[从互联网档案馆下载游戏][4] +> **[从互联网档案馆下载游戏][4]** 每款游戏都有自己的 zip 文件,其中包含 .exe 文件。下载你喜欢的游戏。 @@ -125,8 +125,12 @@ mario 如果你有不再使用的旧电脑或者树莓派,你可以把它们变成复古游戏机。有很多 Linux 项目就是为了这个目的而存在的。 +> **[把你的电脑变成复古游戏机的 Linux 发行版](https://itsfoss.com/retro-gaming-console-linux-distros/)** + 为什么只玩游戏呢?你也可以把复古的计算机终端带回来。 +> **[用 Cool Retro Terminal 获得一个复古的 Linux 终端](https://itsfoss.com/cool-retro-term/)** + 希望该指南对你有所帮助。你是如何在 Linux 上玩游戏的?在评论中告诉我吧。 -------------------------------------------------------------------------------- @@ -136,7 +140,7 @@ via: https://itsfoss.com/ubuntu-dosbox/ 作者:[Sagar Sharma][a] 选题:[lkxed][b] 译者:[Cubik65536](https://github.com/Cubik65536) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -153,3 +157,4 @@ via: https://itsfoss.com/ubuntu-dosbox/ [9]: https://itsfoss.com/content/images/2023/02/mount-the-game-to-the-virtual-C-drive.png [10]: https://itsfoss.com/content/images/2023/02/switch-to-the-virtual-drive-C.png [11]: https://itsfoss.com/content/images/2023/02/play-mario-on-Linux.gif +[0]: https://img.linux.net.cn/data/attachment/album/202303/12/091038c81kxkmhdonj1mkm.jpg \ No newline at end of file From a3ce9b6914025308f8615cbc84e4e685d48ac222 Mon Sep 17 00:00:00 2001 From: Cubik Date: Sat, 11 Mar 2023 20:55:05 -0500 Subject: [PATCH 059/318] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7][?= =?UTF-8?q?talk]:=2020230309.1=20=E2=AD=90=EF=B8=8F=20Contribute=20to=20op?= =?UTF-8?q?en=20source=20without=20code.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230309.1 ⭐️ Contribute to open source without code.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md b/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md index 8af8044d1d..c77f17624b 100644 --- a/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md +++ b/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/non-code-contribution-open-source" [#]: author: "Debra Chen https://opensource.com/users/debra-chen" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Cubik65536" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -78,7 +78,7 @@ via: https://opensource.com/article/23/3/non-code-contribution-open-source 作者:[Debra Chen][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Cubik65536](https://github.com/Cubik65536) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -88,4 +88,4 @@ via: https://opensource.com/article/23/3/non-code-contribution-open-source [1]: https://dolphinscheduler.apache.org/en-us [2]: https://opensource.com/article/21/2/what-technical [3]: https://gitee.com/openharmony -[4]: https://opensource.com/article/22/5/practical-tips-agile \ No newline at end of file +[4]: https://opensource.com/article/22/5/practical-tips-agile From 59ae5f0df81621ea72779a6e56ebc808d4299469 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sun, 12 Mar 2023 10:47:42 +0800 Subject: [PATCH 060/318] TSL --- ...s Guide to R Markdown Syntax [With Cheat Sheet].md | 369 ---------------- ...s Guide to R Markdown Syntax [With Cheat Sheet].md | 409 ++++++++++++++++++ 2 files changed, 409 insertions(+), 369 deletions(-) delete mode 100644 sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md create mode 100644 translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md diff --git a/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md b/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md deleted file mode 100644 index 8011186f98..0000000000 --- a/sources/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md +++ /dev/null @@ -1,369 +0,0 @@ -[#]: subject: "Beginner's Guide to R Markdown Syntax [With Cheat Sheet]" -[#]: via: "https://itsfoss.com/r-markdown/" -[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" -[#]: collector: "lkxed" -[#]: translator: "lxbwolf" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Beginner's Guide to R Markdown Syntax [With Cheat Sheet] -====== - -You probably already know about the lightweight Markdown markup language. Refer to our [Markdown guide][1], if you're new to the concept. Overall, it is a simple and effective language for creating plain-text documents. - -However, Markdown may not be enough to make detailed reports or technical documents. - -Hence, **R Markdown** as an **interactive file format** came into existence back in 2014 thanks to packages like [knitr][2] and [Pandoc][3]. It combines plain text with in-line R code, helping you make a dynamic document. - -To create R Markdown documents, you can use [various IDEs][4] and extensions to make it possible. However, the official IDE that helps you do it is **RStudio**. So, in this article, we will focus on **learning R Markdown syntax using RStudio**. - -💡 - -If you did not know, - -**R programming language** - - is used for statistical computing, graphics representation, and reporting. - -**Suggested Read 📖** - -How to Install and Use R on UbuntuBrief: This tutorial teaches you to install R on Ubuntu. You’ll also learn how to run your first R program in Ubuntu using various methods. R, together with Python, is the most commonly used programming language for statistical computing and graphics, making it easy to work with data. With![][5]It's FOSSSergiu![][6] - -### Setting RStudio - -RStudio makes it easy to work with R Markdown by its setup process. You just need to install a package, and you are done for the most part! - -Once you have RStudio installed, head to the Tools menu and select the _Install Packages_ option. - -![Select Install Packages option under Tools menu in RStudio][7] - -On the new dialog box, search for rmarkdown and install it. - -![Install RMarkdown Package by searching it and pressing install button on the new package install dialog box][8] - -💡 - -To use code chunks like python, you need to install additional packages. RStudio will prompt you to install the required packages when you try to include them in your document. - -Once installed, you can start a new rmarkdown document by selecting **File > New > RMarkdown**. - -![Create a new RMarkdown Document from File menu][9] - -This will prompt you to add some information regarding the document (metadata for the file). Fill those up. - -![Provide the title and other details for new document in rmarkdown][10] - -Or you can create an empty document to start fresh. - -### RMarkdown Syntax - -Since it is just "**enhanced Markdown**," most syntax remains the same. - -There would be some differences when you add things not usually supported with Markdown, like **tables, math equations, code chunks, etc.** - -Here's a quick summary of what we will be covering: - -Name of the RMarkdown BlockProper Syntax | -| Heading | # Level 1## Level 2### Level 3Level 1=======Level 2------- | -| Emphasis | *Italics*_Italics_**Bold**__Bold__ | -| List | Unordered List* Item* Item + Sub + SubOrdered List1. Item2. Item + Sub + Sub | -| Code Chunk | Normal Code Block```Code Goes Here```R Code Block```{r}R CODE```You can use other languages also.Inline `code` | -| Links | Plain Link: Paste the URLLink with Caption: [Text](URL_Address)Link to a section: [Text](#Name-of-section) | -| Table | | Column | Column | Column || ------ | ------ | ------ || Item | Item | Item || Item | Item | Item | | -| Equations | In line Equations: $Equations$Display Equations: $$Equations$$ | -| Images | Without Caption: ![](Link-to-Image)With Caption : ![optional caption text](Location-of-image) | -| Block Quotes | > Type your Block Quotes | -| Misc | Super Script : Text^Superscript^Horizontal rule or Page Break:========= or ----------For Manual Line break, end line with 2+ spaces | - -#### The YAML Header - -At the top of a Rmarkdown document, there is a YAML header enclosed within two `---`. This block usually contains a title, author, date, and the file type you want to output, defining the **final look of the document.** - -The file type is either **HTML, PDF, or Word.** - -``` ---- -title: "Sample" -author: "It's FOSS" -date: "2023-02-08" -output: pdf_document ---- -``` - -This can be added while setting the new document in RStudio, which is shown in the above section. - -#### Heading - -In R Markdown, we can give heading in two different methods. Either we can use the # character for different levels of heading like: - -``` -# Heading Level 1 -## Heading Level 2 -### Heading Level 3 -#### Heading Level 4 -##### Heading Level 5 -###### Heading Level 6 -``` - -Or, `=` and `-` for level 1 and 2 headings, respectively. - -``` -Level 1 Heading -=============== - -Level 2 Heading ---------------- -``` - -![various types of heading levels in rmarkdown file][11] - -#### Lists - -There are two types of Lists, the first one is an **Unordered list**, or you could call them bullet points: - -``` -* Item 1 -* Item 2 - + Sub 1 - + Sub 2 -* Item 3 -``` - -And the second one is the **Ordered list**, which is the numbered type: - -``` -1. Item 1 -2. Item 2 - + Sub 1 - + Sub 2 -3. Item 3 -``` - -![order and unordered list example][12] - -**Suggested Read 📖** - -Read and Organize Markdown Files in Linux Terminal With GlowGlow is a CLI tool that lets you render Markdown files in the Linux terminal. You can also organize Markdown files with it.![][13]It's FOSSAbhishek Prakash![][14] - -#### Format text within a paragraph - -There are several ways to format text. - -![][15] - -You can add emphasis to the text like italics or bold using: - -- Italics: Place the text in between single asterisks or single underscore -- Bold: Place the text in between double asterisks or double underscores. - -``` -*This is Italicized text* -_This is Italicized text_ - -**This is Bold Text** -__This is Bold Text__ -``` - -You can explore on this using our resource on [how to add bold and italic text in Markdown][16]. - -If you want to add superscript to a text, place the text that should be superscript in between `^` symbol. - -``` -Normal Text^super_script^ -``` - -Or, if you want to add text strike-through, place the text in between two `~~` symbol. - -``` -~Strike Through this~~ -``` - -![][17] - -#### Adding Code Chunks - -Embedding code is the primary purpose of R Markdown. It allows us to add codes in several ways. - -**Adding Normal code block.** - -If you want to add a normal code block to separate it from other text, use the syntax below: - -``` -``` -Your Code Goes Here -``` -``` - -You can also try [adding code blocks with syntax highlighting][18]. - -You should append the language in curly braces if you want to add code and embed its output to the document: - -``` -```{Language} -Your Code Goes Here -``` -``` - -Or, you can add inline codes by placing the respective text between ` symbols. - -``` -The `code` is a code -``` - -Here's how it should look like: - -![][19] - -#### Links - -To add a link as plain text, just paste the link as it is in a line. - -``` -https://itsfoss.com -``` - -Or, to make a text hyperlink, use the syntax: - -``` -[Text](URL Address) -``` - -Another way to add a link is, when you want to link to a section of the page. In this case, use the syntax: - -``` -[Text](#Name-of-section) -``` - -![][20] - -#### Tables - -The syntax for adding tables is similar to that of markdown. - -``` -|Column|Column|Column| -| --- | --- | --- | -|Item|Item|Item| -|Item|Item|Item| -``` - -![][21] - -📋 - -Curious to know more? Refer to our guide on - -[creating tables in Markdown][22] - -. - -#### Images - -To add an image, use the syntax: - -``` -![](http://example.com/logo.png) - -OR - -![optional caption text](figures/img.png) -``` - -![][23] - -#### Block Quotes - -RMarkdown allows you to add block quotes. To use this, use the **> (greater than)** symbol in front of the line/paragraph you want to quote. - -``` -This is a normal text - -> This is a Block Quote -``` - -![][24] - -If you want to explore more use cases of blockquote, head to our [Markdown quotes][25] guide. - -#### Equations - -Using RMarkdown, you can add either equations or display complex LaTex equations. - -For example: - -``` -In line Pythagorean Theorem: $Equation$ - -Display Equation: $$Equation$$ -``` - -![adding equations in R Markdown document][26] - -#### Horizontal Rule / Page Break - -Use three or more asterisks or dashes to add a horizontal rule /page break. - -``` -************ - ------------- -``` - -If you want to add a manual line break, end that line with two or more spaces. - -### Summary - -### R Markdown is Useful (Cheat Sheet) - -Whether you are working with scientific reports or want to create any other type of dynamic document, R Markdown is your best bet to make the most out of Markdown. - -Here's a cheat sheet to help you summarize it all: - -![][27] - -[R Markdown Cheat SheetR Markdown Cheat Sheet.pdf145 KBdownload-circle][28] - -_💬 Did we miss something that you use with R Markdown? Share your thoughts in the comments down below._ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/r-markdown/ - -作者:[Sreenath][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sreenath/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/markdown-guide/ -[2]: https://www.r-project.org/nosvn/pandoc/knitr.html -[3]: https://itsfoss.comknitr, and Pandoc -[4]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ -[5]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png -[6]: https://itsfoss.com/content/images/wordpress/2019/06/install-r-on-ubuntu.jpg -[7]: https://itsfoss.com/content/images/2023/02/select-install-packages.png -[8]: https://itsfoss.com/content/images/2023/02/install-rmarkdown-1.png -[9]: https://itsfoss.com/content/images/2023/02/new-r-markdown.png -[10]: https://itsfoss.com/content/images/2023/02/new-document-in-rmark.png -[11]: https://itsfoss.com/content/images/2023/02/Headings.png -[12]: https://itsfoss.com/content/images/2023/02/List.png -[13]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png -[14]: https://itsfoss.com/content/images/wordpress/2022/01/glow-cli-markdown.png -[15]: https://itsfoss.com/content/images/2023/02/emphasis.png -[16]: https://itsfoss.com/markdown-bold-italic/ -[17]: https://itsfoss.com/content/images/2023/02/superescript.png -[18]: https://itsfoss.com/markdown-code-block/ -[19]: https://itsfoss.com/content/images/2023/02/code-chunk.png -[20]: https://itsfoss.com/content/images/2023/02/links.png -[21]: https://itsfoss.com/content/images/2023/02/table.png -[22]: https://itsfoss.com/markdown-table/ -[23]: https://itsfoss.com/content/images/2023/02/images.png -[24]: https://itsfoss.com/content/images/2023/02/block-quotes.png -[25]: https://itsfoss.com/markdown-quotes/ -[26]: https://itsfoss.com/content/images/2023/02/equations.png -[27]: https://itsfoss.com/content/images/2023/02/R-Markdown-Cheat-Sheet.webp -[28]: https://itsfoss.com/content/files/2023/02/R-Markdown-Cheat-Sheet.pdf diff --git a/translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md b/translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md new file mode 100644 index 0000000000..9eee713699 --- /dev/null +++ b/translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md @@ -0,0 +1,409 @@ +[#]: subject: "Beginner's Guide to R Markdown Syntax [With Cheat Sheet]" +[#]: via: "https://itsfoss.com/r-markdown/" +[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "lxbwolf" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +R Markdown 语法新手指南[备忘录] +====== + +你可能已经了解过轻量级标记语言 Markdown。如果你是第一次接触这个概念,请参考我们的 [Markdown 指南][1]。概括来讲,它是一种用于创建纯文本文档的简单又高效的语言。 + +然而,Markdown 在制作详细的报告或技术文件方面可能还不够完善。 + +受益于[knitr][2]和[Pandoc][3]等软件包,**交互式文件格式 R Markdown** 早在 2014 年就出现了。它将纯文本与内嵌的 R 代码相结合,可以制作动态文件。 + +你可以使用 [各种 IDE][4] 和扩展来创建 R Markdown 文档,官方 IDE 为**RStudio**。因此,在这篇文章中,我们将重点介绍**使用 RStudio 学习 R Markdown语法**。 + +💡 + +(假如你没有了解过,)**R 编程语言** 是一种用于统计计算、图形表示和报告的语言。 + +**推荐阅读 📖** + +是一种用于统计计算、图形表示和报告的语言。 + +**建议阅读 📖** + +如何在 Ubuntu 上安装和使用 R。 +概要:本教程教你如何在 Ubuntu上安装 R。你还将学习在 Ubuntu 上运行你的第一个 R 程序的各种方法。R 和 Python 都是最常用的统计计算和图形的编程语言,能让数据处理变得简单。 +![][5] +![][6] + +### 配置 RStudio + +通过合适的配置,你可以很轻松地用 RStudio 来编写 R Markdown。当你安装完一个软件包后,就已经完成了大部分的工作! + +安装 RStudio 后,在**工具**菜单中选择_安装软件包_选项。 + +![在 RStudio 的工具菜单下选择安装软件包选项][7] 。 + +在弹出的对话框中,搜索 rmarkdown 并安装。 + +![通过搜索并在新的软件包安装对话框中按下安装按钮来安装 Rmarkdown 软件包][8] + +💡 + +如果你想使用类似 python 的代码块,你需要安装额外的包。当你想在你的文档中包含这些包时,RStudio 会提示你安装所需的包。 + +安装完成后,你可以通过选择**文件>新建>RMarkdown** 来新建一个 rmarkdown 文档。 + +![从文件菜单中创建一个新的 RMarkdown 文档][9] 。 + +之后会提示你添加一些关于文件的信息(文件的元数据),把这些填上就可以了。 + +![用 rmarkdown 语法写出标题和其他细节][10] + +或者你可以创建一个空的文件从零开始。 + +### RMarkdown 语法 + +由于它是"加强版的 Markdown",因此大多数语法与 markdown 是一样的。 + +它还有一些 Markdown 支持不完善的东西,比如**表格、数学方程式、代码块等等**。 + +下面是我们要介绍的内容的概括。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RMarkdown 块名语法
标题# 一级标题
## 二级标题
### 三级标题

一级标题
=======

二级标题
-------
着重*斜体*
_斜体_

**加粗**

__加粗__
列表无序列表
* 列表项
* 列表项
+ 子项
+ 子项

有序列表
1. 列表项
2. 列表项
+ 子项
+ 子项
代码块普通代码块

```
这里写代码
```

R 代码块

```{r}
R 代码
```
你也可以用其他的语言


行内 `代码`
链接纯文本:粘贴 URL
带标题的链接:[显示的文本](URL_地址)
跳转到锚点[显示的文本](#锚点)
表格| 列名 | 列名 | 列名 |
| ------ | ------ | ------ |
| 项内容 | 项内容 | 项内容 |
| 项内容 | 项内容 | 项内容 |
方程式行内方程式 \$Equations\$

展示方程式: \$\$Equations\$\$
图片无标题: ![](图片链接)

有标题: ![可选标题](图片地址)
引用块> 输入你引用的内容
其他上角标:文本内容^上角标^

章或页水平分割线

========= 或 ----------

行尾输入两个以上空格,即可添加人工行分割
+ +#### YAML 头 + +在一个 R Markdown 文档的顶部,有一个 YAML 头,被两行 `------` 包围。这个块定义了文档的最终样式,通常包含一个标题、作者、日期和你想输出的文件类型。 + +支持的文件格式有三种:**HTML、PDF 和 Word**。 + +``` +--- +title: "Sample" +author: "It's FOSS" +date: "2023-02-08" +output: pdf_document +--- +``` + +这可以在 RStudio 中设置新文件时添加,如上节所示。 + +#### 标题 + +在 R Markdown 中,有两种方法指定标题。我们可以使用 `#` 字符来表示不同级别的标题,比如: + +``` +# Heading Level 1 +## Heading Level 2 +### Heading Level 3 +#### Heading Level 4 +##### Heading Level 5 +###### Heading Level 6 +``` + +也可以用 `=` 和 `-` 分别表示一级和二级标题。 + +``` +一级标题 +=============== + +二级标题 +--------------- +``` + +![rmarkdown 文件中不同等级的标题][11] + +#### 列表 + +有两种列表,一种是**无序列表**,用点句符来表示: + +``` +* Item 1 +* Item 2 + + Sub 1 + + Sub 2 +* Item 3 +``` + +另一种是**有序列表**,用数字来排序: + +``` +1. Item 1 +2. Item 2 + + Sub 1 + + Sub 2 +3. Item 3 +``` + +![有序和无序列表示例][12] + +**推荐阅读 📖** + +在 Linux 终端用 Glow 阅读和组织 Markdown 文件。Glow 是一个 CLI 工具,能在 Linux 终端渲染 Markdown 文件。你还可以用它来组织 Markdown 文件。 +![][13] +![][14] + +#### 段落中的文本格式 + +格式化文本有几种方式。 + +![][15] + +你可以使用斜体或加粗来着重表示文本: + +- 斜体:在文本前后各输入一个星号或下划线 +- 加粗:在文本前后各输入两个星号或下划线 + +``` +*这里是斜体内容* +_这里是斜体内容_ + +**这里是加粗内容** +__这里是加粗内容__ +``` + +你可以阅读我们的文章 [Markdown 中怎么让内容变成加粗和斜体][16] 来了解更多内容. + +如果你想使用上角标,在想变成上角标的内容前后加上 `^` 符号。 + +``` +普通文本内容^上角标^ +``` + +如果你想对文本内容加删除线,在文本前后加 `~~` 符号。 + +``` +~~被删除的内容~~ +``` + +![][17] + +#### 添加代码块 + +内嵌代码 是 R Markdown 最主要的设计目的。我们有几种添加代码的方式。 + +**添加普通代码块** + +如果你想添加一个代码块来与其他的文本进行区分,可以使用下面的语法: + +```` +``` +这里输入你的代码 +``` +```` + + +你也可以尝试 [对添加的代码进行高亮显示][18]. + +如果你想添加代码并将其输出嵌入到文档中,你可以在后面加上语言,并用大括号包裹: + + +```{语言} +这里输入你的代码 +``` + + +你可以用 ` 符号来添加行内代码。 + +``` +这里是 `行内代码` +``` + +它看起来是这样的: + +![][19] + +#### 链接 + +如果想添加普通文本链接,把它粘贴到行内就可以了。 + +``` +https://itsfoss.com +``` + +添加超链接,使用下面的语法: + +``` +[文本内容](URL 地址) +``` + +当你想链接到本页内的某个锚点时,使用下面的语法: +``` +[文本内容](#锚点名称) +``` + +![][20] + +#### 表格 + +表格的语法与 markdown 相似: + +``` +|列表|列表|列表| +| --- | --- | --- | +|表格项|表格项|表格项| +|表格项|表格项|表格项| +``` + +![][21] + +📋 + +还想了解更多?请阅读我们的 [用 Markdown 创建表格][22] 指南。 + +. + +#### 图片 + +添加图片使用下面的语法: + +``` +![](http://example.com/logo.png) + +或 + +![可选显示文本](figures/img.png) +``` + +![][23] + +#### 块引用 + +RMarkdown 可以添加块引用。在被引用的行或段落前添加 **>(大于号)**。 + +``` +这里是普通文本内容。 + +> 这里是块引用 +``` + +![][24] + +如果你想了解更多块引用的内容,请阅读我们的 [Markdown 引用][25] 指南。 + +#### 方程式 + +你可以用 RMarkdown 来添加方程式和展示复杂的 LaTex 方程式。 + +例如: + +``` +行内毕达哥拉斯定理: $Equation$ + +展示方程式:$$Equation$$ +``` + +![在 R Markdown 文档中添加方程式][26] + +#### 章或页水平分割线 + +使用三个以上星号或减号来添加章或页水平分割线。 + +``` +************ + +------------ +``` + +你可以在行尾添加两个以上的空格来添加人工行分割。 + +### 总结 + +### R Markdown 非常有用(备忘录) + + + +![][27] + +[R Markdown 备忘录.pdf 下载文档][28] + +_💬 你还知道其他关于 R Markdown 的内容吗?请在下面的评论区告诉我们。_ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/r-markdown/ + +作者:[Sreenath][a] +选题:[lkxed][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/markdown-guide/ +[2]: https://www.r-project.org/nosvn/pandoc/knitr.html +[3]: https://itsfoss.comknitr, and Pandoc +[4]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[5]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png +[6]: https://itsfoss.com/content/images/wordpress/2019/06/install-r-on-ubuntu.jpg +[7]: https://itsfoss.com/content/images/2023/02/select-install-packages.png +[8]: https://itsfoss.com/content/images/2023/02/install-rmarkdown-1.png +[9]: https://itsfoss.com/content/images/2023/02/new-r-markdown.png +[10]: https://itsfoss.com/content/images/2023/02/new-document-in-rmark.png +[11]: https://itsfoss.com/content/images/2023/02/Headings.png +[12]: https://itsfoss.com/content/images/2023/02/List.png +[13]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png +[14]: https://itsfoss.com/content/images/wordpress/2022/01/glow-cli-markdown.png +[15]: https://itsfoss.com/content/images/2023/02/emphasis.png +[16]: https://itsfoss.com/markdown-bold-italic/ +[17]: https://itsfoss.com/content/images/2023/02/superescript.png +[18]: https://itsfoss.com/markdown-code-block/ +[19]: https://itsfoss.com/content/images/2023/02/code-chunk.png +[20]: https://itsfoss.com/content/images/2023/02/links.png +[21]: https://itsfoss.com/content/images/2023/02/table.png +[22]: https://itsfoss.com/markdown-table/ +[23]: https://itsfoss.com/content/images/2023/02/images.png +[24]: https://itsfoss.com/content/images/2023/02/block-quotes.png +[25]: https://itsfoss.com/markdown-quotes/ +[26]: https://itsfoss.com/content/images/2023/02/equations.png +[27]: https://itsfoss.com/content/images/2023/02/R-Markdown-Cheat-Sheet.webp +[28]: https://itsfoss.com/content/files/2023/02/R-Markdown-Cheat-Sheet.pdf From 8a5c5bd75abe5696cf10709ba5913f588d23842a Mon Sep 17 00:00:00 2001 From: insidentally Date: Sun, 12 Mar 2023 14:21:49 +0800 Subject: [PATCH 061/318] translating by Chao-zhi translating by Chao-zhi --- ...️ A data scientist's guide to open source community analysis.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md b/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md index d1f530342f..16e9df7793 100644 --- a/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md +++ b/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/12/data-scientists-guide-open-source-community-analysis" [#]: author: "Cali Dolfi https://opensource.com/users/cdolfi" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Chao-zhi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -177,7 +177,7 @@ via: https://opensource.com/article/22/12/data-scientists-guide-open-source-comm 作者:[Cali Dolfi][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Chao-zhi](https://github.com/Chao-zhi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b60e9695166f0b79eec9c7c8b0ed9a9889866dfd Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Sun, 12 Mar 2023 16:24:35 +0800 Subject: [PATCH 062/318] =?UTF-8?q?Update=20and=20rename=20sources/tech/20?= =?UTF-8?q?230307.1=20=E2=AD=90=EF=B8=8F=20Switch=20from=20iCloud=20to=20N?= =?UTF-8?q?extcloud.md=20to=20translated/tech/20230307.1=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=20Switch=20from=20iCloud=20to=20Nextcloud.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Translated by XiaotingHuang22. 辛苦审核! --- ...07.1 ⭐️ Switch from iCloud to Nextcloud.md | 88 ------------------- ...07.1 ⭐️ Switch from iCloud to Nextcloud.md | 88 +++++++++++++++++++ 2 files changed, 88 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md create mode 100644 translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md diff --git a/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md b/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md deleted file mode 100644 index 0e46e2a139..0000000000 --- a/sources/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: subject: "Switch from iCloud to Nextcloud" -[#]: via: "https://opensource.com/article/23/3/switch-icloud-nextcloud" -[#]: author: "Heike Jurzik https://opensource.com/users/hej" -[#]: collector: "lkxed" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Switch from iCloud to Nextcloud -====== - -If you're wary of committing your data to cloud services controlled by a corporation but love the convenience of remote storage and easy web-based access, you're not alone. The cloud is popular because of what it can do. But the [cloud doesn't have to be closed][1]. Luckily, the open source Nextcloud project provides a personal and private cloud application suite. - -It's easy to [install][2] and import data—including contacts, calendars, and photos. The real trick is getting your data from cloud providers like iCloud. In this article, I demonstrate the steps you need to take to migrate your digital life to Nextcloud. - -### Migrate your data to Nextcloud - -As with [Android devices][3], first you must transfer existing data from Apple's iCloud to Nextcloud. Then you can set up two new accounts for your Apple devices to fully automatically synchronize address books and appointments. Apple supports CalDAV for calendars and CardDAV for contacts, so you don't even need to install an extra app. - -To export your address book, you can either open the **Contacts** app on your iPhone/iPad or log into iCloud in your web browser: - -- Select all address book entries you want to transfer to Nextcloud and choose **File > Export > Export vCard** to save a .`vcf` file on your local disk. -- Import the .`vcf` file into Nextcloud. To do this, select the **Contacts** app, click **Settings** at the bottom left and select the **Import contacts** button. In the following dialogue window, click **Select local file**, and open the previously saved vCard. - -To set up a CardDAV account on your iPhone or iPad, go to**_Settings_ > _Contacts_ > _Accounts_ > _Add Account_**: - -- Select **Other** and then **Add CardDAV account**. In the **Server** field, enter the URL of Nextcloud (for example, [https://nextcloudpi.local][4]). Below this is space for the username and password of the Nextcloud account. Open the **Advanced Settings** for the new account. -- Ensure the **Use SSL option** is enabled. The account URL is usually set correctly. It contains, amongst other things, the host name of your Nextcloud and your user name. - -To create a new account on macOS for synchronizing address books, open the **Contacts** app and select **Add Account** from the **Contacts** menu. Activate the checkbox **Other Contacts Account** and click on **Continue**. You can accept the **CardDAV** entry. In the **Account Type** drop-down menu, select **Manual** entry. - -![Image of advanced settings in Nextcloud.][5] - -Enter your Nextcloud user name, password, and server address. The current macOS version requires you to specify port 443 (for SSL) in the server address. For example, if the address of your Nextcloud is [https://nextcloudpi.local][6] and the username is hej, then enter the following in the field: - -[https://nextcloudpi.local:443/remote.php/dav/principals/users/hej][7] - -### Syncing your calendars - -Exporting your calendars works similarly. Through the Calendar app, you can do this with iCloud in the browser, on your smartphone/tablet, or the macOS desktop. - -First, set the calendar to **public**. This doesn't mean that everyone can access your calendar. It's only used to generate a link for the calendar subscription. Copy the URL to the clipboard. It's not yet possible to import the calendar directly into Nextcloud because you don't need a link for this, but an `.ics` file (iCalendar). Here is how to generate such a file from the link: - -- Copy the link to the clipboard -- Paste the link into the address bar of a web browser -- Change the beginning of the URL and replace `webcal` with `http` -- Press **Enter** and save the `.ics` file on your disk - -![Image showing how to save the .ics file on your disk.][8] - -You can now import the `.ics` file. To do this, open the **Calendar** app in Nextcloud, click **Calendar settings** at the bottom left and then **Import calendar**. Select the `.ics` file you saved in the file manager. - -Repeat this process for all iCloud calendars. After that, it's time to replace the old iCloud synchronization service. - -### Synchronizing events - -To synchronize new events with Nextcloud, set up a new account on your client devices (smartphone, tablet, desktop): - -- **iPhone/iPad: _Settings_ / _Calendar_ / _Accounts_ / _Add Account_, select _Other_** and then choose **Add CalDAV Account**. In the **Server** field, enter your local Nextcloud URL, which is `https://nextcloudpi.local`. You can see a space for the username and password of the Nextcloud account. -- macOS: Open the Calendar app and select **Add Account** from the **Calendar** menu. Activate the checkbox **Other CalDAV Account** and click **Continue**. From the **Account Type** drop-down menu, select **Manual** entry. Enter your Nextcloud username and password as well as the Nextcloud server address. Don't forget to specify the port 443 (for SSL) in the server address; otherwise the account setup will fail. - -**Tip:** If you want to synchronize other files like documents, photos, videos, and so on, in addition to your contacts and calendars, you can install the Nextcloud app offered in the App Store. - -This article has been adapted from Heike Jurzik's book, [Nextcloud on the Raspberry Pi][9]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/switch-icloud-nextcloud - -作者:[Heike Jurzik][a] -选题:[lkxed][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hej -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/20/10/keep-cloud-open -[2]: https://opensource.com/article/21/1/nextcloud-productivity -[3]: https://opensource.com/article/23/3/switch-google-nextcloud -[4]: https://nextcloudpi.local/ -[5]: https://opensource.com/sites/default/files/2023-02/advancedSettings-Nextcloud.png -[6]: https://nextcloudpi.local -[7]: https://nextcloudpi.local:443/remote.php/dav/principals/users/hej -[8]: https://opensource.com/sites/default/files/2023-02/NextcloudSaveIcsfile.png -[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 diff --git a/translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md b/translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md new file mode 100644 index 0000000000..461b81d621 --- /dev/null +++ b/translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md @@ -0,0 +1,88 @@ +[#]: subject: "Switch from iCloud to Nextcloud" +[#]: via: "https://opensource.com/article/23/3/switch-icloud-nextcloud" +[#]: author: "Heike Jurzik https://opensource.com/users/hej" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +把你的网盘从 iCloud 换成 Nextcloud +====== + +如果你对把数据提交给公司控制的云服务持谨慎态度,但同时又喜欢远程存储的便利性和基于 Web 的轻松访问,你不是一个人。云端因其广泛的功能而广受欢迎。 但是[云端服务不一定是封闭的][1]。 幸运的是,开源项目 Nextcloud 提供了个人和私有的云应用程序套件。 + +[安装][2] 和导入数据很容易——包括联系人、日历和照片。 真正难办的是从 iCloud 等云提供商那里获取数据。 在本文中,我将告诉你把自己的数据迁移到 Nextcloud 需要采取的步骤。 + +### 把你的数据迁移至 Nextcloud + +和在 [Android 设备][3]上一样,首先你必须将现有数据从苹果的 iCloud 传输到 Nextcloud。 然后,你可以为你的苹果设备设置两个新帐户,以完全自动同步通讯录和预约。 Apple 支持用于日历同步的 CalDAV 和用于联系人同步的 CardDAV 开放协议,因此你甚至不需要安装额外的应用。 + +要导出你的通讯录,你可以在 iPhone 或者 iPad 上打开 **联系人** 应用或在网络浏览器中登录 iCloud: + +- 选择要传输到 Nextcloud 的所有地址簿条目,然后选择 **File > Export > Export vCard** 以在本地磁盘上保存 .`vcf` 文件。 +- 将 .`vcf` 文件导入 Nextcloud。 为此,请选择 **联系人** 应用,点击左下角的 **设置** 并选择 **导入联系人** 按钮。 在接下来的对话窗口中,点击**选择本地文件**,然后打开之前保存的 vCard。 + +要在你的 iPhone 或 iPad 上设置 CardDAV 帐户,请转至**_设置_ > _联系人_ > _帐户_ > _添加帐户_**: + +- 选择**其他**,然后选择**添加 CardDAV 帐户**。 在 **服务器** 字段中,输入 Nextcloud 的 URL(例如,[https://nextcloudpi.local][4])。 下面是 Nextcloud 帐户的用户名和密码。 打开新帐户的**高级设置**。 +- 确保启用了**使用 SSL 选项**。 帐户 URL 通常设置正确。 其中包含您的 Nextcloud 的主机名和你的用户名。 + +要在 macOS 上创建用于同步地址簿的新帐户,请打开 **联系人** 应用程序并从 **联系人** 菜单中选择 **添加帐户**。 激活复选框 **其他通讯录账号** 并单击 **继续**。 您可以接受 **CardDAV** 条目。 在**账户类型**下拉菜单中,选择**手动**输入。 + +![ Nextcloud 中高级设置的图片][5] + +输入你的 Nextcloud 用户名、密码和服务器地址。 当前的 macOS 版本要求你在服务器地址中指定端口 443(用于 SSL)。 例如,如果您的 Nextcloud 地址是 [https://nextcloudpi.local][6],用户名是 hej,则在栏中输入以下内容: + +[https://nextcloudpi.local:443/remote.php/dav/principals/users/hej][7] + +### 同步你的日历 + +导出日历的方法类似,通过日历应用程序,你可以在浏览器、智能手机/平板电脑或 macOS 桌面上使用 iCloud 执行此操作。 + +首先,将日历设置为**公共**。 这并不意味着每个人都可以访问你的日历。它仅用于生成日历订阅的链接。将 URL 复制到剪贴板。 目前还无法将日历直接导入 Nextcloud,因为你不是用一个链接,而是用 .ics 文件 (iCalendar)来导入。 以下是如何从链接生成这样的文件: + +- 将链接复制到剪贴板 +- 将链接粘贴到网络浏览器的地址栏中 +- 更改 URL 的开头并将 `webcal` 替换为 `http` +- 按 **Enter** 并将 `.ics` 文件保存到你的磁盘上 + +![一张图片显示如何将 .ics 文件保存到磁盘上。][8] + +现在可以导入 .ics 文件了。 先在 Nextcloud 中打开 **日历** 应用程序,单击左下方的 **日历设置**,然后单击 **导入日历**。 选择你保存在文件管理器中的 `.ics` 文件。 + +对所有 iCloud 日历重复此过程。 之后,就该更换旧的 iCloud 同步服务了。 + +### 同步事件 + +要与 Nextcloud 同步新事件,请在你的客户端设备(智能手机、平板电脑、台式机)上设置一个新帐户: + +- **iPhone/iPad:_设置_ / _日历_ / _账户_ / _添加账户_,选择_其他_**,然后选择**添加 CalDAV 账户**。 在 **服务器** 栏中,输入你的本地 Nextcloud URL,即 `https://nextcloudpi.local`。 您可以看到 Nextcloud 帐户的用户名和密码空格。 +- macOS:打开日历应用程序并从**日历**菜单中选择**添加帐户**。 激活复选框 **其他 CalDAV 账户** 并单击 **继续**。 从 **账户类型** 下拉菜单中,选择 **手动** 输入。 输入你的 Nextcloud 用户名和密码以及 Nextcloud 服务器地址。 不要忘记在服务器地址中指定端口 443(用于 SSL); 否则帐户设置将失败。 + +**提示:**如果你想同步其他文件,如文档、照片、视频等,除了您的联系人和日历,你可以在 App Store 中安装已有的 Nextcloud 应用程序。 + +本文改编自 Heike Jurzik 的书 [树莓派上的 Nextcloud][9]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/switch-icloud-nextcloud + +作者:[Heike Jurzik][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hej +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/20/10/keep-cloud-open +[2]: https://opensource.com/article/21/1/nextcloud-productivity +[3]: https://opensource.com/article/23/3/switch-google-nextcloud +[4]: https://nextcloudpi.local/ +[5]: https://opensource.com/sites/default/files/2023-02/advancedSettings-Nextcloud.png +[6]: https://nextcloudpi.local +[7]: https://nextcloudpi.local:443/remote.php/dav/principals/users/hej +[8]: https://opensource.com/sites/default/files/2023-02/NextcloudSaveIcsfile.png +[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 From 0a7226da802c2f0a803e2709a31b1a8d8dbd985f Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Sun, 12 Mar 2023 16:26:06 +0800 Subject: [PATCH 063/318] =?UTF-8?q?Update=2020230308.3=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=208=20examples=20of=20influential=20women=20in=20tech?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XiaotingHuang22 is translating. 翻译任务认领。 --- ...20230308.3 ⭐️ 8 examples of influential women in tech.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md index 15df17b493..6fa22a43ac 100644 --- a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md +++ b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/international-womens-day-tech-influence" [#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -72,7 +72,7 @@ via: https://opensource.com/article/23/3/international-womens-day-tech-influence 作者:[AmyJune Hineline][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -93,4 +93,4 @@ via: https://opensource.com/article/23/3/international-womens-day-tech-influence [12]: https://www.engmanagement.dev/ [13]: https://opensource.com/users/feilauren [14]: https://leanin.org/book -[15]: https://opensource.com/users/afaulhab \ No newline at end of file +[15]: https://opensource.com/users/afaulhab From 523a940b541e23f7a5d8bf9f8df95614c7cddc85 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Sun, 12 Mar 2023 18:09:20 +0800 Subject: [PATCH 064/318] =?UTF-8?q?Update=20and=20rename=20sources/talk/20?= =?UTF-8?q?230308.3=20=E2=AD=90=EF=B8=8F=208=20examples=20of=20influential?= =?UTF-8?q?=20women=20in=20tech.md=20to=20translated/talk/20230308.3=20?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=208=20examples=20of=20influential=20women=20?= =?UTF-8?q?in=20tech.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Translated by XiaotingHuang22. 翻译任务完成,辛苦审核! --- ...️ 8 examples of influential women in tech.md | 96 ------------------ ...️ 8 examples of influential women in tech.md | 97 +++++++++++++++++++ 2 files changed, 97 insertions(+), 96 deletions(-) delete mode 100644 sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md create mode 100644 translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md diff --git a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md deleted file mode 100644 index 15df17b493..0000000000 --- a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: subject: "8 examples of influential women in tech" -[#]: via: "https://opensource.com/article/23/3/international-womens-day-tech-influence" -[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -8 examples of influential women in tech -====== - -A journey through open source is rarely something you do alone. Your hobby, career, and your life has been affected by others in the tech space, and statistically some of those people have been women. That's one of the many reasons International Women's Day exists, and it's a good excuse to reflect upon the women who have inspired your career in tech. We asked Opensource.com contributors for their thoughts. - -### Inspirational women - -#### Dr. Kathleen Greenaway - -One of the women that inspired me was my university professor, [Dr. Kathleen Greenaway][1]. She was exactly who I wanted to be. I remember her saying at a women's event about breaking the glass ceiling that she couldn't believe that we were still talking about it so many years later. I now find myself thinking the very same thing. This is just one example, but she was it. - -**—[Shanta Nathwani][2]** - -#### Hilary Mason - -I owe my knowledge and start in PHP to [Hilary Mason][3]. While she was a professor at Johnson & Wales in Providence RI, she ran an elective study on server-side programming. She showed us PHP, and for a final project had us build something using a database. I think I built a simple login system and a commenting tool or something. I love telling folks I learned PHP from a woman (the lead data scientist at bit.ly, at that!) - -**—[John E. Picozzi][4]** - -#### Carie Fisher - -The most inspirational woman in tech for me is [Carie Fisher][5]. I met her when I first started getting involved in the accessibility community. She invited me to help with projects and helped me through my impostor syndrome when applying to jobs, getting certified, and speaking at conferences. Her compassion and devotion to digital inclusion is matched by only a few. - -**—[AmyJune Hineline][6]** - -#### Kanopi Studios - -I've been working in tech for 25 years and have often been the only female developer in a company or department. Then I joined Kanopi Studios, a women-owned and led agency with many smart, tech-savvy women from whom I am inspired every day. My gender is no longer a barrier to my career success. I feel respected and heard, and my accomplishments are recognized. - -**—[Cindy Williams][7]** - -#### Barbara Liskov and Sandi Metz - -I think Barbara Liskov is one of the most influential figures in our field I also really really like Sandi Metz, whose speaking and teaching skills helped me a lot in my career. I recommend any of her books or conference videos. - -**—[benelori][8]** - -#### Family - -I have been inspired by a number of women in my life, both personally and professionally. I always say that my mother, my sister and my grandmother have been great references for me in everything. But I have great colleagues with whom I work today who, for me are my references. I always think something like: Those people who have been important to you, try to keep them close. When I was studying development, we had no references. No one taught us that the [first programmer was a woman][9] or that we have WiFi or GPS, thanks to a woman. There is a very good book that I am reading right now [The Invisible Woman][10] that I highly recommend. - -**—[Marta Torre][11]** - -#### Sarah Drasner - -Written by an amazing woman in tech, it brought to my attention to another amazing woman in tech, [Engineering Management for the Rest of Us][12] by Sarah Drasner. This book (and the amazing dev manager, Jody, who sent copies to all the leads) is the reason I am going to be facilitating some discussions about how we experience feedback differently. We realized that a lot of folks may not even really know how to talk about what they need or what works for them, so an open/casual chat where we share some good and bad experiences (optionally, of course) and look at some examples of different styles will hopefully be a really helpful collaborative learning experience. - -**—[Fei Lauren][13]** - -#### Sheryl Sandberg - -My first book about women in tech, which was recommended to me at the WomenPower conference in Hannover, Germany, was [Lean In: Women, Work and the Will to Lead][14] by Sheryl Sandberg. Not only was I impressed by her own way but very much by how she managed to use the powers we as women are given and what makes us different for her own success and the company's success. - -**—[Anne Faulhaber][15]** - -### Your own influence - -In open source, maybe more than anywhere, we all are influences on each other. Sharing and collaborating are built into the process of open source. Tell us about the influences you've had during your open source journey. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/international-womens-day-tech-influence - -作者:[AmyJune Hineline][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/amyjune -[b]: https://github.com/lkxed/ -[1]: https://www.linkedin.com/in/kathleen-greenaway-4076247/ -[2]: https://opensource.com/users/shanta -[3]: https://en.wikipedia.org/wiki/Hilary_Mason_(data_scientist)?wprov=sfti1 -[4]: https://opensource.com/users/johnpicozzi -[5]: https://www.linkedin.com/in/cariefisher -[6]: https://opensource.com/users/amyjune -[7]: https://opensource.com/users/cindytwilliams -[8]: https://opensource.com/users/benelori -[9]: https://opensource.com/article/18/10/first-computer-programmer-ada-lovelace -[10]: https://www.penguinrandomhouse.com/books/623964/the-invisible-woman-by-erika-robuck/ -[11]: https://opensource.com/users/martatorredev -[12]: https://www.engmanagement.dev/ -[13]: https://opensource.com/users/feilauren -[14]: https://leanin.org/book -[15]: https://opensource.com/users/afaulhab \ No newline at end of file diff --git a/translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md b/translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md new file mode 100644 index 0000000000..1a1df1f661 --- /dev/null +++ b/translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md @@ -0,0 +1,97 @@ +[#]: subject: "8 examples of influential women in tech" +[#]: via: "https://opensource.com/article/23/3/international-womens-day-tech-influence" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +科技界有影响力女性的 8 个例子 +====== + +一段开源之旅往往不是独自一人能完成的。你的爱好、职业和生活都受到了科技领域其他人的影响,而数据表明这其中一些影响力来自于女性。这是国际妇女节存在的众多原因之一,也是一起回顾你技术职业生涯中的女性的一个很好的理由。 我们向 Opensource.com 的贡献者询问了他们的想法。 + +### 励志的女性们 + +#### Kathleen Greenaway博士 + +[Kathleen Greenaway博士][1],我的大学教授是激励过我的女性之一。她正是我想成为的人。我记得她在一次关于打破玻璃天花板的女性活动中说,她不敢相信这么多年后我们还在谈论它。 我现在发现自己也是这么想的。这只是其中一个例子,但她就是这样。 + +**—[Shanta Nathwani][2]** + +#### Hilary Mason + +我的知识和 PHP 入门归功于 [Hilary Mason][3]。 当她在普罗维登斯 RI 的 Johnson & Wales 担任教授时,她开了一门服务器端编程的选修研究。 她向我们展示了 PHP,并在最后一个项目中让我们使用数据库构建了一些东西。 我记得我建立了一个简单的登录系统和一个评论工具之类的。我喜欢告诉人们我是从一个女性那里学来的 PHP(她还是 bit.ly 的首席数据科学家!) + +**—[John E. Picozzi][4]** + +#### Carie Fisher + +对我来说,科技界最鼓舞人心的女性是 [Carie Fisher][5]。 我是在第一次开始参与无障碍社区时遇到她。她邀请我一起帮助项目,并在我申请工作、获得认证和在会议上发言时帮助我克服了冒名顶替综合症。在对技术包容性的激情和奉献精神上,只有少数人能与她相提并论。 + +**—[AmyJune Hineline][6]** + +#### Kanopi Studios + +我在技术领域工作了 25 年,并且经常是公司或部门中唯一的女性开发人员。然后我加入了 Kanopi Studios,这是一家由女性拥有和领导的机构,这里有许多聪明、精通技术的女性员工,我每天都从她们那里得到启发。 我的性别不再是我事业成功的障碍。 我感觉自己受到尊重和并被倾听,我的成就也得到认可。 + +**—[Cindy Williams][7]** + +#### Barbara Liskov 和 Sandi Metz + +我认为 Barbara Liskov 是我们领域中最有影响力的人物之一,我也非常喜欢 Sandi Metz,她的演讲和教学技巧对我的职业生涯帮助很大。我推荐她的所有书籍和会议视频。 + +**—[benelori][8]** + +#### 家庭 + +在我的生活中,无论是个人还是职业上,我受到了许多女性的启发。 我总是说我的母亲、姐姐和祖母在所有事情上都是我很好的参考对象。我现在有很棒的同事,他们也是我的榜样。 我总是这样想:尽力和那些对你很重要的人保持紧密联系。在我刚学习编程开发那时候,我们没有任何参考榜样。 没有人告诉我们 [第一个程序员是女性][9] ,亦或我们能够拥有 WiFi 和 GPS 是多亏了一位女性。我现在正在读一本非常好的书—— [The Invisible Woman][10],我强烈推荐。 + +**—[Marta Torre][11]** + +#### Sarah Drasner + +[《我们其他人的工程管理》][12]由一位杰出的科技女性撰写,作者是 Sarah Drasner。这本书让我注意到了另一位杰出的科技女性。这本书(还有我们出色的开发经理 Jody,她将书的副本发给了业内的所有领头人物)促使我做出了一个决定——不断深化讨论,了解我们在面对反馈时的不同经历。我们意识到很多人可能甚至不知道如何谈论他们需要什么或者什么对他们有用。因此,我们希望可以用一场公开或随意的聊天对话作为一次非常有用的协作学习体验,在对话中,人们分享一些好的和坏的经历(当然这些分享都是非强制的)并看一些不同风格的案例。 + + +**—[Fei Lauren][13]** + +#### Sheryl Sandberg + +在德国汉诺威举行的 WomenPower 会议上,我被推荐了人生中的第一本关于科技界女性的书,它是雪莉·桑德伯格 (Sheryl Sandberg) 的 [精益求精:女性、工作和领导意愿][14]。我不仅对她自己的工作方式印象深刻,还对她如何成功地运用我们作为女性被赋予的权力以及她和公司的成功的是如何改变了我们的事例感到钦佩不已。 + +**—[Anne Faulhaber][15]** + +### 自己的影响力 + +在开源领域,比其他地方更甚,我们都对彼此有着影响。 共享和协作的精神植根于开源的发展过程。告诉我们你在开源之旅中受到过谁的影响吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/international-womens-day-tech-influence + +作者:[AmyJune Hineline][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/amyjune +[b]: https://github.com/lkxed/ +[1]: https://www.linkedin.com/in/kathleen-greenaway-4076247/ +[2]: https://opensource.com/users/shanta +[3]: https://en.wikipedia.org/wiki/Hilary_Mason_(data_scientist)?wprov=sfti1 +[4]: https://opensource.com/users/johnpicozzi +[5]: https://www.linkedin.com/in/cariefisher +[6]: https://opensource.com/users/amyjune +[7]: https://opensource.com/users/cindytwilliams +[8]: https://opensource.com/users/benelori +[9]: https://opensource.com/article/18/10/first-computer-programmer-ada-lovelace +[10]: https://www.penguinrandomhouse.com/books/623964/the-invisible-woman-by-erika-robuck/ +[11]: https://opensource.com/users/martatorredev +[12]: https://www.engmanagement.dev/ +[13]: https://opensource.com/users/feilauren +[14]: https://leanin.org/book +[15]: https://opensource.com/users/afaulhab From 84816b64278550332f912b726037a4722436f17f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 12 Mar 2023 19:54:22 +0800 Subject: [PATCH 065/318] =?UTF-8?q?Revert=20"Update=2020230308.3=20?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=208=20examples=20of=20influential=20women=20?= =?UTF-8?q?in=20tech.md"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20230308.3 ⭐️ 8 examples of influential women in tech.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md index 6fa22a43ac..15df17b493 100644 --- a/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md +++ b/sources/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/international-womens-day-tech-influence" [#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" [#]: collector: "lkxed" -[#]: translator: "XiaotingHuang22" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -72,7 +72,7 @@ via: https://opensource.com/article/23/3/international-womens-day-tech-influence 作者:[AmyJune Hineline][a] 选题:[lkxed][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -93,4 +93,4 @@ via: https://opensource.com/article/23/3/international-womens-day-tech-influence [12]: https://www.engmanagement.dev/ [13]: https://opensource.com/users/feilauren [14]: https://leanin.org/book -[15]: https://opensource.com/users/afaulhab +[15]: https://opensource.com/users/afaulhab \ No newline at end of file From 7ebbc0c9069f90e6bb823b41661f62dd6ee40724 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Mar 2023 23:07:44 +0800 Subject: [PATCH 066/318] RP @XiaotingHuang22 https://linux.cn/article-15621-1.html --- ...️ 8 examples of influential women in tech.md | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) rename {translated/talk => published}/20230308.3 ⭐️ 8 examples of influential women in tech.md (51%) diff --git a/translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md b/published/20230308.3 ⭐️ 8 examples of influential women in tech.md similarity index 51% rename from translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md rename to published/20230308.3 ⭐️ 8 examples of influential women in tech.md index 1a1df1f661..87bf5ca575 100644 --- a/translated/talk/20230308.3 ⭐️ 8 examples of influential women in tech.md +++ b/published/20230308.3 ⭐️ 8 examples of influential women in tech.md @@ -3,69 +3,72 @@ [#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" [#]: collector: "lkxed" [#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15621-1.html" -科技界有影响力女性的 8 个例子 +8 位有影响力的科技界女性 ====== -一段开源之旅往往不是独自一人能完成的。你的爱好、职业和生活都受到了科技领域其他人的影响,而数据表明这其中一些影响力来自于女性。这是国际妇女节存在的众多原因之一,也是一起回顾你技术职业生涯中的女性的一个很好的理由。 我们向 Opensource.com 的贡献者询问了他们的想法。 +![][0] + +> 社区成员分享了影响了其科技生涯的重要女性的故事。 + +一段开源之旅往往不是独自一人能完成的。你的爱好、职业和生活都受到了科技领域其他人的影响,而数据表明这其中一些影响力来自于女性。这是国际妇女节存在的众多原因之一,也是一起回顾你技术职业生涯中的女性的一个很好的理由。我们向 Opensource.com 的贡献者询问了他们的想法。 ### 励志的女性们 -#### Kathleen Greenaway博士 +#### Kathleen Greenaway 博士 -[Kathleen Greenaway博士][1],我的大学教授是激励过我的女性之一。她正是我想成为的人。我记得她在一次关于打破玻璃天花板的女性活动中说,她不敢相信这么多年后我们还在谈论它。 我现在发现自己也是这么想的。这只是其中一个例子,但她就是这样。 +我的大学教授 [Kathleen Greenaway 博士][1] 是激励过我的女性之一。她正是我想成为的人。我记得她在一次关于打破玻璃天花板的女性活动中说,她无法相信这么多年后我们还在谈论这个问题。我现在发现自己也是这么想的。这只是其中一个例子,但她就是这样。 -**—[Shanta Nathwani][2]** +—— [Shanta Nathwani][2] #### Hilary Mason -我的知识和 PHP 入门归功于 [Hilary Mason][3]。 当她在普罗维登斯 RI 的 Johnson & Wales 担任教授时,她开了一门服务器端编程的选修研究。 她向我们展示了 PHP,并在最后一个项目中让我们使用数据库构建了一些东西。 我记得我建立了一个简单的登录系统和一个评论工具之类的。我喜欢告诉人们我是从一个女性那里学来的 PHP(她还是 bit.ly 的首席数据科学家!) +我对 PHP 的入门要归功于 [Hilary Mason][3]。当她在普罗维登斯 RI 的 Johnson & Wales 担任教授时,她开了一门服务器端编程的选修课。她向我们展示了 PHP,并在最后一个项目中让我们使用数据库构建了一些东西。我记得我建立了一个简单的登录系统和一个评论工具之类的。我喜欢告诉人们我是从一个女性那里学来的 PHP(她还是 bit.ly 的首席数据科学家!) -**—[John E. Picozzi][4]** +—— [John E. Picozzi][4] #### Carie Fisher -对我来说,科技界最鼓舞人心的女性是 [Carie Fisher][5]。 我是在第一次开始参与无障碍社区时遇到她。她邀请我一起帮助项目,并在我申请工作、获得认证和在会议上发言时帮助我克服了冒名顶替综合症。在对技术包容性的激情和奉献精神上,只有少数人能与她相提并论。 +对我来说,科技界最鼓舞人心的女性是 [Carie Fisher][5]。我是在刚开始参与无障碍社区时遇到的她。她邀请我一起帮助项目,并在我申请工作、获得认证和在会议上发言时帮助我克服了冒名顶替综合症。在对技术包容性的激情和奉献精神上,只有少数人能与她相提并论。 -**—[AmyJune Hineline][6]** +—— [AmyJune Hineline][6] #### Kanopi Studios -我在技术领域工作了 25 年,并且经常是公司或部门中唯一的女性开发人员。然后我加入了 Kanopi Studios,这是一家由女性拥有和领导的机构,这里有许多聪明、精通技术的女性员工,我每天都从她们那里得到启发。 我的性别不再是我事业成功的障碍。 我感觉自己受到尊重和并被倾听,我的成就也得到认可。 +我在技术领域工作了 25 年,并且经常是公司或部门中唯一的女性开发人员。然后我加入了 Kanopi Studios,这是一家由女性拥有和领导的机构,这里有许多聪明、精通技术的女性员工,我每天都从她们那里得到启发。我的性别不再是我事业成功的障碍。我感觉自己受到尊重和并被倾听,我的成就也得到认可。 -**—[Cindy Williams][7]** +—— [Cindy Williams][7] #### Barbara Liskov 和 Sandi Metz 我认为 Barbara Liskov 是我们领域中最有影响力的人物之一,我也非常喜欢 Sandi Metz,她的演讲和教学技巧对我的职业生涯帮助很大。我推荐她的所有书籍和会议视频。 -**—[benelori][8]** +—— [benelori][8] #### 家庭 -在我的生活中,无论是个人还是职业上,我受到了许多女性的启发。 我总是说我的母亲、姐姐和祖母在所有事情上都是我很好的参考对象。我现在有很棒的同事,他们也是我的榜样。 我总是这样想:尽力和那些对你很重要的人保持紧密联系。在我刚学习编程开发那时候,我们没有任何参考榜样。 没有人告诉我们 [第一个程序员是女性][9] ,亦或我们能够拥有 WiFi 和 GPS 是多亏了一位女性。我现在正在读一本非常好的书—— [The Invisible Woman][10],我强烈推荐。 +在我的生活中,无论是个人还是职业上,我受到了许多女性的启发。我总是说我的母亲、姐姐和祖母在所有事情上都是我很好的参考对象。我现在有很棒的同事,他们也是我的榜样。我总是这样想:尽力和那些对你很重要的人保持紧密联系。在我刚学习编程开发那时候,我们没有任何参考榜样。没有人告诉我们 [第一个程序员是女性][9],亦或我们能够拥有 WiFi 和 GPS 是多亏了一位女性。我现在正在读一本非常好的书 —— 《[The Invisible Woman][10]》,我强烈推荐。 -**—[Marta Torre][11]** +—— [Marta Torre][11] #### Sarah Drasner -[《我们其他人的工程管理》][12]由一位杰出的科技女性撰写,作者是 Sarah Drasner。这本书让我注意到了另一位杰出的科技女性。这本书(还有我们出色的开发经理 Jody,她将书的副本发给了业内的所有领头人物)促使我做出了一个决定——不断深化讨论,了解我们在面对反馈时的不同经历。我们意识到很多人可能甚至不知道如何谈论他们需要什么或者什么对他们有用。因此,我们希望可以用一场公开或随意的聊天对话作为一次非常有用的协作学习体验,在对话中,人们分享一些好的和坏的经历(当然这些分享都是非强制的)并看一些不同风格的案例。 +《[我们其他人的工程管理][12]》由一位杰出的科技女性撰写,作者是 Sarah Drasner。这本书让我注意到了另一位杰出的科技女性。这本书(还有我们出色的开发经理 Jody,她将书的副本发给了业内的所有领头人物)促使我做出了一个决定——不断深化讨论,了解我们在面对反馈时的不同经历。我们意识到很多人可能甚至不知道如何谈论他们需要什么或者什么对他们有用。因此,我们希望可以用一场公开或随意的聊天对话作为一次非常有用的协作学习体验,在对话中,人们分享一些好的和坏的经历(当然这些分享都是非强制的)并看一些不同风格的案例。 - -**—[Fei Lauren][13]** +—— [Fei Lauren][13] #### Sheryl Sandberg -在德国汉诺威举行的 WomenPower 会议上,我被推荐了人生中的第一本关于科技界女性的书,它是雪莉·桑德伯格 (Sheryl Sandberg) 的 [精益求精:女性、工作和领导意愿][14]。我不仅对她自己的工作方式印象深刻,还对她如何成功地运用我们作为女性被赋予的权力以及她和公司的成功的是如何改变了我们的事例感到钦佩不已。 +在德国汉诺威举行的 WomenPower 会议上,有人推荐给我人生中的第一本关于科技界女性的书,它是雪莉·桑德伯格Sheryl Sandberg 的 《[精益求精:女性、工作和领导意愿][14]》。我不仅对她自己的工作方式印象深刻,还对她如何成功地运用我们作为女性被赋予的权力以及她和公司的成功的是如何改变了我们的事例感到钦佩不已。 -**—[Anne Faulhaber][15]** +—— [Anne Faulhaber][15] ### 自己的影响力 -在开源领域,比其他地方更甚,我们都对彼此有着影响。 共享和协作的精神植根于开源的发展过程。告诉我们你在开源之旅中受到过谁的影响吧。 +在开源领域,或许比其他地方更甚,我们都是彼此影响着的。共享和协作的精神植根于开源的发展过程。告诉我们你在开源之旅中受到过谁的影响吧。 -------------------------------------------------------------------------------- @@ -74,7 +77,7 @@ via: https://opensource.com/article/23/3/international-womens-day-tech-influence 作者:[AmyJune Hineline][a] 选题:[lkxed][b] 译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -95,3 +98,4 @@ via: https://opensource.com/article/23/3/international-womens-day-tech-influence [13]: https://opensource.com/users/feilauren [14]: https://leanin.org/book [15]: https://opensource.com/users/afaulhab +[0]: https://img.linux.net.cn/data/attachment/album/202303/12/230653haa2i2ss87k0zvy3.jpg \ No newline at end of file From a1013910c4feff5bf09fe515185b63a84376377b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Mar 2023 23:23:09 +0800 Subject: [PATCH 067/318] RP @geekpi https://linux.cn/article-15622-1.html --- ...l IDLE Python IDE in Ubuntu and Other Linux.md | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) rename {translated/tech => published}/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md (63%) diff --git a/translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md b/published/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md similarity index 63% rename from translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md rename to published/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md index ae9f9977fb..51ce9b7434 100644 --- a/translated/tech/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md +++ b/published/20230228.0 ⭐️ How to Install IDLE Python IDE in Ubuntu and Other Linux.md @@ -3,24 +3,26 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15622-1.html" 如何在 Ubuntu 和其他 Linux 下安装 IDLE Python IDE ====== -**在 Ubuntu 和其他发行版中,Python 的默认 IDE IDLE 没有被默认安装。在本指南中了解如何安装它。** +![][0] -IDLE (**I**ntegrated **D**evelopment and **L**earning **E**nvironment)(集成开发学习环境)是一个 [Python IDE][1],由 Python 语言本身编写,通常作为 [Python 安装][2]的一部分被安装在 Windows 中。它是初学者的理想选择,使用起来很简单。对于那些正在学习 Python 的人,比如学生,它可以作为一个很好的 IDE 来开始使用。 +> 在 Ubuntu 和其他发行版中,Python 的默认 IDE IDLE 没有被默认安装。在本指南中了解如何安装它。 -语法高亮、智能识别和自动补全等基本功能是这个 IDE 的一些特点。你可以随时在官方[文档][3]中了解更多关于 IDLE 的功能。 +IDLE(集成开发学习环境**I**ntegrated **D**evelopment and **L**earning **E**nvironment)是一个 [Python IDE][1],由 Python 语言本身编写,在 Windows 中通常作为 [Python 安装][2] 的一部分而安装。它是初学者的理想选择,使用起来很简单。对于那些正在学习 Python 的人,比如学生,它可以作为一个很好的 IDE 来开始使用。 + +语法高亮、智能识别和自动补全等基本功能是这个 IDE 的一些特点。你可以随时在官方 [文档][3] 中了解更多关于 IDLE 的功能。 ### Ubuntu 和其他 Linux 中的 IDLE -所有的 Linux 发行版,包括 Ubuntu,都预装了 Python。即使你手动升级或安装了 Python 版本,IDLE IDE 也不会自带。你必须手动安装它。 +所有的 Linux 发行版,包括 Ubuntu,都预装了 Python。即使你手动升级或安装了 Python 版本,IDLE IDE 也不会自带安装。你必须手动安装它。 -对于 **Debian、Ubuntu、Linux Mint 和相关发行版**,打开终端,运行以下命令来安装 IDLE。 +对于 **Debian、Ubuntu、Linux Mint 和相关发行版**,打开终端,运行以下命令来安装 IDLE: ``` sudo apt update @@ -30,9 +32,9 @@ sudo apt update sudo apt install idle3 ``` -当命令询问你是否要安装 IDLE 时,点击 Yes。命令完成后,IDLE 将被安装在你的 Ubuntu 系统中。 +当命令询问你是否要安装 IDLE 时,输入 `Yes`。命令完成后,IDLE 将被安装在你的 Ubuntu 系统中。 -对于 **Fedora、RHEL、CentOS**,使用下面的命令来安装它。 +对于 **Fedora、RHEL、CentOS**,使用下面的命令来安装它: ``` sudo dnf update @@ -42,7 +44,7 @@ sudo dnf update sudo dnf install idle3 ``` -**Arch Linux** 用户可以使用以下命令进行安装。 +**Arch Linux** 用户可以使用以下命令进行安装: ``` sudo pacman -S python tk @@ -52,25 +54,25 @@ sudo pacman -S python tk ### 启动 IDLE 并编写一个测试程序 -在 Ubuntu、Debian、Linux Mint 和 Fedora 中安装后,你可以在应用菜单中找到 IDLE 的图标。见下图。 +在 Ubuntu、Debian、Linux Mint 和 Fedora 中安装后,你可以在应用菜单中找到 IDLE 的图标。见下图: ![应用菜单中的 IDLE 图标][5] -如果你使用的是 Arch Linux,你需要在命令行中运行以下内容来启动 IDLE。 +如果你使用的是 Arch Linux,你需要在命令行中运行以下内容来启动 IDLE: ``` idle ``` -启动 IDLE 后,你应该看到主窗口,如下图所示。 +启动 IDLE 后,你应该看到主窗口,如下图所示: ![IDLE 编辑器主窗口][6] -默认情况下,它会显示一个 shell,你可以直接在每一行中执行 Python 代码。它的工作方式和任何 shell 解释器一样。而当你点击回车键时,你会得到输出,还有三个 “>” 符号进入下一行,执行下一个命令。 +默认情况下,它会显示一个 交互界面Shell,你可以直接在每一行中执行 Python 代码。它的工作方式和任何 Shell 解释器一样。而当你点击回车键时,你会得到输出,还有三个 `>` 符号进入下一行,执行下一个命令。 ![在 IDLE 中运行一个简单的 Python 语句][7] -IDLE 也允许你从它的文件菜单中打开任何 .py 文件。它将在一个单独的窗口中打开该文件,在那里你可以进行修改并直接运行它。你可以使用 F5 或者从选项 “Run > Run Module” 来运行。 +IDLE 也允许你从它的文件菜单中打开任何 .py 文件。它将在一个单独的窗口中打开该文件,在那里你可以进行修改并直接运行它。你可以使用 `F5` 或者从选项 “运行Run > 运行模块Run Module” 来运行。 ![从 IDLE 中打开的一个 Python 文件][8] @@ -93,7 +95,7 @@ via: https://www.debugpoint.com/install-idle-ubuntu-linux/ 作者:[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/) 荣誉推出 @@ -108,4 +110,5 @@ via: https://www.debugpoint.com/install-idle-ubuntu-linux/ [7]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-a-simple-Python-statement-in-IDLE.jpg [8]: https://www.debugpoint.com/wp-content/uploads/2023/02/A-python-file-opened-from-IDLE.jpg [9]: https://www.debugpoint.com/wp-content/uploads/2023/02/Option-to-Run-the-file-using-menu.jpg -[10]: https://www.debugpoint.com/wp-content/uploads/2023/02/Output-is-shown-in-a-separate-output-window-of-IDLE.jpg \ No newline at end of file +[10]: https://www.debugpoint.com/wp-content/uploads/2023/02/Output-is-shown-in-a-separate-output-window-of-IDLE.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202303/12/232046d7j0203ilosu986r.jpg \ No newline at end of file From c0a16ee1fd8b05ca2e8a3b593c432b66bc08d0c4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Mar 2023 08:43:24 +0800 Subject: [PATCH 068/318] translated --- ...ies 2 How to Install NixOS on a Virtual Machine.md | 245 ----------------- ...ies 2 How to Install NixOS on a Virtual Machine.md | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 245 deletions(-) delete mode 100644 sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md create mode 100644 translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md diff --git a/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md b/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md deleted file mode 100644 index 824905ed0d..0000000000 --- a/sources/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md +++ /dev/null @@ -1,245 +0,0 @@ -[#]: subject: "NixOS Series #2: How to Install NixOS on a Virtual Machine?" -[#]: via: "https://itsfoss.com/install-nixos-vm/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -NixOS Series #2: How to Install NixOS on a Virtual Machine? -====== - -If you can use the Nix package manager on any Linux distro, why should you install the NixOS? - -I often wondered about the same before using NixOS for a few days. - -Once I realized the benefits, I wrote about it to help you know [why you might consider using NixOS][1]. If you have read the first article of the series, you already know what you want. - -So, how to get started with it? Considering it can be a new experience for many, should you replace your daily driver with it or install it as a virtual machine? - -I recommend using NixOS on a VM before you want to replace it as your primary operating system. This holds for anything new that you want to try, but specifically for [advanced Linux distributions][2] like NixOS. - -### Install NixOS in the VM Using VirtualBox - -In this tutorial, I will be using VirtualBox. - -And if you are using Ubuntu and don't care about having the latest version, VirtualBox can be installed using a single command: - -``` -sudo apt install virtualbox -``` - -Want to install the latest version? You can refer to the given guide: - -And if you are using anything besides Ubuntu, you can[follow the download instructions from its official downloads page.][3] - -Once you have successfully installed VirtualBox, let us start with the first step. - -#### Step 1: Get the ISO image of NixOS - -You need to head to NixOS [official download page][4]. - -And under the `NixOS: the Linux distribution` section, you will find ISO with GNOME and KDE desktops. - -Sure, there is a minimal ISO, too, but I would recommend going with either of the two (GNOME and KDE): - -![Download NixOS ISO file][5] - -For the sake of this tutorial, I will be using GNOME. - -Remember, you are given GNOME and KDE options for the live desktop! - -And during installation, you get the option to choose your favorite desktop environment, including **Xfce, Pantheon, Cinnamon, MATE**, and more! - -#### Step 2: Create a virtual in VirtualBox - -Open VirtualBox and click on the `New` button to add a new virtual machine: - -![screenshot that shows you how to click on new button to add new virtual machine][6] - -And it will open a prompt asking you to add information about the VM you want to add. - -You can start by naming your VM: - -- **Name your VM so that you can identify it is a NixOS install. So I named it `NixOS`.** -- **Choose the ISO image that you've downloaded recently.** -- **Select `Linux` as a type of ISO.** -- **And choose `Other Linux (64-bit)` for version.** - -![][7] - -Once you select everything, click on the `Next` button. - -Next, you will be asked to choose the Base memory (RAM), processors you want to allocate to this VM, and storage space for this install. - -While NixOS mentions no official requirements, I recommend you to have at least **4 gigs of RAM**, **2-4 processor cores**, and **30 GB of space** for this install: - -![select hardware for NixOS VM][8] - -And in the end, it will show you the summary of the choices you made for this VM: - -![summary of NixOS VM install][9] - -If everything seems fine, click on the `Finish` button and it will create a NixOS virtual machine for you. - -#### Step 3: Installing NixOS - -Once you are done creating the VM, the name you gave to your NixOS VM should start reflecting in the VirtualBox list of VMs. - -Select the NixOS VM and click on the start button: - -![start the NixOS VM][10] - -And it will start the NixOS live so you can try the Linux distro. - -##### Select installer language - -Once you boot into the NixOS, the installer will start and ask you to set the preferred language for the installer: - -![choose preferred language for NixOS install][11] - -##### Choose region and timezone - -Next, choose your region and zone. If you don't know this, you can select your country from the map, which will set things for you. - -Once you select the region and zone, it will also select the preferred language, numbers, and date locale. - -Sure, you can change if you want to, but for most users, the selected options will work just fine: - -![choose the region and zone for NixOS][12] - -##### Select Keyboard layout - -Next, you will have to set the keyboard layout. For most users, `English (US)` with default setting should work fine. - -If you are going with something else, you can test your keyboard configuration before proceeding. - -![select Keyboard layout for NixOS][13] - -After that, you are asked to create a user and set a password for that user. - -You can choose to keep a strong password or just anything random for the VM. - -![create a user for NixOS][14] - -##### Select your favorite Desktop Environment - -With NixOS, you are given the following choices for the desktop environment: - -- GNOME -- KDE (best choice for customization) -- Xfce -- Pantheon (a desktop environment that ships with ElementaryOS) -- Cinnamon -- Enlightenment -- LXQt - -![choose desktop environment for NixOS][15] - -##### Use non-free software on NixOS - -NixOS follows a similar approach to Fedora, where you have to choose whether you want the non-free software. - -I would recommend you enable non-free packages: - -![enable non-free package in NixOS][16] - -##### The partitions part - -As this is a VM guide, I will recommend you go with the `Erase disk` option that should partition the disk automatically! - -![automatic partition the disk for NixOS][17] - -Once done, it will get you the summary of the choices you went with: - -![summery of NixOS installation options in VM][18] - -And if everything seems correct, click on the `Install` button, and it will start the installation button. - -##### Don't Reboot but turn off the VM - -Once the installation is finished, you will be given the option to restart the VM. - -And if you do so, **it will load the installer again**! - -To solve this issue, you must make changes in the boot sequence. - -And to do that, power off your VM once the installation is complete. - -To power off the VM, select the `Close` option from the **File menu** and select the `Power off the machine` option: - -![][19] - -##### Change the boot order in VirtualBox - -To change the boot order in the NixOS VM, open the settings for that VM: - -![][20] - -In settings, select `System` and you will find the boot order. - -Here, select the `Hard Disk` and use the **up arrow** icon next to the options and make it the first option to boot: - -![change boot order in VirtualBox][21] - -Press `OK` and it will save the changes you made. - -**Alternatively**, you can remove the optical disk (ISO image) that we added to start the installation. - -#### Step 4: Boot from NixOS install - -Now, start your NixOS VM, and you will see a GRUB screen: - -![NixOS grub screen][22] - -Select the default option, and it will get you into the fresh install of NixOS with the GNOME desktop. - -![running NixOS in VM][23] - -That's it! **Go on exploring NixOS!** - -### Wrapping Up - -This was a quick guide on how you can install NixOS on VirtualBox. - -For the next part of the NixOS tutorial series, I shall share pointers on **installing and removing packages**. - -💬 _Stay tuned for the next part of the series. Until then, feel free to share your thoughts on NixOS and if you face any issues following the guide!_ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-nixos-vm/ - -作者:[Sagar Sharma][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sagar/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/why-use-nixos/ -[2]: https://itsfoss.com/advanced-linux-distros/ -[3]: https://www.virtualbox.org/wiki/Linux_Downloads -[4]: https://nixos.org/download.html -[5]: https://itsfoss.com/content/images/2023/02/Download-NixOS-ISO-file.png -[6]: https://itsfoss.com/content/images/2023/02/click-on-new-to-add-new-virtual-machine.png -[7]: https://itsfoss.com/content/images/2023/02/Add-NixOS-ISO-to-VirtualBox.png -[8]: https://itsfoss.com/content/images/2023/02/select-hardware-for-NixOS-VM-1.png -[9]: https://itsfoss.com/content/images/2023/02/summery-of-NixOS-VM-install.png -[10]: https://itsfoss.com/content/images/2023/02/start-the-NixOS-VM.png -[11]: https://itsfoss.com/content/images/2023/02/1.-choose-the-language-of-NixOS-installer.png -[12]: https://itsfoss.com/content/images/2023/02/2.-choose-the-region-and-zone-for-NixOS.png -[13]: https://itsfoss.com/content/images/2023/02/3.-select-Keyboard-layout-for-NixOS.png -[14]: https://itsfoss.com/content/images/2023/02/4.-create-user-and-set-password-for-NixOS.png -[15]: https://itsfoss.com/content/images/2023/02/5.-choose-desktop-environment-for-NixOS.png -[16]: https://itsfoss.com/content/images/2023/02/6.-Allow-unfree-software.png -[17]: https://itsfoss.com/content/images/2023/02/7.-select-erase-disk-option-while-installing-NixOS.png -[18]: https://itsfoss.com/content/images/2023/02/8.-summery-of-NixOS-installation-options-in-VM.png -[19]: https://itsfoss.com/content/images/2023/02/poweroff-VM.png -[20]: https://itsfoss.com/content/images/2023/02/open-settings-for-VM-in-VirtualBox.png -[21]: https://itsfoss.com/content/images/2023/02/how-to-change-the-boot-order-in-VirtualBox.gif -[22]: https://itsfoss.com/content/images/2023/02/NixOS-grub-screen.png -[23]: https://itsfoss.com/content/images/2023/02/running-NixOS-in-VM.png \ No newline at end of file diff --git a/translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md b/translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md new file mode 100644 index 0000000000..f8b4bd3eef --- /dev/null +++ b/translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md @@ -0,0 +1,248 @@ +[#]: subject: "NixOS Series #2: How to Install NixOS on a Virtual Machine?" +[#]: via: "https://itsfoss.com/install-nixos-vm/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +NixOS 系列 #2:如何在虚拟机上安装 NixOS? +====== + +如果你可以在任何 Linux 发行版上使用 Nix 包管理器,为什么还要安装 NixOS? + +在使用 NixOS 几天之前,我经常想知道同样的事情。 + +当我意识到这些好处后,我就写了这篇文章来帮助你了解[为什么你可能会考虑使用 NixOS][1]。如果你已经阅读了本系列的第一篇文章,那么你已经知道自己想要什么了。 + +那么,如何开始呢? 考虑到它对许多人来说可能是一种新体验,你应该用它替换日常驱动程序还是将其安装为虚拟机? + +我建议在你想要将其替换为你的主要操作系统之前在 VM 上使用 NixOS。这适用于你想尝试的任何新事物,特别是[先进的 Linux 发行版][2],例如 NixOS。 + +### 使用 VirtualBox 在 VM 中安装 NixOS + +在本教程中,我将使用 VirtualBox。 + +如果你使用的是 Ubuntu 并且不关心是否拥有最新版本,那么可以使用一个命令安装 VirtualBox: + +``` +sudo apt install virtualbox +``` + +想要安装最新版本? 你可以参考下面的指南: + +[如何在 Ubuntu 上安装 VirtualBox(初学者教程)][24] + +如果你使用 Ubuntu 以外的任何软件,你可以[按照其官方下载页面的下载说明进行操作][3]。 + +成功安装 VirtualBox 后,让我们从第一步开始。 + +#### 步骤 1:获 取NixOS 的 ISO 镜像 + +你需要前往 NixOS [官方下载页面][4]。 + +在 `NixOS: the Linux distribution` 部分,你会找到 GNOME 和 KDE 桌面的 ISO。 + +当然,也有最小化 ISO,但我建议使用两者之一(GNOME 和 KDE): + +![Download NixOS ISO file][5] + +对于本教程,我将使用 GNOME。 + +请记住,你在实时桌面上有 GNOME 和 KDE 两种选择! + +在安装过程中,你可以选择自己喜欢的桌面环境,包括 **Xfce、Pantheon、Cinnamon、MATE** 等等! + +#### 步骤 2:在 VirtualBox 中创建虚拟机 + +打开 VirtualBox 并单击 `New` 按钮添加新的虚拟机: + +![screenshot that shows you how to click on new button to add new virtual machine][6] + +它将打开一个提示,要求你添加有关要添加的 VM 的信息。 + +你可以先命名虚拟机: + +- **为你的 VM 命名,以便你可以识别它是 NixOS 安装。所以我将其命名为 `NixOS`。** +- **选择你最近下载的 ISO 镜像。** +- **选择 `Linux` 作为 ISO 类型。** +- **并在版本选择 `Other Linux (64-bit)`。** + +![][7] + +选择所有内容后,单击 `Next` 按钮。 + +接下来,系统会要求你选择基本内存 (RAM)、要分配给此 VM 的处理器以及存储空间。 + +虽然 NixOS 没有提到官方要求,但我建议你为此安装至少拥有 **4GB RAM**、**2-4 个处理器内核**和 **30GB 空间**: + +![select hardware for NixOS VM][8] + +最后,它会显示你为此 VM 所做选择的摘要: + +![summary of NixOS VM install][9] + +如果一切正常,请单击 `Finish` 按钮,它将为你创建一个 NixOS 虚拟机。 + +#### 步骤 3:安装 NixOS + +创建完 VM 后,你为 NixOS VM 指定的名称应该显示在 VirtualBox 的 VM 列表中。 + +选择 NixOS VM 并单击开始按钮: + +![start the NixOS VM][10] + +它将启动 NixOS live,以便你可以试用 Linux 发行版。 + +##### 选择安装语言 + +启动进入 NixOS 后,安装程序将启动并要求你设置安装程序的首选语言: + +![choose preferred language for NixOS install][11] + +##### 选择地区和时区 + +接下来,选择你所在的地区和区域。如果你不知道这一点,你可以从地图上选择你的国家,它会为你设置。 + +选择区域和区域后,它还会选择首选语言、数字和日期区域设置。 + +当然,你可以根据需要进行更改,但对于大多数用户而言,选定的选项就可以正常工作: + +![choose the region and zone for NixOS][12] + +##### 选择键盘布局 + +接下来,你将必须设置键盘布局。对于大多数用户来说,默认设置的 `English (US)` 应该可以正常工作。 + +如果你要进行其他操作,则可以在继续之前测试你的键盘配置。 + +![select Keyboard layout for NixOS][13] + +之后,系统会要求你创建一个用户并为该用户设置密码。 + +你可以选择为虚拟机保留一个强密码或任何随机密码。 + +![create a user for NixOS][14] + +##### 选择你喜欢的桌面环境 + +使用 NixOS,你可以选择以下桌面环境: + +- GNOME +- KDE(定制的最佳选择) +- Xfce +- Pantheon(ElementaryOS 附带的桌面环境) +- Cinnamon +- Enlightenment +- LXQt + +![choose desktop environment for NixOS][15] + +##### 在 NixOS 上使用非自由软件 + +NixOS 遵循与 Fedora 类似的方法,你必须选择是否需要非自由软件。 + +我建议你启用非自由包: + +![enable non-free package in NixOS][16] + +##### 分区部分 + +由于这是一个 VM 指南,我建议你使用自动对磁盘进行分区的 `Erase disk` 选项! + +![automatic partition the disk for NixOS][17] + +完成后,它将为你提供你所做选择的摘要: + +![summery of NixOS installation options in VM][18] + +如果一切正常,请单击 `Install` 按钮,它将开始安装。 + +##### 不要重启而是关闭虚拟机 + +安装完成后,你可以选择重新启动 VM。 + +如果你这样做,**它将再次加载安装程序**! + +要解决此问题,你必须更改引导顺序。 + +为此,请在安装完成后关闭 VM。 + +要关闭 VM,请从**文件菜单**中选择 `Close` 选项,然后选择 `Power off the machine` 选项: + +![][19] + +##### 更改 VirtualBox 中的启动顺序 + +要更改 NixOS VM 中的启动顺序,请打开该 VM 的设置: + +![][20] + +在设置中,选择 `System`,你将找到启动顺序。 + +在这里,选择 `Hard Disk` 并使用选项旁边的**向上箭头**图标并将其设为启动的第一个选项: + +![change boot order in VirtualBox][21] + +按下 `OK`,它将保存你所做的更改。 + +**或者**,你可以移除我们添加的用于启动安装的光盘(ISO 镜像)。 + +#### 步骤 4:从 NixOS 安装启动 + +现在,启动你的 NixOS VM,你将看到一个 GRUB 屏幕: + +![NixOS grub screen][22] + +选择默认选项,它将带你进入带有 GNOME 桌面的全新 NixOS 安装。 + +![running NixOS in VM][23] + +就是这些了!**请继续探索 NixOS!** + +### 总结 + +这是关于如何在 VirtualBox 上安装 NixOS 的快速指南。 + +对于 NixOS 教程系列的下一部分,我将分享有关**安装和删除包**的建议。 + +💬 _敬请期待本系列的下一部分。在那之前,请随时分享你对 NixOS 的看法或在遵循指南时遇到任何问题!_ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-nixos-vm/ + +作者:[Sagar Sharma][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/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/why-use-nixos/ +[2]: https://itsfoss.com/advanced-linux-distros/ +[3]: https://www.virtualbox.org/wiki/Linux_Downloads +[4]: https://nixos.org/download.html +[5]: https://itsfoss.com/content/images/2023/02/Download-NixOS-ISO-file.png +[6]: https://itsfoss.com/content/images/2023/02/click-on-new-to-add-new-virtual-machine.png +[7]: https://itsfoss.com/content/images/2023/02/Add-NixOS-ISO-to-VirtualBox.png +[8]: https://itsfoss.com/content/images/2023/02/select-hardware-for-NixOS-VM-1.png +[9]: https://itsfoss.com/content/images/2023/02/summery-of-NixOS-VM-install.png +[10]: https://itsfoss.com/content/images/2023/02/start-the-NixOS-VM.png +[11]: https://itsfoss.com/content/images/2023/02/1.-choose-the-language-of-NixOS-installer.png +[12]: https://itsfoss.com/content/images/2023/02/2.-choose-the-region-and-zone-for-NixOS.png +[13]: https://itsfoss.com/content/images/2023/02/3.-select-Keyboard-layout-for-NixOS.png +[14]: https://itsfoss.com/content/images/2023/02/4.-create-user-and-set-password-for-NixOS.png +[15]: https://itsfoss.com/content/images/2023/02/5.-choose-desktop-environment-for-NixOS.png +[16]: https://itsfoss.com/content/images/2023/02/6.-Allow-unfree-software.png +[17]: https://itsfoss.com/content/images/2023/02/7.-select-erase-disk-option-while-installing-NixOS.png +[18]: https://itsfoss.com/content/images/2023/02/8.-summery-of-NixOS-installation-options-in-VM.png +[19]: https://itsfoss.com/content/images/2023/02/poweroff-VM.png +[20]: https://itsfoss.com/content/images/2023/02/open-settings-for-VM-in-VirtualBox.png +[21]: https://itsfoss.com/content/images/2023/02/how-to-change-the-boot-order-in-VirtualBox.gif +[22]: https://itsfoss.com/content/images/2023/02/NixOS-grub-screen.png +[23]: https://itsfoss.com/content/images/2023/02/running-NixOS-in-VM.png +[24]: https://itsfoss.com/install-virtualbox-ubuntu/ \ No newline at end of file From ddadb004741395e6a90a01a86e90ecf14fffdb8f Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Mar 2023 08:52:34 +0800 Subject: [PATCH 069/318] translating --- ...⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md b/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md index 8040a12213..cc41474adc 100644 --- a/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md +++ b/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/" [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 5524589f8f4d5e129db7d23719608a45356a10c0 Mon Sep 17 00:00:00 2001 From: Bright Huang Date: Mon, 13 Mar 2023 21:54:10 +0800 Subject: [PATCH 070/318] tr1 --- ...ware- Is There an Easy Path to Success-.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md index 7f9aea7ab5..3ec81b5b02 100644 --- a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md +++ b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md @@ -7,24 +7,51 @@ [#]: publisher: " " [#]: url: " " +开源软件:存在成功的捷径吗? +====== + +DN Open Source Software: Is There an Easy Path to Success? ====== + +开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 + +DN There’s so much that goes on behind the scenes while developing open source software. So how does one make an open source project successful? Is there a shortcut? This article indicates there isn’t one. -![team work working together][1] +![团队合作][1] +今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 + +DN Open source has become all the rage now. Many entrepreneurs are drawn to it by the allure of quick success. But the truth is, there is no easy path to such success. There is no one thing that you can do to get all of open source right. +事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 + +DN In fact, a lot of the challenges that companies face early on are not technology challenges, but are people and cultural challenges. +开发一个能够在市场上获得成功的开源项目需要同不同层级(的开源社区人员)一同工作。维护这样的项目也是一个持续的过程。所有这一切的关键在于找到以下这个非常基础的问题的正确答案:开源究竟是什么。 + +DN There are many layers of open source that need to be worked on to build a project that can become a hit in the market. And maintaining that success is an ongoing process. But at the crux of it all lies finding the right answer to a very basic question: what exactly is open source? +### 开源就是代码 + +DN ### Open source is the code +对于很多没有深刻认识到构成开源的不同层级(的开源社区人员)用户而言,答案相当简单:开源就是软件!这当然没有错,毕竟这就是我们多数人如何使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 + +DN For many new users who may not be fully aware of the layers that make open source, the answer is fairly simple: open source is software! And that is not wrong, of course, since that is how most of us are using it. But there’s just so much more to open source than merely being touted as software. +任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目并使其对用户有益的根本。当你在开源中工作的时候,代码和软件一样都是产品自身的一部分。 + +DN The essence of any open source project still remains the code. It is what makes the project special and useful for the user. When you’re working in open source, the code is just as much a part of the product as the software. +从零开始开发一个(开源)项目或者复刻(fork)一个现有项目的分支 Developing a project from the ground up, or even creating a fork of an existing project, requires thousands and thousands of lines of code to be written, even while handling such a large and complex codebase. Especially in the case of creating a fork, care must be taken to remove any prior licences, marketing material, or anything that might not be useful for the user anymore. After all, it is the features of a project that attract its user base and what retains it. When end users are deciding whether to use open source software, they will read the source code, and what they see there should be something that builds their confidence. ### Open source is the community From 69da50ab70047ae58bcf198934c776dbd1b85403 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Mar 2023 08:55:18 +0800 Subject: [PATCH 071/318] translated --- ...nal Basics Series 4 Creating Files in Linux.md | 133 ----------------- ...nal Basics Series 4 Creating Files in Linux.md | 137 ++++++++++++++++++ 2 files changed, 137 insertions(+), 133 deletions(-) delete mode 100644 sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md create mode 100644 translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md diff --git a/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md b/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md deleted file mode 100644 index f07af2a09e..0000000000 --- a/sources/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: subject: "Terminal Basics Series #4: Creating Files in Linux" -[#]: via: "https://itsfoss.com/create-files/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Terminal Basics Series #4: Creating Files in Linux -====== - -So far, in this Terminal Basics series, you have learned to: - -- [Change directories][1] -- [Make new directories][2] -- [List directory contents][3] - -Let's now learn about creating files in the Linux command line. I'll briefly discuss adding content to the file. However, details on editing text files will be covered later. - -### Create a new empty file with touch command - -Using the touch command is pretty straightforward. - -``` -touch filename -``` - -Switch to your home directory and create a new directory called `practice_files` and switch to this directory: - -``` -mkdir practice_files && cd practice_files -``` - -💡 - -The && is a way to combine two commands. The second command only runs when the first command is executed successfully. - -Now, create a new file named new_file: - -``` -touch new_file -``` - -That's it. You have just created a new empty file. - -List the directory content and check the properties of the file with ls -l command. - -![Using touch command to create new files][4] - -💡 - -The touch command's original purpose is to 'touch' a file and change its timestamp. If the provided file does not exist, it creates a new file with the name. - -### Create a new file using the echo command - -I should have introduced you to the echo command long back. Better late than never. The echo command displays whatever you provide to it. Hence the name echo. - -``` -echo Hello World -``` - -You can use redirection and route the output to a file. And hence creating a new file in the process: - -``` -echo "Hello World" >> other_new_file -``` - -This way, you create a new file named `other_new_file` with the text `Hello World` in it. - -![Using echo command to create new file][5] - -Remember, if the provided file already exists, with >> redirection, you add a new line to the file. You can also use > redirection but then it will replace the existing content of the file. - -More on redirection can be found in the below tutorial. - -### Create new files using the cat command - -The original purpose of the cat command was to concatenate files. However, it is primarily used for displaying the contents of a file. - -It can also be used to create a new file with the option to add content. For that, you can use the same > and >> redirections. - -``` -cat >> another_file -``` - -But this one will create a new file and allow you to add some text to it. Adding text is optional. **You can exit the cat entering mode by using Ctrl+d keys.** - -![Using cat command to create new file][6] - -Again, the append mode >> adds new text at the end of file content while the clobber mode > replaces the existing content with new. - -🖥️ - -Use the long listing display with ls -l and notice the timestamps. Now touch the file - -``` -touch other_new_file -``` - -. Do you see the difference in the timestamps? - -### Test your knowledge - -You have learned about creating new files. Here are a few simple exercises to practice what you just learned. It includes a little bit of the previous chapters as well. - -- Use the touch command to create three new files named file1, file2 and file3. Hint: You don't need to run touch three times. -- Create a directory called files and create a file named my_file in it. -- Use the cat command to create a file called `your_file` and add the following text in it "This is your file". -- Use the echo command to add a new line "This is our file" to your_file. -- Display all the files in reverse chronological order (refer to chapter 3). Now use the touch command to modify the timestamp of file2 and file3. Now display the content in reverse chronological order again. - -That's pretty fun. You are making good progress. You have learned to create new files in this chapter. Next, you'll learn about viewing the contents of a file. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/create-files/ - -作者:[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/change-directories/ -[2]: https://itsfoss.com/make-directories/ -[3]: https://itsfoss.com/list-directory-content/ -[4]: https://itsfoss.com/content/images/2023/03/touch-example.svg -[5]: https://itsfoss.com/content/images/2023/03/echo-example.svg -[6]: https://itsfoss.com/content/images/2023/03/cat-example.svg \ No newline at end of file diff --git a/translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md b/translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md new file mode 100644 index 0000000000..7b613bd9c9 --- /dev/null +++ b/translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md @@ -0,0 +1,137 @@ +[#]: subject: "Terminal Basics Series #4: Creating Files in Linux" +[#]: via: "https://itsfoss.com/create-files/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +终端基础知识系列 #4:在 Linux 中创建文件 +====== + +到目前为止,在这个终端基础系列中,你已经学会了: + +- [更改目录][1] +- [创建新目录][2] +- [列出目录内容][3] + +现在让我们学习如何在 Linux 命令行中创建文件。我将简要讨论向文件添加内容。但是,稍后将介绍有关编辑文本文件的详细信息。 + + +### 使用 touch 命令创建一个新的空文件 + +使用 touch 命令非常简单。 + +``` +touch filename +``` + +切换到你的主目录并创建一个名为 `practice_files` 的新目录,然后切换到该目录: + +``` +mkdir practice_files && cd practice_files +``` + +💡 + +&& 是一种组合两个命令的方法。只有当第一个命令执行成功时,第二个命令才会运行。 + +现在,创建一个名为 new_file 的新文件: + +``` +touch new_file +``` + +就是这样。你刚刚创建了一个新的空文件。 + +列出目录内容并使用 ls -l 命令检查文件的属性。 + +![Using touch command to create new files][4] + +💡 + +touch 命令的最初目的是“触摸”文件并更改其时间戳。如果提供的文件不存在,它会创建一个具有该名称的新文件。 + +### 使用 echo 命令创建一个新文件 + +很久以前我就应该向你介绍 echo 命令。迟到总比不到好。echo 命令显示你提供给它的任何内容。因此得名回声。 + +``` +echo Hello World +``` + +你可以使用重定向并将输出路由到文件。因此在此过程中创建一个新文件: + +``` +echo "Hello World" >> other_new_file +``` + +这样,你将创建一个名为 `other_new_file` 的新文件,其中包含文本 `Hello World`。 + +![Using echo command to create new file][5] + +请记住,如果提供的文件已经存在,使用 >> 重定向,你将向文件添加一个新行。你也可以使用 > 重定向,但它会替换文件的现有内容。 + +更多关于重定向的信息可以在下面的教程中找到。 + +[解释:Linux 中的输入、输出和错误重定向][7] + +### 使用 cat 命令创建新文件 + +cat 命令的最初目的是连接文件。但是,它主要用于显示文件的内容。 + +它还可以使用选项创建新文件并添加内容。为此,你可以使用相同的 > 和 >> 重定向。 + +``` +cat >> another_file +``` + +但是这个将创建一个新文件并允许你向其中添加一些文本。添加文本是可选的。**你可以使用 Ctrl+d 键退出 cat 输入模式。** + +![Using cat command to create new file][6] + +同样,附加模式 >> 在文件内容的末尾添加新文本,而覆盖模式 > 用新内容替换现有内容。 + +🖥️ + +使用带有 ls -l 的长列表显示并注意时间戳。现在 touch 文件: + +``` +touch other_new_file +``` + +你看到时间戳的区别了吗? + +### 测试你的知识 + +你已经了解了如何创建新文件。这里有一些简单的练习来练习你刚刚学到的东西。它也包括前几章的一些内容。 + +- 使用 touch 命令创建三个新文件,分别命名为 file1、file2 和 file3。提示:你不需要运行 touch 三次。 +- 创建一个名为 files 的目录,并在其中创建一个名为 my_file 的文件。 +- 使用 cat 命令创建一个名为 `your_file` 的文件,并在其中添加以下文本 “This is your file”。 +- 使用 echo 命令将新行 “This is our file” 添加到 your_file。 +- 以相反的时间顺序显示所有文件(请参阅第 3 章)。现在使用 touch 命令修改 file2 和 file3 的时间戳。现在再次按时间倒序显示内容。 + +这很有趣。你正在取得很好的进步。你已在本章中学会了创建新文件。接下来,你将学习如何查看文件的内容。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/create-files/ + +作者:[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/change-directories/ +[2]: https://itsfoss.com/make-directories/ +[3]: https://itsfoss.com/list-directory-content/ +[4]: https://itsfoss.com/content/images/2023/03/touch-example.svg +[5]: https://itsfoss.com/content/images/2023/03/echo-example.svg +[6]: https://itsfoss.com/content/images/2023/03/cat-example.svg +[7]: https://linuxhandbook.com/redirection-linux/?ref=its-foss \ No newline at end of file From 38289eab7b4c94e582bc8b8f3d4d9d7374b87276 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Mar 2023 08:58:10 +0800 Subject: [PATCH 072/318] translating --- ....4 ⭐️⭐️ What cloud developers need to know about hardware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md b/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md index b6880b246b..bd0293380f 100644 --- a/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md +++ b/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/cloud-hardware" [#]: author: "Jay Faulkner https://opensource.com/users/jayf" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d81cd374dfe614226357fba86ab15d9f6ea350e8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Mar 2023 15:41:34 +0800 Subject: [PATCH 073/318] RP @geekpi https://linux.cn/article-15624-1.html --- ...ies 2 How to Install NixOS on a Virtual Machine.md | 113 +++++++++--------- 1 file changed, 57 insertions(+), 56 deletions(-) rename {translated/tech => published}/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md (57%) diff --git a/translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md b/published/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md similarity index 57% rename from translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md rename to published/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md index f8b4bd3eef..a2a1c8d4c7 100644 --- a/translated/tech/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md +++ b/published/20230227.0 ⭐️⭐️ NixOS Series 2 How to Install NixOS on a Virtual Machine.md @@ -3,9 +3,9 @@ [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15624-1.html" NixOS 系列 #2:如何在虚拟机上安装 NixOS? ====== @@ -14,11 +14,11 @@ NixOS 系列 #2:如何在虚拟机上安装 NixOS? 在使用 NixOS 几天之前,我经常想知道同样的事情。 -当我意识到这些好处后,我就写了这篇文章来帮助你了解[为什么你可能会考虑使用 NixOS][1]。如果你已经阅读了本系列的第一篇文章,那么你已经知道自己想要什么了。 +当我意识到这些好处后,我就写了这篇文章来帮助你了解 [为什么你要考虑使用 NixOS][1]。如果你已经阅读了本系列的第一篇文章,那么你已经知道自己想要什么了。 -那么,如何开始呢? 考虑到它对许多人来说可能是一种新体验,你应该用它替换日常驱动程序还是将其安装为虚拟机? +那么,如何开始呢?考虑到它对许多人来说可能是一种新体验,你应该用它替换日常使用的系统还是将其安装为虚拟机? -我建议在你想要将其替换为你的主要操作系统之前在 VM 上使用 NixOS。这适用于你想尝试的任何新事物,特别是[先进的 Linux 发行版][2],例如 NixOS。 +我建议在你想要将其替换为你的主要操作系统之前在虚拟机上使用 NixOS。这适用于你想尝试的任何新事物,特别是 [先进的 Linux 发行版][2],例如 NixOS。 ### 使用 VirtualBox 在 VM 中安装 NixOS @@ -30,11 +30,11 @@ NixOS 系列 #2:如何在虚拟机上安装 NixOS? sudo apt install virtualbox ``` -想要安装最新版本? 你可以参考下面的指南: +想要安装最新版本?你可以参考下面的指南: -[如何在 Ubuntu 上安装 VirtualBox(初学者教程)][24] +> **[如何在 Ubuntu 上安装 VirtualBox(初学者教程)][24]** -如果你使用 Ubuntu 以外的任何软件,你可以[按照其官方下载页面的下载说明进行操作][3]。 +如果你使用 Ubuntu 以外的任何发行版,你可以 [按照其官方下载页面的下载说明进行操作][3]。 成功安装 VirtualBox 后,让我们从第一步开始。 @@ -42,88 +42,88 @@ sudo apt install virtualbox 你需要前往 NixOS [官方下载页面][4]。 -在 `NixOS: the Linux distribution` 部分,你会找到 GNOME 和 KDE 桌面的 ISO。 +在 “NixOS: the Linux distribution” 部分,你会找到带有 GNOME 和 KDE 桌面的 ISO。 当然,也有最小化 ISO,但我建议使用两者之一(GNOME 和 KDE): -![Download NixOS ISO file][5] +![下载 NixOS ISO 文件][5] 对于本教程,我将使用 GNOME。 -请记住,你在实时桌面上有 GNOME 和 KDE 两种选择! +请记住,你可以选择 GNOME 和 KDE 两种立付桌面环境Live Desktop。 -在安装过程中,你可以选择自己喜欢的桌面环境,包括 **Xfce、Pantheon、Cinnamon、MATE** 等等! +而在安装过程中,你可以选择自己喜欢的桌面环境,包括 **Xfce、Pantheon、Cinnamon、MATE** 等等! #### 步骤 2:在 VirtualBox 中创建虚拟机 -打开 VirtualBox 并单击 `New` 按钮添加新的虚拟机: +打开 VirtualBox 并单击 “新建New” 按钮添加新的虚拟机: -![screenshot that shows you how to click on new button to add new virtual machine][6] +![截图显示了如何点击新建按钮来添加新的虚拟机][6] -它将打开一个提示,要求你添加有关要添加的 VM 的信息。 +它将打开一个提示,要求你添加有关要添加的虚拟机的信息。 你可以先命名虚拟机: -- **为你的 VM 命名,以便你可以识别它是 NixOS 安装。所以我将其命名为 `NixOS`。** -- **选择你最近下载的 ISO 镜像。** -- **选择 `Linux` 作为 ISO 类型。** -- **并在版本选择 `Other Linux (64-bit)`。** +- 为你的虚拟机命名,以便你可以识别它是 NixOS 系统。所以我将其命名为 “NixOS”。 +- 选择你刚刚下载的 ISO 镜像。 +- 选择 “Linux” ISO 类型。 +- 并在版本选择 “其它 Linux(64 位)Other Linux (64-bit)”。 ![][7] -选择所有内容后,单击 `Next` 按钮。 +选择所有内容后,单击 “下一步Next” 按钮。 -接下来,系统会要求你选择基本内存 (RAM)、要分配给此 VM 的处理器以及存储空间。 +接下来,系统会要求你选择基本内存(RAM)、要分配给此虚拟机的处理器以及存储空间。 虽然 NixOS 没有提到官方要求,但我建议你为此安装至少拥有 **4GB RAM**、**2-4 个处理器内核**和 **30GB 空间**: -![select hardware for NixOS VM][8] +![选择 NixOS 虚拟机的硬件][8] -最后,它会显示你为此 VM 所做选择的摘要: +最后,它会显示你为此虚拟机所做选择的摘要: -![summary of NixOS VM install][9] +![NixOS 虚拟机 安装摘要][9] -如果一切正常,请单击 `Finish` 按钮,它将为你创建一个 NixOS 虚拟机。 +如果一切正常,请单击 “完成Finish” 按钮,它将为你创建一个 NixOS 虚拟机。 #### 步骤 3:安装 NixOS -创建完 VM 后,你为 NixOS VM 指定的名称应该显示在 VirtualBox 的 VM 列表中。 +创建完虚拟机后,你为 NixOS 虚拟机指定的名称应该显示在 VirtualBox 的虚拟机列表中。 -选择 NixOS VM 并单击开始按钮: +选择 “NixOS” 虚拟机并单击“开始”按钮: -![start the NixOS VM][10] +![开始 NixOS 虚拟机][10] -它将启动 NixOS live,以便你可以试用 Linux 发行版。 +它将启动 NixOS 立付桌面环境Live Desktop,以便你可以试用 Linux 发行版。 ##### 选择安装语言 启动进入 NixOS 后,安装程序将启动并要求你设置安装程序的首选语言: -![choose preferred language for NixOS install][11] +![选择安装时的首选语言][11] ##### 选择地区和时区 接下来,选择你所在的地区和区域。如果你不知道这一点,你可以从地图上选择你的国家,它会为你设置。 -选择区域和区域后,它还会选择首选语言、数字和日期区域设置。 +选择区域和区域后,它还会选择系统的首选语言、数字和日期区域设置。 当然,你可以根据需要进行更改,但对于大多数用户而言,选定的选项就可以正常工作: -![choose the region and zone for NixOS][12] +![选择地区和时区][12] ##### 选择键盘布局 -接下来,你将必须设置键盘布局。对于大多数用户来说,默认设置的 `English (US)` 应该可以正常工作。 +接下来,你将必须设置键盘布局。对于大多数用户来说,默认设置的 “English (US)” 应该可以正常工作。 如果你要进行其他操作,则可以在继续之前测试你的键盘配置。 -![select Keyboard layout for NixOS][13] +![选择键盘格式][13] 之后,系统会要求你创建一个用户并为该用户设置密码。 你可以选择为虚拟机保留一个强密码或任何随机密码。 -![create a user for NixOS][14] +![创建用户][14] ##### 选择你喜欢的桌面环境 @@ -137,7 +137,7 @@ sudo apt install virtualbox - Enlightenment - LXQt -![choose desktop environment for NixOS][15] +![选择桌面环境][15] ##### 在 NixOS 上使用非自由软件 @@ -145,59 +145,59 @@ NixOS 遵循与 Fedora 类似的方法,你必须选择是否需要非自由软 我建议你启用非自由包: -![enable non-free package in NixOS][16] +![启用非自由软件包][16] ##### 分区部分 -由于这是一个 VM 指南,我建议你使用自动对磁盘进行分区的 `Erase disk` 选项! +由于这是一个虚拟机指南,我建议你使用自动对磁盘进行分区的 “擦除磁盘Erase disk” 选项! -![automatic partition the disk for NixOS][17] +![自动分区][17] 完成后,它将为你提供你所做选择的摘要: -![summery of NixOS installation options in VM][18] +![安装选择摘要][18] -如果一切正常,请单击 `Install` 按钮,它将开始安装。 +如果一切正常,请单击 “安装Install” 按钮,它将开始安装。 ##### 不要重启而是关闭虚拟机 -安装完成后,你可以选择重新启动 VM。 +安装完成后,你可以选择重新启动虚拟机。 如果你这样做,**它将再次加载安装程序**! 要解决此问题,你必须更改引导顺序。 -为此,请在安装完成后关闭 VM。 +为此,请在安装完成后关闭虚拟机。 -要关闭 VM,请从**文件菜单**中选择 `Close` 选项,然后选择 `Power off the machine` 选项: +要关闭虚拟机,请从“文件File”菜单中选择 “关闭Close” 选项,然后选择 “关闭虚拟机电源Power off the machine” 选项: ![][19] ##### 更改 VirtualBox 中的启动顺序 -要更改 NixOS VM 中的启动顺序,请打开该 VM 的设置: +要更改 NixOS 虚拟机 中的启动顺序,请打开该虚拟机的设置: ![][20] -在设置中,选择 `System`,你将找到启动顺序。 +在设置中,选择 “系统System”,你将找到启动顺序。 -在这里,选择 `Hard Disk` 并使用选项旁边的**向上箭头**图标并将其设为启动的第一个选项: +在这里,选择 “硬盘Hard Disk” 并使用选项旁边的**向上箭头**图标并将其设为启动的第一个选项: -![change boot order in VirtualBox][21] +![改变启动顺序][21] -按下 `OK`,它将保存你所做的更改。 +按下 “确定OK”,它将保存你所做的更改。 **或者**,你可以移除我们添加的用于启动安装的光盘(ISO 镜像)。 #### 步骤 4:从 NixOS 安装启动 -现在,启动你的 NixOS VM,你将看到一个 GRUB 屏幕: +现在,启动你的 NixOS 虚拟机,你将看到一个 GRUB 屏幕: -![NixOS grub screen][22] +![NixOS grub][22] 选择默认选项,它将带你进入带有 GNOME 桌面的全新 NixOS 安装。 -![running NixOS in VM][23] +![运行 NixOS][23] 就是这些了!**请继续探索 NixOS!** @@ -216,13 +216,13 @@ via: https://itsfoss.com/install-nixos-vm/ 作者:[Sagar Sharma][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://itsfoss.com/author/sagar/ [b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/why-use-nixos/ +[1]: https://linux.cn/article-15606-1.html [2]: https://itsfoss.com/advanced-linux-distros/ [3]: https://www.virtualbox.org/wiki/Linux_Downloads [4]: https://nixos.org/download.html @@ -245,4 +245,5 @@ via: https://itsfoss.com/install-nixos-vm/ [21]: https://itsfoss.com/content/images/2023/02/how-to-change-the-boot-order-in-VirtualBox.gif [22]: https://itsfoss.com/content/images/2023/02/NixOS-grub-screen.png [23]: https://itsfoss.com/content/images/2023/02/running-NixOS-in-VM.png -[24]: https://itsfoss.com/install-virtualbox-ubuntu/ \ No newline at end of file +[24]: https://itsfoss.com/install-virtualbox-ubuntu/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/14/154007dt8ucpf8co9o9otf.jpg \ No newline at end of file From af7c06c665f6d0e83a740958fc70e6bbb42975d2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Mar 2023 16:30:28 +0800 Subject: [PATCH 074/318] RP @perfiffer https://linux.cn/article-15625-1.html --- ...️⭐️ How to Install and Use htop in Linux.md | 197 ++++++++++++++++++ ...️⭐️ How to Install and Use htop in Linux.md | 196 ----------------- 2 files changed, 197 insertions(+), 196 deletions(-) create mode 100644 published/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md delete mode 100644 translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md diff --git a/published/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md b/published/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md new file mode 100644 index 0000000000..1b7052ad60 --- /dev/null +++ b/published/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md @@ -0,0 +1,197 @@ +[#]: subject: "How to Install and Use htop in Linux" +[#]: via: "https://itsfoss.com/use-htop/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15625-1.html" + +如何在 Linux 中安装和使用 htop +====== + +Windows 有其著名的任务管理器。Linux 有几个 GUI 和 [命令行的系统监视器][1]。每个 Linux 系统都都有几个这样的监视器。 + +在命令行中,`top` 命令可能是用于快速检查系统资源使用情况的最佳命令。 + +除了查看进程之外,[使用 top 命令][2] 可能会很麻烦。而这就是 `htop` 的优势所在。抛开双关语不谈,`htop` 是一个类似于 `top` 的实用程序,但具有更好的、用户友好的界面。 + +在本指南中,我将向你展示如何在 Linux 中安装和使用 `htop`。 + +### 在 Linux 中安装 htop 实用程序 + +在大多数的 Linux 发行版中你不会找到预安装的 `htop`,但作为最流行的实用程序之一,你会在几乎每个 Linux 发行版的默认存储库中找到 `htop`。 + +因此,如果你的机器是基于 Debian/Ubuntu 驱动的,则以下命令应该可以完成你的工作: + +``` +sudo apt install htop +``` + +类似的,如果你使用的是 Fedora,则可以使用以下的命令: + +``` +sudo dnf install htop +``` + +如果你想避免从源代码构建包,还有一个 Snap 包可用: + +``` +sudo snap install htop +``` + +如果你使用的是其它的发行版或者想从源代码构建,你可以随时参考 [htop 的 GitHub 页面][3]以获得详细说明。 + +完成安装后,你只需在终端中使用 `htop` 命令,它将反映系统中所有正在运行的进程: + +``` +htop +``` + +![安装和使用 htop][4] + +在 `htop` 中,每个部分都使用颜色标识,所以让我们看看使用 `htop` 时每种颜色表示什么。 + +##### htop 中不同的颜色和统计信息表示什么 + +让我们从 CPU 使用率栏开始,因为它使用的颜色最缤纷多彩。 + +#### CPU 使用率栏 + +![htop 中的 cpu 进程][5] + +- **绿色**:用户进程消耗的资源。 +- **蓝色**:表示低优先级线程。 +- **红色**:系统(内核)进程使用的 CPU 资源。 +- **水蓝色**:表示虚拟化进程。 + +#### 内存使用率栏 + +![htop 中的内存栏][6] + +- **绿色**:系统进程正在使用的内存。 +- **蓝色**:缓冲页面使用的内存。 +- **橙色**:分配给缓存页面的内存。 + +#### 统计数据 + +![htop 中的任务统计][7] + +- **1.86** 是最后 1 分钟的平均负载。 +- **1.75** 是最后 4 分钟的平均负载。 +- **1.47** 是最后 15 分钟的平均负载。 +- **Tasks: 166** 表示一共有 166 个正在运行的进程。 +- **1249 thr** 表示这 166 个进程由 1249 个线程处理。 +- **1 running** 表示在这 166 个进程中,只有一个进程处于运行中。 +- **The load average** 表示一段时间内的平均系统负载。由于我的系统是 Hexa-Core,所以 6.0 以下的是没问题的。这个数字可能会超过,比如 6.1,所以即将要运行的进程必须等待正在进行的任务完成。 +- **Uptime** 表示你登录后运行的时长。 + +现在,让我们跳到实际的实现部分。 + +### 如何在 Linux 中使用 htop + +由于 `htop` 主要用于检查系统资源,让我们看看如何根据资源消耗对进程进行排序。 + +#### 根据资源消耗对进程进行排序 + +根据 CPU 和内存使用情况对进程进行排序最简单的方法是使用鼠标指针。将光标悬停在 CPU 或内存部分上,然后单击其中任何一个。 + +在那里你会看到一个三角形的图标 `△`,你可以根据它从最高到最低的资源消耗对进程进行排序: + +但是,如果你正在处理远程服务器,你可能无法使用鼠标,在这种情况下,你可以使用键盘快捷键。 + +按 `F6`,它将显示每个可用的选项来对正在进行的进程进行排序: + +![使用键盘快捷键对 htop 中的进程进行排序][8] + +你可以使用方向键选择一个首选的排序选项,然后按回车键,结果应该会如预期的那样反映出来。 + +#### 搜索特定进程 + +如果你想查找一个特定的进程及其资源消耗,你可以按 `F3`,它会给你一个搜索提示,如下所示: + +![在 htop 中搜索进程][9] + +例如,我搜索 `htop`,它用浅橙色高亮显示了进程。你可以按 `F3` 获得下一个结果。 + +#### 过滤正在运行的进程 + +虽然搜索可能会让你获得预期的结果,但我发现使用关键字的过滤过程更加有效,因为它提供了一个过程列表。 + +要过滤进程,你必须按 `F4` 并输入进程的名称。例如,我过滤了与 `gnome-boxes` 相关的进程: + +![在 htop 中过滤进程][10] + +#### 杀死进程 + +一旦找到最耗资源和不必要的进程,你只需按 `F9`,它就会向你显示终止信号: + +![在 htop 中杀死进程][11] + +我无法介绍所有的 15 个终止信号,我们有一个关于 [不同终止信息][12] 的单独指南,因此如果你想了解更多信息,可以参考该指南。 + +但我会建议你首先使用 `SIGTERM`,因为它是终止进程的最有效和友好的方式。 + +#### 自定义 htop + +在这里,我的目标是添加日期和时间并将配色方案更改为单色。 + +首先,按 `F2`,它会出现设置提示,允许用户更改 `htop` 的外观: + +![在 ubuntu 中自定义 htop][13] + +首先,将鼠标悬停在各个 `Colors` 部分并按回车键,这将允许我们更改配色方案。从那里,选择 `Monochromatic` 选项并按回车键保存更改: + +![在 Linux 中更改 htop 颜色][14] + +现在,返回到设置选项,然后使用向左方向键探索可用的指标: + +![探索 htop 中可用的指标][15] + +因为我打算添加日期和时间,所以我必须在找到它的选项后按回车键。 + +在这里,它允许你将日期和时间放置在左右两列中,你可以使用向上和向下的方向键更改列的顺序。 + +所以我将日期和时间指标放在最后一个样式选项中(你可以使用空格键更改样式): + +![在 htop 中添加日期和时间][16] + +完成日期和时间指标的对齐后,按回车键保存更改,然后按 `F10` 关闭设置提示。 + +### 总结 + +在本指南中,我解释了如何在不同的 Linux 发行版中安装 `htop` 实用程序,以及如何使用 `htop` 的一些基本功能来有效的管理系统资源。 + +但是 `htop` 可以做更多的事情,要了解更多信息,你可以随时参考它的手册页,我们有一个详细的指南,告诉你如何 [在 Linux 中充分利用手册页][17]。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/use-htop/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/linux-system-monitoring-tools/ +[2]: https://linuxhandbook.com/top-command/ +[3]: https://github.com/htop-dev/htop +[4]: https://itsfoss.com/content/images/wordpress/2022/11/install-and-use-htop.png +[5]: https://itsfoss.com/content/images/wordpress/2022/11/cpu-process-in-htop-1.png +[6]: https://itsfoss.com/content/images/wordpress/2022/11/memory-bar-in-htop.png +[7]: https://itsfoss.com/content/images/wordpress/2022/11/task-statistics-in-htop.png +[8]: https://itsfoss.com/content/images/wordpress/2022/11/sort-processes-in-htop-using-keyboard-shortcut.png +[9]: https://itsfoss.com/content/images/wordpress/2022/11/search-processes-in-htop.png +[10]: https://itsfoss.com/content/images/wordpress/2022/11/filter-processes-in-htop.png +[11]: https://itsfoss.com/content/images/wordpress/2022/11/kill-process-in-htop.png +[12]: https://linuxhandbook.com/termination-signals/ +[13]: https://itsfoss.com/content/images/wordpress/2022/11/customize-htop-in-ubuntu.png +[14]: https://itsfoss.com/content/images/wordpress/2022/11/change-htop-colors-in-linux.png +[15]: https://itsfoss.com/content/images/wordpress/2022/11/explore-available-meters-in-htop.png +[16]: https://itsfoss.com/content/images/wordpress/2022/11/add-date-and-time-htop.png +[17]: https://linuxhandbook.com/man-pages/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/14/162909klvn2plolhwcko2k.jpg \ No newline at end of file diff --git a/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md b/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md deleted file mode 100644 index 679cc501a6..0000000000 --- a/translated/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md +++ /dev/null @@ -1,196 +0,0 @@ -[#]: subject: "How to Install and Use htop in Linux" -[#]: via: "https://itsfoss.com/use-htop/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: "perfiffer" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -如何在 Linux 中安装和使用 htop -====== -Windows 有其著名的任务管理器。Linux 有几个 GUI 和 [命令行系统监视器][1]。每个 Linux 系统都带有其中的几个。 - -在命令行中,top 命令可能是用于快速检查系统资源使用情况的 goto 命令。 - -除了查看进程之外,[使用 top 命令][2]可能会很棘手。这就是 htop 最顶尖的地方。抛开双关语不谈,htop 是一个类似于 top 的实用程序,但具有更好和用户友好的界面。 - -在本指南中,我将向你展示如何在 Linux 中安装和使用 htop。 - -### 在 Linux 中安装 htop 实用程序 - -你不会在大多数的 Linux 发行版中找到预安装的 htop,但作为最流行的实用程序之一,你会在几乎每个 Linux 发行版的默认存储库中找到 htop。 - -因此,如果你的机器是基于 Debian/Ubuntu 驱动的,则以下命令应该可以完成你的工作: - -``` -sudo apt install htop -``` - -类似的,如果你使用的是 Fedora,则可以使用以下的命令: - -``` -sudo dnf install htop -``` - -如果你想避免从源代码构建包,还有一个 snap 包可用: - -``` -sudo snap install htop -``` - -如果你使用的是其它的发行版或者想从源代码构建,你可以随时参考 [htop 的 GitHub 页面][3]以获得详细说明。 - -完成安装后,你只需在终端中使用 htop 命令,它将反映系统中所有正在运行的进程: - -``` -htop -``` - -![安装和使用 htop][4] - -在 htop 中,每个部分都有颜色编码,所以让我们看看使用 htop 时每种颜色表示什么。 - -##### htop 中不同的颜色和统计信息表示什么 - -让我们从 CPU 使用率栏开始,因为它使用了最大数量的颜色。 - -#### CPU 使用率栏 - -![htop 中的 cpu 进程][5] - -- **绿色:** 用户进程消耗的资源。 -- **蓝色:** 表示低优先级线程。 -- **红色:** 系统(内核)进程使用的 CPU 资源。 -- **水蓝色:** 表示虚拟化进程。 - -#### 内存使用率栏 - -![htop 中的内存栏][6] - -- **绿色:** 系统进程正在使用的内存。 -- **蓝色:** 缓冲页面使用的内存。 -- **橙色:** 分配给缓存页面的内存。 - -#### 统计数据 - -![htop 中的任务统计][7] - -- **1.86** 是最后 1 分钟的平均负载。 -- **1.75** 是最后 4 分钟的平均负载。 -- **1.47** 是最后 15 分钟的平均负载。 -- **Tasks: 166** 表示一共有 166 个正在运行的进程。 -- **1249 thr** 表示这 166 个进程由 1249 个线程处理。 -- **1 running** 表示在这 166 个进程中,只有一个进程处于运行中。 -- **The load average** 表示一段时间内的平均系统负载。由于我的系统是 Hexa-Core,所以 6.0 以下的都可以。这个数字可能会超过,比如 6.1,所以即将要运行的进程必须等待正在进行的任务完成。 -- **Uptime** 表示你登录后运行的时长。 - -现在,让我们跳到实际的实现部分。 - -### 如何在 Linux 中使用 htop - -由于 htop 主要用于检查系统资源,让我们看看如何根据资源消耗对进程进行排序。 - -#### 根据资源消耗对进程进行排序 - -根据 CPU 和内存使用情况对进程进行排序最简单的方法是使用鼠标指针。将光标悬停在 CPU 或内存部分上,然后单击其中任何一个。 - -在那里你会看到一个三角形的图标 `△`,你可以根据它从最高到最低的资源消耗对进程进行排序: - -但是,如果你正在处理远程服务器,你可能无法使用鼠标,在这种情况下,你可以使用键盘快捷键。 - -按 **F6**,它将显示每个可用的选项来对正在进行的进程进行排序: - -![使用键盘快捷键对 htop 中的进程进行排序][8] - -你可以使用方向键选择一个首选的排序选项,然后按 Enter 键,结果应该会如预期的那样反映出来。 - -#### 搜索特定进程 - -如果你想查找一个特定的进程及其资源消耗,你可以按 **F3**,它会给你一个搜索提示,如下所示: - -![在 htop 中搜索进程][9] - -例如,我搜索 htop,它用浅橙色高亮显示了进程。你可以按 **F3** 获得下一个结果。 - -#### 过滤正在运行的进程 - -虽然搜索可能会让你获得预期的结果,但我发现使用关键字的过滤过程更加有效,因为它提供了一个过程列表。 - -要过滤进程,你必须按 **F4** 并输入进程的名称。例如,我过滤了与 gnome-boxes 相关的进程: - -![在 htop 中过滤进程][10] - -#### 杀死进程 - -一旦找到最耗资源和不必要的进程,你只需按 **F9**,它就会向你显示终止信号: - -![在 htop 中杀死进程][11] - -我无法涵盖所有的 15 个终止信号,我们有一个关于[不同终止信息][12]的单独指南,因此如果你想了解更多信息,可以参考该指南。 - -但我会建议你首先使用 SIGTERM,因为它是终止进程的最有效和友好的方式。 - -#### 自定义 htop - -在这里,我的目标是添加日期和时间并将配色方案更改为单色。 - -首先,按 **F2**,它会出现设置提示,允许用户更改 htop 的外观: - -![在 ubuntu 中自定义 htop][13] - -首先,将鼠标悬停在各个 `Colors` 部分并按 Enter 键,这将允许我们更改配色方案。从那里,选择单色选项并按 Enter 键保存更改: - -![在 Linux 中更改 htop 颜色][14] - -现在,返回到设置选项,然后使用向左方向键探索可用的仪表: - -![探索 htop 中可用的仪表][15] - -因为我打算添加日期和时间,所以我必须在找到它的选项后按 Enter 键。 - -在这里,它允许你将日期和时间放置在左右两列中,你可以使用向上和向下的方向键更改列的顺序。 - -所以我将日期和时间仪表放在最后一个样式选项中(你可以使用空格键更改样式): - -![在 htop 中添加日期和时间][16] - -完成日期和时间仪表的对齐后,按 Enter 键保存更改,然后按 **F10** 关闭设置提示。 - -### 总结 - -在本指南中,我解释了如何在不同的 Linux 发行版中安装 htop 实用程序,以及如何使用 htop 的一些基本功能来有效的管理系统资源。 - -但是 htop 可以做更多的事情,要了解更多信息,你可以随时参考它的手册页,我们有一个详细的指南,告诉你如何[在 Linux 中充分利用手册页][17]。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/use-htop/ - -作者:[Sagar Sharma][a] -选题:[lkxed][b] -译者:[perfiffer](https://github.com/perfiffer) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sagar/ -[b]: https://github.com/lkxed -[1]: https://itsfoss.com/linux-system-monitoring-tools/ -[2]: https://linuxhandbook.com/top-command/ -[3]: https://github.com/htop-dev/htop -[4]: https://itsfoss.com/wp-content/uploads/2022/11/install-and-use-htop.png -[5]: https://itsfoss.com/wp-content/uploads/2022/11/cpu-process-in-htop-1.png -[6]: https://itsfoss.com/wp-content/uploads/2022/11/memory-bar-in-htop.png -[7]: https://itsfoss.com/wp-content/uploads/2022/11/task-statistics-in-htop.png -[8]: https://itsfoss.com/wp-content/uploads/2022/11/sort-processes-in-htop-using-keyboard-shortcut.png -[9]: https://itsfoss.com/wp-content/uploads/2022/11/search-processes-in-htop.png -[10]: https://itsfoss.com/wp-content/uploads/2022/11/filter-processes-in-htop.png -[11]: https://itsfoss.com/wp-content/uploads/2022/11/kill-process-in-htop.png -[12]: https://linuxhandbook.com/termination-signals/ -[13]: https://itsfoss.com/wp-content/uploads/2022/11/customize-htop-in-ubuntu.png -[14]: https://itsfoss.com/wp-content/uploads/2022/11/change-htop-colors-in-linux.png -[15]: https://itsfoss.com/wp-content/uploads/2022/11/explore-available-meters-in-htop.png -[16]: https://itsfoss.com/wp-content/uploads/2022/11/add-date-and-time-htop.png -[17]: https://linuxhandbook.com/man-pages/ From b57755c91df9a13741525eb13eceebc69e418203 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Tue, 14 Mar 2023 18:20:09 +0800 Subject: [PATCH 075/318] Update 20210906 Learn everything about computers with this Raspberry Pi kit.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XiaotingHuang22 is translating. 任务申领 --- ...n everything about computers with this Raspberry Pi kit.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md b/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md index 21f2f6e1f0..1e81c825dc 100644 --- a/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md +++ b/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/9/raspberry-pi-crowpi2" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -122,7 +122,7 @@ via: https://opensource.com/article/21/9/raspberry-pi-crowpi2 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fccc6e972c34fff12a1b86c1de55ebd57397f5fc Mon Sep 17 00:00:00 2001 From: "Qian Qian (Cubik)" Date: Tue, 14 Mar 2023 20:29:51 -0400 Subject: [PATCH 076/318] =?UTF-8?q?[=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91][?= =?UTF-8?q?talk]:=2020230309.1=20=E2=AD=90=EF=B8=8F=20Contribute=20to=20op?= =?UTF-8?q?en=20source=20without=20code.md=20(#28864)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [翻译完成][talk]: 20230309.1 ⭐️ Contribute to open source without code.md * [移动翻译][talk]: 20230309.1 ⭐️ Contribute to open source without code.md * [修复翻译][talk]: 20230309.1 ⭐️ Contribute to open source without code.md --- ...️ Contribute to open source without code.md | 91 ------------------- ...️ Contribute to open source without code.md | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 sources/talk/20230309.1 ⭐️ Contribute to open source without code.md create mode 100644 translated/talk/20230309.1 ⭐️ Contribute to open source without code.md diff --git a/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md b/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md deleted file mode 100644 index c77f17624b..0000000000 --- a/sources/talk/20230309.1 ⭐️ Contribute to open source without code.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: subject: "Contribute to open source without code" -[#]: via: "https://opensource.com/article/23/3/non-code-contribution-open-source" -[#]: author: "Debra Chen https://opensource.com/users/debra-chen" -[#]: collector: "lkxed" -[#]: translator: "Cubik65536" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Contribute to open source without code -====== - -An open source "community" means different things to different people. I think of open source a little like "falling in love" because it is about people and relationships. Treat open source as a community because, without people, there is no source, open or otherwise. - -I'm a member of the [Apache DolphinScheduler][1] community. Because that project is intentionally low-code, it appeals to many [people who aren't software developers][2]. Sometimes, people who don't write code aren't sure whether there's a meaningful way to contribute to an open source project that exists mainly because of source code. I know from experience that there is, and I will explain why in this article. - -### Contributions to the community - -In the Apache DolphinScheduler project, I'm mainly responsible for global operation, influence, and caring for the community. - -Some people say that projects are big trees, with open source being the soil. That's an apt analogy, and it demonstrates the importance of actively nurturing the thing you're trying to help grow. - -I have a simpler idea: Do everything possible to make it good. - -A community requires constant attention, not because it's needy but because it is part of life. Community is the people living amongst you, whether in your physical or online space. - -Since joining the open source community, I have independently initiated and organized events, including: - -- Coordinated on average one meetup in China a month. -- Recommended the community participate in the technology shares within the big data field. -- Coordinated with almost all of the open source projects within China's "big data" field, visiting and communicating with those communities individually. - -In my opinion, an excellent project should grow in a good ecology. And a community needs to go out to exchange ideas, share resources, and cooperate with other excellent communities. Everyone should feel the benefits brought to the community in their work. - -My overseas expansion follows the same pattern. Of course, it's difficult to do that effectively due to differences in cultures and languages. It takes energy, but it's worth it. - -So far, we have successfully held meetups overseas, including in the United States, India, Singapore, Germany, France, Finland, and more. - -So how do I contribute to DolphinScheduler? Am I committing code to the project? Am I a community manager? Do I have an official title? - -I think of myself as an assistant. I foster communication and connection, and that, as much as any code contribution, is an example of the "Apache Way." - -### Get started with DolphinScheduler - -I first learned about open source when I worked at OpenAtom Foundation as an open source education operation manager. As China's first open source foundation, OpenAtom operates many projects, exemplified by [OpenHarmony][3]. - -I joined the DolphinScheduler community and found a group of people who were eager to share knowledge, provide guidance and support, and keen to help others discover a tool they would find useful in their own lives. - -DolphinScheduler aims to be an influential scheduler worldwide, helping teams work in an [Agile][4] and efficient way. - -### First impressions of the community - -It's common to hear complaints from the community about project development. We all have complaints from time to time. Maybe you reported a bug, but the developers didn't address your problem. Or maybe you had a great idea for a feature, but the team ignored it. If you're a member of an open source community, you've heard these grievances before, and if you haven't, you eventually will. - -I've learned that these voices are all important to an open source community. It's a good sign when you hear this feedback because it means the community is willing to find bugs, report them, and ask and answer questions. Hearing those complaints may reveal places in the project's structure that need to be improved. Is there a volunteer from the community who can respond to bug reports and triage them so they get to the right developer? Is there a volunteer group waiting to be formed to respond promptly to questions from newcomers in your project's Discourse or forum? - -A greeter at the door of your open source project can help invite tentative community members in. A greeter can also ensure that there's no "gatekeeping" happening. Everyone's welcome and everyone has something to contribute, even if all they can offer is an atmosphere of helping one another. - -As much as you or I wish we could solve technical issues for everyone, it's not practical. But anyone can be willing to help find a solution—that's one of the great strengths of a community. These users spontaneously serve as their community's "customer service" department. - -Within the DolphinScheduler project, we have many (Yan Jiang, Xu Zhiwu, Zhang Qichen, Wang Yuxiang, Xiang Zihao, Yang Qiyu, Yang Jiahao, Gao Chufeng, and Gao Feng, in no particular order!). Even though they don't develop the solution, they work tirelessly to find the person who can. - -### Words to the community - -If you want to become a committer through non-code contributions or don't have time to make a code contribution, then the first step is to join the community. There's no sign-up form or approval process, but there's also no fast track. You join a community by participating. Through reliable and consistent participation, you develop relationships with others. - -I'm available for a chat and always eager to talk about global event organization, documentation, feedback, and more. - -### Become a committer - -Apache DolphinScheduler faces many challenges. Many companies, even ones that support open source, choose non-open business tooling. I want to work with community partners to make DolphinScheduler a world-class scheduling tool. I hope everyone can harvest the technical achievements they want and that DolphinScheduler helps get them there. - -Join our community and help us promote an open and Agile way of working. Or find a project in need of your non-coding skills. Find out just how cool and fun it is to empower a community of your peers! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/non-code-contribution-open-source - -作者:[Debra Chen][a] -选题:[lkxed][b] -译者:[Cubik65536](https://github.com/Cubik65536) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/debra-chen -[b]: https://github.com/lkxed/ -[1]: https://dolphinscheduler.apache.org/en-us -[2]: https://opensource.com/article/21/2/what-technical -[3]: https://gitee.com/openharmony -[4]: https://opensource.com/article/22/5/practical-tips-agile diff --git a/translated/talk/20230309.1 ⭐️ Contribute to open source without code.md b/translated/talk/20230309.1 ⭐️ Contribute to open source without code.md new file mode 100644 index 0000000000..a55608ade0 --- /dev/null +++ b/translated/talk/20230309.1 ⭐️ Contribute to open source without code.md @@ -0,0 +1,91 @@ +[#]: subject: "Contribute to open source without code" +[#]: via: "https://opensource.com/article/23/3/non-code-contribution-open-source" +[#]: author: "Debra Chen https://opensource.com/users/debra-chen" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +不编写代码也可以为开源项目做出贡献 +====== + +对于不同的人来说,开源“社区”意味着不同的东西。我认为开源有点像“爱情”,因为它是关于人和关系的。把开源当作一个社区,因为没有人,就没有源代码,无论是开源还是闭源。 + +我是 [Apache DolphinScheduler][1] 社区的成员。由于该项目有意保持低代码,因此它吸引了许多[非软件开发人员][2]。有时,那些不编写代码的人不确定是否有一种有意义的方式来为主要由源代码组成的开源项目做出贡献。我的经验告诉我,有,我将在本文中解释原因。 + +### 向社区做出贡献 + +在 Apache DolphinScheduler 项目中,我主要负责全球运营、影响力和社区关怀。 + +一些人会说项目是树而开源是土壤。这是一个恰当的比喻,它说明了积极培育你想要帮助成长的东西的重要性。 + +我有一个更简单的想法:尽一切可能使其变得更好。 + +一个社区需要不断的关注,不是因为它很贪心,而是因为它是生活的一部分。社区是你身边的人,无论是物理空间还是在线空间。 + +自从加入开源社区以来,我已经独立发起并组织了一些活动,包括: + +- 平均每月在中国举办一次会议。 +- 建议社区参与大数据领域内的技术分享。 +- 协调了中国“大数据”领域几乎所有的开源项目,与这些社区进行了个别访问和交流。 + +在我看来,一个优秀的项目应该在一个良好的生态系统中成长。社区需要走出去,交换想法,分享资源,并与其他优秀的社区合作。每个人都应该感受到社区在工作中带来的好处。 + +我的海外扩张遵循相同的模式。当然,由于文化和语言的差异,这样做很困难。这需要耗费精力,但这是值得的。 + +到目前为止,我们已经在包括美国、印度、新加坡、德国、法国、芬兰等国家成功举办了会议。 + +所以我如何为 DolphinScheduler 做出贡献?我是否向项目提交代码?我是社区经理吗?我有正式的职称吗? + +我认为自己是一个助手。我促进沟通和联系,这与任何代码贡献一样,都是“Apache Way”的一个例子。 + +### 从 DolphinScheduler 开始 + +我第一次接触开源是在 OpenAtom 基金会工作时,担任开源教育运营经理。作为中国第一个开源基金会,OpenAtom 运营了以 [OpenHarmony][3] 为代表的许多项目。 + +我加入了 DolphinScheduler 社区并发现了一群热衷于分享知识、提供指导和支持,并热衷于帮助其他人发现对他们自己的生活有用的工具的人。 + +DolphinScheduler 旨在成为一个拥有全球影响力的调度系统,帮助团队以 [敏捷][4] 和高效的方式工作。 + +### 对社区的第一印象 + +听到社区对项目开发的抱怨是一件常见的事情。我们都会时不时地抱怨。也许你报告了一个错误,但开发人员没有解决你的问题。或者,也许你有一个很棒的功能想法,但团队忽略了它。如果你是一个开源社区的成员,你以前就听到过这些不满,如果你没有,你最终会听到。 + +我了解到,这些声音对于开源社区来说都很重要。这是一个好现象,因为当你听到这些反馈时,这意味着社区愿意发现错误,报告它们,提出问题和回答问题。听到这些抱怨可能会揭示项目结构中需要改进的地方。社区中是否有志愿者可以回应错误报告并对它们进行分类,以便它们能够被分配给正确的开发人员?是否有一个志愿者组等待成立,以便迅速回应项目论坛或论坛中新人的问题? + +开源项目的门口有一个招待员可以帮助邀请犹豫不决的社区成员。招待员还可以确保没有“门槛”。每个人都受欢迎,每个人都有自己的贡献,即使他们能提供的只是互相帮助的氛围。 + +尽管你我都希望能为每个人解决技术问题,但这是不现实的。但任何人都愿意帮助找到解决方案,这是社区的一个伟大优势。这些用户自发地充当了社区的“客户服务”部门。 + +在 DolphinScheduler 项目中,我们有很多人(Yan Jiang、Xu Zhiwu、Zhang Qichen、Wang Yuxiang、Xiang Zihao、Yang Qiyu、Yang Jiahao、Gao Chufeng 和 Gao Feng,顺序不分先后!)。即使他们不开发解决方案,他们也不遗余力地寻找能够开发解决方案的人。 + +### 给社区的话 + +如果你希望通过非代码贡献成为提交者,或者没有时间进行代码贡献,那么第一步就是加入社区。没有注册表格或批准流程,但也没有快速通道。你通过参与加入社区。你通过可靠且持续的参与与其他人建立关系。 + +我随时都可以聊天,总是渴望谈论全球活动组织、文档、反馈等。 + +### 成为提交者 + +Apache DolphinScheduler 面临着许多挑战。大多数公司,即使是支持开源的公司,也会选择非开源的商业工具。我希望与社区合作伙伴一起,使 DolphinScheduler 成为世界级的调度系统。我希望每个人都可以收获他们想要的技术成果,而 DolphinScheduler 可以帮助他们实现这一目标。 + +加入我们的社区,帮助我们推广开放和敏捷的工作方式。或者找到一个需要你非编码技能的项目。发现让你的同龄人社区获得力量是多么酷和有趣! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/non-code-contribution-open-source + +作者:[Debra Chen][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/debra-chen +[b]: https://github.com/lkxed/ +[1]: https://dolphinscheduler.apache.org/en-us +[2]: https://opensource.com/article/21/2/what-technical +[3]: https://gitee.com/openharmony +[4]: https://opensource.com/article/22/5/practical-tips-agile From 579f2f1d543d9faa1eb10f16f77f18a01c27dd3b Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Mar 2023 08:32:44 +0800 Subject: [PATCH 077/318] translating --- ...tall MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md | 201 --------------- ...tall MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md | 229 ++++++++++++++++++ 2 files changed, 229 insertions(+), 201 deletions(-) delete mode 100644 sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md create mode 100644 translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md diff --git a/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md b/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md deleted file mode 100644 index cc41474adc..0000000000 --- a/sources/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: subject: "How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8" -[#]: via: "https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/" -[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8 -====== - -In this post, we will cover how to install minikube on RHEL 8, Rocky Linux 8 or AlmaLinux 8 step by step. - -Minikubeis a cross-platform and open-source tool that makes it possible for you to deploy a single-node Kubernetes cluster on your local machine. - -Kubernetes, also known as k8sor simply as Kube, is an open-source container orchestration platform used for the automation scaling and deployment of containers.Minikube cluster helps developers and admins to build their test environment in minikube cluster. - -##### Prerequisites of MiniKube - -- Minimal Installed RHEL 8 or Rocky Linux 8 or AlmaLinux 8 -- Locally Configured Repo or Subscription for RHEL 8. -- Minimum of 2 GB RAM and 2 vCPUs -- 20 GB hard disk space -- Sudo User with admin -- A stable internet connection -- Docker or virtual machine manager like VirtualBox, KVM,and VMware etc. - -In this post, we will be using docker as driver for minikube. With all the prerequisites met, it’s time now to roll up our sleeves and get our hands dirty. - -### Step 1) Enable Official Docker Repository - -To enable docker official repository run, - -``` -$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo -$ sudo dnf repolist -``` - -### Step 2) Install Docker CE (Community Edition) - -Run the following dnf command to install docker and its dependencies, - -``` -$ sudo dnf install docker-ce docker-ce-cli containerd.io -y -``` - -output, - -Once docker is installed the start and enable it’s service, run following systemctl commands, - -``` -$ sudo systemctl start docker -$ sudo systemctl start docker -``` - -Allow your local user to run docker commands without sudo, run - -``` -$ sudo usermod -aG docker $USER -$ newgrp docker -``` - -### Step 3) Install Kubectl Binary - -Kubectl is a command-line tool which interacts with Kubernetes cluster via APIs. Using kubectl we deploy our applications as deployment. By default, kubectl is not included in RHEL 8 , Rocky Linux 8 or AlmaLinux 8 package repositories. Therefore, we are going to manually install it using beneath commands, - -``` -$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -$ sudo cp kubectl /usr/local/bin/ && sudo chmod +x /usr/local/bin/kubectl -$ kubectl version --client -``` - -Output of above commands would be something like below, - -### Step 4) Download MiniKube Binary and Start Cluster - -After installing the kubectl, let’s download and install minikube binary using the following commands, - -``` -$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -$ sudo install minikube-linux-amd64 /usr/local/bin/minikube -``` - -Now start minikube cluster using the beneath command, - -``` -$ minikube start --driver docker -``` - -Output above confirms that minikube command has started the single node Kubernetes cluster using docker as driver. - -Run below minikube command to verify the status of your local Kubernetes cluster, - -``` -[[email protected] ~]$ minikube status -minikube -type: Control Plane -host: Running -kubelet: Running -apiserver: Running -kubeconfig: Configured -[[email protected] ~]$ -[[email protected] ~]$ minikube ip -192.168.49.2 -[[email protected] ~]$ -``` - -To stop stop the minikube cluster, execute, - -``` -$ minikube stop -``` - -Execute the “kubectl” commands to view cluster and node information - -``` -$ kubectl cluster-info -$ kubectl get nodes -``` - -### Step 5) Test and Verify Kubernetes Cluster - -To test Kubernetes cluster, let try to create k8s deployment using echo server image, it is equivalent to http web server and expose it as a service on port 8080, - -``` -[[email protected] ~]$ kubectl create deployment test-minikube --image=k8s.gcr.io/echoserver:1.10 -deployment.apps/test-minikube created -[[email protected] ~]$ -``` - -To access test-minikube deployment, expose it as service, run the following command, - -``` -[[email protected] ~]$ kubectl expose deployment test-minikube --type=NodePort --port=8080 -service/test-minikube exposed -[[email protected] ~]$ -``` - -Run below kubectl command to get deployment,pods and service  information for above created deployment, - -``` -$ kubectl get deployment,pods,svc -``` - -To access service, get its url by running the beneath command. - -``` -[[email protected] ~]$ minikube service test-minikube --url -http://192.168.49.2:32291 -[[email protected] ~]$ -[[email protected] ~]$ curl http://192.168.49.2:32291/ -``` - -Great, it means our Kubernetes cluster is working fine as we are able to access our sample application. - -##### Step 6) Enable MiniKube Addons - -Minikube offers addons which can add additional functionality to our clusters. To list all available addons run, - -``` -$ minikube addons list -``` - -Kubernetes ships with a dashboard that allows you to manage your cluster. In Minikube, dashboard has been added as an addons. So to enable it, run - -``` -$ minikube addons enable dashboard -``` - -Also to enable nginx ingress controller, run - -``` -$ minikube addons enable ingress -``` - -To access the dashboard, run - -``` -$ minikube dashbaord --url -``` - -This will start the dashboard in your systems’s web vrowser. - -And that’s just about it. We have managed to successfully install Kubernetes with Minikube on RHEL 8, Rocky Linux 8 or AlmaLinux 8. You are welcome to share your feedback and comments in below comments section. - -**Also Read**: How to Configure NFS based Persistent Volume in Kubernetes - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/ - -作者:[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/ diff --git a/translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md b/translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md new file mode 100644 index 0000000000..e34a7f5c2d --- /dev/null +++ b/translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md @@ -0,0 +1,229 @@ +[#]: subject: "How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8" +[#]: via: "https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 RHEL 8/Rocky Linux 8/AlmaLinux 8 上安装 MiniKube +====== + +在这篇文章中,我们将逐步介绍如何在 RHEL 8、Rocky Linux 8 或 AlmaLinux 8 上安装 minikube。 + +Minikube 是一个跨平台的开源工具,可以让你在本地机器上部署单节点 Kubernetes 集群。 + +Kubernetes,也被称为 k8sor 简称 Kube,是一个开源的容器编排平台,用于容器的自动化扩展和部署。Minikube 集群帮助开发人员和管理员在 minikube 集群中构建他们的测试环境。 + +##### MiniKube 的先决条件 + +- 最小安装的 RHEL 8 或 Rocky Linux 8 或 AlmaLinux 8 +- 本地配置的 RHEL 8 仓库或订阅 +- 至少 2GB RAM 和 2 个 vCPU +- 20GB 硬盘空间 +- 具有管理员身份的 Sudo 用户 +- 稳定的互联网连接 +- Docker 或虚拟机管理器,如 VirtualBox、KVM 和 VMware 等 + +在这篇文章中,我们将使用 docker 作为 minikube 的驱动程序。满足所有先决条件后,现在是时候卷起袖子动手了。 + +### 步骤 1)启用官方 Docker 仓库 + +要启用 docker 官方仓库,运行: + +``` +$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo +$ sudo dnf repolist +``` + +![][1] + +### 步骤 2)安装 Docker CE(社区版) + +运行以下 dnf 命令来安装 docker 及其依赖项: + +``` +$ sudo dnf install docker-ce docker-ce-cli containerd.io -y +``` + +output: + +![][2] + +安装 docker 后启动并启用它的服务,运行以下 systemctl 命令: + +``` +$ sudo systemctl start docker +$ sudo systemctl start docker +``` + +允许你的本地用户在没有 sudo 的情况下运行 docker 命令,运行: + +``` +$ sudo usermod -aG docker $USER +$ newgrp docker +``` + +### 步骤 3)安装 Kubectl 二进制文件 + +Kubectl 是一个命令行工具,它通过 API 与 Kubernetes 集群进行交互。使用 kubectl 我们将应用部署为 deployment。默认情况下,kubectl 不包含在 RHEL 8 、Rocky Linux 8 或 AlmaLinux 8 软件包仓库中。因此,我们将使用下面的命令手动安装它: + +``` +$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +$ sudo cp kubectl /usr/local/bin/ && sudo chmod +x /usr/local/bin/kubectl +$ kubectl version --client +``` + +以上命令的输出如下所示: + +![][3] + +### 步骤 4)下载 MiniKube 二进制文件并启动集群 + +安装 kubectl 后,让我们使用以下命令下载并安装 minikube 二进制文件: + +``` +$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 +$ sudo install minikube-linux-amd64 /usr/local/bin/minikube +``` + +现在使用下面的命令启动 minikube 集群: + +``` +$ minikube start --driver docker +``` + +![][4] + +上面的输出确认 minikube 命令已经使用 docker 作为驱动程序启动了单节点 Kubernetes 集群。 + +运行下面的 minikube 命令来验证本地 Kubernetes 集群的状态: + +``` +[[email protected] ~]$ minikube status +minikube +type: Control Plane +host: Running +kubelet: Running +apiserver: Running +kubeconfig: Configured +[[email protected] ~]$ +[[email protected] ~]$ minikube ip +192.168.49.2 +[[email protected] ~]$ +``` + +要停止 minikube 集群,请执行: + +``` +$ minikube stop +``` + +执行 “kubectl” 命令查看集群和节点信息: + +``` +$ kubectl cluster-info +$ kubectl get nodes +``` + +![][5] + +### 步骤 5)测试和验证 Kubernetes 集群 + +为了测试 Kubernetes 集群,让我们尝试使用 echo 服务器镜像创建 k8s 部署,它相当于 http web 服务器并将其作为服务暴露在端口 8080 上: + +``` +[[email protected] ~]$ kubectl create deployment test-minikube --image=k8s.gcr.io/echoserver:1.10 +deployment.apps/test-minikube created +[[email protected] ~]$ +``` + +要访问 test-minikube 部署,将其公开为服务,运行以下命令: + +``` +[[email protected] ~]$ kubectl expose deployment test-minikube --type=NodePort --port=8080 +service/test-minikube exposed +[[email protected] ~]$ +``` + +运行以下 kubectl 命令以获取上面创建的部署的 deployment、pods 和服务信息: + +``` +$ kubectl get deployment,pods,svc +``` + +![][6] + +要访问服务,请通过运行下面的命令获取其 url: + +``` +[[email protected] ~]$ minikube service test-minikube --url +http://192.168.49.2:32291 +[[email protected] ~]$ +[[email protected] ~]$ curl http://192.168.49.2:32291/ +``` + +![][7] + +太好了,这意味着我们的 Kubernetes 集群工作正常,因为我们能够访问我们的示例应用。 + +##### 步骤 6)启用 MiniKube 插件 + +Minikube 提供插件,可以为我们的集群添加额外的功能。要列出所有可用的插件,运行: + +``` +$ minikube addons list +``` + +![][8] + +Kubernetes 附带一个仪表板,可让你管理集群。在 Minikube 中,仪表板已作为插件添加。所以要启用它,运行: + +``` +$ minikube addons enable dashboard +``` + +还要启用 nginx 入口控制器,运行: + +``` +$ minikube addons enable ingress +``` + +![][9] + +要访问仪表板,运行: + +``` +$ minikube dashbaord --url +``` + +这将在你系统的浏览器中启动仪表板。 + +![][10] + +就是这些了。我们已经成功地在 RHEL 8、Rocky Linux 8 或 AlmaLinux 8 上使用 Minikube 安装 Kubernetes。欢迎你在下面的评论部分分享你的反馈和意见。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/ + +作者:[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/2020/04/Enable-Docker-Repo-RHEL8-Rocky-Linux8-1024x203.png?ezimgfmt=ng:webp/ngcb22 +[2]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Install-Docker-DNF-Command-RHEL8-RockyLinux8.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Download-Kubectl-Binary-RHEL8-RockyLinux8.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Start-Minikube-Cluster-RHEL8-Rocky-Linux8.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2020/04/K8s-cluster-info-RHEL8-RockyLinux9-1024x193.png?ezimgfmt=ng:webp/ngcb22 +[6]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Kubectl-get-pods-deplyments-service-rhel8-rocky-linux8.png?ezimgfmt=ng:webp/ngcb22 +[7]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Access-Application-minikube-rhel8-rockylinux8.png?ezimgfmt=ng:webp/ngcb22 +[8]: https://www.linuxtechi.com/wp-content/uploads/2020/04/minikube-addons-list-rhel8-rockylinux8.png?ezimgfmt=ng:webp/ngcb22 +[9]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Enable-Minikube-addons-RHEL8-RockyLinux9-1024x381.png?ezimgfmt=ng:webp/ngcb22 +[10]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Kubernetes-Dashboard-MiniKube-Dashboard.png?ezimgfmt=ng:webp/ngcb22 \ No newline at end of file From 3f0071b7424f84d6a0385d05ebc1518f3a36dfae Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Mar 2023 08:36:57 +0800 Subject: [PATCH 078/318] translating --- ...️ Postgres DevOps database administrator A day in the life.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md b/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md index 20fc52b725..916db54a10 100644 --- a/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md +++ b/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/postgres-devops-dba" [#]: author: "Doug Ortiz https://opensource.com/users/dougortiz" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 5a0a054c60a0dced7d56ab526f33b55ce2dd492c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Mar 2023 09:13:28 +0800 Subject: [PATCH 079/318] RP @lxbwolf https://linux.cn/article-15627-1.html --- ...s Guide to R Markdown Syntax [With Cheat Sheet].md | 164 ++++++------------ 1 file changed, 51 insertions(+), 113 deletions(-) rename {translated/tech => published}/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md (59%) diff --git a/translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md b/published/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md similarity index 59% rename from translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md rename to published/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md index 9eee713699..3d78b3c4a9 100644 --- a/translated/tech/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md +++ b/published/20230216.1 ⭐️⭐️ Beginner's Guide to R Markdown Syntax [With Cheat Sheet].md @@ -3,124 +3,73 @@ [#]: author: "Sreenath https://itsfoss.com/author/sreenath/" [#]: collector: "lkxed" [#]: translator: "lxbwolf" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15627-1.html" -R Markdown 语法新手指南[备忘录] +R Markdown 语法新手指南 ====== +![][0] + 你可能已经了解过轻量级标记语言 Markdown。如果你是第一次接触这个概念,请参考我们的 [Markdown 指南][1]。概括来讲,它是一种用于创建纯文本文档的简单又高效的语言。 然而,Markdown 在制作详细的报告或技术文件方面可能还不够完善。 -受益于[knitr][2]和[Pandoc][3]等软件包,**交互式文件格式 R Markdown** 早在 2014 年就出现了。它将纯文本与内嵌的 R 代码相结合,可以制作动态文件。 +受益于 [knitr][2] 和 Pandoc 等软件包,**交互式文件格式 R Markdown** 早在 2014 年就出现了。它将纯文本与内嵌的 R 代码相结合,可以制作动态文件。 -你可以使用 [各种 IDE][4] 和扩展来创建 R Markdown 文档,官方 IDE 为**RStudio**。因此,在这篇文章中,我们将重点介绍**使用 RStudio 学习 R Markdown语法**。 +你可以使用 [各种 IDE][4] 和扩展来创建 R Markdown 文档,官方 IDE 为 **RStudio**。因此,在这篇文章中,我们将重点介绍**使用 RStudio 学习 R Markdown 语法**。 -💡 - -(假如你没有了解过,)**R 编程语言** 是一种用于统计计算、图形表示和报告的语言。 - -**推荐阅读 📖** - -是一种用于统计计算、图形表示和报告的语言。 - -**建议阅读 📖** - -如何在 Ubuntu 上安装和使用 R。 -概要:本教程教你如何在 Ubuntu上安装 R。你还将学习在 Ubuntu 上运行你的第一个 R 程序的各种方法。R 和 Python 都是最常用的统计计算和图形的编程语言,能让数据处理变得简单。 -![][5] -![][6] +> 💡(假如你没有了解过,)**R 编程语言** 是一种用于统计计算、图形表示和报告的语言。 ### 配置 RStudio -通过合适的配置,你可以很轻松地用 RStudio 来编写 R Markdown。当你安装完一个软件包后,就已经完成了大部分的工作! +通过合适的配置,你可以很轻松地用 RStudio 来编写 R Markdown。只需要安装一个软件包,就已经完成了大部分的工作! -安装 RStudio 后,在**工具**菜单中选择_安装软件包_选项。 +安装 RStudio 后,在 “工具Tools” 菜单中选择 “安装软件包Install Packages” 选项。 -![在 RStudio 的工具菜单下选择安装软件包选项][7] 。 +![在 RStudio 的工具菜单下选择安装软件包选项][7] -在弹出的对话框中,搜索 rmarkdown 并安装。 +在弹出的对话框中,搜索 “rmarkdown” 并安装。 ![通过搜索并在新的软件包安装对话框中按下安装按钮来安装 Rmarkdown 软件包][8] -💡 +>💡 如果你想使用类似 Python 的代码块,你需要安装额外的包。当你想在你的文档中包含这些包时,RStudio 会提示你安装所需的包。 -如果你想使用类似 python 的代码块,你需要安装额外的包。当你想在你的文档中包含这些包时,RStudio 会提示你安装所需的包。 +安装完成后,你可以通过选择 “文件File > 新建文件New File > R Markdown” 来新建一个 R Markdown 文档。 -安装完成后,你可以通过选择**文件>新建>RMarkdown** 来新建一个 rmarkdown 文档。 - -![从文件菜单中创建一个新的 RMarkdown 文档][9] 。 +![从文件菜单中创建一个新的 RMarkdown 文档][9] 之后会提示你添加一些关于文件的信息(文件的元数据),把这些填上就可以了。 -![用 rmarkdown 语法写出标题和其他细节][10] +![用 R Markdown 语法写出标题和其他细节][10] 或者你可以创建一个空的文件从零开始。 ### RMarkdown 语法 -由于它是"加强版的 Markdown",因此大多数语法与 markdown 是一样的。 +由于它是 “加强版的 Markdown”,因此大多数语法与 Markdown 是一样的。 它还有一些 Markdown 支持不完善的东西,比如**表格、数学方程式、代码块等等**。 -下面是我们要介绍的内容的概括。 +下面是我们要介绍的内容的概括: + +| RMarkdown 块名 | 语法 | +| - | - | +| 标题 | `# 一级标题`
`## 二级标题`
`### 三级标题`
`一级标题`
`=======`
`二级标题`
`-------` | +| 着重 | `*斜体*`
`_斜体_`
`**加粗**`
`__加粗__` | +| 列表 | 无序列表:
`* 列表项`
`* 列表项`
` + 子项`
` + 子项`
有序列表:
`1. 列表项`
`2. 列表项`
` + 子项`
` + 子项` | +| 代码块 | 普通代码块:
\`\`\`
`这里写代码`
\`\`\`
R 代码块:
\`\`\`{r}
`R 代码`
\`\`\`
你也可以用其他的语言
行内 \`代码\` | +| 链接 | 普通链接:粘贴 URL
带标题的链接:`[显示的文本](URL_地址)`
跳转到锚点: `[显示的文本](#锚点)` | +| 表格 | `| 列名 | 列名 | 列名 |`
`| ------ | ------ | ------ |`
`| 项内容 | 项内容 | 项内容 |`
`| 项内容 | 项内容 | 项内容 |` | +| 方程式 | 行内方程式 `$Equations$`
展示方程式: `$$Equations$$` | +| 图片 | 无标题: `![](图片链接)`
有标题:`![可选标题](图片地址)` | +| 引用块 | `> 输入你引用的内容` | +| 其他 | 上角标:`文本内容^上角标^`
章或页水平分割线
`=========` 或 `----------`
行尾输入两个以上空格,即可添加人工行分割 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RMarkdown 块名语法
标题# 一级标题
## 二级标题
### 三级标题

一级标题
=======

二级标题
-------
着重*斜体*
_斜体_

**加粗**

__加粗__
列表无序列表
* 列表项
* 列表项
+ 子项
+ 子项

有序列表
1. 列表项
2. 列表项
+ 子项
+ 子项
代码块普通代码块

```
这里写代码
```

R 代码块

```{r}
R 代码
```
你也可以用其他的语言


行内 `代码`
链接纯文本:粘贴 URL
带标题的链接:[显示的文本](URL_地址)
跳转到锚点[显示的文本](#锚点)
表格| 列名 | 列名 | 列名 |
| ------ | ------ | ------ |
| 项内容 | 项内容 | 项内容 |
| 项内容 | 项内容 | 项内容 |
方程式行内方程式 \$Equations\$

展示方程式: \$\$Equations\$\$
图片无标题: ![](图片链接)

有标题: ![可选标题](图片地址)
引用块> 输入你引用的内容
其他上角标:文本内容^上角标^

章或页水平分割线

========= 或 ----------

行尾输入两个以上空格,即可添加人工行分割
- #### YAML 头 -在一个 R Markdown 文档的顶部,有一个 YAML 头,被两行 `------` 包围。这个块定义了文档的最终样式,通常包含一个标题、作者、日期和你想输出的文件类型。 +在一个 R Markdown 文档的顶部,有一个 YAML 头,被两行 `---` 包围。这个块定义了文档的最终样式,通常包含一个标题、作者、日期和你想输出的文件类型。 支持的文件格式有三种:**HTML、PDF 和 Word**。 @@ -184,12 +133,6 @@ output: pdf_document ![有序和无序列表示例][12] -**推荐阅读 📖** - -在 Linux 终端用 Glow 阅读和组织 Markdown 文件。Glow 是一个 CLI 工具,能在 Linux 终端渲染 Markdown 文件。你还可以用它来组织 Markdown 文件。 -![][13] -![][14] - #### 段落中的文本格式 格式化文本有几种方式。 @@ -209,7 +152,7 @@ _这里是斜体内容_ __这里是加粗内容__ ``` -你可以阅读我们的文章 [Markdown 中怎么让内容变成加粗和斜体][16] 来了解更多内容. +> 📋 你可以阅读我们的文章 [Markdown 中怎么让内容变成加粗和斜体][16] 来了解更多内容。 如果你想使用上角标,在想变成上角标的内容前后加上 `^` 符号。 @@ -227,9 +170,9 @@ __这里是加粗内容__ #### 添加代码块 -内嵌代码 是 R Markdown 最主要的设计目的。我们有几种添加代码的方式。 +内嵌代码是 R Markdown 最主要的设计目的。我们有几种添加代码的方式。 -**添加普通代码块** +##### 添加普通代码块 如果你想添加一个代码块来与其他的文本进行区分,可以使用下面的语法: @@ -240,15 +183,15 @@ __这里是加粗内容__ ```` -你也可以尝试 [对添加的代码进行高亮显示][18]. +你也可以尝试 [对添加的代码进行高亮显示][18]。 如果你想添加代码并将其输出嵌入到文档中,你可以在后面加上语言,并用大括号包裹: - +```` ```{语言} 这里输入你的代码 ``` - +```` 你可以用 ` 符号来添加行内代码。 @@ -275,6 +218,7 @@ https://itsfoss.com ``` 当你想链接到本页内的某个锚点时,使用下面的语法: + ``` [文本内容](#锚点名称) ``` @@ -283,10 +227,10 @@ https://itsfoss.com #### 表格 -表格的语法与 markdown 相似: +表格的语法与 Markdown 相似: ``` -|列表|列表|列表| +| 列表 | 列表 | 列表 | | --- | --- | --- | |表格项|表格项|表格项| |表格项|表格项|表格项| @@ -294,11 +238,7 @@ https://itsfoss.com ![][21] -📋 - -还想了解更多?请阅读我们的 [用 Markdown 创建表格][22] 指南。 - -. +> 📋 还想了解更多?请阅读我们的 [用 Markdown 创建表格][22] 指南。 #### 图片 @@ -306,9 +246,11 @@ https://itsfoss.com ``` ![](http://example.com/logo.png) +``` 或 +``` ![可选显示文本](figures/img.png) ``` @@ -316,7 +258,7 @@ https://itsfoss.com #### 块引用 -RMarkdown 可以添加块引用。在被引用的行或段落前添加 **>(大于号)**。 +RMarkdown 可以添加块引用。在被引用的行或段落前添加 `>`(大于号)。 ``` 这里是普通文本内容。 @@ -326,7 +268,7 @@ RMarkdown 可以添加块引用。在被引用的行或段落前添加 **>(大 ![][24] -如果你想了解更多块引用的内容,请阅读我们的 [Markdown 引用][25] 指南。 +> 📋 如果你想了解更多块引用的内容,请阅读我们的 [Markdown 引用][25] 指南。 #### 方程式 @@ -335,7 +277,7 @@ RMarkdown 可以添加块引用。在被引用的行或段落前添加 **>(大 例如: ``` -行内毕达哥拉斯定理: $Equation$ +行内方程式:$Equation$ 展示方程式:$$Equation$$ ``` @@ -354,15 +296,11 @@ RMarkdown 可以添加块引用。在被引用的行或段落前添加 **>(大 你可以在行尾添加两个以上的空格来添加人工行分割。 -### 总结 - ### R Markdown 非常有用(备忘录) - - ![][27] -[R Markdown 备忘录.pdf 下载文档][28] +> **[R Markdown 备忘录.pdf 下载文档][28]** _💬 你还知道其他关于 R Markdown 的内容吗?请在下面的评论区告诉我们。_ @@ -373,7 +311,7 @@ via: https://itsfoss.com/r-markdown/ 作者:[Sreenath][a] 选题:[lkxed][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -381,7 +319,6 @@ via: https://itsfoss.com/r-markdown/ [b]: https://github.com/lkxed/ [1]: https://itsfoss.com/markdown-guide/ [2]: https://www.r-project.org/nosvn/pandoc/knitr.html -[3]: https://itsfoss.comknitr, and Pandoc [4]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ [5]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png [6]: https://itsfoss.com/content/images/wordpress/2019/06/install-r-on-ubuntu.jpg @@ -407,3 +344,4 @@ via: https://itsfoss.com/r-markdown/ [26]: https://itsfoss.com/content/images/2023/02/equations.png [27]: https://itsfoss.com/content/images/2023/02/R-Markdown-Cheat-Sheet.webp [28]: https://itsfoss.com/content/files/2023/02/R-Markdown-Cheat-Sheet.pdf +[0]: https://img.linux.net.cn/data/attachment/album/202303/15/090943m64sk4k496l4f99q.jpg \ No newline at end of file From 560fbb65f460d83715203bd68f6b4603d494a7a1 Mon Sep 17 00:00:00 2001 From: insidentally Date: Wed, 15 Mar 2023 09:45:12 +0800 Subject: [PATCH 080/318] =?UTF-8?q?=E8=BF=99=E7=AF=87=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=AF=B9=E6=88=91=E6=9D=A5=E8=AF=B4=E7=9B=B8=E5=BD=93=E9=9A=BE?= =?UTF-8?q?=EF=BC=8C=E7=BF=BB=E8=AF=91=E5=8F=AF=E8=83=BD=E4=B8=8D=E5=87=86?= =?UTF-8?q?=E7=A1=AE=E2=80=A6=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这篇文章对我来说相当难,翻译可能不准确……,需要批评指正。 --- ...ntist's guide to open source community analysis.md | 201 ------------------ ...ntist's guide to open source community analysis.md | 201 ++++++++++++++++++ 2 files changed, 201 insertions(+), 201 deletions(-) delete mode 100644 sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md create mode 100644 translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md diff --git a/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md b/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md deleted file mode 100644 index 16e9df7793..0000000000 --- a/sources/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: subject: "A data scientist's guide to open source community analysis" -[#]: via: "https://opensource.com/article/22/12/data-scientists-guide-open-source-community-analysis" -[#]: author: "Cali Dolfi https://opensource.com/users/cdolfi" -[#]: collector: "lkxed" -[#]: translator: "Chao-zhi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -A data scientist's guide to open source community analysis -====== - -In the golden age of data analysis, open source communities are not exempt from the frenzy around getting some big, fancy numbers onto presentation slides. Such information can bring even more value if you master the art of generating a well-analyzed question with proper execution. - -You might expect me, a [data scientist][1], to tell you that data analysis and automation will inform your community decisions. It's actually the opposite. Use data analysis to build on your existing open source community knowledge, incorporate others, and uncover potential biases and perspectives not considered. You might be an expert at implementing community events, while your colleague is a wiz at all things code. As each of you develops visualizations within the context of your own knowledge, you both can benefit from that information. - -Let's have a moment of realness. Everyone has a thousand and one things to keep up with, and it feels like there is never enough time in a day to do so. If getting an answer about your community takes hours, you won't do it regularly (or ever). Spending the time to create a fully developed visualization makes it feasible to keep up with different aspects of the communities you care about. - -With the ever-increasing pressure of being "data-driven," the treasure trove of information around open source communities can be a blessing and a curse. Using the methodology below, I will show you how to pick the needle out of the data haystack. - -### What is your perspective? - -When thinking about a metric, one of the first things you must consider is the perspective you want to provide. The following are a few concepts you could establish. - -**Informative vs. influencing action:** Is there an area of your community that is not understood? Are you taking that first step in getting there? Are you trying to decide on a particular direction? Are you measuring an existing initiative? - -**Exposing areas of improvement vs. highlighting strengths:** There are times when you are trying to hype up your community and show how great it is, especially when trying to demonstrate business impact or advocate for your project. When it comes to informing yourself and the community, you can often get the most value from your metrics by identifying shortcomings. Highlighting strengths is not a bad practice, but there is a time and place. Don't use metrics as a cheerleader inside your community to tell you how great everyone is; instead, share that with outsiders for recognition or promotion. - -**Community and business impact:** Numbers and data are the languages of many businesses. That can make it incredibly difficult to advocate for your community and truly show its value. Data can be a way to speak in their language and show what they want to see to get the rest of your messaging across. Another perspective is the impact on open source overall. How does your community impact others and the ecosystem? - -These are not always either/or perspectives. Proper framing will help in creating a more deliberate metric. - -![Data science and machine learning workflow][2] - -People often describe some version of this workflow when talking about general data science or machine learning work. I will focus on the first step, codifying problems and metrics, and briefly mention the second. From a data science perspective, this presentation can be considered a case study of this step. This step is sometimes overlooked, but your analysis's actual value starts here. You don't just wake up one day and know exactly what to look at. Begin with understanding what you want to know and what data you have to get you to the true goal of thoughtful execution of data analysis. - -### 3 data analysis use cases in open source - -Here are three different scenarios you might run into in your open source data analysis journey. - -#### Scenario 1: Current data analysis - -Suppose you are starting to go down the analysis path, and you already know what you're looking into is generally useful to you/your community. How can you improve? The idea here is to build off "traditional" open source community analysis. Suppose your data indicates you have had 120 total contributors over the project's lifetime. That's a value you can put on a slide, but you can't make decisions from it. Start taking incremental steps from just having a number to having insights. For example, you can break out the sample of total contributors into active versus drifting contributors (contributors who have not contributed in a set amount of time) from the same data. - -#### Scenario 2: Community campaign impact measurement - -![Goals and impacts][3] - -Consider meetups, conferences, or any community outreach initiative. How do you view your impacts and goals? These two steps actually feed into each other. Once you establish the campaign goals, determine what can be measured to detect the effect. That information helps set the campaign's goals. It's easy to fall into the trap of being vague rather than concrete with plans when a campaign begins. - -#### Scenario 3: Form new analysis areas to impact - -![New analysis areas][4] - -This situation occurs when you work from scratch in data analysis. The previous examples are different parts of this workflow. The workflow is a living cycle; you can always make improvements or extensions. From this concept, the following are the necessary steps you should work through. Later in this article, there will be three different examples of how this approach works in the real world. - -#### Step 1: Break down focus areas and perspectives - -First, consider a magic eight ball—the toy you can ask anything, shake, and get an answer. Think about your analysis area. If you could get any answer immediately, what would it be? - -Next, think about the data. From your magic eight-ball question, what data sources could have anything to do with the question or focus area? - -What questions could be answered in the data context to move you closer to your proposed magic eight-ball question? It's important to note that you must consider the assumptions made if you try to bring all the data together. - -#### Step 2: Convert a question to a metric - -Here is the process for each sub-question from the first step: - -- Select the specific data points needed. -- Determine visualization to get the goal analysis. -- Hypothesize the impacts of this information. - -Next, bring in the community to provide feedback and trigger an iterative development process. The collaborative portion of this can be where the real magic happens. The best ideas often come when bringing a concept to someone that inspires them in a way you or they would not have imagined. - -#### Step 3: Analysis in action - -This step is where you start working through the implications of the metric or visualization you have created. - -The first thing to consider is if this metric follows what is currently known about the community. - -- If **yes**: Are there assumptions made that catered to the results? -- If **no**: You want to investigate further whether this is potentially a data or calculation issue or if it is just a previously misunderstood part of the community. - -Once you have determined if your analysis is stable enough to make inferences on, you can start to implement community initiatives on the information. As you are taking in the analysis to determine the next best step, you should identify specific ways to measure the initiative's success. - -Now, observe these community initiatives informed by your metric. Determine if the impact is observable by your priorly established measurement of success. If not, consider the following: - -- Are you measuring the right thing? -- Does the initiative strategy need to change? - -### Example analysis area: New contributors - -#### What is my magic eight-ball question? - -- Do people have an experience that establishes them as consistent contributors? - -#### What data do I have that goes into the analysis area and magic eight-ball question? - -- What contributor activity exists for repos, including timestamps? - -Now that you have the information and a magic eight-ball question, break the analysis down into subparts and follow each of them to the end. This idea correlates with steps 2 and 3 above. - -**Sub-question 1:** "How are people coming into this project?" - -This question aims to see what new contributors are doing first. - -**Data:** GitHub data on first contributions over time (issues, PR, comments, etc.). - -![Chart of first time contributions per quarter][5] - -**Visualization:** Bar chart with first-time contributions broken down by quarter. - -**Potential extension:** After you talk with other community members, further examination breaks the information down by quarter and whether the contributor was a repeat or drive-by. You can see what people are doing when they come in and if that tells you anything about whether they will stick around. - -![Chart of drive-by contributions per quarter][6] - -**Potential actions informed by this information:** - -- Does the current documentation support contributors for the most common initial contribution? Could you support those contributors better, and would that help more of them stay? -- Is there a contribution area that is not common overall but is a good sign for a repeat contributor? Perhaps PR is a common area for repeat contributors, but most people don't work in that area. - -**Action items:** - -- Label "good first issues" consistently and link these issues to the contribution docs. -- Add a PR buddy to these. - -**Sub-question 2:** "Is our code base really dependent on drive-by contributors?" - -**Data:** Contribution data from GitHub. - -![Chart of contributor types over time][7] - -**Visualization:** "Total contributions: Broken down by contributions by drive-by and repeat contributor." - -**Potential actions informed by this information:** - -- Does this ratio achieve the program's goals? Is a lot of the work done by drive-by contributors? Is this an underutilized resource, and is the project not doing its part to bring them in? - -### Analysis: Lessons learned - -Number and data analysis are not "facts." They can say anything, and your internal skeptic should be very active when working with data. The iterative process is what will bring value. You don't want your analysis to be a "yes man." Take time to take a step back and evaluate the assumptions you've made. - -If a metric just points you in a direction to investigate, that is a huge win. You can't look at or think of everything. Rabbit holes can be a good thing, and conversation starters can bring you to a new place. - -Sometimes exactly what you want to measure is not there, but you might be able to get valuable details. You can't assume that you have all the puzzle pieces to get an exact answer to your original question. If you start to force an answer or solution, you can take yourself down a dangerous path led by assumptions. Leaving room for the direction or goal of analysis to change can lead you to a better place or insight than your original idea. - -Data is a tool. It is not the answer, but it can bring together insights and information that would not have been accessible otherwise. The methodology of breaking down what you want to know into manageable chunks and building on that is the most important part. - -Open source data analysis is a great example of the care you must take with all data science: - -- The nuance of the topic area is the most important. -- The process of working through "what to ask/answer" is often overlooked. -- Knowing what to ask can be the hardest part, and when you come up with something insightful and innovative, it's much more than whatever tool you choose. - -If you are a community member with no data science experience looking at where to start, I hope this information shows you how important and valuable you can be to this process. You bring the insights and perspectives of the community. If you are a data scientist or someone implementing the metrics or visualizations, you have to listen to the voices around you, even if you are also an active community member. More information on data science is listed at the end of this article. - -### Wrap up - -Use the above example as a framework for establishing data analysis of your own open source project. There are many questions to ask of your results, and knowing both the questions and their answers can lead your project in an exciting and fruitful direction. - -#### More on data science - -Consider the following sources for more information on data science and the technologies that provide it with data: - -- [What is data science?][8] -- [What is Python?][9] -- [How to become a data scientist][10] -- [Data scientist: A day in the life][11] -- [What is big data?][12] -- [Whitepaper: Data-intensive intelligent applications in a hybrid cloud blueprint][13] -- [MariaDB and MySQL cheat sheet][14] -- [Latest data science articles][15] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/12/data-scientists-guide-open-source-community-analysis - -作者:[Cali Dolfi][a] -选题:[lkxed][b] -译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cdolfi -[b]: https://github.com/lkxed -[1]: https://enterprisersproject.com/article/2022/9/data-scientist-day-life?intcmp=7013a000002qLH8AAM -[2]: https://opensource.com/sites/default/files/2022-11/datascience-machinelearning-workflow.jpg -[3]: https://opensource.com/sites/default/files/2022-11/goals-impact.png -[4]: https://opensource.com/sites/default/files/2022-11/new-analysis-areas.png -[5]: https://opensource.com/sites/default/files/2022-11/first-time-contributions-per-quarter.png -[6]: https://opensource.com/sites/default/files/2022-11/driveby-contributions-per-quarter.png -[7]: https://opensource.com/sites/default/files/2022-11/contributor-types-over-time.png -[8]: https://opensource.com/resources/data-science?intcmp=7013a000002CxqkAAC -[9]: https://opensource.com/resources/python?intcmp=7013a000002CxqkAAC -[10]: https://opensource.com/article/17/9/data-scientist?intcmp=7013a000002CxqkAAC -[11]: https://enterprisersproject.com/article/2022/9/data-scientist-day-life?intcmp=7013a000002CxqkAAC -[12]: https://opensource.com/resources/big-data?intcmp=7013a000002CxqkAAC -[13]: https://www.redhat.com/en/resources/data-intensive-applications-hybrid-cloud-blueprint-detail?intcmp=7013a000002CxqkAAC -[14]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet?intcmp=7013a000002CxqkAAC -[15]: https://opensource.com/tags/data-science?intcmp=7013a000002CxqkAAC diff --git a/translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md b/translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md new file mode 100644 index 0000000000..9fca276fe8 --- /dev/null +++ b/translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md @@ -0,0 +1,201 @@ +[#]: subject: "A data scientist's guide to open source community analysis" +[#]: via: "https://opensource.com/article/22/12/data-scientists-guide-open-source-community-analysis" +[#]: author: "Cali Dolfi https://opensource.com/users/cdolfi" +[#]: collector: "lkxed" +[#]: translator: "Chao-zhi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +数据科学家的开源社区分析指南 +====== + +在数据分析的黄金时代,开源社区也不能免俗。大家都热衷于将一些华丽的数字放到演示幻灯片上,但如果你掌握了正确的分析方法,这些信息可以为你带来更大的价值。 + +或许你认为作为一名[数据科学家][1],我会告诉你数据分析和自动化能为你的社区决策提供信息。但实际上,情况恰恰相反。利用数据分析来建立你现有的开源社区知识,吸收其他的知识,并发现潜在的偏见和没有考虑的观点。你或许是实施社区活动的专家,而你那些同事则是代码方面的专家。当你们每个人都在自己的知识背景下开发可视化时,你们都可以从这些信息中受益。 + +让我们来面对现实吧。每个人都有一千零一件事情要做,而且总感觉一天的时间永远不够用。如果要得到关于你的社区的答案需要几个小时,你就不可能有足够的精力去解决这些事情。但是,花时间创建一个全面发展的可视化项目,可以帮助你时刻掌握你所关心的社区的不同方面,这就将你从精疲力尽中解放了出来。 + +随着“数据驱动”思维的盛行,围绕开源社区的信息宝库可能是一种祝福,也可能是一种诅咒。下面我将分享一些方法,告诉你如何从数据干草堆中挑出有价值的信息。 + +### 你的预期是什么? + +当考虑一个指标时,首先要明确你的目的和需求。以下是几个可能涉及的概念: + +**告知性和影响性的行动:** 你的社区是否存在某个领域尚未被理解?你是否已迈出第一步?你是否试图确定特定方向?你是否正在衡量现有倡议的效果? + +**暴露需要改进的领域和突出优势:** 有时你想宣传你的社区,突出它的优势,特别是在试图证明商业影响或为项目宣传时。然而,当涉及到向社区内部传递信息时,你通常需要从一堆指标中精准的找到你们的缺点,以此来帮助你们改进。虽然突出优点并非不可取,但需要在适当的时间和地点。不要把优势指标作为社区内部的拉拉队,告诉每个人都有多棒,而是要与外界分享,以获得认可或推广。 + +**社区和商业影响:** 数字和数据是许多企业的语言。但是这可能使得为你的社区进行宣传并真正展示其价值变得异常困难。数据可以成为用他们的语言说话的一种方式,并展示他们想看到的东西,以使你数据背后的潜在含义能够被有效转达。另一个角度是对开源的整体影响。你的社区是如何影响他人和生态系统的? + +这些观点并非非此即彼,而是相互关联的。适当的框架将有助于创造一个更深思熟虑的衡量标准。 + +![数据科学和机器学习的工作流程][2] + +当人们谈论通用的数据科学或机器学习工作时,通常会描述这样的工作流程。我将重点关注第一步,即编写问题和度量标准,并简要提及第二步。从数据科学的角度来看,这个演示可以被视为这个步骤的一个案例研究。这一步有时会被忽视,但你的分析的实际价值始于此。你不能一天醒来就知道要看什么。从理解你想知道什么和你所拥有的数据开始,逐步实现更加深度的数据分析。 + +### 3个开源数据分析用例 + +以下是您在开源数据分析过程中可能遇到的三种不同场景。 + +#### 场景 1:现有数据分析 + +假设你开始进行分析,并且已经知道你将要研究的内容对你或你的社区是有用的。那么你该如何提高分析的价值呢?这里的想法是建立在“传统”的开源社区分析基础之上。假设你的数据表明,在项目的整个生命周期内,你共有 120 个贡献者。这是你可以放在幻灯片上的价值,但你不能从中做出决策。从仅有一个数字到获得洞见,逐步采取措施。例如,你可以从相同的数据中将贡献者分为活跃和流失的贡献者(那些已经有一段时间没有做出贡献的贡献者),以获得更深入的了解。 + +#### 场景 2:社区活动影响测量 + +![目标和影响][3] + +考虑聚会、会议或其他任何社区外联活动。你如何看待你的影响力和目标?这两个步骤实际上互相影响。一旦你确定了活动的目标,就要确定可以用什么来检测效果。这些信息有助于设定活动的目标。在活动开始时,很容易陷入模糊的计划而非具体的计划的陷阱中。 + +#### 场景3:形成新的影响分析区 + +![新的分析区][4] + +当你从头开始进行数据分析时,就会出现这种情况。前面的例子是这个工作流程的不同部分。这个工作流程是一个不断发展的循环;你可以随时进行改进或扩展。基于这个概念,以下是你应该经历的必要步骤。在本文的后面,将会有三个不同的例子,展示这种方法在现实世界中的应用。 + +#### 第一步:分解关注区和视角 + +首先,想象一下魔法 8 球——你可以问任何问题,摇一摇,就能得到答案的玩具。考虑你的分析区。如果你能立即得到任何答案,那会是什么? + +接下来,考虑数据。从你的魔法 8 球问题中,哪些数据源可能与问题或关注领域有关? + +在数据背景下,哪些问题可以被回答,让你更接近你提出的魔法 8 球问题?需要注意的是,如果你试图将所有的数据汇集在一起,你必须考虑到所做出的假设。 + +#### 第二步:将问题转化为度量标准 + +以下是第一步中每个子问题的处理过程: + +- 选择所需的具体数据点。 +- 确定可视化以实现目标分析。 +- 假设这些信息的影响。 + +接下来,引入社区提供反馈并触发迭代开发过程。这个协作部分可能就是真正的魔力所在。最好的想法通常是在将一个概念带给某个人时产生的,会激发他们的灵感,这是你或他们无法想象的。 + +#### 第三步:分析实践 + +这一步是你开始处理你所创建的度量标准或可视化的影响的地方。 + +首先要考虑的是,这个度量标准是否符合当前对社区的了解。 + +- 如果**是**:是否有假设得出的结果? +- 如果**不是**:你需要进一步调查,是否这是一个潜在的数据或计算问题,或者只是先前被误解的社区的一部分。 + +一旦你确定你的分析足够稳定,可以开始在信息上实施社区倡议。当你正在进行分析以确定下一步最佳步骤时,你应该确定衡量倡议成功的具体方法。 + +现在,观察这些由你的度量标准提供信息的社区倡议。确定是否可以用你之前建立的成功衡量指标观察到影响。如果没有,可以考虑以下几点: + +- 你是否在衡量正确的事情? +- 倡议战略是否需要调整? + +### 分析区的例子:新贡献者 + +#### 魔法 8 球问题是什么? + +- 如何分析哪些人为持续的贡献者? + +#### 我有什么数据可以纳入分析区和魔法 8 球问题? + +- 仓库存在哪些贡献者的活动,包括时间戳? + +现在你有了这些信息和一个魔法 8 球问题,把分析分成几个子部分执行。这个想法与上述步骤 2 和 3 相关。 + +**子问题 1:** “人们是怎么进入这个项目的” + +这个问题的目的是先看看新的贡献者在做什么。 + +**数据:** GitHub上的首次贡献随时间推移的数据(问题、PR、评论等)。 + +![每季度首次贡献图表][5] + +**可视化:** 按季度划分的首次贡献条形图。 + +**潜在的意义:** 在你与其他社区成员交谈后,进一步检查按季度细分的信息,以及贡献者是否为重复贡献者或仅仅是路过。你可以看到人们进来的时候在做什么,以及这是否能告诉你他们是否会留下来。 + +![每季度路过贡献图标][6] + +**从这些信息中了解到的可以采取的行动。** + +- 目前的文档是否能够帮助到最常见的新手?你能不能更好地帮助和支持新人朋友,这将有助于他们中更多的人留下来? +- 是否有一个贡献领域在整体上并不常见,但重复贡献者却集中在这个区域?也许 PR 是重复贡献者的一个常见区域,但大多数人却不在这个区域工作。 + +**行动项目:** + +- 给 "好的第一个问题 "贴上一致的标签,并将这些问题链接到贡献文档中。 +- 在这些问题上添加一个 PR 伙伴。 + +**子问题 2:** "我们的代码库真的依赖于路过的贡献者吗?" + +**数据:** GitHub 的贡献数据。 + +![贡献者类型随时间变化的图表][7] + +**可视化:** "贡献总额:按路过和重复贡献者的贡献进行细分。" + +**根据这一信息可能采取的行动。** + +- 这个比例是否达到了项目的目标?很多工作都是由路过贡献者完成的吗?这是否是一种未被充分利用的资源,项目是否没有尽到自己的责任来吸引他们? + +### 分析:吸取教训 + +数字和数据分析并不是“事实”,它们可以支持任何观点。因此,在处理数据时,内部怀疑者应该非常积极,并进行反复迭代,以带来真正的价值。你不希望你的分析只是一个“yes man”,因此花点时间退一步,评估你所做的假设。 + +如果一个指标只是指出了调查的方向,那也是一个巨大的胜利。你不可能看清或想到所有的事情,兔子洞可以是一个好事,对话的起点可以把你带到一个新的地方。 + +有时,你想测量的东西恰恰不在那里,但你也许能得到有价值的细节。不要假设你有所有的拼图碎片来获得你最初问题的准确答案。如果你开始强迫一个答案或解决方案,你会把自己带入一条由假设引领的危险道路。为分析的方向或目标的改变留出空间,可以让你获得比最初的想法更好的洞察力。 + +数据只是是一种工具,并不是标准答案,它可以汇集原本无法获得的见解和信息。将你想知道的东西分解成可管理的小块,并在此基础上进行分析,这是最重要的部分。 + +开源数据分析是一个很好的例子,说明你必须对所有的数据科学采取谨慎态度。 + +- 主题领域的细微差别是最重要的。 +- 通过“问什么/答什么”的工作过程经常被忽视。 +- 知道“问什么”可能是最难的部分,当你想出一些有洞察力和创新的东西时,这比你选择的任何工具都要重要。 + +如果你是一个没有数据科学经验的社区成员,正在寻找开始的地方,我希望这些信息能告诉你,你在这个过程中是多么重要和宝贵。你带来了社区的洞察力和观点。如果你是一个数据科学家或实施指标或可视化的人,你必须倾听你周围的声音,即使你也是一个活跃的社区成员。关于数据科学的更多信息列在本文的最后。 + +### 总结 + +把上面的例子作为建立你自己的开源项目的数据分析的框架。对你的结果有很多问题要问,知道这些问题和它们的答案可以把你的项目引向一个令人兴奋和富有成效的方向。 + +## 关于数据科学的更多信息 + +请考虑以下来源,以获得更多关于数据科学和为其提供数据的技术的信息。 + +- [什么是数据科学?][8] +- [什么是 Python?][9] +- [怎么成为数据科学家?][10] +- [数据科学家的一天][11] +- [什么是大数据?][12] +- [白皮书:混合云蓝图中的数据密集型智能应用][13] +- [MariaDB 和 MySQL 小技巧][14] +- [最新的数据科学文章][15] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/data-scientists-guide-open-source-community-analysis + +作者:[Cali Dolfi][a] +选题:[lkxed][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cdolfi +[b]: https://github.com/lkxed +[1]: https://enterprisersproject.com/article/2022/9/data-scientist-day-life?intcmp=7013a000002qLH8AAM +[2]: https://opensource.com/sites/default/files/2022-11/datascience-machinelearning-workflow.jpg +[3]: https://opensource.com/sites/default/files/2022-11/goals-impact.png +[4]: https://opensource.com/sites/default/files/2022-11/new-analysis-areas.png +[5]: https://opensource.com/sites/default/files/2022-11/first-time-contributions-per-quarter.png +[6]: https://opensource.com/sites/default/files/2022-11/driveby-contributions-per-quarter.png +[7]: https://opensource.com/sites/default/files/2022-11/contributor-types-over-time.png +[8]: https://opensource.com/resources/data-science?intcmp=7013a000002CxqkAAC +[9]: https://opensource.com/resources/python?intcmp=7013a000002CxqkAAC +[10]: https://opensource.com/article/17/9/data-scientist?intcmp=7013a000002CxqkAAC +[11]: https://enterprisersproject.com/article/2022/9/data-scientist-day-life?intcmp=7013a000002CxqkAAC +[12]: https://opensource.com/resources/big-data?intcmp=7013a000002CxqkAAC +[13]: https://www.redhat.com/en/resources/data-intensive-applications-hybrid-cloud-blueprint-detail?intcmp=7013a000002CxqkAAC +[14]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet?intcmp=7013a000002CxqkAAC +[15]: https://opensource.com/tags/data-science?intcmp=7013a000002CxqkAAC From a1c8534ed36fec75a7b666318b4507fe3b80936e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Mar 2023 15:32:52 +0800 Subject: [PATCH 081/318] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XiaotingHuang22 https://linux.cn/article-15628-1.html 对于这种涉及 GUI 上的菜单、选项之类的,建议使用 RUBY 做对照。 --- ...07.1 ⭐️ Switch from iCloud to Nextcloud.md | 95 +++++++++++++++++++ ...07.1 ⭐️ Switch from iCloud to Nextcloud.md | 88 ----------------- 2 files changed, 95 insertions(+), 88 deletions(-) create mode 100644 published/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md delete mode 100644 translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md diff --git a/published/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md b/published/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md new file mode 100644 index 0000000000..100989a093 --- /dev/null +++ b/published/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md @@ -0,0 +1,95 @@ +[#]: subject: "Switch from iCloud to Nextcloud" +[#]: via: "https://opensource.com/article/23/3/switch-icloud-nextcloud" +[#]: author: "Heike Jurzik https://opensource.com/users/hej" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15628-1.html" + +把你的网盘从 iCloud 换成 Nextcloud +====== + +![][0] + +> Nextcloud 是你自己的开源云。这里是如何进行转换的方法。 + +如果你对把数据提交给公司控制的云服务持谨慎态度,但同时又喜欢远程存储的便利性和基于 Web 的轻松访问,那么不止你是这样。云端因其广泛的功能而广受欢迎。但是 [云端服务不一定是封闭的][1]。幸运的是,开源项目 Nextcloud 提供了个人和私有的云应用程序套件。 + +[安装][2] 和导入数据很容易 —— 包括通讯录、日历和照片。真正难办的是从 iCloud 等云提供商那里获取数据。在本文中,我将告诉你把自己的数据迁移到 Nextcloud 需要采取的步骤。 + +### 把你的数据迁移至 Nextcloud + +和在 [安卓设备][3] 上一样,首先你必须将现有数据从苹果的 iCloud 传输到 Nextcloud。然后,你可以为你的苹果设备设置两个新帐户,以完全自动同步通讯录和预约。苹果支持用于日历同步的 CalDAV 和用于通讯录同步的 CardDAV 开放协议,因此你甚至不需要安装额外的应用。 + +要导出你的通讯录,你可以在 iPhone 或者 iPad 上打开 “通讯录Contacts” 应用或在网络浏览器中登录 iCloud: + +- 选择要传输到 Nextcloud 的所有地址簿条目,然后选择 “文件File > 输出Export > 输出 vCardExport vCard” 以在本地磁盘上保存 .`vcf` 文件。 +- 将 .`vcf` 文件导入 Nextcloud。为此,请选择 “通讯录Contacts” 应用,点击左下角的 “设置Settings” 并选择 “导入通讯录Import contacts” 按钮。 在接下来的对话窗口中,点击 “选择本地文件Select local file”,然后打开之前保存的 vCard。 + +要在你的 iPhone 或 iPad 上设置 CardDAV 帐户,请转至 “设置Settings > 通讯录Contacts > 帐户Accounts > 添加帐户Add Account”: + +- 选择 “其他Other”,然后选择 “添加 CardDAV 帐户”。 在 “服务器Server” 字段中,输入 Nextcloud 的 URL(例如,`https://nextcloudpi.local`)。 下面是 Nextcloud 帐户的用户名和密码。 打开新帐户的 “高级设置Advanced Settings”。 +- 确保启用了 “使用 SSLUse SSL” 选项。帐户 URL 通常设置正确。其中包含你的 Nextcloud 的主机名和你的用户名。 + +要在 macOS 上创建用于同步地址簿的新帐户,请打开 “通讯录Contacts” 应用程序并从 “通讯录Contacts” 菜单中选择 “添加帐户Add Account”。 激活复选框 “其他通讯录账号Other Contacts Account” 并单击 “继续Continue”。你可以接受 “CardDAV” 条目。 在 “账户类型Account Type” 下拉菜单中,选择 “手动Manual” 输入。 + +![ Nextcloud 中高级设置的图片][5] + +输入你的 Nextcloud 用户名、密码和服务器地址。当前的 macOS 版本要求你在服务器地址中指定端口 443(用于 SSL)。例如,如果你的 Nextcloud 地址是 `https://nextcloudpi.local`,用户名是 `hej`,则在栏中输入以下内容: + +``` +https://nextcloudpi.local:443/remote.php/dav/principals/users/hej +``` + +### 同步你的日历 + +导出日历的方法类似,通过日历应用程序,你可以在浏览器、智能手机/平板电脑或 macOS 桌面上使用 iCloud 执行此操作。 + +首先,将日历设置为 “公共public”。 这并不意味着每个人都可以访问你的日历。它仅用于生成日历订阅的链接。将 URL 复制到剪贴板。目前还无法将日历直接导入 Nextcloud,因为你不是用一个链接,而是用 .ics 文件(iCalendar)来导入。 以下是如何从链接生成这样的文件: + +- 将链接复制到剪贴板 +- 将链接粘贴到网络浏览器的地址栏中 +- 更改 URL 的开头并将 `webcal` 替换为 `http` +- 按回车键并将 `.ics` 文件保存到你的磁盘上 + +![一张图片显示如何将 .ics 文件保存到磁盘上][8] + +现在可以导入 .ics 文件了。 先在 Nextcloud 中打开 “日历Calendar” 应用程序,单击左下方的 “日历设置Calendar settings”,然后单击 “导入日历Import calendar”。 选择你保存在文件管理器中的 `.ics` 文件。 + +对所有 iCloud 日历重复此过程。之后,就该更换旧的 iCloud 同步服务了。 + +### 同步事件 + +要与 Nextcloud 同步新事件,请在你的客户端设备(智能手机、平板电脑、台式机)上设置一个新帐户: + +- iPhone/iPad:设置Settings / 日历Calendar / 账户Accounts / 添加账户Add Account,选择 “其他Other”,然后选择 “添加 CalDAV 账户Add CalDAV Account”。 在 “服务器Server” 栏中,输入你的本地 Nextcloud URL,即 `https://nextcloudpi.local`。 你可以看到 Nextcloud 帐户的用户名和密码输入的位置。 +- macOS:打开日历应用程序并从 “日历Calendar” 菜单中选择 “添加账户Add Account”。 激活复选框 “其他 CalDAV 账户Other CalDAV Account” 并单击 “继续Continue”。 从 “账户类型Account Type” 下拉菜单中,选择 “手动Manual” 输入。 输入你的 Nextcloud 用户名和密码以及 Nextcloud 服务器地址。不要忘记在服务器地址中指定端口 443(用于 SSL); 否则帐户设置将失败。 + +**提示:** 除了你的通讯录和日历,如果你想同步其他文件,如文档、照片、视频等,你可以安装苹果应用商店中提供 Nextcloud 应用程序。 + +本文改编自 Heike Jurzik 的《[树莓派上的 Nextcloud][9]》 一书。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/switch-icloud-nextcloud + +作者:[Heike Jurzik][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hej +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/20/10/keep-cloud-open +[2]: https://opensource.com/article/21/1/nextcloud-productivity +[3]: https://opensource.com/article/23/3/switch-google-nextcloud +[4]: https://nextcloudpi.local/ +[5]: https://opensource.com/sites/default/files/2023-02/advancedSettings-Nextcloud.png +[6]: https://nextcloudpi.local +[7]: https://nextcloudpi.local:443/remote.php/dav/principals/users/hej +[8]: https://opensource.com/sites/default/files/2023-02/NextcloudSaveIcsfile.png +[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 +[0]: https://img.linux.net.cn/data/attachment/album/202303/15/153049hmrhhbax9mmsr7h3.jpg \ No newline at end of file diff --git a/translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md b/translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md deleted file mode 100644 index 461b81d621..0000000000 --- a/translated/tech/20230307.1 ⭐️ Switch from iCloud to Nextcloud.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: subject: "Switch from iCloud to Nextcloud" -[#]: via: "https://opensource.com/article/23/3/switch-icloud-nextcloud" -[#]: author: "Heike Jurzik https://opensource.com/users/hej" -[#]: collector: "lkxed" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -把你的网盘从 iCloud 换成 Nextcloud -====== - -如果你对把数据提交给公司控制的云服务持谨慎态度,但同时又喜欢远程存储的便利性和基于 Web 的轻松访问,你不是一个人。云端因其广泛的功能而广受欢迎。 但是[云端服务不一定是封闭的][1]。 幸运的是,开源项目 Nextcloud 提供了个人和私有的云应用程序套件。 - -[安装][2] 和导入数据很容易——包括联系人、日历和照片。 真正难办的是从 iCloud 等云提供商那里获取数据。 在本文中,我将告诉你把自己的数据迁移到 Nextcloud 需要采取的步骤。 - -### 把你的数据迁移至 Nextcloud - -和在 [Android 设备][3]上一样,首先你必须将现有数据从苹果的 iCloud 传输到 Nextcloud。 然后,你可以为你的苹果设备设置两个新帐户,以完全自动同步通讯录和预约。 Apple 支持用于日历同步的 CalDAV 和用于联系人同步的 CardDAV 开放协议,因此你甚至不需要安装额外的应用。 - -要导出你的通讯录,你可以在 iPhone 或者 iPad 上打开 **联系人** 应用或在网络浏览器中登录 iCloud: - -- 选择要传输到 Nextcloud 的所有地址簿条目,然后选择 **File > Export > Export vCard** 以在本地磁盘上保存 .`vcf` 文件。 -- 将 .`vcf` 文件导入 Nextcloud。 为此,请选择 **联系人** 应用,点击左下角的 **设置** 并选择 **导入联系人** 按钮。 在接下来的对话窗口中,点击**选择本地文件**,然后打开之前保存的 vCard。 - -要在你的 iPhone 或 iPad 上设置 CardDAV 帐户,请转至**_设置_ > _联系人_ > _帐户_ > _添加帐户_**: - -- 选择**其他**,然后选择**添加 CardDAV 帐户**。 在 **服务器** 字段中,输入 Nextcloud 的 URL(例如,[https://nextcloudpi.local][4])。 下面是 Nextcloud 帐户的用户名和密码。 打开新帐户的**高级设置**。 -- 确保启用了**使用 SSL 选项**。 帐户 URL 通常设置正确。 其中包含您的 Nextcloud 的主机名和你的用户名。 - -要在 macOS 上创建用于同步地址簿的新帐户,请打开 **联系人** 应用程序并从 **联系人** 菜单中选择 **添加帐户**。 激活复选框 **其他通讯录账号** 并单击 **继续**。 您可以接受 **CardDAV** 条目。 在**账户类型**下拉菜单中,选择**手动**输入。 - -![ Nextcloud 中高级设置的图片][5] - -输入你的 Nextcloud 用户名、密码和服务器地址。 当前的 macOS 版本要求你在服务器地址中指定端口 443(用于 SSL)。 例如,如果您的 Nextcloud 地址是 [https://nextcloudpi.local][6],用户名是 hej,则在栏中输入以下内容: - -[https://nextcloudpi.local:443/remote.php/dav/principals/users/hej][7] - -### 同步你的日历 - -导出日历的方法类似,通过日历应用程序,你可以在浏览器、智能手机/平板电脑或 macOS 桌面上使用 iCloud 执行此操作。 - -首先,将日历设置为**公共**。 这并不意味着每个人都可以访问你的日历。它仅用于生成日历订阅的链接。将 URL 复制到剪贴板。 目前还无法将日历直接导入 Nextcloud,因为你不是用一个链接,而是用 .ics 文件 (iCalendar)来导入。 以下是如何从链接生成这样的文件: - -- 将链接复制到剪贴板 -- 将链接粘贴到网络浏览器的地址栏中 -- 更改 URL 的开头并将 `webcal` 替换为 `http` -- 按 **Enter** 并将 `.ics` 文件保存到你的磁盘上 - -![一张图片显示如何将 .ics 文件保存到磁盘上。][8] - -现在可以导入 .ics 文件了。 先在 Nextcloud 中打开 **日历** 应用程序,单击左下方的 **日历设置**,然后单击 **导入日历**。 选择你保存在文件管理器中的 `.ics` 文件。 - -对所有 iCloud 日历重复此过程。 之后,就该更换旧的 iCloud 同步服务了。 - -### 同步事件 - -要与 Nextcloud 同步新事件,请在你的客户端设备(智能手机、平板电脑、台式机)上设置一个新帐户: - -- **iPhone/iPad:_设置_ / _日历_ / _账户_ / _添加账户_,选择_其他_**,然后选择**添加 CalDAV 账户**。 在 **服务器** 栏中,输入你的本地 Nextcloud URL,即 `https://nextcloudpi.local`。 您可以看到 Nextcloud 帐户的用户名和密码空格。 -- macOS:打开日历应用程序并从**日历**菜单中选择**添加帐户**。 激活复选框 **其他 CalDAV 账户** 并单击 **继续**。 从 **账户类型** 下拉菜单中,选择 **手动** 输入。 输入你的 Nextcloud 用户名和密码以及 Nextcloud 服务器地址。 不要忘记在服务器地址中指定端口 443(用于 SSL); 否则帐户设置将失败。 - -**提示:**如果你想同步其他文件,如文档、照片、视频等,除了您的联系人和日历,你可以在 App Store 中安装已有的 Nextcloud 应用程序。 - -本文改编自 Heike Jurzik 的书 [树莓派上的 Nextcloud][9]。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/switch-icloud-nextcloud - -作者:[Heike Jurzik][a] -选题:[lkxed][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hej -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/20/10/keep-cloud-open -[2]: https://opensource.com/article/21/1/nextcloud-productivity -[3]: https://opensource.com/article/23/3/switch-google-nextcloud -[4]: https://nextcloudpi.local/ -[5]: https://opensource.com/sites/default/files/2023-02/advancedSettings-Nextcloud.png -[6]: https://nextcloudpi.local -[7]: https://nextcloudpi.local:443/remote.php/dav/principals/users/hej -[8]: https://opensource.com/sites/default/files/2023-02/NextcloudSaveIcsfile.png -[9]: https://www.amazon.de/-/en/gp/product/B0BTPZH8WT/ref=dbs_a_def_rwt_bibl_vppi_i4 From 8db7b241864e7077cd8abbd6bfeb1cc6cf2cd264 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 15 Mar 2023 23:08:22 +0800 Subject: [PATCH 082/318] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=20Pod=20?= =?UTF-8?q?=E4=B8=80=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dict.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Dict.md b/Dict.md index d5fc8e5631..8ed2950f9c 100644 --- a/Dict.md +++ b/Dict.md @@ -21,7 +21,7 @@ LCTT 术语词典 ### F -#### Fork +#### Fork:复刻 Fork 行为/操作广泛用于进程管理、版本管理和软件衍生方面。此词汇也长期缺乏确定的译法。 @@ -34,7 +34,7 @@ Fork 行为/操作广泛用于进程管理、版本管理和软件衍生方面 ### L -#### Live +#### Live:立付 Live 原意多指“现场”、“实时”,在计算机环境中使用时也多引用此意。但对它的翻译就颇费神,因为无论是在 Live Patch,还是更多见的 Live USB/CD、Live Session,其实都不好翻译为“现场”、“实时”。 @@ -46,7 +46,18 @@ Live 原意多指“现场”、“实时”,在计算机环境中使用时也 - 首次链接(临场):https://linux.cn/article-12854-1.html - 首次链接(立付):https://linux.cn/article-15499-1.html -#### Repo/Repository +### P + +#### Pod:容器荚 + +在容器环境中使用 Pod 来代表一组容器。最初,我根据 Kubernetes 中大量采用了航海相关的比喻,而将其译为“吊舱”。但根据 Kubernetes [文档](https://kubernetes.io/docs/concepts/workloads/pods/#:~:text=A%20Pod%20(as%20in%20a,run%20in%20a%20shared%20context.),其来自对 “鲸鱼荚Pod of Whales”、“豌豆荚pea pod” 的比喻。因此这个词翻译为“容器荚”。也有有将其翻译为“容器组”。 + +- 提议者:wxy +- 首次链接:https://linux.cn/article-14591-1.html + +### R + +#### Repo/Repository:代码仓库、软件仓库 Repository 主要用于两个场景,一个是用于版本管理的代码仓库,一个是用于分发软件/组件/制品的软件仓库。 @@ -76,4 +87,4 @@ Shell 是 Unix/Linux 等系统的 `sh`、`bash` 等命令行的接口程序, ### 说明 -此文档会根据建议不断更新,其固定地址为: https://github.com/LCTT/TranslateProject/blob/master/Dict.md ,欢迎大家提交议题或拉取请求来完善它。 \ No newline at end of file +此文档会根据建议不断更新,其固定地址为: https://github.com/LCTT/TranslateProject/blob/master/Dict.md ,欢迎大家提交议题或拉取请求来完善它。 From 07ee925c4f81aca65727b71edf8cc09e4db4a897 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Mar 2023 23:26:54 +0800 Subject: [PATCH 083/318] RP @geekpi https://linux.cn/article-15630-1.html --- ...tall MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md | 101 +++++++++--------- 1 file changed, 52 insertions(+), 49 deletions(-) rename {translated/tech => published}/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md (55%) diff --git a/translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md b/published/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md similarity index 55% rename from translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md rename to published/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md index e34a7f5c2d..6c7ff187f7 100644 --- a/translated/tech/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md +++ b/published/20230308.2 ⭐️⭐️ How to Install MiniKube on RHEL 8Rocky Linux 8AlmaLinux 8.md @@ -3,34 +3,36 @@ [#]: 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-15630-1.html" -如何在 RHEL 8/Rocky Linux 8/AlmaLinux 8 上安装 MiniKube +如何在 RHEL 8 上安装 MiniKube ====== -在这篇文章中,我们将逐步介绍如何在 RHEL 8、Rocky Linux 8 或 AlmaLinux 8 上安装 minikube。 +![][0] -Minikube 是一个跨平台的开源工具,可以让你在本地机器上部署单节点 Kubernetes 集群。 +> 在这篇文章中,我们将逐步介绍如何在 RHEL 8、Rocky Linux 8 或 AlmaLinux 8 上安装 MiniKube。 -Kubernetes,也被称为 k8sor 简称 Kube,是一个开源的容器编排平台,用于容器的自动化扩展和部署。Minikube 集群帮助开发人员和管理员在 minikube 集群中构建他们的测试环境。 +MiniKube 是一个跨平台的开源工具,可以让你在本地机器上部署单节点 Kubernetes 集群。 + +Kubernetes,也被称为 k8s,或简称 Kube,是一个开源的容器编排平台,用于容器的自动化扩展和部署。MiniKube 集群帮助开发人员和管理员在集群中构建他们的测试环境。 ##### MiniKube 的先决条件 -- 最小安装的 RHEL 8 或 Rocky Linux 8 或 AlmaLinux 8 +- 最小化安装的 RHEL 8 或 Rocky Linux 8 或 AlmaLinux 8 - 本地配置的 RHEL 8 仓库或订阅 - 至少 2GB RAM 和 2 个 vCPU - 20GB 硬盘空间 -- 具有管理员身份的 Sudo 用户 +- 具有管理员身份的 sudo 用户 - 稳定的互联网连接 - Docker 或虚拟机管理器,如 VirtualBox、KVM 和 VMware 等 -在这篇文章中,我们将使用 docker 作为 minikube 的驱动程序。满足所有先决条件后,现在是时候卷起袖子动手了。 +在这篇文章中,我们将使用 Docker 作为 MiniKube 的驱动程序。满足所有先决条件后,现在是时候卷起袖子动手了。 ### 步骤 1)启用官方 Docker 仓库 -要启用 docker 官方仓库,运行: +要启用 Docker 官方仓库,运行: ``` $ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo @@ -41,33 +43,33 @@ $ sudo dnf repolist ### 步骤 2)安装 Docker CE(社区版) -运行以下 dnf 命令来安装 docker 及其依赖项: +运行以下 `dnf` 命令来安装 Docker 及其依赖项: ``` $ sudo dnf install docker-ce docker-ce-cli containerd.io -y ``` -output: +输出: ![][2] -安装 docker 后启动并启用它的服务,运行以下 systemctl 命令: +安装 Docker 后启动并启用它的服务,运行以下 `systemctl` 命令: ``` $ sudo systemctl start docker $ sudo systemctl start docker ``` -允许你的本地用户在没有 sudo 的情况下运行 docker 命令,运行: +允许你的本地用户在没有 `sudo` 的情况下运行 `docker` 命令,运行: ``` $ sudo usermod -aG docker $USER $ newgrp docker ``` -### 步骤 3)安装 Kubectl 二进制文件 +### 步骤 3)安装 kubectl 二进制文件 -Kubectl 是一个命令行工具,它通过 API 与 Kubernetes 集群进行交互。使用 kubectl 我们将应用部署为 deployment。默认情况下,kubectl 不包含在 RHEL 8 、Rocky Linux 8 或 AlmaLinux 8 软件包仓库中。因此,我们将使用下面的命令手动安装它: +`kubectl` 是一个命令行工具,它通过 API 与 Kubernetes 集群进行交互。我们使用 `kubectl` 部署应用。默认情况下,`kubectl` 不包含在 RHEL 8 、Rocky Linux 8 或 AlmaLinux 8 软件包仓库中。因此,我们将使用下面的命令手动安装它: ``` $ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" @@ -81,14 +83,14 @@ $ kubectl version --client ### 步骤 4)下载 MiniKube 二进制文件并启动集群 -安装 kubectl 后,让我们使用以下命令下载并安装 minikube 二进制文件: +安装 `kubectl` 后,让我们使用以下命令下载并安装 MiniKube 二进制文件: ``` $ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 $ sudo install minikube-linux-amd64 /usr/local/bin/minikube ``` -现在使用下面的命令启动 minikube 集群: +现在使用下面的命令启动 MiniKube 集群: ``` $ minikube start --driver docker @@ -96,31 +98,31 @@ $ minikube start --driver docker ![][4] -上面的输出确认 minikube 命令已经使用 docker 作为驱动程序启动了单节点 Kubernetes 集群。 +上面的输出确认 `minikube` 命令已经使用 `docker` 作为驱动程序启动了单节点 Kubernetes 集群。 -运行下面的 minikube 命令来验证本地 Kubernetes 集群的状态: +运行下面的 `minikube` 命令来验证本地 Kubernetes 集群的状态: ``` -[[email protected] ~]$ minikube status +$ minikube status minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured -[[email protected] ~]$ -[[email protected] ~]$ minikube ip +$ +$ minikube ip 192.168.49.2 -[[email protected] ~]$ +$ ``` -要停止 minikube 集群,请执行: +要停止 MiniKube 集群,请执行: ``` $ minikube stop ``` -执行 “kubectl” 命令查看集群和节点信息: +执行 `kubectl` 命令查看集群和节点信息: ``` $ kubectl cluster-info @@ -131,23 +133,23 @@ $ kubectl get nodes ### 步骤 5)测试和验证 Kubernetes 集群 -为了测试 Kubernetes 集群,让我们尝试使用 echo 服务器镜像创建 k8s 部署,它相当于 http web 服务器并将其作为服务暴露在端口 8080 上: +为了测试 Kubernetes 集群,让我们尝试使用 echo 服务器镜像创建 k8s 部署,它相当于 HTTP Web 服务器并将其作为服务暴露在端口 8080 上: ``` -[[email protected] ~]$ kubectl create deployment test-minikube --image=k8s.gcr.io/echoserver:1.10 +$ kubectl create deployment test-minikube --image=k8s.gcr.io/echoserver:1.10 deployment.apps/test-minikube created -[[email protected] ~]$ +$ ``` -要访问 test-minikube 部署,将其公开为服务,运行以下命令: +要访问 `test-minikube` 部署,将其公开为服务,运行以下命令: ``` -[[email protected] ~]$ kubectl expose deployment test-minikube --type=NodePort --port=8080 +$ kubectl expose deployment test-minikube --type=NodePort --port=8080 service/test-minikube exposed -[[email protected] ~]$ +$ ``` -运行以下 kubectl 命令以获取上面创建的部署的 deployment、pods 和服务信息: +运行以下 `kubectl` 命令以获取上面创建的部署、容器荚pod 和服务信息: ``` $ kubectl get deployment,pods,svc @@ -155,13 +157,13 @@ $ kubectl get deployment,pods,svc ![][6] -要访问服务,请通过运行下面的命令获取其 url: +要访问服务,请通过运行下面的命令获取其 URL: ``` -[[email protected] ~]$ minikube service test-minikube --url +$ minikube service test-minikube --url http://192.168.49.2:32291 -[[email protected] ~]$ -[[email protected] ~]$ curl http://192.168.49.2:32291/ +$ +$ curl http://192.168.49.2:32291/ ``` ![][7] @@ -170,7 +172,7 @@ http://192.168.49.2:32291 ##### 步骤 6)启用 MiniKube 插件 -Minikube 提供插件,可以为我们的集群添加额外的功能。要列出所有可用的插件,运行: +MiniKube 提供插件,可以为我们的集群添加额外的功能。要列出所有可用的插件,运行: ``` $ minikube addons list @@ -178,7 +180,7 @@ $ minikube addons list ![][8] -Kubernetes 附带一个仪表板,可让你管理集群。在 Minikube 中,仪表板已作为插件添加。所以要启用它,运行: +Kubernetes 附带一个仪表板,可让你管理集群。在 MiniKube 中,仪表板已作为插件添加。所以要启用它,运行: ``` $ minikube addons enable dashboard @@ -202,7 +204,7 @@ $ minikube dashbaord --url ![][10] -就是这些了。我们已经成功地在 RHEL 8、Rocky Linux 8 或 AlmaLinux 8 上使用 Minikube 安装 Kubernetes。欢迎你在下面的评论部分分享你的反馈和意见。 +就是这些了。我们已经成功地在 RHEL 8、Rocky Linux 8 或 AlmaLinux 8 上使用 MiniKube 安装了 Kubernetes。欢迎你在下面的评论部分分享你的反馈和意见。 -------------------------------------------------------------------------------- @@ -211,19 +213,20 @@ via: https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/ 作者:[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/) 荣誉推出 [a]: https://www.linuxtechi.com/author/pradeep/ [b]: https://github.com/lkxed/ -[1]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Enable-Docker-Repo-RHEL8-Rocky-Linux8-1024x203.png?ezimgfmt=ng:webp/ngcb22 +[1]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Enable-Docker-Repo-RHEL8-Rocky-Linux8-1024x203.png [2]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Install-Docker-DNF-Command-RHEL8-RockyLinux8.png [3]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Download-Kubectl-Binary-RHEL8-RockyLinux8.png [4]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Start-Minikube-Cluster-RHEL8-Rocky-Linux8.png -[5]: https://www.linuxtechi.com/wp-content/uploads/2020/04/K8s-cluster-info-RHEL8-RockyLinux9-1024x193.png?ezimgfmt=ng:webp/ngcb22 -[6]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Kubectl-get-pods-deplyments-service-rhel8-rocky-linux8.png?ezimgfmt=ng:webp/ngcb22 -[7]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Access-Application-minikube-rhel8-rockylinux8.png?ezimgfmt=ng:webp/ngcb22 -[8]: https://www.linuxtechi.com/wp-content/uploads/2020/04/minikube-addons-list-rhel8-rockylinux8.png?ezimgfmt=ng:webp/ngcb22 -[9]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Enable-Minikube-addons-RHEL8-RockyLinux9-1024x381.png?ezimgfmt=ng:webp/ngcb22 -[10]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Kubernetes-Dashboard-MiniKube-Dashboard.png?ezimgfmt=ng:webp/ngcb22 \ No newline at end of file +[5]: https://www.linuxtechi.com/wp-content/uploads/2020/04/K8s-cluster-info-RHEL8-RockyLinux9-1024x193.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Kubectl-get-pods-deplyments-service-rhel8-rocky-linux8.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Access-Application-minikube-rhel8-rockylinux8.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2020/04/minikube-addons-list-rhel8-rockylinux8.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Enable-Minikube-addons-RHEL8-RockyLinux9-1024x381.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2020/04/Kubernetes-Dashboard-MiniKube-Dashboard.png +[0]: https://img.linux.net.cn/data/attachment/album/202303/15/232024hn8312yg1qmy7mhv.jpg \ No newline at end of file From a93d2da6505b4f4da5195fdac5b27b2d39000a5d Mon Sep 17 00:00:00 2001 From: onionstalgia <35531128+onionstalgia@users.noreply.github.com> Date: Thu, 16 Mar 2023 08:36:08 +0800 Subject: [PATCH 084/318] translated (#28872) * translated * done --------- Co-authored-by: onionstalgia --- ... How Wikipedia helps keep the internet open.md | 76 ------------------- ... How Wikipedia helps keep the internet open.md | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) delete mode 100644 sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md create mode 100644 translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md diff --git a/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md b/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md deleted file mode 100644 index 2c4ea735dc..0000000000 --- a/sources/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: subject: "How Wikipedia helps keep the internet open" -[#]: via: "https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open" -[#]: author: "Srishti Sethi https://opensource.com/users/srishakatux-0" -[#]: collector: "lkxed" -[#]: translator: "onionstalgia" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How Wikipedia helps keep the internet open -====== - -Wikipedia is one of the most significant open source software projects, in part because it's a lot bigger than you may realize. And yet anyone can contribute content, and anyone can contribute code to many technical areas of the projects that work behind the curtain to keep Wikipedia running. - -[Over 870 Wikipedia and umbrella sites][1] are available in different languages, and all of them operate with a common goal of “developing free educational content and disseminating it effectively and globally.” For example, Wikimedia Commons is a repository of free media files, and as of today, it has over 68 million images. Wikisource is a free library of textual sources with over 5 million articles and website subdomains active for 72 languages. Wikidata is an accessible repository of over 99 million data items used across [several Wikipedia-related sites][2]. - -These projects are supported and maintained by Wikimedia Foundation, a non-profit organization headquartered in San Francisco. The organization also empowers hundreds of thousands of volunteers worldwide to contribute free knowledge to these projects. Behind this community of knowledge gatherers and producers, a lot of work goes into maintenance, technical support, and administrative work to keep these sites up and running. From the outside looking in, you might still wonder what more work could remain in developing Wikipedia’s software. After all, it’s one of the top ten most visited internet websites in the world, and serves its purpose well and provides access to the best possible information. - -The truth is that every article on Wikipedia leverages thousands of software tools for its creation, editing, and maintenance. These are crucial steps in ensuring equitable, reliable, and fast access to information no matter where you are in the world. When you browse Wikipedia or any other Wikimedia sites, the software you interact with is called [MediaWiki][3], a powerful collaboration and documentation software that powers the content of Wikipedia. It comes with a default set of features. To further enhance the software’s capabilities, you can install various extensions. They’re too numerous to mention, but two notable extensions are: - -- VisualEditor: A WYSIWYG rich-text editor for MediaWiki-powered wikis -- Wikibase: Allows storing, managing, and accessing structured data which Wikipedia pulls from Wikidata. - -All of this apparent ancillary tooling makes the modern Wikipedia, and each one is important for its functioning. - -### Wikimedia and Mediawiki - -Overall, Wikipedia’s technology ecosystem is vast! As MediaWiki, one of the most popular software in the Wikimedia world, is available under an open source license, [over four hundred thousand projects][4] and organizations use it for hosting their content. For example, [NASA uses it][5] to organize its content around space missions and their knowledge base! - -In addition, there are many other bots, tools, desktop and mobile apps that help with content access, creation, editing, and maintenance. For example, bots in particular help drastically reduce the workload of editors by automating repetitive and tedious tasks, such as fighting vandalism, suggesting articles to newcomers, fact-checking articles, and more. InternetArchiveBot is a popular bot that frequently communicates with the Wayback Machine to fix dead links on Wikipedia. - -Tools are software applications that support various contributors in their work. For example, organizers can access tools for conducting editathons, running campaigns, educational courses around Wikipedia editing, and so on. As of May 2022, bots and tools contribute 36.6% of edits made to 870 Wikimedia wikis, demonstrating their significant impact on the ecosystem. - -[Kiwix][6] is a well-known offline reader and a desktop application that provides access to Wikipedia in limited internet access regions, particularly in educational settings. Mobile apps for Wikipedia and Wikimedia Commons allow editors to contribute articles and media files through their devices too, making our knowledge platforms accessible to a larger audience around the world. - -The next time you are browsing a Wikipedia article and notice frequent changes being made to it in real-time in the wake of a recent event, you might be able to visualize better what might be happening behind the scenes. - -### Wikipedia’s technical community - -Wikipedia was launched in 2001. It had about ten developers at that time. Since the inception of the Wikimedia Foundation in 2003, the developer pool has vastly grown over these years. About a thousand developers are now contributing to various projects within our knowledge movement. This number fluctuates yearly, depending on the number of active contributors and staff members, initiatives supporting volunteer developers, global events such as the pandemic, and so on. - -Members in the technical community contribute in various ways and roles. There are code contributors, documentarians, designers, advocates, mentors, community organizers, testers, translators, site administrators, and more. - -According to a survey conducted for new developers, Wikimedia draws a lot of contributors from the United States, Europe, and India like other open source projects and is growing in different regions of the world. - -Volunteer developers have similar motivations as Wikipedia editors. They join as contributors to support the free knowledge mission, learn and gain new skills, improve the experience of other editors, and so on. One of the volunteer developers from India says, “While I joined as an editor, I started to familiarize myself with the tech behind Wikipedia because there were significantly fewer contributors in the Hindi Wikipedia community who could address our local language needs through technology.” - -Between July 2021 and June 2022, looking only at code repositories hosted in Wikimedia’s Gerrit instance, 514 developers contributed 45,621 merged software changes to 1225 repositories. Of these contributions, 48.52% came from outside the Wikimedia Foundation by other organizations and [independent developers][7]. Some of these developers are also part of various user groups, chapters, and affiliate bodies working in different regions to promote the use and encourage contributions to Wikimedia projects. These numbers do not include the additional developers who chose to host their code externally instead, or code that is hosted directly on wiki pages, such as gadgets or modules. - -### Making a difference - -Wikipedia is a vast repository of knowledge, available to everyone. In many ways, it’s the embodiment of the original vision of what the internet can and should be: A source of information, understanding, and collaboration. - -You can be a part of Wikipedia as a contributor, either by sharing your knowledge in articles, or by helping to build the software that makes it all possible. If you’re interested in joining Wikimedia’s technical community, then explore the resources on our developer site, and learn how to [get involved][8]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open - -作者:[Srishti Sethi][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/srishakatux-0 -[b]: https://github.com/lkxed/ -[1]: https://wikimediafoundation.org/our-work/wikimedia-projects/#a1-reference -[2]: https://meta.wikimedia.org/wiki/Wikimedia_wikis -[3]: https://www.mediawiki.org/wiki/MediaWiki -[4]: https://wikistats.wmcloud.org/ -[5]: https://wikimediafoundation.org/news/2016/05/05/mediawiki-nasa/ -[6]: https://meta.wikimedia.org/wiki/Kiwix -[7]: https://wikimedia.biterg.io/ -[8]: https://developer.wikimedia.org/ diff --git a/translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md b/translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md new file mode 100644 index 0000000000..bcb4ea4269 --- /dev/null +++ b/translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md @@ -0,0 +1,76 @@ +[#]: subject: "How Wikipedia helps keep the internet open" +[#]: via: "https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open" +[#]: author: "Srishti Sethi https://opensource.com/users/srishakatux-0" +[#]: collector: "lkxed" +[#]: translator: "onionstalgia" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Wikipedia 是如何帮助保持互联网的开放性的 +====== + +Wikipedia 是最有意义的开源软件项目之一,原因之一是它远比你想象的庞大。而且,任何人都可以贡献内容,并且任何人都可以为项目背后的许多技术领域贡献代码,确保维基百科正常运行。 + +[超过 870 个维基百科及其附属网站][1]提供了多语言版本,它们服务于一个共同目标,“开发自由的教育内容,并有效地在全球范围内传播”。例如,维基共享资源Wikimedia Commons是一个自由的媒体文件库,截至今天,它已经拥有超过六千八百万张图片。维基文库Wikisource是一个自由的文本资源库,拥有超过五百万篇文章和 72 种语言的活跃网站子域名。维基数据Wikidata是一个可访问的数据存储库,包含被[多个与维基百科相关的网站][2]所使用的超过九千九百万个数据项。 + +这些项目由维基媒体基金会Wikimedia Foundation支持和维护,它是一个总部位于旧金山的非营利组织。基金会使全球数十万名志愿者为项目的自由知识作出贡献。在这个知识收集和生产的社区背后,有着大量的维护、技术支持和管理工作,以保持网站的正常运转。当然,从外部来看,你可能仍然好奇,开发维基百科的软件还需要做哪些工作。毕竟,它可是世界上最受欢迎的十大网站之一,致力于提供最好的信息。 + +事实上,每篇维基百科的文章都借助了成千上万的软件工具来创建、编辑和维护。这些步骤,确保了你在世界任何地方都能获得公平可靠快速的信息。当你浏览维基百科或任何其他维基网站时,你是在与一个称之为 [MediaWiki][3] 的软件交互,这是一个强大的团队协作文档软件,用以支持维基百科的内容。它有一些默认特性,而为了进一步增强软件的功能,你可以安装各种扩展。数不胜数的扩展中,最著名的两个是: + +- VisualEditor:一种适用于 MediaWiki 驱动的维基站点的所见即所得WYSIWYG富文本编辑器。 +- Wikibase:用于存储、管理和访问维基百科从维基数据Wikidata上拉取的结构化数据。 + +所有这些优秀的辅助工具使现代维基百科愈发完善并正常运行,每一个都至关重要。 + +### 维基百科和 Mediawiki + +总体来说维基百科的技术生态是非常庞大的!MediaWiki 是维基媒体世界中最受欢迎的软件之一,遵循开源代码许可,已经有超过四十万个项目和组织使用它来托管内容。例如,NASA 使用它来组织有关太空任务的内容和知识库! + +此外,还有许多其他机器人、工具、桌面和移动应用可以帮助用户访问、创建、编辑和维护内容。例如,机器人可以自动化重复繁琐的任务,可以用来对抗恶意破坏、向新手推荐文章、进行文章事实核查等,这大大减轻了编辑的工作负担。InternetArchiveBot 也是个十分流行的机器人,常用于与网站时光机Wayback Machine通信,修复维基百科上的死链。 + +上文中的"工具",指的是支持贡献者们工作的软件。比如,组织者可以使用“工具”开展编辑松editathons、举办各种活动、开设维基百科编辑教育课程等。截至 2022 年 5 月,机器人和工具的贡献占 870 个维基媒体编辑总量中的 36.6%,足以证明它们在整个生态中举足轻重。 + +Kiwix 是一款知名的离线阅读器桌面应用,它可以在网络连接有限的区域,特别是教育场所中提供对维基百科的访问。维基百科和维基共享资源的移动应用,也允许编辑者通过他们的移动设备贡献文章和媒体文件,这使我们的知识平台更加普及化,能够面向全球更广泛的受众。 + +下次当你浏览维基百科时,发现了文章在近期发生相关事件后有频繁的实时更改,你就能更好地想象屏幕后在发生什么啦。 + +### 维基百科的技术社区 + +维基百科启动于 2001 年,当时仅有约十名开发人员。自从 2003 年维基媒体基金会成立以来,开发人员的数量在近年里大幅增长。现在,约有一千名开发人员正在为知识运动中的各种项目做出贡献。数字每年都会波动,这取决于活跃贡献者和工作人员的数量、支持志愿开发人员的计划、以及全球性事件(如大流行)等因素。 + +技术社区的成员以各种方式和角色做出贡献。比如代码贡献者、文档编写、设计师、倡导者、帮教、社区组织者、测试人员、翻译人员、网站管理员等。 + +根据一项关于新开发者的调查,维基媒体和其他开源项目一样,吸引了许多来自美国、欧洲和印度的贡献者,在世界各地不断壮大。 + +志愿开发者和维基百科编辑者有类似的动机。他们成为贡献者,是来支持自由知识事业、学习和获得新技能、改善其他编辑者的体验等等。来自印度的一位志愿开发者说:“我最初其实是作为编辑者加入的,但我还是着手摸索维基百科背后的技术,因为印地语维基百科社区中,能够通过技术手段解决我们当地语言需求的贡献者实在太少了。” + +在 2021 年 7 月至 2022 年 6 月期间,仅考虑托管在维基媒体 Gerrit 实例中的代码仓库,514 名开发人员在 1225 个存储库中进行了 45,621 次合并改动。这些贡献中,48.52% 来自维基媒体基金会之外的其他组织和[独立开发人员][7]。其中一些开发人员还是不同地区的用户组、章节和附属机构的成员,致力于推广使用维基媒体项目和鼓励贡献。这些数字还不包括选择在外部托管代码的额外开发人员,或直接托管在维基页面上的代码,例如小工具或模块。 + +### 有所作为 + +维基百科是一个可供所有人使用的庞大知识库。在许多方面,它体现了互联网的最初愿景:作为信息、理解和协作的来源。 + +您可以作为贡献者成为维基百科的一份子,无论是通过在文章中分享您的知识,还是通过帮助构建使其所有工作成为可能的软件。如果您有兴趣加入维基媒体的技术社区,请浏览我们的开发者网站上的资源,并学习如何[参与其中][8]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open + +作者:[Srishti Sethi][a] +选题:[lkxed][b] +译者:[onionstalgia](https://github.com/onionstalgia) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/srishakatux-0 +[b]: https://github.com/lkxed/ +[1]: https://wikimediafoundation.org/our-work/wikimedia-projects/#a1-reference +[2]: https://meta.wikimedia.org/wiki/Wikimedia_wikis +[3]: https://www.mediawiki.org/wiki/MediaWiki +[4]: https://wikistats.wmcloud.org/ +[5]: https://wikimediafoundation.org/news/2016/05/05/mediawiki-nasa/ +[6]: https://meta.wikimedia.org/wiki/Kiwix +[7]: https://wikimedia.biterg.io/ +[8]: https://developer.wikimedia.org/ From 6062e212a9020d3d041d064a6a1fadcf3ce98ed4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 16 Mar 2023 08:38:48 +0800 Subject: [PATCH 085/318] translating --- ...at cloud developers need to know about hardware.md | 64 ------------------- ...at cloud developers need to know about hardware.md | 58 +++++++++++++++++ 2 files changed, 58 insertions(+), 64 deletions(-) delete mode 100644 sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md create mode 100644 translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md diff --git a/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md b/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md deleted file mode 100644 index bd0293380f..0000000000 --- a/sources/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: subject: "What cloud developers need to know about hardware" -[#]: via: "https://opensource.com/article/23/3/cloud-hardware" -[#]: author: "Jay Faulkner https://opensource.com/users/jayf" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What cloud developers need to know about hardware -====== - -It's easy to forget the progress that people in tech have made. In the early 2000s, most local user groups held regular install fests. Back then, to configure a single machine to run Linux well, we had to know intimate details about hardware and how to configure it. Now, almost twenty years later, we represent a project whose core ideal is to make getting a single computer to run Linux as easy as an API call. In this new world, operators and developers alike no longer have to worry about the hardware in their servers. This change has had a profound impact on the next generation of operators and developers. - -In the early days of computer technology, you had to put your hands on the hardware frequently. If a computer needed more memory, you just added it. As time passed, technology also evolved in big ways. This ended up moving the operator further from the hardware. What used to be a trip to the data center is now a support ticket to have remote hands on the hardware. Eventually, hardware was disposed of altogether. Instead, you now summon and destroy "servers" with simple commands and no longer have to worry about hardware. - -Here is the real truth: hardware exists because it is needed to power clouds. But what is a cloud, really? - -### Why hardware is critical to the cloud - -A cloud is a centralization of foundational resources built upon utilizing abstractions. It can range from being as simple as a hypervisor running a few VMs in your [homelab][1] to levels of complexity that include custom servers, networking gear, containers, and technology that's been designed from the ground up to focus on efficiencies of scale. - -They are nebulous. They evolve. - -Those entering technology today don't have the same hands-on experiences as more experienced developers had. Many are trained to use clouds from their earliest interactions with computers. They don't know a world without a button to change the memory allocation. They can point their attention to higher levels in the technology stack. Yet without an understanding of the foundations the infrastructure they use is built upon, they are implicitly giving away their opportunity to learn the lower levels of the stack, including hardware. No fault exists here because the implementer and operator of the cloud infrastructure have made specific choices to intentionally make their products easier to use. - -This means that now, more than ever, you have to think intentionally about what trade-offs you make — or others make — when choosing to use cloud technologies. Most people will not know what trade-offs have been made until they get their first oversized cloud bill or first outage caused by a "noisy neighbor". Can businesses trust their vendors to make trade-offs that are best for their operations? Will vendors suggest more efficient or more profitable services? Let the buyer (or engineer!) beware. - -**[ Related read [5 things open source developers should know about cloud services providers][2] ]** - -Thinking intentionally about trade-offs requires looking at your requirements and goals from multiple perspectives. Infrastructure decisions and the trade-offs therein are inherent to the overall process, design, or use model for that project. This is why they must be planned for as soon as possible. Multiple different paths must be considered in order to find your project a good home. - -First, there is the axis of the goal to be achieved, or the service provided. This may come with requirements around speed, quality, or performance. This can in itself drive a number of variables. You may need specialized hardware such as GPUs to process a request with acceptable speed. Will this workload need to auto-scale, or not? Of course, these paths are intertwined. The question already jumps to "Will my wallet auto-scale?" - -Business requirements are another part of this to consider. Your project may have specific security or compliance requirements which dictate where data is stored. Proximity to related services is also a potential concern. This includes ensuring a [low-latency connection][3] to a nearby stock exchange or ability to provide a high-quality local video cache as part of a content delivery network. - -Then there is the final part which is the value and cost of the service provided — how much one wishes to or can spend to meet the requirements. This is tightly bound  with the first path. The "what" your business is and "how" your business operates. This can be something as mundane as whether your business prefers CapEx versus OpEx. - -**[ Also read [Cloud services: 4 ways to get the most from your committed spend][4] ]** - -When looking at these options it is easy to see how changing any one variable can begin to change the other variables. They are inherently intertwined, and some technologies may allow for these variables to shift dynamically. Without understanding lower layers of substrate, you risk taking paths that further this dynamic model of billing. For some, this is preferred. For others, it can be dreaded. - -Even though learning hardware-specific knowledge has become more optional in modern technology stacks, we hope this article has encouraged you to look into what you may be missing out on without even knowing. Hardware improvements have been a large part of feature delivery and efficiency gains, shrinking computers from room-sized monstrosities to small enough to implant inside a human. We hope you take time to stop, learn, and consider what hardware platform your next project will be running on, even if you don't control it. - -If you are a student who hasn't gotten their head out of the clouds yet, go find an [old computer][5], install a stick of RAM, and challenge yourself to learn something new. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/cloud-hardware - -作者:[Jay Faulkner][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/jayf -[b]: https://github.com/lkxed/ -[1]: https://www.redhat.com/sysadmin/linux-homelab-rhel?intcmp=7013a000002qLH8AAM -[2]: https://opensource.com/article/22/3/cloud-services-providers -[3]: https://enterprisersproject.com/article/2022/5/edge-computing-latency-matters?intcmp=7013a000002qLH8AAM -[4]: https://enterprisersproject.com/article/2022/8/cloud-services-get-most-your-committed-spend?intcmp=7013a000002qLH8AAM -[5]: https://opensource.com/article/22/4/how-linux-saves-earth \ No newline at end of file diff --git a/translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md b/translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md new file mode 100644 index 0000000000..e22fd6a92c --- /dev/null +++ b/translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md @@ -0,0 +1,58 @@ +[#]: subject: "What cloud developers need to know about hardware" +[#]: via: "https://opensource.com/article/23/3/cloud-hardware" +[#]: author: "Jay Faulkner https://opensource.com/users/jayf" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +云开发人员需要了解的硬件知识 +====== + +我们很容易忘记科技界人士所取得的进步。在 2000 年代初期,大多数本地用户组定期举行安装节。那时,要配置一台机器来很好地运行 Linux,我们必须了解有关硬件的详细信息以及如何配置它。现在,将近二十年后,我们代表了一个项目,其核心理想是让一台计算机运行 Linux 就像 API 调用一样简单。在这个新世界中,运营商和开发者等不再需要担心服务器中的硬件。这种变化对下一代的运营商和开发者产生了深远的影响。 + +在计算机技术的早期,你不得不经常上手硬件。如果计算机需要更多内存,你只需添加它即可。随着时间的推移,技术也有了很大的发展。这最终使操作员远离硬件。过去需要去数据中心一趟,现在变成了远程操作硬件的支持工单。最终,硬件被完全处理掉了。相反,你现在可以通过简单的命令召唤和摧毁“服务器”,而不必再担心硬件问题。 + +这里是真正的真相:硬件的存在是因为需要它来为云提供动力。但是,云到底是什么? + +### 为什么硬件对云至关重要 + +云是建立在利用抽象之上的基础资源的集中。它的范围可以从简单到在你的[家庭实验室][1]中运行几个虚拟机的管理程序,到包括定制服务器、网络设备、容器和从头开始设计的专注于规模效率的技术等复杂程度。 + +它们是模糊的。它们在进化。 + +今天那些进入技术领域的人没有像更有经验的开发人员那样的实践经验。许多人从最早与计算机交互时就接受过使用云的培训。他们不知道没有按钮来更改内存分配的世界。他们可以将注意力转移到技术栈的更高层次。然而,如果不了解他们所使用的基础架构所建立的基础,他们就会含蓄地放弃学习栈较低级别(包括硬件)的机会。这里不存在错误,因为云基础设施的实施者和运营商已经做出了特定的选择,有意让他们的产品更易于使用。 + +这意味着现在,你比以往任何时候都更需要有意识地考虑在选择使用云技术时你或其他人做出的权衡。大多数人在收到第一份超额云账单或第一次因“吵闹的邻居”造成的中断之前,不会知道已经做出了哪些权衡。企业能否信任他们的供应商做出最适合他们运营的权衡? 供应商会建议更有效或更有利可图的服务吗? 让买家(或工程师!)当心。 + +有意识地考虑权衡取舍需要从多个角度审视你的要求和目标。基础设施决策和其中的权衡是该项目的整个过程、设计或使用模型所固有的。这就是为什么必须尽快计划它们的原因。必须考虑多种不同的路径,以便为你的项目找到一个合适的归宿。 + +首先,是要实现的目标或提供的服务的轴心。这可能伴随着速度、质量或性能方面的要求。这本身可以驱动许多变量。你可能需要专用硬件(例如 GPU)才能以可接受的速度处理请求。此负载是否需要自动缩放? 当然,这些路径是交织在一起的。问题已经跳转到“我的钱包会自动缩放吗?” + +业务需求是要考虑的另一部分。你的项目可能有特定的安全或合规性要求,这些要求规定了数据的存储位置。邻近相关服务也是一个潜在的问题。这包括确保与附近证券交易所的[低延迟连接][3]或能够提供高质量的本地视频缓存作为内容交付网络的一部分。 + +然后是最后一部分,即所提供服务的价值和成本:一个人希望或可以花多少钱来满足要求。这与第一条路径紧密相关。你的业务是“什么”以及你的业务“如何”运作。这可以像你的企业更喜欢资本支出还是更喜欢运营支出一样平凡。 + +当看到这些选项时,很容易看到改变任何一个变量都会开始改变其他变量。它们在本质上是相互交织的,一些技术可能允许这些变量动态变化。如果不了解较低层次的底层,你就有可能采取推动这种动态计费模式的路径。对一些人来说,这是首选。对其他人来说,这可能是令人恐惧的。 + +尽管在现代技术栈中,学习特定的硬件知识已变得更加可有可无,但我们希望这篇文章能鼓励你去研究你可能在不知不觉中错过的东西。硬件的改进是功能交付和效率提高的一个重要部分,将计算机从房间大小的怪物缩小到小到可以植入人体内。我们希望你花时间停下来,学习并考虑你的下一个项目将在什么硬件平台上运行,即使你不控制它。 + +如果你是一个还没有把头从云端拿出来的学生,去找一台[旧电脑][5],安装一根内存,挑战自己,学习新东西。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/cloud-hardware + +作者:[Jay Faulkner][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/jayf +[b]: https://github.com/lkxed/ +[1]: https://www.redhat.com/sysadmin/linux-homelab-rhel?intcmp=7013a000002qLH8AAM +[3]: https://enterprisersproject.com/article/2022/5/edge-computing-latency-matters?intcmp=7013a000002qLH8AAM +[5]: https://opensource.com/article/22/4/how-linux-saves-earth \ No newline at end of file From 91c5b1b69abd940e9c3fe8691abc04407a83b8f1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 16 Mar 2023 08:45:32 +0800 Subject: [PATCH 086/318] translating --- ...03.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md b/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md index b7d23f7626..43a96f845a 100644 --- a/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md +++ b/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine" [#]: author: "Phil Shapiro https://opensource.com/users/pshapiro" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 0f0d841297bf9d1406dfe8ccd04b04509d822879 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Mar 2023 09:18:31 +0800 Subject: [PATCH 087/318] ATRP @wxy https://linux.cn/article-15631-1.html --- ...x vs Other Linux Distros Which is Right for You.md | 147 ++++++++++++++++++ ...x vs Other Linux Distros Which is Right for You.md | 144 ----------------- 2 files changed, 147 insertions(+), 144 deletions(-) create mode 100644 published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md delete mode 100644 sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md diff --git a/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md b/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md new file mode 100644 index 0000000000..7b97852bfa --- /dev/null +++ b/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md @@ -0,0 +1,147 @@ +[#]: subject: "Arch Linux vs Other Linux Distros: Which is Right for You?" +[#]: via: "https://www.debugpoint.com/arch-linux-vs-other-distros/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15631-1.html" + +世界上只有两个 Linux 发行版:Arch Linux 与其它 +====== + +![][0] + +> 如果你打算把 Arch Linux 作为日常用机,你应该考虑一下 Arch Linux 与其他发行版的不同优点。下面是一个快速比较。 + +如果你考虑改用 Linux,你会接触到数百个 Linux 发行版。每个 Linux 发行版都有其独特的功能、优势和劣势。 + +它们为用户提供了独特的功能、工具和界面的选择,以满足不同的需求。如果你想和 Arch Linux 进行比较,选择合适的 Linux 发行版,这可能会让人不知所措。 + +在这篇文章中,我将重点介绍 Arch Linux,它是最受欢迎的 Linux 发行版之一,并将它与其他流行的 Linux 发行版进行比较。 + +### 关于 Arch Linux 的一些说明 + +Arch Linux 是一个轻量级和高度可定制的 Linux 发行版,最初发布于 2002 年。与其他流行的发行版不同,Arch Linux 是一个简约的发行版,采用自己动手(DIY)的方式。它是为中高级 Linux 用户设计的,他们喜欢控制和灵活性而不是易用性。 + +Arch Linux 遵循滚动发布模式,这意味着你可以经常用最新的软件包更新你的系统。 + +#### Arch Linux 的优点 + +Arch Linux 有很多优点。然而,一个发行版到底好不好取决于你的使用情况或品味。这因人而异。但在我看来,Arch Linux 比其他 Linux 发行版有几个优势,比如: + +- 轻量级和快速(原装版的 Arch,尤其是带有 Xfce 桌面的) +- 灵活性和定制化 +- 最新的软件包 +- 可靠和稳定(如果正确使用和维护的话) +- 通过 Arch 用户仓库Arch User Repository(AUR)收集最广泛的软件包 +- 通过测试软件仓库和安装提供开发包 + +现在,让我们简单了解一下主要和流行的 Linux 发行版。 + +### 其他主要发行版的简要概述 + +#### Ubuntu + +Ubuntu 由 Canonical 创建,它是最受欢迎的 Linux 发行版之一,为所有用户和各种使用情况而设计。你可以将 Ubuntu 用于日常工作、开发环境、休闲浏览等方面。它以 Debian 为基础,提供了一个用户友好的 GNOME 桌面环境界面和优秀的软件管理工具。Ubuntu 每年发布两个版本,每两年有一个长期版本。 + +#### Fedora + +Fedora 由 Red Hat 开发和资助,它是另一个流行的 Linux 发行版。它是为中高级用户构建的。它提供最新的软件包,并具有最先进的桌面环境。许多用户喜欢 Fedora,因为它在采用现代技术时总是走在最前面。例如,Wayland 显示服务器,Piperwire 声音服务器,内存超出处理,以及许多其他技术都是由 Fedora 首先采用的。而 Ubuntu 紧随其后。 + +#### Debian + +被称为 “通用操作系统” 的 Debian Linux 已经有二十多年的历史。它稳定、可靠,具有大量的软件包。Debian 以支持所有计算机架构而闻名。Debian 的 “稳定” 版本被认为是当今最稳定的 Linux 发行版。虽然,它的发布节奏比这个名单中的其他版本要慢一些。 + +#### CentOS + +CentOS 以其稳定性、安全性和可靠性而闻名,被广泛用于企业环境中的服务器部署和管理。CentOS 基于红帽 Linux 企业版(RHEL),它为运行 Web 服务器、数据库和关键应用程序提供了一个强大和可扩展的平台。它提供的长期支持和频繁的更新使它在开发者、系统管理员和企业中很受欢迎。 + +### Arch Linux 与其他 Linux 发行版的比较 + +现在你对一些流行的 Linux 发行版有了一些了解,让我们把 Arch Linux 与其他 Linux 发行版进行比较。 + +#### 安装过程 + +多年来,与其他发行版相比,Arch Linux 的安装有一定的难度,因为它需要手动安装和配置。然而,Arch Linux 的安装过程为用户提供了更大的控制和定制选项。 + +但最近,Arch Linux 团队通过 [archinstall][1] 脚本推出了一个菜单驱动的、易于操作的安装程序。利用它并掌握一些基本知识,现在可以直接安装 Arch Linux 了。此外,Arch Linux 还提供了 [虚拟机和 Docker 镜像][2],这对加快 Arch Linux 的部署非常有用。 + +![archinstall 的最终分区表][3] + +另一方面,Ubuntu、Linux Mint 和 Fedora 等发行版有图形化的安装向导,更容易使用,适合初学者。 + +#### 软件包管理器 + +Arch Linux 的默认软件包管理器是 [Pacman][4],它以其速度和可靠性著称。它还具有 [Arch 用户仓库(AUR)][5],这是一个由社区驱动的用户贡献的庞大的软件仓库。 + +相比之下,其他发行版,如 Ubuntu 和 Debian 使用 APT(高级软件包工具Advanced Package Tool),而 Fedora 使用 DNF,它也是可靠和快速的。 + +但根据我的经验,如果你仔细选择镜像,Pacman 要比 APT 和 DNF 软件包管理器快。 + +#### 滚动发布与定期发布比较 + +Arch Linux 与其他发行版的一个重要区别是其滚动发布模式。Arch Linux 提供了持续的更新,因此用户可以随时获取最新的软件包。相比之下,像 Ubuntu 和 Fedora 这样的发行版通过他们的标准发布计划来提供,需要一些时间。 + +Fedora 每 6 个月左右就会有定期发布的版本。Ubuntu 每年也有两个版本。虽然定期发布的版本提供了稳定性,但它们可能没有最新的软件包可用。 + +所以,这要归结为你自己的需要和工作流程。 + +#### 自定义和控制 + +Arch Linux 是为希望完全控制和定制自己的系统的用户设计的。原装的 Arch Linux 安装只安装基本的软件包,用户可以根据自己的需要添加其他软件。 + +根据你的使用情况,你可以选择安装你喜欢的浏览器、文本编辑器、媒体播放器、图像编辑器等等。没有什么是强加给你的。 + +其他发行版,如 Ubuntu 和 Fedora 提供了更多的预装软件包,使它们对初学者来说更容易使用。然而,它们可能没有提供像 Arch Linux 那样多的控制和定制功能。 + +但是,提供预装软件使许多用户、学校、学生和想要一个有预建项目的系统的老年人更轻松。 + +#### 稳定性和安全性 + +Arch Linux 以其稳定性和安全性而闻名,这主要是由于它对软件包的安装采取了简约的方法。用户可以完全控制他们安装的软件包,这使得它不容易受到安全漏洞的影响。 + +此外,Linux 主线内核(主要和次要版本)每月都会在 Arch 软件仓库中率先发布。因此,总的来说,你可以放心,如果你保持你的 Arch Linux 定期更新,你几乎是安全的。 + +其他发行版,如 Debian 和 CentOS 也以其稳定性和安全性而闻名,但它们可能没有 Arch Linux 那样最新的软件包。 + +### 哪个 Linux 发行版适合你? + +选择合适的 Linux 发行版取决于你的需求和专业水平。 + +如果你是一个有经验的 Linux 用户,想要完全控制和定制,Arch Linux 是一个很好的选择。如果你知道处理错误的基本方法,在错误升级的情况下可以绕过系统故障,那么它就是最好的选择。 + +然而,如果你是一个 [初学者][6] 或者喜欢开箱即用的体验,Ubuntu、Linux Mint 或 Fedora 等发行版可能更好。 + +### 结论 + +选择合适的 Linux 发行版是一种挑战,但了解它们的差异可以帮助你做出明智的决定。 + +Arch Linux 是一个独特而强大的发行版,提供完全的控制和定制,但它可能并不适合所有人。 + +像 Ubuntu 和 Fedora 这样的流行发行版提供了易用性和更多的预装软件包,使它们成为初学者的绝佳选择。 + +最后,我希望这份指南能给你一个关于 Arch Linux 与其他发行版相比的基本指导。 + +加油。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/arch-linux-vs-other-distros/ + +作者:[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/archinstall-guide/ +[2]: https://archlinux.org/download/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/01/Final-partition-table-for-archinstall.jpg +[4]: https://www.debugpoint.com/pacman-command-arch-examples/ +[5]: https://www.debugpoint.com/aur-arch-linux/ +[6]: https://www.debugpoint.com/linux-distro-beginners/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/16/091648yt6xxdjnc5tttn1z.jpg \ No newline at end of file diff --git a/sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md b/sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md deleted file mode 100644 index 2feeadeb4b..0000000000 --- a/sources/tech/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: subject: "Arch Linux vs Other Linux Distros: Which is Right for You?" -[#]: via: "https://www.debugpoint.com/arch-linux-vs-other-distros/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Arch Linux vs Other Linux Distros: Which is Right for You? -====== - -**If you plan to use Arch Linux as a daily driver, you should consider several benefits of Arch vs other distros. Here’s a quick comparison.** - -If you think about switching to Linux, you will come across hundreds of Linux distributions or “distros”. Each Linux distribution has its unique features, strengths, and weaknesses. - -They offer users a choice of unique features, tools, and interfaces to cater to different needs. The choice of the right Linux distribution can be overwhelming if you want to compare it with Arch Linux. - -In this article, I will focus on Arch Linux, one of the most popular Linux distributions and compare it with other popular Linux distributions. - -### A few notes about Arch Linux - -Arch Linux is a lightweight and highly customizable Linux distribution, initially released in 2002. Unlike other popular distributions, Arch Linux is a minimalist distribution with a do-it-yourself (DIY) approach. It is designed for intermediate to advanced Linux users who prefer control and flexibility over ease of use. - -Arch Linux follows a rolling release model, meaning you can often update your system with the latest software packages. - -#### Benefits of Arch Linux - -There are many benefits of Arch Linx. However, the advantages of a distro always depend on your use case or taste. It varies. But in my opinion, Arch Linux offers several advantages over other Linux distributions, such as: - -- Lightweight and fast (the vanilla install of Arch, especially with Xfce desktop) -- Flexibility and customization -- Up-to-date software packages -- Reliable and stable (if used and maintained correctly) -- The most extensive collection of packages via Arch User Repository (AUR) -- Availability of development packages via testing repo and installation - -Now, let’s have a brief overview of major & popular Linux distributions. - -### A brief overview of other main distros - -#### Ubuntu - -Created by Canonical, Ubuntu is one of the most popular Linux distributions, designed for all users and use cases. You can use Ubuntu for daily work, development environment, casual browsing and more. It is based on Debian and offers a user-friendly GNOME desktop environment interface with excellent software management tools. Ubuntu releases two versions every year, with a long-term-version in every two years. - -#### Fedora - -Developed and funded by Red hat, Fedora is another popular Linux distribution. It is built for intermediate to advanced users. It offers the latest software packages and features a cutting-edge desktop environment. Many users prefer Fedora because it is always at the forefront while adopting modern technology. For example, Wayland display server, Piperwire sound server, out-of-memory handling, and many other techs are first adopted by Fedora. And Ubuntu follows after that. - -#### Debian - -Termed as a “Universal operating system”, Debian Linux has been around for more than two decades. It is stable, reliable and features vast repo of software packages. Debian is known for supporting all computer architectures. Debian’s “stable” version is known to be the best stable Linux distro today. Although, its release cadence is a little slower than others in this list. - -#### CentOS - -CentOS is known for its stability, security, and reliability and is widely used in enterprise environments for server deployment and management. Based on Red Hat Linux, CentOS provides a robust and scalable platform for running web servers, databases, and critical applications. Its long-term support and frequent updates make it popular among developers, system administrators, and businesses. - -### Arch Linux vs Other Linux Distros: Comparison - -Now that you have some idea about some of the popular Linux distributions, let’s compare Arch Linux with other Linux distributions. - -#### Installation Process - -Over the years, Arch Linux has had a reputation for being challenging to install compared to other distributions, as it requires manual installation and configuration. However, the Arch Linux installation process offers users greater control and customization options. - -But recently, the Arch Linux team introduced a menu-driven easy-to-follow installer via the “[archinstall][1]” script. Using this and some basic knowledge, it is now straightforward to install Arch Linux. Furthermore, Arch Linux also provides [VM and docker images][2] which is very useful for faster deployment of Arch Linux. - -![Final partition table for archinstall][3] - -On the other hand, distributions such as Ubuntu, Linux Mint and Fedora have graphical installation wizards that are easier to use, making them suitable for beginners. - -#### Package Manager - -The default package manager of Arch Linux is [Pacman][4], which is known for its speed and reliability. It also features the [Arch User Repository (AUR)][5], a vast community-driven repository of user-contributed packages. - -In contrast, other distributions like Ubuntu and Debian use the Advanced Package Tool (APT), and FEdora uses DNF, which is also reliable and fast. - -But as per my experience, pacman is faster than apt and dnf package manager if you choose the mirrors carefully. - -#### Rolling Release vs Fixed Release - -One of the significant differences between Arch Linux and other distributions is its rolling release model. Arch Linux provides continuous updates, so users can always access the latest software packages. In contrast, distributions like Ubuntu and Fedora takes time to make it available via their standard release plans. - -Fedora has fixed releases that come out every six months or so. Ubuntu also have two releases per year. While fixed releases provide stability, they may not have the latest software packages available. - -So, it boils down to your own need and workflow. - -#### Customization and Control - -Arch Linux is designed for users who want complete control and customization over their system. The vanilla Arch Linux install only installs essential software packages, leaving the user to add additional software as per their needs. - -Based on your use case, you can choose to install your favourite browser, text editor, media player, image editors and so on. Nothing is forced upon you. - -Other distributions like Ubuntu and Fedora offer more pre-installed software packages, making them easier to use for beginners. However, they may not provide as much control and customization as Arch Linux. - -But providing pre-installed software makes it easier many users, schools, students and older people who wants a system with pre-build items. - -#### Stability and Security - -Arch Linux is known for its stability and security, primarily due to its minimalist approach to package installation. Users have complete control over which packages they install, making it less susceptible to security vulnerabilities. - -Furthermore, Linux mainline Kernel releases (major and minor) always reaches first in Arch repo every month. So, overall you can be assured that you are almost safe if you keep your Arch Linux updated regularly. - -Other distributions like Debian and CentOS are also known for their stability and security, but they may not have as up-to-date packages as Arch Linux. - -### Which Linux Distro is Right for You? - -The choice of the suitable Linux distribution depends on your needs and expertise level. - -If you are an experienced Linux user looking for complete control and customization, Arch Linux is an excellent choice. And if you know basics way of handling errors, get around of system failures in case of wrong upgrades, then it’s the best choice. - -However, if you are a [beginner][6] or prefer an out-of-the-box experience, distributions like Ubuntu, Linux Mint or Fedora may be better. - -### Conclusion - -Choosing the suitable Linux distribution can be challenging, but understanding their differences can help you make an informed decision. - -Arch Linux is a unique and powerful distribution that offers complete control and customization, but it may not be suitable for everyone. - -Popular distributions like Ubuntu and Fedora offer ease of use and more pre-installed software packages, making them an excellent choice for beginners. - -Finally, I hope this guide you a basic guidance on Arch Linux compared to other distros. - -Cheers. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/arch-linux-vs-other-distros/ - -作者:[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/archinstall-guide/ -[2]: https://archlinux.org/download/ -[3]: https://www.debugpoint.com/wp-content/uploads/2022/01/Final-partition-table-for-archinstall.jpg -[4]: https://www.debugpoint.com/pacman-command-arch-examples/ -[5]: https://www.debugpoint.com/aur-arch-linux/ -[6]: https://www.debugpoint.com/linux-distro-beginners/ \ No newline at end of file From 9b908b588ff5e5d7c9d9cd0a2ff4c33338e8b8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:31:09 +0800 Subject: [PATCH 088/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230312.0=20=E2=AD=90=EF=B8=8F=20Fixing=20Slow=20Down?= =?UTF-8?q?load=20Speed=20while=20Using=20pacman=20in=20Arch=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...load Speed while Using pacman in Arch Linux.md | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 sources/tech/20230312.0 ⭐️ Fixing Slow Download Speed while Using pacman in Arch Linux.md diff --git a/sources/tech/20230312.0 ⭐️ Fixing Slow Download Speed while Using pacman in Arch Linux.md b/sources/tech/20230312.0 ⭐️ Fixing Slow Download Speed while Using pacman in Arch Linux.md new file mode 100644 index 0000000000..a20a17edf1 --- /dev/null +++ b/sources/tech/20230312.0 ⭐️ Fixing Slow Download Speed while Using pacman in Arch Linux.md @@ -0,0 +1,231 @@ +[#]: subject: "Fixing Slow Download Speed while Using pacman in Arch Linux" +[#]: via: "https://www.debugpoint.com/slow-download-pacman-arch/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fixing Slow Download Speed while Using pacman in Arch Linux +====== + +**Having slow download speeds with Pacman in Arch Linux? Follow our guide to optimize and speed up your package manager for a smoother experience.** + +You are not alone if you are experiencing slow download speed while using Pacman in Arch Linux. Sometimes, system updates via pacman or any package installation become slower in your Arch system. + +This issue can be frustrating, especially when downloading large-size packages. + +![Example of a slow download speed situation using pacman][1] + +However, there are a few ways which can fix this problem. Let’s talk about it. + +But why slow download speed? There may be multiple reasons for it. Some of them might be related to your system configuration, etc. + +- Internet speed or network connection problems +- pacman server issues +- Outdated Arch Linux mirrors + +### How to fix slow download speed in Arch Linux using Pacman + +Now that we have discussed the causes of slow download speed let’s move on to the solutions. Here are some step-by-step methods to help you fix slow download speed in Arch Linux using Pacman: + +#### Use a different Pacman server + +One of the easiest ways to fix slow download speed in Arch Linux is to use a different Pacman server. You can use a Pacman mirror that is closer to your country/location or choose a less busy mirror to improve download speed. + +The server names are present in the pacman configuration file `/etc/pacman.d/mirrorlist`. Here’s a sample of how it looks. + +``` +## United States +Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch +## United States +Server = https://mirror.lty.me/archlinux/$repo/os/$arch +## United States +Server = https://mirror.pit.teraswitch.com/archlinux/$repo/os/$arch +## United States +Server = https://mirrors.xtom.com/archlinux/$repo/os/$arch +## United States +Server = https://arch.hu.fo/archlinux/$repo/os/$arch +## United States +Server = https://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch +## United States +Server = https://archmirror1.octyl.net/$repo/os/$arch +## United States +Server = https://mirrors.mit.edu/archlinux/$repo/os/$arch +## United States +Server = https://mirror.arizona.edu/archlinux/$repo/os/$arch +## United States +Server = https://ftp.sudhip.com/archlinux/$repo/os/$arch +## United States +Server = https://coresite.mm.fcix.net/archlinux/$repo/os/$arch +## United States +Server = https://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch +## United States +``` + +Now, if you know any server name, you can add it to this file. Also, you can comment out the existing server with a ‘#’ sign before the server’s URL. Then save and exit the file. After you change this file, update the database using the below command. + +You can also check the Arch Linux [official mirror page][2] to verify the server status. + +``` +sudo pacman -Syy +``` + +But it’s a hassle to check and verify the mirrors which is closer to you. You can use a utility to automatically update the mirrorlist file. See the below tip. + +#### Update mirrorlist automatically using reflector (Recommended) + +The `reflector` is a Python script which fetches the best arch mirror based on your location and updates the `/etc/pacman.d/mirrorlist` automatically. It’s very handy. + +First, you need to install `reflector` using the command below. + +``` +sudo pacman -S reflector +``` + +Then, take a backup of your current mirrorlist. + +``` +cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bkp +``` + +Then run the below command. You can change the country name as you wish. + +``` +sudo reflector --country 'India' --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist +``` + +![Running the reflector command to update mirrorlist][3] + +After the above command is complete, you can try to run pacman and you should see a much higher speed. + +Here’s a sample screenshot of my test run after updating the mirror list using `reflector`. As you can see, the speed is now in Mbps; earlier, it was very low in kbps (see the first image above). + +![After change in mirrorlist - the speed is increased][4] + +**Here are a few more tips on reflector:** + +You can also add two or more countries in the same command using comma. For example: + +``` +sudo reflector --country 'India,France,' --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist +``` + +If you don’t want a specific country and want worldwide mirrors, use an empty string. + +``` +sudo reflector --country '' --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist +``` + +#### Enable parallel downloads + +By default, Pacman downloads packages sequentially, which can slow down the download speed. However, you can enable parallel downloads to download multiple packages simultaneously, improving the download speed. + +To enable parallel downloads, open the pacman configuration file using nano editor to change a specific switch. Use the below commands: + +``` +sudo nano /etc/pacman.conf +``` + +Next, find the following line in the file: + +``` +#MaxParallelDownloads = 5 +``` + +Uncomment this line and change the number to the desired number of parallel downloads. Save and exit the file by pressing Ctrl+X, then Y, and finally, Enter. + +After that, run the following command to update the Pacman database: + +``` +sudo pacman -Syy +``` + +#### Update your system regularly + +Outdated packages or system components can also cause slow download speed. Therefore, it is essential to update your system regularly to ensure that you are using the latest packages and system components. + +To update your system, open the terminal and run the following command: + +``` +sudo pacman -Syu +``` + +This command will update all the packages and system components to the latest version. + +In my experience, update your Arch Linux system at least once a week for good performance of your Arch installation. If you can do it daily, then it’s the best. + +#### Clean your Pacman cache + +Over time, the Pacman cache can accumulate significant data, leading to slow download speed. Therefore, cleaning your Pacman cache regularly is essential to ensure it does not affect download speed. + +To clean your Pacman cache, open the terminal and run the following command: + +``` +sudo pacman -Sc +``` + +``` +$ sudo pacman -Sc +[sudo] password for debugpoint: +Packages to keep: + All locally installed packages + +Cache directory: /var/cache/pacman/pkg/ +:: Do you want to remove all other packages from cache? [Y/n] y +removing old packages from cache... +error: missing package metadata in /var/cache/pacman/pkg/appstream-0.16.0-1-x86_64.pkg.tar.zst.part +error: missing package metadata in /var/cache/pacman/pkg/linux-6.0.1.arch1-1-x86_64.pkg.tar.zst.part + +Database directory: /var/lib/pacman/ +:: Do you want to remove unused repositories? [Y/n] y +removing unused sync repositories... +$ +``` + +This command will remove all the cached packages that are no longer required. + +#### Use a download manager + +A download manager can split the download into several parts, making it faster and more efficient. You can use any command-line download manager, such as `wget` or `uget`, for a faster download experience. However, this applies only to external downloads. It won’t impact pacman commands, obviously. + +To install a download manager, open the terminal and run the following command: + +``` +sudo pacman -S uget +``` + +``` +sudo pacman -S wget +``` + +After installing the download manager, you can use it to download packages or updates by copying the Pacman link and pasting it into the download manager. + +Finally, the last option is to check and adopt a faster internet connection if needed. If you are in a low bandwidth Wi-Fi or wired connection via your ISP plan, then you might want to go for higher bandwidth plans. + +### Conclusion + +Slow download speed can be frustrating, but it is a common issue that can be easily fixed. By using the methods explained above, you can significantly improve download speed in Arch Linux using Pacman. + +I hope this helps. + +Cheers. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/slow-download-pacman-arch/ + +作者:[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/2023/03/Example-of-a-slow-download-speed-situation-using-pacman.jpg +[2]: https://archlinux.org/mirrors/status/ +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Running-the-reflector-command-to-update-mirrorlist.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/After-change-in-mirrorlist-the-speed-is-increased.jpg \ No newline at end of file From 63e970800ff0207fe42feaa4cacf1cc87071a27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:32:36 +0800 Subject: [PATCH 089/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230313.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20A?= =?UTF-8?q?=20Guide=20to=20Find=20the=20Right=20Debian=20ISO=20for=20Downl?= =?UTF-8?q?oad.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Guide to Find the Right Debian ISO for Download.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md diff --git a/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md b/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md new file mode 100644 index 0000000000..138d592ea4 --- /dev/null +++ b/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md @@ -0,0 +1,114 @@ +[#]: subject: "A Guide to Find the Right Debian ISO for Download" +[#]: via: "https://www.debugpoint.com/download-debian-iso/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A Guide to Find the Right Debian ISO for Download +====== + +**Linux beginners can be overwhelmed by the official Debian download ISO page. This guide aims to simplify the download experience.** + +Installing Debian can be a difficult experience for beginner Debian users. The official download page contains several links, and it’s a little confusing as to which one to download. + +Keeping that in mind, I have prepared this guide to help you to pick up the right Debian ISO file directly from this page. + +Overall, you can classify Debian ISO files into two broad categories. They are “free” and “non-free”. + +### A few notes about “Free” and “non-Free” Debian images + +- Debian “non-free” images refer to the installation images of the Debian operating system that contain software which does not adhere to the Debian free software guideline. +- “Non-free” software includes software that is proprietary, copyrighted or has license restrictions that prevent users from modifying or distributing the code. The Debian project provides these “non-free” images as an optional download for users who need them to use specific hardware devices or software that require proprietary drivers or firmware. +- The “free” version of Debian contains only open-source and freely distributable software, meaning that users have the freedom to modify, distribute, and share the software with others without any legal or ethical restrictions. + +Debian 12 Bookworm onwards (upcoming release), the non-free firmware packages are included officially in the main ISO files. So, this guide is split between two sections. + +### Download: Debian 12 Bookworm and above + +Here’s a brief table to download Debian ISO for version 12 Bookworm (currently not stable and under testing). + +| **Description** | **Max ISO Size** | **Choose this ISO if** | **ISO Download****Link****(amd64)** | +| :- | :- | :- | :- | +| > Minimal Size> Ideal for the basic install | 700 MB | You want to download the basic packages and then install them without the internet | [iso-cd][1] | +| > Full DVD size | 5 GB | You want everything to be downloaded first, then start the installation, which is ideal for offline installation. | [iso-dvd][2] | + +### Download: Debian 11 Bullseye and below + +#### Free ISO files (no proprietary packages) + +The below ISO images are “**free**” images, which means they don’t include many proprietary packages for the firmware. + +| **Description** | **Max ISO Size** | **Choose this ISO if** | **ISO Download****Link****(amd64)** | +| :- | :- | :- | :- | +| > Minimal Size (netinst CD)> Requires internet connection for packages | 500 MB | You have stable high-speed internet and want a small initial download | [iso-cd][3][torrent][4] | +| > Full CD size> Comes with CD 1, 2 and 3> You need the CD 1 only for basic installation | 700 MB | You want to download the basic packages and then install them without the internet | [iso-cd][5][torrent][6] | +| > Full DVD size> Comes with DVD 1, 2 and 3> You need the DVD 1 only for basic installation | 5 GB | You want everything to be downloaded first, then start the installation, which is basically ideal for offline installation. | [iso-dvd][7][torrent][8] | + +#### Non-free ISO files (with proprietary packages) + +If you have special hardware such as Wi-Fi, Bluetooth, etc. – you may want to get the **“non-free”** version of the packages from the below table. + +| **Type** | **Type of image** | **Choose this ISO if** | **ISO download link (amd64)** | +| :- | :- | :- | :- | +| Non-free | full CD, DVD | You want less effort and want Debian to work with all supported hardware. | [cd-dvd][9]_(go to non-free directory)_ | +| Non-free | full CD, DVD (LIVE) – separate desktop environment packages | You want less effort and Debian to work and a LIVE system. LIVE system also offers a complete installation as well | [cd-dvd-live][9]_(go to non-free directory)_ | + +### Other architectures + +#### For Debian 11 Bullseye: + +- [arm64][10] +- [armel][11] +- [armhf][12] +- [i386][13] +- mips (not available) +- [mips64el][14] +- [mipsel][15] +- [ppc64el][16] +- [s390x][17] + +All images download link: [Click here][18] + +### Older version (Debian 10 Buster) + +If you need any images for Debian Buster 10, visit this [page][19]. + +### Wrapping Up + +For new users, it might be too much information if one wants to download Debian ISO images from the official website. Hence, I summarised the download links in a proper format. I hope this article has helped you find your system’s target Debian ISO images. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/download-debian-iso/ + +作者:[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://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-cd/ +[2]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-dvd/ +[3]: https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/ +[4]: https://cdimage.debian.org/cdimage/release/current/amd64/bt-cd/ +[5]: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ +[6]: https://cdimage.debian.org/debian-cd/current/amd64/bt-cd/ +[7]: https://cdimage.debian.org/cdimage/release/current/amd64/iso-dvd/ +[8]: https://cdimage.debian.org/cdimage/release/current/amd64/bt-dvd/ +[9]: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/ +[10]: http://ftp.debian.org/debian/dists/bullseye/main/installer-arm64/current/images/ +[11]: http://ftp.debian.org/debian/dists/bullseye/main/installer-armel/current/images/ +[12]: http://ftp.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/ +[13]: http://ftp.debian.org/debian/dists/bullseye/main/installer-i386/current/images/ +[14]: http://ftp.debian.org/debian/dists/buster/main/installer-mips64el/current/images/ +[15]: http://ftp.debian.org/debian/dists/bullseye/main/installer-mipsel/current/images/ +[16]: http://ftp.debian.org/debian/dists/bullseye/main/installer-ppc64el/current/images/ +[17]: http://ftp.debian.org/debian/dists/bullseye/main/installer-s390x/current/images/ +[18]: https://cdimage.debian.org/cdimage/ +[19]: https://www.debian.org/releases/buster/debian-installer/ From 84f906a4a18204b8f7335e2ee74e14a578ba5c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:42:21 +0800 Subject: [PATCH 090/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230313.1=20=E2=AD=90=EF=B8=8F=20Scrcpy=202.0=20Relea?= =?UTF-8?q?sed=20with=20Audio=20Forwarding=20from=20Android=20to=20PC.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ed with Audio Forwarding from Android to PC.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/news/20230313.1 ⭐️ Scrcpy 2.0 Released with Audio Forwarding from Android to PC.md diff --git a/sources/news/20230313.1 ⭐️ Scrcpy 2.0 Released with Audio Forwarding from Android to PC.md b/sources/news/20230313.1 ⭐️ Scrcpy 2.0 Released with Audio Forwarding from Android to PC.md new file mode 100644 index 0000000000..9a17450ae9 --- /dev/null +++ b/sources/news/20230313.1 ⭐️ Scrcpy 2.0 Released with Audio Forwarding from Android to PC.md @@ -0,0 +1,68 @@ +[#]: subject: "Scrcpy 2.0 Released with Audio Forwarding from Android to PC" +[#]: via: "https://debugpointnews.com/scrcpy-2-0-release/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Scrcpy 2.0 Released with Audio Forwarding from Android to PC +====== + +**A new release of Scrcpy 2.0 is here with the most requested feature of audio forwarding.** + +Scrcpy, a free and open-source tool that allows users to control their Android devices from their computer. It has released its latest version, Scrcpy 2.0. With this newest update, users can now mirror their Android screens on not only their computer but also forward audio from their device to their computer. + +![Scrcpy running - Image credit Reddit][1] + +### Scrcpy 2.0: New features + +Audio forwarding was the most requested feature of this great utility. The developer worked with various solutions earlier, such as USBaudio to bring in this feature. But none of the POCs was viable for significant use cases. + +Things changed when Google introduced audio capture API in the Android 10 release on September 2019. With this new API, it’s now easier to implement this feature with several tweaks to control the latency of Audio from your Android device to your computer. + +Furthermore, Scrcpy 2.0 also supports the option to choose video and audio codecs. The device screen can now be encoded in H.265, or even AV1 if your device supports AV1 encoding. + +``` +scrcpy --audio-codec=opus --audio-bit-rate=16k +scrcpy --audio-codec=aac --audio-bit-rate=16k +``` + +In addition, you can also control the audio buffering via the command line to tweak it for your use case. + +``` +scrcpy --video-codec=h265 --display-buffer=200 --audio-buffer=200 +``` + +### Android version support + +This new feature works out-of-the-box for Android 12 or newer (all modern mobile phones). However, for Android 11, you must unlock the device screen while using audio forwarding. + +Scrcpy is a powerful tool that can be used for various purposes, from gaming and multimedia playback to productivity and remote technical support. With its latest update, Scrcpy 2.0, the tool has become even more versatile and user-friendly, making it an excellent choice for anyone looking to mirror and control their Android device on their computer. + +### Wrapping Up + +You can learn more about this new version on the official announcement [page][2]. A download and installation instruction is present [here][3], if you want to try it out. + +For Linux distributions, you can install them using the instructions present [here][4]. + +_Via [announcement][2]_ + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/scrcpy-2-0-release/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/03/Scrcpy-running-Image-credit-Reddit.jpg +[2]: https://blog.rom1v.com/2023/03/scrcpy-2-0-with-audio/ +[3]: https://github.com/Genymobile/scrcpy/blob/master/README.md#get-the-app +[4]: https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md \ No newline at end of file From ac305e2faa4574418aa11aae2a1faab6fea1b8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:43:22 +0800 Subject: [PATCH 091/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230313.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ni?= =?UTF-8?q?xOS=20Series=204=20Things=20To=20Do=20After=20Installing=20NixO?= =?UTF-8?q?S.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...OS Series 4 Things To Do After Installing NixOS.md | 348 ++++++++++++++++++ 1 file changed, 348 insertions(+) create mode 100644 sources/tech/20230313.2 ⭐️⭐️ NixOS Series 4 Things To Do After Installing NixOS.md diff --git a/sources/tech/20230313.2 ⭐️⭐️ NixOS Series 4 Things To Do After Installing NixOS.md b/sources/tech/20230313.2 ⭐️⭐️ NixOS Series 4 Things To Do After Installing NixOS.md new file mode 100644 index 0000000000..b43916b8a8 --- /dev/null +++ b/sources/tech/20230313.2 ⭐️⭐️ NixOS Series 4 Things To Do After Installing NixOS.md @@ -0,0 +1,348 @@ +[#]: subject: "NixOS Series #4: Things To Do After Installing NixOS" +[#]: via: "https://itsfoss.com/things-to-do-after-installing-nixos/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +NixOS Series #4: Things To Do After Installing NixOS +====== + +After installation, you will notice that NixOS is quite different from general-purpose Linux distributions. + +Of course, as one of the [advanced Linux distributions][1], it may not feel right at home to most new users. + +If you do not know [why you should use NixOS][2], and trying it out of curiosity, it is vital to know who it is for before proceeding. + +While I assume you installed the distro already, if it is your first time, I suggest [installing NixOS on a virtual machine][3]. + +### 1. Update packages + +Updates would always be there even if you used the latest ISO for the installation. So why not start by updating the packages? + +To upgrade packages, first, you will have to check for updates in added channels: + +``` +nix-channel --update +``` + +And then, use the following command to install those updates (if any): + +``` +sudo nixos-rebuild switch --upgrade +``` + +That's it! It will take care of the rest. + +### 2. Change hostname in NixOS + +If you try the traditional way of [changing the hostname][4] (using the `hostnamectl` command), it will throw the following error: + +![error changing hostname in nixos][5] + +With NixOS, you can change the hostname easily using its main config file, which you can access using the following command: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +In this config file, look for the following line: + +``` +networking.hostName = "nixos"; +``` + +And change it to: + +``` +networking.hostName = "Your_Hostname"; +``` + +For example, I changed my hostname to `itsFOSS`: + +``` +networking.hostName = "itsFOSS"; +``` + +![change hostname in NixOS][6] + +Now, [save changes and exit from the nano][7] text editor. + +To take effect from the change you made to hostname, execute the following command: + +``` +sudo nixos-rebuild switch +``` + +And finally, reopen the terminal, and the change in hostname should reflect. + +### 3. Setup Flatpak + +I know what you might be thinking. The Nix package manager already offers a plethora of packages. So, why do you need Flatpak? + +Installing what you need could be a bit time-consuming for first-time users. So, Flatpak should make things convenient for you. + +[Setting up Flatpak][8] is not the same as you do on Ubuntu. + +To setup Flatpak, you will have to make changes to the `configuration.nix` file, which can be accessed using the following: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +[Go to the end of the line in nano][9] and add the following line before the `}`: + +``` +services.flatpak.enable = true; +``` + +![setup flatpak on nixos][10] + +Save changes by pressing `Ctrl + O`, hit enter and exit by `Ctrl + X`. + +Next, rebuild and switch to the new config file using the following command: + +``` +sudo nixos-rebuild switch +``` + +And finally, add the Flathub repository to the system using the following command: + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +Want to know what exactly is a Flatpak package? You can refer to our article on it: + +### 4. Enable garbage collection + +NixOS is known for being immutable, and there is a strong reason why. + +Whenever you upgrade a package, the old package won't be removed. Just the symlinks of the old package will be given to the latest version. + +And doing that, you will collect unnecessary trash from your system. + +But removing every old generation will falsify the purpose of NixOS. + +So, in that case, you can configure your system to remove garbage packages weekly. + +To do that, first, open the nix configuration file: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +And add the following line at the end of the config file before `}`: + +``` +# Automatic Garbage Collection +nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; +``` + +![enable automatic garbage collection in NixOS][11] + +Save changes and exit from the nano text editor. + +To activate the garbage collection, rebuild and switch to the new config file: + +``` +sudo nixos-rebuild switch +``` + +If you are not sure whether the garbage collector is running fine in the background, you can list active timers using the following command: + +``` +systemctl list-timers +``` + +![][12] + +And as you can see, the Nix garbage collector is running as expected and shows 5 days left for the next cleanup. + +### 5. Install your favorite software + +I mean this is the only reason why we use computers. "To use our favorite software," and if there's none, we make it happen! + +The best place to look for packages is the [Nix package search][13] which can be accessed using any of your preferred browsers. + +- Search package +- Select the package +- Click on `nix-env` and copy the given command for `NixOS` +- Execute that command, and that's it + +You can check our [NixOS package management][14] guide to get all the details. + +Let me give you a quick recap here. For example, here, I want to install Librewolf, so I went with the following: + +![search packages for nixos][15] + +**But if you want to install services like SSH or plex, the above method won't work**. + +For that, you will have to look into `NixOS options` situated at the top of the page. + +So let's say I want to install OpenSSH, so I have to follow the given steps: + +- Go to `NixOS options` +- Search the name of the service +- Get the name of the service and paste it to the `configuration.nix` by changing its value to `true` + +![Search the service for nixos][16] + +``` +services.openssh.enable = true +``` + +![enable openssh on nixos][17] + +After adding the line to the config file, rebuild the service: + +``` +sudo nixos-rebuild switch +``` + +### 6. Enable auto-update in NixOS (optional) + +Some users prefer to have auto-updates enabled, whereas others can update packages at their convenience. + +So it is all up to you. + +**To enable auto-update**, first open the `configuration.nix` file: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +Next, add the following line at the end of the config file before `}`: + +``` +# Auto system update +system.autoUpgrade = { + enable = true; +}; +``` + +![enable auto system update in nixos][18] + +Save changes and exit from the nano. + +To enable the auto-update, you will have to rebuild and switch to that file using the following: + +``` +sudo nixos-rebuild switch +``` + +You can also check the NixOS upgrade timer using the following command: + +``` +systemctl list-timers +``` + +![auto upgrade timer in nixos][19] + +And as you can see, the `nixos-upgrade.service` is running in the background as intended! + +### 7. Reduce swapiness + +If you are utilizing the swap partition, you may want to reduce the swapiness value. + +Swapiness is nothing but the value of how aggressively you want to use the swap partition (or memory), which ranges from 0 to 100. + +The lesser the swapiness, the more your system will use the physical memory (RAM), whereas a swap partition is nothing but a bit of part of your storage drive. + +Also, storage drives are relatively slower than RAM, so you should reduce the swapiness if possible. + +To check the default swapiness of your system, use the following: + +``` +cat /proc/sys/vm/swappiness +``` + +![check swapiness of linux system][20] + +And for most Linux distributions, it is set to `60`. + +I would recommend you lower this value to `10`. + +To do that, first, open the configuration file using the following command: + +``` +sudo nano /etc/nixos/hardware-configuration.nix +``` + +And add the following line at the end of the line before `}`: + +``` +boot.kernel.sysctl = { "vm.swappiness" = 10;}; +``` + +![reduce swapiness in nixos][21] + +Save changes and exit from the text editor. + +Now, rebuild the config and switch to it using the following: + +``` +sudo nixos-rebuild switch +``` + +And now, you can check the swapiness again and it should reflect the change: + +``` +cat /proc/sys/vm/swappiness +``` + +![reduce swapiness in NixOS][22] + +That's it! + +### Wrapping Up + +If you follow these points right after installing NixOS for the first time, you should get a good user experience. + +Sure, there can be a few other things depending on your requirements. But, I think the above-mentioned things are the most essential or common things to do. + +For the next part of this series, I shall discuss setting up the home manager on NixOS, which should be helpful for a system with multiple users. + +💬 _What do you first do after installing NixOS? Let me know your thoughts._ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/things-to-do-after-installing-nixos/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/advanced-linux-distros/ +[2]: https://itsfoss.com/why-use-nixos/ +[3]: https://itsfoss.com/install-nixos-vm/ +[4]: https://itsfoss.com/change-hostname-ubuntu/ +[5]: https://itsfoss.com/content/images/2023/02/error-changing-hostname-in-nixos.png +[6]: https://itsfoss.com/content/images/2023/02/change-hostname-in-NixOS.png +[7]: https://linuxhandbook.com/nano-save-exit/?ref=its-foss +[8]: https://itsfoss.com/flatpak-guide/ +[9]: https://linuxhandbook.com/beginning-end-file-nano/?ref=its-foss +[10]: https://itsfoss.com/content/images/2023/02/setup-flatpak-on-nixos.png +[11]: https://itsfoss.com/content/images/2023/02/enable-automatic-garbage-collection-in-NixOS.png +[12]: https://itsfoss.com/content/images/2023/02/list-active-timers-in-nixos.png +[13]: https://search.nixos.org/packages?ref=its-foss +[14]: https://itsfoss.com/nixos-package-management/ +[15]: https://itsfoss.com/content/images/2023/02/search-packages-for-nixos.png +[16]: https://itsfoss.com/content/images/2023/02/Search-the-service-for-nixos.png +[17]: https://itsfoss.com/content/images/2023/02/enable-openssh-on-nixos.png +[18]: https://itsfoss.com/content/images/2023/02/enable-auto-system-update-in-nixos.png +[19]: https://itsfoss.com/content/images/2023/02/auto-upgrade-timer-in-nixos.png +[20]: https://itsfoss.com/content/images/2023/02/check-swapiness-of-linux-system.png +[21]: https://itsfoss.com/content/images/2023/02/reduce-swapiness-in-nixos.png +[22]: https://itsfoss.com/content/images/2023/02/reduce-swapiness-in-NixOS.png \ No newline at end of file From 0a87e80429818366c10480ba95701268bffc2688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:56:05 +0800 Subject: [PATCH 092/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230313.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20to=20Install=20Kubernetes=20Cluster=20Using=20Kubespray.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w to Install Kubernetes Cluster Using Kubespray.md | 284 ++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md diff --git a/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md b/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md new file mode 100644 index 0000000000..0274f9a3d8 --- /dev/null +++ b/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md @@ -0,0 +1,284 @@ +[#]: subject: "How to Install Kubernetes Cluster Using Kubespray" +[#]: via: "https://www.linuxtechi.com/install-kubernetes-using-kubespray/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install Kubernetes Cluster Using Kubespray +====== + +Are you looking for an easy guide on how to install Kubernetes (k8s) using kubespray? + +The step-by-step guide on this page will show you how to install Kubernetes Cluster using kubespray on linux systems. + +Kubesprayis a free and open-source tool that provide ansible playbooks to deploy and manage Kubernetes clusters. It is designed to simplify the installation process of Kubernetes clusters across multiple nodes, allowing users to deploy and manage a production-ready Kubernetes cluster quickly and easily. + +It supports a range of operating systems, including Ubuntu, CentOS, Rocky Linux and Red Hat Enterprise Linux, and it can deploy Kubernetes on a variety of platforms, including bare metal, public cloud, and private cloud. + +In this guide, we are using the following lab, + +- Ansible Node (Kubespray Node): Minimal installed Ubuntu 22.04 LTS (192.168.1.240) +- 3 Controller Nodes: Minimal Installed Rocky Linux 9 (192.168.1.241/242/243) +- 2 Worker Nodes: Minimal Installed Rocky Linux 9 (192.168.1.244/245) + +##### Minimum system requirements for kubespray + +- Master Nodes: 1500 MB RAM, 2 CPU and 20 GB free disk space +- Worker Nodes: 1024 MB, 2 CPU, 20 GB free disk space +- Ansible Node: 1024 MB, 1CPU and 20 GB disk space +- Internet connectivity on each node +- Regular with sudo admin rights + +Without any further delay, let’s deep dive into the installation steps, + +### Step 1) Configure Kubespray Node + +Login to your Ubuntu 22.04 system and install ansible. Run the following set of commands, + +``` +$ sudo apt update +$ sudo apt install git python3 python3-pip -y +$ git clone https://github.com/kubernetes-incubator/kubespray.git +$ cd kubespray +$ pip install -r requirements.txt +``` + +Verify the ansible version, run + +``` +$ ansible --version +``` + +Create the hosts inventory, run below commands and don’t forget to replace IP address that suits to your deployment. + +``` +$ cp -rfp inventory/sample inventory/mycluster +$ declare -a IPS=(192.168.1.241 192.168.1.241 192.168.1.242 192.168.1.243 192.168.1.244 192.168.1.245) +$ CONFIG_FILE=inventory/mycluster/hosts.yaml python3 contrib/inventory_builder/inventory.py ${IPS[@]} +``` + +Modify the inventory file, set 3 control nodes and 2 worker nodes + +``` +$ vi inventory/mycluster/hosts.yaml +``` + +Save and close the file + +Review and modify the following parameters in file “inventory/mycluster/group_vars/k8s_cluster/k8s-cluster.yml”. + +``` +kube_version: v1.26.2 +kube_network_plugin: calico +kube_pods_subnet: 10.233.64.0/18 +kube_service_addresses: 10.233.0.0/18 +cluster_name: linuxtechi.local +``` + +To enable addons like kuberenetes dashboard and ingress controller, set the parameters as enabled in the file “inventory/mycluster/group_vars/k8s_cluster/addons.yml” + +``` +$ vi inventory/mycluster/group_vars/k8s_cluster/addons.yml +----------- +dashboard_enabled: true +ingress_nginx_enabled: true +ingress_nginx_host_network: true +----------- +``` + +save and exit the file. + +### Step 2) Copy SSH-keys from ansible node to all other nodes + +First generate the ssh-keys for your local user on your ansible node, + +``` +$ ssh-keygen +``` + +Copy the ssh-keys using ssh-copy-id command, + +``` +$ ssh-copy-id [email protected] +$ ssh-copy-id [email protected] +$ ssh-copy-id [email protected] +$ ssh-copy-id [email protected] +$ ssh-copy-id [email protected] +``` + +Also Read: How to Setup Passwordless SSH Login in Linux with Keys + +Also run the following command on each node. + +``` +$ echo "sysops ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/sysops +``` + +### Step 3) Disable Firewall and Enable IPV4 forwarding + +To disable firewall on all the nodes, run following ansible command from ansible node, + +``` +$ cd kubespray +$ ansible all -i inventory/mycluster/hosts.yaml -m shell -a "sudo systemctl stop firewalld && sudo systemctl disable firewalld" +``` + +Run following ansible commands to enable IPv4 forwarding and disable swap on all the nodes, + +``` +$ ansible all -i inventory/mycluster/hosts.yaml -m shell -a "echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf" +$ ansible all -i inventory/mycluster/hosts.yaml -m shell -a "sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab && sudo swapoff -a" +``` + +### Step 4) Start Kubernetes deployment + +Now, we are all set to start Kubernetes cluster deployment, run following ansible playbook from ansible node, + +``` +$ cd kubespray +$ ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml +``` + +Now monitor the deployment, it may take 20 to 30 minutes depending on internet speed and hardware resources. + +Once the deployment is completed, we will get following output on our screen, + +Great, above output confirms that deployment is completed successfully. + +### Step 5) Access Kubernetes cluster + +Login to first master node, switch to root user, run kubectl commands from there, + +``` +$ sudo su - +# kubectl get nodes +# kubectl get pods -A +``` + +Output, + +Perfect, output above confirms that all the nodes in the cluster are in ready state and Pods of all the namespace are up and running. This shows that our Kubernetes cluster is deployed successfully. + +Let’s try to deploy nginx based deployment and expose it as nodeport, run the following kubectl commands + +``` +$ kubectl create deployment demo-nginx-kubespray --image=nginx --replicas=2 +$ kubectl expose deployment demo-nginx-kubespray --type NodePort --port=80 +$ kubectl get  deployments.apps +$ kubectl get pods +$ kubectl get svc demo-nginx-kubespray +``` + +Output of above commands, + +Now try accessing this nginx application using worker’s IP address and node port (30050) + +Either use below curl command or web browser to access this application. + +``` +$ curl 192.168.1.245:30050 +``` + +Or + +Perfect, this confirms that application is accessible outside of our cluster. + +### Step 6) Kubernetes Dashboard (GUI) + +To access the Kubernetes dashboard, let’s first service account and assign admin privileges so that it can access dashboard using token. + +Create service account with name ‘admin-user’ in kube-system namespace. + +``` +$ vi dashboard-adminuser.yml +apiVersion: v1 +kind: ServiceAccount +metadata: +  name: admin-user +  namespace: kube-system +``` + +save and close the file. + +``` +$ kubectl apply -f dashboard-adminuser.yml +serviceaccount/admin-user created +$ +``` + +Create a cluster role binding, + +``` +$ vi admin-role-binding.yml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: +  name: admin-user +roleRef: +  apiGroup: rbac.authorization.k8s.io +  kind: ClusterRole +  name: cluster-admin +subjects: +- kind: ServiceAccount +  name: admin-user +  namespace: kube-system +``` + +save and exit the file. + +``` +$ kubectl apply -f admin-role-binding.yml +clusterrolebinding.rbac.authorization.k8s.io/admin-user created +$ +``` + +Now, create the token for admin-user, + +``` +$ kubectl -n kube-system  create token admin-user +``` + +Copy this token and place it somewhere safe because we will use token to login Kubernetes dashboard. + +Connect to first master node from your system using following ssh command + +``` +$ ssh -L8001:localhost:8001 [email protected] +``` + +Note : Replace IP address that suits to your env. + +After login, switch to root user and run ‘kubectl proxy‘ command, + +``` +$ sudo su - +# kubectl proxy +Starting to serve on 127.0.0.1:8001 +``` + +Open the web browser of your system, set the proxy settings as shown below, + +Once you are done with proxy settings, paste the following url in browser, + +http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#/login + +Select the login mechanism as Token and paste the token that you have generated above for admin-user and then click on ‘Sign in’ + +That’s all from this guide, I hope you found it informative. Kindly do post your queries and feedback in below comments section. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/install-kubernetes-using-kubespray/ + +作者:[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/ From 10df9550b33a597b20510f7a2ba3fd9e19098c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:56:46 +0800 Subject: [PATCH 093/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230313.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Mo?= =?UTF-8?q?nitor=20Kubernetes=20cloud=20costs=20with=20open=20source=20too?= =?UTF-8?q?ls.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r Kubernetes cloud costs with open source tools.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md diff --git a/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md b/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md new file mode 100644 index 0000000000..bcb8d097e3 --- /dev/null +++ b/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md @@ -0,0 +1,135 @@ +[#]: subject: "Monitor Kubernetes cloud costs with open source tools" +[#]: via: "https://opensource.com/article/23/3/kubernetes-cloud-cost-monitoring" +[#]: author: "Matt Ray https://opensource.com/users/mattray-0" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Monitor Kubernetes cloud costs with open source tools +====== + +[Kubernetes][1] is a powerful platform for managing dynamic containerized applications in the cloud, but it may be difficult to understand where costs are incurred. Managing the cost efficiency of Kubernetes resources can be a challenge. That's where [OpenCost][2] comes in. OpenCost is a cloud cost monitoring tool that integrates seamlessly with Kubernetes, allowing you to track your cloud spend in real-time so you can optimize your resources accordingly. + +**[ Also read [How to measure the cost of running applications][3] ]** + +OpenCost is an open source [CNCF Sandbox project][4] and [specification][5] for the real-time monitoring of cloud costs associated with Kubernetes deployments. The specification models current and historical Kubernetes cloud spend and resource allocation by service, deployment, namespace, labels, and much more. This data is essential for understanding and optimizing Kubernetes for both cost and performance from the applications down through the infrastructure. + +### Requirements and installation + +Getting started with OpenCost is a relatively straightforward process. OpenCost uses [Prometheus][6] for both monitoring and metric storage. You can install it from the [Prometheus Community Kubernetes Helm Chart][7]. + +#### Install Prometheus + +Begin by installing Prometheus using the following command: + +``` +$ helm install my-prometheus --repo https://prometheus-community.github.io/helm-charts prometheus \ + --namespace prometheus --create-namespace \ + --set pushgateway.enabled=false --set alertmanager.enabled=false -f \ +https://raw.githubusercontent.com/opencost/opencost/develop/kubernetes/prometheus/extraScrapeConfigs.yaml +``` + +#### Install OpenCost + +Next, install OpenCost using the `kubectl` command: + +``` +$ kubectl apply --namespace opencost -f \ +https://raw.githubusercontent.com/opencost/opencost/develop/kubernetes/opencost.yaml +``` + +This command deploys OpenCost to your cluster and starts collecting data. That is all that most installations require. You can [use your own Prometheus][8] installation or customize the deployment with the [OpenCost Helm Chart][9]. + +#### Testing and access + +OpenCost automatically detects whether it runs on AWS, Azure, or GCP, and you can configure it to provide pricing for on-premises Kubernetes deployments. Begin by forwarding ports for API and UI access: + +``` +$ kubectl port-forward --namespace opencost service/opencost 9003 9090 +``` + +Within about five minutes, you can verify the UI and server are running, and you may access the OpenCost UI at **[http://localhost:9090][10]**. + +### Monitor costs + +You are ready to start monitoring your cloud costs with OpenCost deployed to your Kubernetes cluster. The OpenCost dashboard provides real-time visibility into your cloud spend, allowing you to identify cost anomalies and optimize your cloud resources. You can view your cloud spend by nodes, namespaces, pods, tags, and more. + +![OpenCost monitoring console][11] + +The [kubectl cost][12] plugin provides easy CLI queries to Kubernetes cost allocation metrics. It allows developers, operators, and others to determine the cost and efficiency for any Kubernetes workload quickly. + +``` +$ kubectl cost --service-port 9003 \ +--service-name opencost --kubecost-namespace opencost \ +--allocation-path /allocation/compute pod \ +--window 5m --show-efficiency=true + ++-------+---------+-------------+----------+---------------+ +|CLUSTER|NAMESPACE|POD |MONTH RATE|COST EFFICIENCY| ++-------+---------+-------------+----------+---------------+ +|cl-one |kube-syst|coredns-db...| 1.486732 | 0.033660 | +| | |coredns-...dm| 1.486732 | 0.032272 | +| | |kube-prox...7| 1.359577 | 0.002200 | +| | |kube-prox...x| 1.359577 | 0.002470 | +| |opencost |opencost...5t| 0.459713 | 0.187180 | +| |kube-syst|aws-node-cbwl| 0.342340 | 0.134960 | +| | |aws-node-gbfh| 0.342340 | 0.133760 | +| |prometheu|my-prome...pv| 0.000000 | 0.000000 | +| | |my-prome...hn| 0.000000 | 0.000000 | +| | |my-prome...89| 0.000000 | 0.000000 | ++-------+---------+-------------+----------+---------------+ +| SUMMED| | | 6.837011 | | ++-------+---------+-------------+----------+---------------+ +``` + +You can also integrate an API to extract the data programmatically into your platform of choice. + +### Kubernetes optimization strategies + +Now that you have a handle on your cloud costs, it's time to optimize your Kubernetes environment. Optimization is an iterative process. Start at the top of the stack (containers) and work through each layer. The efficiencies compound at each step. There are many ways to optimize Kubernetes for cost efficiency, such as: + +- Look for abandoned workloads and unclaimed volumes: Pods and storage that are no longer in use or are disconnected continue to consume resources without providing value. +- Right-size your workloads: Ensure you're using the right size containers for your workloads. Investigate over- and under-allocated containers. +- Autoscaling: Autoscaling can help you save costs by only using resources when needed. +- Right-size your cluster: Too many or too-large nodes may be inefficient. Finding the right balance between capacity, availability, and performance may greatly reduce costs. +- Investigate cheaper node types: There's a lot of variation in CPU, RAM, networking, and storage. Switching to ARM architectures may unlock even greater savings. +- Invest in a FinOps team: A dedicated team within your organization can look for ways to unlock greater savings by coordinating reserved instances, spot instances, and savings plans. + +### Get started today + +Monitoring costs in a Kubernetes environment can be challenging, but with OpenCost, it doesn't have to be. To get started with OpenCost and take control of your cloud spend, visit the [OpenCost][13] website, get the code in [GitHub][14], check out the [OpenCost documentation][15], and get involved in the **#opencost** channel in the [CNCF Slack][16]. + +**[ Related read [How to prioritize cloud spending][17] ]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/kubernetes-cloud-cost-monitoring + +作者:[Matt Ray][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/mattray-0 +[b]: https://github.com/lkxed/ +[1]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=7013a000002qLH8AAM +[2]: https://www.opencost.io/ +[3]: https://www.redhat.com/architect/hybrid-cloud-cost-tbm?intcmp=7013a000002qLH8AAM +[4]: https://www.cncf.io/projects/opencost/ +[5]: https://github.com/opencost/opencost/blob/develop/spec/opencost-specv01.md +[6]: https://prometheus.io/ +[7]: https://prometheus-community.github.io/helm-charts +[8]: https://www.opencost.io/docs/install#providing-your-own-prometheus +[9]: https://github.com/opencost/opencost-helm-chart/ +[10]: http://localhost:9090 +[11]: https://opensource.com/sites/default/files/2023-03/opencost.png +[12]: https://github.com/kubecost/kubectl-cost +[13]: https://opencost.io/ +[14]: https://github.com/opencost +[15]: https://www.opencost.io/docs/ +[16]: https://slack.cncf.io/ +[17]: https://www.redhat.com/architect/manage-cloud-spending?intcmp=7013a000002qLH8AAM \ No newline at end of file From dd718bda2184e2e27d99adbce86025a0f609c68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:57:35 +0800 Subject: [PATCH 094/318] =?UTF-8?q?Update=2020230313.4=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=E2=AD=90=EF=B8=8F=20Monitor=20Kubernetes=20cloud=20co?= =?UTF-8?q?sts=20with=20open=20source=20tools.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️⭐️ Monitor Kubernetes cloud costs with open source tools.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md b/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md index bcb8d097e3..26bfb2671d 100644 --- a/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md +++ b/sources/tech/20230313.4 ⭐️⭐️ Monitor Kubernetes cloud costs with open source tools.md @@ -12,8 +12,6 @@ Monitor Kubernetes cloud costs with open source tools [Kubernetes][1] is a powerful platform for managing dynamic containerized applications in the cloud, but it may be difficult to understand where costs are incurred. Managing the cost efficiency of Kubernetes resources can be a challenge. That's where [OpenCost][2] comes in. OpenCost is a cloud cost monitoring tool that integrates seamlessly with Kubernetes, allowing you to track your cloud spend in real-time so you can optimize your resources accordingly. -**[ Also read [How to measure the cost of running applications][3] ]** - OpenCost is an open source [CNCF Sandbox project][4] and [specification][5] for the real-time monitoring of cloud costs associated with Kubernetes deployments. The specification models current and historical Kubernetes cloud spend and resource allocation by service, deployment, namespace, labels, and much more. This data is essential for understanding and optimizing Kubernetes for both cost and performance from the applications down through the infrastructure. ### Requirements and installation @@ -132,4 +130,4 @@ via: https://opensource.com/article/23/3/kubernetes-cloud-cost-monitoring [14]: https://github.com/opencost [15]: https://www.opencost.io/docs/ [16]: https://slack.cncf.io/ -[17]: https://www.redhat.com/architect/manage-cloud-spending?intcmp=7013a000002qLH8AAM \ No newline at end of file +[17]: https://www.redhat.com/architect/manage-cloud-spending?intcmp=7013a000002qLH8AAM From 5c976059d35e1ddfa1094a8ada18b4af201086ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 18:59:40 +0800 Subject: [PATCH 095/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230314.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=205?= =?UTF-8?q?=20of=20the=20most=20curious=20uses=20of=20the=20Raspberry=20Pi?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 5 of the most curious uses of the Raspberry Pi.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 sources/tech/20230314.0 ⭐️⭐️ 5 of the most curious uses of the Raspberry Pi.md diff --git a/sources/tech/20230314.0 ⭐️⭐️ 5 of the most curious uses of the Raspberry Pi.md b/sources/tech/20230314.0 ⭐️⭐️ 5 of the most curious uses of the Raspberry Pi.md new file mode 100644 index 0000000000..8e8cc7e39d --- /dev/null +++ b/sources/tech/20230314.0 ⭐️⭐️ 5 of the most curious uses of the Raspberry Pi.md @@ -0,0 +1,84 @@ +[#]: subject: "5 of the most curious uses of the Raspberry Pi" +[#]: via: "https://opensource.com/article/23/3/most-curious-uses-raspberry-pi" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 of the most curious uses of the Raspberry Pi +====== + +Recently, I was on a call where it was said that the open source community is a combination of curiosity and a culture of solutions. And curiosity is the basis of our problem-solving. We use a lot of open source when solving problems of all sizes, and that includes [Linux][1] running on the supremely convenient Raspberry Pi. + +We all have such different lived experiences, so I asked our community of writers about the most curious use of a Raspberry Pi they've ever encountered. I have a hunch that some of these fantastic builds will spark an idea for others. + +### Experimentation with the Raspberry Pi + +For me, the Raspberry Pi has been a great tool to add extra development resources on my home network. If I want to [create a new website][2] or experiment with a new software tool, I don't have to bog down my desktop Linux machine with a bunch of packages that I might only use once while experimenting. Instead, I set it up on my Raspberry Pi. + +If I think I'm going to do something risky, I use a backup boot environment. I have two microSD cards, which allows me to have one plugged into the Raspberry Pi while I set up the second microSD to do whatever experimenting I want to do. The extra microSD doesn't cost that much, but it saves a ton of time for the times when I want to experiment on a second image. Just shutdown, swap microSD cards, reboot, and immediately I'm working on a dedicated test system. + +When I'm not experimenting, my Raspberry Pi acts as a print server to put my non-WiFi printer on our home network. It is also a handy file server over SSH so that I can make quick backups of my important files. + +**— [Jim Hall][3]** + +### The popularity of the Raspberry Pi + +The most amazing thing I've seen about the Raspberry Pi is that it normalized and commoditized the idea of the small-board computers and made them genuinely and practically available to folks. + +Before the Raspberry Pi, we had small-board computers in a similar fashion, but they tended to be niche, expensive, and nigh unapproachable from a software perspective. The Raspberry Pi was cheap, and cheap to the point of making it trivial for anyone to get one for a project (ignoring the current round of unobtainium it's been going through). Once it was cheap, people worked around the software challenges and made it good enough to solve many basic computing tasks, down to being able to dedicate a full and real computer to a task, not just a microcontroller. + +We've got a plethora of good, cheap-ish, small-board computers, and this gives way to tinkering, toying, and [experimenting][4]. People are willing to try new ideas, even spurring more hobbyist hardware development to support these ideas. + +Honestly, that is by far the most amazing and radical thing I've seen from the Raspberry Pi: how it's fundamentally changed everyone's perception of what computing, at the level of what the Raspberry Pi excels at anyway, is and given rise not only to its own ecosystem but now countless others in diversity. + +**— [John ‘Warthog9' Hawley][5]** + +### Raspberry Pi for the bees + +In 2018, my younger brother and I used to have several beehives and used a Raspberry Pi and various sensors to monitor the temperature and humidity of our hives. We also planned to implement a hive scale to observe honey production in summer and measure the weight in winter to see if the bees had enough food left. We never got around to doing that. + +Our little monitoring solution was based on a Raspberry Pi 2 Model B, ran Raspbian Stretch (based on Debian 9), and had a temperature and humidity sensor connected (DHT11). We had three or four of those sensors in the hives to measure the temperature at the entrance hole, under the lid, and in the lowest frame. We connected the sensor directly to the Pi and used the Python_DHT sensor library to read the data. We also set up [InfluxDB][6], Telegraf, and finally, [Grafana][7] to visualize the data. + +If you want to know more about our setup, we published an article on our little monitoring solution in [Linux Magazine][8]. + +**— [Heike Jurzik][9]** + +### Go retro with the Raspberry Pi + +One thing I would love to create with the Raspberry Pi is a simulation of how to program machine language into an old-style computer using "switches and lights." This looks to be fairly straightforward using the GPIO pins on the Raspberry Pi. For example, their online manual shows examples of how to use GPIO to switch an LED on and off or to use buttons to get input. I think it should be possible with some LEDs and switches, plus a small program running on the Raspberry Pi to emulate the old-style computer. But I lack the free time to work on a project like this, which is why I wrote the [Toy CPU][10] to emulate it. + +**— [Jim Hall][3]** + +### Build a toy with the Raspberry Pi + +When my daughter was four, she asked for a "Trolls music box" for Christmas. She could picture it perfectly in her head. It would be pink and sparkly with her name on it. When she opened the box, the theme song from the popular movie would play. She could store her trolls and other treasures in the box. After searching everywhere online and in stores, I could not find one that measured up to her imagination. My husband and I decided we could build one ourselves in our own toyshop (i.e., his home office). The center of it all was, of course, the Raspberry Pi. He used light sensors and a Python script to make the song play at just the right moment. We placed the tech discreetly in the bottom of the music box and decorated it with her aesthetic in mind. That year, holiday magic was made possible with open source! + +**— [Lauren Pritchett][11]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/most-curious-uses-raspberry-pi + +作者:[AmyJune Hineline][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/amyjune +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/19/3/learn-linux-raspberry-pi +[2]: https://opensource.com/article/22/3/run-drupal-raspberry-pi +[3]: https://opensource.com/users/jim-hall +[4]: https://opensource.com/article/20/8/kubernetes-raspberry-pi +[5]: https://opensource.com/users/warthog9 +[6]: https://opensource.com/article/17/8/influxdb-time-series-database-stack +[7]: https://opensource.com/article/21/3/raspberry-pi-grafana-cloud +[8]: https://www.linux-magazine.com/index.php/layout/set/print/Issues/2018/214/Monitoring-Beehives +[9]: https://opensource.com/users/hej +[10]: https://opensource.com/article/23/1/learn-machine-language-retro-computer +[11]: https://opensource.com/users/lauren-pritchett \ No newline at end of file From 16d281f986f3515eb8fb8d62d4ca4640935b5449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:00:05 +0800 Subject: [PATCH 096/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230314.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ca?= =?UTF-8?q?lculate=20pi=20by=20counting=20pixels.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....1 ⭐️⭐️ Calculate pi by counting pixels.md | 212 ++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 sources/tech/20230314.1 ⭐️⭐️ Calculate pi by counting pixels.md diff --git a/sources/tech/20230314.1 ⭐️⭐️ Calculate pi by counting pixels.md b/sources/tech/20230314.1 ⭐️⭐️ Calculate pi by counting pixels.md new file mode 100644 index 0000000000..05ca5dae8c --- /dev/null +++ b/sources/tech/20230314.1 ⭐️⭐️ Calculate pi by counting pixels.md @@ -0,0 +1,212 @@ +[#]: subject: "Calculate pi by counting pixels" +[#]: via: "https://opensource.com/article/23/3/calculate-pi-counting-pixels" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Calculate pi by counting pixels +====== + +For Pi Day this year, I wanted to write a program to calculate pi by drawing a circle in [FreeDOS][1] graphics mode, then counting pixels to estimate the circumference. I naively assumed that this would give me an approximation of pi. I didn't expect to get 3.14, but I thought the value would be somewhat close to 3.0. + +I was wrong. Estimating the circumference of a circle by counting the pixels required to draw it will give you the wrong result. No matter what resolution I tried, the final pi calculation of _circumference divided by diameter_ was always around 2.8. + +### You can't count pixels to calculate pi + +I wrote a FreeDOS program using OpenWatcom C that draws a circle to the screen, then counts the pixels that make up that circle. I wrote it in FreeDOS because DOS programs can easily enter graphics mode by using the OpenWatcom `_setvideomode` function. The `_VRES16COLOR` video mode puts the display into 640×680 resolution at 16 colors, a common "classic VGA" screen resolution. In the [standard 16 color DOS palette][2], color 0 is black, color 1 is blue, color 7 is a low intensity white, and color 15 is a high intensity white. + +In graphics mode, you can use the `_ellipse` function to draw an ellipse to the screen, from some starting x,y coordinate in the upper left to a final x,y coordinate in the lower right. If the height and width are the same, the ellipse is a circle. Note that in graphics mode, x and y count from zero, so the upper left corner is always 0,0. + +![Drawing a white circle in VGA mode][3] + +You can use the `_getpixel` function to get the color of a pixel at a specified x,y coordinate on the screen. To show the progress in my program, I also used the `_setpixel` function to paint a single pixel at any x,y on the screen. When the program found a pixel that defined the circle, I changed that pixel to bright white. For other pixels, I set the color to blue. + +![After evaluating the pixels, the background is blue and the circle is bright white.][4] + +With these graphics functions, you can write a program that draws a circle to the screen, then iterates over all the x,y coordinates of the circle to count the pixels. For any pixel that is color 7 (the color of the circle), add one to the pixel count. At the end, you can use the total pixel count as an estimate of the circumference: + +``` +#include +#include + +int +main() +{ + unsigned long count; + int x, y; + + /* draw a circle */ + + _setvideomode(_VRES16COLOR); /* 640x480 */ + _setcolor(7); /* white */ + _ellipse(_GBORDER, 0, 0, 479, 479); + + /* count pixels */ + + count = 0; + + for (x = 0; x <= 479; x++) { + for (y = 0; y <= 479; y++) { + if (_getpixel(x, y) == 7) { + count++; + /* highlight the pixel */ + _setcolor(15); /* br white */ + _setpixel(x, y); + } + else { + /* highlight the pixel */ + _setcolor(1); /* blue */ + _setpixel(x, y); + } + } + } + + /* done */ + + _setvideomode(_DEFAULTMODE); + + printf("pixel count (circumference?) = %lu\n", count); + puts("diameter = 480"); + printf("pi = c/d = %f\n", (double) count / 480.0); + + return 0; +} +``` + +But counting pixels to determine the circumference underestimates the actual circumference of the circle. Because pi is the ratio of the circumference of a circle to its diameter, my pi calculation was noticeably lower than 3.14. I tried several video resolutions, and I always got a final result of about 2.8: + +``` +pixel count (circumference?) = 1356 +diameter = 480 +pi = c/d = 2.825000 +``` + +### You need to measure the distance between pixels to get pi + +The problem with counting pixels to estimate the circumference is that the pixels are only a _sample_ of a circular drawing. Pixels are discrete points in a grid, while a circle is a continuous drawing. To provide a better estimate of the circumference, you must measure the _distance between pixels_ and use that total measurement for the circumference. + +To update the program, you must write a function that calculates the distance between any two pixels: x0,y0 and x,y. You don't need a bunch of fancy math or algorithms here, just the knowledge that the OpenWatcom `_ellipse` function draws only solid pixels in the color you set for the circle. The function doesn't attempt to provide _antialiasing_ by drawing nearby pixels in some intermediate color. That allows you to simplify the math. In a circle, pixels are always directly adjacent to one another: vertically, horizontally, or diagonally. + +For pixels that are vertically or horizontally adjacent, the pixel "distance" is simple. It's a distance of **1**. + +For pixels that are diagonally adjacent, you can use the Pythagorean theorem of a²+b²=c² to calculate the distance between two diagonal pixels as the square root of **2**, or approximately **1.414**. + +``` +double +pixel_dist(int x0, int y0, int x, int y) +{ + if (((x - x0) == 0) && ((y0 - y) == 1)) { + return 1.0; + } + + if (((y0 - y) == 0) && ((x - x0) == 1)) { + return 1.0; + } + + /* if ( ((y0-y)==1) && ((x-x0)==1) ) { */ + return 1.414; + /* } */ +} +``` + +I wrapped the last "if" statement in comments so you can see what the condition is supposed to represent. + +To measure the circumference, we don't need to examine the entire circle. We can save a little time and effort by working on only the upper left quadrant. This also allows us to know the starting coordinate of the first pixel in the circle; we'll skip the first pixel at 0,239 and instead assume that as our first x0,y0 coordinate in measuring the quarter-circumference. + +![The program only needs to evaluate the upper left quadrant of the circle.][5] + +The final program is similar to our "count the pixels" program, but instead measures the tiny distances between pixels in the upper left quadrant of the circle. You may notice that the program counts _down_ the y coordinates, from 238 to 0. This accommodates the assumption that the known starting x0,y0 coordinate in the quarter-circle is 0,239. With that assumption, the program only needs to evaluate the y coordinates between 0 and 238. To estimate the total circumference of the circle, multiply the quarter-measurement by 4: + +``` +#include +#include + +double +pixel_dist(int x0, int y0, int x, int y) +{ +... +} + +int +main() +{ + double circum; + int x, y; + int x0, y0; + + /* draw a circle */ + + _setvideomode(_VRES16COLOR); /* 640x480 */ + _setcolor(7); /* white */ + _ellipse(_GBORDER, 0, 0, 479, 479); + + /* calculate circumference, use upper left quadrant only */ + + circum = 0.0; + + x0 = 0; + y0 = 479 / 2; + + for (x = 0; x <= 479 / 2; x++) { + for (y = (479 / 2) - 1; y >= 0; y--) { + if (_getpixel(x, y) == 7) { + circum += pixel_dist(x0, y0, x, y); + + x0 = x; + y0 = y; + + /* highlight the pixel */ + _setcolor(15); /* br white */ + _setpixel(x, y); + } + else { + /* highlight the pixel */ + _setcolor(1); /* blue */ + _setpixel(x, y); + } + } + } + + circum *= 4.0; + + /* done */ + + _setvideomode(_DEFAULTMODE); + + printf("circumference = %f\n", circum); + puts("diameter = 480"); + printf("pi = c/d = %f\n", circum / 480.0); + + return 0; +} +``` + +This provides a better estimate of the circumference. It's still off by a bit, because measuring a circle using pixels is still a pretty rough approximation, but the final pi calculation is much closer to the expected value of 3.14: + +``` +circumference = 1583.840000 +diameter = 480 +pi = c/d = 3.299667 +``` + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/calculate-pi-counting-pixels + +作者:[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/downloads/guide-using-freedos +[2]: https://opensource.com/article/21/6/freedos-sixteen-colors +[3]: https://opensource.com/sites/default/files/2023-03/1000000000000280000001E0F6AC941D0C3A4F04.webp +[4]: https://opensource.com/sites/default/files/2023-03/1000000000000280000001E01BA6891AE7373404.webp +[5]: https://opensource.com/sites/default/files/2023-03/1000000000000280000001E09B0AAA422BFA0296.webp \ No newline at end of file From e9fb9faeb11ef9dd857456754289072822dd5ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:00:32 +0800 Subject: [PATCH 097/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230314.2=20=E2=AD=90=EF=B8=8F=20How=20I=20destroyed?= =?UTF-8?q?=20my=20Raspberry=20Pi.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...14.2 ⭐️ How I destroyed my Raspberry Pi.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md diff --git a/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md b/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md new file mode 100644 index 0000000000..0624433c85 --- /dev/null +++ b/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md @@ -0,0 +1,63 @@ +[#]: subject: "How I destroyed my Raspberry Pi" +[#]: via: "https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I destroyed my Raspberry Pi +====== + +I wanted to write an article demonstrating "How to automate XYZ with the Raspberry Pi" or some other interesting, curious, or useful application around the Raspberry Pi. As you might realize from the title, I cannot offer such an article anymore because I destroyed my beloved Raspberry Pi. + +The Raspberry Pi is a standard device on every technology enthusiast's desk. As a result, tons of tutorials and articles tell you what you can do with it. This article instead covers the dark side: I describe what you had better not do! + +### Cable colors + +I want to provide some background before I get to the actual point of destruction. You have to deal with different cable colors when doing electrical work in and around the house. Here in Germany, each house connects to the three-phase AC supply grid, and you usually find the following cable colors: + +- Neutral conductor: Blue +- (PE) Protective conductor: Yellow-green +- (L1) Phase 1: Brown +- (L2) Phase 2: Black +- (L3) Phase 3: Grey + +For example, when wiring a lamp, you pick up neutral (N, blue) and phase (L, 1/3 chance that it is brown), and you get 230V AC between them. + +### Wiring the Raspberry Pi + +Earlier this year, I wrote an article about [OpenWrt, an open source alternative to firmware for home routers][1]. In the article, I used a TP-link router device. However, the original plan was to use my Raspberry Pi model 4. + +![OpenWrt and Raspberry Pi comparison][2] + +The idea was to build a travel router that I could install in my caravan to improve the internet connectivity at a campsite (I'm the kind of camper who can't do without the internet). To do so, I added a separate USB-Wifi-dongle to my Raspberry Pi to connect a second Wifi antenna and installed [OpenWrt][3]. Additionally, I added a 12V-to-5V DC/DC converter to connect with the 12V wiring in the caravan. I tested this setup with a 12V vehicle battery on my desk, and it worked as expected. After everything was set up and configured, I started to install it in my caravan. + +In my caravan, I found a blue and a brown wire, connected it with the 12V-to-5V DC/DC converter, put the fuses back in, and… + +![DC converter device][4] + +The chip, which disassembled itself, is the actual step-down transformer. I was so confident that the blue wire was on 0V potential and the brown one was on 12V that I didn't even measure. I have since learned that the blue cable is on 12V, and the brown cable is on ground potential (which is pretty common in vehicle electronics). + +### Wrap up + +Since this accident, my Raspberry Pi has never booted up. Because the prices for the Raspberry Pi have skyrocketed, I had to find an alternative. Luckily, I came across the TP-Link travel router, which can also run Open-WRT and does its job satisfactorily. In closing: It's better to measure too often than one time too few. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi + +作者:[Stephan Avenwedde][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/hansic99 +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/22/7/openwrt-open-source-firmware +[2]: https://opensource.com/sites/default/files/2023-03/OpenWrt_Comparison_RaspberryPi.jpg +[3]: https://openwrt.org/ +[4]: https://opensource.com/sites/default/files/2023-03/dc_converter.png \ No newline at end of file From 4ff7e98c8c33232aac6e445bcdfa12c916f53601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:05:19 +0800 Subject: [PATCH 098/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230314.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Co?= =?UTF-8?q?ntrol=20your=20Raspberry=20Pi=20with=20Lua.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...⭐️⭐️ Control your Raspberry Pi with Lua.md | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 sources/tech/20230314.3 ⭐️⭐️ Control your Raspberry Pi with Lua.md diff --git a/sources/tech/20230314.3 ⭐️⭐️ Control your Raspberry Pi with Lua.md b/sources/tech/20230314.3 ⭐️⭐️ Control your Raspberry Pi with Lua.md new file mode 100644 index 0000000000..e38102984e --- /dev/null +++ b/sources/tech/20230314.3 ⭐️⭐️ Control your Raspberry Pi with Lua.md @@ -0,0 +1,139 @@ +[#]: subject: "Control your Raspberry Pi with Lua" +[#]: via: "https://opensource.com/article/23/3/control-your-raspberry-pi-lua" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Control your Raspberry Pi with Lua +====== + +Lua is a sometimes misunderstood language. It’s different from other languages, like Python, but it’s a versatile extension language that’s widely used in game engines, frameworks, and more. Overall, I find Lua to be a valuable tool for developers, letting them enhance and expand their projects in some powerful ways. + +You can download and run stock Lua as Seth Kenlon explained in his article [Is Lua worth learning][1], which includes simple Lua code examples. However, to get the most out of Lua, it’s best to use it with a framework that has already adopted the language. In this tutorial, I demonstrate how to use a framework called Mako Server, which is designed for enabling Lua programmers to easily code IoT and web applications. I also show you how to extend this framework with an API for working with the Raspberry Pi’s GPIO pins. + +### Requirements + +Before following this tutorial, you need a running Raspberry Pi that you can log into. While I will be compiling C code in this tutorial, you do not need any prior experience with C code. However, you do need some experience with a [POSIX][2] terminal. + +### Install + +To start, open a terminal window on your Raspberry Pi and install the following tools for downloading code using Git and for compiling C code: + +``` +$ sudo apt install git unzip gcc make +``` + +Next, compile the open source Mako Server code and the Lua-periphery library (the Raspberry Pi GPIO library) by running the following command: + +``` +$ wget -O Mako-Server-Build.sh +https://raw.githubusercontent.com/RealTimeLogic/BAS/main/LinuxBuild.sh \ +``` + +Review the script to see what it does, and run it once you’re comfortable with it: + +``` +$ sh ./Mako-Server-Build.sh +``` + +The compilation process may take some time, especially on an older Raspberry Pi. Once the compilation is complete, the script asks you to install the Mako Server and the lua-periphery module to `/usr/local/bin/`. I recommend installing it to simplify using the software. Don’t worry, if you no longer need it, you can uninstall it: + +``` +$ cd /usr/local/bin/ +$ sudo rm mako mako.zip periphery.so +``` + +To test the installation, type `mako` into your terminal. This starts the Mako Server, and see some output in your terminal. You can stop the server by pressing **CTRL+C**. + +### IoT and Lua + +Now that the Mako Server is set up on your Raspberry Pi, you can start programming IoT and web applications and working with the Raspberry Pi’s GPIO pins using Lua. The Mako Server framework provides a powerful and easy API for Lua developers to create IoT applications and the lua-periphery module lets Lua developers interact with the Raspberry Pi’s GPIO pins and other peripheral devices. + +Start by creating an application directory and a `.preload` script, which inserts Lua code for testing the GPIO. The `.preload` script is a Mako Server extension that’s loaded and run as a Lua script when an application is started. + +``` +$ mkdir gpiotst +$ nano gpiotst/.preload +``` + +Copy the following into the [Nano editor][3] and save the file: + +``` +-- Load periphery.so and access the LED interface +local LED = require('periphery').LED + +local function doled() + local led = LED("led0") -- Open LED led0 + trace"Turn LED on" + led:write(true) -- Turn on LED (set max brightness) + ba.sleep(3000) -- 3 seconds + trace"Turn LED off" + led:write(false) -- Turn off LED (set zero brightness) + led:close() +end + +ba.thread.run(doled) -- Defer execution + -- to after Mako has started +``` + +The above Lua code controls the main Raspberry Pi LED using the Lua-periphery library you compiled and included with the Mako Server. The script defines a single function called `doled` that controls the LED. The script begins by loading the `periphery` library (the shared library periphery.so) using the Lua `require` function. The returned data is a [Lua table][4] with all GPIO API functions. However, you only need the LED API, and you directly access that by appending `.LED` after calling `require`. Next, the code defines a function called `doled` that does the following: + +- Opens the Raspberry Pi main LED identified as `led0` by calling the `LED` function from the `periphery` library and by passing it the string `led0`. +- Prints the message `Turn LED on` to the trace (the console). +- Activates the LED by calling the `write` method on the LED object and passing it the Boolean value `true`, which sets the maximum brightness of the LED. +- Waits for 3 seconds by calling `ba.sleep(3000)`. +- Prints the message `Turn LED off` to the trace. +- Deactivates the LED by calling the `write` method on the LED object and passing it the Boolean value `false`, which sets zero brightness of the LED. +- Closes the `LED` by calling the `close` function on the LED object. + +At the end of the `.preload` script, the `doled` function is passed in as argument to function `ba.thread.run`. This allows the execution of the `doled` function to be deferred until after Mako Server has started. + +To start the `gpiotst` application, run the Mako Server as follows: + +``` +$ mako -l::gpiotst +``` + +The following text is printed in the console: + +``` +Opening LED: +opening 'brightness': Permission denied. +``` + +Accessing GPIO requires root access, so stop the server by pressing **CTRL+C** and restart the Mako Server as follows: + +``` +$ sudo mako -l::gpiotst +``` + +Now the Raspberry Pi LED turns on for 3 seconds. Success! + +### Lua unlocks IoT + +In this primer, you learned how to compile the Mako Server, including the GPIO Lua module, and how to write a basic Lua script for turning the Raspberry Pi LED on and off. I’ll cover further IoT functions, building upon this article, in future articles. + +You may in the meantime delve deeper into the Lua-periphery GPIO library by reading its [documentation][5] to understand more about its functions and how to use it with different peripherals. To get the most out of this tutorial, consider following the [interactive Mako Server Lua tutorial][6] to get a better understanding of Lua, web, and IoT. Happy coding! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/control-your-raspberry-pi-lua + +作者:[Alan Smithee][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/alansmithee +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/22/11/lua-worth-learning +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/article/20/12/gnu-nano +[4]: https://opensource.com/article/22/11/iterate-over-tables-lua +[5]: https://github.com/vsergeev/lua-periphery/tree/master/docs +[6]: https://tutorial.realtimelogic.com/Introduction.lsp \ No newline at end of file From 93995ebe3af1f93ce648f46226d3956e2260927f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:06:23 +0800 Subject: [PATCH 099/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230314.4=20=E2=AD=90=EF=B8=8F=20Kali=20Linux=20Intro?= =?UTF-8?q?duces=20=E2=80=9CKali=20Purple=E2=80=9D=20for=20Defensive=20Sec?= =?UTF-8?q?urity=20Hardening.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Kali Purple” for Defensive Security Hardening.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md diff --git a/sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md b/sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md new file mode 100644 index 0000000000..d80e6f0004 --- /dev/null +++ b/sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md @@ -0,0 +1,112 @@ +[#]: subject: "Kali Linux Introduces “Kali Purple” for Defensive Security Hardening" +[#]: via: "https://debugpointnews.com/kali-linux-2023-1/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kali Linux Introduces “Kali Purple” for Defensive Security Hardening +====== + +**Kali Linux 2023.1 is released with major updates and introduces a new variant, “Kali Purple”.** + +![Kali Linux 2023.1 Desktop][1] + +It’s Kali Linux’s 10th anniversary. And the team have a few goodies for you. Kali Linux 2023.1 is the usual package refresh of Kali Linux, which is arriving with the latest desktop environments and mainline Kernel updates. + +### Kali Linux 2023.1: Introducing Kali Purple + +The major highlight of this release is the [“Kali Purple”][2], a new variant of Kali Linux with tools for “defensive security”. Kali team is currently releasing it as a technical preview. + +Defensive security software enables security hardening in various areas, such as vulnerability scan, incident tracking and response, packet capture, intrusion detection and more. You can now use Kali Purple with all the tools built in for your application or enterprise. + +![You have the option to choose defensive packages during installation][3] + +Kali Purple is bringing in 100+ defensive tools, documentation, Kali CoPilot for automated attack script builder and many more tools. + +- [Arkime][4] – Full packet capture and analysis +- [CyberChef][5] – The cyber swiss army knife +- `Elastic Security` – Security Information and Event Management +- [GVM][6] – Vulnerability scanner +- [TheHive][7] – Incident response platform +- `Malcolm` – Network traffic analysis tool suite +- [Suricata][8] – Intrusion Detection System +- [Zeek][9] – (another) Intrusion Detection System + +Furthermore, to align with the guidelines of “National Institute of Standards and Technology Critical Infrastructure Cybersecurity (NISF CSF)”, separate menu items are configured for you. It includes separate applications with categories – Identify, Protect, Detect, Respond and Recover. + +![New menu groups as per CISF NSF guideline][10] + +In addition, a separate discord channel is created for Kali Purple for collaboration and additional help for the community. + +### Pip changes in Python + +Python pip command is undergoing a change in Debian 12 Bookworm release (upcoming). The pip command is used to install Python modules. Since the modules are installed externally using pip, it might break the existing Debian installation. + +Hence, from Debian 12 onwards, if you try to install any module using pip – you should get an “externally-managed-environment” error. See below. + +![You can install using pip in Kali and Debian][11] + +The Kali Linux team is providing a patch from this release onwards to enable you to install any module using pip. But it is temporary until the Debian 12 stable release. + +So, if you are a developer using a Python environment in Kali Linux (or in Debian), you should definitely plan to deploy the modules using the apt command as below. + +``` +apt install python3-numpy +``` + +### Desktop environment and other updates + +The default desktop Xfce now features Xfce 4.18 version, which brings massive features, including split view, image preview and others in Thunar file managers. Also, the KDE Plasma edition now arrives with version 5.27 in Kali Linux 2023.1. + +The default theme in the Xfce edition is improved with stunning looks; many new wallpapers are also included in this version. + +Finally, the mainline Kernel 6.1 is now available in this release, providing the latest hardware, CPU, GPU and other supports. + +### Download + +If you are already running Kali Linux, simply run the system upgrade to get this release. + +``` +sudo apt update && sudo apt upgrade -y +``` + +For new downloads, visit the below page to get the ISO. + +[Download Kali Linux][12] + +If you want to try out Kali Purple, visit the below page. + +[Download Kali Purple ISO][13] + +_Via [announcement][14]_ + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/kali-linux-2023-1/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/03/Kali-Linux-2023.1-Desktop.jpg +[2]: https://gitlab.com/kalilinux/kali-purple/documentation/-/wikis/home +[3]: https://debugpointnews.com/wp-content/uploads/2023/03/You-have-the-option-to-choose-defensive-packages-during-installation.jpg +[4]: https://pkg.kali.org/pkg/arkime +[5]: https://pkg.kali.org/pkg/cyberchef +[6]: https://www.kali.org/tools/gvm/ +[7]: https://pkg.kali.org/pkg/thehive +[8]: https://pkg.kali.org/pkg/suricata +[9]: https://pkg.kali.org/pkg/zeek +[10]: https://debugpointnews.com/wp-content/uploads/2023/03/New-menu-groups-as-per-CISF-NSF-guideline.jpg +[11]: https://debugpointnews.com/wp-content/uploads/2023/03/You-can-install-using-pip-in-Kali-and-Debian.jpg +[12]: https://www.kali.org/get-kali/#kali-installer-images +[13]: https://cdimage.kali.org/kali-2023.1/kali-linux-2023.1-installer-purple-amd64.iso +[14]: https://www.kali.org/blog/kali-linux-2023-1-release/ \ No newline at end of file From 7b0b0601bfe48c4727fbd64f935f45d3e0346596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:06:54 +0800 Subject: [PATCH 100/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230315.0=20=E2=AD=90=EF=B8=8F=20Input=20Function=20i?= =?UTF-8?q?n=20Python=20Concepts=20and=20Examples.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ut Function in Python Concepts and Examples.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md diff --git a/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md b/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md new file mode 100644 index 0000000000..0660cbc8a4 --- /dev/null +++ b/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md @@ -0,0 +1,127 @@ +[#]: subject: "Input Function in Python: Concepts and Examples" +[#]: via: "https://www.debugpoint.com/input-function-python/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Input Function in Python: Concepts and Examples +====== + +**In this article, I will explain the basics of the Input function of Python with some easy-to-understand examples.** + +![][1] + +Python is one of the most popular programming languages in the world, and it is widely used in various applications. One of the basic concepts in Python is the `Input()` function, which allows users to interact with the program by providing input values. + +Let’s find out the input function, how it works, and how you can use it effectively in your Python programs. + +Before you start, I hope you have Python installed and set up a basic editor. If not, do refer to my below guides: + +- [How to Install Python 3.11 on Ubuntu/Linux][2] +- [How to install Python on Windows][3] +- [How to set up the IDLE editor for Python][4] + +### Python Input Function + +The input function in Python is used to accept user input as a string. It prompts the user to enter a value and waits for the user to provide input. The user’s input is then stored as a string in a variable, which can be used later in the program. + +#### Syntax + +``` +input("your message to user") +``` + +When you run the input function, it shows the message to the user and _waits_ for input. The cursor waits. Once the user enters input and presses enter, the input function reads the user’s input. The value is stored in the variable you specify. + +Let’s see a few examples. + +### Example 1: Simple Input function usage + +The following code snippet takes input and shows the output with an additional string. + +``` +your_name = input("Enter your name:")print("Hello " + your_name) +``` + +**Output:** + +``` +Enter your name:arindamHello arindam +``` + +![Python Input function - a simple example][5] + +Example 2: Taking input as integer and float + +You can also convert the input as int() or float() at runtime while using input() function. Here is an example. + +``` +no_of_books = int(input("Enter total books ordered:")) +print ("Total number of books:", no_of_books) + +price_of_each_book = float(input("Enter unit price:")) +print ("Total price:", no_of_books * price_of_each_book) +``` + +Output: + +``` +Enter total books ordered:5 +Total number of books: 5 +Enter unit price:10.1 +Total price: 50.5 +``` + +### Example 4: Joining lists + +You can also use other functions, such as lists, to accept a set of values and convert them as [lists][6] in Python. Here’s an example which takes input and converts it to a list. Then used, another set of values and appended to the first list. + +``` +# take input for first list +list_1 = list(input("Enter numbers for list 1:")) + +#take input for second list +list_2 = list(input("Enter some letters for list 2:")) + +#loop through the second list and add to first list +for j in list_2: + list_1.append(j) + +#print the modified first list +print(list_1) +``` + +**Output:** + +``` +Enter numbers for list 1:1234 +Enter some letters for list 2:ABCD +['1', '2', '3', '4', 'A', 'B', 'C', 'D'] +``` + +### Conclusion + +I hope this simple guide clarifies the input() function with several examples. It’s a powerful function to accept values from standard input for simple use cases. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/input-function-python/ + +作者:[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/2023/03/pyinput.jpg +[2]: https://www.debugpoint.com/install-python-3-11-ubuntu/ +[3]: https://www.debugpoint.com/install-python-windows/ +[4]: https://www.debugpoint.com/install-idle-ubuntu-linux/ +[5]: https://www.debugpoint.com/wp-content/uploads/2023/03/Python-Input-function-a-simple-example.jpg +[6]: https://docs.python.org/3/library/stdtypes.html?highlight=list#lists \ No newline at end of file From 6b3d0cb995ac3fa5e4ebe2b8d0ebcb49213adcff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:13:23 +0800 Subject: [PATCH 101/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230315.1=20=E2=AD=90=EF=B8=8F=20How=20to=20know=20if?= =?UTF-8?q?=20You=20are=20Behind=20a=20Proxy=20Server.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ow to know if You are Behind a Proxy Server.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md diff --git a/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md b/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md new file mode 100644 index 0000000000..dfa09d8384 --- /dev/null +++ b/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md @@ -0,0 +1,144 @@ +[#]: subject: "How to know if You are Behind a Proxy Server?" +[#]: via: "https://itsfoss.com/check-proxy-server/" +[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to know if You are Behind a Proxy Server? +====== + +**What is a proxy?** + +A proxy is a server or software application that acts as an intermediary between a client and another server. It serves as a gateway between the client and the internet and allows users to access online resources while keeping their identity, location, and other personal information hidden. + +Proxies are often used to enhance security, privacy, and add filters/firewall to your network. + +There are several types of proxies like HTTP Proxy, SOCKS Proxy, Transparent Proxy, etc. + +Unless you are behind a transparent proxy, it is effortless to check. Here, I shall discuss methods to detect both the transparent proxy and the usual proxies in use. + +### How to check if you are behind a Transparent proxy + +While each type of proxy has its features and functionalities, if it's a transparent proxy, you won't be able to detect it on the client's PC. This is because the transparent proxy operates silently in the background, intercepting all traffic without modifying it. + +Occasionally, it could be your internet service provider and the Content Delivery Networks that use these to cache a copy of a resource to save bandwidth on their end or just to monitor/filter the network. + +There are several ways to check if you are behind a transparent proxy: + +- **The IP address obtained through some online IP detect/check websites may not match the IP address of your computer or device.** Because the proxy server is intercepting your traffic and sending it out with its IP address. +- **Check your network settings to see if there is a proxy server configured.** +- **Take the help of some online Proxy detection tools.** +- **Connect to a server that you know does not exist.** If the error displayed on the webpage looks different from usual, you might be behind a proxy. + +Whether you like it or not, you can always bypass the transparent proxy using a [VPN service][1]. + +### How to check if you are behind a proxy on Ubuntu + +Ubuntu, or any other Linux distribution, offers several ways to check this. Here, Ubuntu 22.10 running GNOME is used for the purpose. + +#### Using GNOME Settings + +This is the straightforward GUI way. Open the GNOME settings and go to the Networks tab and press the gear icon, adjacent to it. + +![Select the gear icon adjacent to the Network proxy section][2] + +It should be **off by default**. + +If you are behind a proxy, you can get a different status here. Inside the proxy settings, you can see that, I am using a proxy here (manually configured). + +![Proxy details in GNOME Settings][3] + +The same status of proxies can be changed using the gsettings command in GNOME DE. + +``` +gsettings set org.gnome.system.proxy mode 'none' +``` + +You can replace the `none` with `auto` or `manual`. Remember that, this setting is temporary and only for the current user. + +#### Using the Command line + +You can get the status of proxies through the command line in various ways. + +**Getting the status of the proxy by listing the associated environment variables** + +Open a terminal and run either of the following commands: + +``` +env | grep -i proxy +``` + +``` +cat /etc/environment | grep -i proxy +``` + +``` +set | grep -i proxy +``` + +![Using set command to check Proxy variables][4] + +An empty output means that, there are no proxies configured. Else, it will print the relevant ENV variables. + +🚧 + +Note that this will work if you set the proxy as an environment variable. + +Alternatively, you can echo each proxy variable to check whether that particular one is set. + +Here's what you can type in the terminal: + +``` +echo $http_proxy +``` + +**Check using nmcli command** + +Open a terminal and issue the command: + +``` +nmcli connection show +``` + +![List all the connections using nmcli command][5] + +This will list your connections and the associated UUID numbers. Note the UUID number of the connection, you want to check. Then use the command: + +``` +nmcli connection show | grep -i "proxy" +``` + +This will list the variables, where, you can note the proxy server and the port. + +![Proxy details using nmcli command][6] + +### Wrapping Up + +I hope this guide helps you know if you are behind a proxy. + +I must mention that **not all proxy configurations are malicious.** + +However, it is important to know whether your system has a proxy configured or not. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/check-proxy-server/ + +作者:[Sreenath][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/best-vpn-linux/ +[2]: https://itsfoss.com/content/images/2023/02/select-the-gear-icon-adjacent-to-proxy.png +[3]: https://itsfoss.com/content/images/2023/02/Proxy-in-GNOME-settings.png +[4]: https://itsfoss.com/content/images/2023/02/set_grep_proxy.png +[5]: https://itsfoss.com/content/images/2023/02/nmcli-connection-show.png +[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png \ No newline at end of file From 440f7ea2f0eef40808670adc8a3927920370f6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:13:35 +0800 Subject: [PATCH 102/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230315.2=20=E2=AD=90=EF=B8=8F=20How=20to=20set=20up?= =?UTF-8?q?=20your=20own=20open=20source=20DNS=20server.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w to set up your own open source DNS server.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md diff --git a/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md b/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md new file mode 100644 index 0000000000..fee3741dd2 --- /dev/null +++ b/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md @@ -0,0 +1,62 @@ +[#]: subject: "How to set up your own open source DNS server" +[#]: via: "https://opensource.com/article/23/3/open-source-dns-server" +[#]: author: "Amar Gandhi https://opensource.com/users/amar1723" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to set up your own open source DNS server +====== + +A Domain Name Server (DNS) associates a domain name (like example.com) with an IP address (like 93.184.216.34). This is how your web browser knows where in the world to look for data when you enter a URL or when a search engine returns a URL for you to visit. DNS is a great convenience for internet users, but it's not without drawbacks. For instance, paid advertisements appear on web pages because your browser naturally uses DNS to resolve where those ads "live" on the internet. Similarly, software that tracks your movement online is often enabled by services resolved over DNS. You don't want to turn off DNS entirely because it's very useful. But you can run your own DNS service so you have more control over how it's used. + +I believe it's vital that you run your own DNS server so you can block advertisements and keep your browsing private, away from providers attempting to analyze your online interactions. I've used [Pi-hole][1] in the past and still recommend it today. However, lately, I've been running the open source project [Adguard Home][2] on my network. I found that it has some unique features worth exploring. + +### Adguard Home + +Of the open source DNS options I've used, [Adguard Home][2] is the easiest to set up and maintain. You get many DNS resolution solutions, such as DNS over TLS, DNS over HTTPS, and DNS over QUIC, within one single project. + +You can set up Adguard as a container or as a native service using a single script: + +``` +$ curl -s -S -L \ +https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh +``` + +Look at the script so you understand what it does. Once you're comfortable with the install process, run it: + +``` +$ sh ./install.sh +``` + +Some of my favorite features of AdGuard Home: + +- An easy admin interface +- Block ads and malware with the Adguard block list +- Options to configure each device on your network individually +- Force safe search on specific devices +- Set HTTPS for the admin interface, so your remote interacts with it are fully encrypted + +I find that Adguard Home saves me time. Its block lists are more robust than those on Pi-hole. You can quickly and easily configure it to run DNS over HTTPS. + +### No more malware + +Malware is unwanted content on your computer. It's not always directly dangerous to you, but it may enable dangerous activity for third parties. That's not what the internet was ever meant to do. I believe you should host your own DNS service to keep your internet history private and out of the hands of known trackers such as Microsoft, Google, and Amazon. Try Adguard Home on your network. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/open-source-dns-server + +作者:[Amar Gandhi][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/amar1723 +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/18/2/block-ads-raspberry-pi +[2]: https://github.com/AdguardTeam/AdGuardHome \ No newline at end of file From dfcf45af9f5493d1341a360ced3d706607894643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:14:09 +0800 Subject: [PATCH 103/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230315.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Sy?= =?UTF-8?q?nchronize=20databases=20more=20easily=20with=20open=20source=20?= =?UTF-8?q?tools.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ze databases more easily with open source tools.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/tech/20230315.3 ⭐️⭐️ Synchronize databases more easily with open source tools.md diff --git a/sources/tech/20230315.3 ⭐️⭐️ Synchronize databases more easily with open source tools.md b/sources/tech/20230315.3 ⭐️⭐️ Synchronize databases more easily with open source tools.md new file mode 100644 index 0000000000..209489e19f --- /dev/null +++ b/sources/tech/20230315.3 ⭐️⭐️ Synchronize databases more easily with open source tools.md @@ -0,0 +1,135 @@ +[#]: subject: "Synchronize databases more easily with open source tools" +[#]: via: "https://opensource.com/article/23/3/synchronize-databases-apache-seatunnel" +[#]: author: "Li Zongwen https://opensource.com/users/li-zongwen" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Synchronize databases more easily with open source tools +====== + +Change Data Capture (CDC) uses Server Agents to record, insert, update, and delete activity applied to database tables. CDC provides details on changes in an easy-to-use relational format. It captures column information and metadata needed to apply the changes to the target environment for modified rows. A changing table that mirrors the column structure of the tracked source table stores this information. + +Capturing change data is no easy feat. However, the open source [Apache SeaTunnel project][1] i is a data integration platform provides CDC function with a design philosophy and feature set that makes these captures possible, with features above and beyond existing solutions. + +### CDC usage scenarios + +Classic use cases for CDC is data synchronization or backups between heterogeneous databases. You may synchronize data between [MySQL][2], PostgreSQL, MariaDB, and similar databases in one scenario. You could synchronize the data to a full-text search engine in a different example. With CDC, you can create backups of data based on what CDC has captured. + +When designed well, the data analysis system obtains data for processing by subscribing to changes in the target data tables. There's no need to embed the analysis process into the existing system. + +### Sharing data state between microservices + +[Microservices][3] are popular, but sharing information between them is often complicated. CDC is a possible solution. Microservices can use CDC to obtain changes in other microservice databases, acquire data status updates, and execute the corresponding logic. + +### Update cache + +The concept of [Command Query Responsibility Segregation (CQRS)][4] is the separation of command activity from query activity. The two are fundamentally different: + +- A command writes data to a data source. +- A query reads data from a data source. + +The problem is, when does a read event happen in relation to when a write event happened, and what bears the burden of making those events occur? + +It can be difficult to update a cache. You can use CDC to obtain data update events from a database and let that control the refresh or invalidation of the cache. + +CQRS design usually uses two different storage instances to support business query and change operations. Because of the use of two stores, in order to ensure data consistency, we can use distributed transactions to ensure strong data consistency, at the cost of availability, performance, and scalability. You can also use CDC to ensure final consistency of data, which has better performance and scalability, but at the cost of data latency, which can currently be kept in the range of millisecond in the industry. + +For example, you could use CDC to synchronize MySQL data to your full-text search engine, such as ElasticSearch. In this architecture, ElasticSearch searches all queries, but when you want to modify data, you don't directly change ElasticSearch. Instead, you modify the upstream MySQL data, which generates a data update event. This event is consumed by the ElasticSearch system as it monitors the database, and the event prompts an update within ElasticSearch. + +In some CQRS systems, a similar method can be used to update the query view. + +### Pain points + +CDC isn't a new concept and various existing projects implement it. For many users, though, there are some disadvantages to the existing solutions. + +#### Single table configuration + +With some CDC software, you must configure each table separately. For example, to synchronize ten tables, you need to write ten source SQLs and Sink SQLs. To perform a transform, you also need to write the transform SQL. + +Sometimes, a table can be written by hand, but only when the volume is small. When the volume is large, type mapping or parameter configuration errors may occur, resulting in high operation and maintenance costs. + +Apache SeaTunnel is an easy-to-use data integration platform hoping to solve this problem. + +#### Schema evolution is not supported + +Some CDC solutions support DDL event sending but do not support sending to Sink so that it can make synchronous changes. Even a CDC that can get an event may not be able to send it to the engine because it cannot change the Type information of the transform based on the DDL event (so the Sink cannot follow the DDL event to change it). + +#### Too many links + +On some CDC platforms, when there are several tables, a link must be used to represent each table while one is synchronized. When there are many tables, a lot of links are required. This puts pressure on the source JDBC database and causes too many Binlogs, which may result in repeated log parsing. + +### SeaTunnel CDC architecture goals + +Apache SeaTunnel is an open source high-performance, distributed, and massive data integration framework. To tackle the problems the existing data integration tool's CDC functions cannot solve, the community "reinvents the wheel" to develop a CDC platform with unique features. This architectural design is based on the strengths and weaknesses of existing CDC tools. + +Apache Seatunnel supports: + +- Lock-free parallel snapshot history data. +- Log heartbeat detection and dynamic table addition. +- Sub-database, sub-table, and multi-structure table reading. +- Schema evolution. +- All the basic CDC functions. + +The Apache SeaTunnel reduces the operations and maintenance costs for users and can dynamically add tables. + +For example, when you want to synchronize the entire database and add a new table later, you don't need to maintain it manually, change the job configuration, or stop and restart jobs. + +Additionally, Apache SeaTunnel supports reading sub-databases, sub-tables, and multi-structure tables in parallel. It also allows schema evolution, DDL transmission, and changes supporting schema evolution in the engine, which can be changed to Transform and Sink. + +### SeaTunnel CDC current status + +Currently, CDC has the basic capabilities to support incremental and snapshot phases. It also supports MySQL for real-time and offline use. The MySQL real-time test is complete, and the offline test is coming. The schema is not supported yet because it involves changes to Transform and Sink. The dynamic discovery of new tables is not yet supported, and some interfaces have been reserved for multi-structure tables. + +### Project outlook + +As an Apache incubation project, the Apache SeaTunnel community is developing rapidly. The next community planning session has these main directions: + +#### 1. Expand and improve connector and catalog ecology + +We're working to enhance many connector and catalog features, including: + +- Support more connectors, including TiDB, Doris, and Stripe. +- Improving existing connectors in terms of usability and performance. +- Support CDC connectors for real-time, incremental synchronization scenarios. + +Anyone interested in connectors can review [Umbrella][5]. + +#### 2. Support for more data integration scenarios (SeaTunnel Engine) + +There are pain points that existing engines cannot solve, such as the synchronization of an entire database, the synchronization of table structure changes, and the large granularity of task failure. + +We're working to solve those issues. Anyone interested in the CDC engine should look at [issue 2272][6]. + +#### 3. Easier to use (SeaTunnel Web) + +We're working to provide a web interface to make operations easier and more intuitive. Through a web interface, we will make it possible to display Catalog, Connector, Job, and related information, in the form of DAG/SQL. We're also giving users access to the scheduling platform to easily tackle task management. + +Visit the [web sub-project][7] for more information on the web UI. + +### Wrap up + +Database activity often must be carefully tracked to manage changes based on activities such as record updates, deletions, or insertions. Change Data Capture provides this capability. Apache SeaTunnel is an open source solution that addresses these needs and continues to evolve to offer more features. The project and community are active and your participation is welcome. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/synchronize-databases-apache-seatunnel + +作者:[Li Zongwen][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/li-zongwen +[b]: https://github.com/lkxed/ +[1]: https://seatunnel.apache.org/ +[2]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet +[3]: https://www.redhat.com/en/topics/microservices?intcmp=7013a000002qLH8AAM +[4]: https://www.redhat.com/architect/illustrated-cqrs +[5]: https://github.com/apache/incubator-seatunnel/issues/1946 +[6]: https://github.com/apache/incubator-seatunnel/issues/2272 +[7]: https://github.com/apache/incubator-seatunnel-web \ No newline at end of file From 4f31390129ea898d32fd4a62c95234c473d41a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:15:36 +0800 Subject: [PATCH 104/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230316.0=20=E2=AD=90=EF=B8=8F=20Terminal=20Basics=20?= =?UTF-8?q?Series=205=20View=20the=20File=20Contents=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cs Series 5 View the File Contents in Linux.md | 224 ++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 sources/tech/20230316.0 ⭐️ Terminal Basics Series 5 View the File Contents in Linux.md diff --git a/sources/tech/20230316.0 ⭐️ Terminal Basics Series 5 View the File Contents in Linux.md b/sources/tech/20230316.0 ⭐️ Terminal Basics Series 5 View the File Contents in Linux.md new file mode 100644 index 0000000000..deedc33b23 --- /dev/null +++ b/sources/tech/20230316.0 ⭐️ Terminal Basics Series 5 View the File Contents in Linux.md @@ -0,0 +1,224 @@ +[#]: subject: "Terminal Basics Series #5: View the File Contents in Linux" +[#]: via: "https://itsfoss.com/view-file-contents/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Terminal Basics Series #5: View the File Contents in Linux +====== + +You learned to [create new files][1] in the previous chapter of the Terminal Basics series. + +In this chapter, you'll learn to read the files. I'll be discussing the most common Linux commands to display the contents of a text file. + +Before you do that, let's create our 'playground' with sample files. Let's create a directory first and switch to it. + +``` +mkdir display_files && cd display_files +``` + +Copy a huge text file here. + +``` +cp /etc/services . +``` + +And then, create a new file named `columbo.txt` with the following text (use the cat command with >> as discussed in the previous chapter): + +``` +Prescription: Murder +Ransom for a Dead Man +Murder by the Book +Death Lends a Hand +Dead Weight +Suitable for Framing +Lady in Waiting +Short Fuse +Blueprint for Murder +``` + +You don't have to type it all by yourself. You can copy-paste in the terminal using Ctrl+Shift+V. Most terminals support this shortcut. + +With things set, let's see various ways of viewing files in the Linux terminal. + +### Use cat command to display file content + +The cat command is the most popular method to view files in Linux. + +It is dead simple to use. Just give it the file name and it displays the file content on the screen. Things cannot go simpler than this. + +``` +cat filename +``` + +Can you try displaying the contents of the columbo.txt file? + +``` +cat columbo.txt +``` + +This is the output it shows: + +![Using the cat command to view files in Linux][2] + +> 🖥️ Optional challenge: Use the cat or echo command with >> redirection to add a new line with "Etude in Black" text to the columbo.txt file. Refer to the previous chapter if you need help. + +### Using the less command to read large text files + +The cat command is so simple. In fact, it is too simple. And simple doesn't work in complicated scenarios. + +Try using the cat command to view the content of the services file. + +``` +cat services +``` + +This `services` is a huge file with hundreds of lines. When you use cat, it floods the entire screen with the entire text. + +This is not ideal. Can you read the first line of the file? Yes, you can but you have to scroll all the way up. If the file has thousands of lines, you won't even be able to scroll back to the first few lines. + +This is where the less command comes into the picture. It lets you read the contents of a file in a page-by-page manner. You exit the viewing mode and your terminal screen is clean as ever. + +Use the less command to read the services file: + +``` +less services +``` + +Now you are in a different viewing mode. You can use the arrow keys to move line by line. You can also use the Page Up and Page Down keys to move up and down by pages. + +You can even search for certain text using /search_term. + +When you are done reading the file, **press Q key to exit the less view** and go back to the normal terminal viewing. + +![less command example][3] + +This table will help you use less: + +| Keys | Action | +| :- | :- | +| Up arrow | Move one line up | +| Down arrow | Move one line down | +| Space or PgDn | Move one page down | +| b or PgUp | Move one page up | +| g | Move to the beginning of the file | +| G | Move to the end of the file | +| ng | Move to the nth line | +| /pattern | Search for pattern and use n to move to next match | +| q | Exit less | + +From viewing files in real time to bookmarking text, less can do a lot more. Read this to learn more about it. + +> 💡 You can use the less command to read PDF files in the terminal. + +### Head and tail to show part of text files + +If you only want to see certain parts of the text file in cat-styled display, use the head and tail commands. + +By default, the head command displays the first 10 lines of a file. + +``` +head filename +``` + +But you can modify it to show the first n lines as well. + +``` +head -n filename +``` + +The tail command displays the last 10 lines by default. + +``` +tail filename +``` + +But you can modify it to show n lines from the bottom. + +``` +tail -n filename +``` + +#### Practice examples + +Let's see some examples. Generate an easy-to-follow file using this script: + +``` +#create or clear the content of the file +echo -n > sample + +#put content to the file +for i in {1..70} +do + echo "This is the line $i" >> sample +done +``` + +Create a new file named script.sh and copy-paste the above script content into it. Now run the script like this to generate your sample file: + +``` +bash script.sh +``` + +Now, you have got a file named `sample` that contains lines like "This is the line number N" for every 70 lines. + +> 🖥️ Display the first 10 and the last 10 lines of this sample file. + +Let's take it to the next level. You can combine them both to show specific lines of a file. For example, to show lines from 35 to 40, use it like this: + +``` +head -n 40 filename | tail -n +35 +``` + +Here: + +- `head -n 40 filename` will display the first 40 lines of the file. +- `tail -n +35` will display the lines from the 35th line to the end of the output from the `head` command. Yeah! Mind the + sign that changes the normal behavior of the tail command. + +![Show a range of lines in Linux][4] + +You can also combine them to show only a particular line. Let's say you want to display the 55th line; combine head and tail like this. + +``` +head -n 55 filename | tail -n 1 +``` + +Here: + +- `head -n 55 filename` will display the first 55 lines of the file. +- `tail -n 1` will display the last line of the output from the `head` command, which will be the 55th line of the file. + +![Show only a particular line in Linux command line][5] + +### Test your knowledge + +Time for you to exercise your grey cells and practice what you learned in this chapter. + +- Use the same `sample` file and display lines from 63 and 68. +- Now display the lines from 67 to 70. +- How about displaying the first line only? +- What do you see in the /etc/passwd file? Display its content. + +That's it for this chapter. Next, you'll learn about removing files and folders in the command line. Stay tuned. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/view-file-contents/ + +作者:[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/create-files/ +[2]: https://itsfoss.com/content/images/2023/03/use-cat-command-to-view-files-linux.png +[3]: https://itsfoss.com/content/images/2023/03/less-examples.svg +[4]: https://itsfoss.com/content/images/2023/03/show-specific-lines-linux.png +[5]: https://itsfoss.com/content/images/2023/03/show-particular-line-linux.png From 9c2a49a5fed02f981fab484850e3ac2f20f3a96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:16:31 +0800 Subject: [PATCH 105/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230316.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Be?= =?UTF-8?q?st=20GUI=20Package=20Managers=20for=20Arch=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...⭐️ Best GUI Package Managers for Arch Linux.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 sources/tech/20230316.1 ⭐️⭐️ Best GUI Package Managers for Arch Linux.md diff --git a/sources/tech/20230316.1 ⭐️⭐️ Best GUI Package Managers for Arch Linux.md b/sources/tech/20230316.1 ⭐️⭐️ Best GUI Package Managers for Arch Linux.md new file mode 100644 index 0000000000..2953ac782d --- /dev/null +++ b/sources/tech/20230316.1 ⭐️⭐️ Best GUI Package Managers for Arch Linux.md @@ -0,0 +1,165 @@ +[#]: subject: "Best GUI Package Managers for Arch Linux" +[#]: via: "https://www.debugpoint.com/arch-linux-gui-package-managers/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Best GUI Package Managers for Arch Linux +====== + +**Let’s discuss some of the best GUI package managers for Arch Linux. And choose the best to fit your needs.** + +Arch Linux is one of the most popular and widely used Linux distributions among advanced users and developers due to its customizability, flexibility, and bleeding-edge features. + +Due to its minimalist design, the primary way to install the software in Arch Linux is via command line interface (CLI) using the terminal. But not everyone is comfortable using the terminal. + +A graphical user interface (GUI) based package manager is a must-have utility for those. There are several options available. Let’s explore some of the popular ones. + +### What to Look for in a GUI-based Package Manager for Arch Linux? + +When choosing a GUI-based package manager for Arch Linux, several factors must be considered. + +First, it should have a clean and easy-to-use interface that’s intuitive for beginners. + +Second, it should support all package management operations, such as installing, removing, updating, and searching for packages. + +Third, it should have advanced features, such as dependency resolution and support for AUR packages. Finally, it should be lightweight and not consume too many system resources. + +### Best GUI Package Managers for Arch Linux + +#### 1. Pamac + +The first GUI package manager in this list is [Pamac][1], developed by the Manjaro Linux team. It has a nice and user-friendly interface makes it super easy to use. + +The intuitive interface makes it easy for users to install, remove, and update packages. It is built upon [libalpm][2] with AUR. Pamac also supports “appstream:///” protocol with Snap and Flatpak as well. So you can directly launch the application installer from appstream links. Furthermore, it has advanced features, such as dependency resolution and support for AUR packages. Additionally, Pamac is lightweight and doesn’t consume too many system resources. + +![Pamac helps you to browse and install packages][3] + +Using its GUI, you can browse the Arch repositories, also view applications based on their functionality. There are separate sections in the Pamac GUI that enable you to remove and uninstall packages, including orphan ones. + +It’s one of the best GUI package managers. + +![You can also upgrade your Arch Linux system using Pamac][4] + +Installation is easy. It is available in Arch User Repository (AUR). You can [install Yay][5] AUR helper or any other helper to install it. Here’s the command to install using Yay. The package is present [here][6]. If you are running [Manjaro Linux][7], it should already be present. + +``` +yay -S pamac-aur-git +``` + +#### 2. Octopi + +The following GUI package manager in this list is [Octopi][8], another nifty tool. It is built using Qt and comes with a productive GUI. Feature-wise, it’s a much-advanced tool. + +Using Octopi, you can search for packages, install them and, of course, remove them as well. Furthermore, you can view details about each package fetched directly from the Arch repo. For example, the package version, last updated date, news, and other information. + +In addition, it allows you to view the PKGBUILD information of a package – which is an excellent feature if you want to investigate further about a package. + +Finally, it’s super lightweight and doesn’t become heavy on system resources. I think Octopi is completely underrated and one of the feature-rich software managers for Arch Linux. + +![Octopi][9] + +It is available in AUR and you can install it using [Yay][5] or any AUR helper. + +``` +yay -S --needed octopi +``` + +#### 3. GNOME Software + +The third one in this list is GNOME Software which you are probably already aware of. It is the default Software manager for Ubuntu, Fedora and many other distributions. Based on GTK4, it supports all types of packages such as .deb, .rpm, Flatpak & Snap. In Arch Linux, it supports the main Arch repo, including the user repository (AUR). + +However, it might be a little heavy on system resources compared to the other apps in this list. But it’s a modern package manager and can work great for various use cases. + +![GNOME Software][10] + +Installation is easy since it is available in the main Arch repo. You can install it using the following command from the terminal. + +``` +sudo pacman -S --needed gnome-software +``` + +#### 4. Discover + +My personal favourite is [Discover][11] – one of the best software managers from the KDE Plasma team. If you used Kubuntu or any other KDE Plasma desktop, you are already familiar with it. + +Discover supports all major packaging formats, including deb, rpm, Flatpak and Snap. It has a well-defined information page for software and its sources. You can also search by application name Or browse the catalogue based on application category. + +For Arch Linux, it can fetch packages and information from main Arch repos and AUR. + +![Discover][12] + +You can install it using the following command in Arch Linux. + +``` +sudo pacman -S --needed discover +``` + +#### 5. Bauh + +[Bauh][13] is a relatively new GUI-based package manager for Arch Linux. It has a simple and user-friendly interface makes it easy for users to manage their packages. + +Its main window gives you all the options to manage applications in your Arch Linux system. The primary search box enables you to search applications. Also, you can browse via types such as only Flatpaks, AUR, etc packages. + +In addition, using Bauh’s main GUI, you can downgrade and update packages one by one, view information about packages and even launch the application directly. + +A well-designed settings panel gives you all the customization options you need. + +![Bauh package manager in Arch Linux][14] + +You can install it using the following command after [setting up][5] your system for AUR. + +``` +yay -S --needed bauh +``` + +### A few more + +There are some other package managers which can be used in Arch Linux. Here’s a small list of them. These are not that popular. But they can also be an alternative. + +- [Apper][15]: An application and package manager using PackageKit (from the KDE team) +- [tkPacman][16]: A lightweight GUI for pacman built with Tcl/Tk + +Finally, you can read more about these in the official [Arch Wiki][17]. + +### Conclusion + +In this article, we’ve discussed some of the best GUI-based package managers for Arch Linux, including Pamac, Octopi, GNOME Software, Discover, and Bauh. + +Each of these package managers has its own strengths and weaknesses, so it’s up to you to choose the one that best fits your needs. + +If you ask me for a recommendation, I suggest you try any of these – Pamac, Octopi and Bauh. They are great. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/arch-linux-gui-package-managers/ + +作者:[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://wiki.manjaro.org/index.php/Pamac +[2]: https://man.archlinux.org/man/libalpm.3.en +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Pamac-helps-you-to-browse-and-install-packages.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/You-can-also-upgrade-your-Arch-Linux-system-using-Pamac.jpg +[5]: https://www.debugpoint.com/install-yay-arch/ +[6]: https://aur.archlinux.org/packages/pamac-aur-git +[7]: https://www.debugpoint.com/manjaro-linux-review-2022/ +[8]: https://tintaescura.com/projects/octopi/ +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Octopi.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/GNOME-Software.jpg +[11]: https://apps.kde.org/discover/ +[12]: https://www.debugpoint.com/wp-content/uploads/2023/03/Discover.jpg +[13]: https://github.com/vinifmor/bauh +[14]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bauh-package-manager-in-Arch-Linux.jpg +[15]: https://apps.kde.org//system/apper/ +[16]: https://aur.archlinux.org/packages/tkpacman +[17]: https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Graphical \ No newline at end of file From 1310730468b3e78936682a98f31daa10f37bbd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:16:52 +0800 Subject: [PATCH 106/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230316.2=20=E2=AD=90=EF=B8=8F=20Firefox=20111=20Rele?= =?UTF-8?q?ased=20with=20New=20Native=20Notifications.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 111 Released with New Native Notifications.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md diff --git a/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md b/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md new file mode 100644 index 0000000000..b31c80798f --- /dev/null +++ b/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md @@ -0,0 +1,65 @@ +[#]: subject: "Firefox 111 Released with New Native Notifications" +[#]: via: "https://debugpointnews.com/firefox-111/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Firefox 111 Released with New Native Notifications +====== + +**Firefox releases version 111, bringing new native notifications, locale additions, and enhanced web platform features.** + +![Firefox 111 Running in Linux][1] + +### Firefox 111 release highlights + +Firefox, the popular web browser, has announced the release of version 111, which introduces several new features and enhancements. One of the standout additions is the support for Windows native notifications, providing a more streamlined and consistent user experience across the platform. + +In addition to this, Firefox Relay users can now easily create Relay email masks directly from the Firefox credential manager. This feature is accessible to users who are signed in with their Firefox account, providing an additional layer of privacy and security for their online activities. + +Furthermore, Firefox 111 has expanded its language support by adding two new locales – Silhe Friulian (fur) and Sardinian (sc) – to its existing list of languages. This move is aimed at increasing accessibility and inclusivity for Firefox users around the world. + +On the web platform front, Firefox has introduced the use of the “rel” attribute on form elements, making it easier for developers to specify the relationship between the current document and the form target. This feature is cross-browser compatible and simplifies the development process for web applications. + +Lastly, Firefox has enabled the origin private file system access, a new storage API that allows web applications to store and retrieve data from the filesystem in a sandbox. This enhancement provides developers with more control over the data storage and retrieval process, ensuring the security and privacy of user data. + +### Download and update + +For Linux distributions, if you used Firefox via your distribution’s official repository, then you should get this update within a few days. + +However, you can also download the compressed version of this release from the below page. For other download options, do visit our [Firefox download guide][2]. + +[Download Firefox 111][3] + +Happy browsing! + +- [Official release notes][4] +- [Beta110 release notes][5] +- [Developer release notes][6] + +### Wrapping Up + +Overall, Firefox version 111 offers a range of new features and enhancements that improve the user experience and provide greater control and security for web developers. With its commitment to accessibility, inclusivity, and privacy, Firefox remains a popular choice for users worldwide. + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/firefox-111/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/03/Firefox-111-Running-in-Linux.jpg +[2]: https://www.debugpoint.com/download-firefox/ +[3]: https://ftp.mozilla.org/pub/firefox/releases/111.0/ +[4]: https://www.mozilla.org/en-US/firefox/111.0/releasenotes/ +[5]: https://www.mozilla.org/en-US/firefox/111.0beta/releasenotes/ +[6]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/111 \ No newline at end of file From 89390589dca88a4afb8583bbfb6f4f76e709c327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:18:08 +0800 Subject: [PATCH 107/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230316.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Wr?= =?UTF-8?q?ite=20documentation=20that=20actually=20works=20for=20your=20co?= =?UTF-8?q?mmunity.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...entation that actually works for your community.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 sources/tech/20230316.3 ⭐️⭐️ Write documentation that actually works for your community.md diff --git a/sources/tech/20230316.3 ⭐️⭐️ Write documentation that actually works for your community.md b/sources/tech/20230316.3 ⭐️⭐️ Write documentation that actually works for your community.md new file mode 100644 index 0000000000..c29fe6f41a --- /dev/null +++ b/sources/tech/20230316.3 ⭐️⭐️ Write documentation that actually works for your community.md @@ -0,0 +1,141 @@ +[#]: subject: "Write documentation that actually works for your community" +[#]: via: "https://opensource.com/article/23/3/community-documentation" +[#]: author: "Olga Merkulova https://opensource.com/users/olga-merkulova" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Write documentation that actually works for your community +====== + +What distinguishes successful and sustainable projects from those that disappeared into the void? Spoiler — it's community. Community is what drives an open source project, and documentation is one of the foundational blocks for building a community. In other words, documentation isn't only about documentation. + +Establishing good documentation can be difficult, though. Users don't read documentation because it's inconvenient, it goes out of date very quickly, there's too much, or there's not enough. + +The development team doesn't write documentation because of the "it's obvious for me, so it's obvious to everyone" trap. They don't write because they are too busy making the project exist. Things are developing too fast, or they're not developing fast enough. + +But good documentation remains the best communication tool for groups and projects. This is especially true considering that projects tend to get bigger over time. + +Documentation can be a single source of truth within a group or a company.  This is important when coordinating people toward a common goal and preserving knowledge as people move on to different projects. + +So how do you write appropriate documentation for a project and share it with the right people? + +### What is successful community documentation? + +To succeed in writing documentation in your community: + +- Organize your routine +- Make it clear and straightforward +- Be flexible, make changes to the routine according to a specific situation +- Do version control + +![Image demonstrating the flow of documentation.][1] + +Being flexible doesn't mean being chaotic. Many projects have succeeded just because they are well-organized. + +James Clear (author of _Atomic Habits_) wrote, "You do not rise to the level of your goals. You fall to the level of your systems." Be sure to organize the process so that the level is high enough to achieve success. + +### Design the process + +Documentation is a project. Think of writing docs as writing code. In fact, documentation can be a product and a very useful one at that. + +This means you can use the same processes as in software development: analysis, capturing requirements, design, implementation, and maintenance. Make documentation one of your processes. + +Think about it from different perspectives while designing the process. Not all documentation is the right documentation for everyone. + +Most users only need a high-level overview of a project, while API documentation is probably best reserved for developers or advanced users. + +Developers need library and function documentation. Users are better served by example use cases, step-by-step guides, and an architectural overview of how a project fits in with the other software they use. + +![Image demonstrating different perspectives used while documenting.][2] + +Ultimately, before creating any process, you must determine what you need: + +- **Focus groups:** this includes developers, integrators, administrators, users, sales, operations, executives +- **Level of expertise**: Keep in mind the beginner, intermediate, and advanced users +- **Level of detail**: There's room for a high-level overview as well as technical detail, so consider how you want these to be presented +- **Journeys and entry points**: How do people find the documentation, how they use it + +When you ponder these questions, it helps you structure information you want to communicate through documentation. It defines clear metrics on what has to be in the documentation. + +Here's how to approach building a process around documentation. + +### Coding conventions + +The code itself should make sense. Documentation should be expressed through good class names, file names, and so on. Create common coding standards and make a self-documented code process by thinking about: + +- Variable naming conventions +- Make names understandable by using class, function naming schemes +- Avoid deep nesting, or [don't nest at all][3] +- Do not simply copy-and-paste code +- No long methods should be used +- Avoid using magic numbers (use const instead) +- Use extract methods, variables, and so on +- Use meaningful directory structures, modules, packages, and files + +### Testing along with engineering + +Testing isn't only about how code should behave. It's also about how to use an API, functions, methods, and so on. Well-written tests can reveal base and edge case scenarios. There's even a [test-driven development][4] practice that focuses on creating test cases (step by step scenarios of what should be tested and how) before code development. + +### Version control + +Version control, even for your documentation, helps you track the logic of your changes. It can help you answer why a change was made. + +Make sure comments during commits explain WHY a change was made, not WHAT change was made. + +The more engaging the documentation process is, the more people will get into it. Add creativity and fun to it. You should think about readability of documentation by using: + +- software code conventions +- diagrams and graphs (that are also explained in text) +- mind maps +- concept maps +- infographics +- images (highlight important parts) +- short videos + +By using different ways of communication, you offer more ways to engage with your documentation. This can help forestall misunderstanding (different languages, different meanings), and different learning styles. + +Here are some software tools for creating documentation: + +- **Javadoc, Doxygen, JsDoc, and so on**: Many languages have automated documentation tools to help capture major features in code +- **Web hooks and CI/CD engines**: Allows continuous publication of your documentation +- **Restructured Text, Markdown, Asciidoc**: File formats and processing engines help you produce beautiful and usable documentation out of plain text files +- **ReadTheDocs**_:_  Is a documentation host that can be attached to a public Git repository +- **Draw.io_,__LibreOffice Draw,__Dia_**: Produce diagrams, graphs, mind-maps, roadmaps, planning, standards, and metrics +- **Peek_,_Asciinema**: Use commands for recording your terminal +- **VokoscreenNG**: Use mouse clicks and screen capture + +### Documentation is vital + +Documenting processes and protocols are just as important as documenting your project itself. Most importantly, make information about your project and creation of your project exciting. + +The speed of entering into a project and process, and understanding how everything works, is an important feature. It helps ensure continued engagement. Simple processes and a clear understanding of what needs to be done is obtained by building one "language" in the team. + +Documentation is designed to convey value, which means demonstrating something through words and deeds. It doesn't matter whether it's a member of your team or a user of your application. + +Think about the process as a continuum and use means of communication, processes, and documentation. + +![Image showing documentation as a process of communication.][5] + +Documentation is a means of communication. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/community-documentation + +作者:[Olga Merkulova][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/olga-merkulova +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/sites/default/files/2023-03/documentationflowchart.png +[2]: https://opensource.com/sites/default/files/2023-03/different.perspectives.whiledocumenting.png +[3]: https://opensource.com/article/20/2/java-streams +[4]: https://opensource.com/article/20/1/test-driven-development +[5]: https://opensource.com/sites/default/files/2023-03/doc.is_.aprocessofcommunication.png \ No newline at end of file From 93f1ce9ce8250853c1a1d3dbf00d036d7a3c5926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 16 Mar 2023 19:18:53 +0800 Subject: [PATCH 108/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230316.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20I=20returned=20to=20open=20source=20after=20facing=20grief.?= =?UTF-8?q?md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ow I returned to open source after facing grief.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20230316.4 ⭐️⭐️ How I returned to open source after facing grief.md diff --git a/sources/talk/20230316.4 ⭐️⭐️ How I returned to open source after facing grief.md b/sources/talk/20230316.4 ⭐️⭐️ How I returned to open source after facing grief.md new file mode 100644 index 0000000000..714548443e --- /dev/null +++ b/sources/talk/20230316.4 ⭐️⭐️ How I returned to open source after facing grief.md @@ -0,0 +1,73 @@ +[#]: subject: "How I returned to open source after facing grief" +[#]: via: "https://opensource.com/article/23/3/open-source-after-grief" +[#]: author: "Amita Sharma https://opensource.com/users/amita" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I returned to open source after facing grief +====== + +The open source community is a wonderful place where people come together to collaborate, share knowledge, and build amazing things. I still remember [my first contribution in Fedora][1] 12 years ago, and since then it’s been an amazing journey. However, life can sometimes get in the way and cause us to take a break from participation. The COVID-19 pandemic has affected us all in different ways, and for some, it has been a time of immense loss and grief. I lost my loved one during the pandemic, and it has been the most difficult life event to deal with. It caused me to take a break from the Fedora community, as well. For those in the open source community who have had to take a break due to the loss of a loved one, returning to coding and contributing to projects can feel daunting. However, with some thought and planning, it is possible to make a comeback and once again become an active member of the community. + +First and foremost, it is important to take care of yourself and allow yourself the time and space to grieve. Grief is a personal and unique experience. There is no right or wrong way to go through it. It is important to be kind to yourself. Don’t rush into things before you are ready. + +Once you’re ready to start contributing again, there are a few things you can do to make your comeback as smooth as possible. + +### Reach out to other contributors + +This is a hard truth: nothing stops for you and technology is growing exponentially. When I rejoined Fedora recently, I felt the world had changed around me so fast. From IRC to Telegram to Signal and Matrix, from IRC meetings to Google Meet, from Pagure to GitLab, from mailing lists to discussion forums, and the list goes on. If you haven’t been active in your community for a while, it can be helpful to reach out to your friends in the community and let them know that you’re back and ready to contribute again. This can help you reconnect with people and get back into the swing of things. They may have some suggestions or opportunities for you to get involved in. I am grateful to my Fedora friend [Justin W. Flory][2], who helped me out selflessly to ensure I found my way back into the community. + +### Start small + +In the past, I served as [Fedora Diversity, Equity, & Inclusion (D.E.I.) Advisor][3], which is one of the [Fedora Council][4] member positions. It was a big job. I recognized that, and I knew that were I to think of doing the same job immediately after my break, then it would have been a burden that could threaten to cause [early burnout][5]. It’s vitally important to take it easy. Start small. + +If you’re feeling overwhelmed by the thought of diving back into a big project, start small. There are plenty of small tasks and bugs that need to be fixed, and tackling one of these can help you ease back into the community. + +### Find a mentor + +If you’re feeling unsure about how to get started or where to focus your efforts, consider finding a [mentor][6]. A mentor (in my case, Justin W. Flory) can provide guidance, advice, and support as you make your comeback. + +### Show gratitude + +An open source community is built on the contributions of many people. A healthy community is grateful for your contribution. Showing gratitude is part of making a community healthy. Show your gratitude to others who help you, guide you, and give you feedback. + +### Block your calendar + +Initially, it may take some time to get back to the rhythm of contributing. It helps to schedule some time in your calendar for open source work. It can be weekly/bi-weekly, depending on your availability. Remember, [every contribution counts][7], and that is the beauty of the open source world. This trick will help you to get into a regular routine. + +### Two steps forward, one step back + +Finally, it’s important to remember that it’s okay to take a step back if you need it. Grief is not a linear process. You may find that you need to take a break again in the future. It’s important to be honest with yourself and others about your needs. Take the time you need to take care of yourself. + +### Return on your own terms + +Returning to the open source community after a period of grief can be challenging. It’s also an opportunity to reconnect with something you are passionate about and make a positive impact in the world. In time, you’ll find that you’re able to pick up where you left off, and re-engage with the community once again. + +I dedicate this, my first ever Opensource.com article, to my late younger brother Mr. Nalin Sharma, who left us at the age of 32 due to COVID-19 in 2021. He was a passionate engineer and full of life. I hope he is in a better place now, and I am sure he will always be alive in my memories. + +![Amita and Nalin Sharma][8] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/open-source-after-grief + +作者:[Amita Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/amita +[b]: https://github.com/lkxed/ +[1]: https://fedoraproject.org/wiki/User:Amsharma +[2]: https://opensource.com/users/jflory +[3]: https://docs.fedoraproject.org/en-US/diversity-inclusion/roles/council-advisor/ +[4]: https://docs.fedoraproject.org/en-US/council/ +[5]: https://opensource.com/article/21/5/open-source-burnout +[6]: https://enterprisersproject.com/article/2019/10/it-mentors-how-make-most-of-mentoring?intcmp=7013a000002qLH8AAM +[7]: https://opensource.com/article/23/3/non-code-contribution-open-source +[8]: https://opensource.com/sites/default/files/2023-02/nalin-sharma.webp \ No newline at end of file From 52c9e33bdfbfddf5ba18987120858866369b24bf Mon Sep 17 00:00:00 2001 From: Cyrus Yip <60951091+CyrusYip@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:19:39 +0800 Subject: [PATCH 109/318] =?UTF-8?q?Update=2020230309.3=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=E2=AD=90=EF=B8=8F=20Arch=20Linux=20vs=20Other=20Linux?= =?UTF-8?q?=20Distros=20Which=20is=20Right=20for=20You.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译原标题 --- ...⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md b/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md index 7b97852bfa..b86bfd2648 100644 --- a/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md +++ b/published/20230309.3 ⭐️⭐️ Arch Linux vs Other Linux Distros Which is Right for You.md @@ -7,7 +7,7 @@ [#]: publisher: "wxy" [#]: url: "https://linux.cn/article-15631-1.html" -世界上只有两个 Linux 发行版:Arch Linux 与其它 +Arch Linux 与其他 Linux 发行版,哪个更适合你? ====== ![][0] @@ -144,4 +144,4 @@ via: https://www.debugpoint.com/arch-linux-vs-other-distros/ [4]: https://www.debugpoint.com/pacman-command-arch-examples/ [5]: https://www.debugpoint.com/aur-arch-linux/ [6]: https://www.debugpoint.com/linux-distro-beginners/ -[0]: https://img.linux.net.cn/data/attachment/album/202303/16/091648yt6xxdjnc5tttn1z.jpg \ No newline at end of file +[0]: https://img.linux.net.cn/data/attachment/album/202303/16/091648yt6xxdjnc5tttn1z.jpg From e9264abdfa7c431564b3016b3f6bda0bb8a5bdbc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Mar 2023 23:18:09 +0800 Subject: [PATCH 110/318] RP @Cubik65536 https://linux.cn/article-15633-1.html --- ...️ Contribute to open source without code.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) rename {translated/talk => published}/20230309.1 ⭐️ Contribute to open source without code.md (86%) diff --git a/translated/talk/20230309.1 ⭐️ Contribute to open source without code.md b/published/20230309.1 ⭐️ Contribute to open source without code.md similarity index 86% rename from translated/talk/20230309.1 ⭐️ Contribute to open source without code.md rename to published/20230309.1 ⭐️ Contribute to open source without code.md index a55608ade0..be07533b0e 100644 --- a/translated/talk/20230309.1 ⭐️ Contribute to open source without code.md +++ b/published/20230309.1 ⭐️ Contribute to open source without code.md @@ -3,16 +3,20 @@ [#]: author: "Debra Chen https://opensource.com/users/debra-chen" [#]: collector: "lkxed" [#]: translator: "Cubik65536" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15633-1.html" 不编写代码也可以为开源项目做出贡献 ====== +![][0] + +> 如果你想通过非代码贡献成为一个提交者,或者没有时间做代码贡献,那么第一步就是加入社区。 + 对于不同的人来说,开源“社区”意味着不同的东西。我认为开源有点像“爱情”,因为它是关于人和关系的。把开源当作一个社区,因为没有人,就没有源代码,无论是开源还是闭源。 -我是 [Apache DolphinScheduler][1] 社区的成员。由于该项目有意保持低代码,因此它吸引了许多[非软件开发人员][2]。有时,那些不编写代码的人不确定是否有一种有意义的方式来为主要由源代码组成的开源项目做出贡献。我的经验告诉我,有,我将在本文中解释原因。 +我是 [Apache DolphinScheduler][1] 社区的成员。由于该项目有意保持低代码,因此它吸引了许多 [非软件开发人员][2]。有时,那些不编写代码的人不确定是否有一种有意义的方式来为主要由源代码组成的开源项目做出贡献。我的经验告诉我,有,我将在本文中解释原因。 ### 向社区做出贡献 @@ -38,11 +42,11 @@ 所以我如何为 DolphinScheduler 做出贡献?我是否向项目提交代码?我是社区经理吗?我有正式的职称吗? -我认为自己是一个助手。我促进沟通和联系,这与任何代码贡献一样,都是“Apache Way”的一个例子。 +我认为自己是一个助手。我促进沟通和联系,这与任何代码贡献一样,都是 “Apache Way” 的一个例子。 ### 从 DolphinScheduler 开始 -我第一次接触开源是在 OpenAtom 基金会工作时,担任开源教育运营经理。作为中国第一个开源基金会,OpenAtom 运营了以 [OpenHarmony][3] 为代表的许多项目。 +我第一次接触开源是在开放原子基金会工作时,担任开源教育运营经理。作为中国第一个开源基金会,开放原子运营了以 [OpenHarmony][3] 为代表的许多项目。 我加入了 DolphinScheduler 社区并发现了一群热衷于分享知识、提供指导和支持,并热衷于帮助其他人发现对他们自己的生活有用的工具的人。 @@ -79,7 +83,7 @@ via: https://opensource.com/article/23/3/non-code-contribution-open-source 作者:[Debra Chen][a] 选题:[lkxed][b] 译者:[Cubik65536](https://github.com/Cubik65536) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -89,3 +93,4 @@ via: https://opensource.com/article/23/3/non-code-contribution-open-source [2]: https://opensource.com/article/21/2/what-technical [3]: https://gitee.com/openharmony [4]: https://opensource.com/article/22/5/practical-tips-agile +[0]: https://img.linux.net.cn/data/attachment/album/202303/16/231703lt3v8fw7t85uya30.jpg \ No newline at end of file From 67a56944792b4228b6e36cc3acb51f523a19b475 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Mar 2023 23:59:33 +0800 Subject: [PATCH 111/318] RP @geekpi https://linux.cn/article-15634-1.html --- ...at cloud developers need to know about hardware.md | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) rename {translated/tech => published}/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md (51%) diff --git a/translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md b/published/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md similarity index 51% rename from translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md rename to published/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md index e22fd6a92c..6d6a447ad1 100644 --- a/translated/tech/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md +++ b/published/20230308.4 ⭐️⭐️ What cloud developers need to know about hardware.md @@ -3,42 +3,46 @@ [#]: author: "Jay Faulkner https://opensource.com/users/jayf" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15634-1.html" 云开发人员需要了解的硬件知识 ====== -我们很容易忘记科技界人士所取得的进步。在 2000 年代初期,大多数本地用户组定期举行安装节。那时,要配置一台机器来很好地运行 Linux,我们必须了解有关硬件的详细信息以及如何配置它。现在,将近二十年后,我们代表了一个项目,其核心理想是让一台计算机运行 Linux 就像 API 调用一样简单。在这个新世界中,运营商和开发者等不再需要担心服务器中的硬件。这种变化对下一代的运营商和开发者产生了深远的影响。 +![][0] -在计算机技术的早期,你不得不经常上手硬件。如果计算机需要更多内存,你只需添加它即可。随着时间的推移,技术也有了很大的发展。这最终使操作员远离硬件。过去需要去数据中心一趟,现在变成了远程操作硬件的支持工单。最终,硬件被完全处理掉了。相反,你现在可以通过简单的命令召唤和摧毁“服务器”,而不必再担心硬件问题。 +> 云无处不在,所以硬件比以往任何时候都更加关键。 + +我们很容易忘记技术人员所取得的进步。在 2000 年代初期,大多数本地用户组(LUG)定期举行安装节。那时,要配置一台机器来很好地运行 Linux,我们必须了解有关硬件的详细信息以及如何配置它。现在,将近二十年后,有了一个项目,其核心理想是让一台计算机运行 Linux 就像 API 调用一样简单。在这个新世界中,运维人员和开发者等不再需要担心服务器中的硬件。这种变化对下一代的运维人员和开发者产生了深远的影响。 + +在计算机技术的早期,你不得不经常接触硬件。如果计算机需要更多内存,你只需添加它即可。随着时间的推移,技术也有了很大的发展。这最终使运维人员远离硬件。过去需要去数据中心一趟,现在变成了远程操作硬件的支持工单。最终,硬件被完全摆脱了。相反,你现在可以通过简单的命令召唤和摧毁“服务器”,而不必再担心硬件问题。 这里是真正的真相:硬件的存在是因为需要它来为云提供动力。但是,云到底是什么? ### 为什么硬件对云至关重要 -云是建立在利用抽象之上的基础资源的集中。它的范围可以从简单到在你的[家庭实验室][1]中运行几个虚拟机的管理程序,到包括定制服务器、网络设备、容器和从头开始设计的专注于规模效率的技术等复杂程度。 +云是建立在利用抽象集中的基础资源之上的。它的范围可以从简单的在你的 [家庭实验室][1] 中运行几个虚拟机的管理程序,到复杂的包括定制服务器、网络设备、容器和从头开始设计的专注于规模效率的技术。 它们是模糊的。它们在进化。 -今天那些进入技术领域的人没有像更有经验的开发人员那样的实践经验。许多人从最早与计算机交互时就接受过使用云的培训。他们不知道没有按钮来更改内存分配的世界。他们可以将注意力转移到技术栈的更高层次。然而,如果不了解他们所使用的基础架构所建立的基础,他们就会含蓄地放弃学习栈较低级别(包括硬件)的机会。这里不存在错误,因为云基础设施的实施者和运营商已经做出了特定的选择,有意让他们的产品更易于使用。 +今天那些进入技术领域的人没有那些更有经验的开发人员实践经验。许多人从最早与计算机交互时就接受过使用云的培训。他们不知道不用按钮来更改内存分配的世界。他们可以将注意力转移到技术栈的更高层次。然而,如果不了解他们所使用的基础架构所建立的基础,他们就会含蓄地放弃学习栈较低级别(包括硬件)的机会。这里没有说错,因为云基础设施的实施者和运维人员已经做出了特定的选择,有意让他们的产品更易于使用。 -这意味着现在,你比以往任何时候都更需要有意识地考虑在选择使用云技术时你或其他人做出的权衡。大多数人在收到第一份超额云账单或第一次因“吵闹的邻居”造成的中断之前,不会知道已经做出了哪些权衡。企业能否信任他们的供应商做出最适合他们运营的权衡? 供应商会建议更有效或更有利可图的服务吗? 让买家(或工程师!)当心。 +这意味着现在,你比以往任何时候都更需要有意识地考虑在选择使用云技术时你或其他人做出的权衡。大多数人在收到第一份超额的云账单或第一次因“吵闹的邻居”造成的中断之前,不会知道已经做出了哪些权衡。企业能否信任他们的供应商做出最适合他们运营的权衡?供应商会建议更有效或更有利可图的服务吗?让买家(或工程师!)当心。 有意识地考虑权衡取舍需要从多个角度审视你的要求和目标。基础设施决策和其中的权衡是该项目的整个过程、设计或使用模型所固有的。这就是为什么必须尽快计划它们的原因。必须考虑多种不同的路径,以便为你的项目找到一个合适的归宿。 -首先,是要实现的目标或提供的服务的轴心。这可能伴随着速度、质量或性能方面的要求。这本身可以驱动许多变量。你可能需要专用硬件(例如 GPU)才能以可接受的速度处理请求。此负载是否需要自动缩放? 当然,这些路径是交织在一起的。问题已经跳转到“我的钱包会自动缩放吗?” +首先是要实现的目标或提供的服务的轴心。这可能伴随着速度、质量或性能方面的要求。这本身可以驱动许多变量。你可能需要专用硬件(例如 GPU)才能以可接受的速度处理请求。此负载是否需要自动缩放?当然,这些路径是交织在一起的。问题已经跳转到“我的钱包会自动缩放吗?” -业务需求是要考虑的另一部分。你的项目可能有特定的安全或合规性要求,这些要求规定了数据的存储位置。邻近相关服务也是一个潜在的问题。这包括确保与附近证券交易所的[低延迟连接][3]或能够提供高质量的本地视频缓存作为内容交付网络的一部分。 +业务需求是要考虑的另一部分。你的项目可能有特定的安全或合规性要求,这些要求规定了数据的存储位置。邻近相关服务也是一个潜在的问题。这包括确保与附近证券交易所的 [低延迟连接][3] 或能够提供高质量的本地视频缓存作为内容交付网络(CDN)的一部分。 -然后是最后一部分,即所提供服务的价值和成本:一个人希望或可以花多少钱来满足要求。这与第一条路径紧密相关。你的业务是“什么”以及你的业务“如何”运作。这可以像你的企业更喜欢资本支出还是更喜欢运营支出一样平凡。 +然后是最后一部分,即所提供服务的价值和成本:一个人希望或可以花多少钱来满足要求。这与第一条路径紧密相关。你的业务是“什么”以及你的业务“如何”运作。这可以像你的企业更喜欢资本支出还是更喜欢运营支出一样普通。 当看到这些选项时,很容易看到改变任何一个变量都会开始改变其他变量。它们在本质上是相互交织的,一些技术可能允许这些变量动态变化。如果不了解较低层次的底层,你就有可能采取推动这种动态计费模式的路径。对一些人来说,这是首选。对其他人来说,这可能是令人恐惧的。 尽管在现代技术栈中,学习特定的硬件知识已变得更加可有可无,但我们希望这篇文章能鼓励你去研究你可能在不知不觉中错过的东西。硬件的改进是功能交付和效率提高的一个重要部分,将计算机从房间大小的怪物缩小到小到可以植入人体内。我们希望你花时间停下来,学习并考虑你的下一个项目将在什么硬件平台上运行,即使你不控制它。 -如果你是一个还没有把头从云端拿出来的学生,去找一台[旧电脑][5],安装一根内存,挑战自己,学习新东西。 +如果你是一个还没有把头从云端拿出来的学生,去找一台 [旧电脑][5],安装一根内存,挑战自己,学习新东西。 -------------------------------------------------------------------------------- @@ -47,7 +51,7 @@ via: https://opensource.com/article/23/3/cloud-hardware 作者:[Jay Faulkner][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/) 荣誉推出 @@ -55,4 +59,5 @@ via: https://opensource.com/article/23/3/cloud-hardware [b]: https://github.com/lkxed/ [1]: https://www.redhat.com/sysadmin/linux-homelab-rhel?intcmp=7013a000002qLH8AAM [3]: https://enterprisersproject.com/article/2022/5/edge-computing-latency-matters?intcmp=7013a000002qLH8AAM -[5]: https://opensource.com/article/22/4/how-linux-saves-earth \ No newline at end of file +[5]: https://opensource.com/article/22/4/how-linux-saves-earth +[0]: https://img.linux.net.cn/data/attachment/album/202303/16/235848zp97m0b7en0nwm7e.jpg \ No newline at end of file From fc74ce937038f44dfce21e558e9ed85b387f5dc3 Mon Sep 17 00:00:00 2001 From: "Qian Qian (Cubik)" Date: Thu, 16 Mar 2023 18:24:53 -0400 Subject: [PATCH 112/318] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7][?= =?UTF-8?q?news]:=2020230316.2=20=E2=AD=90=EF=B8=8F=20Firefox=20111=20Rele?= =?UTF-8?q?ased=20with=20New=20Native=20Notifications.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...⭐️ Firefox 111 Released with New Native Notifications.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md b/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md index b31c80798f..5d6effb998 100644 --- a/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md +++ b/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md @@ -2,7 +2,7 @@ [#]: via: "https://debugpointnews.com/firefox-111/" [#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Cubik65536" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -50,7 +50,7 @@ via: https://debugpointnews.com/firefox-111/ 作者:[arindam][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Cubik65536](https://github.com/Cubik65536) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -62,4 +62,4 @@ via: https://debugpointnews.com/firefox-111/ [3]: https://ftp.mozilla.org/pub/firefox/releases/111.0/ [4]: https://www.mozilla.org/en-US/firefox/111.0/releasenotes/ [5]: https://www.mozilla.org/en-US/firefox/111.0beta/releasenotes/ -[6]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/111 \ No newline at end of file +[6]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/111 From 55ec39c8b9721b8bb9cf87e61377567fa0476762 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 17 Mar 2023 08:47:35 +0800 Subject: [PATCH 113/318] translated --- ...ps database administrator A day in the life.md | 71 ------------------- ...ps database administrator A day in the life.md | 68 ++++++++++++++++++ 2 files changed, 68 insertions(+), 71 deletions(-) delete mode 100644 sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md create mode 100644 translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md diff --git a/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md b/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md deleted file mode 100644 index 916db54a10..0000000000 --- a/sources/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: subject: "Postgres DevOps database administrator: A day in the life" -[#]: via: "https://opensource.com/article/23/3/postgres-devops-dba" -[#]: author: "Doug Ortiz https://opensource.com/users/dougortiz" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Postgres DevOps database administrator: A day in the life -====== - -A Postgres DevOps DBA plays a critical role in modern IT organizations that rely on Postgres as their primary database management system. The role of a Postgres DevOps DBA involves many responsibilities, skills, and tasks. A few of these include: Managing the database design and architecture, infrastructure management, ensuring high availability, security, and performing routine maintenance tasks (tuning, backup and recovery, and monitoring). - -This article summarizes the common responsibilities and skills expected of a Postgres DevOps DBA in today's enterprise environments. - -### Database design and architecture - -Two primary responsibilities of a Postgres DevOps DBA are database design and architecture. This role must have a greater understanding of the application's data storage requirements and the business logic involved. This knowledge includes designing and creating database schemas and tables. It also means configuring indexes and other database objects to optimize query performance, and choosing the right version of Postgres to use. The role must ensure the database is designed for scalability and maintainability, considering future growth and data retention needs. - -### Performance tuning - -Another critical area of responsibility is performance tuning. A Postgres DevOps DBA must be able to identify and resolve performance issues by monitoring database performance metrics and analyzing query performance. The role must also have a deep understanding of the database and be able to configure it for optimal performance, including optimizing queries and indexes, tuning memory settings, and identifying and addressing performance bottlenecks. - -### Backup and recovery - -Backup and recovery are also key areas of responsibility. The DBA must have a solid understanding of backup and recovery solutions and must design and implement a backup strategy that ensures that data is always recoverable in the event of data loss. They must also validate the recovery process and implement high-availability and disaster recovery solutions to minimize downtime and data loss. - -### Security - -Security is another critical area of responsibility. The DBA ensures the database is secure by implementing access controls, encryption, and other security measures to protect the data. They must also stay up-to-date with the latest security trends and best practices and implement them to protect against potential threats. - -### Infrastructure management - -Infrastructure management is also a key responsibility. These DBAs must manage the hardware, network, and storage infrastructure and provision the infrastructure to support Postgres. They must also configure the infrastructure for performance and availability and scale the infrastructure as necessary to accommodate data growth. - -**[ Related read: [3 tips to manage large Postgres databases][1] ]** - -### Automation and scripting - -This role must be able to automate repetitive tasks such as backups, monitoring, and patching using tools like [Ansible][2], Terraform, and [Kubernetes][3]. They must also be familiar with automation best practices to ensure tasks are automated efficiently and effectively. Automation reduces the potential for human error, improves efficiency, and allows the DBA to focus on more complex tasks. - -### Monitor and configure alerts - -Monitoring the database and infrastructure and setting up alerts to notify them of issues is extremely important. The role must also take proactive measures to prevent downtime and data loss, using monitoring tools like Nagios, Zabbix, and Prometheus to detect potential issues. - -### Collaboration - -In addition to these technical responsibilities, a PostgreSQL DevOps DBA must also collaborate with other IT teams, such as developers, operations, and security, to integrate the database into the larger IT ecosystem. The DBAs must also document their work and stay up-to-date with the latest trends and best practices in Postgres and [DevOps][4]. This involves engaging with stakeholders to gather requirements, establish priorities, and align the database with the organization's broader goals. - -### Wrap up - -In conclusion, a Postgres DevOps DBA plays a critical role in modern IT organizations that rely on Postgres as their primary database management system. How do your current skills and expectations match this list? Are you on the right track to excel as a DBA in modern database environment? - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/postgres-devops-dba - -作者:[Doug Ortiz][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/dougortiz -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/23/2/manage-large-postgres-databases -[2]: https://opensource.com/article/19/2/quickstart-guide-ansible -[3]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=7013a000002qLH8AAM -[4]: https://opensource.com/article/20/12/remote-devops \ No newline at end of file diff --git a/translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md b/translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md new file mode 100644 index 0000000000..62a35800dc --- /dev/null +++ b/translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md @@ -0,0 +1,68 @@ +[#]: subject: "Postgres DevOps database administrator: A day in the life" +[#]: via: "https://opensource.com/article/23/3/postgres-devops-dba" +[#]: author: "Doug Ortiz https://opensource.com/users/dougortiz" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Postgres DevOps 数据库管理员:生活中的一天 +====== + +Postgres DevOps DBA 在依赖 Postgres 作为主要数据库管理系统的现代 IT 组织中发挥着关键作用。Postgres DevOps DBA 的角色涉及许多职责、技能和任务。其中一些包括:管理数据库设计和架构、基础设施管理、确保高可用性、安全性以及执行日常维护任务(调整、备份和恢复以及监控)。 + +本文总结了当今企业环境中 Postgres DevOps DBA 的常见职责和技能。 + +### 数据库设计和架构 + +Postgres DevOps DBA 的两个主要职责是数据库设计和架构。该角色必须对应用的数据存储要求和涉及的业务逻辑有更深入的了解。这些知识包括设计和创建数据库模式和表。它还意味着配置索引和其他数据库对象以优化查询性能,并选择正确的 Postgres 版本来使用。该角色必须确保数据库的设计具有可扩展性和可维护性,同时考虑到未来的增长和数据保留需求。 + +### 性能调优 + +另一个关键的职责是性能调优。Postgres DevOps DBA 必须能够通过监控数据库性能指标和分析查询性能来识别和解决性能问题。该角色还必须对数据库有深入的了解,并能够对其进行配置以获得最佳性能,包括优化查询和索引、调整内存设置以及识别和解决性能瓶颈。 + +### 备份与恢复 + +备份和恢复也是职责的关键。DBA 必须对备份和恢复解决方案有深入的了解,并且必须设计和实施备份策略,以确保在数据丢失的情况下始终可以恢复数据。他们还必须验证恢复过程并实施高可用性和灾难恢复解决方案,以最大限度地减少停机时间和数据丢失。 + +### 安全 + +安全是另一个重要的职责。DBA 通过实施访问控制、加密和其他安全措施来保护数据,从而确保数据库安全。他们还必须了解最新的安全趋势和最佳实践,并加以实施以防范潜在威胁。 + +### 基础设施管理 + +基础设施管理也是一项重要职责。这些 DBA 必须管理硬件、网络和存储基础设施,并提供基础设施以支持 Postgres。他们还必须针对性能和可用性配置基础架构,并根据需要扩展基础架构以适应数据增长。 + +### 自动化和脚本 + +该角色必须能够使用 [Ansible][2]、Terraform 和 [Kubernetes][3] 等工具自动执行重复性任务,例如备份、监控和修补。他们还必须熟悉自动化最佳实践,以确保高效且有效地自动化任务。自动化减少了人为错误的可能性,提高了效率,并允许 DBA 专注于更复杂的任务。 + +### 监控和配置警报 + +监控数据库和基础设施并设置警报以通知他们问题非常重要。该角色还必须采取主动措施来防止停机和数据丢失,使用 Nagios、Zabbix 和 Prometheus 等监控工具来检测潜在问题。 + +### 合作 + +除了这些技术职责外,PostgreSQL DevOps DBA 还必须与其他 IT 团队(例如开发人员、运营人员和安全人员)协作,以将数据库集成到更大的 IT 生态系统中。DBA 还必须记录他们的工作,并及时了解 Postgres 和 [DevOps][4] 的最新趋势和最佳实践。这涉及与利益相关者合作以收集需求、确定优先级并使数据库与组织的更广泛目标保持一致。 + +### 总结 + +总之,Postgres DevOps DBA 在依赖 Postgres 作为主要数据库管理系统的现代 IT 组织中发挥着关键作用。你当前的技能和期望如何匹配此列表?作为现代数据库环境中的 DBA,你是否走在正确的道路上? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/postgres-devops-dba + +作者:[Doug Ortiz][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/dougortiz +[b]: https://github.com/lkxed/ +[2]: https://opensource.com/article/19/2/quickstart-guide-ansible +[3]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=7013a000002qLH8AAM +[4]: https://opensource.com/article/20/12/remote-devops \ No newline at end of file From c9e36f3d38bb5901818d4a448c371d6a797dac36 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 17 Mar 2023 08:53:06 +0800 Subject: [PATCH 114/318] translating --- sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md b/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md index 0624433c85..4836aaa9e9 100644 --- a/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md +++ b/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi" [#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9c1e5d42a2fea15008d10d7741177cd74f59b04c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Mar 2023 09:26:47 +0800 Subject: [PATCH 115/318] ATRP @wxy https://linux.cn/article-15636-1.html --- ...Kali Purple” for Defensive Security Hardening.md | 112 ++++++++++++++++++ ...Kali Purple” for Defensive Security Hardening.md | 112 ------------------ 2 files changed, 112 insertions(+), 112 deletions(-) create mode 100644 published/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md delete mode 100644 sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md diff --git a/published/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md b/published/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md new file mode 100644 index 0000000000..8648dbd9ff --- /dev/null +++ b/published/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md @@ -0,0 +1,112 @@ +[#]: subject: "Kali Linux Introduces “Kali Purple” for Defensive Security Hardening" +[#]: via: "https://debugpointnews.com/kali-linux-2023-1/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15636-1.html" + +Kali Linux 推出用于防御性安全加固的 “Kali Purple” +====== + +> Kali Linux 2023.1 发布了重大更新,并引入了一个新的变体 “Kali Purple”。 + +![Kali Linux 2023.1 桌面][1] + +在 Kali Linux 的 10 周年纪念,该团队为你准备了一些好东西。Kali Linux 2023.1 是 Kali Linux 的常规软件包更新,它带来了最新的桌面环境和主线内核更新。 + +### Kali Linux 2023.1 推出 Kali Purple + +这个版本的主要亮点是 [Kali Purple][2],这是 Kali Linux 的一个新变体,带有 “防御性安全” 工具。Kali 团队目前正在将其作为技术预览版发布。 + +防御性安全软件可以实现各方面的安全加固,如漏洞扫描、事件跟踪和响应、数据包捕获、入侵检测等。现在你可以使用 Kali Purple 为你的应用程序或企业内置的所有工具。 + +![你可以在安装过程中选择防卫包][3] + +Kali Purple 带来了 100 多个防御工具、文档、用于自动攻击脚本构建的 Kali CoPilot 以及更多工具。 + +- [Arkime][4] - 完整的数据包捕获和分析 +- [CyberChef][5] - 网络瑞士军刀 +- Elastic Security - 安全信息和事件管理 +- [GVM][6] - 漏洞扫描器 +- [TheHive][7] - 事件响应平台 +- Malcolm - 网络流量分析工具套件 +- [Suricata][8] - 入侵检测系统 +- [Zeek][9] -(另一个)入侵检测系统 + +此外,为了与 美国《国家标准和技术研究所关键基础设施网络安全(NIST CSF)》的指导方针保持一致,为你配置了单独的菜单项目。它包括单独的应用类别 - 识别、保护、检测、响应和恢复。 + +![根据 CIST CSF 准则的新菜单组][10] + +此外,还为 Kali Purple 创建了一个单独的 Discord 频道,用于合作和为社区提供额外的帮助。 + +### Python 中的 Pip 变化 + +Python 的 `pip` 命令在(即将发布的)Debian 12 Bookworm 版本中正在发生变化。`pip` 命令用于安装 Python 模块。由于这些模块是用 `pip` 从外部安装的,它可能会破坏现有的 Debian 系统。 + +因此,从 Debian 12 开始,如果你试图用 `pip` 安装任何模块,你应该会得到一个 “外部管理的环境externally-managed-environment”的错误。如下: + +![你可以在 Kali 和 Debian 中使用 pip 进行安装][11] + +Kali Linux 团队从这个版本开始提供一个补丁,使你可以使用 `pip` 安装任何模块。但这只是暂时的解决方案,直到 Debian 12 稳定版。 + +所以,如果你是一个在 Kali Linux(或在 Debian)中使用 Python 环境的开发者,你肯定应该计划使用下面的 `apt` 命令来部署这些模块: + +``` +apt install python3-numpy +``` + +### 桌面环境和其他更新 + +默认桌面 Xfce 现在采用了 Xfce 4.18 版本,它带来了大量的功能,包括分割视图、图像预览和 Thunar 文件管理器中的其他功能。另外,KDE Plasma 版现在在 Kali Linux 2023.1 中的版本是 5.27。 + +Xfce 版的默认主题得到了改进,具有令人惊叹的外观;许多新的壁纸也包含在这个版本中。 + +最后,主线内核 6.1 现在可以在这个版本中使用,提供了最新的硬件、 CPU、GPU 和其他支持。 + +### 下载 + +如果你已经在运行 Kali Linux,只需运行系统升级就可以得到这个版本: + +``` +sudo apt update && sudo apt upgrade -y +``` + +对于新的下载,请访问下面的页面来获取 ISO。 + +> **[下载 Kali Linux][12]** + +如果你想试试 Kali Purple,请访问下面的页面: + +> **[下载 Kali Purple ISO][13]** + +参考自 [发布公告][14]。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/kali-linux-2023-1/ + +作者:[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://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/03/Kali-Linux-2023.1-Desktop.jpg +[2]: https://gitlab.com/kalilinux/kali-purple/documentation/-/wikis/home +[3]: https://debugpointnews.com/wp-content/uploads/2023/03/You-have-the-option-to-choose-defensive-packages-during-installation.jpg +[4]: https://pkg.kali.org/pkg/arkime +[5]: https://pkg.kali.org/pkg/cyberchef +[6]: https://www.kali.org/tools/gvm/ +[7]: https://pkg.kali.org/pkg/thehive +[8]: https://pkg.kali.org/pkg/suricata +[9]: https://pkg.kali.org/pkg/zeek +[10]: https://debugpointnews.com/wp-content/uploads/2023/03/New-menu-groups-as-per-CISF-NSF-guideline.jpg +[11]: https://debugpointnews.com/wp-content/uploads/2023/03/You-can-install-using-pip-in-Kali-and-Debian.jpg +[12]: https://www.kali.org/get-kali/#kali-installer-images +[13]: https://cdimage.kali.org/kali-2023.1/kali-linux-2023.1-installer-purple-amd64.iso +[14]: https://www.kali.org/blog/kali-linux-2023-1-release/ \ No newline at end of file diff --git a/sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md b/sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md deleted file mode 100644 index d80e6f0004..0000000000 --- a/sources/news/20230314.4 ⭐️ Kali Linux Introduces “Kali Purple” for Defensive Security Hardening.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: subject: "Kali Linux Introduces “Kali Purple” for Defensive Security Hardening" -[#]: via: "https://debugpointnews.com/kali-linux-2023-1/" -[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Kali Linux Introduces “Kali Purple” for Defensive Security Hardening -====== - -**Kali Linux 2023.1 is released with major updates and introduces a new variant, “Kali Purple”.** - -![Kali Linux 2023.1 Desktop][1] - -It’s Kali Linux’s 10th anniversary. And the team have a few goodies for you. Kali Linux 2023.1 is the usual package refresh of Kali Linux, which is arriving with the latest desktop environments and mainline Kernel updates. - -### Kali Linux 2023.1: Introducing Kali Purple - -The major highlight of this release is the [“Kali Purple”][2], a new variant of Kali Linux with tools for “defensive security”. Kali team is currently releasing it as a technical preview. - -Defensive security software enables security hardening in various areas, such as vulnerability scan, incident tracking and response, packet capture, intrusion detection and more. You can now use Kali Purple with all the tools built in for your application or enterprise. - -![You have the option to choose defensive packages during installation][3] - -Kali Purple is bringing in 100+ defensive tools, documentation, Kali CoPilot for automated attack script builder and many more tools. - -- [Arkime][4] – Full packet capture and analysis -- [CyberChef][5] – The cyber swiss army knife -- `Elastic Security` – Security Information and Event Management -- [GVM][6] – Vulnerability scanner -- [TheHive][7] – Incident response platform -- `Malcolm` – Network traffic analysis tool suite -- [Suricata][8] – Intrusion Detection System -- [Zeek][9] – (another) Intrusion Detection System - -Furthermore, to align with the guidelines of “National Institute of Standards and Technology Critical Infrastructure Cybersecurity (NISF CSF)”, separate menu items are configured for you. It includes separate applications with categories – Identify, Protect, Detect, Respond and Recover. - -![New menu groups as per CISF NSF guideline][10] - -In addition, a separate discord channel is created for Kali Purple for collaboration and additional help for the community. - -### Pip changes in Python - -Python pip command is undergoing a change in Debian 12 Bookworm release (upcoming). The pip command is used to install Python modules. Since the modules are installed externally using pip, it might break the existing Debian installation. - -Hence, from Debian 12 onwards, if you try to install any module using pip – you should get an “externally-managed-environment” error. See below. - -![You can install using pip in Kali and Debian][11] - -The Kali Linux team is providing a patch from this release onwards to enable you to install any module using pip. But it is temporary until the Debian 12 stable release. - -So, if you are a developer using a Python environment in Kali Linux (or in Debian), you should definitely plan to deploy the modules using the apt command as below. - -``` -apt install python3-numpy -``` - -### Desktop environment and other updates - -The default desktop Xfce now features Xfce 4.18 version, which brings massive features, including split view, image preview and others in Thunar file managers. Also, the KDE Plasma edition now arrives with version 5.27 in Kali Linux 2023.1. - -The default theme in the Xfce edition is improved with stunning looks; many new wallpapers are also included in this version. - -Finally, the mainline Kernel 6.1 is now available in this release, providing the latest hardware, CPU, GPU and other supports. - -### Download - -If you are already running Kali Linux, simply run the system upgrade to get this release. - -``` -sudo apt update && sudo apt upgrade -y -``` - -For new downloads, visit the below page to get the ISO. - -[Download Kali Linux][12] - -If you want to try out Kali Purple, visit the below page. - -[Download Kali Purple ISO][13] - -_Via [announcement][14]_ - --------------------------------------------------------------------------------- - -via: https://debugpointnews.com/kali-linux-2023-1/ - -作者:[arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://debugpointnews.com/author/dpicubegmail-com/ -[b]: https://github.com/lkxed/ -[1]: https://debugpointnews.com/wp-content/uploads/2023/03/Kali-Linux-2023.1-Desktop.jpg -[2]: https://gitlab.com/kalilinux/kali-purple/documentation/-/wikis/home -[3]: https://debugpointnews.com/wp-content/uploads/2023/03/You-have-the-option-to-choose-defensive-packages-during-installation.jpg -[4]: https://pkg.kali.org/pkg/arkime -[5]: https://pkg.kali.org/pkg/cyberchef -[6]: https://www.kali.org/tools/gvm/ -[7]: https://pkg.kali.org/pkg/thehive -[8]: https://pkg.kali.org/pkg/suricata -[9]: https://pkg.kali.org/pkg/zeek -[10]: https://debugpointnews.com/wp-content/uploads/2023/03/New-menu-groups-as-per-CISF-NSF-guideline.jpg -[11]: https://debugpointnews.com/wp-content/uploads/2023/03/You-can-install-using-pip-in-Kali-and-Debian.jpg -[12]: https://www.kali.org/get-kali/#kali-installer-images -[13]: https://cdimage.kali.org/kali-2023.1/kali-linux-2023.1-installer-purple-amd64.iso -[14]: https://www.kali.org/blog/kali-linux-2023-1-release/ \ No newline at end of file From c4403a4847c4e7fb8c657642476fabf812da166a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Mar 2023 09:46:16 +0800 Subject: [PATCH 116/318] RP @onionstalgia https://linux.cn/article-15637-1.html --- ... How Wikipedia helps keep the internet open.md | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) rename {translated/talk => published}/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md (56%) diff --git a/translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md b/published/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md similarity index 56% rename from translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md rename to published/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md index bcb4ea4269..d8ba2a61f0 100644 --- a/translated/talk/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md +++ b/published/20230306.2 ⭐️ How Wikipedia helps keep the internet open.md @@ -3,33 +3,37 @@ [#]: author: "Srishti Sethi https://opensource.com/users/srishakatux-0" [#]: collector: "lkxed" [#]: translator: "onionstalgia" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15637-1.html" -Wikipedia 是如何帮助保持互联网的开放性的 +维基百科是如何帮助保持互联网的开放性的 ====== -Wikipedia 是最有意义的开源软件项目之一,原因之一是它远比你想象的庞大。而且,任何人都可以贡献内容,并且任何人都可以为项目背后的许多技术领域贡献代码,确保维基百科正常运行。 +![][0] -[超过 870 个维基百科及其附属网站][1]提供了多语言版本,它们服务于一个共同目标,“开发自由的教育内容,并有效地在全球范围内传播”。例如,维基共享资源Wikimedia Commons是一个自由的媒体文件库,截至今天,它已经拥有超过六千八百万张图片。维基文库Wikisource是一个自由的文本资源库,拥有超过五百万篇文章和 72 种语言的活跃网站子域名。维基数据Wikidata是一个可访问的数据存储库,包含被[多个与维基百科相关的网站][2]所使用的超过九千九百万个数据项。 +> 维基百科体现了互联网最初愿景的精神,而你也可以成为其中的一部分。 -这些项目由维基媒体基金会Wikimedia Foundation支持和维护,它是一个总部位于旧金山的非营利组织。基金会使全球数十万名志愿者为项目的自由知识作出贡献。在这个知识收集和生产的社区背后,有着大量的维护、技术支持和管理工作,以保持网站的正常运转。当然,从外部来看,你可能仍然好奇,开发维基百科的软件还需要做哪些工作。毕竟,它可是世界上最受欢迎的十大网站之一,致力于提供最好的信息。 +维基百科是最有意义的开源软件项目之一,原因之一是它远比你想象的庞大。而且,任何人都可以贡献内容,并且任何人都可以为项目背后的许多技术领域贡献代码,确保维基百科正常运行。 + +[超过 870 个维基百科及其附属网站][1] 提供了多语言版本,它们服务于一个共同目标,“开发自由的教育内容,并有效地在全球范围内传播”。例如,维基共享资源Wikimedia Commons 是一个自由的媒体文件库,截至今天,它已经拥有超过 6800 万张图片。维基文库Wikisource 是一个自由的文本资源库,拥有超过 500 万篇文章和 72 种语言的活跃网站子域名。维基数据Wikidata 是一个可访问的数据存储库,包含被 [多个与维基百科相关的网站][2] 所使用的超过 9900 万个数据项。 + +这些项目由 维基媒体基金会Wikimedia Foundation 支持和维护,它是一个总部位于旧金山的非营利组织。基金会使全球数十万名志愿者为项目的自由知识作出贡献。在这个知识收集和生产的社区背后,有着大量的维护、技术支持和管理工作,以保持网站的正常运转。当然,从外部来看,你可能仍然好奇,开发维基百科的软件还需要做哪些工作。毕竟,它可是世界上最受欢迎的十大网站之一,致力于提供最好的信息。 事实上,每篇维基百科的文章都借助了成千上万的软件工具来创建、编辑和维护。这些步骤,确保了你在世界任何地方都能获得公平可靠快速的信息。当你浏览维基百科或任何其他维基网站时,你是在与一个称之为 [MediaWiki][3] 的软件交互,这是一个强大的团队协作文档软件,用以支持维基百科的内容。它有一些默认特性,而为了进一步增强软件的功能,你可以安装各种扩展。数不胜数的扩展中,最著名的两个是: -- VisualEditor:一种适用于 MediaWiki 驱动的维基站点的所见即所得WYSIWYG富文本编辑器。 -- Wikibase:用于存储、管理和访问维基百科从维基数据Wikidata上拉取的结构化数据。 +- VisualEditor:一种适用于 MediaWiki 驱动的维基站点的 所见即所得WYSIWYG 富文本编辑器。 +- Wikibase:用于存储、管理和访问维基百科从 维基数据Wikidata 上拉取的结构化数据。 所有这些优秀的辅助工具使现代维基百科愈发完善并正常运行,每一个都至关重要。 -### 维基百科和 Mediawiki +### 维基百科和 MediaWiki 总体来说维基百科的技术生态是非常庞大的!MediaWiki 是维基媒体世界中最受欢迎的软件之一,遵循开源代码许可,已经有超过四十万个项目和组织使用它来托管内容。例如,NASA 使用它来组织有关太空任务的内容和知识库! -此外,还有许多其他机器人、工具、桌面和移动应用可以帮助用户访问、创建、编辑和维护内容。例如,机器人可以自动化重复繁琐的任务,可以用来对抗恶意破坏、向新手推荐文章、进行文章事实核查等,这大大减轻了编辑的工作负担。InternetArchiveBot 也是个十分流行的机器人,常用于与网站时光机Wayback Machine通信,修复维基百科上的死链。 +此外,还有许多其他机器人、工具、桌面和移动应用可以帮助用户访问、创建、编辑和维护内容。例如,机器人可以自动化重复繁琐的任务,可以用来对抗恶意破坏、向新手推荐文章、进行文章事实核查等,这大大减轻了编辑的工作负担。InternetArchiveBot 也是个十分流行的机器人,常用于与 网站时光机Wayback Machine 通信,修复维基百科上的死链。 -上文中的"工具",指的是支持贡献者们工作的软件。比如,组织者可以使用“工具”开展编辑松editathons、举办各种活动、开设维基百科编辑教育课程等。截至 2022 年 5 月,机器人和工具的贡献占 870 个维基媒体编辑总量中的 36.6%,足以证明它们在整个生态中举足轻重。 +上文中的 “工具”,指的是支持贡献者们工作的软件。比如,组织者可以使用这些 “工具” 开展 编辑松editathons、举办各种活动、开设维基百科编辑教育课程等。截至 2022 年 5 月,机器人和工具的贡献占 870 个维基媒体编辑总量中的 36.6%,足以证明它们在整个生态中举足轻重。 Kiwix 是一款知名的离线阅读器桌面应用,它可以在网络连接有限的区域,特别是教育场所中提供对维基百科的访问。维基百科和维基共享资源的移动应用,也允许编辑者通过他们的移动设备贡献文章和媒体文件,这使我们的知识平台更加普及化,能够面向全球更广泛的受众。 @@ -37,21 +41,21 @@ Kiwix 是一款知名的离线阅读器桌面应用,它可以在网络连接 ### 维基百科的技术社区 -维基百科启动于 2001 年,当时仅有约十名开发人员。自从 2003 年维基媒体基金会成立以来,开发人员的数量在近年里大幅增长。现在,约有一千名开发人员正在为知识运动中的各种项目做出贡献。数字每年都会波动,这取决于活跃贡献者和工作人员的数量、支持志愿开发人员的计划、以及全球性事件(如大流行)等因素。 +维基百科启动于 2001 年,当时仅有约十名开发人员。自从 2003 年维基媒体基金会成立以来,开发人员的数量在近年里大幅增长。现在,约有一千名开发人员正在为知识运动中的各种项目做出贡献。这个数字每年都会波动,这取决于活跃贡献者和工作人员的数量、支持志愿开发人员的计划、以及全球性事件(如大流行)等因素。 -技术社区的成员以各种方式和角色做出贡献。比如代码贡献者、文档编写、设计师、倡导者、帮教、社区组织者、测试人员、翻译人员、网站管理员等。 +技术社区的成员以各种方式和角色做出贡献。比如代码贡献者、文档编写、设计师、倡导者、导师、社区组织者、测试人员、翻译人员、网站管理员等。 根据一项关于新开发者的调查,维基媒体和其他开源项目一样,吸引了许多来自美国、欧洲和印度的贡献者,在世界各地不断壮大。 志愿开发者和维基百科编辑者有类似的动机。他们成为贡献者,是来支持自由知识事业、学习和获得新技能、改善其他编辑者的体验等等。来自印度的一位志愿开发者说:“我最初其实是作为编辑者加入的,但我还是着手摸索维基百科背后的技术,因为印地语维基百科社区中,能够通过技术手段解决我们当地语言需求的贡献者实在太少了。” -在 2021 年 7 月至 2022 年 6 月期间,仅考虑托管在维基媒体 Gerrit 实例中的代码仓库,514 名开发人员在 1225 个存储库中进行了 45,621 次合并改动。这些贡献中,48.52% 来自维基媒体基金会之外的其他组织和[独立开发人员][7]。其中一些开发人员还是不同地区的用户组、章节和附属机构的成员,致力于推广使用维基媒体项目和鼓励贡献。这些数字还不包括选择在外部托管代码的额外开发人员,或直接托管在维基页面上的代码,例如小工具或模块。 +在 2021 年 7 月至 2022 年 6 月期间,仅考虑托管在维基媒体 Gerrit 实例中的代码仓库,514 名开发人员在 1225 个存储库中进行了 45,621 次合并改动。这些贡献中,48.52% 来自维基媒体基金会之外的其他组织和 [独立开发人员][7]。其中一些开发人员还是不同地区的用户组、分会和附属机构的成员,致力于推广使用维基媒体项目和鼓励贡献。这些数字还不包括选择在外部托管代码的额外开发人员,或直接托管在维基页面上的代码,例如小工具或模块。 ### 有所作为 维基百科是一个可供所有人使用的庞大知识库。在许多方面,它体现了互联网的最初愿景:作为信息、理解和协作的来源。 -您可以作为贡献者成为维基百科的一份子,无论是通过在文章中分享您的知识,还是通过帮助构建使其所有工作成为可能的软件。如果您有兴趣加入维基媒体的技术社区,请浏览我们的开发者网站上的资源,并学习如何[参与其中][8]。 +你可以作为贡献者成为维基百科的一份子,无论是通过在文章中分享你的知识,还是通过帮助构建使其所有工作成为可能的软件。如果你有兴趣加入维基媒体的技术社区,请浏览我们的开发者网站上的资源,并学习如何 [参与其中][8]。 -------------------------------------------------------------------------------- @@ -60,7 +64,7 @@ via: https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open 作者:[Srishti Sethi][a] 选题:[lkxed][b] 译者:[onionstalgia](https://github.com/onionstalgia) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -74,3 +78,4 @@ via: https://opensource.com/article/23/3/how-wikipedia-helps-keep-internet-open [6]: https://meta.wikimedia.org/wiki/Kiwix [7]: https://wikimedia.biterg.io/ [8]: https://developer.wikimedia.org/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/17/094522xwmr76zb7hwnlfxy.jpg \ No newline at end of file From c4952a4801b64f4af1bbff7193ba2cdc82bf8085 Mon Sep 17 00:00:00 2001 From: Cubik Date: Thu, 16 Mar 2023 23:37:52 -0400 Subject: [PATCH 117/318] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90][?= =?UTF-8?q?news]:=2020230316.2=20=E2=AD=90=EF=B8=8F=20Firefox=20111=20Rele?= =?UTF-8?q?ased=20with=20New=20Native=20Notifications.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 111 Released with New Native Notifications.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md b/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md index 5d6effb998..2d6636508e 100644 --- a/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md +++ b/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md @@ -7,42 +7,42 @@ [#]: publisher: " " [#]: url: " " -Firefox 111 Released with New Native Notifications +Firefox 111 已发布,带来了原生系统功能 ====== -**Firefox releases version 111, bringing new native notifications, locale additions, and enhanced web platform features.** +**Firefox 111 已发布,带来了原生通知、新增的本地化语言以及增强的 Web 平台功能。** -![Firefox 111 Running in Linux][1] +![在 Linux 上运行的 Firefox 111][1] -### Firefox 111 release highlights +### Firefox 111 发布亮点 -Firefox, the popular web browser, has announced the release of version 111, which introduces several new features and enhancements. One of the standout additions is the support for Windows native notifications, providing a more streamlined and consistent user experience across the platform. +Firefox,一个流行的网络浏览器,已经发布了 111 版本,其中引入了几个新功能和增强功能。其中一个突出的新增功能是对 Windows 原生系统通知的支持,为整个平台提供了更流畅和一致的用户体验。 -In addition to this, Firefox Relay users can now easily create Relay email masks directly from the Firefox credential manager. This feature is accessible to users who are signed in with their Firefox account, providing an additional layer of privacy and security for their online activities. +除此之外,Firefox Relay 用户现在可以轻松地从 Firefox 凭据管理器中直接创建 Relay 邮箱。此功能仅适用于登录了 Firefox 帐户的用户,为其在线活动提供了额外的隐私和安全保护。 -Furthermore, Firefox 111 has expanded its language support by adding two new locales – Silhe Friulian (fur) and Sardinian (sc) – to its existing list of languages. This move is aimed at increasing accessibility and inclusivity for Firefox users around the world. +另外,Firefox 111 已经通过添加两个新的语言 – 弗留利语Silhe Friulian (fur) 和 撒丁语Sardinian (sc) – 来扩大其语言支持列表。这一举措旨在为世界各地的 Firefox 用户提供更好的可访问性和包容性。 -On the web platform front, Firefox has introduced the use of the “rel” attribute on form elements, making it easier for developers to specify the relationship between the current document and the form target. This feature is cross-browser compatible and simplifies the development process for web applications. +在 Web 平台方面,Firefox 已经在表单元素上引入了 “rel” 属性,使开发人员可以更轻松地指定当前文档与表单目标之间的关系。这一功能与其他浏览器兼容,并简化了 Web 应用程序的开发过程。 -Lastly, Firefox has enabled the origin private file system access, a new storage API that allows web applications to store and retrieve data from the filesystem in a sandbox. This enhancement provides developers with more control over the data storage and retrieval process, ensuring the security and privacy of user data. +最后,Firefox 已经启用了原点私有文件系统访问,这是一种新的存储 API,允许 Web 应用程序在沙箱中存储和检索文件系统中的数据。这一增强功能为开发人员提供了更多对数据存储和检索过程的控制,确保用户数据的安全性和隐私性。 -### Download and update +### 下载和更新 -For Linux distributions, if you used Firefox via your distribution’s official repository, then you should get this update within a few days. +对于 Linux 发行版,如果您通过发行版的官方仓库使用 Firefox,那么您应该在几天内获得此更新。 -However, you can also download the compressed version of this release from the below page. For other download options, do visit our [Firefox download guide][2]. +但是,您也可以从下面的页面下载此版本的压缩版本。有关其他下载选项,请访问我们的 [Firefox 下载指南][2]。 -[Download Firefox 111][3] +[下载 Firefox 111][3] -Happy browsing! +浏览愉快! -- [Official release notes][4] -- [Beta110 release notes][5] -- [Developer release notes][6] +- [官方发布通知][4] +- [Beta110 发布通知][5] +- [开发者发布版本通知][6] -### Wrapping Up +### 总结 -Overall, Firefox version 111 offers a range of new features and enhancements that improve the user experience and provide greater control and security for web developers. With its commitment to accessibility, inclusivity, and privacy, Firefox remains a popular choice for users worldwide. +总体来说,Firefox 111 版本提供了一系列新功能和增强功能,这些功能提高了用户体验,并为 Web 开发人员提供了更丰富的控制权和安全性。凭借其对可访问性、包容性和隐私方面的投入,Firefox 仍然是全球用户的首选浏览器。 -------------------------------------------------------------------------------- From e8c15098e794deccec6384ee45740f9b4155cc41 Mon Sep 17 00:00:00 2001 From: Cubik Date: Thu, 16 Mar 2023 23:38:09 -0400 Subject: [PATCH 118/318] =?UTF-8?q?[=E7=A7=BB=E5=8A=A8=E7=BF=BB=E8=AF=91][?= =?UTF-8?q?news]:=2020230316.2=20=E2=AD=90=EF=B8=8F=20Firefox=20111=20Rele?= =?UTF-8?q?ased=20with=20New=20Native=20Notifications.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...316.2 ⭐️ Firefox 111 Released with New Native Notifications.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md (100%) diff --git a/sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md b/translated/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md similarity index 100% rename from sources/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md rename to translated/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md From f04dad3b2db9425e6cea24c2dcd682052e8b16b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=9B?= Date: Fri, 17 Mar 2023 16:41:18 +0800 Subject: [PATCH 119/318] =?UTF-8?q?Update=2020221219.1=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=E2=AD=90=EF=B8=8F=20How=20I=20use=20my=20old=20camera?= =?UTF-8?q?=20as=20a=20webcam=20with=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 --- ...219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md b/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md index 51a20186e9..460a623fde 100644 --- a/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md +++ b/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/12/old-camera-webcam-linux" [#]: author: "Tom Oliver https://opensource.com/users/tomoliver" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Pabloxllwe" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8a7bfcab1d5dac037801f020b521fed37ef07b17 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Mar 2023 20:15:21 +0800 Subject: [PATCH 120/318] R --- ...Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md b/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md index 26de7fa669..b89ea31a36 100644 --- a/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md +++ b/published/20230308.0 ⭐️ Garuda Linux “Raptor” 230305 Release Drops Latte Dock, Brings Key Changes.md @@ -12,15 +12,15 @@ Garuda Linux “Raptor” 230305 版本发布 ![][1] -> Garuda Linux 是流行的基于 Arch Linux 的发行版,它刚刚发布了一个新的版本 “Raptor” 200305,带来了新的功能和更新。 +> Garuda Linux 是流行的基于 Arch Linux 的发行版,它刚刚发布了一个新的版本 “Raptor” 230305,带来了新的功能和更新。 ![Garuda Linux Raptor 230305][2] Garuda Linux 是一个基于 Arch Linux 的发行版,由于其开箱即用的体验、游戏支持和用户友好界面,在 Arch Linux 爱好者中越来越受欢迎。Garuda Linux 以其对性能、速度和稳定性的关注而闻名。 -最近,Garuda Linux 发布了一个新的版本 “Raptor” 200305,带来了新的功能和更新。在这篇文章中,我们将介绍 Garuda Linux 的最新版本的新内容。 +最近,Garuda Linux 发布了一个新的版本 “Raptor” 230305,带来了新的功能和更新。在这篇文章中,我们将介绍 Garuda Linux 的最新版本的新内容。 -### Garuda “Raptor” 200305 的新内容 +### Garuda “Raptor” 230305 的新内容 Garuda 的主要旗舰版是 dr460nized 版,采用 KDE Plasma 桌面环境,但它用 Latte Dock、图标主题等进行了大量定制。 From 1d1403705f362f238414464da0aaf0004385d892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 18 Mar 2023 11:34:52 +0800 Subject: [PATCH 121/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230317.0=20=E2=AD=90=EF=B8=8F=20Variables=20in=20Pyt?= =?UTF-8?q?hon=20Concepts=20with=20Examples.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Variables in Python Concepts with Examples.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md diff --git a/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md b/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md new file mode 100644 index 0000000000..4c528aeb97 --- /dev/null +++ b/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md @@ -0,0 +1,166 @@ +[#]: subject: "Variables in Python: Concepts with Examples" +[#]: via: "https://www.debugpoint.com/python-variables/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Variables in Python: Concepts with Examples +====== + +**This tutorial explains the concept of variables in Python, their types, and how to use them with examples in real-world projects.** + +In Python, a variable is a reserved memory location that stores a value. + +They are names that can be assigned a value and used to reference it throughout your code. Using a variable makes a value accessible & gives values a context/meaning concerning your code. + +Before you start, I hope you have Python installed and set up a basic editor. If not, do refer to my below guides: + +- [How to Install Python 3.11 on Ubuntu/Linux][1] +- [How to install Python on Windows][2] +- [How to set up the IDLE editor for Python][3] + +### Variable rules + +- Variables are case-sensitive. +- Variable names can only contain uppercase and lowercase letters (A–Z, a–z), digits (0–9), and underscores (_). +- They can not start with digits. +- Python variables are [dynamically typed][4]. +- Python supports Unicode variables (e.g. decorated letters like é and ü, and even Chinese, Japanese, and Arabic symbols). +- As per [PEP 8 standard][5], variable names can be only lowercase, and words can be separated by underscores (e.g. total_price). + +### Python Variables: Examples + +To create a variable in Python, we need to assign a value to it using the assignment operator (=). For example, the following line of code creates a variable named “x” and assigns it the value of 10: + +``` +x = 10 +``` + +In Python, variables are dynamically typed, which means that the interpreter can determine the data type of a variable based on the value it is assigned. Python supports various types of variables, including integers, floats, strings, booleans, and complex numbers. + +``` +# Integer Variable +age = 20 + +# Float Variable +price = 4.99 + +# String Variable +name = "John Doe" + +# Boolean Variable +is_active = True + +# Complex Variable +z = 2 + 3j +``` + +Variables are useful in programming because they allow us to store and manipulate data. For example, we can use variables to perform mathematical operations, concatenate strings, and make decisions based on the value of a boolean variable. + +``` +# Mathematical Operations +x = 5 +y = 10 +z = x + y +print(z) # Output: 15 + +# String Concatenation +first_name = "John" +last_name = "Doe" +full_name = first_name + " " + last_name +print(full_name) # Output: John Doe +``` + +![A simple demonstration of variables in Python][6] + +Variables can also be used in real-world projects to store and manipulate data. For example, in a web application, we can use variables to [store user input][7], database queries, and output data to the user. + +``` +# User Input +name = input("What is your name? ") +print("Hello, " + name + "!") # Output: Hello, John! + +# Database Queries +import sqlite3 + +conn = sqlite3.connect("example.db") +cursor = conn.cursor() + +cursor.execute("SELECT * FROM users WHERE id = ?", (1,)) +user = cursor.fetchone() + +print(user) # Output: (1, 'John Doe', 'johndoe@example.com') + +# Output Data to User +balance = 100.00 +print("Your current balance is ₹" + str(balance)) # Output: Your current balance is ₹100.0 +``` + +### Common Errors while using variables + +There are a few common errors you can face while dealing with variables. Here are some of them. + +- `NameError`: This error occurs when you try to access a variable that has not been defined. For example, if you try to print the value of a variable that has not been assigned a value yet, you will get a NameError. The following code gives a NameError because the variable “Full_name” is not defined. + +``` +# NameError demonstration +first_name = "John" +last_name = "Doe" +full_name = first_name + " " + last_name +print(Full_name) # NameError +``` + +![NameError example][8] + +- `TypeError`: This error occurs when you try to operate on a variable of the wrong data type. For example, if you try to concatenate a string and an integer, you will get a TypeError. The below snippet of code gives TypeError. + +``` +# TypeError demonstration +first_name = "John" +age = 10 +print(first_name + age) +``` + +![TypeError example in Python][9] + +- `ValueError`: This error occurs when you try to convert a variable to a different data type, but the conversion is impossible. For example, if you try to convert a string that contains letters to an integer, you will get a ValueError. + +``` +# ValueError demonstration +first_name = "John" +age = 10 +print(int(first_name)) +``` + +![ValueError in Python][10] + +### Wrapping Up + +Understanding variables is essential for any Python developer. Variables allow us to store and manipulate data, perform mathematical operations, concatenate strings, etc. I hope this guide clarifies the concept if you are a beginner in Python programming. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/python-variables/ + +作者:[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/install-python-3-11-ubuntu/ +[2]: https://www.debugpoint.com/install-python-windows/ +[3]: https://www.debugpoint.com/install-idle-ubuntu-linux/ +[4]: https://en.wikipedia.org/wiki/Type_system +[5]: https://peps.python.org/pep-0008/ +[6]: https://www.debugpoint.com/wp-content/uploads/2023/03/A-simple-demonstration-of-variables-in-Python.jpg +[7]: https://www.debugpoint.com/input-function-python/ +[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/NameError-example.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/TypeError-example-in-Python.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/ValueError-in-Python.jpg \ No newline at end of file From e89edba8b25cf4355f9ca74305739354fe7c41f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 18 Mar 2023 11:35:44 +0800 Subject: [PATCH 122/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230317.1=20=E2=AD=90=EF=B8=8F=20My=20first=20pull=20?= =?UTF-8?q?request=20at=20age=2014.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...17.1 ⭐️ My first pull request at age 14.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/talk/20230317.1 ⭐️ My first pull request at age 14.md diff --git a/sources/talk/20230317.1 ⭐️ My first pull request at age 14.md b/sources/talk/20230317.1 ⭐️ My first pull request at age 14.md new file mode 100644 index 0000000000..fd7a843720 --- /dev/null +++ b/sources/talk/20230317.1 ⭐️ My first pull request at age 14.md @@ -0,0 +1,70 @@ +[#]: subject: "My first pull request at age 14" +[#]: via: "https://opensource.com/article/23/3/my-first-code-contribution-age-14" +[#]: author: "Neil Naveen https://opensource.com/users/neilnaveen" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +My first pull request at age 14 +====== + +My name is Neil Naveen, and I'm a 14-year-old middle schooler who's been coding for seven years. I have also been coding in [Golang][1] for two years. + +Coding isn't my only passion, though. I've been practicing Jiu-Jitsu for four years and have competed in multiple competitions. I'm passionate about coding and Jiu-Jitsu, as they teach me important life lessons. + +### Codecombat + +I started coding on [Codecombat][2], which taught me many fundamental coding skills. + +One of the most exciting moments in my coding journey was when I ranked 16th out of around 50,000 players in a multiplayer arena hosted by Code Combat. I was just 11 years old then, and it was an incredible achievement for me. It gave me the confidence to continue exploring and learning new things. + +### Leetcode + +After Codecombat, I moved on to [leetcode.com][3]. This site helped me hone my algorithm coding skills with tailored problems to learn specific algorithms. + +### Coding Game + +When I turned 13, I moved on to bot programming on [Coding Game][4]. The competition was much more intense, so I had to use better algorithms. For example, when creating ultimate tic-tac-toe AI, I used algorithms like Minimax and Monte Carlo Tree Search to make my code fast and efficient. + +### GitHub CLI + +One day, I saw my dad using an open source tool called [GitHub CLI][5], and I was fascinated by it. GitHub CLI is a tool that allows users to interact with the GitHub API directly from the command line without ever having to go to GitHub itself. + +Another day, my dad was reviewing PRs from a bot designed to detect vulnerabilities in dependencies. + +Later, I thought about GitHub CLI and this bot, and wondered whether GitHub CLI itself was being monitored by a security bot. It turned out that it was not. + +So I created a fix and included a security audit for GitHub CLI. + +To my delight, my contribution was accepted. It was merged into the project, which was a thrilling moment for me. It was an excellent opportunity to contribute to a significant project like a popular tool like GitHub CLI, and to help secure it. Here's the link to my PR: [https://github.com/cli/cli/pull/4473][6] + +### Commit your code + +I hope my story will inspire other young people to explore and contribute to the open source world. Age isn't a barrier to entry. Everyone should explore and contribute. If you want to check out my website, head over to [neilnaveen.dev][7]. You can also check out my [Leetcode profile][8]. And if you're interested, check out my talk at [CloudNativeSecurityCon][9] recording. + +I'm grateful for the opportunities I've had so far, and I'm excited to see what the future holds for me. Thank you for reading my story! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/my-first-code-contribution-age-14 + +作者:[Neil Naveen][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/neilnaveen +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/18/11/learning-golang +[2]: https://codecombat.com +[3]: https://leetcode.com/neilnaveen +[4]: https://www.codingame.com/profile/0fa733a2c7f92a829e4190625b5b9a485718854 +[5]: https://github.com/cli/cli +[6]: https://github.com/cli/cli/pull/4473 +[7]: https://neilnaveen.dev +[8]: https://leetcode.com/neilnaveen/ +[9]: https://www.youtube.com/watch?v=K6NRUGol-rE \ No newline at end of file From 7cfc02e7be8a21e8c5a3778e967c43299d49082b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 18 Mar 2023 11:36:19 +0800 Subject: [PATCH 123/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230317.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20being=20open=20at=20work=20results=20in=20happy=20customers?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w being open at work results in happy customers.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/talk/20230317.2 ⭐️⭐️ How being open at work results in happy customers.md diff --git a/sources/talk/20230317.2 ⭐️⭐️ How being open at work results in happy customers.md b/sources/talk/20230317.2 ⭐️⭐️ How being open at work results in happy customers.md new file mode 100644 index 0000000000..aeb4e1f4af --- /dev/null +++ b/sources/talk/20230317.2 ⭐️⭐️ How being open at work results in happy customers.md @@ -0,0 +1,101 @@ +[#]: subject: "How being open at work results in happy customers" +[#]: via: "https://opensource.com/article/23/3/open-customer-support" +[#]: author: "Kat Gaines https://opensource.com/users/katgaines" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How being open at work results in happy customers +====== + +Every interaction we have with another person is influenced by our emotions. Those emotions have ripple effects, especially when it comes to how you do business. A happy customer patronizes your business more, recommends it to family and friends, writes a positive review, and ultimately leads to more money being spent at your business than if they'd been disappointed. The most basic known variable of providing good customer service influences this: If something isn't going as expected, work to make it right (within reason), and you'll save the relationship. + +In tech, you can respect this in a few ways. If you listen to customer feedback, create products they'll find useful and intuitive, and nurture those positive associations with your project, then you'll do well. But there's an oft overlooked component to your customer's emotional perception of your business, and that's the customer support team. + +### Customer support team + +The interactions handled by a support team carry a high emotional charge for the customer. Software needs to work, and it needs to work **now**. + +Software faces a unique challenge when it comes to how a customer-facing team builds a relationship: it's primarily a virtual interaction. For in-person customer care, an employee wields the superpower of eye contact, a strong emotional influence. Facial expressions force us to interact with more empathy than say, a voice over the phone, or an email response. + +When that's not possible, though, the ability to shift the emotional tone to a calm one can be challenging. It's easy for a customer to have a natural bias toward online support. Maybe they've had a bad experience with heavily automated support in the past. There are plenty of badly configured chatbots, unnavigable phone menus, and dispassionate robotic voices to add fuel to the fire when emotions are already high. A customer may have talked to a support agent who's [miserable at work][1] and therefore apathetic to the outcome. The customer carries these experiences into their emotional approach when asking for help. This can create stress for the agent who picks up their ticket, and a vicious cycle repeats. + +Because of high stakes, emotional nature of Customer Support (CS), your business has an opportunity. Corral these big emotions through the people who have the most access to them. The key to doing this successfully is to remember the ripple effect. A customer service agent with the necessary tools and knowledge at their fingertips is happy. A happy customer service agent has better conversations with customers. You can set yourself apart from competitors by creating happy customer support agents in an empowered and knowledgeable customer service team. How is this done? + +### Preparing for success + +If you’re a leader in customer support, or a stakeholder elsewhere in the organization (engineering, product, and so on) who works with support a lot, you can work in key areas to make the lives of your support agents a little easier: + +#### Create visibility + +As a customer support agent, you need data about the customer you're helping. You need to know the systems your customer is using, and the products you're meant to support. It's crucial to have visibility into other teams in the organization, because they have that kind of data. You need to know who to ask for help when a problem arises, what the known issues are, what's being worked on already, and so on. + +Siloed departments are a common major barrier to achieving visibility across teams. This can be made worse by tools and systems that don't connect departments, such as a spreadsheet directory or filing issues in an internal tracking tool. When this is the case, the customer service department can't get timely information on the status of an issue, and the engineering department can't get a good feel for how customers are experiencing the issue. + +If your customer service team is given visibility into the complexity faced by your engineering teams, it's easier to clearly articulate the state of issues to customers and stakeholders. Customer service teams can create visibility for engineering, too. Crucial information about problems can come from your customers. When engineering has visibility into customer issues, they're better equipped to prioritize for customer needs. + +Everyone works hard to prevent customers from being affected by issues, but that's not always realistic. Use the data your customers give your customer service team about what's wrong, and empower your customer service agents to become part of an incident response process rather than just reacting to it. + +#### Make difficult moments easy + +Customer support is a difficult job. If you have never worked in customer service, I'm giving you some homework: shadow your customer support team so you can understand where friction happens. It's a great way to get to know who your customers really are, by seeing them in their highest emotional moments, and seeing how your team navigates that. Customer service means all the questions coming your way, few of the answers at your fingertips, manual tasks to complete, and not enough people to share the load. + +Make the job easy for customer service where you can. It will pay off. Maybe you can help the team automate mundane tasks to better focus on more interesting problems. Often this manifests in chatbots, but it's worth being creative here. For example, can automation be applied when escalating tickets to engineering? That could free an agent to work on their troubleshooting process, rather than the manual steps of making that escalation happen. + +You can use tooling your engineering team might already have in place to find these opportunities. Operations platforms can be shared to put both team's metrics out in the open, helping everyone stay aligned on common goals. + +The feedback loop required for a mature software development life cycle needs the customer service team to operate effectively. You can only do that with shared visibility across your organization. + +Making it easy also means proactive design, especially when it comes to processes for critical moments. You probably have a process to manage major incidents. When you share these tools and processes with customer service, you enable greater visibility and gain valuable insight and teammates along the way. During an incident, customer service can play a few key roles: + +##### Aggregating customer reported issues + +When an incident triggers, engineering needs to quickly find out how much of the service is impacted, including how many features, the depth to which they are affected, and whether they are slow or completely offline. Customer impact is part of that, which customer service can help uncover by associating inbound customer complaints to technical incidents to help drive priorities. As customer service receives reports of issues during an incident, that data becomes part of the impact of the incident, and is incorporated into the resolution process. + +##### Prioritization of SLA + +Your customer service team is in a unique position to help confirm the impact of an incident on the end user. They have insight into when services are reaching their [Service Level Agreement (SLA)][2] for certain customers, and can alert the responding team. This is an important piece of information to manage, and engineering teams might not have visibility into those contractual agreements. This aids in the prioritization of issues during incidents. CS can advise on whether or not an incident should be escalated or have its severity increased based on the customer intelligence they are receiving. More customer impact could mean a higher severity level for the incident, more responders included in the triage, and more stakeholders informed. + +##### Liaisons and stakeholder communication + +Speaking of stakeholders, customer service can take the lead when it comes to codifying communication practices for incidents. Customer service can take ownership of policies around messaging for customers, template responses, and communication processes. Templates with clear information and status pages to keep up to date are just some of the assets they can manage. + +##### Post-incident follow-up + +You'll always encounter customers who watch your status page like a hawk for updates. These customers and others ask customer service for updates if they don't see progress. You can ease the cognitive load of responding to these customers with the newfound connection with the incident process. If you hold incident reviews, then customer service must be part of that conversation. The tone of a conversation changes when a customer service agent has extra data to present to users about the impact of the incident, the resolution, and long-term plans for prevention. Your customer feels consistency, and your agent feels real ownership of the conversation. + +At the end of the day, involving your customer service team through the entire process, from start to finish, allows them to gain control of their own destiny. It lets them provide valuable input back into the resolution process, and leverage their improved experience to improve the [customer experience][3]. + +### Invest in people + +You can't create a happy employee out of thin air. Customer service leaders need help doing this. People need investment in career growth, the ability to collaborate with their peers, and a voice in the organization to know that their feedback is heard. + +Your customer support team is not here to report on metrics to the business or to slog through the queue. Investing means giving them time and space to expand their skills and grow in their careers. For customer service leaders, this comes with knowing you may not keep them in support forever. You can build a strong team that offers phenomenal support, and also creates a hiring funnel into the rest of the business. + +The first level of this is up-leveling agents within support. It's common to have a "premium" support team, or similar, for customers who need a high touch level of support, and the ability to get help at any hour. Hiring 24x7 staff won't help a customer service leader redesign their team's status as a cost center, but developing a staffing model to use the existing team's time efficiently can. Sharing tooling with engineering can be one way to get there. For example, if engineering is on call for responding to issues, customer service can use the same tooling to provide a creative solution, rotating a specialized team for those odd hours or high priority issues. + +This can open up a new career path for those who want to be on a team with specialized knowledge. Having a team that can be notified as-needed, rather than fully staffed at all times, staring at a queue, and waiting for incoming requests, allows leaders to scale their customer experience efficiently. + +Empowering customer service teams to reach out to other teams and advocate for customers also creates new communications channels and opportunities. Your customer service team can serve as a gateway into your organization for technical personnel who are still building skills. A close relationship with engineering supports career growth. Shared processes promote this. So does a shadowing program, having a subject matter expert in support departments for different product areas, and intentionally building career paths to assist transitions when it's time to do so. Customer service agents who transition to other departments bring with them their customer focus and dedication to the customer experience. This is a valuable addition to teams in your organization which increases [empathy][4] across the board. + +The modern software development life cycle doesn't end when code is checked into a repository and all the tests turn green. A constant feedback loop from users back into development planning links user requirements directly to the product management phase of the cycle. Organizations across various industries have seen the benefits of adopting shared goals and purposes across different teams. Include your customer service team in larger organization-wide initiatives, like DevOps transformations and automation projects. Doing this increases the effectiveness of customer-focused teams, and improving their day-to-day work in turn improves the experience they can provide for customers. In a nutshell: Happy agents translate to happy customers. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/open-customer-support + +作者:[Kat Gaines][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/katgaines +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/1/community-leadership-introducer-chief +[2]: https://opensource.com/article/23/2/sle-sla-open-source-projects +[3]: https://enterprisersproject.com/article/2023/2/transform-customer-service-enterprise-it?intcmp=7013a000002qLH8AAM +[4]: https://enterprisersproject.com/article/2020/7/customer-experience-how-develop-empathy?intcmp=7013a000002qLH8AAM \ No newline at end of file From 5b4a0ff592657fd33aeca6bbecda28f278c3f5ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sun, 19 Mar 2023 13:41:12 +0800 Subject: [PATCH 124/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230318.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20I=20got=20my=20first=20job=20in=20tech=20and=20helped=20oth?= =?UTF-8?q?ers=20do=20the=20same.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...first job in tech and helped others do the same.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/tech/20230318.0 ⭐️⭐️ How I got my first job in tech and helped others do the same.md diff --git a/sources/tech/20230318.0 ⭐️⭐️ How I got my first job in tech and helped others do the same.md b/sources/tech/20230318.0 ⭐️⭐️ How I got my first job in tech and helped others do the same.md new file mode 100644 index 0000000000..bdcde0de37 --- /dev/null +++ b/sources/tech/20230318.0 ⭐️⭐️ How I got my first job in tech and helped others do the same.md @@ -0,0 +1,107 @@ +[#]: subject: "How I got my first job in tech and helped others do the same" +[#]: via: "https://opensource.com/article/23/3/my-first-job-tech" +[#]: author: "Paloma Oliveira https://opensource.com/users/discombobulateme" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I got my first job in tech and helped others do the same +====== + +Two years ago, I got an interview with Sauce Labs when they opened an internship in the [Open Source Program Office][1] (OSPO). There was a lot of competition, and I didn’t have the usual technical background you might think a tech company would be looking for. I was stumbling out of a career in the arts, having taken a series of technical courses to learn as much Python and JavaScript as I could manage. And I was determined not to squander the chance I had at an interview working in open source, which had been the gateway for my newfound career path. + +It was in the [PyLadies of Berlin][2] community that I met [Eli Flores][3], a mentor and friend who ultimately referred me for the interview. I would probably not have had a chance for an interview in Sauce Labs if it hadn’t been for Eli. + +My CV was bad. + +I was trying to assert technical skills I didn’t have, and trying to emulate what I thought an interviewer for the position would want to read. Of course, the interview selection process is difficult, too. Somebody has to sift through stacks of paper to find someone with the right skills, somebody who fits into the required role, while simultaneously hoping for someone to bring a unique perspective to the organization. On the one hand, you offer a chance to interview, trusting the judgment of someone you trust. On the other hand, you may end up having clones of the people around you. + +This is where referral programs shine the most. And this was the story of how I got [my first job in tech][4]. + +Was a referral enough? Many would consider that they’d done their good deed for the year. But not Eli. + +Eli was the first female software engineer to be hired by Sauce Labs in Germany. By the time I arrived, there were three of us: Eli, myself, and Elizabeth, a junior hired one year before. Based on her own struggles, Eli kept an eye on me, invited me for constant check-ins and provided me with practical information about creating my career path based on what the company would consider a check list. She didn’t just share a link and walk away. She explained to me what it meant, and some “traps” that were built in to the system. Leadership, at the time, hadn’t been trained to recognize their biases, and that had affected Eli’s career path. + +Besides that, she was the one putting together a formal document explaining to the ones with the power to make decisions why they needed to give me a junior position at the end of my internship. She gathered information among my peers, found out who had hiring power, prepared them months before my contract ended, and gave me the insight I needed to defend my position. + +I did my part. + +When things looked uncertain about my contract renewal, I asked a friend and mentor what to do, and what was expected. I asked others who’d been in my place recently. I built a document measuring my progress along the months, ensuring that my achievements clearly intersected with the company’s interpretation of the engineering career path. With that, I could demonstrate that Eli was right: They had every reason to keep me, not according to subjective feelings, but with objective metrics. + +### Defining my role + +There was still a big problem, though. Sauce wanted to keep me, but they didn’t know what to do with me. Junior roles require guidance, and the progressive collection of knowledge. I’d found a passion for the Open Source Program Office, where I could actively collaborate with the open source community. But an OSPO may be one of the most complex departments in a company. It gathers open source and business understanding, and it requires autonomy to make connections between business needs and the needs of open source. My peers were mostly staff engineers, contributing to open source projects critical to the business, and those are complex contributions. + +One of my peers, [Christian Bromann][5], was also seeking to grow his managerial skills, and so he took me under his wing. We started having regular 1-on-1 sessions, as we discussed what it meant to be doing open source in a business setting. He invited me to get closer to the foundations and projects he was part of, and we did several paired programming sessions to help me understand what mattered most to engineers tasked with meeting specific requirements. He unapologetically placed a chair at the company’s table for me, integrating me into the business, and so my role became clear and defined. + +I had help from several colleagues from various other departments to stay and grow as a professional. They each showed me all the other things I didn’t know about the corporate world, including the single most important thing that I didn’t know existed in business: the way we were actually working to make lives better. We had diversity, equity, and inclusion (DEI) groups, environmental, employee resource groups, informal mentorship, and cross department support. The best thing about Sauce Labs is our people. They are incredibly smart and passionate humans, from whom I learn lessons daily. + +A short time later, I decided it was time for me to give back. + +I looked back and saw all the others that came before me, and helped me land a job I enjoy and that had critically improved my life. I urgently felt the need to bring another chair to this table for someone else. I started digging to find a way to make sense of how a for-profit organization could have a fellowship program. + +### A fellowship program in a for-profit organization + +I was now formally occupying a role that bridged the OSPO and the Community departments. My main task was to create developer relations, focused on open source communities (I know, it’s a dream job!) + +The imbalance between contribution and consumption of open source, especially within [infrastructure][6] (which business depends upon) is always a risk for the ecosystem. So the question is, what does a company and an open source project have in common? + +The answer is humans. + +There are many legal issues that makes it hard for a for-profit company to run a fellowship program. This differs from country to country because laws differ from country to country. Germany has a lot of protections in place for workers. As my human resource department told me: “If it smells like a job, it is a job.” That usually means taxes and expenses, and of course costs are always the major determining factor when launching a new program. + +Unlike an internship, which implies you are training someone to be hired after the training period and, therefore, requires a pre-approved budget with a year’s salary accounted for. A fellowship, however, is a loose contract, closer to a scholarship, and only spans a specific amount of time. It’s a great fit for an open source project, and similar initiatives like the [Google Summer of Code][7] and Outreachy. + +The model I was proposing was focused on the humans. I wanted to facilitate entry into the field for aspiring local technologists. I’d gone through similar programs myself, and I knew how frustrating they could be. They’re competitive, and to have a hope of being selected you had to commit to months of unpaid work prior to the application process. + +By creating several small local initiatives, I believed the whole open source ecosystem could benefit. I felt that lowering the barriers to entry by not being so competitive, and making the application process easier, would surely bring more people in, especially the ones unable to commit to months of unpaid work. + +### Fellowship + +The [Open Source Community Fellowship][8] is a six months paid program that connects for-profit organizations with open source projects to foster diversity in contribution and governance in open source. + +Having employees as mentors decreases the cost of the program, and brings a huge value to a company because it helps train employees as better mentors to others. Several studies prove the benefit of having formal and informal mentorship within companies, with rewards including a sense of belonging, and it tends to result in retaining talent. Many companies say their employees are expected to have mentorship skills in order to achieve senior levels, but it’s a skill that needs to be put into practice. By giving employees 2 hours a week to acquire this skill, very little work is lost for a lot of benefit for the long term. + +The open source project a business connects with needs to be critical for the business. If you’re going to pay a certain number of people to work for six months exclusively on a project, then there needs to be obvious benefit from that expenditure. I encourage fellowships to be an interdisciplinary program, because most open source projects need help in documentation, translation, design, and community support. + +And yes, a fellowship should be six months, no less. Programs that offer only three months, maybe with a stipend, isn’t enough for a proper on-boarding and commitment. The maintainers of tomorrow need to be integrated in the communities of today, and that takes time. + +Lastly, yes it has to be a paid program. We need sponsorship, not just mentorship. Although mentorship helps you increase networking, we all have bills to pay. Paying fellows a salary allows them to truly commit to the project. + +Sauce Labs is sponsoring for the first time the program that started in December 2022 with five fellows across the USA. We hope this becomes a [program that exemplifies the soul of the free software movement][9], so you can fork it, modify it, and redistribute it. + +### You’ve got the power + +We’re often faced with the question, “What can I do?” Instead of feeling overwhelmed by difficulties that will always exist, acknowledge all the power you have in your current situation. Here are some ideas based on my own story: + +- Become a community organizer. No groups near by? Create your own, and others will follow. Support is needed. +- Become a mentor. Join initiatives or create a formal or informal program at your company. +- Pay attention to your colleagues, and proactively offer your help. Even with a steady job, you still need help to grow. Use your privilege to get all the voices heard in your the meetings. +- Adopt a fellowship program to call your own. It’s a replicable model, easy to implement, and it brings innumerable benefits to the open source ecosystem. + +There’s always something we can do to make the world around us a little better, and you are an important piece of that. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/my-first-job-tech + +作者:[Paloma Oliveira][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/discombobulateme +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/business/16/5/whats-open-source-program-office +[2]: https://berlin.pyladies.com/ +[3]: https://www.linkedin.com/in/elifloresch/ +[4]: https://opensource.com/article/21/4/my-first-tech-job +[5]: https://bromann.dev/ +[6]: https://www.redhat.com/en/topics/cloud-computing/what-is-it-infrastructure?intcmp=7013a000002qLH8AAM +[7]: https://opensource.com/article/21/10/google-summer-code +[8]: https://saucelabs.com/resources/blog/sauce-labs-community-fellowship-program-open-source +[9]: https://saucelabs.com/blog/announcing-sauce-labs-fellows-2022 \ No newline at end of file From 23d41f15072eea467dd75179da4d0b0b6a229a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sun, 19 Mar 2023 13:42:31 +0800 Subject: [PATCH 125/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230319.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Li?= =?UTF-8?q?nux=20Jargon=20Buster=20What=20is=20LUKS=20Encryption.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️ Linux Jargon Buster What is LUKS Encryption.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md diff --git a/sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md b/sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md new file mode 100644 index 0000000000..d6c4c9a181 --- /dev/null +++ b/sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md @@ -0,0 +1,86 @@ +[#]: subject: "Linux Jargon Buster: What is LUKS Encryption?" +[#]: via: "https://itsfoss.com/luks/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Jargon Buster: What is LUKS Encryption? +====== + +Computer security methods are designed to keep private things, well, private. There are many ways to secure a system. Some users use a simple username/password login scheme for basic protection. Other users may use extra protection through encryption in various ways like using VPN and disk encryption. + +If you have sensitive client data on your machine (you might be running a business) or material deemed intellectual property or you are privacy cautious, you may want to consider disk encryption. + +Some benefits of disk encryption are: + +- Secure your system from hackers +- Prevent data leaks +- Protect you from potential liability issues + +Disk encryption software prevents a desktop hard disk drive, a portable USB storage device, or laptop, from accessing unless the user inputs the correct authentication data. If your laptop is ever lost or stolen, encryption protects the data on the disk. + +These days, new Windows-powered systems come with BitLocker encryption by default. On Linux, LUKS is the most popular way of employing disk encryption. + +Wondering what is LUKS? I'll brief you on the topic. + +### Technical jargons + +Before going further, some terms should be defined. There is a lot to LUKS so it will help to break things down, especially if you're beginning to look into this. + +**Volume**: A volume is a logical storage area that can be used to store data. In the context of disk encryption, a volume refers to a portion of a disk that has been encrypted to protect its contents. + +**Parameters**: Parameters are settings that control how an encryption algorithm works. Parameters might include the encryption algorithm used, the key size, and other details about how the encryption should be performed. + +**Cipher type**: A cipher is a mathematical algorithm used for encryption It refers to the specific encryption algorithm that is being used to protect the data on an encrypted volume. + +**Key size**: The key size is a measure of the strength of an encryption algorithm: the larger the key size, the stronger the encryption. It is often expressed in bits, such as 128-bit encryption or 256-bit encryption. + +**Header**: The header is a special area at the beginning of an encrypted volume that contains information about the encryption, such as the encryption algorithm used and the encryption keys. + +The next definition can be tricky to a newcomer, but it's worth knowing about, especially when dealing with LUKS; it's quite handy. + +**Container**: A container is a special file that acts like a virtual encrypted volume. It can be used to store encrypted data, just like an encrypted partition. The difference is that a container is a file that can be stored on an unencrypted partition, while an encrypted partition is a portion of a disk that has been encrypted as a whole. A container, then, is a file _that acts as a virtual encrypted volume_. + +### What Is LUKS and What Can It Do? + +[Linux Unified Key Setup - LUKS][1] is a disk encryption specification created by Clemens Fruhwirth in 2004 and was originally intended for Linux. It is a well-known, secure, and high-performance disk encryption method based on an enhanced version of [cryptsetup][2], using [dm-crypt][3] as the disk encryption backend. LUKS is also a popular encryption format in Network Attached Storage (NAS) devices. + +LUKS can also be used to create and run encrypted containers. Encrypted containers feature the same level of protection as LUKS full-disk encryption. LUKS also offers multiple encryption algorithms, several modes of encryption, and several hash functions - a little over 40 possible combinations. + +![LUKS schematic diagram][4] + +Any filesystem can be encrypted, including the swap partition. There is an unencrypted header at the beginning of an encrypted volume, which allows up to 8 (LUKS1) or 32 (LUKS2) encryption keys to be stored along with encryption parameters such as cipher type and key size. + +The existence of this header is a major difference between LUKS and dm-crypt, since the header allows multiple different passphrases to be used, with the ability to change and remove them easily. It is worth a reminder, however, that if the header is lost or corrupted, the device will no longer be decryptable. + +There are two versions of LUKS, with LUKS2 having features such as greater resistance to header corruption, and the use of [Argon2][5] encryption algorithm by default (LUKS1 uses [PBKDF2][6]). Conversion between both versions of LUKS is possible in certain situations, but some features may not be available with LUKS1. + +### Where Can I Learn More? + +I am hopeful that this short article is a help in understanding a little about LUKS and encryption. The exact steps for creating and using an encrypted partition with LUKS varies, depending on an individual's specific needs, so I will not cover installation and setup here. + +If you want a guide to lead you though setting up LUKS, an excellent guide can be found in this article: [Basic Guide To Encrypting Linux Partitions With LUKS][7]. If you're new at this, and you want to try out LUKS, safe learning can be done on a virtual machine or a spare computer to get a feel for how it works. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/luks/ + +作者:[Bill Dyer][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/bill/ +[b]: https://github.com/lkxed/ +[1]: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup?ref=its-foss +[2]: https://www.tutorialspoint.com/unix_commands/cryptsetup.htm?ref=its-foss +[3]: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-crypt.html?ref=its-foss +[4]: https://itsfoss.com/content/images/2023/03/luks-schematic-diagram.png +[5]: https://www.argon2.com/?ref=its-foss +[6]: https://en.wikipedia.org/wiki/PBKDF2?ref=its-foss +[7]: https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks?ref=its-foss \ No newline at end of file From c03593deb87f7469b1a7e4c7708aba813833a2f2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Mar 2023 14:45:04 +0800 Subject: [PATCH 126/318] RP @Cubik65536 https://linux.cn/article-15639-1.html --- ... 111 Released with New Native Notifications.md | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) rename {translated/news => published}/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md (63%) diff --git a/translated/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md b/published/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md similarity index 63% rename from translated/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md rename to published/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md index 2d6636508e..ff816de8e5 100644 --- a/translated/news/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md +++ b/published/20230316.2 ⭐️ Firefox 111 Released with New Native Notifications.md @@ -3,38 +3,40 @@ [#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" [#]: collector: "lkxed" [#]: translator: "Cubik65536" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15639-1.html" -Firefox 111 已发布,带来了原生系统功能 +Firefox 111 已发布,带来了原生系统通知 ====== -**Firefox 111 已发布,带来了原生通知、新增的本地化语言以及增强的 Web 平台功能。** +![][0] + +> Firefox 111 已发布,带来了原生通知、新增的本地化语言以及增强的 Web 平台功能。 ![在 Linux 上运行的 Firefox 111][1] ### Firefox 111 发布亮点 -Firefox,一个流行的网络浏览器,已经发布了 111 版本,其中引入了几个新功能和增强功能。其中一个突出的新增功能是对 Windows 原生系统通知的支持,为整个平台提供了更流畅和一致的用户体验。 +Firefox,一个流行的网络浏览器,已经发布了 111 版本,其中引入了几个新功能和增强功能。其中一个突出的新增功能是支持 Windows 原生的系统通知,为整个平台提供了更流畅和一致的用户体验。 除此之外,Firefox Relay 用户现在可以轻松地从 Firefox 凭据管理器中直接创建 Relay 邮箱。此功能仅适用于登录了 Firefox 帐户的用户,为其在线活动提供了额外的隐私和安全保护。 -另外,Firefox 111 已经通过添加两个新的语言 – 弗留利语Silhe Friulian (fur) 和 撒丁语Sardinian (sc) – 来扩大其语言支持列表。这一举措旨在为世界各地的 Firefox 用户提供更好的可访问性和包容性。 +另外,Firefox 111 已经通过添加两个新的语言 – 弗留利语Silhe Friulian(fur)和 撒丁语Sardinian(sc)– 来扩大其语言支持列表。这一举措旨在为世界各地的 Firefox 用户提供更好的可访问性和包容性。 在 Web 平台方面,Firefox 已经在表单元素上引入了 “rel” 属性,使开发人员可以更轻松地指定当前文档与表单目标之间的关系。这一功能与其他浏览器兼容,并简化了 Web 应用程序的开发过程。 -最后,Firefox 已经启用了原点私有文件系统访问,这是一种新的存储 API,允许 Web 应用程序在沙箱中存储和检索文件系统中的数据。这一增强功能为开发人员提供了更多对数据存储和检索过程的控制,确保用户数据的安全性和隐私性。 +最后,Firefox 已经启用了 原点私有文件系统访问origin private file system access,这是一种新的存储 API,允许 Web 应用程序在沙箱中存储和检索文件系统中的数据。这一增强功能为开发人员提供了对数据存储和检索过程的更多控制,确保用户数据的安全性和隐私性。 ### 下载和更新 -对于 Linux 发行版,如果您通过发行版的官方仓库使用 Firefox,那么您应该在几天内获得此更新。 +对于 Linux 发行版,如果你通过发行版的官方仓库使用 Firefox,那么你应该在几天内获得此更新。 -但是,您也可以从下面的页面下载此版本的压缩版本。有关其他下载选项,请访问我们的 [Firefox 下载指南][2]。 +但是,你也可以从下面的页面下载此版本的压缩版本。有关其他下载选项,请访问我们的 [Firefox 下载指南][2]。 -[下载 Firefox 111][3] +> **[下载 Firefox 111][3]** -浏览愉快! +祝浏览愉快! - [官方发布通知][4] - [Beta110 发布通知][5] @@ -51,7 +53,7 @@ via: https://debugpointnews.com/firefox-111/ 作者:[arindam][a] 选题:[lkxed][b] 译者:[Cubik65536](https://github.com/Cubik65536) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -63,3 +65,4 @@ via: https://debugpointnews.com/firefox-111/ [4]: https://www.mozilla.org/en-US/firefox/111.0/releasenotes/ [5]: https://www.mozilla.org/en-US/firefox/111.0beta/releasenotes/ [6]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/111 +[0]: https://img.linux.net.cn/data/attachment/album/202303/19/144348oyfh999yy292f0f9.jpg \ No newline at end of file From 97e0f411761ad8ec62993e1e17dc7c30f7e45969 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Mar 2023 15:51:39 +0800 Subject: [PATCH 127/318] RP @Chao-zhi https://linux.cn/article-15640-1.html --- ...ntist's guide to open source community analysis.md | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) rename {translated/tech => published}/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md (82%) diff --git a/translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md b/published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md similarity index 82% rename from translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md rename to published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md index 9fca276fe8..a4e928cad1 100644 --- a/translated/tech/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md +++ b/published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md @@ -3,24 +3,28 @@ [#]: author: "Cali Dolfi https://opensource.com/users/cdolfi" [#]: collector: "lkxed" [#]: translator: "Chao-zhi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15640-1.html" 数据科学家的开源社区分析指南 ====== +![][0] + +> 研究一下这个框架,来建立你自己的开源项目的数据分析。 + 在数据分析的黄金时代,开源社区也不能免俗。大家都热衷于将一些华丽的数字放到演示幻灯片上,但如果你掌握了正确的分析方法,这些信息可以为你带来更大的价值。 -或许你认为作为一名[数据科学家][1],我会告诉你数据分析和自动化能为你的社区决策提供信息。但实际上,情况恰恰相反。利用数据分析来建立你现有的开源社区知识,吸收其他的知识,并发现潜在的偏见和没有考虑的观点。你或许是实施社区活动的专家,而你那些同事则是代码方面的专家。当你们每个人都在自己的知识背景下开发可视化时,你们都可以从这些信息中受益。 +或许你认为作为一名 [数据科学家][1],我会告诉你数据分析和自动化能为你的社区决策提供信息。但实际上,情况恰恰相反。利用数据分析来构建你现有的开源社区知识,吸收其他的知识,并发现潜在的偏见和没有思考过的观点。你或许是实施社区活动的专家,而你那些同事则是代码方面的专家。当你们每个人都在自己的知识背景下将信息可视化时,你们都可以从这些信息中受益。 -让我们来面对现实吧。每个人都有一千零一件事情要做,而且总感觉一天的时间永远不够用。如果要得到关于你的社区的答案需要几个小时,你就不可能有足够的精力去解决这些事情。但是,花时间创建一个全面发展的可视化项目,可以帮助你时刻掌握你所关心的社区的不同方面,这就将你从精疲力尽中解放了出来。 +让我们来面对现实吧。每个人都有一千零一件事情要做,而且总感觉一天的时间永远不够用。如果需要几个小时才能得到你的社区的答案,你就不可能有足够的精力去解决这些事情。但是,花时间创建一个全面发展的可视化项目,可以帮助你时刻掌握你所关心的社区的不同方面,这就将你从精疲力尽中解放了出来。 随着“数据驱动”思维的盛行,围绕开源社区的信息宝库可能是一种祝福,也可能是一种诅咒。下面我将分享一些方法,告诉你如何从数据干草堆中挑出有价值的信息。 ### 你的预期是什么? -当考虑一个指标时,首先要明确你的目的和需求。以下是几个可能涉及的概念: +当考虑一个指标时,首先要明确你想提供的观点。以下是几个可能涉及的概念: **告知性和影响性的行动:** 你的社区是否存在某个领域尚未被理解?你是否已迈出第一步?你是否试图确定特定方向?你是否正在衡量现有倡议的效果? @@ -42,11 +46,11 @@ 假设你开始进行分析,并且已经知道你将要研究的内容对你或你的社区是有用的。那么你该如何提高分析的价值呢?这里的想法是建立在“传统”的开源社区分析基础之上。假设你的数据表明,在项目的整个生命周期内,你共有 120 个贡献者。这是你可以放在幻灯片上的价值,但你不能从中做出决策。从仅有一个数字到获得洞见,逐步采取措施。例如,你可以从相同的数据中将贡献者分为活跃和流失的贡献者(那些已经有一段时间没有做出贡献的贡献者),以获得更深入的了解。 -#### 场景 2:社区活动影响测量 +#### 场景 2:社区活动的影响测量 ![目标和影响][3] -考虑聚会、会议或其他任何社区外联活动。你如何看待你的影响力和目标?这两个步骤实际上互相影响。一旦你确定了活动的目标,就要确定可以用什么来检测效果。这些信息有助于设定活动的目标。在活动开始时,很容易陷入模糊的计划而非具体的计划的陷阱中。 +针对聚会、会议或其他任何社区外联活动,你如何看待你的影响力和目标?这两个步骤实际上互相影响。一旦你确定了活动的目标,就要确定可以用什么来检测效果。这些信息有助于设定活动的目标。在活动开始时,很容易陷入模糊的计划而非具体的计划的陷阱中。 #### 场景3:形成新的影响分析区 @@ -56,13 +60,13 @@ #### 第一步:分解关注区和视角 -首先,想象一下魔法 8 球——你可以问任何问题,摇一摇,就能得到答案的玩具。考虑你的分析区。如果你能立即得到任何答案,那会是什么? +首先,想象一下魔法 8 球——你可以问任何问题,摇一摇,就能得到答案的玩具。考虑你的分析领域。如果你能立即得到任何答案,那会是什么? 接下来,考虑数据。从你的魔法 8 球问题中,哪些数据源可能与问题或关注领域有关? -在数据背景下,哪些问题可以被回答,让你更接近你提出的魔法 8 球问题?需要注意的是,如果你试图将所有的数据汇集在一起,你必须考虑到所做出的假设。 +在数据背景下,哪些问题可以回答,让你更接近你提出的魔法 8 球问题?需要注意的是,如果你试图将所有的数据汇集在一起,你必须考虑到所做出的假设。 -#### 第二步:将问题转化为度量标准 +#### 第二步:将问题转化为指标 以下是第一步中每个子问题的处理过程: @@ -74,7 +78,7 @@ #### 第三步:分析实践 -这一步是你开始处理你所创建的度量标准或可视化的影响的地方。 +这一步是你开始处理你所创建的指标或可视化的影响。 首先要考虑的是,这个度量标准是否符合当前对社区的了解。 @@ -83,7 +87,7 @@ 一旦你确定你的分析足够稳定,可以开始在信息上实施社区倡议。当你正在进行分析以确定下一步最佳步骤时,你应该确定衡量倡议成功的具体方法。 -现在,观察这些由你的度量标准提供信息的社区倡议。确定是否可以用你之前建立的成功衡量指标观察到影响。如果没有,可以考虑以下几点: +现在,观察这些由你的指标提供信息的社区倡议。确定是否可以用你之前建立的成功衡量指标观察到影响。如果没有,可以考虑以下几点: - 你是否在衡量正确的事情? - 倡议战略是否需要调整? @@ -104,7 +108,7 @@ 这个问题的目的是先看看新的贡献者在做什么。 -**数据:** GitHub上的首次贡献随时间推移的数据(问题、PR、评论等)。 +**数据:** GitHub 上的首次贡献随时间推移的数据(议题、PR、评论等)。 ![每季度首次贡献图表][5] @@ -121,16 +125,16 @@ **行动项目:** -- 给 "好的第一个问题 "贴上一致的标签,并将这些问题链接到贡献文档中。 +- 给 “好的第一个问题” 贴上一致的标签,并将这些问题链接到贡献文档中。 - 在这些问题上添加一个 PR 伙伴。 -**子问题 2:** "我们的代码库真的依赖于路过的贡献者吗?" +**子问题 2:** “我们的代码库真的依赖于路过的贡献者吗?” **数据:** GitHub 的贡献数据。 ![贡献者类型随时间变化的图表][7] -**可视化:** "贡献总额:按路过和重复贡献者的贡献进行细分。" +**可视化:** “贡献总额:按路过和重复贡献者的贡献进行细分。” **根据这一信息可能采取的行动。** @@ -138,7 +142,7 @@ ### 分析:吸取教训 -数字和数据分析并不是“事实”,它们可以支持任何观点。因此,在处理数据时,内部怀疑者应该非常积极,并进行反复迭代,以带来真正的价值。你不希望你的分析只是一个“yes man”,因此花点时间退一步,评估你所做的假设。 +数字和数据分析并不是“事实”,它们可以支持任何观点。因此,在处理数据时,内部怀疑者应该非常积极,并进行反复迭代,以带来真正的价值。你不希望你的分析只是一个 “yes man”,因此花点时间退一步,评估你所做的假设。 如果一个指标只是指出了调查的方向,那也是一个巨大的胜利。你不可能看清或想到所有的事情,兔子洞可以是一个好事,对话的起点可以把你带到一个新的地方。 @@ -178,7 +182,7 @@ via: https://opensource.com/article/22/12/data-scientists-guide-open-source-comm 作者:[Cali Dolfi][a] 选题:[lkxed][b] 译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -199,3 +203,4 @@ via: https://opensource.com/article/22/12/data-scientists-guide-open-source-comm [13]: https://www.redhat.com/en/resources/data-intensive-applications-hybrid-cloud-blueprint-detail?intcmp=7013a000002CxqkAAC [14]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet?intcmp=7013a000002CxqkAAC [15]: https://opensource.com/tags/data-science?intcmp=7013a000002CxqkAAC +[0]: https://img.linux.net.cn/data/attachment/album/202303/19/155043lcx6bxqw5ci5gpgi.jpg \ No newline at end of file From d69c963a079793206f97aed78205de73b684a5a7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Mar 2023 15:55:30 +0800 Subject: [PATCH 128/318] R --- ...a scientist's guide to open source community analysis.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md b/published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md index a4e928cad1..8cefdd2de8 100644 --- a/published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md +++ b/published/20221206.3 ⭐️⭐️ A data scientist's guide to open source community analysis.md @@ -162,19 +162,6 @@ 把上面的例子作为建立你自己的开源项目的数据分析的框架。对你的结果有很多问题要问,知道这些问题和它们的答案可以把你的项目引向一个令人兴奋和富有成效的方向。 -## 关于数据科学的更多信息 - -请考虑以下来源,以获得更多关于数据科学和为其提供数据的技术的信息。 - -- [什么是数据科学?][8] -- [什么是 Python?][9] -- [怎么成为数据科学家?][10] -- [数据科学家的一天][11] -- [什么是大数据?][12] -- [白皮书:混合云蓝图中的数据密集型智能应用][13] -- [MariaDB 和 MySQL 小技巧][14] -- [最新的数据科学文章][15] - -------------------------------------------------------------------------------- via: https://opensource.com/article/22/12/data-scientists-guide-open-source-community-analysis From 5a6fc8cbd83757385a0dbdf159d4bc0f43e0fa07 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 20 Mar 2023 08:58:10 +0800 Subject: [PATCH 129/318] translated --- ...ia vending machine made with a Raspberry Pi.md | 48 ------------------- ...ia vending machine made with a Raspberry Pi.md | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md create mode 100644 translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md diff --git a/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md b/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md deleted file mode 100644 index 43a96f845a..0000000000 --- a/sources/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md +++ /dev/null @@ -1,48 +0,0 @@ -[#]: subject: "A trivia vending machine made with a Raspberry Pi" -[#]: via: "https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine" -[#]: author: "Phil Shapiro https://opensource.com/users/pshapiro" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -A trivia vending machine made with a Raspberry Pi -====== - -As an educator working at a public library, I keep my eyes peeled for interesting uses of the [Raspberry Pi][1]. From where I sit, the Trivia Vending Machine project out of Dallas, Texas, is one of the most creative and interesting uses of these amazing devices. Using a Raspberry Pi to replace the coin box on a food vending machine is a stroke of genius by Greg Needel and his team. The potential uses of this idea are far-reaching. Check out this [short YouTube video][2] to see the Trivia Vending Machine in action. - -The original Trivia Vending Machine focused on science questions, but you could build a Trivia Vending Machine with any questions—history, civics, literature, and so on. The most engaging uses will be if you encourage students to write their own questions—and answer each others' questions. And consider this: Instead of disbursing food, the vending machine could disburse coupons to local businesses. One way I earn a living is by teaching guitar lessons, and I'd gladly donate a guitar lesson as a coupon for a Trivia Vending Machine. However, a student must rack up a suitable amount of points to earn one of my guitar lessons. - -Stretch your imagination a little further. Would it be possible to have logic puzzles for students to solve to get food (or coupons) from the vending machine? Yes, that would not be difficult to create. Maybe Sudoku puzzles, [Wordle][3], KenKen, Sokoban, or any other puzzle. Students could play these puzzles with a touch screen. How about chess? Sure, students could solve chess puzzles to get food (or coupons). - -Did you notice in the video that the original Trivia Vending Machine is large and heavy? Designing a smaller one—perhaps one-third the size that fits on a rolling cart—could make for easier transport between schools, libraries, museums, and maker faires. - -The inside of a Trivia Vending Machine is composed of stepper motors. You can buy these used on the web. A web search for "used vending machine motors" turns up the [Vending World][4] and the [VendMedic][5] websites. - -If you are a member of a makerspace, tell your fellow members about the Trivia Vending Machine. It's an open invention, not patented, so anyone can build it. (Thank you, Greg Needel.) I imagine the coding for such a device is not too difficult. It would be lovely if someone could create a GitHub repository of such code—and maybe some accompanying explanatory screencasts. - -Although the Trivia Vending Machine did not win an award in the Red Bull Creations contest, this invention is still award-worthy. Someone should track down Greg Needel and give him a suitable prize. What should that award look like? It might look like $25k or $50k. I say three cheers for Greg Needel and his creative team. They took the Raspberry Pi in the direction that the inventors of this computer intended—a tinkerer's delight. Bold and beautiful. Bold, beautiful, and open. Could you ask for anything more? - -One last thing. The Trivia Vending Machine was created several years ago with an early Raspberry Pi model. Current Raspberry Pi computers are much faster and more responsive. So, any lags in the interaction you notice in the above-mentioned video no longer exist on today's Raspberry Pi models. - -Oh, I want one of those candy bars so bad. I'm smacking my lips together. Remind me; how many points do I need to earn to get a Snickers bar? Whatever it takes. I'll do whatever it takes. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine - -作者:[Phil Shapiro][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/pshapiro -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/resources/raspberry-pi -[2]: https://www.youtube.com/watch?v=pDOhk-YAhys -[3]: https://opensource.com/article/22/1/word-game-linux-command-line -[4]: https://vendingworld.com/small-vending-parts/vending-machine-motors-small-parts -[5]: https://www.vendmedic.com/product-category/vending-parts/vend-motors/ \ No newline at end of file diff --git a/translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md b/translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md new file mode 100644 index 0000000000..479daafb6a --- /dev/null +++ b/translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md @@ -0,0 +1,48 @@ +[#]: subject: "A trivia vending machine made with a Raspberry Pi" +[#]: via: "https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine" +[#]: author: "Phil Shapiro https://opensource.com/users/pshapiro" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用树莓派制作的问答售货机 +====== + +作为在公共图书馆工作的教育工作者,我一直在关注[树莓派][1]的有趣用途。在我看来,得克萨斯州达拉斯市的问答售货机项目是这些神奇设备最具创意和最有趣的用途之一。使用树莓派取代食品自动售货机上的硬币盒是 Greg Needel 和他的团队的一个天才之作。这个想法的潜在用途是深远的。观看这个 [YouTube 短视频][2],了解 Trivia 自动贩卖机的运行情况。 + +最初的问答售货机专注于科学问题,但你可以制作一个问答售货机来回答任何问题:历史、公民、文学等等。如果你鼓励学生写自己的问题,并回答对方的问题,那将是最有吸引力的用途。请考虑这个问题。自动售货机可以不发放食物,而是发放当地企业的优惠券。我谋生的方式之一是教吉他课,我很乐意捐出一节吉他课作为小事自动贩卖机的优惠券。然而,学生必须积累适当数量的积分才能获得我的一堂吉他课。 + +把你的想象力再延伸一点。是否有可能让学生解决逻辑谜题,以便从自动售货机获得食物(或优惠券)?是的,这并不难创造。也许是数独谜题、[Wordle][3]、KenKen、Sokoban 或任何其他谜题。学生可以用触摸屏玩这些谜题。国际象棋怎么样?当然,学生可以通过解决象棋谜题来获得食物(或优惠券)。 + +你是否注意到视频中原来的问答售货机又大又重? 设计一个更小的,可能是滚动手推车大小的三分之一,这可以在学校、图书馆、博物馆和创客嘉年华之间更容易运输。 + +问答售货机的内部由步进电机组成。你可以在网上购买二手的。在网络上搜索“二手自动售货机电机”会出现 [Vending World][4] 和 [VendMedic][5] 网站。 + +如果你是创客空间的成员,请向其他成员介绍问答售货机。这是一个开放的发明,没有专利,所以任何人都可以制造它。(谢谢你,Greg Needel)我想为这样的设备编写代码并不太难。如果有人可以创建此类代码的 GitHub 仓库,以及可能附带的一些解释性截屏,那就太好了。 + +虽然知识问答售货机没有在红牛创意大赛中获奖,但这项发明还是值得获奖的。应该有人找到 Greg Needel 并给他一个合适的奖品。该奖项应该是什么样子的? 可能是 2.5 万或 5 万美金的样子。我为 Greg Needel 和他的创意团队欢呼三声。他们把树莓派带到了这种计算机的发明者所希望的方向:修理工的快乐。大胆、美丽、开放。你还能要求更多吗? + +最后一件事。问答售货机是几年前使用早期的树莓派型号制作的。当前的树莓派速度更快,响应更快。因此,你在上述视频中注意到的任何交互延迟在今天的树莓派上已不复存在。 + +哦,我非常想要一块糖果。我抿着嘴唇。提醒我,我需要赚取多少积分才能获得士力架? 不惜一切代价。我会不惜一切代价。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine + +作者:[Phil Shapiro][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/pshapiro +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/resources/raspberry-pi +[2]: https://www.youtube.com/watch?v=pDOhk-YAhys +[3]: https://opensource.com/article/22/1/word-game-linux-command-line +[4]: https://vendingworld.com/small-vending-parts/vending-machine-motors-small-parts +[5]: https://www.vendmedic.com/product-category/vending-parts/vend-motors/ \ No newline at end of file From 1287c557129e598a1c8e2ee96e9676c89621d58c Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 20 Mar 2023 09:03:32 +0800 Subject: [PATCH 130/318] translating --- .../20230317.0 ⭐️ Variables in Python Concepts with Examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md b/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md index 4c528aeb97..b9f57b2c5e 100644 --- a/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md +++ b/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/python-variables/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From eba825ab2f66e4d87710e1eaa7c82083be204e01 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Mar 2023 15:44:56 +0800 Subject: [PATCH 131/318] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @CanYellow 翻译的很好! --- ...ing-s Misappropriated REST Dissertation.md | 102 +++++++----------- 1 file changed, 38 insertions(+), 64 deletions(-) diff --git a/translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index 7bc24c5922..64d28d156c 100644 --- a/translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -1,86 +1,75 @@ [#]: collector: (lujun9972) [#]: translator: (CanYellow) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Roy Fielding's Misappropriated REST Dissertation) [#]: via: (https://twobithistory.org/2020/06/28/rest.html) [#]: author: (Two-Bit History https://twobithistory.org) -被误用的罗伊·菲尔丁的有关描述性状态迁移的博士论文 +被误用的罗伊·菲尔丁的有关描述性状态迁移(REST)的博士论文 ====== -符合描述性状态迁移的 (RESTful,REST译自审定公布名词数据库) 应用程序接口 (API) 无处不在。有趣的是又有多少人真正了解“符合描述性状态迁移”的应有之义呢? +![][0] -大概我们中的大多数人都会跟[黑客新闻网站上的这篇公开问答][1]产生共鸣: +符合 描述性状态迁移REpresentational State Transfer(LCTT 译注:REST,译自审定公布名词数据库)的应用程序接口(API)无处不在。有趣的是又有多少人真正了解“符合描述性状态迁移”的应有之义呢? -> 我阅读了几篇介绍描述性状态迁移(REST)的文章,甚至包括原始论文的部分章节。然而我仍然对REST -到底是什么只有一个相当模糊的想法。我开始认为没有人真的了解它,它仅仅是一个定义相当不充分的概念。 +大概我们中的大多数人都会跟 [黑客新闻网站上的这篇公开问答][1] 产生共鸣: -我曾经计划写一篇有关REST的博客,在里面探讨REST是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读[2000年发表的罗伊·菲尔丁(Roy Fielding)的博士论文][2]开始我的研究,这篇博士论文向世人介绍了REST的概念。在读过菲尔丁的博士论文以后,我意识到,相比之下,更引人注意的是菲尔丁的理论缘何受到如此普遍的误解。 +> 我阅读了几篇介绍描述性状态迁移(REST)的文章,甚至包括原始论文的部分章节。然而我仍然对REST 到底是什么只有一个相当模糊的想法。我开始认为没有人真的了解它,它仅仅是一个定义相当不充分的概念。 -(相对公平地说)很多人知道REST源自Fielding的博士论文,但并没有读过该论文。因此对于这篇博士论文的原始内容的误解才得以流行。 +我曾经计划写一篇有关 REST 的博客,在里面探讨 REST 是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读 [2000 年发表的 罗伊·菲尔丁Roy Fielding 的博士论文][2] 开始我的研究,这篇博士论文向世人介绍了 REST 的概念。在读过菲尔丁的博士论文以后,我意识到,相比之下,更引人注意的是菲尔丁的理论缘何受到如此普遍的误解。 -最大的误解是:这篇博士论文直接讨论了构建API(API)的问题,我此前一直认为REST从一开始就打算成为构建在超文本传输协议(HTTP)之上的网络API(Web API)的架构模型,我相信很多人也这样认为。我猜测此前可能存在一个混乱的试验时期,开发人员采用完全错误的方式在HTTP基础上开发API,然后Fielding出现了并提出了将REST做为网络应用程序开发的正确方式。但是这种想法的时间线对不上:我们今天所熟知的网络服务的API并非是在Fielding出版他的博士论文之后才出现的新生事物。 +(相对公平地说,)很多人知道 REST 源自菲尔丁的博士论文,但并没有读过该论文。因此对于这篇博士论文的原始内容的误解才得以流行。 -Fielding的博士论文(名为“架构风格与基于网络的软件架构设计”)(译者注,网络中文版的中文译名)不是讨论如何在HTTP的基础上构建API,而恰恰是讨论HTTP本身。Fielding是HTTP/1.0版规范的贡献者同时也是HTTP/1.1版的共同作者。有感于从HTTP的设计中获得的架构经验,他的博士论文将REST视为指导HTTP/1.1的标准化过程的架构原则的精华。举例而言,他拒绝了使用`MGET`和`MHEAD`方法进行批量请求的提议,因为他认为这违反了REST所定义的约束条件,尤其是在一个符合REST的系统中传递的消息应该是易于代理和缓存的约束条件。[1][3]因此,HTTP/1.1转而围绕持久性连接设计,在此基础上可以发送多个HTTP请求。(Fielding同时认为网页保存在本地的浏览记录(cookies)是不RESTful的,因为它们在一个状态无关的系统中增加了状态描述,然而它们的应用已经根深蒂固了。)[2][4]Fielding认为,REST并非构建基于HTTP的系统的操作指南,而是扩展HTTP的操作指南。 +最大的误解是:这篇博士论文直接解决了构建 API(API)的问题,我此前一直认为 REST 从一开始就打算成为构建在超文本传输协议(HTTP)之上的 网络 APIWeb API的架构模型,我相信很多人也这样认为。我猜测此前可能存在一个混乱的试验时期,开发人员采用完全错误的方式在 HTTP 基础上开发 API,然后菲尔丁出现了,并提出了将 REST 做为网络应用程序开发的正确方式。但是这种想法的时间线对不上:我们今天所熟知的网络服务的 API 并非是在菲尔丁出版他的博士论文之后才出现的新生事物。 -这并不意味着Fielding认为REST不能用于构建其他系统。只是他假定其他系统也是“分布式超媒体系统”(distributed hypermedia systems)。人们对REST还有另一个误解:认为它是一个可以用在任何网络应用中的通用架构。但是从这篇博士论文中Fielding介绍REST的部分你基本上能够得出如下的结论,“请注意,我们只设计了HTTP,但是如果你发现你自己也在设计一个_分布式超媒体系统_,你也应该采用我们提出的称为REST的优秀架构,以让开发变得更容易”。有鉴于互联网已经存在了,我们尚不清楚为什么Fielding认为有人可能试图重新创建这样一个(和HTTP一样的)系统。或许在2000年的时候世界上仍然存在应用不只一个分布式超文本系统的空间吧。无论如何,Fielding已经说得很清楚了,REST意在提供一套解决方案,来解决在试图经由网络连接超文本内容时出现的弹性伸缩与一致性问题,_而不是_作为分布式应用的通用架构模型。 +菲尔丁的博士论文《架构风格与基于网络的软件架构设计》不是讨论如何在 HTTP 的基础上构建 API,而恰恰是讨论 HTTP 本身。菲尔丁是 HTTP/1.0 版规范的贡献者,同时也是 HTTP/1.1 版的共同作者。有感于从 HTTP 的设计中获得的架构经验,他的博士论文将 REST 视为指导 HTTP/1.1 的标准化过程的架构原则的精华。举例而言,他拒绝了使用新的 `MGET` 和 `MHEAD` 方法进行批量请求的提议,因为他认为这违反了 REST 所定义的约束条件,尤其是在一个符合 REST 的系统中传递的消息应该是易于代理和缓存的约束条件。[^1] 因此,HTTP/1.1 转而围绕持久性连接设计,在此基础上可以发送多个 HTTP 请求。(菲尔丁同时认为网页保存在本地的浏览数据,即 cookie 是不符合 REST 的,因为它们在一个状态无关的系统中增加了状态描述,然而它们的应用已经根深蒂固了。[^2])菲尔丁认为,REST 并非构建基于 HTTP 的系统的操作指南,而是扩展 HTTP 的操作指南。 -我们现在只记得Fielding的博士论文提出了REST的概念,但事实上,他的博士论文是在讨论通用的软件架构有多么糟糕以及如何更好地选择符合你需求的软件架构。这篇博士论文中仅用了一个章节来讨论REST本身,大量的文本内容都都花在了对你能够在网络应用中运用的不同的架构风格[3][5]的分类上。这些架构风格包括:受Unix的管道设计启发的管道-过滤器(Pipe-and-Filter, PF)风格,客户-服务器(Client-Server, CS)风格的多种改型。这些改型包括分层-客户-服务器(Layered-Client-Server, LCS)风格、客户-缓存-无状态-服务器(Client-Cache-Stateless-Server,C$SS)风格和分层-客户-缓存-无状态-服务器(Layered-Client-Cache-Stateless-Server, LC$SS)。这些原始风格未必实用,但是Fielding认为我们可以通过混合匹配现有风格提供的约束条件来派生出新的风格。REST就是通过这种方式产生的,因此也可以称之为一致性-分层-按需代码-客户-缓存-无状态-服务器(Uniform-Layered-Code-on-Demand-Client-Cache-Stateless-Server, ULCODC$SS)风格,虽然我们并没有这样做。Fielding建立上述分类是为了强调(每一种风格对应的)约束适用于不同的应用。而上述最后一种风格对应的约束是他所认为的最适用于HTTP的。 +这并不意味着菲尔丁认为 REST 不能用于构建其他系统。只是他假定其他系统也是 “分布式超媒体系统distributed hypermedia systems”。人们对 REST 还有另一个误解:认为它是一个可以用在任何网络应用中的通用架构。但是从这篇博士论文中菲尔丁介绍 REST 的部分你基本上能够得出如下的结论,“请注意,我们只设计了 HTTP,但是如果你发现你自己也在设计一个_分布式超媒体系统_,你也应该采用我们提出的称为 REST 的优秀架构,以让开发变得更容易”。有鉴于互联网已经存在了,我们尚不清楚为什么菲尔丁认为有人可能试图重新创建这样一个(和 HTTP 一样的)系统。或许在 2000 年的时候世界上仍然存在不只一个分布式超文本系统的空间吧。无论如何,菲尔丁已经说得很清楚了,REST 意在提供一套解决方案,来解决在试图经由网络连接超文本内容时出现的可扩展性与一致性问题,_而不是_ 作为分布式应用的通用架构模型。 -今天,REST的无处不在是极具讽刺意味的。REST在各种各样的网络应用中被盲目使用,但是Fielding最初只是将REST视作一种指引,通过它指导人们裁剪一种软件架构来适应独立应用的特殊需求。 +我们现在只记得菲尔丁的博士论文提出了 REST 的概念,但事实上,他的博士论文是在讨论一刀切的软件架构有多么糟糕,以及如何更好地选择符合你需求的软件架构。这篇博士论文中仅用了一个章节来讨论 REST 本身,大量的文本内容都都花在了对你能够在网络应用中运用的不同的架构风格 [^3] 的分类上。这些架构风格包括:受 Unix 的管道设计启发的 管道-过滤器Pipe-and-Filter (PF)风格,客户-服务器Client-Server (CS)风格的多种改进,如 分层-客户-服务器Layered-Client-Server(LCS)风格、客户-缓存-无状态-服务器Client-Cache-Stateless-Server(C\$SS)风格和分层-客户-缓存-无状态-服务器Layered-Client-Cache-Stateless-Server(LC\$SS)。这些缩略词未必实用,但是菲尔丁认为我们可以通过混合匹配现有风格提供的约束条件来派生出新的风格。REST 就是通过这种方式产生的,它本可以称之为 一致性-分层-按需代码-客户-缓存-无状态-服务器Uniform-Layered-Code-on-Demand-Client-Cache-Stateless-Server(ULCODC\$SS)风格,显然我们并没有这样做。菲尔丁建立上述分类是为了强调(每一种风格对应的)约束适用于不同的应用,而上述最后一种风格对应的约束是他所认为的最适用于 HTTP 的。 -我极力弄清楚这是如何发生的,毕竟Fielding已经明确地指出了不让形式服从功能的陷阱。他在论文的一开始就作出了警告:由于没有正确地理解软件架构而“使用流行的架构设计是经常发生的”[4][6]。他在几页之后又重新强调了这一点: +今天,REST 的无处不在是极具讽刺意味的。REST 在各种各样的网络应用中被盲目使用,但是菲尔丁最初只是将 REST 视作一种指引,通过它指导人们裁剪一种软件架构来适应独立应用的特殊需求。 -> 一些架构风格经常被认为是适用于一切软件形式的锦囊妙计。然而,一名资深的设计人员应该选择能够满足解决特定问题的需要的架构风格[5][7]。 +我很难弄清楚这是如何发生的,毕竟菲尔丁已经明确地指出了不能让形式服从功能的陷阱。他在论文的一开始就作出了警告:由于没有正确地理解软件架构而“使用流行的架构设计是经常发生的”[^4]。他在几页之后又重新强调了这一点: -REST自身显然不是这样的锦囊妙计。正如Fielding所指出的,它包含了可能不合适的利弊权衡,除非你试图构建一个分布式超媒体应用: +> 一些架构风格经常被描述为适用于一切软件形式的“银弹”解决方案。然而,一名好的设计者应该选择能够满足解决特定问题的需要的架构风格[^5]。 -> REST设计用来进行大粒度的超媒体数据传输,并对网络应用场景中的常用见情形做了优化,但是可能会导致其在与其他形式的软件架构相互作用时不协调。[6][8] +REST 本身就是一个特别糟糕的 “银弹” 解决方案。正如菲尔丁所指出的,它包含了可能不合适的利弊权衡,除非你试图构建一个分布式超媒体应用: -Fielding提出REST是因为网络发展提出了“超越政府的可扩展性(anarchic scalability)”这一棘手问题。在Fielding看来“超越政府的可扩展性”意即跨越不同组织与政府的边界进行文档的高效连接的需求。REST所应用的约束是仔细选择的以用来解决这一“超越政府的扩展性”问题。_面向公众_的网络服务API同样需要解决类似的问题,因此可以理解为什么REST在这些应用中是适用的。时至今日,即使后端应用只需要同工程团队具有完全控制权的客户端交互,仍然有工程团队使用REST开发后端应用,这样的发现一点也不令人惊讶。我们都成为了[蒙蒂巨蟒团队(Monty Python)的独幕滑稽剧][9]中的建筑师,那位建筑师设计了一座具有屠宰场风格的公寓大楼,因为他们只有修建屠宰场的经验。(Fielding使用了这部滑稽剧中的一句台词作为他的博士论文的题词:打扰一下,你说的是“刀”吗?) +> REST 设计用来高效地进行大粒度的超媒体数据传输,并对网络应用场景中的常用见情形做了优化,但是可能会导致其在与其他形式的软件架构相互作用时不协调。^[6] -有鉴于Fielding的博士论文一直在极力避免提供一种放之四海而皆准的软件架构,REST又怎么会成为所有网络服务的事实上的标准呢? +菲尔丁提出 REST 是因为网络发展带来了“超越政府的可扩展性anarchic scalability”这一棘手问题,菲尔丁的意思是需要以一种高性能的方式跨越组织和国家边界连接文件。REST 所施加的约束是经过精心选择的,以用来解决这一“超越政府的扩展性”问题。_面向公众_ 的网络服务 API 同样需要解决类似的问题,因此可以理解为什么 REST 在这些应用中是适用的。然而,时至今日,如果发现一个工程团队使用 REST 构建了一个后端,即使这个后端只与工程团队完全控制的客户端通讯,也不会令人惊讶。我们都成为了 [蒙蒂巨蟒Monty Python 的独幕滑稽剧][9] 中的建筑师,那位建筑师按照屠宰场的风格设计了一座公寓大楼,因为屠宰场是他唯一具有的经验的建筑。(菲尔丁使用了这部滑稽剧中的一句台词作为他的博士论文的题词:打扰一下,你说的是“刀”吗?)(LCTT 校注:顺便说一句,Python 语言的名称来自于 “Monty Python” 这个英国超现实幽默表演团体的名字。) -我认为,在21世纪头十年的中期人们已经厌倦了简单对象访问协议(SOAP),因此想要创造另一种属于他们自己的四字首字母缩略词。 +有鉴于菲尔丁的博士论文一直在极力避免提供一种放之四海而皆准的软件架构,REST 又怎么会成为所有网络服务的事实上的标准呢? +我认为,在 21 世纪头十年的中期人们已经厌倦了简单对象访问协议(SOAP),因此想要创造另一种属于他们自己的四字首字母缩略词。 -我只是半开玩笑。简单对象访问协议(SOAP)是一个冗长而复杂的协议,以致于你没法在不事先理解一堆互相关联的可扩展标记语言(XML)规范的基础上使用它。早期的网络服务提供基于SOAP的API。在21世纪头十年中期,随着越来越多的API的提供,被SOAP的复杂性激怒的软件开发者随之集体迁移。 +我只是半开玩笑。简单对象访问协议Simple Object Access Protocol(SOAP)是一个冗长而复杂的协议,以致于你没法在不事先理解一堆互相关联的可扩展标记语言(XML)规范的基础上使用它。早期的网络服务提供基于 SOAP 的 API。在 21 世纪头十年中期,随着越来越多的 API 开始提供,被 SOAP 的复杂性激怒的软件开发者随之集体迁移。 -SOAP引起了这群人的蔑视,Rails 之父戴维·海涅迈尔·汉森( David Heinemeier Hansson,译自其所著的《重来》的中文版的作者译名)曾经评论:“我们感觉SOAP过于复杂了,它已经被企业人员接管。而当这一切发生的时候,通常没有什么好结果。”[7][10] 始于这一标志性的评论,Ruby-on-Rails于2007年放弃了对SOAP的支持。“企业人员”总是希望所有内容都被正式指定,反对者认为这是浪费时间。 +SOAP 遭到了这群人的蔑视,Rails 之父 戴维·海涅迈尔·汉森David Heinemeier Hansson(LCTT 译注:译自其所著的《重来》的中文版的作者译名)曾经评论:“我们感觉 SOAP 过于复杂了,它已经被企业人员接管。而当这一切发生的时候,通常没有什么好结果。”[^7] 始于这一标志性的评论,Ruby-on-Rails 于 2007 年放弃了对 SOAP 的支持。“企业人员”总是希望所有内容都被正式指定,反对者认为这是浪费时间。 -如果反对者不再继续使用SOAP,他们仍然需要一些标准化的方式来进行工作。所有人都在使用HTTP,而且因为HTTP对代理与缓存的支持,所有人都至少会继续使用HTTP作为传输层。因此最简单的解决方案就是依赖HTTP的现有语义。这正是他们所做的工作。他们曾经称之为:去它的,重载HTTP(即FIOH)。这曾经是真实的名称,任何曾经试图决定业务逻辑错误需要返回什么HTTP状态码的人都能证明这一点。但是在所有进入SOAP的正式规范工作的映衬下,这显得鲁莽而乏味。 +如果反对者不再继续使用 SOAP,他们仍然需要一些标准化的方式来进行工作。由于所有人都在使用 HTTP,而且代理与缓存的所有支持,每个人都至少会继续使用 HTTP 作为传输层,因此最简单的解决方案就是依赖 HTTP 的现有语义。这正是他们所做的工作。他们曾经称之为:去它的,重载 HTTPFuck It, Overload HTTP(FIOH)。这会是一个准确的名称,任何曾经试图决定业务逻辑错误需要返回什么 HTTP 状态码的人都能证明这一点。但是在所有的 SOAP 正式规范工作的映衬下,这显得鲁莽而乏味。 -幸运的是,出现了这篇由HTTP/1.1规范的共同作者创作的博士论文。这篇博士论文与扩展HTTP有某种模糊的联系,并给予了FIOH一个具有学术体面的外表。因此REST非常适合用来掩饰其实仅仅是FIOH的东西。 +幸运的是,出现了这篇由 HTTP/1.1 规范的共同作者创作的博士论文。这篇博士论文与扩展 HTTP 有某种模糊的联系,并给予了 FIOH 一个具有学术体面的外表。因此 REST 非常适合用来掩饰其实仅仅是 FIOH 的东西。 -我并不是说这是真正发生的事情,或者在所有对REST的滥用初期存在一个真实的阴谋,但是这段历史有助于我理解这样一个现实,即在Fielding的博士论文根本就不是讨论网络服务API的情况下,REST是如何成为用于网络服务API的架构模型的。采用REST的约束存在一些效果,尤其是对于那些面向公众的需要跨越组织边界的API来说。这些API通常会从REST的“统一接口”中受益。这应该是REST起初被提及与构建网络API相关的核心原因。但是想象一个部分因为市场的原因借用了“REST”这一名称的独立存在的被称为“FIOH”的架构,这有助于我理解存在于我们今天所理解的RESTful API与Fielding最初描述的REST的架构风格之间的诸多差异。 +我并不是说事情就是这样发生的,也不是说在不敬业的创业者中确实存在着盗用 REST 的阴谋,但是这个故事有助于我理解,在菲尔丁的博士论文根本就不是讨论网络服务 API 的情况下,REST 是如何成为用于网络服务 API 的架构模型的。采用 REST 的约束存在一些效果,尤其是对于那些面向公众的需要跨越组织边界的 API 来说。这些 API 通常会从 REST 的“统一接口”中受益。这应该是 REST 起初在构建网络 API 时被提及的核心原因。但是,想象一下一种叫做 “FIOH” 的独立方法,它借用 “REST” 的名字只是为了营销,这有助于我解释我们今天所知道的 REST 式RESTful API 与菲尔丁最初描述的 REST 的架构风格之间的诸多差异。 -举例而言,追求纯正的REST的人经常抱怨,那些所谓RESTful API实际并不是REST API,因为它们根本就没有使用超文本作为应用程序状态引擎(HATEOAS)。Fielding本人也做出过[这样的批评][11]。根据Fielding的观点,一个真正的REST API应当允许你通过跟随链接实现从一个基础端点访问所有的端点。如果你认为这些人的确在试图构建RESTful API,那么存在一个明显的疏漏——使用超文本作为应用程序状态引擎的确是Fielding最初提出的REST概念的基础,尤其是考虑到“描述性状态迁移(REST)”中的“状态迁移(ST)”意指使用资源之间的超链接进行状态机的导航(而不是像很多人所相信的那样通过线路传输资源状态)[8][12]。但是你试想一下,如果每个人都只是在构建FIOH的API,并明里暗里的将之作为REST API宣传,或者更诚实一点说是作为RESTful API宣传,那么自然使用超文本作为应用程序状态引擎也就不重要了。 - -类似的,你可能会感到惊讶:尽管软件开发者喜欢不断地争论使用PUT方法还是使用PATCH方法来更新资源更加RESTful,Fielding的博士论文却没有讨论HTTP中的方法与增删改查(CURD)操作之间的映射关系。在HTTP操作与CURD操作之间建立一个标准的映射表是有用的,但是这一映射表是FIOH的一部分而不是REST的一部分。 - -这就是为什么我们应该认为“REST”这一术语是被误用了而不是说没有人理解REST。REST API这一现代概念与Fielding的REST架构之间存在历史联系,但事实上它们是两个不同的概念。历史联系适合作为确定何时构建RESTful API的指引而留在心底。你的API需要像HTTP那样跨越组织和政府边界吗?如果是的话,那么构建具有统一的可预测的接口的RESTful API可能是正确的方式。如果不是的话,你最好记住,Fielding更倾向于形式服从功能。或许类似 GraphQL 的方案或者仅仅 JSON-RPC 更适合您试图完成的工作。 - - - 1. Roy Fielding. “Architectural Styles and the Design of Network-based Software Architectures,” 128. 2000. University of California, Irvine, PhD Dissertation, accessed June 28, 2020, . [↩︎][16] - - 2. Fielding, 130. [↩︎][17] - - 3. Fielding distinguishes between software architectures and software architecture “styles.” REST is an architectural style that has an instantiation in the architecture of HTTP. [↩︎][18] - - 4. Fielding, 2. [↩︎][19] - - 5. Fielding, 15. [↩︎][20] - - 6. Fielding, 82. [↩︎][21] - - 7. Paul Krill. “Ruby on Rails 2.0 released for Web Apps,” InfoWorld. Dec 7, 2007, accessed June 28, 2020,  [↩︎][22] - - 8. Fielding, 109. [↩︎][23] +举例而言,REST 纯粹主义者经常抱怨,那些所谓 RESTful API 实际并不是 REST API,因为它们根本就没有使用 超文本作为应用程序状态引擎Hypermedia as The Engine of Application State(HATEOAS)。菲尔丁本人也做出过 [这样的批评][11]。根据菲尔丁的观点,一个真正的 REST API 应当允许你通过跟随链接实现从一个基础端点访问所有的端点。如果你认为这些人的确在试图构建 RESTful API,那么存在一个明显的疏漏 —— 使用超文本作为应用程序状态引擎(HATEOAS)的确是菲尔丁最初提出的 REST 概念的基础,尤其是考虑到“描述性状态迁移(REST)”中的“状态迁移(ST)”意指使用资源之间的超链接进行状态机的导航(而不是像很多人所相信的那样通过线路传输资源状态)[^8]。但是你试想一下,如果每个人都只是在构建 FIOH 的 API,并明里暗里的将之作为 REST API 宣传,或者更诚实一点说是作为 “RESTful” API 宣传,那么自然使用超文本作为应用程序状态引擎(HATEOAS)也就不重要了。 +类似的,你可能会感到惊讶:尽管软件开发者喜欢不断地争论使用 `PUT` 方法还是使用 `PATCH` 方法来更新资源更加 RESTful,菲尔丁的博士论文却没有讨论哪个 HTTP 的操作方法应该映射到增删改查(CURD)操作。在 HTTP 操作与 CURD 操作之间建立一个标准的映射表是有用的,但是这一映射表是 FIOH 的一部分而不是 REST 的一部分。 +这就是为什么,与其说没有人理解 REST,不如说我们应该认为 “REST” 这一术语是被误用了。REST API 这一现代概念与菲尔丁的 REST 架构之间存在历史联系,但事实上它们是两个不同的概念。历史联系适合作为确定何时构建 RESTful API 的指引而留在心底。你的 API 需要像 HTTP 那样跨越组织和政府边界吗?如果是的话,那么构建具有统一的可预测的接口的 RESTful API 可能是正确的方式。如果不是的话,你最好记住,菲尔丁更倾向于形式服从功能。或许类似 GraphQL 的方案或者仅仅 JSON-RPC 更适合你试图完成的工作。 +[^1]: Roy Fielding. “Architectural Styles and the Design of Network-based Software Architectures,” 128. 2000. University of California, Irvine, PhD Dissertation, accessed June 28, 2020, .  +[^2]: Fielding, 130.  +[^3]: Fielding distinguishes between software architectures and software architecture “styles.” REST is an architectural style that has an instantiation in the architecture of HTTP.  +[^4]: Fielding, 2.  +[^5]: Fielding, 15.  +[^6]: Fielding, 82.  +[^7]: Paul Krill. “Ruby on Rails 2.0 released for Web Apps,” InfoWorld. Dec 7, 2007, accessed June 28, 2020,   +[^8]: Fielding, 109.  -------------------------------------------------------------------------------- @@ -89,7 +78,7 @@ via: https://twobithistory.org/2020/06/28/rest.html 作者:[Two-Bit History][a] 选题:[lujun9972][b] 译者:[CanYellow](https://github.com/CanYellow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -97,24 +86,9 @@ via: https://twobithistory.org/2020/06/28/rest.html [b]: https://github.com/lujun9972 [1]: https://news.ycombinator.com/item?id=7201871 [2]: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation_2up.pdf -[3]: tmp.Ewi4FpMIg6#fn:1 -[4]: tmp.Ewi4FpMIg6#fn:2 -[5]: tmp.Ewi4FpMIg6#fn:3 -[6]: tmp.Ewi4FpMIg6#fn:4 -[7]: tmp.Ewi4FpMIg6#fn:5 -[8]: tmp.Ewi4FpMIg6#fn:6 [9]: https://www.youtube.com/watch?v=vNoPJqm3DAY -[10]: tmp.Ewi4FpMIg6#fn:7 [11]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven -[12]: tmp.Ewi4FpMIg6#fn:8 [13]: https://twitter.com/TwoBitHistory [14]: https://twobithistory.org/feed.xml [15]: https://twitter.com/TwoBitHistory/status/1247187881946275841?ref_src=twsrc%5Etfw -[16]: tmp.Ewi4FpMIg6#fnref:1 -[17]: tmp.Ewi4FpMIg6#fnref:2 -[18]: tmp.Ewi4FpMIg6#fnref:3 -[19]: tmp.Ewi4FpMIg6#fnref:4 -[20]: tmp.Ewi4FpMIg6#fnref:5 -[21]: tmp.Ewi4FpMIg6#fnref:6 -[22]: tmp.Ewi4FpMIg6#fnref:7 -[23]: tmp.Ewi4FpMIg6#fnref:8 +[0]: https://img.linux.net.cn/data/attachment/album/202303/20/154318tpynlzzdi1yhug5h.jpg \ No newline at end of file From d66ddc06c2be9ddde564b8ecbdce3f65de8ed650 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Mar 2023 15:45:23 +0800 Subject: [PATCH 132/318] P @CanYellow https://linux.cn/article-15642-1.html --- ...200628 Roy Fielding-s Misappropriated REST Dissertation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20200628 Roy Fielding-s Misappropriated REST Dissertation.md (99%) diff --git a/translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md similarity index 99% rename from translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md rename to published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index 64d28d156c..59dde31d43 100644 --- a/translated/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (CanYellow) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15642-1.html) [#]: subject: (Roy Fielding's Misappropriated REST Dissertation) [#]: via: (https://twobithistory.org/2020/06/28/rest.html) [#]: author: (Two-Bit History https://twobithistory.org) From 8a8ee299dd38479d62d804cb8444485360bf1dbb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Mar 2023 15:49:20 +0800 Subject: [PATCH 133/318] R --- ...20200628 Roy Fielding-s Misappropriated REST Dissertation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index 59dde31d43..6ca5a4242f 100644 --- a/published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/published/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -38,7 +38,7 @@ REST 本身就是一个特别糟糕的 “银弹” 解决方案。正如菲尔丁所指出的,它包含了可能不合适的利弊权衡,除非你试图构建一个分布式超媒体应用: -> REST 设计用来高效地进行大粒度的超媒体数据传输,并对网络应用场景中的常用见情形做了优化,但是可能会导致其在与其他形式的软件架构相互作用时不协调。^[6] +> REST 设计用来高效地进行大粒度的超媒体数据传输,并对网络应用场景中的常用见情形做了优化,但是可能会导致其在与其他形式的软件架构相互作用时不协调。[^6] 菲尔丁提出 REST 是因为网络发展带来了“超越政府的可扩展性anarchic scalability”这一棘手问题,菲尔丁的意思是需要以一种高性能的方式跨越组织和国家边界连接文件。REST 所施加的约束是经过精心选择的,以用来解决这一“超越政府的扩展性”问题。_面向公众_ 的网络服务 API 同样需要解决类似的问题,因此可以理解为什么 REST 在这些应用中是适用的。然而,时至今日,如果发现一个工程团队使用 REST 构建了一个后端,即使这个后端只与工程团队完全控制的客户端通讯,也不会令人惊讶。我们都成为了 [蒙蒂巨蟒Monty Python 的独幕滑稽剧][9] 中的建筑师,那位建筑师按照屠宰场的风格设计了一座公寓大楼,因为屠宰场是他唯一具有的经验的建筑。(菲尔丁使用了这部滑稽剧中的一句台词作为他的博士论文的题词:打扰一下,你说的是“刀”吗?)(LCTT 校注:顺便说一句,Python 语言的名称来自于 “Monty Python” 这个英国超现实幽默表演团体的名字。) From b4db97fa9b6b845e09eabe4c6cb0e0da6094ed2c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Mar 2023 16:19:08 +0800 Subject: [PATCH 134/318] RP @geekpi https://linux.cn/article-15643-1.html --- ...nal Basics Series 4 Creating Files in Linux.md | 57 +++++++++---------- 1 file changed, 27 insertions(+), 30 deletions(-) rename {translated/tech => published}/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md (54%) diff --git a/translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md b/published/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md similarity index 54% rename from translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md rename to published/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md index 7b613bd9c9..a4d446a4df 100644 --- a/translated/tech/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md +++ b/published/20230307.2 ⭐️ Terminal Basics Series 4 Creating Files in Linux.md @@ -3,13 +3,15 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15643-1.html" -终端基础知识系列 #4:在 Linux 中创建文件 +终端基础:在 Linux 中创建文件 ====== +![][0] + 到目前为止,在这个终端基础系列中,你已经学会了: - [更改目录][1] @@ -21,7 +23,7 @@ ### 使用 touch 命令创建一个新的空文件 -使用 touch 命令非常简单。 +使用 `touch` 命令非常简单。 ``` touch filename @@ -33,11 +35,9 @@ touch filename mkdir practice_files && cd practice_files ``` -💡 +> 💡 `&&` 是一种组合两个命令的方法。只有当第一个命令执行成功时,第二个命令才会运行。 -&& 是一种组合两个命令的方法。只有当第一个命令执行成功时,第二个命令才会运行。 - -现在,创建一个名为 new_file 的新文件: +现在,创建一个名为 `new_file` 的新文件: ``` touch new_file @@ -45,17 +45,15 @@ touch new_file 就是这样。你刚刚创建了一个新的空文件。 -列出目录内容并使用 ls -l 命令检查文件的属性。 +列出目录内容并使用 `ls -l` 命令检查文件的属性。 ![Using touch command to create new files][4] -💡 - -touch 命令的最初目的是“触摸”文件并更改其时间戳。如果提供的文件不存在,它会创建一个具有该名称的新文件。 +> 💡 `touch` 命令的最初目的是“触摸”文件并更改其时间戳。如果提供的文件不存在,它会创建一个具有该名称的新文件。 ### 使用 echo 命令创建一个新文件 -很久以前我就应该向你介绍 echo 命令。迟到总比不到好。echo 命令显示你提供给它的任何内容。因此得名回声。 +很久以前我就应该向你介绍 `echo` 命令。迟到总比不到好。`echo` 命令显示你提供给它的任何内容。因此得名“回声”。 ``` echo Hello World @@ -71,31 +69,29 @@ echo "Hello World" >> other_new_file ![Using echo command to create new file][5] -请记住,如果提供的文件已经存在,使用 >> 重定向,你将向文件添加一个新行。你也可以使用 > 重定向,但它会替换文件的现有内容。 +请记住,如果提供的文件已经存在,使用 `>>` 重定向,你将向文件添加一个新行。你也可以使用 `>` 重定向,但它会替换文件的现有内容。 更多关于重定向的信息可以在下面的教程中找到。 -[解释:Linux 中的输入、输出和错误重定向][7] +> **[解释:Linux 中的输入、输出和错误重定向][7]** ### 使用 cat 命令创建新文件 -cat 命令的最初目的是连接文件。但是,它主要用于显示文件的内容。 +`cat` 命令的最初目的是连接文件。但是,它主要用于显示文件的内容。 -它还可以使用选项创建新文件并添加内容。为此,你可以使用相同的 > 和 >> 重定向。 +它还可以使用选项创建新文件并添加内容。为此,你可以使用相同的 `>` 和 `>>` 重定向。 ``` cat >> another_file ``` -但是这个将创建一个新文件并允许你向其中添加一些文本。添加文本是可选的。**你可以使用 Ctrl+d 键退出 cat 输入模式。** +但是这个将创建一个新文件并允许你向其中添加一些文本。添加文本是可选的。**你可以使用 `Ctrl+d` 键退出 `cat` 输入模式。** ![Using cat command to create new file][6] -同样,附加模式 >> 在文件内容的末尾添加新文本,而覆盖模式 > 用新内容替换现有内容。 +同样,附加模式 `>>` 在文件内容的末尾添加新文本,而覆盖模式 `>` 用新内容替换现有内容。 -🖥️ - -使用带有 ls -l 的长列表显示并注意时间戳。现在 touch 文件: +> 🖥️ 使用 `ls -l` 长列表显示并注意时间戳。现在 `touch` 文件: ``` touch other_new_file @@ -107,11 +103,11 @@ touch other_new_file 你已经了解了如何创建新文件。这里有一些简单的练习来练习你刚刚学到的东西。它也包括前几章的一些内容。 -- 使用 touch 命令创建三个新文件,分别命名为 file1、file2 和 file3。提示:你不需要运行 touch 三次。 -- 创建一个名为 files 的目录,并在其中创建一个名为 my_file 的文件。 -- 使用 cat 命令创建一个名为 `your_file` 的文件,并在其中添加以下文本 “This is your file”。 -- 使用 echo 命令将新行 “This is our file” 添加到 your_file。 -- 以相反的时间顺序显示所有文件(请参阅第 3 章)。现在使用 touch 命令修改 file2 和 file3 的时间戳。现在再次按时间倒序显示内容。 +- 使用 `touch` 命令创建三个新文件,分别命名为 `file1`、`file2` 和 `file3`。提示:你不需要运行 `touch` 三次。 +- 创建一个名为 `files` 的目录,并在其中创建一个名为 `my_file` 的文件。 +- 使用 `cat` 命令创建一个名为 `your_file` 的文件,并在其中添加以下文本 “This is your file”。 +- 使用 `echo` 命令将新行 “This is our file” 添加到 `your_file`。 +- 以相反的时间顺序显示所有文件(请参阅第 3 篇)。现在使用 `touch` 命令修改 `file2` 和 `file3` 的时间戳。现在再次按时间倒序显示内容。 这很有趣。你正在取得很好的进步。你已在本章中学会了创建新文件。接下来,你将学习如何查看文件的内容。 @@ -122,7 +118,7 @@ via: https://itsfoss.com/create-files/ 作者:[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/) 荣誉推出 @@ -134,4 +130,5 @@ via: https://itsfoss.com/create-files/ [4]: https://itsfoss.com/content/images/2023/03/touch-example.svg [5]: https://itsfoss.com/content/images/2023/03/echo-example.svg [6]: https://itsfoss.com/content/images/2023/03/cat-example.svg -[7]: https://linuxhandbook.com/redirection-linux/?ref=its-foss \ No newline at end of file +[7]: https://linuxhandbook.com/redirection-linux/?ref=its-foss +[0]: https://img.linux.net.cn/data/attachment/album/202303/20/161045uuejvexqrfrurkwn.jpg \ No newline at end of file From 5f9526e18dd978d7d271c353a99a0e35122ba30e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Mar 2023 07:43:12 +0800 Subject: [PATCH 135/318] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @connermemory @void-mori @Donkey-Hao --- sources/talk/20221001 What-s new with Awk-.md | 2 +- ...to Install and Use GNOME Boxes to Create Virtual Machines.md | 2 +- .../tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20221001 What-s new with Awk-.md b/sources/talk/20221001 What-s new with Awk-.md index dc8e496c05..3f6a791230 100644 --- a/sources/talk/20221001 What-s new with Awk-.md +++ b/sources/talk/20221001 What-s new with Awk-.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/10/whats-new-awk" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lkxed" -[#]: translator: "connermemory" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20220922 How to Install and Use GNOME Boxes to Create Virtual Machines.md b/sources/tech/20220922 How to Install and Use GNOME Boxes to Create Virtual Machines.md index 1f8d265d2d..1e2eeb7abc 100644 --- a/sources/tech/20220922 How to Install and Use GNOME Boxes to Create Virtual Machines.md +++ b/sources/tech/20220922 How to Install and Use GNOME Boxes to Create Virtual Machines.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/install-use-gnome-boxes/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: "void-mori" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md b/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md index 60d1e2dd9f..13c331d6f4 100644 --- a/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md +++ b/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/11/git-tips-technical-writers" [#]: author: "Maximilian Kolb https://opensource.com/users/kolb" [#]: collector: "lkxed" -[#]: translator: "Donkey-Hao" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 27b00f6f6ca573d585a87afb900b34f1b430f819 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Mar 2023 08:41:35 +0800 Subject: [PATCH 136/318] translated --- ...14.2 ⭐️ How I destroyed my Raspberry Pi.md | 63 ------------------- ...14.2 ⭐️ How I destroyed my Raspberry Pi.md | 63 +++++++++++++++++++ 2 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md create mode 100644 translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md diff --git a/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md b/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md deleted file mode 100644 index 4836aaa9e9..0000000000 --- a/sources/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: subject: "How I destroyed my Raspberry Pi" -[#]: via: "https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi" -[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How I destroyed my Raspberry Pi -====== - -I wanted to write an article demonstrating "How to automate XYZ with the Raspberry Pi" or some other interesting, curious, or useful application around the Raspberry Pi. As you might realize from the title, I cannot offer such an article anymore because I destroyed my beloved Raspberry Pi. - -The Raspberry Pi is a standard device on every technology enthusiast's desk. As a result, tons of tutorials and articles tell you what you can do with it. This article instead covers the dark side: I describe what you had better not do! - -### Cable colors - -I want to provide some background before I get to the actual point of destruction. You have to deal with different cable colors when doing electrical work in and around the house. Here in Germany, each house connects to the three-phase AC supply grid, and you usually find the following cable colors: - -- Neutral conductor: Blue -- (PE) Protective conductor: Yellow-green -- (L1) Phase 1: Brown -- (L2) Phase 2: Black -- (L3) Phase 3: Grey - -For example, when wiring a lamp, you pick up neutral (N, blue) and phase (L, 1/3 chance that it is brown), and you get 230V AC between them. - -### Wiring the Raspberry Pi - -Earlier this year, I wrote an article about [OpenWrt, an open source alternative to firmware for home routers][1]. In the article, I used a TP-link router device. However, the original plan was to use my Raspberry Pi model 4. - -![OpenWrt and Raspberry Pi comparison][2] - -The idea was to build a travel router that I could install in my caravan to improve the internet connectivity at a campsite (I'm the kind of camper who can't do without the internet). To do so, I added a separate USB-Wifi-dongle to my Raspberry Pi to connect a second Wifi antenna and installed [OpenWrt][3]. Additionally, I added a 12V-to-5V DC/DC converter to connect with the 12V wiring in the caravan. I tested this setup with a 12V vehicle battery on my desk, and it worked as expected. After everything was set up and configured, I started to install it in my caravan. - -In my caravan, I found a blue and a brown wire, connected it with the 12V-to-5V DC/DC converter, put the fuses back in, and… - -![DC converter device][4] - -The chip, which disassembled itself, is the actual step-down transformer. I was so confident that the blue wire was on 0V potential and the brown one was on 12V that I didn't even measure. I have since learned that the blue cable is on 12V, and the brown cable is on ground potential (which is pretty common in vehicle electronics). - -### Wrap up - -Since this accident, my Raspberry Pi has never booted up. Because the prices for the Raspberry Pi have skyrocketed, I had to find an alternative. Luckily, I came across the TP-Link travel router, which can also run Open-WRT and does its job satisfactorily. In closing: It's better to measure too often than one time too few. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi - -作者:[Stephan Avenwedde][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/hansic99 -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/22/7/openwrt-open-source-firmware -[2]: https://opensource.com/sites/default/files/2023-03/OpenWrt_Comparison_RaspberryPi.jpg -[3]: https://openwrt.org/ -[4]: https://opensource.com/sites/default/files/2023-03/dc_converter.png \ No newline at end of file diff --git a/translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md b/translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md new file mode 100644 index 0000000000..d8d40de968 --- /dev/null +++ b/translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md @@ -0,0 +1,63 @@ +[#]: subject: "How I destroyed my Raspberry Pi" +[#]: via: "https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我是如何毁掉我的树莓派的 +====== + +我想写一篇文章来演示“如何使用树莓派实现 XYZ 自动化”或围绕树莓派的其他一些有趣、好奇或有用的应用。正如你可能从标题中意识到的那样,我不能再提供这样的文章了,因为我毁了我心爱的树莓派。 + +树莓派是每个技术爱好者办公桌上的标准设备。因此,大量教程和文章告诉你可以用它做什么。这篇文章反而涵盖了阴暗面:我描述了你最好不要做的事情! + +### 电缆颜色 + +在谈到实际的破坏点之前,我想提供一些背景。在房屋内外进行电气工作时,你必须处理不同颜色的电缆。在德国,每栋房子都连接到三相交流电网,你通常会发现以下电缆颜色: + +- 零线:蓝色 +- (PE) 地线:黄绿色 +- (L1) 火线 1:棕色 +- (L2) 火线 2:黑色 +- (L3) 火线 3:灰色 + +例如,给灯接线时,你接零线(N,蓝色)和火线(L,有 1/3 的机会是棕色),它们之间的电压为 230V 交流电。 + +### 连接树莓派 + +今年早些时候,我写了一篇关于 [OpenWrt,家用路由器固件的开源替代品][1]的文章。在文章中,我使用了 TP-link 路由器设备。但是,最初的计划是使用我的树莓派 4。 + +![OpenWrt and Raspberry Pi comparison][2] + +我的想法是构建一个旅行路由器,我可以将其安装在我的大篷车中以改善露营地的互联网连接(我是那种离不开互联网的露营者)。为此,我在我的树莓派中添加了一个单独的 USB 无线网卡以连接第二个 Wifi 天线并安装了 [OpenWrt][3]。此外,我添加了一个 12V 至 5V DC/DC 转换器来连接大篷车中的 12V 接线。我用桌上的 12V 汽车电池测试了这个设置,它按预期工作。一切设置和配置完成后,我开始将其安装到我的大篷车中。 + +在我的大篷车里,我找到了一根蓝色和一根棕色的电线,将它与 12V 至 5V DC/DC 转换器相连,将保险丝放回,然后。。。 + +![DC converter device][4] + +自己损坏的芯片才是真正的降压变压器。我非常自信地认为蓝线是在 0V 电位上,棕色的是在 12V 上,我甚至没有测量。后来我了解到,蓝色的线是在 12V 上,而棕色的线是接地(这在汽车电子产品中很常见)。 + +### 总结 + +自从这次事故后,我的树莓派就再也没有启动过。由于树莓派的价格飞涨,我不得不寻找替代品。幸运的是,我遇到了 TP-Link 旅行路由器,它也可以运行 Open-WRT 并且可以令人满意地完成它的工作。最后:经常测量总比测量一次好。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi + +作者:[Stephan Avenwedde][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/hansic99 +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/22/7/openwrt-open-source-firmware +[2]: https://opensource.com/sites/default/files/2023-03/OpenWrt_Comparison_RaspberryPi.jpg +[3]: https://openwrt.org/ +[4]: https://opensource.com/sites/default/files/2023-03/dc_converter.png \ No newline at end of file From a69efc38f3696c63000f3920c3428aec14147969 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Mar 2023 08:47:42 +0800 Subject: [PATCH 137/318] translating --- ...30315.0 ⭐️ Input Function in Python Concepts and Examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md b/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md index 0660cbc8a4..d4ada65e26 100644 --- a/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md +++ b/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/input-function-python/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d811959b87ecbe1c9ea5210634be43a2d2197570 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Mar 2023 09:10:11 +0800 Subject: [PATCH 138/318] ATRP @wxy https://linux.cn/article-15645-1.html --- ...ries 3 Install and Remove Packages in NixOS.md | 301 ++++++++++++++++++ ...ries 3 Install and Remove Packages in NixOS.md | 290 ----------------- 2 files changed, 301 insertions(+), 290 deletions(-) create mode 100644 published/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md delete mode 100644 sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md diff --git a/published/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md b/published/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md new file mode 100644 index 0000000000..1735de7245 --- /dev/null +++ b/published/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md @@ -0,0 +1,301 @@ +[#]: subject: "NixOS Series #3: Install and Remove Packages in NixOS" +[#]: via: "https://itsfoss.com/nixos-package-management/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15645-1.html" + +NixOS 系列 #3:在 NixOS 中安装和删除软件包 +====== + +NixOS 中的打包系统是它最强大的地方。Nix 软件包管理器使用的语法与 `apt`、`dnf` 和其他软件包管理器大不相同。 + +这也是 [人们应该尝试使用 NixOS 的原因之一][1]。 + +在本指南中,我将分享两种在 NixOS 上安装和删除软件包的方法: + +- 使用 Nix 软件包管理器 +- 使用 `configuration.nix` 配置文件 + +> ⚠️ 使用 Nix 软件包管理器,你只能安装软件包,而不能安装 OpenSSH 或 Plex 服务器等服务。对于服务的安装,你必须使用 Nix 配置文件。 + +要安装任何软件包,必须知道它的确切名称,为此,我将从如何在 NixOS 中搜索软件包开始。 + +### 搜索软件包 + +要寻找软件包,你可以使用它的 [网页搜索][2]。 + +你可以使用如下步骤: + +- 在搜索栏中输入软件包的名称 +- 选择适当的软件包(从给出的描述中决定) +- 点击 “nix-env” 标签页 +- 复制 NixOS 命令(第一条) + +例如,如果我想要 `librewolf` 包,我将执行以下操作: + +![使用 Nix 软件包管理器的网络搜索寻找软件包][3] + +你也可以通过终端做同样的事情。 + +要使用终端搜索软件包,你可以按照给定的命令语法进行: + +``` +nix-env -qaP --description [软件包名称] +``` + +例如,在这里,我搜索了 `librewolf`: + +![使用终端搜索 NixOS 中的软件包][4] + +你必须复制输出的第一行,因为那是你需要安装的软件包的名称。 + +在这里它是 `nixos.librewolf`。 + +是的,它听起来可能没有像使用 [APT][5] 或 DNF 时软件包名字那么方便。但是,我认为这并不是大问题。 + +一些妥协或许会换来一些好处? + +### 在 NixOS 中安装一个软件包 + +要安装一个软件包,你所要做的就是使用以下命令语法: + +``` +nix-env -iA [软件包名称] +``` + +而且,如果你使用网络搜索来寻找软件包,你就已经有了安装所需的确切命令。 + +所以,假设我想安装 `librewolf',我将使用以下命令: + +``` +nix-env -iA nixos.librewolf +``` + +如果你想进行全系统的安装(让每个用户都能使用这个包),用 `sudo` 执行安装命令: + +``` +sudo nix-env -iA nixos.librewolf +``` + +就是这样!你将很快安装好你喜欢的软件包。 + +### 在 NixOS 中卸载一个软件包 + +要删除一个软件包,你可以参考下面的命令语法: + +``` +nix-env --uninstall [软件包名称] +``` + +因此,如果我必须删除 `librewolf` 包,我必须使用以下命令: + +``` +nix-env --uninstall librewolf +``` + +如果你仔细注意,我使用了 `librewolf` 而不是 `nixos.librewolf` 来安装。 + +这意味着你在删除软件包时要跳过 `nixos` 部分,这使事情变得简单而快速。 + +### 在 NixOS 中安装服务 + +正如我前面提到的,你不能使用 Nix 软件包管理器来安装像 OpenSSH、Plex 服务器、[Flatpak][6] 等服务。 + +从搜索服务到安装过程,都与你上面看到的不同。 + +所以让我先说说如何 **搜索服务**。 + +- 要搜索服务,请前往 Nix 软件包搜索 [网页][2] +- 选择 “NixOS 选项NixOS options”(页面顶部菜单行的第三个选项) +- 输入你要找的服务的名称 +- 复制服务的名称 + +例如,在这里,我正在搜索 OpenSSH 服务。 + +![搜索 NixOS 中的 OpenSSH 服务][7] + +一旦你找到了这个名字,用下面的命令打开 `configuration.nix` 文件: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +并在行末添加服务的名称(在 `}` 之前),如下: + +``` +[service_name] = true; +``` + +由于 **我想启用 OpenSSH**,我将添加以下内容: + +``` +services.openssh.enable = true; +``` + +![在 NixOS 上启用 OpenSSH][8] + +一旦你在配置文件中添加了服务,[保存修改并退出 Nano][9] 文本编辑器。 + +要启用该服务,请重建配置文件,并使用以下命令切换到所做的更改: + +``` +sudo nixos-rebuild switch +``` + +这就行了,你已经启用了该服务。 + +### 从 NixOS 卸载服务 + +要卸载一个服务,你所要做的就是在 `configuration.nix` 文件中删除或注释该服务的一行。 + +因此,首先,用以下命令打开配置文件: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +寻找服务,并删除这一行或用 `#` 注释掉: + +![从 NixOS 删除服务][10] + +通过添加注释 `#`,我忽略了 OpenSSH 服务的加载,因为我不再需要它在我的系统上。 + +保存修改并退出文本编辑器。 + +最后,重建配置文件并进行切换: + +``` +sudo nixos-rebuild switch +``` + +### 使用 Nix 配置文件安装软件包 + +配置文件可以让你 **方便地一次性管理软件包**。 + +要使用 Nix 配置文件安装软件包,你必须在配置文件中输入软件包的名称、重建,然后切换到配置文件,就可以了。 + +首先,打开 `configuration.nix` 文件。 + +``` +sudo nano /etc/nixos/configuration.nix +``` + +如果你想 **为一个特定的登录用户安装软件包**,将软件包的名称添加到用户的配置文件中。 + +用户配置文件看起来像这样: + +``` +users.users.sagar = { + isNormalUser = true; + description = "Sagar"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + firefox + ]; + }; +``` + +当然,它将显示你的用户名而不是 `sagar`。 + +你应该使用如下语法来添加软件包的名称: + +``` +packages = with pkgs; [ + 软件包名称 + ]; +``` + +所以我们假设我也想安装 `Thunderbird`,那么我将添加它的名字,如下所示: + +![使用 Nix 配置文件在 NixOS 中安装一个包][11] + +你必须在方括号内添加所有的软件包名称,不要用逗号。它必须像截图中描述的那样一个软件一个新的行。 + +但是如果你想在整个系统中安装这个包,那么你必须在 `environment.systemPackages` 下添加包的名字,比如: + +``` +environment.systemPackages = with pkgs; [ + 软件包名称 +]; +``` + +![使用 Nix 配置文件在 NixOS 中全系统安装软件包][12] + +一旦你完成了在系统配置文件或用户配置文件,甚至两者中添加所需软件包的名称,你将需要按照同样的命令来完成安装: + +``` +sudo nixos-rebuild switch +``` + +这样就可以了! + +### 使用 Nix 配置文件删除软件包 + +要删除软件包,你所要做的就是按照给定的简单步骤进行: + +- 打开 Nix 配置文件 +- 删除或注释掉软件包的名称 +- 重新构建配置并进行切换 + +所以,让我们从第一步开始(打开配置文件): + +``` +sudo nano /etc/nixos/configuration.nix +``` + +接下来,注释掉用户配置文件或系统配置文件中的包的名称: + +![在 NixOS 上使用 Nix 配置文件删除包][13] + +保存更改并退出配置文件。 + +最后,重建配置文件,并做一个切换来删除包: + +``` +sudo nixos-rebuild switch +``` + +这是这样! + +> 📋 目前,还没有官方的 GUI 工具来帮助你安装/删除软件包。你可能会发现一些由社区开发的项目,如 [nix-gui][14] 和 [nix42b][15],但它们不再被维护或仅仅处于早期开发阶段。 + +### 接下来... + +我希望你喜欢阅读 NixOS 系列,就像我写它一样。 + +在下一篇中,我将强调一些在你安装 NixOS 后需要马上做的重要事情。 + +如果你认为我遗漏了什么或有其他建议,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/nixos-package-management/ + +作者:[Sagar Sharma][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://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://linux.cn/article-15606-1.html +[2]: https://search.nixos.org/packages?ref=its-foss +[3]: https://itsfoss.com/content/images/2023/02/search-packages-for-nixos-1.png +[4]: https://itsfoss.com/content/images/2023/02/search-packages-in-nixos.png +[5]: https://itsfoss.com/apt-command-guide/ +[6]: https://itsfoss.com/what-is-flatpak/ +[7]: https://itsfoss.com/content/images/2023/02/Search-the-service-for-nixos-1.png +[8]: https://itsfoss.com/content/images/2023/02/enable-openssh-on-NixOS.png +[9]: https://linuxhandbook.com/nano-save-exit/?ref=its-foss +[10]: https://itsfoss.com/content/images/2023/02/remove-service-from-NixOS.png +[11]: https://itsfoss.com/content/images/2023/02/install-a-package-in-NixOS-using-the-Nix-config-file.png +[12]: https://itsfoss.com/content/images/2023/02/install-package-systemwide-in-NixOS-using-Nix-configuration-file-1.png +[13]: https://itsfoss.com/content/images/2023/02/remove-package-using-nix-config-file-on-NixOS.png +[14]: https://github.com/nix-gui/nix-gui?ref=its-foss +[15]: https://gitlab.com/juliendehos/nix42b?ref=its-foss +[0]: https://img.linux.net.cn/data/attachment/album/202303/21/090913cnq91ob2hn9b2qbh.jpg \ No newline at end of file diff --git a/sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md b/sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md deleted file mode 100644 index c9c1e551e2..0000000000 --- a/sources/tech/20230306.3 ⭐️ NixOS Series 3 Install and Remove Packages in NixOS.md +++ /dev/null @@ -1,290 +0,0 @@ -[#]: subject: "NixOS Series #3: Install and Remove Packages in NixOS" -[#]: via: "https://itsfoss.com/nixos-package-management/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -NixOS Series #3: Install and Remove Packages in NixOS -====== - -The packaging system in NixOS is its strongest point. The Nix package manager uses a vastly different syntax than apt, dnf and other package managers. - -It is also [one of the reasons why one should try using NixOS][1]. - -In this guide, I will share two ways to install and remove packages on NixOS: - -- **Using the Nix package manager** -- **Using `configuration.nix` config file** - -> ⚠️ Using the Nix package manager, you can only install packages but not services like SSH or Plex server. For the installation of services, you'd have to use a Nix configuration file. - -To install any package, it is necessary to know its exact name, and for that purpose, I will start with how you can search for packages in NixOS. - -### Search packages - -To look for packages, you can use its [web search][2] using your preferred browser. - -You can utilize its web search using the given steps: - -- **Enter the name of the package in the search bar** -- **Select the appropriate package (decide from the given description)** -- **Click on `nix-env` option** -- **And copy the command for `NixOS` (first one)** - -For example, if I want `librewolf` package, I will perform the following: - -![searching for package using nix package manager web search][3] - -You can do the same through the **terminal**. - -To search packages using the terminal, you can follow the given command syntax: - -``` -nix-env -qaP --description [package_name] -``` - -For example, here, I searched for the `librewolf`: - -![search packages in nixos using terminal][4] - -You will have to copy the first line of the output as that is the name for the package you need to install. - -For me, it was `nixos.librewolf`. - -Yes, **it may not sound as convenient as the package names** when using [APT][5] or DNF. But, it is not too bad, I think. - -Some compromises for some benefits, I guess? - -### Install a package in NixOS - -To install a package, all you have to do is use the following command syntax: - -``` -nix-env -iA [package_name] -``` - -And if you use the web search to look for the package, you will already have the exact command you need for the installation. - -So let's say I want to install `librewolf`, so I will be using the following command: - -``` -nix-env -iA nixos.librewolf -``` - -And if you want to perform a system-wide install (make this package available for every user), execute the installation command with `sudo`: - -``` -sudo nix-env -iA nixos.librewolf -``` - -That's it! You will have your favorite package installed in no time. - -### Uninstall a Package in NixOS - -To remove a package, you can refer to the given command syntax: - -``` -nix-env --uninstall [package_name] -``` - -So if I have to remove the `librewolf` package, I have to use the following command: - -``` -nix-env --uninstall librewolf -``` - -If you notice closely, I have used `librewolf` instead of `nixos.librewolf` what I used for the installation. - -This means you will have to skip the `nixos` part during removal of the package, which makes things easy and quick. - -### Install services in NixOS - -As I mentioned earlier, you can not use the nix package manager to install services like OpenSSH, Plex server, [Flatpak][6], etc. - -From searching for the service to the installation process, it differs from what you saw above. - -So let me start with how you can **search for a service**: - -- **To search for the service, head [over to the web page][2] for the Nix package search.** -- **Select `NixOS options` (3rd option in the top-menu row of the page).** -- **Enter the name of the service you are looking for.** -- **Copy the name of the service.** - -For example, here, I'm searching for OpenSSH service: - -![search for openssh service in NixOS][7] - -Once you have the name, open the `configuration.nix` file using the following command: - -``` -sudo nano /etc/nixos/configuration.nix -``` - -And add the name of the service at the end of the line (before `}`) in the following manner: - -``` -[service_name] = true; -``` - -As **I want to enable OpenSSH**, I will be adding the following: - -``` -services.openssh.enable = true; -``` - -![enable openssh on NixOS][8] - -Once you are done adding the service to the config file, [save the changes and exit from the nano][9] text editor. - -To enable the service, rebuild the config file and switch to the changes using the following command: - -``` -sudo nixos-rebuild switch -``` - -That's it! You have the service enabled. - -### Uninstall services from NixOS - -To uninstall a service, all you have to do is remove or comment out the line for that service from `configuration.nix` file. - -So first, open the config file using the following command: - -``` -sudo nano /etc/nixos/configuration.nix -``` - -Look for the service and remove the line or comment it out with `#`: - -![remove service from NixOS][10] - -With the added comment #, I am ignoring the OpenSSH service to load up as I no longer want it on my system. - -Once done, **save the change and exit from the text editor.** - -And finally, rebuild the config file and make the switch: - -``` -sudo nixos-rebuild switch -``` - -### Install packages using Nix config file - -The configuration file lets you **easily manage packages in one go**. - -To install a package using the Nix config file, you have to enter the package's name in the config file, rebuild, and switch to the config file, and that's it. - -First, open the `configuration.nix` file: - -``` -sudo nano /etc/nixos/configuration.nix -``` - -If you want to **install a package for a specific logged-in user,** add the package's name to the user's profile. - -The user profile looks like this: - -``` -users.users.sagar = { - isNormalUser = true; - description = "Sagar"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - firefox - ]; - }; -``` - -Sure, it will show your username instead of `sagar`. - -And you are supposed to add the name of the package using the syntax  `packages = with pkgs; [package_name];` - -So let's suppose I want to install `Thunderbird` as well, then I will add its name as shown below: - -![install a package in NixOS using the Nix config file][11] - -You must add **all the package names inside the square bracket** without commas. It has to be on a new line as the screenshot describes. - -But **if you want to install this package system-wide**, then you will have to add the package name under **environment.systemPackages** like: - -`environment.systemPackages = with pkgs; [package_name]`; - -![install package systemwide in NixOS using Nix configuration file][12] - -Once you are done adding the name of the required package in the system profile or user profile, or even both, you will have to follow the same command to complete the installation: - -``` -sudo nixos-rebuild switch -``` - -And you have it! - -### Remove packages using the Nix config file - -To remove the package, all you have to do is follow the given simple steps: - -- **Open the Nix config file** -- **Remove or comment out the name of the package** -- **Rebuild the config and make a switch** - -So let's start with the first step (opening the config file): - -``` -sudo nano /etc/nixos/configuration.nix -``` - -Next, comment out the name of the packet from the user profile or system profile: - -![remove package using nix config file on NixOS][13] - -Save changes and exit from the config file. - -And finally, rebuild the config and make a switch to remove the package: - -``` -sudo nixos-rebuild switch -``` - -That's it! - -> 📋 Currently, there are no official GUI tools to help you with installing/removing packages. You might find some projects like [nix-gui][14] and [nix42b][15] developed by the community, but they are no longer maintained or simply in their early stages of development. - -### Next Up... - -I hope you enjoy reading the NixOS series as much as I do writing it. - -In the next part, I will highlight some **important things you need to do right after installing NixOS**. - -_💬 If you think I'm missing out on something or have any other suggestions, please let me know in the comments._ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/nixos-package-management/ - -作者:[Sagar Sharma][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sagar/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/why-use-nixos/ -[2]: https://search.nixos.org/packages?ref=its-foss -[3]: https://itsfoss.com/content/images/2023/02/search-packages-for-nixos-1.png -[4]: https://itsfoss.com/content/images/2023/02/search-packages-in-nixos.png -[5]: https://itsfoss.com/apt-command-guide/ -[6]: https://itsfoss.com/what-is-flatpak/ -[7]: https://itsfoss.com/content/images/2023/02/Search-the-service-for-nixos-1.png -[8]: https://itsfoss.com/content/images/2023/02/enable-openssh-on-NixOS.png -[9]: https://linuxhandbook.com/nano-save-exit/?ref=its-foss -[10]: https://itsfoss.com/content/images/2023/02/remove-service-from-NixOS.png -[11]: https://itsfoss.com/content/images/2023/02/install-a-package-in-NixOS-using-the-Nix-config-file.png -[12]: https://itsfoss.com/content/images/2023/02/install-package-systemwide-in-NixOS-using-Nix-configuration-file-1.png -[13]: https://itsfoss.com/content/images/2023/02/remove-package-using-nix-config-file-on-NixOS.png -[14]: https://github.com/nix-gui/nix-gui?ref=its-foss -[15]: https://gitlab.com/juliendehos/nix42b?ref=its-foss From bdcccf2c749e1d54b1e4b5f13f45c401c71e794a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 21 Mar 2023 11:21:34 +0800 Subject: [PATCH 139/318] Translating --- ....0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md b/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md index 138d592ea4..9b9d4d545c 100644 --- a/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md +++ b/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/download-debian-iso/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "robsean" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3952bcc74e63798ac15fa56d4e910305a64c2312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 21 Mar 2023 14:21:23 +0800 Subject: [PATCH 140/318] Translated --- ... Top 5 Best EPUB Readers for Linux [Compared].md | 272 ------------------ ... Top 5 Best EPUB Readers for Linux [Compared].md | 272 ++++++++++++++++++ 2 files changed, 272 insertions(+), 272 deletions(-) delete mode 100644 sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md create mode 100644 translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md diff --git a/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md b/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md deleted file mode 100644 index 8e5b587194..0000000000 --- a/sources/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md +++ /dev/null @@ -1,272 +0,0 @@ -[#]: subject: "Top 5 Best EPUB Readers for Linux [Compared]" -[#]: via: "https://www.debugpoint.com/epub-readers-linux/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Top 5 Best EPUB Readers for Linux [Compared] -====== - -**Are you looking for the best EPUB readers for Linux? Here are the best FOSS EPUB readers for you.** - -Are you an avid Linux user who loves reading ebooks? If yes, you must know that the default document viewer on most of the Linux distros may not meet all your requirements for being a bookworm. - -EPUB is a widely used open ebook format supported by most ebook readers. Thankfully, several EPUB reader apps are available in the Ubuntu software centre and other repositories that you can download for free. - -But remember, there are only a couple of good readers available. Not many! - -In this article, we’ll discuss the best EPUB readers for Ubuntu Linux that will enhance your reading experience. We’ll also explore their features and benefits, so you can choose the one that suits your needs. - -But before that, what features should you look for in a “good” EPUB reader? - -### Features to Look for in an EPUB Reader - -- **User Interface**: A good EPUB reader should have a clean and intuitive user interface that makes navigating and customising your reading experience easy. It’s not a physical book you are reading, so the user interface is essential for the “physical book” reading experience! -- **Customization**: The ability to customize the font size, font type, background colour, and other settings is an essential feature that enhances your reading experience. -- **Bookshelf**: A bookshelf is a handy feature that allows you to organize your EPUB files and keep track of your reading progress. -- **Annotation**: The ability to highlight, underline, and add notes to your EPUB files is a valuable feature that helps you remember important points. -- **Syncing**: If you read EPUB files on multiple devices, syncing your reading progress and bookmarks are essential to avoid losing track of your progress. - -Now, let’s take a look at the best EPUB readers for Ubuntu and other Linux that offer all the features mentioned above. - -### Best EPUB readers for Ubuntu and other Linux distros - -#### Calibre - -The first on this list is Calibre which is the best & complete ebook management solution. It is a powerful EPUB reader that also serves as an ebook management tool. It is a popular choice among users due to its extensive feature set, including the ability to convert EPUB files to different formats, edit EPUB files, and even create your own EPUB files. Calibre also has a user-friendly interface and allows you to customize your reading experience. - -![Calibre welcome wizard][1] - -Calibre is continuously updated, with features and enhancements pouring in every month. It is very active in its development and one of the best on this list. - -- Supports several ebook devices (Android, iOS based) -- EPUB reader and manager -- Custom rating and tagging for your ebook library -- Fetch ebook metadata from the internet -- Read news from popular news sources and make ebooks! -- Upload ebooks to Kindle and other readers with the auto converter (with download as well) -- Built-in browser to shop ebooks - -![Calibre main window][2] - -![Uploading books to Calibre][3] - -You can download Calibre from the official website. Alternatively, you can [set up Flatpak & Flathub][4] for your Linux distribution and hit the below button to install (or use the command): - -[Install Calibre as Flatpak][5] - -``` -flatpak install com.calibre_ebook.calibre -``` - -For other download options (Windows, macOS and native Linux packages), visit [this page][6]. - -#### Foliate - -We featured Foliate in [part 3 of best Ubuntu apps][7] series earlier. It is a lightweight and modern EPUB reader that offers a range of customization options. It’s based on GTK4 and seamlessly integrates itself with the GNOME desktop. It has a sleek interface that is easy to navigate and the ability to customize font size, font type, and line spacing. - -![Foliate main window and settings][8] - -Foliate also includes a dark mode for nighttime reading and the option to adjust the colour temperature built-in to reduce eye strain. - -**Feature summary:** - -- Immersive view with autohide feature of main top bar for reading -- Catalogue view with direct download support from major ebook websites -- Multiple views – two-page and scrolling view -- Custom font and line-spacing -- Built-in brightness control, which applies to the app only! -- Reading progress sliders -- Bookmark, annotation support -- Search inside book -- Quick dictionary lookup - -![Foliate reader view][9] - -![Foliate library view][10] - -The best way to download Okular is using Flatpak. Set up your [system for Flatpak & Flathub][4] and using the below link to install it (or use the command mentioned below): - -[Install Foliate using Flatpak][11] - -``` -flatpak install com.github.johnfactotum.Foliate -``` - -To learn more about Foliate, visit the official [website][12]. - -#### Okular - -KDE’s own document viewer is Okular which also supports EPUB files. It is a feature-rich application that offers a range of customization options, including font size, font type, and background colour. Okular also has a built-in annotation feature, which you can use to annotate your EPUB files. It also supports a wide range of file formats: - -- EPUB -- PDF -- DjVU -- Image files: JPEG, PNG, GIF, Tiff, WebP -- Comics files: CBR and CBZ - -However, you can’t manage ebook collections or download ebooks using Okular. - -![Okular][13] - -You can install Okular in Ubuntu and other related distribution using: - -``` -sudo apt install okular -``` - -For Fedora and related distros: - -``` -sudo dnf install okular -``` - -If you prefer Flatpak, set up your system as Flatpak and install it using the below link (or use the command mentioned below): - -[Install Okular as Flatpak][14] - -``` -flatpak install org.kde.okular -``` - -#### Bookworm - -The next EPUB reader on this list is Bookwork, which is totally underrated in my opinion. It is actually an elementary OS app but available for installation for all Linux distributions. - -It has a clean interface and offers a range of customization options, including font size, font type, and background colour. Bookworm also allows you to organize your EPUB files into collections and keep track of your reading progress. - -![Bookworm library view][15] - -In addition, you can easily manage your EPUB books using a built-in tag editor and rating system. Also, it has support for annotation, search, chapter and keyboard-driven browsing. - -Last but not least, it supports EPUB, MOBI, PDF, EB2, CBR and CBZ files. - -![Bookworm EPUB reader view][16] - -Installation is easy. If you are an elementary OS user, you can search for “bookworm” in AppCenter. - -For Ubuntu and related distros, you can install it using the below PPA: - -``` -sudo add-apt-repository ppa:bookworm-team/bookwormsudo apt-get updatesudo apt-get install com.github.babluboy.bookworm -``` - -If you prefer Flatpak, set up your system for Flathub & Flatpak and install it using the below command: - -``` -flatpak install com.github.babluboy.bookworm -``` - -To learn more, visit the [official website][17]. - -#### FBReader - -The final app in this best EPUB readers list is FBReader. Before you read, note that it was open source until 2015. But now, it is not open source. However, a developer SDK is available. - -It is a popular and versatile EPUB reader that is available for all Linux distros. It has a simple and user-friendly interface allows you to customize your reading experience. FBReader also supports various ebook formats, including EPUB, MOBI, FB2 and HTML. It also offers a bookshelf feature that allows you to organize your ebooks and keep track of your reading progress. - -FBRedaer also supports cloud sync of your library between your devices. - -![FBReader][18] - -Installing FBReader is a little difficult for Linux since it is only available as a Snap package. You can install it using snap as below after [setting up your system for Snap][19]. - -``` -sudo snap install fbreader -``` - -To learn more about FBReader, visit the official [website][20]. - -### More EPUB readers for Linux - -**Koodo reader** - -It’s a fairly new FOSS EPUB reader with tons of features. And it looks great too. The only thing is it is built using Javascript, HTML and TypeScript. So, not a native app, but it’s fast. You might want to give it a try. Koodo reader comes with AppImage, native deb and RPM files for Linux. - -You can [download here][21], and here are some screenshots. - -![Koodo EPUB reader][22] - -![Koodo - reader view][23] - -![Koodo options][24] - -There are two other EPUB readers but they are now discontinued, unfortunately. - -- [GNOME Books][25] -- [epub CLI reader][26] - -### Comparison Table of the EPUB readers - -To make it easier for you to choose the right EPUB reader for your needs, we’ve created a comparison table highlighting each EPUB reader’s key features described above. - -| EPUB Reader | User Interface | Customization | Bookshelf | Annotation | Syncing | -| :- | :- | :- | :- | :- | :- | -| Calibre | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | -| Foliate | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | -| Bookworm | ✔️ | ✔️ | ✔️ | ❌ (limited) | ❌ | -| Okular | ✔️ | ✔️ | ❌ | ❌ (limited) | ❌ | -| FBReader | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | - -### Where to get free ebooks? - -Many websites give you vast collections of comics and novels from prominent authors. The best website is “Project Gutenberg”. Here you can download 60,000+ ebooks from all categories. - -Visit the website using the link below. Once you have downloaded it, you can use any of the above EPUB readers to make your personal ebook collection and enjoy. - -[Project Gutenberg][27] - -You can also try _standard ebooks_with a refined collection of free e-books. - -[Standard eBooks][28] - -### Conclusion - -In conclusion, several EPUB readers are available for Linux that offer a range of features to enhance your reading experience. Calibre is an excellent choice if you’re looking for a feature-rich EPUB reader that also functions as an ebook management tool. Foliate & Bookworm is a lightweight and modern app perfect for those who value customization options. - -I hope with the above comparison and detailed descriptions; you can now choose the best EPUB reader for your needs. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/epub-readers-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/wp-content/uploads/2023/03/Calibre-welcome-wizard.jpg -[2]: https://www.debugpoint.com/wp-content/uploads/2023/03/Calibre-main-window.jpg -[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Uploading-books-to-Calibre.jpg -[4]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ -[5]: https://dl.flathub.org/repo/appstream/com.calibre_ebook.calibre.flatpakref -[6]: https://calibre-ebook.com/download -[7]: https://www.debugpoint.com/necessary-ubuntu-apps-2022/ -[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-main-window-and-settings.jpg -[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-reader-view.jpg -[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-library-view.jpg -[11]: https://dl.flathub.org/repo/appstream/com.github.johnfactotum.Foliate.flatpakref -[12]: https://johnfactotum.github.io/foliate/ -[13]: https://www.debugpoint.com/wp-content/uploads/2023/03/Okular.jpg -[14]: https://dl.flathub.org/repo/appstream/org.kde.okular.flatpakref -[15]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bookworm-library-view.jpg -[16]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bookworm-EPUB-reader-view.jpg -[17]: https://babluboy.github.io/bookworm/ -[18]: https://www.debugpoint.com/wp-content/uploads/2023/03/FBReader.jpg -[19]: https://www.debugpoint.com/how-to-install-and-use-snap-packages-in-ubuntu/ -[20]: https://fbreader.org/en -[21]: https://koodo.960960.xyz/en -[22]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-EPUB-reader.jpg -[23]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-reader-view.jpg -[24]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-options.jpg -[25]: https://gitlab.gnome.org/Archive/gnome-books -[26]: https://github.com/rupa/epub -[27]: https://www.gutenberg.org/ -[28]: https://standardebooks.org/ebooks diff --git a/translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md b/translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md new file mode 100644 index 0000000000..5eabedd07d --- /dev/null +++ b/translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md @@ -0,0 +1,272 @@ +[#]: subject: "Top 5 Best EPUB Readers for Linux [Compared]" +[#]: via: "https://www.debugpoint.com/epub-readers-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux 上 5 款最好的 EPUB 阅读器 +====== + +**你正在为 Linux 寻找最好的 EPUB 阅读器?这里是为你准备的最好的自由开源的 EPUB 阅读器。** + +你是一位热衷于阅读电子书的 Linux 用户吗?如果,是的,你必然知道在 Linux 发行版上的默认文档阅读器不能满足你作为一名书虫的所有要求。 + +EPUB 是一种广泛使用的开放电子书格式,大多数的电子书阅读器都支持。值得庆幸的是,在 Ubuntu 软件中心和其它存储库中有一些 EPUB 阅读器应用程序,你可以自由下载它们。. + +但是,请记住,仅有几个好用的阅读器。并不是有很多! + +在这篇文章中,我们将讨论在 Ubuntu linux 上的最好的 EPUB 阅读器,这将增强你的阅读体验。我们也将探讨它们的特色功能和优点,以便你可以选择一个适合你的应用程序。 + +但是,在此之前,在一个 “令人满意的” EPUB 阅读器中,你可以找到哪些特色功能? + +### 在一款 EPUB 阅读器中所渴望的特色功能 + +- **用户界面**: 一款好的 EPUB 阅读器应该有一个简单易懂的用户界面,它会使导航和自定义你的优点体验变得简单。你并不是在阅读一本实体书,因此,对于 “实体书” 的阅读体验来说,用户界面是极其重要的! +- **自定义**: 拥有自定义字体大小、字体类型、背景颜色和其它设置的能力,它们将增强你的阅读体验。 +- **书架**: 书架是一种很方便的特色功能,它允许你组织你的 EPUB 文件和保持追踪你的阅读进度。 +- **注释**: 在你的 EPUB 文件中,高亮显示、下划线和添加注释是一种很重要的特色功能,它会帮助你记住重点。 +- **同步**: 如果你在多台设备上阅读 EPUB 文件,同步你的阅读进度和书签是非常重要的,可以避免丢失你的追踪进度. + +现在,让我们看看为 Ubuntu 和其它的 linux 发行版 提供的最好的 EPUB 阅读器,它们都涉及上述所有的特色功能。 + +### 在 Ubuntu 和其它 Linux 发行版上的最好的 EPUB 阅读器 + +#### Calibre + +在这份列表上的第一款阅读器是 Calibre ,它是最好的和最完整的电子书管理解决方案。它是一款功能强大的 EPUB 阅读器,也提供电子书管理工具。它在用户中是一种流行的选择,因为它有丰富的特色功能集,包括:转换 EPUB 文件到不同的格式、编辑 EPUB 文件,甚至创建你自己的 EPUB 文件的功能。Calibre 也有一个用户友好的界面,允许你自定义你的阅读体验。 + +![Calibre welcome wizard][1] + +Calibre 正在持续更新,每个月都会有大量的特色功能和增强的功能。它的开发活动是非常活跃的,它是这份列表中最好的一个。 + +- 支持多种电子书设备 (基于 Android、iOS 的设备) +- EPUB 阅读器和管理器 +- 为你的电子书库评级和标记 +- 从因特网获取电子书的元数据 +- 从流行的新闻源处阅读新闻,制作电子书! +- 使用自动转换器来上传电子书到 Kindle 和其它的阅读器 (当然,也可以下载) +- 内置可购买电子书的浏览器 + +![Calibre main window][2] + +![Uploading books to Calibre][3] + +你可以从其官方网站下载 Calibre 。或者,你可以为你的 Linux 发行版 [设置 Flatpak & Flathub][4] ,并单击下面的按钮来安装 (或 使用命令): + +[使用 Flatpak 来安装 Calibre][5] + +``` +flatpak install com.calibre_ebook.calibre +``` + +针对其它的下载选项 (Windows、macOS 和原生的 Linux 软件包),访问 [这个网页][6] 。 + +#### Foliate + +我们在先前的 [最佳的 Ubuntu 应用程序的第 3 部分apps][7] 系列中介绍了 Foliate 。它是一款轻量现代的 EPUB 阅读器,它提供了一系列的自定义选项。它是基于 GTK4 的,并且与 GNOME 桌面环境无缝集成。它有一个平滑且易于导航的界面,并且有自定义字体大小、字体类型和行距的功能。 + +![Foliate main window and settings][8] + +Foliate 也包含:一种针对夜间阅读的深暗模式,一个调整内置颜色温度的选项,用以减少眼睛疲劳。 + +**功能摘要:** + +- 沉浸式视图,主顶部工具条在阅读时自动隐藏 +- 列入目录视图,支持从主要的电子书网站直接下载 +- 多屏视图 – 双页面视图和滚动视图 +- 自定义字体和行距 +- 内置亮度控制,仅适用于应用程序本身! +- 阅读进度滑块 +- 支持书签和注释 +- 在书中搜索 +- 快速字典查找 + +![Foliate reader view][9] + +![Foliate library view][10] + + 下载 Okular 的最好方式是使用 Flatpak 来下载。针对你的系统设置 [Flatpak & Flathub][4] ,并使用下面的链接来安装它 (或 使用下面提到的命令): + +[使用 Flatpak 来安装 Foliate][11] + +``` +flatpak install com.github.johnfactotum.Foliate +``` + +要学习更多关于 Foliate 的信息,访问官方[网站][12]。 + +#### Okular + +KDE 自带的文档阅读器是 Okular ,它也支持 EPUB 文件。它是一款功能丰富的应用程序,它提供了一系列自定义选项,包括:字体大小、字体类型和背景颜色。Okular 也有内置注释功能,你可以使用它来注释你的 EPUB 文件。它也支持很多文件格式: + +- EPUB +- PDF +- DjVU +- 图形文件: JPEG 、PNG 、GIF 、Tiff 、WebP +- 漫画文件: CBR 和 CBZ + +不过,你不能使用 Okular 来管理收藏或下载电子书。 + +![Okular][13] + +你可以在 Ubuntu 及其相关发行版中安装 Okular : + +``` +sudo apt install okular +``` + +针对 Fedora 及其相关发行版: + +``` +sudo dnf install okular +``` + +如果你更喜欢 Flatpak ,将你的系统设置为 Flatpak ,并使用下面的链接来安装 Flatpak (或使用下面提到的命令): + +[使用 Flatpak 格式安装 Okular][14] + +``` +flatpak install org.kde.okular +``` + +#### Bookworm + +在这份列表上的下一个 EPUB 阅读器是 Bookwork ,在我看来,它完全被低估了。它确实是一款 elementary OS 的应用程序,但是,对于所有的 Linux 发行版来说都是可以安装的。 + +它有简洁的界面,并提供一系列自定义选项,包括字体大小、字体类型和背景颜色。Bookworm 也允许你将你的 EPUB 文件组织到集合中,并保持追踪你的阅读进度。 + +![Bookworm library view][15] + +另外,你可以使用一个内置的标签编辑器和评分系列来轻松地管理你的 EPUB 书籍。此外,它也支持注释、搜索、章节和键盘驱动浏览。 + +不可缺少的是,它支持 EPUB 、MOBI 、PDF 、EB2 、CBR 和 CBZ 文件。 + +![Bookworm EPUB reader view][16] + +安装是很容易的。如果你是一名 elementary OS 用户,你可以在 应用中心AppCenter 中搜索 “bookworm” 。 + +针对 Ubuntu 及其相关发行版,你可以使用下面的 PPA 来安装它: + +``` +sudo add-apt-repository ppa:bookworm-team/bookwormsudo apt-get updatesudo apt-get install com.github.babluboy.bookworm +``` + +如果你更喜欢 Flatpak ,将你的系统设置为 Flathub 和 Flatpak ,并使用下面的链接来安装它: + +``` +flatpak install com.github.babluboy.bookworm +``` + +要学习更多的信息,访问官方[网站][17]。 + +#### FBReader + +在这份最好的 EPUB 阅读器列表中最后一款应用程序是 FBReader 。在你继续阅读之前,注意:它在 2015 年以前的开源软件。但是,它现在是闭源软件,不过,有一个开发者 SDK 是可用的。 + +它是一款流行的多功能的 EPUB 阅读器,所有的 Linux 发行版都可以获取使用。它有一个简单且用户友好的界面,允许你自定义你的阅读体验。FBReader 也支持各种电子书格式,包括:EPUB 、MOBI 、FB2 和 HTML 。它也提供一种书架特色功能,允许你组织你的电子书和保持追踪你的阅读进度。 + +FBRedaer 也支持在你的设备之间云同步你的库。 + +![FBReader][18] + +在Linux 上安装 FBReader 是有一些难度的,因为它只提供 Snap 软件包。你可以在 [针对 Snap 设置你的系统][19] 后,使用 snap 来安装它,如下所示。 + +``` +sudo snap install fbreader +``` + +要学习更多关于 FBReader 的信息,访问官方 [网站][20]。 + +### 在 Linux 上的更多的 EPUB 阅读器 + +**Koodo reader** + +它是一个相当新的开放自由的 EPUB 阅读器,带有大量的特色功能。并且它也看起来极好。唯一的问题是,它是使用 Javascript 、HTML 和 TypeScript 构建的。因此,它不是原生的应用程序,但是它是很快的。你可能会想尝试一下。在 Linux 上,Koodo reader 提供 AppImage 、本机的 deb 和 RPM 文件。 + +你可以 [在这里下载][21] ,这里是一些截屏。 + +![Koodo EPUB reader][22] + +![Koodo - reader view][23] + +![Koodo options][24] + +这里还有另外的两个 EPUB 阅读器,但是,不幸的是,它们已经不再继续开发了。 + +- [GNOME Books][25] +- [epub CLI reader][26] + +### EPUB 阅读器的对比表 + +为使你更容易地选择适合你所需要的 EPUB 阅读器,我们创建了一个比较表,着重强调了上述 EPUB 阅读器的关键特色功能。 + +| EPUB 阅读器 | 用户界面 | 自定义 | 书架 | 注释 | 同步 | +| :- | :- | :- | :- | :- | :- | +| Calibre | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| Foliate | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | +| Bookworm | ✔️ | ✔️ | ✔️ | ❌ (受限) | ❌ | +| Okular | ✔️ | ✔️ | ❌ | ❌ (受限) | ❌ | +| FBReader | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | + +### 去哪里获取免费的电子书? + +很多网站为你提供来自著名作者的大量漫画和小说的收藏。最好的网站是 “Project Gutenberg” 。你可以下载来自所有分类中的 60,000 多本电子书。 + +使用下面的链接访问网站。在你下载电子书后,你可以使用上述任意的 EPUB 阅读器来制作和享受你的个人电子书收藏。 + +[Project Gutenberg][27] + +你也可以尝试精选免费电子书的 _standard ebooks_。 + +[Standard eBooks][28] + +### 总结 + +总而言之,在 Linux 上有几个可用的 EPUB 阅读器,它们提供大量的特色功能来增强你的阅读体验。Calibre 是一个极好的选择,如果你正在寻找一个功能丰富的 EPUB 阅读器,它也可以作为一个电子书管理器工具。Foliate 和 Bookworm 是一个轻量的现代的应用程序,非常适合那些看重自定义选项的人。 + +我希望通过上述的比较和详细的描述,你现在可以为你自己选择最好的 EPUB 阅读器了。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/epub-readers-linux/ + +作者:[Arindam][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.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed/ +[1]: https://www.debugpoint.com/wp-content/uploads/2023/03/Calibre-welcome-wizard.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2023/03/Calibre-main-window.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Uploading-books-to-Calibre.jpg +[4]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[5]: https://dl.flathub.org/repo/appstream/com.calibre_ebook.calibre.flatpakref +[6]: https://calibre-ebook.com/download +[7]: https://www.debugpoint.com/necessary-ubuntu-apps-2022/ +[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-main-window-and-settings.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-reader-view.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/Foliate-library-view.jpg +[11]: https://dl.flathub.org/repo/appstream/com.github.johnfactotum.Foliate.flatpakref +[12]: https://johnfactotum.github.io/foliate/ +[13]: https://www.debugpoint.com/wp-content/uploads/2023/03/Okular.jpg +[14]: https://dl.flathub.org/repo/appstream/org.kde.okular.flatpakref +[15]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bookworm-library-view.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2023/03/Bookworm-EPUB-reader-view.jpg +[17]: https://babluboy.github.io/bookworm/ +[18]: https://www.debugpoint.com/wp-content/uploads/2023/03/FBReader.jpg +[19]: https://www.debugpoint.com/how-to-install-and-use-snap-packages-in-ubuntu/ +[20]: https://fbreader.org/en +[21]: https://koodo.960960.xyz/en +[22]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-EPUB-reader.jpg +[23]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-reader-view.jpg +[24]: https://www.debugpoint.com/wp-content/uploads/2023/03/Koodo-options.jpg +[25]: https://gitlab.gnome.org/Archive/gnome-books +[26]: https://github.com/rupa/epub +[27]: https://www.gutenberg.org/ +[28]: https://standardebooks.org/ebooks From 42a6040e3baf1cd7e89ed30f7d721b4102573e91 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Mar 2023 15:48:12 +0800 Subject: [PATCH 141/318] RP @geekpi https://linux.cn/article-15646-1.html --- ...14.2 ⭐️ How I destroyed my Raspberry Pi.md | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) rename {translated/tech => published}/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md (62%) diff --git a/translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md b/published/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md similarity index 62% rename from translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md rename to published/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md index d8d40de968..e3e2285a13 100644 --- a/translated/tech/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md +++ b/published/20230314.2 ⭐️ How I destroyed my Raspberry Pi.md @@ -3,14 +3,18 @@ [#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15646-1.html" 我是如何毁掉我的树莓派的 ====== -我想写一篇文章来演示“如何使用树莓派实现 XYZ 自动化”或围绕树莓派的其他一些有趣、好奇或有用的应用。正如你可能从标题中意识到的那样,我不能再提供这样的文章了,因为我毁了我心爱的树莓派。 +![][0] + +> 多测量几次总比测量一次好。我掉到坑里,希望你可以不用。 + +我想写一篇文章来演示“如何使用树莓派实现莫某的自动化”,或围绕树莓派的其他一些有趣、好奇或有用的应用。正如你可能从标题中意识到的那样,我不能再提供这样的文章了,因为我毁了我心爱的树莓派。 树莓派是每个技术爱好者办公桌上的标准设备。因此,大量教程和文章告诉你可以用它做什么。这篇文章反而涵盖了阴暗面:我描述了你最好不要做的事情! @@ -19,30 +23,32 @@ 在谈到实际的破坏点之前,我想提供一些背景。在房屋内外进行电气工作时,你必须处理不同颜色的电缆。在德国,每栋房子都连接到三相交流电网,你通常会发现以下电缆颜色: - 零线:蓝色 -- (PE) 地线:黄绿色 -- (L1) 火线 1:棕色 -- (L2) 火线 2:黑色 -- (L3) 火线 3:灰色 +- (PE)地线:黄绿色 +- (L1)火线 1:棕色 +- (L2)火线 2:黑色 +- (L3)火线 3:灰色 例如,给灯接线时,你接零线(N,蓝色)和火线(L,有 1/3 的机会是棕色),它们之间的电压为 230V 交流电。 ### 连接树莓派 -今年早些时候,我写了一篇关于 [OpenWrt,家用路由器固件的开源替代品][1]的文章。在文章中,我使用了 TP-link 路由器设备。但是,最初的计划是使用我的树莓派 4。 +今年早些时候,我写了一篇关于 [OpenWrt,家用路由器固件的开源替代品][1] 的文章。在文章中,我使用了 TP-link 路由器设备。但是,最初的计划是使用我的树莓派 4。 ![OpenWrt and Raspberry Pi comparison][2] 我的想法是构建一个旅行路由器,我可以将其安装在我的大篷车中以改善露营地的互联网连接(我是那种离不开互联网的露营者)。为此,我在我的树莓派中添加了一个单独的 USB 无线网卡以连接第二个 Wifi 天线并安装了 [OpenWrt][3]。此外,我添加了一个 12V 至 5V DC/DC 转换器来连接大篷车中的 12V 接线。我用桌上的 12V 汽车电池测试了这个设置,它按预期工作。一切设置和配置完成后,我开始将其安装到我的大篷车中。 -在我的大篷车里,我找到了一根蓝色和一根棕色的电线,将它与 12V 至 5V DC/DC 转换器相连,将保险丝放回,然后。。。 +在我的大篷车里,我找到了一根蓝色和一根棕色的电线,将它与 12V 至 5V DC/DC 转换器相连,将保险丝放回,然后…… ![DC converter device][4] -自己损坏的芯片才是真正的降压变压器。我非常自信地认为蓝线是在 0V 电位上,棕色的是在 12V 上,我甚至没有测量。后来我了解到,蓝色的线是在 12V 上,而棕色的线是接地(这在汽车电子产品中很常见)。 +这个芯片,自己爆开了,它才是真正的降压变压器。我非常自信地认为蓝线是在 0V 电位上,棕色的是在 12V 上,我甚至没有测量。后来我了解到,蓝色的线是在 12V 上,而棕色的线是接地(这在汽车电子产品中很常见)。 ### 总结 -自从这次事故后,我的树莓派就再也没有启动过。由于树莓派的价格飞涨,我不得不寻找替代品。幸运的是,我遇到了 TP-Link 旅行路由器,它也可以运行 Open-WRT 并且可以令人满意地完成它的工作。最后:经常测量总比测量一次好。 +自从这次事故后,我的树莓派就再也启动不起来了。由于树莓派的价格飞涨,我不得不寻找替代品。幸运的是,我遇到了 TP-Link 旅行路由器,它也可以运行 Open-WRT 并且可以令人满意地完成它的工作。 + +最后:多测量几次总比测量一次好。 -------------------------------------------------------------------------------- @@ -51,7 +57,7 @@ via: https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi 作者:[Stephan Avenwedde][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/) 荣誉推出 @@ -60,4 +66,5 @@ via: https://opensource.com/article/23/3/how-i-destroyed-my-raspberry-pi [1]: https://opensource.com/article/22/7/openwrt-open-source-firmware [2]: https://opensource.com/sites/default/files/2023-03/OpenWrt_Comparison_RaspberryPi.jpg [3]: https://openwrt.org/ -[4]: https://opensource.com/sites/default/files/2023-03/dc_converter.png \ No newline at end of file +[4]: https://opensource.com/sites/default/files/2023-03/dc_converter.png +[0]: https://img.linux.net.cn/data/attachment/album/202303/21/154709mhtffmtaze85utjb.jpg \ No newline at end of file From 5f3c96629e7b3c02cd27dde6efd0c5124c5ebfc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=9B?= Date: Tue, 21 Mar 2023 18:00:01 +0800 Subject: [PATCH 142/318] Add files via upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译好了,提交 --- ... How I use my old camera as a webcam with Linux.md | 125 ++++++++++-------- 1 file changed, 68 insertions(+), 57 deletions(-) diff --git a/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md b/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md index 460a623fde..67c0179fa1 100644 --- a/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md +++ b/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md @@ -1,62 +1,68 @@ [#]: subject: "How I use my old camera as a webcam with Linux" + [#]: via: "https://opensource.com/article/22/12/old-camera-webcam-linux" + [#]: author: "Tom Oliver https://opensource.com/users/tomoliver" + [#]: collector: "lkxed" + [#]: translator: "Pabloxllwe" + [#]: reviewer: " " + [#]: publisher: " " + [#]: url: " " -How I use my old camera as a webcam with Linux -====== +# 如何在 Linux 中使用旧相机作为网络摄像头 -This year after largely abandoning my MacBook in favor of a NixOS machine, I started getting requests to "turn my camera on" when video calling people. This was a problem because I didn't have a webcam. I thought about buying one, but then I realized I had a perfectly good Canon EOS Rebel XS DSLR from 2008 lying around on my shelf. This camera has a mini-USB port, so naturally, I pondered: Did a DSLR, mini-USB port, and a desktop PC mean I could have a webcam? +今年,在我基本上放弃 MacBook 转而使用 NixOS 机器之后,我开始收到要求在与人进行视频通话时“打开摄像头”的请求。这是一个问题,因为我没有网络摄像头。我考虑购买一个,但后来我意识到我有一台完好无损的2008年产的佳能EOS Rebel XS数码单反相机放在书架上。这台相机有一个 mini-USB 接口,所以我自然而然地思考:一台数码单反相机、一个 mini-USB 接口和一台台式电脑意味着我能拥有一个网络摄像头吗? -There's just one problem. My Canon EOS Rebel XS isn't capable of recording video. It can take some nice pictures, but that's about it. So that's the end of that. +只有一个问题。我的佳能 EOS Rebel XS 不能录制视频。它可以拍摄一些漂亮的照片,但就这样了。所以这就是它所有的功能了。 -Or is it? +还是有别的办法? -There happens to be some amazing open source software called [gphoto2][1]. Once installed, it allows you to control various supported cameras from your computer and it takes photos and videos. +有一个叫做 [gphoto2](http://gphoto.org/) 的惊人的开源软件。一旦安装,它允许您从计算机控制各种受支持的相机,并拍摄照片和视频。 -### Supported cameras +### 支持的摄像头 -First, find out whether yours is supported: +首先,了解您的设备是否得到支持 ``` $ gphoto2 --list-cameras ``` -### Capture an image +### 拍摄图像 -You can take a picture with it: +你可以用它拍照: ``` $ gphoto2 --capture-image-and-download ``` -The shutter activates, and the image is saved to your current working directory. +快门会被触发,图像会保存到您当前的工作目录中。 -### Capture video +### 录制视频 -I sensed the potential here, so despite the aforementioned lack of video functionality on my camera, I decided to try `gphoto2 --capture-movie`. Somehow, although my camera does not support video natively, gphoto2 still manages to spit out an MJPEG file! +我意识到了这里的潜力,所以尽管我的相机没有视频功能,我还是决定尝试`gphoto2 --capture-movie`命令。不知怎么的,尽管我的相机不支持视频功能,gphoto2 仍然能够生成一个 MJPEG 文件! -On my camera, I need to put it in "live-view" mode before gphoto2 records video. This consists of setting the camera to portrait mode and then pressing the **Set** button so that the viewfinder is off and the camera screen displays an image. Unfortunately, though, this isn't enough to be able to use it as a webcam. It still needs to get assigned a video device, such as `/dev/video0`. +在我的相机上,我需要将其置于“实时预览”模式下,然后 gphoto2 才能录制视频。这包括将相机设置为纵向模式,然后按下 Set 按钮,使取景器关闭,相机屏幕显示图像。不幸的是,这还不足以将其用作网络摄像头。它仍然需要分配一个视频设备,例如`/dev/video0`。 -### Install ffmpeg and v4l2loopback +### 安装 ffmpeg 和 v4l2loopback -Not surprisingly, there's an open source solution to this problem. First, use your package manager to install `gphoto2`, `ffmpeg`, and `mpv`. For example, on Fedora, CentOS, Mageia, and similar: +毫不奇怪,有一个开源的解决方案来解决这个问题。首先,使用您的包管理器安装`gphoto2`、`ffmpeg`和`mpv`。例如,在 Fedora 、CentOS 、Mageia 和类似的 Linux 发行版上: ``` $ sudo dnf install gphoto2 ffmpeg mpv ``` -On Debian, Linux Mint, and similar: +在 Debian , Linux Mint 及其类似发行版: ``` $ sudo apt install gphoto2 ffmpeg mpv ``` -I use NixOS, so here's my configuration: +我使用的是 NixOS ,这是我的配置文件: ``` # configuration.nix @@ -68,7 +74,7 @@ environment.systemPackages = with pkgs; [ ... ``` -Creating a virtual video device requires the `v4l2loopback` Linux kernel module. At the time of this writing, that capability is not included in the mainline kernel, so you must download and compile it yourself: +创建虚拟视频设备需要使用 `v4l2loopback` Linux 内核模块。在撰写本文时,该功能未包含在主线内核中,因此您需要自己下载和编译它: ``` $ git clone https://github.com/umlaeute/v4l2loopback @@ -78,7 +84,7 @@ $ sudo make install $ sudo depmod -a ``` -If you're using NixOS like me, you can just add the extra module package in `configuration.nix`: +如果你像我一样使用 NixOS ,你可以在 “configuration.nix” 中添加额外的模块包: ``` [...] @@ -93,20 +99,20 @@ boot.extraModprobeConfig = '' [...] ``` -On NixOS, run `sudo nixos-rebuild switch` and then reboot. +在 NixOS 上, 运行 `sudo nixos-rebuild switch` 然后重启。 -### Create a video device +### 创建一个视频设备 -Assuming your computer currently has no `/dev/video` device, you can create one on demand thanks to the `v4l2loopback`. +假设你的计算机当前没有 `/dev/video` 设备,你可以借助 `v4l2loopback` 在需要时创建一个。 -Run this command to send data from `gphoto2` to `ffmpeg`, using a device such as `/dev/video0` device: +运行以下命令,将 `gphoto2` 中的数据发送到 `ffmpeg`,使用设备如 `/dev/video0` 设备: ``` $ gphoto2 --stdout --capture-movie |  ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /dev/video0 ``` -You get output like this: +你得到的输出是这样的: ``` ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers @@ -135,7 +141,7 @@ Output #0, video4linux2,v4l2, to '/dev/video0':       encoder         : Lavc58.134.100 rawvideoframe=  289 fps= 23 q=-0.0 size=N/A time=00:00:11.56 bitrate=N/A speed=0.907x ``` -To see the video feed from your webcam, use `mpv`: +要查看来自网络摄像头的视频,请使用 `mpv`。 ``` $ mpv av://v4l2:/dev/video0 --profile=low-latency --untimed @@ -143,9 +149,9 @@ $ mpv av://v4l2:/dev/video0 --profile=low-latency --untimed ![Streaming a live feed from the webcam][2] -### Start your webcam automatically +### 自动启动你的网络摄像头 -It's a bit annoying to execute a command every time you want to use your webcam. Luckily, you can run this command automatically at startup. I implement it as a `systemd` service: +每次想使用网络摄像头时都需要执行一次命令有点麻烦。幸运的是,你可以在启动时自动运行此命令。我将其实现为一个 `systemd` 服务: ``` # configuration.nix @@ -162,31 +168,31 @@ wantedBy = [ "multi-user.target" ]; ... ``` -On NixOS, run `sudo nixos-rebuild switch` and then reboot your computer. Your webcam is on and active. +在 NixOS 上,运行 `sudo nixos-rebuild switch`,然后重新启动你的计算机。你的网络摄像头已经开启并处于活动状态。 -To check for any problems, you can use `systemctl status webcam`. This tells you the last time the service was run and provides a log of its previous output. It's useful for debugging. +要检查是否存在任何问题,可以使用 `systemctl status webcam` 命令。它会告诉你服务最后一次运行的时间,并提供其以前输出的日志。这对于调试非常有用。 -### Iterating to make it better +### 迭代以使其变得更好 -It's tempting to stop here. However, considering the current global crises, it may be pertinent to wonder whether it's necessary to have a webcam on all the time. It strikes me as sub-optimal for two reasons: +止步于此也许很诱人。但是,考虑到当前的全球危机,我们可能需要思考是否有必要一直开着网络摄像头。这让我感到不太理想,原因如下: -- It's a waste of electricity. -- There are privacy concerns associated with this kind of thing. +- 这浪费电 +- 这类事情涉及隐私问题。 -My camera has a lens cap, so to be honest, the second point doesn't really bother me. I can always put the lens cap on when I'm not using the webcam. However, leaving a big power-hungry DSLR camera on all day (not to mention the CPU overhead required for decoding the video) isn't doing anything for my electricity bill. +我的摄像头有一个镜头盖,所以说实话,第二个原因并不真的让我感到困扰。当我不使用网络摄像头时,我总是可以把镜头盖上。然而,让一个耗电量大的单反相机整天开着(更不用说需要解码视频所需的 CPU 开销),对我的电费并没有任何好处。 -The ideal scenario: +理想情况: -- I leave my camera plugged in to my computer all the time but switched off. -- When I want to use the webcam, I switch on the camera with its power button. -- My computer detects the camera and starts the systemd service. -- After finishing with the webcam, I switch it off again. +- 我一直把相机插在电脑上,但它关机了。 +- 当我想使用网络摄像头时,我按下相机的电源按钮将其打开。 +- 我的计算机会检测到相机并启动 systemd 服务。 +- 使用网络摄像头完成后,我再次将其关闭 -To achieve this, you need to use a custom [udev rule][3]. +为了实现这一点,你需要使用一个自定义的 udev 规则。 -A udev rule tells your computer to perform a certain task when it discovers that a device has become available. This could be an external hard drive or even a non-USB device. In this case, you need it to [recognize the camera through its USB connection][4]. +一个 udev 规则告诉你的计算机,当它发现某个设备已经可用时执行某个任务。这可以是外部硬盘甚至是非 USB 设备。在这种情况下,你需要通过其 USB 连接识别摄像头。 -First, specify what command to run when the udev rule is triggered. You can do that as a shell script (`systemctl restart webcam` should work). I run NixOS, so I just create a derivation (a Nix package) that restarts the systemd service: +首先,指定 udev 规则被触发时要运行的命令。你可以将其作为一个 shell 脚本来完成(`systemctl restart webcam` 应该可以工作)。我运行的是 NixOS,所以我只需要创建一个派生包(一个 Nix 包),它会重新启动 systemd 服务: ``` # start-webcam.nix @@ -198,20 +204,20 @@ writeShellScriptBin "start-webcam" ''   # If myfile.txt gets created then we know the udev rule has triggered properly'' ``` -Next, actually define the udev rule. Find the device and vendor ID of the camera. Do this by using the `lsusb` command. That command is likely already installed on your distribution, but I don't use it often, so I just install it as needed using `nix-shell`: +接下来,实际定义 udev 规则。查找摄像头的设备和厂商 ID。使用 `lsusb` 命令可以完成此操作。该命令可能已经安装在你的发行版上,但我不经常使用它,因此我只需要根据需要使用 `nix-shell` 安装它: ``` $ nix-shell -p usbutils ``` -Whether you already have it on your computer or you've just installed it, run `lsusb`: +无论您的计算机上已经安装了它,还是刚刚安装,请运行 “lsusb” : ``` $ lsusb Bus 002 Device 008: ID 04a9:317b Canon, Inc. Canon Digital Camera[...] ``` -In this output, the vendor ID is 04a9 and the device ID is 317b. That's enough to create the udev rule: +在此输出中,厂商 ID 为 04a9,设备 ID 为 317b。这已足以创建 udev 规则: ``` ACTION=="add", SUBSYSTEM=="usb", @@ -220,7 +226,7 @@ ATTR{idProduct}=="317b", RUN+="/usr/local/bin/start-webcam.sh" ``` -Alternatively, if you're using NixOS: +或者,如果您使用的是 NixOS : ``` # configuration.nix[...]let @@ -233,11 +239,11 @@ services.udev.extraRules = ''   RUN+="${startWebcam}/bin/start-webcam"'';[...] ``` -Finally, remove the **wantedBy = ["multi-user.target"];** line in your `start-webcam` systemd service. (If you leave it, then the service starts automatically when you next reboot, whether the camera is switched on or not.) +最后,在你的 `start-webcam` systemd 服务中删除 **wantedBy = ["multi-user.target"];** 这一行。(如果保留它,则无论相机是否开启,该服务都会在下次重启时自动启动。) -### Reuse old technology +### 重复使用旧技术 -I hope this article has made you think twice before chucking some of your old tech. Linux can breathe life back into technology, whether it's your [computer][5] or something simple like a digital camera or some other peripheral. +我希望这篇文章能让你在放弃一些旧技术之前三思而后行。Linux可以为技术注入活力,无论是你的电脑还是数码相机或其他外围设备等简单的东西。 -------------------------------------------------------------------------------- @@ -245,16 +251,21 @@ via: https://opensource.com/article/22/12/old-camera-webcam-linux 作者:[Tom Oliver][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Pabloxllwe](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/tomoliver -[b]: https://github.com/lkxed -[1]: https://opensource.com/article/20/7/gphoto2-linux -[2]: https://opensource.com/sites/default/files/2022-12/streaming-webcam.png -[3]: https://opensource.com/article/18/11/udev -[4]: https://opensource.com/article/22/1/cameras-usb-ports-obs -[5]: https://opensource.com/article/22/4/how-linux-saves-earth +[b]: https://github.com/lkxed + +[1]: https://opensource.com/article/20/7/gphoto2-linux + +[2]: https://opensource.com/sites/default/files/2022-12/streaming-webcam.png + +[3]: https://opensource.com/article/18/11/udev + +[4]: https://opensource.com/article/22/1/cameras-usb-ports-obs + +[5]: https://opensource.com/article/22/4/how-linux-saves-earth From 52f75830d18f402088f49decb0d6f5a5a418c5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=9B?= Date: Tue, 21 Mar 2023 18:37:20 +0800 Subject: [PATCH 143/318] =?UTF-8?q?Update=20and=20rename=20sources/tech/20?= =?UTF-8?q?221219.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20How=20I=20use?= =?UTF-8?q?=20my=20old=20camera=20as=20a=20webcam=20with=20Linux.md=20to?= =?UTF-8?q?=20translated/tech/20221219.1=20=E2=AD=90=EF=B8=8F=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=20How=20I=20use=20my=20old=20camera=20as=20a=20webcam?= =?UTF-8?q?=20with=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改后提交 --- ... ⭐️⭐️ How I use my old camera as a webcam with Linux.md | 7 ------- 1 file changed, 7 deletions(-) rename {sources => translated}/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md (99%) diff --git a/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md b/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md similarity index 99% rename from sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md rename to translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md index 67c0179fa1..313a16cb4d 100644 --- a/sources/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md +++ b/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md @@ -1,17 +1,10 @@ [#]: subject: "How I use my old camera as a webcam with Linux" - [#]: via: "https://opensource.com/article/22/12/old-camera-webcam-linux" - [#]: author: "Tom Oliver https://opensource.com/users/tomoliver" - [#]: collector: "lkxed" - [#]: translator: "Pabloxllwe" - [#]: reviewer: " " - [#]: publisher: " " - [#]: url: " " # 如何在 Linux 中使用旧相机作为网络摄像头 From 547b0c137fd9a376d7bd5f111617d7826023cb9c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Mar 2023 23:38:51 +0800 Subject: [PATCH 144/318] R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Pabloxllwe 恭喜您,完成了第一篇翻译贡献!翻译的不错。 --- ... How I use my old camera as a webcam with Linux.md | 75 ++++++++++--------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md b/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md index 313a16cb4d..7adfe752e5 100644 --- a/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md +++ b/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md @@ -3,23 +3,28 @@ [#]: author: "Tom Oliver https://opensource.com/users/tomoliver" [#]: collector: "lkxed" [#]: translator: "Pabloxllwe" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " -# 如何在 Linux 中使用旧相机作为网络摄像头 +如何在 Linux 中使用旧相机作为网络摄像头 +====== -今年,在我基本上放弃 MacBook 转而使用 NixOS 机器之后,我开始收到要求在与人进行视频通话时“打开摄像头”的请求。这是一个问题,因为我没有网络摄像头。我考虑购买一个,但后来我意识到我有一台完好无损的2008年产的佳能EOS Rebel XS数码单反相机放在书架上。这台相机有一个 mini-USB 接口,所以我自然而然地思考:一台数码单反相机、一个 mini-USB 接口和一台台式电脑意味着我能拥有一个网络摄像头吗? +![][0] -只有一个问题。我的佳能 EOS Rebel XS 不能录制视频。它可以拍摄一些漂亮的照片,但就这样了。所以这就是它所有的功能了。 +> 我用 gphoto2 给我的旧单反相机带来了新的生命,把它变成了 Linux 电脑的网络摄像头。 + +今年,在我基本上放弃了 MacBook,转而使用 NixOS 机器之后,我开始在与人进行视频通话时被要求“打开摄像头”。这是一个问题,因为我没有网络摄像头。我考虑购买一个,但后来我意识到我有一台完好无损的 2008 年产的佳能 EOS Rebel XS 数码单反相机放在书架上。这台相机有一个 mini-USB 接口,所以我自然而然地思考:一台数码单反相机、一个 mini-USB 接口和一台台式电脑,是否意味着我能拥有一个网络摄像头? + +只有一个问题。我的佳能 EOS Rebel XS 不能录制视频。它可以拍摄一些漂亮的照片,仅此而已。所以这结束了? 还是有别的办法? -有一个叫做 [gphoto2](http://gphoto.org/) 的惊人的开源软件。一旦安装,它允许您从计算机控制各种受支持的相机,并拍摄照片和视频。 +恰好有一个叫做 [gphoto2](http://gphoto.org/) 的神奇的开源软件。一旦安装,它允许你从计算机控制各种支持的相机,并拍摄照片和视频。 -### 支持的摄像头 +### 支持的相机 -首先,了解您的设备是否得到支持 +首先,了解你的设备是否得到支持: ``` $ gphoto2 --list-cameras @@ -33,29 +38,29 @@ $ gphoto2 --list-cameras $ gphoto2 --capture-image-and-download ``` -快门会被触发,图像会保存到您当前的工作目录中。 +快门触发,图像会保存到你当前的工作目录中。 ### 录制视频 -我意识到了这里的潜力,所以尽管我的相机没有视频功能,我还是决定尝试`gphoto2 --capture-movie`命令。不知怎么的,尽管我的相机不支持视频功能,gphoto2 仍然能够生成一个 MJPEG 文件! +我意识到了这里的潜力,所以尽管我的相机没有视频功能,我还是决定尝试 `gphoto2 --capture-movie` 命令。不知怎么,尽管我的相机不支持视频功能,`gphoto2` 仍然能够生成一个 MJPEG 文件! -在我的相机上,我需要将其置于“实时预览”模式下,然后 gphoto2 才能录制视频。这包括将相机设置为纵向模式,然后按下 Set 按钮,使取景器关闭,相机屏幕显示图像。不幸的是,这还不足以将其用作网络摄像头。它仍然需要分配一个视频设备,例如`/dev/video0`。 +在我的相机上,我需要将其置于“实时预览”模式下,然后 `gphoto2` 才能录制视频。这包括将相机设置为纵向模式,然后按下 “设置Set” 按钮,使取景器关闭,相机屏幕显示图像。不幸的是,这还不足以将其用作网络摄像头。它仍然需要分配一个视频设备,例如 `/dev/video0`。 ### 安装 ffmpeg 和 v4l2loopback -毫不奇怪,有一个开源的解决方案来解决这个问题。首先,使用您的包管理器安装`gphoto2`、`ffmpeg`和`mpv`。例如,在 Fedora 、CentOS 、Mageia 和类似的 Linux 发行版上: +毫不奇怪,有一个开源的解决方案来解决这个问题。首先,使用你的包管理器安装 `gphoto2`、`ffmpeg` 和 `mpv`。例如,在 Fedora 、CentOS 、Mageia 和类似的 Linux 发行版上: ``` $ sudo dnf install gphoto2 ffmpeg mpv ``` -在 Debian , Linux Mint 及其类似发行版: +在 Debian、Linux Mint 及其类似发行版: ``` $ sudo apt install gphoto2 ffmpeg mpv ``` -我使用的是 NixOS ,这是我的配置文件: +我使用的是 NixOS,这是我的配置文件: ``` # configuration.nix @@ -65,9 +70,10 @@ environment.systemPackages = with pkgs; [   gphoto2   mpv ... +] ``` -创建虚拟视频设备需要使用 `v4l2loopback` Linux 内核模块。在撰写本文时,该功能未包含在主线内核中,因此您需要自己下载和编译它: +创建虚拟视频设备需要使用 `v4l2loopback` Linux 内核模块。在撰写本文时,该功能未包含在主线内核中,因此你需要自己下载和编译它: ``` $ git clone https://github.com/umlaeute/v4l2loopback @@ -77,7 +83,7 @@ $ sudo make install $ sudo depmod -a ``` -如果你像我一样使用 NixOS ,你可以在 “configuration.nix” 中添加额外的模块包: +如果你像我一样使用 NixOS ,你可以在 `configuration.nix` 中添加额外的模块包: ``` [...] @@ -92,7 +98,7 @@ boot.extraModprobeConfig = '' [...] ``` -在 NixOS 上, 运行 `sudo nixos-rebuild switch` 然后重启。 +在 NixOS 上, 运行 `sudo nixos-rebuild switch`,然后重启。 ### 创建一个视频设备 @@ -105,7 +111,7 @@ $ gphoto2 --stdout --capture-movie |  ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /dev/video0 ``` -你得到的输出是这样的: +你得到的输出是这样的: ``` ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers @@ -134,7 +140,7 @@ Output #0, video4linux2,v4l2, to '/dev/video0':       encoder         : Lavc58.134.100 rawvideoframe=  289 fps= 23 q=-0.0 size=N/A time=00:00:11.56 bitrate=N/A speed=0.907x ``` -要查看来自网络摄像头的视频,请使用 `mpv`。 +要查看来自网络摄像头的视频,请使用 `mpv` 命令: ``` $ mpv av://v4l2:/dev/video0 --profile=low-latency --untimed @@ -169,23 +175,23 @@ wantedBy = [ "multi-user.target" ]; 止步于此也许很诱人。但是,考虑到当前的全球危机,我们可能需要思考是否有必要一直开着网络摄像头。这让我感到不太理想,原因如下: -- 这浪费电 +- 这浪费电。 - 这类事情涉及隐私问题。 我的摄像头有一个镜头盖,所以说实话,第二个原因并不真的让我感到困扰。当我不使用网络摄像头时,我总是可以把镜头盖上。然而,让一个耗电量大的单反相机整天开着(更不用说需要解码视频所需的 CPU 开销),对我的电费并没有任何好处。 -理想情况: +理想情况是: -- 我一直把相机插在电脑上,但它关机了。 +- 我一直把相机插在电脑上,但是关闭的。 - 当我想使用网络摄像头时,我按下相机的电源按钮将其打开。 - 我的计算机会检测到相机并启动 systemd 服务。 -- 使用网络摄像头完成后,我再次将其关闭 +- 使用网络摄像头完成后,我再次将其关闭。 为了实现这一点,你需要使用一个自定义的 udev 规则。 -一个 udev 规则告诉你的计算机,当它发现某个设备已经可用时执行某个任务。这可以是外部硬盘甚至是非 USB 设备。在这种情况下,你需要通过其 USB 连接识别摄像头。 +udev 规则可以告诉你的计算机,当它发现某个设备已经可用时执行某个任务。这可以是外部硬盘甚至是非 USB 设备。在这种情况下,你需要通过其 USB 连接识别相机。 -首先,指定 udev 规则被触发时要运行的命令。你可以将其作为一个 shell 脚本来完成(`systemctl restart webcam` 应该可以工作)。我运行的是 NixOS,所以我只需要创建一个派生包(一个 Nix 包),它会重新启动 systemd 服务: +首先,指定 udev 规则被触发时要运行的命令。你可以用一个 shell 脚本来完成(`systemctl restart webcam` 应该可以工作)。我运行的是 NixOS,所以我只需要创建一个派生包(一个 Nix 包),它会重新启动 systemd 服务: ``` # start-webcam.nix @@ -203,14 +209,14 @@ writeShellScriptBin "start-webcam" '' $ nix-shell -p usbutils ``` -无论您的计算机上已经安装了它,还是刚刚安装,请运行 “lsusb” : +无论你的计算机上已经安装了它,还是刚刚安装,请运行 `lsusb` : ``` $ lsusb Bus 002 Device 008: ID 04a9:317b Canon, Inc. Canon Digital Camera[...] ``` -在此输出中,厂商 ID 为 04a9,设备 ID 为 317b。这已足以创建 udev 规则: +在此输出中,厂商 ID 为 `04a9`,设备 ID 为 `317b`。这已足以创建 udev 规则: ``` ACTION=="add", SUBSYSTEM=="usb", @@ -219,7 +225,7 @@ ATTR{idProduct}=="317b", RUN+="/usr/local/bin/start-webcam.sh" ``` -或者,如果您使用的是 NixOS : +或者,如果你使用的是 NixOS: ``` # configuration.nix[...]let @@ -232,11 +238,11 @@ services.udev.extraRules = ''   RUN+="${startWebcam}/bin/start-webcam"'';[...] ``` -最后,在你的 `start-webcam` systemd 服务中删除 **wantedBy = ["multi-user.target"];** 这一行。(如果保留它,则无论相机是否开启,该服务都会在下次重启时自动启动。) +最后,在你的 `start-webcam` systemd 服务中删除 `wantedBy = ["multi-user.target"];` 这一行。(如果保留它,则无论相机是否开启,该服务都会在下次重启时自动启动。) ### 重复使用旧技术 -我希望这篇文章能让你在放弃一些旧技术之前三思而后行。Linux可以为技术注入活力,无论是你的电脑还是数码相机或其他外围设备等简单的东西。 +我希望这篇文章能让你在放弃一些旧技术之前三思而后行。Linux 可以为技术注入活力,无论是你的电脑还是数码相机或其他外围设备等简单的东西。 -------------------------------------------------------------------------------- @@ -244,21 +250,16 @@ via: https://opensource.com/article/22/12/old-camera-webcam-linux 作者:[Tom Oliver][a] 选题:[lkxed][b] -译者:[Pabloxllwe](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[Pabloxllwe](https://github.com/Pabloxllwe) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/tomoliver - [b]: https://github.com/lkxed - [1]: https://opensource.com/article/20/7/gphoto2-linux - [2]: https://opensource.com/sites/default/files/2022-12/streaming-webcam.png - [3]: https://opensource.com/article/18/11/udev - [4]: https://opensource.com/article/22/1/cameras-usb-ports-obs - [5]: https://opensource.com/article/22/4/how-linux-saves-earth +[0]: https://img.linux.net.cn/data/attachment/album/202303/21/233633z1qxdoq1shrx1xmc.jpg \ No newline at end of file From 9b42f604c79d32d02e399c4ab6de7b67fb97bbea Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Mar 2023 23:39:43 +0800 Subject: [PATCH 145/318] P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Pabloxllwe 本文首发地址:https://linux.cn/article-15648-1.html 您的 LCTT 专页:https://linux.cn/lctt/Pabloxllwe --- ...9.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md (99%) diff --git a/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md b/published/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md similarity index 99% rename from translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md rename to published/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md index 7adfe752e5..fbeca0311b 100644 --- a/translated/tech/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md +++ b/published/20221219.1 ⭐️⭐️ How I use my old camera as a webcam with Linux.md @@ -4,8 +4,8 @@ [#]: collector: "lkxed" [#]: translator: "Pabloxllwe" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15648-1.html" 如何在 Linux 中使用旧相机作为网络摄像头 ====== From ffec699befa9cb70705014c463aed3dce113a975 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Mar 2023 07:53:34 +0800 Subject: [PATCH 146/318] RP @geekpi https://linux.cn/article-15649-1.html --- ...ps database administrator A day in the life.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) rename {translated/tech => published}/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md (79%) diff --git a/translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md b/published/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md similarity index 79% rename from translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md rename to published/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md index 62a35800dc..5a4d65f1f1 100644 --- a/translated/tech/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md +++ b/published/20230309.0 ⭐️ Postgres DevOps database administrator A day in the life.md @@ -3,20 +3,24 @@ [#]: author: "Doug Ortiz https://opensource.com/users/dougortiz" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15649-1.html" -Postgres DevOps 数据库管理员:生活中的一天 +Postgres DevOps 数据库管理员的日常 ====== -Postgres DevOps DBA 在依赖 Postgres 作为主要数据库管理系统的现代 IT 组织中发挥着关键作用。Postgres DevOps DBA 的角色涉及许多职责、技能和任务。其中一些包括:管理数据库设计和架构、基础设施管理、确保高可用性、安全性以及执行日常维护任务(调整、备份和恢复以及监控)。 +![][0] + +> 数据库管理员(DBA)的职责是什么? + +在依赖 Postgres 作为主要数据库管理系统的现代 IT 组织中,Postgres DevOps DBA 发挥着关键作用。Postgres DevOps DBA 的角色涉及许多职责、技能和任务。其中一些包括:管理数据库设计和架构、基础设施管理、确保高可用性、安全性以及执行日常维护任务(调整、备份和恢复以及监控)。 本文总结了当今企业环境中 Postgres DevOps DBA 的常见职责和技能。 ### 数据库设计和架构 -Postgres DevOps DBA 的两个主要职责是数据库设计和架构。该角色必须对应用的数据存储要求和涉及的业务逻辑有更深入的了解。这些知识包括设计和创建数据库模式和表。它还意味着配置索引和其他数据库对象以优化查询性能,并选择正确的 Postgres 版本来使用。该角色必须确保数据库的设计具有可扩展性和可维护性,同时考虑到未来的增长和数据保留需求。 +Postgres DevOps DBA 的两个主要职责是数据库设计和架构。该角色必须对应用的数据存储要求和涉及的业务逻辑有更深入的了解。这些知识包括设计和创建数据库模式和表。它还意味着配置索引和其他数据库对象以优化查询性能,并选择使用正确的 Postgres 版本。该角色必须确保数据库的设计具有可扩展性和可维护性,同时考虑到未来的增长和数据保留需求。 ### 性能调优 @@ -44,7 +48,7 @@ Postgres DevOps DBA 的两个主要职责是数据库设计和架构。该角色 ### 合作 -除了这些技术职责外,PostgreSQL DevOps DBA 还必须与其他 IT 团队(例如开发人员、运营人员和安全人员)协作,以将数据库集成到更大的 IT 生态系统中。DBA 还必须记录他们的工作,并及时了解 Postgres 和 [DevOps][4] 的最新趋势和最佳实践。这涉及与利益相关者合作以收集需求、确定优先级并使数据库与组织的更广泛目标保持一致。 +除了这些技术职责外,PostgreSQL DevOps DBA 还必须与其他 IT 团队(例如开发人员、运维人员和安全人员)协作,以将数据库集成到更大的 IT 生态系统中。DBA 还必须记录他们的工作,并及时了解 Postgres 和 [DevOps][4] 的最新趋势和最佳实践。这涉及与利益相关者合作以收集需求、确定优先级并使数据库与组织的更广泛目标保持一致。 ### 总结 @@ -65,4 +69,5 @@ via: https://opensource.com/article/23/3/postgres-devops-dba [b]: https://github.com/lkxed/ [2]: https://opensource.com/article/19/2/quickstart-guide-ansible [3]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=7013a000002qLH8AAM -[4]: https://opensource.com/article/20/12/remote-devops \ No newline at end of file +[4]: https://opensource.com/article/20/12/remote-devops +[0]: https://img.linux.net.cn/data/attachment/album/202303/22/075232pgphrt3nuhp1nu7r.jpg \ No newline at end of file From 167388217c4079ea312f561532c871b482326963 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 22 Mar 2023 08:38:41 +0800 Subject: [PATCH 147/318] translated --- ... Variables in Python Concepts with Examples.md | 166 ------------------ ... Variables in Python Concepts with Examples.md | 166 ++++++++++++++++++ 2 files changed, 166 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md create mode 100644 translated/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md diff --git a/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md b/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md deleted file mode 100644 index b9f57b2c5e..0000000000 --- a/sources/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md +++ /dev/null @@ -1,166 +0,0 @@ -[#]: subject: "Variables in Python: Concepts with Examples" -[#]: via: "https://www.debugpoint.com/python-variables/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Variables in Python: Concepts with Examples -====== - -**This tutorial explains the concept of variables in Python, their types, and how to use them with examples in real-world projects.** - -In Python, a variable is a reserved memory location that stores a value. - -They are names that can be assigned a value and used to reference it throughout your code. Using a variable makes a value accessible & gives values a context/meaning concerning your code. - -Before you start, I hope you have Python installed and set up a basic editor. If not, do refer to my below guides: - -- [How to Install Python 3.11 on Ubuntu/Linux][1] -- [How to install Python on Windows][2] -- [How to set up the IDLE editor for Python][3] - -### Variable rules - -- Variables are case-sensitive. -- Variable names can only contain uppercase and lowercase letters (A–Z, a–z), digits (0–9), and underscores (_). -- They can not start with digits. -- Python variables are [dynamically typed][4]. -- Python supports Unicode variables (e.g. decorated letters like é and ü, and even Chinese, Japanese, and Arabic symbols). -- As per [PEP 8 standard][5], variable names can be only lowercase, and words can be separated by underscores (e.g. total_price). - -### Python Variables: Examples - -To create a variable in Python, we need to assign a value to it using the assignment operator (=). For example, the following line of code creates a variable named “x” and assigns it the value of 10: - -``` -x = 10 -``` - -In Python, variables are dynamically typed, which means that the interpreter can determine the data type of a variable based on the value it is assigned. Python supports various types of variables, including integers, floats, strings, booleans, and complex numbers. - -``` -# Integer Variable -age = 20 - -# Float Variable -price = 4.99 - -# String Variable -name = "John Doe" - -# Boolean Variable -is_active = True - -# Complex Variable -z = 2 + 3j -``` - -Variables are useful in programming because they allow us to store and manipulate data. For example, we can use variables to perform mathematical operations, concatenate strings, and make decisions based on the value of a boolean variable. - -``` -# Mathematical Operations -x = 5 -y = 10 -z = x + y -print(z) # Output: 15 - -# String Concatenation -first_name = "John" -last_name = "Doe" -full_name = first_name + " " + last_name -print(full_name) # Output: John Doe -``` - -![A simple demonstration of variables in Python][6] - -Variables can also be used in real-world projects to store and manipulate data. For example, in a web application, we can use variables to [store user input][7], database queries, and output data to the user. - -``` -# User Input -name = input("What is your name? ") -print("Hello, " + name + "!") # Output: Hello, John! - -# Database Queries -import sqlite3 - -conn = sqlite3.connect("example.db") -cursor = conn.cursor() - -cursor.execute("SELECT * FROM users WHERE id = ?", (1,)) -user = cursor.fetchone() - -print(user) # Output: (1, 'John Doe', 'johndoe@example.com') - -# Output Data to User -balance = 100.00 -print("Your current balance is ₹" + str(balance)) # Output: Your current balance is ₹100.0 -``` - -### Common Errors while using variables - -There are a few common errors you can face while dealing with variables. Here are some of them. - -- `NameError`: This error occurs when you try to access a variable that has not been defined. For example, if you try to print the value of a variable that has not been assigned a value yet, you will get a NameError. The following code gives a NameError because the variable “Full_name” is not defined. - -``` -# NameError demonstration -first_name = "John" -last_name = "Doe" -full_name = first_name + " " + last_name -print(Full_name) # NameError -``` - -![NameError example][8] - -- `TypeError`: This error occurs when you try to operate on a variable of the wrong data type. For example, if you try to concatenate a string and an integer, you will get a TypeError. The below snippet of code gives TypeError. - -``` -# TypeError demonstration -first_name = "John" -age = 10 -print(first_name + age) -``` - -![TypeError example in Python][9] - -- `ValueError`: This error occurs when you try to convert a variable to a different data type, but the conversion is impossible. For example, if you try to convert a string that contains letters to an integer, you will get a ValueError. - -``` -# ValueError demonstration -first_name = "John" -age = 10 -print(int(first_name)) -``` - -![ValueError in Python][10] - -### Wrapping Up - -Understanding variables is essential for any Python developer. Variables allow us to store and manipulate data, perform mathematical operations, concatenate strings, etc. I hope this guide clarifies the concept if you are a beginner in Python programming. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/python-variables/ - -作者:[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/install-python-3-11-ubuntu/ -[2]: https://www.debugpoint.com/install-python-windows/ -[3]: https://www.debugpoint.com/install-idle-ubuntu-linux/ -[4]: https://en.wikipedia.org/wiki/Type_system -[5]: https://peps.python.org/pep-0008/ -[6]: https://www.debugpoint.com/wp-content/uploads/2023/03/A-simple-demonstration-of-variables-in-Python.jpg -[7]: https://www.debugpoint.com/input-function-python/ -[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/NameError-example.jpg -[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/TypeError-example-in-Python.jpg -[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/ValueError-in-Python.jpg \ No newline at end of file diff --git a/translated/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md b/translated/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md new file mode 100644 index 0000000000..f545d58933 --- /dev/null +++ b/translated/tech/20230317.0 ⭐️ Variables in Python Concepts with Examples.md @@ -0,0 +1,166 @@ +[#]: subject: "Variables in Python: Concepts with Examples" +[#]: via: "https://www.debugpoint.com/python-variables/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Python 中的变量:概念与示例 +====== + +**本教程解释了 Python 中变量的概念、它们的类型,以及如何在实际项目中使用的示例。** + +在 Python 中,变量是存储值的保留内存位置。 + +它们是可以分配一个值并在整个代码中引用它的名称。使用变量使值可访问并为值提供与你的代码相关的上下文/含义。 + +在开始之前,我希望你已经安装了 Python 并设置了一个基本的编辑器。如果没有,请参考我的以下指南: + +- [如何在 Ubuntu/Linux 上安装 Python 3.11][1] +- [如何在 Windows 上安装 Python][2] +- [如何为 Python 设置 IDLE 编辑器][3] + +### 变量规则 + +- 变量区分大小写。 +- 变量名称只能包含大写和小写字母(A–Z、a–z)、数字 (0–9) 和下划线 (_)。 +- 他们不能以数字开头。 +- Python 变量是[动态类型][4]。 +- Python 支持 Unicode 变量(例如 é 和 ü 等装饰字母,甚至中文、日文和阿拉伯符号)。 +- 根据 [PEP 8 标准][5],变量名只能是小写,单词可以用下划线分隔(例如 total_price)。 + +### Python 变量:示例 + +要在 Python 中创建一个变量,我们需要使用赋值运算符 (=) 为其赋值。例如,下面的代码行创建了一个名为 “x” 的变量并为其赋值 10: + +``` +x = 10 +``` + +在 Python 中,变量是动态类型的,这意味着解释器可以根据分配给它的值来确定变量的数据类型。Python 支持各种类型的变量,包括整数、浮点数、字符串、布尔值和复数。 + +``` +# 整型变量 +age = 20 + +# 浮点变量 +price = 4.99 + +# 字符串变量 +name = "John Doe" + +# 布尔变量 +is_active = True + +# 复数变量 +z = 2 + 3j +``` + +变量在编程中很有用,因为它们允许我们存储和操作数据。例如,我们可以使用变量来执行数学运算、连接字符串以及根据布尔变量的值做出决策。 + +``` +# 数学运算 +x = 5 +y = 10 +z = x + y +print(z) # Output: 15 + +# 字符串连接 +first_name = "John" +last_name = "Doe" +full_name = first_name + " " + last_name +print(full_name) # Output: John Doe +``` + +![A simple demonstration of variables in Python][6] + +变量也可以在现实世界的项目中用于存储和操作数据。例如,在 Web 应用中,我们可以使用变量来[存储用户输入][7]、数据库查询以及向用户输出数据。 + +``` +# 用户输入 +name = input("What is your name? ") +print("Hello, " + name + "!") # Output: Hello, John! + +# 数据库查询 +import sqlite3 + +conn = sqlite3.connect("example.db") +cursor = conn.cursor() + +cursor.execute("SELECT * FROM users WHERE id = ?", (1,)) +user = cursor.fetchone() + +print(user) # Output: (1, 'John Doe', 'johndoe@example.com') + +# 输出数据给用户 +balance = 100.00 +print("Your current balance is ₹" + str(balance)) # Output: Your current balance is ₹100.0 +``` + +### 使用变量时的常见错误 + +在处理变量时,你可能会遇到一些常见错误。这里是其中的一些。 + +- `NameError`:当你尝试访问尚未定义的变量时会发生此错误。例如,如果你尝试打印一个尚未赋值的变量的值,你将得到一个 NameError。以下代码给出了 NameError,因为变量 “Full_name” 未定义。 + +``` +# NameError 演示 +first_name = "John" +last_name = "Doe" +full_name = first_name + " " + last_name +print(Full_name) # NameError +``` + +![NameError example][8] + +- `TypeError`:当你尝试对错误数据类型的变量进行操作时会发生此错误。例如,如果你尝试连接一个字符串和一个整数,你将得到 TypeError。下面的代码片段给出了 TypeError。 + +``` +# TypeError 演示 +first_name = "John" +age = 10 +print(first_name + age) +``` + +![TypeError example in Python][9] + +- `ValueError`:当你尝试将变量转换为不同的数据类型但无法进行转换时会发生此错误。例如,如果你尝试将包含字母的字符串转换为整数,你将得到 ValueError。 + +``` +# ValueError 演示 +first_name = "John" +age = 10 +print(int(first_name)) +``` + +![ValueError in Python][10] + +### 总结 + +了解变量对于任何 Python 开发人员来说都是必不可少的。变量允许我们存储和操作数据、执行数学运算、连接字符串等。如果你是 Python 编程的初学者,我希望本指南能够阐明这个概念。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/python-variables/ + +作者:[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/install-python-3-11-ubuntu/ +[2]: https://www.debugpoint.com/install-python-windows/ +[3]: https://www.debugpoint.com/install-idle-ubuntu-linux/ +[4]: https://en.wikipedia.org/wiki/Type_system +[5]: https://peps.python.org/pep-0008/ +[6]: https://www.debugpoint.com/wp-content/uploads/2023/03/A-simple-demonstration-of-variables-in-Python.jpg +[7]: https://www.debugpoint.com/input-function-python/ +[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/NameError-example.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/TypeError-example-in-Python.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/ValueError-in-Python.jpg \ No newline at end of file From f63fb68a5969848903864dcebf32eaca767589f1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 22 Mar 2023 08:47:38 +0800 Subject: [PATCH 148/318] translating --- ...0230315.1 ⭐️ How to know if You are Behind a Proxy Server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md b/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md index dfa09d8384..8b6121ea60 100644 --- a/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md +++ b/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/check-proxy-server/" [#]: author: "Sreenath https://itsfoss.com/author/sreenath/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From c6a8058d1aab8b45a893bc50626326d23baf7fa1 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Wed, 22 Mar 2023 16:46:09 +0800 Subject: [PATCH 149/318] Update and rename sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md to translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Translated by XiaotingHuang22. 辛苦审核啦! --- ...ut computers with this Raspberry Pi kit.md | 148 ------------------ ...ut computers with this Raspberry Pi kit.md | 148 ++++++++++++++++++ 2 files changed, 148 insertions(+), 148 deletions(-) delete mode 100644 sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md create mode 100644 translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md diff --git a/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md b/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md deleted file mode 100644 index 1e81c825dc..0000000000 --- a/sources/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md +++ /dev/null @@ -1,148 +0,0 @@ -[#]: subject: "Learn everything about computers with this Raspberry Pi kit" -[#]: via: "https://opensource.com/article/21/9/raspberry-pi-crowpi2" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Learn everything about computers with this Raspberry Pi kit -====== -The CrowPi is an amazing Raspberry Pi project system housed in a -laptop-like body. -![Teacher or learner?][1] - -I like history, and I like computers, so I enjoy hearing stories about computing before computers were an everyday household appliance, much less a personal accessory. [One tale I hear often][2] is about how the computers of long ago (in computer years, anyway) were pleasantly basic. They were so basic, in fact, that it was relatively trivial for a curious user to figure out how to program one. Looking at modern computers, with object-oriented programming languages, complex GUI frameworks, network APIs, containers, and more, there's genuine concern that the tools of the computing trade have become essentially inaccessible to anyone without specialized training. - -From the day the Raspberry Pi was released in 2012, it has always been intended as an educational platform. Several third-party vendors support the Pi with add-ons and training kits to help learners of all ages explore programming, physical computing, and open source. However, until recently, it's largely been up to the user to figure out how all the pieces on the market fit together. And then I got a CrowPi. - -![CrowPi more than a laptop][3] - -The CrowPi is not a laptop. -(Seth Kenlon, [CC BY-SA 4.0][4]) - -### Introducing the CrowPi2 - -Crows are surprisingly intelligent birds. They recognize and remember faces, mimic sounds they've heard, solve complex puzzles, and even use tools to accomplish a task. It's fitting that the CrowPi uses the crow as its logo and namesake because this device is packed with opportunities for exploration, experimentation, education, and, best of all, fun. - -The design itself is clever: It looks like a laptop, but it's much more than that. When you lift the Bluetooth keyboard from the case, it reveals a hidden electronics workshop, complete with an LCD screen, 16 buttons, dials, RFID sensor, proximity sensor, breadboard, speakers, GPIO connections, a LED array, and much more. _And it's all programmable._ - -As its name implies, the unit itself is powered entirely by a Raspberry Pi, securely fastened within the underside of the case. - -![crowpi pi board][5] - -The CrowPi Pi board. -(Seth Kenlon, [CC BY-SA 4.0][4]) - -By default, you're meant to power the unit with a power adapter, and it ships with a wall adapter that you can plug into the case rather than powering the Pi directly. You can also use a battery supply plugged into an external micro-USB port. There's even a drawer built into the case so you can store your battery pack. When you do this, there's a USB cable popping out of the battery drawer and into the case power port, so there's no illusion that this is a "normal" laptop. However, with a device like this, that's pretty much the desired aesthetic! - -### First boot - -The CrowPi2 ships with Raspbian installed on a microSD card labeled **System**, although it includes a second microSD card loaded with [RetroPie][6], too. Being a responsible adult, I booted RetroPie first, naturally. - -RetroPie is always fun, and the CrowPi2 ships with two SNES-style game controllers to ensure you have the optimal retro gaming experience. - -Booting to the actual system is, amazingly, just as fun and arguably more so. The login manager is a custom project hub with quick links to sample coding projects, the Python and Arduino IDEs, Scratch, sample Python games, Minecraft, and more. You can also choose to exit the project hub and just use the desktop. - -![CrowPi hub][7] - -The CrowPi Hub. -(Seth Kenlon, [CC BY-SA 4.0][4]) - -The desktop is familiar to anyone used to the Raspberry Pi or Linux in general, but it's basic enough that it's easy to learn, too. There's an application menu in the top left, shortcut icons on the desktop, a system tray for network selection and volume control in the top right, and so on. - -![CrowPi Desktop][8] - -The CrowPi Desktop. -(Seth Kenlon, [CC BY-SA 4.0][4]) - -There's so much available on the CrowPi that it might be difficult to decide where to start. For me, there were four broad categories: Programming, physical electronics, Linux, and gaming. - -There's an instruction manual in the box, so you know what you need to connect (for instance, the keyboard is battery-powered, so it does need charging sometimes, and it and the mouse always require a USB dongle). It's a quick read, though, and just one of the many examples of how seriously the CrowPi team takes documentation. - -![CrowPi Docs][9] - -The CrowPi Docs. -(Seth Kenlon, [CC BY-SA 4.0][4]) - -### Programming - -If you're keen to learn how to code, there are many paths to success on the CrowPi. You should take the path that you find the most satisfying. - -#### 1\. Scratch - -[Scratch][10] is a simple visual coding application that lets you make games and interactive stories using code blocks that fit together like [Lego pieces][11]. It's the easiest way to begin coding, and I've seen kids as young as eight spend hours puzzling over the optimal algorithm for a game of their own design. Of course, it's not only great for kids! Adults can have a lot of fun with it, too. Not sure where to start? There's a 99-page booklet (printed on actual paper) in the box with Scratch lessons and projects for you to try. - -#### 2\. Java and Minecraft - -Minecraft is not open source (although there are [several open source projects][12] that reimplement it), but there's enough source available that it's often used to teach programming. Minecraft was written in Java, and the CrowPi ships with both [Minecraft Pi Edition][13] and the [BlueJ Java IDE][14] to make learning Java easier and more fun than ever. - -#### 3\. Python and PyGame - -There are several really fun games on the CrowPi that were written in Python and the [PyGame game engine][15]. You can play the games and then look at the source code to find out how the game works. The Geany, Thonny, and [Mu][16] editors are included on the CrowPi, so you can start programming in Python right away. As with Scratch, there's a booklet in the box with lessons so you can learn Python basics. - -### Electronics - -The physical electronics workshop concealed under the keyboard is essentially an array of Pi Hats. The whole thing is mapped out on a fold-out diagram in both English and Chinese so that you can identify all the components. There are plenty of sample projects to get you started. Here's a small list: - - * **Hello** prints "hello" on the LCD screen when you speak to the CrowPi. - * **Intrusion alarm** sounds an alarm using the proximity sensor. - * **Remote controller** enables you to use a remote control (yes, this too is included in the box) to trigger events on the CrowPi. - * **RGB Tetris** lets you play a game of Tetris on an LED display. - * **Voice recognition** demonstrates natural language processing. - * **Ultrasonic music** creates a rudimentary Theramin using distance sensors and a speaker. - - - -Those projects are just the beginning because you can build upon what exists. There's more to explore, of course. Patch cables, resistors, LEDs, and all sorts of components are included in the box so that you can learn all about the Pi's GPIO capabilities at your leisure. - -One problem: The location of the sample projects is a little difficult to find. It's easy to find the demos (they're on the CrowPi hub screen), but the location of the source code isn't immediately obvious. It turns out that most of the sample projects are in `/usr/share/code`, which you can reach either through the file manager or a terminal. - -![CrowPi Peripherals][17] - -The CrowPi Peripherals -(Seth Kenlon, [CC BY-SA 4.0][4]) - -### Linux - -The Raspberry Pi runs Linux. If you've been meaning to learn more about Linux, the CrowPi is a great platform for that, too. You can explore the desktop, the terminal, and nearly any Linux or open source application you can find. If you've been reading about open source for years and are ready to dive into an open source OS, this could be a platform for that (and much more, obviously). - -### Gaming - -The **RetroPie** SD card included in the box means you can reboot into a retro game console and play any number of old-school arcade games. It's not exactly a Steam Deck, but it's a fun and inspiring little gaming platform. Because it comes with not one but two game controllers, it's ideal for couch co-op. And best of all, you not only can play games on the CrowPi, but you can make your own games, too. - -### Screwdriver included - -I got to sit down with the CrowPi2 for about two weeks, and I've barely been able to get through all of the projects. There have been many nights when I've had to force myself to step away from it because even after I've tired of one project, I inevitably find something else to explore. To sum it up, I found one component in particular in the box, and I immediately knew that the CrowPi and I were well suited to one another: It was a small, humble screwdriver. There's no voiding of warranty stickers here. The CrowPi wants you to tinker, to take things apart, explore, and learn. This isn't a laptop or even just a Pi; this is a portable, low-powered, diverse, and open source learner's toolkit. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/raspberry-pi-crowpi2 - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[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/article/21/8/my-first-programming-language -[3]: https://opensource.com/sites/default/files/crowpi-not-laptop.jpeg (CrowPi more than a laptop) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/crowpi-pi.jpeg (crowpi pi board) -[6]: https://opensource.com/article/19/1/retropie -[7]: https://opensource.com/sites/default/files/crowpi-hub.png (CrowPi hub) -[8]: https://opensource.com/sites/default/files/crowpi-desktop.png (CrowPi desktop) -[9]: https://opensource.com/sites/default/files/crowpi-docs.jpeg (CrowPi docs) -[10]: https://opensource.com/article/20/9/scratch -[11]: https://opensource.com/article/20/6/open-source-virtual-lego -[12]: https://opensource.com/alternatives/minecraft -[13]: https://www.minecraft.net/en-us/edition/pi -[14]: https://opensource.com/article/20/7/ide-java#bluej -[15]: https://opensource.com/downloads/python-gaming-ebook -[16]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners -[17]: https://opensource.com/sites/default/files/crowpi-peripherals.jpeg (CrowPi peripherals) diff --git a/translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md b/translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md new file mode 100644 index 0000000000..819661f4dd --- /dev/null +++ b/translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md @@ -0,0 +1,148 @@ +[#]: subject: "Learn everything about computers with this Raspberry Pi kit" +[#]: via: "https://opensource.com/article/21/9/raspberry-pi-crowpi2" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Learn everything about computers with this Raspberry Pi kit 用树莓派了解关于计算机的一切 +====== +CrowPi 是一个超棒的树莓派项目系统,安装在一个笔记本电脑般的外壳里。 +![老师还是学习者?][1] + +我喜欢历史,也喜欢计算机,因此相比于计算机如何变成个人配件,我更喜欢听它在成为日常家用电器前的有关电脑运算的故事。 [我经常听到的一个故事][2] 是关于很久以前(反正在计算机时代算久远了)的计算机是如何的基础却又让人感到很舒服。事实上,它们基础到对于一个好奇的用户来说,弄清楚如何编程是相对简单的事情。看看现代计算机,它具有面向对象的编程语言、复杂的 GUI 框架、网络 API、容器等,但愈发令人担忧的是,对于那些没有接受过任何专门培训的人,计算行业的工具正变得越来越难懂,无法为任何未经专门培训的人所用。 + +从 Raspberry Pi 在 2012 年发布之日起,它就一直被定位为一个教育平台。 一些第三方供应商通过附加组件和培训套件支持 Pi,以帮助所有年龄段的学习者探索编程、物理计算和开源。 然而,直到最近,很大程度上还是要由用户来弄清楚市场上的所有部件如何组合在一起,直到我最近买了 CrowPi。 + +![CrowPi ——不只是一个笔记本电脑][3] + +CrowPi 不是一个笔记本电脑。 +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### 隆重介绍 CrowPi2 + +乌鸦是非常聪明的鸟。 他们识别并记住面孔,模仿听到的声音,解决复杂的谜题,甚至使用工具来完成任务。 CrowPi 使用乌鸦作为其徽标和同名词是恰当的,因为这个设备提供了无限探索、实验、教育还有最重要的,乐趣的机会。 + +设计本身很巧妙:它看起来像笔记本电脑,但远不止于此。 当你从外壳中取出蓝牙键盘时,它会显示一个隐藏的电子设备工坊,配有 LCD 屏幕、16 个按钮、刻度盘、RFID 传感器、接近传感器、线路板、扬声器、GPIO 连接、LED 阵列等等。 _而且都是可编程的。_ + +顾名思义,该装置本身完全由 Raspberry Pi 供电,牢固地固定在外壳底部。 + +![crowpi pi板[5] + +CrowPi 的 Pi板 +(Seth Kenlon, [CC BY-SA 4.0][4]) + +默认情况下,你应该用电源适配器为设备充电,包装附带一个壁式适配器,你可以将其插入外壳,而不是直接为 Pi 供电。 您还可以使用插入外部微型 USB 端口的电池电源。 电脑外壳内甚至还有一个抽屉,方便你存放电池。 存放电池时有一根 USB 线从电池抽屉中弹出并插入机箱电源端口,因此你不会产生这是一台“普通”笔记本电脑的错觉。 然而,这样一台设备能够有如此美观的设计已经很理想了! + +### 首次启动系统 + +CrowPi2 提供一张安装了 Raspbian 系统,卡上贴有 **System** 的标签,不过它同时还提供一张装载了 [RetroPie][6] 的 microSD 卡。 作为一个负责任的成年人(咳咳),我自然是先启动了 RetroPie。 + +RetroPie 总是很有趣,CrowPi2 附带两个 SNES 风格的游戏控制器,确保你能获得最佳的复古游戏体验。 + +令人赞叹不已的是,实际启动系统的过程同样有趣,甚至可以说更有趣。 它的登录管理器是一个自定义项目中心,快速链接到一些编程体验项目、Python 和 Arduino IDE、Scratch、 Python 体验游戏、Minecraft 等。 你也可以选择退出项目中心,只使用桌面。 + +![CrowPi 中心][7] + +The CrowPi 中心. +(Seth Kenlon, [CC BY-SA 4.0][4]) +对于习惯使用 Raspberry Pi 或 Linux 的人来说,CrowPi 桌面很熟悉,不过它也足够基础,所以很容易上手。 左上角有应用程序菜单,桌面上有快捷图标,右上角有网络选择和音量控制的系统托盘等等。 + +![CrowPi 桌面][8] + +CrowPi 桌面. +(Seth Kenlon, [CC BY-SA 4.0][4]) + +CrowPi 上提供了很多东西选择,所以你可能很难决定从哪里开始。 对我来说,主要分为四大类:编程、物理电子学、Linux 和游戏。 + +盒子里有一本使用说明,所以你才知道你需要怎样进行连接(例如,键盘是电池供电的,所以它有时确实需要充电,它和鼠标总是需要一个 USB 适配器)。 虽然说明书很快就能读完,但这一例子也充分体现了 CrowPi 团队是如何认真对待说明书的。 + +![CrowPi 文档][9] + +CrowPi 文档. +(Seth Kenlon, [CC BY-SA 4.0][4] + + +### 编程 + +如果你热衷于学习如何编码,在 CrowPi 上有很多途径助你成功。你应该从中选择你觉得最满意的路径。 + +#### 1\. Scratch + +[Scratch][10] 是一个简单的视觉编码应用程序,可让你像拼 [Lego pieces 乐高拼块][11] 一样将代码块组合在一起,制作出游戏和互动故事。 这是开启编程之旅最简单的方法,我曾见过年仅 8 岁的孩子会花数小时思考自己设计的游戏的最佳算法。 当然,它不仅适合孩子们!成年人也可以从中获得很多乐趣。 不知道从哪里开始? 包装盒中有一本 99 页的小册子(打印在纸张上),其中包含 Scratch 课程和项目供你尝试。 + +#### 2\. Java 和 Minecraft + +Minecraft 不是开源的(虽然有 [几个开源项目][12] 复刻了它),但它有足够的可用资源,因此也经常被用来教授编程。 Minecraft 是用 Java 编写的,CrowPi 同时装载有 [Minecraft Pi Edition][13] 和 [BlueJ Java IDE][14] ,如此可使学习 Java 变得比以往更容易、更有趣。 + +#### 3\. Python 和 PyGame + +CrowPi 上有几个非常有趣的游戏,它们是用 Python 和 [PyGame game engine ( PyGame 游戏引擎)][15] 编写的。 你可以玩游戏,然后查看源代码以了解游戏的运行方式。 CrowPi 中包含 Geany、Thonny 和 [Mu][16] 编辑器,因此您可以立即开始使用 Python 进行编程。 与 Scratch 一样,包装盒中有一本包含课程的小册子,因此你可以学习 Python 基础知识。 + +### 电子器件 + +隐藏在键盘下的物理电子工坊本质上是一系列 Pi Hats(附着在上的硬件)。 为了让你可以认识所有的组件,CrowPi 绘制了一张中英双语的折叠图进行详细的说明。 除此之外还有很多示例项目可以帮助你入门。 以下是一张小清单: + + + * **你好** 当你与 CrowPi 说话时,LCD 屏幕上打印输出“你好”。 + * **入侵警报**使用接近传感器发出警报。 + * **远程控制器** 让你能够使用远程控制(是的,这个也包含在盒子里)来触发 CrowPi 上的事件。 + * **RGB 俄罗斯方块** 让你可以在 LED 显示屏上玩俄罗斯方块游戏。 + * **语音识别**演示自然语言处理。 + * **超声波音乐** 利用距离传感器和扬声器创建简易版的特雷蒙琴(世上唯一不需要身体接触的电子乐器)。 + + + +这些项目仅仅是入门级别而已,因为你还可以在现有的基础上搭建更多东西。 当然,还有更多内容值得探索。 包装盒里还有网络跳线、电阻器、LED 和各种组件,这样你闲暇时也可以了解 Pi 的 GPIO (通用输入输出端口)功能的所有信息。 + +不过我也发现了一个问题:示例项目的位置有点难找。 找到演示很容易(它们就在 CrowPi 中心上),但源代码的位置并不是很容易被找到。 我后来发现大多数示例项目都在 `/usr/share/code` 中,你可以通过文件管理器或终端进行访问。 + +![CrowPi 外围设备][17] + +CrowPi 外围设备 +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### Linux + +Raspberry Pi 上运行 Linux 系统。 如果你一直想更深入了解 Linux,那么 CrowPi 同样会是一个很好的平台。 你可以探索 Linux 桌面、终端以及几乎所有 Linux 或开源应用程序。 如果你多年来一直在阅读有关开源的文章,并准备深入研究开源操作系统,那么 CrowPi 会是你想要的平台(当然还有很多其他平台也可以)。 + +### 游戏 + +包装盒中包含的 **RetroPie** SD 卡意味着你可以重新启动,切换为复古游戏机并任意玩各种老式街机游戏。 它跟 Steam Deck 并不完全相同,但也是一个有趣且令人振奋的小游戏平台。 因为它配备的不是一个而是两个游戏控制器,所以它非常适合多人合作的沙发游戏。 最重要的是,你不仅可以在 CrowPi 上玩游戏,还可以制作自己的游戏。 + +### 配备螺丝刀 + +自我坐下开始使用 CrowPi2 以来已经大约两周,但我还没有通关所有项目。 有很多个晚上,我不得不强迫自己停下摆弄它,因为即使我厌倦了一个项目,我也会不可避免地发现还有其他东西可以探索。 文章的最后做个总结,我在盒子里找到了一个特别的组件,这个组件让我马上知道 CrowPi 和我就是天造地设:它是一把不起眼的小螺丝刀。 盒子上的保修标签不存在作废。 CrowPi 希望你去修补、拆解、探索和学习。 它不是笔记本电脑,甚至也不是 Pi; 而是一个便携、低功耗、多样化和开源的学习者工具包。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/raspberry-pi-crowpi2 + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[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/article/21/8/my-first-programming-language +[3]: https://opensource.com/sites/default/files/crowpi-not-laptop.jpeg (CrowPi more than a laptop) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/crowpi-pi.jpeg (crowpi pi board) +[6]: https://opensource.com/article/19/1/retropie +[7]: https://opensource.com/sites/default/files/crowpi-hub.png (CrowPi hub) +[8]: https://opensource.com/sites/default/files/crowpi-desktop.png (CrowPi desktop) +[9]: https://opensource.com/sites/default/files/crowpi-docs.jpeg (CrowPi docs) +[10]: https://opensource.com/article/20/9/scratch +[11]: https://opensource.com/article/20/6/open-source-virtual-lego +[12]: https://opensource.com/alternatives/minecraft +[13]: https://www.minecraft.net/en-us/edition/pi +[14]: https://opensource.com/article/20/7/ide-java#bluej +[15]: https://opensource.com/downloads/python-gaming-ebook +[16]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners +[17]: https://opensource.com/sites/default/files/crowpi-peripherals.jpeg (CrowPi peripherals) From 59b208550139d4cafddd7453b66ec28801afdda9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Mar 2023 21:13:41 +0800 Subject: [PATCH 150/318] RP @robsean https://linux.cn/article-15651-1.html --- ... Top 5 Best EPUB Readers for Linux [Compared].md | 95 ++++++++++--------- 1 file changed, 51 insertions(+), 44 deletions(-) rename {translated/tech => published}/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md (67%) diff --git a/translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md b/published/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md similarity index 67% rename from translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md rename to published/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md index 5eabedd07d..64ad2acd48 100644 --- a/translated/tech/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md +++ b/published/20230308.7 ⭐️⭐️ Top 5 Best EPUB Readers for Linux [Compared].md @@ -3,14 +3,16 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15651-1.html" Linux 上 5 款最好的 EPUB 阅读器 ====== -**你正在为 Linux 寻找最好的 EPUB 阅读器?这里是为你准备的最好的自由开源的 EPUB 阅读器。** +![][0] + +> 你正在寻找 Linux 上最好的 EPUB 阅读器?这里是为你准备的最好的自由开源的 EPUB 阅读器。 你是一位热衷于阅读电子书的 Linux 用户吗?如果,是的,你必然知道在 Linux 发行版上的默认文档阅读器不能满足你作为一名书虫的所有要求。 @@ -18,67 +20,69 @@ EPUB 是一种广泛使用的开放电子书格式,大多数的电子书阅读 但是,请记住,仅有几个好用的阅读器。并不是有很多! -在这篇文章中,我们将讨论在 Ubuntu linux 上的最好的 EPUB 阅读器,这将增强你的阅读体验。我们也将探讨它们的特色功能和优点,以便你可以选择一个适合你的应用程序。 +在这篇文章中,我们将讨论在 Ubuntu Linux 上的最好的 EPUB 阅读器,这将增强你的阅读体验。我们也将探讨它们的特色功能和优点,以便你可以选择一个适合你的应用程序。 -但是,在此之前,在一个 “令人满意的” EPUB 阅读器中,你可以找到哪些特色功能? +但是,在此之前,你认为在一个 “令人满意的” EPUB 阅读器中,应该有哪些功能呢? -### 在一款 EPUB 阅读器中所渴望的特色功能 +### 在一款 EPUB 阅读器中所应该有的功能 -- **用户界面**: 一款好的 EPUB 阅读器应该有一个简单易懂的用户界面,它会使导航和自定义你的优点体验变得简单。你并不是在阅读一本实体书,因此,对于 “实体书” 的阅读体验来说,用户界面是极其重要的! -- **自定义**: 拥有自定义字体大小、字体类型、背景颜色和其它设置的能力,它们将增强你的阅读体验。 -- **书架**: 书架是一种很方便的特色功能,它允许你组织你的 EPUB 文件和保持追踪你的阅读进度。 -- **注释**: 在你的 EPUB 文件中,高亮显示、下划线和添加注释是一种很重要的特色功能,它会帮助你记住重点。 -- **同步**: 如果你在多台设备上阅读 EPUB 文件,同步你的阅读进度和书签是非常重要的,可以避免丢失你的追踪进度. +- **用户界面**:一款好的 EPUB 阅读器应该有一个简单易懂的用户界面,它会使导航和自定义你的阅读体验变得简单。你并不是在阅读一本实体书,因此,对于 “实体书” 的阅读体验来说,用户界面是极其重要的! +- **自定义**:拥有自定义字体大小、字体类型、背景颜色和其它设置的能力,它们将增强你的阅读体验。 +- **书架**:书架是一种很方便的特色功能,它允许你组织你的 EPUB 文件和保持追踪你的阅读进度。 +- **注释**:在你的 EPUB 文件中,高亮显示、下划线和添加注释是一种很重要的特色功能,它会帮助你记住重点。 +- **同步**:如果你在多台设备上阅读 EPUB 文件,同步你的阅读进度和书签是非常重要的,可以避免丢失你的追踪进度. -现在,让我们看看为 Ubuntu 和其它的 linux 发行版 提供的最好的 EPUB 阅读器,它们都涉及上述所有的特色功能。 +现在,让我们看看为 Ubuntu 和其它的 Linux 发行版提供的最好的 EPUB 阅读器,它们都涉及上述所有的特色功能。 ### 在 Ubuntu 和其它 Linux 发行版上的最好的 EPUB 阅读器 #### Calibre -在这份列表上的第一款阅读器是 Calibre ,它是最好的和最完整的电子书管理解决方案。它是一款功能强大的 EPUB 阅读器,也提供电子书管理工具。它在用户中是一种流行的选择,因为它有丰富的特色功能集,包括:转换 EPUB 文件到不同的格式、编辑 EPUB 文件,甚至创建你自己的 EPUB 文件的功能。Calibre 也有一个用户友好的界面,允许你自定义你的阅读体验。 +在这份列表上的第一款阅读器是 Calibre ,它是最好的和最完善的电子书管理解决方案。它是一款功能强大的 EPUB 阅读器,也提供电子书管理工具。它在用户中是一种流行的选择,因为它有丰富的特色功能集,包括:转换 EPUB 文件到不同的格式、编辑 EPUB 文件,甚至创建你自己的 EPUB 文件的功能。Calibre 也有一个用户友好的界面,允许你自定义你的阅读体验。 ![Calibre welcome wizard][1] Calibre 正在持续更新,每个月都会有大量的特色功能和增强的功能。它的开发活动是非常活跃的,它是这份列表中最好的一个。 -- 支持多种电子书设备 (基于 Android、iOS 的设备) +功能摘要: + +- 支持多种电子书设备(基于安卓、iOS 的设备) - EPUB 阅读器和管理器 - 为你的电子书库评级和标记 -- 从因特网获取电子书的元数据 -- 从流行的新闻源处阅读新闻,制作电子书! -- 使用自动转换器来上传电子书到 Kindle 和其它的阅读器 (当然,也可以下载) +- 从互联网获取电子书的元数据 +- 从流行的新闻源处阅读新闻,并制作电子书! +- 使用自动转换器来上传电子书到 Kindle 和其它的阅读器(当然,也可以下载) - 内置可购买电子书的浏览器 ![Calibre main window][2] ![Uploading books to Calibre][3] -你可以从其官方网站下载 Calibre 。或者,你可以为你的 Linux 发行版 [设置 Flatpak & Flathub][4] ,并单击下面的按钮来安装 (或 使用命令): +你可以从其官方网站下载 Calibre 。或者,你可以为你的 Linux 发行版 [设置 Flatpak & Flathub][4] ,并单击下面的按钮(或使用命令)来安装: -[使用 Flatpak 来安装 Calibre][5] +> **[使用 Flatpak 来安装 Calibre][5]** ``` flatpak install com.calibre_ebook.calibre ``` -针对其它的下载选项 (Windows、macOS 和原生的 Linux 软件包),访问 [这个网页][6] 。 +针对其它的下载选项(Windows、macOS 和原生的 Linux 软件包),请访问 [这个网页][6]。 #### Foliate -我们在先前的 [最佳的 Ubuntu 应用程序的第 3 部分apps][7] 系列中介绍了 Foliate 。它是一款轻量现代的 EPUB 阅读器,它提供了一系列的自定义选项。它是基于 GTK4 的,并且与 GNOME 桌面环境无缝集成。它有一个平滑且易于导航的界面,并且有自定义字体大小、字体类型和行距的功能。 +我们在先前的 [最佳的 Ubuntu 应用程序(第 3 部分)][7] 系列中介绍了 Foliate 。它是一款轻量现代的 EPUB 阅读器,它提供了一系列的自定义选项。它是基于 GTK4 的,并且与 GNOME 桌面环境无缝集成。它有一个平滑且易于导航的界面,并且有自定义字体大小、字体类型和行距的功能。 ![Foliate main window and settings][8] -Foliate 也包含:一种针对夜间阅读的深暗模式,一个调整内置颜色温度的选项,用以减少眼睛疲劳。 +Foliate 也包含:一种针对夜间阅读的深色模式,一个调整内置颜色温度的选项,用以减少眼睛疲劳。 -**功能摘要:** +功能摘要: - 沉浸式视图,主顶部工具条在阅读时自动隐藏 - 列入目录视图,支持从主要的电子书网站直接下载 - 多屏视图 – 双页面视图和滚动视图 - 自定义字体和行距 -- 内置亮度控制,仅适用于应用程序本身! +- 内置亮度控制,仅应用于应用程序本身! - 阅读进度滑块 - 支持书签和注释 - 在书中搜索 @@ -88,15 +92,15 @@ Foliate 也包含:一种针对夜间阅读的深暗模式,一个调整内置 ![Foliate library view][10] - 下载 Okular 的最好方式是使用 Flatpak 来下载。针对你的系统设置 [Flatpak & Flathub][4] ,并使用下面的链接来安装它 (或 使用下面提到的命令): +下载 Okular 的最好方式是使用 Flatpak 来下载。针对你的系统设置 [Flatpak & Flathub][4] ,并使用下面的链接(或使用下面提到的命令)来安装它: -[使用 Flatpak 来安装 Foliate][11] +> **[使用 Flatpak 来安装 Foliate][11]** ``` flatpak install com.github.johnfactotum.Foliate ``` -要学习更多关于 Foliate 的信息,访问官方[网站][12]。 +要学习更多关于 Foliate 的信息,访问官方 [网站][12]。 #### Okular @@ -124,9 +128,9 @@ sudo apt install okular sudo dnf install okular ``` -如果你更喜欢 Flatpak ,将你的系统设置为 Flatpak ,并使用下面的链接来安装 Flatpak (或使用下面提到的命令): +如果你更喜欢 Flatpak ,将你的系统设置为 Flatpak ,并使用下面的链接(或使用下面提到的命令)来安装 Flatpak: -[使用 Flatpak 格式安装 Okular][14] +> **[使用 Flatpak 格式安装 Okular][14]** ``` flatpak install org.kde.okular @@ -140,7 +144,7 @@ flatpak install org.kde.okular ![Bookworm library view][15] -另外,你可以使用一个内置的标签编辑器和评分系列来轻松地管理你的 EPUB 书籍。此外,它也支持注释、搜索、章节和键盘驱动浏览。 +另外,你可以使用一个内置的标签编辑器和评分系列来轻松地管理你的 EPUB 书籍。此外,它也支持注释、搜索、章节和键盘导航。 不可缺少的是,它支持 EPUB 、MOBI 、PDF 、EB2 、CBR 和 CBZ 文件。 @@ -151,7 +155,9 @@ flatpak install org.kde.okular 针对 Ubuntu 及其相关发行版,你可以使用下面的 PPA 来安装它: ``` -sudo add-apt-repository ppa:bookworm-team/bookwormsudo apt-get updatesudo apt-get install com.github.babluboy.bookworm +sudo add-apt-repository ppa:bookworm-team/bookwormsudo +apt-get update +sudo apt-get install com.github.babluboy.bookworm ``` 如果你更喜欢 Flatpak ,将你的系统设置为 Flathub 和 Flatpak ,并使用下面的链接来安装它: @@ -160,11 +166,11 @@ sudo add-apt-repository ppa:bookworm-team/bookwormsudo apt-get updatesudo apt-ge flatpak install com.github.babluboy.bookworm ``` -要学习更多的信息,访问官方[网站][17]。 +要学习更多的信息,访问官方 [网站][17]。 #### FBReader -在这份最好的 EPUB 阅读器列表中最后一款应用程序是 FBReader 。在你继续阅读之前,注意:它在 2015 年以前的开源软件。但是,它现在是闭源软件,不过,有一个开发者 SDK 是可用的。 +在这份最好的 EPUB 阅读器列表中最后一款应用程序是 FBReader 。在你继续阅读之前,注意:它在 2015 年以前是开源软件。但是,它现在是闭源软件,不过,有一个开发者 SDK 是可用的。 它是一款流行的多功能的 EPUB 阅读器,所有的 Linux 发行版都可以获取使用。它有一个简单且用户友好的界面,允许你自定义你的阅读体验。FBReader 也支持各种电子书格式,包括:EPUB 、MOBI 、FB2 和 HTML 。它也提供一种书架特色功能,允许你组织你的电子书和保持追踪你的阅读进度。 @@ -172,7 +178,7 @@ FBRedaer 也支持在你的设备之间云同步你的库。 ![FBReader][18] -在Linux 上安装 FBReader 是有一些难度的,因为它只提供 Snap 软件包。你可以在 [针对 Snap 设置你的系统][19] 后,使用 snap 来安装它,如下所示。 +在 Linux 上安装 FBReader 是有一些难度的,因为它只提供 Snap 软件包。你可以在 [针对 Snap 设置你的系统][19] 后,使用 `snap` 来安装它,如下所示。 ``` sudo snap install fbreader @@ -182,9 +188,9 @@ sudo snap install fbreader ### 在 Linux 上的更多的 EPUB 阅读器 -**Koodo reader** +#### Koodo reader -它是一个相当新的开放自由的 EPUB 阅读器,带有大量的特色功能。并且它也看起来极好。唯一的问题是,它是使用 Javascript 、HTML 和 TypeScript 构建的。因此,它不是原生的应用程序,但是它是很快的。你可能会想尝试一下。在 Linux 上,Koodo reader 提供 AppImage 、本机的 deb 和 RPM 文件。 +它是一个相当新的自由及开源的 EPUB 阅读器,带有大量的特色功能。并且它也看起来极好。唯一的问题是,它是使用 Javascript 、HTML 和 TypeScript 构建的。因此,它不是原生的应用程序,但是它是很快的。你可能会想尝试一下。在 Linux 上,Koodo reader 提供 AppImage 、本机的 deb 和 RPM 文件。 你可以 [在这里下载][21] ,这里是一些截屏。 @@ -207,8 +213,8 @@ sudo snap install fbreader | :- | :- | :- | :- | :- | :- | | Calibre | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | Foliate | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | -| Bookworm | ✔️ | ✔️ | ✔️ | ❌ (受限) | ❌ | -| Okular | ✔️ | ✔️ | ❌ | ❌ (受限) | ❌ | +| Bookworm | ✔️ | ✔️ | ✔️ | ❌(受限)| ❌ | +| Okular | ✔️ | ✔️ | ❌ | ❌(受限)| ❌ | | FBReader | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ### 去哪里获取免费的电子书? @@ -217,15 +223,15 @@ sudo snap install fbreader 使用下面的链接访问网站。在你下载电子书后,你可以使用上述任意的 EPUB 阅读器来制作和享受你的个人电子书收藏。 -[Project Gutenberg][27] +> **[Project Gutenberg][27]** -你也可以尝试精选免费电子书的 _standard ebooks_。 +你也可以尝试精选免费电子书的 standard ebooks。 -[Standard eBooks][28] +> **[Standard eBooks][28]** ### 总结 -总而言之,在 Linux 上有几个可用的 EPUB 阅读器,它们提供大量的特色功能来增强你的阅读体验。Calibre 是一个极好的选择,如果你正在寻找一个功能丰富的 EPUB 阅读器,它也可以作为一个电子书管理器工具。Foliate 和 Bookworm 是一个轻量的现代的应用程序,非常适合那些看重自定义选项的人。 +总而言之,在 Linux 上有几个可用的 EPUB 阅读器,它们提供大量的特色功能来增强你的阅读体验。如果你正在寻找一个功能丰富的 EPUB 阅读器,Calibre 是一个极好的选择,它也可以作为一个电子书管理器工具。Foliate 和 Bookworm 是一个轻量的现代的应用程序,非常适合那些看重自定义选项的人。 我希望通过上述的比较和详细的描述,你现在可以为你自己选择最好的 EPUB 阅读器了。 @@ -236,7 +242,7 @@ via: https://www.debugpoint.com/epub-readers-linux/ 作者:[Arindam][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/) 荣誉推出 @@ -270,3 +276,4 @@ via: https://www.debugpoint.com/epub-readers-linux/ [26]: https://github.com/rupa/epub [27]: https://www.gutenberg.org/ [28]: https://standardebooks.org/ebooks +[0]: https://img.linux.net.cn/data/attachment/album/202303/22/210742rdxxnfmfxmtfxnzx.jpg \ No newline at end of file From 16007600f4d34e4361ec29c0c3ef246cd5c6df7b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Mar 2023 21:46:36 +0800 Subject: [PATCH 151/318] RP @geekpi https://linux.cn/article-15652-1.html --- ...ia vending machine made with a Raspberry Pi.md | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) rename {translated/tech => published}/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md (62%) diff --git a/translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md b/published/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md similarity index 62% rename from translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md rename to published/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md index 479daafb6a..fbaf7a2fdd 100644 --- a/translated/tech/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md +++ b/published/20230303.0 ⭐️ A trivia vending machine made with a Raspberry Pi.md @@ -3,16 +3,22 @@ [#]: author: "Phil Shapiro https://opensource.com/users/pshapiro" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15652-1.html" 用树莓派制作的问答售货机 ====== -作为在公共图书馆工作的教育工作者,我一直在关注[树莓派][1]的有趣用途。在我看来,得克萨斯州达拉斯市的问答售货机项目是这些神奇设备最具创意和最有趣的用途之一。使用树莓派取代食品自动售货机上的硬币盒是 Greg Needel 和他的团队的一个天才之作。这个想法的潜在用途是深远的。观看这个 [YouTube 短视频][2],了解 Trivia 自动贩卖机的运行情况。 +![][0] -最初的问答售货机专注于科学问题,但你可以制作一个问答售货机来回答任何问题:历史、公民、文学等等。如果你鼓励学生写自己的问题,并回答对方的问题,那将是最有吸引力的用途。请考虑这个问题。自动售货机可以不发放食物,而是发放当地企业的优惠券。我谋生的方式之一是教吉他课,我很乐意捐出一节吉他课作为小事自动贩卖机的优惠券。然而,学生必须积累适当数量的积分才能获得我的一堂吉他课。 +> 用树莓派取代食品售货机上的投币箱是一个天才之举。 + +作为在公共图书馆工作的教育工作者,我一直在关注 [树莓派][1] 的有趣用途。在我看来,得克萨斯州达拉斯市的问答售货机Trivia Vending Machine项目是这些神奇设备最具创意和最有趣的用途之一。使用树莓派取代食品售货机上的投币箱是 Greg Needel 和他的团队的一个天才之作。这个想法的潜在用途是深远的。请观看下面这个 [YouTube 短视频][2],了解问答自动售货机的运行情况。 + +![YouTube 短视频][2] + +最初的问答售货机专注于科学问题,但你可以制作一个问答售货机来回答任何问题:历史、公民、文学等等。如果你鼓励学生写自己的问题,并回答对方的问题,那将是最有吸引力的用途。请考虑这样:自动售货机可以不发放食物,而是发放当地企业的优惠券。我谋生的方式之一是教吉他课,我很乐意捐出一节吉他课作为问答售货机的优惠券。然而,学生必须积累适当数量的积分才能获得我的一堂吉他课。 把你的想象力再延伸一点。是否有可能让学生解决逻辑谜题,以便从自动售货机获得食物(或优惠券)?是的,这并不难创造。也许是数独谜题、[Wordle][3]、KenKen、Sokoban 或任何其他谜题。学生可以用触摸屏玩这些谜题。国际象棋怎么样?当然,学生可以通过解决象棋谜题来获得食物(或优惠券)。 @@ -22,12 +28,12 @@ 如果你是创客空间的成员,请向其他成员介绍问答售货机。这是一个开放的发明,没有专利,所以任何人都可以制造它。(谢谢你,Greg Needel)我想为这样的设备编写代码并不太难。如果有人可以创建此类代码的 GitHub 仓库,以及可能附带的一些解释性截屏,那就太好了。 -虽然知识问答售货机没有在红牛创意大赛中获奖,但这项发明还是值得获奖的。应该有人找到 Greg Needel 并给他一个合适的奖品。该奖项应该是什么样子的? 可能是 2.5 万或 5 万美金的样子。我为 Greg Needel 和他的创意团队欢呼三声。他们把树莓派带到了这种计算机的发明者所希望的方向:修理工的快乐。大胆、美丽、开放。你还能要求更多吗? +虽然问答售货机没有在红牛创意大赛中获奖,但这项发明还是值得获奖的。应该有人找到 Greg Needel 并给他一个合适的奖品。该奖项应该是什么样子的?可能是 2.5 万或 5 万美金的样子。我为 Greg Needel 和他的创意团队欢呼三声。他们把树莓派带到了这种计算机的发明者所希望的方向:修理工的快乐。大胆、美丽、开放。你还能要求更多吗? 最后一件事。问答售货机是几年前使用早期的树莓派型号制作的。当前的树莓派速度更快,响应更快。因此,你在上述视频中注意到的任何交互延迟在今天的树莓派上已不复存在。 -哦,我非常想要一块糖果。我抿着嘴唇。提醒我,我需要赚取多少积分才能获得士力架? 不惜一切代价。我会不惜一切代价。 - +哦,我非常想要一块糖果。我砸吧砸吧嘴。提醒我,我需要赚取多少积分才能获得士力架?不惜一切代价,我会不惜一切代价。 + -------------------------------------------------------------------------------- via: https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine @@ -35,7 +41,7 @@ via: https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine 作者:[Phil Shapiro][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/) 荣誉推出 @@ -45,4 +51,5 @@ via: https://opensource.com/article/23/3/raspberry-pi-trivia-vending-machine [2]: https://www.youtube.com/watch?v=pDOhk-YAhys [3]: https://opensource.com/article/22/1/word-game-linux-command-line [4]: https://vendingworld.com/small-vending-parts/vending-machine-motors-small-parts -[5]: https://www.vendmedic.com/product-category/vending-parts/vend-motors/ \ No newline at end of file +[5]: https://www.vendmedic.com/product-category/vending-parts/vend-motors/ +[0]: https://img.linux.net.cn/data/attachment/album/202303/22/214542uba6m8d8dwbahraa.jpg \ No newline at end of file From f129d141ba70850c90946bd1e451c46b0e4a080f Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 23 Mar 2023 08:53:20 +0800 Subject: [PATCH 152/318] translated --- ...ut Function in Python Concepts and Examples.md | 127 ----------------- ...ut Function in Python Concepts and Examples.md | 129 ++++++++++++++++++ 2 files changed, 129 insertions(+), 127 deletions(-) delete mode 100644 sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md create mode 100644 translated/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md diff --git a/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md b/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md deleted file mode 100644 index d4ada65e26..0000000000 --- a/sources/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: subject: "Input Function in Python: Concepts and Examples" -[#]: via: "https://www.debugpoint.com/input-function-python/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Input Function in Python: Concepts and Examples -====== - -**In this article, I will explain the basics of the Input function of Python with some easy-to-understand examples.** - -![][1] - -Python is one of the most popular programming languages in the world, and it is widely used in various applications. One of the basic concepts in Python is the `Input()` function, which allows users to interact with the program by providing input values. - -Let’s find out the input function, how it works, and how you can use it effectively in your Python programs. - -Before you start, I hope you have Python installed and set up a basic editor. If not, do refer to my below guides: - -- [How to Install Python 3.11 on Ubuntu/Linux][2] -- [How to install Python on Windows][3] -- [How to set up the IDLE editor for Python][4] - -### Python Input Function - -The input function in Python is used to accept user input as a string. It prompts the user to enter a value and waits for the user to provide input. The user’s input is then stored as a string in a variable, which can be used later in the program. - -#### Syntax - -``` -input("your message to user") -``` - -When you run the input function, it shows the message to the user and _waits_ for input. The cursor waits. Once the user enters input and presses enter, the input function reads the user’s input. The value is stored in the variable you specify. - -Let’s see a few examples. - -### Example 1: Simple Input function usage - -The following code snippet takes input and shows the output with an additional string. - -``` -your_name = input("Enter your name:")print("Hello " + your_name) -``` - -**Output:** - -``` -Enter your name:arindamHello arindam -``` - -![Python Input function - a simple example][5] - -Example 2: Taking input as integer and float - -You can also convert the input as int() or float() at runtime while using input() function. Here is an example. - -``` -no_of_books = int(input("Enter total books ordered:")) -print ("Total number of books:", no_of_books) - -price_of_each_book = float(input("Enter unit price:")) -print ("Total price:", no_of_books * price_of_each_book) -``` - -Output: - -``` -Enter total books ordered:5 -Total number of books: 5 -Enter unit price:10.1 -Total price: 50.5 -``` - -### Example 4: Joining lists - -You can also use other functions, such as lists, to accept a set of values and convert them as [lists][6] in Python. Here’s an example which takes input and converts it to a list. Then used, another set of values and appended to the first list. - -``` -# take input for first list -list_1 = list(input("Enter numbers for list 1:")) - -#take input for second list -list_2 = list(input("Enter some letters for list 2:")) - -#loop through the second list and add to first list -for j in list_2: - list_1.append(j) - -#print the modified first list -print(list_1) -``` - -**Output:** - -``` -Enter numbers for list 1:1234 -Enter some letters for list 2:ABCD -['1', '2', '3', '4', 'A', 'B', 'C', 'D'] -``` - -### Conclusion - -I hope this simple guide clarifies the input() function with several examples. It’s a powerful function to accept values from standard input for simple use cases. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/input-function-python/ - -作者:[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/2023/03/pyinput.jpg -[2]: https://www.debugpoint.com/install-python-3-11-ubuntu/ -[3]: https://www.debugpoint.com/install-python-windows/ -[4]: https://www.debugpoint.com/install-idle-ubuntu-linux/ -[5]: https://www.debugpoint.com/wp-content/uploads/2023/03/Python-Input-function-a-simple-example.jpg -[6]: https://docs.python.org/3/library/stdtypes.html?highlight=list#lists \ No newline at end of file diff --git a/translated/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md b/translated/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md new file mode 100644 index 0000000000..a074a3bc0f --- /dev/null +++ b/translated/tech/20230315.0 ⭐️ Input Function in Python Concepts and Examples.md @@ -0,0 +1,129 @@ +[#]: subject: "Input Function in Python: Concepts and Examples" +[#]: via: "https://www.debugpoint.com/input-function-python/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Python 中的输入函数:概念和示例 +====== + +**在这篇文章中,我将通过一些通俗易懂的例子来解释 Python 的 Input 函数的基础知识。** + +![][1] + +Python 是世界上最流行的编程语言之一,广泛应用于各种应用程序中。Python 中的一个基本概念是 `Input()` 函数,它允许用户通过提供输入值与程序进行交互。 + +让我们看看 input 函数它是如何工作的,以及如何在 Python 程序中有效地使用它。 + +在开始之前,我希望你已经安装了 Python 并设置了一个基本的编辑器。如果没有,请参考我的以下指南: + +- [如何在 Ubuntu/Linux 上安装 Python 3.11][2] +- [如何在 Windows 上安装 Python][3] +- [如何为 Python 设置 IDLE 编辑器][4] + +### Python Input 函数 + +Python 中的 input 函数用于接受用户输入的字符串。它提示用户输入一个值并等待用户提供输入。然后将用户的输入作为字符串存储在变量中,稍后可以在程序中使用。 + +#### 句法 + +``` +input("your message to user") +``` + +当你运行 input 函数时,它会向用户显示消息并_等待_输入。光标等待。当用户输入并按下回车键,input 函数就会读取用户的输入。该值存储在你指定的变量中。 + +让我们看几个例子。 + +### 示例 1:简单的 input 函数用法 + +以下代码片段接受输入并显示带有附加字符串的输出。 + + +``` +your_name = input("Enter your name:") +print("Hello " + your_name) +``` + +**输出:** + +``` +Enter your name:arindamHello arindam +``` + +![Python 输入函数:一个简单的例子][5] + +### 示例 2:以整数和浮点数作为输入 + +在使用 input() 函数时,你还可以在运行时将输入转换为 int() 或 float() 。这是一个例子。 + +``` +no_of_books = int(input("Enter total books ordered:")) +print ("Total number of books:", no_of_books) + +price_of_each_book = float(input("Enter unit price:")) +print ("Total price:", no_of_books * price_of_each_book) +``` + +输出: + +``` +Enter total books ordered:5 +Total number of books: 5 +Enter unit price:10.1 +Total price: 50.5 +``` + +### 示例 3:连接列表 + +你还可以使用其他函数(例如列表)来接受一组值并将它们转换为 Python 中的 [list][6]。这是一个接受输入并将其转换为列表的示例。然后使用另一组值并附加到第一个列表。 + +``` +# 获取第一个列表的输入 +list_1 = list(input("Enter numbers for list 1:")) + +# 获取第二个列表的输入 +list_2 = list(input("Enter some letters for list 2:")) + +# 循环遍历第二个列表并添加到第一个列表 +for j in list_2: + list_1.append(j) + +# 打印修改后的第一个列表 +print(list_1) +``` + +**输出:** + +``` +Enter numbers for list 1:1234 +Enter some letters for list 2:ABCD +['1', '2', '3', '4', 'A', 'B', 'C', 'D'] +``` + +### 总结 + +我希望这个简单的指南通过几个示例阐明了 input() 函数。对于简单的场景,它是一个强大的功能,可以从标准输入中接受值。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/input-function-python/ + +作者:[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/wp-content/uploads/2023/03/pyinput.jpg +[2]: https://www.debugpoint.com/install-python-3-11-ubuntu/ +[3]: https://www.debugpoint.com/install-python-windows/ +[4]: https://www.debugpoint.com/install-idle-ubuntu-linux/ +[5]: https://www.debugpoint.com/wp-content/uploads/2023/03/Python-Input-function-a-simple-example.jpg +[6]: https://docs.python.org/3/library/stdtypes.html?highlight=list#lists \ No newline at end of file From 592436d7603b2ddce30b6fa23e4d582c37b3cf0c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 23 Mar 2023 08:56:34 +0800 Subject: [PATCH 153/318] translating --- ....3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md b/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md index 0274f9a3d8..0526838326 100644 --- a/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md +++ b/sources/tech/20230313.3 ⭐️⭐️ How to Install Kubernetes Cluster Using Kubespray.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/install-kubernetes-using-kubespray/" [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 237d4af873208769e0561f72431ae664987eeac5 Mon Sep 17 00:00:00 2001 From: fuyanjie Date: Thu, 23 Mar 2023 10:17:58 +0800 Subject: [PATCH 154/318] translating --- .../tech/20211205 Open source mind mapping with Draw.io.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20211205 Open source mind mapping with Draw.io.md b/sources/tech/20211205 Open source mind mapping with Draw.io.md index ef76916e4c..3ab483a62e 100644 --- a/sources/tech/20211205 Open source mind mapping with Draw.io.md +++ b/sources/tech/20211205 Open source mind mapping with Draw.io.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/open-source-mind-mapping-drawio" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "FYJNEVERFOLLOWS " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -93,7 +93,7 @@ via: https://opensource.com/article/21/12/open-source-mind-mapping-drawio 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 57364afbb75b432073e2da230d443fefb1911c6a Mon Sep 17 00:00:00 2001 From: Donkey Date: Thu, 23 Mar 2023 11:20:31 +0800 Subject: [PATCH 155/318] translating --- .../tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md b/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md index 13c331d6f4..60d1e2dd9f 100644 --- a/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md +++ b/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/11/git-tips-technical-writers" [#]: author: "Maximilian Kolb https://opensource.com/users/kolb" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Donkey-Hao" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 4c4d031c2d188f3f0de5629d92e14d2ffb7ddd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 23 Mar 2023 15:11:03 +0800 Subject: [PATCH 156/318] Translated --- ...Guide to Find the Right Debian ISO for Download.md | 114 ------------------ ...Guide to Find the Right Debian ISO for Download.md | 114 ++++++++++++++++++ 2 files changed, 114 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md create mode 100644 translated/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md diff --git a/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md b/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md deleted file mode 100644 index 9b9d4d545c..0000000000 --- a/sources/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: subject: "A Guide to Find the Right Debian ISO for Download" -[#]: via: "https://www.debugpoint.com/download-debian-iso/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -A Guide to Find the Right Debian ISO for Download -====== - -**Linux beginners can be overwhelmed by the official Debian download ISO page. This guide aims to simplify the download experience.** - -Installing Debian can be a difficult experience for beginner Debian users. The official download page contains several links, and it’s a little confusing as to which one to download. - -Keeping that in mind, I have prepared this guide to help you to pick up the right Debian ISO file directly from this page. - -Overall, you can classify Debian ISO files into two broad categories. They are “free” and “non-free”. - -### A few notes about “Free” and “non-Free” Debian images - -- Debian “non-free” images refer to the installation images of the Debian operating system that contain software which does not adhere to the Debian free software guideline. -- “Non-free” software includes software that is proprietary, copyrighted or has license restrictions that prevent users from modifying or distributing the code. The Debian project provides these “non-free” images as an optional download for users who need them to use specific hardware devices or software that require proprietary drivers or firmware. -- The “free” version of Debian contains only open-source and freely distributable software, meaning that users have the freedom to modify, distribute, and share the software with others without any legal or ethical restrictions. - -Debian 12 Bookworm onwards (upcoming release), the non-free firmware packages are included officially in the main ISO files. So, this guide is split between two sections. - -### Download: Debian 12 Bookworm and above - -Here’s a brief table to download Debian ISO for version 12 Bookworm (currently not stable and under testing). - -| **Description** | **Max ISO Size** | **Choose this ISO if** | **ISO Download****Link****(amd64)** | -| :- | :- | :- | :- | -| > Minimal Size> Ideal for the basic install | 700 MB | You want to download the basic packages and then install them without the internet | [iso-cd][1] | -| > Full DVD size | 5 GB | You want everything to be downloaded first, then start the installation, which is ideal for offline installation. | [iso-dvd][2] | - -### Download: Debian 11 Bullseye and below - -#### Free ISO files (no proprietary packages) - -The below ISO images are “**free**” images, which means they don’t include many proprietary packages for the firmware. - -| **Description** | **Max ISO Size** | **Choose this ISO if** | **ISO Download****Link****(amd64)** | -| :- | :- | :- | :- | -| > Minimal Size (netinst CD)> Requires internet connection for packages | 500 MB | You have stable high-speed internet and want a small initial download | [iso-cd][3][torrent][4] | -| > Full CD size> Comes with CD 1, 2 and 3> You need the CD 1 only for basic installation | 700 MB | You want to download the basic packages and then install them without the internet | [iso-cd][5][torrent][6] | -| > Full DVD size> Comes with DVD 1, 2 and 3> You need the DVD 1 only for basic installation | 5 GB | You want everything to be downloaded first, then start the installation, which is basically ideal for offline installation. | [iso-dvd][7][torrent][8] | - -#### Non-free ISO files (with proprietary packages) - -If you have special hardware such as Wi-Fi, Bluetooth, etc. – you may want to get the **“non-free”** version of the packages from the below table. - -| **Type** | **Type of image** | **Choose this ISO if** | **ISO download link (amd64)** | -| :- | :- | :- | :- | -| Non-free | full CD, DVD | You want less effort and want Debian to work with all supported hardware. | [cd-dvd][9]_(go to non-free directory)_ | -| Non-free | full CD, DVD (LIVE) – separate desktop environment packages | You want less effort and Debian to work and a LIVE system. LIVE system also offers a complete installation as well | [cd-dvd-live][9]_(go to non-free directory)_ | - -### Other architectures - -#### For Debian 11 Bullseye: - -- [arm64][10] -- [armel][11] -- [armhf][12] -- [i386][13] -- mips (not available) -- [mips64el][14] -- [mipsel][15] -- [ppc64el][16] -- [s390x][17] - -All images download link: [Click here][18] - -### Older version (Debian 10 Buster) - -If you need any images for Debian Buster 10, visit this [page][19]. - -### Wrapping Up - -For new users, it might be too much information if one wants to download Debian ISO images from the official website. Hence, I summarised the download links in a proper format. I hope this article has helped you find your system’s target Debian ISO images. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/download-debian-iso/ - -作者:[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://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-cd/ -[2]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-dvd/ -[3]: https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/ -[4]: https://cdimage.debian.org/cdimage/release/current/amd64/bt-cd/ -[5]: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ -[6]: https://cdimage.debian.org/debian-cd/current/amd64/bt-cd/ -[7]: https://cdimage.debian.org/cdimage/release/current/amd64/iso-dvd/ -[8]: https://cdimage.debian.org/cdimage/release/current/amd64/bt-dvd/ -[9]: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/ -[10]: http://ftp.debian.org/debian/dists/bullseye/main/installer-arm64/current/images/ -[11]: http://ftp.debian.org/debian/dists/bullseye/main/installer-armel/current/images/ -[12]: http://ftp.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/ -[13]: http://ftp.debian.org/debian/dists/bullseye/main/installer-i386/current/images/ -[14]: http://ftp.debian.org/debian/dists/buster/main/installer-mips64el/current/images/ -[15]: http://ftp.debian.org/debian/dists/bullseye/main/installer-mipsel/current/images/ -[16]: http://ftp.debian.org/debian/dists/bullseye/main/installer-ppc64el/current/images/ -[17]: http://ftp.debian.org/debian/dists/bullseye/main/installer-s390x/current/images/ -[18]: https://cdimage.debian.org/cdimage/ -[19]: https://www.debian.org/releases/buster/debian-installer/ diff --git a/translated/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md b/translated/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md new file mode 100644 index 0000000000..a668e811f1 --- /dev/null +++ b/translated/tech/20230313.0 ⭐️⭐️ A Guide to Find the Right Debian ISO for Download.md @@ -0,0 +1,114 @@ +[#]: subject: "A Guide to Find the Right Debian ISO for Download" +[#]: via: "https://www.debugpoint.com/download-debian-iso/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +一篇找到合适的 Debian ISO 的下载指南 +====== + +**Linux 初学者可能会被官方的 Debian 下载 ISO 的页面所压垮。这篇指南旨在简化下载体验。** + +对于 Debian 初学者来说,安装 Debian 可能会是一次艰难的经历。官方的下载页面包含一些链接,以至于到底需要下载哪个令人困惑。 + +我准备这篇指南来帮助你直接从下载页面下载恰当的 Debian ISO 文件。 + +总的来说,你可以将 Debian ISO 文件分为两大类。它们是 “自由” 和 “非自由” 。 + +### 关于 “自由” 和 “非自由” Debian 镜像之间的一些注意事项 + +- Debian “非自由” 镜像涉及 Debian 操作系统的安装镜像,它包含不遵循 Debian 自由软件包包指南的软件包。 +- “非自由” 软件包包含的软件是专有的、受版权保护的或受许可限制的,这些软件包禁止用户修改或分发代码。Debian 工程提供这些 “非自由” 镜像作为用户的一种可选下载项,这些用户需要依靠专有的设备驱动程序或固件来使用特定的硬件设备或软件包 +- “自由” 版本的 Debian ,仅包含开源和可自由分发的软件包,这意味着用户有修改、分发和他人共享的自由,而没有任何法律和道德上的约束。 + +Debian 12 Bookworm 正在开发 (即将发布),非自由固件软件包将正式包含在主 ISO 文件中。因此,这篇指南将分为两个部分。 + +### 下载: Debian 12 Bookworm + +这里是一份下载 Debian ISO 版本 12 Bookworm 的简单的表格 (当前上不稳定,正在测试)。 + +| **描述** | **最大 ISO 体积** | **选择此 ISO ,如果** | **ISO 下载****链接****(amd64)** | +| :- | :- | :- | :- | +| > 最小的体积> 非常适合最基础的安装 | 700 MB | 你想下载基础的软件包,然后不使用因特网来安装 | [iso-cd][1] | +| > 完整的 DVD 体积 | 5 GB | 你想先下载所有的东西,然后开始安装,它非常适合离线安装 | [iso-dvd][2] | + +### 下载: Debian 11 Bullseye + +#### 自由的 ISO 文件 (没有专有软件包) + +下面的 ISO 镜像是 “**自由的**” 镜像,这意味着他们不包含很多针对固件的专有软件包。 + +| **描述** | **最大 ISO 体积** | **选择此 ISO ,如果** | **ISO 下载****链接****(amd64)** | +| :- | :- | :- | :- | +| > 最小的体积 (网络安装 CD)> 安装软件包时,需要联通因特网 | 500 MB | 你有稳定高速的因特网,希望较少的初始下载 | [iso-cd][3] [torrent][4] | +| > 完整的 CD 体积> 由附属的 CD 1、2 和 3 组成> 对于最基础的安装,你只需要 CD 1 | 700 MB | 你希望下载基础的软件包,然后不使用因特网来安装它们 | [iso-cd][5] [torrent][6] | +| > 完整的 DVD 体积> 由附属的 DVD 1、2 和 3 组成> 对于最基础的安装,你只需要 DVD 1 | 5 GB | 你想先下载所有的东西,然后开始安装,这是离线安装的最理想方式 | [iso-dvd][7] [torrent][8] | + +#### 非自由的 ISO 文件 (带有专有软件包) + +如果你有特殊的硬件,例如:Wi-Fi 、蓝牙等等 – 你可能会希望从下面的表中获取 **“非自由”** 版本的软件包。 + +| **类型** | **镜像种类** | **选择此 ISO ,如果** | **ISO 下载链接 (amd64)** | +| :- | :- | :- | :- | +| 非自由 | 完整的 CD 、DVD | 你想要减少工作量,并希望 Debian 能够在所有受支持的硬件上工作 | [cd-dvd][9]_(转到非自由目录)_ | +| 非自由 | 完整的 CD 、DVD (LIVE) – 独立的桌面环境软件包 | 你想要减少工作量,Debian 能够工作,并且带有一个 LIVE 系统。LIVE 系统也提供完整的安装 | [cd-dvd-live][9]_(转到非自由目录)_ | + +### 其它的架构 + +#### 针对 Debian 11 Bullseye: + +- [arm64][10] +- [armel][11] +- [armhf][12] +- [i386][13] +- mips (不可用) +- [mips64el][14] +- [mipsel][15] +- [ppc64el][16] +- [s390x][17] + +所有的镜像,下载链接: [单击这里][18] + +### 较旧的版本 (Debian 10 Buster) + +如果你需要一些针对 Debian Buster 10 的镜像,访问这个 [页面][19] 。 + +### 总结 + +对新用户来说,如果想要从官方网站上下载 Debian ISO 镜像,网站的信息可能太过冗余。因此,我以一种恰当的格式总结下载链接。我希望这篇文章有助于你找到适合于你系统的目标 Debian ISO 镜像。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/download-debian-iso/ + +作者:[Arindam][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.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed/ +[1]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-cd/ +[2]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-dvd/ +[3]: https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/ +[4]: https://cdimage.debian.org/cdimage/release/current/amd64/bt-cd/ +[5]: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ +[6]: https://cdimage.debian.org/debian-cd/current/amd64/bt-cd/ +[7]: https://cdimage.debian.org/cdimage/release/current/amd64/iso-dvd/ +[8]: https://cdimage.debian.org/cdimage/release/current/amd64/bt-dvd/ +[9]: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/ +[10]: http://ftp.debian.org/debian/dists/bullseye/main/installer-arm64/current/images/ +[11]: http://ftp.debian.org/debian/dists/bullseye/main/installer-armel/current/images/ +[12]: http://ftp.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/ +[13]: http://ftp.debian.org/debian/dists/bullseye/main/installer-i386/current/images/ +[14]: http://ftp.debian.org/debian/dists/buster/main/installer-mips64el/current/images/ +[15]: http://ftp.debian.org/debian/dists/bullseye/main/installer-mipsel/current/images/ +[16]: http://ftp.debian.org/debian/dists/bullseye/main/installer-ppc64el/current/images/ +[17]: http://ftp.debian.org/debian/dists/bullseye/main/installer-s390x/current/images/ +[18]: https://cdimage.debian.org/cdimage/ +[19]: https://www.debian.org/releases/buster/debian-installer/ From cb66b41e2a6d21d0a814e814e2f73ccc38e9cb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:46:05 +0800 Subject: [PATCH 157/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230321.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20to=20Install=20CRI-O=20(Container=20Runtime)=20on=20Ubuntu?= =?UTF-8?q?=2022.04.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stall CRI-O (Container Runtime) on Ubuntu 22.04.md | 295 ++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 sources/tech/20230321.0 ⭐️⭐️ How to Install CRI-O (Container Runtime) on Ubuntu 22.04.md diff --git a/sources/tech/20230321.0 ⭐️⭐️ How to Install CRI-O (Container Runtime) on Ubuntu 22.04.md b/sources/tech/20230321.0 ⭐️⭐️ How to Install CRI-O (Container Runtime) on Ubuntu 22.04.md new file mode 100644 index 0000000000..aa6a455ba8 --- /dev/null +++ b/sources/tech/20230321.0 ⭐️⭐️ How to Install CRI-O (Container Runtime) on Ubuntu 22.04.md @@ -0,0 +1,295 @@ +[#]: subject: "How to Install CRI-O (Container Runtime) on Ubuntu 22.04" +[#]: via: "https://www.linuxtechi.com/install-crio-container-runtime-on-ubuntu/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install CRI-O (Container Runtime) on Ubuntu 22.04 +====== + +CRI-O is an opensource and lightweight container runtime for Kubernetes. It is an implementation of the Kubernetes Container Runtime Interface (CRI) using Open Container Initiative (OCI) compatible runtimes. It’s a perfect alternative to Docker when running Kubernetes. + +In this guide, we will demonstrate how to install CRI-O on Ubuntu 22.04 LTS step by step. + +##### Prerequisites + +Before you start out, here is what you need: + +- An instance of Ubuntu 22.04 with SSH access +- A sudo user configured on the instance +- Fast and stable internet connectivity + +With that out of the way, let us get started out. + +### Step 1: Update the system and Install dependencies + +Right off the bat, log into your server instance and update the package lists as follows. + +``` +$ sudo apt update +``` + +Once the local package index has been updated, install the dependencies as follows. + +``` +$ sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y +``` + +### Step 2: Add CRI-O repository + +To install CRI-O, we need to add or enable its repository on Ubuntu. But first, you need to define the variables based on the operating systems and the CRI-O version that you want to install. + +As such, define the variables as shown below. + +``` +$ export OS=xUbuntu_22.04 +$ export CRIO_VERSION=1.24 +``` + +Once that is done, run the following set of commands to add the CRI-O Kubic repository. + +``` +$ echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list +$ echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list +``` + +Thereafter, import the GPG key for the CRI-O repository + +``` +$ curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION/$OS/Release.key | sudo apt-key add - +$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add - +``` + +This yields the following output as shown below. + +Once again update the package index to synchronize the system with the newly added CRI-O Kubic repositories. + +``` +$ sudo apt update +``` + +### Step 3: Install CRI-O On Ubuntu 22.04 + +With the repositories added, install CRI-O and the runtime client using the APT package manager. + +``` +$ sudo apt install cri-o cri-o-runc -y +``` + +Once installed, start and enable the CRI-O daemon. + +``` +$ sudo systemctl start crio +$ sudo systemctl enable crio +``` + +Next, verify if the CRI-O service is running: + +``` +$ sudo systemctl status crio +``` + +You should get the following output which shows that the CRI-O service is running as expected. + +### Step 4: Install CNI Plugins For CRI-O + +Next, you need to install the CNI (Container Network Interface) as well as the CNI plugins. Keep in mind that the loopback and bridge configurations are enabled and sufficient for running pods using CRI-O. + +Therefore, to install the CNI plugins, run the following command. + +``` +$ sudo apt install containernetworking-plugins -y +``` + +Once installed, edit the CRI-O configuration file + +``` +$ sudo nano /etc/crio/crio.conf +``` + +Uncomment network_dir & plugin_dirs section and also add ‘/usr/lib/cni/’ under plugin_dirs section. + +Save the changes and exit the configuration file. + +Next, restart the CRIO service. + +``` +$ sudo systemctl restart crio +``` + +### Step 5: Install CRI-O tools + +In addition, you also need to install the cri-tools package which provides the crictl command-line utility which is used for interacting and managing containers and pods. + +To do so, run the command: + +``` +$ sudo apt install -y cri-tools +``` + +Once installed, confirm the version of crictl and RunTimeVersion as follows. + +``` +$ sudo crictl --runtime-endpoint unix:///var/run/crio/crio.sock version +``` + +Be sure to also check if CRI-O is ready to deploy pods using the following command: + +``` +$ sudo crictl info +``` + +The crictl command provides an autocompletion feature that lets you autocomplete commands by pressing the TAB key. To enable command completion run the following command. + +``` +$ sudo su - + +# crictl completion > /etc/bash_completion.d/crictl +``` + +Then reload the current bash session. + +``` +# source ~/.bashrc +``` + +To use the auto-completion feature, you will need to log out or start a new terminal session. Then simply type the crictl command and press the TABkey to view all the options. + +``` +$ crictl +``` + +### Step 6: Create a Pod using crictl utility + +Up to this point, CRI-O is fully installed and configured and ready to spin up a pod. In this section, we will create an Apache web server inside a pod and confirm if it is serving requests. + +First, we are going to set up a pod sandbox or an isolated environment using a pod configuration file as follows. + +``` +$ sudo nano apache_sandbox.json +``` + +We will then add the following configuration to the file. + +``` +{ +    "metadata": { +        "name": "apache-sandbox", +        "namespace": "default", +        "attempt": 1, +        "uid": "hdishd83djaidwnduwk28bcsb" +    }, +    "linux": { +    }, +    "log_directory": "/tmp" +} +``` + +Save and exit. Next create the pod using the following command. This prints out  long alphanumeric number which is the pod ID. + +``` +$ sudo crictl runp apache_sandbox.json +``` + +To confirm that the pod has been created, run the command. + +``` +$ sudo crictl pods +``` + +To retrieve more information about the created pod, run the command: + +``` +$ sudo crictl inspectp --output table 05ba2f0704f22 +``` + +This prints out the ID, Name, UID, Namespace, date of creation, internal pod IP among other details. + +### Step 7: Create a container inside a pod + +In section we are going to create an Apache web server container inside the pod. So, use the crictl utility to pull an Apache web server image from Docker Hub. + +``` +$ sudo crictl pull httpd +``` + +You can verify the image pulled as shown. + +``` +$ sudo crictl images +``` + +Next, we are going to define a container configuration file for the Apache web server. + +``` +$ sudo nano container_apache.json +``` + +Copy and paste the following code. + +``` +{ +  "metadata": { +      "name": "apache" +    }, +  "image":{ +      "image": "httpd" +    }, +  "log_path":"apache.0.log", +  "linux": { +  } +} +``` + +Save and exit the configuration file. + +Finally, to attach the container to the sand box pod created earlier, run the command: + +``` +$ sudo crictl create 05ba2f0704f22 container_apache.json apache_sandbox.json +``` + +This outputs a large alphanumeric ID to the terminal.. Take note of this ID. + +Finally, use the ID to start the Apache web server container as follows. + +``` +$ sudo crictl start 37f4d26510965452aa918f04d629f5332a1cd398d4912298c796942e22f964a7 +``` + +To check the container status, run the command: + +``` +$ sudo crictl ps +``` + +To verify that the Apache web server is running, send a HTTP request to the web server using the curl command and the pod’s internal ID. + +``` +$ curl -I 10.85.0.2 +``` + +The following output confirms that the web server is running. + +##### Conclusion + +That’s all from this, guide. We have successfully installed CRI-O on Ubuntu 22.04 and gone ahead to create a pod and container. Your comments and feedback are welcome. + +Also Read: How to Install Docker on Ubuntu 22.04 / 20.04 LTS + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/install-crio-container-runtime-on-ubuntu/ + +作者:[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/ From c18843bd9960d1b58b62625338567dd6df83c048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:46:38 +0800 Subject: [PATCH 158/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230321.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ni?= =?UTF-8?q?xOS=20Series=205=20How=20to=20set=20up=20home-manager=20on=20Ni?= =?UTF-8?q?xOS.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...OS Series 5 How to set up home-manager on NixOS.md | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md diff --git a/sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md b/sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md new file mode 100644 index 0000000000..f08493191c --- /dev/null +++ b/sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md @@ -0,0 +1,285 @@ +[#]: subject: "NixOS Series #5: How to set up home-manager on NixOS?" +[#]: via: "https://itsfoss.com/home-manager-nixos/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +NixOS Series #5: How to set up home-manager on NixOS? +====== + +Before publishing this, I explained how to [install and remove packages in NixOS][1] for a single-user system. + +But if you are running multiple users, there is an excellent way to cater needs of every user separately. + +And in this guide, I will walk you through how you can set up a home manager on NixOS and how it can be used to install packages. + +If you are new here, some resources discussed in this series include: + +- [Reasons to use nixOS][2] +- [Installing NixOS on a virtual machine][3] +- [Things to do after installing NixOS][4] + +### Setup home-manager on NixOS + +In this guide, I will walk you through 2 ways to set up a home manager: + +- Standalone home manager (uses separate config file) +- As a nix module (using it inside `configuration.nix` file) + +So let's start with the standalone option. + +#### Standalone installation of home-manager + +If you are using a stable channel of NixOS, you can use the following command to configure the home manager: + +``` +nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +``` + +While writing this guide, the stable release is `22.11`. + +And **if you are on an unstable channel**, use the following: + +``` +nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +``` + +The following steps will remain the same whether you use stable or unstable. + +Once done, update the channels: + +``` +nix-channel --update +``` + +And finally, use the following command to install the home manager: + +``` +nix-shell '' -A install +``` + +🛠️ While installing, it may throw the following error: + +![building error while installing home manager][5] + +Reboot your system and use the installation command again, and it will start the installation. + +Once done, it will show the location of the standalone installation of the home manager: + +![location of home manager in NixOS][6] + +#### Installing home-manager as a NixOS module + +⚠️ + +You will need sudo privileges if you choose to use the home manager as a NixOS module. + +If you are on a stable channel (while writing, it is 22.11), you can use the following command to add the stable channel of the home manager: + +``` +sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +``` + +And **if you are using unstable or the master channel**, use the following: + +``` +sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +``` + +Once you are done adding a channel by using any of one command shown above, update the channel using the following: + +``` +sudo nix-channel --update +``` + +Next, open the `configuration.nix` file using: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +And add the following line inside the `imports []`: + +``` + +``` + +![install home-manager as NixOS module][7] + +Now, jump to the end of the line and add the following before `}`: + +``` +home-manager.users.{username} = { pkgs, ... }: { + home.packages = [ ]; + }; +``` + +![syantax for home-manager module in NixOS config file][8] + +The above line was added to facilitate installing and removing packages I will show you next. + +Now, [save changes and exit from the nano][9] text editor. + +Next, rebuild the config and make a switch: + +``` +sudo nixos-rebuild switch +``` + +But if you are using stable release and use the above command, it will throw the error saying : + +🛠️ **error: The option `home-manager.users.user.home.stateVersion' is used but not defined:** + +![error: The option `home-manager.users.user.home.stateVersion' is used but not defined.][10] + +To solve this issue, you will have to add the `home.stateVersion` in your home manager block. + +While writing, I'm running 22.11, so the whole home manager block would look like this: + +``` +home-manager.users.{username} = { pkgs, ... }: { +home.stateVersion = "22.11"; +home.packages = [ ]; + }; +``` + +![how to solve The option `home-manager.users.user.home.stateVersion' is used but not defined.][11] + +Save changes and exit from the nano text editor by pressing `Ctrl + O`, hitting enter and `Ctrl + X`. + +Now, try to rebuild the config and make the switch again, and that should solve the issue. + +### How to install packages using home-manager on NixOS + +Now that you have home-manager installed, how to install packages with it: + +#### Using a standalone install of Home-manager + +First, open the configuration file by using the following: + +``` +nano /home/$USER/.config/nixpkgs/home.nix +``` + +Jump to the end of the line and add the following code block before `}`: + +``` +home.packages = []; +``` + +Now, all you have to do is write the package's name between those two braces. + +For example, if I want to install **htop**, I will have to enter the following: + +``` +home.packages = [pkgs.htop]; +``` + +Yes, you will have to usually append the name of the package with `pkgs.` + +But if you want to get away with using `pkgs.` using every time you install a new package, change the syntax of the code block as shown: + +``` +home.packages = with pkgs; []; +``` + +And now, you are no longer required to use `pkgs.` for every installation: + +``` +home.packages = with pkgs; [htop]; +``` + +For example, here, I wanted to install **htop, firefox, and LibreOffice** so my home block would look like this: + +![install multiple packages using home-manager on NixOS][12] + +Once you are done adding your favorite packages, save the config file and use the following command to install packages: + +``` +home-manager switch +``` + +#### Using the NixOS module + +First, open the `configuration.nix` file using the following command: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +In the configuration part, I've already added the home manager block, so all it is left is to add the name of the package inside `home.packages = [  ];` in the shown format: + +``` +home.packages = [ pkgs.package_name ]; +``` + +💡 + +I've mentioned how you can get away with using + +``` +pkgs. +``` + + before the package name in the above section (installing packages on the standalone home manager). + +For example, if I want to [install htop][13], Firefox, and LibreOffice, then I will add: + +``` +pkgs.htop pkgs.firefox pkgs.libreoffice +``` + +And my home manager block would look like this: + +![install multiple packages in home-manager as a NixOS module][14] + +Now, save changes and exit from the text editor. + +Next, rebuild the config and make a switch using the following command: + +``` +sudo nixos-rebuild switch +``` + +That's it! The packages will be installed in no time. + +### 'Tis the end + +I think you should go with the standalone installation, as you are not required to use the superuser privileges. Also, having separate config files for separate users is quite convenient if you run a system with multiple users. + +So unless you want one file for every purpose, I see no other reason to use the module option. + +With this, I conclude the NixOS beginner series. I hope it gets you a good enough platform to get familiar with this unique Linux distribution. + +💬 _How did you like the NixOS series? Is there something else we should cover for NixOS beginners? Please provide your valuable feedback._ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/home-manager-nixos/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/nixos-package-management/ +[2]: https://itsfoss.com/why-use-nixos/ +[3]: https://itsfoss.com/install-nixos-vm/ +[4]: https://itsfoss.com/things-to-do-after-installing-nixos/ +[5]: https://itsfoss.com/content/images/2023/02/building-error-while-installing-home-manager.png +[6]: https://itsfoss.com/content/images/2023/02/location-of-home-manager-in-NixOS.png +[7]: https://itsfoss.com/content/images/2023/02/install-home-manager-as-NixOS-module.png +[8]: https://itsfoss.com/content/images/2023/02/syantax-for-home-manager-module-in-NixOS-config-file.png +[9]: https://linuxhandbook.com/nano-save-exit/?ref=itsfoss.com +[10]: https://itsfoss.com/content/images/2023/02/The-option--home-manager.users.user.home.stateVersion--is-used-but-not-defined..png +[11]: https://itsfoss.com/content/images/2023/02/how-to-solve-The-option--home-manager.users.user.home.stateVersion--is-used-but-not-defined..png +[12]: https://itsfoss.com/content/images/2023/02/install-multiple-packages-using-home-manager-on-NixOS.png +[13]: https://itsfoss.com/use-htop/ +[14]: https://itsfoss.com/content/images/2023/02/install-multiple-packages-in-home-manager-as-a-NixOS-module.png \ No newline at end of file From 64da99c595c23fe6c515462a0742f122d9254f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:47:43 +0800 Subject: [PATCH 159/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230321.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20A?= =?UTF-8?q?=205-minute=20tour=20of=20the=20Fediverse.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2 ⭐️⭐️ A 5-minute tour of the Fediverse.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20230321.2 ⭐️⭐️ A 5-minute tour of the Fediverse.md diff --git a/sources/tech/20230321.2 ⭐️⭐️ A 5-minute tour of the Fediverse.md b/sources/tech/20230321.2 ⭐️⭐️ A 5-minute tour of the Fediverse.md new file mode 100644 index 0000000000..c7237c64a4 --- /dev/null +++ b/sources/tech/20230321.2 ⭐️⭐️ A 5-minute tour of the Fediverse.md @@ -0,0 +1,121 @@ +[#]: subject: "A 5-minute tour of the Fediverse" +[#]: via: "https://opensource.com/article/23/3/tour-the-fediverse" +[#]: author: "Bob Murphy https://opensource.com/users/murph" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A 5-minute tour of the Fediverse +====== + +People want to communicate over the internet as easily as they do in real life, with similar protections but, potentially, farther reach. In other words, people want to be able to chat with a group of other people who aren't physically in the same location, and still maintain some control over who claims ownership of the conversation. In today's world, of course, a lot of companies have a lot to say about who owns the data you send back and forth over the world wide web. Most companies seem to feel they have the right to govern the way you communicate, how many people your message reaches, and so on. Open source, luckily, doesn't need to own your social life, and so appropriately it's open source developers who are delivering a social network that belongs, first and foremost, to you. + +The "Fediverse" (a portmanteau of "federated" and "universe") is a collection of protocols, servers, and users. Together, these form networks that can communicate with one another. Users can exchange short messages, blog-style posts, music, and videos over these networks. Content you post is federated, meaning that once one network is aware of your content, it can pass that content to another network, which passes it to another, and so on. + +Most platforms are run by a single company or organization, a single silo where your data is trapped. The only way to share with others is to have them join that service. + +Federation allows users of different services to inter-operate with one another without creating an account for each shared resource. + +Admins for each service instance can block other instances in case of egregious issues. Users can likewise block users or entire instances to improve their own experience. + +### Examples of Fediverse platforms + +Mastodon is a Fediverse platform that has gotten a lot of attention lately, and it's focused on microblogging (similar to [Twitter][1]). Mastodon is only one component of the Fediverse, though. There's much, much more. + +- Microblogging: Mastodon, Pleroma, Misskey +- Blogging: Write.as, Read.as +- Video hosting: Peertube +- Audio hosting: Funkwhale +- Image hosting: Pixelfed +- Link aggregator: Lemmy +- Event planning: mobilizon, gettogether.community + +### History of the Fediverse + +In 2008, Evan Prodromou created a microblogging service called identi.ca using the Ostatus protocol and status.net server software. A few years later, he changed his service to use a new protocol, called pump.io. He released the Ostatus protocol to the Free Software Foundation, where it got incorporated into GNU/social. In this form, the fediverse continued along for several years. + +In March 2016, Eugen Rochco (Gargron) created Mastodon, which used GNU/social with an interface similar to a popular Twitter interface called Tweetdeck. This gained some popularity. + +![The Fediverse includes Pixelfed, Mastodon, Misskey, Plume, Nextcloud, Castopod, Bookwyrm, and much more.][2] + +In 2018, a new protocol called ActivityPub was accepted as a standardized protocol by the W3C. Most Fediverse platforms have adopted it. It was authored by Evan Prodromou, Christine Lemmer-Weber, and others, and it expanded upon the previous services to provide a better and more flexible protocol. + +### What does the Fediverse look like? + +The Fediverse, being made of any application using the ActivityPub protocol, is pretty diverse in appearance. As you might imagine, a microblogging platform has different requirements than a video sharing service. + +It can be intimidating to wander into the great unknown, though. Here are some screenshots of my favorite federated services: + +The Mastodon web client has a simplified view, as well as the advanced view, the simplified default view shows a single column of the Home feed, with options on the right to view more. + +![The Mastodon web client features a central panel for activity on your curated network.][3] + +The Advanced Web Interface, shown below, has the home timeline, local timeline, federated timeline, as well as a user's profile. When users first start, the easier one-column view is the default. + +![The advanced Mastodon interface has several columns.][4] + +Pixelfed has an interface focused around displaying images and videos: + +![Pixelfed's interface features thumbnails of photographs.][5] + +Peertube is for sharing videos: + +![Peertube's interface features thumbnails of videos you can watch.][6] + +Mobilizon is an event planning site, with plans for Fediverse integration: + +![The Mobilizon interface helps you plan events.][7] + +### Switch to open source social + +Ready to start? Check out fediverse.info for a nice video explanation and a subject-based way to find (self-selected) other users. + +Go to [fedi.tips][8] for a comprehensive guide on how to get started, how to migrate your data, and more. + +Mastodon has several great entry points: + +- [Joinmastodon.org][9]: The largest list of Mastodon servers +- [Joinfediverse.wiki][10]: Great information on different fediverse services and instances +- [Fedi.garden][11]: A well-curated list of instances + +For help deciding which instance to join (assuming you don't want to spin up your own just yet), visit [fediverse.party/en/portal/servers][12]. + +Are you a data nerd? Visit [the-federation.info][13] for stats, monitoring service, and a data-driven look at the known Fediverse. + +### Get federated + +The Fediverse is a way to use the social media in an individualized way, either by choosing an instance with a community that suits your needs, or running your own server, and making it exactly the way you want. It avoids the advertising, algorithms, and other unpleasantries that plague many social networks. + +If you are looking for a community that better suits your needs than the big silos, take a look, the Mastodon and the Fediverse may be a good fit for you. Get federated today. + +You can find me at [@murph@hackers.town][14] on the Fediverse. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/tour-the-fediverse + +作者:[Bob Murphy][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/murph +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/22/11/switch-twitter-mastodon +[2]: https://opensource.com/sites/default/files/2023-02/100000010000045A000004B08541865BBD9D13DE.webp +[3]: https://opensource.com/sites/default/files/2023-02/10000001000005AB000004DB07D4A02485D90B14.webp +[4]: https://opensource.com/sites/default/files/2023-02/10000001000008DE000004569A05D60180F4348D.webp +[5]: https://opensource.com/sites/default/files/2023-02/10000001000004CA00000617FD573CC873BD98E0.webp +[6]: https://opensource.com/sites/default/files/2023-02/10000001000007BE0000048AA0BCF8E824246BCD.webp +[7]: https://opensource.com/sites/default/files/2023-02/100000010000066100000466B5FCB59017E118D7.webp +[8]: https://fedi.tips +[9]: https://joinmastodon.org +[10]: https://joinfediverse.wiki +[11]: https://fedi.garden +[12]: https://fediverse.party/en/portal/servers +[13]: https://opensource.com/the-federation.info +[14]: https://hackers.town/@murph \ No newline at end of file From 9184f64cc66065e4a5a7883683b6f4f3bd97f425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:48:02 +0800 Subject: [PATCH 160/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230321.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ub?= =?UTF-8?q?untu=2023.04=20=E2=80=9CLunar=20Lobster=E2=80=9D=20Best=20New?= =?UTF-8?q?=20Features.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Ubuntu 23.04 “Lunar Lobster” Best New Features.md | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 sources/tech/20230321.3 ⭐️⭐️ Ubuntu 23.04 “Lunar Lobster” Best New Features.md diff --git a/sources/tech/20230321.3 ⭐️⭐️ Ubuntu 23.04 “Lunar Lobster” Best New Features.md b/sources/tech/20230321.3 ⭐️⭐️ Ubuntu 23.04 “Lunar Lobster” Best New Features.md new file mode 100644 index 0000000000..7db1c6f841 --- /dev/null +++ b/sources/tech/20230321.3 ⭐️⭐️ Ubuntu 23.04 “Lunar Lobster” Best New Features.md @@ -0,0 +1,206 @@ +[#]: subject: "Ubuntu 23.04 “Lunar Lobster”: Best New Features" +[#]: via: "https://www.debugpoint.com/ubuntu-23-04-features/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Ubuntu 23.04 “Lunar Lobster”: Best New Features +====== + +**Introducing the latest Ubuntu 23.04 “Lunar Lobster” release, packed with new features and improvements.** + +Ubuntu 23.04, code-named “Lunar Lobster”, is the first short-term release of 2023, and it will be supported for nine months until January 2024. This release is about improving Ubuntu’s core backend and progress work by adopting new packages and technology. In a way, many changes are being baselined as a preparation for next year’s LTS release (Ubuntu 24.04). + +The development cycle is almost complete. As of publishing this, a beta freeze is imminent. So, it’s a good time to explore this release’s new features. + +But before that, a quick look at the upcoming milestones. + +- Beta freeze: March 27, 2023 +- Beta release: March 30, 2023 +- Release candidate: April 13, 2023 +- Final release: April 20, 2023 + +![Ubuntu 23.04 Lunar Lobster Daily Live desktop][1] + +### Ubuntu 23.04: New Features + +#### New desktop installer + +Ubuntu’s new Rust-based desktop installer is finally ready to be experienced in this release. The work was undergone for more than two years. After many obstacles and critical bugs are fixed, it’s now stable enough to be released in the official version. From this release onwards, the good ol’ Ubiquity is replaced by the brand new installer, as shown in the below set of images. + +![New Ubuntu Installer - main page][2] + +![Partition summary page][3] + +![Appearance Changes][4] + +![User information page][5] + +However, as I heard from some sources, the older Uqiuity continues to stay (until next year). But I am not sure entirely how the old installer will kick off. Because the default live medium launches the new installer. + +That being said, if you compare it to the older one, a few changes to the new installer. First of all, the look and feel are more modern compared to old ubiquity dialogues and widget controls. + +The summary details about partitioning are now present as a separate page instead of a pop-up box. + +In addition, Ubuntu 23.04 now asks for the dark/light mode options before installation. I am not sure about the necessity of this since Ubuntu already has some onboarding steps defined in a separate app. + +#### GNOME 44 Desktop + +Ubuntu 23.04 desktop version features GNOME 44. This release of GNOME 44 is bringing a bunch of long pending updates. For example, in this release, you experience the image preview in the native file picker dialog. Furthermore, the Files gets the long-awaited missing feature, i.e. expanded folder (or tree view) view natively. You can enable it using the settings shown below. + +![New expandable folder view][6] + +![Settings to enable tree view][7] + +Other key changes in GNOME 44 include Files now supporting file creation while pasting image data, an improved accessibility settings page for better navigation and a much improved GNOME Web browser. + +You can learn more about GNOME 44 release on my feature highlights page: [GNOME 44 – best features][8]. + +#### Minimal ISO image + +In a surprise move, the Ubuntu team is [introducing][9] an official minimal ISO image (less than 200MB) in this release. Once released, you can use this minimal ISO image to create custom Ubuntu Linux. As of publishing this, we are yet to get the daily build ISO for this minimal image. + +However, the Xubuntu team [already released][10] a minimal ISO image which I tried here. Likewise, all the official flavours are expected to get their own minimal ISO files. + +More information to arrive on this in the coming days. + +#### More Snap and less Flatpak + +A few Snap and Flatpak-related vital changes are coming up, and you should be prepared for that. + +Firstly, the push for more Snap packages is evident as the official Telegram app for desktops is now Snap in Ubuntu. + +Furthermore, Ubuntu plans to release a Steam desktop client as Snap, which is [currently under testing][11]. Snap desktop client is available as native deb and Flatpak packages today. The Steam Snap is expected to arrive by the end of this year and not in this release. + +Alongside this, default Flatpak and Flathub integration is now officially [removed][12] from all the supported official Ubuntu flavours. This decision created quite several “discussions” on the web. + +So, Ubuntu MATE & Kubuntu won’t ship Flatpak/Flathub by default from this release onwards. However, you can always install it with [just a few steps][13]. + +#### New Applications + +The default application stack of Ubuntu 23.04 is upgraded as usual. However, some key changes that you might notice. + +Firstly, LibreOffice might look a bit different. The LibreOffice team recently changed the default icon themes, and it looks awesome in the Ubuntu GNOME’s desktop context. + +The LibreOffice 7.5 included in this release arrives with an improved bookmark module for Writer, new number formats in Calc spreadsheets, new table design styles in Impress and many more. + +You can read more about [LibreOffice 7.5 features here][14]. + +![New LibreOffice Icons][15] + +Summary of other applications in Ubuntu 23.04: + +- [Firefox 111][16] (Snap) +- LibreOffice 7.5 +- Transmission 3.0 +- Shotwell image viewer 0.30 + +#### Official Flavours + +A piece of good news for all educators and students. Edubuntu is [officially coming up][17] from the 23.04 release onwards. It’s another addition to the official Ubuntu flavours list. Edubuntu will likely feature a larger ISO file (around 5 GB) with all the education-related FOSS software installed. I will have a separate article for the review of this flavour. + +In addition, all the respective flavours get their below desktop versions. + +- Kubuntu with [KDE Plasma 5.27][18] +- Xubuntu with [Xfce 4.18][19] +- Ubuntu MATE 23.04 with MATE desktop 1.26.1 +- Lubuntu 23.04 with [LXQt 1.2][20] +- Ubuntu Budgie with Budgie desktop version 10.7 + +Ubuntu Budgie 23.04 is bringing some exciting features such as edge tiling, hot corners, etc. + +#### Kernel & Toolchain updates + +As of writing this, the daily build copy has the Linux Kernel 6.1. However, before the Kernel freeze (April 6, 2023) – the current mainline Kernel 6.2 will likely arrive in Ubuntu 23.04. Linux Kernel 6.2 improves support for GPU, CPU, ports, and Rust updates. + +At the core, Python 3.11 is now available out-of-the-box in Ubuntu 23.04. You don’t need to [install Python 3.11][21] anymore separately. It’s worth mentioning that Python 3.12 release is due this year and currently undergoing multiple RC testing. + +Other toolchain updates are as follows. + +- GCC 13 +- GlibC 2.37 +- Ruby 3.1 +- golang 1.2 +- LLVM 16 + +#### New Wallpapers for Ubuntu 23.04 + +A desktop release never completes with some new cool wallpapers. After the successful [wallpaper competition][22], the winners are selected for default wallpapers featuring the “Lunar & Lobster”. + +Here’s the default one. And the rest of them you can find [here][23]. + +![Ubuntu 23.04 Lunar Lobster Default Wallpaper][24] + +### Download + +The daily build ISO files are present in the below links for Ubuntu desktop and flavours. + +Note that you should not use these as main driver. They have some bugs (at least I found some) and are not entirely stable yet. + +Ubuntu FlavourLink to .iso image(s) – Daily build | +| Ubuntu 23.04 Desktop(GNOME) | [https://cdimage.ubuntu.com/ubuntu/daily-live/pending/][25] | +| Xubuntu 23.04 | [https://cdimage.ubuntu.com/xubuntu/daily-live/current/][26] | +| Ubuntu MATE 23.04 | [https://cdimage.ubuntu.com/ubuntu-mate/daily-live/current/][27] | +| Ubuntu Kylin 23.04 | not available | +| Lubuntu 23.04 | [https://cdimage.ubuntu.com/lubuntu/daily-live/current/][28] | +| Kubuntu 23.04 | [https://cdimage.ubuntu.com/kubuntu/daily-live/current/][29] | +| Ubuntu Budgie 23.04 | [https://cdimage.ubun][30][tu.com/ubuntu-budgie/daily-live/current/][30] | +| Ubuntu Unity 23.04 | [https://cdimage.ubuntu.com/ubuntu-unity/daily-live/current/][31] | +| Edubuntu 23.04 | [https://cdimage.ubuntu.com/edubuntu/daily-live/current/][32] | + +### Wrapping Up + +In conclusion, the new Ubuntu 23.04 release promises to offer desktop users an even smoother and more seamless experience. + +From improved security features to enhanced productivity tools & apps, this update will surely delight Ubuntu enthusiasts & fans. Whether you’re a seasoned user or new to the Ubuntu ecosystem, this release is worth checking out. + +Ubuntu 23.04 releases on April 20, 2023. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/ubuntu-23-04-features/ + +作者:[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/2023/03/Ubuntu-23.04-Lunar-Lobster-Daily-Live-desktop.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2023/03/New-Ubuntu-Installer-main-page.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Partition-summary-page.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/Appearane-changes.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2023/03/User-information-page.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/New-expandable-folder-view.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/Settings-to-enable-tree-view.jpg +[8]: https://www.debugpoint.com/gnome-44/ +[9]: https://debugpointnews.com/ubuntu-mini-iso-announcement/ +[10]: https://www.debugpoint.com/xubuntu-minimal/ +[11]: https://discourse.ubuntu.com/t/steam-call-for-testing/34575 +[12]: https://debugpointnews.com/ubuntu-flavours-flatpak/ +[13]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[14]: https://www.debugpoint.com/libreoffice-7-5/ +[15]: https://www.debugpoint.com/wp-content/uploads/2023/03/New-LibreOffice-Icons.jpg +[16]: https://debugpointnews.com/firefox-111/ +[17]: https://discourse.ubuntu.com/t/announcing-edubuntu-revival/32929 +[18]: https://www.debugpoint.com/kde-plasma-5-27/ +[19]: https://www.debugpoint.com/xfce-4-18-review/ +[20]: https://www.debugpoint.com/lxqt-1-2-0-features/ +[21]: https://www.debugpoint.com/install-python-3-11-ubuntu/ +[22]: https://debugpointnews.com/ubuntu-23-04-wallpaper-competition/ +[23]: https://discourse.ubuntu.com/t/lunar-lobster-23-04-wallpaper-competition/33132 +[24]: https://www.debugpoint.com/wp-content/uploads/2023/03/Ubuntu-23.04-Lunar-Lobster-Default-Wallpapers.jpg +[25]: https://cdimage.ubuntu.com/ubuntu/daily-live/pending/ +[26]: https://cdimage.ubuntu.com/xubuntu/daily-live/current/ +[27]: https://cdimage.ubuntu.com/ubuntu-mate/daily-live/current/ +[28]: https://cdimage.ubuntu.com/lubuntu/daily-live/current/ +[29]: https://cdimage.ubuntu.com/kubuntu/daily-live/current/ +[30]: https://cdimage.ubuntu.com/ubuntu-budgie/daily-live/current/ +[31]: https://cdimage.ubuntu.com/ubuntu-unity/daily-live/current/ +[32]: https://cdimage.ubuntu.com/edubuntu/daily-live/current/ \ No newline at end of file From 93f535fa9b3ab920eea9885bb549ac2762424e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:48:44 +0800 Subject: [PATCH 161/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230322.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=208?= =?UTF-8?q?=20steps=20to=20refurbish=20an=20old=20computer=20with=20Linux.?= =?UTF-8?q?md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...8 steps to refurbish an old computer with Linux.md | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sources/tech/20230322.0 ⭐️⭐️ 8 steps to refurbish an old computer with Linux.md diff --git a/sources/tech/20230322.0 ⭐️⭐️ 8 steps to refurbish an old computer with Linux.md b/sources/tech/20230322.0 ⭐️⭐️ 8 steps to refurbish an old computer with Linux.md new file mode 100644 index 0000000000..07294affac --- /dev/null +++ b/sources/tech/20230322.0 ⭐️⭐️ 8 steps to refurbish an old computer with Linux.md @@ -0,0 +1,140 @@ +[#]: subject: "8 steps to refurbish an old computer with Linux" +[#]: via: "https://opensource.com/article/23/3/refurbish-old-computer-linux" +[#]: author: "Howard Fosdick https://opensource.com/users/howtech" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +8 steps to refurbish an old computer with Linux +====== + +We live in a remarkable era. It wasn't so long ago we were all chained to the "upgrade treadmill," forced to buy expensive new personal computers every few years. + +Today, with the benefit of open source software, you can break out of that cycle. One way is to [refurbish old computers][1] and keep them in service. This article tells you how. + +### 1. Grab an old PC + +Maybe you have an old computer lying unused in the basement or garage. Why not put it to use? + +Or you can get an old machine from a friend, family member, or Craigslist ad. Many electronics recycling centers will let you poke around and take a discarded machine if it fits your fancy. Be sure to grab more than one if you can, as you may need parts from a couple abandoned PCs to build one good one. + +Look at the stickers on the front of the machines to make sure you're selecting good refurbishing candidates. Items with Window 7 and 8 logos run Linux quite well. Extended support ended for 8.1 this January, so I'm seeing a lot of those getting dumped. + +Many of these Windows computers offer perfectly good hardware. They're only being trashed due to planned obsolescence because they can't run Windows 11. They run open source software just fine. + +### 2. Identify and clean everything + +Before you open up your "new" machine to see what you've got, be sure to ground yourself by touching something metal. Even a shock so slight you don't feel it can destroy delicate circuitry. + +You'll instantly see if any parts are missing. Many people take out their disks or sometimes the memory before recycling a computer. You'll either have to acquire more than a single box to cover this, or you'll need to buy a part or two to make it whole. + +Before proceeding further, it's important to give the machine a thorough cleaning. Pay special attention to the CPU complex, the fans, and all surfaces. Remember that you can't rub electronics without risking damage, so use compressed air for cleaning. + +### 3. Ensure all hardware works + +You'll want to verify that all hardware works prior to installing any software. Don't skimp on the testing! It's a huge waste of your time if you find out, for example, that your computer has a transient memory error at a later time because you ran only a short ram test before going to next steps. I find it convenient to run time-consuming tests overnight. + +Most computers have hardware-specific diagnostics built in. You usually access these either through the boot-time UEFI/BIOS panels or by pressing a PF key while booting. If your machine doesn't include testing tools, try [Ultimate Boot Disk][2], which provides tons of useful testing utilities. + +Be sure you test all components thoroughly: + +- Memory +- Disk +- CPU and Motherboard +- Peripherals (USB ports, sound, microphone, keyboard, display, fans, etc) + +If you find problems, download my free [Quick Guide to Fixing Hardware][3]. That plus some searching online enables you to fix just about anything. + +### 4. Prepare the disk + +You've assessed your hardware and have gotten it into good working order. If your computer came with a hard disk drive (HDD), the next step is to ready that for use. + +You need to completely wipe the disk because it could contain illegally obtained movies, music, or software. To thoroughly wipe an HDD, run a tool like [DBAN][4]. After running that, you can rest assured the disk is completely clean. + +If you have a solid state disk (SSD), the situation is a bit trickier. Disk-wipe programs designed to cleanse hard disks don't work with SSDs. You need a specialized _secure erase_ program for an SSD. + +Some computers come with an secure erase utility in their UEFI/BIOS. All you have to do is access the boot configuration panels to run it. + +The other option is the website of the disk manufacturer. Many offer free downloads for secure erase utilities for their SSDs. + +Unfortunately, some vendors don't provide a secure erase utility for some of their consumer drives, while others supply only a Windows executable. For an SSD, [Parted Magic's][5] secure erase function is the best option. + +### 5. Booting, data storage, and backups + +Your disk strategy for your refurbished computer must address three needs: booting, data storage, and backups. + +A few years ago, if your refurbishing candidate contained a disk, it was always a hard drive. You'd wipe it with DBAN, then install your favorite Linux distribution, and use it as both your boot and storage device. Problem solved. + +Today's technology offers better options. These eliminate the slow hard disk access that was previously one of the downsides of using older equipment. + +One option is to buy one of the new low-end SSDs that have become available. These now offer the SATA and external USB interfaces that work with mature computers. + +Prices have plummeted. I recently bought a 480 gig SSD/SATA drive for $25. That's so inexpensive that, even if your old computer came with a hard drive included, you might prefer to buy a new SSD anyway. It boots and accesses data so much faster. + +The lightweight 2.5" SSDs also solve the mounting dilemmas one sometimes faced with old desktops. With a single screw you can attach them almost anywhere. No more messing with rails, cages, and all the other goofy proprietary parts companies used to mount their heavy 3.5" hard drives. + +An alternative to an SSD is to boot off a [USB memory stick][6]. Thumb drives now offer enough space to host any operating system you prefer, while leaving some storage space for your data. Beyond speed, you gain flexibility by keeping your system on a portable device. + +So consider installing your operating system to a fast SSD or USB and booting and running it from that. + +What about other drives? I like to use any hard drive that came with the computer as a backup disk for my boot SSD. Or employ it as mass storage. + +I usually remove the optical drives you find in old desktops. Since USB sticks are faster and hold more data, few people use them anymore. Most now stream their films, music, and software programs instead of collecting them on optical media. + +Removing the optical drive frees up an extra set of disk connectors. It also opens up lots of space in the cabinet and improves air flow. This can make a big difference if you're dealing with small footprint desktops with slimline or mini-tower cases. + +Finally, take a few minutes to decide on your backup strategy. You'll need to back up two separate things: your data and the operating system. + +Will you back up to a second drive inside the PC, a detachable storage device, or cloud services? Your decision helps determine whether you'll need a second disk in your refurbished computer. + +### 6. Select and install software + +Different people have different needs that drive their software selection. Here are some general guidelines. + +If your computer has an Intel i-series processor and at least 4 GB of memory, it can comfortably run nearly any Linux distribution with any [desktop environment (DE)][7]. + +With between two and four gigabytes of memory, install a Linux with a [lightweight interface][8]. This is because high-end display graphics is a big consumer of memory resources. I've found that Linux distros with a DE like XFCE, LXDE, and LXQt work well. + +If you only have a gigabyte of memory, go for an "ultra-light" Linux distribution. This should probably also be your choice if you have an old dual-core CPU or equivalent. + +I've used both [Puppy Linux][9] and [AntiX][10] with great results on such minimal hardware. Both employ lightweight windows managers for their user interface instead of full desktop environments. And both come bundled with apps selected specifically to minimize resource use. + +### 7. Browse the web efficiently + +Web pages have grown dramatically in the past five years. Over half the computer resource many popular websites require is now consumed by advertisements and trackers. So when web surfing, block all those ads and trackers. If you can off-load ad blocking from your browser to your VPN, that's ideal. And don't let those auto-run videos run without your explicit permission. + +Look around to see what browser works best for your equipment. Some are designed with a multi-threading philosophy, which is great if your PC can support it. Others try to minimize overall resource usage. Many people aren't aware that there are [quite a few][11] capable yet minimalist Linux browsers available. In the end, pick the browser that best matches both your equipment and your web surfing style. + +### 8. Have fun + +Whether you want to make use of an old computer sitting in your basement, help the environment by [extending the computer life cycle][12], or just find a free computer, refurbishing is a worthy goal. + +Anyone can succeed at this. Beyond investing your time, the cost is minimal. You're sure to learn a bit while having fun along the way. Please share your own refurbishing tips with everyone in the comments section. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/refurbish-old-computer-linux + +作者:[Howard Fosdick][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/howtech +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/22/10/obsolete-computer-linux-opportunity +[2]: https://www.ultimatebootcd.com/ +[3]: http://rexxinfo.org/howard_fosdick_articles/quick_guide_to_fixing_pc_hardware/Quick_Guide_to_Fixing_Computer_Hardware.html +[4]: https://sourceforge.net/projects/dban/ +[5]: https://partedmagic.com/ +[6]: https://opensource.com/article/20/4/first-linux-computer +[7]: https://opensource.com/article/20/5/linux-desktops#default +[8]: https://opensource.com/article/20/5/linux-desktops#lightweight +[9]: https://puppylinux-woof-ce.github.io/ +[10]: https://antixlinux.com/ +[11]: https://opensource.com/article/19/7/open%20source-browsers +[12]: https://opensource.com/article/19/7/how-make-old-computer-useful-again \ No newline at end of file From 3ccafe2469bae63b9aac53a1da771d4c7c08e776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:49:21 +0800 Subject: [PATCH 162/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230322.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Wh?= =?UTF-8?q?y=20your=20open=20source=20project=20needs=20a=20content=20stra?= =?UTF-8?q?tegy.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ur open source project needs a content strategy.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/talk/20230322.1 ⭐️⭐️ Why your open source project needs a content strategy.md diff --git a/sources/talk/20230322.1 ⭐️⭐️ Why your open source project needs a content strategy.md b/sources/talk/20230322.1 ⭐️⭐️ Why your open source project needs a content strategy.md new file mode 100644 index 0000000000..7ee2ba246f --- /dev/null +++ b/sources/talk/20230322.1 ⭐️⭐️ Why your open source project needs a content strategy.md @@ -0,0 +1,81 @@ +[#]: subject: "Why your open source project needs a content strategy" +[#]: via: "https://opensource.com/article/23/3/open-source-project-content-strategy" +[#]: author: "Emily O'Neill https://opensource.com/users/emilyo" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why your open source project needs a content strategy +====== + +If you search for content strategy in your favorite search engine, I bet that you find that it is a term more strongly associated with marketing content than with technical content. However, a technical content strategy is a powerful way to align stakeholders around content goals for your open source project. In this article, I explore the benefits of technical content strategy and how having one can improve the user and contributor experience of your community projects. + +When developing a content strategy, you should consider your goals. The goals differ depending on the user. For the marketing team, the goal of content strategy is to attract and connect with existing and potential customers by using content. Marketing content strategists aim to engage customers and develop relationships with the brand. + +The goal of technical content strategists is to guide users with technical content that helps them achieve their goals. It should provide them with just enough information to successfully complete their task. + +### Creating a content strategy + +So how do you create a content strategy that helps you achieve your goal? You can do this by having someone on your project take the role of content strategist. Their task is to document what user content is created, where it is published, how users can find it, and how it can be maintained, published, and retired. The content strategy should be available where contributors can find it easily. + +### Content types and publication locations + +The first step to creating content is to get to know the project's audience. Identifying users is best done with all project stakeholders contributing, so there is a shared understanding of who the users are and what their goals are. A tip for open source content strategies is to consider your contributor personas as well as your end-user consumer personas. + +A good content strategy is grounded in meeting the user's needs. The project's content should not tell users everything the content creator knows about something. The content should tell the user just enough to complete a task. When the personas are identified and documented, the strategist considers what types of content help these personas be successful. For example, can the user needs be met completely with microcopy in the user interface, or do they need more detailed documentation? Is the contributor onboarding workflow best demonstrated in a video or a blog with screenshots? + +While considering what content types to create, the strategist also looks at where the content should be published so your personas can easily find it. The strategist needs to consider how content creators should progressively disclose information if it is not possible to keep the user in their context. For example, if the user is struggling to understand a log file, you can link them to more information on the project's documentation website. + +The strategy should give guidance to help decisions about what types of content might best solve the user's problem. The content creator should be challenged to ask themselves what content type best meets the user's needs in the moment. Do they need a new documentation article on the website? Could the user friction point be avoided with a clear error or log message, a better UI label, or other content type? You should make clear that sometimes the answer to a problem isn't always to create more content. + +### Content reviews and retirement + +Now that you have a strategy for what types of content you want and where to publish them, you need to consider governance. The first part of this process is to decide what types of reviews your content requires before publishing. For example, does it require a content plan review, subject matter expert review, editorial review, peer author reviews, or copy reviews. You should also decide how reviews and approvals are tracked. + +The second aspect of governance is to decide on a schedule for retirement or archival of content. The strategist should document how content is reviewed for retirement in the future. You should decide if content needs to be retired annually or before every new version release. You should also consider if the content needs to be accessible in some format for users using older versions. + +If you are creating a content strategy for an existing project, the chances are high that your project already has some content. As part of the creation process, the content strategist should audit this content, and consider if it is still current and useful. If it is out of date, it should be retired or archived. + +### A content strategy is beneficial for everyone + +Now that you have a content strategy for your project, you should see how it benefits your users, contributors, and your project as a whole. + +#### Project end users + +At the heart of the content strategy is the audience. The strategy is centered on the personas interacting with the project. It considers how you can provide them with easily findable information in a consumable format that helps them complete their goals. End users benefit from a content experience that is built around their needs. It should also be self-service so they can solve problems independently. + +#### Contributors + +Content consumers, just like end users, benefit from self-service content. New contributors to the project benefit from content designed to onboard them to the project quickly and with ease. The experienced contributor persona gets content that helps them learn about new features of the project. They can also get help with more technically challenging areas. Contributor personas benefit from having accessible reference information. This information can describe the interfaces and features that are available to them to use, build on, and use to interact with the product or service. + +The contributors to your project are also the people creating the content that your users consume. Content strategy can help them to understand and feel empathy for user personas, their goals, and use cases. Giving contributors a common understanding of the user's content needs and the types of content that satisfies them supports the creation of a consistent content experience. + +Creating a strategy helps all content creators easily understand and align with the content vision. It keeps them focused on creating high-value content that reduces user friction. + +#### Project + +In an ideal world, your project would have all the resources needed to create the ideal content experience for your users as envisioned in your strategy. Unfortunately, we live in the real world with conflicting priorities and resource-constrained projects. The good news is that a user-centered content strategy gives the team a shared vision of the content experience. This strategy helps build a content foundation that the project can iterate with each release. It also helps the team make more informed decisions about content. + +Your project also benefits from accessible documentation that better serves your users. Your content experience helps users recognize and realize the value of what you have created. + +### Implement a content strategy + +Your content strategy should be a living artifact, guiding content decisions for the project. With this in mind, it should be revisited frequently and tweaked to reflect what is working or not working for your users. Keeping it current enhances your content experience and improves its effectiveness in guiding your users to success. + +I believe that the practice of content strategy should be more widely adopted in the technical world as it is a powerful tool. It can help you create a better experience for all of your users. The experience should consider each user's needs, workflow, pain points, and emotions. This helps projects deliver the right content in the right place at the right time. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/open-source-project-content-strategy + +作者:[Emily O'Neill][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/emilyo +[b]: https://github.com/lkxed/ From 975260ff5f08f794d28557bc2cfad97b17910755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:49:58 +0800 Subject: [PATCH 163/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230323.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20A?= =?UTF-8?q?=20Screenshot=20Tour=20&=20Walkthrough=20of=20New=20Ubuntu=20In?= =?UTF-8?q?staller.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...shot Tour & Walkthrough of New Ubuntu Installer.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/tech/20230323.0 ⭐️⭐️ A Screenshot Tour & Walkthrough of New Ubuntu Installer.md diff --git a/sources/tech/20230323.0 ⭐️⭐️ A Screenshot Tour & Walkthrough of New Ubuntu Installer.md b/sources/tech/20230323.0 ⭐️⭐️ A Screenshot Tour & Walkthrough of New Ubuntu Installer.md new file mode 100644 index 0000000000..edf2039ef6 --- /dev/null +++ b/sources/tech/20230323.0 ⭐️⭐️ A Screenshot Tour & Walkthrough of New Ubuntu Installer.md @@ -0,0 +1,118 @@ +[#]: subject: "A Screenshot Tour & Walkthrough of New Ubuntu Installer" +[#]: via: "https://www.debugpoint.com/new-ubuntu-installer/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A Screenshot Tour & Walkthrough of New Ubuntu Installer +====== + +**Screenshot tour & highlights of the new Ubuntu desktop installer – Subiquity.** + +Ubuntu developers have worked on the new Rust-based Ubuntu installer for over two years. The goal was to replace the good old ubiquity installer with a modern application. The primary reason is code maintainability, while Rust provides a better alternative. + +However, the installer never made it to the final release until now. The new installer debuts in the Ubuntu 23.04 “Lunar Lobster” release (upcoming). + +In this article, we will walk you through the new Ubuntu installer “subiquity” and show you how to install Ubuntu with ease. + +### Introduction to the New Ubuntu Installer + +If you compare it with the current installer, the new Ubuntu installer has undergone a complete redesign visually. The new installer is more user-friendly and intuitive, making it easier for users to install Ubuntu. The installer also features improved language support, partitioning options, and a more streamlined installation process. + +As of the current version, there are total 8 steps before installation starts. A “preview/next” based wizard will guide you through the installation process. + +From the LIVE medium, upon selecting the “try or install ubuntu” from the grub menu, the new installer launches. On the first screen, you need to select the language. + +If you are seeing it for the first time, you might notice the look and feel is now more “flat” alongside control buttons and widgets. This design aligns with the current Ubuntu default theme. + +![New Ubuntu installer - First Screen][1] + +So, once you select the language, you get two options. To start the installation, you can select the “Install Ubuntu” option. Or, you can “Try Ubuntu”, which will take you straight to the live desktop. + +You can also launch the installer from the left dock icon later. + +![Option to try or install][2] + +Let’s go ahead and install. + +On the second page, you need to select your keyboard layout. You also have the option to auto-detect the keyboard. + +![Detect Keyboard Layout][3] + +The installer will ask you to connect to the internet on the next installation page. Functionality-wise, this is also common with the earlier Ubiquity installer. + +![Connecting to internet][4] + +The following screen lets you choose the type of Ubuntu install you want to perform. You can go either for “Normal” installation or choose the “Minimal” option. Also, you have options to install the proprietary packages. + +![Choose the type of install][5] + +The partitioning page is very nice and clean. It offers more flexible disk partitioning options. Furthermore, you can also choose to install Ubuntu alongside another operating system or erase the entire disk and install Ubuntu as the sole operating system. You can also choose to manually partition the disk if you prefer. + +If you are using in an unformatted disk, you can create a partition table. Also, you can add partitions, delete them and assign mount points for installation. + +It’s really good to see a simpler approach for complex settings (compared to the Anaconda installer). + +![Partition page 1][6] + +![Partition page 2][7] + +A summary page will give you an overview of the complete partition information before it has been written to disk. Once you hit install, the changes will be written to disk. + +The new installer will take you through a few additional pages, such as location and user information. + +![Select yout time zone][8] + +The new Ubuntu installer makes it easy to set up your user account. You can enter your name, username, and password. You can also choose to set active directory if you are using the device in your local LAN setup or you are setting it up for your organization. + +![User information][9] + +There is an additional new page to select light and dark themes for your Ubuntu desktop. I am not entirely sure why this setting is needed for installation, but it should have been in the welcome app. + +![Choose light or dark theme][10] + +And finally, the installation starts with some feature highlights of the release. + +![Installation is in progress][11] + +In the end, you get a sleek completion message showing that it has been installed. + +![Installation complete][12] + +After the restart, you will need to perform some post-installation setup tasks. The existing onboarding app makes it easy to set up your system by guiding you through the process. You can set up your online accounts and privacy settings and perform other tasks as needed. + +### Conclusion + +Overall the new installer remains almost the same functionally. However, with improved looks and under-the-hood performance, updates for Rust are visible. I think the old Ubiquity was a little slower in performance, and sometimes it took a couple of minutes while doing partitions. This has been significantly improved in the new installer. + +It’s a great addition to the [Ubuntu 23.04 release][13]. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/new-ubuntu-installer/ + +作者:[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/2023/03/New-Ubuntu-installer-First-Screen.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2023/03/Option-to-try-or-install.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2023/03/Detect-Keyboard-Layout.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/03/Connecting-to-internet.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2023/03/Choose-the-ype-of-install.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2023/03/Partition-page-1.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/03/Partition-page-2.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2023/03/Select-yout-time-zone.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/User-information.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2023/03/Choose-light-or-dark-theme.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2023/03/Installation-is-in-progress.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2023/03/Installation-complete.jpg +[13]: https://www.debugpoint.com/ubuntu-23-04-features/ \ No newline at end of file From d1f1dbc6916e93016dbc2f0651e0d7d65ef625c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:51:12 +0800 Subject: [PATCH 164/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230323.1=20=E2=AD=90=EF=B8=8F=20Terminal=20Basics=20?= =?UTF-8?q?6=20Delete=20Files=20and=20Folders=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Basics 6 Delete Files and Folders in Linux.md | 223 ++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 sources/tech/20230323.1 ⭐️ Terminal Basics 6 Delete Files and Folders in Linux.md diff --git a/sources/tech/20230323.1 ⭐️ Terminal Basics 6 Delete Files and Folders in Linux.md b/sources/tech/20230323.1 ⭐️ Terminal Basics 6 Delete Files and Folders in Linux.md new file mode 100644 index 0000000000..25407a3917 --- /dev/null +++ b/sources/tech/20230323.1 ⭐️ Terminal Basics 6 Delete Files and Folders in Linux.md @@ -0,0 +1,223 @@ +[#]: subject: "Terminal Basics #6: Delete Files and Folders in Linux" +[#]: via: "https://itsfoss.com/delete-files-folders-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Terminal Basics #6: Delete Files and Folders in Linux +====== + +In the earlier chapters of the Terminal Basics series, you learned to [create new files][1] and directories (folders). + +Let's now see how you can delete files and folders in the Linux terminal. + +### Deleting files + +To remove files, you can use the rm command in the following fashion: + +``` +rm filename_or_path +``` + +You won't see any output if the file is successfully deleted. + +Here's an example where I removed one of the files named `new_file`. When I list the directory contents, you can see that `new_file` no longer exists. + +![Removing files in Linux terminal][2] + +You can also remove multiple files in the same command: + +``` +rm file1 file2 file3 +``` + +Let me show an example of deleting two files in a single command. + +![Deleting multiple files in single rm command][3] + +#### 🏋️Exercise file deletion + +Let's practice what you just learned. Create a directory named practice_delete and switch to it: + +``` +mkdir practice_delete && cd practice_delete +``` + +Now create a few empty files: + +``` +touch file1 file2 file3 +``` + +Delete the file3: + +``` +rm file3 +``` + +Now, let's do something extra. Run this command and change the permission on file2: + +``` +chmod u-w file1 file2 +``` + +Try deleting file2 now: + +``` +rm file2 +``` + +Do you see a message '**remove write protected file**'? That's because you removed the write permission (for modification) from this file. + +You can **press Y or enter key to confirm the deletion or N to deny the removal.** + +If you don't want to see this message and still delete it, you can use the force delete option `-f`. Try it by deleting `file1`: + +``` +rm -f file1 +``` + +Here's a replay of all the above examples to help you: + +![Deleting files in Linux terminal][4] + +> 🚧 There is no trash bin in the Linux command line. Once the file is deleted, you cannot undo the action to bring it back from the trash bin as you do in the graphical file manager. For this reason, be extra careful while deleting the files. + +#### Remove but with caution + +The lack of trash bin makes the deletion a permanent jobs of sort. This is why you should be careful about what files are you deleting. + +There is an interactive mode with option `-i`. With this, you'll be asked to confirm the deletion. + +``` +rm -i filename +``` + +This is helpful when you are deleting several files based on a certain pattern. + +Here's an example where I am interactively deleting all the files that match file_ pattern in their name. I delete some and keep some in the interactive mode. + +![Deleting files in interactive mode][5] + +> 💡 I advise switching to the directory where the files are located and then removing them. This helps in reducing any potential caused by a typo in file path. + +### Deleting directories + +There is a dedicated rmdir command to remove directories in Linux. + +``` +rmdir dir_name +``` + +However, it can only delete empty directories. If the directory has any files or subdirectories in it, the rmdir command will throw error. + +``` +[email protected]:~/practice_delete$ rmdir dir2 +rmdir: failed to remove 'dir2': Directory not empty +``` + +And that makes it less useful in most cases. + +So, how do you delete a non-empty folder then? Well, you use the same rm command that you used earlier for removing files. + +Yes, the same rm command but with the recursive option `-r`: + +``` +rm -r dir_name +``` + +#### 🏋️Exercise folder deletion + +Let's practice what you learned. + +Switch to practice_delete folder if you are not already there. Now, create two directories dir1 and dir2. + +``` +mkdir dir1 dir2 +``` + +Create a file in dir2: + +``` +touch dir2/file +``` + +Now try deleting the directories using the rmdir command: + +``` +rmdir dir1 +``` + +``` +rmdir dir2 +``` + +Since the dir2 is not empty, rmdir command will fail. Instead, use the rm command with recursive option: + +``` +rm -r dir2 +``` + +Here's a replay of all the above command examples to help you out: + +![Deleting folders in Linux][6] + +> 💡 The interactive deletion mode is even more helpful while deleting a directory with the recursive option of the rm command: + +``` +rm-ri dir_name +``` + +So, you learned to delete files and folders both using Linux commands. It's time to practice some more. + +### Test your knowledge + +Prepare a directory tree that looks like this: + +``` +. +├── dir1 +│   ├── file1 +│   ├── file2 +│   └── file3 +├── dir2 +├── dir3 +└── file +``` + +Basically, you create a file named file and three directories dir1, dir2 and dir3 in the current directory (practice_delete). And then you create files file1, file2 and file3 in dir1. + +Now do the following: + +- Delete `file2`. +- Switch to the `dir3` and force delete the file named `file` in the upper directory. +- Delete all the contents of dir1 but not the directory itself. +- List the contents of the `dir`. + +I encourage you to discuss the practice questions in the [It's FOSS community forum][7]. + +This is going good. You have learned several basic things like switching directories, checking contents of directory, creating and deleting files and directories. In the next chapter, you'll learn about copying files and folders in the terminal. Stay tuned! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/delete-files-folders-linux/ + +作者:[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/create-files/ +[2]: https://itsfoss.com/content/images/2023/03/delete-files-linux-terminal.png +[3]: https://itsfoss.com/content/images/2023/03/remove-multiple-files-linux-terminal.png +[4]: https://itsfoss.com/content/images/2023/03/file-delete-example.svg +[5]: https://itsfoss.com/content/images/2023/03/interactive-delete-example.svg +[6]: https://itsfoss.com/content/images/2023/03/folder-delete-example.svg +[7]: https://itsfoss.community/?ref=itsfoss.com From a538960ed54e81db36afde6847c85901485a4cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 00:51:44 +0800 Subject: [PATCH 165/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230323.2=20=E2=AD=90=EF=B8=8F=203=20surprising=20thi?= =?UTF-8?q?ngs=20Linux=20sysadmins=20can=20do=20with=20systemd.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... things Linux sysadmins can do with systemd.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20230323.2 ⭐️ 3 surprising things Linux sysadmins can do with systemd.md diff --git a/sources/tech/20230323.2 ⭐️ 3 surprising things Linux sysadmins can do with systemd.md b/sources/tech/20230323.2 ⭐️ 3 surprising things Linux sysadmins can do with systemd.md new file mode 100644 index 0000000000..8557940d8f --- /dev/null +++ b/sources/tech/20230323.2 ⭐️ 3 surprising things Linux sysadmins can do with systemd.md @@ -0,0 +1,102 @@ +[#]: subject: "3 surprising things Linux sysadmins can do with systemd" +[#]: via: "https://opensource.com/article/23/3/3-things-you-didnt-know-systemd-could-do" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +3 surprising things Linux sysadmins can do with systemd +====== + +When it first started out, there was a lot of press about systemd and its ability to speed up boot time. That feature had a mostly-universal appeal (it's less important to those who don't reboot), so in many ways, that's the reputation it still has today. And while it's true that systemd is the thing that launches services in parallel during startup, there's a lot more to it than that. Here are three things you may not have realized systemd could do but should be taking advantage. Get more tips from our new downloadable eBook, **[A pragmatic guide to systemd][1]**. + +### 1. Simplify Linux ps + +If you've ever used the `ps` or even just the `top` command, then you know that your computer is running hundreds of processes at any given moment. Sometimes, that's exactly the kind of information you need in order to understand what your computer, or its users, are up to. Other times, all you really need is a general overview. + +The `systemd-cgtop` command provides a simple view of your computer's load based on the cgroups (control groups) tasks have been arranged into. [Control groups][2] are important to modern Linux, and are essentially the support structures underneath containers and Kubernetes (which in turn are why the cloud scales the way it does), but also they're useful constructs on your home PC. For instance, from the output of `systemd-cgtop`, you can see the load of your user processes as opposed to system processes: + +``` +Control Group Proc+ %CPU Memory Input/s Output/s +/ 183 5.0 1.6G 0B 3.0M +user.slice 4 2.8 1.1G 0B 174.7K +user.slice/user-1000.slice 4 2.8 968.2M 0B 174.7K +system.slice 65 2.2 1.5G 0B 2.8M +``` + +You can also view just your userspace processes, or just your userspace processes and kernel threads. + +This isn't a replacement for `top` or `ps` by any means, but it's an additional view into your system from a different and unique angle. And it can be vital when running containers, because containers use cgroups. + +### 2. Linux cron + +[Cron][3] is a classic component of Linux. When you want to schedule something to happen on a regular basis, you use cron. It's reliable and pretty well integrated into your system. + +The problem is, cron doesn't understand that some computers get shut down. If you have a cronjob scheduled for midnight, but you turn your computer off at 23:59 every day, then your cronjob never runs. There's no facility for cron to detect that there was a missed job overnight. + +As an answer to that problem, there's the excellent [anacron][4], but that's not quite as integrated as cron. There's a lot of setup you have to do to get anacron running. + +A second alternative is systemd timers. Like cron, it's already built in and ready to go. You have to write a unit file, which is definitely more lines than a one-line crontab entry, but it's also pretty simple. For instance, here's a unit file to run an imaginary backup script 30 minutes after startup, but only once a day. This ensures that my computer gets backed up, and prevents it from trying to backup more than once daily. + +``` +[Unit] +Description=Backup +Requires=myBackup.service + +[Timer] +OnBootSec=30min +OnUnitActiveSec=1d + +[Install] +WantedBy=timers.target +``` + +You can, of course, intervene and prompt a job to run with . Thanks to the `OnUnitActiveSec` directive, systemd doesn't attempt to run a job you've manually activated. + +### 3. Run Linux containers + +Containers make starting up a complex service really easy. You can run a [Mattermost][5] or Discourse server in mere minutes. The hard part, in some cases, is managing and monitoring the containers once you have them running. Podman makes it easy to manage them, but what do use to manage Podman? Well, [you can use systemd][6]. + +Podman has a built-in command to generate unit files so your containers can be managed and monitored by systemd: + +``` +$ podman generate systemd --new --files --name example_pod +``` + +All you have to do then is start the service: + +``` +$ systemctl --user start pod-example_pod.service +``` + +As with any other service on your computer, systemd ensures that your pod runs no matter what. It logs problems, which you can view with `journalctl` along with your other essential logs, and you can monitor its activity within cgroups using `systemd-cgtop`. + +It's no [Kubernetes platform][7], but for one or two containers that you just want to have available on a reliable and predictable basis, Podman and systemd are an amazing pair. + +### Download the systemd eBook + +There's a lot more to systemd, and you can learn the basics, along with lots of useful and pragmatic tips, from author [David Both][8] in his new complimentary **[pragmatic guide to systemd][1]**. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/3-things-you-didnt-know-systemd-could-do + +作者:[Alan Smithee][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/alansmithee +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/downloads/pragmatic-guide-systemd-linux +[2]: https://www.redhat.com/sysadmin/cgroups-part-four?intcmp=7013a000002qLH8AAM +[3]: https://opensource.com/article/17/11/how-use-cron-linux +[4]: https://opensource.com/article/21/2/linux-automation +[5]: https://opensource.com/education/16/3/mattermost-open-source-chat +[6]: https://www.redhat.com/sysadmin/podman-run-pods-systemd-services?intcmp=7013a000002qLH8AAM +[7]: https://www.redhat.com/en/technologies/cloud-computing/openshift/aws?intcmp=7013a000002qLH8AAM +[8]: https://opensource.com/users/dboth \ No newline at end of file From c383d46d6e97327cb23a1ad36ac1a5db1c7717e2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 24 Mar 2023 08:49:46 +0800 Subject: [PATCH 166/318] trtanslated --- ...ow to know if You are Behind a Proxy Server.md | 144 ----------------- ...ow to know if You are Behind a Proxy Server.md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md create mode 100644 translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md diff --git a/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md b/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md deleted file mode 100644 index 8b6121ea60..0000000000 --- a/sources/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: subject: "How to know if You are Behind a Proxy Server?" -[#]: via: "https://itsfoss.com/check-proxy-server/" -[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to know if You are Behind a Proxy Server? -====== - -**What is a proxy?** - -A proxy is a server or software application that acts as an intermediary between a client and another server. It serves as a gateway between the client and the internet and allows users to access online resources while keeping their identity, location, and other personal information hidden. - -Proxies are often used to enhance security, privacy, and add filters/firewall to your network. - -There are several types of proxies like HTTP Proxy, SOCKS Proxy, Transparent Proxy, etc. - -Unless you are behind a transparent proxy, it is effortless to check. Here, I shall discuss methods to detect both the transparent proxy and the usual proxies in use. - -### How to check if you are behind a Transparent proxy - -While each type of proxy has its features and functionalities, if it's a transparent proxy, you won't be able to detect it on the client's PC. This is because the transparent proxy operates silently in the background, intercepting all traffic without modifying it. - -Occasionally, it could be your internet service provider and the Content Delivery Networks that use these to cache a copy of a resource to save bandwidth on their end or just to monitor/filter the network. - -There are several ways to check if you are behind a transparent proxy: - -- **The IP address obtained through some online IP detect/check websites may not match the IP address of your computer or device.** Because the proxy server is intercepting your traffic and sending it out with its IP address. -- **Check your network settings to see if there is a proxy server configured.** -- **Take the help of some online Proxy detection tools.** -- **Connect to a server that you know does not exist.** If the error displayed on the webpage looks different from usual, you might be behind a proxy. - -Whether you like it or not, you can always bypass the transparent proxy using a [VPN service][1]. - -### How to check if you are behind a proxy on Ubuntu - -Ubuntu, or any other Linux distribution, offers several ways to check this. Here, Ubuntu 22.10 running GNOME is used for the purpose. - -#### Using GNOME Settings - -This is the straightforward GUI way. Open the GNOME settings and go to the Networks tab and press the gear icon, adjacent to it. - -![Select the gear icon adjacent to the Network proxy section][2] - -It should be **off by default**. - -If you are behind a proxy, you can get a different status here. Inside the proxy settings, you can see that, I am using a proxy here (manually configured). - -![Proxy details in GNOME Settings][3] - -The same status of proxies can be changed using the gsettings command in GNOME DE. - -``` -gsettings set org.gnome.system.proxy mode 'none' -``` - -You can replace the `none` with `auto` or `manual`. Remember that, this setting is temporary and only for the current user. - -#### Using the Command line - -You can get the status of proxies through the command line in various ways. - -**Getting the status of the proxy by listing the associated environment variables** - -Open a terminal and run either of the following commands: - -``` -env | grep -i proxy -``` - -``` -cat /etc/environment | grep -i proxy -``` - -``` -set | grep -i proxy -``` - -![Using set command to check Proxy variables][4] - -An empty output means that, there are no proxies configured. Else, it will print the relevant ENV variables. - -🚧 - -Note that this will work if you set the proxy as an environment variable. - -Alternatively, you can echo each proxy variable to check whether that particular one is set. - -Here's what you can type in the terminal: - -``` -echo $http_proxy -``` - -**Check using nmcli command** - -Open a terminal and issue the command: - -``` -nmcli connection show -``` - -![List all the connections using nmcli command][5] - -This will list your connections and the associated UUID numbers. Note the UUID number of the connection, you want to check. Then use the command: - -``` -nmcli connection show | grep -i "proxy" -``` - -This will list the variables, where, you can note the proxy server and the port. - -![Proxy details using nmcli command][6] - -### Wrapping Up - -I hope this guide helps you know if you are behind a proxy. - -I must mention that **not all proxy configurations are malicious.** - -However, it is important to know whether your system has a proxy configured or not. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/check-proxy-server/ - -作者:[Sreenath][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sreenath/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/best-vpn-linux/ -[2]: https://itsfoss.com/content/images/2023/02/select-the-gear-icon-adjacent-to-proxy.png -[3]: https://itsfoss.com/content/images/2023/02/Proxy-in-GNOME-settings.png -[4]: https://itsfoss.com/content/images/2023/02/set_grep_proxy.png -[5]: https://itsfoss.com/content/images/2023/02/nmcli-connection-show.png -[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png \ No newline at end of file diff --git a/translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md b/translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md new file mode 100644 index 0000000000..33e1fb4ca2 --- /dev/null +++ b/translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md @@ -0,0 +1,145 @@ +[#]: subject: "How to know if You are Behind a Proxy Server?" +[#]: via: "https://itsfoss.com/check-proxy-server/" +[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何知道你是否使用了代理服务器? +====== + +**什么是代理?** + +代理是充当客户端和另一台服务器之间的中介的服务器或软件应用。它充当客户端和互联网之间的网关,允许用户访问在线资源,同时隐藏他们的身份、位置和其他个人信息。 + +代理通常用于增强安全性和隐私,并为你的网络添加过滤器/防火墙。 + +有几种类型的代理,如 HTTP 代理、SOCKS 代理、透明代理等。 + +除非你在透明代理后面,否则检查起来毫不费力。在这里,我将讨论检测透明代理和常用代理的方法。 + +### 如何检查你是否在透明代理后面 + +虽然每种类型的代理都有其特性和功能,但如果它是透明代理,你将无法在客户端的 PC 上检测到它。这是因为透明代理在后台静默运行,拦截所有流量而不修改它。 + +有时,可能是你的互联网服务提供商和内容交付网络使用它们来缓存资源的副本以节省带宽或只是为了监视/过滤网络。 + + +有几种方法可以检查你是否在透明代理后面: + +- **通过某些在线 IP 检测/检查网站获得的 IP 地址可能与你的计算机或设备的 IP 地址不匹配**。因为代理服务器正在拦截你的流量并将其与 IP 地址一起发送出去。 +- **检查你的网络设置以查看是否配置了代理服务器。** +- **借助一些在线代理检测工具。** +- **连接到你知道不存在的服务器。**如果网页上显示的错误看起来与平时不同,你可能使用了代理。 + +无论你喜欢与否,你始终可以使用 [VPN 服务][1]绕过透明代理。 + +### 如何检查你是否在 Ubuntu 上使用代理 + +Ubuntu 或任何其他 Linux 发行版提供了多种检查方法。此处使用运行 GNOME 的 Ubuntu 22.10。 + +#### 使用 GNOME 设置 + +这是直接的 GUI 方式。打开 GNOME 设置并转到“网络”选项卡,然后按旁边的齿轮图标。 + +![Select the gear icon adjacent to the Network proxy section][2] + +它应该**默认关闭**。 + +如果你在代理后面,你可以在这里获得不同的状态。在代理设置中,你可以看到,我在这里使用了代理(手动配置)。 + +![Proxy details in GNOME Settings][3] + +可以使用 GNOME 桌面中的 gsettings 命令更改相同的代理状态。 + +``` +gsettings set org.gnome.system.proxy mode 'none' +``` + +你可以将 `none` 替换为 `auto` 或 `manual`。请记住,此设置是临时的,仅适用于当前用户。 + +#### 使用命令行 + +你可以通过命令行以多种方式获取代理的状态。 + +**通过列出关联的环境变量获取代理的状态** + +打开终端并运行以下任一命令: + +``` +env | grep -i proxy +``` + +``` +cat /etc/environment | grep -i proxy +``` + +``` +set | grep -i proxy +``` + +![Using set command to check Proxy variables][4] + +空输出意味着没有配置代理。否则,它将打印相关的环境变量。 + +🚧 + +请注意,如果你将代理设置为环境变量,这将起作用。 + +或者,你可以回显每个代理变量以检查是否设置了特定的代理变量。 + +以下是你可以在终端中输入的内容: + +``` +echo $http_proxy +``` + +**使用 nmcli 命令检查** + +打开终端并输入: + +``` +nmcli connection show +``` + +![List all the connections using nmcli command][5] + +这将列出你的连接和关联的 UUID 编号。记下要检查的连接的 UUID 编号。然后使用命令: + +``` +nmcli connection show | grep -i "proxy" +``` + +这将列出变量,你可以在其中记下代理服务器和端口。 + +![Proxy details using nmcli command][6] + +### 总结 + +我希望本指南可以帮助你了解你是否在使用代理。 + +我必须提一下,**并非所有代理配置都是恶意的。** + +但是,了解你的系统是否配置了代理很重要。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/check-proxy-server/ + +作者:[Sreenath][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/sreenath/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/best-vpn-linux/ +[2]: https://itsfoss.com/content/images/2023/02/select-the-gear-icon-adjacent-to-proxy.png +[3]: https://itsfoss.com/content/images/2023/02/Proxy-in-GNOME-settings.png +[4]: https://itsfoss.com/content/images/2023/02/set_grep_proxy.png +[5]: https://itsfoss.com/content/images/2023/02/nmcli-connection-show.png +[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png \ No newline at end of file From 43f46d245d170581761f273ed4356b5bd781085c Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 24 Mar 2023 08:52:00 +0800 Subject: [PATCH 167/318] translating --- ...230315.2 ⭐️ How to set up your own open source DNS server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md b/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md index fee3741dd2..efe03de0d5 100644 --- a/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md +++ b/sources/tech/20230315.2 ⭐️ How to set up your own open source DNS server.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/open-source-dns-server" [#]: author: "Amar Gandhi https://opensource.com/users/amar1723" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a3fad5efe4662f98076c5d186c07a50ca2e0f900 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Fri, 24 Mar 2023 13:18:37 +0800 Subject: [PATCH 168/318] =?UTF-8?q?Update=2020230227.1=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=E2=AD=90=EF=B8=8F=20Essential=20tips=20and=20tricks?= =?UTF-8?q?=20for=20your=20first=20tech=20job.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XiaotingHuang22 is translating. 任务申领。 --- ...️⭐️ Essential tips and tricks for your first tech job.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md b/sources/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md index cf1478f955..a7a9f31537 100644 --- a/sources/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md +++ b/sources/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/2/your-first-tech-job" [#]: author: "Fatima https://opensource.com/users/ftaj" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -136,11 +136,11 @@ via: https://opensource.com/article/23/2/your-first-tech-job 作者:[Fatima][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/ftaj [b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/21/5/open-source-burnout \ No newline at end of file +[1]: https://opensource.com/article/21/5/open-source-burnout From a8f8eede088e463765ce9beebb7f95fe4937b688 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 24 Mar 2023 17:07:28 +0800 Subject: [PATCH 169/318] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XiaotingHuang22 https://linux.cn/article-15656-1.html 翻译用心了 👍 --- ...ut computers with this Raspberry Pi kit.md | 130 +++++++++++++++ ...ut computers with this Raspberry Pi kit.md | 148 ------------------ 2 files changed, 130 insertions(+), 148 deletions(-) create mode 100644 published/20210906 Learn everything about computers with this Raspberry Pi kit.md delete mode 100644 translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md diff --git a/published/20210906 Learn everything about computers with this Raspberry Pi kit.md b/published/20210906 Learn everything about computers with this Raspberry Pi kit.md new file mode 100644 index 0000000000..faa63fd66b --- /dev/null +++ b/published/20210906 Learn everything about computers with this Raspberry Pi kit.md @@ -0,0 +1,130 @@ +[#]: subject: "Learn everything about computers with this Raspberry Pi kit" +[#]: via: "https://opensource.com/article/21/9/raspberry-pi-crowpi2" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15656-1.html" + +用 CrowPi 树莓派套件了解关于计算机的一切 +====== + +> CrowPi 是一个超棒的树莓派项目系统,安装在一个笔记本电脑般的外壳里。 + +![][0] + +我喜欢历史,也喜欢计算机,因此相比于计算机如何变成个人配件,我更喜欢听它在成为日常家用电器前的故事。[我经常听到的一个故事][2] 是很久以前(反正在计算机时代算久远了)的计算机是多么的简单。事实上,它们简单到对于一个好奇的用户来说,弄清楚如何编程并不是十分困难。再看看现代计算机,它具有面向对象的编程语言、复杂的 GUI 框架、网络 API、容器等,但愈发令人担忧的是,计算工具正变得越来越难懂,对于那些没有接受过专门培训的人来说基本上无法使用。 + +从树莓派在 2012 年发布之日起,它就一直被定位为一个教育平台。一些第三方供应商通过附加组件和培训套件支持树莓派,以帮助所有年龄段的学习者探索编程、物理计算和开源。然而,直到最近,很大程度上还是要由用户来弄清楚市场上的所有部件如何组合在一起,直到我最近买了 CrowPi。 + +![CrowPi 不是一个笔记本电脑][3] + +### CrowPi2 介绍 + +乌鸦是非常聪明的鸟。它们能识别并记住面孔,模仿听到的声音,解决复杂的谜题,甚至使用工具来完成任务。CrowPi 使用乌鸦作为其徽标和名字是恰当的,因为这个设备充满了探索、实验、教育的机会,最重要的是,充满了乐趣。 + +其设计很巧妙:它看起来像笔记本电脑,但远不止于此。当你从机壳中取出蓝牙键盘时,它会显示一个隐藏的电子设备工坊,配有 LCD 屏幕、16 个按钮、刻度盘、RFID 传感器、接近传感器、线路板、扬声器、GPIO 连接、LED 阵列等等。_而且这一切都是可编程的。_ + +顾名思义,该装置本身完全由树莓派提供支持,它牢固地固定在机壳底部。 + +![CrowPi 的树莓派板][5] + +默认情况下,你应该用电源适配器为设备充电,包装附带一个壁式插头,你可以将其插入机壳,而不是直接为树莓派供电。你还可以使用插入外部微型 USB 端口的电池电源。机壳内甚至还有一个抽屉,方便你存放电池。这样做的时候,有一根 USB 线从电池抽屉中弹出,并插入机壳电源端口,因此你不会产生这是一台“普通”笔记本电脑的错觉。然而,这样一台设备能够有如此美观的设计已经很理想了! + +### 首次启动系统 + +CrowPi2 提供一张安装了 Raspbian 系统,贴有 “System” 标签的 microSD 卡,不过它同时还提供了装载 [RetroPie][6] 的第二张 microSD 卡。作为一个负责任的成年人(咳咳),我自然是先启动了 RetroPie。 + +RetroPie 总是很有趣,CrowPi2 附带两个超任风格的游戏控制器,确保你能获得最佳的复古游戏体验。 + +令人赞叹不已的是,启动实际的 Raspbian 系统的过程同样有趣,甚至可以说更有趣。它的登录管理器是一个自定义项目中心,有一些快速链接,如编程示例项目、Python 和 Arduino IDE、Scratch、Python 示例游戏、Minecraft 等。你也可以选择退出项目中心,只使用桌面。 + +![CrowPi 中心][7] + +对于习惯使用树莓派或 Linux 的人来说,CrowPi 桌面很熟悉,不过它也足够简单,所以很容易上手。左上角有应用程序菜单,桌面上有快捷图标,右上角有网络选择和音量控制的系统托盘等等。 + +![CrowPi 桌面][8] + +CrowPi 上有很多东西可供选择,所以你可能很难决定从哪里开始。对我来说,主要分为四大类:编程、物理电子学、Linux 和游戏。 + +盒子里有一本使用说明,所以你会知道你需要怎样进行连接(例如,键盘是电池供电的,所以它有时确实需要充电,它和鼠标总是需要一个 USB 适配器)。虽然说明书很快就能读完,但这一例子也充分体现了 CrowPi 团队是如何认真对待说明书的。 + +![CrowPi 文档][9] + +### 编程 + +如果你想学习如何编码,在 CrowPi 上有很多成功的途径。你可以从中选择你觉得最满意的路径。 + +#### 1、Scratch + +[Scratch][10] 是一个简单的可视化编码应用程序,可让你像拼 [乐高积木][11] 一样将代码块组合在一起,制作出游戏和互动故事。这是开启编程之旅最简单的方法,我曾见过年仅 8 岁的孩子会花数小时来研究自己设计的游戏的最佳算法。当然,它不仅适合孩子们!成年人也可以从中获得很多乐趣。不知道从哪里开始?包装盒中有一本 99 页的小册子(打印在纸张上),其中包含 Scratch 课程和项目供你尝试。 + +#### 2、Java 和 Minecraft + +Minecraft 不是开源的(虽然有 [几个开源项目][12] 复刻了它),但它有足够的可用资源,因此也经常被用来教授编程。Minecraft 是用 Java 编写的,CrowPi 同时装载有 [Minecraft Pi Edition][13] 和 [BlueJ Java IDE][14] ,如此可使学习 Java 变得比以往更容易、更有趣。 + +#### 3、Python 和 PyGame + +CrowPi 上有几个非常有趣的游戏,它们是用 Python 和 [PyGame 游戏引擎][15] 编写的。你可以玩这些游戏,然后查看其源代码以了解游戏的运行方式。CrowPi 中包含 Geany、Thonny 和 [Mu][16] 编辑器,因此你可以使用 Python 立即开始编程。与 Scratch 一样,包装盒中有一本包含有课程的小册子,因此你可以学习 Python 基础知识。 + +### 电子器件 + +隐藏在键盘下的物理电子工坊本质上是一系列 Pi Hat(附着在上的硬件)。为了让你可以认识所有的组件,CrowPi 绘制了一张中英双语的折页图进行详细的说明。除此之外还有很多示例项目可以帮助你入门。 以下是一张小清单: + + * **你好**:当你与 CrowPi 说话时,LCD 屏幕上打印输出“你好”。 + * **入侵警报**:使用接近传感器发出警报。 + * **远程控制器**:让你能够使用远程控制(是的,这个也包含在盒子里)来触发 CrowPi 上的事件。 + * **RGB 俄罗斯方块**:让你可以在 LED 显示屏上玩俄罗斯方块游戏。 + * **语音识别**:演示自然语言处理。 + * **超声波音乐**:利用距离传感器和扬声器创建简易版的 特雷门琴Theramin(LCTT 译注:世上唯一不需要身体接触的电子乐器)。 + +这些项目仅仅是入门级别而已,因为你还可以在现有的基础上搭建更多东西。当然,还有更多内容值得探索。包装盒里还有网络跳线、电阻、LED 和各种组件,这样你闲暇时也可以了解树莓派的 GPIO (通用输入输出端口)功能的所有信息。 + +不过我也发现了一个问题:示例项目的位置有点难找。找到演示项目很容易(它们就在 CrowPi 中心上),但源代码的位置并不是很容易被找到。我后来发现大多数示例项目都在 `/usr/share/code` 中,你可以通过文件管理器或终端进行访问。 + +![CrowPi 外围设备][17] + +### Linux + +树莓派上运行的是 Linux 系统。如果你一直想更深入了解 Linux,那么 CrowPi 同样会是一个很好的平台。你可以探索 Linux 桌面、终端以及几乎所有 Linux 或开源应用程序。如果你多年来一直在阅读有关开源的文章,并准备深入研究开源操作系统,那么 CrowPi 会是你想要的平台(当然还有很多其他平台也可以)。 + +### 游戏 + +包装盒中包含的 **RetroPie** SD 卡意味着你可以重新启动切换为复古游戏机,并任意玩各种老式街机游戏。它跟 Steam Deck 并不完全相同,但也是一个有趣且令人振奋的小游戏平台。因为它配备的不是一个而是两个游戏控制器,所以它非常适合多人合作的沙发游戏。最重要的是,你不仅可以在 CrowPi 上玩游戏,还可以制作自己的游戏。 + +### 配备螺丝刀 + +自我坐下开始使用 CrowPi2 以来已经大约两周,但我还没有通关所有项目。有很多个晚上,我不得不强迫自己停下摆弄它,因为即使我厌倦了一个项目,我也会不可避免地发现还有其他东西可以探索。总而言之,我在盒子里找到了一个特别的组件,这个组件让我马上知道 CrowPi 和我就是天造地设:它是一把不起眼的小螺丝刀。盒子上没有撕开就不保修的标签。CrowPi 希望你去修补、拆解、探索和学习。它不是笔记本电脑,甚至也不仅仅是个树莓派;而是一个便携的、低功耗的、多样化的、开源的学习者工具包。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/raspberry-pi-crowpi2 + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[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/article/21/8/my-first-programming-language +[3]: https://opensource.com/sites/default/files/crowpi-not-laptop.jpeg (CrowPi more than a laptop) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/crowpi-pi.jpeg (crowpi pi board) +[6]: https://opensource.com/article/19/1/retropie +[7]: https://opensource.com/sites/default/files/crowpi-hub.png (CrowPi hub) +[8]: https://opensource.com/sites/default/files/crowpi-desktop.png (CrowPi desktop) +[9]: https://opensource.com/sites/default/files/crowpi-docs.jpeg (CrowPi docs) +[10]: https://opensource.com/article/20/9/scratch +[11]: https://opensource.com/article/20/6/open-source-virtual-lego +[12]: https://opensource.com/alternatives/minecraft +[13]: https://www.minecraft.net/en-us/edition/pi +[14]: https://opensource.com/article/20/7/ide-java#bluej +[15]: https://opensource.com/downloads/python-gaming-ebook +[16]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners +[17]: https://opensource.com/sites/default/files/crowpi-peripherals.jpeg (CrowPi peripherals) +[0]: https://img.linux.net.cn/data/attachment/album/202303/24/170210th71d0o707worogv.jpg \ No newline at end of file diff --git a/translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md b/translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md deleted file mode 100644 index 819661f4dd..0000000000 --- a/translated/tech/20210906 Learn everything about computers with this Raspberry Pi kit.md +++ /dev/null @@ -1,148 +0,0 @@ -[#]: subject: "Learn everything about computers with this Raspberry Pi kit" -[#]: via: "https://opensource.com/article/21/9/raspberry-pi-crowpi2" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Learn everything about computers with this Raspberry Pi kit 用树莓派了解关于计算机的一切 -====== -CrowPi 是一个超棒的树莓派项目系统,安装在一个笔记本电脑般的外壳里。 -![老师还是学习者?][1] - -我喜欢历史,也喜欢计算机,因此相比于计算机如何变成个人配件,我更喜欢听它在成为日常家用电器前的有关电脑运算的故事。 [我经常听到的一个故事][2] 是关于很久以前(反正在计算机时代算久远了)的计算机是如何的基础却又让人感到很舒服。事实上,它们基础到对于一个好奇的用户来说,弄清楚如何编程是相对简单的事情。看看现代计算机,它具有面向对象的编程语言、复杂的 GUI 框架、网络 API、容器等,但愈发令人担忧的是,对于那些没有接受过任何专门培训的人,计算行业的工具正变得越来越难懂,无法为任何未经专门培训的人所用。 - -从 Raspberry Pi 在 2012 年发布之日起,它就一直被定位为一个教育平台。 一些第三方供应商通过附加组件和培训套件支持 Pi,以帮助所有年龄段的学习者探索编程、物理计算和开源。 然而,直到最近,很大程度上还是要由用户来弄清楚市场上的所有部件如何组合在一起,直到我最近买了 CrowPi。 - -![CrowPi ——不只是一个笔记本电脑][3] - -CrowPi 不是一个笔记本电脑。 -(Seth Kenlon, [CC BY-SA 4.0][4]) - -### 隆重介绍 CrowPi2 - -乌鸦是非常聪明的鸟。 他们识别并记住面孔,模仿听到的声音,解决复杂的谜题,甚至使用工具来完成任务。 CrowPi 使用乌鸦作为其徽标和同名词是恰当的,因为这个设备提供了无限探索、实验、教育还有最重要的,乐趣的机会。 - -设计本身很巧妙:它看起来像笔记本电脑,但远不止于此。 当你从外壳中取出蓝牙键盘时,它会显示一个隐藏的电子设备工坊,配有 LCD 屏幕、16 个按钮、刻度盘、RFID 传感器、接近传感器、线路板、扬声器、GPIO 连接、LED 阵列等等。 _而且都是可编程的。_ - -顾名思义,该装置本身完全由 Raspberry Pi 供电,牢固地固定在外壳底部。 - -![crowpi pi板[5] - -CrowPi 的 Pi板 -(Seth Kenlon, [CC BY-SA 4.0][4]) - -默认情况下,你应该用电源适配器为设备充电,包装附带一个壁式适配器,你可以将其插入外壳,而不是直接为 Pi 供电。 您还可以使用插入外部微型 USB 端口的电池电源。 电脑外壳内甚至还有一个抽屉,方便你存放电池。 存放电池时有一根 USB 线从电池抽屉中弹出并插入机箱电源端口,因此你不会产生这是一台“普通”笔记本电脑的错觉。 然而,这样一台设备能够有如此美观的设计已经很理想了! - -### 首次启动系统 - -CrowPi2 提供一张安装了 Raspbian 系统,卡上贴有 **System** 的标签,不过它同时还提供一张装载了 [RetroPie][6] 的 microSD 卡。 作为一个负责任的成年人(咳咳),我自然是先启动了 RetroPie。 - -RetroPie 总是很有趣,CrowPi2 附带两个 SNES 风格的游戏控制器,确保你能获得最佳的复古游戏体验。 - -令人赞叹不已的是,实际启动系统的过程同样有趣,甚至可以说更有趣。 它的登录管理器是一个自定义项目中心,快速链接到一些编程体验项目、Python 和 Arduino IDE、Scratch、 Python 体验游戏、Minecraft 等。 你也可以选择退出项目中心,只使用桌面。 - -![CrowPi 中心][7] - -The CrowPi 中心. -(Seth Kenlon, [CC BY-SA 4.0][4]) -对于习惯使用 Raspberry Pi 或 Linux 的人来说,CrowPi 桌面很熟悉,不过它也足够基础,所以很容易上手。 左上角有应用程序菜单,桌面上有快捷图标,右上角有网络选择和音量控制的系统托盘等等。 - -![CrowPi 桌面][8] - -CrowPi 桌面. -(Seth Kenlon, [CC BY-SA 4.0][4]) - -CrowPi 上提供了很多东西选择,所以你可能很难决定从哪里开始。 对我来说,主要分为四大类:编程、物理电子学、Linux 和游戏。 - -盒子里有一本使用说明,所以你才知道你需要怎样进行连接(例如,键盘是电池供电的,所以它有时确实需要充电,它和鼠标总是需要一个 USB 适配器)。 虽然说明书很快就能读完,但这一例子也充分体现了 CrowPi 团队是如何认真对待说明书的。 - -![CrowPi 文档][9] - -CrowPi 文档. -(Seth Kenlon, [CC BY-SA 4.0][4] - - -### 编程 - -如果你热衷于学习如何编码,在 CrowPi 上有很多途径助你成功。你应该从中选择你觉得最满意的路径。 - -#### 1\. Scratch - -[Scratch][10] 是一个简单的视觉编码应用程序,可让你像拼 [Lego pieces 乐高拼块][11] 一样将代码块组合在一起,制作出游戏和互动故事。 这是开启编程之旅最简单的方法,我曾见过年仅 8 岁的孩子会花数小时思考自己设计的游戏的最佳算法。 当然,它不仅适合孩子们!成年人也可以从中获得很多乐趣。 不知道从哪里开始? 包装盒中有一本 99 页的小册子(打印在纸张上),其中包含 Scratch 课程和项目供你尝试。 - -#### 2\. Java 和 Minecraft - -Minecraft 不是开源的(虽然有 [几个开源项目][12] 复刻了它),但它有足够的可用资源,因此也经常被用来教授编程。 Minecraft 是用 Java 编写的,CrowPi 同时装载有 [Minecraft Pi Edition][13] 和 [BlueJ Java IDE][14] ,如此可使学习 Java 变得比以往更容易、更有趣。 - -#### 3\. Python 和 PyGame - -CrowPi 上有几个非常有趣的游戏,它们是用 Python 和 [PyGame game engine ( PyGame 游戏引擎)][15] 编写的。 你可以玩游戏,然后查看源代码以了解游戏的运行方式。 CrowPi 中包含 Geany、Thonny 和 [Mu][16] 编辑器,因此您可以立即开始使用 Python 进行编程。 与 Scratch 一样,包装盒中有一本包含课程的小册子,因此你可以学习 Python 基础知识。 - -### 电子器件 - -隐藏在键盘下的物理电子工坊本质上是一系列 Pi Hats(附着在上的硬件)。 为了让你可以认识所有的组件,CrowPi 绘制了一张中英双语的折叠图进行详细的说明。 除此之外还有很多示例项目可以帮助你入门。 以下是一张小清单: - - - * **你好** 当你与 CrowPi 说话时,LCD 屏幕上打印输出“你好”。 - * **入侵警报**使用接近传感器发出警报。 - * **远程控制器** 让你能够使用远程控制(是的,这个也包含在盒子里)来触发 CrowPi 上的事件。 - * **RGB 俄罗斯方块** 让你可以在 LED 显示屏上玩俄罗斯方块游戏。 - * **语音识别**演示自然语言处理。 - * **超声波音乐** 利用距离传感器和扬声器创建简易版的特雷蒙琴(世上唯一不需要身体接触的电子乐器)。 - - - -这些项目仅仅是入门级别而已,因为你还可以在现有的基础上搭建更多东西。 当然,还有更多内容值得探索。 包装盒里还有网络跳线、电阻器、LED 和各种组件,这样你闲暇时也可以了解 Pi 的 GPIO (通用输入输出端口)功能的所有信息。 - -不过我也发现了一个问题:示例项目的位置有点难找。 找到演示很容易(它们就在 CrowPi 中心上),但源代码的位置并不是很容易被找到。 我后来发现大多数示例项目都在 `/usr/share/code` 中,你可以通过文件管理器或终端进行访问。 - -![CrowPi 外围设备][17] - -CrowPi 外围设备 -(Seth Kenlon, [CC BY-SA 4.0][4]) - -### Linux - -Raspberry Pi 上运行 Linux 系统。 如果你一直想更深入了解 Linux,那么 CrowPi 同样会是一个很好的平台。 你可以探索 Linux 桌面、终端以及几乎所有 Linux 或开源应用程序。 如果你多年来一直在阅读有关开源的文章,并准备深入研究开源操作系统,那么 CrowPi 会是你想要的平台(当然还有很多其他平台也可以)。 - -### 游戏 - -包装盒中包含的 **RetroPie** SD 卡意味着你可以重新启动,切换为复古游戏机并任意玩各种老式街机游戏。 它跟 Steam Deck 并不完全相同,但也是一个有趣且令人振奋的小游戏平台。 因为它配备的不是一个而是两个游戏控制器,所以它非常适合多人合作的沙发游戏。 最重要的是,你不仅可以在 CrowPi 上玩游戏,还可以制作自己的游戏。 - -### 配备螺丝刀 - -自我坐下开始使用 CrowPi2 以来已经大约两周,但我还没有通关所有项目。 有很多个晚上,我不得不强迫自己停下摆弄它,因为即使我厌倦了一个项目,我也会不可避免地发现还有其他东西可以探索。 文章的最后做个总结,我在盒子里找到了一个特别的组件,这个组件让我马上知道 CrowPi 和我就是天造地设:它是一把不起眼的小螺丝刀。 盒子上的保修标签不存在作废。 CrowPi 希望你去修补、拆解、探索和学习。 它不是笔记本电脑,甚至也不是 Pi; 而是一个便携、低功耗、多样化和开源的学习者工具包。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/raspberry-pi-crowpi2 - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[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/article/21/8/my-first-programming-language -[3]: https://opensource.com/sites/default/files/crowpi-not-laptop.jpeg (CrowPi more than a laptop) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/crowpi-pi.jpeg (crowpi pi board) -[6]: https://opensource.com/article/19/1/retropie -[7]: https://opensource.com/sites/default/files/crowpi-hub.png (CrowPi hub) -[8]: https://opensource.com/sites/default/files/crowpi-desktop.png (CrowPi desktop) -[9]: https://opensource.com/sites/default/files/crowpi-docs.jpeg (CrowPi docs) -[10]: https://opensource.com/article/20/9/scratch -[11]: https://opensource.com/article/20/6/open-source-virtual-lego -[12]: https://opensource.com/alternatives/minecraft -[13]: https://www.minecraft.net/en-us/edition/pi -[14]: https://opensource.com/article/20/7/ide-java#bluej -[15]: https://opensource.com/downloads/python-gaming-ebook -[16]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners -[17]: https://opensource.com/sites/default/files/crowpi-peripherals.jpeg (CrowPi peripherals) From 92508c604f68988234150cff78b34aeb48e49a27 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 24 Mar 2023 17:41:31 +0800 Subject: [PATCH 170/318] RP @geekpi https://linux.cn/article-15657-1.html --- ...ow to know if You are Behind a Proxy Server.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md (80%) diff --git a/translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md b/published/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md similarity index 80% rename from translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md rename to published/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md index 33e1fb4ca2..d76467a490 100644 --- a/translated/tech/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md +++ b/published/20230315.1 ⭐️ How to know if You are Behind a Proxy Server.md @@ -3,14 +3,16 @@ [#]: author: "Sreenath https://itsfoss.com/author/sreenath/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15657-1.html" 如何知道你是否使用了代理服务器? ====== -**什么是代理?** +![][0] + +什么是代理? 代理是充当客户端和另一台服务器之间的中介的服务器或软件应用。它充当客户端和互联网之间的网关,允许用户访问在线资源,同时隐藏他们的身份、位置和其他个人信息。 @@ -26,15 +28,14 @@ 有时,可能是你的互联网服务提供商和内容交付网络使用它们来缓存资源的副本以节省带宽或只是为了监视/过滤网络。 - 有几种方法可以检查你是否在透明代理后面: - **通过某些在线 IP 检测/检查网站获得的 IP 地址可能与你的计算机或设备的 IP 地址不匹配**。因为代理服务器正在拦截你的流量并将其与 IP 地址一起发送出去。 - **检查你的网络设置以查看是否配置了代理服务器。** - **借助一些在线代理检测工具。** -- **连接到你知道不存在的服务器。**如果网页上显示的错误看起来与平时不同,你可能使用了代理。 +- **连接到你知道不存在的服务器。** 如果网页上显示的错误看起来与平时不同,你可能使用了代理。 -无论你喜欢与否,你始终可以使用 [VPN 服务][1]绕过透明代理。 +无论你喜欢与否,你始终可以使用 [VPN 服务][1] 绕过透明代理。 ### 如何检查你是否在 Ubuntu 上使用代理 @@ -42,17 +43,17 @@ Ubuntu 或任何其他 Linux 发行版提供了多种检查方法。此处使用 #### 使用 GNOME 设置 -这是直接的 GUI 方式。打开 GNOME 设置并转到“网络”选项卡,然后按旁边的齿轮图标。 +这是直接的 GUI 方式。打开 GNOME 设置Settings 并转到 “网络Networks” 选项卡,然后按旁边的齿轮图标。 ![Select the gear icon adjacent to the Network proxy section][2] -它应该**默认关闭**。 +它应该默认 禁用Disabled。 -如果你在代理后面,你可以在这里获得不同的状态。在代理设置中,你可以看到,我在这里使用了代理(手动配置)。 +如果你在代理后面,你可以在这里看到不同的状态。在代理设置中,你可以看到,我在这里使用了代理(手动配置)。 ![Proxy details in GNOME Settings][3] -可以使用 GNOME 桌面中的 gsettings 命令更改相同的代理状态。 +可以使用 GNOME 桌面中的 `gsettings` 命令更改相同的代理状态。 ``` gsettings set org.gnome.system.proxy mode 'none' @@ -64,7 +65,7 @@ gsettings set org.gnome.system.proxy mode 'none' 你可以通过命令行以多种方式获取代理的状态。 -**通过列出关联的环境变量获取代理的状态** +##### 通过列出关联的环境变量获取代理的状态 打开终端并运行以下任一命令: @@ -84,9 +85,7 @@ set | grep -i proxy 空输出意味着没有配置代理。否则,它将打印相关的环境变量。 -🚧 - -请注意,如果你将代理设置为环境变量,这将起作用。 +> 🚧 请注意,如果你将代理设置为环境变量,这将起作用。 或者,你可以回显每个代理变量以检查是否设置了特定的代理变量。 @@ -96,7 +95,7 @@ set | grep -i proxy echo $http_proxy ``` -**使用 nmcli 命令检查** +##### 使用 nmcli 命令检查 打开终端并输入: @@ -131,7 +130,7 @@ via: https://itsfoss.com/check-proxy-server/ 作者:[Sreenath][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/) 荣誉推出 @@ -142,4 +141,5 @@ via: https://itsfoss.com/check-proxy-server/ [3]: https://itsfoss.com/content/images/2023/02/Proxy-in-GNOME-settings.png [4]: https://itsfoss.com/content/images/2023/02/set_grep_proxy.png [5]: https://itsfoss.com/content/images/2023/02/nmcli-connection-show.png -[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png \ No newline at end of file +[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png +[0]: https://img.linux.net.cn/data/attachment/album/202303/24/174021wkdzn81kvtnngzaw.jpg \ No newline at end of file From a0c9154cad2578b25c2a96f393e65d8edb74c874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:18:59 +0800 Subject: [PATCH 171/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230323.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20GN?= =?UTF-8?q?OME=2044=20is=20Here=20With=20New=20Tricks=20Up=20its=20Sleeve.?= =?UTF-8?q?md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... GNOME 44 is Here With New Tricks Up its Sleeve.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/news/20230323.3 ⭐️⭐️ GNOME 44 is Here With New Tricks Up its Sleeve.md diff --git a/sources/news/20230323.3 ⭐️⭐️ GNOME 44 is Here With New Tricks Up its Sleeve.md b/sources/news/20230323.3 ⭐️⭐️ GNOME 44 is Here With New Tricks Up its Sleeve.md new file mode 100644 index 0000000000..1abfdf690b --- /dev/null +++ b/sources/news/20230323.3 ⭐️⭐️ GNOME 44 is Here With New Tricks Up its Sleeve.md @@ -0,0 +1,142 @@ +[#]: subject: "GNOME 44 is Here With New Tricks Up its Sleeve" +[#]: via: "https://news.itsfoss.com/gnome-44-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +GNOME 44 is Here With New Tricks Up its Sleeve +====== + +GNOME 44 is finally here with revamped settings, updated quick settings, accessibility improvements, and more. + +![gnome 44][1] + +GNOME is arguably the **most popular desktop environment**. + +The previous [GNOME 43 release][2] was packed with many useful additions, and now the GNOME 44 release follows in the same steps. + +Let's see what is on offer. + +### 🆕 GNOME 44: What's New? + +![Introducing GNOME 44][3] + +We recently covered the best features of GNOME 44 separately; here, let me give you a recap along with all the release details. + +The key highlights include: + +- **Settings menu makeover** +- **Quick settings improvements** +- **File chooser grid view** +- **File manager improvements** + +#### 1. Settings Menu Makeover + +![a screenshot of the updated settings menu on gnome 44][4] + +The Settings menu has received a minor makeover, with the **Accessibility panel being redesigned** to provide a more modern navigation experience. + +![a screenshot of the updated mouse and touchpad settings on gnome 44][5] + +Then, a new feature lets you **share Wi-Fi passwords through a QR code,** and the improved mouse/touchpad settings. + +The information under "**Device Security**" has also received updates to add clarity to the technical details. + +![gnome 44 device security][6] + +#### 2. Improved Quick Settings Menu + +![a screenshot of the bluetooth setting in the quick settings panel of gnome 44][7] + +The quick settings panel has received many updates; it now lets you **view and manage the currently connected Bluetooth devices.** + +But you must head to the settings menu to pair a new device. + +![a screenshot of the new screenshot shortcut in the quick settings menu of gnome 44][8] + +Another addition is the **new screenshot shortcut** that allows for the effortless capture of screenshots from the quick settings menu. + +That is not all; GNOME 44's quick settings menu now features a nifty way of checking **apps running in the background.** + +![][9] + +You can find more details on this feature in our previous coverage about it: + +#### 3. New Lock Screen/Login Window + +![a screenshot of the new lockscreen and login window of gnome 44][10] + +GNOME 44 features a **refreshed lock screen and login window** with a bigger user avatar and subtle changes to the various elements, such as the font size for the clock. + +#### 4. Thumbnails in GNOME File Picker + +![a screenshot of the file thumbnail preview in gnome 44's file picker][11] + +Late last year, we [saw the revival][12] of a **long-requested feature** for the GNOME file picker, and now it has finally arrived. + +GNOME's file picker never had a proper thumbnail preview for viewing files. Instead, it **relied on a plain list view**. + +Until now, that is. + +It now **features a proper thumbnail view** that can be toggled by clicking on the 'list-grid view' toggle in the top-right of the file picker. + +#### 🛠️ Other Changes & Improvements + +![gnome 44 wallpaper collection][13] + +These were not the only improvements that have arrived with GNOME 44; here are some that are worth mentioning: + +- New wallpapers +- Various minor updates to the File Manager resulted in improved performance. +- Epiphany web browser ported to GTK4 with many bug fixes. +- A new filter has been added to GNOME Software that only shows open-source apps when activated. +- Various improvements to the Contacts app, with the ability to share contacts as QR codes. +- Many UI and styling fixes for GNOME Builder. +- Ten new apps added to the [GNOME Circle][14] collection. + +You can go through the [official release notes][15] to learn more. + +### Get Started With GNOME 44 + +You can expect GNOME 44 with Ubuntu 23.04 and Fedora 38 next month. + +If you cannot wait to get your hands on it, installing [GNOME OS][16] using [Boxes][17] should be a good way to test it. + +[GNOME][18] + +_💬 What do you think of this expansive GNOME 44 update? Do you want to use it on your Linux system?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-44-release/ + +作者:[Sourav Rudra][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/sourav/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/03/gnome-44-release.jpg +[2]: https://news.itsfoss.com/gnome-43-release/ +[3]: https://youtu.be/N7SGe1MiqNA +[4]: https://news.itsfoss.com/content/images/2023/03/GNOME44_settings.jpg +[5]: https://news.itsfoss.com/content/images/2023/03/GNOME44_settings_2.jpg +[6]: https://news.itsfoss.com/content/images/2023/03/gnome-44-device-security.png +[7]: https://news.itsfoss.com/content/images/2023/03/GNOME44_QuickSettings.jpg +[8]: https://news.itsfoss.com/content/images/2023/03/GNOME44_QuickSettings_2.jpg +[9]: https://news.itsfoss.com/content/images/2023/03/background-app-running--1-.png +[10]: https://news.itsfoss.com/content/images/2023/03/GNOME44_lockscreen.jpg +[11]: https://news.itsfoss.com/content/images/2023/03/GNOME44_file_view.jpg +[12]: https://news.itsfoss.com/gnome-file-picker/ +[13]: https://news.itsfoss.com/content/images/2023/03/gnome-44-wallpapers.jpg +[14]: https://circle.gnome.org/?ref=its-foss-news +[15]: https://release.gnome.org/44/?ref=its-foss-news +[16]: https://os.gnome.org/?ref=its-foss-news +[17]: https://wiki.gnome.org/Apps/Boxes?ref=its-foss-news +[18]: https://www.gnome.org/getting-gnome/?ref=its-foss-news From 57a0a3be6449a6bfd37fc835b354fb38bc3c0e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:25:21 +0800 Subject: [PATCH 172/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230323.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Mo?= =?UTF-8?q?zilla=20Plans=20to=20Work=20On=20Open-Source=20AI=20to=20Develo?= =?UTF-8?q?p=20Solutions=20like=20ChatGPT.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...pen-Source AI to Develop Solutions like ChatGPT.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/news/20230323.4 ⭐️⭐️ Mozilla Plans to Work On Open-Source AI to Develop Solutions like ChatGPT.md diff --git a/sources/news/20230323.4 ⭐️⭐️ Mozilla Plans to Work On Open-Source AI to Develop Solutions like ChatGPT.md b/sources/news/20230323.4 ⭐️⭐️ Mozilla Plans to Work On Open-Source AI to Develop Solutions like ChatGPT.md new file mode 100644 index 0000000000..82d4975e63 --- /dev/null +++ b/sources/news/20230323.4 ⭐️⭐️ Mozilla Plans to Work On Open-Source AI to Develop Solutions like ChatGPT.md @@ -0,0 +1,69 @@ +[#]: subject: "Mozilla Plans to Work On Open-Source AI to Develop Solutions like ChatGPT" +[#]: via: "https://news.itsfoss.com/mozilla-open-source-ai/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Mozilla Plans to Work On Open-Source AI to Develop Solutions like ChatGPT +====== + +Mozilla's getting into the A.I. game? I think we need more of this! + +![mozilla AI][1] + +[Mozilla][2] is a well-known name in the tech space for its privacy-focused endeavors and the Firefox web browser. + +But, as we all know, the **biggest catch of 2023 has been A.I**. It has seen rapid growth across many sectors, with big tech betting heavily on it. + +Microsoft, Google, and several others 🤯 Chatbots, search engine integration, content creation, graphics design, and what not. + +And Mozilla doesn't want to miss out on it. + +In a recent announcement, they revealed **plans to set up a new startup** and **gather a community** to build a trustworthy, independent, and open-source AI ecosystem. + +Let's look at what we can expect. + +❓ **What is happening?:** Mozilla has **committed $30M to kick-start a new startup** called [Mozilla.ai][3]. + +It aims to bring together people from different walks of life to collectively work on creating a trustworthy and independent AI ecosystem that will benefit everyone. + +The first order of business will be to create **tools that make generative AI much safer and transparent** than what it is now, and to make 'people-centric' recommendation systems that don't serve skewed information. + +This startup will be led by [Moez Draief][4] (_Managing Director of Mozilla)._The initial board members will be **Harvard's**[Karim Lakhani][5], Credo's [Navrina Singh][6], and Mozilla's [Mark Surman][7] (_Director of the Mozilla Foundation_). + +**Why now?:** Obviously, the new wave of AI has created a lot of excitement and concerns ⚡ + +The current/upcoming wave of AI can potentially improve many people's lives, but only **if the technology is more human-focused**. Mozilla says this will only be possible when they put '_human agency and the interests of users at the cor_e' and prioritize transparency and accountability. + +In contrast, the tech giants and cloud companies with significant resources are **scrambling to continue their dominance** over the market by doing things the usual way, with no special focus on improving transparency and moderation. + +🙌 It is good to hear that the Mozilla Foundation is getting involved to develop open-source A.I. solutions that could challenge the likes of ChatGPT, Google Bard, and more. + +Not to forget, there's another team working on making an open-source alternative to ChatGPT. And, yes, we need more of this t**o compete with the big tech clenching their claws in the consumer market with no community oversight**. + +I suggest you go through the [announcement blog][8] to know more about Mozilla's AI plans if you are curious. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/mozilla-open-source-ai/ + +作者:[Sourav Rudra][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/sourav/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/03/mozilla-ai-opensource.png +[2]: https://www.mozilla.org/?ref=its-foss-news +[3]: https://mozilla.ai/?ref=its-foss-news +[4]: https://www.linkedin.com/in/moezdraief/?ref=its-foss-news +[5]: https://www.linkedin.com/in/professorkl?ref=its-foss-news +[6]: https://www.linkedin.com/in/navrina/?ref=its-foss-news +[7]: https://ca.linkedin.com/in/msurman?ref=its-foss-news +[8]: https://blog.mozilla.org/en/mozilla/introducing-mozilla-ai-investing-in-trustworthy-ai/?ref=its-foss-news \ No newline at end of file From 818c15e042713a0031c4f7086ea1f053f3bd638b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:26:56 +0800 Subject: [PATCH 173/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230323.5=20=E2=AD=90=EF=B8=8F=20Adding=20a=20Pop=20o?= =?UTF-8?q?f=20Color=20to=20GNOME=20Accent=20Colors=20Are=20on=20the=20Way?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Color to GNOME Accent Colors Are on the Way.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/news/20230323.5 ⭐️ Adding a Pop of Color to GNOME Accent Colors Are on the Way.md diff --git a/sources/news/20230323.5 ⭐️ Adding a Pop of Color to GNOME Accent Colors Are on the Way.md b/sources/news/20230323.5 ⭐️ Adding a Pop of Color to GNOME Accent Colors Are on the Way.md new file mode 100644 index 0000000000..4384f4828e --- /dev/null +++ b/sources/news/20230323.5 ⭐️ Adding a Pop of Color to GNOME Accent Colors Are on the Way.md @@ -0,0 +1,76 @@ +[#]: subject: "Adding a Pop of Color to GNOME: Accent Colors Are on the Way" +[#]: via: "https://news.itsfoss.com/gnome-accent-colors/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Adding a Pop of Color to GNOME: Accent Colors Are on the Way +====== + +GNOME users, were you waiting for this moment? Get ready to choose your color! + +![gnome accent][1] + +Support for accent colors has been on Ubuntu since [22.04 LTS][2], and people loved it. Sadly, GNOME never had that kind of support — yet. + +Thanks to an **effort underway to introduce accent color support in GNOME,** that is changing. + +**What is it?:** Recently, a proposal was sent out with a [merge request][3] to add support for accent colors to GNOME, the development of which is being led by [Alexander Mikhaylenko][4]. + +In its current state, it's in a **very work-in-progress condition** with a lot of work pending as well as a few issues here and there which should be handled before the final release. + +When looking at the code, it is clear that **initially support for 10 accent colors will be offered**, with the possibility of more options after release. + +**Wondering how it might look?** + +Well, in a [discussion][5] on Mastodon, a few mockups made by Alexander were shared by a GNOME foundation member, [Jamie][6], that depicts two distinct colorways. + +One is a green one. + +![early look at gnome's upcoming color accent support][7] + +The other is blue. + +![another early look at gnome's upcoming color accent support][8] + +I must say these look nice! 😃 Want some Fedora love on your non-Fedora distro? Turn it to blue and something else? Choices, choices! + +> 📝 Do keep in mind that whatever you see above is subject to change before final release. + +**When to expect?:** When asked by another user in the above-mentioned discussion, Alexander mentioned that we can **expect accent color support to arrive with GNOME 45**. + +Seeing that GNOME 44 was recently released, we will have to wait a bit before we can actually see this being implemented. + +But, it is good to know that there is a possibility of it happening soon after! + +I do like that GNOME is finally getting support for accent colors, and I hope the wait is worth it. + +**Via**: [omg!linux][9] + +_💬 If you ask me, I would love having the Green accent color on my GNOME system. What about you?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-accent-colors/ + +作者:[Sourav Rudra][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/sourav/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/03/gnome-accent-picker.jpg +[2]: https://news.itsfoss.com/ubuntu-22-04-release/ +[3]: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2715?ref=its-foss-news +[4]: https://gitlab.gnome.org/exalm?ref=its-foss-news +[5]: https://crab.garden/@jamie/110063105101806314?ref=its-foss-news +[6]: https://crab.garden/@jamie?ref=its-foss-news +[7]: https://news.itsfoss.com/content/images/2023/03/GNOME_Accent_Color_1.png +[8]: https://news.itsfoss.com/content/images/2023/03/GNOME_Accent_Color_2.png +[9]: https://www.omglinux.com/gnome-accent-colors-are-coming/?ref=its-foss-news From d2d7b97fd8689a7da071c529b51e138cc920fed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:29:20 +0800 Subject: [PATCH 174/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230324.0=20=E2=AD=90=EF=B8=8F=20Open=20source=20tool?= =?UTF-8?q?s=20for=20mind=20mapping.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0 ⭐️ Open source tools for mind mapping.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md diff --git a/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md b/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md new file mode 100644 index 0000000000..3f4ab7054d --- /dev/null +++ b/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md @@ -0,0 +1,61 @@ +[#]: subject: "Open source tools for mind mapping" +[#]: via: "https://opensource.com/article/23/3/open-source-mind-mapping" +[#]: author: "Amrita https://opensource.com/users/amrita42" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source tools for mind mapping +====== + +In today's world and social media, many people don't have the patience to read lengthy textual content. Visuals are a great way to capture your audience's attention span. + +Did you know that research at 3M Corporation concluded that visuals are processed 60,000 times faster than text? Visuals are more impactful than words and enhance creative thinking and memory. + +### A picture is worth a thousand words + +I looked at some of the common [Git commands][1]. I used Git commands as the main topic; each sub-topic is a Git command syntax with a definition. For this, I used Wisemapping. + +![A git command mind map][2] + +Whether you knew what a [mind map][3] was before or not, now that you've seen a mind map, you can now understand the concept.. That's the power of visuals. + +### How do you create a mind map? + +- Start with the main topic and place it in the middle of your drawing board. +- Create sub-topics and link them to the main topic. +- You can add details to each sub-topic, such as definitions, examples, etc. + +### 3 open source tools you can use to create a mind map + +Take a look at these three open source tools to create a visual of your idea: + +- [Wisemapping][4] +- [Freeplane][5] +- [Semantik][6] + +Wikipedia defines a mind map as a diagram to visually organize information into a hierarchy, showing relationships among pieces of the whole. Mind mapping starts with a central theme and then builds relations. It is a visual way to structure thoughts and create impactful presentations. + +You can use mind maps in your work. For example, I used a mind map to show a high-level overview of features planned for a project. With these excellent open source mind mapping applications, it's easy to get started visualizing your next project. Try mapping your mind with open source. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/open-source-mind-mapping + +作者:[Amrita][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/amrita42 +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/downloads/cheat-sheet-git +[2]: https://opensource.com/sites/default/files/2023-03/mindmap.jpg +[3]: https://opensource.com/article/21/12/open-source-mind-mapping-drawio +[4]: https://www.wisemapping.com/ +[5]: https://opensource.com/article/19/1/productivity-tool-freeplane +[6]: https://waf.io/semantik.html \ No newline at end of file From 57292544040789e298eda31b4c76da9264c233db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:38:33 +0800 Subject: [PATCH 175/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230307.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=20Some=20possible=20reasons=20for=208-bit=20?= =?UTF-8?q?bytes.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...⭐️⭐️ Some possible reasons for 8-bit bytes.md | 312 ++++++++++++++++++ 1 file changed, 312 insertions(+) create mode 100644 sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md diff --git a/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md b/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md new file mode 100644 index 0000000000..b49af0e6ae --- /dev/null +++ b/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md @@ -0,0 +1,312 @@ +[#]: subject: "Some possible reasons for 8-bit bytes" +[#]: via: "https://jvns.ca/blog/2023/03/06/possible-reasons-8-bit-bytes/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Some possible reasons for 8-bit bytes +====== + +I’ve been working on a zine about how computers represent thing in binary, and +one question I’ve gotten a few times is – why does the x86 architecture use 8-bit bytes? Why not +some other size? + +With any question like this, I think there are two options: + +- It’s a historical accident, another size (like 4 or 6 or 16 bits) would work just as well +- 8 bits is objectively the Best Option for some reason, even if history had played out differently we would still use 8-bit bytes +- some mix of 1 & 2 + +I’m not super into computer history (I like to use computers a lot more than I +like reading about them), but I am always curious if there’s an essential +reason for why a computer thing is the way it is today, or whether it’s mostly +a historical accident. So we’re going to talk about some computer history. + +As an example of a historical accident: DNS has a `class` field which has 5 +possible values (“internet”, “chaos”, “hesiod”, “none”, and “any”). To me that’s +a clear example of a historical accident – I can’t imagine that we’d define +the class field the same way if we could redesign DNS today without worrying about backwards compatibility. I’m +not sure if we’d use a class field at all! + +There aren’t any definitive answers in this post, but I asked [on Mastodon][1] and +here are some potential reasons I found for the 8-bit byte. I think the answer +is some combination of these reasons. + +#### what’s the difference between a byte and a word? + +First, this post talks about “bytes” and “words” a lot. What’s the difference between a byte and a word? My understanding is: + +- the **byte size** is the smallest unit you can address. For example in a program on my machine `0x20aa87c68` might be the address of one byte, then `0x20aa87c69` is the address of the next byte. +- The **word size** is some multiple of the byte size. I’ve been confused about +this for years, and the Wikipedia definition is incredibly vague (“a word is +the natural unit of data used by a particular processor design”). I +originally thought that the word size was the same as your register size (64 +bits on x86-64). But according to section 4.1 (“Fundamental Data Types”) of the [Intel architecture manual][2], +on x86 a word is 16 bits even though the registers are 64 bits. So I’m +confused – is a word on x86 16 bits or 64 bits? Can it mean both, depending +on the context? What’s the deal? + +Now let’s talk about some possible reasons that we use 8-bit bytes! + +#### reason 1: to fit the English alphabet in 1 byte + +[This Wikipedia article][3] says that the IBM System/360 introduced the 8-bit byte in 1964. + +Here’s a [video interview with Fred Brooks (who managed the project)][4] talking about why. I’ve transcribed some of it here: + +> … the six bit bytes [are] really better for scientific computing and the 8-bit byte ones are really better for commercial computing and each one can be made to work for the other. +> So it came down to an executive decision and I decided for the 8-bit byte, Jerry’s proposal. +> +> ... +> +> My most important technical decision in my IBM career was to go with the 8-bit byte for the 360. +> And on the basis of I believe character processing was going to become important as opposed to decimal digits. + +It makes sense that an 8-bit byte would be better for text processing: 2^6 is +64, so 6 bits wouldn’t be enough for lowercase letters, uppercase letters, and symbols. + +To go with the 8-bit byte, System/360 also introduced the [EBCDIC][5] encoding, which is an 8-bit character encoding. + +It looks like the next important machine in 8-bit-byte history was the +[Intel 8008][6], which was built to be +used in a computer terminal (the Datapoint 2200). Terminals need to be able to +represent letters as well as terminal control codes, so it makes sense for them +to use an 8-bit byte. +[This Datapoint 2200 manual from the Computer History Museum][7] +says on page 7 that the Datapoint 2200 supported ASCII (7 bit) and EBCDIC (8 bit). + +#### why was the 6-bit byte better for scientific computing? + +I was curious about this comment that the 6-bit byte would be better for scientific computing. Here’s a quote from [this interview from Gene Amdahl][8]: + +> I wanted to make it 24 and 48 instead of 32 and 64, on the basis that this +> would have given me a more rational floating point system, because in floating +> point, with the 32-bit word, you had to keep the exponent to just 8 bits for +> exponent sign, and to make that reasonable in terms of numeric range it could +> span, you had to adjust by 4 bits instead of by a single bit. And so it caused +> you to lose some of the information more rapidly than you would with binary +> shifting + +I don’t understand this comment at all – why does the exponent have to be 8 bits +if you use a 32-bit word size? Why couldn’t you use 9 bits or 10 bits if you +wanted? But it’s all I could find in a quick search. + +#### why did mainframes use 36 bits? + +Also related to the 6-bit byte: a lot of mainframes used a 36-bit word size. Why? Someone pointed out +that there’s a great explanation in the Wikipedia article on [36-bit computing][9]: + +> Prior to the introduction of computers, the state of the art in precision +> scientific and engineering calculation was the ten-digit, electrically powered, +> mechanical calculator… These calculators had a column of keys for each digit, +> and operators were trained to use all their fingers when entering numbers, so +> while some specialized calculators had more columns, ten was a practical limit. +> +> Early binary computers aimed at the same market therefore often used a 36-bit +> word length. This was long enough to represent positive and negative integers +> to an accuracy of ten decimal digits (35 bits would have been the minimum) + +So this 36 bit thing seems to based on the fact that log_2(20000000000) is 34.2. Huh. + +My guess is that the reason for this is in the 50s, computers were +extremely expensive. So if you wanted your computer to support ten decimal +digits, you’d design so that it had exactly enough bits to do that, and no +more. + +Today computers are way faster and cheaper, so if you want to represent ten +decimal digits for some reason you can just use 64 bits – wasting a little bit +of space is usually no big deal. + +Someone else mentioned that some of these machines with 36-bit word sizes let +you choose a byte size – you could use 5 or 6 or 7 or 8-bit bytes, depending +on the context. + +#### reason 2: to work well with binary-coded decimal + +In the 60s, there was a popular integer encoding called binary-coded decimal (or [BCD][10] for short) that +encoded every decimal digit in 4 bits. + +For example, if you wanted to encode the number 1234, in BCD that would be something like: + +``` +0001 0010 0011 0100 +``` + +So if you want to be able to easily work with binary-coded decimal, your byte +size should be a multiple of 4 bits, like 8 bits! + +#### why was BCD popular? + +This integer representation seemed really weird to me – why not just use +binary, which is a much more efficient way to store integers? Efficiency was really important in early computers! + +My best guess about why is that early computers didn’t have displays the same way we do +now, so the contents of a byte were mapped directly to on/off lights. + +Here’s a [picture from Wikipedia of an IBM 650 with some lights on its display][11] ([CC BY-SA 3.0][12]): + +![][13] + +So if you want people to be relatively able to easily read off a decimal number +from its binary representation, this makes a lot more sense. I think today BCD +is obsolete because we have displays and our computers can convert numbers +represented in binary to decimal for us and display them. + +Also, I wonder if BCD is where the term “nibble” for 4 bits comes from – in +the context of BCD, you end up referring to half bytes a lot (because every +digits is 4 bits). So it makes sense to have a word for “4 bits”, and people +called 4 bits a nibble. Today “nibble” feels to me like an archaic term though – +I’ve definitely never used it except as a fun fact (it’s such a fun word!). The Wikipedia article on [nibbles][14] supports this theory: + +> The nibble is used to describe the amount of memory used to store a digit of +> a number stored in packed decimal format (BCD) within an IBM mainframe. + +Another reason someone mentioned for BCD was **financial calculations**. Today +if you want to store a dollar amount, you’ll typically just use an integer +amount of cents, and then divide by 100 if you want the dollar part. This is no +big deal, division is fast. But apparently in the 70s dividing an integer +represented in binary by 100 was very slow, so it was worth it to redesign how +you represent your integers to avoid having to divide by 100. + +Okay, enough about BCD. + +#### reason 3: 8 is a power of 2? + +A bunch of people said it’s important for a CPU’s byte size to be a power of 2. +I can’t figure out whether this is true or not though, and I wasn’t satisfied with the explanation that “computers use binary so powers of 2 are good”. That seems very plausible but I wanted to dig deeper. +And historically there have definitely been lots of machines that used byte sizes that weren’t powers of 2, for example (from [this retro computing stack exchange thread][15]): + +- Cyber 180 mainframes used 6-bit bytes +- the Univac 1100 / 2200 series used a 36-bit word size +- the PDP-8 was a 12-bit machine + +Some reasons I heard for why powers of 2 are good that I haven’t understood yet: + +- every bit in a word needs a bus, and you want the number of buses to be a power of 2 (why?) +- a lot of circuit logic is susceptible to divide-and-conquer techniques (I think I need an example to understand this) + +Reasons that made more sense to me: + +- it makes it easier to design **clock dividers** that can measure “8 bits were +sent on this wire” that work based on halving – you can put 3 halving clock +dividers in series. [Graham Sutherland][16] told me about this and made this really cool +[simulator of clock dividers][17] showing what these clock dividers look like. That site (Falstad) also has a bunch of other example circuits and it seems like a really cool way to make circuit simulators. +- if you have an instruction that zeroes out a specific bit in a byte, then if +your byte size is 8 (2^3), you can use just 3 bits of your instruction to +indicate which bit. x86 doesn’t seem to do this, but the [Z80’s bit testing instructions][18] do. +- someone mentioned that some processors use [Carry-lookahead adders][19], and they work +in groups of 4 bits. From some quick Googling it seems like there are a wide +variety of adder circuits out there though. +- **bitmaps**: Your computer’s memory is organized into pages (usually of size 2^n). It +needs to keep track of whether every page is free or not. Operating systems +use a bitmap to do this, where each bit corresponds to a page and is 0 or 1 +depending on whether the page is free. If you had a 9-bit byte, you would +need to divide by 9 to find the page you’re looking for in the bitmap. +Dividing by 9 is slower than dividing by 8, because dividing by powers of 2 +is always the fastest thing. + +I probably mangled some of those explanations pretty badly: I’m pretty far out +of my comfort zone here. Let’s move on. + +#### reason 4: small byte sizes are good + +You might be wondering – well, if 8-bit bytes were better than 4-bit bytes, +why not keep increasing the byte size? We could have 16-bit bytes! + +A couple of reasons to keep byte sizes small: + +- It’s a waste of space – a byte is the minimum unit you can address, and if +your computer is storing a lot of ASCII text (which only needs 7 bits), it +would be a pretty big waste to dedicate 12 or 16 bits to each character when +you could use 8 bits instead. +- As bytes get bigger, your CPU needs to get more complex. For example you need one bus line per bit. So I guess simpler is better. + +My understanding of CPU architecture is extremely shaky so I’ll leave it at +that. The “it’s a waste of space” reason feels pretty compelling to me though. + +#### reason 5: compatibility + +The Intel 8008 (from 1972) was the precursor to the 8080 (from 1974), which was the precursor to the +8086 (from 1976) – the first x86 processor. It seems like the 8080 and the +8086 were really popular and that’s where we get our modern x86 computers. + +I think there’s an “if it ain’t broke don’t fix it” thing going on here – I +assume that 8-bit bytes were working well, so Intel saw no need to change the +design. If you keep the same 8-bit byte, then you can reuse more of your +instruction set. + +Also around the 80s we start getting network protocols like TCP +which use 8-bit bytes (usually called “octets”), and if you’re going to be +implementing network protocols, you probably want to be using an 8-bit byte. + +#### that’s all! + +It seems to me like the main reasons for the 8-bit byte are: + +- a lot of early computer companies were American, the most commonly used language in the US is English +- those people wanted computers to be good at text processing +- smaller byte sizes are in general better +- 7 bits is the smallest size you can fit all English characters + punctuation in +- 8 is a better number than 7 (because it’s a power of 2) +- once you have popular 8-bit computers that are working well, you want to keep the same design for compatibility + +Someone pointed out that [page 65 of this book from 1962][20] +talking about IBM’s reasons to choose an 8-bit byte basically says the same thing: + +- Its full capacity of 256 characters was considered to be sufficient for the great majority of applications. +- Within the limits of this capacity, a single character is represented by a +single byte, so that the length of any particular record is not dependent on +the coincidence of characters in that record. +- 8-bit bytes are reasonably economical of storage space +- For purely numerical work, a decimal digit can be represented by only 4 +bits, and two such 4-bit bytes can be packed in an 8-bit byte. Although such +packing of numerical data is not essential, it is a common practice in +order to increase speed and storage efficiency. Strictly speaking, 4-bit +bytes belong to a different code, but the simplicity of the 4-and-8-bit +scheme, as compared with a combination 4-and-6-bit scheme, for example, +leads to simpler machine design and cleaner addressing logic. +- Byte sizes of 4 and 8 bits, being powers of 2, permit the computer designer +to take advantage of powerful features of binary addressing and indexing to +the bit level (see Chaps. 4 and 5 ) . + +> + +Overall this makes me feel like an 8-bit byte is a pretty natural choice if +you’re designing a binary computer in an English-speaking country. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2023/03/06/possible-reasons-8-bit-bytes/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lkxed/ +[1]: https://social.jvns.ca/@b0rk/109976810279702728 +[2]: https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html +[3]: https://en.wikipedia.org/wiki/IBM_System/360 +[4]: https://www.youtube.com/watch?v=9oOCrAePJMs&t=140s +[5]: https://en.wikipedia.org/wiki/EBCDIC +[6]: https://en.wikipedia.org/wiki/Intel_8008 +[7]: https://archive.computerhistory.org/resources/text/2009/102683240.05.02.acc.pdf +[8]: https://archive.computerhistory.org/resources/access/text/2013/05/102702492-05-01-acc.pdf +[9]: https://en.wikipedia.org/wiki/36-bit_computing +[10]: https://en.wikipedia.org/wiki/Binary-coded_decimal +[11]: https://commons.wikimedia.org/wiki/File:IBM-650-panel.jpg +[12]: http://creativecommons.org/licenses/by-sa/3.0/ +[13]: https://upload.wikimedia.org/wikipedia/commons/a/ad/IBM-650-panel.jpg +[14]: https://en.wikipedia.org/wiki/Nibble +[15]: https://retrocomputing.stackexchange.com/questions/7937/last-computer-not-to-use-octets-8-bit-bytes +[16]: https://poly.nomial.co.uk/ +[17]: https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgpABZsKBTAWjDACgwEknsUQ08tQQKgU2AdxA8+I6eAyEoEqb3mK8VMAqWSNakHsx9Iywxj6Ea-c0oBKUy-xpUWYGc-D9kcftCQo-URgEZRQERSMnKkiTSTDFLQjw62NlMBorRP5krNjwDP58fMztE04kdKsRFBQqoqoQyUcRVhl6tLdCwVaonXBO2s0Cwb6UPGEPXmiPPLHhIrne2Y9q8a6lcpAp9edo+r7tkW3c5WPtOj4TyQv9G5jlO5saMAibPOeIoppm9oAPEEU2C0-EBaFoThAAHoUGx-mA8FYgfNESgIFUrNDYVtCBBttg8LiUPR0VCYWhyD0Wp0slYACIASQAamTIORFqtuucQAzGTQ2OTaD9BN8Soo6Uy8PzWQ46oImI4aSB6QA5ZTy9EuVQjPLq3q6kQmAD21Beome0qQMHgkDIhHCYVEfCQ9BVbGNRHAiio5vIltg8Ft9stXg99B5MPdFK9tDAFqg-rggcIDui1i23KZfPd3WjPuoVoDCiDjv4gjDErYQA +[18]: http://www.chebucto.ns.ca/~af380/z-80-h.htm +[19]: https://en.wikipedia.org/wiki/Carry-lookahead_adder +[20]: https://web.archive.org/web/20170403014651/http://archive.computerhistory.org/resources/text/IBM/Stretch/pdfs/Buchholz_102636426.pdf From 41057a5c2fb24b766c67fc1c9e1986205072d1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:40:39 +0800 Subject: [PATCH 176/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230303.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=20How=20do=20Nix=20builds=20work.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0230303.2 ⭐️⭐️⭐️ How do Nix builds work.md | 504 ++++++++++++++++++ 1 file changed, 504 insertions(+) create mode 100644 sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md diff --git a/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md b/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md new file mode 100644 index 0000000000..c5923e2034 --- /dev/null +++ b/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md @@ -0,0 +1,504 @@ +[#]: subject: "How do Nix builds work?" +[#]: via: "https://jvns.ca/blog/2023/03/03/how-do-nix-builds-work-/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How do Nix builds work? +====== + +Hello! For some reason after the last [nix post][1] I got nerdsniped by trying to understand how Nix builds +work under the hood, so here’s a quick exploration I did today. There are probably some mistakes in here. + +I started by [complaining on Mastodon][2]: + +> are there any guides to nix that start from the bottom up (for example +> starting with [this bash script][3] +> and then working up the layers of abstraction) instead of from the top down? +> +> all of the guides I’ve seen start by describing the nix programming language +> or other abstractions, and I’d love to see a guide that starts with concepts I +> already understand like compiler flags, linker flags, Makefiles, environment +> variables, and bash scripts. + +Ross Light wrote a great blog post in response called [Connecting Bash to Nix][4], that shows how to compile a basic C program without using most of Nix’s standard machinery. + +I wanted to take this a tiny bit further and compile a slightly more +complicated C program. + +#### the goal: compile a C program, without using Nix’s standard machinery + +Our goal is to compile a C program called `paperjam`. This is a real C program +that wasn’t in the Nix repository already. I already figured out how to +compile it in [this post][1] by copying and pasting a bunch of stuff I didn’t understand, but this time I wanted to do +it in a more principled way where I actually understand more of the steps. + +We’re going to avoid using most of Nix’s helpers for compiling C programs. + +The plan is to start with an almost empty build script, and then resolve errors +until we have a working build. + +#### first: what’s a derivation? + +I said that we weren’t going to talk about too many Nix abstractions (and we won’t!), but understanding what a derivation is really helped me. + +Everything I read about Nix talks about derivations all the time, but I was +really struggling to figure out what a derivation _is_. It turns out that `derivation` +is a function in the Nix language. But not just any function! The whole point of the Nix language seems to be to +to call this function. The [official documentation for the `derivation` function][5] is actually extremely clear. Here’s what I took away: + +`derivation` takes a bunch of keys and values as input. There are 3 required keys: + +- `system`: the system, for example `x86_64-darwin` +- `name`: the name of the package you’re building +- `builder`: a program (usually a bash script) that runs the build + +Every other key is an arbitrary string that gets passed as an environment +variable to the `builder` shell script. + +#### derivations automatically build all their inputs + +A derivation doesn’t just call a shell script though! Let’s say I reference another derivation called `pkgs.qpdf` in my script. + +Nix will: + +- automatically build the `qpdf` package +- put the resulting output directory somewhere like `/nix/store/4garxzr1rpdfahf374i9p9fbxnx56519-qpdf-11.1.0` +- expand `pkgs.qpdf` into that output directory (as a string), so that I can reference it in my build script + +The derivation function does some other things (described in the +[documentation][5]), but “it builds all of its inputs” is all we really need to know +for now. + +#### step 1: write a derivation file + +Let’s write a very simple build script and call the `derivation` function. These don’t work yet, +but I found it pretty fun to go through all the errors, fix them one at a time, +and learn a little more about how Nix works by fixing them. + +Here’s the build script (`build_paperjam.sh`). This just unpacks the tarball and runs `make install`. + +``` +#!/bin/bash + +tar -xf "$SOURCE" +cd paperjam-1.2 +make install +``` + +And here’s the Nix code calling the `derivation` function (in `paperjam.nix`). This calls the core `derivation` function, without too much magic. + +``` +let pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/4d2b37a84fad1091b9de401eb450aae66f1a741e.tar.gz") {}; + +builtins.derivation { + name = "paperjam-fake"; + builder = ./build-paperjam.sh; + system = builtins.currentSystem; + + SOURCE = pkgs.fetchurl { + url = "https://mj.ucw.cz/download/linux/paperjam-1.2.tar.gz"; + hash = "sha256-0AziT7ROICTEPKaA4Ub1B8NtIfLmxRXriW7coRxDpQ0"; + }; +} +``` + +The main things here are: + +- `fetchurl` (which downloads an url and puts the path in to the `SOURCE` environment variable) +- `pkgs` (which lets us depend on other Nix packages from the central repository). I don’t totally understand this but I’m already in a pretty deep rabbit hole so we’re going to leave that for now. + +`SOURCE` evaluates to a string – it’s the path to the downloaded source tarball. + +#### problem 1: tar: command not found + +Nix needs you to declare all the dependencies for your builds. It forces this +by removing your `PATH` environment variable so that you have no binaries in +your PATH at all. + +This is pretty easy to fix: we just need to edit our `PATH`. + +I added this to `paperjam.nix` to get `tar`, `gzip`, and `make`: + +``` +PATH = "${pkgs.gzip}/bin:${pkgs.gnutar}/bin:${pkgs.gnumake}/bin"; +``` + +#### problem 2: we need a compiler + +Next, we had this error: + +``` +g++ -O2 -Wall -Wextra -Wno-parentheses -std=gnu++11 -g -DVERSION='"1.2"' -DYEAR='"2022"' -DBUILD_DATE='""' -DBUILD_COMMIT='""' -c -o paperjam.o paperjam.cc +make: g++: No such file or directory +``` + +So we need to put a compiler in our PATH. For some reason I felt like using `clang++` to compile, not `g++`. To do that I need to make 2 changes to `paperjam.nix`: + +- Add the line `CXX="clang++";` +- Add `${pkgs.clang}/bin` to my `PATH` + +#### problem 3: missing header files + +The next error was: + +``` +> ./pdf-tools.h:13:10: fatal error: 'qpdf/QPDF.hh' file not found + > #include +``` + +Makes sense: everything is isolated, so it can’t access my system header files. +Figuring out how to handle this was a little more confusing though. + +It turns out that the way Nix handles header files is that it has a shell +script wrapper around `clang`. So when you run `clang++`, you’re actually +running a shell script. + +On my system, the `clang++` wrapper script was at `/nix/store/d929v59l9a3iakvjccqpfqckqa0vflyc-clang-wrapper-11.1.0/bin/clang++`. I searched that file for `LDFLAGS` and found that it uses 2 environment variables: + +- `NIX_LDFLAGS_aarch64_apple_darwin` +- `NIX_CFLAGS_COMPILE_aarch64_apple_darwin` + +So I figured I needed to put all the arguments to clang in the `NIX_CFLAGS` variable and all the linker arguments in `NIX_LDFLAGS`. Great! Let’s do that. + +I added these 2 lines to my `paperjam.nix`, to link the `libpaper` and `qpdf` libraries: + +``` +NIX_LDFLAGS_aarch64_apple_darwin = "-L ${pkgs.qpdf}/lib -L ${pkgs.libpaper}/lib"; +NIX_CFLAGS_COMPILE_aarch64_apple_darwin = "-isystem ${pkgs.qpdf}/include -isystem ${pkgs.libpaper}/include"; +``` + +And that worked! + +#### problem 4: missing c++abi + +The next error was: + +``` +> ld: library not found for -lc++abi +``` + +Not sure what this means, but I searched for “abi” in the Nix packages and fixed it by adding `-L ${pkgs.libcxxabi}/lib` to my `NIX_LDFLAGS` environment variable. + +#### problem 5: missing iconv + +Here’s the next error: + +``` +> Undefined symbols for architecture arm64: +> "_iconv", referenced from: ... +``` + +I started by adding `-L ${pkgs.libiconv}/lib` to my `NIX_LDFLAGS` environment variable, but that didn’t fix it. Then I spent a while going around in circles and being confused. + +I eventually figured out how to fix this by taking a working version of the `paperjam` build that I’d made before +and editing my `clang++` wrapper file to print out all of its environment +variables. The `LDFLAGS` environment variable in the working version was different from mine: it had `-liconv` in it. + +So I added `-liconv` to `NIX_LDFLAGS` as well and that fixed it. + +#### why doesn’t the original Makefile have -liconv? + +I was a bit puzzled by this `-liconv` thing though: the original Makefile links +in `libqpdf` and `libpaper` by passing `-lqpdf -lpaper`. So why doesn’t it link in iconv, if it requires the +iconv library? + +I think the reason for this is that the original Makefile assumed that you were +running on Linux and using glibc, and glibc includes these iconv functions by +default. But I guess Mac OS libc doesn’t include iconv, so we need to +explicitly set the linker flag `-liconv` to add the iconv library. + +#### problem 6: missing codesign_allocate + +Time for the next error: + +``` +libc++abi: terminating with uncaught exception of type std::runtime_error: Failed to spawn codesign_allocate: No such file or directory +``` + +I guess this is some kind of Mac code signing thing. I used `find /nix/store -name codesign_allocate` to find `codesign_allocate` on my system. It’s at +`/nix/store/a17dwfwqj5ry734zfv3k1f5n37s4wxns-cctools-binutils-darwin-973.0.1/bin/codesign_allocate`. + +But this doesn’t tell us what the package is called – we need to be able to refer to it as `${pkgs.XXXXXXX}` and `${pkgs.cctools-binutils-darwin}` doesn’t work. + +I couldn’t figure out a way go from a Nix folder to the name of the package, but I ended up poking around and finding out that it was called `pkgs.darwin.cctools`. + +So I added `${pkgs.darwin.cctools}/bin` to the `PATH`. + +#### problem 7: missing a2x + +Easy, just add `${pkgs.asciidoc}/bin` to the `PATH`. + +##### problem 8: missing install + +``` +make: install: No such file or directory +``` + +Apparently `install` is a program? This turns out to be in `coreutils`, so we add `${pkgs.coreutils}/bin` to the `PATH`. Adding `coreutils` also fixes some other warnings I was seeing about missing commands like `date`. + +#### problem 9: can’t create /usr/local/bin/paperjam + +This took me a little while to figure out because I’m not very familiar with make. The Makefile has a `PREFIX` of `/usr/local`, but we want it to be the program’s output directory in `/nix/store/` + +I edited the `build-paperjam.sh` shell script to say: + +``` +make install PREFIX="$out" +``` + +and everything worked! Hooray! + +#### our final configuration + +Here’s the final `paperjam.nix`. It’s not so different from what we started with – we just added 4 environment variables. + +``` +let pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/ae8bdd2de4c23b239b5a771501641d2ef5e027d0.tar.gz") {}; +in + +builtins.derivation { + name = "paperjam-fake"; + builder = ./build-paperjam.sh; + system = builtins.currentSystem; + + SOURCE = pkgs.fetchurl { + url = "https://mj.ucw.cz/download/linux/paperjam-1.2.tar.gz"; + hash = "sha256-0AziT7ROICTEPKaA4Ub1B8NtIfLmxRXriW7coRxDpQ0"; + }; + + CXX="clang++"; + PATH = "${pkgs.gzip}/bin:${pkgs.gnutar}/bin:${pkgs.gnumake}/bin:${pkgs.clang}/bin:${pkgs.darwin.cctools}/bin:${pkgs.asciidoc}/bin:${pkgs.coreutils}/bin:${pkgs.bash}/bin"; + NIX_LDFLAGS_aarch64_apple_darwin = "-L ${pkgs.qpdf}/lib -L ${pkgs.libpaper}/lib -L ${pkgs.libcxxabi}/lib -liconv -L ${pkgs.libiconv}/lib "; + NIX_CFLAGS_COMPILE_aarch64_apple_darwin = "-isystem ${pkgs.qpdf}/include -isystem ${pkgs.libpaper}/include"; +} +``` + +And here’s the final `build-paperjam.sh` build script. Here we just needed to edit the `make install` line to set the `PREFIX`. + +``` +#!/bin/bash + +tar -xf "$SOURCE" +cd paperjam-1.2 +make install PREFIX="$out" +``` + +#### let’s look at our compiled derivation! + +Now that we understand this configuration a little better, let’s talk about +what `nix-build` is doing a little more. + +Behind the scenes, `nix-build paperjam.nix` actually runs `nix-instantiate` and `nix-store --realize`: + +``` +$ nix-instantiate paperjam.nix +/nix/store/xp8kibpll55s0bm40wlpip51y7wnpfs0-paperjam-fake.drv +$ nix-store --realize /nix/store/xp8kibpll55s0bm40wlpip51y7wnpfs0-paperjam-fake.drv +``` + +I think what this means is that `paperjam.nix` get compiled to some +intermediate representation (also called a derivation?), and then the Nix +runtime takes over and is in charge of actually running the build scripts. + +We can look at this `.drv` intermediate representation with `nix show-derivation` + +``` +{ + "/nix/store/xp8kibpll55s0bm40wlpip51y7wnpfs0-paperjam-fake.drv": { + "outputs": { "out": { "path": "/nix/store/bcnyqizvcysqc1vy382wfx015mmwn3bd-paperjam-fake" } + }, + "inputSrcs": [ "/nix/store/pbjj91f0qr8g14k58m744wdl9yvr2f5k-build-paperjam.sh" ], + "inputDrvs": { + "/nix/store/38sikqcggyishxbgi2xnyrdsnq928gqx-asciidoc-10.2.0.drv": [ "out" ], + "/nix/store/3llc749f9pn0amlb9vgwsi22hin7kmz4-libcxxabi-11.1.0.drv": [ "out" ], + "/nix/store/a8ny8lrbpyn15wdxk3v89f4bdr08a38a-libpaper-1.1.28.drv": [ "out" ], + "/nix/store/d888pj9lll12s5qx11v850g1vd4h3vxq-cctools-port-973.0.1.drv": [ "out" ], + "/nix/store/gkpdv7xl39x9yxch0wjarq19mmv7j1pm-bash-5.2-p15.drv": [ "out" ], + "/nix/store/hwx16m7hmkp2rcik8h67nnyjp52zj849-gnutar-1.34.drv": [ "out" ], + "/nix/store/kqqwffajj24fmagxqps3bjcbrglbdryg-gzip-1.12.drv": [ "out" ], + "/nix/store/lnrxa45bza18dk8qgqjayqb65ilfvq2n-qpdf-11.2.0.drv": [ "out" ], + "/nix/store/rx7a5401h44dqsasl5g80fl25jqqih8r-gnumake-4.4.drv": [ "out" ], + "/nix/store/sx8blaza5822y51abdp3353xkdcbkpkb-coreutils-9.1.drv": [ "out" ], + "/nix/store/v3b7r7a8ipbyg9wifcqisf5vpy0c66cs-clang-wrapper-11.1.0.drv": [ "out" ], + "/nix/store/wglagz34w1jnhr4xrfdk0g2jghbk104z-paperjam-1.2.tar.gz.drv": [ "out" ], + "/nix/store/y9mb7lgqiy38fbi53m5564bx8pl1arkj-libiconv-50.drv": [ "out" ] + }, + "system": "aarch64-darwin", + "builder": "/nix/store/pbjj91f0qr8g14k58m744wdl9yvr2f5k-build-paperjam.sh", + "args": [], + "env": { + "CXX": "clang++", + "NIX_CFLAGS_COMPILE_aarch64_apple_darwin": "-isystem /nix/store/h25d99pd3zln95viaybdfynfq82r2dqy-qpdf-11.2.0/include -isystem /nix/store/agxp1hx267qk1x79dl4jk1l5cg79izv1-libpaper-1.1.28/include", + "NIX_LDFLAGS_aarch64_apple_darwin": "-L /nix/store/h25d99pd3zln95viaybdfynfq82r2dqy-qpdf-11.2.0/lib -L /nix/store/agxp1hx267qk1x79dl4jk1l5cg79izv1-libpaper-1.1.28/lib -L /nix/store/awkb9g93ci2qy8yg5jl0zxw46f3xnvgv-libcxxabi-11.1.0/lib -liconv -L /nix/store/nmphpbjn8hhq7brwi9bw41m7l05i636h-libiconv-50/lib ", + "PATH": "/nix/store/90cqrp3nxbcihkx4vswj5wh85x5klaga-gzip-1.12/bin:/nix/store/siv9312sgiqwsjrdvj8lx0mr3dsj3nf5-gnutar-1.34/bin:/nix/store/yy3fdgrshcblwx0cfp76nmmi24szw89q-gnumake-4.4/bin:/nix/store/cqag9fv2gia03nzcsaygan8fw1ggdf4g-clang-wrapper-11.1.0/bin:/nix/store/f16id36r9xxi50mgra55p7cf7ra0x96k-cctools-port-973.0.1/bin:/nix/store/x873pgpwqxkmyn35jvvfj48ccqav7fip-asciidoc-10.2.0/bin:/nix/store/vhivi799z583h2kf1b8lrr72h4h3vfcx-coreutils-9.1/bin:/nix/store/0q1jfjlwr4vig9cz7lnb5il9rg0y1n84-bash-5.2-p15/bin", + "SOURCE": "/nix/store/6d2fcw88d9by4fz5xa9gdpbln73dlhdk-paperjam-1.2.tar.gz", + "builder": "/nix/store/pbjj91f0qr8g14k58m744wdl9yvr2f5k-build-paperjam.sh", + "name": "paperjam-fake", + "out": "/nix/store/bcnyqizvcysqc1vy382wfx015mmwn3bd-paperjam-fake", + "system": "aarch64-darwin" + } + } +} +``` + +This feels surprisingly easy to understand – you can see that there are a +bunch of environment variables, our bash script, and the paths to our inputs. + +#### the compilation helpers we’re not using: stdenv + +Normally when you build a package with Nix, you don’t do all of this stuff +yourself. Instead, you use a helper called `stdenv`, which seems to have two parts: + +- a function called `stdenv.mkDerivation` which takes some arguments and generates a bunch of environment variables (it seems to be [documented here][6]) +- a 1600-line bash build script ([setup.sh][7]) that consumes those environment variables. This is like our `build-paperjam.sh`, but much more generalized. + +Together, these two tools: + +- add `LDFLAGS` automatically for each C library you depend on +- add `CFLAGS` automatically so that you can get your header files +- run `make` +- depend on clang and coreutils and bash and other core utilities so that you don’t need to add them yourself +- set `system` to your current system +- let you easily add custom bash code to run at various phases of your build +- maybe also manage versions somehow? Not sure about this one. + +and probably lots more useful things I don’t know about yet + +#### let’s look at the derivation for jq + +Let’s look at one more compiled derivation, for `jq`. This is quite long but there +are some interesting things in here. I wanted to look at this because I wanted to see what a more typical derivation generated by `stdenv.mkDerivation` looked like. + +``` +$ nix show-derivation /nix/store/q9cw5rp0ibpl6h4i2qaq0vdjn4pyms3p-jq-1.6.drv +{ + "/nix/store/q9cw5rp0ibpl6h4i2qaq0vdjn4pyms3p-jq-1.6.drv": { + "outputs": { + "bin": { "path": "/nix/store/vabn35a2m2qmfi9cbym4z50bwq94fdzm-jq-1.6-bin" }, + "dev": { "path": "/nix/store/akda158i8gr0v0w397lwanxns8yrqldy-jq-1.6-dev" }, + "doc": { "path": "/nix/store/6qimafz8q88l90jwrzciwc27zhjwawcl-jq-1.6-doc" }, + "lib": { "path": "/nix/store/3wzlsin34l1cs70ljdy69q9296jnvnas-jq-1.6-lib" }, + "man": { "path": "/nix/store/dl1xf9w928jai5hvm5s9ds35l0m26m0k-jq-1.6-man" }, + "out": { "path": "/nix/store/ivzm5rrr7riwvgy2xcjhss6lz55qylnb-jq-1.6" } + }, + "inputSrcs": [ + "/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh", + "/nix/store/jd98q1h1rxz5iqd5xs8k8gw9zw941lj6-fix-tests-when-building-without-regex-supports.patch" + ], + "inputDrvs": { + "/nix/store/0lbzkxz56yhn4gv5z0sskzzdlwzkcff8-autoreconf-hook.drv": [ "out" ], + "/nix/store/6wh5w7hkarfcx6fxsdclmlx097xsimmg-jq-1.6.tar.gz.drv": [ "out" ], + "/nix/store/87a32xgqw85rxr1fx3c5j86y177hr9sr-oniguruma-6.9.8.drv": [ "dev" ], + "/nix/store/gkpdv7xl39x9yxch0wjarq19mmv7j1pm-bash-5.2-p15.drv": [ "out" ], + "/nix/store/xn1mjk78ly9wia23yvnsyw35q1mz4jqh-stdenv-darwin.drv": [ "out" ] + }, + "system": "aarch64-darwin", + "builder": "/nix/store/0q1jfjlwr4vig9cz7lnb5il9rg0y1n84-bash-5.2-p15/bin/bash", + "args": [ + "-e", + "/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh" + ], + "env": { + "__darwinAllowLocalNetworking": "", + "__impureHostDeps": "/bin/sh /usr/lib/libSystem.B.dylib /usr/lib/system/libunc.dylib /dev/zero /dev/random /dev/urandom /bin/sh", + "__propagatedImpureHostDeps": "", + "__propagatedSandboxProfile": "", + "__sandboxProfile": "", + "__structuredAttrs": "", + "bin": "/nix/store/vabn35a2m2qmfi9cbym4z50bwq94fdzm-jq-1.6-bin", + "buildInputs": "/nix/store/xfnl6xqbvnpacx8hw9d99ca4mly9kp0h-oniguruma-6.9.8-dev", + "builder": "/nix/store/0q1jfjlwr4vig9cz7lnb5il9rg0y1n84-bash-5.2-p15/bin/bash", + "cmakeFlags": "", + "configureFlags": "--bindir=${bin}/bin --sbindir=${bin}/bin --datadir=${doc}/share --mandir=${man}/share/man", + "depsBuildBuild": "", + "depsBuildBuildPropagated": "", + "depsBuildTarget": "", + "depsBuildTargetPropagated": "", + "depsHostHost": "", + "depsHostHostPropagated": "", + "depsTargetTarget": "", + "depsTargetTargetPropagated": "", + "dev": "/nix/store/akda158i8gr0v0w397lwanxns8yrqldy-jq-1.6-dev", + "doCheck": "", + "doInstallCheck": "1", + "doc": "/nix/store/6qimafz8q88l90jwrzciwc27zhjwawcl-jq-1.6-doc", + "installCheckTarget": "check", + "lib": "/nix/store/3wzlsin34l1cs70ljdy69q9296jnvnas-jq-1.6-lib", + "man": "/nix/store/dl1xf9w928jai5hvm5s9ds35l0m26m0k-jq-1.6-man", + "mesonFlags": "", + "name": "jq-1.6", + "nativeBuildInputs": "/nix/store/ni9k35b9llfc3hys8nv5qsipw8pfy1ln-autoreconf-hook", + "out": "/nix/store/ivzm5rrr7riwvgy2xcjhss6lz55qylnb-jq-1.6", + "outputs": "bin doc man dev lib out", + "patches": "/nix/store/jd98q1h1rxz5iqd5xs8k8gw9zw941lj6-fix-tests-when-building-without-regex-supports.patch", + "pname": "jq", + "postInstallCheck": "$bin/bin/jq --help >/dev/null\n$bin/bin/jq -r '.values[1]' <<< '{\"values\":[\"hello\",\"world\"]}' | grep '^world$' > /dev/null\n", + "preBuild": "rm -r ./modules/oniguruma\n", + "preConfigure": "echo \"#!/bin/sh\" > scripts/version\necho \"echo 1.6\" >> scripts/version\npatchShebangs scripts/version\n", + "propagatedBuildInputs": "", + "propagatedNativeBuildInputs": "", + "src": "/nix/store/ggjlgjx2fw29lngbnvwaqr6hiz1qhy8g-jq-1.6.tar.gz", + "stdenv": "/nix/store/qrz2mnb2gsnzmw2pqax693daxh5hsgap-stdenv-darwin", + "strictDeps": "", + "system": "aarch64-darwin", + "version": "1.6" + } + } +} +``` + +I thought it was interesting that some of the environment variables in here are actually bash scripts themselves – for example the `postInstallCheck` environment variable is a bash script. +Those bash script environment variables are `eval`ed in the main bash script (you can [see that happening in setup.sh here][8]) + +The `postInstallCheck` environment variable in this particular derivation starts like this: + +``` +$bin/bin/jq --help >/dev/null +$bin/bin/jq -r '.values[1]' <<< '{"values":["hello","world"]}' | grep '^world$' > /dev/null +``` + +I guess this is a test to make sure that `jq` installed correctly. + +#### finally: clean up + +All of my compiler experiments used about 3GB of disk space, but `nix-collect-garbage` cleaned up all of it. + +#### let’s recap the process! + +I feel like I understand Nix a bit better after going through this. I still +don’t feel very motivated to learn the Nix language, but now I have some +idea of what Nix programs are actually doing under the hood! + +My understanding is: + +- First, `.nix` files get compiled into a `.drv` file, which is mostly a bunch of inputs and outputs and environment variables. This is where the Nix language stops being relevant. +- Then all the environment variables get passed to a build script, which is in charge of doing the actual build +- In the Nix standard environment (`stdenv`), some of those environment variables are themselves bash code, which gets `eval`ed by the big build script `setup.sh` + +That’s all! I probably made some mistakes in here, but this was kind of a fun rabbit hole. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2023/03/03/how-do-nix-builds-work-/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lkxed/ +[1]: https://jvns.ca/blog/2023/02/28/some-notes-on-using-nix/ +[2]: https://social.jvns.ca/@b0rk/109954253779465018 +[3]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh +[4]: https://www.zombiezen.com/blog/2023/03/connecting-bash-to-nix/ +[5]: https://nixos.org/manual/nix/stable/language/derivations.html +[6]: https://nixos.org/manual/nixpkgs/stable/#chap-stdenv +[7]: https://github.com/NixOS/nixpkgs/blob/fc2bfe1cdc910104e6df52c5dc449e8f855c66b7/pkgs/stdenv/generic/setup.sh +[8]: https://github.com/NixOS/nixpkgs/blob/fc2bfe1cdc910104e6df52c5dc449e8f855c66b7/pkgs/stdenv/generic/setup.sh#L61-L74 From d82f3479dc764d7f85f27ad7c3152cf2e2609e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:41:42 +0800 Subject: [PATCH 177/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230228.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20So?= =?UTF-8?q?me=20notes=20on=20using=20nix.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20230228.4 ⭐️⭐️ Some notes on using nix.md | 381 ++++++++++++++++++ 1 file changed, 381 insertions(+) create mode 100644 sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md diff --git a/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md b/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md new file mode 100644 index 0000000000..48ed8e6a64 --- /dev/null +++ b/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md @@ -0,0 +1,381 @@ +[#]: subject: "Some notes on using nix" +[#]: via: "https://jvns.ca/blog/2023/02/28/some-notes-on-using-nix/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Some notes on using nix +====== + +Recently I started using a Mac for the first time. The biggest downside I’ve +noticed so far is that the package management is much worse than on Linux. +At some point I got frustrated with homebrew because I felt like it was +spending too much time upgrading when I installed new packages, and so I +thought – maybe I’ll try the [nix][1] package manager! + +nix has a reputation for being confusing (it has its whole +own programming language!), so I’ve been trying to figure out how to use nix in +a way that’s as simple as possible and does not involve managing any +configuration files or learning a new programming language. Here’s what I’ve +figured out so far! We’ll talk about how to: + +- install packages with nix +- build a custom nix package for a C++ program called [paperjam][2] +- install a 5-year-old version of [hugo][3] with nix + +As usual I’ve probably gotten some stuff wrong in this post since I’m still +pretty new to nix. I’m also still not sure how much I like nix – it’s very +confusing! But it’s helped me compile some software that I was struggling to +compile otherwise, and in general it seems to install things faster than +homebrew. + +#### what’s interesting about nix? + +People often describe nix as “declarative package management”. I don’t +care that much about declarative package management, so here are two things +that I appreciate about nix: + +- It provides binary packages (hosted at [https://cache.nixos.org/][4]) that you can quickly download and install +- For packages which don’t have binary packages, it makes it easier to compile them + +I think that the reason nix is good at compiling software is that: + +- you can have multiple versions of the same library or program installed at a time (you could have 2 different versions of libc for instance). For example I have two versions of node on my computer right now, one at `/nix/store/4ykq0lpvmskdlhrvz1j3kwslgc6c7pnv-nodejs-16.17.1` and one at `/nix/store/5y4bd2r99zhdbir95w5pf51bwfg37bwa-nodejs-18.9.1`. +- when nix builds a package, it builds it in isolation, using only the +specific versions of its dependencies that you explicitly declared. So +there’s no risk that the package secretly depends on another package on your +system that you don’t know about. No more fighting with `LD_LIBRARY_PATH`! +- a lot of people have put a lot of work into writing down all of the +dependencies of packages + +I’ll give a couple of examples later in this post of two times nix made it easier for me to compile software. + +#### how I got started with nix + +here’s how I got started with nix: + +- Install nix. I forget exactly how I did this, but it looks like there’s an [official installer][5] and an [unofficial installer from zero-to-nix.com][6]. The [instructions for uninstalling nix on MacOS with the standard multi-user install][7] are a bit complicated, so it might be worth choosing an installation method with simpler uninstall instructions. +- Put `~/.nix-profile/bin` on my PATH +- Install packages with `nix-env -iA nixpkgs.NAME` +- That’s it. + +Basically the idea is to treat `nix-env -iA` like `brew install` or `apt-get install`. + +For example, if I want to install `fish`, I can do that like this: + +``` +nix-env -iA nixpkgs.fish +``` + +This seems to just download some binaries from [https://cache.nixos.org][8] – pretty simple. + +Some people use nix to install their Node and Python and Ruby packages, but I haven’t +been doing that – I just use `npm install` and `pip install` the same way I +always have. + +#### some nix features I’m not using + +There are a bunch of nix features/tools that I’m not using, but that I’ll +mention. I originally thought that you _had_ to use these features to use nix, +because most of the nix tutorials I’ve read talk about them. But you don’t have to use them. + +- NixOS (a Linux distribution) +- [nix-shell][9] +- [nix flakes][10] +- [home-manager][11] +- [devenv.sh][12] + +I won’t go into these because I haven’t really used them and there are lots of +explanations out there. + +#### where are nix packages defined? + +I think packages in the main nix package repository are defined in [https://github.com/NixOS/nixpkgs/][13] + +It looks like you can search for packages at [https://search.nixos.org/packages][14]. The two official ways to search packages seem to be: + +- `nix-env -qaP NAME`, which is very extremely slow and which I haven’t been able to get to actually work +- `nix --extra-experimental-features 'nix-command flakes' search nixpkgs NAME`, which does seem to work but is kind of a mouthful. Also all of the packages it prints out start with `legacyPackages` for some reason + +I found a way to search nix packages from the command line that I liked better: + +- Run `nix-env -qa '*' > nix-packages.txt` to get a list of every package in the Nix repository +- Write a short `nix-search` script that just greps `packages.txt` (`cat ~/bin/nix-packages.txt | awk '{print $1}' | rg "$1"`) + +#### everything is installed with symlinks + +One of nix’s major design choices is that there isn’t one single `bin` with all +your packages, instead you use symlinks. There are a lot of layers of symlinks. A few examples of symlinks: + +- `~/.nix-profile` on my machine is (indirectly) a symlink to `/nix/var/nix/profiles/per-user/bork/profile-111-link/` +- `~/.nix-profile/bin/fish` is a symlink to `/nix/store/afkwn6k8p8g97jiqgx9nd26503s35mgi-fish-3.5.1/bin/fish` + +When I install something, it creates a new `profile-112-link` directory with new symlinks and updates my `~/.nix-profile` to point to that directory. + +I think this means that if I install a new version of `fish` and I don’t like it, I can +easily go back just by running `nix-env --rollback` – it’ll move me to my previous profile directory. + +#### uninstalling packages doesn’t delete them + +If I uninstall a nix package like this, it doesn’t actually free any hard drive space, it just removes the symlinks. + +``` +$ nix-env --uninstall oil +``` + +I’m still not sure how to actually delete the package – I ran a garbage collection like this, which seemed to delete some things: + +``` +$ nix-collect-garbage +... +85 store paths deleted, 74.90 MiB freed +``` + +But I still have `oil` on my system at `/nix/store/8pjnk6jr54z77jiq5g2dbx8887dnxbda-oil-0.14.0`. + +There’s a more aggressive version of `nix-collect-garbage` that also deletes old versions of your profiles (so that you can’t rollback) + +``` +$ nix-collect-garbage -d --delete-old +``` + +That doesn’t delete `/nix/store/8pjnk6jr54z77jiq5g2dbx8887dnxbda-oil-0.14.0` either though and I’m not sure why. + +#### upgrading + +It looks like you can upgrade nix packages like this: + +``` +nix-channel --update +nix-env --upgrade +``` + +(similar to `apt-get update && apt-get upgrade`) + +I haven’t really upgraded anything yet. I think that if something goes wrong with an upgrade, you can roll back (because everything is immutable in nix!) with + +``` +nix-env --rollback +``` + +Someone linked me to [this post from Ian Henry][15] that +talks about some confusing problems with `nix-env --upgrade` – maybe it +doesn’t work the way you’d expect? I guess I’ll be wary around upgrades. + +#### next goal: make a custom package of paperjam + +After a few months of installing existing packages, I wanted to make a custom package with nix for a program called [paperjam][2] that wasn’t already packaged. + +I was actually struggling to compile `paperjam` at all even without nix because the version I had +of `libiconv` I has on my system was wrong. I thought it might be easier to +compile it with nix even though I didn’t know how to make nix packages yet. And +it actually was! + +But figuring out how to get there was VERY confusing, so here are some notes about how I did it. + +#### how to build an example package + +Before I started working on my `paperjam` package, I wanted to build an example existing package just to +make sure I understood the process for building a package. I was really +struggling to figure out how to do this, but I asked in Discord and someone +explained to me how I could get a working package from [https://github.com/NixOS/nixpkgs/][13] and build it. So here +are those instructions: + +**step 1:** Download some arbitrary package from [nixpkgs][13] on github, for example the `dash` package: + +``` +wget https://raw.githubusercontent.com/NixOS/nixpkgs/47993510dcb7713a29591517cb6ce682cc40f0ca/pkgs/shells/dash/default.nix -O dash.nix +``` + +**step 2**: Replace the first statement (`{ lib , stdenv , buildPackages , autoreconfHook , pkg-config , fetchurl , fetchpatch , libedit , runCommand , dash }:` with `with import {};` I don’t know why you have to do this, +but it works. + +**step 3**: Run `nix-build dash.nix` + +This compiles the package + +**step 4**: Run `nix-env -i -f dash.nix` + +This installs the package into my `~/.nix-profile` + +That’s all! Once I’d done that, I felt like I could modify the `dash` package and make my own package. + +#### how I made my own package + +`paperjam` has one dependency (`libpaper`) that also isn’t packaged yet, so I needed to build `libpaper` first. + +Here’s `libpaper.nix`. I basically just wrote this by copying and pasting from +other packages in the [nixpkgs][13] repository. +My guess is what’s happening here is that nix has some default rules for +compiling C packages (like “run `make install`”), so the `make install` happens +default and I don’t need to configure it explicitly. + +``` +with import {}; + +stdenv.mkDerivation rec { + pname = "libpaper"; + version = "0.1"; + + src = fetchFromGitHub { + owner = "naota"; + repo = "libpaper"; + rev = "51ca11ec543f2828672d15e4e77b92619b497ccd"; + hash = "sha256-S1pzVQ/ceNsx0vGmzdDWw2TjPVLiRgzR4edFblWsekY="; + }; + + buildInputs = [ ]; + + meta = with lib; { + homepage = "https://github.com/naota/libpaper"; + description = "libpaper"; + platforms = platforms.unix; + license = with licenses; [ bsd3 gpl2 ]; + }; +} +``` + +Basically this just tells nix how to download the source from GitHub. + +I built this by running `nix-build libpaper.nix` + +Next, I needed to compile `paperjam`. Here’s a link to the [nix package I wrote][16]. The main things I needed to do other than telling it where to download the source were: + +- add some extra build dependencies (like `asciidoc`) +- set some environment variables for the install (`installFlags = [ "PREFIX=$(out)" ];`) so that it installed in the correct directory instead of `/usr/local/bin`. + +I set the hashes by first leaving the hash empty, then running `nix-build` to get an error message complaining about a mismatched hash. Then I copied the correct hash out of the error message. + +I figured out how to set `installFlags` just by running `rg PREFIX` +in the nixpkgs repository – I figured that needing to set a `PREFIX` was +pretty common and someone had probably done it before, and I was right. So I +just copied and pasted that line from another package. + +Then I ran: + +``` +nix-build paperjam.nix +nix-env -i -f paperjam.nix +``` + +and then everything worked and I had `paperjam` installed! Hooray! + +#### next goal: install a 5-year-old version of hugo + +Right now I build this blog using Hugo 0.40, from 2018. I don’t need any new +features so I haven’t felt a need to upgrade. On Linux this is easy: Hugo’s +releases are a static binary, so I can just download the 5-year-old binary from +the [releases page][17] and +run it. Easy! + +But on this Mac I ran into some complications. Mac hardware has changed in the +last 5 years, so the Mac Hugo binary I downloaded crashed. And when I tried to +build it from source with `go build`, that didn’t work either because Go build +norms have changed in the last 5 years as well. + +I was working around this by running Hugo in a Linux docker container, but I +didn’t love that: it was kind of slow and it felt silly. It shouldn’t be that +hard to compile one Go program! + +Nix to the rescue! Here’s what I did to install the old version of Hugo with +nix. + +#### installing Hugo 0.40 with nix + +I wanted to install Hugo 0.40 and put it in my PATH as `hugo-0.40`. Here’s how +I did it. I did this in a kind of weird way, but it worked ([Searching and installing old versions of Nix packages][18] +describes a probably more normal method). + +**step 1**: Search through the nixpkgs repo to find Hugo 0.40 + +I found the `.nix` file here [https://github.com/NixOS/nixpkgs/blob/17b2ef2/pkgs/applications/misc/hugo/default.nix][19] + +**step 2**: Download that file and build it + +I downloaded that file (and another file called `deps.nix` in the same directory), replaced the first line with `with import {};`, and built it with `nix-build hugo.nix`. + +That almost worked without any changes, but I had to make two changes: + +- replace `with stdenv.lib` to `with lib` for some reason. +- rename the package to `hugo040` so that it wouldn’t conflict with the other version of `hugo` that I had installed + +**step 3**: Rename `hugo` to `hugo-0.40` + +I write a little post install script to rename the Hugo binary. + +``` +postInstall = '' + mv $out/bin/hugo $out/bin/hugo-0.40 + ''; +``` + +I figured out how to run this by running `rg 'mv '` in the nixpkgs repository and just copying and modifying something that seemed related. + +**step 4**: Install it + +I installed into my `~/.nix-profile/bin` by running `nix-env -i -f hugo.nix`. + +And it all works! I put the final `.nix` file into my own personal [nixpkgs repo][20] so that I can use it again later if I +want. + +#### reproducible builds aren’t magic, they’re really hard + +I think it’s worth noting here that this `hugo.nix` file isn’t magic – the +reason I can easily compile Hugo 0.40 today is that many people worked for a long time to make it possible to +package that version of Hugo in a reproducible way. + +#### that’s all! + +Installing `paperjam` and this 5-year-old version of Hugo were both +surprisingly painless and actually much easier than compiling it without nix, +because nix made it much easier for me to compile the `paperjam` package with +the right version of `libiconv`, and because someone 5 years ago had already +gone to the trouble of listing out the exact dependencies for Hugo. + +I don’t have any plans to get much more complicated with nix (and it’s still +very possible I’ll get frustrated with it and go back to homebrew!), but we’ll +see what happens! I’ve found it much easier to start in a simple way and then +start using more features if I feel the need instead of adopting a whole bunch +of complicated stuff all at once. + +I probably won’t use nix on Linux – I’ve always been happy enough with `apt` +(on Debian-based distros) and `pacman` (on Arch-based distros), and they’re +much less confusing. But on a Mac it seems like it might be worth it. We’ll +see! It’s very possible in 3 months I’ll get frustrated with nix and just go back to homebrew. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2023/02/28/some-notes-on-using-nix/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lkxed/ +[1]: https://nixos.org/ +[2]: https://mj.ucw.cz/sw/paperjam/ +[3]: https://github.com/gohugoio/hugo/ +[4]: https://cache.nixos.org/ +[5]: https://nixos.org/download +[6]: https://zero-to-nix.com/concepts/nix-installer +[7]: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos +[8]: https://cache.nixos.org +[9]: https://nixos.org/guides/nix-pills/developing-with-nix-shell.html +[10]: https://nixos.wiki/wiki/Flakes +[11]: https://github.com/nix-community/home-manager +[12]: https://devenv.sh/ +[13]: https://github.com/NixOS/nixpkgs/ +[14]: https://search.nixos.org/packages +[15]: https://ianthehenry.com/posts/how-to-learn-nix/my-first-package-upgrade/ +[16]: https://github.com/jvns/nixpkgs/blob/22b70a48a797538c76b04261b3043165896d8f69/paperjam.nix +[17]: https://github.com/gohugoio/hugo/releases/tag/v0.40 +[18]: https://lazamar.github.io/download-specific-package-version-with-nix/ +[19]: https://github.com/NixOS/nixpkgs/blob/17b2ef2/pkgs/applications/misc/hugo/default.nix +[20]: https://github.com/jvns/nixpkgs/ \ No newline at end of file From f5b467a1def29e347235562222be92d3716790e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Fri, 24 Mar 2023 19:42:01 +0800 Subject: [PATCH 178/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230216.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Wr?= =?UTF-8?q?iting=20Javascript=20without=20a=20build=20system.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️ Writing Javascript without a build system.md | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 sources/tech/20230216.2 ⭐️⭐️ Writing Javascript without a build system.md diff --git a/sources/tech/20230216.2 ⭐️⭐️ Writing Javascript without a build system.md b/sources/tech/20230216.2 ⭐️⭐️ Writing Javascript without a build system.md new file mode 100644 index 0000000000..bd45ab0824 --- /dev/null +++ b/sources/tech/20230216.2 ⭐️⭐️ Writing Javascript without a build system.md @@ -0,0 +1,226 @@ +[#]: subject: "Writing Javascript without a build system" +[#]: via: "https://jvns.ca/blog/2023/02/16/writing-javascript-without-a-build-system/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Writing Javascript without a build system +====== + +Hello! I’ve been writing some Javascript this week, and as always when I start +a new frontend project, I was faced with the question: should I use a build +system? + +I want to talk about what’s appealing to me about build systems, why I +(usually) still don’t use them, and why I find it frustrating that some +frontend Javascript libraries require that you use a build system. + +I’m writing this because most of the writing I see about JS assumes that +you’re using a build system, and it can be hard to navigate for folks like me +who write very simple small Javascript projects that don’t require a build +system. + +#### what’s a build system? + +The idea is that you have a bunch of Javascript or Typescript code, and you +want to translate it into different Javascript code before you put it on your +website. + +Build systems can do lots of useful things, like: + +- combining 100s of JS files into one big bundle (for efficiency reasons) +- translating Typescript into Javascript +- typechecking Typescript +- minification +- adding polyfills to support older browsers +- compiling JSX +- treeshaking (remove unused JS code to reduce file sizes) +- building CSS (like [tailwind][1] does) +- and probably lots of other important things + +Because of this, if you’re building a complex frontend project today, probably you’re using a build system like webpack, rollup, esbuild, parcel, or vite. + +Lots of those features are appealing to me, and I’ve used build systems in the past for some of these reasons: [Mess With DNS][2] uses `esbuild` to translate Typescript and combine lots of files into one big file, for example. + +#### the goal: easily make changes to old tiny websites + +I make a lot [of][3][small][4][simple][5][websites][6], I have approximately 0 maintenance energy for any of them, and I change them very infrequently. + +My goal is that if I have a site that I made 3 or 5 years ago, I’d like to be able to, in 20 minutes: + +- get the source from github on a new computer +- make some changes +- put it on the internet + +But my experience with build systems (not just Javascript build systems!), is +that if you have a 5-year-old site, often it’s a huge pain to get the site +built again. + +And because most of my websites are pretty small, the _advantage_ of using a +build system is pretty small – I don’t really need Typescript or JSX. I can +just have one 400-line `script.js` file and call it a day. + +#### example: trying to build the SQL playground + +One of my sites (the [sql playground][5]) uses a build system (it’s using Vue). I last edited that project 2 years ago, on a different machine. + +Let’s see if I can still easily build it today on my machine. To start out, we have to run `npm install`. Here’s the output I get. + +``` +$ npm install +[lots of output redacted] +npm ERR! code 1 +npm ERR! path /Users/bork/work/sql-playground.wizardzines.com/node_modules/grpc +npm ERR! command failed +npm ERR! command sh /var/folders/3z/g3qrs9s96mg6r4dmzryjn3mm0000gn/T/install-b52c96ad.sh +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_trace.o +npm ERR! CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channelz.o +``` + +There’s some kind of error building `grpc`. No problem. I don’t +really need that dependency anyway, so I can just take 5 minutes to tear it out +and rebuild. Now I can `npm install` and everything works. + +Now let’s try to build the project: + +``` +$ npm run build + ? Building for production...Error: error:0308010C:digital envelope routines::unsupported + at new Hash (node:internal/crypto/hash:71:19) + at Object.createHash (node:crypto:130:10) + at module.exports (/Users/bork/work/sql-playground.wizardzines.com/node_modules/webpack/lib/util/createHash.js:135:53) + at NormalModule._initBuildHash (/Users/bork/work/sql-playground.wizardzines.com/node_modules/webpack/lib/NormalModule.js:414:16) + at handleParseError (/Users/bork/work/sql-playground.wizardzines.com/node_modules/webpack/lib/NormalModule.js:467:10) + at /Users/bork/work/sql-playground.wizardzines.com/node_modules/webpack/lib/NormalModule.js:499:5 + at /Users/bork/work/sql-playground.wizardzines.com/node_modules/webpack/lib/NormalModule.js:356:12 + at /Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:373:3 + at iterateNormalLoaders (/Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:214:10) + at iterateNormalLoaders (/Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:221:10) + at /Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:236:3 + at runSyncOrAsync (/Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:130:11) + at iterateNormalLoaders (/Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:232:2) + at Array. (/Users/bork/work/sql-playground.wizardzines.com/node_modules/loader-runner/lib/LoaderRunner.js:205:4) + at Storage.finished (/Users/bork/work/sql-playground.wizardzines.com/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16) + at /Users/bork/work/sql-playground.wizardzines.com/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9 +``` + +[This stack overflow answer][7] suggests running `export NODE_OPTIONS=--openssl-legacy-provider` to fix this error. + +That works, and finally I can `npm run build` to build the project. + +This isn’t really that bad (I only had to remove a dependency and pass a slightly mysterious node option!), +but I would rather not be derailed by those build errors. + +#### for me, a build system isn’t worth it for small projects + +For me, a complicated Javascript build system just doesn’t seem worth it for +small 500-line projects – it means giving up being able to easily update the +project in the future in exchange for some pretty marginal benefits. + +#### esbuild seems a little more stable + +I want to give a quick shoutout to esbuild: I [learned about esbuild in 2021][8] and used for a project, and +so far it does seem a more reliable way to build JS projects. + +I just tried to build an `esbuild` project that I last touched 8 months ago on +a new computer, and it worked. But I can’t say for sure if I’ll be able to +easily build that project in 2 years. Maybe it will, I hope so! + +#### not using a build system is usually pretty easy + +Here’s what the part of [nginx playground][6] code that imports all the libraries looks like: + +``` + + + + + + + +``` + +This project is also using Vue, but it just uses a ` + + + + + + +``` + +这个项目也在使用 Vue,但它只是用 ` - - - - - - -``` - -This project is also using Vue, but it just uses a `` +- Call the [ClassicEditor.create()][3] method to display the editor.`` + +And that's it. A full web page with an embedded CKEditor 5: + +``` + + + + + CKEditor 5 – Classic editor + + + +

CKEditor 5 - cool, eh?

+
+

This is some sample content for my new WYSIWYG editor.

+
+ + + +``` + +Open it in your browser to test the WYSIWYG editor: + +![CKEditor 5 running in the browser.][4] + +### Advanced WYSIWYG editing + +Yes, there are only three steps, and it's running. But this simple example also uncovers some typical challenges faced by an integrator of an external framework. + +- It's just a simple HTML website that misses the entire context of your app. +- The UI doesn't match your design system. +- Your app is written in React/Angular/Vue, or something else. +- You don't want to serve CDN scripts, and prefer to self-host. +- The feature set of the editor isn't what you need. +- Also, some of your users prefer Markdown to HTML or WYSIWYG "magic". + +So how do you resolve some of these issues? Most editor components allow for some degree of customization that's still cheaper than writing a custom script to properly handle user content creation. + +CKEditor 5 uses a plugin-based architecture, which provides excellent customizability and extensibility. By putting in some effort, you can benefit from a stable, popular, and reliable solution set up to look and work exactly as you want. Drupal 10, for example, built CKEditor 5 into its core and enriched it with some typical CMS functionality like a media library through custom plugins. + +What are some ways you can take advantage of all these customization options? Here are five that showcase its versatility: + +### 1. Flexible UI options + +The first thing to notice when looking at a component to integrate with your application is its user interface. The CKEditor 5 framework delivers a [few different UI types][5]. For example: + +- Classic Editor, used in the first example, offers a toolbar with an editing area placed in a specific position on the page. The toolbar stays visible when you scroll down the page, and the editor automatically grows with the content. +- The Document editor provides a similar editing experience to applications such as Microsoft Word or Google Docs, with a UI that resembles a paper document. +- If you're looking for distraction-free editing, where the content is placed in its target location on the web page without the editor UI getting in your way, you have a few options. The Inline Editor, Balloon Editor, and Balloon Block Editor all come with different types of floating toolbars that appear as needed. + +Besides that, you can play with the toolbar to move the buttons around, group them into drop-downs, use a multi-line toolbar, or hide some less-frequently needed buttons in the "three dots" or "more options" menu. Or, if you wish, move the entire toolbar to the bottom. + +It may also happen that you prefer to go the headless route. Plenty of projects use the powerful editing engine of CKEditor 5 but coupled with their own UI created in, for example, React. The most notable example is Microsoft Teams, believe it or not. Yes, it's using CKEditor 5. + +![Different types of WYSIWYG editor UI.][6] + +### 2. Choose a full-featured editor or a lightweight one + +In digital content editing, there's no "one size fits all" solution. Depending on the type of content you need, the feature set differs. CKEditor 5 has a plugin-based architecture and features are implemented in a highly decoupled and granular way. + +It's easy to get lost in all the possible features, sub-features, and configuration options without some guidance. Here are some useful resources to help you build the editor that's a perfect match for your use case: + +- Try the [feature-rich editor demo][7] to test some of the most popular features. +- Look at some other editor setups [on the demo page][5]. You can find the complete source code of each demo in the [ckeditor5-demos repository][8]. +- The entire **Features** section of the [documentation][9] explains all CKEditor 5 features, possible configuration options, toolbar buttons, and API. +- [CKEditor 5 online builder][10] is a quick and easy solution to build your custom editor in 5 steps. It allows you to choose the UI type, plugins, toolbar setup, and UI language and then download a ready-to-use editor bundle. + +![A full-featured and lightweight WYSIWYG editor.][11] + +### 3. Integrations with JavaScript frameworks + +The online builder and demos are a fun playground if you want to test a few solutions in a no-code fashion, but you may need tighter integration. You can also install CKEditor 5 with npm, or bundle it with your app using webpack or Vite. CKEditor 5 is written in pure TypeScript and JavaScript, so it's compatible with every JavaScript framework available. + +Four official integrations are available for the most popular frameworks: + +- Angular +- React +- Vue.js v2 +- Vue.js v3 + +For example, to set up the Classic Editor (used in my first example) in React, you can use this one-liner: + +``` +npx create-react-app ckeditor5-classic-demo \ +--template @ckeditor/ckeditor5-classic +``` + +### 4. Markdown and HTML + +For some developers, Markdown might feel like second nature. It has its limitations, though. For example, support for tables is quite basic. Still, for many users, crafting content in Markdown is much more efficient than using the editor UI to format it. + +And here's the fun part. Thanks to CKEditor's autoformatting, you can use Markdown syntax when writing, and the editor formats the content as you type.This is a nice compromise for covering the needs of both power users and users unfamiliar with Markdown and preferring to create rich text using the WYSIWYG UI. + +![YouTube Video][11] + +### 5. Different input and output + +Autoformatting is just one aspect of Markdown support in CKEditor 5. Another is that you can configure the editor to treat Markdown as its input and output format instead of HTML. + +![Support for Markdown source in CKEditor 5.][13] + +Here's another challenge. If you allow the users to input content in your app, they can create it there but also paste it from different sources (other websites, Microsoft Word, Google Docs). They naturally expect the structure and formatting of pasted text to be preserved. This may result in some nasty styles and unwanted elements making their way to your content, and you have to clean up. Instead of trying to reconcile these two potential clashes of interest by yourself, it's better to rely on a good editor that solves this problem for you. + +In the case of CKEditor 5, the **Paste from Office** feature provides great support for pasting content from Word or Google Docs, preserving the structure, and translating the formatting into semantic content. + +The default CKEditor 5 settings also prevent users from adding or pasting elements and styles unsupported by the feature set chosen for your editor. If you, as an integrator, configure the editor to support just links, lists, and basic styles such as bold or italic, then the user can't add tables, images, or YouTube videos. + +Then again, if you would like your editor to accept content that's not covered by your feature set or even not supported by any existing CKEditor 5 features, you can achieve that thanks to the so-called **General HTML support** functionality. This is useful for loading pre-existing content created in other tools, and can make your migration to CKEditor 5 easier. + +### Building custom plugins + +No matter how great a ready-made solution is, you may still need to customize it even more. After all, thanks to reusing an advanced WYSIWYG editing component, you've saved yourself plenty of time and coding effort. You may want to get your hands dirty and polish your solution a bit, for example, by creating custom plugins. + +Here are some useful resources to get you started: + +- [Creating your own plugins][14]: Documentation for developers. +- [Package generator][15]: A handy tool that helps you set up your plugin development environment. +- [CKEditor 5 inspector][16]: Debugging tools for editor internals like model, view, and commands. + +![An editor instance examined in CKEditor 5 inspector.][17] + +### How to get CKEditor + +CKEditor 5 is licensed under the terms of GPL 2 or later, but if you are running an open source project under an OSI-approved license incompatible with GPL, the CKEditor team is [happy to support you][18] with a no-cost license. + +CKEditor 5 is a powerful modern rich text editor framework that allows developers to build upon an open source, tested, and reliable editor. Start-ups, leading brands, and software providers use it to improve both their content creation and content production workflows. If your users value those benefits, [check it out][2]! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/website-text-editor-ckeditor + +作者:[Anna Tomanek][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/annatomanek +[b]: https://github.com/lkxed/ +[1]: https://github.com/ckeditor/ckeditor5 +[2]: https://ckeditor.com/ckeditor-5/ +[3]: https://ckeditor.com/docs/ckeditor5/latest/api/module_editor-classic_classiceditor-ClassicEditor.html#static-function-create +[4]: https://opensource.com/sites/default/files/2023-03/100002010000063E00000138357C421E3B4E1584.webp +[5]: https://ckeditor.com/ckeditor-5/demo/ +[6]: https://opensource.com/sites/default/files/2023-03/1000020100000641000003857D449853B71C3F41.webp +[7]: https://ckeditor.com/ckeditor-5/demo/feature-rich/ +[8]: https://github.com/ckeditor/ckeditor5-demos +[9]: https://ckeditor.com/docs/ckeditor5/latest/index.html +[10]: https://ckeditor.com/ckeditor-5/online-builder/ +[11]: https://opensource.com/sites/default/files/2023-03/100002010000064100000385F7C262D126752F22.webp +[12]: https://www.youtube.com/embed/8um84htrjXQ +[13]: https://opensource.com/sites/default/files/2023-03/10000201000006410000038504C1A8A0DEA95683.webp +[14]: https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/plugins.html +[15]: https://www.npmjs.com/package/ckeditor5-package-generator +[16]: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/development-tools.html#ckeditor-5-inspector +[17]: https://opensource.com/sites/default/files/2023-03/10000201000007F60000060EFCB2F92FBCC02B4E.webp +[18]: https://ckeditor.com/contact/ \ No newline at end of file From 8517d583ba125a30d3689793576ca9af2afafd7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Tue, 4 Apr 2023 01:33:47 +0800 Subject: [PATCH 256/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230403.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ho?= =?UTF-8?q?w=20to=20Install=20KVM=20on=20Rocky=20Linux=209=20=20AlmaLinux?= =?UTF-8?q?=209.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ow to Install KVM on Rocky Linux 9 AlmaLinux 9.md | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md diff --git a/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md b/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md new file mode 100644 index 0000000000..b46c8cb942 --- /dev/null +++ b/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md @@ -0,0 +1,242 @@ +[#]: subject: "How to Install KVM on Rocky Linux 9 / AlmaLinux 9" +[#]: via: "https://www.linuxtechi.com/install-kvm-on-rocky-linux-almalinux/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install KVM on Rocky Linux 9 / AlmaLinux 9 +====== + +In this guide, we demonstrate how to install KVM on Rocky Linux 9 / Alma Linux 9. + +KVM, short for Kernel Virtualization Machine, is an opensource virtualization platform designed for the Linux kernel. It’s a type 1 hypervisor, or commonly referred to as a bare metal hypervisor. It allows users to create and manage multiple guest machines which can be spun from either Linux or Windows operating systems. + +Like most virtualization platforms, it abstracts hardware resources such as CPU, memory, storage, network, graphics etc. and allocates them to guest machines which run independently of the host. + +##### Prerequisites + +- Pre Installed Rocky Linux 9 / AlmaLinux 9 +- Sudo User with admin rights +- Internet Connectivity + +### 1)  Verify if hardware Virtualization is Enabled + +To start off, you need to verify if your system has the virtualization feature enabled. On most modern systems, this feature comes already enabled in the BIOS. But just to be sure, you can verify if virtualization is enabled as shown. + +The command probes for the presence of vmx (Virtual Machine Extension) which is a CPU flag for Intel hardware virtualization or svm which is the flag for AMD hardware virtualization. + +``` +$ cat /proc/cpuinfo | egrep "vmx|svm" +``` + +From the following output, you can see that our system has Intel Hardware virtualization enabled. + +### 2)  Install KVM on Rocky Linux 9 / AlmaLinux 9 + +Once you have ensured that virtualization is enabled, the next step is to install KVM and management tools. To do so, run the following dnf command. + +``` +$ sudo dnf install qemu-kvm virt-manager libvirt virt-install virt-viewer virt-top bridge-utils  bridge-utils virt-top libguestfs-tools -y +``` + +Once the installation is complete, run the following command to check if the required KVM modules have been loaded. + +``` +$ lsmod | grep kvm +``` + +You should get the following output to confirm that the necessary modules have been loaded. + +### 3)  Start and Enable the libvirtd daemon + +In the next step, be sure to start the libvirtd daemon. This is a server-side daemon component that runs and manages tasks on virtualized guests. It is used to manage virtualization technologies such as Xen, KVM, and ESXi to mention a few. + +To start the libvirtd daemon, run the command: + +``` +$ sudo systemctl start libvirtd +``` + +Be sure to enable the service to start on boot time. + +``` +$ sudo systemctl enable --now libvirtd +``` + +Verify that the libvirtd daemon is running as follows. + +``` +$ sudo systemctl status libvirtd +``` + +### 4)  Setup the Bridge Interface + +So far, we have installed KVM, and all the management tools and we can, in fact, proceed to spin up a virtual machine. However, it would be nice if we can access the VMs from outside the hypervisor network. To accomplish this, we need to create a bridge interface. + +First, identify the network interfaces on your system. + +``` +$ sudo nmcli connection show +``` + +From the output, ens160 is the active network interface, be sure to take note of the interface in your case as you will use it along the way. + +To begin creating the bridge, first, delete the connection using its UUID in the following syntax. + +$ sudo nmcli connection delete UUID + +In our case, the command will be: + +``` +$ sudo nmcli connection delete 19e98123-9a84-30a6-bc59-a7134446bb26 +``` + +You will get a confirmation that the connection has successfully been deleted. + +Before proceeding any further, it would be prudent to have the following details at hand: + +- BRIDGE NAME – Preferred name of the new bridge (e.g. “br1”) +- DEVICE NAME – This is the name of your network interface. This will serve as the bridge slave (e.g., “ens160”) +- IP ADDRESS/SUBNET – The IP address and subnet for the bridge network (e.g., “192.168.2.50/24”). Note that this should correspond with your network subnet and IP addressing. +- GATEWAY – Default gateway address of your network (e.g. “192.168.2.1”) +- DNS1 and DNS2 – Preferred DNS addresses (e.g. “8.8.8.8” and “8.8.4.4”) + +Moving on, create a new bridge interface using the following syntax. + +$ sudo nmcli connection add type bridge autoconnect yes con-name BRIDGE NAME ifname BRIDGE NAME + +In our case, br1 is the preferred bridge interface name. Therefore, the command will be as shown. + +``` +$ sudo nmcli connection add type bridge autoconnect yes con-name br1 ifname br1 +``` + +In the next steps, you will modify the bridge by specifying the IP subnet, Gateway, and DNS values. + +Start off by specifying the IP subnet using the following syntax. + +$ sudo nmcli connection modify BRIDGE NAME ipv4.addresses IP ADDRESS/SUBNET ipv4.method manual + +According to our setup, the command will be. + +``` +$ sudo nmcli connection modify br1 ipv4.addresses 192.168.2.150/24 ipv4.method manual +``` + +Next, specify the gateway address using the following syntax + +$ sudo nmcli connection modify BRIDGE NAME ipv4.gateway GATEWAY + +According to our network, the command takes the following format. + +``` +$ sudo nmcli connection modify br1 ipv4.gateway 192.168.2.1 +``` + +The syntax for the  DNS address is as follows. + +$ sudo nmcli connection modify BRIDGE NAME ipv4.dns DNS1 +ipv4.dns DNS2 + +And the command takes the following format. + +``` +$ sudo nmcli connection modify br1 ipv4.dns 8.8.8.8 +ipv4.dns 8.8.4.4 +``` + +Thereafter, use the following command to add the bridge slave. + +$ sudo nmcli connection add type bridge-slave autoconnect yes con-name DEVICE NAME ifname DEVICE NAME master BRIDGE NAME + +Using our values, the command is as shown. + +``` +$ sudo nmcli connection add type bridge-slave autoconnect yes con-name ens160 ifname ens160 master br1 +``` + +You will get the following confirmation that the bridge slave was successfully added. Keep in mind that the bridge slave is your network interface or adapter. + +To confirm that the bridge was created, run the following command: + +``` +$ sudo nmcli connection show +``` + +From the output, you can see that the bridge interface is listed. + +To activate it, run the command: + +``` +$ sudo nmcli connection up br1 +``` + +In addition, you can verify this using the ip addrcommand. + +``` +$ ip addr | grep br1 +``` + +Lastly, edit the bridge configuration file. + +``` +$ sudo vi /etc/qemu-kvm/bridge.conf +``` + +Add the following line. + +``` +allow all +``` + +Then restart the virtualization daemon to apply the change + +``` +$ sudo systemctl restart libvirtd +``` + +### 5)  Create a Virtual Machine + +With KVM installed and the bridge connection configured, let’s now create a virtual machine.  Before doing, assign the necessary ownership right to the logged-in user in order to run commands without switching to root. + +``` +$ sudo chown -R $USER:libvirt /var/lib/libvirt/ +``` + +On the command line, we will create a virtual machine using Ubuntu 20.04 ISO image using the following syntax. + +``` +$ virt-install \ +--name Ubuntu \ +--ram 2048 \ +--vcpus 2 \ +--disk path=/var/lib/libvirt/images/ubuntu-20.04.img,size=15 \ +--os-variant ubuntu20.04 \ +--network bridge=br1,model=virtio \ +--graphics vnc,listen=0.0.0.0 \ +--console pty,target_type=serial \ +--cdrom /home/linuxtechi/Downloads/ubuntu-20.04.4-desktop-amd64.iso +``` + +Once the command is executed, the graphical screen session will be launched, and the installation of the guest operating system will commence. + +##### Conclusion + +This concludes our article on how to install KVM on Rocky Linux 9 / AlmaLinux 9 Your feedback s highly welcome. + +Also Read: How to Manage KVM Virtual Machines with Cockpit Web Console + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/install-kvm-on-rocky-linux-almalinux/ + +作者:[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/ From 24e83609c81d280b19b1407b96fbb7486037dd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Tue, 4 Apr 2023 01:34:58 +0800 Subject: [PATCH 257/318] =?UTF-8?q?Update=2020230403.4=20=E2=AD=90?= =?UTF-8?q?=EF=B8=8F=E2=AD=90=EF=B8=8F=20How=20to=20Install=20KVM=20on=20R?= =?UTF-8?q?ocky=20Linux=209=20=20AlmaLinux=209.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...3.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md b/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md index b46c8cb942..6c596627aa 100644 --- a/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md +++ b/sources/tech/20230403.4 ⭐️⭐️ How to Install KVM on Rocky Linux 9 AlmaLinux 9.md @@ -225,8 +225,6 @@ Once the command is executed, the graphical screen session will be launched, and This concludes our article on how to install KVM on Rocky Linux 9 / AlmaLinux 9 Your feedback s highly welcome. -Also Read: How to Manage KVM Virtual Machines with Cockpit Web Console - -------------------------------------------------------------------------------- via: https://www.linuxtechi.com/install-kvm-on-rocky-linux-almalinux/ From d7494ff73153e6dbceca8a7259fcd3c6e62cfa8c Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 4 Apr 2023 08:58:48 +0800 Subject: [PATCH 258/318] translating --- ... Create a ChatBot in Mattermost with Python.md | 133 ------------------ ... Create a ChatBot in Mattermost with Python.md | 133 ++++++++++++++++++ 2 files changed, 133 insertions(+), 133 deletions(-) delete mode 100644 sources/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md create mode 100644 translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md diff --git a/sources/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md b/sources/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md deleted file mode 100644 index 57beb542cc..0000000000 --- a/sources/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: subject: "Create a ChatBot in Mattermost with Python" -[#]: via: "https://opensource.com/article/23/3/chatbot-mattermost-python" -[#]: author: "Dr. Michael J. Garbade https://opensource.com/users/drmjg" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Create a ChatBot in Mattermost with Python -====== - -ChatOps is a collaboration model that connects people, processes, tools, and automation into a transparent workflow. [Mattermost][1] is an open source, self-hosted messaging platform that enables organizations to communicate securely, effectively, and efficiently. It's a great [open source alternative][2] to Slack, Discord, and other proprietary messaging platforms. This article outlines the steps to create a ChatOps bot on Mattermost, including the necessary code examples and explanations. - -### Prerequisites - -Before starting, ensure that you have access to a Mattermost server, have [Python installed][3], and have installed the Mattermost Python driver [using pip][4]. - -### Create a bot account on Mattermost - -To create a bot account, access the Mattermost System Console, and add a bot account with appropriate access permissions. Retrieve the bot's username and password for use in the Python script. - -### Set up the Mattermost Python driver - -Install the Mattermost Python driver using `pip`, and import it in the Python script. Create a new driver instance and log in to the Mattermost server. - -### Create the ChatOps bot in Python - -Create a new Python script, define the necessary libraries to be imported, and implement the bot's functionality using the Mattermost driver's API. Write code to handle messages, commands, and other events, and use the Mattermost driver's API methods to send messages and notifications to channels and users. Finally, debug and test the ChatOps bot. - -### Example of ChatOps bot code - -Here is an example Python code for a simple ChatOps bot that responds to a user's message: - -``` -from mattermostdriver import Driver - -bot_username = 'bot_username' -bot_password = 'bot_password' -server_url = 'https://your.mattermost.server.url' - -def main(): - driver = Driver({'url': server_url, 'login_id': bot_username, 'password': bot_password, 'scheme': 'https'}) - driver.login() - team = driver.teams.get_team_by_name('team_name') - channel = driver.channels.get_channel_by_name(team['id'], 'channel_name') - - @driver.on('message') - def handle_message(post, **kwargs): - if post['message'] == 'hello': - driver.posts.create_post({ - 'channel_id': post['channel_id'], - 'message': 'Hi there!' - }) - - driver.init_websocket() - -if __name__ == '__main__': - main() -``` - -### Add features - -Once you've created a basic ChatOps bot on Mattermost, you can add more features to extend its functionality. Here are the steps: - -- **Determine the feature you want to add**: Before writing the code, you must determine the feature to add to your ChatOps bot. This can be anything from sending notifications to integrating with third-party tools. -- **Write the code**: Once you have determined the feature you want to add, you can start writing the code. The code will depend on the feature you add, but you can use the Mattermost Python driver to interact with the Mattermost API and implement the feature. -- **Test the code**: After writing the code, it's important to test it to ensure that it works as expected. Before deploying it to your production server, you can test the code on a development server or in a test channel. -- **Deploy the code**: Once you have tested it and it works as expected, you can deploy it to your production server. Follow your organization's deployment process and ensure the new code doesn't break any existing functionality. -- **Document the new feature**: It's important to document the new feature you have added to your ChatOps bot. This will make it easier for other team members to use the bot and understand its capabilities. - -One example of a ChatOps Bot feature could be integrating with a third-party tool and providing status updates on certain tasks. - -``` -from mattermostdriver import Driver -import requests - -bot_username = 'bot_username' -bot_password = 'bot_password' -server_url = 'https://your.mattermost.server.url' - -def main(): - driver = Driver({'url': server_url, 'login_id': bot_username, 'password': bot_password, 'scheme': 'https'}) - driver.login() - team = driver.teams.get_team_by_name('team_name') - channel = driver.channels.get_channel_by_name(team['id'], 'channel_name') - - @driver.on('message') - def handle_message(post, **kwargs): - if post['message'] == 'status': - # Make a request to the third-party tool API to get the status - response = requests.get('https://api.thirdpartytool.com/status') - if response.status_code == 200: - status = response.json()['status'] - driver.posts.create_post({ - 'channel_id': post['channel_id'], - 'message': f'The status is {status}' - }) - else: - driver.posts.create_post({ - 'channel_id': post['channel_id'], - 'message': 'Failed to get status' - }) - - driver.init_websocket() - -if __name__ == '__main__': - main() -``` - -In this example, the ChatOps bot listens for the command "status" and makes a request to a third-party tool API to get the current status. It then posts the status update in the Mattermost channel where the command was issued. This allows team members to quickly get updates on the status of the task without having to leave the chat platform. - -### Open source ChatOps - -In summary, creating a ChatOps bot on Mattermost is a simple process that can bring numerous benefits to your organization's communication and workflow. This article has provided a step-by-step breakdown and code examples to help you get started on creating your bot and even customize it by adding new features. Now that you know the basics, you can further explore ChatOps and Mattermost to optimize your team's collaboration and productivity. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/chatbot-mattermost-python - -作者:[Dr. Michael J. Garbade][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/drmjg -[b]: https://github.com/lkxed/ -[1]: https://mattermost.com/ -[2]: https://opensource.com/alternatives/slack -[3]: https://opensource.com/article/17/10/python-101 -[4]: https://opensource.com/article/20/3/pip-linux-mac-windows \ No newline at end of file diff --git a/translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md b/translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md new file mode 100644 index 0000000000..2b1744464d --- /dev/null +++ b/translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md @@ -0,0 +1,133 @@ +[#]: subject: "Create a ChatBot in Mattermost with Python" +[#]: via: "https://opensource.com/article/23/3/chatbot-mattermost-python" +[#]: author: "Dr. Michael J. Garbade https://opensource.com/users/drmjg" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 Python 在 Mattermost 中创建聊天机器人 +====== + +ChatOps 是一种协作模型,它将人员、流程、工具和自动化连接到一个透明的工作流中。[Mattermost][1] 是一个开源、自托管的消息平台,使组织能够安全、有效和高效地进行通信。它是 Slack、Discord 和其他专有消息平台的绝佳[开源替代品][2]。本文概述了在 Mattermost 上创建 ChatOps 机器人的步骤,包括必要的代码示例和解释。 + +### 先决条件 + +在开始之前,请确保你可以访问 Mattermost 服务器,[安装 Python][3],并[使用 pip][4] 安装 Mattermost Python 驱动。 + +### 在 Mattermost 上创建一个机器人帐户 + +要创建机器人帐户,请访问 Mattermost 系统控制台,并添加具有适当访问权限的机器人帐户。检索机器人的用户名和密码以在 Python 脚本中使用。 + +### 设置 Mattermost Python 驱动 + +使用 pip 安装 Mattermost Python 驱动,并将其导入 Python 脚本。创建一个新的驱动实例并登录到 Mattermost 服务器。 + +### 在 Python 中创建 ChatOps 机器人 + +创建一个新的 Python 脚本,定义要导入的必要库,并使用 Mattermost 驱动的 API 实现机器人的功能。编写代码来处理消息、命令和其他事件,并使用 Mattermost 驱动的 API 方法向通道和用户发送消息和通知。最后,调试和测试 ChatOps 机器人。 + +### ChatOps 机器人代码示例 + +以下是响应用户消息的简单 ChatOps 机器人的示例 Python 代码: + +``` +from mattermostdriver import Driver + +bot_username = 'bot_username' +bot_password = 'bot_password' +server_url = 'https://your.mattermost.server.url' + +def main(): + driver = Driver({'url': server_url, 'login_id': bot_username, 'password': bot_password, 'scheme': 'https'}) + driver.login() + team = driver.teams.get_team_by_name('team_name') + channel = driver.channels.get_channel_by_name(team['id'], 'channel_name') + + @driver.on('message') + def handle_message(post, **kwargs): + if post['message'] == 'hello': + driver.posts.create_post({ + 'channel_id': post['channel_id'], + 'message': 'Hi there!' + }) + + driver.init_websocket() + +if __name__ == '__main__': + main() +``` + +### 添加功能 + +在 Mattermost 上创建基本的 ChatOps 机器人后,你可以添加更多功能来扩展其功能。以下是步骤: + +- **确定要添加的功能**:在编写代码之前,你必须确定要添加到 ChatOps 机器人的功能。可以是从发送通知到与第三方工具集成的任何事情。 +- **编写代码**:确定要添加的功能后,就可以开始编写代码了。代码将取决于添加的功能,但你可以使用 Mattermost Python 驱动与 Mattermost API 交互并实现该功能。 +- **测试代码**:编写代码后,重要的是对其进行测试以确保其按预期工作。在将其部署到生产服务器之前,你可以在开发服务器或测试通道中测试代码。 +- **部署代码**:当你对其进行了测试并且它按预期工作,你就可以将其部署到你的生产服务器。遵循你组织的部署流程并确保新代码不会破坏任何现有功能。 +- **记录新功能**:记录你添加到 ChatOps 机器人的新功能非常重要。这将使其他团队成员更容易使用该机器人并了解其功能。 + +一个 ChatOps Bot 功能示例是与第三方工具集成并提供某些任务的状态更新。 + +``` +from mattermostdriver import Driver +import requests + +bot_username = 'bot_username' +bot_password = 'bot_password' +server_url = 'https://your.mattermost.server.url' + +def main(): + driver = Driver({'url': server_url, 'login_id': bot_username, 'password': bot_password, 'scheme': 'https'}) + driver.login() + team = driver.teams.get_team_by_name('team_name') + channel = driver.channels.get_channel_by_name(team['id'], 'channel_name') + + @driver.on('message') + def handle_message(post, **kwargs): + if post['message'] == 'status': + # Make a request to the third-party tool API to get the status + response = requests.get('https://api.thirdpartytool.com/status') + if response.status_code == 200: + status = response.json()['status'] + driver.posts.create_post({ + 'channel_id': post['channel_id'], + 'message': f'The status is {status}' + }) + else: + driver.posts.create_post({ + 'channel_id': post['channel_id'], + 'message': 'Failed to get status' + }) + + driver.init_websocket() + +if __name__ == '__main__': + main() +``` + +在此示例中,ChatOps 机器人监听命令 “status” 并向第三方工具 API 发出请求以获取当前状态。然后它会在发出命令的 Mattermost 频道中发布状态更新。这使团队成员无需离开聊天平台即可快速获取任务状态的更新。 + +### 开源 ChatOps + +总之,在 Mattermost 上创建 ChatOps 机器人是一个简单的过程,可以为你组织的沟通和工作流程带来许多好处。本文提供了分步分解和代码示例,可帮助你开始创建你的机器人,甚至可以通过添加新功能对其进行自定义。现在你了解了基础知识,你可以进一步探索 ChatOps 和 Mattermost 以优化团队的协作和生产力。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/chatbot-mattermost-python + +作者:[Dr. Michael J. Garbade][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/drmjg +[b]: https://github.com/lkxed/ +[1]: https://mattermost.com/ +[2]: https://opensource.com/alternatives/slack +[3]: https://opensource.com/article/17/10/python-101 +[4]: https://opensource.com/article/20/3/pip-linux-mac-windows \ No newline at end of file From 745de1be29e969392924b259d8e8287b393ba987 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 4 Apr 2023 09:02:11 +0800 Subject: [PATCH 259/318] translating --- .../tech/20230324.0 ⭐️ Open source tools for mind mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md b/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md index 3f4ab7054d..962e2d318b 100644 --- a/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md +++ b/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/open-source-mind-mapping" [#]: author: "Amrita https://opensource.com/users/amrita42" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7b2b542892de8243ea94bdb1252b59f78d238e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 4 Apr 2023 13:53:17 +0800 Subject: [PATCH 260/318] translated --- ...️⭐️ Debian 12 Bookworm Best New Features.md | 184 ------------------ ...️⭐️ Debian 12 Bookworm Best New Features.md | 184 ++++++++++++++++++ 2 files changed, 184 insertions(+), 184 deletions(-) delete mode 100644 sources/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md create mode 100644 translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md diff --git a/sources/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md b/sources/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md deleted file mode 100644 index 5b06930b9a..0000000000 --- a/sources/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: subject: "Debian 12 Bookworm: Best New Features" -[#]: via: "https://www.debugpoint.com/debian-12-features/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Debian 12 Bookworm: Best New Features -====== - -**We give you a summary of the new features and enhancements of the Debian 12 Bookworm (upcoming) release.** - -Debian 12 has been under development for a few months and slowly moving towards a final release. As of publishing this, it is currently under the hard freeze. That means no major package changes or enhancements are expected. - -This release comes with several new features and improvements, making it an exciting release for Debian enthusiasts. In this article, we will discuss the best new features of Debian 12 Bookworm and how they can benefit users. - -Let’s take a look. - -![Debian 12 Bookworm GNOME Desktop][1] - -### Debian 12 Bookworm: New Features - -#### Linux Kernel - -This release features Linux mainline Kernel 6.1, released in December 2022. Timeline-wise, Debian 12 is only one Kernel release behind as of now. Hence, you get the latest and greatest hardware support with stable Kernel 6.1. - -Highlights features of this Kernel include initial Rust framework support, updates to Intel and AMD’s upcoming CPU/GPU line-ups, performance improvements of btrfs and other file systems and more. - -We already have a dedicated article about [Kernel 6.1 f][2][e][2][atures][2] if you want to learn more. - -#### Non-free packages in the installer - -A critical change related to the Debian ISO files arrives in Debian 12. Since the beginning, Debian has provided different ISO files for “Free” and “non-free” packages. The proprietary “non-Free” packages are part of separate ISO files. Hence, if you need driver support for your special hardware, then you can download separate ISO files for your laptop/desktop/servers. - -However, this experience makes it a little confusing for the end user to pick the correct Debian ISO. The Debian team launched a community voting last year to pick the best option to handle “non-free” packages. - -As [per the results][3], the primary ISO files now contain both free and “non-free” ISO files. - -So, what changed? - -When you try to download official Debian ISO files, you only need to choose one ISO file (DVD size) containing everything. Furthermore, the small net-installation ISO is also present, including “non-free” firmware. - -You can look at [this guide][4] regarding Debian ISO. - -#### Pipewire by default for GNOME - -If you use GNOME desktop in Debian Linux, then a piece of good news for you. - -Debian 12 with GNOME desktop [making Pipewire and Wireplumber manager by default][5] sound server, replacing Pulseaudio. The modern Pipewire is already introduced in Ubuntu, Fedora, Pop!_OS and other leading distros. - -![Pipewire in Debian 12][6] - -#### A new version of Apt (2.6) package manager - -Debian 12 is introducing the latest version of apt package manager version 2.6. [Apt 2.6][7] version specifically handles the non-free ISO image support introduced in this release. The changes include the non-free firmware will be enabled by default, and apt will show updates to the non-free packages. - -#### Desktop environments - -All the major desktop environments are now up to date in Debian 12, except GNOME. Because [GNOME 44][8] was released just a few days back, it won’t make it to Bookworm due to schedule conflicts. Debian 12 is already on hard freeze. - -Hence, in Debian 12, you get the [GNOME 43][9]version which is not that far behind compared to the latest release. Furthermore, if you are shifting from [Debian 11][10], then it will be a huge GNOME upgrade. - -Fortunately, [KDE Plasma 5.27][11] is now available in this release. KDE Plasma is the final Plasma 5 version and is likely to become LTS until Plasma 6 is ready. Hence, it was a significant upgrade. The KDE Plasma maintainers managed to pull this off. - -In addition, [Xfce 4.18][12] in Debian 12 is bringing an improved desktop experience with stunning Thunar features. Also, LXQt 1.2, MATE 1.26 and LXDE 11 are the latest versions featured in Debian 12. - -Here’s a summary: - -- GNOME 43 -- KDE Plasma 5.27 -- LXDE 11 -- LXQt 1.2 -- MATE 1.26 -- Xfce 4.18 - -#### Core modules and applications - -Most of the major applications are refreshed. Notably, Python 3.11 is included in Debian 12, which would help the developers and many use cases. In addition, LibreOffice 7.4 and Firefox 102.9 ESR are two noteworthy updates. Here’s a small list of key applications and package updates: - -- LibreOffice 7.4.4 -- Firefox 102.9 ESR -- GIMP 2.10.32 -- OpenJDK 11.6 -- PHP 8.2 -- Python 3.11+ -- Samba 4.17 - -#### Miscellaneous Updates - -- Debian 12 now detects Windows 11 while using in a dual-boot setup. -- Screen reader support is enabled by default for the Cinnamon desktop in Debian -- Automatic launching of speech synthesis after 30 seconds timeout -- Easier detection of multipath devices -- Support for multiple initrd paths -- Support for new ARM and RISC-V devices -- Experimental DMRAID support is dropped - -You can learn about additional changes [here][13]. - -#### Default theme and wallpapers - -In every release, Debian introduces some stunning artwork from the community. Debian 12 default artwork themed as “Emerald”. - -“_Elegantly polished and chiseled, or in their raw and natural state, gemstones can have an infinite number of shapes.”_ - -With the Emerald theme, the creator wanted to combine light and minerals in a clean, almost ethereal design. - -The default theme and banners are visible across the installer, animated Plymouth, wallpaper and all the places. - -Here are some of the images picked up from the [official gallery][14]. - -![Default wallpaper][15] - -![Debian 12 Plymouth][16] - -### How to Download Debian 12 - -**Note**: Debian 12 is not yet released as stable. So, try not to use it for serious work or upgrade to Bookworm from Bullseye. - -If you are running Debian 11 bullseye, you can open the `/etc/apt/sources.list` via any text editor and add the following lines. Make sure to verify the mirror URL and change the following command. - -``` -deb http://http.us.debian.org/debian bookworm main non-free contribdeb http://security.debian.org/ bookworm/updates main contrib non-freedeb http://http.us.debian.org/debian sid main non-free contrib -``` - -After adding those, refresh the apt cache: - -``` -sudo apt update -``` - -And then, run the following to get the update. - -``` -sudo apt dist-upgrade -``` - -For fresh ISO download, visit any of the below links. - -[Download Debian 12 (DVD) ISO – Alpha2][17] - -### Wrapping Up - -In conclusion, Debian 12 Bookworm is an impressive release that brings several new features and improvements. From the latest desktops to a new kernel and updated packages, this release has a lot to offer for both new and experienced Debian users. - -With its focus on stability, security, and open-source principles, Debian 12 Bookworm can be the best choice for those seeking a reliable alternative to Ubuntu and a versatile operating system. - -The final release of this version is expected by Q2 2023. - -_[Debian 12 changelog][18] (a little outdated)_ - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/debian-12-features/ - -作者:[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/2023/03/Debian-12-Bookworm-GNOME-Desktop.jpg -[2]: https://www.debugpoint.com/linux-kernel-6-1/ -[3]: https://lists.debian.org/debian-vote/2022/10/msg00000.html -[4]: https://www.debugpoint.com/download-debian-iso/ -[5]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020249 -[6]: https://www.debugpoint.com/wp-content/uploads/2023/03/Pipewire-in-Debian-12.jpg -[7]: https://launchpad.net/ubuntu/+source/apt/+changelog -[8]: https://www.debugpoint.com/gnome-44/ -[9]: https://www.debugpoint.com/gnome-43/ -[10]: https://www.debugpoint.com/debian-11-features/ -[11]: https://www.debugpoint.com/kde-plasma-5-27/ -[12]: https://www.debugpoint.com/xfce-4-18-review/ -[13]: https://lists.debian.org/debian-devel-announce/2022/09/msg00004.html -[14]: https://wiki.debian.org/DebianArt/Themes/Emerald -[15]: https://www.debugpoint.com/wp-content/uploads/2023/03/Default-wallpaper.jpg -[16]: https://www.debugpoint.com/wp-content/uploads/2023/03/Debian-12-Plymouth.jpg -[17]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-dvd/ -[18]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-whats-new.en.html diff --git a/translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md b/translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md new file mode 100644 index 0000000000..13b09c1f5a --- /dev/null +++ b/translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md @@ -0,0 +1,184 @@ +[#]: subject: "Debian 12 Bookworm: Best New Features" +[#]: via: "https://www.debugpoint.com/debian-12-features/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Debian 12 Bookworm: 最好的新特色功能 +====== + +**我们将给予你们一份关于 Debian 12 Bookworm (即将到来) 发布版本的新的特色功能和增强功能的概述** + +Debian 12 已经开发了几个月了,并且正在慢慢走向最终的发布版本。截止发稿时, 它当前正处于冻结状态下。这意味着:预期着不再会有重大的软件包更改或增强。 + +这个发布版本带来一些新的特色功能和改善功能,使其成为 Debian 爱好者的一个令人兴奋的版本。在这篇文章中,我们将讨论 Debian 12 Bookworm 的最好的新的特色功能,以及它们如何使用户受益。 + +让我们来看看。 + +![Debian 12 Bookworm GNOME Desktop][1] + +### Debian 12 Bookworm: 新的特色功能 + +#### Linux 内核 + +这个发布版本以发布于2022年12月的 Linux 主线内核 Kernel 6.1 为特色。从时间线上看,到目前为止,Debian 12 的内核版本号只比最新内核的版本号落后一个。因此,你将通过使用稳定的 Linux 内核 6.1 版本来获取最新的和最好的硬件支持。 + +这个内核的亮点特色功能包括:初始支持 Rust 框架、更新支持 Intel 和 AMD 即将到来的 CPU/GPU 系列硬件、改善 btrfs 和其它文件系统系统的性能等等。 + +我们已经有一篇关于 [Kernel 6.1][2][e][2] [特色功能][2] 的特别文章,如果你想要了解更多的话。 + +#### 在安装程序中的非自由软件包 + +在 Debian 12 中出现了一个与 Debian 的 ISO 文件相关的重大更改。从一开始,Debian 就分别针对 “自由” 和 “非自由” 软件包提供了不同的 ISO 文件。专有的 “非自由” 软件包是独立的 ISO 文件的一部分。因此,如果你需要针对你特有硬件的驱动支持,那么你可以针对你的笔记本/台式机/服务器下载不同的 ISO 文件。 + +然而,这种体验使终端用户在选择恰当的 Debian 的 ISO 时感到迷惑。为此,Debian 团队去年发起一次社区投票,以选出如何处理 “非自由” 的最好的选项。 + +根据 [选出的结果][3] , 现在,基本的 ISO 文件现在包含 “自由” 和 “非自由” 的软件包。 + +那么,发生了什么变化? + +在我们尝试现在官方的 Debian 的 ISO 文件时,你只需要选择一个包含所有东西的 ISO 文件 (DVD 大小的体积) 。此外,也提供小型的网络安装的 ISO 文件,包含 “非自由” 固件。 + +你可以查看关于 Debian 的 ISO 文件的 [这篇指南][4] 。 + +#### GNOME 在默认情况下使用 Pipewire + +如果你在 Debian Linux 中使用 GNOME 桌面环境,那么,给你带来一个好消息。 + +Debian 12 和 GNOME 桌面环境 [在默认情况下,使用 Pipewire 和 Wireplumber 管理器][5] 作为声音服务器,取代了 Pulseaudio 。现代化的 Pipewire 早就已经引入 Ubuntu 、Fedora 、Pop!_OS 等其它领先的发行版。 + +![Pipewire in Debian 12][6] + +#### Apt 软件包管理器的的新版本 (2.6) + +Debian 12 引入 apt 软件包管理器的最新的版本。在这个发行版本中,特别引入 [Apt 2.6][7] 版本来具体支持的非自由 ISO 镜像。这些更改包含:默认启用非自由固件,apt 将显示非自由软件包的更新。 + +#### 桌面环境 + +在 Debian 12 中,除 GNMOE 桌面环境外,所有的主流桌面环境都是最新的。这是因为 [GNOME 44][8] 才刚刚发布,由于工作日程计划不一样,因此它没有进入 Bookworm 。Debian 12 已经处于冻结状态。 + +因此,在 Debian 12 中,你将得到 [GNOME 43][9] 版本,与最新的发布版本相比,它也没有落后多少。此外,如果你从 [Debian 11][10] 转换而来,那么,这将是一次重大的 GNOME 升级。 + +幸运的是,[KDE Plasma 5.27][11] 现在可以在这个发布版本中使用了。KDE Plasma 是 Plasma 5 的最终版本,并且在 Plasma 6 版本准备好之前,它可能会成为 LTS 。因此,它是一次重要的升级。KDE Plasma 维护人员成功地实现了这一目标。 + +另外,在 Debian 12 中的 [Xfce 4.18][12] 通过令人惊艳的Thunar 的特色功能带来了更好的桌面体验。此外,在 Debian 12 中,LXQt 1.2 、MATE 1.26 和 LXDE 11 都是最新的版本。 + +这里有一份摘要: + +- GNOME 43 +- KDE Plasma 5.27 +- LXDE 11 +- LXQt 1.2 +- MATE 1.26 +- Xfce 4.18 + +#### 核心模块和应用程序 + +大多数主要的应用程序都已经刷新版本。尤其是,Python 3.11 已经包含在 Debian 12 中,这将有助于帮助开发者和很多使用实例。此外,LibreOffice 7.4 和 Firefox 102.9 ESR 也是两个重要的更新。这里有一份关于主要应用程序和软件包升级的小列表: + +- LibreOffice 7.4.4 +- Firefox 102.9 ESR +- GIMP 2.10.32 +- OpenJDK 11.6 +- PHP 8.2 +- Python 3.11+ +- Samba 4.17 + +#### 各种各样的更新 + +- Debian 12 现在在双启动设置时会检查到 Windows 11 +- 在 Debian 和 Cinnamon 桌面环境中,默认启用支持屏幕阅读器 +- 在 30 秒超时后,自动启动语音合成 +- 更容易地检测多路径设备 +- 支持多个 initrd 路径 +- 支持新的 ARM 和 RISC-V 设备 +- 放弃实验性的 DMRAID 支持 + +你可以 [在这里][13] 学习额外的更改。 + +#### 默认的主题和墙纸 + +在每一次发布版本中,Debian 都会从引入一些来自社区的令人惊叹的艺术品。Debian 12 以 绿宝石 “Emerald” 作为默认的艺术品主题。 + +“_经过抛光和凿刻,或在它们原始和纯天然的状态下,宝石可以有无限多的形状。”_ + +通过 Emerald 主题,创建者希望将光线与矿物质以一种简洁至近乎超凡脱俗的构思结合在一起。 + +默认主题和横幅可以在安装程序、动画 Plymouth 、壁纸等所有的位置都可以看到。 + +这里是一些选自 [官方画廊][14] 的图片。 + +![Default wallpaper][15] + +![Debian 12 Plymouth][16] + +### 如何下载 Debian 12 + +**注意**: Debian 12 尚未发布稳定版本。因此,不要在正式工作中使用它,也不要从 Bullseye 升级到 Bookworm 。 + +如果你正在运行 Debian 11 bullseye ,你可以通过任意的文本编辑器来打开 `/etc/apt/sources.list` ,并添加下面的命令行。务必验证镜像 URL ,并更改下面的命令行。 + +``` +deb http://http.us.debian.org/debian bookworm main non-free contribdeb http://security.debian.org/ bookworm/updates main contrib non-freedeb http://http.us.debian.org/debian sid main non-free contrib +``` + +在添加这些命令行后,刷新 apt 缓存: + +``` +sudo apt update +``` + +接下来,运行下面的命令行来获取更新 + +``` +sudo apt dist-upgrade +``` + +下载全新的 ISO 文件,访问任意一个下面的链接。 + +[下载 Debian 12 (DVD) ISO – Alpha2][17] + +### 总结 + +总而言之,Debian 12 Bookworm 是一个令人赞叹的发布版本,带来了一些新的特色功能和改善。从最新的桌面环境到新内核和更新的软件包,这个发布版本为新用户和有经验的 Debian 用户都提供了很多东西。 + +因为它专注于稳定性、安全性和开源原则,所以,对于那些寻求替换 Ubuntu 和通用操作系统的人来说,Debian 12 Bookworm 可能是最好的选择。 + +这个版本的最终版本预期在 2023 年第二季度发布。 + +_[Debian 12 更改日志][18] (有点过时了)_ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/debian-12-features/ + +作者:[Arindam][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.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed/ +[1]: https://www.debugpoint.com/wp-content/uploads/2023/03/Debian-12-Bookworm-GNOME-Desktop.jpg +[2]: https://www.debugpoint.com/linux-kernel-6-1/ +[3]: https://lists.debian.org/debian-vote/2022/10/msg00000.html +[4]: https://www.debugpoint.com/download-debian-iso/ +[5]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020249 +[6]: https://www.debugpoint.com/wp-content/uploads/2023/03/Pipewire-in-Debian-12.jpg +[7]: https://launchpad.net/ubuntu/+source/apt/+changelog +[8]: https://www.debugpoint.com/gnome-44/ +[9]: https://www.debugpoint.com/gnome-43/ +[10]: https://www.debugpoint.com/debian-11-features/ +[11]: https://www.debugpoint.com/kde-plasma-5-27/ +[12]: https://www.debugpoint.com/xfce-4-18-review/ +[13]: https://lists.debian.org/debian-devel-announce/2022/09/msg00004.html +[14]: https://wiki.debian.org/DebianArt/Themes/Emerald +[15]: https://www.debugpoint.com/wp-content/uploads/2023/03/Default-wallpaper.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2023/03/Debian-12-Plymouth.jpg +[17]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-dvd/ +[18]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-whats-new.en.html From cbbf49fcea451aa58adba84b94c1533f03222d72 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 5 Apr 2023 09:29:55 +0800 Subject: [PATCH 261/318] RP @geekpi https://linux.cn/article-15693-1.html --- ... Create a ChatBot in Mattermost with Python.md | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) rename {translated/tech => published}/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md (82%) diff --git a/translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md b/published/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md similarity index 82% rename from translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md rename to published/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md index 2b1744464d..2fe100f569 100644 --- a/translated/tech/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md +++ b/published/20230327.3 ⭐️ Create a ChatBot in Mattermost with Python.md @@ -3,26 +3,30 @@ [#]: author: "Dr. Michael J. Garbade https://opensource.com/users/drmjg" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15693-1.html" -使用 Python 在 Mattermost 中创建聊天机器人 +使用 Python 在 Mattermost 中创建 ChatOps 聊天机器人 ====== -ChatOps 是一种协作模型,它将人员、流程、工具和自动化连接到一个透明的工作流中。[Mattermost][1] 是一个开源、自托管的消息平台,使组织能够安全、有效和高效地进行通信。它是 Slack、Discord 和其他专有消息平台的绝佳[开源替代品][2]。本文概述了在 Mattermost 上创建 ChatOps 机器人的步骤,包括必要的代码示例和解释。 +![][0] + +> 用一个简单的开源机器人在你的组织中实施 ChatOps。 + +ChatOps 是一种协作模型,它将人员、流程、工具和自动化连接到一个透明的工作流中。[Mattermost][1] 是一个开源、自托管的消息平台,使组织能够安全、有效和高效地进行通信。它是 Slack、Discord 和其他专有消息平台的绝佳 [开源替代品][2]。本文概述了在 Mattermost 上创建 ChatOps 机器人的步骤,包括必要的代码示例和解释。 ### 先决条件 -在开始之前,请确保你可以访问 Mattermost 服务器,[安装 Python][3],并[使用 pip][4] 安装 Mattermost Python 驱动。 +在开始之前,请确保你可以访问 Mattermost 服务器,[安装 Python][3],并 [使用 pip][4] 安装 Mattermost Python 驱动。 ### 在 Mattermost 上创建一个机器人帐户 -要创建机器人帐户,请访问 Mattermost 系统控制台,并添加具有适当访问权限的机器人帐户。检索机器人的用户名和密码以在 Python 脚本中使用。 +要创建机器人帐户,请访问 Mattermost 系统控制台,并添加具有适当访问权限的机器人帐户。获取机器人的用户名和密码以在 Python 脚本中使用。 ### 设置 Mattermost Python 驱动 -使用 pip 安装 Mattermost Python 驱动,并将其导入 Python 脚本。创建一个新的驱动实例并登录到 Mattermost 服务器。 +使用 `pip` 安装 Mattermost Python 驱动,并将其导入 Python 脚本。创建一个新的驱动实例并登录到 Mattermost 服务器。 ### 在 Python 中创建 ChatOps 机器人 @@ -108,7 +112,7 @@ if __name__ == '__main__': main() ``` -在此示例中,ChatOps 机器人监听命令 “status” 并向第三方工具 API 发出请求以获取当前状态。然后它会在发出命令的 Mattermost 频道中发布状态更新。这使团队成员无需离开聊天平台即可快速获取任务状态的更新。 +在此示例中,ChatOps 机器人监听命令 `status` 并向第三方工具 API 发出请求以获取当前状态。然后它会在发出命令的 Mattermost 频道中发布状态更新。这使团队成员无需离开聊天平台即可快速获取任务状态的更新。 ### 开源 ChatOps @@ -121,7 +125,7 @@ via: https://opensource.com/article/23/3/chatbot-mattermost-python 作者:[Dr. Michael J. Garbade][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/) 荣誉推出 @@ -130,4 +134,5 @@ via: https://opensource.com/article/23/3/chatbot-mattermost-python [1]: https://mattermost.com/ [2]: https://opensource.com/alternatives/slack [3]: https://opensource.com/article/17/10/python-101 -[4]: https://opensource.com/article/20/3/pip-linux-mac-windows \ No newline at end of file +[4]: https://opensource.com/article/20/3/pip-linux-mac-windows +[0]: https://img.linux.net.cn/data/attachment/album/202304/05/092837ab3y8zft3hhv02hr.jpg \ No newline at end of file From f3d5a64a379010d382733f04d74c547cb1c531cc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 5 Apr 2023 11:22:28 +0800 Subject: [PATCH 262/318] RP @robsean https://linux.cn/article-15694-1.html --- ...️⭐️ Debian 12 Bookworm Best New Features.md | 73 ++++++++++--------- 1 file changed, 39 insertions(+), 34 deletions(-) rename {translated/tech => published}/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md (59%) diff --git a/translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md b/published/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md similarity index 59% rename from translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md rename to published/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md index 13b09c1f5a..ec7e6fb813 100644 --- a/translated/tech/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md +++ b/published/20230328.0 ⭐️⭐️ Debian 12 Bookworm Best New Features.md @@ -3,36 +3,38 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "robsean" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15694-1.html" -Debian 12 Bookworm: 最好的新特色功能 +Debian 12 “Bookworm” 的新功能和改进 ====== -**我们将给予你们一份关于 Debian 12 Bookworm (即将到来) 发布版本的新的特色功能和增强功能的概述** +![][0] -Debian 12 已经开发了几个月了,并且正在慢慢走向最终的发布版本。截止发稿时, 它当前正处于冻结状态下。这意味着:预期着不再会有重大的软件包更改或增强。 +> 让我们给你总结一下即将发布的 Debian 12 “Bookworm” 的新功能和改进。 -这个发布版本带来一些新的特色功能和改善功能,使其成为 Debian 爱好者的一个令人兴奋的版本。在这篇文章中,我们将讨论 Debian 12 Bookworm 的最好的新的特色功能,以及它们如何使用户受益。 +Debian 12 已经开发了几个月了,并且正在慢慢走向最终的发布版本。截止发稿时, 它当前正处于冻结状态下。这意味着预计不会有重大的软件包更改或改进。 + +这个发布版本带来一些新功能和改进,使其成为 Debian 爱好者期待的一个版本。在这篇文章中,我们将讨论 Debian 12 “Bookworm” 的最好的新功能,以及它们如何使用户受益。 让我们来看看。 ![Debian 12 Bookworm GNOME Desktop][1] -### Debian 12 Bookworm: 新的特色功能 +### Debian 12 “Bookworm” 的新功能和改进 #### Linux 内核 -这个发布版本以发布于2022年12月的 Linux 主线内核 Kernel 6.1 为特色。从时间线上看,到目前为止,Debian 12 的内核版本号只比最新内核的版本号落后一个。因此,你将通过使用稳定的 Linux 内核 6.1 版本来获取最新的和最好的硬件支持。 +这个发布版本采用了发布于 2022 年 12 月的 Linux 主线内核 6.1。从时间线上看,到目前为止,Debian 12 的内核版本号只比最新内核落后一个版本。因此,你将通过使用稳定的 Linux 内核 6.1 来获得最新的和最好的硬件支持。 -这个内核的亮点特色功能包括:初始支持 Rust 框架、更新支持 Intel 和 AMD 即将到来的 CPU/GPU 系列硬件、改善 btrfs 和其它文件系统系统的性能等等。 +这个内核的亮点功能包括:初步支持 Rust 框架、更新支持英特尔和 AMD 即将推出的 CPU/GPU 系列硬件、改善 Btrfs 和其它文件系统系统的性能等等。 -我们已经有一篇关于 [Kernel 6.1][2][e][2] [特色功能][2] 的特别文章,如果你想要了解更多的话。 +如果你想要了解更多的话,我们已经有一篇关于 [内核 6.1 特性][2] 的专题文章。 #### 在安装程序中的非自由软件包 -在 Debian 12 中出现了一个与 Debian 的 ISO 文件相关的重大更改。从一开始,Debian 就分别针对 “自由” 和 “非自由” 软件包提供了不同的 ISO 文件。专有的 “非自由” 软件包是独立的 ISO 文件的一部分。因此,如果你需要针对你特有硬件的驱动支持,那么你可以针对你的笔记本/台式机/服务器下载不同的 ISO 文件。 +在 Debian 12 中出现了一个与 Debian 的 ISO 文件有关的重大更改。最初,Debian 就分别针对 “自由” 和 “非自由” 软件包提供了不同的 ISO 文件。专有的 “非自由” 软件包是单独的 ISO 文件的一部分。因此,如果你需要针对你的特殊硬件的驱动支持,那么你可以针对你的笔记本/台式机/服务器下载不同的 ISO 文件。 然而,这种体验使终端用户在选择恰当的 Debian 的 ISO 时感到迷惑。为此,Debian 团队去年发起一次社区投票,以选出如何处理 “非自由” 的最好的选项。 @@ -40,7 +42,7 @@ Debian 12 已经开发了几个月了,并且正在慢慢走向最终的发布 那么,发生了什么变化? -在我们尝试现在官方的 Debian 的 ISO 文件时,你只需要选择一个包含所有东西的 ISO 文件 (DVD 大小的体积) 。此外,也提供小型的网络安装的 ISO 文件,包含 “非自由” 固件。 +在我们尝试现在官方的 Debian 的 ISO 文件时,你只需要选择一个包含所有东西的 ISO 文件 (DVD 大小的体积)。此外,也提供小型的网络安装的 ISO 文件,包含 “非自由” 固件。 你可以查看关于 Debian 的 ISO 文件的 [这篇指南][4] 。 @@ -52,19 +54,19 @@ Debian 12 和 GNOME 桌面环境 [在默认情况下,使用 Pipewire 和 Wirep ![Pipewire in Debian 12][6] -#### Apt 软件包管理器的的新版本 (2.6) +#### 新版本的 Apt 软件包管理器(2.6) -Debian 12 引入 apt 软件包管理器的最新的版本。在这个发行版本中,特别引入 [Apt 2.6][7] 版本来具体支持的非自由 ISO 镜像。这些更改包含:默认启用非自由固件,apt 将显示非自由软件包的更新。 +Debian 12 引入 Apt 软件包管理器的最新的版本。[Apt 2.6][7] 版本专门处理了这个版本中引入的非自由 ISO 镜像支持。这些更改包含:默认启用非自由固件,Apt 将显示非自由软件包的更新。 #### 桌面环境 -在 Debian 12 中,除 GNMOE 桌面环境外,所有的主流桌面环境都是最新的。这是因为 [GNOME 44][8] 才刚刚发布,由于工作日程计划不一样,因此它没有进入 Bookworm 。Debian 12 已经处于冻结状态。 +在 Debian 12 中,除 GNMOE 桌面环境外,所有的主流桌面环境都是最新的。这是因为 [GNOME 44][8] 才刚刚发布,由于工作日程计划不一样,因此它没有进入 “Bookworm” 。Debian 12 已经处于硬冻结状态。 因此,在 Debian 12 中,你将得到 [GNOME 43][9] 版本,与最新的发布版本相比,它也没有落后多少。此外,如果你从 [Debian 11][10] 转换而来,那么,这将是一次重大的 GNOME 升级。 幸运的是,[KDE Plasma 5.27][11] 现在可以在这个发布版本中使用了。KDE Plasma 是 Plasma 5 的最终版本,并且在 Plasma 6 版本准备好之前,它可能会成为 LTS 。因此,它是一次重要的升级。KDE Plasma 维护人员成功地实现了这一目标。 -另外,在 Debian 12 中的 [Xfce 4.18][12] 通过令人惊艳的Thunar 的特色功能带来了更好的桌面体验。此外,在 Debian 12 中,LXQt 1.2 、MATE 1.26 和 LXDE 11 都是最新的版本。 +另外,在 Debian 12 中的 [Xfce 4.18][12] 通过令人惊艳的 Thunar 的特色功能带来了更好的桌面体验。此外,在 Debian 12 中,LXQt 1.2 、MATE 1.26 和 LXDE 11 都是最新的版本。 这里有一份摘要: @@ -77,7 +79,7 @@ Debian 12 引入 apt 软件包管理器的最新的版本。在这个发行版 #### 核心模块和应用程序 -大多数主要的应用程序都已经刷新版本。尤其是,Python 3.11 已经包含在 Debian 12 中,这将有助于帮助开发者和很多使用实例。此外,LibreOffice 7.4 和 Firefox 102.9 ESR 也是两个重要的更新。这里有一份关于主要应用程序和软件包升级的小列表: +大多数主要的应用程序都已经刷新版本。尤其是,Python 3.11 已经包含在 Debian 12 中,这将有助于帮助开发者和很多使用情况。此外,LibreOffice 7.4 和 Firefox 102.9 ESR 也是两个重要的更新。这里有一份关于主要应用程序和软件包升级的小列表: - LibreOffice 7.4.4 - Firefox 102.9 ESR @@ -87,9 +89,9 @@ Debian 12 引入 apt 软件包管理器的最新的版本。在这个发行版 - Python 3.11+ - Samba 4.17 -#### 各种各样的更新 +#### 杂项更新 -- Debian 12 现在在双启动设置时会检查到 Windows 11 +- Debian 12 现在在双启动设置时可以检测到 Windows 11 - 在 Debian 和 Cinnamon 桌面环境中,默认启用支持屏幕阅读器 - 在 30 秒超时后,自动启动语音合成 - 更容易地检测多路径设备 @@ -97,15 +99,15 @@ Debian 12 引入 apt 软件包管理器的最新的版本。在这个发行版 - 支持新的 ARM 和 RISC-V 设备 - 放弃实验性的 DMRAID 支持 -你可以 [在这里][13] 学习额外的更改。 +你可以 [在这里][13] 了解更多的变化。 #### 默认的主题和墙纸 -在每一次发布版本中,Debian 都会从引入一些来自社区的令人惊叹的艺术品。Debian 12 以 绿宝石 “Emerald” 作为默认的艺术品主题。 +在每一次发布版本中,Debian 都会从引入一些来自社区的令人惊叹的艺术作品。Debian 12 以 “绿宝石Emerald” 作为默认的艺术作品主题。 -“_经过抛光和凿刻,或在它们原始和纯天然的状态下,宝石可以有无限多的形状。”_ +“_经过抛光和凿刻,或在它们原始和纯天然的状态下,宝石可以有无限的形状。”_ -通过 Emerald 主题,创建者希望将光线与矿物质以一种简洁至近乎超凡脱俗的构思结合在一起。 +通过 Emerald 主题,创建者希望将光线与矿物质以一种简洁至近乎空灵的设计结合在一起。 默认主题和横幅可以在安装程序、动画 Plymouth 、壁纸等所有的位置都可以看到。 @@ -117,21 +119,23 @@ Debian 12 引入 apt 软件包管理器的最新的版本。在这个发行版 ### 如何下载 Debian 12 -**注意**: Debian 12 尚未发布稳定版本。因此,不要在正式工作中使用它,也不要从 Bullseye 升级到 Bookworm 。 +**注意**: Debian 12 尚未发布稳定版本。因此,不要在正式工作中使用它,也不要从 Bullseye 升级到 “Bookworm” 。 -如果你正在运行 Debian 11 bullseye ,你可以通过任意的文本编辑器来打开 `/etc/apt/sources.list` ,并添加下面的命令行。务必验证镜像 URL ,并更改下面的命令行。 +如果你正在运行 Debian 11 “Bullseye” ,你可以通过任意的文本编辑器来打开 `/etc/apt/sources.list` ,并添加下面的命令行。务必验证镜像 URL ,并更改下面的命令行。 ``` -deb http://http.us.debian.org/debian bookworm main non-free contribdeb http://security.debian.org/ bookworm/updates main contrib non-freedeb http://http.us.debian.org/debian sid main non-free contrib +deb http://http.us.debian.org/debian bookworm main non-free contrib +deb http://security.debian.org/ bookworm/updates main contrib non-free +deb http://http.us.debian.org/debian sid main non-free contrib ``` -在添加这些命令行后,刷新 apt 缓存: +在添加这些命令行后,刷新 `apt` 缓存: ``` sudo apt update ``` -接下来,运行下面的命令行来获取更新 +接下来,运行下面的命令行来获取更新: ``` sudo apt dist-upgrade @@ -139,17 +143,17 @@ sudo apt dist-upgrade 下载全新的 ISO 文件,访问任意一个下面的链接。 -[下载 Debian 12 (DVD) ISO – Alpha2][17] +> **[下载 Debian 12 (DVD) ISO – Alpha2][17]** ### 总结 -总而言之,Debian 12 Bookworm 是一个令人赞叹的发布版本,带来了一些新的特色功能和改善。从最新的桌面环境到新内核和更新的软件包,这个发布版本为新用户和有经验的 Debian 用户都提供了很多东西。 +总而言之,Debian 12 “Bookworm” 是一个令人印象深刻的版本,带来了一些新的特色功能和改善。从最新的桌面环境到新内核和更新的软件包,这个发布版本为新用户和有经验的 Debian 用户都提供了很多东西。 -因为它专注于稳定性、安全性和开源原则,所以,对于那些寻求替换 Ubuntu 和通用操作系统的人来说,Debian 12 Bookworm 可能是最好的选择。 +因为它专注于稳定性、安全性和开源原则,所以,对于那些寻求替换 Ubuntu 和通用操作系统的人来说,Debian 12 “Bookworm” 可能是最好的选择。 这个版本的最终版本预期在 2023 年第二季度发布。 -_[Debian 12 更改日志][18] (有点过时了)_ +> **[Debian 12 更改日志(有点过时了)][18]** -------------------------------------------------------------------------------- @@ -158,7 +162,7 @@ via: https://www.debugpoint.com/debian-12-features/ 作者:[Arindam][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/) 荣誉推出 @@ -182,3 +186,4 @@ via: https://www.debugpoint.com/debian-12-features/ [16]: https://www.debugpoint.com/wp-content/uploads/2023/03/Debian-12-Plymouth.jpg [17]: https://cdimage.debian.org/cdimage/bookworm_di_alpha2/amd64/iso-dvd/ [18]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-whats-new.en.html +[0]: https://img.linux.net.cn/data/attachment/album/202304/05/112008tjogt4q224g49tj4.jpg \ No newline at end of file From 866ece47b24ceb4ab9d741ea26ae10d12de758ba Mon Sep 17 00:00:00 2001 From: CanYellow Date: Wed, 5 Apr 2023 23:04:20 +0800 Subject: [PATCH 263/318] finished --- ...ing-s Misappropriated REST Dissertation.md | 292 +++++++++--------- ...ware- Is There an Easy Path to Success-.md | 194 ++++++------ 2 files changed, 240 insertions(+), 246 deletions(-) diff --git a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index c26b86d313..e74a2bbc42 100644 --- a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -1,146 +1,146 @@ -[#]: collector: (lujun9972) -[#]: translator: (CanYellow) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Roy Fielding's Misappropriated REST Dissertation) -[#]: via: (https://twobithistory.org/2020/06/28/rest.html) -[#]: author: (Two-Bit History https://twobithistory.org) - -被错误应用的罗伊·菲尔丁的有关描述性状态迁移的博士论文 -====== - -TD -Roy Fielding's Misappropriated REST Dissertation -====== - -符合描述性状态迁移的 (RESTful,REST译自审定公布名词数据库) 应用程序接口 (API) 无处不在。有趣的是又有多少人真正了解“描述性状态迁移”的应有之义呢? - -DN -RESTful APIs are everywhere. This is funny, because how many people really know what “RESTful” is supposed to mean? - -大概我们中的大多数人都会跟[黑客新闻网站上的这篇公开问答][1]产生共鸣: -I think most of us can empathize with [this Hacker News poster][1]: - -> 我阅读了几篇介绍描述性状态迁移的文章,甚至包括原始论文的部分章节。然而我仍然对描述性状态迁移到底是什么只有一个相当模糊的想法。我开始认为没有人真的了解描述性状态迁移,它仅仅是一个定义相当不充分的概念。 - -DN -> I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept. - -我曾经计划写一篇有关描述性状态迁移的博客,在里面探讨描述性状态迁移是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读[2000年发表的罗伊·菲尔丁的博士论文][2]开始我的研究,这篇博士论文向世人介绍了描述性状态迁移的概念。在读过菲尔丁的博士论文以后,我意识到,相比之下,更引人注意的是菲尔丁的理论缘何受到如此普遍的误解。 - -DN -I had planned to write a blog post exploring how REST came to be such a dominant paradigm for communication across the internet. I started my research by reading [Roy Fielding’s 2000 dissertation][2], which introduced REST to the world. After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood. - -(相对公平地说)很多人知道描述性状态迁移源自菲尔丁的博士论文,但并没有读过该论文。因此对于这篇博士论文的原始内容的误解才得以流行。 - -DN -Many more people know that Fielding’s dissertation is where REST came from than have read the dissertation (fair enough), so misconceptions about what the dissertation actually contains are pervasive. - -最大的误解是:这篇博士论文直接讨论了(译注:广义的)构建应用程序接口的问题,我此前一直认为描述性状态迁移从一开始就打算成为构建在超文本传输协议(HTTP)之上的网络应用程序接口(Web API)的架构模型,我相信很多人也这样认为。我猜测此前可能存在一个混乱的试验时期,开发人员采用完全错误的方式在超文本传输协议基础上开发应用程序接口,然后菲尔丁出现了并提出了将描述性状态迁移做为网络应用程序开发的正确方式。但是这种想法的时间线对不上:我们今天所熟知的网络服务的应用程序接口并非是在菲尔丁出版他的博士论文之后才出现的新生事物。 - -DN -The biggest of these misconceptions is that the dissertation directly addresses the problem of building APIs. I had always assumed, as I imagine many people do, that REST was intended from the get-go as an architectural model for web APIs built on top of HTTP. I thought perhaps that there had been some chaotic experimental period where people were building APIs on top of HTTP all wrong, and then Fielding came along and presented REST as the sane way to do things. But the timeline doesn’t make sense here: APIs for web services, in the sense that we know them today, weren’t a thing until a few years after Fielding published his dissertation. - -菲尔丁的博士论文(名为“架构风格与基于网络的软件架构设计”)(译者注,网络中文版的中文译名)不是讨论如何在超文本传输协议的基础上构建应用程序接口,而恰恰是讨论超文本协议本身菲尔丁是超文本传输协议1.0版规范的贡献者同时也是超文本传输协议1.1版的共同作者。有感于从HTTP协议的设计中获得的架构经验,他的博士论文将描述性状态迁移视为指导HTTP/1.1的标准化过程的架构原则的精华。举例而言,他拒绝了使用`MGET`和`MHEAD`方法进行批量请求的提议,因为他认为这违反了REST所定义的约束条件,尤其是在一个符合REST的系统中传递的消息应该是易于代理和缓存的约束条件。[1][3]因此,HTTP/1.1转而围绕持久性连接设计,在此基础上可以发送多个HTTP请求。(菲尔丁同时认为) -Fielding’s dissertation (titled “Architectural Styles and the Design of Network-based Software Architectures”) is not about how to build APIs on top of HTTP but rather about HTTP itself. Fielding contributed to the HTTP/1.0 specification and co-authored the HTTP/1.1 specification, which was published in 1999. He was interested in the architectural lessons that could be drawn from the design of the HTTP protocol; his dissertation presents REST as a distillation of the architectural principles that guided the standardization process for HTTP/1.1. Fielding used these principles to make decisions about which proposals to incorporate into HTTP/1.1. For example, he rejected a proposal to batch requests using new `MGET` and `MHEAD` methods because he felt the proposal violated the constraints prescribed by REST, especially the constraint that messages in a REST system should be easy to proxy and cache.[1][3] So HTTP/1.1 was instead designed around persistent connections over which multiple HTTP requests can be sent. (Fielding also felt that cookies are not RESTful because they add state to what should be a stateless system, but their usage was already entrenched.[2][4]) REST, for Fielding, was not a guide to building HTTP-based systems but a guide to extending HTTP. - -This isn’t to say that Fielding doesn’t think REST could be used to build other systems. It’s just that he assumes these other systems will also be “distributed hypermedia systems.” This is another misconception people have about REST: that it is a general architecture you can use for any kind of networked application. But you could sum up the part of the dissertation where Fielding introduces REST as, essentially, “Listen, we just designed HTTP, so if you also find yourself designing a _distributed hypermedia system_ you should use this cool architecture we worked out called REST to make things easier.” It’s not obvious why Fielding thinks anyone would ever attempt to build such a thing given that the web already exists; perhaps in 2000 it seemed like there was room for more than one distributed hypermedia system in the world. Anyway, Fielding makes clear that REST is intended as a solution for the scalability and consistency problems that arise when trying to connect hypermedia across the internet, _not_ as an architectural model for distributed applications in general. - -We remember Fielding’s dissertation now as the dissertation that introduced REST, but really the dissertation is about how much one-size-fits-all software architectures suck, and how you can better pick a software architecture appropriate for your needs. Only a single chapter of the dissertation is devoted to REST itself; much of the word count is spent on a taxonomy of alternative architectural styles[3][5] that one could use for networked applications. Among these is the Pipe-and-Filter (PF) style, inspired by Unix pipes, along with various refinements of the Client-Server style (CS), such as Layered-Client-Server (LCS), Client-Cache-Stateless-Server (C$SS), and Layered-Client-Cache-Stateless-Server (LC$SS). The acronyms get unwieldy but Fielding’s point is that you can mix and match constraints imposed by existing styles to derive new styles. REST gets derived this way and could instead have been called—but for obvious reasons was not—Uniform-Layered-Code-on-Demand-Client-Cache-Stateless-Server (ULCODC$SS). Fielding establishes this taxonomy to emphasize that different constraints are appropriate for different applications and that this last group of constraints were the ones he felt worked best for HTTP. - -This is the deep, deep irony of REST’s ubiquity today. REST gets blindly used for all sorts of networked applications now, but Fielding originally offered REST as an illustration of how to derive a software architecture tailored to an individual application’s particular needs. - -I struggle to understand how this happened, because Fielding is so explicit about the pitfalls of not letting form follow function. He warns, almost at the very beginning of the dissertation, that “design-by-buzzword is a common occurrence” brought on by a failure to properly appreciate software architecture.[4][6] He picks up this theme again several pages later: - -> Some architectural styles are often portrayed as “silver bullet” solutions for all forms of software. However, a good designer should select a style that matches the needs of a particular problem being solved.[5][7] - -REST itself is an especially poor “silver bullet” solution, because, as Fielding later points out, it incorporates trade-offs that may not be appropriate unless you are building a distributed hypermedia application: - -> REST is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.[6][8] - -Fielding came up with REST because the web posed a thorny problem of “anarchic scalability,” by which Fielding means the need to connect documents in a performant way across organizational and national boundaries. The constraints that REST imposes were carefully chosen to solve this anarchic scalability problem. Web service APIs that are _public-facing_ have to deal with a similar problem, so one can see why REST is relevant there. Yet today it would not be at all surprising to find that an engineering team has built a backend using REST even though the backend only talks to clients that the engineering team has full control over. We have all become the architect in [this Monty Python sketch][9], who designs an apartment building in the style of a slaughterhouse because slaughterhouses are the only thing he has experience building. (Fielding uses a line from this sketch as an epigraph for his dissertation: “Excuse me… did you say ‘knives’?”) - -So, given that Fielding’s dissertation was all about avoiding silver bullet software architectures, how did REST become a de facto standard for web services of every kind? - -My theory is that, in the mid-2000s, the people who were sick of SOAP and wanted to do something else needed their own four-letter acronym. - -I’m only half-joking here. SOAP, or the Simple Object Access Protocol, is a verbose and complicated protocol that you cannot use without first understanding a bunch of interrelated XML specifications. Early web services offered APIs based on SOAP, but, as more and more APIs started being offered in the mid-2000s, software developers burned by SOAP’s complexity migrated away en masse. - -Among this crowd, SOAP inspired contempt. Ruby-on-Rails dropped SOAP support in 2007, leading to this emblematic comment from Rails creator David Heinemeier Hansson: “We feel that SOAP is overly complicated. It’s been taken over by the enterprise people, and when that happens, usually nothing good comes of it.”[7][10] The “enterprise people” wanted everything to be formally specified, but the get-shit-done crowd saw that as a waste of time. - -If the get-shit-done crowd wasn’t going to use SOAP, they still needed some standard way of doing things. Since everyone was using HTTP, and since everyone would keep using HTTP at least as a transport layer because of all the proxying and caching support, the simplest possible thing to do was just rely on HTTP’s existing semantics. So that’s what they did. They could have called their approach Fuck It, Overload HTTP (FIOH), and that would have been an accurate name, as anyone who has ever tried to decide what HTTP status code to return for a business logic error can attest. But that would have seemed recklessly blasé next to all the formal specification work that went into SOAP. - -Luckily, there was this dissertation out there, written by a co-author of the HTTP/1.1 specification, that had something vaguely to do with extending HTTP and could offer FIOH a veneer of academic respectability. So REST was appropriated to give cover for what was really just FIOH. - -I’m not saying that this is exactly how things happened, or that there was an actual conspiracy among irreverent startup types to misappropriate REST, but this story helps me understand how REST became a model for web service APIs when Fielding’s dissertation isn’t about web service APIs at all. Adopting REST’s constraints makes some sense, especially for public-facing APIs that do cross organizational boundaries and thus benefit from REST’s “uniform interface.” That link must have been the kernel of why REST first got mentioned in connection with building APIs on the web. But imagining a separate approach called “FIOH,” that borrowed the “REST” name partly just for marketing reasons, helps me account for the many disparities between what today we know as RESTful APIs and the REST architectural style that Fielding originally described. - -REST purists often complain, for example, that so-called REST APIs aren’t actually REST APIs because they do not use Hypermedia as The Engine of Application State (HATEOAS). Fielding himself [has made this criticism][11]. According to him, a real REST API is supposed to allow you to navigate all its endpoints from a base endpoint by following links. If you think that people are actually out there trying to build REST APIs, then this is a glaring omission—HATEOAS really is fundamental to Fielding’s original conception of REST, especially considering that the “state transfer” in “Representational State Transfer” refers to navigating a state machine using hyperlinks between resources (and not, as many people seem to believe, to transferring resource state over the wire).[8][12] But if you imagine that everyone is just building FIOH APIs and advertising them, with a nudge and a wink, as REST APIs, or slightly more honestly as “RESTful” APIs, then of course HATEOAS is unimportant. - -Similarly, you might be surprised to know that there is nothing in Fielding’s dissertation about which HTTP verb should map to which CRUD action, even though software developers like to argue endlessly about whether using PUT or PATCH to update a resource is more RESTful. Having a standard mapping of HTTP verbs to CRUD actions is a useful thing, but this standard mapping is part of FIOH and not part of REST. - -This is why, rather than saying that nobody understands REST, we should just think of the term “REST” as having been misappropriated. The modern notion of a REST API has historical links to Fielding’s REST architecture, but really the two things are separate. The historical link is good to keep in mind as a guide for when to build a RESTful API. Does your API cross organizational and national boundaries the same way that HTTP needs to? Then building a RESTful API with a predictable, uniform interface might be the right approach. If not, it’s good to remember that Fielding favored having form follow function. Maybe something like GraphQL or even just JSON-RPC would be a better fit for what you are trying to accomplish. - -_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][13] on Twitter or subscribe to the [RSS feed][14] to make sure you know when a new post is out._ - -_Previously on TwoBitHistory…_ - -> New post is up! I wrote about how to solve differential equations using an analog computer from the '30s mostly made out of gears. As a bonus there's even some stuff in here about how to aim very large artillery pieces. -> -> — TwoBitHistory (@TwoBitHistory) [April 6, 2020][15] - - 1. Roy Fielding. “Architectural Styles and the Design of Network-based Software Architectures,” 128. 2000. University of California, Irvine, PhD Dissertation, accessed June 28, 2020, . [↩︎][16] - - 2. Fielding, 130. [↩︎][17] - - 3. Fielding distinguishes between software architectures and software architecture “styles.” REST is an architectural style that has an instantiation in the architecture of HTTP. [↩︎][18] - - 4. Fielding, 2. [↩︎][19] - - 5. Fielding, 15. [↩︎][20] - - 6. Fielding, 82. [↩︎][21] - - 7. Paul Krill. “Ruby on Rails 2.0 released for Web Apps,” InfoWorld. Dec 7, 2007, accessed June 28, 2020,  [↩︎][22] - - 8. Fielding, 109. [↩︎][23] - - - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2020/06/28/rest.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://news.ycombinator.com/item?id=7201871 -[2]: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation_2up.pdf -[3]: tmp.Ewi4FpMIg6#fn:1 -[4]: tmp.Ewi4FpMIg6#fn:2 -[5]: tmp.Ewi4FpMIg6#fn:3 -[6]: tmp.Ewi4FpMIg6#fn:4 -[7]: tmp.Ewi4FpMIg6#fn:5 -[8]: tmp.Ewi4FpMIg6#fn:6 -[9]: https://www.youtube.com/watch?v=vNoPJqm3DAY -[10]: tmp.Ewi4FpMIg6#fn:7 -[11]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven -[12]: tmp.Ewi4FpMIg6#fn:8 -[13]: https://twitter.com/TwoBitHistory -[14]: https://twobithistory.org/feed.xml -[15]: https://twitter.com/TwoBitHistory/status/1247187881946275841?ref_src=twsrc%5Etfw -[16]: tmp.Ewi4FpMIg6#fnref:1 -[17]: tmp.Ewi4FpMIg6#fnref:2 -[18]: tmp.Ewi4FpMIg6#fnref:3 -[19]: tmp.Ewi4FpMIg6#fnref:4 -[20]: tmp.Ewi4FpMIg6#fnref:5 -[21]: tmp.Ewi4FpMIg6#fnref:6 -[22]: tmp.Ewi4FpMIg6#fnref:7 -[23]: tmp.Ewi4FpMIg6#fnref:8 +[#]: collector: (lujun9972) +[#]: translator: (CanYellow) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Roy Fielding's Misappropriated REST Dissertation) +[#]: via: (https://twobithistory.org/2020/06/28/rest.html) +[#]: author: (Two-Bit History https://twobithistory.org) + +被错误应用的罗伊·菲尔丁的有关描述性状态迁移的博士论文 +====== + +TD +Roy Fielding's Misappropriated REST Dissertation +====== + +符合描述性状态迁移的 (RESTful,REST译自审定公布名词数据库) 应用程序接口 (API) 无处不在。有趣的是又有多少人真正了解“描述性状态迁移”的应有之义呢? + +DN +RESTful APIs are everywhere. This is funny, because how many people really know what “RESTful” is supposed to mean? + +大概我们中的大多数人都会跟[黑客新闻网站上的这篇公开问答][1]产生共鸣: +I think most of us can empathize with [this Hacker News poster][1]: + +> 我阅读了几篇介绍描述性状态迁移的文章,甚至包括原始论文的部分章节。然而我仍然对描述性状态迁移到底是什么只有一个相当模糊的想法。我开始认为没有人真的了解描述性状态迁移,它仅仅是一个定义相当不充分的概念。 + +DN +> I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept. + +我曾经计划写一篇有关描述性状态迁移的博客,在里面探讨描述性状态迁移是如何成为这样一个在网络通信领域占主导地位的范式的。我通过阅读[2000年发表的罗伊·菲尔丁的博士论文][2]开始我的研究,这篇博士论文向世人介绍了描述性状态迁移的概念。在读过菲尔丁的博士论文以后,我意识到,相比之下,更引人注意的是菲尔丁的理论缘何受到如此普遍的误解。 + +DN +I had planned to write a blog post exploring how REST came to be such a dominant paradigm for communication across the internet. I started my research by reading [Roy Fielding’s 2000 dissertation][2], which introduced REST to the world. After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood. + +(相对公平地说)很多人知道描述性状态迁移源自菲尔丁的博士论文,但并没有读过该论文。因此对于这篇博士论文的原始内容的误解才得以流行。 + +DN +Many more people know that Fielding’s dissertation is where REST came from than have read the dissertation (fair enough), so misconceptions about what the dissertation actually contains are pervasive. + +最大的误解是:这篇博士论文直接讨论了(译注:广义的)构建应用程序接口的问题,我此前一直认为描述性状态迁移从一开始就打算成为构建在超文本传输协议(HTTP)之上的网络应用程序接口(Web API)的架构模型,我相信很多人也这样认为。我猜测此前可能存在一个混乱的试验时期,开发人员采用完全错误的方式在超文本传输协议基础上开发应用程序接口,然后菲尔丁出现了并提出了将描述性状态迁移做为网络应用程序开发的正确方式。但是这种想法的时间线对不上:我们今天所熟知的网络服务的应用程序接口并非是在菲尔丁出版他的博士论文之后才出现的新生事物。 + +DN +The biggest of these misconceptions is that the dissertation directly addresses the problem of building APIs. I had always assumed, as I imagine many people do, that REST was intended from the get-go as an architectural model for web APIs built on top of HTTP. I thought perhaps that there had been some chaotic experimental period where people were building APIs on top of HTTP all wrong, and then Fielding came along and presented REST as the sane way to do things. But the timeline doesn’t make sense here: APIs for web services, in the sense that we know them today, weren’t a thing until a few years after Fielding published his dissertation. + +菲尔丁的博士论文(名为“架构风格与基于网络的软件架构设计”)(译者注,网络中文版的中文译名)不是讨论如何在超文本传输协议的基础上构建应用程序接口,而恰恰是讨论超文本协议本身菲尔丁是超文本传输协议1.0版规范的贡献者同时也是超文本传输协议1.1版的共同作者。有感于从HTTP协议的设计中获得的架构经验,他的博士论文将描述性状态迁移视为指导HTTP/1.1的标准化过程的架构原则的精华。举例而言,他拒绝了使用`MGET`和`MHEAD`方法进行批量请求的提议,因为他认为这违反了REST所定义的约束条件,尤其是在一个符合REST的系统中传递的消息应该是易于代理和缓存的约束条件。[1][3]因此,HTTP/1.1转而围绕持久性连接设计,在此基础上可以发送多个HTTP请求。(菲尔丁同时认为) +Fielding’s dissertation (titled “Architectural Styles and the Design of Network-based Software Architectures”) is not about how to build APIs on top of HTTP but rather about HTTP itself. Fielding contributed to the HTTP/1.0 specification and co-authored the HTTP/1.1 specification, which was published in 1999. He was interested in the architectural lessons that could be drawn from the design of the HTTP protocol; his dissertation presents REST as a distillation of the architectural principles that guided the standardization process for HTTP/1.1. Fielding used these principles to make decisions about which proposals to incorporate into HTTP/1.1. For example, he rejected a proposal to batch requests using new `MGET` and `MHEAD` methods because he felt the proposal violated the constraints prescribed by REST, especially the constraint that messages in a REST system should be easy to proxy and cache.[1][3] So HTTP/1.1 was instead designed around persistent connections over which multiple HTTP requests can be sent. (Fielding also felt that cookies are not RESTful because they add state to what should be a stateless system, but their usage was already entrenched.[2][4]) REST, for Fielding, was not a guide to building HTTP-based systems but a guide to extending HTTP. + +This isn’t to say that Fielding doesn’t think REST could be used to build other systems. It’s just that he assumes these other systems will also be “distributed hypermedia systems.” This is another misconception people have about REST: that it is a general architecture you can use for any kind of networked application. But you could sum up the part of the dissertation where Fielding introduces REST as, essentially, “Listen, we just designed HTTP, so if you also find yourself designing a _distributed hypermedia system_ you should use this cool architecture we worked out called REST to make things easier.” It’s not obvious why Fielding thinks anyone would ever attempt to build such a thing given that the web already exists; perhaps in 2000 it seemed like there was room for more than one distributed hypermedia system in the world. Anyway, Fielding makes clear that REST is intended as a solution for the scalability and consistency problems that arise when trying to connect hypermedia across the internet, _not_ as an architectural model for distributed applications in general. + +We remember Fielding’s dissertation now as the dissertation that introduced REST, but really the dissertation is about how much one-size-fits-all software architectures suck, and how you can better pick a software architecture appropriate for your needs. Only a single chapter of the dissertation is devoted to REST itself; much of the word count is spent on a taxonomy of alternative architectural styles[3][5] that one could use for networked applications. Among these is the Pipe-and-Filter (PF) style, inspired by Unix pipes, along with various refinements of the Client-Server style (CS), such as Layered-Client-Server (LCS), Client-Cache-Stateless-Server (C$SS), and Layered-Client-Cache-Stateless-Server (LC$SS). The acronyms get unwieldy but Fielding’s point is that you can mix and match constraints imposed by existing styles to derive new styles. REST gets derived this way and could instead have been called—but for obvious reasons was not—Uniform-Layered-Code-on-Demand-Client-Cache-Stateless-Server (ULCODC$SS). Fielding establishes this taxonomy to emphasize that different constraints are appropriate for different applications and that this last group of constraints were the ones he felt worked best for HTTP. + +This is the deep, deep irony of REST’s ubiquity today. REST gets blindly used for all sorts of networked applications now, but Fielding originally offered REST as an illustration of how to derive a software architecture tailored to an individual application’s particular needs. + +I struggle to understand how this happened, because Fielding is so explicit about the pitfalls of not letting form follow function. He warns, almost at the very beginning of the dissertation, that “design-by-buzzword is a common occurrence” brought on by a failure to properly appreciate software architecture.[4][6] He picks up this theme again several pages later: + +> Some architectural styles are often portrayed as “silver bullet” solutions for all forms of software. However, a good designer should select a style that matches the needs of a particular problem being solved.[5][7] + +REST itself is an especially poor “silver bullet” solution, because, as Fielding later points out, it incorporates trade-offs that may not be appropriate unless you are building a distributed hypermedia application: + +> REST is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.[6][8] + +Fielding came up with REST because the web posed a thorny problem of “anarchic scalability,” by which Fielding means the need to connect documents in a performant way across organizational and national boundaries. The constraints that REST imposes were carefully chosen to solve this anarchic scalability problem. Web service APIs that are _public-facing_ have to deal with a similar problem, so one can see why REST is relevant there. Yet today it would not be at all surprising to find that an engineering team has built a backend using REST even though the backend only talks to clients that the engineering team has full control over. We have all become the architect in [this Monty Python sketch][9], who designs an apartment building in the style of a slaughterhouse because slaughterhouses are the only thing he has experience building. (Fielding uses a line from this sketch as an epigraph for his dissertation: “Excuse me… did you say ‘knives’?”) + +So, given that Fielding’s dissertation was all about avoiding silver bullet software architectures, how did REST become a de facto standard for web services of every kind? + +My theory is that, in the mid-2000s, the people who were sick of SOAP and wanted to do something else needed their own four-letter acronym. + +I’m only half-joking here. SOAP, or the Simple Object Access Protocol, is a verbose and complicated protocol that you cannot use without first understanding a bunch of interrelated XML specifications. Early web services offered APIs based on SOAP, but, as more and more APIs started being offered in the mid-2000s, software developers burned by SOAP’s complexity migrated away en masse. + +Among this crowd, SOAP inspired contempt. Ruby-on-Rails dropped SOAP support in 2007, leading to this emblematic comment from Rails creator David Heinemeier Hansson: “We feel that SOAP is overly complicated. It’s been taken over by the enterprise people, and when that happens, usually nothing good comes of it.”[7][10] The “enterprise people” wanted everything to be formally specified, but the get-shit-done crowd saw that as a waste of time. + +If the get-shit-done crowd wasn’t going to use SOAP, they still needed some standard way of doing things. Since everyone was using HTTP, and since everyone would keep using HTTP at least as a transport layer because of all the proxying and caching support, the simplest possible thing to do was just rely on HTTP’s existing semantics. So that’s what they did. They could have called their approach Fuck It, Overload HTTP (FIOH), and that would have been an accurate name, as anyone who has ever tried to decide what HTTP status code to return for a business logic error can attest. But that would have seemed recklessly blasé next to all the formal specification work that went into SOAP. + +Luckily, there was this dissertation out there, written by a co-author of the HTTP/1.1 specification, that had something vaguely to do with extending HTTP and could offer FIOH a veneer of academic respectability. So REST was appropriated to give cover for what was really just FIOH. + +I’m not saying that this is exactly how things happened, or that there was an actual conspiracy among irreverent startup types to misappropriate REST, but this story helps me understand how REST became a model for web service APIs when Fielding’s dissertation isn’t about web service APIs at all. Adopting REST’s constraints makes some sense, especially for public-facing APIs that do cross organizational boundaries and thus benefit from REST’s “uniform interface.” That link must have been the kernel of why REST first got mentioned in connection with building APIs on the web. But imagining a separate approach called “FIOH,” that borrowed the “REST” name partly just for marketing reasons, helps me account for the many disparities between what today we know as RESTful APIs and the REST architectural style that Fielding originally described. + +REST purists often complain, for example, that so-called REST APIs aren’t actually REST APIs because they do not use Hypermedia as The Engine of Application State (HATEOAS). Fielding himself [has made this criticism][11]. According to him, a real REST API is supposed to allow you to navigate all its endpoints from a base endpoint by following links. If you think that people are actually out there trying to build REST APIs, then this is a glaring omission—HATEOAS really is fundamental to Fielding’s original conception of REST, especially considering that the “state transfer” in “Representational State Transfer” refers to navigating a state machine using hyperlinks between resources (and not, as many people seem to believe, to transferring resource state over the wire).[8][12] But if you imagine that everyone is just building FIOH APIs and advertising them, with a nudge and a wink, as REST APIs, or slightly more honestly as “RESTful” APIs, then of course HATEOAS is unimportant. + +Similarly, you might be surprised to know that there is nothing in Fielding’s dissertation about which HTTP verb should map to which CRUD action, even though software developers like to argue endlessly about whether using PUT or PATCH to update a resource is more RESTful. Having a standard mapping of HTTP verbs to CRUD actions is a useful thing, but this standard mapping is part of FIOH and not part of REST. + +This is why, rather than saying that nobody understands REST, we should just think of the term “REST” as having been misappropriated. The modern notion of a REST API has historical links to Fielding’s REST architecture, but really the two things are separate. The historical link is good to keep in mind as a guide for when to build a RESTful API. Does your API cross organizational and national boundaries the same way that HTTP needs to? Then building a RESTful API with a predictable, uniform interface might be the right approach. If not, it’s good to remember that Fielding favored having form follow function. Maybe something like GraphQL or even just JSON-RPC would be a better fit for what you are trying to accomplish. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][13] on Twitter or subscribe to the [RSS feed][14] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> New post is up! I wrote about how to solve differential equations using an analog computer from the '30s mostly made out of gears. As a bonus there's even some stuff in here about how to aim very large artillery pieces. +> +> — TwoBitHistory (@TwoBitHistory) [April 6, 2020][15] + + 1. Roy Fielding. “Architectural Styles and the Design of Network-based Software Architectures,” 128. 2000. University of California, Irvine, PhD Dissertation, accessed June 28, 2020, . [↩︎][16] + + 2. Fielding, 130. [↩︎][17] + + 3. Fielding distinguishes between software architectures and software architecture “styles.” REST is an architectural style that has an instantiation in the architecture of HTTP. [↩︎][18] + + 4. Fielding, 2. [↩︎][19] + + 5. Fielding, 15. [↩︎][20] + + 6. Fielding, 82. [↩︎][21] + + 7. Paul Krill. “Ruby on Rails 2.0 released for Web Apps,” InfoWorld. Dec 7, 2007, accessed June 28, 2020,  [↩︎][22] + + 8. Fielding, 109. [↩︎][23] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/06/28/rest.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://news.ycombinator.com/item?id=7201871 +[2]: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation_2up.pdf +[3]: tmp.Ewi4FpMIg6#fn:1 +[4]: tmp.Ewi4FpMIg6#fn:2 +[5]: tmp.Ewi4FpMIg6#fn:3 +[6]: tmp.Ewi4FpMIg6#fn:4 +[7]: tmp.Ewi4FpMIg6#fn:5 +[8]: tmp.Ewi4FpMIg6#fn:6 +[9]: https://www.youtube.com/watch?v=vNoPJqm3DAY +[10]: tmp.Ewi4FpMIg6#fn:7 +[11]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven +[12]: tmp.Ewi4FpMIg6#fn:8 +[13]: https://twitter.com/TwoBitHistory +[14]: https://twobithistory.org/feed.xml +[15]: https://twitter.com/TwoBitHistory/status/1247187881946275841?ref_src=twsrc%5Etfw +[16]: tmp.Ewi4FpMIg6#fnref:1 +[17]: tmp.Ewi4FpMIg6#fnref:2 +[18]: tmp.Ewi4FpMIg6#fnref:3 +[19]: tmp.Ewi4FpMIg6#fnref:4 +[20]: tmp.Ewi4FpMIg6#fnref:5 +[21]: tmp.Ewi4FpMIg6#fnref:6 +[22]: tmp.Ewi4FpMIg6#fnref:7 +[23]: tmp.Ewi4FpMIg6#fnref:8 diff --git a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md index b9c7838853..34902ff9d6 100644 --- a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md +++ b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md @@ -1,100 +1,94 @@ -[#]: subject: "Open Source Software: Is There an Easy Path to Success?" -[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" -[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open Source Software: Is There an Easy Path to Success? -====== -There’s so much that goes on behind the scenes while developing open source software. So how does one make an open source project successful? Is there a shortcut? This article indicates there isn’t one. - -![team work working together][1] - -Open source has become all the rage now. Many entrepreneurs are drawn to it by the allure of quick success. But the truth is, there is no easy path to such success. There is no one thing that you can do to get all of open source right. - -In fact, a lot of the challenges that companies face early on are not technology challenges, but are people and cultural challenges. - -There are many layers of open source that need to be worked on to build a project that can become a hit in the market. And maintaining that success is an ongoing process. But at the crux of it all lies finding the right answer to a very basic question: what exactly is open source? - -### Open source is the code - -For many new users who may not be fully aware of the layers that make open source, the answer is fairly simple: open source is software! And that is not wrong, of course, since that is how most of us are using it. But there’s just so much more to open source than merely being touted as software. - -The essence of any open source project still remains the code. It is what makes the project special and useful for the user. When you’re working in open source, the code is just as much a part of the product as the software. - -Developing a project from the ground up, or even creating a fork of an existing project, requires thousands and thousands of lines of code to be written, even while handling such a large and complex codebase. Especially in the case of creating a fork, care must be taken to remove any prior licences, marketing material, or anything that might not be useful for the user anymore. After all, it is the features of a project that attract its user base and what retains it. When end users are deciding whether to use open source software, they will read the source code, and what they see there should be something that builds their confidence. - -### Open source is the community - -How you engage with the community is also a part of the task of building a product. Building a community and maintaining a healthy relationship with it is one of the most crucial aspects of open source, but is also often the hardest for most leaders as there is very little one can do to control it. One can try to lay the foundation and can be supportive but, ultimately, it’s the people who decide whether they want to join a community. - -It is important to maintain a level of transparency with the community and keep it in the loop. The community can get involved at any step that it wants to. It’s really important that you show most of your work to the community while you are doing it, apart from things that need to be done confidentially, like setting up security, signing certificates, branding, and so on. This helps in winning its trust because, in the end, it is the community that you are liable to, and it can make or break your project. This may make the project work a lot more deliberate, slower and exposed, but it works well in the end. - -Making your work-in-progress so open can seem daunting, especially when you are worried about the repercussions of a delay in updates or having a bug. Yet, making the community members privy to your moves will not only help you build a trustful relationship with them, but also make them feel appreciated. - -However, making your workflow public will also invite scrutiny from the community members, who will often have their opinions and offer you their feedback. Taking note of this feedback is important, because that is how you can make your open source project truly for them. They are the end users and their feedback will reflect how they see your project panning out for them in the long run, and ultimately, how successful and mainstream your software becomes. - -As an example, when we are thinking about a new feature, we publish a request for comments at RFC. We get a lot of feedback, and we have to think hard about how we can incorporate it. - -Since open source is a largely collaborative work, there will be initiatives by the community to offer their support in making the project the best version possible. Not all of it will work out. But as long you are listening, the community will feel involved. - -Engaging with the community has its pitfalls too. There may be differences of opinion within the community, and also between the maintainer and the community, especially when it comes to the matter of governance. Governance is something which is really important for an open source project to have. That is why it is important to have clear documented governance practices, which also include the community. - -Community governance is a tough, but essential, nut to crack. Delegation in itself requires a lot of trust. For a project with millions of lines of code, it can be cumbersome to find someone in the community who can meaningfully lead it. But open source projects often consist of smaller sub-projects, which are better left handled by someone from the community. This helps the community to be more closely involved too. - -| - | -| :- | -| Building a community always has its highs and lows. Let me list some of the tricks that helped maintain a healthy balance between the community’s and my team’s vision. -State your principle: Especially in the early stage of the open source project when the source code is still coming together and things are not exactly going perfectly, it is hard for somebody coming from outside to really understand why you are making the decisions that you are making. Communicating the principles on which you take actions helps you to be upfront about your thought process so that the community does not interpret things incorrectly. -This practice is really helpful. It is also important to follow through and show that when you make a decision, it is guided by one of these principles. -Decide how you are going to collaborate: This may be through channels like Discord, Slack, or simply emails. But if you try to use all of them, you will immediately diffuse the community. People will be communicating with each other all over the place. Choose one or two collaboration tools, and really invest in them for synchronised communication. -Treasure the feedback: Listen to feedback from the community and act on it. Show tat you care about what the community says, even if it requires you to make tough decisions. -Maintain a code of conduct: If you interact with a community, you need to define what is going to be acceptable conduct. Having that in place helps warn people in case they go out of line. You can avoid a lot of trouble if you can just define this early on. -Think about how you will distribute your project: There may be instances when you may not be willing to make your project available to the public because you do not have a certain component in place, or you have features you may not want to make accessible to everyone. Creating distribution terms that suit your preference without compromising on what the user wants is key, so that people who want certain features can access these while those who can do without them also have the option to start using the project without having to compromise. -Avoid polls as much as you can: This is because, often, certain members vote for an option that may not be what the majority goes with. This can create a sense of failure in these members and make them feel excluded from the project. Instead, try asking them what problems they would like to be solved, and then try to invent a solution that does not involve trade-offs. | - -**State your principle:** Especially in the early stage of the open source project when the source code is still coming together and things are not exactly going perfectly, it is hard for somebody coming from outside to really understand why you are making the decisions that you are making. Communicating the principles on which you take actions helps you to be upfront about your thought process so that the community does not interpret things incorrectly. - -This practice is really helpful. It is also important to follow through and show that when you make a decision, it is guided by one of these principles. - -*Decide how you are going to collaborate:* This may be through channels like Discord, Slack, or simply emails. But if you try to use all of them, you will immediately diffuse the community. People will be communicating with each other all over the place. Choose one or two collaboration tools, and really invest in them for synchronised communication. - -*Treasure the feedback:* Listen to feedback from the community and act on it. Show tat you care about what the community says, even if it requires you to make tough decisions. - -**Maintain a code of conduct:** If you interact with a community, you need to define what is going to be acceptable conduct. Having that in place helps warn people in case they go out of line. You can avoid a lot of trouble if you can just define this early on. - -*Think about how you will distribute your project:* There may be instances when you may not be willing to make your project available to the public because you do not have a certain component in place, or you have features you may not want to make accessible to everyone. Creating distribution terms that suit your preference without compromising on what the user wants is key, so that people who want certain features can access these while those who can do without them also have the option to start using the project without having to compromise. - -*Avoid polls as much as you can:* This is because, often, certain members vote for an option that may not be what the majority goes with. This can create a sense of failure in these members and make them feel excluded from the project. Instead, try asking them what problems they would like to be solved, and then try to invent a solution that does not involve trade-offs. - -### Open source is licensing - -Open source is about giving your users autonomy over how they want to use your software, and licensing provides just that. What’s great about an open source licence is that regardless of what you as a maintainer do, all your end users and stakeholders can always maintain a certain set of forks, which are important forks. - -Licensing gives people the option to take the project into a different direction if they deem it fit. They have the right to create a fork, which results in a lot of amazing software being developed. Maintainers have more responsibility to listen to their community members and to run the project in a way that works for them. - -It’s advisable to make use of the many licences available instead of setting your own terms separately, simply because stakeholders and users are usually familiar with commonly used licences, so you do not have to waste time explaining them. This also helps you to focus your energy on the other parts of the project. - -### Finally, open source is a movement - -Open source involves many, many dimensions and people. Most importantly, it is about understanding what these people want and creating an environment that encourages collaboration and transparency. It is about building communities that help to build the open source project the way they want it to be. The more opportunity maintainers create to let them do that, the better the product is and the more successful it gets. - -Open source is all of these things and the more expansive view you take, the better you can leverage it. Think about how you can excel in every dimension of open source because, at the end of the day, there is no easy path to open source success. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ - -作者:[Jules Graybill][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/jules-graybill/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg +[#]: subject: "Open Source Software: Is There an Easy Path to Success?" +[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" +[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +开源软件:存在成功的捷径吗? +====== + +开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 + +![团队合作][1] + +今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 + +事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 + +开发一个能够在市场上获得成功的开源项目需要同不同层级(的开源社区人员)一同工作。维护这样的项目也是一个持续的过程。所有这一切的关键在于找到以下这个非常基础的问题的正确答案:开源究竟是什么。 + +### 开源是代码 + +对于很多没有深刻认识到构成开源的不同层级(的开源社区人员)用户而言,答案相当简单:开源就是软件!这当然没有错,毕竟这就是我们多数人如何使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 + +任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目并使其对用户有益的根本。当你在开源中工作的时候,代码和软件一样都是产品自身的一部分。 + +从零开始开发一个(开源)项目或者复刻(fork)一个现有项目的分支,即便是在处理如此庞大而复杂的代码库时,也需要编写成千上万行代码。尤其是在创新一个现有项目的分支的情况下,在移除任何在先的许可证、宣传材料或者其他任何可能已经失去作用的文件时必须小心翼翼。终究是一个项目的功能吸引了它的用户群并维持项目的持续发展。当终端用户在考虑是否使用开源软件的时候,他们会阅读项目的源代码,而他们在其中所看到的应当是那些能够建立他们的信心的内容。 + +### 开源是社区 + +如何参与到社区中也是产品构建项目的一部分。创建一个社区并维护一个健康的社区关系是开源的核心之一,但对于大部分的领导者而言也往往是最坚难的任务,很少有人能很好地维护它。你可以尝试建立基金会或者提供赞助,但是最终还是人们自行决定是否想要加入社区。 + +维护一定程度的社区透明度并不断保持也是重要的。社区可以随心所欲地参与项目。除了需要秘密进行的工作之外,诸如安全设置、签发证书、注册商标等,尽可能多的将你所做的工作展示给社区是相当重要的,这有助于取得社区信任。你终究需要对社区负责,你的项目成也社区,败也社区。这可能会导致你的项目开发更谨慎、更缓慢并且向社区公开,不过项目最终会进展顺利。 + +如此地公开你正在进行的工作似乎有些令人生怯,尤其是当你担心更新推迟或者是出现漏洞的影响的时候。不过,让社区成员知悉你的进展不仅有助帮助你建立与社区之间的信任关系,而且能够让社区成员感到被认可。 + +另一方面,公开你的工作流也可以获得来自社区成员的监督,他们经常有自己的见解并向你反馈。记录这些反馈是很重要的,这使得你的开源项目如实地反映社区需求。他们是项目的末端用户,而他们的反馈则反映了他们如何看待你的项目的长期发展以及你的项目最终将有多么成功或者主流。 + +举例而言,当我们在考虑一个新功能的时候,我们在征求意见文档(RFC, Request for Comments)中发布一个征集意见的请求,我们会收到大量的反馈,我们必须认真思考应当如何吸收这些反馈。 + +因为开源是一个大型的合作项目,社区在支持开源项目成为可能的万里挑一的项目上享有主动权。并非所有的问题都要解决,但只要你有在倾听社区的呼声,社区就会有参与感。 + +参与到社区中也存在一些隐患。社区内部、项目维护与社区之间均可能存在不同意见,尤其是在涉及管理问题上。管理问题对于一个开源项目来说是相当重要的。这也就是为什么拥有一份清晰的文档化的管理条例对于项目以及社区均是如此重要。 + +社区管理是一个关键的而又难啃的骨头。社区授权本身需要相当大的信任。对于一个拥有成千上万行代码的项目,在社区中寻找能够有效领导社区的人物是不容易的。不过开源项目经常是由更小的子项目组成的,这些子项目最好由社区中的某个人进行管理。这有助于社区更紧密地参与到项目中。 + +| - | +| :- | +| 建立社区的过程不是一帆风顺的。让我列举一一些有助于维持社区与我的团队之间平衡的技巧。 + +**声明你的原则:**尤其是在开源项目的早期,在项目代码仍在完善,很多事情还不完美的时候,项目之外的人员很难真正理解你所做的决定。向他们说明你做出决定所依据的原则有助于你在思考过程上保持坦率,从而让社区不会错误地干扰你的事务。 + +这一经验非常有效,在你做出决定时坚持遵循其中一项原则并展示出来是非常重要的。 + +*确定如何进行协作:*你可以通过Discord、Slack或者邮件等途径完成这一工作。但是如果你试图同时使用他们,你将毫不意外的分散项目社区。社区人员将在所有这些途径上互相交流。选择一到两种沟通工具,投身于他们来保证社区的信息同步。 + +*珍惜反馈意见:*倾听来自社区的反馈并付诸行动。即使需要你作出艰难的决定,你也应当向社区展示你是重视社区话语的。 + +**维护一套行为准则:**如果你与社区打交道,你需要定义什么行为是可以接受的。一套落地的行为准则有助于在人们越过红线时警示他们。如果你可以提前制定这些你可以避免很多麻烦。 + +*考虑如何分发你的项目:*存在这样的情况,因为你还没有准备好某一个组件,或者是因为存在一些项目功能你不希望所有人都能够访问,所以你可能并不希望将你的项目完全向公众公开。关键是制定符合你的要求而不是向用户妥协的分发条款,如此,需要某种功能的用户可以获取所需项目的同时不需要该功能的用户也不需要做出妥协而开始使用该项目。 + +*尽可能地避免投票:*这是因为部分成员经常会赞成与大部分成员的意见相左的选项,这会使这些人产生一定程度的失望,并让他们觉得被项目所孤立。反之,尽量尝试询问他们想要解决什么问题,并尝试创造一个不需要付出代价的解决方案。 + +### 开源是许可 + +开源是给予你的用户如何使用你的软件的自由,而许可能够做到这一点。一个开源项目许可是极好的,它保证了不论你作为维护者做了什么,你的所有终端用户以及利益相关方总是可以维护一系列的项目复刻版本,这些都是重要的项目复刻版。 + +许可提供了人们可选择性,如果他们认为有必要,他们可以将项目复制到不同的路径中。他们拥有创建副本的权利,这使得许多优秀的软件能够被开发出来。维护者有责任倾听他们的社区成员的声音并以一个对项目的社区成员有利的方式运营项目。 + +我们推荐使用现有的许多可用的许可证而不是独立制作你自己的许可条款,仅仅只是因为用户以及利益相关方通常都很熟悉公共许可证,因此你不需要再花费时间在解释许可条款上。这将帮助你将你的精力集中在项目的其他部分上。 + +### 最后,开源是一项运动 + +开源包括了很多维度,也包含了很多人员。最重要的是,它是有关理解人们想要什么的,也是有关创建一个鼓励协作与透明的环境的。开源也是有关创建有利于开源项目走自己想走的道路的社区的。维护者创造越多的机会让社区自由发挥,开源产品就越好,也越发成功。 + +开源是以上这些方面,而你的视野越宽阔,你就能越好的利用它。请考虑你如何能够在开源的每一个维度上出类拔萃,因为时至今日,开源的成功之路并无捷径。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ + +作者:[Jules Graybill][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jules-graybill/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg From 7e0522fe18ad12aaca37b44d70d11b1cb8500727 Mon Sep 17 00:00:00 2001 From: CanYellow Date: Wed, 5 Apr 2023 23:18:35 +0800 Subject: [PATCH 264/318] Delete 20220726 Open Source Software- Is There an Easy Path to Success-.md --- ...ware- Is There an Easy Path to Success-.md | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md diff --git a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md deleted file mode 100644 index ea35405d69..0000000000 --- a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: "Open Source Software: Is There an Easy Path to Success?" -[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" -[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" -[#]: collector: "lkxed" -[#]: translator: "CanYellow" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -开源软件:存在成功的捷径吗? -====== - -开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 - -![团队合作][1] - -今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 - -事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 - -开发一个能够在市场上获得成功的开源项目需要同不同层级(的开源社区人员)一同工作。维护这样的项目也是一个持续的过程。所有这一切的关键在于找到以下这个非常基础的问题的正确答案:开源究竟是什么。 - -### 开源是代码 - -对于很多没有深刻认识到构成开源的不同层级(的开源社区人员)用户而言,答案相当简单:开源就是软件!这当然没有错,毕竟这就是我们多数人如何使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 - -任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目并使其对用户有益的根本。当你在开源中工作的时候,代码和软件一样都是产品自身的一部分。 - -从零开始开发一个(开源)项目或者复刻(fork)一个现有项目的分支,即便是在处理如此庞大而复杂的代码库时,也需要编写成千上万行代码。尤其是在创新一个现有项目的分支的情况下,在移除任何在先的许可证、宣传材料或者其他任何可能已经失去作用的文件时必须小心翼翼。终究是一个项目的功能吸引了它的用户群并维持项目的持续发展。当终端用户在考虑是否使用开源软件的时候,他们会阅读项目的源代码,而他们在其中所看到的应当是那些能够建立他们的信心的内容。 - -### 开源是社区 - -如何参与到社区中也是产品构建项目的一部分。创建一个社区并维护一个健康的社区关系是开源的核心之一,但对于大部分的领导者而言也往往是最坚难的任务,很少有人能很好地维护它。你可以尝试建立基金会或者提供赞助,但是最终还是人们自行决定是否想要加入社区。 - -维护一定程度的社区透明度并不断保持也是重要的。社区可以随心所欲地参与项目。除了需要秘密进行的工作之外,诸如安全设置、签发证书、注册商标等,尽可能多的将你所做的工作展示给社区是相当重要的,这有助于取得社区信任。你终究需要对社区负责,你的项目成也社区,败也社区。这可能会导致你的项目开发更谨慎、更缓慢并且向社区公开,不过项目最终会进展顺利。 - -如此地公开你正在进行的工作似乎有些令人生怯,尤其是当你担心更新推迟或者是出现漏洞的影响的时候。不过,让社区成员知悉你的进展不仅有助帮助你建立与社区之间的信任关系,而且能够让社区成员感到被认可。 - -另一方面,公开你的工作流也可以获得来自社区成员的监督,他们经常有自己的见解并向你反馈。记录这些反馈是很重要的,这使得你的开源项目如实地反映社区需求。他们是项目的末端用户,而他们的反馈则反映了他们如何看待你的项目的长期发展以及你的项目最终将有多么成功或者主流。 - -举例而言,当我们在考虑一个新功能的时候,我们在征求意见文档(RFC, Request for Comments)中发布一个征集意见的请求,我们会收到大量的反馈,我们必须认真思考应当如何吸收这些反馈。 - -因为开源是一个大型的合作项目,社区在支持开源项目成为可能的万里挑一的项目上享有主动权。并非所有的问题都要解决,但只要你有在倾听社区的呼声,社区就会有参与感。 - -参与到社区中也存在一些隐患。社区内部、项目维护与社区之间均可能存在不同意见,尤其是在涉及管理问题上。管理问题对于一个开源项目来说是相当重要的。这也就是为什么拥有一份清晰的文档化的管理条例对于项目以及社区均是如此重要。 - -社区管理是一个关键的而又难啃的骨头。社区授权本身需要相当大的信任。对于一个拥有成千上万行代码的项目,在社区中寻找能够有效领导社区的人物是不容易的。不过开源项目经常是由更小的子项目组成的,这些子项目最好由社区中的某个人进行管理。这有助于社区更紧密地参与到项目中。 - -| - | -| :- | -| 建立社区的过程不是一帆风顺的。让我列举一一些有助于维持社区与我的团队之间平衡的技巧。 - -**声明你的原则:**尤其是在开源项目的早期,在项目代码仍在完善,很多事情还不完美的时候,项目之外的人员很难真正理解你所做的决定。向他们说明你做出决定所依据的原则有助于你在思考过程上保持坦率,从而让社区不会错误地干扰你的事务。 - -这一经验非常有效,在你做出决定时坚持遵循其中一项原则并展示出来是非常重要的。 - -*确定如何进行协作:*你可以通过Discord、Slack或者邮件等途径完成这一工作。但是如果你试图同时使用他们,你将毫不意外的分散项目社区。社区人员将在所有这些途径上互相交流。选择一到两种沟通工具,投身于他们来保证社区的信息同步。 - -*珍惜反馈意见:*倾听来自社区的反馈并付诸行动。即使需要你作出艰难的决定,你也应当向社区展示你是重视社区话语的。 - -**维护一套行为准则:**如果你与社区打交道,你需要定义什么行为是可以接受的。一套落地的行为准则有助于在人们越过红线时警示他们。如果你可以提前制定这些你可以避免很多麻烦。 - -*考虑如何分发你的项目:*存在这样的情况,因为你还没有准备好某一个组件,或者是因为存在一些项目功能你不希望所有人都能够访问,所以你可能并不希望将你的项目完全向公众公开。关键是制定符合你的要求而不是向用户妥协的分发条款,如此,需要某种功能的用户可以获取所需项目的同时不需要该功能的用户也不需要做出妥协而开始使用该项目。 - -*尽可能地避免投票:*这是因为部分成员经常会赞成与大部分成员的意见相左的选项,这会使这些人产生一定程度的失望,并让他们觉得被项目所孤立。反之,尽量尝试询问他们想要解决什么问题,并尝试创造一个不需要付出代价的解决方案。 - -### 开源是许可 - -开源是给予你的用户如何使用你的软件的自由,而许可能够做到这一点。一个开源项目许可是极好的,它保证了不论你作为维护者做了什么,你的所有终端用户以及利益相关方总是可以维护一系列的项目复刻版本,这些都是重要的项目复刻版。 - -许可提供了人们可选择性,如果他们认为有必要,他们可以将项目复制到不同的路径中。他们拥有创建副本的权利,这使得许多优秀的软件能够被开发出来。维护者有责任倾听他们的社区成员的声音并以一个对项目的社区成员有利的方式运营项目。 - -我们推荐使用现有的许多可用的许可证而不是独立制作你自己的许可条款,仅仅只是因为用户以及利益相关方通常都很熟悉公共许可证,因此你不需要再花费时间在解释许可条款上。这将帮助你将你的精力集中在项目的其他部分上。 - -### 最后,开源是一项运动 - -开源包括了很多维度,也包含了很多人员。最重要的是,它是有关理解人们想要什么的,也是有关创建一个鼓励协作与透明的环境的。开源也是有关创建有利于开源项目走自己想走的道路的社区的。维护者创造越多的机会让社区自由发挥,开源产品就越好,也越发成功。 - -开源是以上这些方面,而你的视野越宽阔,你就能越好的利用它。请考虑你如何能够在开源的每一个维度上出类拔萃,因为时至今日,开源的成功之路并无捷径。 - - -via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ - -作者:[Jules Graybill][a] -选题:[lkxed][b] -译者:[CanYellow](https://github.com/CanYellow) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.opensourceforu.com/author/jules-graybill/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg From 8b9b8c61b4ed5b2bdf2fb51d307e7c3d000a1476 Mon Sep 17 00:00:00 2001 From: CanYellow Date: Wed, 5 Apr 2023 23:19:07 +0800 Subject: [PATCH 265/318] Add files via upload --- ...ware- Is There an Easy Path to Success-.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md diff --git a/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md new file mode 100644 index 0000000000..ea35405d69 --- /dev/null +++ b/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md @@ -0,0 +1,93 @@ +[#]: subject: "Open Source Software: Is There an Easy Path to Success?" +[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" +[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +开源软件:存在成功的捷径吗? +====== + +开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 + +![团队合作][1] + +今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 + +事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 + +开发一个能够在市场上获得成功的开源项目需要同不同层级(的开源社区人员)一同工作。维护这样的项目也是一个持续的过程。所有这一切的关键在于找到以下这个非常基础的问题的正确答案:开源究竟是什么。 + +### 开源是代码 + +对于很多没有深刻认识到构成开源的不同层级(的开源社区人员)用户而言,答案相当简单:开源就是软件!这当然没有错,毕竟这就是我们多数人如何使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 + +任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目并使其对用户有益的根本。当你在开源中工作的时候,代码和软件一样都是产品自身的一部分。 + +从零开始开发一个(开源)项目或者复刻(fork)一个现有项目的分支,即便是在处理如此庞大而复杂的代码库时,也需要编写成千上万行代码。尤其是在创新一个现有项目的分支的情况下,在移除任何在先的许可证、宣传材料或者其他任何可能已经失去作用的文件时必须小心翼翼。终究是一个项目的功能吸引了它的用户群并维持项目的持续发展。当终端用户在考虑是否使用开源软件的时候,他们会阅读项目的源代码,而他们在其中所看到的应当是那些能够建立他们的信心的内容。 + +### 开源是社区 + +如何参与到社区中也是产品构建项目的一部分。创建一个社区并维护一个健康的社区关系是开源的核心之一,但对于大部分的领导者而言也往往是最坚难的任务,很少有人能很好地维护它。你可以尝试建立基金会或者提供赞助,但是最终还是人们自行决定是否想要加入社区。 + +维护一定程度的社区透明度并不断保持也是重要的。社区可以随心所欲地参与项目。除了需要秘密进行的工作之外,诸如安全设置、签发证书、注册商标等,尽可能多的将你所做的工作展示给社区是相当重要的,这有助于取得社区信任。你终究需要对社区负责,你的项目成也社区,败也社区。这可能会导致你的项目开发更谨慎、更缓慢并且向社区公开,不过项目最终会进展顺利。 + +如此地公开你正在进行的工作似乎有些令人生怯,尤其是当你担心更新推迟或者是出现漏洞的影响的时候。不过,让社区成员知悉你的进展不仅有助帮助你建立与社区之间的信任关系,而且能够让社区成员感到被认可。 + +另一方面,公开你的工作流也可以获得来自社区成员的监督,他们经常有自己的见解并向你反馈。记录这些反馈是很重要的,这使得你的开源项目如实地反映社区需求。他们是项目的末端用户,而他们的反馈则反映了他们如何看待你的项目的长期发展以及你的项目最终将有多么成功或者主流。 + +举例而言,当我们在考虑一个新功能的时候,我们在征求意见文档(RFC, Request for Comments)中发布一个征集意见的请求,我们会收到大量的反馈,我们必须认真思考应当如何吸收这些反馈。 + +因为开源是一个大型的合作项目,社区在支持开源项目成为可能的万里挑一的项目上享有主动权。并非所有的问题都要解决,但只要你有在倾听社区的呼声,社区就会有参与感。 + +参与到社区中也存在一些隐患。社区内部、项目维护与社区之间均可能存在不同意见,尤其是在涉及管理问题上。管理问题对于一个开源项目来说是相当重要的。这也就是为什么拥有一份清晰的文档化的管理条例对于项目以及社区均是如此重要。 + +社区管理是一个关键的而又难啃的骨头。社区授权本身需要相当大的信任。对于一个拥有成千上万行代码的项目,在社区中寻找能够有效领导社区的人物是不容易的。不过开源项目经常是由更小的子项目组成的,这些子项目最好由社区中的某个人进行管理。这有助于社区更紧密地参与到项目中。 + +| - | +| :- | +| 建立社区的过程不是一帆风顺的。让我列举一一些有助于维持社区与我的团队之间平衡的技巧。 + +**声明你的原则:**尤其是在开源项目的早期,在项目代码仍在完善,很多事情还不完美的时候,项目之外的人员很难真正理解你所做的决定。向他们说明你做出决定所依据的原则有助于你在思考过程上保持坦率,从而让社区不会错误地干扰你的事务。 + +这一经验非常有效,在你做出决定时坚持遵循其中一项原则并展示出来是非常重要的。 + +*确定如何进行协作:*你可以通过Discord、Slack或者邮件等途径完成这一工作。但是如果你试图同时使用他们,你将毫不意外的分散项目社区。社区人员将在所有这些途径上互相交流。选择一到两种沟通工具,投身于他们来保证社区的信息同步。 + +*珍惜反馈意见:*倾听来自社区的反馈并付诸行动。即使需要你作出艰难的决定,你也应当向社区展示你是重视社区话语的。 + +**维护一套行为准则:**如果你与社区打交道,你需要定义什么行为是可以接受的。一套落地的行为准则有助于在人们越过红线时警示他们。如果你可以提前制定这些你可以避免很多麻烦。 + +*考虑如何分发你的项目:*存在这样的情况,因为你还没有准备好某一个组件,或者是因为存在一些项目功能你不希望所有人都能够访问,所以你可能并不希望将你的项目完全向公众公开。关键是制定符合你的要求而不是向用户妥协的分发条款,如此,需要某种功能的用户可以获取所需项目的同时不需要该功能的用户也不需要做出妥协而开始使用该项目。 + +*尽可能地避免投票:*这是因为部分成员经常会赞成与大部分成员的意见相左的选项,这会使这些人产生一定程度的失望,并让他们觉得被项目所孤立。反之,尽量尝试询问他们想要解决什么问题,并尝试创造一个不需要付出代价的解决方案。 + +### 开源是许可 + +开源是给予你的用户如何使用你的软件的自由,而许可能够做到这一点。一个开源项目许可是极好的,它保证了不论你作为维护者做了什么,你的所有终端用户以及利益相关方总是可以维护一系列的项目复刻版本,这些都是重要的项目复刻版。 + +许可提供了人们可选择性,如果他们认为有必要,他们可以将项目复制到不同的路径中。他们拥有创建副本的权利,这使得许多优秀的软件能够被开发出来。维护者有责任倾听他们的社区成员的声音并以一个对项目的社区成员有利的方式运营项目。 + +我们推荐使用现有的许多可用的许可证而不是独立制作你自己的许可条款,仅仅只是因为用户以及利益相关方通常都很熟悉公共许可证,因此你不需要再花费时间在解释许可条款上。这将帮助你将你的精力集中在项目的其他部分上。 + +### 最后,开源是一项运动 + +开源包括了很多维度,也包含了很多人员。最重要的是,它是有关理解人们想要什么的,也是有关创建一个鼓励协作与透明的环境的。开源也是有关创建有利于开源项目走自己想走的道路的社区的。维护者创造越多的机会让社区自由发挥,开源产品就越好,也越发成功。 + +开源是以上这些方面,而你的视野越宽阔,你就能越好的利用它。请考虑你如何能够在开源的每一个维度上出类拔萃,因为时至今日,开源的成功之路并无捷径。 + + +via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ + +作者:[Jules Graybill][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jules-graybill/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg From e756147b965ac563d10e166917afbf3acc2d7501 Mon Sep 17 00:00:00 2001 From: CanYellow Date: Wed, 5 Apr 2023 23:21:56 +0800 Subject: [PATCH 266/318] 10th trans (#29038) * D * W2 * h0227 * tr1 * finished * Delete 20220726 Open Source Software- Is There an Easy Path to Success-.md * Add files via upload --- ...ware- Is There an Easy Path to Success-.md | 100 ------------------ ...ware- Is There an Easy Path to Success-.md | 93 ++++++++++++++++ 2 files changed, 93 insertions(+), 100 deletions(-) delete mode 100644 sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md create mode 100644 translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md diff --git a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md deleted file mode 100644 index 7f9aea7ab5..0000000000 --- a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: subject: "Open Source Software: Is There an Easy Path to Success?" -[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" -[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" -[#]: collector: "lkxed" -[#]: translator: "CanYellow" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open Source Software: Is There an Easy Path to Success? -====== -There’s so much that goes on behind the scenes while developing open source software. So how does one make an open source project successful? Is there a shortcut? This article indicates there isn’t one. - -![team work working together][1] - -Open source has become all the rage now. Many entrepreneurs are drawn to it by the allure of quick success. But the truth is, there is no easy path to such success. There is no one thing that you can do to get all of open source right. - -In fact, a lot of the challenges that companies face early on are not technology challenges, but are people and cultural challenges. - -There are many layers of open source that need to be worked on to build a project that can become a hit in the market. And maintaining that success is an ongoing process. But at the crux of it all lies finding the right answer to a very basic question: what exactly is open source? - -### Open source is the code - -For many new users who may not be fully aware of the layers that make open source, the answer is fairly simple: open source is software! And that is not wrong, of course, since that is how most of us are using it. But there’s just so much more to open source than merely being touted as software. - -The essence of any open source project still remains the code. It is what makes the project special and useful for the user. When you’re working in open source, the code is just as much a part of the product as the software. - -Developing a project from the ground up, or even creating a fork of an existing project, requires thousands and thousands of lines of code to be written, even while handling such a large and complex codebase. Especially in the case of creating a fork, care must be taken to remove any prior licences, marketing material, or anything that might not be useful for the user anymore. After all, it is the features of a project that attract its user base and what retains it. When end users are deciding whether to use open source software, they will read the source code, and what they see there should be something that builds their confidence. - -### Open source is the community - -How you engage with the community is also a part of the task of building a product. Building a community and maintaining a healthy relationship with it is one of the most crucial aspects of open source, but is also often the hardest for most leaders as there is very little one can do to control it. One can try to lay the foundation and can be supportive but, ultimately, it’s the people who decide whether they want to join a community. - -It is important to maintain a level of transparency with the community and keep it in the loop. The community can get involved at any step that it wants to. It’s really important that you show most of your work to the community while you are doing it, apart from things that need to be done confidentially, like setting up security, signing certificates, branding, and so on. This helps in winning its trust because, in the end, it is the community that you are liable to, and it can make or break your project. This may make the project work a lot more deliberate, slower and exposed, but it works well in the end. - -Making your work-in-progress so open can seem daunting, especially when you are worried about the repercussions of a delay in updates or having a bug. Yet, making the community members privy to your moves will not only help you build a trustful relationship with them, but also make them feel appreciated. - -However, making your workflow public will also invite scrutiny from the community members, who will often have their opinions and offer you their feedback. Taking note of this feedback is important, because that is how you can make your open source project truly for them. They are the end users and their feedback will reflect how they see your project panning out for them in the long run, and ultimately, how successful and mainstream your software becomes. - -As an example, when we are thinking about a new feature, we publish a request for comments at RFC. We get a lot of feedback, and we have to think hard about how we can incorporate it. - -Since open source is a largely collaborative work, there will be initiatives by the community to offer their support in making the project the best version possible. Not all of it will work out. But as long you are listening, the community will feel involved. - -Engaging with the community has its pitfalls too. There may be differences of opinion within the community, and also between the maintainer and the community, especially when it comes to the matter of governance. Governance is something which is really important for an open source project to have. That is why it is important to have clear documented governance practices, which also include the community. - -Community governance is a tough, but essential, nut to crack. Delegation in itself requires a lot of trust. For a project with millions of lines of code, it can be cumbersome to find someone in the community who can meaningfully lead it. But open source projects often consist of smaller sub-projects, which are better left handled by someone from the community. This helps the community to be more closely involved too. - -| - | -| :- | -| Building a community always has its highs and lows. Let me list some of the tricks that helped maintain a healthy balance between the community’s and my team’s vision. -State your principle: Especially in the early stage of the open source project when the source code is still coming together and things are not exactly going perfectly, it is hard for somebody coming from outside to really understand why you are making the decisions that you are making. Communicating the principles on which you take actions helps you to be upfront about your thought process so that the community does not interpret things incorrectly. -This practice is really helpful. It is also important to follow through and show that when you make a decision, it is guided by one of these principles. -Decide how you are going to collaborate: This may be through channels like Discord, Slack, or simply emails. But if you try to use all of them, you will immediately diffuse the community. People will be communicating with each other all over the place. Choose one or two collaboration tools, and really invest in them for synchronised communication. -Treasure the feedback: Listen to feedback from the community and act on it. Show tat you care about what the community says, even if it requires you to make tough decisions. -Maintain a code of conduct: If you interact with a community, you need to define what is going to be acceptable conduct. Having that in place helps warn people in case they go out of line. You can avoid a lot of trouble if you can just define this early on. -Think about how you will distribute your project: There may be instances when you may not be willing to make your project available to the public because you do not have a certain component in place, or you have features you may not want to make accessible to everyone. Creating distribution terms that suit your preference without compromising on what the user wants is key, so that people who want certain features can access these while those who can do without them also have the option to start using the project without having to compromise. -Avoid polls as much as you can: This is because, often, certain members vote for an option that may not be what the majority goes with. This can create a sense of failure in these members and make them feel excluded from the project. Instead, try asking them what problems they would like to be solved, and then try to invent a solution that does not involve trade-offs. | - -**State your principle:** Especially in the early stage of the open source project when the source code is still coming together and things are not exactly going perfectly, it is hard for somebody coming from outside to really understand why you are making the decisions that you are making. Communicating the principles on which you take actions helps you to be upfront about your thought process so that the community does not interpret things incorrectly. - -This practice is really helpful. It is also important to follow through and show that when you make a decision, it is guided by one of these principles. - -*Decide how you are going to collaborate:* This may be through channels like Discord, Slack, or simply emails. But if you try to use all of them, you will immediately diffuse the community. People will be communicating with each other all over the place. Choose one or two collaboration tools, and really invest in them for synchronised communication. - -*Treasure the feedback:* Listen to feedback from the community and act on it. Show tat you care about what the community says, even if it requires you to make tough decisions. - -**Maintain a code of conduct:** If you interact with a community, you need to define what is going to be acceptable conduct. Having that in place helps warn people in case they go out of line. You can avoid a lot of trouble if you can just define this early on. - -*Think about how you will distribute your project:* There may be instances when you may not be willing to make your project available to the public because you do not have a certain component in place, or you have features you may not want to make accessible to everyone. Creating distribution terms that suit your preference without compromising on what the user wants is key, so that people who want certain features can access these while those who can do without them also have the option to start using the project without having to compromise. - -*Avoid polls as much as you can:* This is because, often, certain members vote for an option that may not be what the majority goes with. This can create a sense of failure in these members and make them feel excluded from the project. Instead, try asking them what problems they would like to be solved, and then try to invent a solution that does not involve trade-offs. - -### Open source is licensing - -Open source is about giving your users autonomy over how they want to use your software, and licensing provides just that. What’s great about an open source licence is that regardless of what you as a maintainer do, all your end users and stakeholders can always maintain a certain set of forks, which are important forks. - -Licensing gives people the option to take the project into a different direction if they deem it fit. They have the right to create a fork, which results in a lot of amazing software being developed. Maintainers have more responsibility to listen to their community members and to run the project in a way that works for them. - -It’s advisable to make use of the many licences available instead of setting your own terms separately, simply because stakeholders and users are usually familiar with commonly used licences, so you do not have to waste time explaining them. This also helps you to focus your energy on the other parts of the project. - -### Finally, open source is a movement - -Open source involves many, many dimensions and people. Most importantly, it is about understanding what these people want and creating an environment that encourages collaboration and transparency. It is about building communities that help to build the open source project the way they want it to be. The more opportunity maintainers create to let them do that, the better the product is and the more successful it gets. - -Open source is all of these things and the more expansive view you take, the better you can leverage it. Think about how you can excel in every dimension of open source because, at the end of the day, there is no easy path to open source success. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ - -作者:[Jules Graybill][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/jules-graybill/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg diff --git a/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md new file mode 100644 index 0000000000..ea35405d69 --- /dev/null +++ b/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md @@ -0,0 +1,93 @@ +[#]: subject: "Open Source Software: Is There an Easy Path to Success?" +[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" +[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +开源软件:存在成功的捷径吗? +====== + +开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 + +![团队合作][1] + +今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 + +事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 + +开发一个能够在市场上获得成功的开源项目需要同不同层级(的开源社区人员)一同工作。维护这样的项目也是一个持续的过程。所有这一切的关键在于找到以下这个非常基础的问题的正确答案:开源究竟是什么。 + +### 开源是代码 + +对于很多没有深刻认识到构成开源的不同层级(的开源社区人员)用户而言,答案相当简单:开源就是软件!这当然没有错,毕竟这就是我们多数人如何使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 + +任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目并使其对用户有益的根本。当你在开源中工作的时候,代码和软件一样都是产品自身的一部分。 + +从零开始开发一个(开源)项目或者复刻(fork)一个现有项目的分支,即便是在处理如此庞大而复杂的代码库时,也需要编写成千上万行代码。尤其是在创新一个现有项目的分支的情况下,在移除任何在先的许可证、宣传材料或者其他任何可能已经失去作用的文件时必须小心翼翼。终究是一个项目的功能吸引了它的用户群并维持项目的持续发展。当终端用户在考虑是否使用开源软件的时候,他们会阅读项目的源代码,而他们在其中所看到的应当是那些能够建立他们的信心的内容。 + +### 开源是社区 + +如何参与到社区中也是产品构建项目的一部分。创建一个社区并维护一个健康的社区关系是开源的核心之一,但对于大部分的领导者而言也往往是最坚难的任务,很少有人能很好地维护它。你可以尝试建立基金会或者提供赞助,但是最终还是人们自行决定是否想要加入社区。 + +维护一定程度的社区透明度并不断保持也是重要的。社区可以随心所欲地参与项目。除了需要秘密进行的工作之外,诸如安全设置、签发证书、注册商标等,尽可能多的将你所做的工作展示给社区是相当重要的,这有助于取得社区信任。你终究需要对社区负责,你的项目成也社区,败也社区。这可能会导致你的项目开发更谨慎、更缓慢并且向社区公开,不过项目最终会进展顺利。 + +如此地公开你正在进行的工作似乎有些令人生怯,尤其是当你担心更新推迟或者是出现漏洞的影响的时候。不过,让社区成员知悉你的进展不仅有助帮助你建立与社区之间的信任关系,而且能够让社区成员感到被认可。 + +另一方面,公开你的工作流也可以获得来自社区成员的监督,他们经常有自己的见解并向你反馈。记录这些反馈是很重要的,这使得你的开源项目如实地反映社区需求。他们是项目的末端用户,而他们的反馈则反映了他们如何看待你的项目的长期发展以及你的项目最终将有多么成功或者主流。 + +举例而言,当我们在考虑一个新功能的时候,我们在征求意见文档(RFC, Request for Comments)中发布一个征集意见的请求,我们会收到大量的反馈,我们必须认真思考应当如何吸收这些反馈。 + +因为开源是一个大型的合作项目,社区在支持开源项目成为可能的万里挑一的项目上享有主动权。并非所有的问题都要解决,但只要你有在倾听社区的呼声,社区就会有参与感。 + +参与到社区中也存在一些隐患。社区内部、项目维护与社区之间均可能存在不同意见,尤其是在涉及管理问题上。管理问题对于一个开源项目来说是相当重要的。这也就是为什么拥有一份清晰的文档化的管理条例对于项目以及社区均是如此重要。 + +社区管理是一个关键的而又难啃的骨头。社区授权本身需要相当大的信任。对于一个拥有成千上万行代码的项目,在社区中寻找能够有效领导社区的人物是不容易的。不过开源项目经常是由更小的子项目组成的,这些子项目最好由社区中的某个人进行管理。这有助于社区更紧密地参与到项目中。 + +| - | +| :- | +| 建立社区的过程不是一帆风顺的。让我列举一一些有助于维持社区与我的团队之间平衡的技巧。 + +**声明你的原则:**尤其是在开源项目的早期,在项目代码仍在完善,很多事情还不完美的时候,项目之外的人员很难真正理解你所做的决定。向他们说明你做出决定所依据的原则有助于你在思考过程上保持坦率,从而让社区不会错误地干扰你的事务。 + +这一经验非常有效,在你做出决定时坚持遵循其中一项原则并展示出来是非常重要的。 + +*确定如何进行协作:*你可以通过Discord、Slack或者邮件等途径完成这一工作。但是如果你试图同时使用他们,你将毫不意外的分散项目社区。社区人员将在所有这些途径上互相交流。选择一到两种沟通工具,投身于他们来保证社区的信息同步。 + +*珍惜反馈意见:*倾听来自社区的反馈并付诸行动。即使需要你作出艰难的决定,你也应当向社区展示你是重视社区话语的。 + +**维护一套行为准则:**如果你与社区打交道,你需要定义什么行为是可以接受的。一套落地的行为准则有助于在人们越过红线时警示他们。如果你可以提前制定这些你可以避免很多麻烦。 + +*考虑如何分发你的项目:*存在这样的情况,因为你还没有准备好某一个组件,或者是因为存在一些项目功能你不希望所有人都能够访问,所以你可能并不希望将你的项目完全向公众公开。关键是制定符合你的要求而不是向用户妥协的分发条款,如此,需要某种功能的用户可以获取所需项目的同时不需要该功能的用户也不需要做出妥协而开始使用该项目。 + +*尽可能地避免投票:*这是因为部分成员经常会赞成与大部分成员的意见相左的选项,这会使这些人产生一定程度的失望,并让他们觉得被项目所孤立。反之,尽量尝试询问他们想要解决什么问题,并尝试创造一个不需要付出代价的解决方案。 + +### 开源是许可 + +开源是给予你的用户如何使用你的软件的自由,而许可能够做到这一点。一个开源项目许可是极好的,它保证了不论你作为维护者做了什么,你的所有终端用户以及利益相关方总是可以维护一系列的项目复刻版本,这些都是重要的项目复刻版。 + +许可提供了人们可选择性,如果他们认为有必要,他们可以将项目复制到不同的路径中。他们拥有创建副本的权利,这使得许多优秀的软件能够被开发出来。维护者有责任倾听他们的社区成员的声音并以一个对项目的社区成员有利的方式运营项目。 + +我们推荐使用现有的许多可用的许可证而不是独立制作你自己的许可条款,仅仅只是因为用户以及利益相关方通常都很熟悉公共许可证,因此你不需要再花费时间在解释许可条款上。这将帮助你将你的精力集中在项目的其他部分上。 + +### 最后,开源是一项运动 + +开源包括了很多维度,也包含了很多人员。最重要的是,它是有关理解人们想要什么的,也是有关创建一个鼓励协作与透明的环境的。开源也是有关创建有利于开源项目走自己想走的道路的社区的。维护者创造越多的机会让社区自由发挥,开源产品就越好,也越发成功。 + +开源是以上这些方面,而你的视野越宽阔,你就能越好的利用它。请考虑你如何能够在开源的每一个维度上出类拔萃,因为时至今日,开源的成功之路并无捷径。 + + +via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ + +作者:[Jules Graybill][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jules-graybill/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg From e249ed4e17f83a91e3fb05c2dc086ea40e1c5b99 Mon Sep 17 00:00:00 2001 From: CanYellow Date: Wed, 5 Apr 2023 23:28:22 +0800 Subject: [PATCH 267/318] request --- .../talk/20210816 What was your first programming language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20210816 What was your first programming language.md b/sources/talk/20210816 What was your first programming language.md index 7e13d19ddb..bdaae66126 100644 --- a/sources/talk/20210816 What was your first programming language.md +++ b/sources/talk/20210816 What was your first programming language.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/8/first-programming-language" [#]: author: "Jen Wike Huger https://opensource.com/users/jen-wike" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "CanYellow [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 299e55842146183ed8cc9e6ee7934f04109e2059 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 6 Apr 2023 00:10:25 +0800 Subject: [PATCH 268/318] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XiaotingHuang22 https://linux.cn/article-15696-1.html 辛苦了! --- ...sential tips and tricks for your first tech job.md | 149 +++++++++++++++++ ...sential tips and tricks for your first tech job.md | 151 ------------------ 2 files changed, 149 insertions(+), 151 deletions(-) create mode 100644 published/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md delete mode 100644 translated/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md diff --git a/published/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md b/published/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md new file mode 100644 index 0000000000..eaa466df51 --- /dev/null +++ b/published/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md @@ -0,0 +1,149 @@ +[#]: subject: "Essential tips and tricks for your first tech job" +[#]: via: "https://opensource.com/article/23/2/your-first-tech-job" +[#]: author: "Fatima https://opensource.com/users/ftaj" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15696-1.html" + +技术领域小白必不可少的工作技巧和诀窍 +====== + +> 开始一份新工作对任何人来说都让人害怕。下面是如何在你的第一份技术工作的早期阶段找到方向。 + +刚刚入职那几天确实令人害怕。 我现在依然可以清晰举出很多例子,例如在第一天上班前的晚上无法入睡,因为不知道第二天将要发生什么而内心崩溃。对于大多数人来说,开始一份新工作就像踏入未知领域。即使你已是行业的资深人士,不可否认的是,你内心可能还是会对即将发生的事情感到有点害怕。 + +可以理解的是,刚入职的时候你的事情很多。你要认识新的人,有新的项目和技术要了解,有文档要阅读,有教程要看完,还有没完没了的人事培训和要填的文件。这可能让你感觉压力山大,再加上你还面临着相当大程度的不确定性和未知数,以上种种能引起焦虑。 + +促使我写这篇文章有两个原因,首先是在我还是学生的时候,大部分讨论都围绕着如何找一份技术工作,却没有人谈论接下来发生的事情。如何在新角色中脱颖而出?现在回过头来看,我想我当时认为最困难的事情是得到一份工作,之后发生什么的一切我都可以自己弄清楚。 + +同样的,在我开始在这个行业工作之后,我发现大部分我看到的与职业相关的内容都是讨论如何从一个高级职位升到另一个高级职位。没有人真正谈论在此中间我们要做什么。实习生和初级工程师呢?他们在早期职业生涯中如何找到方向? + +在拥有了三年全职软件工程师的经验(以及之前的几次实习)之后,我将这段时间的经历进行了复盘,并整理出一份我自己在适应新技术职位时使用过的技巧和诀窍清单。我想不只局限于前面的几个月,而是优先考虑如何让这段经历帮助你实现长期的成功。 + +### 反思现有的流程和文档 + +大多数新员工一开始要么拥有一大堆文档,要么根本没有。你可以将这视为一个机会,而不是被这两种可能性中的任何一种所淹没。 + +从现有文档中找到缺口,并想想你可以怎样为下一位入职的工程师做出这方面的改进。这不仅能显示你工作的主动性,还表明你致力于改进团队中的现有流程。 + +上述两种极端情况我都遇到过。我在没有任何文档的团队中工作过,也在一些更新文档方面很勤快的团队中工作过。对于前者,你的路径非常简单直接,你可以致力于创建那些缺失的文档。对于后者,你总是可以想办法改进已有的东西。有时,过多的书面文件也会让人感到害怕,尤其是对新员工而言。有些事情可能通过其他媒介进行更好地解释,比如视频教程或截屏。 + +### 勤问问题 + +我会建议你在开始一份新工作时研究一下公司是否会为你分配搭档。这在公司中是相当普遍的做法。工作搭档的主要作用是在你入职时为你提供帮助。我发现这非常有用,因为这个人能够针对你所有的问题给出指导,你就不必为了寻找合适的人或部门而四处奔波。 + +虽然我鼓励提问,但在提问之前也有必要做功课,包括: + +- 做好调查。这包括进行网络搜索、查看论坛和阅读现有文档。使用所有可用的工具。然而,给自己设定时间规划是很重要的。你必须平衡好尽职调查与牢记手头项目截止日期和可交付成果。 +- 说出来。作为母语不是英语的人,我建议你在提问之前大声把想法说出来。根据我的经验,我经常发现自己会用一种语言(通常是我的母语)思考但不得不用另一种语言来解释,而当我在一些困难的问题中挣扎时这一现象尤为突出。有时这颇有挑战性,因为经过翻译后的想法可能没那么容易理解。 +- 组织思绪。当你在为某件事而苦苦挣扎时,可能同时有很多不同的想法在你的脑海中翻来覆去。这些想法可能对你来说都挺有道理的,但对于别人来说却不一定说得通。对此,我建议你坐下来,收集你的想法,写下来,然后大声说出来。这一做法可确保当你在解释自己的思维过程时,你能按照预期进行流畅地表达出来,听众也可以紧跟你的思路。 + +这种方法称为橡皮鸭调试法,是开发人员在调试时的常见做法。背后的概念是,有时向第三方解释你的问题非常有助于你找到解决方案,同时也证明了你出色的沟通技巧。 + +尊重别人的时间。即使你在向你的搭档求助时,也要意识到他们也有自己的日常任务要完成。 我尝试过的一些事情包括: + +- 写下我的问题,然后留出一些时间与我的导师交流,以便与他们交谈。 +- 整理问题而不是反复寻求帮助,这样导师可以在他们有空的时候着手解决。 +- 安排 15-20 分钟的快速视频聊天,特别是如果你想共享屏幕,这一方法可以很好地展示你的发现。 + +我认为这些方法是更好的选择,因为这么做你能得到对方全部的关注,而不是在他们忙着其他事情的时候每隔几分钟打扰他们一下。 + +### 深入研究你的项目 + +即使在拥有出色文档的团队中,开始你的技术项目也可能非常艰巨,因为一个项目涉及多个部分。不过,随着时间的推移,你将了解团队是如何做事的。但是,通过记下一张实用清单,这包括基本项目设置、测试要求、审查和部署流程、任务跟踪和文档,你将迅速搞清楚一切,节省了你的时间和潜在的麻烦。 + +如果你开始的项目没有文档(我就遇到过这种情况),请看看你能不能找到当前或以前的项目所有者并了解基本的项目结构,这包括设置、部署等。 + +- 确定你的团队在 IDE(集成开发环境)中的偏好。你可以自由使用你喜欢的 IDE,但使用和团队相同的 IDE 会比较好,尤其是在调试的时候,因为 IDE 的选择会影响调试。不同的 IDE 提供不同程度的调试支持。 +- 了解如何进行调试。我的意思不仅仅是使用打印语句(不是说这种方法有什么问题)。充分利用团队的经验! +- 了解测试要求。这可能取决于项目的范围和团队的一般惯例,越早弄清楚要求,你在后期推送自己的修改请求时就会越有信心。 +- 可视化部署过程。这个过程可能因团队、公司等而异。无论这个过程是非正式或正式,请确保你了解自己提交的新代码是如何被部署至新环境中、部署流水线是什么样的、如何安全地部署代码更改、在构建失败后可以怎么做,如何回滚错误的更改,以及如何在生产环境中测试你的更改。 +- 了解工单流程。了解如何记录工单以及要求的详细程度。你会由此发现每个公司各不相同。有的公司希望我们每天提交工单以显示我们的进度。有的公司可能不需要如此详细。 + +基于我刚才提到的所有内容,我建议你可以在入职头几周内做一个有益的、一体化的练习——跟随模仿另一位工程师并进行结对编码。这么做让你可以端到端地观察整个流程,从派单给工程师到部署到生产中都清清楚楚。 + +如果刚入职几周时你还没有机会亲身实践,可能你会感到沮丧。为了解决这个问题,你可以让你的经理也给你派一些初级的单子。这些通常是一些小任务,例如代码清理或添加单元测试。不过,它们允许你修补代码库,这有助于提高你的理解并给你带来成就感,这在新工作的初期是非常鼓舞人心的。 + +### 当你遇到困难时尤其要大声说出来 + +我想强调一下当你碰到困难时沟通的重要性。遇到困难总是难免的,尤其是在一份新工作的最初几个月,尽管这可能会令人沮丧,但这正是你的沟通技巧大放异彩的地方。 + +- 让工作中的阻碍和进步透明化。即使是像权限问题一样的小事(新员工常常遇到的障碍之一),也要确保你的经理知道。 +- 如果有些工作耽搁了,不要等到最后一天才向团队报告。你的项目延迟会推动许多其他事情的发展。对于一些必要的项目延迟请提前告知,以便你的经理可以与相关人员分享这一信息。 +- 不要因为匆忙而忘记全面测试代码的更改或为你的代码的写文档等事情。 + +### 获得技术大局观 + +获得技术大局观是我个人一直在努力改进的地方,并且我一直在积极改变自己对此的看法。 + +当年我开始实习时,我会非常专注于自己想学的东西。我会非常专注于我的项目,但对其他一切完全视而不见。多年后,我意识到对其他或相邻的项目视而不见可能不是最明智的。 + +首先,技术大局观会影响你对自身工作的理解。我曾经天真地以为,只要我专注于自己的项目就可以成为一名优秀的工程师。但事情并非如此。你应该花时间了解其他可能与你的项目有所交互的服务。你无需深入了解细节,但建立基本的理解也会大有帮助。 + +新员工的一个普遍经历是与公司其他人脱节,会有这种感觉很正常,尤其是在大公司。我是一个很快就会产生排斥感的人,所以当我刚到 Yelp 时 —— 这是一家比我以前的公司大得多的公司,项目规模也大得多,我优先考虑了解大局。我不仅努力建立对我的项目的理解,还认真了解了其他相邻项目。 + +在 Yelp 的头几周,我与团队中的其他各位工程师坐下来,请他们给我一个关于我将要做什么和项目的总体目标的概况。这种方法非常有用,因为我不仅根据工程师的资历和他们在项目上的工作时间得到了不同程度的解释,而且还加深了我对我将要从事的工作的理解。我参加这些会议的目的,是希望我对项目掌握的认识让我能够向街上的陌生人解释我所做的事。为此,我还请我的技术主管向我解释,当用户打开 Yelp 应用程序并搜索内容时,我的工作成果会在什么时候出现。 + +在这种情况下架构图也很有用,尤其是它能帮助你了解不同服务是如何交互的。 + +### 建立期望 + +在过去很长一段时间里,我以为自己只需要尽力而为,成为一名优秀的员工就行。只要我有在工作,达成目标,而且没有人投诉,那就足够好了,对吧?错! + +你必须对你的职业有战略眼光。你不能只是将它外包给人们的一片好心,并希望自己只要达成了目标就能得到想要的结果。 + +- 在你开始新工作的那一刻就建立明确的标准。这因公司而异,因为有些组织有非常明确的措施,而其他组织可能几乎没有。如果是后者,我建议你在头几周内找你的经理坐下来谈谈,制定并统一一个标准。 +- 确保你彻底了解公司将如何评估你以及采用什么方法进行评估。 + +我记得在我的第一份全职工作中,我对自己的第一次评估谈话一头雾水。整个谈话非常含糊不清,而且我对自己的长处、短处甚至可以如何改进都一无所知。 + +起初,我很容易地将一切都归咎于我的经理,因为作为新员工的我认为这是他们的工作,而不是我的职责。但随着时间的推移,我意识到,就我的绩效评估而言,我不能只是袖手旁观。你不能只做好工作并期望它就足够了。你必须积极参与到这些对话中。你必须确保你的努力和贡献被注意到。为了确保你的工作得到认可,你可以做很多事情,从定期参与技术设计对话到设置团建活动。 + +与建立期望相联系的还有积极寻求反馈的重要性。不要等到每三、四个月进行一次正式的绩效评估时才知道自己的表现如何。积极与你的经理建立反馈循环。虽然这听起来很可怕,但尝试定期进行寻求反馈的谈话。 + +### 在分布式团队中找到方向 + +在过去两年中我们的工作场所在不断变化,如今在远程和分布式团队中工作已成为常态,不再罕见。我列出了一些技巧,帮助你在分布式团队中快速找到工作方向: + +- 建立核心时间并将其设置在你的日历上。核心时间是你的团队一致同意的几个小时,在这段时间里,大家都明白自己应该在线并能随时响应。这样做很方便,因为会议只会安排在这个时间段,让你在计划自己一天的工作时更轻松。 +- 注意人们的时区和午餐时间。 +- 在虚拟世界中,你需要付出更大的努力来维持社交互动,而小小的心意却可以大大有助于让工作环境更加友好。 + +其中包括: + +- 开始会议时,互相寒暄并询问人们周末/一天过得如何。这有助于打破僵局,让你能够与团队成员建立更私人的、超越工作的联系。 +- 建议定期举行非正式的虚拟聚会,与团队进行一些随意的闲聊。 + +### 维持工作生活间的平衡 + +在你职业生涯刚开始的时候,你很容易认为只要投入很多时间就能成功,特别是考虑到我们全天候待命的“忙碌文化”,以及认为建立生活工作的平衡是在职业生涯下阶段才需要考虑的想法。但这些想法与事实相去甚远,因为工作与生活的平衡不会神奇地发生在你身上。你需要积极和非常勤奋地去找到个人的平衡点。 + +没有工作与生活平衡的可怕之处在于它是慢慢蔓延到你身上的。刚开始是你下班后还在查看电子邮件,然后慢慢地,你开始周末也在工作,一直感到疲惫不堪。 + +我列出了一些提示,可以帮助你避免这种情况: + +- 关闭/暂停通知和电子邮件并将自己设置为离线。 +- 不要在周末工作。刚开始是你需要在这一个周末工作,但不知不觉间,你会发现自己大部分周末都在工作。不管是什么工作,它可以等到星期一。 +- 如果你是待命的工程师,请了解公司的相关政策。一些公司提供金钱补偿,而另一些公司可能会以休假代替。利用这个时间。不使用 PTO(带薪休假)和健康日等福利确实会缩短你的工作寿命。 + +### 总结 + +毫无疑问,开始一份新工作压力很大而且很困难。我希望这些方法和技巧会让你的头几个月变得更轻松,并为你在新职位上取得巨大成功做好准备。记住,勤沟通,确立职业目标,积极主动,有效地使用公司的工具。做到这些,我相信你会做得很好! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/your-first-tech-job + +作者:[Fatima][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ftaj +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/21/5/open-source-burnout +[0]: https://img.linux.net.cn/data/attachment/album/202304/06/000732j1ipb1whhhlwgpen.jpg \ No newline at end of file diff --git a/translated/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md b/translated/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md deleted file mode 100644 index 558384ded5..0000000000 --- a/translated/talk/20230227.1 ⭐️⭐️ Essential tips and tricks for your first tech job.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: subject: "Essential tips and tricks for your first tech job" -[#]: via: "https://opensource.com/article/23/2/your-first-tech-job" -[#]: author: "Fatima https://opensource.com/users/ftaj" -[#]: collector: "lkxed" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Essential tips and tricks for your first tech job 技术领域小白必不可少的工作技巧和诀窍 -====== - -刚刚入职那几天确实令人害怕。 我现在依然可以清晰举出很多例子,例如在第一天上班前的晚上无法入睡,因为不知道第二天将要发生什么而内心崩溃。 对于大多数人来说,开始一份新工作就像踏入未知领域。 即使你已是行业的资深人士,不可否认的是,你内心可能还是会对即将发生的事情感到有点害怕。 - -可以理解的是,刚入职的时候你的事情很多。 你要认识新的人,有新的项目和技术要了解,有文档要阅读,有教程要看完,还有没完没了的人事谈话和文件要填。 这可能让你感觉压力山大,再加上你还面临着相当大程度的不确定性和未知数,以上种种能引起焦虑。 - -促使我写这篇文章有两个原因, 首先是在我还是学生的时候,大部分讨论都围绕着如何找一份技术工作,却没有人谈论接下来发生的事情。 如何在新角色中脱颖而出? 现在回过头来看,我想我当时认为最困难的事情是得到一份工作,之后发生什么的一切我都可以自己弄清楚。 - -同样的,在我开始在这个行业工作之后,我发现大部分我看到的与职业相关的内容都是讨论如何从一个高级别升到另一个高级级别职称。 没有人真正谈论在此中间我们要做什么。 实习生和初级工程师呢? 他们在早期职业生涯中如何找到方向? - -在拥有了三年全职软件工程师的经验(以及之前的几次实习)之后,我将这段时间的经历进行了复盘并整理出一份我自己在适应新技术职位时使用过的技巧和诀窍表格。我想不只局限于前面的几个月,而是优先考虑如何让这段经历帮助你实现长期的成功。 - - -### 从现有的流程和文档着手学习 - -大多数新员工一开始要么拥有一大堆文档,要么根本没有。 你可以将这视为一个机会,而不是被这两种可能性中的任何一种所淹没。 - -从现有文档中找到缺口,并想想你可以怎样为下一位入职的工程师做出这方面的改进。 这不仅能显示你工作的主动性,还表明你致力于改进团队中的现有流程。 - -上述两种极端情况我都遇到过。我在没有任何文件的团队中工作过,也在一些更新文档方面很勤快的团队中工作过。 对于前者,你的路径非常简单直接,你可以致力于创建那些缺失的文档。 对于后者,您总是可以想办法改进已经存在的东西。 有时,过多的书面文件也会让人感到害怕,尤其是对新员工而言。 有些事情可能通过其他媒介进行更好地解释,比如视频教程或截屏视频。 - -### 勤问问题 - -我会建议你在开始一份新工作时研究一下公司是否会为你分配搭档。 这在公司中是相当普遍的做法。 工作搭档的主要作用是在你入职时为你提供帮助。 我发现这非常有用,因为这个人能够针对你所有的问题给出指导,你就不必为了寻找合适的人或部门而四处奔波。 - -虽然我鼓励提问,但在提问之前也有必要做功课,包括: - -- 做好调查。 这包括进行网络搜索、查看论坛和阅读现有文档。 使用所有可用的工具。 然而,给自己设定时间规划是很重要的。 你必须平衡好尽职调查与牢记手头项目截止日期和可交付成果。 -- 说出来。 作为母语不是英语的人,我建议你在提问之前大声把想法说出来。 根据我的经验,我经常发现自己会用一种语言(通常是我的母语)思考但不得不用另一种语言来解释,而当我在一些困难的问题中挣扎时这一现象尤为突出。有时这颇有挑战性,因为经过翻译后的想法可能没那么容易理解。 -- 组织思绪。 当你在为某件事而苦苦挣扎时,可能同时有很多不同的想法在你的脑海中翻来覆去。这些想法可能对你来说都挺有道理的,但对于别人来说却不一定说得通。对此,我建议你坐下来,收集你的想法,写下来,然后大声说出来。 这一做法可确保当你在解释自己的思维过程时,你能按照预期进行流畅地表达出来,听众也可以紧跟你的思路。 - - -这种方法称为橡皮鸭调试法,是开发人员在调试时的常见做法。 背后的概念是,有时向第三方解释你的问题非常有助于你找到解决方案,同时也证明了你出色的沟通技巧。 - -尊重别人的时间。 即使你在向你的搭档求助时,也要意识到他们也有自己的日常任务要完成。 我尝试过的一些事情包括: - - -- 写下我的问题,然后留出一些时间与我的导师交流,以便与他们交谈。 -- 整理问题而不是反复寻求帮助,这样导师可以在他们有空的时候着手解决。 -- 安排 15-20 分钟的快速视频聊天,特别是如果你想共享屏幕,这一方法可以很好地展示你的发现。 - -我认为这些方法是更好的选择,因为这么做你能得到对方全部的关注,而不是在他们忙着其他事情的时候每隔几分钟打扰他们一下。 - -### 深入研究你的项目 - -即使在拥有出色文档的团队中,开始你的技术项目也可能非常艰巨,因为一个项目涉及多个部分。 不过,随着时间的推移,你将了解团队是如何做事的。 但是,通过记下一张包括基本项目设置、测试要求、审查和部署流程、任务跟踪和文档的实用清单,你将迅速搞清楚一切,节省了你的时间和潜在的麻烦。 - -如果你开始的项目没有文档(我就遇到过这种情况),请看看你能不能找到当前或以前的项目所有者并了解基本的项目结构,这包括设置、部署等。 - -- 确定你的团队在 IDE(集成开发环境)中的偏好。 你可以自由使用你喜欢的 IDE,但使用和团队相同的 IDE 会比较好,尤其是在调试的时候,因为 IDE 的选择会影响调试。 不同的 IDE 提供不同程度的调试支持。 -- 了解如何进行调试,我的意思不仅仅是使用打印语句(不是说这种方法有什么问题)。 充分利用团队的经验! -- 了解测试要求。 这可能取决于项目的范围和团队的一般惯例,越早弄清楚要求,你在后期推送自己的修改请求时就会越有信心。 -- 可视化部署过程。 这个过程可能因团队、公司等而异。无论这个过程是非正式或正式,请确保你了解自己提交的新代码是如何被部署至新环境中、部署流水线是什么样的、如何安全地部署代码更改、在构建失败后可以怎么做,如何回滚错误的更改,以及如何在生产环境中测试你的更改。 -- 了解报修流程。 了解如何记录报修以及要求的详细程度。 你会由此发现每个公司各不相同。 有的公司希望我们每天提交报修单以显示我们的进度。 有的公司可能不需要如此详细的文档。 - -基于我刚才提到的所有内容,我建议你可以在入职头几周内做一个有益的、一体化的练习——跟随模仿另一位工程师并进行同行编码。 这么做让你可以端到端地观察整个流程,从派单给工程师到部署到生产中都清清楚楚。 - -如果刚入职几周时你还没有机会亲身实践,可能你会感到沮丧。 为了解决这个问题,你可以让你的经理也给你派一些单子。 这些通常是一些小任务,例如代码清理或添加单元测试。 不过,它们允许你修补代码库,这有助于提高你的理解并给你带来成就感,这在新工作的初期是非常鼓舞人心的。 - -### 当你遇到困难时尤其要大声说出来 - -我想强调一下当你碰到困难时沟通的重要性。 遇到困难总是难免的,尤其是在一份新工作的最初几个月,尽管这可能会令人沮丧,但这正是你的沟通技巧大放异彩的地方。 - -- 让工作中的阻碍和进步透明化。 即使是像权限问题一样微不足道(新员工常常遇到的障碍之一),也要确保你的经理知道。 -- 如果有些工作耽搁了,不要等到最后一天才向团队报告。 你的项目延迟会推动许多其他事情的发展。 对于一些必要的项目延迟请提前告知,以便你的经理可以与相关人员分享这一信息。 -- 不要因为匆忙而忘记全面测试代码的更改或记录你的代码等事情。 - -### 获得技术大局观 - -获得技术大局观是我个人一直在努力改进的地方,并且我一直在积极改变自己对此的看法。 - -当年我开始实习时,我会非常专注于自己想学的东西。 我会非常专注于我的项目,但对其他一切完全视而不见。 多年后,我意识到对其他或相邻的项目视而不见可能不是最明智的。 - -首先,技术大局观会影响你对自身工作的理解。 我曾经天真地以为,只要我专注于自己的项目就可以成为一名优秀的工程师。但事情并非如此。你应该花时间了解其他可能与你的项目有所交互的服务。 你无需深入了解细节,但建立基本的理解也会大有帮助。 - -新员工的一个普遍经历是与公司其他人脱节,会有这种感觉很正常,尤其是在大公司。 我是一个很快就会产生排斥感的人,所以当我刚到 Yelp 时 —— 这是一家比我以前的公司大得多的公司,项目规模也大得多,我优先考虑了解大局。 我不仅努力建立对我的项目的理解,还认真了解了其他相邻项目。 - -在 Yelp 的头几周,我与团队中的不同工程师坐下来,请他们给我一个关于我将要做什么和项目的总体目标的概况。 这种方法非常有用,因为我不仅根据工程师的资历和他们在项目上的工作时间得到了不同程度的解释,而且还加深了我对我将要从事的工作的理解。 我参加这些会议的目的,是希望我对项目掌握的认识让我能够向街上的陌生人解释我所做的事。为此,我还请我的技术主管向我解释,当用户打开 Yelp 应用程序并搜索内容时,我的工作成果会在什么时候出现。 - -在这种情况下架构图也很有用,尤其是它能帮助你了解不同服务是如何交互的。 - -### 建立期望 - -在过去很长一段时间里,我以为自己只需要尽力而为,成为一名优秀的员工。 只要我有在工作,达成目标,而且没有人投诉,那就足够好了,对吧? 错! - -你必须对你的职业有战略眼光。 你不能只是将它外包给人们的一片好心,并希望自己只要达成了目标就能得到想要的结果。 - -- 在你开始新工作的那一刻就建立明确的标准。 这因公司而异,因为有些组织有非常明确的措施,而其他组织可能几乎没有。 如果是后者,我建议你在头几周内找你的经理坐下来谈谈,制定并统一一个标准。 -- 确保你彻底了解公司将如何评估你以及采用什么方法进行评估。 - -我记得在我的第一份全职工作中,我对自己的第一次评估会议一头雾水。 整个谈话非常含糊不清,而且我对自己的长处、短处甚至可以如何改进都一无所知。 - -起初,我很容易地将一切都归咎于我的经理,因为作为新员工的我认为这是他们的工作,而不是我的职责。 但随着时间的推移,我意识到,就我的绩效评估而言,我不能只是退居二线。 你不能只做好工作并期望它就足够了。 你必须积极参与到这些对话中。 你必须确保你的努力和贡献被注意到。 为了确保你的工作得到认可,你可以做很多事情,从定期参与技术设计对话到设置团建活动。 - -建立期望也是积极寻求反馈,这一点也十分重要。不要等到每三四个月进行一次正式的绩效评估时才知道自己的表现如何。 积极与你的经理建立反馈循环。 虽然这听起来很可怕,但尝试定期进行寻求反馈的谈话。 - -### 在分布式团队中找到方向 - -在过去两年中我们的工作场所在不断变化,如今在远程和分布式团队中工作已成为常态,不再罕见。 我列出了一些技巧,帮助你在分布式团队中快速找到工作方向: - -- 开始会议时,互相寒暄并询问人们周末/一天过得如何。 这有助于打破僵局,让你能够与团队成员建立更私人的、超越工作的联系。 -- 建议定期举行非正式的虚拟聚会,与团队进行一些随意的闲聊。 - - -- 建立核心时间并将其设置在你的日历上。 核心时间是你的团队一致同意的几个小时,在这段时间里,大家都明白自己应该在线并能随时响应。 这样做很方便,因为会议只会安排在这个时间段,让你在计划自己一天的工作时更轻松。 -- 注意人们的时区和午餐时间。 -- 在虚拟世界中,您需要付出更大的努力来维持社交互动,而小小的心意却可以大大有助于让工作环境更加友好。 其中包括: - -### 维持工作生活间的平衡 - -在你职业生涯刚开始的时候,你很容易认为只要投入很多时间就能成功,特别是考虑到我们全天候待命的“忙碌文化”以及认为建立生活工作的平衡是在职业生涯下阶段才需要考虑的想法。但这些想法与事实相去甚远,因为工作与生活的平衡不会神奇地发生在你身上。 你需要积极和非常勤奋地去找到个人的平衡点。 - -没有工作与生活平衡的可怕之处在于它是慢慢蔓延到你身上的。 刚开始是你下班后还在查看电子邮件,然后慢慢地,你开始周末也在工作,一直感到疲惫不堪。 - -**[ 相关阅读 [我是如何识别并防止自己在开源项目中感到倦怠的][1] ]** - - -我列出了一些提示,可以帮助你避免这种情况: - -- 关闭/暂停通知和电子邮件并将自己设置为离线。 -- 不要在周末工作。 刚开始是你需要在这一个周末工作,但不知不觉间,你会发现自己大部分周末都在工作。 不管是什么工作,它可以等到星期一。 -- 如果你是随叫随到的工程师,请了解公司的相关政策。 一些公司提供金钱补偿,而另一些公司可能会以休假代替。 利用这个时间。 不使用 PTO(带薪休假)和健康日等福利确实会缩短你的工作寿命。 - -### 总结 - -毫无疑问,开始一份新工作压力很大而且很困难。 我希望这些方法和技巧会让你的头几个月变得更轻松,并为你在新职位上取得巨大成功做好准备。 记住,勤沟通,确立职业目标,积极主动,有效地使用公司的工具。 做到这些,我相信你会做得很好! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/2/your-first-tech-job - -作者:[Fatima][a] -选题:[lkxed][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ftaj -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/21/5/open-source-burnout From 3bae3161d7ca94da81e3d5a5d9c6519596c40efe Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 6 Apr 2023 09:01:53 +0800 Subject: [PATCH 269/318] translated --- ... ⭐️ Write a cute program with Emojicode.md | 192 ----------------- ... ⭐️ Write a cute program with Emojicode.md | 193 ++++++++++++++++++ 2 files changed, 193 insertions(+), 192 deletions(-) delete mode 100644 sources/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md create mode 100644 translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md diff --git a/sources/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md b/sources/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md deleted file mode 100644 index e5c9b8b7f6..0000000000 --- a/sources/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md +++ /dev/null @@ -1,192 +0,0 @@ -[#]: subject: "Write a cute program with Emojicode" -[#]: via: "https://opensource.com/article/23/4/emojicode" -[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Write a cute program with Emojicode -====== - -In this article, I'll cover the greatest coding language to learn how to make anything! It's called Emojicode. Created in 2014 by Theo Belaire, Emojicode is an open source programming language that uses emoji characters to represent its syntax. When working in Emojicode, emoji are used to create variables, functions, and control structures. Because it's a statically typed language, variable types must be declared before use, but it also supports object-oriented concepts like classes and inheritance. This language can be run on every OS, and it's a super fun way to code, especially if you're a non-native English speaker. This is helpful because pictographic representations can bring us all together and allow us to speak the same language in a way similar to math. - -### Prerequisites - -In this tutorial, I'm using a Debian-based OS. My tools may be different than what your OS may require. Here's what I'm using: - -- [Geany][1], an open source IDE for Linux. -- IBus, which allows you to pick emoji and place them in your editor. The interface I'm using is called **emoji picker**. -- Debian-based Linux. -- A C++ compiler. I'm using the `g++` compiler. -- [Emojicode][2] - -I'm using a Linux OS, but you can [read the docs][3] to learn about any special steps you might need to take to use it on another OS. - -### Intall Emojicode on Linux - -There are a couple ways to install Emojicode on your computer, but they have a cool [magic install page][4] that can tell you exactly what to do. Here's what I did: - -``` -$ wget https://github.com/emojicode/emojicode/releases/download/v1.0-beta.2/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz -O emojicode.tar.gz \ -&& tar -xzf emojicode.tar.gz && rm emojicode.tar.gz \ -&& cd Emojicode-1.0-beta.2-Linux-x86_64 && ./install.sh \ -&& cd .. && rm -r Emojicode-1.0-beta.2-Linux-x86_64 -``` - -This is the output of that command. - -![The emojicode installation procedure provides useful feedback along the way.][5] - -Now that you have everything installed, it's time to move on to some code! - -### How does this whole thing work? - -To start, all Emojicode file extensions end in filename.🍇 but because you can't do that in your average file name, it translates to `filename.emojic`. Here are the most important syntax elements: - -- Put 🏁 at the beginning of a line to indicate what blocks of code are meant to be executed -- Start a block of code with 🍇 -- End a block of code using 🍉 -- Want to print something? Just use 😀 🔤 `` 🔤 ❗ - -There's way more to it, so here are some practical examples. - -### Print a haiku - -First up, try printing a nice haiku for fun! I'll add a single comment in this example. See if you can identify it. - -``` -🏁🍇 -💭 This is a single line comment for fun -😀 🔤Emojicode is great,🔤 ❗ -😀 🔤Fun and expressive code,🔤 ❗ -😀 🔤no sadness, just joy.🔤 ❗ -🍉 -``` - -Now we need to save our code and run it through our compiler to make a nice executable file: - -``` -$ emojicodec haiku.emojic -$ ls -haiku haiku.emojic haiku.o -``` - -As you can see, the code has been compiled and generated two files, one of which is executable. Run the `haiku` file: - -``` -$ ./haiku -Emojicode is great, -Fun and expressive code, -no sadness, just joy. -``` - -### Math and variable manipulation - -Next up, you're going to do a couple of things at once: a little bit of math and the changing of the variable. Start by assigning a variable to 0: - -``` -0 ➡️ 🖍🆕x -``` - -You just created a new variable by using the crayon emoji, and the new emoji next to the variable name, while also assigning that variable to 0. - -Next, print a line that includes the variable using the magnets emoji: - -``` -😀 🔤The value is 🧲x🧲 🔤 ❗ -``` - -Next, change the variable using the plus sign and arrow emojis: - -``` -x ⬅️➕ 1 -``` - -Then print another line with the value. I continue this for a while and print the final value. Here's what I did: - -``` -🏁 🍇 - -💭Updating a variable using math -0 ➡️ 🖍🆕x -😀 🔤The value is 🧲x🧲 🔤 ❗ - -x ⬅️➕ 1 -😀 🔤The value is 🧲x🧲 🔤 ❗ - -x ⬅️➕ 15 -😀 🔤The value is 🧲x🧲 🔤 ❗ - -x ⬅️➖ 9 -😀 🔤The value is 🧲x🧲 🔤 ❗ - -x ⬅️➗ 2 -😀 🔤The final value is 🧲x🧲 🔤 ❗ -🍉 -``` - -Next, compile the code using `emojicodec`, and then use your executable code to see the outcome: - -``` -$ emojicodec math.emojic -$ ./math -The value is 0 -The value is 1 -The value is 16 -The value is 7 -The final value is 3 -``` - -As you can see, everything printed out as the variable was updated with the new math. You can take this even further with the many mathematic emojis available. Here are just a few more operators: - -``` -🚮 is your modulo -◀ Less than -▶ Greater than -◀🙌 less than or equal to -▶🙌 greater than or equal to -``` - -### Emojicode quirks - -While I was bouncing around the docs, I found some interesting quirks. One of those is that while grabbing input from a user, the skin tone of the ear matters due to some known compiler issue. - -The action for getting user input is this: - -``` -🆕🔡▶️👂🏼❗️ -``` - -The action for getting and assigning user input is this: - -``` -🆕🔡▶️👂🏼❗️ ➡️ inputText -``` - -I was attempting to get that to work but was having some issues with my compiler when I found that. You may also run into some small things here and there. If you do, be sure to create an [issue][6], so it has a chance of being fixed. - -### No tricks, just great code - -While I could go through so much more, I can assure you the docs behind this amazing code are very extensive. Even though I was inspired to write this article just for fun in time April Fool's Day, I have to admit this is one of the best languages ever made because it teaches you a lot about very real programming concepts. I earnestly suggest this as a fun way to teach some of your friends, kids, or maybe a classmate, who is interested in coding. Hopefully, you have a fun-filled April Fool's Day! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/4/emojicode - -作者:[Jessica Cherry][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/cherrybomb -[b]: https://github.com/lkxed/ -[1]: https://github.com/geany/geany -[2]: https://github.com/emojicode/emojicode -[3]: https://www.emojicode.org/docs/ -[4]: https://www.emojicode.org/docs/guides/ -[5]: https://opensource.com/sites/default/files/2023-03/emoji.webp -[6]: https://github.com/emojicode/emojicode/issues diff --git a/translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md b/translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md new file mode 100644 index 0000000000..2401ca883a --- /dev/null +++ b/translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md @@ -0,0 +1,193 @@ +[#]: subject: "Write a cute program with Emojicode" +[#]: via: "https://opensource.com/article/23/4/emojicode" +[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Emojicode 写一个可爱的程序 +====== + +在这篇文章中,我将介绍一个最好的编码语言,学习如何制作任何东西!它叫做 Emojicode。Emojicode 由 Theo Belaire 在 2014 年创建,是一种开源的编程语言,使用 emoji 字符来表示其语法。在 Emojicode 中工作时,emoji 被用来创建变量、函数和控制结构。因为它是一种静态类型的语言,变量类型必须在使用前声明,但它也支持类和继承等面向对象的概念。这种语言可以在每个操作系统上运行,它是一种超级有趣的编码方式,特别是当你是一个非英语母语的人时。这很有帮助,因为象形图表示法可以把我们大家聚集在一起,让我们以类似数学的方式说同样的语言。 + +### 先决条件 + +在本教程中,我使用的是基于 Debian 的操作系统。我的工具可能与你的操作系统的要求不同。以下是我所使用的工具: + +- [Geany][1],一个 Linux 下的开源 IDE。 +- IBus,它允许你挑选 emoji 并把它们放在你的编辑器中。我使用的界面被称为 **emoji picker**。 +- 基于 Debian 的 Linux。 +- 一个 C++ 编译器。我使用的是 `g++` 编译器。 +- [Emojicode][2] + +我使用的是 Linux 操作系统,但你可以[阅读文档][3]了解在其他操作系统上使用它时可能需要采取的任何特殊步骤。 + +### 在 Linux 上安装 Emojicode + +有几种方法可以在你的电脑上安装 Emojicode,但他们有一个很酷的[神奇的安装页面][4],可以告诉你具体该怎么做。下面是我的做法: + +``` +$ wget https://github.com/emojicode/emojicode/releases/download/v1.0-beta.2/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz -O emojicode.tar.gz \ +&& tar -xzf emojicode.tar.gz && rm emojicode.tar.gz \ +&& cd Emojicode-1.0-beta.2-Linux-x86_64 && ./install.sh \ +&& cd .. && rm -r Emojicode-1.0-beta.2-Linux-x86_64 +``` + +emojicode的安装过程提供了有用的反馈。 + +![The emojicode installation procedure provides useful feedback along the way.][5] + +现在,你已经安装好了,是时候开始编写代码了! + +### 整体是如何进行的? + +首先,所有 Emojicode 文件的扩展名都以文件名.🍇结尾,但因为你不能在一般的文件名中这样做,所以它被翻译成 `filename.emojic`。这里是最重要的语法元素: + +- 把 🏁 放在一行的开头,表示要执行哪些代码块 +- 用 🍇 开始一个代码块 +- 用 🍉 来结束一个代码块 +- 想打印什么吗?就用 😀 🔤 `` 🔤 ❗ + +还有很多其他的,所以这里有一些实际的例子。 + +### 打印一首俳句 + +首先,试着打印一首漂亮的俳句来玩玩吧! 在这个例子中,我将添加一行注释。看看你是否能识别它。 + +``` +🏁🍇 +💭 This is a single line comment for fun +😀 🔤Emojicode is great,🔤 ❗ +😀 🔤Fun and expressive code,🔤 ❗ +😀 🔤no sadness, just joy.🔤 ❗ +🍉 +``` + +现在我们需要保存我们的代码,并通过我们的编译器运行它,使之成为一个漂亮的可执行文件: + +``` +$ emojicodec haiku.emojic +$ ls +haiku haiku.emojic haiku.o +``` + +正如你所看到的,代码已经被编译并生成了两个文件,其中一个是可执行的。运行 `haiku` 文件: + + +``` +$ ./haiku +Emojicode is great, +Fun and expressive code, +no sadness, just joy. +``` + +### 数学和变量操作 + +接下来,你要同时做几件事:一点点数学和变量的改变。首先,将一个变量赋值为0: + +``` +0 ➡️ 🖍🆕x +``` + +你刚刚使用 crayon emoji 和变量名称旁边的新 emoij 创建了一个新变量,同时还将该变量赋值为 0。 + +接下来,用磁铁的 emoji 打印一行包括该变量的内容: + +``` +😀 🔤The value is 🧲x🧲 🔤 ❗ +``` + +接下来,使用加号和箭头 emoji 改变变量: + +``` +x ⬅️➕ 1 +``` + +然后打印另一行的值。我继续这样做了一会儿,然后打印出最终的数值。下面是我的做法: + +``` +🏁 🍇 + +💭Updating a variable using math +0 ➡️ 🖍🆕x +😀 🔤The value is 🧲x🧲 🔤 ❗ + +x ⬅️➕ 1 +😀 🔤The value is 🧲x🧲 🔤 ❗ + +x ⬅️➕ 15 +😀 🔤The value is 🧲x🧲 🔤 ❗ + +x ⬅️➖ 9 +😀 🔤The value is 🧲x🧲 🔤 ❗ + +x ⬅️➗ 2 +😀 🔤The final value is 🧲x🧲 🔤 ❗ +🍉 +``` + +接下来,用 `emojicodec` 编译代码,然后用你的可执行代码来看看结果: + +``` +$ emojicodec math.emojic +$ ./math +The value is 0 +The value is 1 +The value is 16 +The value is 7 +The final value is 3 +``` + +如你所见,作为变量打印出来的所有内容都已使用新数学进行了更新。你可以用许多数学 emoji 来进一步操作。下面是一些更多的运算符: + +``` +🚮 is your modulo +◀ Less than +▶ Greater than +◀🙌 less than or equal to +▶🙌 greater than or equal to +``` + +### Emojicode 的怪癖 + +当我在文档中来回查看时,我发现了一些有趣的怪癖。其中之一是,当从用户那里抓取输入时,由于一些已知的编译器问题,耳朵的肤色很重要。 + +获取用户输入的动作是这样的: + +``` +🆕🔡▶️👂🏼❗️ +``` + +获取和分配用户输入的操作是这样的: + +``` +🆕🔡▶️👂🏼❗️ ➡️ inputText +``` + +我试图让它工作,但当我发现它时我的编译器出现了一些问题。 你也可能会在这里和那里遇到一些小问题。 如果你遇到了,请创建一个[问题][6],这样它就有可能被修复。 + +### 没有技巧,只有很棒的代码 + +虽然我可以了解更多,但我可以向你保证,这段令人惊叹的代码背后的文档非常广泛。尽管我写这篇文章只是为了赶上愚人节的乐趣,但我不得不承认这是有史以来最好的语言之一,因为它教会了你很多非常真实的编程概念。我恳切地建议把它作为一种有趣的方式来教你的一些朋友、孩子,或者是对编码感兴趣的同学。 希望你度过了一个充满乐趣的愚人节! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/emojicode + +作者:[Jessica Cherry][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/cherrybomb +[b]: https://github.com/lkxed/ +[1]: https://github.com/geany/geany +[2]: https://github.com/emojicode/emojicode +[3]: https://www.emojicode.org/docs/ +[4]: https://www.emojicode.org/docs/guides/ +[5]: https://opensource.com/sites/default/files/2023-03/emoji.webp +[6]: https://github.com/emojicode/emojicode/issues From 7a7ca31830bddb65ef1da7ad00e0e4e663aef723 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 6 Apr 2023 09:06:10 +0800 Subject: [PATCH 270/318] translating --- sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md b/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md index 60957b8f29..ba8acd662e 100644 --- a/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md +++ b/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/3/measure-pi-raspberry-pi" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a725208bafb7c0da9441fdf6c6d3b70e09492625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 6 Apr 2023 10:26:48 +0800 Subject: [PATCH 271/318] Translating --- sources/tech/20210625 How to program in C on FreeDOS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210625 How to program in C on FreeDOS.md b/sources/tech/20210625 How to program in C on FreeDOS.md index 0a3f6ddeb1..c2214a7020 100644 --- a/sources/tech/20210625 How to program in C on FreeDOS.md +++ b/sources/tech/20210625 How to program in C on FreeDOS.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/6/program-c-freedos) [#]: author: (Jim Hall https://opensource.com/users/jim-hall) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 42db58f34101fc3ac9f4a2ffe76a9e899d76cf71 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 6 Apr 2023 11:07:26 +0800 Subject: [PATCH 272/318] ATRP @wxy https://linux.cn/article-15697-1.html --- ...OS Series 5 How to set up home-manager on NixOS.md | 276 +++++++++++++++++ ...OS Series 5 How to set up home-manager on NixOS.md | 285 ------------------ 2 files changed, 276 insertions(+), 285 deletions(-) create mode 100644 published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md delete mode 100644 sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md diff --git a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md new file mode 100644 index 0000000000..e345786a0a --- /dev/null +++ b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md @@ -0,0 +1,276 @@ +[#]: subject: "NixOS Series #5: How to set up home-manager on NixOS?" +[#]: via: "https://itsfoss.com/home-manager-nixos/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15697-1.html" + +NixOS 系列 #5:如何在 NixOS 上设置家庭管理员? +====== + +在发表这篇文章之前,我解释了如何为一个单用户系统 [在 NixOS 中安装和删除软件包][1]。 + +但是,如果你正在供多个用户使用,有一个很好的方法来分别满足每个用户的需求。 + +在本指南中,我将指导你如何在 NixOS 上设置一个家庭管理员,以及如何使用它来安装软件包。 + +如果你是新读者,本系列中讨论的一些资源包括: + +- [使用 NixOS 的原因][2] +- [在虚拟机上安装 NixOS][3] +- [安装 NixOS 后要做的事情][4] + +### 在 NixOS 上设置家庭管理员 + +在本指南中,我将指导你通过 2 种方式来设置家庭管理员: + +- 独立的家庭管理员(使用单独的配置文件) +- 作为一个 NixOS 模块(在 `configuration.nix` 文件中使用它) + +那么,让我们从独立方式开始。 + +#### 独立安装的家庭管理员 + +如果你使用的是 NixOS 的稳定频道,你可以使用以下命令来配置家庭管理器: + +``` +nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +``` + +在编写本指南时,稳定版是 `22.11`。 + +而 **如果你在一个不稳定的频道上**,请使用以下命令: + +``` +nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +``` + +无论你使用稳定版还是不稳定版,下面的步骤都是一样的。 + +一旦完成,更新频道: + +``` +nix-channel --update +``` + +最后,使用下面的命令来安装家庭管理员: + +``` +nix-shell '' -A install +``` + +🛠️ 在安装时,可能会出现以下错误: + +![安装家庭管理员时出现构建错误][5] + +重新启动你的系统并再次使用安装命令,它将开始安装。 + +一旦完成,它将显示独立安装的家庭管理员的位置: + +![家庭管理器在NixOS中的位置][6] + +#### 将家庭管理员安装为 NixOS 模块 + +> ⚠️ 如果你选择将家庭管理员作为 NixOS 模块使用,你将需要 sudo 权限。 + +如果你在一个稳定的频道上(在写本文的时候,是 `22.11`),你可以使用下面的命令来添加家庭管理员的稳定频道: + +``` +sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +``` + +而 **如果你使用的是不稳定通道或主通道**,则使用以下命令: + +``` +sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +``` + +一旦你使用上面的任何一条命令完成了添加频道的工作,就用下面的方法更新频道: + +``` +sudo nix-channel --update +``` + +接下来,用以下方法打开 `configuration.nix` 文件: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +并在 `imports []` 中添加以下一行: + +``` + +``` + +![将家庭管理员安装为 NixOS 模块][7] + +现在,跳到该行的末尾,在 `}` 前添加以下内容: + +``` +home-manager.users.{username} = { pkgs, ... }: { + home.packages = [ ] ; + }; +``` + +![NixOS 配置文件中的家庭管理员模块的格式][8] + +上面这一行是为了方便安装和删除软件包而添加的,我接下来会告诉你。 + +现在,[保存修改并退出 Nano][9] 文本编辑器。 + +接下来,重建配置,并做一个切换: + +``` +sudo nixos-rebuild switch +``` + +但如果你使用的是稳定版,并使用上述命令,就会出现以下错误: + +> 🛠️ 错误: 选项 `home-manager.users.user.home.stateVersion` 被使用但没有定义: + +![错误: 选项 `home-manager.users.user.home.stateVersion` 已被使用但未被定义。][10] + +要解决这个问题,你必须在你的家庭管理器块中添加 `home.stateVersion`。 + +在写这篇文章时,我正在运行 22.11,所以整个家庭管理员块看起来像这样: + +``` +home-manager.users.{username} = { pkgs, ... }: { + home.stateVersion = "22.11"; + home.packages = [ ] ; + }; +``` + +![如何解决 `home-manager.users.user.home.stateVersion` 选项被使用但没有定义。][11] + +保存修改,按 `Ctrl+O`,按回车键和 `Ctrl+X` 退出 Nano 文本编辑器。 + +现在,试着重建配置并再次进行切换,应该可以解决问题。 + +### 如何在 NixOS 上使用家庭管理员安装软件包 + +现在你已经安装了家庭管理员,如何用它来安装软件包: + +#### 使用独立安装的家庭管理员 + +首先,用下面的方法打开配置文件: + +``` +nano /home/$USER/.config/nixpkgs/home.nix +``` + +跳到行末,在 `}` 前添加以下代码块: + +``` +home.packages = []; +``` + +现在,你所要做的就是在这两个大括号之间写上软件包的名称。 + +例如,如果我想安装 `htop`,我将得输入以下内容: + +``` +home.packages = [pkgs.htop]; +``` + +是的,你通常要在软件包的名称后面加上 `pkgs.`。 + +但是,如果你想在每次安装新包时不使用 `pkgs.`,可以改变代码块的语法,如图所示: + +``` +home.packages = with pkgs; []; +``` + +而现在,你不再需要在每次安装时使用 `pkgs.`: + +``` +home.packages = with pkgs; [htop]; +``` + +例如,在这里,我想安装 `htop`、`firefox`和 `libreoffice`,所以我的 `home` 块会看起来像这样: + +![在 NixOS 上使用家庭管理员安装多个软件包][12] + +一旦你完成了添加你喜欢的软件包,保存配置文件并使用以下命令来安装软件包: + +``` +home-manager switch +``` + +#### 使用 NixOS 模块方式 + +首先,用以下命令打开 `configuration.nix` 文件: + +``` +sudo nano /etc/nixos/configuration.nix +``` + +在配置部分,我已经添加了家庭管理员块,所以剩下的就是在 `home.packages = [ ];` 里面添加软件包的名称,格式如图所示: + +``` +home.packages = [ pkgs.package_name ] ; +``` + +> 💡我已经在上节提到软件包名称前你可以使用 `pkgs.` 。 + +例如,如果我想 [安装 htop][13]、Firefox 和 LibreOffice,那么我将添加: + +``` +pkgs.htop pkgs.firefox pkgs.libreoffice +``` + +然后我的家庭管理员块会看起来像这样: + +![作为 NixOS 模块在家庭管理员中安装多个软件包][14] + +现在,保存修改并退出文本编辑器。 + +接下来,重建配置并使用以下命令进行切换: + +``` +sudo nixos-rebuild switch +``` + +这是这样!软件包将很快被安装。 + +### 这就结束了 + +我认为你应该选择独立安装,因为你不需要使用超级用户的权限。另外,如果你运行一个有多个用户的系统,为不同的用户拥有不同的配置文件是相当方便的。 + +因此,除非你想用一个文件来实现各种目的,否则我认为没有其他理由使用模块选项。 + +就这样,我结束了 NixOS 的初学者系列。我希望它能给你一个足够好的平台来熟悉这个独特的 Linux 发行版。 + +💬 你喜欢 NixOS 系列文章吗?对于 NixOS 的初学者,我们还有什么要介绍的吗?请提供你的宝贵意见。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/home-manager-nixos/ + +作者:[Sagar Sharma][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://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://linux.cn/article-15645-1.html +[2]: https://linux.cn/article-15606-1.html +[3]: https://linux.cn/article-15624-1.html +[4]: https://linux.cn/article-15663-1.html +[5]: https://itsfoss.com/content/images/2023/02/building-error-while-installing-home-manager.png +[6]: https://itsfoss.com/content/images/2023/02/location-of-home-manager-in-NixOS.png +[7]: https://itsfoss.com/content/images/2023/02/install-home-manager-as-NixOS-module.png +[8]: https://itsfoss.com/content/images/2023/02/syantax-for-home-manager-module-in-NixOS-config-file.png +[9]: https://linuxhandbook.com/nano-save-exit/?ref=itsfoss.com +[10]: https://itsfoss.com/content/images/2023/02/The-option--home-manager.users.user.home.stateVersion--is-used-but-not-defined..png +[11]: https://itsfoss.com/content/images/2023/02/how-to-solve-The-option--home-manager.users.user.home.stateVersion--is-used-but-not-defined..png +[12]: https://itsfoss.com/content/images/2023/02/install-multiple-packages-using-home-manager-on-NixOS.png +[13]: https://itsfoss.com/use-htop/ +[14]: https://itsfoss.com/content/images/2023/02/install-multiple-packages-in-home-manager-as-a-NixOS-module.png +[0]: https://img.linux.net.cn/data/attachment/album/202304/06/110641k8v9q1152hhhh114.jpg \ No newline at end of file diff --git a/sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md b/sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md deleted file mode 100644 index f08493191c..0000000000 --- a/sources/tech/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md +++ /dev/null @@ -1,285 +0,0 @@ -[#]: subject: "NixOS Series #5: How to set up home-manager on NixOS?" -[#]: via: "https://itsfoss.com/home-manager-nixos/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -NixOS Series #5: How to set up home-manager on NixOS? -====== - -Before publishing this, I explained how to [install and remove packages in NixOS][1] for a single-user system. - -But if you are running multiple users, there is an excellent way to cater needs of every user separately. - -And in this guide, I will walk you through how you can set up a home manager on NixOS and how it can be used to install packages. - -If you are new here, some resources discussed in this series include: - -- [Reasons to use nixOS][2] -- [Installing NixOS on a virtual machine][3] -- [Things to do after installing NixOS][4] - -### Setup home-manager on NixOS - -In this guide, I will walk you through 2 ways to set up a home manager: - -- Standalone home manager (uses separate config file) -- As a nix module (using it inside `configuration.nix` file) - -So let's start with the standalone option. - -#### Standalone installation of home-manager - -If you are using a stable channel of NixOS, you can use the following command to configure the home manager: - -``` -nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager -``` - -While writing this guide, the stable release is `22.11`. - -And **if you are on an unstable channel**, use the following: - -``` -nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager -``` - -The following steps will remain the same whether you use stable or unstable. - -Once done, update the channels: - -``` -nix-channel --update -``` - -And finally, use the following command to install the home manager: - -``` -nix-shell '' -A install -``` - -🛠️ While installing, it may throw the following error: - -![building error while installing home manager][5] - -Reboot your system and use the installation command again, and it will start the installation. - -Once done, it will show the location of the standalone installation of the home manager: - -![location of home manager in NixOS][6] - -#### Installing home-manager as a NixOS module - -⚠️ - -You will need sudo privileges if you choose to use the home manager as a NixOS module. - -If you are on a stable channel (while writing, it is 22.11), you can use the following command to add the stable channel of the home manager: - -``` -sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager -``` - -And **if you are using unstable or the master channel**, use the following: - -``` -sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager -``` - -Once you are done adding a channel by using any of one command shown above, update the channel using the following: - -``` -sudo nix-channel --update -``` - -Next, open the `configuration.nix` file using: - -``` -sudo nano /etc/nixos/configuration.nix -``` - -And add the following line inside the `imports []`: - -``` - -``` - -![install home-manager as NixOS module][7] - -Now, jump to the end of the line and add the following before `}`: - -``` -home-manager.users.{username} = { pkgs, ... }: { - home.packages = [ ]; - }; -``` - -![syantax for home-manager module in NixOS config file][8] - -The above line was added to facilitate installing and removing packages I will show you next. - -Now, [save changes and exit from the nano][9] text editor. - -Next, rebuild the config and make a switch: - -``` -sudo nixos-rebuild switch -``` - -But if you are using stable release and use the above command, it will throw the error saying : - -🛠️ **error: The option `home-manager.users.user.home.stateVersion' is used but not defined:** - -![error: The option `home-manager.users.user.home.stateVersion' is used but not defined.][10] - -To solve this issue, you will have to add the `home.stateVersion` in your home manager block. - -While writing, I'm running 22.11, so the whole home manager block would look like this: - -``` -home-manager.users.{username} = { pkgs, ... }: { -home.stateVersion = "22.11"; -home.packages = [ ]; - }; -``` - -![how to solve The option `home-manager.users.user.home.stateVersion' is used but not defined.][11] - -Save changes and exit from the nano text editor by pressing `Ctrl + O`, hitting enter and `Ctrl + X`. - -Now, try to rebuild the config and make the switch again, and that should solve the issue. - -### How to install packages using home-manager on NixOS - -Now that you have home-manager installed, how to install packages with it: - -#### Using a standalone install of Home-manager - -First, open the configuration file by using the following: - -``` -nano /home/$USER/.config/nixpkgs/home.nix -``` - -Jump to the end of the line and add the following code block before `}`: - -``` -home.packages = []; -``` - -Now, all you have to do is write the package's name between those two braces. - -For example, if I want to install **htop**, I will have to enter the following: - -``` -home.packages = [pkgs.htop]; -``` - -Yes, you will have to usually append the name of the package with `pkgs.` - -But if you want to get away with using `pkgs.` using every time you install a new package, change the syntax of the code block as shown: - -``` -home.packages = with pkgs; []; -``` - -And now, you are no longer required to use `pkgs.` for every installation: - -``` -home.packages = with pkgs; [htop]; -``` - -For example, here, I wanted to install **htop, firefox, and LibreOffice** so my home block would look like this: - -![install multiple packages using home-manager on NixOS][12] - -Once you are done adding your favorite packages, save the config file and use the following command to install packages: - -``` -home-manager switch -``` - -#### Using the NixOS module - -First, open the `configuration.nix` file using the following command: - -``` -sudo nano /etc/nixos/configuration.nix -``` - -In the configuration part, I've already added the home manager block, so all it is left is to add the name of the package inside `home.packages = [  ];` in the shown format: - -``` -home.packages = [ pkgs.package_name ]; -``` - -💡 - -I've mentioned how you can get away with using - -``` -pkgs. -``` - - before the package name in the above section (installing packages on the standalone home manager). - -For example, if I want to [install htop][13], Firefox, and LibreOffice, then I will add: - -``` -pkgs.htop pkgs.firefox pkgs.libreoffice -``` - -And my home manager block would look like this: - -![install multiple packages in home-manager as a NixOS module][14] - -Now, save changes and exit from the text editor. - -Next, rebuild the config and make a switch using the following command: - -``` -sudo nixos-rebuild switch -``` - -That's it! The packages will be installed in no time. - -### 'Tis the end - -I think you should go with the standalone installation, as you are not required to use the superuser privileges. Also, having separate config files for separate users is quite convenient if you run a system with multiple users. - -So unless you want one file for every purpose, I see no other reason to use the module option. - -With this, I conclude the NixOS beginner series. I hope it gets you a good enough platform to get familiar with this unique Linux distribution. - -💬 _How did you like the NixOS series? Is there something else we should cover for NixOS beginners? Please provide your valuable feedback._ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/home-manager-nixos/ - -作者:[Sagar Sharma][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/sagar/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/nixos-package-management/ -[2]: https://itsfoss.com/why-use-nixos/ -[3]: https://itsfoss.com/install-nixos-vm/ -[4]: https://itsfoss.com/things-to-do-after-installing-nixos/ -[5]: https://itsfoss.com/content/images/2023/02/building-error-while-installing-home-manager.png -[6]: https://itsfoss.com/content/images/2023/02/location-of-home-manager-in-NixOS.png -[7]: https://itsfoss.com/content/images/2023/02/install-home-manager-as-NixOS-module.png -[8]: https://itsfoss.com/content/images/2023/02/syantax-for-home-manager-module-in-NixOS-config-file.png -[9]: https://linuxhandbook.com/nano-save-exit/?ref=itsfoss.com -[10]: https://itsfoss.com/content/images/2023/02/The-option--home-manager.users.user.home.stateVersion--is-used-but-not-defined..png -[11]: https://itsfoss.com/content/images/2023/02/how-to-solve-The-option--home-manager.users.user.home.stateVersion--is-used-but-not-defined..png -[12]: https://itsfoss.com/content/images/2023/02/install-multiple-packages-using-home-manager-on-NixOS.png -[13]: https://itsfoss.com/use-htop/ -[14]: https://itsfoss.com/content/images/2023/02/install-multiple-packages-in-home-manager-as-a-NixOS-module.png \ No newline at end of file From 6f126b10dd917ea1e42c3c5f0e413af35ca96e7e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 6 Apr 2023 11:13:08 +0800 Subject: [PATCH 273/318] R --- ...1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md index e345786a0a..b97764a61f 100644 --- a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md +++ b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md @@ -69,7 +69,7 @@ nix-shell '' -A install 一旦完成,它将显示独立安装的家庭管理员的位置: -![家庭管理器在NixOS中的位置][6] +![家庭管理员在NixOS中的位置][6] #### 将家庭管理员安装为 NixOS 模块 From 5d646638b39dcd2e34d0919e0a30bd7470137033 Mon Sep 17 00:00:00 2001 From: mcfd <43702470+mcfd@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:45:24 +0800 Subject: [PATCH 274/318] trans --- ...️ Rust Basics Series 1 Create and Run Your First Rust Program.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md b/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md index e9c3fba36a..441110db91 100644 --- a/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md +++ b/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/rust-introduction/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "mcfd" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -228,4 +228,4 @@ via: https://itsfoss.com/rust-introduction/ [12]: https://play.rust-lang.org/?ref=itsfoss.com [13]: https://itsfoss.com/make-directories/ [14]: https://learnubuntu.com/install-gcc/?ref=itsfoss.com -[15]: https://itsfoss.com/run-c-program-linux/ \ No newline at end of file +[15]: https://itsfoss.com/run-c-program-linux/ From adfe8b47b8aa62d91fc0d3622d44cb175041423e Mon Sep 17 00:00:00 2001 From: mcfd <43702470+mcfd@users.noreply.github.com> Date: Thu, 6 Apr 2023 15:21:34 +0800 Subject: [PATCH 275/318] =?UTF-8?q?Update=20and=20rename=20sources/tech/20?= =?UTF-8?q?230328.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Rust=20Basics?= =?UTF-8?q?=20Series=201=20Create=20and=20Run=20Your=20First=20Rust=20Prog?= =?UTF-8?q?ram.md=20to=20translated/tech/20230328.1=20=E2=AD=90=EF=B8=8F?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=20Rust=20Basics=20Series=201=20Create=20and?= =?UTF-8?q?=20Run=20Your=20First=20Rust=20Program.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Series 1 Create and Run Your First Rust Program.md | 231 ----------------- ...Series 1 Create and Run Your First Rust Program.md | 232 ++++++++++++++++++ 2 files changed, 232 insertions(+), 231 deletions(-) delete mode 100644 sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md create mode 100644 translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md diff --git a/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md b/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md deleted file mode 100644 index e9c3fba36a..0000000000 --- a/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: subject: "Rust Basics Series #1: Create and Run Your First Rust Program" -[#]: via: "https://itsfoss.com/rust-introduction/" -[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Rust Basics Series #1: Create and Run Your First Rust Program -====== - -![][1] - -The Rust programming language is one of the fastest adopted systems programming languages by developers and tech companies. It is also voted as one of the **most loved programming languages** by developers who use it on a daily basis. Rust has [been getting this love for][2]**[seven consecutive years][2]** now! - -It is so popular that there are now two big efforts being carried out in the Linux ecosystem: - -- Inclusion of [Rust as a secondary programming language in the Linux kernel][3] -- System76 is [writing their own desktop environment from scratch using Rust][4] - -And that is just in the Linux ecosystem. Android's Bluetooth implementation [Gabeldorsche][5] is now written in Rust. - -Do you see the rising popularity of Rust? You would probably like to learn coding in Rust. - -### Why should you consider Rust over other programming languages? - -Rust is a programming language that has an **extremely strict type system**. As a result, you are "forced" to not write bad code in the first place (well, usually). - -The Rust programming language has the following "goals": - -- **Speed**: Rust's binaries are as fast as C binaries, sometimes outpacing C++ binaries! -- **Memory safety**: Rust has a huge emphasis on memory safety. -- **Concurrency**: Focusing on memory safety eliminates a lot of race condition-like scenarios and helps you introduce concurrency in your program. - -Following are a few errors mistakes one might make in languages like C/C++ (but not with Rust): - -- Use after free -- Double free -- Accessing out-of-bound values -- Using `NULL` -- Inappropriate pointer arithmetic and/or access -- Use of uninitialized variable(s) -- Thread-unsafe multi-threading - -Have a look at the issues caused by such issues at major corporations like [Apple][6], [Microsoft][7], [Google][8], [0day][9] etc, - -Now that you know why one might want to choose the Rust programming language over any other one, let's start with the Rust language tutorial series! - -### Intended audience - -For the love of Rust, I am writing this series of Rust tutorials to help you get acquainted with the concept of Rust programming. - -This tutorial series is intended for folks already familiar with programming languages like C and C++. I assume you know basic terms like _variables_, _functions_, _loops_, etc. - -The only prerequisites that I ask from you are your time and some effort. - -### Installing the Rust compiler - -I would prefer that you have the [Rust compiler installed locally][10]. You can do so by running the following command: - -``` -curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh -``` - -![Installing Rust on Ubuntu Linux][11] - -Apart from the Rust Compiler, I also recommend installing a few more tools that will help you in the development process: - -``` -rustup component add rust-src rust-analyzer rust-analysis -``` - -💡 - -If you do not wish to install the Rust compiler, no worries. You can run the Rust code directly in your browser! Just head over to the - -[Rust Playgrounds website][12] - - and paste the code discussed here. - -### Hello Rust! - -Since Dennis Ritchie and Brian Kernighan introduced the C programming language with the "Hello world" program, it has become a custom in the UNIX world to do so with any new programming language you learn. - -So let's write our Hello World program in Rust as well. - -I will [create a project directory][13] called `learn-rust-its-foss` in my home directory. In there, I create another directory called `hello-world`. Inside that, I will create a `main.rs` file: - -``` -// this code outputs the text -// "Hello world!" to `stdout` - -fn main() { - println!("Hello world!"); -} -``` - -📋 - -Just like C, C++ and Java source files have the extensions - -``` -.c -``` - -, - -``` -.cpp -``` - - and - -``` -.java -``` - - respectively, the Rust source files have the - -``` -.rs -``` - - file extension. - -As a C/C++ programmer, you might have used [gcc on Linux][14], `clang` on macOS and MSVC on Windows. But to compile Rust code, the language creators themselves provide an official `rustc` compiler. - -Running a Rust program is the same as [executing C/C++ program][15]. You compile the code to get the executable file and then run this executable to run the code. - -``` -$ ls -main.rs - -$ rustc main.rs - -$ ls -main main.rs - -$ ./main -Hello world! -``` - -Nice! - -### Deciphering Rust code - -Now that you wrote, compiled and ran your first ever Rust program, let's de-structure the "Hello world" code and understand each part. - -``` -fn main() { -} -``` - -The `fn` keyword is used to declare a function in Rust. Following it, `main` is the name of this particular function that was declared. Like many compiled programming languages, the `main` is a special function used as your program's entry point. - -Any code written inside the `main` function (between the curly brackets `{``}`) gets executed upon program start-up. - -#### println macro - -Inside the `main` function, there is one statement: - -``` -println!("Hello world!"); -``` - -Like the C language's standard library has the `printf` function, Rust language's standard library has the `println`**macro**. A macro is similar to a function but it is distinguished by the **exclamation mark**. You'll learn about macros and functions later in this series. - -The `println` macro takes in a format string and puts it to the program's output (in our case, that is terminal). Since I wish to output some text instead of a variable, I will enclose the text inside double quotes (`"`). Finally, I end this statement using a semi-colon to denote the end of the statement. - -📋 - -Just know that anything that looks like a function call but has an exclamation mark ( - -``` -! -``` - -) before the opening parentheses is a macro in the Rust programming language. - -#### Comments - -Rust follows the known commenting style of the C programming language. A single line comment starts with two forward slashes (`//`) and a multi-line comment is started by `/*` and ends with `*/`. - -``` -// this is a multi-line comment -// but nothing stops me to doing the same -// on the second or third line too! - -/* - * this is a "true" mutli-line comment - * because it is _fancy_ - */ -``` - -### Conclusion - -You just took the first step towards coding in Rust with the Hello World program. - -As a practice, perhaps you can write and execute a Rust program that prints "Yes! I did Rust". - -In the next part of the series, you'll learn to use variables in your Rust program. Stay tuned! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/rust-introduction/ - -作者:[Pratham Patel][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/pratham/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/content/images/2023/03/linux-mega-packt.webp -[2]: https://survey.stackoverflow.co/2022/?ref=itsfoss.com#section-most-loved-dreaded-and-wanted-programming-scripting-and-markup-languages -[3]: https://news.itsfoss.com/linux-kernel-6-1-release/?ref=itsfoss.com -[4]: https://news.itsfoss.com/pop-os-cosmic-rust/?ref=itsfoss.com -[5]: https://android.googlesource.com/platform//system/bt/+/83498aa554aea220fcff30b6310a0a7b4557969f/gd/rust/linux/stack/src/bluetooth.rs?ref=itsfoss.com -[6]: https://langui.sh/2019/07/23/apple-memory-safety/?ref=itsfoss.com -[7]: https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/?ref=itsfoss.com -[8]: https://security.googleblog.com/2019/05/queue-hardening-enhancements.html?ref=itsfoss.com -[9]: https://docs.google.com/spreadsheets/d/1lkNJ0uQwbeC1ZTRrxdtuPLCIl7mlUreoKfSIgajnSyY/view?ref=itsfoss.com#gid=1190662839 -[10]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ -[11]: https://itsfoss.com/content/images/2023/03/install-rust.svg -[12]: https://play.rust-lang.org/?ref=itsfoss.com -[13]: https://itsfoss.com/make-directories/ -[14]: https://learnubuntu.com/install-gcc/?ref=itsfoss.com -[15]: https://itsfoss.com/run-c-program-linux/ \ No newline at end of file diff --git a/translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md b/translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md new file mode 100644 index 0000000000..8467bdb2b6 --- /dev/null +++ b/translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md @@ -0,0 +1,232 @@ +[#]: subject: "Rust Basics Series #1: Create and Run Your First Rust Program" +[#]: via: "https://itsfoss.com/rust-introduction/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lkxed" +[#]: translator: "mcfd" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Rust 基础系列 #1: 创建并运行你的首个 Rust 程序 +====== + +![][1] + +Rust 是被开发者和科技公司所采用最快的系统编程语言之一。它也被每天使用它的开发者评为**最受欢迎的编程语言**之一。其[已经][2]**[连续七年][2]**[受到这种欢迎了][2]! + +它是如此的受欢迎,以致于现在有两股巨大的推力将其带入 Linux 生态系统中: + +- 包括 [Rust 将作为 Linux 内核的第二支持语言][3] +- System76 [正在使用 Rust 重写他们自己的桌面环境][4] + +而这仅仅是在 Linux 生态系统中。安卓的蓝牙实现 [Gabeldorsche][5] 现在也是由 Rust 编写的。 + +你是否看到了 Rust 的流行趋势?你大概率可能想学习使用 Rust 进行编程。 + +### 为什么你要考虑 Rust 而不是其他编程语言? + +首先,Rust 是一门 **类型安全的编程语言** 并且 **拥有极其严格的编译期检查**。因此,你首先会 “被迫” 写不出不安全的代码(好吧,通常)。 + +Rust 编程语言有以下 "目标": + +- **性能**:Rust 的二进制文件和 C 语言的二进制文件一样快,有时甚至超过了 C++ 的二进制文件! +- **内存安全**:Rust 非常重视内存安全。 +- **并发**:对内存安全的关注消除了很多类似竞争的情况,并帮助你在程序中无畏并发。 + +以下是在 C/C++ 等语言中可能犯的一些错误(但不是 Rust): + +- 释放后使用 +- 双重释放 +- 越界访问 +- 使用 `NULL` +- 不适当的指针运算或访问 +- 使用未经初始化的变量 +- 线程不安全的多线程 + +看看 [Apple][6], [Microsoft][7], [Google][8], [0day][9] 等大公司因这类错误而引起的问题吧。 + +现在你可能知道了为什么要选择 Rust 语言而不是其他编程语言,让我们开始学习 Rust 语言的系列教程吧! + +### 目标受众 + +出于对 Rust 的热爱,我写了这个系列的 Rust 教程,帮助你熟悉 Rust 编程的概念。 + +这个教程系列是为已经熟悉 C 和 C++ 等编程语言的人准备的。我假设你已经知道了 _变量_、_函数_、_循环_ 等基本术语。 + +我对你的唯一要求是你不懈的坚持与努力。 + +### 安装 Rust 工具链 + +我希望你能在本地安装 [Rust 工具链][10]。你可以通过运行以下命令来做到这一点: +(LCTT 译注:如果你使用 Linux 发行版,请不要直接安装软件源里的 Rust 工具链,尽管这样看起来很便捷) + +``` +curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh +``` + +![Installing Rust on Ubuntu Linux][11] + +除了 Rust 基本工具链,我还建议再安装一些工具,这些工具将在开发过程中帮助你: + +``` +rustup component add rust-src rust-analyzer rust-analysis +``` + +💡 + +如果你不希望在本地安装 Rust 工具链,不用担心。你还可以直接在你的浏览器中运行 Rust 代码!只要到 + +[Rust Playgrounds website][12] + + 并把所讨论的代码粘贴在此处。 + +### Hello Rust! + +自从 Dennis Ritchie 和 Brian Kernighan 用 "Hello world" 程序介绍了 C 语言后,在 UNIX 世界里,对你学习的任何新的编程语言都要这样做,这已经成为一种习惯。 + +因此,让我们也用 Rust 编写我们的 Hello World 程序。 + +我将在我的家目录里[新建一个项目目录][13]叫做 `learn-rust-its-foss`。然后,在这里我将新建一个叫 `hello-world` 的目录。最后,在里面新建 `main.rs` 文件: + +``` +// 这串代码将打印字符 +// "Hello world!" 将被打印到 `标准输出` + +fn main() { + println!("Hello world!"); +} +``` + +📋 + +就像 C、C++ 和 Java 源代码文件的扩展名是 + +``` +.c +``` + +、 + +``` +.cpp +``` + + 和 + +``` +.java +``` + + Rust 的源文件扩展名是 + +``` +.rs +``` + + 文件扩展名 + +作为一个 C/C++ 程序员,你可能已经在 [Linux 上使用 GCC][14],在 macOS 上使用 `Clang`,在 Windows 上使用 MSVC。但是为了编译 Rust 代码,该语言的创造者自己提供了一个官方的 `rustc` 编译器。 + +运行 Rust 程序和[执行 C/C++ 程序][15]是一样的。你首先编译代码,然后得到可执行文件,最后再运行这个可执行文件从而来运行代码。 + +``` +$ ls +main.rs + +$ rustc main.rs + +$ ls +main main.rs + +$ ./main +Hello world! +``` + +很好! + +### 破译 Rust 代码 + +现在你已经编写、编译并运行了你的第一个 Rust 程序,让我们对 "Hello world" 的代码进行解构并理解每一部分。 + +``` +fn main() { +} +``` + +`fn` 关键字是用来在 Rust 中声明一个函数的。在它后面 `main` 是这个被声明函数的名字。像许多编译型编程语言一样,`main` 是一个特殊的函数,用来作为你的程序的入口。 + +任何写在 `main` 函数里的代码(在大括号 `{``}` 中)将在程序被启动时运行。 + +#### println 宏 + +在 `main` 函数中, 有一个语句(LCTT 译注:语句 区别于 表达式): + +``` +println!("Hello world!"); +``` + +就像C语言的标准库有 `printf` 函数一样,Rust语言的标准库有 `println` **macro**。宏类似于函数,但它以**感叹号**来区分。你将在本系列的后面学习宏和函数的知识。 + +`println` 宏接收一个格式化的字符串,并把它放到程序的标准输出中(在我们的例子中,就是终端)。由于我希望输出一些文本而不是一个变量,我将把文本放在双引号(`"`)内。最后,我用一个分号来结束这个语句,表示语句的结束。 + +📋 + +你只需知道,任何看起来像函数调用但有感叹号的东西 + +``` +! +``` + +就是 Rust 编程语言中的一个宏。 + +#### 注释 + +Rust 遵循已知的 C 编程语言的注释风格。单行注释以两个正斜杠(`//`)开始,多行注释以 `/*` 开始,以 `*/` 结束。 + +``` +// this is a multi-line comment +// but nothing stops me to doing the same +// on the second or third line too! + +/* + * this is a "true" mutli-line comment + * because it is _fancy_ + */ +``` + +### 总结 + +你刚刚通过 Hello World 程序迈出了用 Rust 写代码的第一步。 + +作为一种练习,也许你可以编写并执行一个打印出 "Yes! I did Rust" 的 Rust 程序。 + +在本系列的下一部分中,你将学习在 Rust 程序中使用变量。敬请期待! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/rust-introduction/ + +作者:[Pratham Patel][a] +选题:[lkxed][b] +译者:[mcfd](https://github.com/mcfd) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/content/images/2023/03/linux-mega-packt.webp +[2]: https://survey.stackoverflow.co/2022/?ref=itsfoss.com#section-most-loved-dreaded-and-wanted-programming-scripting-and-markup-languages +[3]: https://news.itsfoss.com/linux-kernel-6-1-release/?ref=itsfoss.com +[4]: https://news.itsfoss.com/pop-os-cosmic-rust/?ref=itsfoss.com +[5]: https://android.googlesource.com/platform//system/bt/+/83498aa554aea220fcff30b6310a0a7b4557969f/gd/rust/linux/stack/src/bluetooth.rs?ref=itsfoss.com +[6]: https://langui.sh/2019/07/23/apple-memory-safety/?ref=itsfoss.com +[7]: https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/?ref=itsfoss.com +[8]: https://security.googleblog.com/2019/05/queue-hardening-enhancements.html?ref=itsfoss.com +[9]: https://docs.google.com/spreadsheets/d/1lkNJ0uQwbeC1ZTRrxdtuPLCIl7mlUreoKfSIgajnSyY/view?ref=itsfoss.com#gid=1190662839 +[10]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ +[11]: https://itsfoss.com/content/images/2023/03/install-rust.svg +[12]: https://play.rust-lang.org/?ref=itsfoss.com +[13]: https://itsfoss.com/make-directories/ +[14]: https://learnubuntu.com/install-gcc/?ref=itsfoss.com +[15]: https://itsfoss.com/run-c-program-linux/ From 50d54f78c764505e2301a15e4902b06cc8261e69 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 6 Apr 2023 15:39:00 +0800 Subject: [PATCH 276/318] Revert "trans" --- ...️ Rust Basics Series 1 Create and Run Your First Rust Program.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md b/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md index 441110db91..e9c3fba36a 100644 --- a/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md +++ b/sources/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/rust-introduction/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lkxed" -[#]: translator: "mcfd" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -228,4 +228,4 @@ via: https://itsfoss.com/rust-introduction/ [12]: https://play.rust-lang.org/?ref=itsfoss.com [13]: https://itsfoss.com/make-directories/ [14]: https://learnubuntu.com/install-gcc/?ref=itsfoss.com -[15]: https://itsfoss.com/run-c-program-linux/ +[15]: https://itsfoss.com/run-c-program-linux/ \ No newline at end of file From 32700a4f425decd89b9d8eb52f1fbe498f5f783d Mon Sep 17 00:00:00 2001 From: Drwhooooo <90264412+Drwhooooo@users.noreply.github.com> Date: Thu, 6 Apr 2023 15:44:07 +0800 Subject: [PATCH 277/318] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ID:Drwhooooo 时间:2023/4/6 --- sources/tech/20210111 an even better video wharf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210111 an even better video wharf.md b/sources/tech/20210111 an even better video wharf.md index d42ace0d0b..e49835c6e2 100644 --- a/sources/tech/20210111 an even better video wharf.md +++ b/sources/tech/20210111 an even better video wharf.md @@ -2,7 +2,7 @@ [#]: via: "https://jao.io/blog/2021-01-11-an-even-better-video-wharf.html" [#]: author: "jao https://jao.io" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "Drwhooooo" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From dd49270820c0781dbbf8b776ed41d6b3c729dba0 Mon Sep 17 00:00:00 2001 From: Drwhooooo <90264412+Drwhooooo@users.noreply.github.com> Date: Thu, 6 Apr 2023 16:08:17 +0800 Subject: [PATCH 278/318] Drwhooooo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译文件申领 --- sources/tech/20210111 an even better video wharf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210111 an even better video wharf.md b/sources/tech/20210111 an even better video wharf.md index d42ace0d0b..e49835c6e2 100644 --- a/sources/tech/20210111 an even better video wharf.md +++ b/sources/tech/20210111 an even better video wharf.md @@ -2,7 +2,7 @@ [#]: via: "https://jao.io/blog/2021-01-11-an-even-better-video-wharf.html" [#]: author: "jao https://jao.io" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "Drwhooooo" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9a1dad40efba77c8c19b5ed7c60bf1cd6b7558ef Mon Sep 17 00:00:00 2001 From: FYJNEVERFOLLOWS Date: Fri, 7 Apr 2023 09:35:16 +0800 Subject: [PATCH 279/318] translated --- ...5 Open source mind mapping with Draw.io.md | 110 ------------------ ...5 Open source mind mapping with Draw.io.md | 108 +++++++++++++++++ 2 files changed, 108 insertions(+), 110 deletions(-) delete mode 100644 sources/tech/20211205 Open source mind mapping with Draw.io.md create mode 100644 translated/tech/20211205 Open source mind mapping with Draw.io.md diff --git a/sources/tech/20211205 Open source mind mapping with Draw.io.md b/sources/tech/20211205 Open source mind mapping with Draw.io.md deleted file mode 100644 index 3ab483a62e..0000000000 --- a/sources/tech/20211205 Open source mind mapping with Draw.io.md +++ /dev/null @@ -1,110 +0,0 @@ -[#]: subject: "Open source mind mapping with Draw.io" -[#]: via: "https://opensource.com/article/21/12/open-source-mind-mapping-drawio" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "FYJNEVERFOLLOWS " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open source mind mapping with Draw.io -====== -Next time you need to brainstorm, organize ideas, or plan a project, -start with Draw.io. -![Looking at a map for career journey][1] - -There's something special about maps. I remember opening the front book cover of JRR Tolkien's _The Hobbit_ when I was younger, staring at the hand-drawn map of Middle Earth, and feeling the wealth of possibility contained in the simple drawing. Aside from their obvious purpose of actually describing where things are in relation to other things, I think maps do a great job of expressing potential. You could step outside and take the road this way or that way, and if you do, just think of all the new and exciting things you'll be able to see. - -Maps don't have to be literal to be valuable and full of possibility, though. Some maps describe a thought process, plan, algorithm, or even random ideas desperately trying to fit together in a potential work of art. Call them "mind maps" or "flowcharts" or "idea boards." They're easy to make with the open source [Draw.io][2] application. - -### Install Draw.io - -Draw.io is designed as an open source online app, so you can either use it as an online application, download the [desktop version][3], or [clone the Git repository][4] and host it on your own server. - -### Mapping with Draw.io - -When you first start Draw.io, you need to choose where you want to save your data. If you're hosting Draw.io yourself, your choices depend on which API keys you have access to. You can choose from several online storage services for the online public instance, depending on what you've got an account for. If you don't want to store your data on somebody else's server, you can also choose to save your work on a local drive. If you're unsure yet, you can click **Decide later** to continue into the app without choosing anything. - -The Draw.io interface has a big workspace in the center, the main toolbar on the left, a toolbar along the top, and a properties panel on the right. - -![Draw.io interface][5] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -The workflow is simple:  - - 1. Select a shape from the left toolbar. - 2. Edit the shape in the workspace. - 3. Add another shape, and connect them. - - - -Repeat that process, and you've got a map. - -![Draw.io example][7] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -### Project planning - -When you first take on a big task, you often have a pretty clear idea of your desired outcome. Say you want to start a community project to paint a mural. Your desired outcome is a mural. It's pretty easy to define, and you can more or less picture the results in your mind's eye. - -Once you start moving toward your goal, however, you have to start figuring out the details. Where should the mural be painted? How do you get permission to paint on a public wall, anyway? What about paint? Is there a special kind of paint you ought to use? Will you apply the paint with brushes or airbrushes? What kind of specialized equipment do you need for painting? How many people and hours will it take to paint a mural? What about support services for the painters while they work? And what's the painting going to be about, anyway? A single idea can very quickly become overwhelming the closer you get to making it happen. - -This doesn't just apply to painting murals, producing a play, or making a movie. It applies to nearly any non-trivial endeavor. And it's exactly what an application like Draw.io can help map out. - -Here's how you can use Draw.io to create a project flowchart: - - 1. Start with a brainstorming session. No thoughts are too trivial or big. Make a box for every idea, and double-click the box in the Draw.io workspace to enter text. - 2. Once you have all the ideas you can possibly think of on your workspace, drag and drop them into related groups. The goal is to create little clouds, or clusters, of tasks that more or less go together because they're part of the same process. - 3. Once you've identified the clusters of related tasks, give those tasks a name. For instance, if you're painting a mural, then the tasks might be _approval_, _design_, _purchase_, _paint_, reflecting that you need to get permission from your local government first, then design the mural, then purchase the supplies, and finally paint the mural. Each task has component parts, but broadly you've now determined the workflow for your project. - 4. Connect the major tasks with arrows. Not all processes are entirely linear. For instance, after you've obtained permission from your city council, you might have to come back to them for final approval once you've designed what you intend to paint. That's normal. It's a loop, there's some back and forth, but eventually, you break out of the loop to proceed to the next stage. - 5. Armed with your flowchart, work through each task until you've reached your ultimate goal. - - - -### Mind mapping  - -Mind maps tend to be less about progress and more about maintaining a certain state or putting many ideas into perspective. For instance, suppose you've decided to reduce the amount of waste in your life. You have some ideas about what you can do, but you want to organize and preserve your ideas, so you don't forget them. - -Here's how you can use Draw.io to create a mind map: - - 1. Start with a brainstorming session. No thoughts are too trivial or big. Make a box for every idea, and double-click the box in the Draw.io workspace to enter text. You can also give boxes a background color by selecting the box and clicking a color swatch in the right properties panel. - 2. Arrange your ideas into groups or categories. - 3. Optionally, connect ideas with arrows that relate directly to one another. - - - -![Draw.io waste reduction example][8] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -### Saving your diagram - -You can save your diagram as a PNG, JPG image, Draw.io XML, or plain XML file. If you save it as XML, you can open it again in Draw.io for further editing. An exported image is great for sharing with others. - -### Use Draw.io - -There are many great diagramming applications, but I don't make diagrams often, so having Draw.io available is convenient at a moment's notice. Its interface is simple and easy to use, and the results are clean and professional. Next time you need to brainstorm, organize ideas, or plan a project, start with Draw.io. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/open-source-mind-mapping-drawio - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) -校对:[校对者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/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) -[2]: http://draw.io -[3]: https://github.com/jgraph/drawio-desktop -[4]: https://github.com/jgraph/drawio -[5]: https://opensource.com/sites/default/files/uploads/draw-io-ui.png (Draw.io interface) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/draw-io-example.jpg (Draw.io example) -[8]: https://opensource.com/sites/default/files/uploads/draw-io-export.jpg (Draw.io waste reduction example) diff --git a/translated/tech/20211205 Open source mind mapping with Draw.io.md b/translated/tech/20211205 Open source mind mapping with Draw.io.md new file mode 100644 index 0000000000..248d131e28 --- /dev/null +++ b/translated/tech/20211205 Open source mind mapping with Draw.io.md @@ -0,0 +1,108 @@ +[#]: subject: "Open source mind mapping with Draw.io" +[#]: via: "https://opensource.com/article/21/12/open-source-mind-mapping-drawio" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "FYJNEVERFOLLOWS" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用开源思维导图 Draw.io +====== + +下次你需要头脑风暴、组织想法或计划项目时,不妨试试 Draw.io +![Looking at a map for career journey][1] + +地图有一些特别之处。我记得小时候打开托尔金《*霍比特人*》的封面,盯着手绘的中土世界地图,感受简单的图画中蕴含着丰富的可能性。除了描述事物与其他事物之间的关系这一明显目的外,我认为地图在表达可能性方面做得很好。你可以到户外去,沿着这条路或那条路走,如果你这样做了,去想想你将能够看到的所有新的、令人兴奋的事物。 + +尽管如此,地图并不一定是有价值和充满可能性的文字。有些地图描述了一个思维过程、计划、算法,甚至是一些随机的想法,这些想法拼命地想要组合成一件潜在的艺术作品。称之为“思维导图”、“流程图”或“创意板”。可以用开源的 [Draw.io][2] 应用程序去很容易地制作。 + +### 安装 Draw.io + +Draw.io 被设计为一个开源的在线应用程序,因此你可以将其作为在线应用程序使用,下载[桌面版本][3],或[克隆 Git 存储库][4]并将其托管在您自己的服务器上。 + +### 使用 Draw.io 进行映射 +当你第一次启动 Draw.io 时,你需要选择保存数据的位置。如果你自己托管 Draw.io,你的选择取决于你可以访问哪些 API 密钥。你可以从几个在线存储服务中为在线公共实例进行选择,这取决于你的帐户。如果你不想把你的数据存储在别人的服务器上,你也可以选择把你的工作保存在本地存储上。如果你还不确定,可以单击 ``稍后决定`` 继续进入应用程序,而无需选择任何内容。 + +Draw.io 的交互界面中间有一个很大的工作空间,左边是主工具栏,顶部是工具栏,右边是属性面板。 + +![Draw.io interface][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +工作流程很简单: + + 1. 从左侧工具栏中选择一个形状。 + 2. 在工作空间中编辑形状。 + 3. 添加另一个形状,并连接它们。 + + + +重复这个过程,你就得到了一张地图。 + +![Draw.io example][7] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### 项目规划 + +当你第一次接受一项大任务时,你通常对你想要的结果有一个非常清晰的想法。假设你想开始一个社区项目来画一幅壁画。你想要的结果是一幅壁画。它很容易定义,你可以或多或少地在脑海中描绘出结果。 + +然而,一旦你开始朝着目标前进,你就必须开始弄清楚细节。壁画应该画在哪里?即便知道画在哪,你如何获得在公共墙上作画的许可的?油漆呢?你应该用一种特殊的油漆吗?你会用刷子还是喷枪涂油漆?你需要什么样的专业设备来喷漆?画一幅壁画需要多少人和多长时间?画家工作时的支持服务怎么样?最后,这幅画是关于什么的?一个想法很快就会变得势不可挡,因为你离实现它越近。 + +这不仅仅适用于绘制壁画、制作戏剧或电影。它几乎适用于任何不平凡的努力。这正是像 Draw.io 这样的应用程序可以帮助绘制的。 + +以下是如何使用 Draw.io 创建项目流程图: + 1. 从头脑风暴开始。没有什么想法是太小或太大的。为每个想法制作一个框,然后双击 Draw.io 工作空间中的框以输入文本。 + 2. 一旦在工作空间中你产生了可能想到的所有想法,就可以将它们拖放到相关的组中。我们的目标是创建一些小任务云或集群,因为它们是同一过程的一部分,所以或多或少会一起进行。 + 3. 一旦你确定了相关任务的集群,就为这些任务命名。例如,如果你正在绘制壁画,那么任务可能是 _approval_、_design_、_purchase_、_paint_,这反映出你需要首先获得当地政府的许可,然后设计壁画,然后购买用品,最后绘制壁画。每个任务都有组成部分,但大体上,你现在已经确定了项目的工作流程。 + 4. 用箭头连接主要任务。并不是所有的过程都是完全线性的。例如,在你获得市议会的许可后,一旦你设计了你打算画的东西,你可能必须回到他们那里进行最终批准。这很正常。这是一个循环,有一些来回,但最终,你会突破这个循环,进入下一阶段。 + 5. 掌握好你的流程图,完成每一项任务,直到你达到最终目标。 + +### 思维导图 + + + +思维导图往往不是关于进步,而是关于保持某种状态或对许多想法进行展望。例如,假设你已经决定减少生活中的浪费。你对自己能做什么有一些想法,但你想组织和保存你的想法,这样你就不会忘记它们。 + +以下是如何使用 Draw.io 创建思维导图: + + 1. 从头脑风暴开始。没有什么想法是太琐碎或太大的。为每个想法制作一个框,然后双击 Draw.io 工作空间中的框以输入文本。也可以通过选择框并单击右侧属性面板中的色样,为框指定背景色。 + 2. 将你的想法分组或分类。 + 3. 可以选择将想法与彼此直接相关的箭头连接起来。 + + + +![Draw.io waste reduction example][8] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +### 保存你的图表 + +你可以将图表保存为 PNG、JPG 图像、Draw.io XML 或纯 XML 文件。如果将其另存为 XML,则可以在 Draw.io 中再次打开它进行进一步编辑。导出的图像非常适合与他人共享。 + +### 使用 Draw.io + +有很多很棒的绘图应用程序,但我不经常制作图表,所以可以随时使用 Draw.io。它的界面简单易用,结果干净专业。下次当你需要头脑风暴、组织想法或计划项目时,可以试试 Draw.io。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-mind-mapping-drawio + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[校对者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/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) +[2]: http://draw.io +[3]: https://github.com/jgraph/drawio-desktop +[4]: https://github.com/jgraph/drawio +[5]: https://opensource.com/sites/default/files/uploads/draw-io-ui.png (Draw.io interface) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/draw-io-example.jpg (Draw.io example) +[8]: https://opensource.com/sites/default/files/uploads/draw-io-export.jpg (Draw.io waste reduction example) From 79e0959822f754271a9736cd774fd6fe9b21ea94 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 7 Apr 2023 10:03:30 +0800 Subject: [PATCH 280/318] translated --- ...0 ⭐️ Open source tools for mind mapping.md | 61 ------------------- ...0 ⭐️ Open source tools for mind mapping.md | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 61 deletions(-) delete mode 100644 sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md create mode 100644 translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md diff --git a/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md b/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md deleted file mode 100644 index 962e2d318b..0000000000 --- a/sources/tech/20230324.0 ⭐️ Open source tools for mind mapping.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: subject: "Open source tools for mind mapping" -[#]: via: "https://opensource.com/article/23/3/open-source-mind-mapping" -[#]: author: "Amrita https://opensource.com/users/amrita42" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open source tools for mind mapping -====== - -In today's world and social media, many people don't have the patience to read lengthy textual content. Visuals are a great way to capture your audience's attention span. - -Did you know that research at 3M Corporation concluded that visuals are processed 60,000 times faster than text? Visuals are more impactful than words and enhance creative thinking and memory. - -### A picture is worth a thousand words - -I looked at some of the common [Git commands][1]. I used Git commands as the main topic; each sub-topic is a Git command syntax with a definition. For this, I used Wisemapping. - -![A git command mind map][2] - -Whether you knew what a [mind map][3] was before or not, now that you've seen a mind map, you can now understand the concept.. That's the power of visuals. - -### How do you create a mind map? - -- Start with the main topic and place it in the middle of your drawing board. -- Create sub-topics and link them to the main topic. -- You can add details to each sub-topic, such as definitions, examples, etc. - -### 3 open source tools you can use to create a mind map - -Take a look at these three open source tools to create a visual of your idea: - -- [Wisemapping][4] -- [Freeplane][5] -- [Semantik][6] - -Wikipedia defines a mind map as a diagram to visually organize information into a hierarchy, showing relationships among pieces of the whole. Mind mapping starts with a central theme and then builds relations. It is a visual way to structure thoughts and create impactful presentations. - -You can use mind maps in your work. For example, I used a mind map to show a high-level overview of features planned for a project. With these excellent open source mind mapping applications, it's easy to get started visualizing your next project. Try mapping your mind with open source. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/open-source-mind-mapping - -作者:[Amrita][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/amrita42 -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/downloads/cheat-sheet-git -[2]: https://opensource.com/sites/default/files/2023-03/mindmap.jpg -[3]: https://opensource.com/article/21/12/open-source-mind-mapping-drawio -[4]: https://www.wisemapping.com/ -[5]: https://opensource.com/article/19/1/productivity-tool-freeplane -[6]: https://waf.io/semantik.html \ No newline at end of file diff --git a/translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md b/translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md new file mode 100644 index 0000000000..773ced8756 --- /dev/null +++ b/translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md @@ -0,0 +1,61 @@ +[#]: subject: "Open source tools for mind mapping" +[#]: via: "https://opensource.com/article/23/3/open-source-mind-mapping" +[#]: author: "Amrita https://opensource.com/users/amrita42" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +开源思维导图工具 +====== + +在今天的世界和社交媒体中,许多人没有耐心阅读冗长的文字内容。视觉效果是吸引受众注意力的好方法。 + +你知道吗,3M 公司的研究得出结论,视觉的处理速度是文字的 60,000 倍?视觉比文字更有冲击力,能增强创造性思维和记忆。 + +### 一张图片胜过千言万语 + +我看了一些常见的[Git命令][1]。我把 Git 命令作为主话题,每个子话题都是一个带有定义的 Git 命令语法。为此,我使用了 Wisemapping。 + +![A git command mind map][2] + +不管你以前是否知道[思维导图][3]是什么,现在你看到了思维导图,你就可以理解这个概念了。这就是视觉的力量。 + +### 如何创建一个思维导图? + +- 从主话题开始,把它放在你的画板中间。 +- 创建子话题并将它们与主话题联系起来。 +- 你可以为每个子话题添加细节,如定义、例子等。 + +### 3 个你可以用来创建思维导图的开源工具 + +看看这三个开源工具,为你的想法创建一个视觉: + +- [Wisemapping][4] +- [Freeplane][5] +- [Semantik][6] + +维基百科对思维导图的定义是:将信息直观地组织成一个层次,显示整体中各部分之间的关系。思维导图从一个中心话题开始,然后建立起关系。它是一种结构化思想和创造有影响力的演示的视觉方式。 + +你可以在工作中使用思维导图。例如,我用思维导图来展示一个项目所计划的功能的高层概述。有了这些优秀的开源思维导图应用,你很容易就能开始将你的下一个项目可视化。试试用开源的思维导图吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/open-source-mind-mapping + +作者:[Amrita][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/amrita42 +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/downloads/cheat-sheet-git +[2]: https://opensource.com/sites/default/files/2023-03/mindmap.jpg +[3]: https://opensource.com/article/21/12/open-source-mind-mapping-drawio +[4]: https://www.wisemapping.com/ +[5]: https://opensource.com/article/19/1/productivity-tool-freeplane +[6]: https://waf.io/semantik.html \ No newline at end of file From 239b91fdb95fb3da3f0f2386894d8e44cf503dc8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 7 Apr 2023 10:27:39 +0800 Subject: [PATCH 281/318] translating --- ...️⭐️ Handle any type of document with this open source tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230403.2 ⭐️⭐️ Handle any type of document with this open source tool.md b/sources/tech/20230403.2 ⭐️⭐️ Handle any type of document with this open source tool.md index 8c783e3478..00bc606d51 100644 --- a/sources/tech/20230403.2 ⭐️⭐️ Handle any type of document with this open source tool.md +++ b/sources/tech/20230403.2 ⭐️⭐️ Handle any type of document with this open source tool.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/4/open-source-collabora-online-interoperability" [#]: author: "Heike Jurzik https://opensource.com/users/hej" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 2bc1b8217562fcef7e0a18dcafd60cef0c71df16 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 7 Apr 2023 11:06:59 +0800 Subject: [PATCH 282/318] R --- ...OS Series 5 How to set up home-manager on NixOS.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md index b97764a61f..8e5bf0136d 100644 --- a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md +++ b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md @@ -7,14 +7,14 @@ [#]: publisher: "wxy" [#]: url: "https://linux.cn/article-15697-1.html" -NixOS 系列 #5:如何在 NixOS 上设置家庭管理员? +NixOS 系列 #5:如何在 NixOS 上设置主目录管理器? ====== 在发表这篇文章之前,我解释了如何为一个单用户系统 [在 NixOS 中安装和删除软件包][1]。 但是,如果你正在供多个用户使用,有一个很好的方法来分别满足每个用户的需求。 -在本指南中,我将指导你如何在 NixOS 上设置一个家庭管理员,以及如何使用它来安装软件包。 +在本指南中,我将指导你如何在 NixOS 上设置一个 主目录管理器Home Manager,以及如何使用它来安装软件包。 如果你是新读者,本系列中讨论的一些资源包括: @@ -22,16 +22,16 @@ NixOS 系列 #5:如何在 NixOS 上设置家庭管理员? - [在虚拟机上安装 NixOS][3] - [安装 NixOS 后要做的事情][4] -### 在 NixOS 上设置家庭管理员 +### 在 NixOS 上设置主目录管理器 -在本指南中,我将指导你通过 2 种方式来设置家庭管理员: +在本指南中,我将指导你通过 2 种方式来设置主目录管理器: -- 独立的家庭管理员(使用单独的配置文件) +- 独立的主目录管理器(使用单独的配置文件) - 作为一个 NixOS 模块(在 `configuration.nix` 文件中使用它) 那么,让我们从独立方式开始。 -#### 独立安装的家庭管理员 +#### 独立安装的主目录管理器 如果你使用的是 NixOS 的稳定频道,你可以使用以下命令来配置家庭管理器: @@ -55,7 +55,7 @@ nix-channel --add https://github.com/nix-community/home-manager/archive/master.t nix-channel --update ``` -最后,使用下面的命令来安装家庭管理员: +最后,使用下面的命令来安装主目录管理器: ``` nix-shell '' -A install @@ -63,19 +63,19 @@ nix-shell '' -A install 🛠️ 在安装时,可能会出现以下错误: -![安装家庭管理员时出现构建错误][5] +![安装主目录管理器时出现构建错误][5] 重新启动你的系统并再次使用安装命令,它将开始安装。 -一旦完成,它将显示独立安装的家庭管理员的位置: +一旦完成,它将显示独立安装的主目录管理器的位置: -![家庭管理员在NixOS中的位置][6] +![主目录管理器在NixOS中的位置][6] -#### 将家庭管理员安装为 NixOS 模块 +#### 将主目录管理器安装为 NixOS 模块 -> ⚠️ 如果你选择将家庭管理员作为 NixOS 模块使用,你将需要 sudo 权限。 +> ⚠️ 如果你选择将主目录管理器作为 NixOS 模块使用,你将需要 sudo 权限。 -如果你在一个稳定的频道上(在写本文的时候,是 `22.11`),你可以使用下面的命令来添加家庭管理员的稳定频道: +如果你在一个稳定的频道上(在写本文的时候,是 `22.11`),你可以使用下面的命令来添加主目录管理器的稳定频道: ``` sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager @@ -105,7 +105,7 @@ sudo nano /etc/nixos/configuration.nix ``` -![将家庭管理员安装为 NixOS 模块][7] +![将主目录管理器安装为 NixOS 模块][7] 现在,跳到该行的末尾,在 `}` 前添加以下内容: @@ -115,7 +115,7 @@ home-manager.users.{username} = { pkgs, ... }: { }; ``` -![NixOS 配置文件中的家庭管理员模块的格式][8] +![NixOS 配置文件中的主目录管理器模块的格式][8] 上面这一行是为了方便安装和删除软件包而添加的,我接下来会告诉你。 @@ -135,7 +135,7 @@ sudo nixos-rebuild switch 要解决这个问题,你必须在你的家庭管理器块中添加 `home.stateVersion`。 -在写这篇文章时,我正在运行 22.11,所以整个家庭管理员块看起来像这样: +在写这篇文章时,我正在运行 22.11,所以整个主目录管理器块看起来像这样: ``` home-manager.users.{username} = { pkgs, ... }: { @@ -150,11 +150,11 @@ home-manager.users.{username} = { pkgs, ... }: { 现在,试着重建配置并再次进行切换,应该可以解决问题。 -### 如何在 NixOS 上使用家庭管理员安装软件包 +### 如何在 NixOS 上使用主目录管理器安装软件包 -现在你已经安装了家庭管理员,如何用它来安装软件包: +现在你已经安装了主目录管理器,如何用它来安装软件包: -#### 使用独立安装的家庭管理员 +#### 使用独立安装的主目录管理器 首先,用下面的方法打开配置文件: @@ -192,7 +192,7 @@ home.packages = with pkgs; [htop]; 例如,在这里,我想安装 `htop`、`firefox`和 `libreoffice`,所以我的 `home` 块会看起来像这样: -![在 NixOS 上使用家庭管理员安装多个软件包][12] +![在 NixOS 上使用主目录管理器安装多个软件包][12] 一旦你完成了添加你喜欢的软件包,保存配置文件并使用以下命令来安装软件包: @@ -208,7 +208,7 @@ home-manager switch sudo nano /etc/nixos/configuration.nix ``` -在配置部分,我已经添加了家庭管理员块,所以剩下的就是在 `home.packages = [ ];` 里面添加软件包的名称,格式如图所示: +在配置部分,我已经添加了主目录管理器块,所以剩下的就是在 `home.packages = [ ];` 里面添加软件包的名称,格式如图所示: ``` home.packages = [ pkgs.package_name ] ; @@ -222,9 +222,9 @@ home.packages = [ pkgs.package_name ] ; pkgs.htop pkgs.firefox pkgs.libreoffice ``` -然后我的家庭管理员块会看起来像这样: +然后我的主目录管理器块会看起来像这样: -![作为 NixOS 模块在家庭管理员中安装多个软件包][14] +![作为 NixOS 模块在主目录管理器中安装多个软件包][14] 现在,保存修改并退出文本编辑器。 From 3213a87d33681d6b01811eff0c42b2a3c466074b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 7 Apr 2023 11:14:38 +0800 Subject: [PATCH 283/318] R --- ...️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md index 8e5bf0136d..803ab8363e 100644 --- a/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md +++ b/published/20230321.1 ⭐️⭐️ NixOS Series 5 How to set up home-manager on NixOS.md @@ -7,7 +7,7 @@ [#]: publisher: "wxy" [#]: url: "https://linux.cn/article-15697-1.html" -NixOS 系列 #5:如何在 NixOS 上设置主目录管理器? +NixOS 系列 #5:如何在 NixOS 上设置主目录管理器 ====== 在发表这篇文章之前,我解释了如何为一个单用户系统 [在 NixOS 中安装和删除软件包][1]。 @@ -33,7 +33,7 @@ NixOS 系列 #5:如何在 NixOS 上设置主目录管理器? #### 独立安装的主目录管理器 -如果你使用的是 NixOS 的稳定频道,你可以使用以下命令来配置家庭管理器: +如果你使用的是 NixOS 的稳定频道,你可以使用以下命令来配置主目录管理器: ``` nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager @@ -133,7 +133,7 @@ sudo nixos-rebuild switch ![错误: 选项 `home-manager.users.user.home.stateVersion` 已被使用但未被定义。][10] -要解决这个问题,你必须在你的家庭管理器块中添加 `home.stateVersion`。 +要解决这个问题,你必须在你的主目录管理器块中添加 `home.stateVersion`。 在写这篇文章时,我正在运行 22.11,所以整个主目录管理器块看起来像这样: From dc16121a4ff6849503d8381fcbf722c6309c51a0 Mon Sep 17 00:00:00 2001 From: yjacks Date: Fri, 7 Apr 2023 12:19:29 +0800 Subject: [PATCH 284/318] Update 20211202 Edit video on Linux with Kdenlive.md --- sources/tech/20211202 Edit video on Linux with Kdenlive.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211202 Edit video on Linux with Kdenlive.md b/sources/tech/20211202 Edit video on Linux with Kdenlive.md index ee30a6ee15..cee5a5f18e 100644 --- a/sources/tech/20211202 Edit video on Linux with Kdenlive.md +++ b/sources/tech/20211202 Edit video on Linux with Kdenlive.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/kdenlive-linux-creative-app" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "yjacks" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 1d3c80fcf6148898a422ff6bbc432464dfa6ccba Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 7 Apr 2023 14:14:05 +0800 Subject: [PATCH 285/318] RP @geekpi https://linux.cn/article-15699-1.html --- ... ⭐️ Write a cute program with Emojicode.md | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) rename {translated/tech => published}/20230401.2 ⭐️ Write a cute program with Emojicode.md (53%) diff --git a/translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md b/published/20230401.2 ⭐️ Write a cute program with Emojicode.md similarity index 53% rename from translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md rename to published/20230401.2 ⭐️ Write a cute program with Emojicode.md index 2401ca883a..534926435c 100644 --- a/translated/tech/20230401.2 ⭐️ Write a cute program with Emojicode.md +++ b/published/20230401.2 ⭐️ Write a cute program with Emojicode.md @@ -3,52 +3,56 @@ [#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15699-1.html" 用 Emojicode 写一个可爱的程序 ====== -在这篇文章中,我将介绍一个最好的编码语言,学习如何制作任何东西!它叫做 Emojicode。Emojicode 由 Theo Belaire 在 2014 年创建,是一种开源的编程语言,使用 emoji 字符来表示其语法。在 Emojicode 中工作时,emoji 被用来创建变量、函数和控制结构。因为它是一种静态类型的语言,变量类型必须在使用前声明,但它也支持类和继承等面向对象的概念。这种语言可以在每个操作系统上运行,它是一种超级有趣的编码方式,特别是当你是一个非英语母语的人时。这很有帮助,因为象形图表示法可以把我们大家聚集在一起,让我们以类似数学的方式说同样的语言。 +![][0] + +> 这种有趣的开源语言是学习编码真正的完美选择。 + +在这篇文章中,我将介绍一个最好的编码语言,学习如何制作任何东西!它叫做 Emojicode,是由 Theo Belaire 在 2014 年创建的,它是一种开源的编程语言,使用 emoji 字符来表示其语法。当用 Emojicode 开发时,表情符被用来创建变量、函数和控制结构。因为它是一种静态类型的语言,变量类型必须在使用前声明,但它也支持类和继承等面向对象的概念。这种语言可以在每个操作系统上运行,它是一种超级有趣的编码方式,特别是当你是一个非英语母语的人时。这很有帮助,因为象形表示可以把我们大家聚集在一起,让我们以类似数学的方式说同样的语言。 ### 先决条件 在本教程中,我使用的是基于 Debian 的操作系统。我的工具可能与你的操作系统的要求不同。以下是我所使用的工具: - [Geany][1],一个 Linux 下的开源 IDE。 -- IBus,它允许你挑选 emoji 并把它们放在你的编辑器中。我使用的界面被称为 **emoji picker**。 +- IBus,它允许你挑选表情符并把它们放在你的编辑器中。我使用的界面被称为 **emoji picker**。 - 基于 Debian 的 Linux。 - 一个 C++ 编译器。我使用的是 `g++` 编译器。 - [Emojicode][2] -我使用的是 Linux 操作系统,但你可以[阅读文档][3]了解在其他操作系统上使用它时可能需要采取的任何特殊步骤。 +我使用的是 Linux 操作系统,但你可以 [阅读文档][3] 了解在其他操作系统上使用它时可能需要采取的任何特殊步骤。 ### 在 Linux 上安装 Emojicode -有几种方法可以在你的电脑上安装 Emojicode,但他们有一个很酷的[神奇的安装页面][4],可以告诉你具体该怎么做。下面是我的做法: +有几种方法可以在你的电脑上安装 Emojicode,但它们有一个很酷的 [神奇的安装页面][4],可以告诉你具体该怎么做。下面是我的做法: ``` $ wget https://github.com/emojicode/emojicode/releases/download/v1.0-beta.2/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz -O emojicode.tar.gz \ -&& tar -xzf emojicode.tar.gz && rm emojicode.tar.gz \ -&& cd Emojicode-1.0-beta.2-Linux-x86_64 && ./install.sh \ -&& cd .. && rm -r Emojicode-1.0-beta.2-Linux-x86_64 + && tar -xzf emojicode.tar.gz && rm emojicode.tar.gz \ + && cd Emojicode-1.0-beta.2-Linux-x86_64 && ./install.sh \ + && cd .. && rm -r Emojicode-1.0-beta.2-Linux-x86_64 ``` -emojicode的安装过程提供了有用的反馈。 +Emojicode 的安装过程提供了有用的反馈。 ![The emojicode installation procedure provides useful feedback along the way.][5] 现在,你已经安装好了,是时候开始编写代码了! -### 整体是如何进行的? +### 它是怎么运作的? -首先,所有 Emojicode 文件的扩展名都以文件名.🍇结尾,但因为你不能在一般的文件名中这样做,所以它被翻译成 `filename.emojic`。这里是最重要的语法元素: +首先,所有 Emojicode 文件的扩展名都以文件名 `.🍇` 结尾,但因为你不能在一般的文件名中这样做,所以它被翻译成 `filename.emojic`。这里是最重要的语法元素: -- 把 🏁 放在一行的开头,表示要执行哪些代码块 -- 用 🍇 开始一个代码块 -- 用 🍉 来结束一个代码块 -- 想打印什么吗?就用 😀 🔤 `` 🔤 ❗ +- 把 `🏁` 放在一行的开头,表示要执行哪些代码块 +- 用 `🍇` 开始一个代码块 +- 用 `🍉` 来结束一个代码块 +- 想打印什么吗?就用 `😀 🔤 🔤 ❗` 还有很多其他的,所以这里有一些实际的例子。 @@ -75,7 +79,6 @@ haiku haiku.emojic haiku.o 正如你所看到的,代码已经被编译并生成了两个文件,其中一个是可执行的。运行 `haiku` 文件: - ``` $ ./haiku Emojicode is great, @@ -85,27 +88,27 @@ no sadness, just joy. ### 数学和变量操作 -接下来,你要同时做几件事:一点点数学和变量的改变。首先,将一个变量赋值为0: +接下来,你要同时做几件事:一点点数学和变量的改变。首先,将一个变量赋值为 0: ``` 0 ➡️ 🖍🆕x ``` -你刚刚使用 crayon emoji 和变量名称旁边的新 emoij 创建了一个新变量,同时还将该变量赋值为 0。 +你刚刚使用蜡笔(`🖍`)表情符、新建(`🆕`)表情符和变量名称创建了一个新变量,同时还将该变量赋值为 0。 -接下来,用磁铁的 emoji 打印一行包括该变量的内容: +接下来,用磁铁(`🧲`)表情符打印一行包括该变量的内容: ``` 😀 🔤The value is 🧲x🧲 🔤 ❗ ``` -接下来,使用加号和箭头 emoji 改变变量: +接下来,使用加号(`➕`)和箭头(`⬅️`)表情符改变变量: ``` x ⬅️➕ 1 ``` -然后打印另一行的值。我继续这样做了一会儿,然后打印出最终的数值。下面是我的做法: +然后打印另一行的值。如此这般,然后打印出最终的数值。如下: ``` 🏁 🍇 @@ -140,7 +143,7 @@ The value is 7 The final value is 3 ``` -如你所见,作为变量打印出来的所有内容都已使用新数学进行了更新。你可以用许多数学 emoji 来进一步操作。下面是一些更多的运算符: +如你所见,作为变量打印出来的所有内容都已使用新数学进行了更新。你可以用许多数学表情符来进一步操作。下面是一些更多的运算符: ``` 🚮 is your modulo @@ -166,11 +169,11 @@ The final value is 3 🆕🔡▶️👂🏼❗️ ➡️ inputText ``` -我试图让它工作,但当我发现它时我的编译器出现了一些问题。 你也可能会在这里和那里遇到一些小问题。 如果你遇到了,请创建一个[问题][6],这样它就有可能被修复。 +我试图让它工作,我的编译器出现了一些问题,我发现了这个问题。你也可能会在这里和那里遇到一些小问题。如果你遇到了,请创建一个 [议题][6],这样它就有可能被修复。 ### 没有技巧,只有很棒的代码 -虽然我可以了解更多,但我可以向你保证,这段令人惊叹的代码背后的文档非常广泛。尽管我写这篇文章只是为了赶上愚人节的乐趣,但我不得不承认这是有史以来最好的语言之一,因为它教会了你很多非常真实的编程概念。我恳切地建议把它作为一种有趣的方式来教你的一些朋友、孩子,或者是对编码感兴趣的同学。 希望你度过了一个充满乐趣的愚人节! +虽然我可以介绍更多内容,但我可以向你保证,这段令人惊叹的代码背后的文档非常丰富。尽管我写这篇文章只是为了赶上愚人节的乐趣,但我不得不承认这是有史以来最好的语言之一,因为它教会了你很多非常真实的编程概念。我恳切地建议把它作为一种有趣的方式来教你的一些朋友、孩子,或者是对编码感兴趣的同学。希望你度过了一个充满乐趣的愚人节! -------------------------------------------------------------------------------- @@ -179,7 +182,7 @@ via: https://opensource.com/article/23/4/emojicode 作者:[Jessica Cherry][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/) 荣誉推出 @@ -191,3 +194,4 @@ via: https://opensource.com/article/23/4/emojicode [4]: https://www.emojicode.org/docs/guides/ [5]: https://opensource.com/sites/default/files/2023-03/emoji.webp [6]: https://github.com/emojicode/emojicode/issues +[0]: https://img.linux.net.cn/data/attachment/album/202304/07/141230yv2s53itmiw45ots.jpg \ No newline at end of file From 0355fcc6b2b815f7ed7172b54878c0577079b600 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 7 Apr 2023 14:45:00 +0800 Subject: [PATCH 286/318] RP @FYJNEVERFOLLOWS https://linux.cn/article-15700-1.html --- ...5 Open source mind mapping with Draw.io.md | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) rename {translated/tech => published}/20211205 Open source mind mapping with Draw.io.md (77%) diff --git a/translated/tech/20211205 Open source mind mapping with Draw.io.md b/published/20211205 Open source mind mapping with Draw.io.md similarity index 77% rename from translated/tech/20211205 Open source mind mapping with Draw.io.md rename to published/20211205 Open source mind mapping with Draw.io.md index 248d131e28..5ebb760be7 100644 --- a/translated/tech/20211205 Open source mind mapping with Draw.io.md +++ b/published/20211205 Open source mind mapping with Draw.io.md @@ -3,47 +3,43 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "FYJNEVERFOLLOWS" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15700-1.html" 使用开源思维导图 Draw.io ====== -下次你需要头脑风暴、组织想法或计划项目时,不妨试试 Draw.io -![Looking at a map for career journey][1] +> 下次你需要头脑风暴、组织想法或计划项目时,不妨试试 Draw.io。 -地图有一些特别之处。我记得小时候打开托尔金《*霍比特人*》的封面,盯着手绘的中土世界地图,感受简单的图画中蕴含着丰富的可能性。除了描述事物与其他事物之间的关系这一明显目的外,我认为地图在表达可能性方面做得很好。你可以到户外去,沿着这条路或那条路走,如果你这样做了,去想想你将能够看到的所有新的、令人兴奋的事物。 +![][0] -尽管如此,地图并不一定是有价值和充满可能性的文字。有些地图描述了一个思维过程、计划、算法,甚至是一些随机的想法,这些想法拼命地想要组合成一件潜在的艺术作品。称之为“思维导图”、“流程图”或“创意板”。可以用开源的 [Draw.io][2] 应用程序去很容易地制作。 +地图有一些特别之处。我记得小时候打开托尔金《霍比特人》的封面,盯着手绘的中土世界地图,感受简单的图画中蕴含着丰富的可能性。除了描述事物与其他事物之间的关系这一明显目的外,我认为地图在表达可能性方面做得很好。你可以到户外去,沿着这条路或那条路走,如果你这样做了,去想想你将能够看到的所有新的、令人兴奋的事物。 + +尽管如此,地图并不一定是有价值和充满可能性的文字。有些地图描述了一个思维过程、计划、算法,甚至是一些随机的想法,这些想法拼命地想要组合成一件潜在的艺术作品,它们被称之为“思维导图”、“流程图”或“创意板”。可以用开源的 [Draw.io][2] 应用程序去很容易地制作。 ### 安装 Draw.io -Draw.io 被设计为一个开源的在线应用程序,因此你可以将其作为在线应用程序使用,下载[桌面版本][3],或[克隆 Git 存储库][4]并将其托管在您自己的服务器上。 +Draw.io 是一个开源的在线应用程序,因此你可以将其作为在线应用程序使用,下载 [桌面版本][3],或 [克隆 Git 存储库][4] 并将其托管在你自己的服务器上。 -### 使用 Draw.io 进行映射 -当你第一次启动 Draw.io 时,你需要选择保存数据的位置。如果你自己托管 Draw.io,你的选择取决于你可以访问哪些 API 密钥。你可以从几个在线存储服务中为在线公共实例进行选择,这取决于你的帐户。如果你不想把你的数据存储在别人的服务器上,你也可以选择把你的工作保存在本地存储上。如果你还不确定,可以单击 ``稍后决定`` 继续进入应用程序,而无需选择任何内容。 +### 使用 Draw.io 画图 + +当你第一次启动 Draw.io 时,你需要选择保存数据的位置。如果你自己托管 Draw.io,你的选择取决于你可以访问哪些 API 密钥。你可以从几个在线存储服务中为在线公共实例进行选择,这取决于你的帐户。如果你不想把你的数据存储在别人的服务器上,你也可以选择把你的工作保存在本地存储上。如果你还不确定,可以单击 “稍后决定Decide later” 继续进入应用程序,而无需选择任何内容。 Draw.io 的交互界面中间有一个很大的工作空间,左边是主工具栏,顶部是工具栏,右边是属性面板。 ![Draw.io interface][5] -(Seth Kenlon, [CC BY-SA 4.0][6]) - 工作流程很简单: 1. 从左侧工具栏中选择一个形状。 2. 在工作空间中编辑形状。 3. 添加另一个形状,并连接它们。 - - -重复这个过程,你就得到了一张地图。 +重复这个过程,你就得到了一张图。 ![Draw.io example][7] -(Seth Kenlon, [CC BY-SA 4.0][6]) - ### 项目规划 当你第一次接受一项大任务时,你通常对你想要的结果有一个非常清晰的想法。假设你想开始一个社区项目来画一幅壁画。你想要的结果是一幅壁画。它很容易定义,你可以或多或少地在脑海中描绘出结果。 @@ -53,16 +49,15 @@ Draw.io 的交互界面中间有一个很大的工作空间,左边是主工具 这不仅仅适用于绘制壁画、制作戏剧或电影。它几乎适用于任何不平凡的努力。这正是像 Draw.io 这样的应用程序可以帮助绘制的。 以下是如何使用 Draw.io 创建项目流程图: + 1. 从头脑风暴开始。没有什么想法是太小或太大的。为每个想法制作一个框,然后双击 Draw.io 工作空间中的框以输入文本。 2. 一旦在工作空间中你产生了可能想到的所有想法,就可以将它们拖放到相关的组中。我们的目标是创建一些小任务云或集群,因为它们是同一过程的一部分,所以或多或少会一起进行。 - 3. 一旦你确定了相关任务的集群,就为这些任务命名。例如,如果你正在绘制壁画,那么任务可能是 _approval_、_design_、_purchase_、_paint_,这反映出你需要首先获得当地政府的许可,然后设计壁画,然后购买用品,最后绘制壁画。每个任务都有组成部分,但大体上,你现在已经确定了项目的工作流程。 + 3. 一旦你确定了相关任务的集群,就为这些任务命名。例如,如果你正在绘制壁画,那么任务可能是 “许可”、“设计”、“购买”、“绘制”,这反映出你需要首先获得当地政府的许可,然后设计壁画,然后购买用品,最后绘制壁画。每个任务都有组成部分,但大体上,你现在已经确定了项目的工作流程。 4. 用箭头连接主要任务。并不是所有的过程都是完全线性的。例如,在你获得市议会的许可后,一旦你设计了你打算画的东西,你可能必须回到他们那里进行最终批准。这很正常。这是一个循环,有一些来回,但最终,你会突破这个循环,进入下一阶段。 5. 掌握好你的流程图,完成每一项任务,直到你达到最终目标。 ### 思维导图 - - 思维导图往往不是关于进步,而是关于保持某种状态或对许多想法进行展望。例如,假设你已经决定减少生活中的浪费。你对自己能做什么有一些想法,但你想组织和保存你的想法,这样你就不会忘记它们。 以下是如何使用 Draw.io 创建思维导图: @@ -71,12 +66,8 @@ Draw.io 的交互界面中间有一个很大的工作空间,左边是主工具 2. 将你的想法分组或分类。 3. 可以选择将想法与彼此直接相关的箭头连接起来。 - - ![Draw.io waste reduction example][8] -(Seth Kenlon, [CC BY-SA 4.0][6]) - ### 保存你的图表 你可以将图表保存为 PNG、JPG 图像、Draw.io XML 或纯 XML 文件。如果将其另存为 XML,则可以在 Draw.io 中再次打开它进行进一步编辑。导出的图像非常适合与他人共享。 @@ -92,7 +83,7 @@ via: https://opensource.com/article/21/12/open-source-mind-mapping-drawio 作者:[Seth Kenlon][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/) 荣誉推出 @@ -106,3 +97,4 @@ via: https://opensource.com/article/21/12/open-source-mind-mapping-drawio [6]: https://creativecommons.org/licenses/by-sa/4.0/ [7]: https://opensource.com/sites/default/files/uploads/draw-io-example.jpg (Draw.io example) [8]: https://opensource.com/sites/default/files/uploads/draw-io-export.jpg (Draw.io waste reduction example) +[0]: https://img.linux.net.cn/data/attachment/album/202304/07/144214m945y0naawn5zb95.jpg \ No newline at end of file From 5c47e71fb1ab4611f71445e6bb60b1b908303de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:43:35 +0800 Subject: [PATCH 287/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230404.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Li?= =?UTF-8?q?nux=20Terminal=20Basics=208=20Move=20Files=20and=20Directories?= =?UTF-8?q?=20(Cut-Paste=20Operation).md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ove Files and Directories (Cut-Paste Operation).md | 284 ++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 sources/tech/20230404.0 ⭐️⭐️ Linux Terminal Basics 8 Move Files and Directories (Cut-Paste Operation).md diff --git a/sources/tech/20230404.0 ⭐️⭐️ Linux Terminal Basics 8 Move Files and Directories (Cut-Paste Operation).md b/sources/tech/20230404.0 ⭐️⭐️ Linux Terminal Basics 8 Move Files and Directories (Cut-Paste Operation).md new file mode 100644 index 0000000000..e92f9cd477 --- /dev/null +++ b/sources/tech/20230404.0 ⭐️⭐️ Linux Terminal Basics 8 Move Files and Directories (Cut-Paste Operation).md @@ -0,0 +1,284 @@ +[#]: subject: "Linux Terminal Basics #8: Move Files and Directories (Cut-Paste Operation)" +[#]: via: "https://itsfoss.com/move-files-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Terminal Basics #8: Move Files and Directories (Cut-Paste Operation) +====== + +![][1] + +Cut, copy and paste are part of everyday computing life. + +In the previous chapter, you learned about [copying files and folders][2] (directories) in the terminal. + +In this part of the Terminal Basics series, you'll learn about the cut-paste operation (moving) in the Linux terminal. + +### Moving or cut-paste? + +Alright! Cut-paste is not the correct technical term here. It is called moving files (and folders). + +Since you are new to the command line, you may find the term 'moving' confusing. + +When you copy a file to another location using the **cp** command, the source file remains in the same location. + +When you move a file to another location **using the mv command**, the source file no longer remains in the origin location. + +This is the same cut-paste operation (Ctrl+X and Ctrl+V) you do in a graphical file explorer. + +> 📋 Basically, moving files in the command line can be thought same as cut-paste in a graphical environment. + +### Moving files + +Linux has a dedicated mv command (short for move) for moving files and directories to other locations. + +And [using the mv command][3] is quite simple: + +``` +mv source_file destination_directory +``` + +The role of path comes to play here as well. You can use either the [absolute or relative path][4]. Whichever suits your need. + +Let's see this with an example. **You should practice along with it by replicating the example scenarios on your system**. + +This is the directory structure in the example: + +``` +[email protected]:~/moving_files$ tree +. +├── dir1 +│   ├── file_2 +│   └── file_3 +├── dir2 +│   └── passwd +├── dir3 +├── file_1 +├── file_2 +├── file_3 +├── file_4 +├── passwd +└── services + +3 directories, 9 files +``` + +Now, let's say I want to move the `file_1` to `dir3`. + +``` +mv file_1 dir3 +``` + +![Example of moving files in Linux using the mv command][5] + +#### Moving multiple files + +You can move multiple files to another location in the same mv command: + +``` +mv file1 file2 fileN destination_directory +``` + +Let's continue our example scenario to move multiple files. + +``` +mv file_2 file_3 file_4 dir3 +``` + +![Example of moving multiple files in Linux][6] + +> 🖥️ Move the files back to the current directory from + +``` +dir3 +``` + +. We need them in the next examples. + +#### Moving files with caution + +If the destination already has files with the same name, the destination files will be replaced immediately. At times, you won't want that. + +Like the cp command, the mv command also has an interactive mode with option `-i`. + +And the purpose is the same. Ask for confirmation before replacing the files at the destination. + +``` +[email protected]:~/moving_files$ mv -i file_3 dir1 +mv: overwrite 'dir1/file_3'? +``` + +You can press N to deny replacement and Y or Enter to replace the destination file. + +![Example of moving interactively in Linux][7] + +#### Move but only update + +The mv command comes with some special options. One of them is the update option `-u`. + +With this, the destination file will only be replaced if the file being moved is newer than it. + +``` +mv -u file_name destination_directory +``` + +Here's an example. file_2 was modified at 10:39 and file_3 was modified at 10:06. + +``` +[email protected]:~/moving_files$ ls -l file_2 file_3 +-rw-rw-r-- 1 abhishek abhishek 0 Apr 4 10:39 file_2 +-rw-rw-r-- 1 abhishek abhishek 0 Apr 4 10:06 file_3 +``` + +In the destination directory dir1, file_2 was last modified at 10:37 and file_3 was modified at 10:39. + +``` +[email protected]:~/moving_files$ ls -l dir1 +total 0 +-rw-rw-r-- 1 abhishek abhishek 0 Apr 4 10:37 file_2 +-rw-rw-r-- 1 abhishek abhishek 0 Apr 4 10:39 file_3 +``` + +In other words, in the destination directory, the file_2 is older and file_3 is newer than the ones being moved. + +It also means that file_3 won't me moved while as file_2 will be updated. You can verify it with the timestamps of the files in the destination directory after running the mv command. + +``` +[email protected]:~/moving_files$ mv -u file_2 file_3 dir1 +[email protected]:~/moving_files$ ls -l dir1 +total 0 +-rw-rw-r-- 1 abhishek abhishek 0 Apr 4 10:39 file_2 +-rw-rw-r-- 1 abhishek abhishek 0 Apr 4 10:39 file_3 +[email protected]:~/moving_files$ date +Tue Apr 4 10:41:16 AM IST 2023 +[email protected]:~/moving_files$ +``` + +As you can see, the move command was executed at 10:41 and only the timestamp of file_2 has been changed. + +![Using move command with update option][8] + +> 💡 You can also use the backup option + +``` +-b +``` + +. If the destination file is being replaced, it will automatically create a backup with the + +``` +filename~ +``` + + pattern. + +#### Troubleshoot: Target is not a directory + +If you are moving multiple files, the last argument must be a directory. Otherwise, you'll encounter this error: + +``` +target is not a directory +``` + +Here, I create a file which is named `dir`. The name sounds like a directory, but it is a file. And when I try to move multiple files to it, the obvious error is there: + +![Handling target is not a directory error in Linux][9] + +But what if you move a single file to another file? In that case, the target file is replaced by the source file's content while the source file is renamed as the target file. More on this in later sections. + +### Moving directories + +So far, you have seen everything about moving files. How about moving directories? + +The cp and rm commands used recusrive option -r to copy and delete folders respectively. + +However, there is no such requirement for the mv command. You can use the mv command as it is for moving directories. + +``` +mv dir target_directory +``` + +Here's an example where I move the `dir2` directory to `dir3`. And as you can see, `dir2` along with its content is moved to `dir3`. + +![Moving folders in Linux command line][10] + +You can move multiple directories the same way. + +### Rename files and directories + +If you want to rename a file or directory, you can use the same mv command. + +``` +mv filename new_name_in_same_or_new_location +``` + +Let's say you want to rename a file in the same location. Here's an example where I rename `file_1` to `file_one` in the same directory. + +![Rename files with mv command][11] + +You can also move and rename the files. You just have to provide the directory path and the file name of the destination. Here, I rename `services` file to `my_services` while moving it to `dir3`. + +``` +[email protected]:~/moving_files$ ls +dir dir1 dir3 file_2 file_3 file_one passwd services +[email protected]:~/moving_files$ mv services dir3/my_services +[email protected]:~/moving_files$ ls dir3 +dir2 my_services +``` + +> 📋 You cannot rename multiple files directly with mv command. You have to combine it with other commands like find etc.  + +### Test your knowledge + +Time to practice what you just learned. + +Create a new folder to practice the exercise. In here, create a directory structure like this: + +``` +. +├── dir1 +├── dir2 +│   ├── dir21 +│   ├── dir22 +│   └── dir23 +└── dir3 +``` + +Copy the file /etc/passwd to the current directory. Now rename it `secrets`. + +Make three new files named `file_1`, `file_2` and `file_3`. Move all the files to `dir22`. + +Now move the `dir22` directory to `dir3`. + +Delete all contents of `dir2` now. + +In the penultimate chapter of the Terminal Basics series, you'll learn about editing files in the terminal. Stay tuned. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/move-files-linux/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/content/images/2023/03/linux-mega-packt.webp +[2]: https://itsfoss.com/copy-files-directory-linux/ +[3]: https://linuxhandbook.com/mv-command/?ref=itsfoss.com +[4]: https://linuxhandbook.com/absolute-vs-relative-path/?ref=itsfoss.com +[5]: https://itsfoss.com/content/images/2023/04/moving-files-linux.png +[6]: https://itsfoss.com/content/images/2023/04/moving_multiple_files_linux.png +[7]: https://itsfoss.com/content/images/2023/04/move-interactively-linux.png +[8]: https://itsfoss.com/content/images/2023/04/move-command-update-option.png +[9]: https://itsfoss.com/content/images/2023/04/target-is-not-a-directory-error-linux.png +[10]: https://itsfoss.com/content/images/2023/04/moving-directories.png +[11]: https://itsfoss.com/content/images/2023/04/rename-file-with-mv-command.png From 8a72d4c629292868798e0c88e3a715a7f6797724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:44:07 +0800 Subject: [PATCH 288/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230404.1=20=E2=AD=90=EF=B8=8F=20How=20to=20resolve?= =?UTF-8?q?=20Git=20merge=20conflicts.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1 ⭐️ How to resolve Git merge conflicts.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sources/tech/20230404.1 ⭐️ How to resolve Git merge conflicts.md diff --git a/sources/tech/20230404.1 ⭐️ How to resolve Git merge conflicts.md b/sources/tech/20230404.1 ⭐️ How to resolve Git merge conflicts.md new file mode 100644 index 0000000000..623b64dfbb --- /dev/null +++ b/sources/tech/20230404.1 ⭐️ How to resolve Git merge conflicts.md @@ -0,0 +1,52 @@ +[#]: subject: "How to resolve Git merge conflicts" +[#]: via: "https://opensource.com/article/23/4/resolve-git-merge-conflicts" +[#]: author: "Agil Antony https://opensource.com/users/agantony" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to resolve Git merge conflicts +====== + +Suppose you and I are working on the same file called **index.html**. I make some changes to the file, commit them, and push the changes to the remote Git repository. You also make some changes to the same file, commit them, and start pushing the changes to the same Git repository. However, Git detects a conflict because the changes you made conflict with the changes I made. + +Here's how you can resolve the conflict: + +- Fetch and merge the latest changes from the remote repository:`$ git pull` +- Identify the one or more conflicting files:`$ git status` +- Open the conflicting file using a text editor:`$ vim index.html` +- Resolve the conflict. The conflicting changes are marked by `<<<<<<< HEAD` and `>>>>>>>`. You need to choose which changes to keep and which to discard. Manually edit the file to combine the conflicting changes. Here's an example:`<<<<<<< HEAD +
+

Sample text 1

+
+======= +
+

Sample text 2

+
+>>>>>>> feature-branch`In this example, I changed the website heading to `Sample text 1`, while you have changed the heading to `Sample text 2`. Both changes have been added to the file. You can now decide which heading to keep or edit the file to combine the changes. In either case, remove the markers that indicate the beginning and end of the changes, leaving only the code you want:`
+

Sample text 2

+
` +- Save all of your changes, and close your editor. +- Add the file to the staging area:`$ git add index.html` +- Commit the changes:`$ git commit -m "Updated h1 in index.html"`This command commits the changes with the message `Resolved merge conflict`. +- Push the changes to the remote repository:`$ git push` + +### Resolution + +Merge conflicts are a good reason to focus your changes on code. The more you change in a file, the greater the potential for conflict. You should make more commits with fewer changes each. You should avoid making a monolithic change that combines multiple feature enhancements or bug fixes into one. Your project manager will thank you, too, because commits with clear intent are easier to track. A Git merge conflict may seem intimidating at first, but now that you know how to do it, you'll see that it's easily resolved. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/resolve-git-merge-conflicts + +作者:[Agil Antony][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/agantony +[b]: https://github.com/lkxed/ From 2a82894dc657ae77290ddac8861aa8ee0f759d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:45:24 +0800 Subject: [PATCH 289/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230405.1=20=E2=AD=90=EF=B8=8F=20Linux=20Mint=20Team?= =?UTF-8?q?=20Announced=20=E2=80=9CStyles=E2=80=9D=20for=20Cinnamon=20Desk?= =?UTF-8?q?top.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eam Announced “Styles” for Cinnamon Desktop.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sources/news/20230405.1 ⭐️ Linux Mint Team Announced “Styles” for Cinnamon Desktop.md diff --git a/sources/news/20230405.1 ⭐️ Linux Mint Team Announced “Styles” for Cinnamon Desktop.md b/sources/news/20230405.1 ⭐️ Linux Mint Team Announced “Styles” for Cinnamon Desktop.md new file mode 100644 index 0000000000..71ae619894 --- /dev/null +++ b/sources/news/20230405.1 ⭐️ Linux Mint Team Announced “Styles” for Cinnamon Desktop.md @@ -0,0 +1,52 @@ +[#]: subject: "Linux Mint Team Announced “Styles” for Cinnamon Desktop" +[#]: via: "https://debugpointnews.com/cinnamon-styles-announcement/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Mint Team Announced “Styles” for Cinnamon Desktop +====== + +**The Linux Mint team has introduced “styles” in Cinnamon desktop for the upcoming release, Linux Mint 21.2, allowing for easier customization and a visually appealing interface.** + +In their monthly update post, the Linux Mint team gave a sneak peek of what’s in store for the upcoming release, Linux Mint 21.2. One of the exciting new features that caught the eye was the introduction of “styles” in the Cinnamon desktop. + +The next iteration of Cinnamon will present a novel concept known as “styles”. Styles come in three modes: mixed, dark, and light, and each of these modes can have colour “variants”. A variant is a combination of themes that blend together. The goal of styles, modes, and variants is to make it easier to switch to a beautiful-looking interface and quickly browse through available options. You won’t have to find matching elements because styles will do that for you, no matter how many individual themes you have installed. + +In the style combo, you will see popular styles such as Adwaita, Mint-X, Mint-Y, among others. Just select one mode, and the colour variants will be displayed. You can switch between styles, modes, and colour variants with a few clicks of a button. However, if you prefer a specific combination of not proposed themes, you can click on “Advanced settings” and choose individual themes. + +![Adwaita Cinnamon Style][1] + +![Mint-Y Cinnamon Style][2] + +![Mint-L Cinnamon Style][3] + +The best part is that everything will work out of the box for everybody. The Linux Mint team wants Cinnamon styles to work well for everyone, including third-party theme artists and other distributions. Cinnamon styles are defined in JSON files in `/usr/share/cinnamon/styles.d/`. These files are read alphabetically, and styles can override one another if they have the same name. This approach lets distributions or theme artists define their styles while also using Cinnamon’s style definitions. + +This entire feature should arrive as part of [Linux Mint 21.2 “Victoria” release][4], due on June 2023. If you want to contribute or want to develop your own theme for Mint, you can create a post in Mint forums. + +Linux Mint users have long awaited this new feature and are sure to make the desktop environment more visually appealing and customizable. We can’t wait to see what the Linux Mint team has in store for us with the upcoming release! + +Image credits: Linux Mint team, Via [announcement][5] + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/cinnamon-styles-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://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://debugpointnews.com/wp-content/uploads/2023/04/Adwaita-Cinnamon-Style.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2023/04/Mint-Y-Cinnamon-Style.jpg +[3]: https://debugpointnews.com/wp-content/uploads/2023/04/Mint-L-Cinnamon-Style.jpg +[4]: https://debugpointnews.com/linux-mint-21-2-announcement/ +[5]: https://blog.linuxmint.com/?p=4486 \ No newline at end of file From 436b56b0568ae713af3b5c3e7082abc7f25ede94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:46:42 +0800 Subject: [PATCH 290/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?talk]:=2020230405.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Op?= =?UTF-8?q?en=20source=20community=20analysis=20with=20actionable=20insigh?= =?UTF-8?q?ts.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rce community analysis with actionable insights.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/talk/20230405.2 ⭐️⭐️ Open source community analysis with actionable insights.md diff --git a/sources/talk/20230405.2 ⭐️⭐️ Open source community analysis with actionable insights.md b/sources/talk/20230405.2 ⭐️⭐️ Open source community analysis with actionable insights.md new file mode 100644 index 0000000000..2f1f16ef83 --- /dev/null +++ b/sources/talk/20230405.2 ⭐️⭐️ Open source community analysis with actionable insights.md @@ -0,0 +1,86 @@ +[#]: subject: "Open source community analysis with actionable insights" +[#]: via: "https://opensource.com/article/23/4/open-source-community-analysis-actionable-insights" +[#]: author: "Cali Dolfi https://opensource.com/users/cdolfi" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source community analysis with actionable insights +====== + +Organizations are increasingly adopting open source software development models and open source aspects of organizational culture. As a result, interest in how open source communities succeed is reaching an all-time high. + +Until recent years, measuring the success of open source communities was haphazard and anecdotal. Ask someone what makes one community more successful than another, and you will likely get observations such as, "The software is great, so the community is too," or "The people in this community just mesh well." The problem with these evaluations is not that they are necessarily wrong, but that they don't provide information that others can use to reproduce successful results. What works for one community is not necessarily going to work for another. + +Research universities, businesses, and other organizations interested in determining what makes open source projects successful have begun to collaborate on finding ways to measure aspects of community in a qualitative and data-driven way. One of the more prominent efforts is [CHAOSS][1], a Linux Foundation project focused on creating metrics, metrics models, and software to better understand open source community health on a global scale. Unhealthy projects hurt both their communities and the organizations relying on those projects, so identifying measures of robustness isn't just an interesting project. It's critical to the open source ecosystem. + +CHAOSS is a great tool for looking at a pressing set of questions. First, how should [community health][2] be defined? Second, as metrics begin to take shape, how can we transition from reacting to one-off requests for data-based information about a given community to creating an entire process pipeline, literally and theoretically, for this work? The development of [Project Aspen][3] is the culmination of this pipeline, which will ultimately bring community data analysis to everyone. + +### Collecting community data + +In 2017, Harish Pillay created Prospector with the aim of presenting information from core data sources in a graphical dashboard. This resonated with [CHAOSS][1], which had a goal to better understand the health of open source communities. Prospector was donated to CHAOSS in 2017. Project Aspen builds upon that work. + +Aspen is backed by a database generated from the [Augur Project][4], a CHAOSS-based project that collects, organizes, and validates the completeness of open source software trace data. With this database, we can store all types of data points around the Git-based repositories from which we collect data, such as pull requests, reviews, and contributors. The data is already collected and cleaned, which, from a data science perspective, is where the most significant time drains occur. The continued data collection allows us to act agilely when questions arise. Over time, we will grow our pipeline to collect data from many other avenues in addition to Git-based repositories, such as Stack Overflow and Reddit. + +As Augur regularly collects data on our selected repositories, the data is updated within a week and cleaned. With all the data collection and most preprocessing already completed, we are much better equipped to answer the analysis questions we receive and generate our own questions too. No matter where the questions come from, the same analysis process is necessary. + +For every visualization or analysis, community leaders need to consider these questions: + +- What perspective are you looking to gain or give? +- What question can you directly answer from the data available to you? +- What assumptions am I making, and what biases may I hold? +- Who can I work with to get feedback and a different perspective? + +Everyone's individual experiences and expertise impact the lens through which they look at a problem. Some people have experience in code review, while others' expertise lies in community management. How can we start comparing community aspects like apples to apples instead of oranges? Quantifying what people in different roles in open source are looking at when examining a project community can address this problem. + +Community metrics empower all members to communicate in a common domain and share their unique expertise. Different perspectives lead to further insights, and Project Aspen uses data to make those insights more accessible to the entire community through data visualizations. + +### Assumptions and analysis + +Analysis is a tool for narrative building, not an oracle. Data analysis can help take the ambiguity and bias out of inferences we make, but interpreting data is not simple. A bar chart showing an increase in commits over time is not, by itself, a positive indicator of community health. Nor is a stable or decreasing number always a negative sign. What any chart gives you is more information and areas to explore. + +For instance, you could build from a commits-over-time visualization, creating a graph that plots the "depth" of a commit, perhaps defined as the number of line changes. Or you could dive into the specific work of your community to see what these trends actually represent. + +Comparing an issues-over-time graph (**Figure 1**) to an issues staleness graph (**Figure 2**) is a great illustration of why perspective matters. These visualizations reflect the same data but reveal completely different insights. From the issue staleness graph, we can see not only how many issues are open, but how many have been open for various time intervals. + +This figure shows that over many months, there's relative consistency in how many issues are opened and closed: + +![A graph showing relative consistency in how many issues are opened and closed.][5] + +On the other hand, this figure highlights the growing number of issues that have been open for over 30 days: + +![A graph showing issues over the past 30 days.][6] + +The same data populates each graph, but a fuller picture can only come from seeing both. By adding the perspective of the growth in issue staleness, communities can clearly see that there is a growing backlog of issues and take steps to understand what it means for their community. At that point, they will be well-equipped to devise a strategy and prioritize actions based on both good data and thoughtful analysis. + +### Using data wisely + +Including multiple points of view also provides much-needed insight and helps guard against false positives and gamification. Economists have a saying: "When a measure becomes a target, it ceases to be a good measure." In other words, measures used to reward performance create an incentive to manipulate measurement. As people learn which measures bring attention, money, or power, open source communities run the risk of encouraging actions taken just to play the system. Using multiple perspectives to define success will keep your metrics meaningful, so they have genuine value in maintaining your community. + +To that end, Project Aspen is an exciting tool for building your own knowledge and making better decisions about communities. Whether you want to understand where your community is most vulnerable or the seasonality of activity within the community, having quality data to inform your analysis is essential. To see some of the work being done around community data analysis, please check out our [Git repositories][3] or the demo [8Knot][7] app instance. + +_This article was originally published with [Red Hat Research Quarterly][8] and has been republished with the author's permission._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/open-source-community-analysis-actionable-insights + +作者:[Cali Dolfi][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/cdolfi +[b]: https://github.com/lkxed/ +[1]: https://chaoss.community/ +[2]: https://opensource.com/article/22/11/community-metrics +[3]: https://github.com/oss-aspen +[4]: https://github.com/chaoss/augur +[5]: https://opensource.com/sites/default/files/2023-03/100000010000046C00000235638F4D10A6C6F100.webp +[6]: https://opensource.com/sites/default/files/2023-03/100000010000046C0000025A21BB9C28E7B4B93C.webp +[7]: https://eightknot.osci.io/ +[8]: https://research.redhat.com/blog/article/measuring-open-source-success-developing-analysis-for-actionable-insights/?intcmp=7013a000002qLH8AAM \ No newline at end of file From 2e8a43d9e6d931b51e046b3e18efafc4fd87cda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:47:35 +0800 Subject: [PATCH 291/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230405.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20BA?= =?UTF-8?q?SIC=20vs.=20FORTRAN=2077=20Comparing=20programming=20blasts=20f?= =?UTF-8?q?rom=20the=20past.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...N 77 Comparing programming blasts from the past.md | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 sources/tech/20230405.3 ⭐️⭐️ BASIC vs. FORTRAN 77 Comparing programming blasts from the past.md diff --git a/sources/tech/20230405.3 ⭐️⭐️ BASIC vs. FORTRAN 77 Comparing programming blasts from the past.md b/sources/tech/20230405.3 ⭐️⭐️ BASIC vs. FORTRAN 77 Comparing programming blasts from the past.md new file mode 100644 index 0000000000..06a7f71ee4 --- /dev/null +++ b/sources/tech/20230405.3 ⭐️⭐️ BASIC vs. FORTRAN 77 Comparing programming blasts from the past.md @@ -0,0 +1,182 @@ +[#]: subject: "BASIC vs. FORTRAN 77: Comparing programming blasts from the past" +[#]: via: "https://opensource.com/article/23/4/basic-vs-fortran-77" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +BASIC vs. FORTRAN 77: Comparing programming blasts from the past +====== + +If you grew up with computers in the 1970s and 1980s, as I did, you probably learned a common programming language for personal computers called BASIC, or the Beginner's All-purpose Symbolic Instruction Code. You could find BASIC implementations on every personal computer of the era, including the TRS-80, Apple II, and the IBM PC. Back then, I was a self-taught BASIC programmer, experimenting with AppleSoft BASIC on the Apple II before moving to GW-BASIC on the IBM PC and, later, to QuickBASIC on DOS. + +But once upon a time, a popular language for scientific programming was FORTRAN, short for FORmula TRANslation. Although since the 1990 specification of the language, the name is more commonly stylized as "Fortran." + +When I studied physics as a university undergraduate student in the early 1990s, I leveraged my experience in BASIC to learn FORTRAN 77. That was when I realized that BASIC derived many of its concepts from FORTRAN. To be clear, FORTRAN and BASIC differ in lots of other ways, but I found that knowing a little BASIC helped me to learn FORTRAN programming quickly. + +I want to show some similarities between the two languages by writing the same program in both. I'll explore the `FOR` loop in BASIC and FORTRAN 77 by writing a sample program to add a list of numbers from 1 to 10. + +### Bywater BASIC + +BASIC came in many flavors, depending on your computer, but the overall language remained the same. One version of BASIC that I like is [Bywater BASIC][1], an open source implementation of BASIC available for different platforms, including Linux and DOS. + +To use Bywater BASIC on FreeDOS, you must first [install the package][2] from the FreeDOS 1.3 Bonus CD. To run it, go into the C: directory and type `bwbasic`. This command starts the BASIC interpreter. You can enter your program from this prompt: + +``` +bwBASIC: +``` + +Bywater BASIC uses an older BASIC programming standard that requires you to write every program instruction with a line number. Think of a line number like an index. You can easily refer to any instruction in the program with line numbers. As you type the program into the Bywater BASIC interpreter, add the line number before each instruction: + +``` +bwBASIC: 10 print "Add the numbers from 1 to 10 ..." +bwBASIC: 20 sum = 0 +bwBASIC: 30 for i = 1 to 10 +bwBASIC: 40 sum = sum + i +bwBASIC: 50 next i +bwBASIC: 60 print sum +bwBASIC: 70 end +``` + +Use the `list` command to view the program you have entered into the interpreter: + +``` +bwBASIC: list +10 print "Add the numbers from 1 to 10 ..." +20 sum = 0 +30 for i = 1 to 10 +40 sum = sum + i +50 next i +60 print sum +70 end +``` + +This short program demonstrates the `FOR` loop in BASIC. `FOR` is the most fundamental loop construct in any programming language, allowing you to iterate over a set of values. The general syntax of the `FOR` loop in Bywater BASIC looks like this: + +``` +FOR var = start TO end +``` + +In this example program, the instruction `for i = 1 to 10` starts a loop that iterates through the values 1 to 10. At each pass through the loop, the variable `i` is set to the new value. + +In BASIC, all instructions up to the next instruction are executed as part of the `FOR` loop. Because you can put one `FOR` loop inside another, Bywater BASIC uses the syntax `NEXT variable` to specify which loop variable to iterate. + +Type `run` at the prompt to execute the program: + +``` +bwBASIC: run +Add the numbers from 1 to 10 ... +55 +``` + +Bywater BASIC is called a BASIC interpreter because you can only run the program from inside the Bywater BASIC environment. This means the interpreter does all the hard work of interacting with the operating system, so your program doesn't need to do that on its own, with the trade-off that the program runs a little slower in the interpreted environment than it might if it were a compiled program. + +### FreeBASIC + +Another popular implementation of BASIC is [FreeBASIC][3], an open source BASIC compiler for several platforms, including Linux and DOS. To use FreeBASIC, you'll need to install the FreeBASIC package from the FreeDOS 1.3 Bonus CD, then change into the C: directory where you'll find the FreeBASIC programs. + +FreeBASIC is a compiler, so you first create a source file with your program instructions, then run the compiler with the source code to create a program you can run. I wrote a similar version of the "add the numbers from 1 to 10" program as this BASIC file, which I saved as `sum.bas`: + +``` +dim sum as integer +dim i as integer +print "Add the numbers from 1 to 10 ..." +sum = 0 +for i = 1 to 10 +sum = sum + i +next +print sum +end +``` + +If you compare this code to the Bywater BASIC version of the program, you may notice that FreeBASIC doesn't require line numbers. FreeBASIC implements a more modern version of BASIC that makes it easier to write programs without keeping track of line numbers. + +Another key difference is that you must define or declare your variables in your source code. Use the `DIM` instruction to declare a variable in FreeBASIC, such as `dim sum as integer`, to define an integer variable called `sum`. + +Now you can compile the BASIC program using `fbc` on the command line: + +``` +C:\DEVEL\FBC> fbc sum.bas +``` + +If your code doesn't have any errors in it, the compiler generates a program that you can run. For example, my program is now called `sum`. Running my program adds up the numbers from 1 to 10: + +``` +C:\DEVEL\FBC> sum +Add the numbers from 1 to 10 ... +55 +``` + +### FORTRAN 77 + +The FORTRAN programming language is like a hybrid between old-style and modern BASIC. FORTRAN came before BASIC, and BASIC clearly took inspiration from FORTRAN, just as later versions of FORTRAN took cues from BASIC. You write FORTRAN programs as source code in a file but you don't use line numbers everywhere. However, FORTRAN 77 does use line numbers (called labels) for certain instructions, including the `FOR` loop. Although in FORTRAN 77, the `FOR` is actually called a `DO` loop, it does the same thing and has almost the same usage. + +In FORTRAN 77, the `DO` loop syntax looks like this: + +``` +DO label var = start, end +``` + +This situation is one of the instances where you need a line number to indicate where the `DO` loop ends. You used a `NEXT` instruction in BASIC, but FORTRAN requires a line label instead. Typically, that line is a `CONTINUE` instruction. + +Look at this sample FORTRAN program to see how to use `DO` to loop over a set of numbers. I saved this source file as `sum.f`: + +``` +PROGRAM MAIN + INTEGER SUM,I + PRINT *, 'ADD THE NUMBERS FROM 1 TO 10 ...' + SUM = 0 + DO 10 I = 1, 10 + SUM = SUM + I + 10 CONTINUE + PRINT *, SUM + END +``` + +In FORTRAN, every program needs to start with the PROGRAM instruction, with a name for the program. You might name this program `SUM`, but then you cannot use the variable `SUM` later in the program. When I learned FORTRAN, I borrowed from C programming and started all of my FORTRAN programs with `PROGRAM MAIN`, like the `main()` function in C programs, because I was unlikely to use a variable called `MAIN`. + +The `DO` loop in FORTRAN is similar to the `FOR` loop in BASIC. It iterates over values from 1 to 10. The variable `I` gets the new value at each pass over the loop. This allows you to add each number from 1 to 10 and print the sum when you're done. + +You can find FORTRAN compilers for every platform, including Linux and DOS. FreeDOS 1.3 includes the OpenWatcom FORTRAN compiler on the Bonus CD. On Linux, you may need to install a package to install GNU Fortran support in the GNU Compiler Collection (GCC). On Fedora Linux, you use the following command to add GNU Fortran support: + +``` +$ sudo dnf install gcc-gfortran +``` + +Then you can compile `sum.f` and run the program with these commands: + +``` +$ gfortran -o sum sum.f +$ ./sum +ADD THE NUMBERS FROM 1 TO 10 ... +55 +``` + +### A few differences + +I find that FORTRAN and BASIC are very similar, but with some differences. The core languages are different, but if you know a little of BASIC, you can learn FORTRAN. And if you know some FORTRAN, you can learn BASIC. + +If you want to explore both of these languages, here are a few things to keep in mind: + +- **FORTRAN 77 uses all uppercase,** but later versions of FORTRAN allow mixed cases as long as you use the same capitalization for variables, functions, and subroutines. Most implementations of BASIC are case-insensitive, meaning you can freely mix uppercase and lowercase letters. +- **There are many different versions of BASIC,** but they usually do the same thing. If you learn one BASIC implementation, you can easily learn how to use a different one. Watch for warnings or error messages from the BASIC interpreter or compiler, and explore the manual to find the differences. +- **Some BASIC implementations require line numbers**, such as Bywater BASIC and GW-BASIC. More modern BASIC versions allow you to write programs without line numbers. FreeBASIC requires the `-lang` deprecated option to compile programs with line numbers. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/basic-vs-fortran-77 + +作者:[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://sourceforge.net/projects/bwbasic/ +[2]: https://opensource.com/article/21/6/freedos-package-manager +[3]: https://www.freebasic.net/ \ No newline at end of file From 41467e7f56d6d0cf652447bc94b14b0b1955ba44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:48:25 +0800 Subject: [PATCH 292/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230405.4=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ou?= =?UTF-8?q?r=20favorite=20fonts=20for=20the=20Linux=20terminal.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️ Our favorite fonts for the Linux terminal.md | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 sources/tech/20230405.4 ⭐️⭐️ Our favorite fonts for the Linux terminal.md diff --git a/sources/tech/20230405.4 ⭐️⭐️ Our favorite fonts for the Linux terminal.md b/sources/tech/20230405.4 ⭐️⭐️ Our favorite fonts for the Linux terminal.md new file mode 100644 index 0000000000..2f92ca0cd4 --- /dev/null +++ b/sources/tech/20230405.4 ⭐️⭐️ Our favorite fonts for the Linux terminal.md @@ -0,0 +1,149 @@ +[#]: subject: "Our favorite fonts for the Linux terminal" +[#]: via: "https://opensource.com/article/23/4/linux-terminal-fonts" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Our favorite fonts for the Linux terminal +====== + +Terminal emulators came up as a topic for me recently, and it got me thinking: What's everyone's favorite terminal font? + +So I asked Opensource.com contributors to share what font they like to use. Here are their answers. + +### VT323 + +I like to use a different font ([VT323][1]) in my GNOME Terminal than the font I use (Source Code Pro) in my programming editors or other apps that use a monospace font. I just like the look of the classic VT-style font. + +Sometimes, I switch to the original IBM EGA font, because to my eye it looks really nice. But I associate EGA with DOS, and I associate VT323 with classic Unix terminals, so I use VT323 most of the time. Here's my screenshot of GNOME Terminal using VT323 as the monospace font: + +![gnome-terminal1108×926 output][2] + +I set up the terminal using VT323 at 24 pt, which gives a nice big window. If I'm going to bring up a terminal window, I want to really use it to do real work, not just do one thing and exit. I'm probably going to stay in that terminal window for a while, so it should be big and easy to see. I also prefer 80x25, because I'm an old DOS command line guy and 25 lines looks "right" to my eyes: + +![preference profile screen - text appearance][3] + +**—[Jim Hall][4]** + +### Monospaced fonts + +I don't know that I have a specific font that I use. I usually use either [DejaVu][5] or [Liberation][6] Mono. I like monospaced fonts because they're easier to read. Even then, I don't want the letters to be too close together. The main thing is being able to tell a small "L" from the number 1, Q from O, and so on. It's also nice to have all special characters stand out clearly. + +I also like a good contrast between the font and background, so I set the background to black and characters to white. + +**—[Greg Pittman][7]** + +### Hack + +I like to use monospaced fonts, particularly for the terminal and coding because they're easier to read. I've been using the [Hack][8] font family for years. It provides a nice monospace font combined with additional glyphs and Powerline characters that I can use to display status on the command line. + +![Command line][9] + +Here's the font preview generated with [Fontpreview tool][10]. + +![Display of font A-Z and the numbers][11] + +**—[Ricardo Gerardi][12]** + +### Victor Mono + +I've been using [Victor Mono][13] for both my terminal and IDE for a few years. It's perhaps a bit of an acquired taste, because the italic characters are in a monospace cursive script. I like this because code comments have a distinct look that's noticeably different from the rest of the code. Here's what it looks like in a terminal: + +![terminal font is italic characters in a monospace cursive script][14] + +I also use the Solarized Dark color scheme for both my IDE and the terminal. If I could, anything work or code related would all use the same color scheme, and the same fonts, so it all looks uniform. I've gone through various fonts over the years, but I always try to use the same thing in my terminal as in my IDE. + +**—[Chris Reynolds][15]** + +### Monaco + +At the moment, Monaco regular at 16 pt (so much better than 12 or 14 pt fonts). + +**—[Jenny Panighetti][16]** + +### Keeping it pretty in pink + +This reminds me of the time I pranked the other devs on my team by making all of their terminals pink (I was the only woman). It was like a baby pink background with hot pink text. + +I like to make my personal terminals pretty, but for work I leave it white on black and just make the font around 16 pt because I appreciate the larger font size. + +I just leave my terminal set to SF Mono font, but I make it bolder and bump it up a few points so I can see it better. My favorite colors to use are pink or a nice aqua blue color. I also like the default style the terminal has, called "Novel". + +![Two open terminals, one pink and one aqua blue][17] + +**—[RachieVee][18]** + +### Let's ask ChatGPT + +For the heck of it, I decided to ask [ChatGPT][19]. Here was its response: + +> As a language model, I do not have personal preferences or the ability to have a favorite font. However, some popular terminal fonts include Monospace, Consolas, and Inconsolata. These fonts are popular because they are easy to read, have clear distinctions between different characters, and are highly legible even at small font sizes. Additionally, they are designed to work well with a variety of different operating systems and terminals, making them versatile choices for developers and users alike. + +I generated this text in part with GPT-3, OpenAI's large-scale language-generation model. Upon generating draft language, the author reviewed, edited, and revised the language to my own liking and takes ultimate responsibility for the content of this publication. + +**—[Stephanie Brinley][20]** + +### Fantasque Sans Mono + +``` +$ grep font ~/.Xdefaults +URxvt*font: xft:FantasqueSansMono-Regular:pixelsize=12:antialias=true +``` + +I don't remember when I settled on [Fantasque Sans Mono][21], but I guess it's been my default for the past 8 years now, both in [Rxvt][22] and Konsole. I don't know what font I'm using in my GNOME terminal. Probably whatever the default is on GNOME. + +**—[Seth Kenlon][23]** + +### Jetbrains Mono + +Lately, I have Tilix set as my default terminal. My Tilix config has similar settings to what Jim Hall uses. The few differences are: + +- Cursor shape is underline instead of a block +- Font is [Jetbrains Mono][24] Nerd Font Mono Medium 14 + +![Black terminal with blue text][25] + +**—[Alan Formy-Duval][26]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/linux-terminal-fonts + +作者:[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://fontsource.org/fonts/vt323 +[2]: https://opensource.com/sites/default/files/2023-01/gnome-terminal1108%C3%97926.png +[3]: https://opensource.com/sites/default/files/2023-01/gnome-terminal-vt323848%C3%97661.png +[4]: https://opensource.com/users/jim-hall +[5]: https://fontsource.org/fonts/dejavu-mono +[6]: https://github.com/liberationfonts +[7]: https://opensource.com/users/greg-p +[8]: https://sourcefoundry.org/hack/ +[9]: https://opensource.com/sites/default/files/2023-01/Geradi%201.png +[10]: https://github.com/sdushantha/fontpreview +[11]: https://opensource.com/sites/default/files/2023-01/fontpreview_default.png +[12]: https://opensource.com/users/rgerardi +[13]: https://rubjo.github.io/victor-mono/ +[14]: https://opensource.com/sites/default/files/2023-01/reynolds1.png +[15]: https://opensource.com/users/jazzsequence +[16]: https://twitter.com/elvenjen +[17]: https://opensource.com/sites/default/files/2023-01/pink-blue.webp +[18]: https://opensource.com/users/rachievee +[19]: https://opensource.com/article/23/2/chatgpt-vs-community +[20]: https://opensource.com/users/sbrinley +[21]: https://github.com/belluzj/fantasque-sans +[22]: https://opensource.com/article/19/10/why-use-rxvt-terminal +[23]: https://opensource.com/users/seth +[24]: https://www.jetbrains.com/lp/mono/ +[25]: https://opensource.com/sites/default/files/2023-01/alan.png +[26]: https://opensource.com/users/alanfdoss From b69b90fefd8b757d6870353d7e0bf78d63467937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:49:19 +0800 Subject: [PATCH 293/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230405.5=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Co?= =?UTF-8?q?lor=20Variants=20&=20Styles=20Are=20Coming=20to=20Linux=20Mint?= =?UTF-8?q?=2021.2.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Variants & Styles Are Coming to Linux Mint 21.2.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/news/20230405.5 ⭐️⭐️ Color Variants & Styles Are Coming to Linux Mint 21.2.md diff --git a/sources/news/20230405.5 ⭐️⭐️ Color Variants & Styles Are Coming to Linux Mint 21.2.md b/sources/news/20230405.5 ⭐️⭐️ Color Variants & Styles Are Coming to Linux Mint 21.2.md new file mode 100644 index 0000000000..8bc11bbe9c --- /dev/null +++ b/sources/news/20230405.5 ⭐️⭐️ Color Variants & Styles Are Coming to Linux Mint 21.2.md @@ -0,0 +1,93 @@ +[#]: subject: "Color Variants & Styles Are Coming to Linux Mint 21.2" +[#]: via: "https://news.itsfoss.com/color-styles-linux-mint/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Color Variants & Styles Are Coming to Linux Mint 21.2 +====== + +New visual elements and options for Linux Mint Cinnamon. What do you think? + +![linux mint style][1] + +![][2] + +Recently, Linux Mint has been focusing on its look and feel more than usual. + +With [Linux Mint 21.1][3], you get a new default theme and several subtle visual refinements. + +And it looks like more such changes are in progress for the upcoming Linux Mint 21.2. As usual, a new monthly blog post highlighted some progress planned for the next release. + +The highlight for me is the new concept, "**Styles,**" coming to the **Cinnamon desktop**. + +### Cinnamon Upgrade With Linux Mint 21.2 + +Adding Styles to Cinnamon results in a simplified version of theme tweaks. + +With the theme controls on Cinnamon, you must choose the mouse pointer, icon theme, and desktop theme separately. + +![linux mint theme selection][4] + +There are a lot of themes to select from. So, with the "Styles" approach, the tweaks get simplified to two things: + +![linux mint style selection][5] + +- **Style** +- **Appearance** + +The Style preset will feature options like Adwaita, Mint-X, Mint-Y, etc (the same options you find with the current theme selection). + +![styles in linux mint][6] + +For the appearance, you will choose the theme mode as dark/light or mixed as per your preferences. + +The mixed mode will have both dark/light modes of apps for contrast, and the other modes are self-explanatory. + +Once you have set these two options, you can find new color variants, combining themes. You can also play around with it to see what color combination works best for your style. + +![linux mint yaru theme][7] + +You can always find the current way of setting things under "**Advance settings**". + +In addition, as shown in the screenshot above, you will find new color combinations available to add variety, even if the theme sounds similar. + +Other changes expected with Linux Mint 21.2 include: + +![][8] + +- **Dropping the folder stripes** +- **Removing monochrome icons and dark theme icons to replace them with symbolic icons to ensure compatibility and uniform contrast with all themes** + +Sure, these simplifications of options for the end-user may not be massive overhauls but meaningful changes to improve the Cinnamon desktop experience overall. + +Of course, it could become one of the [reasons you choose Cinnamon][9]. + +Not just limited to Linux Mint, these improvements will also help elevate the experience with any other distributions offering a Cinnamon desktop edition. You can head to Linux Mint's [official blog][10] to explore more about it. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/color-styles-linux-mint/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/04/mint-21-2-color-styles.png +[2]: https://news.itsfoss.com/content/images/2023/03/linux-mega-packt.webp +[3]: https://news.itsfoss.com/linux-mint-21-1-release/ +[4]: https://news.itsfoss.com/content/images/2023/04/linux-mint-theme-current.jpg +[5]: https://news.itsfoss.com/content/images/2023/04/adwaita.png +[6]: https://news.itsfoss.com/content/images/2023/04/mint-y-styles.png +[7]: https://news.itsfoss.com/content/images/2023/04/yaru.png +[8]: https://news.itsfoss.com/content/images/2023/04/nemo.png +[9]: https://itsfoss.com/why-cinnamon/?ref=news.itsfoss.com +[10]: https://blog.linuxmint.com/?ref=news.itsfoss.com \ No newline at end of file From c5f920cb5e8408a483def2ea51d50a5950b042f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:50:39 +0800 Subject: [PATCH 294/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230405.6=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20TU?= =?UTF-8?q?XEDO=20Stellaris=2016=20(Gen5)=20is=20The=20Ultimate=20Linux=20?= =?UTF-8?q?Laptop=20You=20Can=20Find=20Now.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...) is The Ultimate Linux Laptop You Can Find Now.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/news/20230405.6 ⭐️⭐️ TUXEDO Stellaris 16 (Gen5) is The Ultimate Linux Laptop You Can Find Now.md diff --git a/sources/news/20230405.6 ⭐️⭐️ TUXEDO Stellaris 16 (Gen5) is The Ultimate Linux Laptop You Can Find Now.md b/sources/news/20230405.6 ⭐️⭐️ TUXEDO Stellaris 16 (Gen5) is The Ultimate Linux Laptop You Can Find Now.md new file mode 100644 index 0000000000..2f7f00e547 --- /dev/null +++ b/sources/news/20230405.6 ⭐️⭐️ TUXEDO Stellaris 16 (Gen5) is The Ultimate Linux Laptop You Can Find Now.md @@ -0,0 +1,117 @@ +[#]: subject: "TUXEDO Stellaris 16 (Gen5) is The Ultimate Linux Laptop You Can Find Now" +[#]: via: "https://news.itsfoss.com/tuxedo-stellaris-16-gen-5/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +TUXEDO Stellaris 16 (Gen5) is The Ultimate Linux Laptop You Can Find Now +====== + +The laptop packs in a punch with specs +like RTX 4090 and i9 processor! Don't you think? + +![tuxedo stellar][1] + +![][2] + +TUXEDO Computers is a well-known brand in the Linux space that provide customizable Linux notebooks and Desktop PCs at various price/performance points. + +Not to forget, it is one of the trusted places to [buy Linux computers][3]. + +With a recent announcement, they have launched the **next evolution of their Stellaris 16-inch laptop.** + +I must say that this can be a proper challenger to Framework's recently announced high-performance 16-inch Laptop. + +Let's take a look at it. + +### TUXEDO Stellaris 16 Gen 5: Overview ⭐ + +![a photo of the tuxedo stellaris 16 - gen5 laptop][4] + +The major highlight of this laptop is that it features Nvidia's latest and greatest [**RTX40 series**][5] of mobile GPUs that offer some great graphics performance and features. + +Paired with Intel's top-of-the-line processor, the **[i9 13900HX][6]**, with its 24-cores that can turbo up to a **blazing fast 5.40 GHz** at a whopping **157 W TDP** (Turbo), it is a compelling package. + +Though keep in mind; that for running the laptop at its full potential, TUXEDO recommends using **their external water cooling solution**, [TUXEDO Aquaris][7], which can be attached magnetically to the back of the laptop. + +> 📋 You will have to pay extra for this when ordering the laptop. + +The processor can run at a base TDP of **55 W** with a 3.90 GHz clock speed when it is not running at full blast. + +That's still a decent performance figure for such a thin laptop! 😮 + +Some other key highlights of the Stellaris 16 – Gen5 laptop are as follows: + +- **The chassis is made up of a combination of Aluminum and Plastics.** +- **A 240 Hz 16-inch IPS display with Nvidia G-SYNC support.** +- **GPU options up to an Nvidia RTX 4090.** +- **Up to 64 GB DDR5, 5600 MHz RAM (2x 32 GB).** +- **A 99 Wh Battery that allows for runtimes of up to 10 hours (idle), and around 6–7 hours under typical loads.** + +### ⚡ TUXEDO Stellaris 16: What Makes it a Powerhouse? + +The high-end hardware aboard the Stellaris 16 – Gen5 laptop won't only appeal to gamers but also to a wide variety of other users such as content creators, AI/ML engineers, UI/UX artists, and more. + +**So, what makes it such a complete package?** + +Well, it is the freedom of choosing from various possible setups. + +For starters, you get to pick from a relatively calmer GPU in the form of an **RTX 4060**, all the way to the **insane RTX 4090,** with the **RTX 4070** and **RTX 4080** filling in the gaps. + +![tuxedo stellaris laptop][8] + +Then there are the keyboard options that let you decide between their newly added [Cherry MX Ultra-Low Profile][9] clicky switches for a tactile and audible feel during typing or the usual silent membrane switches. + +You can also pick from an extensive **list of keyboard layouts** that include English, German, Spanish, Hungarian, and more with the backlit TUX super-key. + +The RAM offerings are no less; you can decide between two performance tiers. One is a 'Performance' tier that offers **DDR5 RAM** running at a swift **4800 MHZ** and a 'High Performance' tier that offers DDR5 RAM running at an eye-watering **5600 MHz**. + +These tiers offer a maximum of 64 GB RAM, mixing sticks from **SK Hynix**, **Samsung,** and **Micron**. + +As for storage, two M.2 2280 SSD slots run on PCIe 4.0 x4 with various Samsung SSDs. + +The lineup starts with a **Samsung 970 EVO Plus**, with the **Samsung 980** in the middle and the blazing-fast **Samsung 980 Pro** being the range-topper. + +> 📋 A maximum of 4 TB of storage is possible with both the M.2 slots occupied. + +Besides that, the Stellaris 16 – Gen5 features **Wi-Fi 6E** with **Bluetooth 5.3** and comes with the **[TUXEDO OS][10] pre-installed** unless you choose a different one at checkout. + +The OS offerings include the likes of **Ubuntu 22.04 LTS**, **Kubuntu 22.04 LTS**, **Ubuntu Budgie 22.04 LTS,** and **Windows 11 Home/Pro**. + +### 💸 Availability and Pricing + +The TUXEDO Stellaris 16 – Gen5 is **available for pre-order**, with **deliveries starting at the end of April**. + +Prices start at **1763,87 EUR for the base config** with the i9 processor, an RTX 4060, 16 GB of RAM (2x 8 GB) running at 5600MHZ, a 500 GB Samsung 980 SSD, and TUXEDO OS. + +[Pre-Order][11] + +Head over to the [official store listing][11], and start configuring as per your requirements. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tuxedo-stellaris-16-gen-5/ + +作者:[Sourav Rudra][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/sourav/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/04/tuxedo-stellaris-gen-5.png +[2]: https://news.itsfoss.com/content/images/2023/03/linux-mega-packt.webp +[3]: https://itsfoss.com/get-linux-laptops/?ref=news.itsfoss.com +[4]: https://news.itsfoss.com/content/images/2023/04/TUXEDO_Stellaris_16-Gen5.jpg +[5]: https://www.nvidia.com/en-us/geforce/laptops/?ref=news.itsfoss.com +[6]: https://ark.intel.com/content/www/us/en/ark/products/232171/intel-core-i913900hx-processor-36m-cache-up-to-5-40-ghz.html?ref=news.itsfoss.com +[7]: https://www.tuxedocomputers.com/en/Linux-Hardware/Accessories/Further-accessories/TUXEDO-Aquaris--External-Water-Cooling-Device_1.tuxedo?ref=news.itsfoss.com +[8]: https://news.itsfoss.com/content/images/2023/04/stellaris16-gen5_back.jpg +[9]: https://www.cherrymx.de/en/cherry-mx/mx-ultra-low-profile/mx-ulp-click.html?ref=news.itsfoss.com +[10]: https://www.tuxedocomputers.com/os?ref=news.itsfoss.com +[11]: https://www.tuxedocomputers.com/en/TUXEDO-Stellaris-16-Gen5.tuxedo?ref=news.itsfoss.com \ No newline at end of file From 18b4c4e2c03e753d364dd976f9bca4d5289b01a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:53:10 +0800 Subject: [PATCH 295/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230406.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ma?= =?UTF-8?q?ke=20a=20web-safe=20color=20guide=20with=20Bash.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...️⭐️ Make a web-safe color guide with Bash.md | 216 ++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 sources/tech/20230406.0 ⭐️⭐️ Make a web-safe color guide with Bash.md diff --git a/sources/tech/20230406.0 ⭐️⭐️ Make a web-safe color guide with Bash.md b/sources/tech/20230406.0 ⭐️⭐️ Make a web-safe color guide with Bash.md new file mode 100644 index 0000000000..8f54b9b2e0 --- /dev/null +++ b/sources/tech/20230406.0 ⭐️⭐️ Make a web-safe color guide with Bash.md @@ -0,0 +1,216 @@ +[#]: subject: "Make a web-safe color guide with Bash" +[#]: via: "https://opensource.com/article/23/4/web-safe-color-guide-bash" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Make a web-safe color guide with Bash +====== + +When computer displays had a limited color palette, web designers often used a set of [web-safe colors][1] to create websites. While modern websites displaying on newer devices can display many more colors than the original web-safe color palette, I sometimes like to refer to the web-safe colors when I create web pages. This way I know my pages look good anywhere. + +You can find web-safe color palettes on the web, but I wanted to have my own copy for easy reference. And you can make one too, using the `for` loop in Bash. + +### Bash for loop + +The syntax of a [for loop in Bash][2] looks like this: + +> for _variable_ in _set_ ; do _statements_ ; done + +As an example, say you want to print all numbers from 1 to 3. You can write a quick `for` loop on the Bash command line to do that for you: + +``` +$ for n in 1 2 3 ; do echo $n ; done +1 +2 +3 +``` + +The semicolons are a standard Bash statement separator. They let you write multiple commands on a single line. If you were to include this `for` loop in a Bash script file, you might instead replace the semicolons with line breaks and write out the `for` loop like this: + +``` +for n in 1 2 3 + do + echo $n + done +``` + +I like to include the `do` on the same line as the `for` so it's easier for me to read: + +``` +for n in 1 2 3 ; do + echo $n +done +``` + +### More than one for loop at a time + +You can put one loop inside another. That can help you to iterate over several variables, to do more than one thing at a time. Let's say you wanted to print out all combinations of the letters A, B, and C with the numbers 1, 2, and 3. You can do that with two `for` loops in Bash, like this: + +``` +#!/bin/bash +for number in 1 2 3 ; do + for letter in A B C ; do + echo $letter$number + done +done +``` + +If you put these lines in a Bash script file called `for.bash` and run it, you see nine lines showing the combinations of all the letters paired with each of the numbers: + +``` +$ bash for.bash +A1 +B1 +C1 +A2 +B2 +C2 +A3 +B3 +C3 +``` + +### Looping through the web-safe colors + +The web-safe colors are all colors from hexadecimal color `#000` (black, where the red, green, and blue values are all zero) to `#fff` (white, where the red, green, and blue colors are all at their full intensities), stepping through each hexadecimal value as 0, 3, 6, 9, c, and f. + +You can generate a list of all combinations of the web-safe colors using three `for` loops in Bash, where the loops iterate over the red, green, and blue values. + +``` +#!/bin/bash +for r in 0 3 6 9 c f ; do + for g in 0 3 6 9 c f ; do + for b in 0 3 6 9 c f ; do + echo "#$r$g$b" + done + done +done +``` + +If you save this in a new Bash script called `websafe.bash` and run it, you see an iteration of all the web safe colors as hexadecimal values: + +``` +$ bash websafe.bash | head +#000 +#003 +#006 +#009 +#00c +#00f +#030 +#033 +#036 +#039 +``` + +To make an HTML page that you can use as a reference for web-safe colors, you need to make each entry a separate HTML element. Put each color in a `
` element, and set the background to the web-safe color. To make the hexadecimal value easier to read, put it inside a separate `` element. Update the Bash script to look like this: + +``` +#!/bin/bash +for r in 0 3 6 9 c f ; do + for g in 0 3 6 9 c f ; do + for b in 0 3 6 9 c f ; do + echo "
#$r$g$b
" + done + done +done +``` + +When you run the new Bash script and save the results to an HTML file, you can view the output in a web browser to all the web-safe colors: + +``` +$ bash websafe.bash > websafe.html +``` + +![Colour gradient.][3] + +The web page isn't very nice to look at. The black text on a dark background is impossible to read. I like to apply some HTML styling to ensure the hexadecimal values are displayed with white text on a black background inside the color rectangle. To make the page look really nice, I also use HTML grid styles to arrange the boxes with six per row and some space between each box. + +To add this extra styling, you need to include the other HTML elements before and after the for loops. The HTML code at the top defines the styles and the HTML code at the bottom closes all the open HTML tags: + +``` +#!/bin/bash + +cat< + + + Web-safe colors + + + + + +EOF + +for r in 0 3 6 9 c f ; do +for g in 0 3 6 9 c f ; do +for b in 0 3 6 9 c f ; do + +echo "
#$r$g$b
" + +done +done +done + +cat< + +EOF +``` + +This finished Bash script generates a web-safe color guide in HTML. Whenever you need to refer to the web-safe colors, run the script and save the results to an HTML page. Now you can see a representation of the web-safe colors in your browser as an easy-reference guide for your next web project: + +``` +$ bash websafe.bash > websafe.html +``` + +![Web colors.][4] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/web-safe-color-guide-bash + +作者:[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://en.wikipedia.org/wiki/Web_colors#Web-safe_colors +[2]: https://opensource.com/article/19/6/how-write-loop-bash +[3]: https://opensource.com/sites/default/files/2023-03/10000001000002620000013685924861376B1AB6.webp +[4]: https://opensource.com/sites/default/files/2023-03/10000001000002620000013633233DC8DC56C891.webp \ No newline at end of file From 0f86b16d544f51ac975f69c003d1f884476903f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:54:32 +0800 Subject: [PATCH 296/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230407.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20A?= =?UTF-8?q?=20Quick=20Guide=20to=20Install=20and=20Play=20GOG=20Games=20on?= =?UTF-8?q?=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ck Guide to Install and Play GOG Games on Linux.md | 213 ++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 sources/tech/20230407.0 ⭐️⭐️ A Quick Guide to Install and Play GOG Games on Linux.md diff --git a/sources/tech/20230407.0 ⭐️⭐️ A Quick Guide to Install and Play GOG Games on Linux.md b/sources/tech/20230407.0 ⭐️⭐️ A Quick Guide to Install and Play GOG Games on Linux.md new file mode 100644 index 0000000000..8f7fb0e7f9 --- /dev/null +++ b/sources/tech/20230407.0 ⭐️⭐️ A Quick Guide to Install and Play GOG Games on Linux.md @@ -0,0 +1,213 @@ +[#]: subject: "A Quick Guide to Install and Play GOG Games on Linux" +[#]: via: "https://itsfoss.com/play-gog-games-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A Quick Guide to Install and Play GOG Games on Linux +====== + +![][1] + +[Gaming on Linux][2] is no longer a problem. You can play plenty of AAA titles, indie games, and Windows-exclusive games on Linux. Several games from GOG, Steam, Epic Games, Origin, and Ubisoft Connect should work flawlessly. + +Unfortunately, GOG does not offer a client for Linux that you can use. + +So, in this guide, I will be focusing on **installing and playing GOG games on Linux**. + +If you have been following us, you may have come across on our ultimate guide to the [Epic Games Store on Linux][3]. It is more or less the same thing, but for a different store. + +> 💡 GOG.com is popular for offering DRM-free games. Furthermore, if you make a purchase on GOG, usually, the developer gets a good cut of it compared to other stores. + +### 3 Ways to Install GOG Games on Linux + +You have a couple of options when it comes to installing and running a game from the GOG store. + +You can use any of the following game clients on Linux: + +- **Lutris** +- **Heroic Games Launcher** +- **Bottles** + +I found Lutris to be the easiest, and quickest to be able to run a Windows-exclusive GOG game on Linux. So, let me start with it. + +#### Method 1. Install and Play GOG Games Using Lutris + +1. To get started, you need to **install Lutris on Linux**. + +You can install it using [Flathub][4], PPA for Ubuntu-based distros, DEB package or from the software center of distros like Pop!_OS, Solus. + +Head to its [official download page][5] and install Lutris. + +[Install Lutris][5] + +2. Once you are done installing Lutris, launch it and click on “**GOG**” among the sources listed on its left sidebar, as shown in the image: + +![lutris game client gog source][6] + +Do you see a **user avatar icon**, right next to it? Click on it to log in to your GOG account. + +![gog sign in through lutris][7] + +You can access the library of games associated with your account after signing in through Lutris' native user interface. + +![][8] + +3. Pick any game you want, and click on it to find "**Install**" button. + +As you proceed, Lutris will prompt you to **install Wine**, which would enable you to run the Windows game on Linux. + +![][9] + +**(Optional)** You can separately install Wine under the "**Runners**" menu, and have multiple versions of it ready before installing the game if you prefer. + +![lutris wine manager][10] + +4. But, if you do not want any hassle, just go with the installation process, and it will automatically install Wine and then prompt you to download the game + +![][11] + +![][12] + +5. Continue with the process, and it will set up the installer for you and launch it. + +![][13] + +![][14] + +Now, you have to follow the on-screen instructions for any game you want to install and then complete it. + +> 📋 Not every game will work seamlessly. For some, you may have to install it using a specific Wine version and some may not work at all. So, you should do some research on the particular game running on Linux before trying to install it via GOG. + +It is done! The game should launch right after successful setup. + +![Playing a GOG Windows game on Linux][15] + +#### Method 2. Install and Play GOG Games on Linux Using Heroic Games Launcher + +Heroic Games Launcher is a nice option with several features to run GOG games on Linux. + +You can use an **AppImage** file available, or install its Flatpak via **Flathub** or get RPM/DEB packages from its GitHub. + +[Install Heroic Games Launcher][16] + +> 🚧 You get similar functionalities but unlike Lutris, but you need to first install Wine manually using its + +**Wine Manager** + +. Heroic Games Launcher does not automatically install Wine for you. It will download the game for you, even if you do not have Wine installed. + +It can be confusing for new users. But, if you have a bit of experience and want to choose the Wine/Proton version, you can head to its **Wine Manager** and preferably download the latest available version to get started. + +![wine manager listing several versions of wine/proton on heroic games launcher][17] + +No additional fiddling, **just click on the download icon** as shown in the screenshot above, and it will automatically install it. + +Once done with it, here are the steps to install a GOG game using Heroic: + +1. Log in to your GOG account. You can find the GOG menu right after you launch it and head to the **Login section**. + +![][18] + +![][19] + +2. After logging in, head to the **Library** to find the games you have. + +![gog game library on heroic games launcher][20] + +3. Click on the download icon to proceed. Now, you should get a prompt to decide the **installation path, Wine version**, and a couple of other options. + +![gog game installation screen on heroic games launcher selecting the install path, wine, and more][21] + +You can select "**Use Default Wine Settings**" if you want to automatically select the Wine version you have installed. + +Or, you can use the **drop-down arrow** to pick among the Wine/Proton version available on your system. + +For the ease of use, you can go with the default settings. And, if the game fails to work, you can go to its settings later and try other Wine versions. + +4. Wait for the download to complete and then launch/run the game. + +![][22] + +![][23] + +#### Method 3: Install and Play GOG Games on Linux Using Bottles + +Bottles is an impressive platform. However, it does not let you install games through it. + +> 🚧 This is not a recommended method. But, if you want to try the GOG Galaxy game client on Linux, Bottles is the way to go. + +Instead, it will help you install the GOG client (which you find for Windows) and make it work on Linux. Bottles is one of the best [ways to install a Windows program on Linux][24]. + +It is recommended to install Bottles as Flatpak, at the time of writing this. So, to get started, you need to get it installed from [Flathub][25]. Additionally, you can explore other download options, if available. + +[Download Bottles][26] + +Once you get it installed, you have to create a new Bottle for Gaming. And, inside it, you will have to search for GOG Galaxy v1 or legacy and install the program to use GOG on Linux. + +![][27] + +![][28] + +In my tests, GOG Galaxy client did not launch. And, when it did, it was too slow/unresponsive. But, at least, it is something you can explore when nothing else works for you. It may or may not work, of course. + +If this is something that interests you, feel free to give it a try. + +### Wrapping Up + +The installers or gaming clients on Linux are making things convenient every day. + +For some games, it can end up as a one-click installation experience, while for others, it might need a little tweaking. + +If you struggle with it, feel free to join our **[It's FOSS forums][29]** for help. And, if you are new to the gaming scene on Linux, I suggest you read our guide on it: + +There is also a handy utility called GameHub that can be utilized for keeping games from different platforms in one UI. + +And of course, GOG is not the only place for [getting Linux games][30]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/play-gog-games-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/content/images/2023/03/linux-mega-packt.webp +[2]: https://itsfoss.com/linux-gaming-guide/ +[3]: https://itsfoss.com/epic-games-linux/#3-use-bottles-to-access-epic-games-store +[4]: https://flathub.org/apps/details/net.lutris.Lutris?ref=itsfoss.com +[5]: https://lutris.net/downloads?ref=itsfoss.com +[6]: https://itsfoss.com/content/images/2023/04/lutris-gog.png +[7]: https://itsfoss.com/content/images/2023/04/lutris-gog-login.png +[8]: https://itsfoss.com/content/images/2023/04/lutris-game-install.png +[9]: https://itsfoss.com/content/images/2023/04/install-wine-lutris.png +[10]: https://itsfoss.com/content/images/2023/04/lutris-wine-manager.png +[11]: https://itsfoss.com/content/images/2023/04/lutris-wine-download.png +[12]: https://itsfoss.com/content/images/2023/04/lutris-download-game.png +[13]: https://itsfoss.com/content/images/2023/04/lutris-game-installer.png +[14]: https://itsfoss.com/content/images/2023/04/lutris-game-installation-1.png +[15]: https://itsfoss.com/content/images/2023/04/lutris-game-working.jpg +[16]: https://heroicgameslauncher.com/downloads?ref=itsfoss.com +[17]: https://itsfoss.com/content/images/2023/04/heroic-games-launcher-wine.png +[18]: https://itsfoss.com/content/images/2023/04/heroic-games-gog-login.png +[19]: https://itsfoss.com/content/images/2023/04/heroic-gog-login-page.png +[20]: https://itsfoss.com/content/images/2023/04/heroic-gog-games-library.png +[21]: https://itsfoss.com/content/images/2023/04/gog-wine-path-install.png +[22]: https://itsfoss.com/content/images/2023/04/gog-game-download-heroic.png +[23]: https://itsfoss.com/content/images/2023/04/gog-game-heroic-game-play.png +[24]: https://itsfoss.com/use-windows-applications-linux/ +[25]: https://flathub.org/apps/details/com.usebottles.bottles?ref=itsfoss.com +[26]: https://usebottles.com/download/?ref=itsfoss.com +[27]: https://itsfoss.com/content/images/2023/04/gog-installer-1.png +[28]: https://itsfoss.com/content/images/2023/04/install-gog-client-1.png +[29]: https://itsfoss.community/?ref=itsfoss.com +[30]: https://itsfoss.com/download-linux-games/ From 57749a66c375bfd76d7b3f680e72abf4782339a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:55:18 +0800 Subject: [PATCH 297/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230407.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=205?= =?UTF-8?q?=20best=20practices=20for=20PatternFly,=20an=20open=20source=20?= =?UTF-8?q?design=20system.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...es for PatternFly, an open source design system.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md diff --git a/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md b/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md new file mode 100644 index 0000000000..964d874204 --- /dev/null +++ b/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md @@ -0,0 +1,60 @@ +[#]: subject: "5 best practices for PatternFly, an open source design system" +[#]: via: "https://opensource.com/article/23/4/open-source-design-system-patternfly" +[#]: author: "Abigael Donahue https://opensource.com/users/abigaeljamie" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 best practices for PatternFly, an open source design system +====== + +Have you ever admired the facets of a gemstone? The angles and slants are a thing of beauty. You can see that a multi-faceted gemstone shines brighter than a flat one. You may also see this kind of beauty when analyzing a multi-faceted design system. A design system is a collection of guidelines, standards, and resources for creating consistent and unified user interfaces (UI). Like the facets of a diamond, an open source design system rich with diverse contributions and community engagement ultimately leads to better product experiences. + +The [PatternFly][1] project is an open source design system for Red Hat products. But open source doesn't end with PatternFly's code. Behind PatternFly is a team of people who create designs completely in the open. From designers and developers to researchers and writers, we work together to operate as an open source community. + +Our secret? We don't have one — we work in the open, remember? However, we use these five best practices. I'll share them here so that you too can power your own design system with open source. + +### 1. Contribute collectively + +We have a core PatternFly design team to design, maintain, and evolve the design system. But we encourage and welcome contributions from everyone. If you have a passion for collaboration and a knack for user experience (UX), [PatternFly wants to hear from you][2]. + +### 2. Build community + +Nothing created in a silo makes its way to PatternFly. We believe design is better in the open. This is why we include the community in all updates, changes, and additions. We collect feedback on contributions from people across design and development so that everyone has a say in what gets implemented. We also seek input and collaboration from people across multiple [design disciplines][3]. This is done to break free from any bias or assumption. This kind of open design makes our design system stronger. It also strengthens our blossoming community of people who engage with or contribute to PatternFly (we lovingly refer to them as Flyers). + +### 3. Loop in everyone + +If you find that brainstorming ideas with others results in solutions better than any one person would have dreamed of, then you already think like a Flyer. We have regular design meetings where contributors present their ideas and discuss design approaches in a group setting. This enables us to keep our ideas collaborative and consider designs from all angles. Additionally, we host monthly community meetings so that we can connect with Flyers from across the globe and share the latest updates. You can catch all of our past meeting recordings on our [PatternFly YouTube channel][4]. + +### 4. Listen to users + +As a community, we aim to have all PatternFly contributions lead to functional and beautiful product experiences across different contexts. To make that a reality, we hold ourselves accountable to break out of our own bubbles and engage with users. We work with UX researchers to test updates, changes, and additions with users — such as visual themes and interactions — to ensure that we're creating designs, resources, and experiences that solve for everyone, not just people like us. + +### 5. Create connections + +PatternFly is the thread of consistency through products across Red Hat's portfolio. Everyone has the creative freedom to build what best serves their users. But we work as a team to connect product groups through the design system for a more unified user experience. PatternFly resources are easy to access and open to all. This helps us create connections and squash silos. + +### Come design in the open with us + +Whether you're a team of 1 or 100, or whether your design system is open source or not — there's always room for a little collaboration and community in everything we do. Tell us how things turn out for you by connecting with the [PatternFly community][5]. We can't wait to hear from you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/open-source-design-system-patternfly + +作者:[Abigael Donahue][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/abigaeljamie +[b]: https://github.com/lkxed/ +[1]: https://www.patternfly.org/v4/ +[2]: https://www.patternfly.org/v4/contribute/about +[3]: https://design.redhat.com/?intcmp=7013a000002qLH8AAM +[4]: https://www.youtube.com/channel/UCqLT0IEvYmb8z__9IFLSVyQ +[5]: https://www.patternfly.org/v4/community \ No newline at end of file From 08ad2b973075c5b53984347ec1d01a787438dbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:55:46 +0800 Subject: [PATCH 298/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?news]:=2020230407.2=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Xu?= =?UTF-8?q?buntu=2023.04=20Best=20New=20Features.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md diff --git a/sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md b/sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md new file mode 100644 index 0000000000..019ac95523 --- /dev/null +++ b/sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md @@ -0,0 +1,148 @@ +[#]: subject: "Xubuntu 23.04: Best New Features" +[#]: via: "https://www.debugpoint.com/xubuntu-23-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Xubuntu 23.04: Best New Features +====== + +**A few cool features are arriving on Xubuntu 23.04 Lunar Lobster release. Here’s a summary.** + +Xubuntu 23.04, based on the upcoming [Ubuntu 23.04 Lunar Lobster][1], is set to arrive on April 20, 2023. This latest release is built on the Linux Kernel 6.2, which brings the latest hardware, CPU, GPU, and file-system support. + +From revamped applets to a more powerful Thunar file manager, Xubuntu 23.04 offers numerous improvements and bug fixes for a more polished user experience via the “OG” of all Linux desktops – Xfce 4.18. + +![Xubuntu 23.04 Desktop][2] + +If you are using prior Xubuntu 22.10, then you might notice significant changes in the desktop environment. Xubuntu 22.10 featured the development version Xfce 4.17 with a minimal feature set of the Xfce 4.18. + +With that in mind, let’s take a look at the best new features of Xubuntu 23.04 Lunar Lobster. + +### Xubuntu 23.04: Best New Features + +#### Xfce 4.18 updates + +One of the significant changes in this release is the update to the Xfce desktop environment. Xubuntu 23.04 is based on the [latest Xfce 4.18][3], released in December 2022. Xfce 4.18 is a major milestone for the desktop environment, featuring updates to GTK4, initial Wayland support, and a revamp of core native apps, with a massive volume of updates. + +The primary top panel has been updated with new settings and tweaks, while the overall look remains the same as the earlier versions. Some default Panel applets have also been changed in this version, while the desktop icons, right-click context menu, and items remain unchanged. + +![Panel preferences in Xfce 4.18][4] + +Panel preference has been enhanced with two new options. Firstly, the length of the Panel is now in pixels rather than percentages. Secondly, a new option, “Keep panel above windows,” has been added to allow users to send back window dialogues behind the panel. In earlier versions, app windows could only reach up to the panel edge. + +The clock applet settings have been overhauled in Xfce 4.18. Users can finally change the font style in the Xfce clock applet, and four clock layout options are available: date only, time only, date and time, and time and date. + +#### Thunar file manager updates + +Thanks to work done during [Google Summer of Code 2022][5], users can now see the image preview in the sidebar in Thunar embedded, or at a new panel at the right as a standalone mode, which can be changed via preferences. + +Thunar settings have also been enhanced with a new tab for customizing keyboard shortcuts. Users can now directly assign new keyboard combinations and change existing ones from this tab. + +A new search icon has replaced the reload button in the toolbar, and when clicked, it brings up the search at the address bar, performing a recursive search with the user’s search keyword. The reload button has been moved to the View menu. Another new item, “Recent,” has been added to the left navigation bar. At the same time, the metadata has been more organized (from comma-separated to pipe-separated), and a new context menu item allows users to select their desired option. + +The main menu of Thunar has also undergone significant changes. A new bookmark menu has been introduced, allowing users to add the current folder to the sidebar as a shortcut. The Edit menu now includes UNDO and REDO options, while the Go menu features Recent and Search for the file options. + +![Thunar with split view and image preview][6] + +Thunar has also added a Split view via the View menu item for the first time, enabling users to drag and drop items in the view panels. Also, to arrange your folders for faster workflow, Thunar also introduces background colour for your folders, including the folder names. + +![Thunar with folder highlight option][7] + +Along with the Xfce 4.18 features, Xubuntu 23.04 includes additional bug fixes and performance improvements for the window manager and desktop. These improvements are under the hood; users can expect a more polished Xfce desktop experience. + +While Wayland migration work for Xfce desktop core and native apps has begun, it’s still far from ready. So, this Xubuntu 23.04 might be the foundation for Wayland’s work in the future, hopefully before the next Xubuntu-LTS. Although, it is doubtful, considering the Xfce team size and other aspects. + +#### Mini ISO + +As I reported earlier, Xubuntu 23.04 also introduces a minimal ISO image with only essential Xfce desktop components without any additional pre-loaded software. You can try this minimal ISO to build your own desktop setup for your workflow. + +The minimal ISO size is currently at 1.9GB and the team is working to reduce it further in coming releases. + +You can read more about Xubuntu minimal ISO [in this article][8]. + +![Xubuntu minimal and standard install - comparison][9] + +#### Flathub and Snap + +A few weeks back, Canonical announced that a decision had been taken to remove all the default Flatpak installations from all the official Ubuntu flavours. Hence, in Xubuntu 23.04, you won’t get Flatpak installed by default. + +Ubuntu’s own Snap will be installed by default with all associated components to run several Snap applications, such as Firefox. + +That said, its very easy to set up Flatpak and Flathub in Xubuntu [with just two commands][10]. + +#### Other changes and summary + +At the core, Xubuntu 23.04 is based on [Linux Kernel 6.2][11] mainline, which brings support for the latest CPU/GPU line-ups from leading manufacturers. Also, this kernel version introduces memory optimizations, security fixes and many accessories support. You can learn more about Linux Kernel 6.2 features here. + +The application stack and GNOME components are updated as follows. + +- Firefox 111.0 (Snap) +- Thunderbird 102.9 +- Thunar 4.18.4 +- Parole media player 4.18 +- LibreOffice 7.5 +- GNOME Software 44.0 +- Catfish file search 4.16.4 +- Transmission 3.0 + +![GNOME Software 44 in Xubuntu 23.04][12] + +At the core, Python 3.11 is now available out-of-the-box in Xubuntu 23.04. You don’t need to [install Python 3.11][13] anymore separately. It’s worth mentioning that Python 3.12 release is due this year and currently undergoing multiple RC testing. Here’s a summary of core modules in this release. + +- Python 3.11 +- GCC 13 +- GlibC 2.37 +- Ruby 3.1 +- golang 1.2 +- LLVM 16 + +### Download + +You can download the Xubuntu 23.04 (Beta) from the below link. Remember that it is still undergoing testing. So, use it with caution. + +[Download Xubuntu 23.04 – Beta][14] + +If you want the Xubuntu 23.04 mini-iso, you can get the file from the below link. [Learn more about Xubuntu-mini][8]. + +[Download Xubuntu 23.04 (mini-ISO) – Beta][14] + +### Conclusion + +In conclusion, Xubuntu 23.04 is a significant release with several improvements and features with the Xfce 4.18 desktop environment. With a focus on enhancing the user experience, Xubuntu users can enjoy the latest Linux Kernel, the revamped Thunar file manager, and several other tweaks and changes. + +It will be one of the best releases of Xubuntu for everyone. + +_Feature image credit: [xfce-look][15]_ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/xubuntu-23-04/ + +作者:[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/ubuntu-23-04-features/ +[2]: https://www.debugpoint.com/wp-content/uploads/2023/04/Xubuntu-23.04-Desktop.jpg +[3]: https://www.debugpoint.com/xfce-4-18-features/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Panel-preferences-in-Xfce-4.18.jpg +[5]: https://debugpointnews.com/xfce-gsoc-2022/ +[6]: https://www.debugpoint.com/wp-content/uploads/2023/04/Thunar-with-split-view-and-image-preview.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/04/Thunar-with-folder-highlight-option.jpg +[8]: https://www.debugpoint.com/xubuntu-minimal/ +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg +[10]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[11]: https://www.debugpoint.com/linux-kernel-6-2/ +[12]: https://www.debugpoint.com/wp-content/uploads/2023/04/GNOME-Software-44-in-Xubuntu-23.04.jpg +[13]: https://www.debugpoint.com/install-python-3-11-ubuntu/ +[14]: https://cdimage.ubuntu.com/xubuntu/releases/lunar/beta/ +[15]: https://www.xfce-look.org/p/1953253 From 606195cb193ee94d1fb389211417b32856da80e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sat, 8 Apr 2023 11:57:16 +0800 Subject: [PATCH 299/318] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][?= =?UTF-8?q?tech]:=2020230407.3=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Ca?= =?UTF-8?q?chyOS=20Arch-based=20Distro=20for=20Speed=20and=20Ease=20of=20U?= =?UTF-8?q?se.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...yOS Arch-based Distro for Speed and Ease of Use.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/tech/20230407.3 ⭐️⭐️ CachyOS Arch-based Distro for Speed and Ease of Use.md diff --git a/sources/tech/20230407.3 ⭐️⭐️ CachyOS Arch-based Distro for Speed and Ease of Use.md b/sources/tech/20230407.3 ⭐️⭐️ CachyOS Arch-based Distro for Speed and Ease of Use.md new file mode 100644 index 0000000000..a2b58f5d26 --- /dev/null +++ b/sources/tech/20230407.3 ⭐️⭐️ CachyOS Arch-based Distro for Speed and Ease of Use.md @@ -0,0 +1,118 @@ +[#]: subject: "CachyOS: Arch-based Distro for Speed and Ease of Use" +[#]: via: "https://news.itsfoss.com/cachyos/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +CachyOS: Arch-based Distro for Speed and Ease of Use +====== + +A performance-focused Arch-based distro for newbies and experts. + +![cachyOS][1] + +![][2] + +Arch Linux is suitable for advanced users looking for a challenge to use Linux on their system. + +However, many [Arch-based distributions][3] have made it possible for new users to get into the distribution family by making things easier. Options like Garuda Linux, Manjaro Linux, and others make it convenient for new users. + +And one of the exciting options among them is **CachyOS**. + +Well, you might already know about [blendOS][4] (which is also an Arch-based distro, still in the works). It is not remotely similar, but if you are exploring Arch-based distros, you can check it out. + +### CachyOS: Overview + +![cachyos home with cachyos theme][5] + +CachyOS is tailored for all users, whether you are an expert or just starting out. It is available as a stable release even though it is fairly new. + +It aims to provide a blazing-fast experience and offer customizability and stability simultaneously. + +All of this keeping security in mind. + +Some of the critical highlights of CachyOS include the following: + +- **Desktop****packages compiled with****LTO and x86-64-v3 optimization**. +- **Choice of desktop environments** with online installation process (including i3, bspwm, and Openbox window managers) +- **Offline and Online installation** options +- **GUI and CLI-based installation** options +- **Optimized Linux Kernel** with advanced BORE Scheduler for enhanced performance and reliability + +### Initial Impression + +CachyOS looks like a well-polished distribution. When I used the ISO to spin up a virtual machine, I noticed that it does support NVIDIA cards, which is a nice touch. + +![][6] + +And then, the option to use an offline or online installation process was helpful. With the online installation process, you can install desktop environments or window managers as per your preference. + +Once done, the welcome screen provided all the essential abilities from the get-go. So, good points for that as well. + +![cachyos welcome screen][7] + +You can install packages, enable system-specific settings, and tweak application/kernel stuff from the welcome screen. Of course, a newbie should not do anything they do not know, but it is good to have everything accessible. + +![cachyos hello welcome screen tweak options][8] + +I tried the KDE edition of CachyOS, which looks pretty good. + +For some reason, the theme was KDE's default Breeze Dark. I expected it to have CachyOS's customized theme out of the box. + +![cachyos homescreen with file manager using kde breeze dark theme][9] + +So, I had to head to the theme manager settings and apply the CachyOS theme for it to look unique. + +![][10] + +It utilizes the fish shell, making the terminal look and feel excellent out of the box. + +![cachyos fish shell][11] + +Performance and security enhancements are at their core. So, if you are unsure about the claims, you will have to compare things closely with another distro. However, per a couple of Reddit threads, some users mention a 10-20% performance uplift. + +You can read [Phoronix's performance analysis][12] of CachyOS for additional insights. + +Unlike other distributions, it features its own web browser, a fork of Firefox, with modifications/enhancements for privacy and security. However, it missed out on a default video player, which should be given to cater to new users. + +**Overall**: It feels like a well-thought-out distribution out of the box. To add a cherry on top, its [documentation][13] is on point and incredibly useful for beginners. + +### Download CachyOS + +You can find KDE and GNOME editions of CachyOS on its [official website][14]. An XFCE edition is in the works. Of course, you can install anything else using its online installation process. + +[CachyOS][14] + +Additionally, you can explore its [GitHub page][15] if you are curious about the customizations they make under the hood. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cachyos/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/04/CachyOS.jpg +[2]: https://news.itsfoss.com/content/images/2023/03/linux-mega-packt.webp +[3]: https://itsfoss.com/arch-based-linux-distros/?ref=news.itsfoss.com +[4]: https://news.itsfoss.com/blendos/ +[5]: https://news.itsfoss.com/content/images/2023/04/cachy-os-home.jpg +[6]: https://news.itsfoss.com/content/images/2023/04/cachy-os-installer.jpg +[7]: https://news.itsfoss.com/content/images/2023/04/cachy-os-hello.jpg +[8]: https://news.itsfoss.com/content/images/2023/04/cachyos-app-tweaks.jpg +[9]: https://news.itsfoss.com/content/images/2023/04/cachyos-home.jpg +[10]: https://news.itsfoss.com/content/images/2023/04/cachyos-nord-theme.jpg +[11]: https://news.itsfoss.com/content/images/2023/04/cachy-os-fish-shell.jpg +[12]: https://www.phoronix.com/review/cachyos-linux-perf?ref=news.itsfoss.com +[13]: https://wiki.cachyos.org/?ref=news.itsfoss.com +[14]: https://cachyos.org/?ref=news.itsfoss.com +[15]: https://github.com/cachyos?ref=news.itsfoss.com From 54f6a28e7aae1edba1b95c3282e92ab468e66cac Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Sat, 8 Apr 2023 12:16:52 +0800 Subject: [PATCH 300/318] fix formats for 20230113.0 --- ...️⭐️⭐️ Examples of floating point problems.md | 197 +++++------------- 1 file changed, 55 insertions(+), 142 deletions(-) diff --git a/sources/tech/20230113.0 ⭐️⭐️⭐️ Examples of floating point problems.md b/sources/tech/20230113.0 ⭐️⭐️⭐️ Examples of floating point problems.md index 45e72a15ec..2678fc9fb4 100644 --- a/sources/tech/20230113.0 ⭐️⭐️⭐️ Examples of floating point problems.md +++ b/sources/tech/20230113.0 ⭐️⭐️⭐️ Examples of floating point problems.md @@ -24,16 +24,20 @@ I’ve heard a million times about the dangers of floating point arithmetic, lik But I find all of this a little abstract on its own, and I really wanted some specific examples of floating point bugs in real-world programs. -So I [asked on Mastodon][1] for -examples of how floating point has gone wrong for them in real programs, and as -always folks delivered! Here are a bunch of examples. I’ve also written some -example programs for some of them to see exactly what happens. Here’s a table of contents: +So I [asked on Mastodon][1] for examples of how floating point has gone wrong for them in real programs, and as always folks delivered! Here are a bunch of examples. I’ve also written some example programs for some of them to see exactly what happens. Here’s a table of contents: -[how does floating point work?][2][floating point isn’t “bad” or random][3][example 1: the odometer that stopped][4][example 2: tweet IDs in Javascript][5][example 3: a variance calculation gone wrong][6][example 4: different languages sometimes do the same floating point calculation differently][7][example 5: the deep space kraken][8][example 6: the inaccurate timestamp][9][example 7: splitting a page into columns][10][example 8: collision checking][11] +- [how does floating point work?][2] +- [floating point isn’t “bad” or random][3] +- [example 1: the odometer that stopped][4] +- [example 2: tweet IDs in Javascript][5] +- [example 3: a variance calculation gone wrong][6] +- [example 4: different languages sometimes do the same floating point calculation differently][7] +- [example 5: the deep space kraken][8] +- [example 6: the inaccurate timestamp][9] +- [example 7: splitting a page into columns][10] +- [example 8: collision checking][11] -None of these 8 examples talk about NaNs or +0/-0 or infinity values or -subnormals, but it’s not because those things don’t cause problems – it’s just -that I got tired of writing at some point :). +None of these 8 examples talk about NaNs or +0/-0 or infinity values or subnormals, but it’s not because those things don’t cause problems – it’s just that I got tired of writing at some point :). Also I’ve probably made some mistakes in this post. @@ -45,35 +49,21 @@ I’m not going to write a long explanation of how floating point works in this #### floating point isn’t “bad” or random -I don’t want you to read this post and conclude that floating point is bad. -It’s an amazing tool for doing numerical calculations. So many smart people -have done so much work to make numerical calculations on computers efficient and -accurate! Two points about how all of this isn’t floating point’s fault: +I don’t want you to read this post and conclude that floating point is bad. It’s an amazing tool for doing numerical calculations. So many smart people have done so much work to make numerical calculations on computers efficient and accurate! Two points about how all of this isn’t floating point’s fault: -- Doing numerical computations on a computer inherently involves -some approximation and rounding, especially if you want to do it -efficiently. You can’t always store an arbitrary amount of precision for +- Doing numerical computations on a computer inherently involves some approximation and rounding, especially if you want to do it efficiently. You can’t always store an arbitrary amount of precision for every single number you’re working with. -- Floating point is standardized (IEEE 754), so operations like addition on -floating point numbers are deterministic – my understanding is that 0.1 + -0.2 will always give you the exact same result (0.30000000000000004), even -across different architectures. It might not be the result you _expected_, -but it’s actually very predictable. +- Floating point is standardized (IEEE 754), so operations like addition on floating point numbers are deterministic – my understanding is that 0.1 + 0.2 will always give you the exact same result (0.30000000000000004), even across different architectures. It might not be the result you _expected_, but it’s actually very predictable. -My goal for this post is just to explain what kind of problems can come up with -floating point numbers and why they happen so that you know when to be -careful with them, and when they’re not appropriate. +My goal for this post is just to explain what kind of problems can come up with floating point numbers and why they happen so that you know when to be careful with them, and when they’re not appropriate. Now let’s get into the examples. #### example 1: the odometer that stopped -One person said that they were working on an odometer that was continuously -adding small amounts to a 32-bit float to measure distance travelled, and -things went very wrong. +One person said that they were working on an odometer that was continuously adding small amounts to a 32-bit float to measure distance travelled, and things went very wrong. -To make this concrete, let’s say that we’re adding numbers to the odometer 1cm -at a time. What does it look like after 10,000 kilometers? +To make this concrete, let’s say that we’re adding numbers to the odometer 1cm at a time. What does it look like after 10,000 kilometers? Here’s a C program that simulates that: @@ -101,10 +91,7 @@ This is VERY bad – it’s not a small error, 262km is a LOT less than 10,000km #### what went wrong: gaps between floating point numbers get big -The problem in this case is that, for 32-bit floats, 262144.0 + 0.01 = 262144.0. -So it’s not just that the number is inaccurate, it’ll actually never increase -at all! If we travelled another 10,000 kilometers, the odometer would still be -stuck at 262144 meters (aka 262.144km). +The problem in this case is that, for 32-bit floats, 262144.0 + 0.01 = 262144.0. So it’s not just that the number is inaccurate, it’ll actually never increase at all! If we travelled another 10,000 kilometers, the odometer would still be stuck at 262144 meters (aka 262.144km). Why is this happening? Well, floating point numbers get farther apart as they get bigger. In this example, for 32-bit floats, here are 3 consecutive floating point numbers: @@ -116,13 +103,9 @@ I got those numbers by going to [https://float.exposed/0x48800000][13] and incre So, there are no 32-bit floating point numbers between 262144.0 and 262144.03125. Why is that a problem? -The problem is that 262144.03125 is about 262144.0 + 0.03. So when we try to -add 0.01 to 262144.0, it doesn’t make sense to round up to the next number. So -the sum just stays at 262144.0. +The problem is that 262144.03125 is about 262144.0 + 0.03. So when we try to add 0.01 to 262144.0, it doesn’t make sense to round up to the next number. So the sum just stays at 262144.0. -Also, it’s not a coincidence that 262144 is a power of 2 (it’s 2^18). The gaps -been floating point numbers change after every power of 2, and at 2^18 the gap -between 32-bit floats is 0.03125, increasing from 0.016ish. +Also, it’s not a coincidence that 262144 is a power of 2 (it’s 2^18). The gaps been floating point numbers change after every power of 2, and at 2^18 the gap between 32-bit floats is 0.03125, increasing from 0.016ish. #### one way to solve this: use a double @@ -133,41 +116,26 @@ Expected: 10000.000000 km Got: 9999.999825 km ``` -There are still some small inaccuracies here – we’re off about 17 centimeters. -Whether this matters or not depends on the context: being slightly off could very -well be disastrous if we were doing a precision space maneuver or something, but -it’s probably fine for an odometer. +There are still some small inaccuracies here – we’re off about 17 centimeters. Whether this matters or not depends on the context: being slightly off could very well be disastrous if we were doing a precision space maneuver or something, but it’s probably fine for an odometer. -Another way to improve this would be to increment the odometer in bigger chunks -– instead of adding 1cm at a time, maybe we could update it less frequently, -like every 50cm. +Another way to improve this would be to increment the odometer in bigger chunks – instead of adding 1cm at a time, maybe we could update it less frequently, like every 50cm. -If we use a double **and** increment by 50cm instead of 1cm, we get the exact -correct answer: +If we use a double **and** increment by 50cm instead of 1cm, we get the exact correct answer: ``` Expected: 10000.000000 km Got: 10000.000000 km ``` -A third way to solve this could be to use an **integer**: maybe we decide that -the smallest unit we care about is 0.1mm, and then measure everything as -integer multiples of 0.1mm. I have never built an odometer so I can’t say what -the best approach is. +A third way to solve this could be to use an **integer**: maybe we decide that the smallest unit we care about is 0.1mm, and then measure everything as integer multiples of 0.1mm. I have never built an odometer so I can’t say what the best approach is. #### example 2: tweet IDs in Javascript -Javascript only has floating point numbers – it doesn’t have an integer type. -The biggest integer you can represent in a 64-bit floating point number is -2^53. +Javascript only has floating point numbers – it doesn’t have an integer type. The biggest integer you can represent in a 64-bit floating point number is 2^53. -But tweet IDs are big numbers, bigger than 2^53. The Twitter API now returns -them as both integers and strings, so that in Javascript you can just use the -string ID (like “1612850010110005250”), but if you tried to use the integer -version in JS, things would go very wrong. +But tweet IDs are big numbers, bigger than 2^53. The Twitter API now returns them as both integers and strings, so that in Javascript you can just use the string ID (like “1612850010110005250”), but if you tried to use the integer version in JS, things would go very wrong. -You can check this yourself by taking a tweet ID and putting it in the -Javascript console, like this: +You can check this yourself by taking a tweet ID and putting it in the Javascript console, like this: ``` >> 1612850010110005250 @@ -176,8 +144,7 @@ Javascript console, like this: Notice that 1612850010110005200 is NOT the same number as 1612850010110005250!! It’s 50 less! -This particular issue doesn’t happen in Python (or any other language that I -know of), because Python has integers. Here’s what happens if we enter the same number in a Python REPL: +This particular issue doesn’t happen in Python (or any other language that I know of), because Python has integers. Here’s what happens if we enter the same number in a Python REPL: ``` In [3]: 1612850010110005250 @@ -188,14 +155,9 @@ Same number, as you’d expect. #### example 2.1: the corrupted JSON data -This is a small variant of the “tweet IDs in Javascript” issue, but even if -you’re _not_ actually writing Javascript code, numbers in JSON are still sometimes -treated as if they’re floats. This mostly makes sense to me because JSON has -“Javascript” in the name, so it seems reasonable to decode the values the way -Javascript would. +This is a small variant of the “tweet IDs in Javascript” issue, but even if you’re _not_ actually writing Javascript code, numbers in JSON are still sometimes treated as if they’re floats. This mostly makes sense to me because JSON has “Javascript” in the name, so it seems reasonable to decode the values the way Javascript would. -For example, if we pass some JSON through `jq`, we see the exact same issue: -the number 1612850010110005250 gets changed into 1612850010110005200. +For example, if we pass some JSON through `jq`, we see the exact same issue: the number 1612850010110005250 gets changed into 1612850010110005200. ``` $ echo '{"id": 1612850010110005250}' | jq '.' @@ -206,19 +168,13 @@ $ echo '{"id": 1612850010110005250}' | jq '.' But it’s not consistent across all JSON libraries Python’s `json` module will decode `1612850010110005250` as the correct integer. -Several people mentioned issues with sending floats in JSON, whether either -they were trying to send a large integer (like a pointer address) in JSON and -it got corrupted, or sending smaller floating point values back and forth -repeatedly and the value slowly diverging over time. +Several people mentioned issues with sending floats in JSON, whether either they were trying to send a large integer (like a pointer address) in JSON and it got corrupted, or sending smaller floating point values back and forth repeatedly and the value slowly diverging over time. #### example 3: a variance calculation gone wrong -Let’s say you’re doing some statistics, and you want to calculate the variance -of many numbers. Maybe more numbers than you can easily fit in memory, so you -want to do it in a single pass. +Let’s say you’re doing some statistics, and you want to calculate the variance of many numbers. Maybe more numbers than you can easily fit in memory, so you want to do it in a single pass. -There’s a simple (but bad!!!) algorithm you can use to calculate the variance in a single pass, -from [this blog post][14]. Here’s some Python code: +There’s a simple (but bad!!!) algorithm you can use to calculate the variance in a single pass, from [this blog post][14]. Here’s some Python code: ``` def calculate_bad_variance(nums): @@ -246,7 +202,7 @@ Bad variance: 13.840000000000003 <- pretty close! Now, let’s try it the same 100,000 large numbers that are very close together (distributed between 100000000 and 100000000.06) ``` -In [7]: calculate_bad_variance(np.random.uniform(100000000, 100000000.06, 100000)) +In [7]: calculate_bad_variance(np.random.uniform(100000000, 100000000.06, 100000)) Real variance: 0.00029959105209321173 Bad variance: -138.93632 <- OH NO ``` @@ -255,50 +211,27 @@ This is extremely bad: not only is the bad variance way off, it’s NEGATIVE! (t #### what went wrong: catastrophic cancellation -What’s going here is similar to our odometer number problem: the -`sum_of_squares` number gets extremely big (about 10^21 or 2^69), and at that point, the -gap between consecutive floating point numbers is also very big – it’s 2**46. -So we just lose all precision in our calculations. +What’s going here is similar to our odometer number problem: the `sum_of_squares` number gets extremely big (about 10^21 or 2^69), and at that point, the gap between consecutive floating point numbers is also very big – it’s 2**46. So we just lose all precision in our calculations. -The term for this problem is “catastrophic cancellation” – we’re subtracting -two very large floating point numbers which are both going to be pretty far -from the correct value of the calculation, so the result of the subtraction is -also going to be wrong. +The term for this problem is “catastrophic cancellation” – we’re subtracting two very large floating point numbers which are both going to be pretty far from the correct value of the calculation, so the result of the subtraction is also going to be wrong. [The blog post I mentioned before][14] +talks about a better algorithm people use to compute variance called Welford’s algorithm, which doesn’t have the catastrophic cancellation issue. -[The blog post I mentioned before][14] -talks about a better algorithm people use to compute variance called -Welford’s algorithm, which doesn’t have the catastrophic cancellation issue. - -And of course, the solution for most people is to just use a scientific -computing library like Numpy to calculate variance instead of trying to do it -yourself :) +And of course, the solution for most people is to just use a scientific computing library like Numpy to calculate variance instead of trying to do it yourself :) #### example 4: different languages sometimes do the same floating point calculation differently -A bunch of people mentioned that different platforms will do the same -calculation in different ways. One way this shows up in practice is – maybe -you have some frontend code and some backend code that do the exact same -floating point calculation. But it’s done slightly differently in Javascript -and in PHP, so you users end up seeing discrepancies and getting confused. +A bunch of people mentioned that different platforms will do the same calculation in different ways. One way this shows up in practice is – maybe you have some frontend code and some backend code that do the exact same floating point calculation. But it’s done slightly differently in Javascript and in PHP, so you users end up seeing discrepancies and getting confused. -In principle you might think that different implementations should work the -same way because of the IEEE 754 standard for floating point, but here are a -couple of caveats that were mentioned: +In principle you might think that different implementations should work the same way because of the IEEE 754 standard for floating point, but here are a couple of caveats that were mentioned: -- math operations in libc (like sin/log) behave differently in different -implementations. So code using glibc could give you different results than -code using musl -- some x86 instructions can use 80 bit precision for some double operations -internally instead of 64 bit precision. [Here’s a GitHub issue talking about -that][15] +- math operations in libc (like sin/log) behave differently in different implementations. So code using glibc could give you different results than code using musl +- some x86 instructions can use 80 bit precision for some double operations internally instead of 64 bit precision. [Here’s a GitHub issue talking about that][15] I’m not very sure about these points and I don’t have concrete examples I can reproduce. #### example 5: the deep space kraken -Kerbal Space Program is a space simulation game, and it used to have a bug -called the [Deep Space Kraken][16] where when -you moved very fast, your ship would start getting destroyed due to floating point issues. This is similar to the other problems we’ve talked out involving big floating numbers (like the variance problem), but I wanted to mention it because: +Kerbal Space Program is a space simulation game, and it used to have a bug called the [Deep Space Kraken][16] where when you moved very fast, your ship would start getting destroyed due to floating point issues. This is similar to the other problems we’ve talked out involving big floating numbers (like the variance problem), but I wanted to mention it because: - it has a funny name - it seems like a very common bug in video games / astrophysics / simulations in general – if you have points that are very far from the origin, your math gets messed up @@ -307,32 +240,24 @@ Another example of this is the [Far Lands][17] in Minecraft. #### example 6: the inaccurate timestamp -I promise this is the last example of “very large floating numbers can ruin your day”. -But! Just one more! Let’s imagine that we try to represent the current Unix epoch in nanoseconds -(about 1673580409000000000) as a 64-bit floating point number. +I promise this is the last example of “very large floating numbers can ruin your day”. But! Just one more! Let’s imagine that we try to represent the current Unix epoch in nanoseconds (about 1673580409000000000) as a 64-bit floating point number. This is no good! 1673580409000000000 is about 2^60 (crucially, bigger than 2^53), and the next 64-bit float after it is 1673580409000000256. -So this would be a great way to end up with inaccuracies in your time math. Of -course, time libraries actually represent times as integers, so this isn’t -usually a problem. (there’s always still the [year 2038 problem][18], but that’s not -related to floats) +So this would be a great way to end up with inaccuracies in your time math. Of course, time libraries actually represent times as integers, so this isn’t usually a problem. (there’s always still the [year 2038 problem][18], but that’s not related to floats) In general, the lesson here is that sometimes it’s better to use integers. #### example 7: splitting a page into columns -Now that we’ve talked about problems with big floating point numbers, let’s do -a problem with small floating point numbers. +Now that we’ve talked about problems with big floating point numbers, let’s do a problem with small floating point numbers. Let’s say you have a page width, and a column width, and you want to figure out: - how many columns fit on the page - how much space is left over -You might reasonably try `floor(page_width / column_width)` for the first -question and `page_width % column_width` for the second question. Because -that would work just fine with integers! +You might reasonably try `floor(page_width / column_width)` for the first question and `page_width % column_width` for the second question. Because that would work just fine with integers! ``` In [5]: math.floor(13.716 / 4.572) @@ -344,21 +269,15 @@ Out[6]: 4.571999999999999 This is wrong! The amount of space left is 0! -A better way to calculate the amount of space left might have been -`13.716 - 3 * 4.572`, which gives us a very small negative number. +A better way to calculate the amount of space left might have been `13.716 - 3 * 4.572`, which gives us a very small negative number. I think the lesson here is to never calculate the same thing in 2 different ways with floats. -This is a very basic example but I can kind of see how this would create all -kinds of problems if I was doing page layout with floating point numbers, or -doing CAD drawings. +This is a very basic example but I can kind of see how this would create all kinds of problems if I was doing page layout with floating point numbers, or doing CAD drawings. #### example 8: collision checking -Here’s a very silly Python program, that starts a variable at 1000 and -decrements it until it collides with 0. You can imagine that this is part of a -pong game or something, and that `a` is a ball that’s supposed to collide with -a wall. +Here’s a very silly Python program, that starts a variable at 1000 and decrements it until it collides with 0. You can imagine that this is part of a pong game or something, and that `a` is a ball that’s supposed to collide with a wall. ``` a = 1000 @@ -366,21 +285,15 @@ while a != 0: a -= 0.001 ``` -You might expect this program to terminate. But it doesn’t! `a` is never 0, -instead it goes from 1.673494676862619e-08 to -0.0009999832650532314. +You might expect this program to terminate. But it doesn’t! `a` is never 0, instead it goes from 1.673494676862619e-08 to -0.0009999832650532314. -The lesson here is that instead of checking for float equality, usually you -want to check if two numbers are different by some very small amount. Or here -we could just write `while a > 0`. +The lesson here is that instead of checking for float equality, usually you want to check if two numbers are different by some very small amount. Or here we could just write `while a > 0`. #### that’s all for now -I didn’t even get to NaNs (the are so many of them!) or infinity or +0 / -0 or subnormals, but we’ve -already written 2000 words and I’m going to just publish this. +I didn’t even get to NaNs (the are so many of them!) or infinity or +0 / -0 or subnormals, but we’ve already written 2000 words and I’m going to just publish this. -I might write another followup post later – that Mastodon thread has literally -15,000 words of floating point problems in it, there’s a lot of material! Or I -might not, who knows :) +I might write another followup post later – that Mastodon thread has literally 15,000 words of floating point problems in it, there’s a lot of material! Or I might not, who knows :) -------------------------------------------------------------------------------- From 940da0da94d289b06d620050e18be3d10a83f4da Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Sat, 8 Apr 2023 12:23:13 +0800 Subject: [PATCH 301/318] fix formats for 20230118.0 --- ...️⭐️⭐️ Examples of problems with integers.md | 147 ++++++------------ 1 file changed, 45 insertions(+), 102 deletions(-) diff --git a/sources/tech/20230118.0 ⭐️⭐️⭐️ Examples of problems with integers.md b/sources/tech/20230118.0 ⭐️⭐️⭐️ Examples of problems with integers.md index 6751db4114..de9fb18280 100644 --- a/sources/tech/20230118.0 ⭐️⭐️⭐️ Examples of problems with integers.md +++ b/sources/tech/20230118.0 ⭐️⭐️⭐️ Examples of problems with integers.md @@ -12,18 +12,22 @@ Examples of problems with integers Hello! A few days back we talked about [problems with floating point numbers][1]. -This got me thinking – but what about integers? Of course integers have all -kinds of problems too – anytime you represent a number in a small fixed amount of -space (like 8/16/32/64 bits), you’re going to run into problems. +This got me thinking – but what about integers? Of course integers have all kinds of problems too – anytime you represent a number in a small fixed amount of space (like 8/16/32/64 bits), you’re going to run into problems. So I [asked on Mastodon again][2] for examples of integer problems and got all kinds of great responses again. Here’s a table of contents. -[example 1: the small database primary key][3][example 2: integer overflow/underflow][4][aside: how do computers represent negative integers?][5][example 3: decoding a binary format in Java][6][example 4: misinterpreting an IP address or string as an integer][7][example 5: security problems because of integer overflow][8][example 6: the case of the mystery byte order][9][example 7: modulo of negative numbers][10][example 8: compilers removing integer overflow checks][11][example 9: the && typo][12] +- [example 1: the small database primary key][3] +- [example 2: integer overflow/underflow][4] +- [aside: how do computers represent negative integers?][5] +- [example 3: decoding a binary format in Java][6] +- [example 4: misinterpreting an IP address or string as an integer][7] +- [example 5: security problems because of integer overflow][8] +- [example 6: the case of the mystery byte order][9] +- [example 7: modulo of negative numbers][10] +- [example 8: compilers removing integer overflow checks][11] +- [example 9: the && typo][12] -Like last time, I’ve written some example programs to demonstrate these -problems. I’ve tried to use a variety of languages in the examples (Go, -Javascript, Java, and C) to show that these problems don’t just show up in -super low level C programs – integers are everywhere! +Like last time, I’ve written some example programs to demonstrate these problems. I’ve tried to use a variety of languages in the examples (Go, Javascript, Java, and C) to show that these problems don’t just show up in super low level C programs – integers are everywhere! Also I’ve probably made some mistakes in here, I learned several things while writing this. @@ -36,9 +40,7 @@ One of the most classic (and most painful!) integer problems is: - oh no! - You need to do a database migration to switch your primary key to be a 64-bit integer instead -If the primary key actually reaches its maximum value I’m not sure exactly what -happens, I’d imagine you wouldn’t be able to create any new database rows and -it would be a very bad day for your massively successful service. +If the primary key actually reaches its maximum value I’m not sure exactly what happens, I’d imagine you wouldn’t be able to create any new database rows and it would be a very bad day for your massively successful service. #### example 2: integer overflow/underflow @@ -87,20 +89,15 @@ Some brief notes about other languages: - In C, you can compile with `clang -fsanitize=unsigned-integer-overflow`. Then if your code has an overflow/underflow like this, the program will crash. - Similarly in Rust, if you compile your program in debug mode it’ll crash if there’s an integer overflow. But in release mode it won’t crash, it’ll just happily decide that 0 - 1 = 4294967295. -The reason Rust doesn’t check for overflows if you compile your program in -release mode (and the reason C and Go don’t check) is that – these checks are -expensive! Integer arithmetic is a very big part of many computations, and -making sure that every single addition isn’t overflowing makes it slower. +The reason Rust doesn’t check for overflows if you compile your program in release mode (and the reason C and Go don’t check) is that – these checks are expensive! Integer arithmetic is a very big part of many computations, and making sure that every single addition isn’t overflowing makes it slower. #### aside: how do computers represent negative integers? -I mentioned in the last section that `0xFFFFFFFF` can mean either `-1` or -`4294967295`. You might be thinking – what??? Why would `0xFFFFFFFF` mean `-1`? +I mentioned in the last section that `0xFFFFFFFF` can mean either `-1` or `4294967295`. You might be thinking – what??? Why would `0xFFFFFFFF` mean `-1`? So let’s talk about how computers represent negative integers for a second. -I’m going to simplify and talk about 8-bit integers instead of 32-bit integers, -because there are less of them and it works basically the same way. +I’m going to simplify and talk about 8-bit integers instead of 32-bit integers, because there are less of them and it works basically the same way. You can represent 256 different numbers with an 8-bit integer: 0 to 255 @@ -112,9 +109,7 @@ You can represent 256 different numbers with an 8-bit integer: 0 to 255 11111111 -> 255 ``` -But what if you want to represent _negative_ integers? We still only have 8 -bits! So we need to reassign some of these and treat them as negative numbers -instead. +But what if you want to represent _negative_ integers? We still only have 8 bits! So we need to reassign some of these and treat them as negative numbers instead. Here’s the way most modern computers do it: @@ -147,9 +142,7 @@ That’s how we end up with `0xFFFFFFFF` meaning -1. #### there are multiple ways to represent negative integers -The way we just talked about of representing negative integers (“it’s the equivalent positive integer, but you subtract 2^n”) is called -**two’s complement**, and it’s the most common on modern computers. There are several other ways -though, the [wikipedia article has a list][14]. +The way we just talked about of representing negative integers (“it’s the equivalent positive integer, but you subtract 2^n”) is called **two’s complement**, and it’s the most common on modern computers. There are several other ways though, the [wikipedia article has a list][14]. #### weird thing: the absolute value of -128 is negative @@ -182,16 +175,13 @@ This prints out: -128 ``` -This is because the signed 8-bit integers go from -128 to 127 – there **is** no +128! -Some programs might crash when you try to do this (it’s an overflow), but Go -doesn’t. +This is because the signed 8-bit integers go from -128 to 127 – there **is** no +128! Some programs might crash when you try to do this (it’s an overflow), but Go doesn’t. Now that we’ve talked about signed integers a bunch, let’s dig into another example of how they can cause problems. #### example 3: decoding a binary format in Java -Let’s say you’re parsing a binary format in Java, and you want to get the first -4 bits of the byte `0x90`. The correct answer is 9. +Let’s say you’re parsing a binary format in Java, and you want to get the first 4 bits of the byte `0x90`. The correct answer is 9. ``` public class Main { @@ -222,9 +212,7 @@ Let’s break down what those two facts mean for our little calculation `b >> 4` #### what can you do about it? -I don’t the actual idiomatic way to do this in Java is, but the way I’d naively -approach fixing this is to put in a bit mask before doing the right shift. So -instead of: +I don’t the actual idiomatic way to do this in Java is, but the way I’d naively approach fixing this is to put in a bit mask before doing the right shift. So instead of: ``` b >> 4 @@ -238,20 +226,15 @@ we’d write `b & 0xFF` seems redundant (`b` is already a byte!), but it’s actually not because `b` is being promoted to an integer. -Now instead of `0x90 -> 0xFFFFFF90 -> 0xFFFFFFF9`, we end up calculating `0x90 -> 0xFFFFFF90 -> 0x00000090 -> 0x00000009`, which is the result we wanted: 9. +Now instead of `0x90 -> 0xFFFFFF90 -> 0xFFFFFFF9`, we end up calculating `0x90 -> 0xFFFFFF90 -> 0x00000090 -> x00000009`, which is the result we wanted: 9. And when we actually try it, it prints out “9”. -Also, if we were using a language with unsigned integers, the natural way to -deal with this would be to treat the value as an unsigned integer in the first -place. But that’s not possible in Java. +Also, if we were using a language with unsigned integers, the natural way to deal with this would be to treat the value as an unsigned integer in the first place. But that’s not possible in Java. #### example 4: misinterpreting an IP address or string as an integer -I don’t know if this is technically a “problem with integers” but it’s funny -so I’ll mention it: [Rachel by the bay][16] has a bunch of great -examples of things that are not integers being interpreted as integers. For -example, “HTTP” is `0x48545450` and `2130706433` is `127.0.0.1`. +I don’t know if this is technically a “problem with integers” but it’s funny so I’ll mention it: [Rachel by the bay][16] has a bunch of great examples of things that are not integers being interpreted as integers. For example, “HTTP” is `0x48545450` and `2130706433` is `127.0.0.1`. She points out that you can actually ping any integer, and it’ll convert that integer into an IP address, for example: @@ -266,8 +249,7 @@ PING 132848123841239999988888888888234234234234234234 (251.164.101.122): 56 data #### example 5: security problems because of integer overflow -Another integer overflow example: here’s a [search for CVEs involving integer overflows][17]. -There are a lot! I’m not a security person, but here’s one random example: this [json parsing library bug][18] +Another integer overflow example: here’s a [search for CVEs involving integer overflows][17]. There are a lot! I’m not a security person, but here’s one random example: this [json parsing library bug][18] My understanding of that json parsing bug is roughly: @@ -276,40 +258,25 @@ My understanding of that json parsing bug is roughly: - but the JSON file is still 3GB, so it gets copied into the tiny buffer with almost 0 bytes of memory - this overwrites all kinds of other memory that it’s not supposed to -The CVE says “This vulnerability mostly impacts process availability”, which I -think means “the program crashes”, but sometimes this kind of thing is much -worse and can result in arbitrary code execution. +The CVE says “This vulnerability mostly impacts process availability”, which I think means “the program crashes”, but sometimes this kind of thing is much worse and can result in arbitrary code execution. -My impression is that there are a large variety of different flavours of -security vulnerabilities caused by integer overflows. +My impression is that there are a large variety of different flavours of security vulnerabilities caused by integer overflows. #### example 6: the case of the mystery byte order -One person said that they’re do scientific computing and sometimes they need to -read files which contain data with an unknown byte order. +One person said that they’re do scientific computing and sometimes they need to read files which contain data with an unknown byte order. -Let’s invent a small example of this: say you’re reading a file which contains 4 -bytes - `00`, `00`, `12`, and `81` (in that order), that you happen to know -represent a 4-byte integer. There are 2 ways to interpret that integer: +Let’s invent a small example of this: say you’re reading a file which contains 4 bytes - `00`, `00`, `12`, and `81` (in that order), that you happen to know represent a 4-byte integer. There are 2 ways to interpret that integer: - `0x00001281` (which translates to 4737). This order is called “big endian” - `0x81120000` (which translates to 2165440512). This order is called “little endian”. -Which one is it? Well, maybe the file contains some metadata that specifies the -endianness. Or maybe you happen to know what machine it was generated on and -what byte order that machine uses. Or maybe you just read a bunch of values, -try both orders, and figure out which makes more sense. Maybe 2165440512 is too -big to make sense in the context of whatever your data is supposed to mean, or -maybe `4737` is too small. +Which one is it? Well, maybe the file contains some metadata that specifies the endianness. Or maybe you happen to know what machine it was generated on and what byte order that machine uses. Or maybe you just read a bunch of values, try both orders, and figure out which makes more sense. Maybe 2165440512 is too big to make sense in the context of whatever your data is supposed to mean, or maybe `4737` is too small. A couple more notes on this: -- this isn’t just a problem with integers, floating point numbers have byte -order too -- this also comes up when reading data from a network, but in that case the -byte order isn’t a “mystery”, it’s just going to be big endian. But x86 -machines (and many others) are little endian, so you have to swap the byte -order of all your numbers. +- this isn’t just a problem with integers, floating point numbers have byte order too +- this also comes up when reading data from a network, but in that case the byte order isn’t a “mystery”, it’s just going to be big endian. But x86 machines (and many others) are little endian, so you have to swap the byte order of all your numbers. #### example 7: modulo of negative numbers @@ -317,17 +284,13 @@ This is more of a design decision about how different programming languages desi Let’s say you write `-13 % 3` in your program, or `13 % -3`. What’s the result? -It turns out that different programming languages do it differently, for -example in Python `-13 % 3 = 2` but in Javascript `-13 % 3 = -1`. +It turns out that different programming languages do it differently, for example in Python `-13 % 3 = 2` but in Javascript `-13 % 3 = -1`. -There’s a table in [this blog post][19] that -describes a bunch of different programming languages’ choices. +There’s a table in [this blog post][19] that describes a bunch of different programming languages’ choices. #### example 8: compilers removing integer overflow checks -We’ve been hearing a lot about integer overflow and why it’s bad. So let’s -imagine you try to be safe and include some checks in your programs – after -each addition, you make sure that the calculation didn’t overflow. Like this: +We’ve been hearing a lot about integer overflow and why it’s bad. So let’s imagine you try to be safe and include some checks in your programs – after each addition, you make sure that the calculation didn’t overflow. Like this: ``` #include @@ -356,39 +319,26 @@ $ gcc -O3 check_overflow.c -o check_overflow && ./check_overflow 0 ``` -That’s weird – when we compile with `gcc`, we get the answer we expected, but -with `gcc -O3`, we get a different answer. Why? +That’s weird – when we compile with `gcc`, we get the answer we expected, but with `gcc -O3`, we get a different answer. Why? #### what’s going on? My understanding (which might be wrong) is: -- Signed integer overflow in C is **undefined behavior**. I think that’s -because different C implementations might be using different representations -of signed integers (maybe they’re using one’s complement instead of two’s -complement or something) +- Signed integer overflow in C is **undefined behavior**. I think that’s because different C implementations might be using different representations of signed integers (maybe they’re using one’s complement instead of two’s complement or something) - “undefined behaviour” in C means “the compiler is free to do literally whatever it wants after that point” (see this post [With undefined behaviour, anything is possible][20] by Raph Levine for a lot more) -- Some compiler optimizations assume that undefined behaviour will never -happen. They’re free to do this, because – if that undefined behaviour -_did_ happen, then they’re allowed to do whatever they want, so “run the -code that I optimized assuming that this would never happen” is fine. -- So this `if (n + 100 < 0)` check is irrelevant – if that did -happen, it would be undefined behaviour, so there’s no need to execute the -contents of that if statement. +- Some compiler optimizations assume that undefined behaviour will never happen. They’re free to do this, because – if that undefined behaviour _did_ happen, then they’re allowed to do whatever they want, so “run the code that I optimized assuming that this would never happen” is fine. +- So this `if (n + 100 < 0)` check is irrelevant – if that did happen, it would be undefined behaviour, so there’s no need to execute the contents of that if statement. So, that’s weird. I’m not going to write a “what can you do about it?” section here because I’m pretty out of my depth already. I certainly would not have expected that though. -My impression is that “undefined behaviour” is really a C/C++ concept, and -doesn’t exist in other languages in the same way except in the case of “your -program called some C code in an incorrect way and that C code did something -weird because of undefined behaviour”. Which of course happens all the time. +My impression is that “undefined behaviour” is really a C/C++ concept, and doesn’t exist in other languages in the same way except in the case of “your program called some C code in an incorrect way and that C code did something weird because of undefined behaviour”. Which of course happens all the time. #### example 9: the && typo -This one was mentioned as a very upsetting bug. Let’s say you have two integers -and you want to check that they’re both nonzero. +This one was mentioned as a very upsetting bug. Let’s say you have two integers and you want to check that they’re both nonzero. In Javascript, you might write: @@ -406,9 +356,7 @@ if a & b { } ``` -This is still perfectly valid code, but it means something completely different -– it’s a bitwise and instead of a boolean and. Let’s go into a Javascript -console and look at bitwise vs boolean and for `9` and `4`: +This is still perfectly valid code, but it means something completely different – it’s a bitwise and instead of a boolean and. Let’s go into a Javascript console and look at bitwise vs boolean and for `9` and `4`: ``` > 9 && 4 @@ -421,20 +369,15 @@ console and look at bitwise vs boolean and for `9` and `4`: 4 ``` -It’s easy to imagine this turning into a REALLY annoying bug since it would be -intermittent – often `x & y` does turn out to be truthy if `x && y` is truthy. +It’s easy to imagine this turning into a REALLY annoying bug since it would be intermittent – often `x & y` does turn out to be truthy if `x && y` is truthy. #### what to do about it? -For Javascript, ESLint has a [no-bitwise check][21] check), which -requires you manually flag “no, I actually know what I’m doing, I want to do -bitwise and” if you use a bitwise and in your code. I’m sure many other linters -have a similar check. +For Javascript, ESLint has a [no-bitwise check][21] check), which requires you manually flag “no, I actually know what I’m doing, I want to do bitwise and” if you use a bitwise and in your code. I’m sure many other linters have a similar check. #### that’s all for now! -There are definitely more problems with integers than this, but this got pretty -long again and I’m tired of writing again so I’m going to stop :) +There are definitely more problems with integers than this, but this got pretty long again and I’m tired of writing again so I’m going to stop :) -------------------------------------------------------------------------------- From d37ace97a83db652279435137c4cfecc757cdb25 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 8 Apr 2023 12:23:40 +0800 Subject: [PATCH 302/318] RP @CanYellow https://linux.cn/article-15702-1.html --- ...ware- Is There an Easy Path to Success-.md | 91 ++++++++++++++++++ ...ware- Is There an Easy Path to Success-.md | 93 ------------------- 2 files changed, 91 insertions(+), 93 deletions(-) create mode 100644 published/20220726 Open Source Software- Is There an Easy Path to Success-.md delete mode 100644 translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md diff --git a/published/20220726 Open Source Software- Is There an Easy Path to Success-.md b/published/20220726 Open Source Software- Is There an Easy Path to Success-.md new file mode 100644 index 0000000000..3fbd9812a3 --- /dev/null +++ b/published/20220726 Open Source Software- Is There an Easy Path to Success-.md @@ -0,0 +1,91 @@ +[#]: subject: "Open Source Software: Is There an Easy Path to Success?" +[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" +[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15702-1.html" + +开源软件:存在成功的捷径吗? +====== + +> 开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 + +![][0] + +今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 + +事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 + +开发一个能够在市场上获得成功的开源项目需要在开源的许多层面上下功夫。而维持这样的成功是一个持续的过程。所有这一切的关键在于找到以下这个非常基本的问题的正确答案:开源究竟是什么。 + +### 开源是代码 + +对于很多新用户而言,他们可能并不完全了解开源的不同层面,答案相当简单:开源就是软件!这当然没有错,毕竟我们多数人就是这样使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 + +任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目,并使其对用户有益的根本。当你从事开源工作的时候,代码和软件一样都是产品的一部分。 + +从零开始开发一个开源项目或者 复刻fork 一个现有项目,即便是在面对一个庞大而复杂的代码库时,也需要编写成千上万行代码。尤其是在创建一个现有项目的复刻的情况下,在移除任何在先的许可证、宣传材料或者其他任何可能已经失去作用的文件时必须小心翼翼(LCTT 校注:部分开源项目不允许你改变其原有的许可证)。终究是一个项目的功能吸引了它的用户群并维持项目的持续发展。当最终用户在考虑是否使用开源软件的时候,他们会阅读项目的源代码,而他们在其中所看到的应当是那些能够建立他们的信心的内容。 + +### 开源是社区 + +如何参与到社区中也是产品构建的一部分。创建一个社区并维护一个健康的社区关系是开源的核心之一,但对于大部分的领导者而言也往往是最坚难的任务,很少有人能很好地维护它。你可以尝试建立基金会或者提供赞助,但是最终还是由人们自行决定是否想要加入社区。 + +重要的是与社区保持一定程度的透明度,并不断保持。社区成员可以在它想要的任何阶段参与进来。除了需要进行的工作之外,诸如安全设置、签发证书、注册商标等,尽可能多的将你所做的工作展示给社区是相当重要的,这有助于取得社区信任。归根到底,你需要对社区负责,你的项目成也社区,败也社区。这可能会导致你的项目开发更谨慎、更缓慢并且向社区公开,不过项目最终会进展顺利。 + +如此地公开你正在进行的工作似乎有些令人生怯,尤其是当你担心更新推迟或者是出现漏洞的影响的时候。不过,让社区成员知悉你的进展,不仅有助帮助你建立与社区之间的信任关系,而且能够让社区成员感到被认可。 + +另一方面,公开你的工作流也可以获得来自社区成员的监督,他们经常有自己的见解并向你反馈。记录这些反馈是很重要的,这使得你的开源项目如实地反映社区需求。他们是项目的最终用户,而他们的反馈则反映了他们如何看待你的项目的长期发展,以及你的项目最终将有多么成功或者主流。 + +举例而言,当我们在考虑一个新功能的时候,我们在 征求意见文档Request for Comments(RFC)中发布一个征集意见的请求,我们会收到大量的反馈,我们必须认真思考应当如何吸收这些反馈。 + +因为开源是一个大型的合作项目,社区对支持开源项目的主动支持,使项目成为了最好的项目。并非所有的问题都要解决,但只要你有在倾听社区的呼声,社区就会有参与感。 + +参与到社区中也存在一些隐患。社区内部、项目维护与社区之间均可能存在不同意见,尤其是在涉及治理的问题上。治理对于一个开源项目来说是相当重要的。这也就是为什么拥有一份清晰的文档化的治理条例对于项目以及社区均是如此重要。 + +社区治理是一个关键的而又难啃的骨头。社区授权本身需要相当大的信任。对于一个拥有成千上万行代码的项目,在社区中寻找能够有效领导社区的人物是不容易的。不过开源项目经常是由更小的子项目组成的,这些子项目最好由社区中的某个人进行管理。这有助于社区更紧密地参与到项目中。 + +建立社区的过程不是一帆风顺的。让我列举一一些有助于维持社区与我的团队之间平衡的技巧。 + +**声明你的原则:** 尤其是在开源项目的早期,在项目代码仍在完善,很多事情还不完美的时候,项目之外的人员很难真正理解你所做的决定。向他们说明你做出决定所依据的原则,有助于你在思考过程上保持坦率,从而让社区不会错误地干扰你的事务。这一经验非常有效,在你做出决定时坚持遵循其中一项原则并展示出来是非常重要的。 + +**确定如何进行协作:** 你可以通过 Discord、Slack 或者邮件等途径完成这一工作。但是如果你试图同时使用它们,你将毫不意外的分散项目社区。社区人员将在所有这些途径上互相交流。选择一到两种沟通工具,投身于它们来保证社区的信息同步。 + +**珍惜反馈意见:** 倾听来自社区的反馈并付诸行动。即使需要你作出艰难的决定,你也应当向社区展示你是重视社区话语的。 + +**维护一套行为准则:** 如果你与社区打交道,你需要定义什么行为是可以接受的。一套落地的行为准则有助于在人们越过红线时警示他们。如果你可以提前制定这些你可以避免很多麻烦。 + +**考虑如何分发你的项目:** 存在这样的情况,因为你还没有准备好某一个组件,或者是因为存在一些你不希望所有人都能够访问的项目功能,所以你可能并不希望将你的项目完全向公众公开。关键是制定符合你的要求而不是向用户妥协的分发条款,如此,需要某种功能的用户可以获取所需项目的同时,不需要该功能的用户也不需要在开始使用该项目做出妥协。 + +**尽可能地避免投票:** 这是因为部分成员经常会赞成与大部分成员的意见相左的选项,这会使这些人产生一定程度的失望,并让他们觉得被项目所孤立。反之,尽量尝试询问他们想要解决什么问题,并尝试创造一个不需要付出代价的解决方案。 + +### 开源是许可 + +开源是给予你的用户如何使用你的软件的自由,而许可能够做到这一点。开源项目许可的好处在于,它保证了不论你作为维护者做了什么,你的所有最终用户以及利益相关方总是可以维护一系列的项目复刻版本,这些都是重要的项目复刻。 + +许可提供了人们可选择性,如果他们认为有必要,他们可以将项目带到不同的路径中。他们拥有创建副本的权利,这使得许多优秀的软件能够被开发出来。维护者有责任倾听他们的社区成员的声音,并以一个对项目的社区成员有利的方式运营项目。 + +我们推荐使用现有的许多可用的许可证,而不是独立制作你自己的许可条款,原因很简单,因为用户以及利益相关方通常都很熟悉常用的许可证,因此你不需要再花费时间在解释许可条款上。这将帮助你将你的精力集中在项目的其他部分上。 + +### 最后,开源是一项运动 + +开源包括了很多维度,也包含了很多人员。最重要的是,它是关于理解人们想要什么,并创建一个鼓励协作与透明的环境。开源也是关于创建社区,帮助建立走自己想走的开源项目的方式。维护者创造越多的机会让社区自由发挥,开源产品就越好,也越发成功。 + +开源是以上所有这些方面,而你的视野越宽阔,你就能越好的利用它。请考虑你如何能够在开源的每一个维度上出类拔萃,因为时至今日,开源的成功之路并无捷径。 + +--- + +via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ + +作者:[Jules Graybill][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jules-graybill/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202304/08/122245uqlbfaxp3flkwf5b.jpg \ No newline at end of file diff --git a/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md deleted file mode 100644 index ea35405d69..0000000000 --- a/translated/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: "Open Source Software: Is There an Easy Path to Success?" -[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" -[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" -[#]: collector: "lkxed" -[#]: translator: "CanYellow" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -开源软件:存在成功的捷径吗? -====== - -开发开源软件背后的工作是相当庞大的。那么我们如何保证开源项目的成功呢?存在捷径吗?本文认为是没有的。 - -![团队合作][1] - -今天,开源已经风靡世界。很多大型企业在快速成功的诱惑下被推向开源。但真实情况是世界上并不存在成功的捷径。你无法做到通过一次努力就能让所有的开源项目正常运行。 - -事实上,上述公司早期遇到的许多挑战都不是技术上的,而是人员与文化上的。 - -开发一个能够在市场上获得成功的开源项目需要同不同层级(的开源社区人员)一同工作。维护这样的项目也是一个持续的过程。所有这一切的关键在于找到以下这个非常基础的问题的正确答案:开源究竟是什么。 - -### 开源是代码 - -对于很多没有深刻认识到构成开源的不同层级(的开源社区人员)用户而言,答案相当简单:开源就是软件!这当然没有错,毕竟这就是我们多数人如何使用它的。不过,相比仅仅被视作软件而言,开源远不止这些。 - -任何开源项目的实质仍然是代码本身。代码是使一个开源项目有别于其他项目并使其对用户有益的根本。当你在开源中工作的时候,代码和软件一样都是产品自身的一部分。 - -从零开始开发一个(开源)项目或者复刻(fork)一个现有项目的分支,即便是在处理如此庞大而复杂的代码库时,也需要编写成千上万行代码。尤其是在创新一个现有项目的分支的情况下,在移除任何在先的许可证、宣传材料或者其他任何可能已经失去作用的文件时必须小心翼翼。终究是一个项目的功能吸引了它的用户群并维持项目的持续发展。当终端用户在考虑是否使用开源软件的时候,他们会阅读项目的源代码,而他们在其中所看到的应当是那些能够建立他们的信心的内容。 - -### 开源是社区 - -如何参与到社区中也是产品构建项目的一部分。创建一个社区并维护一个健康的社区关系是开源的核心之一,但对于大部分的领导者而言也往往是最坚难的任务,很少有人能很好地维护它。你可以尝试建立基金会或者提供赞助,但是最终还是人们自行决定是否想要加入社区。 - -维护一定程度的社区透明度并不断保持也是重要的。社区可以随心所欲地参与项目。除了需要秘密进行的工作之外,诸如安全设置、签发证书、注册商标等,尽可能多的将你所做的工作展示给社区是相当重要的,这有助于取得社区信任。你终究需要对社区负责,你的项目成也社区,败也社区。这可能会导致你的项目开发更谨慎、更缓慢并且向社区公开,不过项目最终会进展顺利。 - -如此地公开你正在进行的工作似乎有些令人生怯,尤其是当你担心更新推迟或者是出现漏洞的影响的时候。不过,让社区成员知悉你的进展不仅有助帮助你建立与社区之间的信任关系,而且能够让社区成员感到被认可。 - -另一方面,公开你的工作流也可以获得来自社区成员的监督,他们经常有自己的见解并向你反馈。记录这些反馈是很重要的,这使得你的开源项目如实地反映社区需求。他们是项目的末端用户,而他们的反馈则反映了他们如何看待你的项目的长期发展以及你的项目最终将有多么成功或者主流。 - -举例而言,当我们在考虑一个新功能的时候,我们在征求意见文档(RFC, Request for Comments)中发布一个征集意见的请求,我们会收到大量的反馈,我们必须认真思考应当如何吸收这些反馈。 - -因为开源是一个大型的合作项目,社区在支持开源项目成为可能的万里挑一的项目上享有主动权。并非所有的问题都要解决,但只要你有在倾听社区的呼声,社区就会有参与感。 - -参与到社区中也存在一些隐患。社区内部、项目维护与社区之间均可能存在不同意见,尤其是在涉及管理问题上。管理问题对于一个开源项目来说是相当重要的。这也就是为什么拥有一份清晰的文档化的管理条例对于项目以及社区均是如此重要。 - -社区管理是一个关键的而又难啃的骨头。社区授权本身需要相当大的信任。对于一个拥有成千上万行代码的项目,在社区中寻找能够有效领导社区的人物是不容易的。不过开源项目经常是由更小的子项目组成的,这些子项目最好由社区中的某个人进行管理。这有助于社区更紧密地参与到项目中。 - -| - | -| :- | -| 建立社区的过程不是一帆风顺的。让我列举一一些有助于维持社区与我的团队之间平衡的技巧。 - -**声明你的原则:**尤其是在开源项目的早期,在项目代码仍在完善,很多事情还不完美的时候,项目之外的人员很难真正理解你所做的决定。向他们说明你做出决定所依据的原则有助于你在思考过程上保持坦率,从而让社区不会错误地干扰你的事务。 - -这一经验非常有效,在你做出决定时坚持遵循其中一项原则并展示出来是非常重要的。 - -*确定如何进行协作:*你可以通过Discord、Slack或者邮件等途径完成这一工作。但是如果你试图同时使用他们,你将毫不意外的分散项目社区。社区人员将在所有这些途径上互相交流。选择一到两种沟通工具,投身于他们来保证社区的信息同步。 - -*珍惜反馈意见:*倾听来自社区的反馈并付诸行动。即使需要你作出艰难的决定,你也应当向社区展示你是重视社区话语的。 - -**维护一套行为准则:**如果你与社区打交道,你需要定义什么行为是可以接受的。一套落地的行为准则有助于在人们越过红线时警示他们。如果你可以提前制定这些你可以避免很多麻烦。 - -*考虑如何分发你的项目:*存在这样的情况,因为你还没有准备好某一个组件,或者是因为存在一些项目功能你不希望所有人都能够访问,所以你可能并不希望将你的项目完全向公众公开。关键是制定符合你的要求而不是向用户妥协的分发条款,如此,需要某种功能的用户可以获取所需项目的同时不需要该功能的用户也不需要做出妥协而开始使用该项目。 - -*尽可能地避免投票:*这是因为部分成员经常会赞成与大部分成员的意见相左的选项,这会使这些人产生一定程度的失望,并让他们觉得被项目所孤立。反之,尽量尝试询问他们想要解决什么问题,并尝试创造一个不需要付出代价的解决方案。 - -### 开源是许可 - -开源是给予你的用户如何使用你的软件的自由,而许可能够做到这一点。一个开源项目许可是极好的,它保证了不论你作为维护者做了什么,你的所有终端用户以及利益相关方总是可以维护一系列的项目复刻版本,这些都是重要的项目复刻版。 - -许可提供了人们可选择性,如果他们认为有必要,他们可以将项目复制到不同的路径中。他们拥有创建副本的权利,这使得许多优秀的软件能够被开发出来。维护者有责任倾听他们的社区成员的声音并以一个对项目的社区成员有利的方式运营项目。 - -我们推荐使用现有的许多可用的许可证而不是独立制作你自己的许可条款,仅仅只是因为用户以及利益相关方通常都很熟悉公共许可证,因此你不需要再花费时间在解释许可条款上。这将帮助你将你的精力集中在项目的其他部分上。 - -### 最后,开源是一项运动 - -开源包括了很多维度,也包含了很多人员。最重要的是,它是有关理解人们想要什么的,也是有关创建一个鼓励协作与透明的环境的。开源也是有关创建有利于开源项目走自己想走的道路的社区的。维护者创造越多的机会让社区自由发挥,开源产品就越好,也越发成功。 - -开源是以上这些方面,而你的视野越宽阔,你就能越好的利用它。请考虑你如何能够在开源的每一个维度上出类拔萃,因为时至今日,开源的成功之路并无捷径。 - - -via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ - -作者:[Jules Graybill][a] -选题:[lkxed][b] -译者:[CanYellow](https://github.com/CanYellow) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.opensourceforu.com/author/jules-graybill/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg From 1f4aa672cab101bd928b5970597b9d7b6ce86a41 Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Sat, 8 Apr 2023 12:27:49 +0800 Subject: [PATCH 303/318] fix formats for 20230208.3 --- ...️⭐️ Why does 0.1 + 0.2 = 0.30000000000000004.md | 103 +++++------------- 1 file changed, 25 insertions(+), 78 deletions(-) diff --git a/sources/tech/20230208.3 ⭐️⭐️⭐️ Why does 0.1 + 0.2 = 0.30000000000000004.md b/sources/tech/20230208.3 ⭐️⭐️⭐️ Why does 0.1 + 0.2 = 0.30000000000000004.md index 595ac37fb4..6dcac0ae73 100644 --- a/sources/tech/20230208.3 ⭐️⭐️⭐️ Why does 0.1 + 0.2 = 0.30000000000000004.md +++ b/sources/tech/20230208.3 ⭐️⭐️⭐️ Why does 0.1 + 0.2 = 0.30000000000000004.md @@ -10,26 +10,16 @@ Why does 0.1 + 0.2 = 0.30000000000000004? ====== -Hello! I was trying to write about floating point yesterday, -and I found myself wondering about this calculation, with 64-bit floats: +Hello! I was trying to write about floating point yesterday, and I found myself wondering about this calculation, with 64-bit floats: ``` >>> 0.1 + 0.2 0.30000000000000004 ``` -I realized that I didn’t understand exactly how it worked. I mean, I know -floating point calculations are inexact, and I know that you can’t exactly -represent `0.1` in binary, but: there’s a floating point number that’s closer to -0.3 than `0.30000000000000004`! So why do we get the answer -`0.30000000000000004`? +I realized that I didn’t understand exactly how it worked. I mean, I know floating point calculations are inexact, and I know that you can’t exactly represent `0.1` in binary, but: there’s a floating point number that’s closer to 0.3 than `0.30000000000000004`! So why do we get the answer `0.30000000000000004`? -If you don’t feel like reading this whole post with a bunch of calculations, the short answer is that -`0.1000000000000000055511151231257827021181583404541015625 + 0.200000000000000011102230246251565404236316680908203125` lies exactly between -2 floating point numbers, -`0.299999999999999988897769753748434595763683319091796875` (usually printed as `0.3`) and -`0.3000000000000000444089209850062616169452667236328125` (usually printed as `0.30000000000000004`). The answer is -`0.30000000000000004` (the second one) because its significand is even. +If you don’t feel like reading this whole post with a bunch of calculations, the short answer is that `0.1000000000000000055511151231257827021181583404541015625 + 0.200000000000000011102230246251565404236316680908203125` lies exactly between 2 floating point numbers, `0.299999999999999988897769753748434595763683319091796875` (usually printed as `0.3`) and `0.3000000000000000444089209850062616169452667236328125` (usually printed as `0.30000000000000004`). The answer is `0.30000000000000004` (the second one) because its significand is even. #### how floating point addition works @@ -38,9 +28,7 @@ This is roughly how floating point addition works: - Add together the numbers (with extra precision) - Round the result to the nearest floating point number -So let’s use these rules to calculate 0.1 + 0.2. I just learned how floating -point addition works yesterday so it’s possible I’ve made some mistakes in this -post, but I did get the answers I expected at the end. +So let’s use these rules to calculate 0.1 + 0.2. I just learned how floating point addition works yesterday so it’s possible I’ve made some mistakes in this post, but I did get the answers I expected at the end. #### step 1: find out what 0.1 and 0.2 are @@ -53,9 +41,7 @@ First, let’s use Python to figure out what the exact values of `0.1` and `0.2` '0.20000000000000001110223024625156540423631668090820312500000000000000000000000000' ``` -These really are the exact values: because floating point numbers are in base -2, you can represent them all exactly in base 10. You just need a lot of digits -sometimes :) +These really are the exact values: because floating point numbers are in base 2, you can represent them all exactly in base 10. You just need a lot of digits sometimes :) #### step 2: add the numbers together @@ -79,8 +65,7 @@ Now, let’s look at the floating point numbers around `0.3`. Here’s the close '0.29999999999999998889776975374843459576368331909179687500000000000000000000000000' ``` -We can figure out the next floating point number after `0.3` by serializing -`0.3` to 8 bytes with `struct.pack`, adding 1, and then using `struct.unpack`: +We can figure out the next floating point number after `0.3` by serializing `0.3` to 8 bytes with `struct.pack`, adding 1, and then using `struct.unpack`: ``` >>> struct.pack("!d", 0.3) @@ -100,17 +85,13 @@ Apparently you can also do this with `math.nextafter`: 0.30000000000000004 ``` -So the two 64-bit floats around -`0.3` are -`0.299999999999999988897769753748434595763683319091796875` and +So the two 64-bit floats around `0.3` are `0.299999999999999988897769753748434595763683319091796875` and `0.3000000000000000444089209850062616169452667236328125` #### step 4: find out which one is closest to our result -It turns out that `0.3000000000000000166533453693773481063544750213623046875` -is exactly in the middle of -`0.299999999999999988897769753748434595763683319091796875` and -`0.3000000000000000444089209850062616169452667236328125`. +It turns out that `0.3000000000000000166533453693773481063544750213623046875` is exactly in the middle of +`0.299999999999999988897769753748434595763683319091796875` and `0.3000000000000000444089209850062616169452667236328125`. You can see that with this calculation: @@ -123,10 +104,7 @@ So neither of them is closest. #### how does it know which one to round to? -In the binary representation of a floating point number, there’s a number -called the “significand”. In cases like this (where the result is exactly in -between 2 successive floating point number, it’ll round to the one with the -even significand. +In the binary representation of a floating point number, there’s a number called the “significand”. In cases like this (where the result is exactly in between 2 successive floating point number, it’ll round to the one with the even significand. In this case that’s `0.300000000000000044408920985006261616945266723632812500` @@ -135,20 +113,13 @@ We actually saw the significand of this number a bit earlier: - 0.30000000000000004 is `struct.unpack('!d', b'?\xd3333334')` - 0.3 is `struct.unpack('!d', b'?\xd3333333')` -The last digit of the big endian hex representation of `0.30000000000000004` is -`4`, so that’s the one with the even significand (because the significand is at -the end). +The last digit of the big endian hex representation of `0.30000000000000004` is `4`, so that’s the one with the even significand (because the significand is at the end). #### let’s also work out the whole calculation in binary -Above we did the calculation in decimal, because that’s a little more intuitive -to read. But of course computers don’t do these calculations in decimal – -they’re done in a base 2 representation. So I wanted to get an idea of how that -worked too. +Above we did the calculation in decimal, because that’s a little more intuitive to read. But of course computers don’t do these calculations in decimal – they’re done in a base 2 representation. So I wanted to get an idea of how that worked too. -I don’t think this binary calculation part of the post is particularly clear -but it was helpful for me to write out. There are a really a lot of numbers and -it might be terrible to read. +I don’t think this binary calculation part of the post is particularly clear but it was helpful for me to write out. There are a really a lot of numbers and it might be terrible to read. #### how 64-bit floats numbers work: exponent and significand @@ -181,11 +152,9 @@ def get_significand(f): return x ^ (exponent << 52) ``` -I’m ignoring the sign bit (the first bit) because we only need these functions -to work on two numbers (0.1 and 0.2) and those two numbers are both positive. +I’m ignoring the sign bit (the first bit) because we only need these functions to work on two numbers (0.1 and 0.2) and those two numbers are both positive. -First, let’s get the exponent and significand of 0.1. We need to subtract 1023 -to get the actual exponent because that’s how floating point works. +First, let’s get the exponent and significand of 0.1. We need to subtract 1023 to get the actual exponent because that’s how floating point works. ``` >>> get_exponent(0.1) - 1023 @@ -203,9 +172,7 @@ Here’s that calculation in Python: 0.1 ``` -(you might legitimately be worried about floating point accuracy issues with -this calculation, but in this case I’m pretty sure it’s fine because these -numbers by definition don’t have accuracy issues – the floating point numbers starting at `2**-4` go up in steps of `1/2**(52 + 4)`) +(you might legitimately be worried about floating point accuracy issues with this calculation, but in this case I’m pretty sure it’s fine because these numbers by definition don’t have accuracy issues – the floating point numbers starting at `2**-4` go up in steps of `1/2**(52 + 4)`) We can do the same thing for `0.2`: @@ -309,10 +276,7 @@ That’s the answer we expected: #### this probably isn’t exactly how it works in hardware -The way I’ve described the operations here isn’t literally exactly -what happens when you do floating point addition (it’s not “solving for X” for -example), I’m sure there are a lot of efficient tricks. But I think it’s about -the same idea. +The way I’ve described the operations here isn’t literally exactly what happens when you do floating point addition (it’s not “solving for X” for example), I’m sure there are a lot of efficient tricks. But I think it’s about the same idea. #### printing out floating point numbers is pretty weird @@ -325,48 +289,31 @@ We said earlier that the floating point number 0.3 isn’t equal to 0.3. It’s So when you print out that number, why does it display `0.3`? -The computer isn’t actually printing out the exact value of the number, instead -it’s printing out the _shortest_ decimal number `d` which has the property that -our floating point number `f` is the closest floating point number to `d`. +The computer isn’t actually printing out the exact value of the number, instead it’s printing out the _shortest_ decimal number `d` which has the property that our floating point number `f` is the closest floating point number to `d`. It turns out that doing this efficiently isn’t trivial at all, and there are a bunch of academic papers about it like [Printing Floating-Point Numbers Quickly and Accurately][1]. or [How to print floating point numbers accurately][2]. #### would it be more intuitive if computers printed out the exact value of a float? -Rounding to a nice clean decimal value is nice, but in a way I feel like it -might be more intuitive if computers just printed out the exact value of a -floating point number – it might make it seem a lot less surprising when you -get weird results. +Rounding to a nice clean decimal value is nice, but in a way I feel like it might be more intuitive if computers just printed out the exact value of a floating point number – it might make it seem a lot less surprising when you get weird results. -To me, -0.1000000000000000055511151231257827021181583404541015625 + -0.200000000000000011102230246251565404236316680908203125 -= 0.3000000000000000444089209850062616169452667236328125 feels less surprising than 0.1 + 0.2 = 0.30000000000000004. +To me, 0.1000000000000000055511151231257827021181583404541015625 + 0.200000000000000011102230246251565404236316680908203125 = 0.3000000000000000444089209850062616169452667236328125 feels less surprising than 0.1 + 0.2 = 0.30000000000000004. Probably this is a bad idea, it would definitely use a lot of screen space. #### a quick note on PHP -Someone in the comments somewhere pointed out that `` -prints out `0.3`. Does that mean that floating point math is different in PHP? +Someone in the comments somewhere pointed out that `` prints out `0.3`. Does that mean that floating point math is different in PHP? I think the answer is no – if I run: -`` on [this - page][3], I get the exact same answer as in - Python 5.5511151231258E-17. So it seems like the underlying floating point - math is the same. +`` on [this page][3], I get the exact same answer as in Python 5.5511151231258E-17. So it seems like the underlying floating point math is the same. -I think the reason that `0.1 + 0.2` prints out `0.3` in PHP is that PHP’s - algorithm for displaying floating point numbers is less precise than Python’s - – it’ll display `0.3` even if that number isn’t the closest floating point - number to 0.3. +I think the reason that `0.1 + 0.2` prints out `0.3` in PHP is that PHP’s algorithm for displaying floating point numbers is less precise than Python’s – it’ll display `0.3` even if that number isn’t the closest floating point number to 0.3. #### that’s all! -I kind of doubt that anyone had the patience to follow all of that arithmetic, -but it was helpful for me to write down, so I’m publishing this post anyway. -Hopefully some of this makes sense. +I kind of doubt that anyone had the patience to follow all of that arithmetic, but it was helpful for me to write down, so I’m publishing this post anyway. Hopefully some of this makes sense. -------------------------------------------------------------------------------- @@ -383,4 +330,4 @@ via: https://jvns.ca/blog/2023/02/08/why-does-0-1-plus-0-2-equal-0-3000000000000 [b]: https://github.com/lkxed/ [1]: https://legacy.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf [2]: https://lists.nongnu.org/archive/html/gcl-devel/2012-10/pdfkieTlklRzN.pdf -[3]: https://replit.com/languages/php_cli +[3]: https://replit.com/languages/php_cli From 2deb03fd512b42d80e68d564f9eb053e14cc023b Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Sat, 8 Apr 2023 12:32:16 +0800 Subject: [PATCH 304/318] fix formats for 20230228.4 --- ...20230228.4 ⭐️⭐️ Some notes on using nix.md | 122 ++++-------------- 1 file changed, 27 insertions(+), 95 deletions(-) diff --git a/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md b/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md index 48ed8e6a64..37be4acbd9 100644 --- a/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md +++ b/sources/tech/20230228.4 ⭐️⭐️ Some notes on using nix.md @@ -10,33 +10,19 @@ Some notes on using nix ====== -Recently I started using a Mac for the first time. The biggest downside I’ve -noticed so far is that the package management is much worse than on Linux. -At some point I got frustrated with homebrew because I felt like it was -spending too much time upgrading when I installed new packages, and so I -thought – maybe I’ll try the [nix][1] package manager! +Recently I started using a Mac for the first time. The biggest downside I’ve noticed so far is that the package management is much worse than on Linux. At some point I got frustrated with homebrew because I felt like it was spending too much time upgrading when I installed new packages, and so I thought – maybe I’ll try the [nix][1] package manager! -nix has a reputation for being confusing (it has its whole -own programming language!), so I’ve been trying to figure out how to use nix in -a way that’s as simple as possible and does not involve managing any -configuration files or learning a new programming language. Here’s what I’ve -figured out so far! We’ll talk about how to: +nix has a reputation for being confusing (it has its whole own programming language!), so I’ve been trying to figure out how to use nix in a way that’s as simple as possible and does not involve managing any configuration files or learning a new programming language. Here’s what I’ve figured out so far! We’ll talk about how to: - install packages with nix - build a custom nix package for a C++ program called [paperjam][2] - install a 5-year-old version of [hugo][3] with nix -As usual I’ve probably gotten some stuff wrong in this post since I’m still -pretty new to nix. I’m also still not sure how much I like nix – it’s very -confusing! But it’s helped me compile some software that I was struggling to -compile otherwise, and in general it seems to install things faster than -homebrew. +As usual I’ve probably gotten some stuff wrong in this post since I’m still pretty new to nix. I’m also still not sure how much I like nix – it’s very confusing! But it’s helped me compile some software that I was struggling to compile otherwise, and in general it seems to install things faster than homebrew. #### what’s interesting about nix? -People often describe nix as “declarative package management”. I don’t -care that much about declarative package management, so here are two things -that I appreciate about nix: +People often describe nix as “declarative package management”. I don’t care that much about declarative package management, so here are two things that I appreciate about nix: - It provides binary packages (hosted at [https://cache.nixos.org/][4]) that you can quickly download and install - For packages which don’t have binary packages, it makes it easier to compile them @@ -44,12 +30,8 @@ that I appreciate about nix: I think that the reason nix is good at compiling software is that: - you can have multiple versions of the same library or program installed at a time (you could have 2 different versions of libc for instance). For example I have two versions of node on my computer right now, one at `/nix/store/4ykq0lpvmskdlhrvz1j3kwslgc6c7pnv-nodejs-16.17.1` and one at `/nix/store/5y4bd2r99zhdbir95w5pf51bwfg37bwa-nodejs-18.9.1`. -- when nix builds a package, it builds it in isolation, using only the -specific versions of its dependencies that you explicitly declared. So -there’s no risk that the package secretly depends on another package on your -system that you don’t know about. No more fighting with `LD_LIBRARY_PATH`! -- a lot of people have put a lot of work into writing down all of the -dependencies of packages +- when nix builds a package, it builds it in isolation, using only the specific versions of its dependencies that you explicitly declared. So there’s no risk that the package secretly depends on another package on your +system that you don’t know about. No more fighting with `LD_LIBRARY_PATH`! - a lot of people have put a lot of work into writing down all of the dependencies of packages I’ll give a couple of examples later in this post of two times nix made it easier for me to compile software. @@ -72,15 +54,11 @@ nix-env -iA nixpkgs.fish This seems to just download some binaries from [https://cache.nixos.org][8] – pretty simple. -Some people use nix to install their Node and Python and Ruby packages, but I haven’t -been doing that – I just use `npm install` and `pip install` the same way I -always have. +Some people use nix to install their Node and Python and Ruby packages, but I haven’t been doing that – I just use `npm install` and `pip install` the same way I always have. #### some nix features I’m not using -There are a bunch of nix features/tools that I’m not using, but that I’ll -mention. I originally thought that you _had_ to use these features to use nix, -because most of the nix tutorials I’ve read talk about them. But you don’t have to use them. +There are a bunch of nix features/tools that I’m not using, but that I’ll mention. I originally thought that you _had_ to use these features to use nix, because most of the nix tutorials I’ve read talk about them. But you don’t have to use them. - NixOS (a Linux distribution) - [nix-shell][9] @@ -88,8 +66,7 @@ because most of the nix tutorials I’ve read talk about them. But you don’t h - [home-manager][11] - [devenv.sh][12] -I won’t go into these because I haven’t really used them and there are lots of -explanations out there. +I won’t go into these because I haven’t really used them and there are lots of explanations out there. #### where are nix packages defined? @@ -107,16 +84,14 @@ I found a way to search nix packages from the command line that I liked better: #### everything is installed with symlinks -One of nix’s major design choices is that there isn’t one single `bin` with all -your packages, instead you use symlinks. There are a lot of layers of symlinks. A few examples of symlinks: +One of nix’s major design choices is that there isn’t one single `bin` with all your packages, instead you use symlinks. There are a lot of layers of symlinks. A few examples of symlinks: - `~/.nix-profile` on my machine is (indirectly) a symlink to `/nix/var/nix/profiles/per-user/bork/profile-111-link/` - `~/.nix-profile/bin/fish` is a symlink to `/nix/store/afkwn6k8p8g97jiqgx9nd26503s35mgi-fish-3.5.1/bin/fish` When I install something, it creates a new `profile-112-link` directory with new symlinks and updates my `~/.nix-profile` to point to that directory. -I think this means that if I install a new version of `fish` and I don’t like it, I can -easily go back just by running `nix-env --rollback` – it’ll move me to my previous profile directory. +I think this means that if I install a new version of `fish` and I don’t like it, I can easily go back just by running `nix-env --rollback` – it’ll move me to my previous profile directory. #### uninstalling packages doesn’t delete them @@ -161,28 +136,19 @@ I haven’t really upgraded anything yet. I think that if something goes wrong w nix-env --rollback ``` -Someone linked me to [this post from Ian Henry][15] that -talks about some confusing problems with `nix-env --upgrade` – maybe it -doesn’t work the way you’d expect? I guess I’ll be wary around upgrades. +Someone linked me to [this post from Ian Henry][15] that talks about some confusing problems with `nix-env --upgrade` – maybe it doesn’t work the way you’d expect? I guess I’ll be wary around upgrades. #### next goal: make a custom package of paperjam After a few months of installing existing packages, I wanted to make a custom package with nix for a program called [paperjam][2] that wasn’t already packaged. -I was actually struggling to compile `paperjam` at all even without nix because the version I had -of `libiconv` I has on my system was wrong. I thought it might be easier to -compile it with nix even though I didn’t know how to make nix packages yet. And -it actually was! +I was actually struggling to compile `paperjam` at all even without nix because the version I had of `libiconv` I has on my system was wrong. I thought it might be easier to compile it with nix even though I didn’t know how to make nix packages yet. And it actually was! But figuring out how to get there was VERY confusing, so here are some notes about how I did it. #### how to build an example package -Before I started working on my `paperjam` package, I wanted to build an example existing package just to -make sure I understood the process for building a package. I was really -struggling to figure out how to do this, but I asked in Discord and someone -explained to me how I could get a working package from [https://github.com/NixOS/nixpkgs/][13] and build it. So here -are those instructions: +Before I started working on my `paperjam` package, I wanted to build an example existing package just to make sure I understood the process for building a package. I was really struggling to figure out how to do this, but I asked in Discord and someone explained to me how I could get a working package from [https://github.com/NixOS/nixpkgs/][13] and build it. So here are those instructions: **step 1:** Download some arbitrary package from [nixpkgs][13] on github, for example the `dash` package: @@ -190,8 +156,7 @@ are those instructions: wget https://raw.githubusercontent.com/NixOS/nixpkgs/47993510dcb7713a29591517cb6ce682cc40f0ca/pkgs/shells/dash/default.nix -O dash.nix ``` -**step 2**: Replace the first statement (`{ lib , stdenv , buildPackages , autoreconfHook , pkg-config , fetchurl , fetchpatch , libedit , runCommand , dash }:` with `with import {};` I don’t know why you have to do this, -but it works. +**step 2**: Replace the first statement (`{ lib , stdenv , buildPackages , autoreconfHook , pkg-config , fetchurl , fetchpatch , libedit , runCommand , dash }:` with `with import {};` I don’t know why you have to do this, but it works. **step 3**: Run `nix-build dash.nix` @@ -207,11 +172,7 @@ That’s all! Once I’d done that, I felt like I could modify the `dash` packag `paperjam` has one dependency (`libpaper`) that also isn’t packaged yet, so I needed to build `libpaper` first. -Here’s `libpaper.nix`. I basically just wrote this by copying and pasting from -other packages in the [nixpkgs][13] repository. -My guess is what’s happening here is that nix has some default rules for -compiling C packages (like “run `make install`”), so the `make install` happens -default and I don’t need to configure it explicitly. +Here’s `libpaper.nix`. I basically just wrote this by copying and pasting from other packages in the [nixpkgs][13] repository. My guess is what’s happening here is that nix has some default rules for compiling C packages (like “run `make install`”), so the `make install` happens default and I don’t need to configure it explicitly. ``` with import {}; @@ -249,10 +210,7 @@ Next, I needed to compile `paperjam`. Here’s a link to the [nix package I wrot I set the hashes by first leaving the hash empty, then running `nix-build` to get an error message complaining about a mismatched hash. Then I copied the correct hash out of the error message. -I figured out how to set `installFlags` just by running `rg PREFIX` -in the nixpkgs repository – I figured that needing to set a `PREFIX` was -pretty common and someone had probably done it before, and I was right. So I -just copied and pasted that line from another package. +I figured out how to set `installFlags` just by running `rg PREFIX` in the nixpkgs repository – I figured that needing to set a `PREFIX` was pretty common and someone had probably done it before, and I was right. So I just copied and pasted that line from another package. Then I ran: @@ -265,29 +223,17 @@ and then everything worked and I had `paperjam` installed! Hooray! #### next goal: install a 5-year-old version of hugo -Right now I build this blog using Hugo 0.40, from 2018. I don’t need any new -features so I haven’t felt a need to upgrade. On Linux this is easy: Hugo’s -releases are a static binary, so I can just download the 5-year-old binary from -the [releases page][17] and -run it. Easy! +Right now I build this blog using Hugo 0.40, from 2018. I don’t need any new features so I haven’t felt a need to upgrade. On Linux this is easy: Hugo’s releases are a static binary, so I can just download the 5-year-old binary from the [releases page][17] and run it. Easy! -But on this Mac I ran into some complications. Mac hardware has changed in the -last 5 years, so the Mac Hugo binary I downloaded crashed. And when I tried to -build it from source with `go build`, that didn’t work either because Go build -norms have changed in the last 5 years as well. +But on this Mac I ran into some complications. Mac hardware has changed in the last 5 years, so the Mac Hugo binary I downloaded crashed. And when I tried to build it from source with `go build`, that didn’t work either because Go build norms have changed in the last 5 years as well. -I was working around this by running Hugo in a Linux docker container, but I -didn’t love that: it was kind of slow and it felt silly. It shouldn’t be that -hard to compile one Go program! +I was working around this by running Hugo in a Linux docker container, but I didn’t love that: it was kind of slow and it felt silly. It shouldn’t be that hard to compile one Go program! -Nix to the rescue! Here’s what I did to install the old version of Hugo with -nix. +Nix to the rescue! Here’s what I did to install the old version of Hugo with nix. #### installing Hugo 0.40 with nix -I wanted to install Hugo 0.40 and put it in my PATH as `hugo-0.40`. Here’s how -I did it. I did this in a kind of weird way, but it worked ([Searching and installing old versions of Nix packages][18] -describes a probably more normal method). +I wanted to install Hugo 0.40 and put it in my PATH as `hugo-0.40`. Here’s how I did it. I did this in a kind of weird way, but it worked ([Searching and installing old versions of Nix packages][18] describes a probably more normal method). **step 1**: Search through the nixpkgs repo to find Hugo 0.40 @@ -318,33 +264,19 @@ I figured out how to run this by running `rg 'mv '` in the nixpkgs repository an I installed into my `~/.nix-profile/bin` by running `nix-env -i -f hugo.nix`. -And it all works! I put the final `.nix` file into my own personal [nixpkgs repo][20] so that I can use it again later if I -want. +And it all works! I put the final `.nix` file into my own personal [nixpkgs repo][20] so that I can use it again later if I want. #### reproducible builds aren’t magic, they’re really hard -I think it’s worth noting here that this `hugo.nix` file isn’t magic – the -reason I can easily compile Hugo 0.40 today is that many people worked for a long time to make it possible to -package that version of Hugo in a reproducible way. +I think it’s worth noting here that this `hugo.nix` file isn’t magic – the reason I can easily compile Hugo 0.40 today is that many people worked for a long time to make it possible to package that version of Hugo in a reproducible way. #### that’s all! -Installing `paperjam` and this 5-year-old version of Hugo were both -surprisingly painless and actually much easier than compiling it without nix, -because nix made it much easier for me to compile the `paperjam` package with -the right version of `libiconv`, and because someone 5 years ago had already -gone to the trouble of listing out the exact dependencies for Hugo. +Installing `paperjam` and this 5-year-old version of Hugo were both surprisingly painless and actually much easier than compiling it without nix, because nix made it much easier for me to compile the `paperjam` package with the right version of `libiconv`, and because someone 5 years ago had already gone to the trouble of listing out the exact dependencies for Hugo. -I don’t have any plans to get much more complicated with nix (and it’s still -very possible I’ll get frustrated with it and go back to homebrew!), but we’ll -see what happens! I’ve found it much easier to start in a simple way and then -start using more features if I feel the need instead of adopting a whole bunch -of complicated stuff all at once. +I don’t have any plans to get much more complicated with nix (and it’s still very possible I’ll get frustrated with it and go back to homebrew!), but we’ll see what happens! I’ve found it much easier to start in a simple way and then start using more features if I feel the need instead of adopting a whole bunch of complicated stuff all at once. -I probably won’t use nix on Linux – I’ve always been happy enough with `apt` -(on Debian-based distros) and `pacman` (on Arch-based distros), and they’re -much less confusing. But on a Mac it seems like it might be worth it. We’ll -see! It’s very possible in 3 months I’ll get frustrated with nix and just go back to homebrew. +I probably won’t use nix on Linux – I’ve always been happy enough with `apt` (on Debian-based distros) and `pacman` (on Arch-based distros), and they’re much less confusing. But on a Mac it seems like it might be worth it. We’ll see! It’s very possible in 3 months I’ll get frustrated with nix and just go back to homebrew. -------------------------------------------------------------------------------- From 66ab66f793f05a4a16144000e010792c40bb407e Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Sat, 8 Apr 2023 13:19:12 +0800 Subject: [PATCH 305/318] fix formats for 20230303.2 --- ...0230303.2 ⭐️⭐️⭐️ How do Nix builds work.md | 80 +++++-------------- 1 file changed, 22 insertions(+), 58 deletions(-) diff --git a/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md b/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md index c5923e2034..ab8551a30f 100644 --- a/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md +++ b/sources/tech/20230303.2 ⭐️⭐️⭐️ How do Nix builds work.md @@ -10,8 +10,7 @@ How do Nix builds work? ====== -Hello! For some reason after the last [nix post][1] I got nerdsniped by trying to understand how Nix builds -work under the hood, so here’s a quick exploration I did today. There are probably some mistakes in here. +Hello! For some reason after the last [nix post][1] I got nerdsniped by trying to understand how Nix builds work under the hood, so here’s a quick exploration I did today. There are probably some mistakes in here. I started by [complaining on Mastodon][2]: @@ -31,24 +30,18 @@ complicated C program. #### the goal: compile a C program, without using Nix’s standard machinery -Our goal is to compile a C program called `paperjam`. This is a real C program -that wasn’t in the Nix repository already. I already figured out how to -compile it in [this post][1] by copying and pasting a bunch of stuff I didn’t understand, but this time I wanted to do -it in a more principled way where I actually understand more of the steps. +Our goal is to compile a C program called `paperjam`. This is a real C program that wasn’t in the Nix repository already. I already figured out how to +compile it in [this post][1] by copying and pasting a bunch of stuff I didn’t understand, but this time I wanted to do it in a more principled way where I actually understand more of the steps. We’re going to avoid using most of Nix’s helpers for compiling C programs. -The plan is to start with an almost empty build script, and then resolve errors -until we have a working build. +The plan is to start with an almost empty build script, and then resolve errors until we have a working build. #### first: what’s a derivation? I said that we weren’t going to talk about too many Nix abstractions (and we won’t!), but understanding what a derivation is really helped me. -Everything I read about Nix talks about derivations all the time, but I was -really struggling to figure out what a derivation _is_. It turns out that `derivation` -is a function in the Nix language. But not just any function! The whole point of the Nix language seems to be to -to call this function. The [official documentation for the `derivation` function][5] is actually extremely clear. Here’s what I took away: +Everything I read about Nix talks about derivations all the time, but I was really struggling to figure out what a derivation _is_. It turns out that `derivation` is a function in the Nix language. But not just any function! The whole point of the Nix language seems to be to to call this function. The [official documentation for the `derivation` function][5] is actually extremely clear. Here’s what I took away: `derivation` takes a bunch of keys and values as input. There are 3 required keys: @@ -56,8 +49,7 @@ to call this function. The [official documentation for the `derivation` function - `name`: the name of the package you’re building - `builder`: a program (usually a bash script) that runs the build -Every other key is an arbitrary string that gets passed as an environment -variable to the `builder` shell script. +Every other key is an arbitrary string that gets passed as an environment variable to the `builder` shell script. #### derivations automatically build all their inputs @@ -69,15 +61,12 @@ Nix will: - put the resulting output directory somewhere like `/nix/store/4garxzr1rpdfahf374i9p9fbxnx56519-qpdf-11.1.0` - expand `pkgs.qpdf` into that output directory (as a string), so that I can reference it in my build script -The derivation function does some other things (described in the -[documentation][5]), but “it builds all of its inputs” is all we really need to know +The derivation function does some other things (described in the [documentation][5]), but “it builds all of its inputs” is all we really need to know for now. #### step 1: write a derivation file -Let’s write a very simple build script and call the `derivation` function. These don’t work yet, -but I found it pretty fun to go through all the errors, fix them one at a time, -and learn a little more about how Nix works by fixing them. +Let’s write a very simple build script and call the `derivation` function. These don’t work yet, but I found it pretty fun to go through all the errors, fix them one at a time, and learn a little more about how Nix works by fixing them. Here’s the build script (`build_paperjam.sh`). This just unpacks the tarball and runs `make install`. @@ -115,9 +104,7 @@ The main things here are: #### problem 1: tar: command not found -Nix needs you to declare all the dependencies for your builds. It forces this -by removing your `PATH` environment variable so that you have no binaries in -your PATH at all. +Nix needs you to declare all the dependencies for your builds. It forces this by removing your `PATH` environment variable so that you have no binaries in your PATH at all. This is pretty easy to fix: we just need to edit our `PATH`. @@ -150,11 +137,9 @@ The next error was: > #include ``` -Makes sense: everything is isolated, so it can’t access my system header files. -Figuring out how to handle this was a little more confusing though. +Makes sense: everything is isolated, so it can’t access my system header files. Figuring out how to handle this was a little more confusing though. -It turns out that the way Nix handles header files is that it has a shell -script wrapper around `clang`. So when you run `clang++`, you’re actually +It turns out that the way Nix handles header files is that it has a shell script wrapper around `clang`. So when you run `clang++`, you’re actually running a shell script. On my system, the `clang++` wrapper script was at `/nix/store/d929v59l9a3iakvjccqpfqckqa0vflyc-clang-wrapper-11.1.0/bin/clang++`. I searched that file for `LDFLAGS` and found that it uses 2 environment variables: @@ -194,22 +179,15 @@ Here’s the next error: I started by adding `-L ${pkgs.libiconv}/lib` to my `NIX_LDFLAGS` environment variable, but that didn’t fix it. Then I spent a while going around in circles and being confused. -I eventually figured out how to fix this by taking a working version of the `paperjam` build that I’d made before -and editing my `clang++` wrapper file to print out all of its environment -variables. The `LDFLAGS` environment variable in the working version was different from mine: it had `-liconv` in it. +I eventually figured out how to fix this by taking a working version of the `paperjam` build that I’d made before and editing my `clang++` wrapper file to print out all of its environment variables. The `LDFLAGS` environment variable in the working version was different from mine: it had `-liconv` in it. So I added `-liconv` to `NIX_LDFLAGS` as well and that fixed it. #### why doesn’t the original Makefile have -liconv? -I was a bit puzzled by this `-liconv` thing though: the original Makefile links -in `libqpdf` and `libpaper` by passing `-lqpdf -lpaper`. So why doesn’t it link in iconv, if it requires the -iconv library? +I was a bit puzzled by this `-liconv` thing though: the original Makefile links in `libqpdf` and `libpaper` by passing `-lqpdf -lpaper`. So why doesn’t it link in iconv, if it requires the iconv library? -I think the reason for this is that the original Makefile assumed that you were -running on Linux and using glibc, and glibc includes these iconv functions by -default. But I guess Mac OS libc doesn’t include iconv, so we need to -explicitly set the linker flag `-liconv` to add the iconv library. +I think the reason for this is that the original Makefile assumed that you were running on Linux and using glibc, and glibc includes these iconv functions by default. But I guess Mac OS libc doesn’t include iconv, so we need to explicitly set the linker flag `-liconv` to add the iconv library. #### problem 6: missing codesign_allocate @@ -219,8 +197,7 @@ Time for the next error: libc++abi: terminating with uncaught exception of type std::runtime_error: Failed to spawn codesign_allocate: No such file or directory ``` -I guess this is some kind of Mac code signing thing. I used `find /nix/store -name codesign_allocate` to find `codesign_allocate` on my system. It’s at -`/nix/store/a17dwfwqj5ry734zfv3k1f5n37s4wxns-cctools-binutils-darwin-973.0.1/bin/codesign_allocate`. +I guess this is some kind of Mac code signing thing. I used `find /nix/store -name codesign_allocate` to find `codesign_allocate` on my system. It’s at `/nix/store/a17dwfwqj5ry734zfv3k1f5n37s4wxns-cctools-binutils-darwin-973.0.1/bin/codesign_allocate`. But this doesn’t tell us what the package is called – we need to be able to refer to it as `${pkgs.XXXXXXX}` and `${pkgs.cctools-binutils-darwin}` doesn’t work. @@ -289,8 +266,7 @@ make install PREFIX="$out" #### let’s look at our compiled derivation! -Now that we understand this configuration a little better, let’s talk about -what `nix-build` is doing a little more. +Now that we understand this configuration a little better, let’s talk about what `nix-build` is doing a little more. Behind the scenes, `nix-build paperjam.nix` actually runs `nix-instantiate` and `nix-store --realize`: @@ -300,11 +276,7 @@ $ nix-instantiate paperjam.nix $ nix-store --realize /nix/store/xp8kibpll55s0bm40wlpip51y7wnpfs0-paperjam-fake.drv ``` -I think what this means is that `paperjam.nix` get compiled to some -intermediate representation (also called a derivation?), and then the Nix -runtime takes over and is in charge of actually running the build scripts. - -We can look at this `.drv` intermediate representation with `nix show-derivation` +I think what this means is that `paperjam.nix` get compiled to some intermediate representation (also called a derivation?), and then the Nix runtime takes over and is in charge of actually running the build scripts. We can look at this `.drv` intermediate representation with `nix show-derivation` ``` { @@ -345,13 +317,11 @@ We can look at this `.drv` intermediate representation with `nix show-derivation } ``` -This feels surprisingly easy to understand – you can see that there are a -bunch of environment variables, our bash script, and the paths to our inputs. +This feels surprisingly easy to understand – you can see that there are a bunch of environment variables, our bash script, and the paths to our inputs. #### the compilation helpers we’re not using: stdenv -Normally when you build a package with Nix, you don’t do all of this stuff -yourself. Instead, you use a helper called `stdenv`, which seems to have two parts: +Normally when you build a package with Nix, you don’t do all of this stuff yourself. Instead, you use a helper called `stdenv`, which seems to have two parts: - a function called `stdenv.mkDerivation` which takes some arguments and generates a bunch of environment variables (it seems to be [documented here][6]) - a 1600-line bash build script ([setup.sh][7]) that consumes those environment variables. This is like our `build-paperjam.sh`, but much more generalized. @@ -370,8 +340,7 @@ and probably lots more useful things I don’t know about yet #### let’s look at the derivation for jq -Let’s look at one more compiled derivation, for `jq`. This is quite long but there -are some interesting things in here. I wanted to look at this because I wanted to see what a more typical derivation generated by `stdenv.mkDerivation` looked like. +Let’s look at one more compiled derivation, for `jq`. This is quite long but there are some interesting things in here. I wanted to look at this because I wanted to see what a more typical derivation generated by `stdenv.mkDerivation` looked like. ``` $ nix show-derivation /nix/store/q9cw5rp0ibpl6h4i2qaq0vdjn4pyms3p-jq-1.6.drv @@ -451,8 +420,7 @@ $ nix show-derivation /nix/store/q9cw5rp0ibpl6h4i2qaq0vdjn4pyms3p-jq-1.6.drv } ``` -I thought it was interesting that some of the environment variables in here are actually bash scripts themselves – for example the `postInstallCheck` environment variable is a bash script. -Those bash script environment variables are `eval`ed in the main bash script (you can [see that happening in setup.sh here][8]) +I thought it was interesting that some of the environment variables in here are actually bash scripts themselves – for example the `postInstallCheck` environment variable is a bash script. Those bash script environment variables are `eval`ed in the main bash script (you can [see that happening in setup.sh here][8]) The `postInstallCheck` environment variable in this particular derivation starts like this: @@ -469,11 +437,7 @@ All of my compiler experiments used about 3GB of disk space, but `nix-collect-ga #### let’s recap the process! -I feel like I understand Nix a bit better after going through this. I still -don’t feel very motivated to learn the Nix language, but now I have some -idea of what Nix programs are actually doing under the hood! - -My understanding is: +I feel like I understand Nix a bit better after going through this. I still don’t feel very motivated to learn the Nix language, but now I have some idea of what Nix programs are actually doing under the hood! My understanding is: - First, `.nix` files get compiled into a `.drv` file, which is mostly a bunch of inputs and outputs and environment variables. This is where the Nix language stops being relevant. - Then all the environment variables get passed to a build script, which is in charge of doing the actual build From 3f597c6db20ab7f3d01188042595548f4d4279c1 Mon Sep 17 00:00:00 2001 From: Edward Liu Date: Sat, 8 Apr 2023 13:29:27 +0800 Subject: [PATCH 306/318] fix formats for 20230307.3 --- ...⭐️⭐️ Some possible reasons for 8-bit bytes.md | 170 ++++-------------- 1 file changed, 39 insertions(+), 131 deletions(-) diff --git a/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md b/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md index b49af0e6ae..7909c421f2 100644 --- a/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md +++ b/sources/tech/20230307.3 ⭐️⭐️⭐️ Some possible reasons for 8-bit bytes.md @@ -10,9 +10,7 @@ Some possible reasons for 8-bit bytes ====== -I’ve been working on a zine about how computers represent thing in binary, and -one question I’ve gotten a few times is – why does the x86 architecture use 8-bit bytes? Why not -some other size? +I’ve been working on a zine about how computers represent thing in binary, and one question I’ve gotten a few times is – why does the x86 architecture use 8-bit bytes? Why not some other size? With any question like this, I think there are two options: @@ -20,34 +18,18 @@ With any question like this, I think there are two options: - 8 bits is objectively the Best Option for some reason, even if history had played out differently we would still use 8-bit bytes - some mix of 1 & 2 -I’m not super into computer history (I like to use computers a lot more than I -like reading about them), but I am always curious if there’s an essential -reason for why a computer thing is the way it is today, or whether it’s mostly -a historical accident. So we’re going to talk about some computer history. +I’m not super into computer history (I like to use computers a lot more than I like reading about them), but I am always curious if there’s an essential reason for why a computer thing is the way it is today, or whether it’s mostly a historical accident. So we’re going to talk about some computer history. -As an example of a historical accident: DNS has a `class` field which has 5 -possible values (“internet”, “chaos”, “hesiod”, “none”, and “any”). To me that’s -a clear example of a historical accident – I can’t imagine that we’d define -the class field the same way if we could redesign DNS today without worrying about backwards compatibility. I’m -not sure if we’d use a class field at all! +As an example of a historical accident: DNS has a `class` field which has 5 possible values (“internet”, “chaos”, “hesiod”, “none”, and “any”). To me that’s a clear example of a historical accident – I can’t imagine that we’d define the class field the same way if we could redesign DNS today without worrying about backwards compatibility. I’m not sure if we’d use a class field at all! -There aren’t any definitive answers in this post, but I asked [on Mastodon][1] and -here are some potential reasons I found for the 8-bit byte. I think the answer -is some combination of these reasons. +There aren’t any definitive answers in this post, but I asked [on Mastodon][1] and here are some potential reasons I found for the 8-bit byte. I think the answer is some combination of these reasons. #### what’s the difference between a byte and a word? First, this post talks about “bytes” and “words” a lot. What’s the difference between a byte and a word? My understanding is: - the **byte size** is the smallest unit you can address. For example in a program on my machine `0x20aa87c68` might be the address of one byte, then `0x20aa87c69` is the address of the next byte. -- The **word size** is some multiple of the byte size. I’ve been confused about -this for years, and the Wikipedia definition is incredibly vague (“a word is -the natural unit of data used by a particular processor design”). I -originally thought that the word size was the same as your register size (64 -bits on x86-64). But according to section 4.1 (“Fundamental Data Types”) of the [Intel architecture manual][2], -on x86 a word is 16 bits even though the registers are 64 bits. So I’m -confused – is a word on x86 16 bits or 64 bits? Can it mean both, depending -on the context? What’s the deal? +- The **word size** is some multiple of the byte size. I’ve been confused about this for years, and the Wikipedia definition is incredibly vague (“a word is the natural unit of data used by a particular processor design”). I originally thought that the word size was the same as your register size (64 bits on x86-64). But according to section 4.1 (“Fundamental Data Types”) of the [Intel architecture manual][2], on x86 a word is 16 bits even though the registers are 64 bits. So I’m confused – is a word on x86 16 bits or 64 bits? Can it mean both, depending on the context? What’s the deal? Now let’s talk about some possible reasons that we use 8-bit bytes! @@ -65,18 +47,11 @@ Here’s a [video interview with Fred Brooks (who managed the project)][4] talki > My most important technical decision in my IBM career was to go with the 8-bit byte for the 360. > And on the basis of I believe character processing was going to become important as opposed to decimal digits. -It makes sense that an 8-bit byte would be better for text processing: 2^6 is -64, so 6 bits wouldn’t be enough for lowercase letters, uppercase letters, and symbols. +It makes sense that an 8-bit byte would be better for text processing: 2^6 is 64, so 6 bits wouldn’t be enough for lowercase letters, uppercase letters, and symbols. To go with the 8-bit byte, System/360 also introduced the [EBCDIC][5] encoding, which is an 8-bit character encoding. -It looks like the next important machine in 8-bit-byte history was the -[Intel 8008][6], which was built to be -used in a computer terminal (the Datapoint 2200). Terminals need to be able to -represent letters as well as terminal control codes, so it makes sense for them -to use an 8-bit byte. -[This Datapoint 2200 manual from the Computer History Museum][7] -says on page 7 that the Datapoint 2200 supported ASCII (7 bit) and EBCDIC (8 bit). +It looks like the next important machine in 8-bit-byte history was the [Intel 8008][6], which was built to be used in a computer terminal (the Datapoint 2200). Terminals need to be able to represent letters as well as terminal control codes, so it makes sense for them to use an 8-bit byte. [This Datapoint 2200 manual from the Computer History Museum][7] says on page 7 that the Datapoint 2200 supported ASCII (7 bit) and EBCDIC (8 bit). #### why was the 6-bit byte better for scientific computing? @@ -90,14 +65,11 @@ I was curious about this comment that the 6-bit byte would be better for scienti > you to lose some of the information more rapidly than you would with binary > shifting -I don’t understand this comment at all – why does the exponent have to be 8 bits -if you use a 32-bit word size? Why couldn’t you use 9 bits or 10 bits if you -wanted? But it’s all I could find in a quick search. +I don’t understand this comment at all – why does the exponent have to be 8 bits if you use a 32-bit word size? Why couldn’t you use 9 bits or 10 bits if you wanted? But it’s all I could find in a quick search. #### why did mainframes use 36 bits? -Also related to the 6-bit byte: a lot of mainframes used a 36-bit word size. Why? Someone pointed out -that there’s a great explanation in the Wikipedia article on [36-bit computing][9]: +Also related to the 6-bit byte: a lot of mainframes used a 36-bit word size. Why? Someone pointed out that there’s a great explanation in the Wikipedia article on [36-bit computing][9]: > Prior to the introduction of computers, the state of the art in precision > scientific and engineering calculation was the ten-digit, electrically powered, @@ -111,23 +83,16 @@ that there’s a great explanation in the Wikipedia article on [36-bit computing So this 36 bit thing seems to based on the fact that log_2(20000000000) is 34.2. Huh. -My guess is that the reason for this is in the 50s, computers were -extremely expensive. So if you wanted your computer to support ten decimal -digits, you’d design so that it had exactly enough bits to do that, and no -more. +My guess is that the reason for this is in the 50s, computers were extremely expensive. So if you wanted your computer to support ten decimal +digits, you’d design so that it had exactly enough bits to do that, and no more. -Today computers are way faster and cheaper, so if you want to represent ten -decimal digits for some reason you can just use 64 bits – wasting a little bit -of space is usually no big deal. +Today computers are way faster and cheaper, so if you want to represent ten decimal digits for some reason you can just use 64 bits – wasting a little bit of space is usually no big deal. -Someone else mentioned that some of these machines with 36-bit word sizes let -you choose a byte size – you could use 5 or 6 or 7 or 8-bit bytes, depending -on the context. +Someone else mentioned that some of these machines with 36-bit word sizes let you choose a byte size – you could use 5 or 6 or 7 or 8-bit bytes, depending on the context. #### reason 2: to work well with binary-coded decimal -In the 60s, there was a popular integer encoding called binary-coded decimal (or [BCD][10] for short) that -encoded every decimal digit in 4 bits. +In the 60s, there was a popular integer encoding called binary-coded decimal (or [BCD][10] for short) that encoded every decimal digit in 4 bits. For example, if you wanted to encode the number 1234, in BCD that would be something like: @@ -135,49 +100,32 @@ For example, if you wanted to encode the number 1234, in BCD that would be somet 0001 0010 0011 0100 ``` -So if you want to be able to easily work with binary-coded decimal, your byte -size should be a multiple of 4 bits, like 8 bits! +So if you want to be able to easily work with binary-coded decimal, your byte size should be a multiple of 4 bits, like 8 bits! #### why was BCD popular? -This integer representation seemed really weird to me – why not just use -binary, which is a much more efficient way to store integers? Efficiency was really important in early computers! +This integer representation seemed really weird to me – why not just use binary, which is a much more efficient way to store integers? Efficiency was really important in early computers! -My best guess about why is that early computers didn’t have displays the same way we do -now, so the contents of a byte were mapped directly to on/off lights. +My best guess about why is that early computers didn’t have displays the same way we do now, so the contents of a byte were mapped directly to on/off lights. Here’s a [picture from Wikipedia of an IBM 650 with some lights on its display][11] ([CC BY-SA 3.0][12]): ![][13] -So if you want people to be relatively able to easily read off a decimal number -from its binary representation, this makes a lot more sense. I think today BCD -is obsolete because we have displays and our computers can convert numbers -represented in binary to decimal for us and display them. +So if you want people to be relatively able to easily read off a decimal number from its binary representation, this makes a lot more sense. I think today BCD is obsolete because we have displays and our computers can convert numbers represented in binary to decimal for us and display them. -Also, I wonder if BCD is where the term “nibble” for 4 bits comes from – in -the context of BCD, you end up referring to half bytes a lot (because every -digits is 4 bits). So it makes sense to have a word for “4 bits”, and people -called 4 bits a nibble. Today “nibble” feels to me like an archaic term though – -I’ve definitely never used it except as a fun fact (it’s such a fun word!). The Wikipedia article on [nibbles][14] supports this theory: +Also, I wonder if BCD is where the term “nibble” for 4 bits comes from – in the context of BCD, you end up referring to half bytes a lot (because every digits is 4 bits). So it makes sense to have a word for “4 bits”, and people called 4 bits a nibble. Today “nibble” feels to me like an archaic term though – I’ve definitely never used it except as a fun fact (it’s such a fun word!). The Wikipedia article on [nibbles][14] supports this theory: > The nibble is used to describe the amount of memory used to store a digit of > a number stored in packed decimal format (BCD) within an IBM mainframe. -Another reason someone mentioned for BCD was **financial calculations**. Today -if you want to store a dollar amount, you’ll typically just use an integer -amount of cents, and then divide by 100 if you want the dollar part. This is no -big deal, division is fast. But apparently in the 70s dividing an integer -represented in binary by 100 was very slow, so it was worth it to redesign how -you represent your integers to avoid having to divide by 100. +Another reason someone mentioned for BCD was **financial calculations**. Today if you want to store a dollar amount, you’ll typically just use an integer amount of cents, and then divide by 100 if you want the dollar part. This is no big deal, division is fast. But apparently in the 70s dividing an integer represented in binary by 100 was very slow, so it was worth it to redesign how you represent your integers to avoid having to divide by 100. Okay, enough about BCD. #### reason 3: 8 is a power of 2? -A bunch of people said it’s important for a CPU’s byte size to be a power of 2. -I can’t figure out whether this is true or not though, and I wasn’t satisfied with the explanation that “computers use binary so powers of 2 are good”. That seems very plausible but I wanted to dig deeper. -And historically there have definitely been lots of machines that used byte sizes that weren’t powers of 2, for example (from [this retro computing stack exchange thread][15]): +A bunch of people said it’s important for a CPU’s byte size to be a power of 2. I can’t figure out whether this is true or not though, and I wasn’t satisfied with the explanation that “computers use binary so powers of 2 are good”. That seems very plausible but I wanted to dig deeper. And historically there have definitely been lots of machines that used byte sizes that weren’t powers of 2, for example (from [this retro computing stack exchange thread][15]): - Cyber 180 mainframes used 6-bit bytes - the Univac 1100 / 2200 series used a 36-bit word size @@ -190,57 +138,31 @@ Some reasons I heard for why powers of 2 are good that I haven’t understood ye Reasons that made more sense to me: -- it makes it easier to design **clock dividers** that can measure “8 bits were -sent on this wire” that work based on halving – you can put 3 halving clock -dividers in series. [Graham Sutherland][16] told me about this and made this really cool -[simulator of clock dividers][17] showing what these clock dividers look like. That site (Falstad) also has a bunch of other example circuits and it seems like a really cool way to make circuit simulators. -- if you have an instruction that zeroes out a specific bit in a byte, then if -your byte size is 8 (2^3), you can use just 3 bits of your instruction to -indicate which bit. x86 doesn’t seem to do this, but the [Z80’s bit testing instructions][18] do. -- someone mentioned that some processors use [Carry-lookahead adders][19], and they work -in groups of 4 bits. From some quick Googling it seems like there are a wide -variety of adder circuits out there though. -- **bitmaps**: Your computer’s memory is organized into pages (usually of size 2^n). It -needs to keep track of whether every page is free or not. Operating systems -use a bitmap to do this, where each bit corresponds to a page and is 0 or 1 -depending on whether the page is free. If you had a 9-bit byte, you would -need to divide by 9 to find the page you’re looking for in the bitmap. -Dividing by 9 is slower than dividing by 8, because dividing by powers of 2 -is always the fastest thing. +- it makes it easier to design **clock dividers** that can measure “8 bits were sent on this wire” that work based on halving – you can put 3 halving clock dividers in series. [Graham Sutherland][16] told me about this and made this really cool [simulator of clock dividers][17] showing what these clock dividers look like. That site (Falstad) also has a bunch of other example circuits and it seems like a really cool way to make circuit simulators. +- if you have an instruction that zeroes out a specific bit in a byte, then if your byte size is 8 (2^3), you can use just 3 bits of your instruction to indicate which bit. x86 doesn’t seem to do this, but the [Z80’s bit testing instructions][18] do. +- someone mentioned that some processors use [Carry-lookahead adders][19], and they work in groups of 4 bits. From some quick Googling it seems like there are a wide variety of adder circuits out there though. +- **bitmaps**: Your computer’s memory is organized into pages (usually of size 2^n). It needs to keep track of whether every page is free or not. Operating systems use a bitmap to do this, where each bit corresponds to a page and is 0 or 1 depending on whether the page is free. If you had a 9-bit byte, you would need to divide by 9 to find the page you’re looking for in the bitmap. Dividing by 9 is slower than dividing by 8, because dividing by powers of 2 is always the fastest thing. -I probably mangled some of those explanations pretty badly: I’m pretty far out -of my comfort zone here. Let’s move on. +I probably mangled some of those explanations pretty badly: I’m pretty far out of my comfort zone here. Let’s move on. #### reason 4: small byte sizes are good -You might be wondering – well, if 8-bit bytes were better than 4-bit bytes, -why not keep increasing the byte size? We could have 16-bit bytes! +You might be wondering – well, if 8-bit bytes were better than 4-bit bytes, why not keep increasing the byte size? We could have 16-bit bytes! A couple of reasons to keep byte sizes small: -- It’s a waste of space – a byte is the minimum unit you can address, and if -your computer is storing a lot of ASCII text (which only needs 7 bits), it -would be a pretty big waste to dedicate 12 or 16 bits to each character when -you could use 8 bits instead. +- It’s a waste of space – a byte is the minimum unit you can address, and if your computer is storing a lot of ASCII text (which only needs 7 bits), it would be a pretty big waste to dedicate 12 or 16 bits to each character when you could use 8 bits instead. - As bytes get bigger, your CPU needs to get more complex. For example you need one bus line per bit. So I guess simpler is better. -My understanding of CPU architecture is extremely shaky so I’ll leave it at -that. The “it’s a waste of space” reason feels pretty compelling to me though. +My understanding of CPU architecture is extremely shaky so I’ll leave it at that. The “it’s a waste of space” reason feels pretty compelling to me though. #### reason 5: compatibility -The Intel 8008 (from 1972) was the precursor to the 8080 (from 1974), which was the precursor to the -8086 (from 1976) – the first x86 processor. It seems like the 8080 and the -8086 were really popular and that’s where we get our modern x86 computers. +The Intel 8008 (from 1972) was the precursor to the 8080 (from 1974), which was the precursor to the 8086 (from 1976) – the first x86 processor. It seems like the 8080 and the 8086 were really popular and that’s where we get our modern x86 computers. -I think there’s an “if it ain’t broke don’t fix it” thing going on here – I -assume that 8-bit bytes were working well, so Intel saw no need to change the -design. If you keep the same 8-bit byte, then you can reuse more of your -instruction set. +I think there’s an “if it ain’t broke don’t fix it” thing going on here – I assume that 8-bit bytes were working well, so Intel saw no need to change the design. If you keep the same 8-bit byte, then you can reuse more of your instruction set. -Also around the 80s we start getting network protocols like TCP -which use 8-bit bytes (usually called “octets”), and if you’re going to be -implementing network protocols, you probably want to be using an 8-bit byte. +Also around the 80s we start getting network protocols like TCP which use 8-bit bytes (usually called “octets”), and if you’re going to be implementing network protocols, you probably want to be using an 8-bit byte. #### that’s all! @@ -253,29 +175,15 @@ It seems to me like the main reasons for the 8-bit byte are: - 8 is a better number than 7 (because it’s a power of 2) - once you have popular 8-bit computers that are working well, you want to keep the same design for compatibility -Someone pointed out that [page 65 of this book from 1962][20] -talking about IBM’s reasons to choose an 8-bit byte basically says the same thing: +Someone pointed out that [page 65 of this book from 1962][20] talking about IBM’s reasons to choose an 8-bit byte basically says the same thing: -- Its full capacity of 256 characters was considered to be sufficient for the great majority of applications. -- Within the limits of this capacity, a single character is represented by a -single byte, so that the length of any particular record is not dependent on -the coincidence of characters in that record. -- 8-bit bytes are reasonably economical of storage space -- For purely numerical work, a decimal digit can be represented by only 4 -bits, and two such 4-bit bytes can be packed in an 8-bit byte. Although such -packing of numerical data is not essential, it is a common practice in -order to increase speed and storage efficiency. Strictly speaking, 4-bit -bytes belong to a different code, but the simplicity of the 4-and-8-bit -scheme, as compared with a combination 4-and-6-bit scheme, for example, -leads to simpler machine design and cleaner addressing logic. -- Byte sizes of 4 and 8 bits, being powers of 2, permit the computer designer -to take advantage of powerful features of binary addressing and indexing to -the bit level (see Chaps. 4 and 5 ) . +> 1. Its full capacity of 256 characters was considered to be sufficient for the great majority of applications. +> 2. Within the limits of this capacity, a single character is represented by a single byte, so that the length of any particular record is not dependent on the coincidence of characters in that record. +> 3. 8-bit bytes are reasonably economical of storage space +> 4. For purely numerical work, a decimal digit can be represented by only 4 bits, and two such 4-bit bytes can be packed in an 8-bit byte. Although such packing of numerical data is not essential, it is a common practice in order to increase speed and storage efficiency. Strictly speaking, 4-bit bytes belong to a different code, but the simplicity of the 4-and-8-bit scheme, as compared with a combination 4-and-6-bit scheme, for example, leads to simpler machine design and cleaner addressing logic. +> 5. Byte sizes of 4 and 8 bits, being powers of 2, permit the computer designer to take advantage of powerful features of binary addressing and indexing to the bit level (see Chaps. 4 and 5 ) . -> - -Overall this makes me feel like an 8-bit byte is a pretty natural choice if -you’re designing a binary computer in an English-speaking country. +Overall this makes me feel like an 8-bit byte is a pretty natural choice if you’re designing a binary computer in an English-speaking country. -------------------------------------------------------------------------------- From 2b5375ffd9e1ac32dcc032e7c3d4befafd95b21f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 8 Apr 2023 15:04:35 +0800 Subject: [PATCH 307/318] RP @geekpi https://linux.cn/article-15703-1.html --- ...e accounting app to run your small business.md | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) rename {translated/tech => published}/20230327.2 ⭐️ Use this open source accounting app to run your small business.md (52%) diff --git a/translated/tech/20230327.2 ⭐️ Use this open source accounting app to run your small business.md b/published/20230327.2 ⭐️ Use this open source accounting app to run your small business.md similarity index 52% rename from translated/tech/20230327.2 ⭐️ Use this open source accounting app to run your small business.md rename to published/20230327.2 ⭐️ Use this open source accounting app to run your small business.md index d9b61a76aa..1472755ff3 100644 --- a/translated/tech/20230327.2 ⭐️ Use this open source accounting app to run your small business.md +++ b/published/20230327.2 ⭐️ Use this open source accounting app to run your small business.md @@ -3,14 +3,18 @@ [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15703-1.html" 使用这个开源的会计应用来管理你的小企业 ====== -[GnuCash][1] 是一个强大而灵活的会计工具,可用于小企业的发票和会计。它的许多功能使它特别适合这一目的,包括跟踪支出和收入、生成报告和管理发票的能力。此外,GnuCash 是免费和开源的,这使得资源有限的小企业也可以使用它。在这篇文章中,我会讨论 GnuCash 的特点,使你可以很容易地在自己的小企业中开始使用它。 +![][0] + +> 用 GnuCash 跟踪客户和发票的情况。 + +[GnuCash][1] 是一个强大而灵活的会计工具,可用于小企业的发票和会计。它的许多功能使它特别适合这一目的,包括跟踪支出和收入、生成报告和管理发票的能力。此外,GnuCash 是自由开源的,这使得资源有限的小企业也可以使用它。在这篇文章中,我会讨论 GnuCash 的特点,使你可以很容易地在自己的小企业中开始使用它。 几年前,我开始使用 GnuCash 进行个人财务管理,但发现它也可以作为我的小企业的一个有用工具。在我企业的大部分时间里,我一直在使用一个专有的解决方案。我逐渐厌倦了被迫定期升级以获取我的小企业的发票和报表。转而使用 GnuCash,使我能够在不牺牲任何功能的情况下,将我的小企业会计与我的个人财务相结合。 @@ -33,33 +37,33 @@ $ sudo dnf install gnucash GnuCash 带有一个账户设置向导,可以帮助你建立一个普通的商业账户配置。要访问它: - 启动 GnuCash。 -- 点击**文件**菜单,选择**新文件**。 +- 点击 “文件File” 菜单,选择 “新文件New File”。 按照屏幕上出现的 GnuCash 助手来创建你的新商业账户文件。 -屏幕上的说明将指导你完成设置业务的过程。单击“**助手**”窗口右上角的“**下一步**”。系统会提示你输入公司名称、地址、联系信息和你自己选择的公司 ID。你还必须选择默认税表和日期格式。 +屏幕上的说明将指导你完成设置业务的过程。单击 “助手Assistant” 窗口右上角的 “下一步Next”。系统会提示你输入公司名称、地址、联系信息和你自己选择的公司 ID。你还必须选择默认税表和日期格式。 下一个页面提示你选择货币,有大量的货币支持。 -然后提示你选择你要创建的账户。选择创建**企业账户**的选项。你可以随时定制账户列表,GnuCash 提供了[大量的文档][2],帮助你更好地根据个人需求进行定制。 +然后提示你选择你要创建的账户。选择创建 “企业账户Business Accounts” 的选项。你可以随时定制账户列表,GnuCash 提供了 [大量的文档][2],帮助你更好地根据个人需求进行定制。 -完成助手,然后单击 GnuCash **助手**窗口右上角的**应用**。 +完成助手,然后单击 GnuCash “助手” 窗口右上角的 “应用Apply”。 ### 添加客户 -GnuCash 的顶部菜单有一个标有**业务**的菜单项。该菜单上的第一个项目是**客户**,其次是**客户概览**。在这里你可以查看你所有客户的列表。 +GnuCash 的顶部菜单有一个标有 “业务Business” 的菜单项。该菜单上的第一个项目是 “客户Customers”,其次是 “客户概览Customers Overview”。在这里你可以查看你所有客户的列表。 -下一个项目是**新客户**。这是你输入新客户的地方。对话框为客户信息提供了一个位置,包括帐单信息、运输地址、电子邮件地址、电话号码等。 +下一个项目是 “新客户New Customer”。这是你输入新客户的地方。对话框为客户信息提供了一个位置,包括帐单信息、运输地址、电子邮件地址、电话号码等。 ### 创建一个发票 -添加客户后,你可以开始创建发票的过程。点击**业务**菜单,选择**客户**,然后点击**新发票**。 +添加客户后,你可以开始创建发票的过程。点击 “业务” 菜单,选择 “客户”,然后点击 “新发票New Invoice”。 -付款处理也很简单。这位于**业务**菜单中。选择**客户**,然后**处理付款**。 +付款处理也很简单。这位于 “业务” 菜单中。选择 “客户”,然后 “处理付款Process Payment”。 ### 你在做生意了 -如果你的业务需要,**业务**菜单还包括输入供应商和雇员的选项。有一个菜单项用于销售税和许多其他选项,以确保你符合当地的要求。 +如果你的业务需要,“业务” 菜单还包括输入供应商和雇员的选项。有一个菜单项用于销售税和许多其他选项,以确保你符合当地的要求。 使用 GnuCash,你的数据不是以专有格式存储的,所以如果你需要,你可以在将来迁移到任何其他平台。数据存储的开放标准,特别是当这些数据是法律要求的时候,是很重要的,可以让你完全拥有你的商业历史。使用 GnuCash 使你能控制你的小企业。 @@ -70,11 +74,12 @@ via: https://opensource.com/article/23/3/open-source-accounting-run-business 作者:[Don Watkins][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/don-watkins [b]: https://github.com/lkxed/ [1]: https://www.gnucash.org/ -[2]: https://www.gnucash.org/docs/v4/C/gnucash-guide/bus_setup.html \ No newline at end of file +[2]: https://www.gnucash.org/docs/v4/C/gnucash-guide/bus_setup.html +[0]: https://img.linux.net.cn/data/attachment/album/202304/08/150133rfxheuuce1ufi99c.jpg \ No newline at end of file From 8f27eda9ce7d508b8abb56cce7dbed2add1ffcbe Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Sun, 9 Apr 2023 00:45:59 +0800 Subject: [PATCH 308/318] Update 20220813 Level up your HTML document with CSS.md XiaotingHuang22 is translating. --- sources/tech/20220813 Level up your HTML document with CSS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20220813 Level up your HTML document with CSS.md b/sources/tech/20220813 Level up your HTML document with CSS.md index 86d62b943b..dcc57ba2ed 100644 --- a/sources/tech/20220813 Level up your HTML document with CSS.md +++ b/sources/tech/20220813 Level up your HTML document with CSS.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/8/css-html-project-documentation" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -265,7 +265,7 @@ via: https://opensource.com/article/22/8/css-html-project-documentation 作者:[Jim Hall][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fd7bb9b03450c87960b8dac5da995ddb46d0c3c9 Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Sun, 9 Apr 2023 00:51:22 +0800 Subject: [PATCH 309/318] Update 20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XiaotingHuang22 is translating. 任务申领。 --- ...220523 -Speek!- - An Open-Source Chat App That Uses Tor.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md b/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md index 941be75d6d..af31358b09 100644 --- a/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md +++ b/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/speek/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -87,7 +87,7 @@ via: https://itsfoss.com/speek/ 作者:[Pratham Patel][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 88e8f6f2268478a129e44c1c70a13337333a53ce Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 9 Apr 2023 11:52:36 +0800 Subject: [PATCH 310/318] RP @XiaotingHuang22 https://linux.cn/article-15705-1.html --- ...urce alternatives to Microsoft Exchange.md | 104 ++++++++++++++++++ ...urce alternatives to Microsoft Exchange.md | 99 ----------------- 2 files changed, 104 insertions(+), 99 deletions(-) create mode 100644 published/20211124 5 open source alternatives to Microsoft Exchange.md delete mode 100644 translated/tech/20211124 5 open source alternatives to Microsoft Exchange.md diff --git a/published/20211124 5 open source alternatives to Microsoft Exchange.md b/published/20211124 5 open source alternatives to Microsoft Exchange.md new file mode 100644 index 0000000000..55ff31807f --- /dev/null +++ b/published/20211124 5 open source alternatives to Microsoft Exchange.md @@ -0,0 +1,104 @@ +[#]: subject: "5 open source alternatives to 微软 Exchange" +[#]: via: "https://opensource.com/article/21/11/open-source-alternatives-微软-exchange" +[#]: author: "Heike Jurzik https://opensource.com/users/hej" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15705-1.html" + +可以替代微软 Exchange 的 5 个开源软件 +====== + +> 不再将就于微软 Exchange 这一专有软件,试一试这些基于 Linux 系统的电子邮件和群件服务吧。 + +![][0] + +几十年来,微软 Exchange 一直统治着电子邮件和群件服务市场。作为领头羊,它主宰着企业界,无处不在的 Outlook 邮件客户端已成为群件的事实标准。由于 Exchange 与微软的 Office 产品紧密联系,无论是桌面客户端还是移动客户端,微软用户都可以轻松使用各种生产力软件和功能。 + +然而,许多公司对于将数据存储在微软的云中也心存疑虑。在本文中,我将介绍一些开源替代产品及其优势。这不仅与如何不再受供应商控制和降低成本有关,更关乎使用具有开放标准和不同安全级别的软件 —— 用于组件服务器本身及其背后的操作系统。 + +本文中介绍的这五个替代产品都是基于 Linux 的。 虽然 grommunio、Kopano、Nextcloud、ownCloud 和 OX App Suite 在功能上差异很大,吸引到的企业类型各不相同,但它们都提供免费版本,并可选择购买付费支持服务和附加组件。所有产品都可以在本地或云端运行。最重要的是,所有供应商都为其软件提供 SaaS(软件即服务Software as a Service)解决方案。 + +### grommunio + +[grommunio][2],以前被称为 grammm,在 AGPLv3 许可下发布的。它由奥地利同名公司开发和支持。与 Exchange 不同,grommunio 提供符合标准的邮件服务器,以及功能齐全的群件解决方案,具有电子邮件、联系人、日历、任务、文件共享等功能。grommunio 适用于各种开源和专有邮件客户端,如 Windows Mail、Outlook、Android、Apple Mail/iOS、Thunderbird 等,并支持旧的 RPC over HTTP 协议和 Outlook 标准协议 MAPI over HTTP。除此之外还包含:用于移动设备的 Exchange ActiveSync 和各种标准协议,如 CalDAV(日历)、CardDAV(地址簿)、IMAP、POP3、SMTP 和 LDAP,以及活动目录(用于同步用户帐户)。 + +外部对接的开源应用程序还提供了一些微软的 API 或协议不支持的功能。例如,开发人员合并了 [Jitsi][3](视频和音频电话软件)、[Mattermost][4](聊天软件)以及文件共享和同步([ownCloud][5])。除此之外,grommunio 还配备了基本的移动设备管理软件(MDM)。 + +grommunio 的设计面向各种不同的用户,并且与 Exchange 一样,它支持数据库分片(数据库在多个主机之间的水平分布)。灵活的存储后端允许管理员通过添加其他服务器或云帐户来扩展他们的设置。grommunio 仅将 MySQL 数据库用于元数据,而所有“内容”(例如邮件和群件对象)都存储在每个用户的 SQLite 数据库中。有关底层架构的更多信息,请查看 [该制造商的网站][6]。 + +其社区版是免费的,其中包括所有的 grommunio 功能并支持多达五个用户帐户。 + +### Kopano + +来自德国和荷兰的软件制造商 Kopano 出品的 [Kopano][7],也采用 AGPLv3 许可,基于 Zarafa 软件堆栈。与其前身不同,Kopano 的目标不只是成为 Exchange 的替代品。相反,它提供一个完整的群件解决方案,除了电子邮件、联系人、日历、任务、笔记和文档编辑这些标准功能外,它还包括实时通信。Kopano 可以与 [许多其他平台][8]、应用程序和服务交互,其中一些通过插件就能轻松实现。对于视频会议,Kopano 团队基于 WebRTC 开发了自己的开源解决方案:Kopano Meet 提供端到端加密,在 Windows、macOS、Linux、Android 和 iOS 客户端都适用。 + +Outlook 客户端通过 ActiveSync(Z-Push 库)或 [Kopano OL Extension][9](KOE)来同步移动数据,KOE 是已经包含了 ActiveSync 的加强版。Kopano 提供本机 Web 客户端(WebApp)、移动设备客户端(Mobility)以及支持 Windows、Linux 和 macOS 的桌面版本(DeskApp)。它可以通过 IMAP、CalDAV 和 CardDAV 连接其他客户端。所有直接连接到 Kopano 服务器的应用程序都使用 SOAP(简单对象访问协议Simple Object Access Protocol)中的 MAPI。 + +Kopano Groupware 和 Kopano ONE(Kopano Groupware 的特别版)都提供免费的社区版本。 Kopano Meet 还可以作为应用程序或容器下载。 + +### Nextcloud + +[Nextcloud][10] 在斯图加特和柏林(德国)都有办事处,采用 AGPLv3 许可。与 ownCloud 或 Dropbox 一样,用户可以通过桌面(Windows、Linux 和 macOS)、网络浏览器或本地应用程序(Android 和 iOS)访问该软件套件。从 18 版本开始,Nextcloud 除了拥有 Nextcloud Files(文件同步和共享)还包括了 Nextcloud Talk(通话、聊天和网络会议)和 Nextcloud Groupware(日历、联系人和邮件),并更名为 Nextcloud Hub。 + +用户和群组管理通过 OpenID 或 LDAP 进行。Nextcloud 支持各种存储后端,例如 FTP、S3 和 Dropbox。Nextcloud 可与多种数据库管理系统配合使用,包括 PostgreSQL、MariaDB、SQLite 和 Oracle 数据库。管理员可以通过 [Nextcloud 应用程序商店][11] 中的 200 多个应用程序扩展功能,其中包括实时通信、音频和视频聊天、任务管理、邮件等等。 + +Nextcloud 是完全免费的。最重要的是,该公司提供了 Nextcloud Enterprise 版本(针对企业部署进行了预配置、优化和强化) + +### ownCloud + +[ownCloud][12] 是由位于德国纽伦堡的 ownCloud GmbH 公司开发和维护的具有文件同步、共享和内容协作功能的软件。它的客户端-服务器软件的核心和许多社区应用程序都是在 AGPLv3 下发布的。一些扩展功能的企业应用程序以 ownCloud 商业许可证(OCL)的形式授权。 + +ownCloud 主要是一款内容协作软件,包括在线办公文档编辑、日历、联系人同步等功能。移动客户端支持 Android 和 iOS,桌面应用可以和 Windows、macOS 和 Linux 的原生文件管理器结合使用。它允许访问 Web 界面,无需安装专用客户端软件。ownCloud 支持 WebDAV、CalDAV 和 CardDAV 协议。LDAP 协议也包含其中,但 ownCloud 也可以连接到支持 OpenID Connect 身份验证标准的其他身份提供者。 + +ownCloud 可以整合微软 Office Online Server、Office 365 和微软 Teams,同时为微软 Outlook 和 eM 客户端提供可用插件。如有必要,外部存储功能可连接到不同的存储提供商,例如 Amazon S3、Dropbox、微软 SharePoint、Google Drive、Windows 网络驱动器(SMB)和 FTP。该供应商还为企业客户提供额外的功能,如端到端加密、勒索软件和防病毒保护等(请参阅 [完整功能列表][13])。 + +社区版免费且 100% 开源。 + +### OX App Suite + +[Open-Xchange][14] 成立于 2005 年,总部位于德国奥尔佩和纽伦堡。今天,OX 在多个欧洲国家、美国和日本设有办事处。[OX App Suite][15] 是一个模块化的电子邮件、通信和协作平台,主要为电信公司、托管公司和其他提供基于云的服务的提供商而设计。 + +OX 后端在 GPLv2 协议下发布,前端(UI)在 AGPLv3 下发布。用户可以通过他们喜欢的浏览器(完全个性化的门户)或移动应用程序(Android 和 iOS)访问应用程序套件。或者,原生客户端(移动设备和台式机)也可用于 OX Mail 和 OX Drive。得益于 CardDAV 和 CalDAV 扩展、Exchange Active Sync 和适用于 Android 的 OX Sync App,联系人、日历和任务得以同步。 + +OX App Suite 包含用于电子邮件、联系人、日历和任务的应用程序。 还有其他工具和扩展可用,其中一些是开源的,一些功能则要付费,包括 OX Documents(文本文档、电子表格、演示文稿)、OX Drive(管理、共享和同步文件)、OX Guard(电子邮件和文件加密)等等。如需完整列表,请访问 OX 网站的 [一般条款和条件][16]。 + +该应用免费提供有限功能的社区版。 + +### 开源电子邮件和群件 + +电子邮件和群件服务并不是必须花(很多)钱才可获得,当然也没有必要满足于在别人的服务器上托管的专有解决方案。如果你不太热衷于管理职责,那么上述的这五个 Exchange 开源替代品都可以作为 SaaS 解决方案使用。另外,所有供应商都提供专业技术支持,你可以在本地运行软件,一切尽在你的掌握中,但你却不会感觉自己孤军无援。 + +(题图由 MJ 生成:Mail Cooperation Groupware Office Open Source hyper realistic, hyper detailed, intricate detail, beautiful lighting, very detailed,Illustration) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-alternatives-微软-exchange + +作者:[Heike Jurzik][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hej +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife) +[2]: https://grommunio.com/ +[3]: https://opensource.com/article/20/5/open-source-video-conferencing +[4]: https://opensource.com/article/20/7/mattermost +[5]: https://opensource.com/article/21/7/owncloud-windows-files +[6]: https://grommunio.com/features/architecture/ +[7]: https://kopano.com/ +[8]: https://kopano.com/products/interoperability/ +[9]: https://kb.kopano.io/display/WIKI/Setting+up+the+Kopano+OL+Extension +[10]: https://nextcloud.com/ +[11]: https://apps.nextcloud.com/ +[12]: https://owncloud.com/ +[13]: https://owncloud.com/features/ +[14]: https://www.open-xchange.com/ +[15]: https://www.open-xchange.com/products/ox-app-suite/ +[16]: https://www.open-xchange.com/terms-and-conditions/ +[0]: https://img.linux.net.cn/data/attachment/album/202304/09/114919i7cu0zwk4e663x0c.jpg \ No newline at end of file diff --git a/translated/tech/20211124 5 open source alternatives to Microsoft Exchange.md b/translated/tech/20211124 5 open source alternatives to Microsoft Exchange.md deleted file mode 100644 index f832eb33df..0000000000 --- a/translated/tech/20211124 5 open source alternatives to Microsoft Exchange.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "5 open source alternatives to Microsoft Exchange" -[#]: via: "https://opensource.com/article/21/11/open-source-alternatives-microsoft-exchange" -[#]: author: "Heike Jurzik https://opensource.com/users/hej" -[#]: collector: "lujun9972" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -可以替代 Microsoft Exchange 的5个开源软件 -====== -不再将就于 Microsoft Exchange 这一专有软件,试一试这些基于 Linux 系统的电子邮件和群件服务吧。 -![在团队中工作,忙碌的工作生活][1] - -几十年来,Microsoft Exchange 一直统治着电子邮件和群件服务市场。 作为领头羊,它主宰着企业界,无处不在的 Outlook 邮件客户端已成为群件同行里的事实标准。 由于 Exchange 与 Microsoft 的 Office 产品紧密联系,无论是桌面客户端还是移动客户端,微软用户都可以轻松使用各种生产力软件和功能。 - -然而,许多公司对于将数据存储在 Microsoft 云中也心存疑虑。 在本文中,我将介绍一些开源替代产品及其优势。 这不仅有关如何不再受供应商控制和降低成本,更关乎使用具有开放标准和不同安全级别的软件——用于组件服务器本身及其背后的操作系统。 - -本文中介绍的这五个替代产品都是基于 Linux 的。 虽然 grommunio、Kopano、Nextcloud、ownCloud 和 OX App Suite 在功能上差异很大,吸引到的企业类型各不相同,但它们都提供免费版本,并可选择购买付费支持服务和附加组件。 所有产品都可以在本地或云端运行。 最重要的是,所有供应商都为其软件提供 SaaS (Software as a Service,软件即服务) 解决方案。 - -### grommunio - -[grommunio][2],以前被称为 grammm,在 AGPLv3 许可下发布的。 它由奥地利同名公司开发和支持。 与 Exchange 不同,grommunio 提供符合标准的邮件服务器以及功能齐全的群件解决方案,具有电子邮件、联系人、日历、任务、文件共享等功能。 grommunio 适用于各种开源和专有邮件客户端,如 Windows Mail、Outlook、Android、Apple Mail/iOS、Thunderbird 等,并支持旧的 RPC over HTTP 协议和 Outlook 标准协议 MAPI over HTTP。 除此之外还包含:用于移动设备的 Exchange ActiveSync 和各种标准协议,如 CalDAV(日历)、CardDAV(地址簿)、IMAP、POP3、SMTP 和 LDAP,以及 Active Directory(用于同步用户帐户)。 - -外部开源应用程序还提供了一些 Microsoft 的 API 或协议不支持的功能。 例如,开发人员合并了 [Jitsi][3](视频和音频电话软件)、[Mattermost][4](聊天软件)以及文件共享和同步([ownCloud][5])。除此之外,grommunio 还配备了基本的移动设备管理软件 (MDM)。 - -grommunio 的设计面向大量不同的用户,并且与 Exchange 一样,它支持数据库分片(数据库在多个主机之间的水平分布)。 灵活的存储后端允许管理员通过添加其他服务器或云帐户来扩展他们的设置。 grommunio 仅将 MySQL 数据库用于元数据,而所有“内容”(例如邮件和群件对象)都存储在每个用户的 SQLite 数据库中。 有关底层架构的更多信息,请查看[制造商的网站][6]。 - -社区版是免费的,其中包括所有的 grommunio 功能并支持最多五个用户帐户。 - -### Kopano - -来自德国和荷兰的软件制造商 Kopano 出品的 [Kopano][7] 也获得了 AGPLv3 许可并基于 Zarafa 软件堆栈。 与其前身不同,Kopano 的目标不只是成为 Exchange 的替代品。 相反,它提供一个完整的群件解决方案,除了电子邮件、联系人、日历、任务、笔记和文档编辑这些标准功能外,它还包括实时通信。 Kopano 与[许多其他平台][8]、应用程序和服务交互,其中一些通过插件就能轻松实现。 对于视频会议,Kopano 团队基于 WebRTC 开发了自己的开源解决方案:Kopano Meet 提供端到端加密,在 Windows、macOS、Linux、Android 和 iOS 客户端都适用。 - -Outlook 客户端通过 ActiveSync(Z-Push 库)或 [Kopano OL Extension][9] (KOE) 来同步移动数据,KOE 是已经包含的 ActiveSync 的加强版。 Kopano 提供本机 Web 客户端 (WebApp)、移动设备客户端 (Mobility) 以及支持 Windows、Linux 和 macOS 的桌面版本 (DeskApp)。 它可以通过 IMAP、CalDAV 和 CardDAV 连接其他客户端。 所有直接连接到 Kopano 服务器的应用程序都使用 SOAP(简单对象访问协议)中的 MAPI。 - -Kopano Groupware 和 Kopano ONE(Kopano Groupware 的特别版)都提供免费的社区版本。 Kopano Meet 还可以作为应用程序或容器下载。 - -### Nextcloud - -[Nextcloud][10] 在斯图加特和柏林(德国)都有办事处,已获得 AGPLv3 许可。 与 ownCloud 或 Dropbox 一样,用户可以通过桌面(Windows、Linux 和 macOS)、网络浏览器或本地应用程序(Android 和 iOS)访问软件套件。 从 18 版本开始,Nextcloud 除了拥有 Nextcloud Files(文件同步和共享)还包括了 Nextcloud Talk(通话、聊天和网络会议)和 Nextcloud Groupware(日历、联系人和邮件),并更名为 Nextcloud Hub。 - -用户和群组管理通过 OpenID 或 LDAP 进行。 Nextcloud 支持各种存储后端,例如 FTP、S3 和 Dropbox。 Nextcloud 可与多种数据库管理系统配合使用,包括 PostgreSQL、MariaDB、SQLite 和 Oracle 数据库。 管理员可以通过 [Nextcloud 应用程序商店][11] 中的 200 多个应用程序扩展功能,其中包括实时通信、音频和视频聊天、任务管理、邮件等等。 - -Nextcloud 是完全免费的。 最重要的是,该公司提供了 Nextcloud Enterprise 版本(针对企业部署进行了预配置、优化和强化) - -### ownCloud - -[ownCloud][12] 是由位于德国纽伦堡的 ownCloud GmbH 公司开发和维护的具有文件同步、共享和内容协作功能的软件。 它的客户端-服务器软件的核心和许多社区应用程序都是在 AGPLv3 下发布的。 一些扩展功能的企业应用程序获得 ownCloud 商业许可证 (OCL) 许可。 - -ownCloud主要是一款内容协作软件,包括在线办公文档编辑、日历、联系人同步等功能。移动客户端支持 Android 和 iOS,桌面应用可以和 Windows、macOS 和 Linux 的原生文件管理器结合使用。它允许访问 Web 界面,无需安装专用客户端软件。 ownCloud 支持 WebDAV、CalDAV 和 CardDAV 协定。 LDAP 协定也包含其中,但 ownCloud 同时连接到支持 OpenID Connect 身份验证标准的其他身份提供者。 - -ownCloud 可以整合 Microsoft Office Online Server、Office 365 和 Microsoft Teams,同时为Microsoft Outlook 和 eM Client 提供可用插件。 如有必要,外部存储功能可连接到不同的存储提供商,例如 Amazon S3、Dropbox、Microsoft SharePoint、Google Drive、Windows 网络驱动器 (SMB) 和 FTP。 该供应商还为企业客户提供额外的功能,如端到端加密、勒索软件和防病毒保护等(请参阅[完整功能列表][13])。 - -社区版免费且 100% 开源。 - -### OX 应用套件 - -[Open-Xchange][14] 成立于 2005 年,总部位于德国奥尔佩和纽伦堡。 今天,OX 在多个欧洲国家、美国和日本设有办事处。 [OX App Suite][15] 是一个模块化的电子邮件、通信和协作平台,主要为电信公司、托管公司和其他提供基于云的服务的提供商而设计。 - -OX 后端在 GPLv2 协议下发布,前端(UI)在 AGPLv3 下发布。 用户可以通过他们喜欢的浏览器(完全个性化的门户)或移动应用程序(Android 和 iOS)访问应用程序套件。 或者,本机客户端(移动设备和台式机)可用于 OX Mail 和 OX Drive。 得益于 CardDAV 和 CalDAV 扩展、Exchange Active Sync 和适用于 Android 的 OX Sync App,联系人、日历和任务得以同步。 - -OX 应用套件包含用于电子邮件、联系人、日历和任务的应用程序。 还有其他工具和扩展可用,其中一些是开源的,一些功能则要付费,包括 OX Documents(文本文档、电子表格、演示文稿)、OX Drive(管理、共享和同步文件)、OX Guard(电子邮件和文件加密)等等。 如需完整列表,请访问 OX 网站的[一般条款和条件][16]。 - -该应用免费提供有限功能的社区版。 - -### 开源电子邮件和群件 - -电子邮件和群件服务并不是必须花费(大量)金钱才可获得,更没有必要将就自己,(为了免费的服务而)依靠一个私人专有的、属于别人的服务器。 如果你不太热衷于管理职责,那么上述的这五个 Exchange 开源替代品都可以作为 SaaS 解决方案使用。 或者,所有供应商都提供专业技术支持,您可以在本地运行软件——一切尽在你的掌握中,但你却不会感觉自己孤军无援。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-alternatives-microsoft-exchange - -作者:[Heike Jurzik][a] -选题:[lujun9972][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hej -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife) -[2]: https://grommunio.com/ -[3]: https://opensource.com/article/20/5/open-source-video-conferencing -[4]: https://opensource.com/article/20/7/mattermost -[5]: https://opensource.com/article/21/7/owncloud-windows-files -[6]: https://grommunio.com/features/architecture/ -[7]: https://kopano.com/ -[8]: https://kopano.com/products/interoperability/ -[9]: https://kb.kopano.io/display/WIKI/Setting+up+the+Kopano+OL+Extension -[10]: https://nextcloud.com/ -[11]: https://apps.nextcloud.com/ -[12]: https://owncloud.com/ -[13]: https://owncloud.com/features/ -[14]: https://www.open-xchange.com/ -[15]: https://www.open-xchange.com/products/ox-app-suite/ -[16]: https://www.open-xchange.com/terms-and-conditions/ From 33627b678c85aec27c5c07820962b7dca8ee22e1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 9 Apr 2023 16:45:57 +0800 Subject: [PATCH 311/318] ATRP @wxy https://linux.cn/article-15706-1.html --- ....2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md | 151 ++++++++++++++++++ ....2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md | 148 ----------------- 2 files changed, 151 insertions(+), 148 deletions(-) create mode 100644 published/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md delete mode 100644 sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md diff --git a/published/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md b/published/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md new file mode 100644 index 0000000000..27bf9f0fd4 --- /dev/null +++ b/published/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md @@ -0,0 +1,151 @@ +[#]: subject: "Xubuntu 23.04: Best New Features" +[#]: via: "https://www.debugpoint.com/xubuntu-23-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15706-1.html" + +Xubuntu 23.04 的最佳新功能 +====== + +![][0] + +> 一些很酷的功能将在 Xubuntu 23.04 “Lunar Lobster” 版本中出现。 + +Xubuntu 23.04,基于即将发布的 [Ubuntu 23.04 “Lunar Lobster”][1],将于 2023 年 4 月 20 日到达。这个最新版本建立在 Linux 内核 6.2 上,带来了最新的硬件、CPU、GPU 和文件系统支持。 + +从改进的小程序到更强大的 Thunar 文件管理器,Xubuntu 23.04 提供了大量的改进和错误修复,通过所有 Linux 桌面的 “OG” —— Xfce 4.18,提供了更精炼的用户体验。 + +![Xubuntu 23.04 桌面][2] + +如果你正在使用之前的 Xubuntu 22.10,那么你可能会注意到桌面环境的明显变化。Xubuntu 22.10 以开发版 Xfce 4.17 为特色,并带有来自 Xfce 4.18 少量功能。 + +考虑到这一点,让我们来看看 Xubuntu 23.04 “Lunar Lobster” 的最佳新功能。 + +### Xubuntu 23.04 的最佳新功能 + +#### Xfce 4.18 更新 + +这个版本中的一个重要变化是对 Xfce 桌面环境的更新。Xubuntu 23.04 基于 2022 年 12 月发布的 [最新的 Xfce 4.18][3]。Xfce 4.18 是该桌面环境的一个重要里程碑,提供了对 GTK4 的更新、对 Wayland 的初始支持以及对核心原生应用的改造,更新量很大。 + +顶部主面板已经更新了新的设置和调整,而整体外观仍与早期版本相同。一些默认的面板小程序在这个版本中也被改变了,而桌面图标、右键上下文菜单和项目保持不变。 + +![Xfce 4.18 中的面板偏好][4] + +面板首选项得到了增强,有两个新的选项。首先,面板的长度现在是以像素为单位,而不是百分比。其次,增加了一个新的选项,“保持面板在窗口上方”,允许用户将窗口对话放到面板后面。在早期版本中,应用程序窗口只能达到面板边缘。 + +在 Xfce 4.18 中对时钟小程序的设置进行了大修。用户终于可以改变 Xfce 时钟小程序的字体风格,并且有四个时钟布局选项:只显示日期,只显示时间,日期和时间,以及时间和日期。 + +#### Thunar 文件管理器的更新 + +由于在 [Google Summer of Code 2022][5] 期间所做的工作,用户现在可以在 Thunar 的嵌入式侧边栏中看到图片预览,或者在独立模式下出现在右侧的新面板中,这可以通过偏好设置进行更改。 + +Thunar 的设置也得到了加强,增加了一个新的标签用于定制键盘快捷键。用户现在可以直接指定新的组合键,并从这个标签中改变现有的组合键。 + +一个新的搜索图标已经取代了工具栏中的重载按钮,当点击它时,它会在地址栏中调出搜索,用用户的搜索关键词进行递归搜索。重载按钮已被移至 “查看View” 菜单。另一个新项目,“最近Recent”,已被添加到左边的导航栏。同时,元数据被组织得更好了(从逗号分隔换成竖线分隔),一个新的上下文菜单项允许用户选择他们想要的选项。 + +Thunar 的主菜单也发生了重大变化。引入了一个新的 “书签Bookmarks” 菜单,允许用户将当前文件夹作为快捷方式添加到侧边栏中。“编辑Edit”菜单现在包括 “撤销Undo” 和 “重做Redo” 选项,而 “前往Go” 菜单则有 “最近”和 “按文件搜索Search for the file”选项。 + +![Thunar 带有分割视图和图像预览][6] + +Thunar 还首次通过 “视图View” 菜单项增加了分割视图,使用户能够在视图面板中拖放项目。另外,为了组织你的文件夹以加快工作流程,Thunar 还为你的文件夹及其名称引入了背景颜色。 + +![带有文件夹高亮选项的 Thunar][7] + +除了 Xfce 4.18 的功能外,Xubuntu 23.04 还为窗口管理器和桌面的提供了更多的错误修复和性能改进。这些改进是在底层进行的;用户可以期待一个更精巧的 Xfce 桌面体验。 + +虽然 Xfce 桌面核心和本地应用程序的 Wayland 迁移工作已经开始,但它仍然远远没有准备好。因此,这个 Xubuntu 23.04 可能是未来 Wayland 工作的基础,希望可以出现在下一个 Xubuntu LTS 之前。虽然,考虑到 Xfce 团队的规模和其他方面,这不太有信心。 + +#### 最小化 ISO + +正如我之前所报道的,Xubuntu 23.04 也引入了一个最小化的 ISO 镜像,其中只有基本的 Xfce 桌面组件,没有任何额外的预装软件。你可以试试这个最小化的 ISO,为你的工作流程建立你自己的桌面设置。 + +最小化的 ISO 大小目前为 1.9GB,团队正在努力在未来的版本中进一步减少它。 + +你可以在 [这篇文章中][8] 阅读更多关于 Xubuntu 最小化 ISO 的信息。 + +![Xubuntu 最小化和标准安装比较][9] + +#### Flathub 和 Snap + +几周前,Canonical 宣布已决定从所有 Ubuntu 官方风味版中默认删除 Flatpak 支持。因此,在 Xubuntu 23.04 中,你将不会默认安装 Flatpak。 + +Ubuntu 自己的 Snap 将默认安装所有相关组件,以运行几个 Snap 应用程序,如 Firefox。 + +但是,在 Xubuntu 中设置 Flatpak 和 Flathub 非常容易,[只需要两个命令][10]。 + +#### 其他变化和总结 + +在核心方面,Xubuntu 23.04 基于 [Linux 内核 6.2][11] 主线版本,它带来了对领先制造商的最新 CPU/GPU 产品的支持。此外,这个内核版本还引入了内存优化、安全修复和许多附件支持。 + +应用程序栈和 GNOME 组件的更新如下: + +- Firefox 111.0(Snap) +- Thunderbird 102.9 +- Thunar 4.18.4 +- Parole media player 4.18 +- LibreOffice 7.5 +- GNOME Software 44.0 +- Catfish file search 4.16.4 +- Transmission 3.0 + +![GNOME 软件应用 44 在 Xubuntu 23.04 中][12] + +在核心部分,Python 3.11 现在可以在 Xubuntu 23.04 中开箱即用。你不需要再单独 [安装 Python 3.11][13] 了。值得一提的是,Python 3.12版本将在今年发布,目前正在进行多个 RC 测试。下面是这个版本中核心模块的总结: + +- Python 3.11 +- GCC 13 +- GlibC 2.37 +- Ruby 3.1 +- golang 1.2 +- LLVM 16 + +### 下载 + +你可以从下面的链接中下载 Xubuntu 23.04(测试版)。请记住,它仍然在进行测试。所以,请谨慎使用它。 + +> **[下载 Xubuntu 23.04 - Beta][14]** + +如果你想要 Xubuntu 23.04 的最小化 ISO,你可以从下面的链接获得该文件。[了解更多关于 Xubuntu-mini][8]。 + +> **[下载 Xubuntu 23.04 (mini-ISO) - Beta][14]** + +### 总结 + +总之,Xubuntu 23.04 是一个重要的版本,具有 Xfce 4.18 桌面环境的若干改进和功能。由于专注于提高用户体验,Xubuntu 用户可以享受到最新的 Linux 内核、改进后的 Thunar 文件管理器以及其他一些调整和变化。 + +这将是 Xubuntu 对每个人来说最好的版本之一。 + +(题图由 MJ 生成:https://s.mj.run/0robf_nipRw Lunar Lobster hyper detailed, intricate detail, beautiful lighting, Illustration --q 2 --ar 16:9 --v 5) + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/xubuntu-23-04/ + +作者:[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/ubuntu-23-04-features/ +[2]: https://www.debugpoint.com/wp-content/uploads/2023/04/Xubuntu-23.04-Desktop.jpg +[3]: https://www.debugpoint.com/xfce-4-18-features/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Panel-preferences-in-Xfce-4.18.jpg +[5]: https://debugpointnews.com/xfce-gsoc-2022/ +[6]: https://www.debugpoint.com/wp-content/uploads/2023/04/Thunar-with-split-view-and-image-preview.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/04/Thunar-with-folder-highlight-option.jpg +[8]: https://www.debugpoint.com/xubuntu-minimal/ +[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg +[10]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[11]: https://www.debugpoint.com/linux-kernel-6-2/ +[12]: https://www.debugpoint.com/wp-content/uploads/2023/04/GNOME-Software-44-in-Xubuntu-23.04.jpg +[13]: https://www.debugpoint.com/install-python-3-11-ubuntu/ +[14]: https://cdimage.ubuntu.com/xubuntu/releases/lunar/beta/ +[15]: https://www.xfce-look.org/p/1953253 +[0]: https://img.linux.net.cn/data/attachment/album/202304/09/164211inurec5cc59cqtmc.jpg \ No newline at end of file diff --git a/sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md b/sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md deleted file mode 100644 index 019ac95523..0000000000 --- a/sources/news/20230407.2 ⭐️⭐️ Xubuntu 23.04 Best New Features.md +++ /dev/null @@ -1,148 +0,0 @@ -[#]: subject: "Xubuntu 23.04: Best New Features" -[#]: via: "https://www.debugpoint.com/xubuntu-23-04/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Xubuntu 23.04: Best New Features -====== - -**A few cool features are arriving on Xubuntu 23.04 Lunar Lobster release. Here’s a summary.** - -Xubuntu 23.04, based on the upcoming [Ubuntu 23.04 Lunar Lobster][1], is set to arrive on April 20, 2023. This latest release is built on the Linux Kernel 6.2, which brings the latest hardware, CPU, GPU, and file-system support. - -From revamped applets to a more powerful Thunar file manager, Xubuntu 23.04 offers numerous improvements and bug fixes for a more polished user experience via the “OG” of all Linux desktops – Xfce 4.18. - -![Xubuntu 23.04 Desktop][2] - -If you are using prior Xubuntu 22.10, then you might notice significant changes in the desktop environment. Xubuntu 22.10 featured the development version Xfce 4.17 with a minimal feature set of the Xfce 4.18. - -With that in mind, let’s take a look at the best new features of Xubuntu 23.04 Lunar Lobster. - -### Xubuntu 23.04: Best New Features - -#### Xfce 4.18 updates - -One of the significant changes in this release is the update to the Xfce desktop environment. Xubuntu 23.04 is based on the [latest Xfce 4.18][3], released in December 2022. Xfce 4.18 is a major milestone for the desktop environment, featuring updates to GTK4, initial Wayland support, and a revamp of core native apps, with a massive volume of updates. - -The primary top panel has been updated with new settings and tweaks, while the overall look remains the same as the earlier versions. Some default Panel applets have also been changed in this version, while the desktop icons, right-click context menu, and items remain unchanged. - -![Panel preferences in Xfce 4.18][4] - -Panel preference has been enhanced with two new options. Firstly, the length of the Panel is now in pixels rather than percentages. Secondly, a new option, “Keep panel above windows,” has been added to allow users to send back window dialogues behind the panel. In earlier versions, app windows could only reach up to the panel edge. - -The clock applet settings have been overhauled in Xfce 4.18. Users can finally change the font style in the Xfce clock applet, and four clock layout options are available: date only, time only, date and time, and time and date. - -#### Thunar file manager updates - -Thanks to work done during [Google Summer of Code 2022][5], users can now see the image preview in the sidebar in Thunar embedded, or at a new panel at the right as a standalone mode, which can be changed via preferences. - -Thunar settings have also been enhanced with a new tab for customizing keyboard shortcuts. Users can now directly assign new keyboard combinations and change existing ones from this tab. - -A new search icon has replaced the reload button in the toolbar, and when clicked, it brings up the search at the address bar, performing a recursive search with the user’s search keyword. The reload button has been moved to the View menu. Another new item, “Recent,” has been added to the left navigation bar. At the same time, the metadata has been more organized (from comma-separated to pipe-separated), and a new context menu item allows users to select their desired option. - -The main menu of Thunar has also undergone significant changes. A new bookmark menu has been introduced, allowing users to add the current folder to the sidebar as a shortcut. The Edit menu now includes UNDO and REDO options, while the Go menu features Recent and Search for the file options. - -![Thunar with split view and image preview][6] - -Thunar has also added a Split view via the View menu item for the first time, enabling users to drag and drop items in the view panels. Also, to arrange your folders for faster workflow, Thunar also introduces background colour for your folders, including the folder names. - -![Thunar with folder highlight option][7] - -Along with the Xfce 4.18 features, Xubuntu 23.04 includes additional bug fixes and performance improvements for the window manager and desktop. These improvements are under the hood; users can expect a more polished Xfce desktop experience. - -While Wayland migration work for Xfce desktop core and native apps has begun, it’s still far from ready. So, this Xubuntu 23.04 might be the foundation for Wayland’s work in the future, hopefully before the next Xubuntu-LTS. Although, it is doubtful, considering the Xfce team size and other aspects. - -#### Mini ISO - -As I reported earlier, Xubuntu 23.04 also introduces a minimal ISO image with only essential Xfce desktop components without any additional pre-loaded software. You can try this minimal ISO to build your own desktop setup for your workflow. - -The minimal ISO size is currently at 1.9GB and the team is working to reduce it further in coming releases. - -You can read more about Xubuntu minimal ISO [in this article][8]. - -![Xubuntu minimal and standard install - comparison][9] - -#### Flathub and Snap - -A few weeks back, Canonical announced that a decision had been taken to remove all the default Flatpak installations from all the official Ubuntu flavours. Hence, in Xubuntu 23.04, you won’t get Flatpak installed by default. - -Ubuntu’s own Snap will be installed by default with all associated components to run several Snap applications, such as Firefox. - -That said, its very easy to set up Flatpak and Flathub in Xubuntu [with just two commands][10]. - -#### Other changes and summary - -At the core, Xubuntu 23.04 is based on [Linux Kernel 6.2][11] mainline, which brings support for the latest CPU/GPU line-ups from leading manufacturers. Also, this kernel version introduces memory optimizations, security fixes and many accessories support. You can learn more about Linux Kernel 6.2 features here. - -The application stack and GNOME components are updated as follows. - -- Firefox 111.0 (Snap) -- Thunderbird 102.9 -- Thunar 4.18.4 -- Parole media player 4.18 -- LibreOffice 7.5 -- GNOME Software 44.0 -- Catfish file search 4.16.4 -- Transmission 3.0 - -![GNOME Software 44 in Xubuntu 23.04][12] - -At the core, Python 3.11 is now available out-of-the-box in Xubuntu 23.04. You don’t need to [install Python 3.11][13] anymore separately. It’s worth mentioning that Python 3.12 release is due this year and currently undergoing multiple RC testing. Here’s a summary of core modules in this release. - -- Python 3.11 -- GCC 13 -- GlibC 2.37 -- Ruby 3.1 -- golang 1.2 -- LLVM 16 - -### Download - -You can download the Xubuntu 23.04 (Beta) from the below link. Remember that it is still undergoing testing. So, use it with caution. - -[Download Xubuntu 23.04 – Beta][14] - -If you want the Xubuntu 23.04 mini-iso, you can get the file from the below link. [Learn more about Xubuntu-mini][8]. - -[Download Xubuntu 23.04 (mini-ISO) – Beta][14] - -### Conclusion - -In conclusion, Xubuntu 23.04 is a significant release with several improvements and features with the Xfce 4.18 desktop environment. With a focus on enhancing the user experience, Xubuntu users can enjoy the latest Linux Kernel, the revamped Thunar file manager, and several other tweaks and changes. - -It will be one of the best releases of Xubuntu for everyone. - -_Feature image credit: [xfce-look][15]_ - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/xubuntu-23-04/ - -作者:[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/ubuntu-23-04-features/ -[2]: https://www.debugpoint.com/wp-content/uploads/2023/04/Xubuntu-23.04-Desktop.jpg -[3]: https://www.debugpoint.com/xfce-4-18-features/ -[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Panel-preferences-in-Xfce-4.18.jpg -[5]: https://debugpointnews.com/xfce-gsoc-2022/ -[6]: https://www.debugpoint.com/wp-content/uploads/2023/04/Thunar-with-split-view-and-image-preview.jpg -[7]: https://www.debugpoint.com/wp-content/uploads/2023/04/Thunar-with-folder-highlight-option.jpg -[8]: https://www.debugpoint.com/xubuntu-minimal/ -[9]: https://www.debugpoint.com/wp-content/uploads/2023/03/Xubuntu-minimal-and-standard-install-comparison.jpg -[10]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ -[11]: https://www.debugpoint.com/linux-kernel-6-2/ -[12]: https://www.debugpoint.com/wp-content/uploads/2023/04/GNOME-Software-44-in-Xubuntu-23.04.jpg -[13]: https://www.debugpoint.com/install-python-3-11-ubuntu/ -[14]: https://cdimage.ubuntu.com/xubuntu/releases/lunar/beta/ -[15]: https://www.xfce-look.org/p/1953253 From 06c35eaab407d2138190b51e0dd82700d35a9560 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 10 Apr 2023 08:49:32 +0800 Subject: [PATCH 312/318] tranlating --- ...1.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md | 72 ------------------- ...1.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md create mode 100644 translated/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md diff --git a/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md b/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md deleted file mode 100644 index ba8acd662e..0000000000 --- a/sources/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "Measure pi with a Raspberry Pi" -[#]: via: "https://opensource.com/article/23/3/measure-pi-raspberry-pi" -[#]: author: "Jim Hall https://opensource.com/users/jim-hall" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Measure pi with a Raspberry Pi -====== - -March 14th is celebrated around the world as Pi Day. Many people celebrate Pi Day by measuring pi with objects found around the house. I wanted to do something similar for this year's Pi Day using my Raspberry Pi 3B. Read on to learn how I measured pi using my Raspberry Pi. - -What you'll need: - -- Raspberry Pi single-board computer -- Graph paper -- Ruler with mm and cm measurements -- Pen - -### 1. Draw a circle - -Pi is the ratio of the circumference of a circle to its diameter. To calculate pi, we need to measure both the circumference and diameter of a perfectly drawn circle. Fortunately, the Raspberry Pi motherboard has mounting holes that are big enough to fit a pencil or pen. I stuck a pin through one Pi board mounting hole, careful to land the pin on the intersection of two lines on a piece of graph paper. - -Holding the pin still, I inserted a pen in the opposite mounting hole and drew a circle by moving the pen around the pin. The solder points on the underside of the Raspberry Pi motherboard can catch on the paper, but you can draw a good circle if you are careful. - -![Use the Raspberry Pi as a compass to draw a circle.][1] - -### 2. Divide the circle into segments - -Divide the circle in half by drawing a vertical line through the center of the circle and again into quarters by drawing a horizontal line through the circle. When I drew my circle, I placed the pin exactly on the intersection of two lines on the graph paper, which makes finding the vertical and horizontal center lines easy to find. You can create an "eighth" slice by drawing a line across the diagonal. - -![Each small wedge is 1/8 of a circle.][2] - -Further divisions are an exercise with the ruler. I used the ruler to find the midpoint of any two intersections of the "quarter-wedge" and the "one-eighth wedge" to make a 1/16 wedge. You can use the same method to make smaller and smaller slices that are 1/32 and 1/64 of a circle. By being very careful, I was also able to measure a very narrow wedge at 1/128 of a circle: - -![If you are careful, you can keep dividing to find 1/128 of a circle.][3] - -### 3. Estimate the circumference - -My smallest wedge is 1/128 of a circle. With such a small slice, the outer arc of the wedge is so small that we can approximate it with a straight line. This will not actually be 1/128 of the circle's circumference, but it will be close enough that we can use it as a good estimate. - -![Use the mm measurement on your ruler to measure the outer arc of the 1/128 segment.][4] - -Using the mm measurement on my ruler, I measured the outer arc of my 1/128 wedge at 3.8mm. With that, I can estimate the circumference of my circle as 3.8mm times 128, or 486.4mm. To convert to centimeters, divide by ten: **48.64cm**. - -### 4. Calculate pi - -The value of pi is the ratio of the circumference of a circle to its diameter. We estimated the circumference in step 3. Measuring the diameter is a simple exercise of using the ruler to measure across the circle. My circle is **15.4cm**. - -Now that we know the circumference and diameter, we can calculate pi as 48.64 divided by 15.4, which is **3.158**. That's not too far off from the actual value of pi, at 3.141. - -Measuring pi is a fun math exercise! Math fans of all ages can use simple tools such as graph paper, pen, and ruler to measure pi on their own. Use your Raspberry Pi in a fun, new way to draw a circle and measure pi independently. This is an estimate since we are approximating a 1/128 arc on a circle as a straight line, but this gets us close enough without too much effort. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/measure-pi-raspberry-pi - -作者:[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/2023-03/10000000000003E8000003E8BE7DE71919BB0C82.jpg -[2]: https://opensource.com/sites/default/files/2023-03/100000010000028A0000028A0625B218857F031C.webp -[3]: https://opensource.com/sites/default/files/2023-03/100000000000079E00000514506C8EE5131D886A.webp -[4]: https://opensource.com/sites/default/files/2023-03/10000000000003E8000003E881402FB71F1945FF.jpg \ No newline at end of file diff --git a/translated/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md b/translated/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md new file mode 100644 index 0000000000..06ddaa9a3e --- /dev/null +++ b/translated/tech/20230331.2 ⭐️⭐️ Measure pi with a Raspberry Pi.md @@ -0,0 +1,72 @@ +[#]: subject: "Measure pi with a Raspberry Pi" +[#]: via: "https://opensource.com/article/23/3/measure-pi-raspberry-pi" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用树莓派测量圆周率 +====== + +世界各地将 3 月 14 日定为圆周率日。许多人通过在房子周围找到的物体测量圆周率来庆祝圆周率日。我想用我的树莓派 3B 为今年的 Pi Day 做一些类似的事情。继续阅读以了解我如何使用我的树莓派测量圆周率。 + +你需要什么: + +- 树莓派单板机 +- 方格纸 +- 带毫米和厘米测量值的标尺 +- 笔 + +### 1. 画一个圆 + +圆周率是圆的周长与其直径的比值。要计算圆周率,我们需要测量一个完美绘制的圆的周长和直径。幸运的是,树莓派主板上的安装孔足够大,可以使用铅笔或钢笔。我通过一个树莓派板安装孔插入了一根图钉,小心地将针放在一张方格纸上两条线的交点上。 + +握住别针,我将一支笔插入对面的安装孔中,并通过将笔绕着别针移动来画一个圆圈。树莓派主板底面的焊点会卡在纸上,但小心点还是可以画好圆圈的。 + +![Use the Raspberry Pi as a compass to draw a circle.][1] + +### 2. 把圆分成段 + +通过画一条穿过圆心的垂直线将圆分成两半,通过画一条穿过圆心的水平线将圆再次分成四分之一。当我画圆的时候,我把图钉正好放在图画纸上两条线的交点上,这样就很容易找到垂直和水平的中心线。你可以通过在对角线上画一条线来创造一个 "八分 "片。 + +![Each small wedge is 1/8 of a circle.][2] + +进一步的划分是与尺子的练习。我用尺子找到“四分之一楔形”和“八分之一楔形”任意两个交点的中点,做成一个 1/16 的楔形。你可以使用相同的方法制作越来越小的 1/32 和 1/64 圆的切片。通过非常小心,我还能够在圆的 1/128 处测量出一个非常窄的楔形: + +![If you are careful, you can keep dividing to find 1/128 of a circle.][3] + +### 3. 估算周长 + +我最小的楔形是一个圆的 1/128。如此小的切片,楔形的外弧非常小,我们可以用一条直线来近似它。这实际上不是圆周长的 1/128,但它足够接近,我们可以将其用作一个很好的估计。 + +![Use the mm measurement on your ruler to measure the outer arc of the 1/128 segment.][4] + +使用我的尺子上的毫米测量值,我测量了我的 1/128 楔形的外弧为 3.8 毫米。这样,我可以估计圆的周长为 3.8 毫米乘以 128,即 486.4 毫米。要转换为厘米,除以十:**48.64cm**。 + +### 4. 计算圆周率 + +圆周率的值是圆的周长与其直径的比值。我们在步骤 3 中估算了周长。测量直径是使用尺子测量圆周的简单练习。我的圆是 **15.4cm**。 + +现在我们知道了周长和直径,我们可以将圆周率计算为 48.64 除以 15.4,即 **3.158**。这与 pi 的实际值 3.141 相差不远。 + +测量圆周率是一项有趣的数学练习!各个年龄段的数学爱好者都可以使用方格纸、笔和尺子等简单工具自行测量圆周率。以一种有趣的新方式使用你的树莓派来绘制圆并独立测量圆周率。这是一个估计值,因为我们将圆上的 1/128 弧近似为一条直线,但这使我们无需太多努力就足够接近了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/measure-pi-raspberry-pi + +作者:[Jim Hall][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/jim-hall +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/sites/default/files/2023-03/10000000000003E8000003E8BE7DE71919BB0C82.jpg +[2]: https://opensource.com/sites/default/files/2023-03/100000010000028A0000028A0625B218857F031C.webp +[3]: https://opensource.com/sites/default/files/2023-03/100000000000079E00000514506C8EE5131D886A.webp +[4]: https://opensource.com/sites/default/files/2023-03/10000000000003E8000003E881402FB71F1945FF.jpg \ No newline at end of file From a17c814aeca72b6896a5a25f873fd85cd538bef1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 10 Apr 2023 08:59:11 +0800 Subject: [PATCH 313/318] translating --- ...️ 5 best practices for PatternFly, an open source design system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md b/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md index 964d874204..bcb0587191 100644 --- a/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md +++ b/sources/tech/20230407.1 ⭐️⭐️ 5 best practices for PatternFly, an open source design system.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/4/open-source-design-system-patternfly" [#]: author: "Abigael Donahue https://opensource.com/users/abigaeljamie" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From fd321351d21e7c5df69cf9d332c2ca1e23a6753a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 10 Apr 2023 11:49:42 +0800 Subject: [PATCH 314/318] RP @geekpi https://linux.cn/article-15708-1.html --- ...0 ⭐️ Open source tools for mind mapping.md | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) rename {translated/tech => published}/20230324.0 ⭐️ Open source tools for mind mapping.md (67%) diff --git a/translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md b/published/20230324.0 ⭐️ Open source tools for mind mapping.md similarity index 67% rename from translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md rename to published/20230324.0 ⭐️ Open source tools for mind mapping.md index 773ced8756..f554da0ae0 100644 --- a/translated/tech/20230324.0 ⭐️ Open source tools for mind mapping.md +++ b/published/20230324.0 ⭐️ Open source tools for mind mapping.md @@ -3,24 +3,28 @@ [#]: author: "Amrita https://opensource.com/users/amrita42" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15708-1.html" 开源思维导图工具 ====== +![][0] + +> 使用思维导图与开源工具来做一个有影响力的演示。 + 在今天的世界和社交媒体中,许多人没有耐心阅读冗长的文字内容。视觉效果是吸引受众注意力的好方法。 你知道吗,3M 公司的研究得出结论,视觉的处理速度是文字的 60,000 倍?视觉比文字更有冲击力,能增强创造性思维和记忆。 -### 一张图片胜过千言万语 +### 一图胜千言 -我看了一些常见的[Git命令][1]。我把 Git 命令作为主话题,每个子话题都是一个带有定义的 Git 命令语法。为此,我使用了 Wisemapping。 +我收集了一些常见的 [Git 命令][1]。我把 Git 命令作为主话题,每个子话题都是一个带有定义的 Git 命令语法。为此,我使用了 Wisemapping。 ![A git command mind map][2] -不管你以前是否知道[思维导图][3]是什么,现在你看到了思维导图,你就可以理解这个概念了。这就是视觉的力量。 +不管你以前是否知道 [思维导图][3] 是什么,现在你看到了思维导图,你就可以理解这个概念了。这就是视觉的力量。 ### 如何创建一个思维导图? @@ -36,10 +40,12 @@ - [Freeplane][5] - [Semantik][6] -维基百科对思维导图的定义是:将信息直观地组织成一个层次,显示整体中各部分之间的关系。思维导图从一个中心话题开始,然后建立起关系。它是一种结构化思想和创造有影响力的演示的视觉方式。 +维基百科对思维导图的定义是:将信息直观地组织成一个层次结构,显示整体中各部分之间的关系。思维导图从一个中心话题开始,然后建立起关系。它是一种结构化思想和创造有影响力的演示的视觉方式。 你可以在工作中使用思维导图。例如,我用思维导图来展示一个项目所计划的功能的高层概述。有了这些优秀的开源思维导图应用,你很容易就能开始将你的下一个项目可视化。试试用开源的思维导图吧。 +*(题图:MJ:Thinking Brainstorming Creativity Ideas Discussion Illustrations Blue Gold Simplicity)* + -------------------------------------------------------------------------------- via: https://opensource.com/article/23/3/open-source-mind-mapping @@ -47,7 +53,7 @@ via: https://opensource.com/article/23/3/open-source-mind-mapping 作者:[Amrita][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/) 荣誉推出 @@ -58,4 +64,5 @@ via: https://opensource.com/article/23/3/open-source-mind-mapping [3]: https://opensource.com/article/21/12/open-source-mind-mapping-drawio [4]: https://www.wisemapping.com/ [5]: https://opensource.com/article/19/1/productivity-tool-freeplane -[6]: https://waf.io/semantik.html \ No newline at end of file +[6]: https://waf.io/semantik.html +[0]: https://img.linux.net.cn/data/attachment/album/202304/10/114653pwq2z2md5mootf05.jpg \ No newline at end of file From 7202f55e3bc688d229aff35aafa203b10c99f0af Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 10 Apr 2023 16:45:17 +0800 Subject: [PATCH 315/318] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @mcfd https://linux.cn/article-15709-1.html 加油! --- ...Series 1 Create and Run Your First Rust Program.md | 125 +++++++----------- 1 file changed, 49 insertions(+), 76 deletions(-) rename {translated/tech => published}/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md (54%) diff --git a/translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md b/published/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md similarity index 54% rename from translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md rename to published/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md index 8467bdb2b6..2e6ce0e8ff 100644 --- a/translated/tech/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md +++ b/published/20230328.1 ⭐️⭐️ Rust Basics Series 1 Create and Run Your First Rust Program.md @@ -3,37 +3,39 @@ [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lkxed" [#]: translator: "mcfd" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15709-1.html" Rust 基础系列 #1: 创建并运行你的首个 Rust 程序 ====== -![][1] +![][0] -Rust 是被开发者和科技公司所采用最快的系统编程语言之一。它也被每天使用它的开发者评为**最受欢迎的编程语言**之一。其[已经][2]**[连续七年][2]**[受到这种欢迎了][2]! +> 在 Rust 编程系列的第一篇中,你将学习如何用 Rust 编写和执行你的第一个程序。 + +Rust 是最快风靡开发者和科技公司的系统编程语言之一。日常使用它的开发者将其评为**最受欢迎的编程语言**之一,而它 [已经连续七年获此殊荣了][2]! 它是如此的受欢迎,以致于现在有两股巨大的推力将其带入 Linux 生态系统中: -- 包括 [Rust 将作为 Linux 内核的第二支持语言][3] +- [将 Rust 作为 Linux 内核的二级支持语言][3] - System76 [正在使用 Rust 重写他们自己的桌面环境][4] -而这仅仅是在 Linux 生态系统中。安卓的蓝牙实现 [Gabeldorsche][5] 现在也是由 Rust 编写的。 +而这还仅仅是在 Linux 生态系统中。安卓上的蓝牙软件 [Gabeldorsche][5] 现在也是由 Rust 编写的。 -你是否看到了 Rust 的流行趋势?你大概率可能想学习使用 Rust 进行编程。 +你是否也看到了 Rust 的流行趋势?那么你或许也想学习使用 Rust 进行编程。 ### 为什么你要考虑 Rust 而不是其他编程语言? -首先,Rust 是一门 **类型安全的编程语言** 并且 **拥有极其严格的编译期检查**。因此,你首先会 “被迫” 写不出不安全的代码(好吧,通常)。 +首先,Rust 是一门 **类型安全的编程语言** 并且 **拥有极其严格的编译期检查**。因此,你首先会 “被迫” 写不出不安全的代码(好吧,通常是这样)。 -Rust 编程语言有以下 "目标": +Rust 编程语言有以下 “目标”: -- **性能**:Rust 的二进制文件和 C 语言的二进制文件一样快,有时甚至超过了 C++ 的二进制文件! +- **性能**:Rust 的二进制文件和 C 语言的二进制文件一样快,有时甚至超过了 C++ 的二进制文件! - **内存安全**:Rust 非常重视内存安全。 -- **并发**:对内存安全的关注消除了很多类似竞争的情况,并帮助你在程序中无畏并发。 +- **并发性**:对内存安全的关注消除了很多类似竞争的情况,并帮助你在程序中无畏并发。 -以下是在 C/C++ 等语言中可能犯的一些错误(但不是 Rust): +以下是在 C/C++ 等语言中可能犯的一些错误(但 Rust 不会): - 释放后使用 - 双重释放 @@ -43,9 +45,9 @@ Rust 编程语言有以下 "目标": - 使用未经初始化的变量 - 线程不安全的多线程 -看看 [Apple][6], [Microsoft][7], [Google][8], [0day][9] 等大公司因这类错误而引起的问题吧。 +看看 [苹果][6]、[微软][7]、[谷歌][8] 等大公司因这类 [0day][9] 错误而引起的问题吧。 -现在你可能知道了为什么要选择 Rust 语言而不是其他编程语言,让我们开始学习 Rust 语言的系列教程吧! +现在你可能知道了为什么要选择 Rust 语言而不是其他编程语言,让我们开始学习 Rust 语言的系列教程吧! ### 目标受众 @@ -58,7 +60,7 @@ Rust 编程语言有以下 "目标": ### 安装 Rust 工具链 我希望你能在本地安装 [Rust 工具链][10]。你可以通过运行以下命令来做到这一点: -(LCTT 译注:如果你使用 Linux 发行版,请不要直接安装软件源里的 Rust 工具链,尽管这样看起来很便捷) +(LCTT 译注:如果你使用 Linux 发行版,请不要直接安装软件源里的 Rust 工具链,尽管这样看起来很便捷。) ``` curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh @@ -72,21 +74,23 @@ curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh rustup component add rust-src rust-analyzer rust-analysis ``` -💡 +你还需要 [安装 gcc][14]。否则,你可能会遇到“链接器 `cc` 未找到”的错误。该软件包在不同的发行版中都被称为 gcc。 -如果你不希望在本地安装 Rust 工具链,不用担心。你还可以直接在你的浏览器中运行 Rust 代码!只要到 +在 Ubuntu 和 Debian 上使用: -[Rust Playgrounds website][12] +``` +sudo apt install gcc +``` - 并把所讨论的代码粘贴在此处。 +> 💡 如果你不希望在本地安装 Rust 工具链,不用担心。你还可以直接在你的浏览器中运行 Rust 代码!只要到 [Rust 试验场][12] 并把所讨论的代码粘贴在那里。 ### Hello Rust! -自从 Dennis Ritchie 和 Brian Kernighan 用 "Hello world" 程序介绍了 C 语言后,在 UNIX 世界里,对你学习的任何新的编程语言都要这样做,这已经成为一种习惯。 +自从 丹尼斯·里奇Dennis Ritchie布莱恩・柯林汉Brian Kernighan 用 “Hello World” 程序介绍了 C 语言后,在 UNIX 世界里,你学习的任何新编程语言第一步都这样做,这已经成为一种习惯。 因此,让我们也用 Rust 编写我们的 Hello World 程序。 -我将在我的家目录里[新建一个项目目录][13]叫做 `learn-rust-its-foss`。然后,在这里我将新建一个叫 `hello-world` 的目录。最后,在里面新建 `main.rs` 文件: +我将在我的家目录里 [新建一个项目目录][13] 叫做 `learn-rust-its-foss`。然后,在这里我将新建一个叫 `hello-world` 的目录。最后,在里面新建 `main.rs` 文件: ``` // 这串代码将打印字符 @@ -97,37 +101,11 @@ fn main() { } ``` -📋 - -就像 C、C++ 和 Java 源代码文件的扩展名是 - -``` -.c -``` - -、 - -``` -.cpp -``` - - 和 - -``` -.java -``` - - Rust 的源文件扩展名是 - -``` -.rs -``` - - 文件扩展名 +> 📋 就像 C、C++ 和 Java 源代码文件相应的扩展名是 `.c`、`.cpp` 和 `.java`,Rust 的源文件扩展名是 `.rs`。 作为一个 C/C++ 程序员,你可能已经在 [Linux 上使用 GCC][14],在 macOS 上使用 `Clang`,在 Windows 上使用 MSVC。但是为了编译 Rust 代码,该语言的创造者自己提供了一个官方的 `rustc` 编译器。 -运行 Rust 程序和[执行 C/C++ 程序][15]是一样的。你首先编译代码,然后得到可执行文件,最后再运行这个可执行文件从而来运行代码。 +运行 Rust 程序和 [执行 C/C++ 程序][15] 是一样的。你首先编译代码,然后得到可执行文件,最后再运行这个可执行文件从而来运行代码。 ``` $ ls @@ -142,55 +120,47 @@ $ ./main Hello world! ``` -很好! +很好! -### 破译 Rust 代码 +### 解读 Rust 代码 -现在你已经编写、编译并运行了你的第一个 Rust 程序,让我们对 "Hello world" 的代码进行解构并理解每一部分。 +现在你已经编写、编译并运行了你的第一个 Rust 程序,让我们对 “Hello World” 的代码进行解读,并理解每一部分。 ``` fn main() { } ``` -`fn` 关键字是用来在 Rust 中声明一个函数的。在它后面 `main` 是这个被声明函数的名字。像许多编译型编程语言一样,`main` 是一个特殊的函数,用来作为你的程序的入口。 +`fn` 关键字用来在 Rust 中声明一个函数。在它后面 `main` 是这个被声明函数的名字。像许多编译型编程语言一样,`main` 是一个特殊的函数,用来作为你的程序的入口。 -任何写在 `main` 函数里的代码(在大括号 `{``}` 中)将在程序被启动时运行。 +任何写在 `main` 函数里的代码(在大括号 `{` `}` 之间)将在程序被启动时运行。 #### println 宏 -在 `main` 函数中, 有一个语句(LCTT 译注:语句 区别于 表达式): +在 `main` 函数中, 有一个语句(LCTT 译注:“语句” 区别于 “表达式”): ``` println!("Hello world!"); ``` -就像C语言的标准库有 `printf` 函数一样,Rust语言的标准库有 `println` **macro**。宏类似于函数,但它以**感叹号**来区分。你将在本系列的后面学习宏和函数的知识。 +就像 C 语言的标准库有 `printf` 函数一样,Rust 语言的标准库有 `println` **宏**。宏类似于函数,但它以**感叹号**(`!`)来区分。你将在本系列的后面学习宏和函数的知识。 -`println` 宏接收一个格式化的字符串,并把它放到程序的标准输出中(在我们的例子中,就是终端)。由于我希望输出一些文本而不是一个变量,我将把文本放在双引号(`"`)内。最后,我用一个分号来结束这个语句,表示语句的结束。 +`println` 宏接收一个格式化的字符串,并把它放到程序的标准输出中(在我们的例子中,就是终端)。由于我希望输出一些文本而不是一个变量,我将把文本放在双引号(`"`)内。最后,我用一个分号来结束这个语句,表示语句的结束。 -📋 - -你只需知道,任何看起来像函数调用但有感叹号的东西 - -``` -! -``` - -就是 Rust 编程语言中的一个宏。 +> 📋 你只需知道,任何看起来像函数调用但在开头括号前有感叹号的东西,就是 Rust 编程语言中的一个宏。 #### 注释 -Rust 遵循已知的 C 编程语言的注释风格。单行注释以两个正斜杠(`//`)开始,多行注释以 `/*` 开始,以 `*/` 结束。 +Rust 遵循已知的 C 编程语言的注释风格。单行注释以两个正斜杠(`//`)开始,多行注释以 `/*` 开始,以 `*/` 结束。 ``` -// this is a multi-line comment -// but nothing stops me to doing the same -// on the second or third line too! +// 这是一个多行注释 +// 但是没有什么阻止你在 +// 第二行或第三行也这样写 /* - * this is a "true" mutli-line comment - * because it is _fancy_ + * 这是一个“真•多行注释” + * 它看起来比较漂亮 */ ``` @@ -198,9 +168,11 @@ Rust 遵循已知的 C 编程语言的注释风格。单行注释以两个正斜 你刚刚通过 Hello World 程序迈出了用 Rust 写代码的第一步。 -作为一种练习,也许你可以编写并执行一个打印出 "Yes! I did Rust" 的 Rust 程序。 +作为一种练习,也许你可以编写并执行一个打印出 `Yes! I did Rust` 的 Rust 程序。 -在本系列的下一部分中,你将学习在 Rust 程序中使用变量。敬请期待! +在本系列的下一部分中,你将学习在 Rust 程序中使用变量。敬请期待! + +*(题图:MJ:computer sci-fi ,code secure ,"rust" ,gold blue slive ,background dark, high resolution super detailed)* -------------------------------------------------------------------------------- @@ -209,7 +181,7 @@ via: https://itsfoss.com/rust-introduction/ 作者:[Pratham Patel][a] 选题:[lkxed][b] 译者:[mcfd](https://github.com/mcfd) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -230,3 +202,4 @@ via: https://itsfoss.com/rust-introduction/ [13]: https://itsfoss.com/make-directories/ [14]: https://learnubuntu.com/install-gcc/?ref=itsfoss.com [15]: https://itsfoss.com/run-c-program-linux/ +[0]: https://img.linux.net.cn/data/attachment/album/202304/10/164143yksc0b56bbs0itiu.jpg \ No newline at end of file From bbc6846cf4f4d0384f363488158f4198384b4adc Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Mon, 10 Apr 2023 21:18:48 +0800 Subject: [PATCH 316/318] Update and rename sources/tech/20220813 Level up your HTML document with CSS.md to translated/tech/20220813 Level up your HTML document with CSS.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Translated by XiaotingHuang22. 辛苦审核啦! --- ...13 Level up your HTML document with CSS.md | 280 ------------------ ...13 Level up your HTML document with CSS.md | 270 +++++++++++++++++ 2 files changed, 270 insertions(+), 280 deletions(-) delete mode 100644 sources/tech/20220813 Level up your HTML document with CSS.md create mode 100644 translated/tech/20220813 Level up your HTML document with CSS.md diff --git a/sources/tech/20220813 Level up your HTML document with CSS.md b/sources/tech/20220813 Level up your HTML document with CSS.md deleted file mode 100644 index dcc57ba2ed..0000000000 --- a/sources/tech/20220813 Level up your HTML document with CSS.md +++ /dev/null @@ -1,280 +0,0 @@ -[#]: subject: "Level up your HTML document with CSS" -[#]: via: "https://opensource.com/article/22/8/css-html-project-documentation" -[#]: author: "Jim Hall https://opensource.com/users/jim-hall" -[#]: collector: "lkxed" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Level up your HTML document with CSS -====== -Use CSS to bring style to your HTML project documentation. - -When you write documentation, whether that's for an open source project or a technical writing project, you should have two goals: The document should be written well, and the document should be easy to read. The first is addressed by clear writing skills and technical editing. The second can be addressed with a few simple changes to an HTML document. - -HyperText Markup Language, or HTML, is the backbone of the internet. Since the dawn of the "World Wide Web" in 1994, every web browser uses HTML to display documents and websites. And for almost as long, HTML has supported the *stylesheet*, a special addition to an HTML document that defines how the text should appear on the screen. - -You can write project documentation in plain HTML, and that gets the job done. However, plain HTML styling may feel a little spartan. Instead, try adding a few simple styles to an HTML document to add a little pizzazz to documentation, and make your documents clearer and easier to read. - -### Defining an HTML document - -Let's start with a plain HTML document and explore how to add styles to it. An empty HTML document contains the definition at the top, followed by an block to define the document itself. Within the element, you also need to include a document header that contains metadata about the document, such as its title. The contents of the document body go inside a block within the parent block. - -You can define a blank page with this HTML code: - -``` - - -  -    This is a new document -  -  - -  - -``` - -In another article about [Writing project documentation in HTML][2], I updated a Readme file from an open source board game from plain text to an HTML document, using a few basic HTML tags like

and

for heading and subheadings,

for paragraphs, and and for bold and italic text. Let's pick up where we left off with that article: - -``` - - -  -    Simple Senet -  -  -   

Simple Senet

-   

How to Play

-    -   

The game will automatically "throw" the throwing sticks -    for you, and display the results in the lower-right corner -    of the screen.

-    -   

If the "throw" is zero, then you lose your turn.

-    -   

When it's your turn, the game will automatically select -    your first piece on the board. You may or may not be -    able to make a move with this piece, so select your piece -    to move, and hit Space (or Enter) to move -    it. You can select using several different methods:

-    -   
    -     
  • Up/down/left/right to -      navigate to a specific square.
  • -    -     
  • Plus (+) or minus (-) to navigate "left" -      and "right" on the board. Note that this will automatically -      follow the "backwards S" shape of the board.
  • -    -     
  • Tab to select your next piece on the -      board.
  • -   
-    -   

To quit the game at any time, press Q (uppercase -    Q) or hit Esc, and the game will prompt if you want -    to forfeit the game.

-    -   

You win if you move all of your pieces off the board -    before your opponent. It takes a combination of luck and -    strategy!

-  - -``` - -This HTML document demonstrates a few common block and inline elements used by technical writers who write with HTML. Block elements define a rectangle around text. Paragraphs and headings are examples of block elements, because they extend from the left to the right edges of the document. For example,

encloses an invisible rectangle around a paragraph. In contrast, inline elements follow the text where they are used. If you use on some text within a paragraph, only the text surrounded by and becomes bold. - -You can apply direct styling to this document to change the font, colors, and other text styles, but a more efficient way to modify the document's appearance is to apply a *stylesheet* to the document itself. You can do that in the element, with other metadata. You can reference a file for the style sheet, but for this example, use a -  -  -    ... -  - -``` - -### Defining styles - -Since you're just starting to learn about stylesheets, let's demonstrate a basic style: background color. I like to start with the background color because it helps to demonstrate block and inline elements. Let's apply a somewhat gaudy stylesheet that sets a *light blue* background color for all

paragraphs, and a *light green* background for the

    unordered list. Use a *yellow* background for any bold text, and a *pink* background for any italics text. - -You define these using styles in the -``` - -Note that each style ends with a semicolon. - -If you view this HTML document in a web browser, you can see how the

    and

      block elements are filled in as rectangles, and the and inline elements highlight only the bold and italics text. This use of contrasting colors may not be pretty to look at, but I think you can see the block and inline elements: - -![My eyes! But the colors do help us see block and inline elements.][3] - -### Applying styles - -You can use styles to make this Readme document easier to read. You're just starting to learn about styles, you'll stick to a few simple style elements: - -* background-color to set the background color -* color to set the text color -* font-family to use a different text font -* margin-top to add space above an element -* margin-bottom to add space below an element -* text-align to change how the text is displayed, such as to the left, to the right, or centered - -Let's start over with your stylesheet and apply these new styles to your document. To begin, use a more pleasing font for your document. If your HTML document does not specify a font, the web browser picks one for you. Depending on how the browser is set up, this could be a *serif* font, like the font used in my screenshot, or a *sans-serif* font. Serif fonts have a small stroke added to each letter, which makes these fonts much easier to read in print. Sans-serif fonts lack this extra stroke, which makes text appear sharper on a computer display. Common serif fonts include Garamond or Times New Roman. Popular sans-serif fonts include Roboto and Arial. - -For example, to set the document body font to Roboto, use this style: - -``` -body { font-family: Roboto; } -``` - -By setting a font, you assume the person viewing your document also has that font installed. Some fonts have become so common they are considered de facto "Web safe" fonts. These include sans-serif fonts like Arial and serif fonts such as Times New Roman. Roboto is a newer font and may not be available everywhere. So instead of listing just one font, web designers usually put one or more "backup" fonts. You can add these alternative fonts by separating them with a comma. For example, if the user doesn't have the Roboto font on their system, you can instead use Arial for the text body by using this style definition: - -``` -body { font-family: Roboto, Arial; } -``` - -All web browsers define a default serif and sans-serif font that you can reference with those names. Users can change which font they prefer to use for serif and sans-serif, so aren't likely to be the same for everyone, but using serif or sans-serif in a font list is usually a good idea. By adding that font, at least the user gets some approximation of how you want the HTML document to appear: - -``` -body { font-family: Roboto, Arial, sans-serif; } -``` - -If your font name is more than one word, you have to put quotes around it. HTML allows you to use either single quotes or double quotes here. Define a few serif fonts for the heading and subheading, including Times New Roman: - -``` -h1 { font-family: "Times New Roman", Garamond, serif; } -h2 { font-family: "Times New Roman", Garamond, serif; } -``` - -Note that the h1 heading and h2 subheading use exactly the same font definition. If you want to avoid the extra typing, you can use a stylesheet shortcut to use the same style definition for both h1 and h2: - -``` -h1, h2 { font-family: "Times New Roman", Garamond, serif; } -``` - -When writing documentation, many technical writers prefer to center the main title on the page. You can use text-align on a block element, such as the h1 heading, to center just the title: - -``` -h1 { text-align: center; } -``` - -To help bold and italics text to stand out, put them in a slightly different color. For certain documents, I might use *dark blue* for bold text, and *dark green* for italics text. These are pretty close to black, but with just enough subtle difference that the color grabs the reader's attention. - -``` -b { color: darkblue; } -i { color: darkgreen; } -``` - -Finally, I prefer to add extra spacing around my list elements, to make these easier to read. If each list item was only a few words, the extra space might not matter. But the middle item  in my example text is quite long and wraps to a second line. The extra space helps the reader see each item in this list more clearly. You can use the margin style to add space above and below a block element: - -``` -li { margin-top: 10px; margin-bottom: 10px; } -``` - -This style defines a distance, which I've indicated here as 10px (ten *pixels*) above and below each list element. You can use several different measures for distance. Ten pixels is literally the space of ten pixels on your screen, whether that's a desktop monitor, a laptop display, or a phone or tablet screen. - -Assuming you really just want to add an extra blank line between the list elements, you can also use em for my measurement. An *em* is an old typesetting term that is exactly the width of capital **M** if you refer to left and right spacing, or the height of a capital **M** for vertical spacing. So you can instead write the margin style using 1em: - -``` -li { margin-top: 1em; margin-bottom: 1em; } -``` - -The complete list of styles in your HTML document looks like this: - -``` - - -  -    Simple Senet -    -  -  -   

      Simple Senet

      -   

      How to Play

      -    -   

      The game will automatically "throw" the throwing sticks -    for you, and display the results in the lower-right corner -    of the screen.

      -    -   

      If the "throw" is zero, then you lose your turn.

      -    -   

      When it's your turn, the game will automatically select -    your first piece on the board. You may or may not be -    able to make a move with this piece, so select your piece -    to move, and hit Space (or Enter) to move -    it. You can select using several different methods:

      -    -   
        -     
      • Up/down/left/right to -      navigate to a specific square.
      • -    -     
      • Plus (+) or minus (-) to navigate "left" -      and "right" on the board. Note that this will automatically -      follow the "backwards S" shape of the board.
      • -    -     
      • Tab to select your next piece on the -      board.
      • -   
      -    -   

      To quit the game at any time, press Q (uppercase -    Q) or hit Esc, and the game will prompt if you want -    to forfeit the game.

      -    -   

      You win if you move all of your pieces off the board -    before your opponent. It takes a combination of luck and -    strategy!

      -  - -``` - -When viewed on a web browser, you see your Readme document in a sans-serif font, with serif fonts for the heading and subheading. The page title is centered. The bold and italics text use a slightly different color that calls the reader's attention without being distracting. Finally, your list items have extra space around them, making each item easier to read. - -![By adding a few styles, we've made this Readme much easier to read.][4] - -This is a simple introduction to using styles in technical writing. Having mastered the basics, you might be interested in [Mozilla's HTML Guide][5]. This includes some great beginner's tutorials so you can learn how to create your own web pages. - -For more information on how CSS styling works, I recommend [Mozilla's CSS Guide][6]. - -Image by: (Jim Hall, CC BY-SA 4.0) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/8/css-html-project-documentation - -作者:[Jim Hall][a] -选题:[lkxed][b] -译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/painting_computer_screen_art_design_creative.png -[2]: https://opensource.com/article/22/8/writing-project-documentation-html -[3]: https://opensource.com/sites/default/files/2022-08/style-html-1.png -[4]: https://opensource.com/sites/default/files/2022-08/style-html-2.png -[5]: https://developer.mozilla.org/en-US/docs/Web/HTML -[6]: https://developer.mozilla.org/en-US/docs/Web/CSS diff --git a/translated/tech/20220813 Level up your HTML document with CSS.md b/translated/tech/20220813 Level up your HTML document with CSS.md new file mode 100644 index 0000000000..455ea5497c --- /dev/null +++ b/translated/tech/20220813 Level up your HTML document with CSS.md @@ -0,0 +1,270 @@ +[#]: subject: "Level up your HTML document with CSS" +[#]: via: "https://opensource.com/article/22/8/css-html-project-documentation" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +让 CSS 升级你的 HTML 文档 +====== +使用 CSS 让你的 HTML 项目更具风格。 + +当你编写文档时,无论是为开源项目还是技术写作项目,你都应该有两个目标:文档应该写得好,同时要易于阅读。 前者通过清晰的写作技巧和技术编辑来解决。第二个目标可以通过对 HTML 文档进行一些简单的更改来解决。 + +超文本标记语言或 HTML 是互联网的支柱。 自 1994 年“万维网”问世以来,所有网络浏览器都使用 HTML 来显示文档和网站。 几乎与此同时,HTML 一直支持 *stylesheet*,它是对 HTML 文档的一种特殊添加,用于定义文本在屏幕上的呈现方式。 + +单纯用 HTML 编写项目文档你也可以完成工作。 然而,纯 HTML 样式可能感觉有点简陋。 因此,尝试向 HTML 文档添加一些简单的样式,为文档添加一点活力,并使文档更清晰、更易于阅读。 + +### 定义一个 HTML 文档 + +让我们从一个纯 HTML 文档开始,探索如何向其添加样式。 一个空的 HTML 文档在顶部包含 定义,后面跟着一个 块来定义文档本身。 在 元素中,你还需要加上一个文档标头,其中包含有关文档的元数据,例如标题。 文档正文的内容放在父 块内的 块中。 + +你可以使用以下 HTML 代码定义一个空白页面: + +``` + + +  + 这是一个新文档 +  +  + +  + +``` + +在另一篇关于[用 HTML 编写项目文档][2] 的文章中,我将一个开源棋盘游戏的自述文件从纯文本更新为 HTML 文档,并使用一些基本的 HTML 标记,如

      作为标题和副标题,

      用于段落, 用于粗体和斜体文本。 让我们从那篇文章结束的地方继续讲: + +``` + + +  + 简易 Senet +  +  +

      简易 Senet

      +

      游戏玩法

      +    +   

      游戏会自动为你“投掷”投掷棒,并在屏幕右下角显示结果。

      +    +

      如果“投掷”结果为零,你失去本轮机会。

      +    +   

      轮到你的时候,游戏会自动选择 + 你在棋盘上的第一块棋子。 你不一定 + 能够用这个棋子走棋,所以选择你的棋子 + 移动,然后按 Space(或 Enter)移动 + 它。 你可以通过几种不同的方法进行选择:

      +    +   
        +
      • 向上/向下/向左/向右 to + 朝特定方块移动。
      • +    +
      • 加号 (+) 或减号 (-) 使棋子在棋盘上向“左”或向“右”移动。 + 请注意,它们会自动遵循棋盘的“倒过来的 S”方向移动。
      • +    +
      • Tab在棋盘上选择下一个你想要移动的棋子。
      • +   
      +    +

      要随时退出游戏,请按 Q(大写 + Q)或按 Esc,这样游戏会提示你是否想要 + 放弃比赛。

      +    +   

      如果你比对手更快将所有棋子移出棋盘,你就赢得了比赛。 + 这同时需要运气和游戏策略!

      +  + +``` + +此 HTML 文档演示了利用 HTML 的技术写作者经常使用的一些块和内联元素。 块元素在围绕文本定义一个矩形。 段落和标题是块元素的示例,因为它们从文档的左边缘延伸到右边缘。 例如,

      在段落周围包含一个不可见的矩形。 相比之下,内联元素的使用则紧跟在它们包围的文本。 如果你在段落中的某些文本上使用 ,则只有被 包围的文本会变为粗体。 + +You can apply direct styling to this document to change the font, colors, and other text styles, but a more efficient way to modify the document's appearance is to apply a *stylesheet* to the document itself. You can do that in the element, with other metadata. You can reference a file for the style sheet, but for this example, use a +  +  +    ... +  + +``` + +### 定义样式 + +由于你刚刚开始学习样式表,因此这里先演示一种基本样式:背景色。 我喜欢从背景颜色开始,因为它有助于演示块和内联元素。 让我们应用一个有点华丽的样式表,为所有

      段落设置*浅蓝色*背景颜色,为

        无序列表设置*浅绿色*背景。 对任何粗体文本使用*黄色*背景,对任何斜体文本使用*粉红色*背景。 + +你可以在 HTML 文档的 +``` + +请注意,每个样式都以分号结尾。 + +如果在网页浏览器中查看此 HTML 文档,你可以看到

          块元素如何填充为矩形,而 内联元素仅突出显示粗体和斜体文本。 这种对比色的使用可能看起来不太好看,但我想你可以清楚看到块和内联元素: + +![辣眼睛!但是这些颜色确实能帮助我么更好地看出块和內联元素的区别。][3] + +### 应用样式 + +你可以使用样式使这个自述文件更易于阅读。 因为你刚刚开始学习样式,还是先只用一些简单的样式元素: + +* background-color 设置背景颜色 +* color 设置文字颜色 +* font-family 使用不同的文本字体 +* margin-top 在元素上方添加空间 +* margin-bottom 在元素下方添加空间 +* text-align 改变文本的显示方式,例如靠左、靠右或居中 + +让我们重新开始你的样式表并将这些新样式应用到文档中。 首先,在文档中使用更令人愉悦的字体。 如果你的 HTML 文档没有指定字体,网络浏览器会为你选择一种。 根据浏览器的设置方式,这可能是 *serif* 字体(如我的屏幕截图中使用的字体)或 *sans-serif* 字体。 Serif 字体在每个字母上添加了一个小笔画,这样在打印时更容易阅读。 Sans-serif 字体缺少这种额外的笔划,这使得文本在计算机显示器上显得更清晰。 常见的衬线字体包括 Garamond 或 Times New Roman。 流行的无衬线字体包括 Roboto 和 Arial。 + +例如,要将文档正文字体设置为 Roboto,你可以使用以下样式: + +``` +body { font-family: Roboto; } +``` + +通过设置字体,你假设查看文档的人也安装了该字体。 有些字体已经十分常见,以至于它们被认为是事实上的“网页安全”字体。 这些字体包括 Arial 等无衬线字体和 Times New Roman 等衬线字体。 Roboto 是一种较新的字体,可能还无法随处可用。 因此,网页设计师通常不会只列出一种字体,而是设置一种或多种“备用”字体。 你可以通过用逗号分隔来添加这些替代字体。 例如,如果用户的系统上没有 Roboto 字体,你可以使用以下样式定义将 Arial 字体用作文本正文: + +``` +body { font-family: Roboto, Arial; } +``` + +所有网络浏览器都定义了默认的衬线和无衬线字体,你可以使用这些名称来引用它们。 用户可以更改他们喜欢用于 serif 和 sans-serif 的字体,因此不太可能对每个人都一样,但在字体列表中使用 serif 或 sans-serif 通常是个好主意。 通过添加该字体,至少用户可以大致了解你希望 HTML 文档的呈现方式: + +``` +body { font-family: Roboto, Arial, sans-serif; } +``` + +如果字体名称不止一个单词,则你必须在其两边加上引号。 HTML 允许你在此处使用单引号或双引号。 为标题和副标题定义一些衬线字体,包括 Times New Roman: + +``` +h1 { font-family: "Times New Roman", Garamond, serif; } +h2 { font-family: "Times New Roman", Garamond, serif; } +``` + +请注意,h1 标题和 h2 副标题使用完全相同的字体定义。 如果你想避免无谓的打字,可以使用样式表快捷方式为 h1 和 h2 使用相同的样式定义: + +``` +h1, h2 { font-family: "Times New Roman", Garamond, serif; } +``` + +在编写文档时,许多技术作者更喜欢将主标题放在页面的中央。 您可以在块元素(例如 h1 标题)上使用 text-align 来使标题居中: + +``` +h1 { text-align: center; } +``` + +为了让粗体和斜体文本更突出,请将它们置于稍微不同的颜色中。 对于某些文档,我可能会使用 *dark blue* 表示粗体文本,使用 *dark green* 表示斜体文本。 这些颜色非常接近黑色,但颜色的细微差别足以吸引读者的注意力。 + +``` +b { color: darkblue; } +i { color: darkgreen; } +``` + +最后,我更喜欢在我的列表元素周围添加额外的间距,以使它们更易于阅读。 如果每个列表项只有几个词,额外的空间可能无关紧要。 但是我的示例文本中的中间项很长,可以换到第二行。 额外的空间有助于读者更清楚地看到此列表中的每个项目。 你可以使用边距样式在块元素上方和下方添加空间: + +``` +li { margin-top: 10px; margin-bottom: 10px; } +``` + +这种样式定义了一个距离,此处我将其指定为每个列表元素上方和下方的 10px(十个*像素*)。 你可以使用多种不同的距离度量。 十像素实际上就是屏幕上十个像素的空间,无论是台式机显示器、笔记本电脑显示屏,还是手机或平板电脑屏幕。 + +假设你真的只是想在列表元素之间添加一个额外的空行,你也可以使用 em 来测量。 *em* 是一个旧的排版术语,如果你指的是左右间距,它就是大写 **M** 的宽度,或者对于垂直间距,就是大写 **M** 的高度。 所以你可以改用 1em 来写边距样式: + +``` +li { margin-top: 1em; margin-bottom: 1em; } +``` + +HTML 文档中的完整样式列表如下所示: + +``` + + +  + 简易 Senet +    +  +  +

          简易 Senet

          +

          游戏玩法

          +    +

          游戏会自动为你“投掷”投掷棒,并在屏幕右下角显示结果。

          +    +

          如果“投掷”结果为零,你失去本轮机会。

          +    +   

          轮到你的时候,游戏会自动选择 + 你在棋盘上的第一块棋子。 你不一定 + 能够用这个棋子走棋。所以选择你的棋子 + 移动,然后按 Space(或 Enter)移动 + 它。 你可以通过几种不同的方法进行选择:

          +    +   
            +
          • 向上/向下/向左/向右 to + 朝特定方块移动。
          • +    +
          • 加号 (+) 或减号 (-) 使棋子在棋盘上向“左”或向“右”移动。 + 请注意,它们会自动遵循棋盘的“倒过来的 S”方向移动。
          • +    +
          • Tab在棋盘上选择下一个你想要移动的棋子。
          • +   
          +    +

          要随时退出游戏,请按 Q(大写 + Q)或按 Esc,这样游戏会提示你是否想要 + 放弃比赛。

          +    +   

          如果你比对手更快将所有棋子移出棋盘,你就赢得了比赛。 + 这同时需要运气和游戏策略!

          +  + +``` + +在网页浏览器上查看时,你会看到采用无衬线字体的自述文件,标题和副标题使用衬线字体。 页面标题居中。 粗体和斜体文本使用略有不同的颜色来吸引读者的注意力而不会分散注意力。 最后,列表项周围有额外的空间,使每个项目更易于阅读。 + +![通过添加一些样式,我们使这个自述文件更易于阅读。][4] + +这是在技术写作中使用样式的简单介绍。 掌握了基础知识后,你可能会对 [Mozilla 的 HTML 指南][5] 感兴趣。 它包括一些很棒的初学者教程,因此你可以学习如何创建自己的网页。 + +有关 CSS 样式的更多信息,我推荐 [Mozilla 的 CSS 指南][6]。 + +图片来自: (Jim Hall, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/css-html-project-documentation + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/painting_computer_screen_art_design_creative.png +[2]: https://opensource.com/article/22/8/writing-project-documentation-html +[3]: https://opensource.com/sites/default/files/2022-08/style-html-1.png +[4]: https://opensource.com/sites/default/files/2022-08/style-html-2.png +[5]: https://developer.mozilla.org/en-US/docs/Web/HTML +[6]: https://developer.mozilla.org/en-US/docs/Web/CSS From 908810cb163e1ba2b74ca56c078e2cdcff78337f Mon Sep 17 00:00:00 2001 From: Drwhooooo <90264412+Drwhooooo@users.noreply.github.com> Date: Tue, 11 Apr 2023 03:23:21 +0800 Subject: [PATCH 317/318] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=AF=91=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 译员ID : Drwhooooo --- ...-sent events- a simple way to stream events from a server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210112 Server-sent events- a simple way to stream events from a server.md b/sources/tech/20210112 Server-sent events- a simple way to stream events from a server.md index 0bdbe4267f..b2120c0f84 100644 --- a/sources/tech/20210112 Server-sent events- a simple way to stream events from a server.md +++ b/sources/tech/20210112 Server-sent events- a simple way to stream events from a server.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Drwhooooo) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b927ea205b267364b930cb70f2124663b3f22b6c Mon Sep 17 00:00:00 2001 From: Drwhooooo <90264412+Drwhooooo@users.noreply.github.com> Date: Tue, 11 Apr 2023 08:09:13 +0800 Subject: [PATCH 318/318] =?UTF-8?q?=E8=AF=91=E6=96=87=E6=8F=90=E4=BA=A4=20?= =?UTF-8?q?-=20=E2=80=9C=E4=B8=80=E4=B8=AA=E6=9B=B4=E5=A5=BD=E7=9A=84?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=A0=81=E5=A4=B4=E2=80=9D=EF=BC=88An=20even?= =?UTF-8?q?=20Better=20Video=20Wharf=EF=BC=89=20(#29086)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 申请翻译 ID: Drwhooooo 时间:2023/4/6 - 15:30 * 译文提交 - “一个更好的视频码头”(An Even Better Video Wharf) 译者ID : Drwhooooo * 译文提交 - “一个更好的视频码头”(An Even Better Video Wharf) 译者ID : Drwhooooo * Rename 目标语言/技术/20210111 an even better video wharf.md to translated/tech/20210111 an even better video wharf.md --------- Co-authored-by: Xingyu.Wang --- .../20210111 an even better video wharf.md | 121 ------------------ .../20210111 an even better video wharf.md | 121 ++++++++++++++++++ 2 files changed, 121 insertions(+), 121 deletions(-) delete mode 100644 sources/tech/20210111 an even better video wharf.md create mode 100644 translated/tech/20210111 an even better video wharf.md diff --git a/sources/tech/20210111 an even better video wharf.md b/sources/tech/20210111 an even better video wharf.md deleted file mode 100644 index e49835c6e2..0000000000 --- a/sources/tech/20210111 an even better video wharf.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: subject: "an even better video wharf" -[#]: via: "https://jao.io/blog/2021-01-11-an-even-better-video-wharf.html" -[#]: author: "jao https://jao.io" -[#]: collector: "lujun9972" -[#]: translator: "Drwhooooo" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -an even better video wharf -====== - -A couple of days ago, [i was writing][1] about [embark][2] and my first experiment defining a new embarking to play remote video streams. Omar Antolín Camarena, embark's author, has been kind enough to not only read it, but comment on a couple of significant improvements that i think well deserve this follow-up. - -First, you'll remember that we were defining a function to detect a video URL: - -``` - - (defun jao-video-finder () - "Check whether we're looking at a video URL. - Return (video-url . ) if so." - (when-let ((url (thing-at-point-url-at-point))) - (when (string-match-p jao-video-url-rx url) - (cons 'video-url url)))) - -``` - -Once we've got a non-null `url` value, even if it's not a video URL, it's still certainly a URL, and embark has a `url` category, so we could save a new parsing by the default URL finder by saying: - -``` - - (when-let ((url (thing-at-point-url-at-point))) - (cons (if (string-match-p jao-video-url-rx url) 'video-url 'url) url)) - -``` - -This has the potential drawback that we're overriding embark's finder, `embark-target-url-at-point`, and we might prefer to keep the latter. - -Turns out that we can do that thanks to embark's _target transformers_. One can add to `embark-transformers-alist` an arbitrary function to be applied to a target of any given category, and embark will apply its actions to the transformed value. Omar calls this process, very aptly, a refinement of the target; here's how we would do it: - -``` - - (defun jao-refine-url-type (url) - "Refine type of URL in case it is a video." - (cons (if (string-match-p jao-video-url-rx url) 'video-url 'url) url)) - - (add-to-list 'embark-transformer-alist '(url . jao-refine-url-type)) - -``` - -With this strategy, we don't need `jao-video-finder` at all, and it also makes lots of sense, conceptually, to have our `video-url` defined as a refinement rather than a new target[1][3]. Omar's second suggestion is also in line with this concept: surely we want all actions available for `url` also for our `video-url`, don't we? Well, that's exactly the reason why the `embark-define-keymap` macro we used to define our actions can inherit all the actions already defined in another keymap, using the `:parent` keyword[2][4]: - -``` - - (embark-define-keymap jao-video-url-map - "Actions on URLs pointing to remote video streams." - :parent embark-url-map - ("p" jao-play-video-url)) - - (add-to-list 'embark-keymap-alist '(video-url . jao-video-url-map)) - -``` - -It is worth noting that this ability to inherit a keymap is not really an embark add-on: vanilla Emacs keymaps already have it, via the standard function `set-keymap-parent`. You could actually define `jao-video-url-map` without using `embark-define-keymap` at all, and it'd work exactly the same. - -So, our code has become shorter and more featureful: thanks, Omar! - -### Footnotes: - -[1][5] - -There's a scenario where keeping jao-video-finder could make sense, namely, if we want to alter the URL detection function. For instance, i use emacs-w3m, and there often a URL is stored as a text property (the actual text being the link text). To retrieve the URL at point there, one needs to call `w3m-anchor`, and `embark-target-url-at-point` will miss it. For that scenario, i ended up writing (and using) `jao-video-finder` defined with: - -``` - - (when-let ((url (or (w3m-anchor) (thing-at-point-url-at-point)))) - (cons (if (string-match-p jao-video-url-rx url) 'video-url 'url) url)) - -``` - -Another way of accomplishing the same thing (with another tip of the hat to Omar) would be to add a specific finder for w3m anchors (and keep using the transformer for video-url): - -``` - - (defun jao-w3m-url-finder () - (when-let ((url (w3m-anchor))) - (cons 'url url))) - - (add-to-list 'embark-target-finders #'jao-w3m-url-finder) - -``` - -This way is more modular and, depending on your taste, more elegant. These functions are small and there's not a big difference between the two approaches, but if one keeps adding finders, things can easily get uglier with the former approach. - -[2][6] - -In my original example, i was adding also `browse-url` and `browse-url-firefox` to the video map. The former is no longer necessary, because it's already present in `embark-url-map`. If we wanted to make `browse-url-firefox` available to _all_ URLs, we could add it to `embark-url-map` (remember, embark's keymaps are just Emacs keymaps). That's yet another simple way of extending embark. - -[Tags][7]: [emacs][8] - --------------------------------------------------------------------------------- - -via: https://jao.io/blog/2021-01-11-an-even-better-video-wharf.html - -作者:[jao][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://jao.io -[b]: https://github.com/lujun9972 -[1]: https://jao.io/blog/2021-01-09-embarking-videos.html -[2]: https://github.com/oantolin/embark -[3]: tmp.VUqMT3Yft2#fn.1 -[4]: tmp.VUqMT3Yft2#fn.2 -[5]: tmp.VUqMT3Yft2#fnr.1 -[6]: tmp.VUqMT3Yft2#fnr.2 -[7]: https://jao.io/blog/tags.html -[8]: https://jao.io/blog/tag-emacs.html diff --git a/translated/tech/20210111 an even better video wharf.md b/translated/tech/20210111 an even better video wharf.md new file mode 100644 index 0000000000..10f1f7adae --- /dev/null +++ b/translated/tech/20210111 an even better video wharf.md @@ -0,0 +1,121 @@ +[#]: subject: "an even better video wharf" +[#]: via: "https://jao.io/blog/2021-01-11-an-even-better-video-wharf.html" +[#]: author: "jao https://jao.io" +[#]: collector: "lujun9972" +[#]: translator: "Drwhooooo" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +一个更好的视频码头 +====== + +几天前,[我在写][1] 有关 [embark][2] 的内容,我的第一设备为启动远程视频流设计了一个新的 embark。作为 embark 的作者,Omar Antolín Camarena,不仅阅读了这篇内容,还点评了一下我认为值得跟进的一些重大改进. + +首先,你应该记得我们曾定义过一个检测视频 URL 的函数: + +``` + + (defun jao-video-finder () + "Check whether we're looking at a video URL. + Return (video-url . ) if so." + (when-let ((url (thing-at-point-url-at-point))) + (when (string-match-p jao-video-url-rx url) + (cons 'video-url url)))) + +``` + +当我们得到了一个非空的 `url` 值,即便它不是一个视频链接,但它仍然是一个确切的 URL,并且 embark 已有了一个 `url` 类别,所以我们可以借助默认的 URL 寻检器存储一个新的句法分析,语句如下: + +``` + + (when-let ((url (thing-at-point-url-at-point))) + (cons (if (string-match-p jao-video-url-rx url) 'video-url 'url) url)) + +``` +这里有一个潜在的缺点就是:我们重写了 embark 的寻检器,`embark-target-url-at-point`,所以我们可能更愿意保留后者。 + +实际上多亏了 embark 的 _目标转换器_ 我们才能做成。我们可以在 `embark-transformers-alist` 中添加任意一个函数,应用于任何一个给定类别的目标,而 embark 会将其转换后的值应用于它的操作中。Omar 很贴切地把这个过程称为“目标的精化”;我们具体做法如下: + +``` + + (defun jao-refine-url-type (url) + "Refine type of URL in case it is a video." + (cons (if (string-match-p jao-video-url-rx url) 'video-url 'url) url)) + + (add-to-list 'embark-transformer-alist '(url . jao-refine-url-type)) + +``` + +通过这种策略,我们就不再需要 `jao-video-finder` 了,而且从概念上来说,我们的 `video-url` 应该被定义为一个精化操作而并非是一个目标[1][3]。Omar 的第二个提议也与这个概念相契合:想必我们都希望所有关于 `url` 和我们的 `video-url` 的操作都是可用的,不是吗? +唔,这就是为什么我们用来定义行为的 `embark-define-keymap` 的宏可以通过使用关键字[2][4] `:parent` 继承其他键映射中已经定义的所有操作的原因: + +``` + + (embark-define-keymap jao-video-url-map + "Actions on URLs pointing to remote video streams." + :parent embark-url-map + ("p" jao-play-video-url)) + + (add-to-list 'embark-keymap-alist '(video-url . jao-video-url-map)) + +``` + +这种继承键映射的功能并非是 embark 的附属功能:vanilla Emacs 键映射通过标准函数 `set-keymap-parent` 已经搞定它了。你可以完全不用 `embark-define-keymap` 来定义 `jao-video-url-map`,工作原理是一样的。 + +这样,我们的代码就能够更短,特征更多:谢谢你,Omar! + +### 脚注: + +[1][5] + +在某些情况下,保留 jao-video-finder 是有意义的,即,如果我们想要改变检测 URL 的功能的话。例如,我在使用 emacs-w3m 的时候,经常有一个 URL 作为文本属性储存了起来(实际文本是个链接文本)。要通过那里检索 URL,就需要调用 `w3m-anchor`,而用 `embark-target-url-at-point` 就会错过它。对于这种情况,我最终编写(并使用)`jao-video-finder` 将其通过下文定义: + +``` + + (when-let ((url (or (w3m-anchor) (thing-at-point-url-at-point)))) + (cons (if (string-match-p jao-video-url-rx url) 'video-url 'url) url)) + +``` + +另一种达成同件事情的方式(再次向 Omar 致敬)便是为 w3m 的锚点放置一个特定的巡检器(且继续使用 video-url 的转换器): + +``` + + (defun jao-w3m-url-finder () + (when-let ((url (w3m-anchor))) + (cons 'url url))) + + (add-to-list 'embark-target-finders #'jao-w3m-url-finder) + +``` + +这种方法更加模块化,并且取决于你们的喜好,且更加巧妙。这些功能都很小巧并且两种方法之间并没有太大的差别,但是如果其中某一种继续加入更多寻检器的话,前一种方法用起来来反而会让一切变得更糟。 + +[2][6] + +在我最开始的例子中,我在视频地图中还添加了 `browse-url` 和 `browse-url-firefox`。前一个已不再重要,因为它已经在 `embark-url-map` 中出现过了,如果我们想让 `browse-url-firefox` 对 _所有_ 的 URLs 可用,我们可以将其加入到 `embark-url-map` (谨记,embark 的键映射只是 Emacs 的键映射)。这是另一种扩展 embark 的简便方法。 + +[标签][7]: [emacs][8] + +-------------------------------------------------------------------------------- + +via: https://jao.io/blog/2021-01-11-an-even-better-video-wharf.html + +作者:[jao][a] +选题:[lujun9972][b] +译者:[Drwhooooo](https://github.com/Drwhooooo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jao.io +[b]: https://github.com/lujun9972 +[1]: https://jao.io/blog/2021-01-09-embarking-videos.html +[2]: https://github.com/oantolin/embark +[3]: tmp.VUqMT3Yft2#fn.1 +[4]: tmp.VUqMT3Yft2#fn.2 +[5]: tmp.VUqMT3Yft2#fnr.1 +[6]: tmp.VUqMT3Yft2#fnr.2 +[7]: https://jao.io/blog/tags.html +[8]: https://jao.io/blog/tag-emacs.html