Only 1439 yuan, full blood dragon 778g + 5000mAh + 120Hz screen, Vivo also has true incense machine

After the mobile phone market has been shuffled, it is already a game of giants. The share of major manufacturers is relatively stable. The market continues to force, and the online market has also launched a sub-brand to deal with, for example, there is no price-effective Vivo, IQOO has a strong good hand, from the entry to the high end, there are different gear products, such as the iQOO Z5, the author, the author saw it has 1439 yuan "true price", still worth it Purchase.

As an entry product, iQOO Z5 is very good, equipped with the Snapdragon 778G processor, supplemented by LPPDR5 + UFS3.1, and therefore called "full blood version", performance is more than other divo dragons 778G, Especially when the game and big file read / write speed, when installing the download app, there will be a certain advantage, using a 6.67-inch LCD screen, support 120Hz refresh rate, support DC dimming and Rhine TUV low blue-ray certification, show the effect in the overall size.

The battery life is also the selling point of the machine, built-in 5000mAh big battery, does not play games, one day can not be a problem, 44W flash charge can meet the needs of users, the back is 64 million + 8 million +2 million pixels Support 10x digital zoom, up to 4K video recording, although than many high-end flagships, but in the thousand-yuan machine, the Z-axis motor and stereo donkey blessing, also make it a good audio and video experience .

In terms of appearance, IQOO Z5 is a hidden opening screen, and the COF package has made it a lot of width in the chin, so it looks very coordinated, the back camera is a common rectangular module, but the three color matching have their own craft, "blue The origin of the origin is heavier, "Boli Chen" is not easy to contaminate the fingerprint, and "dream space" is more interested, similar to the design of the Roman column, so that the entire rear cover has three-dimensional, with a certain gradient treatment, The value is quite high.

Overall, the ethnographic performance on the market is good, and the major manufacturers have a model worth considering. It is like a red rice with Note10 Pro this all-round player, and there is a 120W fast charge like Note11 Pro +, OPPO home Realme There are also several real sauce machines, of course, comprehensive price, configuration, appearance, I still prefer iQOO Z5, third-party platforms, only 1400 yuan, more than 400 yuan than official channels, everyone thinks cost-effective, welcome to messages.

Chen Gen: the big country competition, competition management

Wen | Chen Gen

In the era of a large change in the past 100 years, artificial intelligence serves as the core technology of the new round of technology revolution and the industry revolution. For the importance of global development, artificial intelligence technology determines that the international leadership of the big country is almost one inevitable. However, the uncertainty of artificial intelligence development has also exacerbated the difficulty of technical risk management, bringing new challenges for global governance.

First, the high productivity of artificial intelligence also means high fortification.Wealth accumulation and speed and international strength contrast will have a more obvious partial wild, that is, the rich country is rich, the strong country is more strong, and the poor country is the stronger, the weak country weakens, resulting in more wealth unevenness and unfair Incorrectization, more conflict with conflict and conflict and terrorism, this is a greater uncertainty and governance of global governance.

Second, artificially intelligent high execution also means high destructive power.If the new weapons and network viruses, there is an endless body condition that has the human body conditions and the unknown tired action, which will bring benefits to the implementation tasks of various countries, but may also be used by some forces, thus giving international Society has brought serious safety hazards, and may even bring disasters to the entire human society.

Finally, the high intelligence of artificial intelligence also means high political. Advanced artificial intelligence gives the technical owner’s outstanding additional advantages, robotic industry, gene sequencing, automatic driving, intelligent finance, smart city, big data processing, natural language processing, image identification, intelligent military system and other artificial intelligence, Change the country’s core competitiveness and economic and social and industrial structure, thereby changing the power structure in many fields.

Because of this, as a big country as the development and application of artificial intelligence, China and the United States play an extremely important role in artificial intelligence, and both parties have unique advantages that other countries cannot copy.How to prevent or reduce artificial intelligence technological advances on the negative impact of global sustainable development and strategic stability requires the work of China and the United States.

In fact, competition in the field of artificial intelligence is not an absolute zero and game, and there is a cooperative development and mutual benefit between parties. China is relatively leading in experimental research and results, and the United States is more leading in basic research and cutting-edge technology exploration. There is a broad cooperative space in both parties.

To this end, China and the United States should be in-depth thinking, work together to launch a formal dialogue on the application of artificial intelligence in safety and economic sectors.Promote the transparency of artificial intelligence research and development, driving its beneficial results to achieve reasonable allocation in a global scale, to minimize the competitive situation that may lead to catastrophic conflicts, and promote the formation of reasonable, benign competition and cooperative relations.

As Kissinger said, China and the United States are the most capable of impacting world progress and peace in technology, political experience and history, and solving the important issues in both parties in cooperation will be China and the United States. Common responsibility for peace and progress.

Hand handle teaching | B-end product manager resume writing guide (including professional speaking + multi-set virtual resume template)

Editing the Initiator: Most of the modules contained in your resume, but you have to write a good resume, but it is not so easy. So as the B-terminal product manager, how to write a highlight, and practical, can fully display your ability? In this article, the author sumizes a resume writing guide for the use of the B-terminating B-terminal product manager, and let’s take a look.

I. Introduction

The resume this thing sounds very simple, but it is difficult to write. Because thousands of people, everyone has their own preferences and understanding of resumes. This article is a summary of my individual’s resume on the B-terminal product manager, and many of whom have compared personal emotional color, so if you have different opinions, you can adjust it.

This article is mainly suitable for product manager reading, learning from B-terminal agency, learning from learning, not suitable for new people in the school, because I am not very familiar with the school, there is no saying, so new people Pay attention to reading when reading …

Second, the resume structure

I use the same structure in the three versions, but also similar to the commercial system of product managers on the market, a total of 5 large modules, as shown below:

Many people will entangle whether to write self-evaluation, my suggestion is to write, self-evaluation is a key module in your resume, you should reflect your highlight in this place, concentrate the essence, not to let the interviewer work and work and Exploition in the project experience.

Some people will put this module in the end, my suggestion is in front, this is the same as "the words" in the "Pyramid Principle", first out of the show, it is right.

Basic information This piece is basically less than going to turn, but some details need to be noted that I have marked, such as gender, age, working years, job hunting, these needs to be carefully checked.

Next, let’s take a look at the basic information I wrote in the virtual resume I wrote. This resume is written in MarkDown, so I use a table mode to renderate the layout of this fragmentation.

The resume owner is "Mai Feifei" and "Mai Xiaofei", which refers to the product manager for more than 5 years, respectively, and the overall structure of the resume. It is only some experience and personal highlights. It will be different.

Basic information of Mai Feifei

Basic information of Mai Xiaofei

Self-evaluation is a wave of king bombings, don’t write some "lively, optimism, hard work, high conscious, strong implementation ability, and brave enough to accept new challenges", you have to pinch this piece, The words are said to pick out the contents.

For B-terminal product managers, I suggested to write from big to small structures. That is to write from the industry / company, then the project / department, and finally go to the individual’s hierarchy, so that the HR or interviewer is more inseparable, it also meets the MECE principle, more structural.

Mai Fei’s self-evaluation

