• Delete Linux / Mac temporary files


    Find all the files beginning with test in the root directory, and pass the search results as parameters to RM – RF command for deletion1、find / -name “test” |xargs rm -rf2、find / -name “test” -exec rm -rf {} ;3、rm -rf $(find / -name “test”) If you want to specify the recursion depth, you can do […]

  • Method of adding array in ES6


    ES6 new array operation method When we get the back-end data, we may filter the data. The traditional method is as follows //Take out the array set named Kele in the array let a = [ { name: ‘kele’, Title: ‘Coca Cola’ }, { name: ‘kele’, Title: ‘Fanta’ }, { name: ‘hn’, Title: ‘Red Bull’ […]

  • [title] card grouping – lotcode


    Title: card grouping Given a deck of cards, an integer is written on each card. At this point, you need to select a number x, so that we can divide the whole deck into one or more groups according to the following rules: Each group has X cards.All cards in the group have the same […]

  • Mongodb operation add delete modify query


    According to my coding method, for reference only Install the visualization client Create database DB test // create a test database db.stus.insert ({Name: “Suhang”}); // insert a document Show DBS; // displays the database Insert document into database db.<collection>.insert() Insert (pass in an object) into the collection db.stus.insert ({Name: “Monkey King”), age:28 , gender: “male”});//Insert […]

  • JavaScript filter array


    requirement: From an array, filter out the elements that meet the conditions and put them into a new array.There is an array [1, 19, 2, 8, 9, 15, 11, 7, 6, 4, 18, 10] to delete more than 10 elements. Code implementation: var arr = [1, 19, 2, 8, 9, 15, 11, 7, 6, 4, […]

  • JS instance-01


    When (true) {var a = prompt (‘Please enter the score ‘); if (a > = 0 & A < = 100) {break; }}If (a = = 100) {alert (‘reward a car ‘)} else if (a > = 80 & & A < 99) {alert (‘reward a notebook’)} else if (a < 80 & & a […]

  • Reminder! Git submission specification that you might ignore


    1、 Why is it necessary to standardize? No rules, no square, no programming. If you have a project written by yourself from the beginning to the end, you can write whatever you want, and no one can interfere with you. However, if in the team cooperation, everyone publicizes the individuality, then the code will be […]

  • Vue project commonly used method encapsulation, continuous update…


    It can be used directly in Vue project 1. Common tools untils.js in /* *Whether the qualified mobile phone number is verified *True means qualified */ export function isPhone(phoneStr){ let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; if (!myreg.test(phoneStr)) { return false; } else { return true; } } /* *Verify whether the ID card number is qualified *True […]

  • Why learn Oracle technology?


    Why studyOracletechnology?   As we all know, Oracle occupies more than 48.1% market share in enterprise database field, and becomes the absolute leader of high-end enterprise database software. With the passage of time, the scale of enterprise database is expanding, and experienced Oracle DBA is more and more welcomed by enterprises. We can see this […]

  • Mongodb update / delete / index


    1、 Update grammar db.collection.update( <query>, <update>, { upsert: <boolean>, multi: <boolean>, writeConcern: <document> } ) Parameter Description: Query: query condition of update, similar to where in SQL update query. Update: the object of update and some updated operators (such as $, $inc…) can also be understood as the set after the SQL update query Upsert: […]

  • Mysql database: the use of aggregate function


    Aggregate function Max() MaxMin () minAVG () averageSum () sumCount() number of eligible data Aggregate functions cannot be nested #In statistics, only count returns the value 0 or others, while the other four aggregate functions return null; #For the parameters of aggregate functions, field names are often used to represent them. At this time, the […]

  • Vue project common method encapsulation, continuous update…


    It can be used directly in Vue project 1. In the common tool class utils.js /* *Verify whether the mobile phone number is qualified *True — indicates qualified */ export function isPhone(phoneStr){ let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; if (!myreg.test(phoneStr)) { return false; } else { return true; } } /* *Verify whether the ID number is […]