Tag:time

  • Atomic operation of redis auto incrementing incr to set expiration time (Lua & PHP Implementation)

    Time:2021-4-20

    The auto increment operation of redis does not have a native expiration time setting. It can only auto increment first and then set the expiration time through expiration. If the expiration time setting fails under special circumstances, it will lead to business errors. The following is based on PHP and Lua script to write a […]

  • Docker defines time zone

    Time:2021-4-20

    cause Since most of the docker images we use are in UTC time, and China is in + 8 time zone, it is very troublesome to localize. In this way, we need a way to define the docker time zone. How to control time zone in Linux In Linux system, there are two main places […]

  • Auction system design (knowledge transfer of seckill system)

    Time:2021-4-19

    Since finishing the article of seckill system (PHP + golang commodity seckill) last time, knowledge migration is a new project, commodity auction. Technology: PHP, mysql, redis, laravel Business objects: goods, sessions and orders Bidding process: 1、 Crud of goods, auction sessions and orders;2、 The information of seconds, goods and inventory will be written into redis […]

  • React Performance Optimization — using react Redux

    Time:2021-4-18

    React rendering mechanism The previous onearticleI have introduced the rendering mechanism of react In short, when the page is opened at the beginning, react will call the render function to build a DOM tree. When the state / props changes, the render function will be called again to render another virtula dom. Then, react will […]

  • You can use it: redisson distributed read-write lock component, with webfilter to release your hands

    Time:2021-4-18

    scene Previously on: https://segmentfault.com/a/11… In order to solve the problem of transaction visibility caused by Max (ID), the gap lock is used initially, but the gap lock locks the table, which has a great impact on concurrency, so we consider using distributed read-write lock with finer granularity. Read write lock Read write lock principle, read […]

  • Interviewer: do you really know redis distributed lock?

    Time:2021-4-18

    What is distributed lock When it comes to redis, our first thought function is to cache data. In addition, redis is often used for distributed locking because of its single process and high performance. As we all know, locks are used as synchronization tools in programs to ensure that shared resources can only be accessed […]

  • What can. Net ORM navigation properties solve?

    Time:2021-4-18

    Write at the beginning From the earliest single table operation, Later, I contacted left join, right join and inner join queries, Because of the limited funds, we need to deal with the actual needs in multi table query. Do you have such experience? This paper explains the design idea of navigation attributes (manytoone, onetomany, manytomany) […]

  • Time travel under Linux

    Time:2021-4-17

    Time travel? The bridge in the movie, right? Liangxu, are you bluffing again? No, it’s not. Maybe I’ll introduce the touch command here. With it, you can change the timestamp to achieve the purpose of time travel. Touch command is also frequently used in our work. Let’s explain it in detail from shallow to deep. […]

  • One of the functions of line height

    Time:2021-4-17

    HTML structure: <div class=”money-options active”> < p class = “TXT” > monthly membership</p> <p class=”money”>¥XX</p> < p class = “times” > 1 month</p> </div> CSS structure: .money-options { display: inline-block; width: 106px; height: 108px; /*Line height: 1; * // * when there is no line height*/ margin-right: 10px; border: 1px solid #D7D7D7; border-radius: 8px; text-align: […]

  • How to modify the default port number of react

    Time:2021-4-16

    problem We often encounter this situation when we use react, the 3000 port number is occupied. Sometimes we can turn off Port 3000, but more often, when we need to open multiple projects, we have to open multiple ports. At this time, you need to modify the default port number. terms of settlement Modify the […]

  • How to store time in database

    Time:2021-4-16

    1. Don’t use string to store date I remember doing this when I was in University, and now many novices who don’t know much about databases do the same. It can be seen that this method of storing dates has some advantages, that is, it is simple and straightforward, and easy to use. However, this […]

  • Using canvas to realize web gesture unlocking

    Time:2021-4-16

    Recently, I took part in the front-end Star project of 360 summer vacation. There is an online assignment. The deadline is March 30. Let me manually unlock an H5 gesture. The specific effect is just like that of the original mobile phone. The final effect of the implementation is as follows: The basic requirement is […]