SangSir | A wonderful flower in the art world https://sangsir.com/ zh-CN A wonderful flower in the art world Mon, 11 Sep 2023 18:07:00 +0800 Mon, 11 Sep 2023 18:07:00 +0800 PHP fails to start normally due to Mac homebrew upgrade. Dyld [40013]: Library not loaded:/opt/homebrew/opt/icu4c/lib/libicuio https://sangsir.com/archives/homebrew-icu4c-php.html https://sangsir.com/archives/homebrew-icu4c-php.html Mon, 11 Sep 2023 18:07:00 +0800 SangSir Mac homebrew reported an error when installing PHP 7.4. The reason is that the new version of PHP is using the icu4c 73 version. The installation failed because there are no related files. Here is a solution to install the updated version and coexist with the old version.

Know how to install a specific version of software?

The following is the article backup:

Customize the brew installation source to install software or versions that are not in the brew version library. The following is an example of customized installation of the icu4c 73 version.

Custom icu4c@73.rb For the installation source example, note that multiple versions of software may be installed here, so the name of the. rb file is the name of the software to be installed+the name of the large version, and the class name is Icu4cAT73

icu4c@73.rb Sample file

 #Custom brew Formula for Icu4c Custom Version #Usage: # 1.  Directly specify the rb file to install: brew install icu4c@73.rb # 2.  take icu4c@73.rb Put the file in brew's default Formula path and execute brew install icu4c@73 #Path:/usr/local/Homebrew/Library/Taps/homebrew/homebrew core/Formula/ icu4c@73.rb #  #Note the following class name, Icu4c, which is the name of the software to be installed, #The following AT is @ (@ is converted to slug named AT). Increase the version number 73. Note that no special symbols are allowed class Icu4cAT73 < Formula #Software description information desc "C/C++ and Java libraries for Unicode and globalization" #Software Provider URL homepage " https://site.icu-project.org/home " #Download address of software package url " https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz " #Image address mirror " http://192.168.2.88/icu4c-73_2-src.tgz " #Version No version "73.2" #The sha256 signature information of the software image package can be downloaded locally and calculated using the openssl sha256 icu4c-73_2-src.tgz command sha256 "818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1" #Copyright license "GPL" #New version detection livecheck do #URL address to detect url " https://github.com/unicode-org/icu/releases " #Regularly extract version information regex(/href=.*?release-([0-9._-]+)"/i) end keg_only :provided_by_macos, "macOS provides libicucore.dylib (but nothing else)" #Installation method def install #Definition/ Configure configuration parameters args = %W[ --prefix=#{prefix} --disable-samples --disable-tests --enable-static --with-library-bits=64 ] #Note that the default path is the root directory after the compressed package is decompressed, because you enter the source directory cd "source" do system "./configure", *args system "make" system "make", "install" end end #Test method definition, where multiple test items can be defined test do if File.exist?  "/usr/share/dict/words" system "#{bin}/gendict", "--uchars", "/usr/share/dict/words", "dict" else (testpath/"hello").write "hello\nworld\n" system "#{bin}/gendict", "--uchars", "hello", "dict" end end end
 #Install custom formula brew install   icu4c@73 #Check installation information brew info  icu4c@73

After installation, the software installation directory/usr/local/Cellar will be/ icu4c@73 /73.2 Link to/usr/local/opt/ icu4c@73

Directly use/usr/local/opt when using/ icu4c@73 , so that later updates to the same large version of brew will automatically update the relevant soft links

Create a soft connection to solve the problem that other software cannot find the library

 #Create a soft link to solve the problem that PHP 5.6 cannot run ln -sf /usr/local/opt/ icu4c@73 /lib/libicui18n.73.2.dylib /usr/local/lib/libicui18n.73.dylib ln -sf /usr/local/opt/ icu4c@73 /lib/libicuuc.73.2.dylib /usr/local/lib/libicuuc.73.dylib ln -sf /usr/local/opt/ icu4c@73 /lib/libicudata.73.2.dylib /usr/local/lib/libicudata.73.dylib ln -sf /usr/local/opt/ icu4c@73 /lib/libicuio.73.2.dylib /usr/local/lib/libicuio.73.dylib

If not, execute brew uninstall icu4c@73

