Tag:Li Si

  • How to calculate the median of a set of data in MySQL?


    To get the median of a set of data (for example, the median revenue of a region or a company), we generally divide this task into three sub tasks: Sort the data and give each row of data its ranking in all data; Find the median ranking number; Find out the value corresponding to the […]

  • About converting column values to column names in MySQL


    We sometimes have this need:This presentation related to column values is sometimes very intuitive. I will use a small demo to realize this kind of operation. Table structure create table demo1( Sname varchar (20) not null comment ‘student’, Course varchar (10) not null comment ‘account’, Score float not null comment ‘score’ ) Insert the following […]

  • 41 skills that JS development must know [continuous update]


    preface JS is the core of the front end, but you may not know some skills;This paper combs 41 skills of JS to help you improve your skills in using JS;The article is a little long. You can clone the source code and directly roll up the source code addressPlease stamp all the source code, […]

  • Difference between export and export default


    I believe that many beginners will often see the use of export and export default when learning Vue, but what is the difference between the two? 1. Both export and export default can be used to export constants, functions, files, modules, etc\2. You can import it in other files or modules by means of import […]

  • Topn implemented in PHP code


    Take the first n data in a pile of data according to the score value from large to small, and use the method of small root heap. The specific code is as follows: top_n = $top_n; } /** *Add an element *@ param number $score sort value *@ param mixed $value element */ public function […]

  • MySQL transaction details summary and analysis [update]


    Transaction base route Transaction definition A transaction is a collection of DML statements. Transactions ensure the consistent operation of data in the database. Storage engine In daily development, our common storage engines include InnoDB and MyISAM. However, MyISAM does not support transaction operations. Transaction commit method Sample code CREATE TABLE `user` ( `id` int(10) UNSIGNED […]

  • Several common sorting codes


    catalogue Simple code Use the sort that comes with go Sort [] int type Sort [] float64 type Sort [] string type Custom type sorting Portable usage sort. Slice Portable usage sort.slicestable summary Simple code I found several common sorting codes in my notes, including “bubble sorting, selection sorting, binary sorting and quick sorting”. About […]

  • SPL data structure 4-splobjectstorage


    Splobjectstorage is the data object container in SPL standard library, which is used to store a set of objects. Especially when you need to uniquely identify an object. class Person { public $name; public function __construct(string $name) { $this->name = $name; } } //Instantiate object $Zhangsan = new person (‘zhang San ‘); $Lisi = new […]

  • Go operation mongodb


    Mongodb is a popular database based on distributed file storage. It is a product between relational database and non relational database (NoSQL). Mongodb has the most abundant functions and is most like relational database. Introduction to mongodb Mongodb is a popular database based on distributed file storage. It is a product between relational database and […]

  • JavaScript that I don’t know — this pointing problem that once bothered me is so simple


         When I first came into contact with JavaScript, this point was once a problem that I was afraid of touching, but in fact, this point is very simple and easy to understand. In a word, this point is very simpleThe value of this is confirmed when the function is executed。 1、 Binding rules 1. […]

  • Multi field de duplication in MySQL


    Now we have the following table id name ageOne three 232 Li Si 34Three three 234 Li Si 32 Requirement: Joint de duplication according to name and age fieldsThe SQL is as follows select * from user group by name,age From: https://blog.csdn.net/qq_ 28988969/article/details/81774756

  • Mongodb database


    Mongodb It’s a non relational database. It’s stored in the form of key value pair horizontal expansion. It’s easy to use as a cache database Mongodb’s stored document is called bson, which is similar to JSON object. Field values can contain other documents, arrays and document arrays Concept analysis of mongodb and MySQL SQL concept […]