Tag:Counter

  • The interviewer asked: what is the solution to prevent duplicate requests?

    Time:2021-6-11

    background In normal development, we often face the problem of preventing duplicate requests. When the server response to the request involves data modification or state change, it may cause great harm. The consequences of repeated requests are especially serious in the transaction system, after-sales rights protection and payment system. But most of the time, they […]

  • Use of flutter geTx — simple charm!

    Time:2021-6-8

    preface When using bloc, there is a problem that I care about so far. I can’t really interact across pages! After consulting the official documents repeatedly, we use a global bloc to realize the “pseudo” cross page interactionflutter_ Analysis of bloc usage; fish_ Redux’s broadcast mechanism can perfectly realize cross page interaction. I also wrote […]

  • Have to understand the series of current limiting

    Time:2021-5-30

    Brief introduction of current limiting Now when it comes to high availability systems, we will talk about high availability protection means: caching, degradation and current limiting. This blog mainly talks about current limiting. Current limiting is the abbreviation of rate limit, which means that only specified events are allowed to enter the system, and the […]

  • It’s time to upgrade your parquet: IOException: totalvaluecount = = 0

    Time:2021-5-3

    Abstract:When using spark SQL to perform ETL task, an error is reported when reading a table: “IOException: totalvaluecount = = 0”, but there is no exception when writing the table. This article is shared from Huawei cloud community《It’s time to upgrade your parquet: IOException: totalvaluecount = = 0》Author: wzhfy. 1. Problem description When using spark […]

  • How can laravel implement pseudo multiprocessing without using pcntl / pthreads / spool?

    Time:2021-4-30

    introduction As we all know, multiprocess / multithread can execute multiple tasks in parallel / concurrent, which can improve the efficiency. PHP does not support multiprocessing / multithreading by default. You need to install the pcntl / pthreads extension to support it. If you don’t use the framework such as spool, the implementation is more […]

  • Operating system concurrency lock

    Time:2021-4-28

    concept Through the introduction of concurrency, we can see the most basic problem of concurrent programming: due to the interruption on a single processor (or multiple threads executing concurrently on a multi processor), some instructions that we hope can be executed atomically can not run correctly. Lock is the most basic way to solve this […]

  • Carousel, a bootstrap image carousel plug-in

    Time:2021-4-23

    Start: the bootstrap carousel plug-in needs to be introduced carousel.js Or introduce it directly bootstrap.min.js Basic principle: Step 1: set the container for image carousel— Everything else needs to be in this containerThe carousel style is used to give the container an ID value, which is convenient to trigger later with the data attribute. <div […]

  • JVM – 02. Program counter

    Time:2021-4-23

    A series of articles: JVM – 01. What is a JVM JVM – 02. Program counter definition Program counter register effect Remember the execution address of the next JVM instruction characteristic Thread private There will be no memory overflow JVM This work adoptsCC agreementReprint must indicate the author and the link of this article

  • josephus problem

    Time:2021-4-22

    Question type description N people form a circle, starting from the first person to count, the person who reports to m goes out of the circle, and then the next person starts to count again from 1, the person who counts to m goes out of the circle, and so on, until all people come […]

  • Analysis of time consuming method of multi thread scanning folder

    Time:2021-3-20

    ad locumJava methods have thread recursion, do not know what method to run timeEncountered an interesting problem, multi-threaded scan folder for runtime. Generally, this kind of time-consuming scanning folder seems to use recursive traversal for timing. It’s the first time to see this kind of folder and thread. Here we try to solve the problem […]

  • Introduction of iota in golang

    Time:2021-3-14

    iotaIt’s an ancient Greek lettergolangRepresents a constant counter in The rules used are as follows: wheneverconstWhen it appears, it will makeiotaInitialize to 0 constEach new line of constant declaration in theiotaCount once Let’s look at the sample code Const A0 = iota // A0 = 0 // const appears and iota is initialized to 0 […]

  • Write flip array with native JS

    Time:2021-3-3

    Method 1 (user defined function) /*Steps: 1. Declare named function (formal parameter array) 2. Variable storage = new array 3. For sets the body of the loop 4. Counter down traversal 5. Return return value 6. Variable storage = call function (argument) 7. Console print variable output*/ function reverse(printArr) { var newArr = []; for […]