Or delete the related files directly, i.e. directory/usr/local/Cellar/ icu4c@73 /73.2 Soft connection/usr/local/opt/ icu4c@73

 rm -rf /usr/local/Cellar/ icu4c@73 /73.2 rm -rf  /usr/local/opt/ icu4c@73 #Delete Related Soft Links rm -f /usr/local/lib/libicui18n.73.dylib rm -f /usr/local/lib/libicuuc.73.dylib rm -f /usr/local/lib/libicudata.73.dylib rm -f /usr/local/lib/libicuio.73.dylib
]]>
zero https://sangsir.com/archives/homebrew-icu4c-php.html#comments https://sangsir.com/feed/
When Uniapp h5 is deployed to the server, 404 appears on the refresh page https://sangsir.com/archives/uniapp-h5-404.html https://sangsir.com/archives/uniapp-h5-404.html Wed, 19 Jul 2023 02:43:00 +0800 SangSir Solution 1

Set the Uniapp's manifest.json The routing mode configured in h5 is set to hash pattern

 1.png

  • Advantages: When the current end cannot reach the server, it can be repaired by simply modifying the configuration
  • Disadvantages: After changing to hash, the url is marked with #, which is not beautiful and will affect the parameter transfer

This disadvantage is unacceptable. Please refer to Solution 2.

Solution II

Simply configure the server when the routing mode is set to history

Apache

 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !- f RewriteCond %{REQUEST_FILENAME} !- d RewriteRule . / index.html [L] </IfModule>

except mod_rewrite , you can also use FallbackResource (opens new window)

Nginx

 location / { try_files $uri $uri/ /index.html; }

Native Node.js

 const http = require('http') const fs = require('fs') const httpPort = 80 http.createServer((req, res) => { fs.readFile('index.html', 'utf-8', (err, content) => { if (err) { console.log('We cannot open "index.html" file.') } res.writeHead(200, { 'Content-Type': 'text/html;  charset=utf-8' }) res.end(content) }) }).listen(httpPort, () => { console.log('Server listening on:  http://localhost:%s ', httpPort) })

Node.js based Express

For Node.js/Express, consider using Connect history api callback middleware

Internet Information Services (IIS)

install IIS UrlRewrite(opens new window)
Create a web.config Document, the contents of which are as follows:

 <? xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Handle History Mode and custom 404/500" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="/" /> </rule> </rules> </rewrite> </system.webServer> </configuration>

Candy

 rewrite { regexp .* to {path} / }

Firebase host

 { "hosting": { "public": "dist", "rewrites": [ { "source": "**", "destination": "/index.html" } ] } }

Friendly Tips

After doing this, your server will no longer return the 404 error page, because all paths will return index.html File. To avoid this situation, you should cover all routing situations in the Vue application, and then give a 404 page.

Copyright notice: This is an original article of weixin_32668125, which follows the CC 4.0 BY-SA copyright agreement. Please attach a link to the original source and this notice for reprinting.
Link to this article: https://blog.csdn.net/weixin_32668125/article/details/121785680
]]>
zero https://sangsir.com/archives/uniapp-h5-404.html#comments https://sangsir.com/feed/
In Uniapp, plus.contacts.getAddressBook gets the address book and returns the type: 0 solution https://sangsir.com/archives/plus-contacts-getAddressBook.html https://sangsir.com/archives/plus-contacts-getAddressBook.html Wed, 12 Jul 2023 16:10:00 +0800 SangSir  Picture 1
 Picture 2
When working, colleagues found that they could not obtain the address book, and the official website did not write a specific method to obtain the address book code. Finally, Baidu found a solution, and pasted the code directly without ink:

 plus.contacts.getAddressBook(plus.contacts.ADDRESSBOOK_PHONE, function( addressbook ) { //  console.log(addressbook) addressbook.find(["displayName","phoneNumbers"],res=>{ console.log(res) for(var i in res){ console.log(res[i]); } }) }, function(error) { console.log(error.message); });

For more operations, thank you for your article: Contacts module management system address book

]]>
zero https://sangsir.com/archives/plus-contacts-getAddressBook.html#comments https://sangsir.com/feed/
Sky map modifying theme color modifying background color https://sangsir.com/archives/tianditu-map-style.html https://sangsir.com/archives/tianditu-map-style.html Thu, 14 Apr 2022 16:22:00 +0800 SangSir preface

 Default map style of sky map
Recently, the company is busy and has no time to post some blog posts. Recently, because the project needs a large screen to display maps, most of the large screens use dark blue base maps. At present, the sky map does not provide dark blue tiles. The built-in JS API only supports black and indigo, but the project requires the use of the sky map. The search engine has found solutions in various ways. Finally, it decided to use CSS filters to solve this problem, and recorded the solutions in the blog.

