欢迎来到 艾瑞可erik 的魔法世界 🧙‍♂️

给我一个需求,还你一个项目——别管它是什么。这就是全栈。

📚 291 篇文章 🏷️ 504 个标签 📂 90 个分类

🔥 最新文章

详解全排列算法

简介

给定 {1, 2, 3, , , n},其全排列为 n! 个,这是最基础的高中组合数学知识。我们以 n=4 为例,其全部排列如下图(以字典序树形式来呈现): 我们很容易想到用递归来求出它的所有全排列。 仔细观察上图, 以 1 开头,下面跟着 {2, 3, 4} 的全排列; 以 2 开头,下面跟着 {1, 3, 4} 的全排列; 以 3 开头,下面跟着 {1, 2, 4} 的全排列; 以 4 开头,下面跟着 {1, 2, 3} 的全排列。

A Detailed Explanation of the Full Permutation Algorithm

Introduction

Given {1, 2, 3, , , n}, its full permutations number n!, which is the most basic high school combinatorics knowledge. Taking n=4 as an example, all of its permutations are shown in the figure below (presented in the form of a lexicographic-order tree): It’s easy to think of using recursion to find all of its full permutations. Look carefully at the figure above: starting with 1, followed by the full permutations of {2, 3, 4}; starting with 2, followed by the full permutations of {1, 3, 4}; starting with 3, followed by the full permutations of {1, 2, 4}; starting with 4, followed by the full permutations of {1, 2, 3}.

为什么不应该使用Markdown来写文档

Python部落(python.freelycode.com)组织翻译,禁止转载,欢迎转发。 Markdown是互联网上最普遍使用的轻量级标记语言。对于写博客和评论这类的任务,用Markdown很棒。不过最近技术社区的人员开始用它来写文档。 下面我列出一些反对使用Markdown的观点,希望能帮助你决定是否适合使用Markdown。如果你在考虑使用Markdown,我希望你也可以关注下Asciidoctor 和Sphinx,我发现用它们写文档更好。 人们选择Markdown是因为它可以很简单的处理一些基本任务。开发者选择它是因为GitHub支持它,尽管GitHub支持9种不同的标记语言,包括 Asciidoc和reStructuredText。但是当文档从几页逐渐增长到大的文档集,Markdown很快就崩溃并成为累赘。下面是这种情况发生的原因。
缺乏一个标准 最初,Markdown是由John Gruber写的initial implementation来定义,但并未明确规定行为规范。 随着Markdown越来越流行,越来越多的站点开始支持Markdown的实现,这些站点是用其它语言写成的,因此产生了更多的Markdown实现。所有这些实现有轻微差别,但都达不到令人接受的程度。 比如有些实现要求开头有一个空格,但另外的一些不做要求:

Why You Shouldn't Use Markdown to Write Documentation

Organized and translated by Python Tribe (python.freelycode.com); reproduction prohibited, sharing welcome. Markdown is the most widely used lightweight markup language on the internet. For tasks like writing blogs and comments, Markdown is great. But recently people in the technical community have started using it to write documentation. Below I list some arguments against using Markdown, hoping to help you decide whether Markdown suits you. If you’re considering Markdown, I hope you’ll also look at Asciidoctor and Sphinx; I’ve found writing documentation with them to be better. People choose Markdown because it handles some basic tasks very simply. Developers choose it because GitHub supports it, even though GitHub supports 9 different markup languages, including Asciidoc and reStructuredText. But when documentation grows from a few pages into a large documentation set, Markdown quickly falls apart and becomes a burden. Here’s why that happens.
Lack of a standard Originally, Markdown was defined by the initial implementation John Gruber wrote, but its behavior was never clearly specified. As Markdown became more and more popular, more and more sites began supporting Markdown implementations, and since those sites were written in other languages, even more Markdown implementations appeared. All these implementations differ slightly, but not in a way that’s acceptable. For example, some implementations require a leading space, while others don’t:

看完此文再不懂区块链算我输,用Python从零开始创建区块链

