• PHP design pattern – state mode


    preface State design pattern is one of the most attractive patterns proposed by GOF, and it is also one of the most useful patterns. Games usually use state mode, because the objects in the game often change state very frequently. The purpose of a state pattern is to allow an object to change its behavior […]

  • What is pressure DP? This problem solving will get you started


    Title address (464. can I win) https://leetcode-cn.com/probl… Title Description In the “100 game” game, two players take turns to choose any integer from 1 to 10, accumulate the sum of integers, and the player who makes the sum of accumulated integers reach or exceed 100 is the winner. What if we change the rules of […]

  • flink


    concept Stateful computing framework based on flow characteristic Low delay Stateful High throughput Distributed Timeline From 10 years Submitted to Apache in 2014 Become a top project at the end of 2014 At present, Flink is the most active open source project in the Apache community, surpassing spark, and has become the de facto standard […]

  • Java uses more elegant code to record operation logs and change records


    Scenario 1 Data is often recorded in the systemChange log, recording dataContent before changeandContent after change。 And sometimes they record dataMultiple fieldsContents before and after the change (e.gstateBefore and after the changeuserBefore and after the changeamount of moneyBefore and after the change of, and when some contents are not changed, they do not need to […]

  • Working overtime on weekends, I encapsulated a set of flutter status management tools


    introduction For the status management of the flutter, the company’s project usesBlocProgramme. Bloc is essentiallyproviderThe package extension library ofInheritedWidget 、NotifieradditionalStreamTransit status change notice. For the implementation principle of bloc, interested students can watch this articleAnalysis of bloc principle RxBinder Put asideBlocInternal implementation strategy: Xiaohong tries to customize a set of state management tools based on […]

  • Linux machine mutual login


    Connect centos-01 in centos-02 virtual machine Check the load in centos-01 to see which device is connected #w Connect centos-01 in centos-02 #ssh Viewing loads in centos-01 #w At this time, we found an additional, namely centos-02 Strict writing remote connection SSH [email protected] View current user #whoami #ssh [email protected] Strict writing of the […]

  • [basic] the Vue project encapsulates Axios twice. How to write the request global interface request file?


    When building a Vue project, you need to consider encapsulating a global interface request file, which can intercept logins and requests, and handle general status error codes and exceptions. In this way, the code will be very concise when using interface requests externally. The following is a reference demo of a package interface file found […]

  • Force deletion of resources in the terminating state in kubernetes


    1 forced deletionkubernetesMediumpodresources #The pod is in the terminating status. First, check whether the pod has the corresponding deployment resources and replicaset resources. If there are these two resources, delete them first kubectl delete deployment <deploy-name> -n namespace kubectl delete rc <rc-name -n> namespace #Then delete the pod kubectl delete pod <pod-name> –grace-period=0 –force #If […]

  • This paper introduces a commonly used disk storage status monitoring tool — wgcloud


    Wgcloud is an open source operation and maintenance monitoring tool, which is very lightweight and efficient, with distributed, cluster monitoring and other capabilities It is mainly used for real-time monitoring of physical hosts, virtual machines, virtual machines, and applications, ports, log files and other resources on servers The disk storage status is the basic function […]

  • Applet switch component customization


    Achieve results Use the native components of the applet to modify the style of the switchDisadvantages: if the width and height are increased, the increased part is not sensitive when clicking to switch <switch class=”switch-item” checked=”{{ switchChecked }}” color=”#1180FD” bindchange=”switchChange”/> Method 1: modify CSS style directly /*Swtich overall size*/ .switch-item{ width:105rpx !important; height: 40rpx !important; […]

  • Declarative UI


    Fluent adopts a declarative UI layout. Why declarative UI The framework from Win32 to the web to Android and IOS usually uses the command UI programming style, which is probably the most familiar style – you manually build a full-featured UI entity, and then use the method to change it when the UI is changed.In […]

  • Projectors for event consumers – event traceability


    This article is reproduced from [how to decouple]:https://codedecoupled.com/php… In the event traceability architecture, obtaining the current state of the application through the event flow may cause performance problems. The projector generates an independent view to save the current state of the application by listening to events. We can think of it as a materialized view […]