inspiration

https://blog.csdn.net/Corey_mengxiaodong/article/details/84619875

Through the introduction of this blog, the direction is roughly determined filter:url() Add the function of predefined effect to adjust the final effect.

method

  1. Open: CSS Filter Editor
  2. Upload the screenshot of the sky map to the editor, and adjust the lower preset and right parameters
     Adjust parameters
  3. Place the svg preset in Add the CSS generated by the CSS Code column in the editor to the canvas of the sky map
     CSS Code
     Color change effect of sky map
If the preset does not have the desired effect, you can use SVG Gradient Map Filter , call out one yourself

Effect display

After the final display effect is adjusted, who would have thought that this is the sky map?
 Final display effect after adjustment

]]>
four https://sangsir.com/archives/tianditu-map-style.html#comments https://sangsir.com/feed/
Pagoda server multi site configuration with multiple Redis nodes and self start scheme https://sangsir.com/archives/bt-redis.html https://sangsir.com/archives/bt-redis.html Sun, 16 Aug 2020 16:25:00 +0800 SangSir Existing problems:

When a server deploys multiple sites, the first website is installed with the Redis plug-in, and the connection is successful. Since there is only one Redis port, when the second and third websites install Redis extensions, they will automatically jump to the first site. Therefore, there will be conflicts after multiple websites are deployed. As a result, accessing different websites on the same server on one computer will pop up the Redis node of another website. I'm really upset!

Problems to be solved:

When deploying different sites on the same server, multiple Redis instances need to be started: one Redis server is divided into multiple nodes, and each node is assigned a port (63806381...). The default port is 6379. Each node corresponds to a Redis configuration file, such as redis6380.conf and redis6381.conf.

The solution is as follows:

Step 1: Copy multiple redis.confs and modify the configuration. Do what you want

 #cd /www/server/regis #cp redis.conf redis6380.conf #Vi redis6380. conf # Note: You can modify redis6380. conf by entering the pagoda panel. Only the following items can be modified port 6380 pidfile /www/server/redis/redis_6380.pid logfile "/www/server/redis/redis_6380.log" dbfilename dump_6380.rdb

Step 2: enter the/etc/init. d directory, copy multiple Redis startup entries and modify the configuration. You should strictly follow the requirements

 #cd /etc/init.d #cp redis redis6380 #vi redis6380

Modify the REDIS_PORT port number in the following script

 #!/ bin/sh # chkconfig: 2345 56 26 # description: Redis Service ### BEGIN INIT INFO # Provides:          Redis # Required-Start:    $all # Required-Stop:     $all # Default-Start:     2 3 4 5 # Default-Stop:      0 1 6 # Short-Description: starts Redis # Description:       starts the BT-Web ### END INIT INFO # Simple Redis init.d script conceived to work on Linux systems # as it does use of the /proc filesystem. REDIS_PORT="6380" CONF="/www/server/redis/redis${REDIS_PORT}.conf" REDISPORT=$(cat $CONF |grep port|grep -v '#'|awk '{print $2}') REDISPASS=$(cat $CONF |grep requirepass|grep -v '#'|awk '{print $2}') REDISHOST=$(cat $CONF |grep bind|grep -v '#'|awk '{print $2}') if [ "$REDISPASS" != "" ]; then REDISPASS=" -a $REDISPASS" fi if [ -f "/www/server/redis/start${REDIS_PORT}.pl" ]; then STARPORT=$(cat /www/server/redis/start${REDIS_PORT}.pl) else STARPORT="${REDIS_PORT}" fi EXEC=/www/server/redis/src/redis-server CLIEXEC="/www/server/redis/src/redis-cli -h $REDISHOST -p $STARPORT$REDISPASS" PIDFILE=/var/run/redis_${REDIS_PORT}.pid redis_start(){ if [ -f $PIDFILE ] then echo "$PIDFILE exists, process is already running or crashed" else echo "Starting Redis server..." nohup sudo -u redis $EXEC $CONF >> /www/server/redis/logs${REDIS_PORT}.pl 2>&1 & echo ${REDISPORT} > /www/server/redis/start${REDIS_PORT}.pl fi } redis_stop(){ echo "Stopping ..." $CLIEXEC shutdown sleep 1 PID=`ps aux|grep "sudo -u redis"|grep -v "grep"|grep -v "/etc/init.d/redis${REDIS_PORT}"|awk '{print $2}'` if [ "${PID}" != "" ]; then sleep 3 pkill -9 redis-server rm -f $PIDFILE fi echo "Redis stopped" } case "$1" in start) redis_start ;; stop) redis_stop ;; restart|reload) redis_stop sleep 0.3 redis_start ;; *) echo "Please use start or stop as first argument" ;; esac

