Tag:distance

  • JavaScript mobile drag element

    Time:2020-11-21

    Code implementation: Document body { background-color: #1cee89; } div { position: absolute; left: 0; width: 100px; height: 100px; background-color: #8294ff; border-radius: 20px; } var div = document.querySelector(‘div’); Var startx = 0; // get the initial coordinates of fingers var startY = 0; Var x = 0; // get the original position of the box var […]

  • 4 kinds of LBS “nearby people” implementation scheme, everyone can understand

    Time:2020-11-13

    This article is included in personal blog: http://www.chengxy-nds.top , technical data sharing and learning together 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 […]

  • HTML elements such as height, offsetHeight, clientheight, scrolltop, etc

    Time:2020-11-12

    About some attributes of elements In the daily development of the front-end, we often need to obtain or listen to some page properties, so we need to understand the meaning of some properties to better use these properties. Especially the following: Dimension correlation: offsetHeight, clientheight, scrollheight; Offset correlation: offsettop, ClientTOP, scrolltop, pageyoffset, scrolly; Get the […]

  • KNN principle and Python code implementation

    Time:2020-11-3

    1、 Principle 1. Overview If the nearest neighbor algorithm does not depend on the basic condition of the machine learning, it will have a better learning effect. 1.1 core ideas Birds of a feather flock together. As the saying goes, “to see whether a man is good or not depends on the friends around him […]

  • In flex layout, the height of the parent element is auto, which is supported by one child element, and the other child element is adaptive to the height

    Time:2020-11-3

    Overall style: . expressrecord single close {// parent element style width: 100%; height: auto; display: flex; justify-content: flex-start; Align items: Center; // key stretch position: relative; } The height of the right child element to expand the parent element: .expressRecord-text { margin-left: 30rpx; padding-bottom: 20rpx; flex-shrink: 0; flex: 1; } The style of left child […]

  • Knnimputer: a reliable missing value interpolation method

    Time:2020-10-26

    By KaushikCompile | VKSource | analytics vidhya summary Learn to use knnimputer to fill missing values in data Understanding missing values and their types introduce The knnimputer of scikit learn company is a widely used missing value interpolation method. It is widely considered as an alternative to traditional interpolation techniques. In today’s world, data are […]

  • 3. SVM support vector machine

    Time:2020-10-24

    Idea: find a curve so that the minimum distance between all sample points and this curve is the maximum Distance from point x to line: $$ l = \frac{1}{{\left\| w \right\|}}({w^T}x + b) $$ For two categories, Y values are only – 1 and 1, then the same sign indicates that the classification is correct, […]

  • Leetcode week, which babies can understand – 171 – 4

    Time:2020-10-14

    1320. Minimum distance of two finger input Hi, everyone. I’m a pig. Welcome to the weekly leetcode quiz of the “baby can understand” series. This is the fourth question in issue 171 and 1320 in the list of questions — “the minimum distance of two points input” Title Description The layout of two finger input […]

  • Leetcode Weekly – 171 – 4

    Time:2020-10-14

    1320. Minimum distance of two finger input Hi, everyone. I’m a pig. Welcome to the weekly leetcode quiz of the “baby can understand” series. This is the fourth question in issue 171 and 1320 in the list of questions — “the minimum distance of two points input” Title Description The layout of two finger input […]

  • Step by step realization of nest particle effect

    Time:2020-10-13

    This article first appeared on my blog. This is my GitHub. Welcome to star.   this blog is imitation nest.js Implement ademoFrom simple to complex, step by step. Here is the preview of the effect. There are many other front-end ones in my GitHubdemoYou can order it if you likestarYour support is my motivation. Start […]

  • Yai request preprocessing script

    Time:2020-10-3

    var token = getToken(); var username = “****”; var password = “****”; if (token === null){ context.promise = getNewToken().then((data) => { //Set the current request token context.query.token = data.token; saveToken(data.token, data.expires) }) }else{ context.promise = new Promise(function(resolve) { context.query.token = token; resolve() }) } function getNewToken(){ return new Promise(function(resolve) { var api = context.utils.axios.post(‘http://’+context.hostname+’/api/admin/login’, { […]

  • Sorting and analysis of loss function in face recognition

    Time:2020-9-30

    catalog Write it at the front Cross-Entropy Loss (softmax loss) Contrastive Loss – CVPR2006 Triplet Loss – CVPR2015 Center Loss – ECCV2016 L-Softmax Loss – ICML2016 A-Softmax Loss – CVPR2017 AM-Softmax Loss-CVPR2018 ArcFace Loss – CVPR2019 Euclidean distance or angular distance and normalization reference resources Blog: blog Garden CSDN blog Write it at the front […]