Mai Xiaofei’s self-evaluation

Some of the self-evaluation in the picture may be very long because I deliberately wrote some introductors to do some inspiration. Everyone pays attention to the reduction, control space and text density when writing. If you have other bright spots or additional to add, you can also put it here, such as some excellent works, awards or very matched jobs.

Work experience is my longest module because simple write work experience is very simple, but it is necessary to put out the things and grades made in a company, but also the content of virtual creation, it is too difficult to me.

Work experience is highlighted,What is the main thing to do, then make any achievements?. If some content is not very easy to write, then refine some keywords, used to match the job description in the recruitment information, try to let HR see you have done this piece.

There is dry goods to write dry goods, there is no dry goods, you can write keywords, or you can bold keywords and increase visual implies.

Mai Fei’s work experience

Whether this module is to add "Company introduction" and "work performance", I asked some friends, everyone is not the same, so I have two versions, everyone compares to see if I want to choose one Content. I can’t write two versions, write multiple resumes, cross-type delivery, see which effect is good.

Mai boats work experience personal recommendations work experience and project experience can write separately, more work is to look at your past experience to be what the company until how long, what about outstanding contributions; and whether the project experience is emphasized and job requirements match the value which items you have done in the past, experience and current job whether these projects need is match fit, and have not done any items from 0-1, if there is enough experience and richness so on.

Project experience resume is the second most important content, I think it is the first "self-evaluation."

To experience it is difficult to write the project, because the project is too eat this stuff up vertical experience, and many people experience in the project will increase the realism write some data, but this can easily be caught little mistake during the interview, if the data not familiar with the blind or made, impact on the interview is still getting bigger.

STAR project experience are generally used to write the law, the truth is easier said than done, I sometimes not very good grasp. Because some projects may not have the results, or achievements expressed some projects are fundamentally bad.

Mai Feifei project experience 1

Mai Feifei project experience 2

About STAR project experience is the law of writing, there are many variants, so I wrote two templates, we can compare and see in the end what is more appropriate.

Mai boats of project experience 1

Mai boats of project experience 2

About project experience this piece, I wrote a long time to find a lot of resumes learn from this content piece, and found that in fact a lot of people are content to write the contents of specialized jargon or words of surgery. Read up on the feeling I did not say to what point, but the actual viewing resume when it seems not affect my subjective feelings on this resume.

A small amount of jargon explained resume appears, in fact, does not affect how I feel about the whole resume, as long as you can pass in place some key words, other innocuous content will not look at your resume when a closer look.

End of the article I will put some jargon and terminology of my collection, there are times when nothing resume writing, or what there is no inspiration, they can learn from it.

In view of space reasons, I suggest that educational experience and credentials can be combined together to write, if you experience a lot of education, there are many certificate, and then it split into two modules is also possible.

This piece of content will basically not overturned, a point to note is that the issue of education. Sometimes the company will first pay greater attention to education, so it is best marked on the resume that he is full-time or part-time. Frank, it could reduce HR and the interviewer resume screening of trouble, but also disguised himself saves time.

Third, the supplemental content

Cliches is good, but still have to pay attention to control the tempo and length, do not write too many false big empty of content. The following excerpts from the network, part of my own finishing.

  1. Responsible for requirements gathering and analysis, functional design and optimization iterations and outputs corresponding documentation, to promote the development team on the test line.
  2. 0-1 responsible for product research, Competitive Analysis, product architecture and functional design.
  3. Integrated front and back office business processes and product functional design, make products according to business restructuring plan.
  4. 0-1 responsible for the demand for research, process, functional design, coordination of resources, promote the development of the product line, get the demand side feedback, follow up subsequent optimization products.
  5. Closed-loop project management, combing the project needs, coordinate business resources to promote the project on time and on line, and track user feedback, combined with custom business scene and have optimized product strategy, to ensure product quality and effectiveness.
  6. Xx responsible for the design of new features, functionality has been updated iteration. Familiar with Axure, Xmind output tools such as product design project prototypes, PRD, organizational needs assessment.
  7. Cross-sectoral coordination and communication, and promote close cooperation UI, developers, operators and other personnel, time and shelf life to reach the needs of landing on the line and follow the subsequent iterative optimization work.
  8. Xx user is responsible for product research, butt-related business, combing scenarios, business process and user needs and build demand pool, and outputs a flowchart brain map, the demand loop, constantly optimize the product user experience.
  9. Summary analysis of competing products, development of competing products daily attention and industry trends, product planning and product positioning.
  10. Continue to focus on the new line of functional data and analysis, continuous construction and optimized according to business needs and performance data to improve product strategy.
  11. Tracking on-line data, with some data analysis capabilities to understand the AB test design process, and summarize results.
  12. Brainstorming and evaluation, AB output test design, track, analyze, summarize new and old versions of data on-line, data mining features behind user behavior, merit-based on-line.
  13. Responsible for the overall business platform product planning, functional design and development team collaboration, to promote the realization of the project landing.
  14. Responsible for the core business (xxx module, xxx modules, etc.) carding business processes, product finishing logical rules, develop and implement programs and other projects iteration.
  15. Responsible for product requirements analysis and management, combing business processes, the design and planning of the corresponding product features, write documentation requirements, coordination within the organization and external resources to achieve product goals and project management.
  16. Responsible for collecting user feedback, monitoring service module (xxx module, xxx module), analyzes user data, tracking product performance and progress feedback, timely adjustment of product strategy.
  17. Xxx is mainly responsible for the overall planning and supply chain planning iterative versions of related products, including: Market Analysis, Competitive Analysis, prototype and PRD organize, and collaborate and R & D team, complete version of the product line development.
  18. Responsible for product lifecycle management, including internal publicity, promotion and training on the product line to protect business people familiar with product features and functionality to help solve business problems.
  19. Orders operational data analysis, improved scheme is proposed to improve the ease of use of the system, improve the user experience ordering system.
  20. Determine the development plan, coordinate project resources, track project progress, to successfully complete the project and achieve goals.
  21. Mainly responsible for the company’s order OMS system, the product demand analysis and system design work of warehousing WMS system, participating in the integrated plan of upstream related systems and project management work in multi-projects.
  22. Responsible for conducting daily demand communication and organizing relevant documents with each business unit, providing product side solutions. Responsible for communication with regional information division and business units, follow-up project plans and progress.

For the things that the data class needs the door to the door, it is not good to be stuck in the interview. For B-terminal products, this piece should be cautious, don’t write data, because B-terminal data is often sensitive or less easily reflected in the achievements.

  1. Through the optimization iteration of product / XX functions, the ease of use of products is improved, and the order rate is improved, enabling the company’s unity, and the transformation of orders will increase XX%.
  2. After optimizing the XX function / launch XX function, upgrade DAU, upgrade from XX% to XX%
  3. With XX initiative, the re-purchase rate is increased from XX% to XX%.
  4. With XX initiative, the XX page has increased to XX%.
  5. Through the online line of XXX, the demand for XXX is met, and the company’s core customers are introduced to the company.
  6. The XXX feature has opened the XXX and XXX two systems, which promotes the increase in the increase in the amount of increase and the increase in the volume, and the amount of XXX is increased in half a year.

