• Three update methods in unity


    There are three update methods in unity: update, fixedupdate and lateupdate. These three update methods are applied to different situations. Update update Update is called every time a new frame is rendered, which is closely related to machine performance. If the performance of the machine is poor or the scenario is complex, the update frequency […]

  • Talk about ackka mode for spring


    order This article mainly describes the ackmode option of spring for Kafka consumer when spring.kafka.consumer.enable-auto-commit is false AckMode spring-kafka-1.2.3.RELEASE-sources.jar!/org/springframework/kafka/listener/AbstractMessageListenerContainer.java$AckMode /** * The offset commit behavior enumeration. */ public enum AckMode { /** * Commit after each record is processed by the listener. */ RECORD, /** * Commit whatever has already been processed before the next […]

  • A binary substring algorithm that the interviewer can’t solve?


    Author | jesksonSource: dada front end TavernNuggets| https://juejin.im/user/5a16e1… Algorithm Title: Given a string s, the calculation hasSame quantity 0 and 1YesNon emptyThe number of (consecutive) substrings, and theAll 0’s and all 1’s are grouped together。 RecurringSubstringCount the number of times they appear. Example 1: Input: “00110011”Output: 6Explanation: there are 6 substrings with the same number […]

  • Case sharing | enhance user participation through personalized online sports content


    This is a guest article by pulselive’s mark wood. “Pulselive is from the UK and is the best digital partner for many well-known sports brands,” the citation said Background At pulselive, the experience we bring to sports fans has become an indispensable part of sports events: from the official website of Cricket World Cup to […]

  • What are PDF, PMF and CDF


    I still remember reading an article some time ago, which was to investigate what everyone did during the epidemic period. One of the articles was that we finally found out the difference between PDF and CDF during the epidemic period. Pdf, PMF and CDF are easily confused. Let’s take a look at these concepts today. […]

  • Design data structure to implement a lfucache


    Title Description This is from leetcode“460. LFU cache”The difficulty is“Difficulties”。 Tag: “linked list“, “bidirectional linked list”, “design” Please help meLeast frequently used (LFU)Cache algorithm design and implementation of data structure. realizationLFUCacheClass: LFUCache(int capacity)-Using the capacity of data structure  capacityInitialization object int get(int key) – Gets the value of the key if it exists in the cache, […]

  • [algorithm] – live series of Ditai Software Institute


    Single element search describe Except for one element, the other elements in the integer array are repeated N times. To find out the single element, it is necessary to ensure that the time complexity is within o (n). Consider the case of n = 2, n = 3;Consider the case that except one element appears […]

  • How to limit the request flow in ASP. Net core


    Translation link:https://www.infoworld.com/art… In application development, you may have the idea of controlling the request frequency of users to prevent malicious attacks of some users. Specifically, in order to prevent the well-known denial of service attacks and limit the access times of an IP in a period of time, to solve this problem, we need to […]

  • Principle and application of NTP network time server (clock system)


    Principle and application of NTP network time server (clock system)Principle and application of NTP network time server (clock system)1. PrefaceIf a distributed system composed of computer network systems wants to be coordinated, millisecond or even microsecond time synchronization is one of the important foundations for business processing such as “shooting on the hour”, “second killing” […]

  • Questions on leetcode database


    1. Find duplicate email Own idea (wrong) SELECT a.Email FROM Person a,Person b WHERE a.Email = b.Email Results: all of them appeared in the tableSolution: calculate the number of times each email exists SELECT Email FROM Person GROUP BY Email HAVING COUNT(Email)>1 Solution 2: create a temporary table SELECT Email FROM( SELECT Email,COUNT(Email) as num FROM Person […]

  • Implementation of keepalive source code of nginx


    Author: XRS online school – Huang Tao What is the biggest difference between HTTP1.1 and http1.0? The answer is that the HTTP 1.1 protocol enables keep alive by default, as shown in the request header of HTTP 1.1 What is keeping alive? What is the role? Keepalive is a mechanism that can detect dead connections […]

  • Leaping game II


    Jump game II I’ll copy the title here~ Given an array of nonnegative integers, you are first in the array. Each element in the array represents the maximum length you can jump at that position. Your goal is to reach the last position of the array with the least number of jumps. Example: Input: [2,3,1,1,4] […]