diff --git a/translated/tech/20190104 Take to the virtual skies with FlightGear.md b/published/20190104 Take to the virtual skies with FlightGear.md similarity index 57% rename from translated/tech/20190104 Take to the virtual skies with FlightGear.md rename to published/20190104 Take to the virtual skies with FlightGear.md index 0504e41669..eac736b98e 100644 --- a/translated/tech/20190104 Take to the virtual skies with FlightGear.md +++ b/published/20190104 Take to the virtual skies with FlightGear.md @@ -1,26 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10709-1.html) [#]: subject: (Take to the virtual skies with FlightGear) [#]: via: (https://opensource.com/article/19/1/flightgear) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) -使用 FlightGear 进入虚拟天空 +使用 FlightGear 翱翔天空 ====== -你梦想驾驶飞机么?试试开源飞行模拟器 FlightGear 吧。 + +> 你梦想驾驶飞机么?试试开源飞行模拟器 FlightGear 吧。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/flightgear_cockpit_plane_sky.jpg?itok=LRy0lpOS) 如果你曾梦想驾驶飞机,你会喜欢 [FlightGear][1] 的。它是一个功能齐全的[开源][2]飞行模拟器,可在 Linux、MacOS 和 Windows 中运行。 -FlightGear 项目始于 1996 年,原因是对商业飞行模拟程序的不满,因为这些程序无法扩展。它的目标是创建一个复杂、强大、可扩展、开放的飞行模拟器框架,来用于学术界和飞行员培训,或者任何想要玩飞行模拟场景的人。 +FlightGear 项目始于 1996 年,原因是对商业飞行模拟程序的不满,因为这些程序无法扩展。它的目标是创建一个复杂、强大、可扩展、开放的飞行模拟器框架,来用于学术界和飞行员培训,以及任何想要玩飞行模拟场景的人。 ### 入门 -FlightGear 的硬件要求适中,包括支持 OpenGL 以实现平滑帧速的加速 3D 显卡。它在我的配备 i5 处理器和仅 4GB 的内存的 Linux 笔记本上运行良好。它的文档包括[在线手册][3]、一个包含[用户][5]和[开发者][6]门户的 [wiki][4],还有大量的教程(例如它的默认飞机 [Cessna 172p][7])教你如何操作它。 +FlightGear 的硬件要求适中,包括支持 OpenGL 以实现平滑帧速的加速 3D 显卡。它在我的配备 i5 处理器和仅 4GB 的内存的 Linux 笔记本上运行良好。它的文档包括[在线手册][3]、一个面向[用户][5]和[开发者][6]的 [wiki][4] 门户网站,还有大量的教程(例如它的默认飞机 [Cessna 172p][7])教你如何操作它。 -在 [Fedora][8]和 [Ubuntu][9] Linux 中很容易安装。Fedora 用户可以参考 [Fedora 安装页面][10]来运行 FlightGear。 +在 [Fedora][8] 和 [Ubuntu][9] Linux 中很容易安装。Fedora 用户可以参考 [Fedora 安装页面][10]来运行 FlightGear。 在 Ubuntu 18.04 中,我需要安装一个仓库: @@ -42,29 +44,29 @@ $ fgfs ![](https://opensource.com/sites/default/files/uploads/flightgear_menu.png) -**Summary** 返回应用的主页面。 +“Summary” 返回应用的主页面。 -**Aircraft** 显示你已安装的飞机,并提供了 FlightGear 的默认“机库”中安装多达 539 种其他飞机的选项。我安装了 Cessna 150L、Piper J-3 Cub 和 Bombardier CRJ-700。一些飞机(包括 CRJ-700)有教你如何驾驶商用喷气式飞机的教程。我发现这些教程内容翔实且准确。 +“Aircraft” 显示你已安装的飞机,并提供了 FlightGear 的默认“机库”中安装多达 539 种其他飞机的选项。我安装了 Cessna 150L、Piper J-3 Cub 和 Bombardier CRJ-700。一些飞机(包括 CRJ-700)有教你如何驾驶商用喷气式飞机的教程。我发现这些教程内容翔实且准确。 ![](https://opensource.com/sites/default/files/uploads/flightgear_aircraft.png) -要选择驾驶的飞机,请将其高亮显示,然后单击菜单底部的 **Fly!**。我选择了默认的 Cessna 172p 并发现驾驶舱的刻画非常准确。 +要选择驾驶的飞机,请将其高亮显示,然后单击菜单底部的 “Fly!”。我选择了默认的 Cessna 172p 并发现驾驶舱的刻画非常准确。 ![](https://opensource.com/sites/default/files/uploads/flightgear_cockpit-view.png) -默认机场是檀香山,但你在 **Location** 菜单中提供你最喜欢机场的 [ICAO 机场代码] [11]进行修改。我找到了一些小型的本地无塔机场,如 Olean 和 Dunkirk,纽约,以及包括 Buffalo,O'Hare 和 Raleigh 在内的大型机场,甚至可以选择特定的跑道。 +默认机场是檀香山,但你在 “Location” 菜单中提供你最喜欢机场的 [ICAO 机场代码] [11]进行修改。我找到了一些小型的本地无塔机场,如 Olean 和 Dunkirk,纽约,以及包括 Buffalo,O'Hare 和 Raleigh 在内的大型机场,甚至可以选择特定的跑道。 -在 **Environment** 下,你可以调整一天中的时间、季节和天气。模拟包括高级天气建模和从 [NOAA][12] 下载当前天气的能力。 +在 “Environment” 下,你可以调整一天中的时间、季节和天气。模拟包括高级天气建模和从 [NOAA][12] 下载当前天气的能力。 -**Settings** 提供在暂停模式中开始模拟的选项。同样在设置中,你可以选择多人模式,这样你就可以与 FlightGear 支持者的全球服务器网络上的其他玩家一起“飞行”。你必须有比较快速的互联网连接来支持此功能。 +“Settings” 提供在暂停模式中开始模拟的选项。同样在设置中,你可以选择多人模式,这样你就可以与 FlightGear 支持者的全球服务器网络上的其他玩家一起“飞行”。你必须有比较快速的互联网连接来支持此功能。 -**Add-ons** 菜单允许你下载飞机和其他场景。 +“Add-ons” 菜单允许你下载飞机和其他场景。 ### 开始飞行 -为了“起飞”我的 Cessna,我使用了罗技操纵杆,它用起来不错。你可以使用顶部 **File** 菜单中的选项校准操纵杆。 +为了“起飞”我的 Cessna,我使用了罗技操纵杆,它用起来不错。你可以使用顶部 “File” 菜单中的选项校准操纵杆。 -总的来说,我发现模拟非常准确,图形界面也很棒。你自己试下 FlightGear - 我认为你会发现它是一个非常有趣和完整的模拟软件。 +总的来说,我发现模拟非常准确,图形界面也很棒。你自己试下 FlightGear —— 我想你会发现它是一个非常有趣和完整的模拟软件。 -------------------------------------------------------------------------------- @@ -73,7 +75,7 @@ via: https://opensource.com/article/19/1/flightgear 作者:[Don Watkins][a] 选题:[lujun9972][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/) 荣誉推出 diff --git a/translated/tech/20190311 7 resources for learning to use your Raspberry Pi.md b/published/20190311 7 resources for learning to use your Raspberry Pi.md similarity index 51% rename from translated/tech/20190311 7 resources for learning to use your Raspberry Pi.md rename to published/20190311 7 resources for learning to use your Raspberry Pi.md index ee0b1451b1..d3f24ba5d2 100644 --- a/translated/tech/20190311 7 resources for learning to use your Raspberry Pi.md +++ b/published/20190311 7 resources for learning to use your Raspberry Pi.md @@ -1,41 +1,42 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10707-1.html) [#]: subject: (7 resources for learning to use your Raspberry Pi) [#]: via: (https://opensource.com/article/19/3/resources-raspberry-pi) [#]: author: (Manuel Dewald https://opensource.com/users/ntlx) 学习使用树莓派的 7 个资源 ====== -缩短树莓派学习曲线的书籍、课程和网站。 + +> 一些缩短树莓派学习曲线的书籍、课程和网站。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/reading_book_stars_list.png?itok=Iwa1oBOl) -[树莓派][1]是一款小型单板计算机,最初用于教学和学习编程和计算机科学。但如今它有更多用处。它是一种经济、低功耗计算机,人们将它用于各种各样的事情 - 从家庭娱乐到服务器应用,再到物联网 (IoT) 项目。 +[树莓派][1]是一款小型单板计算机,最初用于教学和学习编程和计算机科学。但如今它有更多用处。它是一种经济的低功耗计算机,人们将它用于各种各样的事情 —— 从家庭娱乐到服务器应用,再到物联网(IoT) 项目。 -关于这个主题有很多资源,你可以做很多不同的项目,很难知道从哪里开始。以下是一些资源,可以帮助你开始使用树莓派。愉快地浏览,但不要停留在这里。到处看下,深入下去你就会发现树莓派的新世界。 +关于这个主题有很多资源,你可以做很多不同的项目,却很难知道从哪里开始。以下是一些资源,可以帮助你开始使用树莓派。看看这篇文章,但不要满足于此。到处看下,深入下去你就会发现树莓派的新世界。 ### 书籍 -关于树莓派有很多不同语言的书籍。这两本将帮助你开始了解,然后深入了解树莓派。 +关于树莓派有很多不同语言的书籍。这两本书将帮助你开始了解,然后深入了解树莓派。 -#### 由 Simon Monk 编写的 Raspberry Pi Cookbook:软件和硬件问题及解决方案 +#### 由 Simon Monk 编写的《树莓派手边书:软件和硬件问题及解决方案》 -Simon Monk 是一名软件工程师,并且多年来一直是手工业余爱好者。他最初被 Arduino 这块易于使用的开发板所吸引,后来出版了一本关于它的[书][2]。后来,他开始使用树莓派并写了 [Raspberry Pi Cookbook:软件和硬件问题和解决方案][3]这本书。在本书中,你可以找到大量树莓派项目的最佳时间,以及你可能面对的各种挑战的解决方案。 +Simon Monk 是一名软件工程师,并且多年来一直是业余手工爱好者。他最初被 Arduino 这块易于使用的开发板所吸引,后来出版了一本关于它的[书][2]。后来,他开始使用树莓派并写了《[树莓派手边书:软件和硬件问题和解决方案][3]》这本书。在本书中,你可以找到大量树莓派项目的最佳时间,以及你可能面对的各种挑战的解决方案。 -####由 Simon Monk 编写的树莓派编程:从 Python 入门 +#### 由 Simon Monk 编写的《树莓派编程:从 Python 入门》 -Python 已经发展成为开始树莓派项目的首选编程语言,因为它易于学习和使用,即使你没有任何编程经验。此外,它的许多库可以帮助你专注于使你的项目变得特别,而不是实现协议反复地与传感器不断通信。Monk 在 Raspberry Pi Cookbook 中写了两章关于 Python 编程,但[树莓派编程:从 Python 入门][4]是一个更全面的快速入门。它向你介绍了 Python,并向你展示了可以在树莓派上使用它创建的一些项目。 +Python 已经发展成为开始一个树莓派项目的首选编程语言,因为它易于学习和使用,即使你没有任何编程经验。此外,它的许多库可以帮助你专注于使你的项目变得特别,而不是实现协议以与传感器反复通信。Monk 在《树莓派手边书》中写了两章关于 Python 编程,但《[树莓派编程:从 Python 入门][4]》是一个更全面的快速入门。它向你介绍了 Python,并向你展示了可以在树莓派上使用它创建的一些项目。 ### 在线课程 新的树莓派用户可以选择许多在线课程和教程,包括这个入门课程。 -#### Raspberry Pi Class - -Instructables 的免费 [Raspberry Pi Class][5] 在线课程提供了对树莓派的全面介绍。它从树莓派和 Linux 操作基础开始,然后进入 Python 编程和 GPIO 通信。如果你是这方面的新手,并希望快速入门,这使它成为一个很好的从上到下的树莓派指南。 +#### 树莓派课程 +Instructables 免费的在线[树莓派课程][5]提供了对树莓派的全面介绍。它从树莓派和 Linux 操作基础开始,然后进入 Python 编程和 GPIO 通信。如果你是这方面的新手,并希望快速入门,这使它成为一个很好的自上而下的树莓派指南。 ### 网站 @@ -43,7 +44,7 @@ Instructables 的免费 [Raspberry Pi Class][5] 在线课程提供了对树莓 #### RaspberryPi.org -官方的[树莓派][6]网站是最好的入门之一。许多关于特定项目的文章有链接到基础知识的链接,如将 Raspbian 安装到树莓派上。 (这是我倾向的,而不是在每个操作中重复说明。)你还可以找到学生技术[教育][8]方面的[示例项目][7]和课程。 +官方的[树莓派][6]网站是最好的入门之一。有许多关于特定项目的文章会链接到这里的基础知识,如将 Raspbian 安装到树莓派上。(这是我倾向的做法,而不是在每篇文章中重复说明。)你还可以找到学生技术[教育][8]方面的[示例项目][7]和课程。 #### Opensource.com @@ -51,7 +52,7 @@ Instructables 的免费 [Raspberry Pi Class][5] 在线课程提供了对树莓 #### Instructables 和 Hackaday -你想造自己的复古街机么?或者在镜子上显示当天的天气信息、时间和第一事务?你是否想要为派对创建一个文字时钟或者相簿?你可以在 [Instructables][10] 和 [Hackaday][11] 这样的网站上找到如何使用树莓派完成所有这些(以及更多!)的说明。如果你不确定是否要买树莓派,请浏览这些网站,你会发现有很多理由可以购买。 +你想造自己的复古街机么?或者在镜子上显示当天的天气信息、时间和第一事务?你是否想要为派对创建一个文字时钟或者相簿?你可以在 [Instructables][10] 和 [Hackaday][11] 这样的网站上找到如何使用树莓派完成所有这些(以及更多!)的说明。如果你不确定是否要买树莓派,请浏览这些网站,你会发现有很多理由值得购买。 你最喜欢的树莓派资源是什么?请在评论中分享! @@ -62,7 +63,7 @@ via: https://opensource.com/article/19/3/resources-raspberry-pi 作者:[Manuel Dewald][a] 选题:[lujun9972][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/) 荣誉推出 diff --git a/sources/tech/20190408 Bash vs. Python- Which language should you use.md b/sources/tech/20190408 Bash vs. Python- Which language should you use.md deleted file mode 100644 index 36165bfb90..0000000000 --- a/sources/tech/20190408 Bash vs. Python- Which language should you use.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bash vs. Python: Which language should you use?) -[#]: via: (https://opensource.com/article/19/4/bash-vs-python) -[#]: author: (Archit Modi (Red Hat) https://opensource.com/users/architmodi/users/greg-p/users/oz123) - -Bash vs. Python: Which language should you use? -====== -Both programming languages have pros and cons that make them better for -some tasks than others. -![][1] - -[Bash][2] and [Python][3] are most automation engineers' favorite programming languages. Both have pros and cons, and sometimes it can be hard to choose which one you should use. The honest answer is: It depends on the task, the scope, the context, and the complexity of the task. - -Let's compare these two languages to get a better understanding of where each one shines. - -### Bash - - * Is a Linux/Unix shell command language - * Is great for writing shell scripts that use command line interface (CLI) utilities, utilizing output from one command to another (piping), and executing simple tasks (up to 100 lines of code) - * Can utilize command-line commands and utilities as-is - * Has better startup time than Python but poor execution time performance - * Does not come preinstalled in Windows; your script might not be compatible with multiple operating systems, but Bash is the default shell on most Linux/Unix systems - * Is _not_ fully compatible with other shells (e.g., csh, zsh, fish) - * Piping ("|") CLI utilities like sed, awk, grep, etc. can slow its performance - * Lacks many functions, objects, data structures, and multi-threading, which limits its use for complex scripting/programming - * Lacks good debugging tools and utilities - - - -### Python - - * Is an object-oriented programming (OOP) language, so it's more general purpose than Bash - * Can be used for almost any task - * Works on most major operating systems and is also installed by default on most Unix/Linux systems - * Is very similar to writing pseudo code - * Has simple, clear, easy-to-learn, and easy-to-read syntax - * Has lots of libraries, documentation, and an active community - * Provides better error handling features than Bash - * Has better debugging tools and utilities than Bash, which makes it a great language for developing complex software applications involving many lines of code - * Applications (or scripts) can contain many third-party dependencies that must be installed before executing them - * Requires writing more lines of code for simple tasks than Bash does - - - -I hope these lists give you a better understanding of which language to use and when to use it. - -Which language do you use more in your day-to-day work, Bash or Python? Please share in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/4/bash-vs-python - -作者:[Archit Modi (Red Hat)][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/architmodi/users/greg-p/users/oz123 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_happy_sad_developer_programming.png?itok=72nkfSQ_ -[2]: /article/18/7/admin-guide-bash -[3]: /article/17/11/5-approaches-learning-python diff --git a/translated/tech/20190408 Bash vs. Python- Which language should you use.md b/translated/tech/20190408 Bash vs. Python- Which language should you use.md new file mode 100644 index 0000000000..70e5bb83ac --- /dev/null +++ b/translated/tech/20190408 Bash vs. Python- Which language should you use.md @@ -0,0 +1,64 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bash vs. Python: Which language should you use?) +[#]: via: (https://opensource.com/article/19/4/bash-vs-python) +[#]: author: (Archit Modi Red Hat https://opensource.com/users/architmodi/users/greg-p/users/oz123) + + +Bash vs Python: 该使用哪种语言? +====== +两种编程语言都各有优缺点,一些任务使得它们在某些方面互有胜负。 +![][1] + +[Bash][2] 和 [Python][3] 是大多数自动化工程师最喜欢的编程语言。它们都各有优缺点,有时很难选择应该使用哪一个。诚实的答案是:这取决于任务、范围、背景和任务的复杂性。 + +让我们来比较一下这两种语言,以便更好地理解它们各自的优点。 + +### Bash + + * 是一种 Linux/Unix shell 命令语言 + * 非常适合编写使用命令行界面(CLI)实用程序的 shell 脚本,利用一个命令的输出传递给另一个命令(管道),以及执行简单的任务(最多 100 行代码) + * 可以按原样使用命令行命令和实用程序 + * 启动时间比 Python 快,但执行时间性能差 + * Windows 默认没有安装。你的脚本可能不会兼容多个操作系统,但是 Bash 是大多数 Linux/Unix 系统的默认 shell + * 与其它 shell (如 csh、zsh、fish) _不_ 完全兼容。 + * 管道 ("|") CLI 实用程序如 sed、awk、grep 等可以降低其性能 + * 缺少很多函数、对象、数据结构和多线程,这限制了它在复杂脚本或编程中的使用 + * 缺少良好的调试工具和实用程序 + +### Python + + * 是一种面对对象编程语言(OOP),因此它比 Bash 更加通用 + * 几乎可以用于任何任务 + * 适用于大多数操作系统,默认情况下它安装在大多数 Unix/Linux 系统中 + * 与伪代码非常相似 + * 具有简单、清晰、易于学习和阅读的语法 + * 拥有大量的库、文档以及一个活跃的社区 + * 提供比 Bash 更友好的错误处理特性 + * 有比 Bash 更好的调试工具和实用程序,这使得它在开发涉及很多行代码的复杂软件应用程序中是一种很棒的语言 + * 应用程序(或脚本)可能包含许多第三方依赖项,这些依赖项必须在执行前安装 + * 对于简单任务,需要编写比 Bash 更多的代码 + +我希望这些列表能够让你更好地了解该使用哪种语言以及在何时使用它。 + +你在日常工作中更多会使用哪种语言,Bash 还是 Python?请在评论中分享。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/4/bash-vs-python + +作者:[Archit Modi (Red Hat)][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/architmodi/users/greg-p/users/oz123 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_happy_sad_developer_programming.png?itok=72nkfSQ_ +[2]: /article/18/7/admin-guide-bash +[3]: /article/17/11/5-approaches-learning-python