download:2021 Required first door CSS architecture system Intensive theory + practical play mushroom Street

CSS code getting bloated and hard to maintain? Do not pay attention to early programming, late reconstruction tired bald? This course is based on the pain points in CSS development, through the highly imitation mogujie project, take you to build your CSS code from 0 to 1, and form a set of mature architecture ideas that are easy to maintain, expand, and reuse. Play with CSS both architecturally and technically!

Technical specifications Vue3.0, CSS3, Sass, Webpack4 Function operation Function operation on conditional fields cannot go to the index.

Select * from t1 where date© = ‘2019-05-21’; Optimization: Change to range query

Select * from t1 where c>= ‘2019-05-21 00:00:00’ and c<= ‘2019-05-21 23:59:59’; Implicit conversion operators, when used with different types of operation objects, perform type conversions to make operations compatible.

select user_name,tele_phone from user_info where tele_phone =11111111111; /

tele_phone varchar

/ Practice does function operations:

select user_name,tele_phone from user_info where cast(tele_phone as singed int) =11111111111; Optimization: Type unification

Select user_name,tele_phone from user_info where tele_phone = ‘11111111111’; The ambiguous query wildcard comes first

Select * from t1 where a like ‘%1111%’; Optimization: Vague queries must contain the value in front of the condition field

Select * from t1 where a like ‘1111%’; Scope query Scope query data volume is too large, need to return to the table, so do not go to the index.

select * from t1 where b>=1 and b <=2000; Optimization: reduce the range of a single query, divided into repeated queries. (Practice may not be too fast, take the index)

select

from t1 where b>=1 and b <=1000; show profiles; + — — — — — — — — — – — — — — — — — — — — — – — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — + | Query_ID | Duration | Query | + — — — — — — — — — – — — — — — — — — — — — – — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — + | | | the select 0.00534775 1

The from t1 where > = 1 b and b < = 1000 | | 2 | | 0.00605625 select * from t1 where b > = 1 and b < = 2000 | + — — — — — — — — — – — — — — — — — — — — — – — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — – + 2 rows in the set, 1 warning (0.00 SEC) operation Even a simple calculation

explain select * from t1 where b-1 =1000; Optimization: Put the calculation operation after the equal sign

explain select * from t1 where b =1000 + 1;

Turned over a lot of problem solutions, can only understand this solution, intuitive enough enough violence.

class Solution {

public:

vector restoreIpAddresses(string s) {

vector res;

for (int a = 1; a < 4; a ++ ) for (int b = 1; b < 4; b ++ ) for (int c = 1; c < 4; c ++ ) for (int d = 1; d < 4; If (a + b + c + d == s.substr(0, a)) {string s1 = s.substr(0, a); String s2 = s.substr(a, b); string s3 = s.substr(a + b, c); string s4 = s.substr(a + b + c); if (check(s1) && check(s2) && check(s3) && check(s4)) { string ip = s1 + '.' + s2 + '.' + s3 + '.' + s4; res.push_back(ip); } } } return res; } bool check(string s) // Check whether the first digit of each IP address segment is not 0 or only one digit is 0 {if (stoi(s) <= 255) if (s[0]! = '0' || (s[0] == '0' && s.size() == 1)) return true; return false;Copy the code