Tag:distance

  • What else can redis do?

    Time:2021-10-23

    In the previous article, we talked about the usage scenarios of the five basic data types of redis. In addition to string, hash, list, set and Zset, redis also provides some other data structures (of course, it is not a data structure in the strict sense). Let’s see what else redis can do? One bitmaps […]

  • Pit of viewbox of vux UI

    Time:2021-10-17

    The component has a 100% high layout, which can solve some keyboard input problems, but at the same time, it can not automatically hide the URL toolbar and bottom bar when scrolling down in safari. In the viewbox, the element is positioned as absolute, and the effect is equivalent to fixed. When using, you need […]

  • The problem that react does not work when using window.onscroll

    Time:2021-10-15

    In the process of rolling loading, it is found that window.onsrcoll does not work in the react functional component, nor does it work in the life cycle. After several twists and turns, it is finally completed 1. useEffect(()=> { //1. Bind the scroll element and add the scroll event, which will be removed when the […]

  • Basic data structure and algorithm k-means clustering algorithm

    Time:2021-10-12

    origin Recently read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi)This series of notes is intended to use golang exercises K-means clustering algorithm Clustering is when multiple data are input, The operation of grouping “similar” data into groups. K-means algorithm is one of clustering algorithms. Firstly, k points are randomly […]

  • [actual combat] custom scroll bar

    Time:2021-10-2

    Lao Meng‘s Guide: [actual combat] series address:http://laomengit.com/guide/introduction/mobile_system.html By default, the scrolling component of fluent (such as listview) does not display a scroll bar. UseScrollbarShow scroll bar: Scrollbar( child: ListView.builder( reverse: false, itemBuilder: (BuildContext context, int index) { return Card( child: Container( height: 45, alignment: Alignment.center, child: Text(‘$index’), ), ); }, itemCount: 30, itemExtent: 50, ), […]

  • Test 30 problems using k-nearest neighbor (KNN) algorithm

    Time:2021-9-30

    Author | Sunil rayCompile FlinSource | analyticsvidhya introduce If you want to ask me, the two most intuitive algorithms in machine learning are k nearest neighbor (KNN) and tree based algorithms. Both are easy to understand, easy to explain, and easy to show to people. Interestingly, last month we tested the skills of these two […]

  • Use AI to detect behaviors that violate social distance

    Time:2021-9-12

    By Priya DwivediCompile FlinSource | medium introduce Many cities in the United States and Europe are now cautiously reopening. People are asked to keep a safe distance when going out. But do people follow suit? It is very important for cities to evaluate whether people’s safety distance meets the rules and take corresponding actions. If […]

  • Optimization of support vector machine (linear model) for machine learning

    Time:2021-9-11

    Move the middle line parallel to both sides until it passes through one or several training sample points.We record the hyperplane as(W, b)。definition:1. Training data and labels (x_1, y_1) (x_2, y_2)… (x_n, y_n), whereX_iIs a vector, y_ I = + 1 or – 12. A training set is linearly separable Training set: {(x_i, y_i)}_ {i […]

  • Leetcode243. Python implementation of the shortest word distance

    Time:2021-9-5

    Title Requirements: Idea: Define a dist to represent the difference of array subscripts when word1 and word2 appear Traverse the array. If a new value equal to word1 or word2 appears, if word1 appears, subtract the previous subscript of word2 from the current subscript. If the absolute value is less than dist, assign a new […]

  • Algorithm – calculate Hamming distance

    Time:2021-8-29

    Algorithm – calculate Hamming distance 1. Title Give two integers x and Y and calculate the Hamming distance between them. Hamming distanceIt is used in data transmission error control coding. Hamming distance is a concept. It represents the different number of bits corresponding to two words (of the same length). We use d (x, y) […]

  • Redis has three special data types

    Time:2021-8-23

    Geospatial geographic location Positioning of friends, people nearby, calculation of taxi distanceRedis geo is available in redis3.2! This function can calculate the geographical location information, the distance between the two places and the people within a few miles!You can query some test datawww.jsons.cn/lngcode/There are only six commands geoadd #Add geographic location #Rule: two levels cannot […]

  • 3100 Star! Artifact integrating multiple geographic information coding services

    Time:2021-8-23

    [introduction]: geopy is a python library that provides implementations of different geocoding services, allowing developers to easily locate coordinates around the world using third-party geocoding services and other data sources. brief introduction In daily development, we can find many different third-party services for geographic information coding functions, such as OpenStreetMap nominatim, Google geocoding API, etc., […]