• Sublime changes multiple lines into a string array


    sublimeThe feature shows how the second one is knocked up. The shortcut keys used arectrl+shift+l,ctrl+j,ctrl+l,End,HomeIn the last or the first place, when adding parentheses, you can’t write the back parentheses, but write the front parentheses, so as to match the parentheses at the end (or at the beginning of the line) to the front

  • Leetcode22. Python implementation of bracket generation


    Title Requirements: Idea: The number of n is both the number of left parentheses and the number of right parentheses Define a res list to return all results Recursively, give the recursive function an empty string, mark the number of remaining left parentheses and the number of remaining right parentheses. If the number of remaining […]

  • ES6 (V) – function


    function Function (function method update [default value, uncertain parameter, arrow function]) Default parameters — how to handle the default values of function parameters? ES5 ES6 Number of function parameters Rest parameter — how to handle uncertain parameters? ES5 ES6 Spread operator (inverse operation of rest parameter) ES5 ES6 Arrow functions statement Parameter condition You can […]

  • This is the vscode plug-in I want!


    Brief comment: vscode is an open source cross platform editor and one of my most satisfied ides. This article introduces several plug-ins used, which really solve many pain points. Quokka.js Quokka.js will run your code as soon as you type in the code editor to display various execution results. Supports JavaScript and typescript. https://pic1.zhimg.com/v2-c2a… Similar […]

  • Mybatis annotation CRUD


    1、CRUD We can automatically commit transactions when the tool class is created! public class MybatisUtils{ private static SqlSessionFactory sqlSessionFactory; static{ try{ //Step 1 of using mybatis: get sqlsessionfactory object String resource = “mybatis-config.xml”; InputStream inputStream = Resources.getResourceAsStream(resource); sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream); }catch(IOException e){ e.printStackTrace(); } } public static sqlSession getSqlSession(){ return sqlSessionFactory.openSession(true); } } 2. […]

  • Disk a disk of vscode plug-ins that improve efficiency / creativity


    In front-end development,vscodeIs the most commonly used editor, andvscodeThere are various practical plug-ins, some can help us improve efficiency, and some can make our work process more happy. Today, let’s introduce these easy-to-use plug-ins~ Efficiency improvement plug-in Code artifact – power mode First, the first plug-in introduced isPower Mode, it can make your programming process […]

  • Deep understanding of JavaScript – regular expressions


    regular expression Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used toRegExpOfexecandtextMethods, andStringInmatch、matchAll、replace 、search andsplitmethod Create expression Literal Use two/Create a regular expression directly, with a slash to indicate the beginning and end var reg = /ab/g When the script is loaded, […]

  • The use of shell function


    The definition of function Function keyword, you don’t need brackets function func_name { command 1 command 2 … command N } There is no function keyword, parentheses are required func_name() { command 1 command 2 … command N } How functions are used (called) It can be called directly by using the function name without […]

  • Priority in SQL script (and, or and brackets)


    On the third day of February, xinchou year, niuxinmao month, renxu day I haven’t had more blog for many days. Why? Because my demand is online, and then it’s Bibi again, which makes me feel sad and shivering… Oh, my God Let’s go back to today’s SQL modification: The requirement is as follows: query the […]

  • Vs Code common plug-ins


    In normal development,VS CodeIt has almost become the main development tool. Here are some plug-ins that I think are easy to use. Vs Code common plug-ins 1.Auto Close Tag Automatic closing of HTML / XML tags 2.Auto Rename Tag Automatically rename paired HTML / XML tags 3.Bracket Pair Colorizer Adding different colors to brackets makes […]

  • Grasp regular expressions quickly


    1. Preface When it comes to regularization, maybe many people will feel headache as I used to. The purpose of this article is not to make you become regularization experts, but just to describe some problemsSimple and regular writingandHow to write some simple rulesCome on! 2. Text 2.1 welfare section First of all, release the […]

  • Recursive downward algorithm to realize calculator


    Using recursive downward algorithm combined with ourBKLexerImplementation of support for four operations and bracket priority calculator program. Code list [golang] package main import ( “fmt” “os” “bufio” “strings” “strconv” “./bklexer” ) type Node interface { GetValue() float64 } type Number struct { value float64 } func NewNumber(token *BKLexer.Token) *Number { value, _ := strconv.ParseFloat(token.Source, 64) […]