Detailed project experience Description When you are fit, talk, your resume can’t write so much, your resume picked up the business background of the project. What kind of crowd, what kind of person, what product is to do, what kind of modules, the main functions, what kind of user can contact your product, how to use it. If the product level of the product is very large, you can refer to the product’s user-level and some good-looking data on your resume.

Reference on this piece of resume is as follows, this content is basically my own finishing:

  1. From 0 to 1 to the various work of the project, including business research, feasibility analysis, demand analysis, output project research report, forming overall product side programs, warehouse on-site testing, special training, assessment, practical, online Quality tracking, etc.
  2. Optimize the process of warehouse operations, including procurement, supplier returns, guests retreat, bunk room transfer, library, inventory adjustment, inventory payment and other processes.
  3. From 0 to 1 to the project, including the project pre-service business demand research, business process carding, system plan sorting, demand document finishing, system prototype design.
  4. Follow the progress of system development, coordinate resources, and ensure that the product project is completed on time and delivered high quality. Product function test, business person training, internal product preaching, etc. before the system is online.
  5. From 0 to 1 to the work of the project, responsible for procurement business research, output project research report, forming overall solutions, online function testing, business person training, online function optimization iteration, etc.
  6. Optimize the procurement process, including procurement applications, purchase orders, procurement returns, procurement source management, procurement depals and other processes.
  7. Optimize the financial management part of the process, including the procedure, payment, payment, inventory accounting, multi-service data payment, etc.
  8. Responsible for the product planning and design of the special line small package business, including: supplier docking, trajectory platform docking, ERP docking and other upstream links.
  9. In combination with business unit requirements, introduce more international logistics, docking logistics providers interface, acquisition, tracking number, and trajectory information.
  10. Improve the circulation relationship between logistics orders and logistics states, and make visual reports present logistics trajectory and their proper effect.
  11. Connect the online base information and status mapping of the mainstream cross-border e-commerce platform.
  12. Improve the order-margin, the optimal logistics method match, the intelligent trial rule configuration, improve the order performance efficiency, save the operating costs.
  13. Optimize order performance traffic and state flow, improve the functional operation of order profit accounting rules and dismantling orders.
  14. Optimize the order refund process, open the order after-sales and customer service, warehouse, and financial roles complete business interaction chain.
  15. Responsible for the demand analysis of OMS, WMS, Operation Platform, system product program planning, functional design, demand, iterative management, external customers, internal teams and system docking organization coordination.
  16. Responsible for platforms from 0 to 1 demand analysis, program planning, function design, iterative management. Complete the platform-based XXXX docking item, XXX docking items. 17. Responsible for WMS and APP system plan planning, demand research analysis, system design, demand management.

Fourth, summary

There are many articles on the resumes on the market, and the content is more information, which is a difficult thing to find a good information.

So in order to avoid the next time you look for a similar tutorial, I will still have to write a tutorial. On the one hand, I will meet the needs of my future, and I can communicate with you in advance, open my own Idea.

By writing this slow thinking process, you will make a summary of this piece of knowledge. It is very big for my personal help, and it is also hope that my contribution can bring some help to friends who need it, because I have a public The positioning is the comparison of vertical and grounding, if you are also a supply chain-related product, then some cases you can take it.

My name is Vitamin ,. Former PHPER, I have done online education products, and I have also done more than 4 years of cross-border warehousing logistics, and is currently a supply chain product manager in foreign trade SAAS. Mainly focused on WMS / OMS / TMS / BMS / ERP and other fields, sharing the supply chain related product knowledge.

This article is published in everyone who is product manager. It is prohibited from reprint without author license

Questtery from unsplash, based on CC0 protocol

The girlfriend’s anger can only cheer frogs to fire, a humidifier that makes people love

Author: Science and Technology BB

Recently, my mood is really bad, and I don’t say a pile of things. I recently girlfriend, I can’t move it, I will have a flame mountain every time I go home.

Know the mountain, I have a tiger, I am biased towards the mountain! (Don’t go back, how can I come, I haven’t understood it, I maybe it is possible.

The fire is really big, how is the Sichuan hot pot? It is not a level, this is spell damage, which is far better than physical damage.

Cause: She is estimated by the fire because the weather is dry, blowing air conditioners at night, causing the body’s moisture loss, thus causing anger. In order to give the ancestors to reduce the fire, I also had a pain, and I bought a big humidifier. Using a humidifier, the dry environment in the home is really a lot, and the girlfriend is significantly smaller. Since there is an effect, it is ready to arrange to the ancestors. In order to let her in the dry weather, they are not lacking in the loss of moisture, drinking water must be necessary (buy a cup), can be in the humidifier in the humidifier, A card frozen mini humidifier (from the product test).

Demand: Humidifier, small, and portable in the office. Second, the value is not bad, otherwise not only can’t destroy the fire, it is easy to enter the oil. Humidifier is used, and cost-effective. (Satisfied, there is basically nothing)

The humidifier is mainly divided into two types of household humidifiers and industrial humidifiers.

One is an ultrasonic humidifier, one is a pure humidifier.

The chevan frog humidifier belongs to the ultrasonic humidifier category, which can disperse 5 microns water molecules, so that the skin enjoys the benefits of the benefits, one gesture to meet daily humidity demand, two rain forests are booming moisture summer air-conditioned room, winter heating dry, accompanied 365 days a year.

This humidifier has a leather handle, which is convenient to carry two spray ports. Two add water methods, which can directly open the top cover for humidifier, plus water, of course, you can also add water from the top. Add water, you can do not open the water, the open water is a little suitable for the bottle to slowly pour it, prevent water flow splash.

The package accessory manual, the data cable, and the water-absorbent (itself can be used for a long time can be replaced) is still very thoughtful, it does not need to be purchased again at least in a short time.

The chevy humidifier built into a 2000mAh built-in battery, and it can be done for 7 hours or so, and it can be inserted, and the charging hole is Micro-USB design, the back of the humidifier. If it is a Type-C port applicability will be higher.

The humidifier is turned on, click Open a single hole spray mode.

The humidifier is turned on, and the double hole spray mode can be opened if you double-click.

The humidifier top cover can be separated, convenient to water storage, the upper cover is the main functional area, and the water tank can be appropriately added according to the scale.

The water absorbers on the humidifier can be swapped, and the inside is a filter element, dirty can be replaced, always maintains hygienic, effectively inhibits the hyperplasia of bacterial viruses.

The water tank also comes with rice wheat stone, which can be fixed at the bottom of the humidifier, and countless fine small holes on the rice stone can also filter the impurities in natural water. The humidifier uses water dispenser filtration, and there is bacteriostatic silver ion and The water absorbing filter has a good antibacterial effect under the action of double protection.

This product is suitable for tap water, do not use pure water, distilled water, if the water soluble essential oil can be placed, because his fog is KHz microporous atomization piece. Atomized water without white powder, its atomization piece is also specially treated, and the anti-corrosion is done.

There is a non-slip mat design at the bottom, which can make the humidifier to be more secure and will not slip freely.

The key next to the key is a timed switch, and the length of the humidification can be set with you, and you can set 1H / 2H / 4H, no operation, after 12h, the machine will shut down by default. Meet your different needs.

【Summarize】

This humidifier positioning is portable, easy to take place, suitable for office, small square room. Simple design style, whether as humidified tools, or as a room for the room, is a good choice.

My girlfriend has had a small humidifier in the house with a small humidifier, and the skin is moist. Of course, my happiest is that my girlfriend is a lot, no longer with sleep. NS.

This small humidifier, color value and function are very good, I have a deep heart.

This is still very nice if you have a demand.

Recommended index: five stars

What is worth buying app all net shop shopping prices

King of Find more than VLOOKUP, do you know for CP functions?

During our daily tabulation, it is often used.Find the work of reference related data.

In fact, this is also one of most small partners in touch.

For example, according to the corresponding results of the employee name, according to the number of item numbers in one item, the corresponding sales, etc.

Today, I will introduce you to a very powerful function combination to achieve this feature.

They are INDEX + MATCH combination.

The specific application scenario is as follows:

01 正 正 查

The correct point here is:Find reference target values ??from left to right.

That is, the lookup value is on the left and the return value is on the right.

As shown below, it is the performance watch of the company employee in the first quarter. We now want to find the corresponding performance according to the name.

Write the following formula in [F2] cell:

=INDEX (C2: C7, Match (E2, B2: B7, 0)))

