vue notes-provide & inject (2)

1. Usage: provide: Used in ancestor components; a value is an object or a function that returns an object; inject: Used in descendant components; value is an array of keys or an object in the provider object whose key value is the local binding name and value is the key or an object in the provider object: {from:'key in the p ...

Posted on Sun, 19 Jan 2020 11:26:32 -0500 by omprakash

raft Theory and Practice [4]-lab2b

Dead work1. Reading raft paper2. Reading raft Theory and Practice [1] - Theory Paper3. Reading raft Theory and Practice [2]-lab2a4. Reading raft theory and practice [3]-lab2a explanation5. Check out this article I wrote: Simulate RPC remote procedure calls Execution Log We need to execute the commands in the log, so in the make function, we ha ...

Posted on Sun, 19 Jan 2020 11:13:21 -0500 by sales@gmba.dk

[red sun Day12 CTF] SQL injection caused by htmlentities

Exercise notes Recurrence Code: index.php <?php require 'config.php'; if(isset($_REQUEST['username'])){ if(preg_match("/(?:\w*)\W*?[a-z].*(R|ELECT|OIN|NTO|HERE|NION)/i", $_REQUEST['username'])){ die("Attack detected!!!"); } } if(isset($_REQUEST['password'])){ if(preg_match( ...

Posted on Sun, 19 Jan 2020 09:50:36 -0500 by Kingskin

Talk about StringBuffer and StringBuilder

As we know, String is a read-only String. Once the referenced String is defined, it cannot be modified. Splicing or intercepting a String will create a new String object. If you need to make a lot of changes to the String, the performance of using String is extremely low. As an example, String is splice ...

Posted on Sun, 19 Jan 2020 09:42:23 -0500 by gth759k

18 Java 8 date processing practices, very useful

Java 8 introduces a new date time API. In the tutorial, we will learn how to use the new API through some simple examples. The way Java deals with date, calendar and time has always been criticized by the community. Setting java.util.Date as a variable type and the non thread safety of SimpleDateFor ...

Posted on Sun, 19 Jan 2020 09:07:25 -0500 by djjamiegee

Source code analysis of redis cluster visit

gossip Update in github later, please stamp redis Cluster - > visit Catalog cluster bus When will the message be sent ping pong cluster bus Come from cluster-tutorial Each Redis cluster node needs two TCP connections. The general TCP port is used to interact with the client, such as 6379. Ther ...

Posted on Sun, 19 Jan 2020 09:06:12 -0500 by timj

Operator '= =' and object's equals() method

Operator '= =' and object's equals() method brief introduction The operator "= =" compares whether the two operands are equal. The two operands can be either basic type or reference type. For example > int a1=1,a2=3; > boolean b1=a1==a2;//The operand of "= =" is of basic ...

Posted on Sun, 19 Jan 2020 08:57:01 -0500 by megavolt

Spring Boot configuration unified format Result return value

In (1), I have configured the Result return value under the normal return condition, but in many cases, the application cannot return the normal information to the client when encountering an exception in the actual application. In this regard, I have made the following solutions: Let's first look at th ...

Posted on Sun, 19 Jan 2020 08:38:48 -0500 by jawapro

Deep understanding of NIO

Preface Based on the Server side of BIO implementation, how many threads will there be when 100 connections are established? How many threads will there be based on NIO? BIO The so-called BIO is the most traditional socket link, for example: int port = 4343; //Port number // Socket server (simple sending information) Thread sThread = new Thread ...

Posted on Sun, 19 Jan 2020 08:32:15 -0500 by gabo0303

How C + + classes are stored in memory

Next, the previous article continued to introduce the storage method of C + + classes in memory. The previous article did not involve the inheritance relationship of classes, so the space occupied by classes = non static member variables + pointers to virtual functions (if any) If there is any infringem ...

Posted on Sun, 19 Jan 2020 08:23:37 -0500 by the-botman