mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-24 02:20:09 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
7727d2b467
@ -1,26 +1,28 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12515-1.html)
|
||||
[#]: subject: (How to Install the Latest Version of Handbrake on Ubuntu-based Linux Distributions [Quick Tip])
|
||||
[#]: via: (https://itsfoss.com/install-handbrake-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
如何在基于 Ubuntu 的 Linux 发行版上安装最新版本的 Handbrake (快速教程)
|
||||
如何在 Ubuntu 上安装最新版本的 Handbrake
|
||||
======
|
||||
|
||||
_**此快速教程介绍了如何使用在基于 Ubuntu 的发行版上使用官方 PPA 安装最新版本的 HandBrake。**_
|
||||
> 此快速教程介绍了如何使用在基于 Ubuntu 的发行版上使用官方 PPA 安装最新版本的 HandBrake。
|
||||
|
||||

|
||||
|
||||
[HandBrake][1] 是可用于 Linux、Windows 和 macOS 的最受欢迎的开源视频转换器之一。
|
||||
|
||||
此 GUI 应用让你只需单击几下即可将视频从一种格式转换为另一种格式。你还可以根据需要自定义输出视频。
|
||||
|
||||
[HandBrake][2] 存在于 [Ubuntu 的通用存储库][3]中,但它可能并不总是提供最新版本。让我向你展示如何在 Ubuntu 和其他基于 Ubuntu 的发行版(如 Linux Mint、Linux Lite、elementray OS 等)上获得最新的 HandBrake。
|
||||
[HandBrake][2] 存在于 [Ubuntu 的通用存储库][3]中,但它可能并不总是最新版本。让我向你展示如何在 Ubuntu 和其他基于 Ubuntu 的发行版(如 Linux Mint、Linux Lite、elementray OS 等)上获得最新的 HandBrake。
|
||||
|
||||
### 在基于 Ubuntu 的 Linux 发行版上安装最新的 HandBrake
|
||||
|
||||
HandBrake 的开发人员维护着一个[官方的 PPA][4]。 [使用此 PPA][5],你可以轻松地在基于 Ubuntu 的发行版中安装最新版本的 HandBrake。
|
||||
HandBrake 的开发人员维护着一个[官方的 PPA][4]。[使用此 PPA][5],你可以轻松地在基于 Ubuntu 的发行版中安装最新版本的 HandBrake。
|
||||
|
||||
打开终端,然后使用以下命令添加 PPA 仓库。需要时按下回车键:
|
||||
|
||||
@ -62,7 +64,7 @@ sudo apt remove handbrake-gtk
|
||||
sudo add-apt-repository -r ppa:stebbins/handbrake-releases
|
||||
```
|
||||
|
||||
在要求时确认。
|
||||
在询问时确认。
|
||||
|
||||
在这篇快速 Ubuntu 教程中,你学习了使用 PPA 安装最新的 HandBrake 的步骤。你还了解了正确删除它的步骤。
|
||||
|
||||
@ -75,7 +77,7 @@ via: https://itsfoss.com/install-handbrake-ubuntu/
|
||||
作者:[Abhishek Prakash][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/) 荣誉推出
|
||||
|
@ -1,57 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Starryi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why making mistakes makes me a better sysadmin)
|
||||
[#]: via: (https://opensource.com/article/20/8/sysadmin-mistakes)
|
||||
[#]: author: (Ben Cotton https://opensource.com/users/bcotton)
|
||||
|
||||
Why making mistakes makes me a better sysadmin
|
||||
======
|
||||
The trick is to not make the same mistake twice.
|
||||
![failure sign at a party, celebrating failure][1]
|
||||
|
||||
I've been a [Fedora][2] Linux contributor for a little over a decade now. Fedora has a large community of developers and users, each with a unique set of skills ranging from being a particularly discerning user to being an amazing programmer. I like this because it inspires and motivates me to develop new skills of my own.
|
||||
|
||||
For me, the best way to develop skills has always been to make mistakes. Like, really mess things up. It doesn't really matter what kind of mistake it is because it's less about the mistake itself and more about what I learn in the process of having to dig myself out of whatever hole I managed to get myself into.
|
||||
|
||||
### Why mistakes are good
|
||||
|
||||
I remember my first computer mistake. My family's first computer was an Epson laptop that my uncle gave us when he upgraded. It had a blazing fast 10 MHz processor and a carrying handle because it was so heavy. I loved that machine.
|
||||
|
||||
It ran DOS, but it had a text-based menu application to make it a little friendlier for the novice user. Hard Disk Menu had ten "pages," each of which could have ten commands configured. We had a page for games, another for "boring stuff" like word processors and spreadsheets, etc.
|
||||
|
||||
Hard Disk Menu had some other features that, when I got bored of playing the games, I would explore. At some point, I decided that I should make use of the account feature. It didn't change what applications appeared, but it would prevent unauthorized access, sort of. You could just drop to the DOS shell instead, but still, it was a nice try.
|
||||
|
||||
I created accounts for myself, my parents, and my sisters. My parents were a little annoyed, but they humored me. Everything was fine for a while. Then my sister forgot her password. My parents told me to remove the passwords. But without my sister's password, I couldn't remove the password on her account (it was the early 90s, a much simpler time). What to do? What to do?
|
||||
|
||||
For a little while, we kept going with the attempted passwords until one day when I decided I'd try something I hadn't done yet. When I was first creating the accounts, I set a master password. What would happen if I typed the master password in place of my sister's password?
|
||||
|
||||
If you're thinking, "of course that didn't work," then you're clearly not familiar with the naivete of security policies back in the 90s. With the master password (it was "worf," by the way, a reference to the USS Enterprise-D's Klingon security chief, for those of you who may not be Star Trek: TNG fans) in hand, I was able to remove all of the passwords. Everyone in the family could use the computer without hassle again.
|
||||
|
||||
### The importance of a dry-run
|
||||
|
||||
Since then, I've gone on to make bigger and better mistakes. Like the time in my first sysadmin job when I was shuffling some data around to reconfigure a storage array. At one point, I accidentally got the source and destination paths backward. Of course, it was an rsync with the `--delete` flag. Whoops!
|
||||
|
||||
Thankfully, my own account was among those that went "poof." That helped the apology go down a little easier with the rest of the affected users. Even better for us all, we had backups, so by the end of the day, everyone had their files back. And I learned a valuable lesson about using the `--dry-run` flag before running a destructive sync.
|
||||
|
||||
### Dealing with mistakes the right way
|
||||
|
||||
I don't mind making mistakes. I've amassed a LOT of practice over the years. The trick, I've learned, is never to make the same mistake twice. Learning from my mistakes is what has allowed me to advance in my skills and career, and find new mistakes to make. As a Linux sysadmin, I've always tried to make my mistakes in a safe environment (test platforms are great), make sure that I recover from my mistakes (backups FTW!), and to leave a note for Future Ben, so he didn't repeat my mistakes (documentation is your friend). And of course, admitting my mistakes and clearly communicating to my users when things go wrong. If I keep this up, maybe one day I'll feel like I know what I'm doing!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/sysadmin-mistakes
|
||||
|
||||
作者:[Ben Cotton][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/bcotton
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure)
|
||||
[2]: http://getfedora.org
|
@ -0,0 +1,59 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (AI system analyzes code similarities, makes progress toward automated coding)
|
||||
[#]: via: (https://www.networkworld.com/article/3570389/ai-system-analyzes-code-similarities-makes-progress-toward-automated-coding.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
AI system analyzes code similarities, makes progress toward automated coding
|
||||
======
|
||||
Researchers from Intel, MIT and Georgia Tech are working on an AI engine that can analyze code similarities to determine what code actually does, setting the stage for automated software writing.
|
||||
Monsitj / Getty Images
|
||||
|
||||
With the rapid advances in artificial intelligence (AI), are we getting to the point when computers will be smart enough to write their own code and be done with human coders? New research suggests we might be getting closer to that milestone.
|
||||
|
||||
Researchers from MIT and Georgia Tech teamed with Intel to develop an AI engine, dubbed Machine Inferred Code Similarity (MISIM), that's designed to analyze software code and determine how it's similar to other code. What's most interesting is the potential for the system to learn what bits of code do, and then use that intelligence to change how software is written. Ultimately, a human could explain what it wants a software program to do, and then a machine programming (MP) system could come up with a coded app to accomplish it.
|
||||
|
||||
**READ MORE:** [How AI can create self-driving data centers][1]
|
||||
|
||||
"When fully realized, MP will enable everyone to create software by expressing their intention in whatever fashion that's best for them, whether that's code, natural language or something else," said Justin Gottschlich, principal scientist and director/founder of machine programming research at Intel, in the company's [press release][2]. "That's an audacious goal, and while there's much more work to be done, MISIM is a solid step toward it."
|
||||
|
||||
### How it works
|
||||
|
||||
Neural networks give similarity scores to snippets of code "based on the jobs they are designed to carry out," Intel explains. Two code samples may look completely different but be rated the same because they perform the same function, for example. The algorithm can then determine which code snippet is more efficient.
|
||||
|
||||
Primitive versions of code-similarity systems are used in plagiarism detection, for example. With MISIM, however, the algorithm looks at chunks of code and attempts to ascertain contextually whether the snippets have similar characteristics or are aiming for similar objectives. It can then offer improvements in performance, for example, or general efficiency.
|
||||
|
||||
What's critical with MISIM is the intent of the creator, and it marks an advancement towards intent-based programming, which could enable software to be designed based on what a non-programmer creator wants to achieve. With intent-based programming, an algorithm draws on a pool of open source code rather than relying on the traditional, manual method of compiling a series of step-like programming instructions, line-by-line, telling a computer how to do something.
|
||||
|
||||
"A core differentiation between MISIM and existing code-similarity systems lies in its novel context-aware semantic structure (CASS), which aims to lift out what the code actually does. Unlike other existing approaches, CASS can be configured to a specific context, allowing it to capture information that describes the code at a higher level. CASS can provide more specific insight into what the code does rather than how it does it," Intel explains.
|
||||
|
||||
This is accomplished without a compiler (a stage used in programming that converts human-readable code into the computer program). Conveniently, partial snippets can be executed just to see what happens in that piece of code. Plus, the system gets rid of some of the more tedious parts of software development, like line-by-line bug finding. More details are available in the group's paper ([PDF][3])
|
||||
|
||||
Intel says the team's MISIM system is 40-times more accurate identifying similar code than previous code similarity systems.
|
||||
|
||||
Heres_your_sign, a Redditor [commenting on blog coverage of MISIM][4], amusingly points out that thankfully the computers aren't writing the requirements too. That would be asking for trouble, the Redditor believes.
|
||||
|
||||
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3570389/ai-system-analyzes-code-similarities-makes-progress-toward-automated-coding.html
|
||||
|
||||
作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/article/3568354/how-ai-can-create-self-driving-data-centers.html
|
||||
[2]: https://newsroom.intel.com/news/intel-mit-georgia-tech-machine-programming-code-similarity-system/#gs.d8qd40
|
||||
[3]: https://arxiv.org/pdf/2006.05265.pdf
|
||||
[4]: https://www.reddit.com/r/technology/comments/i2dxed/this_ai_could_bring_us_computers_that_can_write/
|
||||
[5]: https://www.facebook.com/NetworkWorld/
|
||||
[6]: https://www.linkedin.com/company/network-world
|
@ -1,11 +1,11 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Learn how to Install LXD / LXC Containers in Ubuntu)
|
||||
[#]: via: (https://www.linuxtechi.com/install-lxd-lxc-containers-from-scratch/)
|
||||
[#]: author: (Shashidhar Soppin https://www.linuxtechi.com/author/shashidhar/)
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "runningwater "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: subject: "Learn how to Install LXD / LXC Containers in Ubuntu"
|
||||
[#]: via: "https://www.linuxtechi.com/install-lxd-lxc-containers-from-scratch/"
|
||||
[#]: author: "Shashidhar Soppin https://www.linuxtechi.com/author/shashidhar/"
|
||||
|
||||
Learn how to Install LXD / LXC Containers in Ubuntu
|
||||
======
|
||||
@ -497,7 +497,7 @@ via: https://www.linuxtechi.com/install-lxd-lxc-containers-from-scratch/
|
||||
|
||||
作者:[Shashidhar Soppin][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[runningwater](https://github.com/runningwater)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,107 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install Itch on Ubuntu and Other Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/install-itch-linux/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
How to Install Itch on Ubuntu and Other Linux Distributions
|
||||
======
|
||||
|
||||
[Itch][1] is a platform for independent digital creators with main focus on indie games. It was actually started as website to host, sell and download indie video games but these days, Itch also provides books, comics, tools, board games, soundtracks and more digital content from indie creators.
|
||||
|
||||
As a user, you can download these digital content either for free or for a price set by the creator. All your downloads and purchases are synced to your account so that you can download them whenever you want.
|
||||
|
||||
Consider it like Steam but more focused on indie developers and creators.
|
||||
|
||||
You can browse Itch from its website but Itch also provides and [open source desktop client][2] that gives you some additional advantages. With the desktop client:
|
||||
|
||||
* You can browse games and other content and download them on your system.
|
||||
* The desktop client is automatically updated with all the new features.
|
||||
* Your downloaded games are also automatically updated.
|
||||
* If you play browser-based game on Itch, you can play it offline using the Itch desktop client.
|
||||
|
||||
|
||||
|
||||
In this tutorial, I’ll show you the steps to install Itch on Ubuntu or any other Linux distribution.
|
||||
|
||||
### Installing Itch on Linux desktop
|
||||
|
||||
Itch provides an installer file named itch-setup. You can download this file from its download page.
|
||||
|
||||
[Download Itch for Linux][3]
|
||||
|
||||
This itch-setup file should work on any Linux distribution as long as it has GTK 3 (libgtk-3-0) installed. Most recent Linux distributions should have it.
|
||||
|
||||
Once you download the setup file, right click on it and give it execute permission.
|
||||
|
||||
![Right click and give the file execute permission][4]
|
||||
|
||||
Now run this setup file by double-clicking on it. It will start downloading the latest version of Itch.
|
||||
|
||||
![][5]
|
||||
|
||||
It will take some time depending upon your internet speed. In a few minutes, you should see the this screen asking you to log in to your Itch account.
|
||||
|
||||
![][6]
|
||||
|
||||
Once you are logged in, you can browse games and other contents and download/purchase them.
|
||||
|
||||
![][7]
|
||||
|
||||
The entire installation process is similar to [Steam installation on Ubuntu][8].
|
||||
|
||||
You can find the Itch files in ~/.itch folder. The content you download from Itch usually resides in ~/.config/itch. If you didn’t know, ~ means your home directory.
|
||||
|
||||
### Remove Itch desktop application from your system
|
||||
|
||||
For some reasons, if you do not want to use Itch anymore, you can remove it from your system. For that, unfortunately, you’ll have to use the terminal.
|
||||
|
||||
Open a terminal and use the following command:
|
||||
|
||||
```
|
||||
~/.itch/itch-setup --uninstall
|
||||
```
|
||||
|
||||
It won’t remove your content library. If you want to remove the downloaded games and stuff, you can delete the ~/.config/itch folder manually.
|
||||
|
||||
```
|
||||
rm -r ~/.config/itch
|
||||
```
|
||||
|
||||
**Do you use Itch?**
|
||||
|
||||
Itch is an ethical platform for indie creators and supporters of such models. Itch uses “pay what you want to pay” where the buyer can pay any amount equal or greater than the price set by the content creator.
|
||||
|
||||
Itch also has open revenue sharing model. The creators can share some or no part of their generated revenue with Itch.
|
||||
|
||||
Personally, I prefer such ethical businesses like Itch and Humble Bundle. Like Humble Bundle, Itch also runs sales and bundles from time to time. This helps you save money and support indie developers and creators.
|
||||
|
||||
Do you use Itch or Humble Bundle? Which other similar platform do you use?
|
||||
|
||||
_It’s FOSS is an affiliate partner with Itch. Please read our [affiliate policy][9] for more information._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-itch-linux/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itch.io/?ac=ywUpyBMGXvG
|
||||
[2]: https://github.com/itchio/itch
|
||||
[3]: https://itch.io/app
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-installer-linux.png?ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/installing-itch-linux.jpg?ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-running-linux.jpg?ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-game-page.png?resize=800%2C441&ssl=1
|
||||
[8]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[9]: https://itsfoss.com/affiliate-policy/
|
@ -1,120 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Photoflare: An Open Source Image Editor for Simple Editing Needs)
|
||||
[#]: via: (https://itsfoss.com/photoflare/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Photoflare: An Open Source Image Editor for Simple Editing Needs
|
||||
======
|
||||
|
||||
_**Brief: Photoflare is an image editor available for Linux and Windows. The editor has a free and open source community edition.**_
|
||||
|
||||
When it comes to image editing on Linux, GIMP is the first and obvious choice. But GIMP could be overwhelming if you don’t need advanced editing feature. This is where applications like Photoflare step in.
|
||||
|
||||
### PhotoFlare: A simple image editor
|
||||
|
||||
![][1]
|
||||
|
||||
Photoflare is an editor that provides basic image editing features with a simple-to-use interface.
|
||||
|
||||
It is inspired by the popular Windows application [PhotoFiltre][2]. The application is not a clone though and it has been written in C++ from scratch and uses Qt framework for the interface.
|
||||
|
||||
The features include cropping, flipping/rotating, resizing image. You can also tools like paint brush, paint bucket, spray can, blur tool and eraser. The magic wand tool lets you select a specific area of the image.
|
||||
|
||||
You can also add lines and text on an image. You cal also change the hue variation to change the color tone of the image.
|
||||
|
||||
You can also create an image from scratch like any other [paint application][3].
|
||||
|
||||
The batch editing option allows you to resize, convert file format and add filter to multiple photos simultaneously.
|
||||
|
||||
![Batch Editing Feature in Photoflare | Photo Credit: Photoflare website][4]
|
||||
|
||||
### Features of Photoflare
|
||||
|
||||
I’ll list the main features of Photoflare for easier reference:
|
||||
|
||||
* Create/draw an image
|
||||
* Crop an image
|
||||
* Rotate an image
|
||||
* Resize image
|
||||
* Edit images with tools like paint brush, paint bucket, spray, blur tool and image
|
||||
* Add lines and text on images
|
||||
* Change the color tone of images
|
||||
* Add vintage filter
|
||||
* Batch resize, filter etc
|
||||
|
||||
|
||||
|
||||
### Installing Photflare on Linux
|
||||
|
||||
![][5]
|
||||
|
||||
On the website of Photoflare, you’ll find the pricing and the option for monthly subscription. However, the application is open source and its [source code is available on GitHub][6].
|
||||
|
||||
The application is also **free** to use. The [pricing/subscription part][7] is for financial support of the project. You can download it for free and if you like the application and would continue to use it, consider donating to the project.
|
||||
|
||||
Photoflare has an [official PPA][8] for Ubuntu and Ubuntu based distributions. This PPA is available for Ubuntu 18.04 and 20.04 versions.
|
||||
|
||||
Open a terminal and use the following commands one by one to install Photoflare:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:photoflare/photoflare-stable
|
||||
sudo apt update
|
||||
sudo apt install photoflare
|
||||
```
|
||||
|
||||
To remove Photoflare from Ubuntu-based distributions, use this command:
|
||||
|
||||
```
|
||||
sudo apt remove photoflare
|
||||
```
|
||||
|
||||
It would be a good idea to remove the PPA as well:
|
||||
|
||||
```
|
||||
sudo add-apt-repository -r ppa:photoflare/photoflare-stable
|
||||
```
|
||||
|
||||
**Arch Linux** and Manjaro users can [get it from AUR][9].
|
||||
|
||||
There is no ready to use package for Fedora so you’ll have to get the source code:
|
||||
|
||||
[Photoflare source code][6]
|
||||
|
||||
### Experience with Photoflare
|
||||
|
||||
I find it somewhat similar to [Pinta][10] with a bit more features. It is a simple tool for some basic image editing. The batch feature is a plus.
|
||||
|
||||
I did notice image doesn’t look sharp when it is opened for editing. I opened a screenshot for editing and the fonts looked blurry. However, after saving the image and opening it in an [image viewer][11] showed no such issue.
|
||||
|
||||
Altogether, it is a decent tool if you are not looking for a professional grade image editing.
|
||||
|
||||
If you have used it in the past or if you give it a try, do share your experience with Photoflare.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/photoflare/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/Photoflare.jpg?ssl=1
|
||||
[2]: http://photofiltre.free.fr/frames_en.htm
|
||||
[3]: https://itsfoss.com/open-source-paint-apps/
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/batch_editing_photoflare.png?ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/photoflare-editor-linux.png?resize=800%2C580&ssl=1
|
||||
[6]: https://github.com/PhotoFlare/photoflare
|
||||
[7]: https://photoflare.io/pricing/
|
||||
[8]: https://launchpad.net/~photoflare/+archive/ubuntu/photoflare-stable
|
||||
[9]: https://aur.archlinux.org/packages/photoflare-git/
|
||||
[10]: https://itsfoss.com/pinta-new-release/
|
||||
[11]: https://itsfoss.com/image-viewers-linux/
|
222
sources/tech/20200813 How to use printf to format output.md
Normal file
222
sources/tech/20200813 How to use printf to format output.md
Normal file
@ -0,0 +1,222 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to use printf to format output)
|
||||
[#]: via: (https://opensource.com/article/20/8/printf)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
How to use printf to format output
|
||||
======
|
||||
Get to know printf, a mysterious, flexible, and feature-rich alternative
|
||||
to echo, print, and cout.
|
||||
![Person drinking a hot drink at the computer][1]
|
||||
|
||||
When I started learning Unix, I was introduced to the `echo` command pretty early in the process. Likewise, my initial [Python][2] lesson involved the `print` function. Picking up C++ and [Java][2] introduced me to `cout` and `systemout`. It seemed every language proudly had a convenient one-line method of producing output and advertised it like it was going out of style.
|
||||
|
||||
But once I turned the first page of intermediate lessons, I met `printf`, a cryptic, mysterious, and surprisingly flexible function. In going against the puzzling tradition of hiding `printf` from beginners, this article aims to introduce to the world the humble `printf` function and explain how it can be used in nearly any language.
|
||||
|
||||
### A brief history of printf
|
||||
|
||||
The term `printf` stands for "print formatted" and may have first appeared in the [Algol 68][3] programming language. Since its inclusion in C, `printf` has been reimplemented in C++, Java, Bash, PHP, and quite probably in whatever your favorite (post-C) language happens to be.
|
||||
|
||||
It's clearly popular, and yet many people seem to regard its syntax to be complex, especially compared to alternatives such as `echo` or `print` or `cout`. For example, here's a simple echo statement in Bash:
|
||||
|
||||
|
||||
```
|
||||
$ echo hello
|
||||
hello
|
||||
$
|
||||
```
|
||||
|
||||
Here's the same result using `printf` in Bash:
|
||||
|
||||
|
||||
```
|
||||
$ printf "%s\n" hello
|
||||
hello
|
||||
$
|
||||
```
|
||||
|
||||
But you get a lot of features for that added complexity, and that's exactly why `printf` is well worth learning.
|
||||
|
||||
### printf output
|
||||
|
||||
The main concept behind `printf` is its ability to format its output based on style information _separate_ from the content. For instance, there is a collection of special sequences that `printf` recognizes as special characters. Your favorite language may have greater or fewer sequences, but common ones include:
|
||||
|
||||
* `\n`: New line
|
||||
* `\r`: Carriage return
|
||||
* `\t`: Horizontal tab
|
||||
* `\NNN`: A specific byte with an octal value containing one to three digits
|
||||
|
||||
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
```
|
||||
$ printf "\t\123\105\124\110\n"
|
||||
SETH
|
||||
$
|
||||
```
|
||||
|
||||
In this Bash example, `printf` renders a tab character followed by the ASCII characters assigned to a string of four octal values. This is terminated with the control sequence to produce a new line (`\n`).
|
||||
|
||||
Attempting the same thing with `echo` produces something a little more literal:
|
||||
|
||||
|
||||
```
|
||||
$ printf "\t\123\105\124\110\n"
|
||||
\t\123\105\124\110\n
|
||||
$
|
||||
```
|
||||
|
||||
Using Python's `print` function for the same task reveals there's more to Python's `print` command than you might expect:
|
||||
|
||||
|
||||
```
|
||||
>>> print("\t\123\n")
|
||||
S
|
||||
|
||||
>>>
|
||||
```
|
||||
|
||||
Obviously, Python's `print` incorporates traditional `printf` features as well as the features of a simple `echo` or `cout`.
|
||||
|
||||
These examples contain nothing more than literal characters, though, and while they're useful in some situations, they're probably the least significant thing about `printf`. The true power of `printf` lies in format specification.
|
||||
|
||||
### Format output with printf
|
||||
|
||||
Format specifiers are characters preceded by a percent sign (`%`).
|
||||
Common ones include:
|
||||
|
||||
* `%s`: String
|
||||
* `%d`: Digit
|
||||
* `%f`: Floating-point number
|
||||
* `%o`: A number in octal
|
||||
|
||||
|
||||
|
||||
These are placeholders in a `printf` statement, which you can replace with a value you provide somewhere else in your `printf` statement. Where these values are provided depends on the language you're using and its syntax, but here's a simple example in Java:
|
||||
|
||||
|
||||
```
|
||||
string var="hello\n";
|
||||
system.out.printf("%s", var);
|
||||
```
|
||||
|
||||
This, wrapped in appropriate boilerplate code and executed, renders:
|
||||
|
||||
|
||||
```
|
||||
$ ./example
|
||||
hello
|
||||
$
|
||||
```
|
||||
|
||||
It gets even more interesting, though, when the content of a variable changes. Suppose you want to update your output based on an ever-increasing number:
|
||||
|
||||
|
||||
```
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int var=0;
|
||||
while ( var < 100) {
|
||||
var++;
|
||||
printf("Processing is %d% finished.\n", var);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
Compiled and run:
|
||||
|
||||
|
||||
```
|
||||
Processing is 1% finished.
|
||||
[...]
|
||||
Processing is 100% finished.
|
||||
```
|
||||
|
||||
Notice that the double `%` in the code resolves to a single printed `%` symbol.
|
||||
|
||||
### Limiting decimal places with printf
|
||||
|
||||
Numbers can get complex, and `printf` offers many formatting options. You can limit how many decimal places are printed using the `%f` for floating-point numbers. By placing a dot (`.`) along with a limiter number between the percent sign and the `f`, you tell `printf` how many decimals to render. Here's a simple example written in Bash for brevity:
|
||||
|
||||
|
||||
```
|
||||
$ printf "%.2f\n" 3.141519
|
||||
3.14
|
||||
$
|
||||
```
|
||||
|
||||
Similar syntax applies to other languages. Here's an example in C:
|
||||
|
||||
|
||||
```
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
[fprintf][4](stdout, "%.2f\n", 4 * [atan][5](1.0));
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
For three decimal places, use `.3f`, and so on.
|
||||
|
||||
### Adding commas to a number with printf
|
||||
|
||||
Since big numbers can be difficult to parse, it's common to break them up with a comma. You can have `printf` add commas as needed by placing an apostrophe (`'`) between the percent sign and the `d`:
|
||||
|
||||
|
||||
```
|
||||
$ printf "%'d\n" 1024
|
||||
1,024
|
||||
$ printf "%'d\n" 1024601
|
||||
1,024,601
|
||||
$
|
||||
```
|
||||
|
||||
### Add leading zeros with printf
|
||||
|
||||
Another common use for `printf` is to impose a specific format upon numbers in file names. For instance, if you have 10 sequential files on a computer, the computer may sort `10.jpg` before `1.jpg`, which is probably not your intent. When writing to a file programmatically, you can use `printf` to form the file name with leading zero characters. Here's an example in Bash for brevity:
|
||||
|
||||
|
||||
```
|
||||
$ printf "%03d.jpg\n" {1..10}
|
||||
001.jpg
|
||||
002.jpg
|
||||
[...]
|
||||
010.jpg
|
||||
```
|
||||
|
||||
Notice that a maximum of 3 places are used in each number.
|
||||
|
||||
### Using printf
|
||||
|
||||
As you can tell from these `printf` examples, including control characters, especially `\n`, can be tedious, and the syntax is relatively complex. This is the reason shortcuts like `echo` and `cout` were developed. However, if you use `printf` every now and again, you'll get used to the syntax, and it will become second nature. I don't see any reason `printf` should be your _first_ choice for printing statements during everyday activities, but it's a great tool to be comfortable enough with that it won't slow you down when you need it.
|
||||
|
||||
Take some time to learn `printf` in your language of choice, and use it when you need it. It's a powerful tool you won't regret having at your fingertips.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/printf
|
||||
|
||||
作者:[Seth Kenlon][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/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
|
||||
[2]: https://opensource.com/resources/python
|
||||
[3]: https://opensource.com/article/20/6/algol68
|
||||
[4]: http://www.opengroup.org/onlinepubs/009695399/functions/fprintf.html
|
||||
[5]: http://www.opengroup.org/onlinepubs/009695399/functions/atan.html
|
@ -0,0 +1,163 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Fixing “Unable to correct problems, you have held broken packages” Error in Ubuntu and other Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/held-broken-packages-error/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Fixing “Unable to correct problems, you have held broken packages” Error in Ubuntu and other Linux Distributions
|
||||
======
|
||||
|
||||
While there are [various ways to install applications in Ubuntu][1], I prefer to use the apt command in the terminal for installing software.
|
||||
|
||||
If you do the same, you may come across a dependency error like this:
|
||||
|
||||
```
|
||||
Some packages could not be installed. This may mean that you have
|
||||
requested an impossible situation or if you are using the unstable
|
||||
distribution that some required packages have not yet been created
|
||||
or been moved out of Incoming.
|
||||
The following information may help to resolve the situation:
|
||||
|
||||
The following packages have unmet dependencies:
|
||||
green-recorder : Depends: python-urllib3 but it is not installable
|
||||
E: Unable to correct problems, you have held broken packages.
|
||||
```
|
||||
|
||||
Usually on It’s FOSS, you’ll find simple and easy to follow solutions to complicated problems. Unfortunately, this one is not that straightforward.
|
||||
|
||||
In this troubleshooting article, I’ll tell you why this error occurs and give some pointers on how to go about solving this issue.
|
||||
|
||||
### Why do you see the “you have held broken packages” error?
|
||||
|
||||
![][2]
|
||||
|
||||
You were trying to install an application package, most probably from a [PPA][3] or third-party repository.
|
||||
|
||||
Applications often need specific versions of libraries and software component (called dependencies). These dependencies may not be part of the application package itself, but they are expected to either be installed on your system already or installed during the installation of the application.
|
||||
|
||||
Your Linux system tries to install these dependencies on its own. But if the dependency package version is not available on your system, it gets confused as it has no way to solve this dependency problem.
|
||||
|
||||
This is why it informs you that the software you were trying to install depends on XYZ but this XYZ cannot be installed.
|
||||
|
||||
Another usecase is when your package can be held is when you try to install two versions of the same software. Say you are installing a specific version of Wine when you have another one installed already.
|
||||
|
||||
### How to go about fixing the “Unable to correct problems, you have held broken packages” error
|
||||
|
||||
You can try a few things to make things work. You need to have some ideas on installing/removing packages in Linux command line to work things out here.
|
||||
|
||||
#### Make sure that your system’s package cache is updated
|
||||
|
||||
First, make sure that local package cache is updated. Your system checks this cache for the available packages. It’s possible (but not certain) that the dependency package is seen by the system after the cache update.
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
Try installing the troublesome package again and see if it fixes the problem.
|
||||
|
||||
#### Install the dependency
|
||||
|
||||
If you try to install the troublesome package again and it still complains about the same dependency error than perhaps that dependency is not available for distribution version.
|
||||
|
||||
You may [use the apt search command][4] see if you could this library from some other package or name:
|
||||
|
||||
```
|
||||
sudo apt search package_name
|
||||
```
|
||||
|
||||
If the package is available, is it the same version as requested by the package you were trying to install?
|
||||
|
||||
Try to install the dependency package and see what happens:
|
||||
|
||||
```
|
||||
sudo apt install dependency_package
|
||||
```
|
||||
|
||||
You may encounter a dependency chain. You try to install dependency A but it complains of B. Then you try installing B and it complains of C.
|
||||
|
||||
It may also happen that when you try to install package C, it is already installed. Check the version of package C. Is it the same version as required by package B? If yes, then removing C and installing it again could help.
|
||||
|
||||
#### Can you get the missing dependency package from some other source?
|
||||
|
||||
If the missing dependency package cannot be found on your system (no results in apt search), you may try to get the dependency package from some place else. I know that’s not very convenient thing to do but you don’t have many options here.
|
||||
|
||||
For example, in the case of installing shutter, it complained about libgoo-canvas-perl and this library is no more available on Ubuntu system.
|
||||
|
||||
```
|
||||
sudo apt install shutter
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
Reading state information... Done
|
||||
Some packages could not be installed. This may mean that you have
|
||||
requested an impossible situation or if you are using the unstable
|
||||
distribution that some required packages have not yet been created
|
||||
or been moved out of Incoming.
|
||||
The following information may help to resolve the situation:
|
||||
|
||||
The following packages have unmet dependencies:
|
||||
shutter : Depends: libgoo-canvas-perl but it is not going to be installed
|
||||
E: Unable to correct problems, you have held broken packages.
|
||||
```
|
||||
|
||||
However, since it was available in the previous versions of Ubuntu, I looked for this package on Ubuntu’s package archive and found it under the listing of Ubuntu 14.04 [here][5]. I downloaded the .DEB file and installed it.
|
||||
|
||||
Now that this dependency package is installed, trying to install the original application (shutter in this case) should not complain about at least this package anymore.
|
||||
|
||||
#### If you cannot find the dependency package anywhere, install the troublesome package from some other source
|
||||
|
||||
So in the example above, I tried to install Green Recorder application using its PPA. This application needs `python-urllib3` library but unfortunately, this library is not available in my Ubuntu 20.04 system.
|
||||
|
||||
```
|
||||
[email protected]:~$ apt search python-urllib3
|
||||
Sorting... Done
|
||||
Full Text Search... Done
|
||||
```
|
||||
|
||||
Clearly, this is a poorly packaged application. The developer made it available for Ubuntu 20.04 without realizing that Ubuntu 20.04 doesn’t support Python 2 anymore and all the Python libs now start with python3 prefix. So the python-urllib3 should be python3-urllib3.
|
||||
|
||||
If you are in such a situation, maybe check the project’s homepage or search on the internet for an alternate source for installing it. Perhaps there is a Snap/Flatpak version or some user created a PPA for it? If nothing else, you may go with source code option as well.
|
||||
|
||||
#### If you see the held broken package error during update try this
|
||||
|
||||
Most of the discussion so far assumed that you see this error while installing a new application. That may not always be the case.
|
||||
|
||||
If you see this error when you try updating your system with sudo apt update command, then you’ll have to take a slightly different approach.
|
||||
|
||||
First, check which package is being held with this command:
|
||||
|
||||
```
|
||||
dpkg --get-selections | grep hold
|
||||
```
|
||||
|
||||
If you see some packages being held, remove them and then go on updating your system or installing the software.
|
||||
|
||||
You may also [use Synaptic package manager][6] for fixing the broken packages.
|
||||
|
||||
#### Did you manage to fix the issue?
|
||||
|
||||
As I had mentioned earlier, there is no straightforward fix for this problem. You’ll have to investigate on your own and see if it can be fixed or not.
|
||||
|
||||
Please share in the comments if your problem gets fixed. If not, I may try to help you out.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/held-broken-packages-error/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/remove-install-software-ubuntu/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/broken-package-error-ubuntu.png?resize=800%2C450&ssl=1
|
||||
[3]: https://itsfoss.com/ppa-guide/
|
||||
[4]: https://itsfoss.com/apt-search-command/
|
||||
[5]: https://launchpad.net/ubuntu/+source/libgoo-canvas-perl
|
||||
[6]: https://itsfoss.com/synaptic-package-manager/
|
@ -0,0 +1,57 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Starryi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why making mistakes makes me a better sysadmin)
|
||||
[#]: via: (https://opensource.com/article/20/8/sysadmin-mistakes)
|
||||
[#]: author: (Ben Cotton https://opensource.com/users/bcotton)
|
||||
|
||||
为什么犯错让我成为一个更好的系统管理员
|
||||
======
|
||||
诀窍就是同一个错误不要犯两次。
|
||||
![为失败喝彩][1]
|
||||
|
||||
到目前为止,我已做了十多年 [Fedora][2] 贡献者。 Fedora 有一个由开发者和用户组成的大型社区,其中每一个人,不管是极富洞察力的用户还是出色的程序员,都有一些独有的技能。我喜欢这样的社区,因为它能激励我培养自己的新技能。
|
||||
|
||||
对我来说,培养技能最好的方法就是犯错,比如把事情搞得一团糟。犯什么样的错误不重要,因为相比错误本身,我在脱离困境的过程里学习到了什么更重要。
|
||||
|
||||
### 为什么犯错误是好事
|
||||
|
||||
我依然记得我犯的第一个计算机错误。我家的第一台电脑是我叔叔升职后送个我们的爱普生笔记本电脑,它有一个特别快的 10 MHz 处理器,因为太重了,所以还有一个手提把手。我很喜欢它。
|
||||
|
||||
它运行 DOS ,但有一个基于文本的菜单应用,所以对新手用户比较友好。硬盘菜单有十个“页面”,每个“页面”可以配置十个命令。我们有一个游戏页面,还有一个页面放些“无聊的东西”,比如文字处理程序和电子表格等等。
|
||||
|
||||
硬盘菜单还有一些其他功能,当我玩腻了游戏,就会去探索它们。有一天,我决定使用菜单的账户功能。账户不会改变应用程序的出现,但可以防止对应用程序未经授权的访问,某种程度上。你可以直接用 DOS shell 替代它,但使用账户仍然是一个不错的尝试。
|
||||
|
||||
我为自己、父母和姐姐妹妹创建了账户。虽然我父母有点不开心,但他们最终迁就了我。万事顺遂了一段时间后,我姐姐忘记了她的账户密码。于是,我父母让我删掉她的密码,但是没有姐姐的密码去登陆账户,我就无法删除她的密码(那是在90年代初,一个比现在简单得多的时代)。要怎么办?要怎么办?
|
||||
|
||||
那以后一段时间,我们一直试着猜测密码,直到有一天,我决定尝试做一些我还没有做过的事情。当我第一次创建帐户时,我设置了一个主密码。如果我输入主密码来代替我姐姐的密码,会发生什么呢?
|
||||
|
||||
如果你在想,“这当然不会有用的”,那么显然你不熟悉90年代安全策略的天真幼稚。有了主密码(顺便说一下,主密码是 “worf” ,指的是企业号星舰的克林贡人安全主管,如果你不是《星际迷航:下一代》粉丝的话),我可以删除所有密码。于是,家里的每个人又都可以毫无障碍地使用电脑了。
|
||||
|
||||
### dry-run 的重要性
|
||||
|
||||
在那之后,我又犯了更大更有益的错误。比如,在我第一次做系统管理员时,当时我正转移一些数据以重新配置存储阵列。有一次,我意外地颠倒了源路径和目标路径,而且那是一个带有 `——delete` 标志的 `rsync` 命令。真的是太糟糕了!
|
||||
|
||||
幸运的是,我自己的账户也崩溃了,这让我的道歉更容易被其他受影响的用户接受。对我们所有人来说更幸运的是,我们有备份。所以那天结束的时候,每个人的文件都找回来了,同时我获得了在进行破坏性同步之前使用 `——run` 标志的宝贵经验。
|
||||
|
||||
### 以正确的方式处理错误
|
||||
|
||||
我不介意犯错误。这些年来,我积累了很多实践经验,学到的诀窍就是不要犯同样的错误。从错误中学习能让我在技能和事业上取得进步,并发现新的会犯的错误。作为 Linux 系统管理员,我总是试图在一个安全的环境(测试平台就很好)中犯错误,确保我可以从错误中恢复(备份真的很很很重要!),并给以后的我留个笔记,这样他就不会重复犯错(文档是你的朋友)。当然,还要勇于承认自己的错误,并在出现问题时清楚地与用户沟通。如果我一直这样做,也许有一天我就会觉得我很清楚我在做什么!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/sysadmin-mistakes
|
||||
|
||||
作者:[Ben Cotton][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Starryi](https://github.com/Starryi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/bcotton
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure)
|
||||
[2]: http://getfedora.org
|
@ -0,0 +1,107 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install Itch on Ubuntu and Other Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/install-itch-linux/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
如何在 Ubuntu 和其它的 Linux 发现版上安装 Itch
|
||||
======
|
||||
|
||||
[Itch][1] 是独立数字创造者的平台,主要专注于独立游戏。它事实上是作为一个托管,销售和下载独立视频游戏的网站开始的。但是现在,Itch 也提供书籍,漫画,工具,棋类游戏,配乐和更多来自独立创造者的数字内容。
|
||||
|
||||
作为一名用户,你或者能够免费下载这些数字内容,或者按照创造者设定的价格下载。你所有下载和购买的东西都同步到你的账户,以便你可以在任何你想的时间内下载它们。
|
||||
|
||||
Consider it like Steam ,但是更专注于独立开发者和创造者。
|
||||
|
||||
你可以从它的网站浏览 Itch ,但是 Itch 也提供 provides and [开源桌面客户端][2],这给与你一些额外的优势。使用桌面客户端:
|
||||
|
||||
* 你可以在你的系统上,浏览游戏和其它的内容,并下载它们。
|
||||
* 桌面客户端随着所有的新特色自动更新。
|
||||
* 你下载的游戏也自动更新。
|
||||
* 如果你在 Itch 玩基于浏览器的游戏, 那么你可以使用 Itch 桌面客户端离线玩。
|
||||
|
||||
|
||||
|
||||
在这篇教程中,我将向你展示在 Ubuntu 或其它任何 Linux 发行版上安装 Itch 的步骤。
|
||||
|
||||
### 在 Linux 桌面上安装 Itch
|
||||
|
||||
Itch 提供一个名称为 itch-setup 的安装器。你可以从它的下载网页下载这个文件。
|
||||
|
||||
[下载 Linux 版 Itch][3]
|
||||
|
||||
这个 itch-setup 文件可以工作在任何的 Linux 发行版上,只要它已经安装有 GTK 3 (libgtk-3-0) 。大多数当前的 Linux 发行版应该已经有它了。
|
||||
|
||||
在你下载安装文件后,在其上面右击并给予它可执行权限。
|
||||
|
||||
![右击并给予文件可执行权限][4]
|
||||
|
||||
现在在这个安装文件上通过双击来运行。它将下载 Itch 的最新版本。
|
||||
|
||||
![][5]
|
||||
|
||||
它将花费的实际时间取决于你的网速。几分钟后,你应该会看到要求你登录你的 Itch 账号的这个屏幕。
|
||||
|
||||
![][6]
|
||||
|
||||
在你登录后,你可以浏览游戏和其它的内容,并下载/购买它们。
|
||||
|
||||
![][7]
|
||||
|
||||
整个安装过程类似于 [在 Ubuntu 上安装 Steam ][8]。
|
||||
|
||||
你可以在 ~/.itch 文件夹中找到 Itch 文件。你从 Itch 下载的内容通常位于 ~/.config/itch 。如果你不知道的话,~ 意味着你的 home 目录。
|
||||
|
||||
### 从你的系统中移除 Itch 桌面应用程序
|
||||
|
||||
出于某些原因,如果你不想再使用 Itch ,你可以从你的系统中移除它。为此,不幸的是,你将需要使用终端。
|
||||
|
||||
打开一个终端,并使用下面的命令:
|
||||
|
||||
```
|
||||
~/.itch/itch-setup --uninstall
|
||||
```
|
||||
|
||||
它将不会移除你的内容库。如果你想移除下载的游戏和材料,你可以手动删除 ~/.config/itch 文件夹。
|
||||
|
||||
```
|
||||
rm -r ~/.config/itch
|
||||
```
|
||||
|
||||
**你使用 Itch 吗?**
|
||||
|
||||
Itch 对独立创造者和此类模式支持者来说是一个有公共道德的平台。Itch 使用 “支付你想支付的东西”,买家可以支付大于或相等内容创作者设置的任何金额。
|
||||
|
||||
Itch 也有开放收益分享模式。创造者可以使用 Itch 可以分享或不分享他们生成的收益。
|
||||
|
||||
就我个人而言,我更喜欢像 Itch 和 Humble Bundle 这些有公共道德的商店。像 Humble Bundle 一样,Itch 也时不时地进行销售和捆绑销售。这有助于你节省资金并支持独立开发者和创造者。
|
||||
|
||||
你使用 Itch ,还是 Humble Bundle ?你还使用哪种类似的平台?
|
||||
|
||||
_FOSS 与 Itch 是合作伙伴。更多信息请阅读我们的 [合作政策][9]。_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-itch-linux/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者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/lujun9972
|
||||
[1]: https://itch.io/?ac=ywUpyBMGXvG
|
||||
[2]: https://github.com/itchio/itch
|
||||
[3]: https://itch.io/app
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-installer-linux.png?ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/installing-itch-linux.jpg?ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-running-linux.jpg?ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-game-page.png?resize=800%2C441&ssl=1
|
||||
[8]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[9]: https://itsfoss.com/affiliate-policy/
|
@ -0,0 +1,120 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Photoflare: An Open Source Image Editor for Simple Editing Needs)
|
||||
[#]: via: (https://itsfoss.com/photoflare/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Photoflare:满足简单编辑需求的开源图像编辑器
|
||||
======
|
||||
|
||||
_**简介:Photoflare 是 Linux 和 Windows 上的图像编辑器。它有一个免费且开源的社区版本。**_
|
||||
|
||||
在 Linux 上编辑图像时,GIMP 显然是首选。但是,如果你不需要高级编辑功能,GIMP 可能会让人不知所措。这是像 Photoflare 这样的应用立足的地方。
|
||||
|
||||
### PhotoFlare:一个简单的图像编辑器
|
||||
|
||||
![][1]
|
||||
|
||||
Photoflare 是一个在简单易用的界面提供基本的图像编辑功能的编辑器。
|
||||
|
||||
它受流行的 Windows 应用 [PhotoFiltre][2] 的启发。这个程序不是仅仅克隆,它是从头开始用 C++ 编写的,并使用 Qt 框架作为界面。
|
||||
|
||||
它的功能包括裁剪、翻转/旋转、调整图像大小。你还可以使用诸如油漆刷、油漆桶、喷雾罐、模糊工具和橡皮擦之类的工具。魔术棒工具可让你选择图像的特定区域。
|
||||
|
||||
你还可以在图像上添加线条和文本。你还可以更改图像的色调。
|
||||
|
||||
你也可以像其他[画图应用][3]一样从头开始创建图像。
|
||||
|
||||
批处理编辑选项可让你同时为多张图片调整大小、转换文件格式和添加滤镜。
|
||||
|
||||
![Batch Editing Feature in Photoflare | Photo Credit: Photoflare website][4]
|
||||
|
||||
### Photoflare 的功能
|
||||
|
||||
为了方便参考,我将列出 Photoflare 的主要功能:
|
||||
|
||||
* 创建/绘制图像
|
||||
* 裁剪图像
|
||||
* 旋转图像
|
||||
* 调整图像大小
|
||||
* 使用画笔、油漆桶、喷涂、模糊工具和图像等工具编辑图像
|
||||
* 在图像上添加线条和文字
|
||||
* 更改图像的色调
|
||||
* 添加老照滤镜
|
||||
* 批量调整大小、滤镜等
|
||||
|
||||
|
||||
|
||||
### 在 Linux 上安装 Photflare
|
||||
|
||||
![][5]
|
||||
|
||||
在 Photoflare 的网站上,你可以找到定价以及每月订阅的选项。但是,应用是开源的,它的[源码可在 GitHub 上找到][6]。
|
||||
|
||||
应用也是“免费”使用的。[定价/订购部分][7]用于项目的财务支持。你可以免费下载它,如果你喜欢该应用并且会继续使用,请考虑给它捐赠。
|
||||
|
||||
Photoflare 有[官方 PPA][8],适用于 Ubuntu 和基于 Ubuntu 的发行版。此 PPA 可用于 Ubuntu 18.04 和 20.04 版本。
|
||||
|
||||
打开终端,逐一输入下面的命令安装 Photoflare:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:photoflare/photoflare-stable
|
||||
sudo apt update
|
||||
sudo apt install photoflare
|
||||
```
|
||||
|
||||
要从基于 Ubuntu 的发行版中删除 Photoflare,请使用以下命令:
|
||||
|
||||
```
|
||||
sudo apt remove photoflare
|
||||
```
|
||||
|
||||
最好也删除 PPA:
|
||||
|
||||
```
|
||||
sudo add-apt-repository -r ppa:photoflare/photoflare-stable
|
||||
```
|
||||
|
||||
**Arch Linux** 和 Manjaro 用户可以[从 AUR 获取][9]。
|
||||
|
||||
Fedora 没有现成的软件包,因此你需要获取源码:
|
||||
|
||||
[Photoflare source code][6]
|
||||
|
||||
### Photoflare 的经验
|
||||
|
||||
我发现它与 [Pinta][10] 有点相似,但功能更多。它是用于基本图像编辑的简单工具。批处理功能是加分。
|
||||
|
||||
我注意到图像在打开编辑时看起来不清晰。我打开一张截图进行编辑,字体看起来很模糊。但是,保存图像并在[图像查看器][11]中打开后,没有显示此问题。
|
||||
|
||||
总之,如果你不需要专业级的图像编辑,它是一个不错的工具。
|
||||
|
||||
如果你曾经使用过或会去尝试它,请分享你的 Photoflare 使用经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/photoflare/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][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/lujun9972
|
||||
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/Photoflare.jpg?ssl=1
|
||||
[2]: http://photofiltre.free.fr/frames_en.htm
|
||||
[3]: https://itsfoss.com/open-source-paint-apps/
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/batch_editing_photoflare.png?ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/photoflare-editor-linux.png?resize=800%2C580&ssl=1
|
||||
[6]: https://github.com/PhotoFlare/photoflare
|
||||
[7]: https://photoflare.io/pricing/
|
||||
[8]: https://launchpad.net/~photoflare/+archive/ubuntu/photoflare-stable
|
||||
[9]: https://aur.archlinux.org/packages/photoflare-git/
|
||||
[10]: https://itsfoss.com/pinta-new-release/
|
||||
[11]: https://itsfoss.com/image-viewers-linux/
|
Loading…
Reference in New Issue
Block a user