GOF23 design mode (creation mode) ~ builder mode ~ code analysis!!

Usage scenario: We want to build a complex product, such as a car and a mobile phone, which are made up of many parts. At this time, we need to use our builder mode to produce each part separately and then assemble it~~ Below, I will take the production process of a mobile phone as an example. Her ...

Posted by DJ Unique on Sat, 13 Jun 2020 11:50:58 +0200

Ajax data requests for applets

1.Interface Mock The server is turned on, as long as all static resource files such as pictures are placed in thepublicUnder the folder, you can directly access the Mock The server localhost:3000Find the corresponding path http://localhost:3000/images/0/a.jpg(api/public/images/0/a.jpg) http://localhost ...

Posted by cali_dotcom on Sat, 13 Jun 2020 10:27:36 +0200

Android Solution for page instability after turning on hot spots

1 Question After Android 8.0, we turned on hotspots in the following way, but when we jump to the page, the hotspots will be disconnected and the phones will not be able to transfer files to each other. Permission Instructions: Android 8.0 requires location and GPS permissions, while hot spots on mobile phones cannot be turned on. if (Build. ...

Posted by GirishR on Sat, 13 Jun 2020 01:55:59 +0200

Android camera2 opens two physical cameras at the same time

Due to business requirements, two physical cameras need to be opened at the same time. According to Camera2 api, SdkVersion 28 supports this function. But I have to say that api documents are not friendly, or that I am really a dish. Let's take a picture of the structure of Camera2, which I don't kn ...

Posted by anindya23 on Fri, 12 Jun 2020 10:04:23 +0200

C#Foundation - Events

Preface In this chapter, I mainly use this series of C# basic chapters to sort out the past learning notes, summarize and summarize them, and to understand them more thoroughly. In the previous article, we learned more about delegation, which is equivalent to using a method as another method parameter, and can also be used as a bridge between t ...

Posted by dilum on Fri, 12 Jun 2020 03:35:53 +0200

Adjusting the brightness and contrast of an image with opencv4.3.0 Tutorial

Catalog Preface 1. Brightness and Contrast 1. What is brightness and contrast 2. Brightness and Contrast Adjustment Principle 3. Brightness and Contrast Adjustment Code Implementation 4,API-convertScaleAbs 2. Gamma Correction 1. Introduction of Gamma Correction 2. Gamma Correction Principle ...

Posted by master82 on Thu, 11 Jun 2020 02:58:03 +0200

One article lets you read "Seven Principles of Design Mode - Single Responsibility Principle"

Just a week before the end of the last round of overtime work, the leader came to tell me: "Birds, weekends and overtime work are better match!"Poor children have new urgent tasks, and the good overtime life is starting again. NoThis is not the life that newbies want. Newbies want to resist. N ...

Posted by Edward on Wed, 10 Jun 2020 04:10:46 +0200

[design mode] observer mode: can a registration function also use design mode?

Life in the world is like living among thorns, the heart does not move, people do not move, do not hurt, if the heart is moving, people move, hurt their body, hurt their bones, so we can experience all kinds of pain in the world catalog My fighting dream Sad Xiao Ming What is the observer model? Re ...

Posted by mariolopes on Sun, 07 Jun 2020 09:45:53 +0200

How to implement login and mutual kick in spring security oauth2

Background An account can only be logged in at one place. Similar business requirements are very common in existing post management systems. However, in the original spring security oauth2 token method process (so-called login) can not meet similar needs. Let's first look at TokenEndpoint's method flow The client accesses the / oauth/token int ...

Posted by cliffboss on Wed, 27 May 2020 10:37:55 +0200

setInterval and setTimeout of Canvas drawing raindrops (2)

Thank you for your guidance. In view of the bad nature of setInterval, modify it, implement setInterval with setTimeout, and put it in the move attribute of Rain prototype. Operation result: the screen is in disorder and the browser is stuck.. as a result of: setTimeout and setInterval should not be written in the fu ...

Posted by Hepp on Sun, 24 May 2020 17:37:06 +0200