Step 3: Add redis6380...... To the self startup item and view the startup item

 #cd /etc/init.d #Chkconfig -- add redis6380 or # chkconfig redis6380 on #chkconfig --list Note: The output results only show SysV services, not including Native systemd service. SysV configuration data It may be overwritten by the native systemd configuration. To list systemd services, execute 'systemctl list unit files'. To view the services enabled on a specific target, please execute 'systemctl list-dependencies [target]'。 Bt 0: off 1: off 2: on 3: on 4: on 5: on 6: off Bt_syssafe 0: off 1: off 2: on 3: on 4: on 5: on 6: off Memcached 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off Mysqld 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off Netconsole 0: close 1: close 2: close 3: close 4: close 5: close 6: close Network 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off Nginx 0: close 1: close 2: open 3: open 4: open 5: open 6: close Php fpm-54 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off Php fpm-56 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off Redis 0: off 1: off 2: on 3: on 4: on 5: on 6: off Redis6380 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off Redis6381 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off

In the same way, you can add more than N if you want, and then just do whatever you want

After adding a startup item, start it immediately

 cd /etc/init.d ./redis6380 start
This article cannot be reproduced without permission. If it needs to be reproduced, please indicate the source https://www.scit028.com/post-260.html
]]>
three https://sangsir.com/archives/bt-redis.html#comments https://sangsir.com/feed/
Survey on the new topic PlanA of Typecho https://sangsir.com/archives/planA.html https://sangsir.com/archives/planA.html Mon, 13 Apr 2020 13:12:00 +0800 SangSir I wonder if you like this simple new pseudo style?
The effect can be viewed on the home page
If you have any suggestions, please leave a message and let me know

]]>
eight https://sangsir.com/archives/planA.html#comments https://sangsir.com/feed/
Part. Three. Front end JOB MODEL https://sangsir.com/archives/job-model.html https://sangsir.com/archives/job-model.html Sat, 27 Jul 2019 23:26:00 +0800 SangSir  Front end interview process standardization

Post name   P5 P6 P7 P8 P9
Post characteristics   Solid foundation and high-quality completion Being independent and supporting the team Domain experts, influence teams Field breakthrough and business value-added Create something out of nothing and lead the change
Post responsibilities Understanding and implementation of business
(The business here includes technical products)
1. Actively understand business and actively participate in business review;
2. Complete established tasks (complex modules or simple projects) independently and with high quality;
3. Actively focus on data and understand the current situation through data;
1. Deeply understand business planning, take the initiative to think, and have some business insights;
2. Lead the front-end technical scheme design of the project and solve the front-end risks of the project;
3. Locate and promote problem solving through data;
1. Participate in business planning, fully understand business objectives, and identify business pain points;
2. Leading business front-end technical architecture or solving core technical problems in the field;
3. Discover key issues in the business through data and launch optimization projects;
1. Participate in business decisions and make certain predictions on business development trends;
2. Lead the technical architecture of the front end team or field and make certain technical breakthroughs;
3. Establish a systematic data system to promote business development or experience upgrading;
1. Think about the industry or industry to promote business change;
2. Lead the development of front-end technology, and promote business breakthrough through technological change and architecture upgrading;
3. Promote the integration and evolution of front-end and upstream and downstream technologies, and give full play to the overall value of technology;
Precipitation and inheritance of technology 1. Participate in the infrastructure construction of the team, submit the issue and contribution code, and participate in the preparation of technical documents;
2. Actively share technology;
1. Refine solutions to improve efficiency and quality, and apply them in the team;
2. Actively improve the team knowledge base and explore technical patents;
1. Lead and promote team infrastructure construction and improve the group's front-end technology ecology;
2. Organize or participate in team technical training;
1. Deeply participate in the formulation of the Group's front-end specifications, standards and processes, and promote their implementation; 1. Promote the innovation of a certain field in the front end of the group;
Team building and development   1. Coach new people;   1. Coach core team members;
2. Promote the construction of team technical culture;
1. Mining senior talents in the industry;
2. Participate in the construction of the group's front-end talent development system;
1. Layout for the future and attract top talents in the industry;
2. Promote the overall development of the front end of the group and improve the value of the front end positions;
             
