• C + + learning records (6) — Inheritance and polymorphism of class models


    OOP features (inheritance) At this stage, we can further discuss the specific implementation of OOP in programming.Last time, we proposed the concept of class. In fact, the class corresponds to the class in OOPabstractThis concept. We extract the common points of things and abstract them into classes.This time,To improve code reusability, C + + proposes […]

  • Django 1.8 official document translation: 6-4-2 write a custom Django admin command


    Write a custom Django admin command Applications can bemanage.pyRegister their own actions. For example, you might want to add one for the Django application you are publishingmanage.pyAction. In the documentation on this page, we willpollsBuild a custom applicationclosepollCommand. To do this, simply add one to the applicationmanagement/commandscatalogue Django will register one for each Python module […]

  • Parent child component execution order of react


    Execution sequence 1. Componentwillmount of parent class2. Render of parent class3. Componentwillmount of subclass 14. Render of subclass 15. Componentwillmount of subclass 26. Render of subclass 27. Componentdidmount of subclass 18. Componentdidmount of subclass 29. Componentdidmount of parent class Process of component mounting: Initialize props. Through the class’s static attribute defaultprops or getdefaultprops function, the […]

  • 15 questions on how to use Java generics


    Summary:Java generics is essentially a parameterized type, that is, the operated data type is specified as a parameter (type parameter). This parameter type can be used in the creation of classes, interfaces and methods, which are called generic classes, generic interfaces and generic methods respectively. This article is shared from Huawei cloud community《15 questions to […]

  • Java object oriented instanceof keyword


    entrance   Java has three object-oriented features: Encapsulation: Some information of the class is hidden inside the class, and external programs are not allowed to access it directly. Instead, the operation and access of hidden information are realized through the methods provided by the class. Inheritance: Inheritance is a kind of relationship between classes, which […]

  • The content of textarea has changed, but the bound model has not been updated


    Problem Description: //app.js angular.module(‘deapp’, []) .controller(‘ParentCtrl’, [‘$scope’, ParentCtrl]) .controller(‘ChildCtrl’, [‘$scope’, ChildCtrl]); function ParentCtrl($scope) { $scope.description = ”; } function ChildCtrl($scope) { } //index.html <div data-ng-controller=”ParentCtrl”> <div data-ng-controller=”ChildCtrl”> <textarea class=”description” data-ng-model=”description”></textarea> </div> </div> When I modify the content of textarea, the bound description is not updated at all. I can only use the chrome plug-in ng […]

  • Jakartase_ IO stream— System.in, system.out (attached)


    ISystem.inPredefined (it is a subclass of InputStream):object)But it reads information from standard input, the console or redirected file IISystem.out:… To be continued

  • Talk about flynk’s asyncwaitoperator


    order This paper mainly studies the asyncwaitoperator of flynk AsyncWaitOperator flink-streaming-java_2.11-1.7.0-sources.jar!/org/apache/flink/streaming/api/operators/async/AsyncWaitOperator.java @Internal public class AsyncWaitOperator<IN, OUT> extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { private static final long serialVersionUID = 1L; private static final String STATE_NAME = “_async_wait_operator_state_”; /** Capacity of the stream element queue. */ private final int capacity; /** Output mode for […]

  • Talk about the select operation of the flick table


    order This paper mainly studies the select operation of the flick table Table.select flink-table_2.11-1.7.0-sources.jar!/org/apache/flink/table/api/table.scala class Table( private[flink] val tableEnv: TableEnvironment, private[flink] val logicalPlan: LogicalNode) { //…… def select(fields: String): Table = { val fieldExprs = ExpressionParser.parseExpressionList(fields) //get the correct expression for AggFunctionCall val withResolvedAggFunctionCall = fieldExprs.map(replaceAggFunctionCall(_, tableEnv)) select(withResolvedAggFunctionCall: _*) } def replaceAggFunctionCall(field: Expression, tableEnv: TableEnvironment): […]

  • Spring MVC details (1) – how to receive requests


    Before we learn how spring MVC receives requests, we need to talk about servlets. It is actually a web component provided by Java. The Tomcat container we are familiar with is the implementation of a servlet container, which is used to manage servlets as the name suggests. When I first learned Java, I believe everyone […]

  • Let’s talk about where and filter operation of flick table


    order This paper mainly studies the where and filter operations of the flick table Table flink-table_2.11-1.7.0-sources.jar!/org/apache/flink/table/api/table.scala class Table( private[flink] val tableEnv: TableEnvironment, private[flink] val logicalPlan: LogicalNode) { //…… def where(predicate: String): Table = { filter(predicate) } def where(predicate: Expression): Table = { filter(predicate) } def filter(predicate: String): Table = { val predicateExpr = ExpressionParser.parseExpression(predicate) filter(predicateExpr) […]

  • Talk about the distinct aggregation of the flick table


    order This paper mainly studies the distinct aggregation of the flick table example //Distinct can be applied to GroupBy Aggregation, GroupBy Window Aggregation and Over Window Aggregation. Table orders = tableEnv.scan(“Orders”); // Distinct aggregation on group by Table groupByDistinctResult = orders .groupBy(“a”) .select(“a, b.sum.distinct as d”); // Distinct aggregation on time window group by Table […]