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

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

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

🔥 最新文章

nosql数据库的介绍

根据NoSQL官网查阅,结合网上资料做一个简单介绍。

键值数据库

  • 目前使用较多的

  • 特点:

      基于内存数据处理,相对速度最快;数据存储结构最简单,只有key-value形式;对值的查询统计功能支持很弱;由于基于内存数据处理,数据持久性相对较弱。但,redis具备大数据管理能力;事务处理能力弱。
    

An Introduction to NoSQL Databases

Based on what I found at the official NoSQL site, here is a brief introduction combined with material from around the web.

Key-value databases

  • The more widely used ones

  • Characteristics:

      Processes data in memory, so it is relatively the fastest; the data storage structure is the simplest, with only the key-value form; support for querying and aggregating values is very weak; because data is processed in memory, data durability is relatively weak. But redis does have big-data management capabilities; transaction support is weak.
    

查找与排序

查找

1.顺序查找

  • 思路:从线性表的第一个元素开始,逐个将线性表中的元素与被查元素进行比较,如果相等,则查找成功,停止查找;若整个线性表扫描完毕,仍未找到与被查元素相等的元素,则表示线性表中没有要查找的元素,查找失败。
  • 最好情况下,第一个元素就是要查找的元素,则比较次数为1次
  • 最坏情况下,最后一个元素才是要找的元素,或者在线性表中,没有要查找的元素,则需要与线性表中所有的元素比较,比较次数为n次
  • 平均情况下,大约需要比较n/2次

Searching and Sorting

Searching

1.Sequential search

  • Idea: start from the first element of the linear list and compare the elements of the list with the element being searched for one by one. If they are equal, the search succeeds and stops; if the whole linear list has been scanned and no element equal to the target has been found, that means the linear list does not contain the element being searched for, and the search fails.
  • In the best case, the first element is the one being searched for, so the number of comparisons is 1
  • In the worst case, the last element is the one being searched for, or the linear list contains no such element at all; then every element in the list must be compared, and the number of comparisons is n
  • On average, about n/2 comparisons are needed

树与二叉树

树

树,不是我们常见的长在土里的树木,而是计算机语言中的一种结构。

  • 树是一种简单的非线性结构

    • 父节点
      • 树结构中,每一个节点只有一个前件,称为该节点的父节点;没有前件的节点只有一个,称为树的根节点,简称树的根
    • 子节点和叶子节点
      • 树结构中,每一个节点可以有多个后件,称为该节点的子节点。没有后件的节点称为叶子节点

Trees and Binary Trees

Trees

A tree is not the kind of tree we usually see growing in the soil, but rather a structure in computer languages.

  • A tree is a simple non-linear structure

    • Parent node
      • In a tree structure, every node has only one predecessor, which is called that node’s parent node; there is exactly one node with no predecessor, and it is called the root node of the tree, or simply the root of the tree
    • Child nodes and leaf nodes
      • In a tree structure, every node can have multiple successors, which are called that node’s child nodes. A node with no successors is called a leaf node

算法、数据结构、线性结构、栈、队列

算法

1.算法的基本特征

  • 可行性
    • 步骤实现,执行结果达到预期
      • 确定性
    • 步骤明确
      • 有穷性
    • 有限的时间完成
      • 拥有足够的情报
    • 拥有足够的输入信息和初始化信息

Algorithms, Data Structures, Linear Structures, Stacks, Queues

Algorithms

  1. Basic characteristics of an algorithm

    • Feasibility
      • The steps are implementable and the execution result meets expectations
    • Determinacy
      • The steps are unambiguous
    • Finiteness
      • It completes in a finite amount of time
    • Possessing sufficient intelligence
      • Having enough input information and initialization information

关于kali的一些事

kali用了有一段时间了,谈谈关于使用上的一些事吧。
目前我自己用的就是kali系统,安装在笔记本电脑上,中间也因为升级导致系统崩溃,自己也折腾过好几次。


安装完系统第一件事就是配置软件库

编辑库源指定地址文件(没用leafpad是没安装,用vi或者vim也可以命令操作)

sudo leafpad /etc/apt/sources.list

复制以下库地址

A Few Things About Kali

I’ve been using Kali for a while now, so let me talk about a few things regarding its use.
Right now I run Kali myself, installed on a laptop. Along the way upgrades have crashed the system, and I’ve had to mess around with it several times myself.


The first thing to do after installing the system is to configure the software repositories.

Edit the file that specifies the repository source addresses (I didn’t use leafpad because it wasn’t installed; vi or vim works fine for the command too):

sudo leafpad /etc/apt/sources.list

Copy the repository addresses below:

老鸟程序员才知道的40个小技巧

来源:知乎,作者:大狐狸

链接:https://www.zhihu.com/question/36426051/answer/76031743

1.重构是程序员的主力技能。

2.工作日志能提升脑容量。

3.先用profiler调查,才有脸谈优化。

4.注释贵精不贵多。杜绝大姨妈般的“例注”。漫山遍野的碎碎念注释,实际就是背景噪音。

5.普通程序员+google=超级程序员。

40 Little Tips Only Veteran Programmers Know

Source: Zhihu, author: 大狐狸