General capability Learning and Thinking   learn in order to practise
Be able to actively and systematically learn knowledge, flexibly apply it in combination with the current business situation, and explore and find the optimal solution.
intensive study
Be able to learn from and learn from industry experience, deeply study the technical field, solve existing problems in the field or improve the system.
System construction
Be able to learn systematically and structurally, have depth and breadth, abstract fields, and establish or upgrade systems.
achieve mastery through a comprehensive study of the subject
It can go deep into upstream and downstream technologies, think about the whole link, and promote technology integration and evolution.
Cooperation and win-win effective communication
Able to actively and effectively communicate with upstream and downstream, reasonably arrange work priorities and complete with high quality.
Efficient collaboration
Be able to clearly express their views and plans and reach consensus with others; Have owner awareness, be able to effectively identify, feedback and solve risks, ensure project implementation and promote goal achievement.
Promote success
Be able to promote upstream and downstream, form synergy, have strong project management ability, and lead the team or project to achieve goals.
Partnerships
It can jump out of the current position, stand in a higher perspective, seek common ground while reserving differences, promote cooperation, common development and achieve win-win results.
Planning and implementation     Domain planning
Be able to identify core issues in the current field, formulate strategies, find breakthrough points, promote implementation and get results.
Systematic planning
Be able to define the problems of the team or the field, see the essence through the phenomenon, form a big picture of the system, and get the results through system tackling, special governance and other methods.
Forward looking layout
Be able to accurately judge the future trend, combine the long-term strategic planning of the business, form the technical layout, and make breakthroughs.
             
Professional competence professional knowledge Strong foundation
1. Master the front-end development language;
2. Understand W3C standards and common network protocols;
3. Be familiar with the working principle of browser and other front-end running containers;
4. Be familiar with the common engineering tools at the front end;
5. Be familiar with the common framework of the front end;
Comprehensive knowledge
1. Comprehensively understand the front-end knowledge system;
2. Master the front-end knowledge involved in daily development (development language, standard protocol, working principle, engineering tools, front-end framework, user experience, etc.);
Expertise
1. Be proficient in the front-end knowledge system in at least one field;
2. Master common design modes;
3. Be proficient in the design principles of common frameworks and be able to use them reasonably;
knowledge system
1. Master the overall front-end knowledge system;
2. Understand the upstream and downstream technical knowledge system;
Domain interoperability
1. Be familiar with the upstream and downstream technical knowledge system;
2. Understand new technologies and be able to establish a future oriented front-end system;
Technical implementation High quality, maintainable
1. Skillfully use class library to solve business problems, and the project code is maintainable;
2. Have quality awareness and grasp solutions to problems such as compatibility and performance;
Effective and reusable
1. Be able to improve team efficiency by developing or introducing efficiency tools;
2. Be able to refine reusable components and contribute high-quality code to the component library;
Scalable and portable
1. Be able to complete program design with high scalability and reusability;
2. Have the ability to abstract, and be able to abstract general architecture solutions in the field according to the characteristics of the scene;
systematic
1. Be able to identify system weaknesses and promote system upgrading;
2. Have the ability of product thinking and technical operation, and be able to lead the productization and service of front-end technology;
Cross domain
Have integration capability, integrate upstream and downstream technologies, and complete cross domain architecture design and governance.
Business understanding Understandable
Be able to understand PRD, recognize business concepts and understand business background.  
Conversable
Be able to understand the main rules and logic behind the business.
May affect
Be able to understand the market competition and customer demands of the business, and accurately judge its business value.
Global view
Be able to analyze and think about the industry as a whole.
Forward looking
Have industry or industry insight, and can accurately judge the development trend.
]]>
two https://sangsir.com/archives/job-model.html#comments https://sangsir.com/feed/
Part Two. Front end interview question bank https://sangsir.com/archives/Front-end-interview.html https://sangsir.com/archives/Front-end-interview.html Sat, 27 Jul 2019 23:06:00 +0800 SangSir Interview question bank
  • introduce oneself to
  • Describe in detail the projects you are interested in;
  • Understanding of browser kernel, common browser kernel
 Trident kernel: IE, MaxThon, TT, The World, 360, Sogou browser, etc. [Also known as MSHTML] Gecko kernel: Netscape 6 and above, FF, MozillaSuite/SeaMonkey, etc Presto kernel: Opera 7 and above. [Opera kernel: Presto, now: Blink] Webkit kernel: Safari, Chrome, etc. [Chrome: Blink (a branch of WebKit)]
  • Offline storage cache.manifest in html5
  • Please describe the difference between cookies, sessionStorage and localStorage?
  • What are the disadvantages of iframe?
  • How to realize a round clickable area on the page?
 1. Map+area or svg 2、border-radius 3. Pure js implementation requires a simple algorithm to determine whether a point is on a circle, obtain mouse coordinates, etc
  • How is the CSS priority algorithm calculated?
 -The principle of proximity of priority, and the latest style definition shall prevail in the case of the same weight; -The loading style is subject to the last loaded positioning; The priority is: Same weight: inline style sheet (inside the label)>embedded style sheet (in the current file)>external style sheet (in the external file). ! important >  id > class > tag Important has higher priority than inline
  • Div horizontally centered, vertically centered
  • What are the attributes of position;
  • Css creates a triangle principle;
  • JavaScript prototype, prototype chain? What are the characteristics?
 Each object will initialize an attribute, namely prototype, in its interior. When we access the attribute of an object, if no object does not have this attribute in its interior, then it will go to the prototype to find this attribute. This prototype will have its own prototype, so it will keep searching, which is what we usually call the concept of prototype chain. Relationship: instance.constructor.prototype=instance.proto
  • Introduction to immutable data
  • React lifecycle
  • What is the difference between react component and purecomponent?
  • What is the difference between ajax and fetch?
  • promise
  • 0.1 + 0.2 !== zero point three
  • New features or syntax of es6
  • What is the difference between get and post?
  • What is cross domain and what are the solutions?
  • Common http return codes
  • What are the principles of Redux?
  • Have you learned about the react dom diff algorithm?
  • The principle of front-end routing?
  • What apps have been developed with oc;
  • Technical stack selection considerations: vue+vuex+webpack+flexible+sass
  • The feeling and difference of using js/oc, jsbridge and react native
  • What problems does ISColl solve? What is the principle?
  • What are the ways to optimize web page opening speed? What have you practiced?
  • How do you understand the position of front-end engineer? What is its future?
  • Is there github, and have you done any open source projects in github?
  • How to solve any difficult problems encountered in the work?
  • Introduce a project that you are most proud of?