Formula analysis:

First look up Liu Yan in the [B2: B7] in the [B2: B7], return to the number 2;

This number 2 is then used as the second parameter of the index function, meaning returning to the value of the first parameter in the cell area in the cell area in the cell region.

There are three parameters: Match functions:

Match (lookup value, find area, lookup type)

The MATCH function is specifically used to find a value, where you are in a region or group, and return a number.

This number that is usually returned as a parameter of other functions.

Here, the returned numbers are used as the parameter of INDEX.

If the lookup type of the third parameter is 0, it means an exact lookup.

INDEX usually has three parameters:

Index (Returned area, line number, list number)

Since the first parameter is a single line or a single column, the third parameter can be omitted.

If you don’t illegally, the formula can be written as this:

=INDEX (C2: C7, Match (E2, B2: B7, 0), 1)

02 reverse lookup

The reverse refer to it here is:Find reference target values ??from right to left.

That is, the lookup value is on the right, the return value is on the left.

Also as examples above, for example, we want to find Liu Yan’s employee number.

The formula is as follows:

=INDEX (A2: A7, MATCH (E2, B2: B7, 0)))

Formula analysis:

The formula of this formula is similar to the formula of the forward look, but the first parameter of the index function will change the returned area into the [A2: A7] area.

It can be seen that whether it is looking for a look, it is the same.

Just change the area of ??the first parameter of the index function into the area that needs to return.

03 two-way lookup

The two-way refers herein is:Find the reference target value from the horizontal and vertical two directions.

As shown below: It is a quarter employee payment message, and now I need to find how much Liu Yan’s salary in March is.

The formula is as follows:

=INDEX (B3: D8, Match (G3, A3: A8, 0), Match (H2, B2: D2, 0))

Formula analysis:

First look up Liu Yan in [A3: A8] in the vertical position in [A3: A8], return to the number 2;

Then use the second Match function to find the horizontal position in [B2: D2] in this area, return to the number 3;

Finally, the two numbers are respectively used as the second and third parameters of the INDEX function, meaning returning to the INDEX first parameter [B3: D8] zone "Chapter 3 of the third row in the area of ??this intersection cell, namely: 8606.

Because the two-way lookups here need to involve the position in both directions, we are hereUse two MATCH functions to locate the lines and columns.

04 more conditions

Multi-conditional lookup refers to: Find back to the corresponding target value based on 2 or more conditions, which is often used in our daily work.

As shown below: It is a sales list of all item numbers in all regions. We want to find how much the number of item numbers BH003 in Nanjing is.

Condition 1: Nanjing;

Conditions 2: The item number is BH003.

Write the following formula in the [G2] cell:

=INDEX (C2: C7, Match (E2 & F2, A2: A7 & B2: B7, 0))

Formula analysis:

The basic frame of the formula is the same as above, just first connect two conditions into a new condition form with a "&" text connection;

Then follow the ideas looking forward to the looks to the lookup and return to the sales volume in the [C2: C7] area.

Match function Find the location of "Nanjing BH003" in the newly generated array:

Match ("Nanjing BH003", 0)

Returns the number 3, then this number 3, as the second parameter of the index function, means returning the INDEX first parameter [C2: C7] The value in the cell in the cell area, that is, 72.

?

Because this is an array formula, the formula needs to be ended in the [Ctrl + Shift + Enter] three key. The braces outside the formula will be automatically generated. For small friends who use Office 365, you can end up with a three-key.

Of course, the multi-conditional lookups here can also be applied at both horizontal and vertical two directions.

In addition, no matter how many conditions, just connect multiple conditions to a new condition with a "&" text connector first, then apply the above routine.

05 interval lookup

The interval lookup refers to:If the lookup value is in a certain range, the corresponding target value is returned.

As shown below, the number of bonuses from the employee is required according to the performance interval.

Write the following formula in the [G2] cell:

=INDEX (J2: J5, Match (F2, {0; 41; 81; 121}, 1)))

Formula analysis:

This formula is especially the application of the second and third parameters of the MATCH function.

If the third parameter is 1 or omitted, the MATCH function will look for the maximum of less than or equal to the first parameter, andThe value in the second parameter must be sorted in ascending order.

The maximum value of less than 65 is 41, 41 in this constant array ({0; 41; 81; 121}) is 2, that is, the number 2 is returned to the number 2, and then the index second parameter is finally returned 2000.

Of course, here we can also write this constant number in an auxiliary column, which may be better understood.

As shown below:

06 blurry look

The fuzzy look is to realize the target value by combining with the wildcard ("?" Question mark and "*" asterisk).

As shown below: We want to find a surname Xu to open his head, and how much is the employee number of three characters.

The formula is as follows:

=Index (A2: A7, Match (E2 & "", B2: B7, 0))

Formula analysis:

Here is the key to the Match function supports the usage of wildcard.

Everyone must pay attention to:

"?" Question mark wildcard, represent any single character.

"*" Asterisk wildcard, represents any number of characters.

Here we used two "??" question marks, represent any two characters.

07 summary

Today, we have learned two powerful function combinations (INDEX + MATCH)Six kinds of findings commonly used in work:

? Positive lookup;

? Anti-(reverse) lookup;

? Two-way lookup;

Multi-conditional lookup;

Area lookup;

? Fuzzy lookup.

What is the most look for you usually use? What do you have any questions about VLOOKUP?

Welcome to usmessageOh ~

iPhonese3 release time new message, A15 processor price touching

Apple usually releases a new iPhone phone in September, such as the iPhone13 series of mobile phones introduced in September this year, except for the general iPhone mobile phone, Apple will also launch the iPhonese series mobile phone.

