Origin of Ray

Lift the fog of the Internet together

Recently read a few articles on the principle of the browser, the browser rendering process has a more systematic understanding, here is a brief summary and by the way under the cliché rearrangement and repaint is how to go.

Read more »

In上一篇博客We talked about variable hoisting in javascript from the perspective of execution mechanism and context.

It is precisely because of the existence of variable promotion in JavaScript, which leads to a lot of code that is not intuitive, which is also an important design flaw of JavaScript.

Although ECMAScript 6 (hereafter referred to as ES6) has avoided this design flaw by introducing block-level scopes and using the let and const keywords, due to JavaScript’s need to maintain backward compatibility, variable promotion will continue for quite some time. This also makes it more difficult for you to understand the concept, because to understand both the new mechanism and the variable promotion mechanism, the key point is that these two mechanisms run in “one” system at the same time.

Read more »

Only by understanding the execution context of JavaScript can you better understand the JavaScript language itself, such as variable promotion, scope, and closure. Not only that, but understanding the concepts of execution context and call stack can also help you become a more qualified front-end developer. This time we will talk about variable promotion in js from a context perspective.

Read more »

Last week’s blog we discussed and implemented the topological sorting of graphs. This week we continue to learn another basic algorithm of graphs, the shortest path algorithm Dijkstra algorithm, and how to transform it into our usual navigation or games. The pathfinding algorithm used.

Read more »

Today, I read an article about the ideas and applications of topological sorting, and I manually implemented it.

Data structure

Algorithms are built on concrete data structures. For this problem, let’s first look at how to abstract the problem background into concrete data structures.

We can abstract the dependency relationship between source files and source files into a directed graph. Each source file corresponds to a vertex in the graph, and the dependency relationship between source files is the edge between the vertices.

If a executes before b, that is, b depends on a, then between vertices a and b, build an edge from a to b. Moreover, this graph must not only be a directed graph, but also a Directed Acyclic Graph, that is, there cannot be a circular dependency like a- > b- > c- > a. Because once a ring appears in the graph, topological sorting cannot work. In fact, topological sorting itself is an algorithm based on Directed Acyclic Graph.

Read more »

This week POC several penetration testing tools, namely Burp Suite, OWASP Zap.

Many of the features of Burp are charged, and the free version is basically only used for request interception.

So finally chose Zap to scan a vulnerability fix for an Express project. Here is a brief record of the Zap tutorial and some security practices of Express.

Read more »

Last week, when using an elementUI table, I found that every time I click on the checkbox of the table, the page will be stuck for close to two seconds, so I used vue’s devtools to record where the operation time is consumed each time. It was found that the main reason is that although the elementUI table provides tree data and lazy loading functions, although the child nodes are not expanded, they have already been rendered.

Therefore, the elementUI table provides the function of lazy loading, but this lazy loading function is problematic, because the lazy loading function will only be called once, and no matter how the data is changed in the future, the sub-node will not change.

After analyzing the source code of vue and elementUI, I found the reason and fixed it appropriately. I will record it here.

Read more »

The previous six blogs have helped us basically understand the concepts and principles of the responsive principle of vue, Data drive, component and component update, and the part about component and component update, we are based on the existing render function, that is to say, we already have vnode, and then discuss how vnode renders and updates.

In this blog, we will go back and see how the compiler of vue turns template into render function.

** What are the benefits of understanding the compile process? I personally think it can help us have a better understanding of the principles of some of vue’s own syntactic sugar. **

Since there are many details of Compiler, there is probably a conclusion and impression. Many of them will not go into detail about the syntax processing of vue itself, but will only use slot as an example.

Read more »

Data structures and algorithms are a very large range, and various problems require different algorithms, which are either complex or simple. This blog simply introduces four very basic and commonly used algorithm ideas through classic knapsack problems, namely greed, divide and conquer, backtracking, and motion rules.

These four are algorithm ideas, not specific algorithms, mainly to understand their ideas, not specific implementations.

This article is mainly to help me re-summarize the knowledge points that were slightly scattered before, so a lot of specific content is in other previous blogs.

Read more »

We usually work will often use SringA.indexOf (StringB) this substring lookup function, if we let ourselves implement, how will we achieve?

This time we record the four string matching algorithms we often say, namely BF, RK, BM and KMP algorithm.

The first two easy to think of, is also very simple, the latter two can understand the principle, these two algorithms are more difficult to understand the two, even if you understand it is difficult to write a bug-free program.

Read more »
0%