Tag:Result

  • Leetcode78. Subset Python implementation

    Time:2021-7-30

    Title Requirements: Idea: Define a res to save the result set Traverse the array, add the current value to all values in the res result set, and then append to the result set. After traversing the array, res appends a [[]], which is the result Core code: res = [[]] for i in range(len(nums)): for […]

  • New syntax in ES6 (7) — async… Await

    Time:2021-7-29

    What is async Async means “asynchronous”. As the name suggests, async is a keyword related to asynchronous operations. Async is unique to ES7 and is closely related to promise and generator. Use syntax: async function name(param){ Param / / parameter name passed to the function Statements / / function body } name().then(function(res){ RES / / […]

  • Nodemon — the node service automatically restarts and refreshes in real time

    Time:2021-7-29

    catalogue start use nodemonThe function is to update in real time without running one at a timenode <filename>Yes start github-nodemon npm-nodemon npm i -g nodemon use nodemon <filename> for instance: // 00.js console.log(“test”) nodemon .\00-parpare.js # [nodemon] 2.0.4 # [nodemon] to restart at any time, enter `rs` # [nodemon] watching path(s): *.* # [nodemon] watching […]

  • Leetcode week 184 – Python answers

    Time:2021-7-29

    5380. String matching in array Violent double loop. Because the length of words is less than 100, it will not timeout, but pay attention to break every time a substring is found, otherwise there may be repetition. class Solution: def stringMatching(self, words: List[str]) -> List[str]: ans = [] for i in range(len(words)): for j in […]

  • How does Java implement a database difference comparison tool from zero?

    Time:2021-7-28

    The pain of comparing data I wonder if you are like me. When writing code happily, you must compare some database data. Admittedly, there are general data differences. For example, the content of each line is different. There are relatively mature comparison tools such as compare2 in the market. However, if each column of the […]

  • Leetcode15. Python implementation of sum of three

    Time:2021-7-28

    Title Requirements: thinking Define a res [] to save the result set First arrange the array in order, so that if you encounter duplicate numbers, you can directly go to the next one Traversing the array, only traversing the position of the array subscript from 0 to the position of the array length – 2 […]

  • Tfa.seq2seq.trainingsampler understanding summary

    Time:2021-7-27

    summary Tfa.seq2seq.trainingsampler, simply read the input training sampler.Call (initialize. Train input)_ Tensors), take the time in each batch_ The data with Step = 0 is spliced into a data set and returned.Call sampler.next next next_ When using the inputs function, the time in each batch will be taken_ The data of step + + is […]

  • Springboot Vue login (implement springboot + Vue login from scratch)

    Time:2021-7-27

    Read by little hub: A complete small example of spirngboot + Vue login. I have also done it in vueblog before. Ha ha, let’s review it again! Author: Eli Shaw https://blog.csdn.net/xiaojin… 1、 Brief description Recently, I learned to use Vue to realize the separation of front-end and back-end. There is a good open source project […]

  • Use cache anti breakdown to solve the retry reply problem of “passive reply to user message” on wechat

    Time:2021-7-26

    background When WeChat official account was developed, one of them received ordinary news and received events to push API. There’s a rule,   ” If the wechat server fails to receive a response within five seconds, it will disconnect and re initiate the request. It will retry three times in total. If the server cannot […]

  • Where conditional data filtering for MySQL

    Time:2021-7-26

    Syntax: –Select * from table name where condition; Test data: –Create table statement create table `student` ( `sid` int(11) primary key auto_increment, `sname` varchar(20) not null, `sex` varchar(10) default null, `isdelete` tinyint(1) default 0 )charset=utf8; –Insert data insert into `student`(`sid`, `sname`, `sex`) values (0, ‘Dharma’, ‘male’), (0, ‘Dianwei’, ‘male’), (0, ‘Cao Cao’, ‘male’), (0, ‘Zhong […]

  • Interviewer: how to sort the array of string version numbers?

    Time:2021-7-25

    There is a classic interview question in segment fault: There is a set of version numbers as follows [‘0.1.1’, ‘2.3.3’, ‘0.302.1’, ‘4.2’, ‘4.3.5’, ‘4.3.4.5’]. Now you need to sort them. The sorting results are [‘4.3.5’, ‘4.3.4.5’, ‘2.3.3’, ‘0.302.1’, ‘0.1.1’] Question link amongzzgzzg00The main idea of your answer is as follows, which is very concise and […]

  • AutoScraper ! Make your reptile “smart”!

    Time:2021-7-25

    [introduction]: autosharper is an intelligent, automatic, fast and lightweight web crawler. It is simple and convenient to use, so you can say goodbye to the trouble of manually parsing web pages and writing rules. brief introduction Autosharper is a web crawler implemented in Python. It is compatible with Python 3 and can quickly and intelligently […]