iPhonese series mobile phone is Apple’s low-cost iPhone mobile phone, using small screen design, iPhonese series mobile phone is also known for users, such as Apple’s iPhonese2 mobile phone, unfortunately iphonese2 Mobile phone does not support 5G Internet access.

According to foreign media Macrumors, the latest report, the latest report, showing Apple’s words in the first quarter of next year, and the specific time is expected to be launched at the end of March next year.

According to Apple, I broke the news, the new iPhone is designed in appearance or the iPhone old model, based on iPhone8, equipped with a 4.7-inch screen.

Of course, the IPHONESE series is not its highlight. The brightest of the iPhonese series is hardware configuration and cheap prices. The iPhonese3 mobile phone will be equipped with more powerful processors to support 5G Internet, iPhonese3 mobile phone will be equipped with A15 processor Gao Tong X60 modem, iPhonese3 mobile phone is expected to be the cheapest 5G version of iPhone.

Three minutes learn the wire to withstand the current estimation, knowing this is called electricity

Work temperature is 30 ° C, and the amount of carrier flow under the long-term continuous 90% load is as follows:

1.5 square millimeters – 13A

2.5 square millimeters – 26A
4 square millimeters – 32A

6 square millimeters – 47A
16 square millimeters – 92A

25 square millimeters – 1220A

35 square millimeters – 150A

Current conversion power:

1A=220W,

10A=2200W,

So on and so forth.

For example, if the carrier traffic is 14A, it is: 220W × 14=3080W, then 1.5 square copper wire power is 3.08 kW.

Long-term current allowed by national standard:

4 square is 25-32A

6 square is 32-40A

In fact, these are the theoretical security values, and the limit value is more than these.

The maximum power allowed by the 2,5 square copper wires is: 5500W.

4 square 8000W, 6 square 9000W is no problem.

40A’s digital meter is normal 9000W absolutely no problem. The 12000W of the machine will not be burned.

03

Copper wire wires allow long-term current:

2.5 square millimeters (16A ~ 25A)
4 square millimeters (25A ~ 32A)
6 square millimeters (32A ~ 40A)

for example :

1. Each computer consumes approximately 200 ~ 300W (about 1 to 1.5a), then 10 computers need a 2.5-square millimeter copper wire power supply, otherwise a fire may occur.

2, the large 3 air conditioner consumption is approximately 3000W (about 14a), then one air conditioner requires a separate 2.5 square millimeter copper wire power supply.
3, the current housing outlet is generally 4 square millimeters of copper wire, so the home appliances open at the same time must not exceed 25A (ie 5500 watts), some people replace the wires in the house to 6 square millimeters copper wires are useless. Because the wires entering the meter are 4 square millimeters.
4. Early housing (15 years ago) The import line is generally 2.5 square millimeter aluminum wire, so the home appliances open at the same time must not exceed 13A (ie 2800 watts).

5, household appliances that are relatively large consumption are: air conditioner 5a (1.2), electric water heater 10a, microwave oven 4a, rice cooker 4a, dishwasher 8a, drying machine 10a with drying function, electric heater 4a.

Among the fire caused by the power supply, it is due to the heat of the hair, so all the joints must be welded, and the contact devices that cannot be welded 5 to 10 years must be replaced (such as socket, air switch, etc.).

04

Copper wire wire cable traffic standard cable flow oral estimation:

Take the next two o’clock in nine, and go to the next time.

Thirty-five take three o’clock, double bunom group is five.

The conditions have changed, and the high temperature is 10% off copper upgrade.

The number of tube is two or three four and eight seven six folds.

illustrate:

This mouth is not directly pointed out to various insulated lines (rubber and plastic insulation lines), but "cross-section is multiplied in a certain number" to be represented.

"Two five-point multiply by nine, go to the next time," said that various cross-sectional aluminum insulation lines of 2.5mm2 and below are about 9 times the number of carriers of the cross-section. Such as 2.5mm2 wires, the carrier flow is 2.5 × 9=22.5 (a). The multiple relationship between the carriage of 4mm2 and more wires and the number of cross-section is row, the line number is row, the multiple is successively reduced by 1, i.e., 4 × 8, 6 × 7, 10 × 6, 16 × 5, 25 × 4.

"Thirty-five Take Three Fiveth, Double Bunction] Say", it is said that 35mm2 lead traffic is 3.5 times the number of cross-section, ie 35 × 3.5=122.5 (a). Wire from 50 mm 2 and above, the multiple relationship between the amount of carrier flow and the number of cross-section becomes a set of two two lines, and the multiple is 0.5. That is, 50, 70mm2 wire has a total of 3 times the number of cross-section; 95, 120 mm2 lead traffic is 2.5 times the number of cross-sectional area, and push it according to the secondary.

"Conditions have changed, high temperature nine fold copper upgrades". The above mouth is the copper core insulation line, which is determined under the condition of 25 ° C in ambient temperature. If the aluminum core insulation line is in the area where the ambient temperature is higher than 25 ° C, the wire carrier flow can be calculated according to the above-mentioned oral calculation method, and then hits it again; when used is not an aluminum wire but the copper core insulation line, Its carrier flow is slightly larger than the same size aluminum wire, and can calculate a carrier flow than the aluminum wire in the above-mentioned oral method. For example, the flow of 25mm2 copper wire can be calculated according to 25 mm2 aluminum wire.

Tips

● Electrician advanced information package:Wiring diagram, electrical identification, e-book, PPT …

If Michael Jackson is not a cylinder, what will be like 50 years old? Artificial intelligence tells you

Michael Joseph Jackson can absolutely be called a symbol of a era in the history of music. His music and dance have affected generations.

Perhaps he is too talented, its life has spent the dispute, among which the skin color and appearance are the largest. Even after many years of death, some people still assume that if he does not "bleach" skin and cosmetic, will it be?

Michael Jackson was killed in the King of Samway, Klin, 1992.

Below, you will look at a group of photos, look at his life, in each period. It is worth noting that the last photo is calculated by artificial intelligence, if he does not have a skin, it looks at 50.

In 1965, Jackson Jackson was on the stage for the first time and started the legendary life.

In 1978, Michael and met the music producer Quincy Jones, two people became a boring friend.

This is 1980, and he created a photo of the famous music "treasurer".

In 1983, Michael performs "space step" on the stage, shocked the world.

In 1988, Michael and Wang Hao Dianna met, creating MTV "Moonwalker", becoming the best-selling video belt in history.

In 1991, Jackson debuted in Africa, being crowned as "Sani King". At this time his skin has become white, and it has become a turning point for a lifetime.

In 1996, he divorced with a daughter of the Cat.

In 2005, after a year of forensics, "Love Book Case" finally reported that 14 accused of him were not guilty.

In 2009, 50-year-old Michael died in the United States.

If he doesn’t have a cylinder, what will he look like when he is 50 years old? Here’s this photo is artificially intelligent to give an answer.

When do you like it? Welcome to the message below.

Flying AI edge calculation terminal FCU3001 is coming! NVIDIA Jetson Xavier NX Design

If you are developing project development of artificial intelligence edge, then NVIDIA’s Jetson Xavier NX platform is absolutely ideal. As a Jetson series, Jetson Xavier NX has been favored by the majority of engineers with high-cost power and cost-effectiveness of up to 21tops.

