Tag:Pattern

  • Oeasy teaches you to play VIM – 23 – configuration file

    Time:2022-5-2

    configuration file Recall the last lesson Where did we find the configuration file last time~/.vimrc Understand various configuration switches Modify configuration file and apply This time I want to know something about the color scheme colorscheme vi ~/.vimrc.oldFound incolorschemeattribute Can choosebluetry :colorscheme blue Intelligent prompt Color schemecolorschemeHow did you get the hint? If there is […]

  • Basic usage and creation method of JavaScript object

    Time:2022-5-1

    Object basic usage An object is a collection of related data and methods (usually composed of some variables and functions, which we call attributes and methods in an object) Object declaration method: let obj = { name: “Troy”, age: 18 }; let obj2 = new Object({ identity: “your dad” }); The above two are the […]

  • Introduction to 23 design patterns – overview of design patterns and seven principles

    Time:2022-5-1

    Purpose of design pattern Make the program have better Code reusability (compile once, run everywhere [manual dog head]) Readability (worrying about irreplaceable) Scalability (convenient when adding new functions) Reliability (new functions have no impact on old functions) High cohesion, low coupling Seven principles of design pattern Principle of design mode: the principle to be followed […]

  • JSP connection database

    Time:2022-5-1

    Now, many netizens who are beginning to learn jsp often ask how to connect the database and how to make mistakes all the time? So I concentrated on writing this article for your reference. In fact, putting all the database logic in JSP may not be a good practice, but it is conducive to beginners’ […]

  • Convert BigDecimal type to string type during JSON serialization

    Time:2022-4-30

    The BigDecimal data returned from the back end to the front end may lose precision in some cases. In order to avoid this situation, we generally convert BigDecimal into string to avoid it. 1、 Simple mode @JsonFormat(shape = JsonFormat.Shape.STRING) private BigDecimal rate 2、 Complex mode //Customize the serialization method first This work adoptsCC agreement, reprint […]

  • How to configure network and SSH login in rescue mode

    Time:2022-4-30

    In this tutorial, you will show how to use the DVD image of centos8 to guide the rescue mode, enable the network and configure SSH service in the rescue mode for users to log in to the server remotely System environmentCentos8 Load the ISO image and enter the rescue modeIn vmware workstation, load the CD […]

  • Design mode – factory mode

    Time:2022-4-29

    What is the factory model? Factory pattern is one of the most common design patterns used to create objects. We do not expose the specific logic of creating objects, but encapsulate the logic in a function, so the function can be regarded as a factory. According to the degree of abstraction, the factory mode can […]

  • Oeasy teaches you to play VIM – 25 – more colors

    Time:2022-4-29

    More colors Recall the last lesson We went into the color scheme last time Define your own color schemeoeasy Established its own color matchingoeasy Applied your own color in the status bar Identify colors that can be used Try to change the color code first hi Normal ctermfg=1 hi Normal ctermfg=2 hi Normal ctermfg=3 First, […]

  • Golang design pattern – builder pattern

    Time:2022-4-29

    Original addressI’ve been thinking, how should we apply our valuable “design patterns” in golang? Go is not an object-oriented programming language. If you are a Java or c# developer, you will find that there are many similarities in the application of solid principle in your code. But go is special and special for a reason. […]

  • Policy mode and template method mode

    Time:2022-4-28

    1. Strategy mode Strategy pattern is a behavior design pattern, which allows you to define a series of algorithms and put each algorithm into a separate class, so that the objects of the algorithm can be replaced with each other. Use the policy pattern when you have many similar classes that are only slightly different […]

  • Oeasy teaches you to play with VIM – 26 – indent settings

    Time:2022-4-28

    Indent settings Recall the last lesson This time I learned the details of color Set 256 color mode :set t_Co=256 Then the specific colors are determined You can also generate web pages:TOhtml Is there anything else interesting? Indent settings In normal mode use<<Can indent forward use>>You can indent backwards =You can indent the current line […]

  • Design pattern learning notes

    Time:2022-4-26

    Author:Grey Original address:Design pattern learning notes UML and code UML diagram code Seven principles of software design Design principles One sentence induction objective Opening and closing principle It is open to extension and closed to modification Reduce new risks caused by maintenance Dependency Inversion Principle High level should not rely on low level It is […]