• Leetcode 529. Minesweeper | Python


    529. Minesweeper game Source: leetcodehttps://leetcode-cn.com/problems/minesweeper subject Let’s play Minesweeper! Given a two-dimensional character matrix representing the game board.  MFor oneNot excavatedMine of mine,EFor oneNot excavatedThe empty square of,BRepresents a mine with no adjacent (top, bottom, left, right, and all four diagonals)ExcavatedThe blank box of,number(‘1’ to ‘8’) indicates how many mines are associated with this areaExcavatedIs […]

  • Strategy mode in JS


    What is a policy pattern? The official definition is: define some column algorithms, encapsulate them, and replace each other. Talking about people (⊙ˍ⊙)It is to extract, encapsulate and reuse the seemingly unrelated code to make it easier to understand and expand。 Commonly used in a if judgment, switch enumeration, data dictionary and other process judgment […]

  • An example of using lilac parser instead of regular to grab text


    lilac-parserI use clojurecript to implement a library, can do some regular functionsLooking at the name, this library design is more of a parser idea,From the use, as a regular is also more smooth. Although not as concise as regularThe disadvantage of regular is that it is written based on the form of stringThe lilac parser […]

  • Configuration of firewall firewall on Linux server


    1、 View firewall status First check whether the firewall is turned on. If not, you need to turn on the firewall first and start it automatically systemctl status firewalld Turn on the firewall and set the boot time systemctl start firewalld systemctl enable firewalld Generally, you need to restart the machine, or the later settings […]

  • Fault analysis | why is MySQL 5.7 slow while the same SQL is normal in MariaDB?


    Author: Wang ShunI am a member of the DBA team of aikesheng, who is responsible for the project of the company, dealing with database problems. I like to learn technology and delve into technical problems.Source: original contribution*The original content is not allowed to be used without authorization. Please contact the editor and indicate the source. […]

  • The general process of “smoke test” for webpack packaged projects with mocha


    Step 1: delete the ‘. / dist’ directory before packaging startsrimraf(‘./dist’, () => { constprodConfig = require(‘../../lib/webpack.prod’) webpack(prodConfig, (err, stats) \=> { if (err) {  console.log(err)  process.exit(2)     } console.log(stats.toString({ color:true, modules:false, children:false     })) //Step 3: add the test rules to the package mocha.addFile(resolve(\_\_dirname, ‘./html-test.js’)) mocha.addFile(resolve(\_\_dirname, ‘./css-js-test.js’)) mocha.run() }) }) Step 2: create a new test rule const glob = require(‘glob’); describe(‘Checking generated html files’,() \=> { it(‘should generate html files’, (done) \=> { constfiles = glob.sync(‘./dist/+(index|search).html’) if (files.length) { done()     } else { thrownewError(‘no html files generated’)     }   }); }); […]

  • Exchange 2013 learning notes 21: Transport Rules


    1、 Preface Suppose that every time a test user sends an email, it needs to be approved by the administrator. How to set it? This is about transport rules. 2、 New transport rule 2.1. Open the exchange management center, click “mail flow”, select “rule”, and then select “create new rule” in the new drop-down box. […]

  • Zooteam front end weekly issue 96


    Zooteam front end weekly issue 96 To read more about the past weekly, please visit: https://weekly.zoo.team More elegant writing JavaScript If you are new to JavaScript, you may not have heard of. Map(),. Reduce(),. Filter(). Or I’ve heard of it, I’ve seen it used by others, but I haven’t used it in actual projects. Many […]

  • Linux partial commands


    See which ports are open netstat -tlpn Ubuntu opens specified portGenerally, iptables will be installed when Ubuntu is installed. If not, install it installInput at terminal sudo apt-get install iptables Add ruleInput at terminal iptables -I INPUT -p tcp –dport 80 -j ACCEPT The 80 in the middle is the port that needs to be […]

  • This direction of JavaScript learning summary function


    preface Following the previous article on this direction of anonymous functions, this direction of functions in JavaScript is continued and summarized. The following four rules about this binding of functions are introduced. Call location There is often a saying about this of a function calledPoint to whoever calls。 In short, the direction of this is […]

  • JavaScript tools and functions


    If articles and notes can bring you a little help or inspiration, please don’t be stingy with your praise and collection, your affirmation is the biggest driving force for me to move forward Attached note link, read more high-quality articles in the past, and give me praise and encouragement if you like https://github.com/Wscats/CV/issues/27 Add on […]

  • None of 306 Android encryption vulnerabilities have been fixed, including hundreds of millions of downloads


    Android is one of the two most widely used operating systems in the world. If it has major security vulnerabilities, it will undoubtedly pose a serious threat to more than one billion users worldwide. To dynamically analyze Android applications and see if they use passwords in an insecure way, an academic team at Columbia University […]