• Leetcode 637 number of longest increasing subsequences


    LIS review This question is an advanced version of LIS. In class last week, the teacher cited LIS as an example. Before solving this question, post the LIS code here class Solution { public: int lengthOfLIS(vector<int>& nums) { auto n = (int)nums.size(); vector<int> dp(n, 1); for (int i = 0; i < n; ++i) { […]

  • Still generating sprite manually? Just use it in webpack


    preface In CSS, we often introduce pictures as the background, but a large number of pictures will cause too many HTTP requests. In order to avoid this situation, we need to synthesize multiple pictures into one picture, that is, we often call sprite picture. Let’s talk about how to automatically synthesize sprite diagrams in webpack […]

  • Some difficult matching methods in regular expressions


    (?:pattern) () indicates that the group is captured, () will save the matching values in each group from left to right, marked by the left bracket of the group. The group number of the first group is 1, the second is 2, and so on (?:) The only difference between non capture packet and capture […]

  • Basename command instance in Linux system


    Basename is a useful command line gadget that removes directories and suffixes from a given file name.System environmentCentos7 How to use the basename commandIn the centos7 system, the basename command is installed by default, which is included in the coreutils installation package.Instance of basename command in Linux instance of basename command in LinuxBasename has two […]

  • attribute selectors


    attribute selectors effect: the specified element can be selected according to the attribute or attribute value in the element.grammar: [attribute name] select the element containing the specified attribute [attribute name = “attribute value”] select the element with the specified attribute value [attribute name ^ = “attribute value”] select the element whose attribute value starts with […]

  • Regular expressions: Alphanumeric underscores and some special characters


    (/^[-\[email protected]#$%^&*]*$/).test(‘ig-_ades2vel’) Except for non Chinese characters, other characters are added to brackets as needed In addition, for the form plus rules detection in element, the data binding should replace the V-model with: model, otherwise there will be an error in the form that already has a value If you want to return true only when […]

  • RPC request & response parameter specification


    Let’s talk first Some concepts of 0.1 API, the narrowest definition of API, refers to the method of class or interface in our program. RPC is a cross application communication framework in LAN. The common ones are Dubbo, thrift, HSF and feign. Rpcapi – an API that can basically be used the same way as […]

  • The PowerShell command is not fully displayed


    Problem description in usepowershellHave you ever had such troubleThe command is not displayed completely, and the end becomes a little bit All evilwindwosWhat should we do? Solution Add at the end|fl flnamelyFormat-ListAbbreviation for Reference link:Use the format command to change the output view

  • Using sed command to delete specific line of file efficiently


    Using sed command to delete specific line of file efficiently Normally, if we want to delete some lines in a file, we usually open the file first, find the contents to be deleted, then select these lines and press the delete key to delete them. This is no problem when the amount of data is […]

  • Regular expressions in Linux


    importance Through sed or awk tools, we can easily and happily analyze a pile of text, process data, analyze server error logs, and analyze server user access logs. But in order to play well with sed and awk tools, regular expressions are the foundation, so we have to master them. Single character Specific characters Such […]

  • Mac vscode can’t recognize NPM


    Configure vscode opensettings.jsonFile: ‘command’ + ‘,’Key Then enter: shell, as shown in the figure below, and click Modify: settings.jsonThe main contents of the file are as follows (mainly adding attribute values at the end of “. OSX” and “. Linux”): { “editor.fontSize”: 14, “files.autoSave”: “onFocusChange”, “git.autofetch”: true, “window.zoomLevel”: 0, “terminal.integrated.shell.osx”: “/bin/zsh”, “terminal.integrated.automationShell.linux”: “/bin/zsh”, “workbench.colorTheme”: “Dark […]

  • 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 […]