Do some questions

 // 1.  Simple implementation of throttle function throttle(func, duration) { //Write the specific implementation here } window.addEventListener('scroll', throttle(func, 50), false); // 2.  Implement a depth first search algorithm (non recursive) function dfs(tree, name) { //Please implement it here } var tree = { Name: 'China', children: [{ Name: 'Beijing', children: [{ Name: 'Chaoyang People' }, { Name: 'Haidian District' } ] }, { Name: 'Zhejiang Province', children: [{ Name: 'Hangzhou City' }, { Name: 'Jiaxing City' } ] } ] }; Var result=dfs (tree, 'Hangzhou City'); console.log(result);
]]>
zero https://sangsir.com/archives/Front-end-interview.html#comments https://sangsir.com/feed/
Part One. Front end react direction https://sangsir.com/archives/Front-end-react.html https://sangsir.com/archives/Front-end-react.html Sat, 27 Jul 2019 23:04:00 +0800 SangSir Interview point
  • Cookies and storage
  • Asynchronous programming
  • let var const
  • Clear Float
  • Css animation
  • Http method
  • ng-if ng-show/ng-hide
  • ng-repeat
  • module.exports exports
  • Em and rem
  • Get element height and width
  • Git rebase and git merge
  • React lifecycle
  • Basic process of redux
  • jsonp
  • Several ways of css vertical centering
  • What are the values of box sizing
  • What are the differences between arrow functions and ordinary functions, and where are they usually used
  • Network performance optimization
  • Box model
  • Event delegate binding
  • web worker
  • React performance optimization
  • Webpack performance optimization scheme
  • React 16
  • Communication mode of parent component and child component
  • Restful
  • arrow function
  • CSRF and its preventive measures
  • PWA
  • Stateless Component and Class Component
  • Controlled Component and Uncontrolled Component
  • React key
  • React 16