Although NVIDIA has launched the Jetson Xavier NX system module, it is still a challenge to design a stable terminal product on the basis of some artificial intelligent R & D teams that lack hardware development experience. At this point, a mature and stable hardware device has undoubtedly brought great help to users who focus on algorithms and applications. Flying Embedded AI edge computing terminal FCU 3001 came into being.

Freon embedded AI edge computing terminal FCU3001 is an artificial intelligent edge computing device equipped with NVIDIA Jetson Xavier NX, with 6-core 64-bit ARM architecture processor, with 384 Volta core and 48 Tensor cores, calculations Force up to 21TOPS, configure 8GBLPDDR4 memory and 16GbemMC storage, is ideal for high performance computing and artificial intelligence in embedded and edge systems.

The FCU3001 created by Flying Mature Hardware Design Experience will help users easily realize the batch of computing applications of artificial intelligence.

The FCU 3001 is compact, with only 178 * 110 * 55mm, which is convenient to install or embed the equipment chassis. Excellent industrial design achieves stable no-fan cooling under the premise of ensuring the firmness and durability, ensuring that the product is stably operated at 21TOPS full load force.

The FCU3001 provides a wealth of functional development, including 4xethernet, 2XUSB3.0, 2XUSB 2.0, which is convenient for access to various sensors and peripherals, such as image capture, etc. At the same time, HDMI display is also supported, and the RS485, CAN industrial bus, one-stop control of visual identification + device linkage. It can expand storage devices such as installation of TF cards, SSD hard drives, so that data storage is not limited. Support dual-band WiFi and 4G / 5G communication, more flexible with cloud communication, allowing "5G + AI" to empower industry.

Ethernet, USB, RS485, CAN, etc. on the FCU 3001, all of the ESD4 level protection capability, contact discharge ± 8kV, air discharge ± 15kV, can meet most of the application scenario requirements for electrostatic protection, allowing equipment operation and more stable reliable.

The FCU3001 provides enriched development materials and development tools, including CUDA, CUDNN, TENSORT, and optimizes the package, so that users can download and use.

(Some information show)

Freon fully considers the user’s product-based maintenance, and the FCU3001 provides users with a U disk (Windows) update operating system, in addition to supporting the NVIDIA original OTG (need to use LinuxPC) Boot logo modify tool and operation guidance to meet user customization needs.

As an artificial intelligent edge computing device that can be applied to a variety of industries, the various artificial intelligent edge computing algorithms and procedures developed by the FCU 3001 are enabled, and the "magic" can be inspired, and the user will help users open technology in the relevant field. Robot, AGV, intelligent road conditions analysis, visual inspection, unmanned driving, smart medical, smart factory, smart city, more FCU3001 strong application, waiting for you to unlock!

I put the essence of Python coroutine Pa was clean!

This article is a large amount of information, from IO multiplexing, to use the generator, then async, await realization of the principle behind it, in simple terms, the analysis was very thorough, very hardcore!

Two days for personal reasons because it did not touch a long time to write a point of Python, which involves "coroutine" program, the last time out, it is Web framework tornado unique feature, now we have async, await keyword support . Thought about its implementation, reviews the evolution of these years, feel a little bit mean.

They are single-threaded, why the original code with the low efficiency of the async, await add some asynchronous library becomes higher efficiency?

They are single-threaded, why the original code with the low efficiency of the async, await add some asynchronous library becomes higher efficiency?

If you do Python-based network or Web development, this question has puzzled, this article attempts to give an answer.

Before beginning 0x00

Firstly, Not take you browse the source codeAnd then tell you the control to achieve the original code Python standard. Instead, we will set out from the real problems, think of solutions to the problem, step by step evolution path experience solutions, and most importantly, hoping to gain knowledge in a systematic upgrade process.

This article only provides an independent direction of thinking, does not follow the historical and current actual implementation details.

Secondly, you need to read this article familiar with Python, at least understand the concept generator generator of Python.

0x01 IO multiplexing

This is the key to performance. But we are here only to explain the concept, its implementation details is not the point, which we understand Python coroutine enough, as already know enough about, advances to 0x02.

First, you want to know all the network service program is a huge loop, your business logic can be called at some point in this cycle:

defhandler (request):

WHILETRUE:

# Get a new request

request=accept

# To get users to write business logic function according to the route map

Handler=GET_HANDLER (Request)

Handler (Request)

Imagine your Web service of a handler, after receiving a request requires a response to the results of API calls.

For the most traditional network applications, your API requests issued to wait for a response after this time the program stops running, even new requests have to get in after the end of the response. If you rely on an API request packet loss seriously, especially in response to slow it? That will be very low throughput applications.

Many traditional Web server using multi-threading technology to solve this problem: the run handler is placed on other threads, each dealing with a request, this does not affect the new thread blocks request to enter. This problem can be solved to some extent, but for larger systems concurrent, multithreaded scheduling will bring significant performance overhead.

IO multiplexing can be done to solve the problem without the use of threads, it is provided by the operating system kernel functions, we can say specifically for this type of scenario for us. Simply put, your program encounters network IO, tells the operating system to help you staring at, while the operating system gives you a way to make you can feel free to get what IO operation has been completed. like this:

# # 操作 系统 复 复 示 示 例 代代

# Register the ID and type of IO operations to the operating system IO

IO_REGISTER (IO_ID, IO_TYPE)

# Get completed IO operations

Events=IO_GET_FINISHED

For (IO_ID, IO_TYPE) INEvents:

IFIO_TYPE==Read:

Data=read_data (IO_ID)

Elifio_Type==Write:

Write_data (IO_ID, DATA)

Gring the IO multiplex logic into our server, probably like this:

Call_backs={}

Defhandler (REQ):

# do jobs here

DefCall_back (Result):

# Use the returned Result to complete the remaining work …

Call_backs [IO_ID]=CALL_BACK

# New cycle

WHILETRUE:

# Get the completed IO event

IFIO_TYPE==Read: # read

Data=read (IO_ID)

Call_back=call_backs [io_id]

Call_back (data)

Else:

# Other types of IO event processing

PASS

# Get a new request

Handler (Request)

Our Handler has returned immediately for the IO operation. At the same time, each iteration will perform a callback over the completed IO, the network request no longer blocks the entire server.

The pseudo code above is only for understanding, and the details are more complicated. Moreover, it is also possible to connect the new request to the IO event from the operating system to the monitor port.

If we split the cycle part with a call_backs dictionary to a separate module, we can get an EventLoop, which is the iOLOOP provided in the Python Standard Library Asynci.

0x02 with generator to eliminate Callback

He focuses on the Handler function written in our business, after having independent iOLOOP, it now becomes like this:

# 业 业 代 代 … …

# Need an API request

Print (Result)

ask_LOOP.GET_EVENT_LOOP.IO_CALL (API, CALL_BACK)

Here, performance problems have been resolved: We no longer need multi-threads to constantly accept new requests in the source, and don’t have to rely on the API response.

But we have also introduced a new problem. The original business logic code is now demolished. The code before requesting the API is still normal. The code after the request API can only be written in the callback function.

