Tag:two-way

  • Angularjs source code analysis {{bidirectional data binding}

    Time:2021-4-1

    Article reference Make Your Own AngularJS, Part 1: Scopes And Digest How AngularJS implements dirty checking and how to replicate it ourselves Personal blog:www.morphzhou.cn Simple and wordy The so-called two-way data binding is conceptually the binding of data model to view, and the binding of view to data model. It is easy to understand that […]

  • POJ_Prob.ID:3255

    Time:2021-3-9

    POJ 3255 #include #include #include #include #include #include #include #include #define INF 0x3f3f3f3f using namespace std; struct node {int to,cost;}; typedef pair<int,int>P; vector<node>G[5005]; int dis1[5005],dis2[5005]; int n,m; void dijkstra(int s){ int i,v,d,d2; node temp; priority_queue<P,vector<P>,greater<P> >que; fill(dis1,dis1+n,INF); fill(dis2,dis2+n,INF); dis1[s]=0; que.push(P(0,s)); while(!que.empty()){ P p=que.top();que.pop(); v=p.second;d=p.first; if(dis2[v]<d)continue; for(i=0;i<G[v].size();i++){ temp=G[v][i]; d2=temp.cost+d; if(dis1[temp.to]>d2){ swap(dis1[temp.to],d2); que.push(P(dis1[temp.to],temp.to)); } if(dis1[temp.to]<d2&&dis2[temp.to]>d2){ dis2[ temp.to […]

  • Redis – Chapter 10 – linked list

    Time:2021-3-6

    catalog Arrays and linked lists Linked list contrast summary 1. Arrays and linked lists Array: Array will open up a continuous space in memory to store data, which has both advantages and disadvantages. When obtaining data, the corresponding elements can be obtained directly through the subscript value, and the time complexity isO(1). But if you […]

  • Interviewer: what’s your understanding of bidirectional binding?

    Time:2021-3-5

    This is the interview Vue seriesOverall progress:3/33 1、 What is bidirectional binding Let’s start with one-way binding One way binding is very simpleModelBind toViewWhen we useJavaScriptcode updateModelWhen,ViewIt will be updated automatically It’s easy to think of bidirectional binding. On the basis of unidirectional binding, the user updatesView,ModelThe data of is automatically updated, which is called […]

  • Explain defineproperty in detail, and implement bidirectional binding manually

    Time:2021-2-16

    We all know that the principle of bidirectional binding before vue3.0 is to rely on the defineproperty () method, so what’s its magic? 1. Basic introduction Object.defineProperty(obj, prop, descriptor) 1. It accepts three parameters, all of which are required. Obj: object to define attributes. Target object Prop: second parameter: the name of the property or […]

  • First impression of angular

    Time:2021-1-31

    1: The basic concept of angular1: Angular is the framework of MV * *, so it is not the so-called MVC framework2: AngularView: encourage you to create your own new HTML elements that have their own properties and behaviors. It’s called in angularDirectivesThis is actually in reactcomponent。3: AngularModel: angular models are pure JavaScript objects.4: AngularScopeAn […]

  • An excellent HTTP framework that directly hit the pain point, let me super efficiently complete the docking with the third party interface

    Time:2021-1-18

    1. Background Because of the business relationship, we have to dock with many different third-party companies. These service providers all provide API based on HTTP. But the details of the API vary greatly from company to company. Some are based onRESTFULSome of them are based on the traditional HTTP specification; others need to be in […]

  • Vue component — input word limit

    Time:2021-1-17

    Vue.component(‘input-len-control’, { template: ` <div class=”input-control-wrapper”> <input type=”text” v-model=”input” @input=”inputControl($event.target.value)” :placeholder=”placeholder”> <span class=”control”>{{curLen}}/{{maxLen}}</span> </div> `, data() { return { Curren: 0, // the length of the current input value input: ” } }, //Bi directional binding of parent-child components model: { prop: ‘inputValue’, event: ‘change’ }, props: { maxLen: { type: Number, default: 16 }, […]

  • Geek college 9: angularjs

    Time:2021-1-9

    Introduction to angularjs Angularjs advantages: utilizeDependency injectionandBidirectional bindingTwo features, do not write a lot of code to achieve complex functions. You don’t need to operate a lot of DOM code like jQuery, you just need to change the data model to greatly improve the development efficiency <!DOCTYPE html> <html ng-app=””> <head lang=”en”> <meta charset=”UTF-8″> <link […]

  • Explain the basic operation of double linked list (C language)

    Time:2020-12-23

    @ catalog 1. Definition of bidirectional linked list 2. Creation of double linked list 3. Insert double linked list 4. Deletion of double linked list 5. Change node data in bidirectional linked list 6. Search of double linked list 7. Printing of double linked list 8. Test function and result 1. Definition of bidirectional linked […]

  • Vue.js -Handwritten implementation of a simple two-way data binding

    Time:2020-12-10

    Two way data binding is almost the most we hear about in Vue. V-model is our most common bidirectional data binding instruction. So how does it work? Let’s write it together. <body> <input type=’text’> <span class=’ppp’></span> </body> <script> let obj = {}; let temp; let ipt = document.querySelector(‘input’); ipt.oninput = function(){ obj.a = ipt.value; } […]

  • Is the bottom of B + tree of InnoDB engine in MySQL database one-way or two-way?

    Time:2020-12-9

    One way or two way? Different opinions! There are two kinds of two-way search on the Internet. So which one is right? We’re going to decrypt it today Official documents talk is cheap,show me the code The truth The concept of page The InnoDB of MySQL uses pages as the storage unit. Each leaf node […]