Tag:Old value

  • AtomicInteger

    Time:2020-9-5

    CAS introduction The full name of CAS is compare and swap, which is simply interpreted as comparison and exchange. This process actually takes place in memory and should be said to be an operation process of assembly language. AtomicInteger Incrementandget() method to add 1 to the current value and return. // AtomicInteger.java public final int […]

  • The inputnumber counter component of element UI skips the specified number

    Time:2020-8-9

    It can be seen from the official documents that this component allows to define the step number control of increment and decrement <template> <el-input-number v-model=”num” :step=”2″ step-strictly></el-input-number> </template> <script> export default { data() { return { num: 2 } } }; </script> However, skipping a specified number is not supported, for example: <template> <el-input-number v-model=”num” […]

  • The same solution as the old and new data values monitored by watch in Vue

    Time:2020-7-31

    When monitoring an object in an array with watch recently, it is found that the new value and the old value of the monitored object are the same as the old value. However, when the object ratio changes, the changed value can still be monitored. The solution is as follows: data:{ dataList:{ Name: ‘Zhang San’, […]

  • Java Concurrent Programming – 12 atomic classes

    Time:2020-6-19

    background Multithreading updates the value of variables, which may not get the expected value. Of course, adding the synchronized keyword can solve the problem of thread concurrency.Here is another solution to the problem, which is located in java.util.concurrent The atomic operation class in the. Atomic package provides a way to update variables with simple usage, […]

  • Redis must know API

    Time:2020-1-21

    Some nonsense 1. Redis is an open-source, key based storage system with multiple data structures and functions.2. Redis supports persistence, does not lose data after power failure, and asynchronously saves data updates to disk.3. Redis supports string, hash, list, set, ordered set, bitmap, unique count of ultra small memory, and geographic information positioning.4. Redis supports […]

  • The problem that [Chinese] can still be input and pasted when the input box type of mobile terminal is number

    Time:2019-12-27

    First of all, this problem is very difficult, because it may be a bug in the browser. When the user enters Chinese in the input box of type = number, this value will not be received, but sometimes it will be displayed. That is, it will be displayed like a normal value, but the parameters […]