Here our business logic has only one API call. If there are multiple APIs, plus the call to Redis or MySQL (their essential is also a network request), the entire logic will be split, this is a burden on business development .

For some languages ??with anonymous functions (right is Java), it may also trigger a so-called "turning hell".

Next, we find way to solve this problem.

We can easily think that if the function can be suspended after running to the network IO operation, it will wake up at the breakpoint after completion.

If you are familiar with Python’s "Builder", you should find that it happens to have this feature:

Defexample:

Value=yield2

Print ("Get", Value)

ReturnValue

g=esample

# 启 启 生器, we will get 2

Got=G.send (NONE)

Print (got) # 2

TRY:

# Anti-start will display "get 4", which is our incoming value

Got=g.send (got * 2)

ExceptStopItemization ASE:

# Builder runs, will print (4), E.Value is the value of generator return

Print (E.Value)

There is Yield keyword in the function, and the call function will get a generator, and a key method for generator can interact with the generator.

G.send (none) runs the generator code until you encounter Yield, and return to the object, that is, 2, the generator code is stopped here until we perform G.send (got * 2) again, The 2 * 2 is also 4 to assign the value Value in front of Yield, and then continue to run the generator code.

Yield is like a door, you can send a thing from here, you can also take another thing.

If Send makes the generator to run until the next yield is over, the Send call will trigger a special exception STOPITERATION, which comes with a property Value, which is the value of the generator Return.

If we convert our Handler to a generator with Yield keyword, run it to The specific content of IO operationReturns, put the IO result back and restore the generator to run, then solve the problem of uncomfortable business code:

# 业 业 代 代 … …

# Need to execute an API request, directly put the IO request information yield

Result=yieldio_info

# Use the result returned by the API to complete the remaining work

Print (Result)

# This function is registered in iOLOOP, used to call back when there is a new request

Defon_Request (request):

Handler=GET_HANDLER (Request)

g=Handler (Request)

# 首 首 启 获得 获得 i 获得

IO_INFO=G.send (none)

g.send (Result)

ask_LOOP.GET_EVENT_LOOP.IO_CALL (IO_INFO, CALL_BACK)

The above example, the Handler code written by the user will not be dispersed into the callback, and the ON_Request function interacts with Callback and IOLOOP, but it will be implemented in the web framework, which is not visible to the user.

The above code is enough to give us inspiration of Callback destroyed with the builder, but there are two points:

  1. Only a network IO is initiated in business logic, but it is often more

  2. Business logic does not call other asynchronous functions (helping), but in practice, we tend to call other levels.

Let’s take a more complex example:

Among them, Request executes real IO, FUNC1, FUNC2 is only called. Obviously our code can only be written:

Deffunc1:

Ret=yieldfunc2 (re)

returnret

Deffunc2 (DATA):

ReturnResult

DEFREQUEST (URL):

# This simulation returns an IO operation, contains all information about the IO operation, where the string is simplified

Result=yield "IOJOB OF% S"% URL

ReturnResult

For Request, we expose the IO operation to the framework through Yield.

for Func1 and func2, calling request, clearly add Yield keywords Otherwise, the request call returns a generator and will not be paused and continue to perform subsequent logic obviously errors.

This is basically that we don’t write asynchronous code in the Tornado framework without Yield from, Aysnc, AWAIT.

To run the entire calling stack, the approximate process is as follows:

  1. Call FUNC1 to get the generator

  2. Call Send (None) Start it gets the result of request ("http://test.com/foo"), or generator object

  3. Send (none) Starts the generator generated by the request, gets the IO operation, registered by the frame to IOLOOP and specify a callback

  4. The Request Builder wakes up in the callback function after IO, and the generator will go to the return statement end

  5. Capture an exception to get the return value of the Request Builder, wake up the last layer of FUNC1, and get a FUNC2 generator

  6. Continue to execute …

Call FUNC1 to get the generator

Call Send (None) Start it gets the result of request ("http://test.com/foo"), or generator object

Send (none) Starts the generator generated by the request, gets the IO operation, registered by the frame to IOLOOP and specify a callback

The Request Builder wakes up in the callback function after IO, and the generator will go to the return statement end

Capture an exception to get the return value of the Request Builder, wake up the last layer of FUNC1, and get a FUNC2 generator

Continue to execute …

Friends who are familiar with the algorithm and data structure encounter such a traversal logic that will be returned, can be recursively used, because the recursive use generator can not do it, we can use the stack, in fact, this is the word "call stack" origin.

With the stack, we can Connect all generators connected in series in the entire call chain to a generatorFor its constant Send, you can continue to get all IO operation information and drive the call chain advancement, and the implementation method is as follows:

  1. The first generator is in the stack

  2. Call the Send, if you get the generator, you will enter the next round iteration

  3. I encountered IO to ask Yield, let the frame sign up to iOLOOP

  4. After the IO operation is completed, the cache result is forth, enter the next round iteration, the purpose is to restore the upper function using IO results.

  5. If a generator is running, you also need to restore the upper function to the upper function.

The first generator is in the stack

Call the Send, if you get the generator, you will enter the next round iteration

I encountered IO to ask Yield, let the frame sign up to iOLOOP

After the IO operation is completed, the cache result is forth, enter the next round iteration, the purpose is to restore the upper function using IO results.

If a generator is running, you also need to restore the upper function to the upper function.

If implemented, the code is not long but the amount of information is relatively large.

It turns the entire call chain to a generator, calling the send, to complete the IO in the chain, complete these IO, continue to push the logic execution in the calling chain until the overall logic ends:

DEFWrapper (GEN):

# The first layer calls the stack

Stack=stack

Stack.push (gen)

# Start a layer-by-layer call

WHILETRUE:

# Get the top elements of the stack

item=stack.peak

Result=none

IFisgenerator (item):

TRY:

# Try to get the next layer call and get it in the stack

Child=item.send (Result)

Stack.push (child)

# Result Restore to NONE

Result=none

# After entering the stack, enter the next loop directly, continue to explore down

Continue

# If you have an end, you will temporarily save the Result, the next step to make yourself out.

Result=E.Value

Else: # o o operation

# # I 操作 操作, Yield, Io will be woken up and temporarily saved after IO

Result=yieldItem

# 走 到 here, this layer has been completed, out of the stack, the next iteration will be a layer of calling chain

Stack.pop

# 没有有 上, the entire call chain is completed, return

Ifstack.empty:

Print ("finished")

ReturnResult

This may be the most complicated part. If you look hard, it is actually as long as you understand that for the call chain in the example above, it can achieve the effect as follows:

W=Wrapper (Func1)

# Will get "IOJOB of http://test.com/foo"

W.send (none)

# 上 上 ojob foo completed the result "bar" incompart, continue to run, get "IOJOB OF http://test.com/bar"

W.send ("bar")

# 上 上 i i b 完成 完成 传 传 传 传 入 入 入 入 入 入 入 入 入 入 入 入 入

W.send ("BARZ")

With this part, the frame will be added to the matching code:

# Maintain a list of ready lists, store all completed IO events, format is (Wrapper, Result)

Ready=

# After using the wrapper package, you can process IO by Send.