Link: https://www.zhihu.com/question/36426051/answer/76031743

  1. Refactoring is a programmer’s main skill.
  1. A work log expands your brain capacity.
  1. Profile first — only then do you have the face to talk about optimization.
  1. Comments are valued for quality, not quantity. Do away with period-like “routine comments”. Comments carped on all over the place are really just background noise.
  1. An ordinary programmer + google = a super programmer.

容器发展史

一、缘起

1.1、鸿蒙

在上古时期,天地初开,一群称之为 “运维” 的人们每天在一种叫作 “服务器” 的神秘盒子中创造属于他们的世界;他们在这个世界中每日劳作,一遍又一遍的写入他们的历史,比如搭建一个 nginx、布署一个 java web 应用…

大多数人其实并没有那么聪明,他们所 “创造” 的事实上可能是有人已经创造过的东西,他们可能每天都在做着重复的劳动;久而久之,一些人厌倦了、疲惫了…又过了一段时间,一些功力深厚的老前辈创造了一些批量布署工具来帮助人们做一些重复性的劳动,这些工具被起名为 “Asible”、”Chef”、”Puppet” 等等…

A History of Containers

I. The Beginning

1.1. Chaos

In ancient times, when heaven and earth had just been separated, a group of people called “operations” spent every day creating their own world inside a mysterious box called a “server”. In that world they labored daily, writing their history over and over, for example setting up an nginx, deploying a java web application…

Most people aren’t actually that clever. What they “created” may in fact be something someone else had already created, and they probably did the same repetitive work every day. Over time, some grew tired of it, exhausted… After a while longer, some deeply skilled old-timers created batch deployment tools to help people with some of the repetitive labor. These tools were named “Asible”, “Chef”, “Puppet” and so on…

php设计模式

设计模式 一书介绍了很多此类概念。当时,我还在学习面向对象 (OO),因此我发现那本书中有许多概念都很难领会。但是,随着越来越熟悉 OO 概念 —— 尤其是接口和继承的使用 —— 我开始看到设计模式中的实际价值。作为一名应用程序开发人员,即使从不了解任何模式或者如何及何时使用这些模式,对您的职业生涯也没有什么大的影响。但是,我发现了解这些模式以及 developerWorks 文章 “五种常见 PHP 设计模式” 中介绍的那些模式的优秀知识后(请参阅 参考资料),您可以完成两件事情:

启用高带宽会话
如果了解设计模式,您将能够更快地构建可靠的 OO 应用程序。但当整个开发团队知道各种模式时,您可以突然拥有非常高的带宽会话。您不再需要讨论将到处使用的所有类。相反,您可以与其他人谈论模式。“我要在这里引用一个单例(singleton),然后使用迭代器遍历对象集合,然后……” 比遍历构成这些模式的类、方法和接口快很多。单是通信效率一项就值得花时间以团队的形式通过会话来研究模式。

PHP Design Patterns

The book Design Patterns introduces a lot of these concepts. At the time I was still learning object orientation (OO), so I found many of the concepts in that book very hard to grasp. But as I became more and more familiar with OO concepts — especially the use of interfaces and inheritance — I began to see the practical value in design patterns. As an application developer, even if you never learn about any pattern, or how and when to use these patterns, it won’t have much of an impact on your career. But I found that after gaining a solid knowledge of these patterns and the ones introduced in the developerWorks article “Five Common PHP Design Patterns” (see Resources), you can accomplish two things:

Enabling high-bandwidth sessions
If you understand design patterns, you’ll be able to build reliable OO applications faster. But when the whole development team knows the various patterns, you suddenly have very high-bandwidth sessions. You no longer need to discuss all the classes that will be used everywhere. Instead, you can talk to the others in terms of patterns. “I’m going to reference a singleton here, then use an iterator to walk the object collection, and then…” is much faster than walking through the classes, methods and interfaces that make up those patterns. The communication efficiency alone makes it worth spending time studying patterns through sessions as a team.

你有多土,就有多穷

1

首先问大家两个问题:

1)为什么爬树和种田最厉害的人,高考不能加分,而作文写得好的蒋方舟、打球打得好的科比和跨栏跑得快的刘翔,大学抢着要?

2)为什么犹太人在历史上两千多年都受尽压迫,近现代却能牛人辈出?

这两个问题不慌回答,看完全文,你自然明白。

现在我们先说本文的主旨:你之所以在城市里过得那么艰辛,成功离你那么遥不可及,可能是因为你还在用农业社会的思维和习惯去生活、工作、社交、投资,你没有适应工商业时代的社会需要。

The More Rustic You Are, the Poorer You Are

1

First, let me ask everyone two questions:

1) Why is it that the people who are best at climbing trees and farming can’t get bonus points on the college entrance exam, while Jiang Fangzhou, who writes good essays, Kobe, who plays basketball well, and Liu Xiang, who runs the hurdles fast, are all fought over by universities?

2) Why is it that the Jews, after more than two thousand years of unrelenting oppression in history, have produced so many remarkable people in modern and contemporary times?

Don’t rush to answer these two questions; read the whole article and you’ll naturally understand.

Now let’s first state the main point of this article: the reason you live so hard in the city and success stays so far out of reach may be that you are still living, working, socializing, and investing with the thinking and habits of an agrarian society — you haven’t adapted to what an industrial and commercial era requires of you.