• Implementing a tinyredux from 0


    Implementing a tinyredux from 0 Seriously,reduxHas been very small, remove the comments code is 300 lines, you can read, the comments are also very detailed.Redux is more about the change of thinking: data change + view update. The two are separated and managed by themselves. Moreover, with Redux, you don’t need to deal with the […]

  • Vue eventbus value transfer bug


    preface Three sibling components communicate Eventbus is not unbound and triggers repeatedly Basic use /Create a new JS file and write the following code to create an eventbus. Yes, it’s so simple import Vue from ‘vue’ export default new Vue; Global call Import eventbus in main.js, and then mount it on the prototype of Vue, […]

  • Integration of mybatis framework in springboot project


    ~~~~Integration of mybatis in spring Analysis of mybatis running logic 1、 Add the required dependencies to the pom.xml file: MySQL driven dependency <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> Spring JDBC dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jdbc</artifactId> </dependency> Mybatis starter dependency <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.3</version> </dependency> 2、 Add simple configuration in application.properties configuration file Connection pool configuration spring.datasource.url=jdbc:mysql://localhost:3306/dbgoods?serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.username=root […]

  • Ioredis source code reading [0]


    Recently, because of the need of work, I want to build a node.js terminalRedis ClientComponent out, temporarily select throughioredisAs a fork object.Because I’ve met them beforeRedisWhen using twemproxy, there will always be the problem of unable to connect to the server. For details, see issues: https://github.com/luin/ioredis/issues/573So we will modify the source code to modify the […]

  • Common jsr-303 data verification


    Common jsr-303 data verification Download JSR 303 – bean validation specificationAt any time, when you want to deal with the business logic of an application, data validation is something you must consider and face. The application must ensure that the input data is semantically correct by some means. In general, the application is layered, and […]

  • Practical development case 2 of using spool project in laravel


    Recently, I have done a project using spoole, which is designed to push information to the front end of the interface, and monitor the status of non login users. The following is my experience gained from it. If there is any improvement, please leave a comment. requirement analysis Let’s assume that there is a demand. […]

  • The overall practice of loading on demand with angularjs + requirejs


    In a certain scale project, we usually want to achieve the following goals: 1. Support complex page logic (dynamically display content according to business rules, such as permissions, data status, etc.); 2. Adhere to the basic principle of front-end and back-end separation (when there is no separation, you can use template engine to directly generate […]

  • Kafka source learning: Kafka APIs leader_ AND_ ISR


    Link to the original text:https://fxbing.github.io/2021…This source code is based on Kafka 0.10.2 Whenever the controller changes state, it will call thesendRequestsToBrokersMethod sendleaderAndIsrRequestThis paper mainly introduces the logic and process of Kafka server processing the request. LEADER_AND_ISR Overall logical process case ApiKeys.LEADER_AND_ISR => handleLeaderAndIsrRequest(request) Receive leader on server side_ AND_ After ISR request, thehandleLeaderAndIsrRequestThe processing flow […]

  • PHP substr intercepts English dot and turns it into garbled code


    substr(‘6tTPnWsXBBmF5FZ2·mPbpBcZh8D76PrBP~’, 16, 1); E:\Apache\htdocs\site\application\controllers\Welcome.php:16:string ‘�’ (length=1)   mb_substr(‘6tTPnWsXBBmF5FZ2·mPbpBcZh8D76PrBP~’, 16, 1); E:\Apache\htdocs\site\application\controllers\Welcome.php:17:string ‘·’ (length=2)   Substr is the number of bytes intercepted, MB_ If substr is intercepted according to the number of logical fields, the above situation will occur. See  https://bugs.php.net/bug.php?id=66069

  • In depth analysis of Flink’s operator chain mechanism


    By littlemagic “Why is there only one box in my Flink job Web UI, and the indexes of records sent and records received are both 0? Is there something wrong with my program? “ Brief introduction of Flink operator chain I often see such questions in the Flink community. This situation is almost not caused […]

  • Hive architecture and interpretation of hive SQL execution process


    1、The background of hive The inconvenience of MapReduce programming The file on HDFS lacks schema (table name, name, ID, etc., which is a collection of database objects) 2、What is hive What are the scenarios for hive? Do some data cleaning (ETL), report and data analysis based on Hadoop The structured data file can be mapped […]

  • Application of R language multivariate logistic regression


    Original link:http://tecdat.cn/?p=2640   Stepwise regression process can be used to determine multiple logistic regression. This function selects the model to minimize AIC. How to carry out multiple logistic regression Step function can be used to determine multiple logistic regression through stepwise regression process. This function selects the model to minimize AIC. Generally, it is recommended […]