看完此文再不懂区块链算我输,用Python从零开始创建区块链

源 | 51CTO技术栈整理自互联网 如果你还没有听说过 3 点钟区块链群,说明你还不是链圈的人;如果你还没有加入 3 点钟区块链群,说明你还不是链圈的大佬;如果你还没有被 3 点钟区块链群刷屏,说明你还体会不到什么是“币圈一天,人间一年”。

Read this and still not get blockchain? Building a blockchain from scratch in Python

Read this and still not get blockchain? Building a blockchain from scratch in Python

Source | 51CTO Tech Stack, compiled from the internet. If you have not heard of the 3 o’clock blockchain group, you are not part of the blockchain circle; if you have not joined the 3 o’clock blockchain group, you are not a blockchain big shot; if your feed has not been flooded by the 3 o’clock blockchain group, you do not yet understand what ‘one day in crypto, one year in the mortal world’ feels like.

centos上如何安装steam

最近想把win系统的东西统统转到centos上,偶然发现爱你deepin竟然之steam。去官网查到steam有deb的安装包。 然后就自己尝试把deb转成rpm好像能安装成功就是,总是报错GPU无法渲染,痛苦。

How to Install Steam on CentOS

Lately I wanted to move everything from my win system over to centos, and I happened to discover that deepin actually has steam. I checked the official site and found that steam has a deb installer package. Then I tried converting the deb to rpm myself, and it seemed like it could install successfully, but it always reported an error that the GPU could not render. Painful.

centos如何安装deb软件包/rpm转换成deb(原名:Linux系统下怎么用CheckInstall从源码创建一个RPM或DEB包)

正如我确信,你们一定知道Linux下的多种软件安装方式:使用发行版所提供的包管理系统(aptitude,yum,或者zypper,还可以举很多例子),从源码编译(尽管现在很少用了,但在Linux发展早期却是唯一可用的方法),或者使用各自的低级工具dpkg用于.deb,以及rpm用于.rpm,预编译包,如此这般。

Convert RPM to DEB and DEB to RPM

How to Install deb Packages on CentOS / Convert RPM to deb (originally: How to Create an RPM or DEB Package from Source on Linux with CheckInstall)

As I’m sure you already know, there are many ways to install software on Linux: using the package management system provided by your distribution (aptitude, yum, or zypper, plus plenty of other examples), compiling from source (rarely used anymore, although it was the only available method in the early days of Linux), or using the respective low-level tools — dpkg for .deb, and rpm for .rpm — precompiled packages, and so on.

Convert RPM to DEB and DEB to RPM

centos7安装Redis Desktop Manager的一波三折

一波三折的centos7安装redis desktop 根据官方reids桌面去github下载对应的编译包,然而根目录下3rdparty好多空的文件夹,只好去git上一一对应下载 cd ./src ./configure 后会提示执行 qmake-qt5 如果你直接执行就会报错,找不到命令。与编译已经安装了,没有启用全局命令,你得到安装目录下执行。 例如我的 /usr/lib64/qt5/bin/qmake-qt5 然后执行 make 如果报错cahrts不存在就安装qtcharts

The Twists and Turns of Installing Redis Desktop Manager on CentOS 7

A long and winding road: installing Redis Desktop Manager on CentOS 7. I downloaded the matching source package from GitHub for the official Redis desktop app, but many folders under 3rdparty in the root directory were empty, so I had to go to git and download them one by one. After cd ./src and ./configure, it tells you to run qmake-qt5. If you run it just like that it errors out — command not found. It is already installed and compiled, the global command just isn’t enabled, so you have to run it from the install directory. For example, mine is /usr/lib64/qt5/bin/qmake-qt5. Then run make. If it complains that cahrts doesn’t exist, install qtcharts.

有关php加密的

