Tag:Advanced

  • Memento code examples of PHP design patterns (25)

    Time:2020-11-26

    objective It provides recovery to the previous state (using rollback) or getting the internal state of the object without breaking the encapsulation (the object does not need to have a function that returns the current state). The memo pattern is implemented using three classes: originator, caretaker, and memento. Memento — responsible for storing the unique […]

  • PHP design pattern code examples of null object (25)

    Time:2020-11-25

    objective The empty object pattern is not a GOF design pattern, but it is enough to be considered a design pattern as a frequent pattern. It has the following advantages: The client code is simple It can reduce the probability of null pointer exception Test cases don’t need to consider too many conditions Return an […]

  • Quickly familiar with OS X system MAC system shortcut key advanced graphics and text course

    Time:2020-11-25

    At present, tuhaojin’s 12 inch MacBook has come into the market. Such a light and cool notebook will surely bring many PC users into the MAC camp. Shortcut key plays an important role in the daily use of MAC, which improves the operation efficiency. Today, I’d like to tell my new friends who are coming […]

  • Observer code examples of PHP design patterns (27)

    Time:2020-11-23

    objective When the state of an object changes, all objects that depend on it are notified and automatically updated. It uses a low coupling approach. example If the content is good, I hope you can support and encourage you to click like / like, and you are welcome to exchange views. In addition, if you […]

  • Recommendation of CTF learning resources

    Time:2020-11-22

    CTF learning route guidance 1.CTFwiki https://wiki.x10sec.org/ 2. Wiki tutorial (programming learning)https://iowiki.com/ 3. Rookie tutorial (programming learning)https://www.runoob.com/ CTF online tools 1.CTFtools  http://www.ctftools.com/down/?tdsourcetag=s_pctim_aiomsg 2. CTF online toolshttp://ctf.ssleye.com/ 3.BugTool https://tool.bugku.com/ 4. A toolboxhttp://www.atoolbox.net/ 5. SSL certificate online toolhttps://www.chinassl.net/ssltools/index.html 6.JSON http://www.jsons.cn/ 7. GitHub resources (Advanced recommendation)https://github.com/euphrat1ca/security_w1k1 8. How to use pwntoolshttp://docs.pwntools.com/en/stable/index.html CTF range 1. Ctfhub (for beginners)https://www.ctfhub.com/ 2. Attack and defend the worldhttps://adworld.xctf.org.cn/login […]

  • Specification code examples of PHP design patterns (28)

    Time:2020-11-22

    objective Build a clear business rule specification, in which each rule can be targeted. Each specification class has a method called issatisfiedby, which determines whether a given rule meets the specification and returns true or false. RulerZ UML diagram The official PHP advanced learning exchange community “click” manages and sorts out some materials. Bat and […]

  • PHP design patterns state mode code examples (29)

    Time:2020-11-21

    objective State patterns can encapsulate different behaviors based on the same transaction of an object. It provides a simple way to change the behavior of an object at runtime without the aid of a single huge conditional judgment statement. UML diagram The official PHP advanced learning exchange community “click” manages and sorts out some materials. […]

  • When are you ready to change jobs for IOS development?

    Time:2020-11-20

    preface I believe many people are saying that the IOS industry is not good. The market of IOS is becoming more and more difficult. There are more unemployed people than people looking for jobs. Unemployment is equivalent to changing jobs, and job hopping is equivalent to lowering one’s own value. So do you IOS development, […]

  • Strategy code examples of PHP design patterns (30)

    Time:2020-11-18

    objective Separate “strategies” and enable them to quickly switch to each other. In addition, this pattern is a good alternative to inheritance (instead of extending abstract classes). example Simplified version of unit testing: switching between using file storage and memory storage, for example Sort a list of objects, one by date and one by ID […]

  • Template method code examples of PHP design patterns (31)

    Time:2020-11-17

    objective Template method pattern is a kind of behavior strategy to let the subclass of abstract template “complete” a series of algorithms. The well-known Hollywood principle: “don’t call us, we’ll call you.”. Instead of calling subclasses in this way. How do you do it? Of course, it’s abstract! In other words, it is a very […]

  • Visitor code examples of PHP design patterns (32)

    Time:2020-11-16

    objective Visitor mode allows you to outsource object operations to other objects. The main reason for this is to focus on the separation of data structures and data operations. But the visited class must have a contract to accept visitors. (see the role:: accept method in the example for details) A contract can be an […]

  • Delegation code examples of PHP design patterns (33)

    Time:2020-11-14

    objective In the example of the delegation pattern, an object delegates the task it wants to perform to its associated helper object. In the example, the “team leader” declares the writecode method and uses it. In fact, the “group leader” entrusts the writecode method of “rookie developer” to do so. This reversal of responsibility hides […]