Open questions

  • I have done the most satisfactory thing in my work.
  • What is the most suitable position?
  • Technical strength.
]]>
zero https://sangsir.com/archives/Front-end-react.html#comments https://sangsir.com/feed/
Alibaba front-end summer internship experience https://sangsir.com/archives/alibaba-campus-job.html https://sangsir.com/archives/alibaba-campus-job.html Thu, 28 Mar 2019 11:00:00 +0800 SangSir preface

First, I want to talk about why I want to go to the interview, because I talked with the seniors during dinner. It's a good opportunity to find a summer internship in my junior year, and the awards I won in school are all around the front. As a person who wants to know what level he is at, he must invest in a big factory, so he chose Alibaba's front-end development. On March 19, Alibaba's boss pushed his resume to the campus recruitment system.

One side (57 minutes)

On the second day of completing the resume, at 20:20 p.m. on March 20, Alibaba's landline number called for a telephone interview. It was unexpected that it came so quickly. At that time, there was nothing to prepare, and my head was confused.

  • Briefly introduce yourself
  • What is the level of your major in the class
  • An impressive project
  • How did 90+stars of github open source project come from
  • Css box model
  • Css for vertical centering
  • How is the dollar ($) of jQuery implemented
  • Ajax principle of jQuery
  • How to solve cross domain problems
  • Principle of jsonp
  • Event binding of js
  • Difference between document.ready and window.onload
  • Do you have any questions for me
  • Ps. At the end of the interview, I said that I had interviewed, and I forgot some small details

Two sides (29 minutes)

At 21:28 on the evening of March 25, a private mobile phone number from Hangzhou, Zhejiang Province called for a telephone interview.

  • Briefly introduce yourself
  • Why do I choose to be a front-end (my major is design)
  • Tell me about your project experience and technical difficulties

    • ... around the technical points of the project
    • ... Simulate how other scenarios are implemented or solved around the technical points of the project
  • Differences between ES6 and ES5
  • Difference between let and var
  • How does js solve the inheritance problem
  • If there is a helloworld string, how to reverse it
  • What are the advantages of applets over h5
  • What are the cross platform development frameworks
  • Do you have any questions for me
  • Ps. I forgot some small details

Three sides (31 minutes)

At 19:31 on the evening of March 31, the second interviewer called for a telephone interview to talk about the projects you had done in the two competitions. The interviewer guided me to talk about the projects in depth with the STAR principle, which was great! In fact, the STAR principle should also be used in resumes and interviews! Finally, I want to ask you some questions, not the basic questions.

Ps. After completing the three aspects, I added the interviewer's WeChat, and told me that there would be some intersections. Let me look more at the basics, such as events, closures, box models, data binding of vue and react, virtual DOM, etc

Intersection (32 minutes)

At 18:12 on the evening of April 2, the interviewer of Tmall's technology department called for a telephone interview. He introduced himself+the impressive project and asked some questions about the project. If there were any questions he wanted to ask me, he didn't have the basis.

Ps. The project is very in-depth. Please pay attention to this. Don't dig holes in your resume!

Hrface (43 minutes)

At 11:10 p.m. on April 4, hr's younger sister called for a video interview, using Alibaba's own video conference system. The content of the conversation was basically the same as that of Alibaba hr's interview on Niuke.com.

feel

Ali's interviewer's attitude is really excellent!!! At the end of the interview, you can ask the interviewer how I should learn and what aspects are lacking. The leaders will make a summary and suggestions for you to learn the weak parts. Call like crazy!!!
After this interview, I found that my understanding of the front end was limited to document oriented, Google, Stack Overflow. I had a poor understanding of the basics of JavaScript and the technical depth of the projects I worked on, and the algorithm was even blank. No matter you have failed the interview, you still need to refuel in the future!

last

2019.04.12,23:57。 Email+SMS notification, sent Alibaba's letter of intent for employment, but unexpectedly, only interviewed Ali, and still got to the end. Luck exploded!
2019.04.22,11:54。 HR sister called to confirm the entry time and process, and the offer call finally came~~~

In addition, I recommend an interview map given to me by a front-end boss. Basically, the basic interview questions of js are included in it! I regret that I didn't take a good look before the interview!!! Click here>>> InterviewMap

There is another facial scripture, which is also excellent! Click here>>> Interview script of middle and high level front end big factory, to protect you from gold, three silver and four silver, and to connect to big factory (Part 1)

]]>
sixteen https://sangsir.com/archives/alibaba-campus-job.html#comments https://sangsir.com/feed/