php加密,最早接触的是php5.3版本,zend的加密技术。解密还要安装扩展运行,解密后的代码不可运行。 php目前官方介绍了几种加密扩展: crack扩展,官方目前不扩绑在php中, caprng扩展,目前支持5.2以上版本, hash扩展, mcrypt扩展,php7.1.0废除,php7.2.0会移到pecl, mhash扩展, openssl扩展,opessl库来对称/非对称加解密,以及 PBKDF2、 PKCS7、 PKCS12、 X509 和其他加密操作, 密码散列算法 API 提供了简单易用的 crypt() 包装, 以一种简洁易用安全的方式创建和管理密码。 网友给出的加密技术: md5加密, crypt加密算法, sha1加密算法, url编码加密技术, Base64信息编码加密。 加密扩展呢,在官方文档里有介绍使用方法,这个大家自己可以去看看。 具体不详细介绍,参考php官方文档http://php.net/manual/zh/

About PHP Encryption

PHP encryption — the first thing I came across was Zend’s encryption technology back in PHP 5.3. To decrypt you also had to install an extension to run it, and the decrypted code would not run. PHP currently officially introduces several encryption extensions: the crack extension, which is currently not bundled into php by the official build, the caprng extension, which currently supports versions above 5.2, the hash extension, the mcrypt extension, which was deprecated in php7.1.0 and will be moved to pecl in php7.2.0, the mhash extension, the openssl extension, which uses the openssl library for symmetric/asymmetric encryption and decryption, as well as PBKDF2, PKCS7, PKCS12, X509 and other cryptographic operations, and the password hashing algorithm API, which provides a simple, easy-to-use wrapper around crypt(), creating and managing passwords in a concise, easy-to-use and secure way. Encryption techniques suggested by netizens: md5 encryption, the crypt encryption algorithm, the sha1 encryption algorithm, URL encoding encryption, and Base64 information encoding. As for the encryption extensions, their usage is explained in the official documentation, and you can go take a look for yourselves. I won’t go into detail here — refer to the official php documentation http://php.net/manual/zh/

会话原理

最近公司招聘新员工,面试中有提到会话原理,我懵了一下。 会话原理是什么? 首先解释一下什么是会话。在计算机术语中,会话是指一个终端用户与交互系统进行通讯的过程,比如从输入账户密码进入操作系统到退出操作系统就是一个会话过程。会话较多用于网络上,TCP的三次握手就创建了一个会话,TCP关闭连接就是关闭会话。用平述的语言可以解释为:你拔打你女友的电话号码,你女友接听,然后一翻“亲爱的”,直到任何一方挂掉电话,这个过程就是一个会话。你挑逗一只小狗,它跟你互动,也是会话;它不鸟你,那就不形成会话。 这不是就是服务端与用户端的通信,或者说用户端登录服务端的认证。 她可以使服务器间的通信,浏览器与网站的通信…… 可以用传统的cookie、session机制实现。也可以用令牌认证实现。这其中包含:创建会话 、认证会话 、获取会话信息、会话时长限制、销毁会话。 通俗的就是一个用户登录到一网站,并浏览网站数据,然后离开的过程。 其实,就是登录认证服务。

How Sessions Work

Recently our company was hiring new employees, and the principle of sessions came up during an interview — I blanked for a moment. What exactly is the principle of sessions? First, let me explain what a session is. In computer terminology, a session refers to the process of communication between an end user and an interactive system; for example, going from typing in an account and password to enter an operating system all the way to logging out of the operating system is one session. Sessions are more commonly used on networks: TCP’s three-way handshake creates a session, and closing a TCP connection closes the session. In plain language you could explain it like this: you dial your girlfriend’s phone number, your girlfriend answers, and then there’s a round of “dear…” until either side hangs up — that whole process is a session. You tease a puppy and it interacts with you, and that is also a session; if it ignores you, then no session is formed. Isn’t this just communication between the server and the client, or in other words the client authenticating by logging into the server? It can enable communication between servers, communication between a browser and a website… It can be implemented with the traditional cookie and session mechanisms. It can also be implemented with token authentication. This includes: creating a session, authenticating a session, retrieving session information, session duration limits, and destroying a session. In everyday terms, it is the process of a user logging into a website, browsing the website’s data, and then leaving. In fact, it is just a login authentication service.