g=wrapper (func1)

# Take the start state directly as the result of NONE

Ready.Append ((g, none))

# Let the iOLOOP perform this function each cycle to handle the ready for IO

Ready.Append ((g, result))

# Traversing all already generators, advance it down

Forg, Result InselF.Ready:

# Use the Result to wake the builder and get the next IO operation

IO_JOB=G.send (Result)

# After the IO operation is complete, add the generator to the ready list, wait for the next round of processing.

ask_LOOP.GET_EVENT_LOOP.IO_CALL (

IO_JOB, LambdareSult: Ready.Append ((g, result)

Here, the core idea is to maintain a list of ready-to-read, and IOLOOP is overwhelmed, and the generator that promotes the ready state is run down, and the new IO operation is registered. After the IO is completed, the ready, after several rounds of Ioloop iteration A Handler will eventually be executed.

At this point, we use the generator to write to write business logic to run normally.

0x04 Improved Scalability

If you can read it here, Python’s scope is basically clear.

We have already achieved one Miniature sweeping frameworkThe realization details of the standard library look great here, but the specific ideas are consistent.

Our equilation framework has a restriction, we can only use IO to operate asynchronously, although in the world of network programming and web programming, the block is basically only IO operation, but there are some exceptions, such as I want the current operation Sleep for a few seconds. The use of time.sleep will make the entire thread to block, requiring special implementation. For example, some CPU-intensive operations can be asynchronously through multi-threaded asynchronous, so that another thread notification event has been completed and followed.

Therefore, it is best to decouple an open space with the network, so that the network IO is only one of the scenes, improves the scalability.

The Python official solution is to let the user hand to block the block code. As for the IOLOOP to register IO event or open a thread completely by yourself, and provide a standard "placeholder" FUTURE, indicating that his results wait for the future Yes, some prototypes are as follows:

ClassFuture:

# Set the result

Defset_Result (Result): Pass

# 获取 结果 结果

Defresult: Pass

# 表示 表示 This Future object is not already set up.

Defdone: Pass

# Set the callback function that should be executed when he is set, you can set multiple

Defadd_done_callback (Callback): Pass

Our slight change can support Future, making the scalability stronger. Network request functions for user code:

# 现在 r es es,, 生 生 器 器 器 器 器 器 器 器

#future is understood as a placeholder

Fut=future

Defcallback (Result):

# Assign the placeholder when the network IO completed the callback

Fut.set_Result (Result)

ask_LOOP.GET_EVENT_LOOP.IO_CALL (URL, CALLBACK)

Now, Request is no longer a generator, but directly returns Future.

And for the function of processing the ready list in the frame:

DEFCALLBACK (FUT):

#future is set to be placed in the ready list

Ready.Append ((g, fut.result))

Fut=g.send (Result)

Fut.add_done_callback (callback)

0x05 development and change

Many years ago, when using Tornado, probably only one Yield keyword is available, the sweeper wants to achieve, that is, this idea, even Yield keywords and return keywords can not appear in a function, you want to run after the generator Returns a value, you need to manually Raise an exception, although the effect is the same as Return now, but it is still very awkward, not elegant.

Later, there was Yield from expression. What can it do?

It is popular, it is done what the generator Wrapper is doing the above: Calling link through the stack, it is the syntax of the Wrapper logic.

With it, the same example you can write:

Deffunc1:

# Note Yield from

Ret=yieldFromRequest ("http://test.com/foo")

# Note Yield from

Ret=yieldfromfunc2 (re)

returnret

Deffunc2 (DATA):

# Note Yield from

Result=yieldfromRequest ("http://test.com/"+data)

ReturnResult

# 同 上 上 实 实 实 实 实 r

Then you no longer need the brainless Wrapper function:

g=func1

# Return the first request for Future

g.send (none)

# Continue to run, automatically enter FUNC2 and get the FUTURE inside it

G.send ("bar")

# Continue to run, complete the residual logic of the call chain, throw the stopiteration exception

G.send ("BARZ")

Yield from the entire call chain directly, it is already great, but it is used asynchronous programming or otherwise, and other languages ??have special-top Async, the AWAIT keyword, until the later version puts these content With dedicated Async, AWAIT keyword packaging, it is a more elegant look today.

0x06 summary and comparison

Overall, Python’s native and trip is achieved from two aspects:

  1. Based on IO multiplexing technology, the entire application is non-blocking on IO, achieving high efficiency

  2. Change the dispersed Callback code through the generator into synchronous code, reducing business writing difficulties

Based on IO multiplexing technology, the entire application is non-blocking on IO, achieving high efficiency

Change the dispersed Callback code through the generator into synchronous code, reducing business writing difficulties

There is a language of the object of the generator. Its IO fight is achieved, the evolution of the Java fight is basically exactly, the keyword is the same, and the Future class is the same than the promise.

However, it is different for this, which is different from this sweeping with the degree of GO-named GO, and does not explicitly based on the generator.

If the class ratio, you can implement the geventime of Python, which is the runtime, and Patch off the system calls to access your own Runtime, you come to the scheduling sweeper, gevent is focused on the network, based on network IO scheduling, relatively simple, The GO achieves perfect multi-core support, more complex and perfect, and creates a new CHANNEL new programming paradigm.

Author: Mao bean peanut

Getting Started: The Most Complete Zero-Basic Python Problem | Zero-Based 8 Months Python | Battle Project | Learning Python is this shortcut

Dry goods: crawling Douban short comment, movie "later we" | 38 years old NBA best player analysis | From Wanzhong to Word! Tang Dynasty 3 disappointment | Laughing to see the new Eti Dragon Slay Dollar | Running Question King | Make a massive Miss in Python Sketch | Disc, I am so fire, I use machine to learn to be a mini recommended system movie

Fun: Poultry Game | Nine Mao Hai | Beautiful Flower | Two-Article Python "Everyday Cool" game!

AI: Robot that will be poetry | Give the picture color | predictive income | Solver, I use the machine to learn to be a mini recommended system movie

Gadget: PDF to Word, easy to get forms and watermarks! | One button saves the HTML page as PDF! Goodbye PDF to extract charges! Use 90 lines of code to create the strongest PDF converter, Word, PPT, Excel, Markdown, HTML one-to-date conversion | Make a staple low-cost ticket prompt! | 60 lines of code made a voice wallpaper switch every day to see a little sister! |

Annual explosion case

  • 1). Lying! PDF to Word Use Python to easily get it!
  • 2) Learn Python is really fragrant! I made a website with 100 lines of code, helping people PS travel pictures, earn a chicken leg to eat
  • 3). The first broadcast over 100 million, hot all net, I analyzed the "Sister Taking Wind and Waves" and found these secrets
  • 4) 80 lines of code! Do a Dream in Python with Python
  • 5). You must master the 20 Python code, short and delicate, useless
  • 6). 30 python hambo skills
  • 7). I summarized 80 "rookie Python selection dry goods.pdf", all dry goods
  • 8). Goodbye Python! I want to learn Go! 2500 word depth analysis!
  • 9). Find a dog welfare! This Python reptile artifact is too cool, automatically download the girl picture