Directory Introduction to Ray/Raycast/Linecast//OverlapSphere Ray class Physics.Raycast method Application 1: Realize mouse click to emit rays and detect objects Application 2: Implement mouse click and drag objects Physics.Linecast and Physics.OverlapSphere Application 3: Trigger attack when entering range Introduction to Ray/Raycast/Linecast//OverlapSphere Ray (Ray class) is an infinitely long line emitted from a point in one direction […]
Tag: erl
Realize timed task parsing headerless .csv file into pgsql library (java, SpringBoot)
1. Scheduled tasks package cn.com.dhcc.sspcsystem.data; import cn.com.dhcc.sspcsystem.entity.ElectronicFenceInfo; import cn.com.dhcc.sspcsystem.mapper.ElectronicFenceInfoMapper; import cn.com.dhcc.sspcsystem.util.CsvImportUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import com.alibaba.fastjson.JSONArray; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.stereotype.Component; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author stb * @date 2023-05-24 * @description Synchronize XXX data regularly */ @Slf4j @Component […]
Bitmap/hyperloglog/GEO of Redis
bitmap/hyperlog/GEO of Redis Introduction of interview questions Two types of statistics three hyperloglog 3.1 Industry Terminology 3.2 hyperloglog basis 3.2.1 Base 3.2.2 Definition 3.2.3 Cardinality statistics 3.2.4 Basic commands 3.3 Principle of HyperLogLog 3.3.1 Ways to deduplicate statistics 3.3.2 Principle 3.4 HyperLogLog case study 3.4.1 Requirements 3.4.2 Scheme Discussion 3.4.3 HyperLogLogService Four geos 4.1 Introduction […]
[Data structure]—heap sorting + TOP-K problem (understand the underlying principle of game ranking)
Article directory foreword 1. Two ways to build heaps: 1.1 Adjust upward to build the heap (heap sort): 1.1.1 Complete code: 1.1.2 Flowchart (taking small heap as an example): ascending order: building a large heap 1.1.3 Flowchart (taking the small heap as an example): descending order: building a small heap 1.2 Adjust the heap building […]
When the operator()() overload function of the function template is defined as the thread function of thread()
Directory-Three forms of starting thread function 1. When passing in ordinary function pointers as thread functions (introducing the precautions for passing in references) 2. When passing in a function object as a thread function (calling the operator()() overloaded function that declares the function template) 1. Call the class directly 2. Instantiate the class object 3. […]
Build Serverless applications with Spring Cloud
Using Spring Cloud to build Serverless applications 1. Introduction to Serverless 1. Concept introduction 2. Features and advantages 3. Application scenarios 2. Introduction to Spring Cloud 1. Concept introduction 2. Spring Cloud framework architecture 3. Main functions 3. Spring Cloud builds Serverless applications 1. The combination of Serverless application and Spring Cloud 2. Installation and […]
Python draws wind pressure and wind direction overlay
Learning Objectives: Master python to draw wind pressure and wind direction overlay Modified from the following two articles https://blog.csdn.net/qiuylulu/article/details/115304020 https://huaweicloud.csdn.net/638079ebdacf622b8df88733.html?spm=1001.2101.3001.6650.4 &utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~activity-4-1198797 64-blog- 115304020.235^v36^pc_relevant_default_base3 &depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~activity-4-119879764-blog-115304020.235^v36^pc_re levant_default_base3 &utm_relevant_index=7 Drawing results – Corresponding drawing code ###Import library package #matplotlib is used to make pictures, including pyplot, ticker and other functions for drawing pictures #numpy simple calculations #cartopy drawing […]
The underlying core principle of Hystrix
1. Hystrix resource isolation technology hystrix github official documentation: Home Netflix/Hystrix Wiki GitHub Hystrix can complete common protection functions such as isolation, current limiting, fusing, and degradation. The isolation of hystrix is divided into thread pool isolation and semaphore isolation 1.1, Semaphore isolation Semaphore isolation is the current limiting function of hystrix. Although the name […]
Spring underlying core principles and handwritten simulation implementation
Series article directory Article directory Series Article Directory spring container Handwritten Spring container Pass in a Java configuration class @ComponentScan annotation class The Spring container obtains the scanning package path through the AppConfig configuration class Load all classes through the package path to obtain bean information Create a singleton bean through beanDefinitionMap @Autowired annotation class […]
[Data structure] Hash underlying structure
Directory 1. Hash concept 2. Hash implementation 1. Closed hashing 1.1. Linear detection 1.2. Second detection 2. Open hash 2.1. The concept of open hashing 2.2, Open hash structure 2.3. Open hash lookup 2.4. Open hash insertion 2.5. Deletion of open hash 3. Performance Analysis 1. Hash concept In the sequential structure and balanced tree, […]