Leetcode brush questions, simple + medium questions (issue 36)

catalogue Question 1: continuous subarrays and Question 2: continuous array Question 3: intersecting linked list Question 4: goals and objectives Question 5: weight of the last stone II Question 6: constructing rectangles Question 7: change II Question 8: complete square Question 9: different paths II Question 10: stone game Leetcod ...

Posted by opido on Sat, 29 Jan 2022 11:54:40 +0100

I integrated the best Java tutorial design pattern command pattern on Github into a PDF document

preface Today, in the process of interviewing others, I asked about the design mode. He said command mode, what!! I haven't heard of it. I can only pretend to be calm, ask him, and quickly turn over the book when I come back. Command mode Daily endorsement: Command Pattern is a data-driven design pattern, which belongs to behavioral ...

Posted by MishieMoo on Sat, 29 Jan 2022 10:03:54 +0100

Two lines of code to generate command line for Python script. Are you sure you understand it?

Sometimes we have such a demand: We define a Python method. The method receives some parameters, but we want to expose these parameters on the command line when calling. For example, here is a crawling method: import requests def scrape(url, timeout=10): response = requests.get(url, timeout=timeout) print(response.text) Here, a s ...

Posted by Nolan on Sat, 29 Jan 2022 04:56:15 +0100

The trickery Dharma is taught to you. Don't say I told you!

Hello, I'm Baiyun. Sort out some spoof code for everyone and use it carefully! Be careful not to have friends. 1. Computer crashes Open countless calculators until they crash set wsh=createobject("wscript.shell") do wsh.run "calc' loop Unlimited bombing Quarrel artifact, which directly makes the opponent speechless [create text format, ...

Posted by kylebuttress on Fri, 28 Jan 2022 18:38:39 +0100

Tencent T7 notes: past and present life of Android transition animation!

When upgrading the image viewer some time ago, there was no good transition mode when opening the image viewer. A big man recommended the latest Material Motion animation for Android to me. Although it was not arranged for our App in the end, it provided me with an opportunity to learn Material Motion animation. Recommended learning materials ...

Posted by thegman on Thu, 27 Jan 2022 16:11:24 +0100

Come on, come on ~ make a poster of "countdown to new year's Eve" in python

๐ŸŽ Introduction: Hello, Hello, Xiaobian, I'm sure you've seen many countdown posters before activities or product launch in social media and circle of friends. At the beginning of the new year, the Spring Festival is coming soon. Today we will use python to make a group of New Year Countdown posters. ๐ŸŽ Text: Effect preview 1, Create i ...

Posted by rpearson on Thu, 27 Jan 2022 03:32:24 +0100

The most dazzling fireworks code on New Year's Eve -- a necessary collection for the new year

Introduction: New year's Eve is to get rid of trouble and meet new hope! Here, I wish you all a happy New Year's Eve, always laugh and everything goes well! Text: Create canvas setup and draw are P5 JS, in which createCanvas is used to create the size of the canvas and background is used to set the background color of the canvas func ...

Posted by textbox on Wed, 26 Jan 2022 22:38:50 +0100

MyBatis review the old and learn the new - underlying operating principle

preparation [References] public class MainClass { public static void main(String[] args) throws Exception { String resources = "mybatis-config.xml"; InputStream inputStream = Resources.getResourceAsStream(resources); SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream); SqlSession sqlSessio ...

Posted by ubuntu-user on Wed, 26 Jan 2022 16:56:14 +0100

Jvav concurrent programming

Review the basic content of threads Program: static code installed on the hard disk. Process: the running program is the space unit of memory allocated by the operating system. Thread: it is the smallest execution unit in the process and the scheduling unit of cpu. Threads depend on the process. Create thread Thread class inherits threadClas ...

Posted by Anco on Wed, 26 Jan 2022 00:46:43 +0100

RxHttp, a more elegant collaborative process experience than Retrofit

1. ForewordPeople keep asking me, RxHttp What are the advantages over Retrofit? Here, I would like to talk about my ideas in terms of stability, functionality and ease of use.First of all, let me state that the emergence of RxHttp is not to kill anyone, but to give you more choices and different choices.stabilityI always think that Retrofit is ...

Posted by maff20 on Tue, 25 Jan 2022 11:11:17 +0100