• Clear the log file being written (qbit)


    Test environment of this paper Ubuntu 20.04 MongoDB 4.4 command >Mongod.log # recommendation true >mongod.log echo >mongod.log echo “”>mongod.log truncate -s 0 mongod.log cat /dev/null > mongod.log cp /dev/null mongod.log dd if=/dev/null of=mongod.log These methods can also be used for emptyingtomcatOfcatalina.out This article comes fromqbit snap

  • JS code fragment: utils / lcaalstorage / cookie


    Utils utility function /** * Finding all the occurrences of an element in Array * @returns {Array} */ indexOfAll = function (array, element) { var indices = [], idx; idx = array.indexOf(element); while (idx !== -1) { indices.push(idx); idx = array.indexOf(element, idx + 1); } return indices; }; /** * Calculate the length of object […]

  • Implementation of mybatis first level cache and second level cache


    This paper introduces the implementation of the system First level cache: It meansSqlSession. The scope of the first level cache is a sqlsession。MybatisThe first level cache is on by default。 In the same sqlsessionExecute the same SQL queryFor the first time, query the database and write it to the cache; The second time it is […]

  • You need TCL 8.5 or new in order


    problem When Linux installs redis6. X, the following error occurs after make test You need tcl 8.5 or newer in order to run the Redis test resolvent 1. Install the new TCL directly. The command is as follows: yum install -y tcl-devel 2. Clear the cache of make before: make distclean 3. Recompile make command: […]

  • Why use it in block__ Strong life again, weak object?


    At this time, I was asked a question about block in an interview. I exclaimed “good question” (I haven’t thought about it before). Now I want to think about it again __weak __typeof(self)weakSelf = self; Block(param) ^{ __strong __typeof(weakSelf)strongSelf = weakSelf; // Do stuff }); First, when there is no weakself, block will make a […]

  • Espnet / espnetv2: hole convolution pyramid | lightweight network


    The core of espnet series lies in the hole convolution pyramid. Each layer has different division rates. It can fuse multi-scale features without increasing parameters. Compared with depth separable convolution, depth separable hole convolution pyramid has higher cost performance ratio. In addition, HFF multi-scale feature fusion method is also worth learning  Source: Xiaofei’s algorithm Engineering […]

  • What’s the difference between SQL | delete, truncate and drop?


    When it comes to the key words of deleting table data, the most you remember is probably delete However, we do database development, read database data. The other two brothers are less used Now let’s introduce the other two brothers. They both delete table data, which is easy to understand   Drop Occasion: drop table […]

  • [database] redis (1) — Introduction to redis and environment installation configuration


    1. Introduction to redis Redis is an open source, memory based database structure storage system. It is a no SQL database based on cache read-write. It also supports data persistence. Redis supports high-performance storage of multiple data volumes. At present, it is widely used in database, cache and message middleware by major enterprises. Redis supports […]

  • Mybatis architecture, the last one


    L2 cache Main contents: The second level cache is built on top of the first level cache. When a query request is received, mybatis will query the second level cache first. If the L2 cache misses, query the L1 cache again. Unlike the first level cache, the second level cache is bound to a specific […]

  • Mybatis L1 cache and L2 cache


    preface Interviewer: worm, you know about mybatis cache in your resume. Can you tell me the difference between level 1 cache and level 2 cache? Bug: I only know that this is used to cache SQL query data Interviewer: no? Bug: no more Interviewer: do you know where the company is? Go by yourself or […]

  • Front end bug record – input digital verification exception


    I shared it two days agoAttributes and characteristics of input. A little friend stepped on thunder yesterday.So there’s material Small partners do real name authentication (mobile terminal) related functions, and then there is a location verificationOnly numbers can be entered。The little friend questions the soul:Why?1.don’t worry1..It’s empty?This question tells usIt’s OK to drink a little, […]

  • Detailed explanation of MySQL creation timing task


    Since MySQL 5.1.6, a very special function event scheduler has been added, which can be used to execute certain specific tasks regularly, instead of the work that can only be executed by the scheduled tasks of the operating system. The event scheduler is sometimes called temporary triggers, because the event scheduler is triggered based on […]