Solution to problem 18 of leetcode (python analysis)

leetcode brush inscription -- > 18 problem solving method (python analysis) Definition of title Solving problems 1. Use dichotomy 2. Optimization by dichotomy 3. Use recursive thinking 4. Continue to optimize the dichotomy Realization Definition of title Given a n array of N integers nums a ...

Posted by freephoneid on Sat, 18 Jan 2020 18:46:15 +0100

Introduction of axios in Vue project

axios introduction axios official website : easy to use, concise and efficient http library. axios official website The core of axios is a promise based HTTP library, which can be used in browsers and node.js. Characteristics of axios Create XMLHttpRequests from the browser Create http request fro ...

Posted by Imad on Sat, 18 Jan 2020 17:44:33 +0100

Two ways to get Stream stream

Two ways to get Stream stream Two ways to get Stream stream Demo01GetStream package cn.xiaoge.day21.demo02; /* java.util.stream.Stream<T>Java 1.8 is the most commonly used new stream interface Getting a flow is very simple. There are several common ways: All Collection colle ...

Posted by abolmeer on Sat, 18 Jan 2020 16:59:39 +0100

Arduino Experiment 2: LED basic application experiment

Catalog 1, Advertising water lamp experiment 1. Experimental equipment 2. Experimental wiring 3. Experiment principle 4. Program code 5. Experimental results 2, Traffic light design experiment 1. Experimental equipment 2. Experimental wiring 3. Experiment principle 4. Program code 5. Experimental ...

Posted by 2gd-2be-2rue on Sat, 18 Jan 2020 12:49:36 +0100

API s commonly used in Redis - are you really familiar with Redis?

For a long time, Redis, as a Nosql database, has been widely used in a variety of projects due to its function of frying chickens and cows. I didn't think much of Redis before, but now I like it more and more. It is often used to store some common data, such as user id, session, user menu permission, me ...

Posted by Hotkey on Sat, 18 Jan 2020 11:34:07 +0100

Distributed ID - snowflake algorithm

background With the increasing business volume, the division of database is becoming more and more detailed, and the concept of sub database and sub table is also gradually implemented. The generation of primary key ID such as auto increase primary key or sequence no longer meets the demand, so the ...

Posted by rallokkcaz on Sat, 18 Jan 2020 10:12:11 +0100

Component fundamentals in Vue

How to create components // 1.1 use Vue.extend to create a global Vue component var com1 = Vue.extend({ // Through the template attribute, the HTML structure to be displayed by the component is specified template:'<h3>This is used. Vue.extend Components created ...

Posted by JimStrosky on Sat, 18 Jan 2020 09:20:35 +0100

linux-3. User and user group management

man useradd can view the following useful information 1, User profile 1.1 user information file / etc/passwd root: x:0:0:root:/root:/bin/bash field Effect 1st field User name 2nd field Password flag x: indicates that the user has a password, and finally goes to / etc/shadow to find the passw ...

Posted by Andrew B on Sat, 18 Jan 2020 07:52:56 +0100

Panoramic mosaic of Opencv

Requirement Combine the following two pictures to produce panoramic mosaic effect. Code implementation process 1. Import required libraries import numpy as np import cv2 2. Create a class Stitcher The Stitcher class contains five methods, which are stitch(self, images, ratio=0.75, reprojThresh ...

Posted by Nirvana on Sat, 18 Jan 2020 07:46:50 +0100

Mybatis source learning (25)-StatementHandler parsing

I. Introduction The    StatementHandler is one of the most core interfaces of Mybatis. He has completed the work related to the interaction between Mybatis and database (the interaction between Mybatis and JDBC on Statement). StatementHandler is mainly used for: Create Statement object Bind ...

Posted by robsgaming on Sat, 18 Jan 2020 07:07:33 +0100