Tag：distance

Time：2020715
Recently, I encountered a problem. I need to calculate the distance between the point in the plane and the straight line. I found that the mathematical knowledge was returned to the teacher. After Du Niang, I found the calculation method, which is hereby recorded. Calculation formula from point to line: Through the formula derivation, the […]

Time：2020714
Support vector machine Many lines in this diagram can separate the two points. But which one?Intuitively, we will definitely choose the middle one, because it splits the two parts of data most “open” and has the highest fault tolerance rate. The most marginal point here actually plays a very important role. As long as the […]

Time：2020710
The biggest feature added in redis 3.2 is the support for Geo (geographic location) In the current business, the map aspect is to call Gaode API (cloud image), and the request will be delayed. However, redsigeo can find the nearby terminal and measure the linear distance between two points (with error) 1. Geoadd: add the […]

Time：202077
Address: https://leetcodecn.com/probl…repoAddress: https://github.com/pigpigever… Topic analysis The Hamming distance between two integers refers to the number of different binary positions corresponding to the two numbers. Give two integers x and y, and calculate the Hamming distance between them. For example, there are two binary values: 001 100 The Hamming distance between them is2What we need is […]

Time：202073
1. Euclidean distanced(x,y) = √( (x[1]y[1])^2 + (x[1]y[2])^2 + … + (x[n]y[n])^2 )2. Square Euclidean distanceThe distance formula of spark kmeans uses the square Euclidean distance. The square Euclidean distance is the square of the Euclidean distance (excluding the open root sign)d(x,y) = (x[1]y[1])^2 + (x[1]y[2])^2 + … + (x[n]y[n])^2 3. Sum of squared error […]

Time：2020614
Lidar (light detection and ranging) is a widely used hardware sensor in Google’s autopilot technology. 1. Working principle of lidar By continuously emitting the laser beam, the laser beam will reflect when encountering obstacles, and part of the reflection will be received by lidar sensor again. By measuring the round trip time of laser beam […]

Time：2020612
background Recently, a crawler related project needs to exclude some similar links, such as the previous page, the next page and other useless links in the paging control Edit distance algorithm Editing distance, also known as Levenshtein Distance (also known as edit distance), refers to the minimum number of editing operations required between two strings […]

Time：202069
preface Why do you write this?The requirement is that a draggable flow chart drawing function is needed, as shown in the figure: Implementation mode Lines are drawn with canvas, and other elements are implemented with HTML. Key points Third order Bessel curve functionbezierCurveTo。 code analysis 1. Get the data: list = [ { id: 1, […]

Time：202066
introduce vuedisbounceIt’s based onVue.jsCan effectively avoid triggeringh5Page iniosBrowser builtin dropdownbounceeffect. assembly <template> <div :style=”{‘backgroundcolor’:backgroundColor }” class=”vdwrapper” > <div class=”vd” ref=”vd” > <slot></slot> </div> </div> </template> <script> export default { name: “vd”, props: { backgroundColor: { type: String, default: “#ffffff” } }, data() { return {}; }, mounted() { this.vd = this.$refs[“vd”]; this.vd.addEventListener(“touchstart”, this.touchstartEvent); this.vd.addEventListener(“touchmove”, this.touchmoveEvent, […]

Time：202064
introduction Yesterday, a buddies of the official account and I discussed an interview question. Personally, it was more meaningful. I arranged it here to share it with you. The interview question is relatively simple: “let you realize the function of a nearby person, what plan do you have?” In fact, this question is mainly to […]

Time：202063
preface Recently, I saw a cool but easy to achieve Pseudo 3D image effect. The effect is as follows: Now let’s see how to implement it. stores reserve The materials we need to prepare are: A picture. Depth map of the above picture. What is depth map? Depth map is a kind of image that […]

Time：2020521
1. Euclidean distanced(x,y) = √( (x[1]y[1])^2 + (x[1]y[2])^2 + … + (x[n]y[n])^2 )2. Squared Euclidean distanceThe distance formula of spark kmeans uses the square Euclidean distance. The square Euclidean distance is the square of the Euclidean distance (without the root sign)d(x,y) = (x[1]y[1])^2 + (x[1]y[2])^2 + … + (x[n]y[n])^2 3. Sum of squared error (SSE)The […]