Category:Program

  • Choose react or angular 2

    Time:2021-6-24

    Original addressChoosing between React vs. Angular 2The following is the translation of this article, which can be used at your choiceReactperhapsAngular2We need to help when we need to. React has become a cool representative in 2015, but angular.js has changed from a front-end framework that people love to a terrible devil (and not so terrible…) […]

  • Spring cloud Alibaba: Framework and services

    Time:2021-6-24

    By Chen Xi   Member of spring cloud Alibaba project, head of start.aliyun.com. Reading guideThis paper summarizes the author’s share of “spring cloud Alibaba: Framework and services” in the 2020 cloud native microservice conference, and mainly expounds how spring cloud Alibaba can help developers realize microservices in the cloud native environment; Based on the SCA […]

  • Implementing a tinyredux from 0

    Time:2021-6-24

    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 […]

  • JavaScript ES6 can sort an object array according to another object array

    Time:2021-6-24

    With the help of this blog, we have realized the functions we needhttps://www.cnblogs.com/guojbing/p/10872867.html Suppose you have an array of objects: const arr1 = [ {buyerId: “1”, name: “WW”}, {buyerId: “2”, name: “RR”}, {buyerId: “3”, name: “OO”}, {buyerId: “4”, name: “ll”}, {buyerId: “5”, name: “DD”}, {buyerId: “6”, name: “SS”} ] Another object array is: const arr2 […]

  • Lightweight promise Library Based on objc — rwpromise Kit

    Time:2021-6-24

    rise Nothing to do. When I look at JavaScript, I find thatPromiseIt’s good. Turn the logic hidden in asynchronous calls into synchronous calls. getJSON(“/posts.json”).then(function(posts) { // … consume(posts); }).catch(function(error) { console.log(‘something wrong!’, error); }); aboutPromiseYou can seehereandhere I searched GitHub for one with more stars. After a brief glance,mxcl/PromiseKitMainly depends onRunLoopThe implementation of (also usefulOperationQueueImplementation). […]

  • How mashape manages 15000 APIs and microservices (2)

    Time:2021-6-24

    framework For a while, mishap’s architecture consisted of about 150000 lines of Java code, a real single application! But now it has been broken down into 400 microservices composed of different languages, including:Node.js,Lua,Ruby,java,PythonandOCaml. Everything is made up of APIs. Mashape ID, for example, is an authentication platform operated by API. Whenever a new product is […]

  • Dealing with high concurrent IO bottleneck and solving red packet program

    Time:2021-6-24

    Solve the bottleneck of high concurrency and red envelope program This program simulates the red envelope lottery mode. The total amount of 100 yuan, random users get 1-10 yuan of red packets, until the red packets are distributed.Luckmoneymax in redis needs to be set in advance $r->set(‘luckMoneyMax’ , 100); text /** *Get red packets randomly […]

  • Options beyond swagger

    Time:2021-6-24

    Today, I will give you an interface document generator — japidocs. Swagger must have been used by everyone. It’s very convenient and powerful. If you want to say that swaager has any shortcomings, it must be that it is troublesome to write annotations. If I say there is a tool that can generate documents without […]

  • Tsp / RTP protocol live push library easypusher pushes RTSP stream to easydarwin open source platform to realize custom stre

    Time:2021-6-24

    It is very simple and convenient to implement a push client based on easypusher SDK library module, because the SDK side has implemented all kinds of annoying functions such as state maintenance, error checking, permission determination, UI synchronization, etc., and developers only need to implement several interfaces. Today, a customer needs to push RTSP stream […]

  • The error boundaries of react

    Time:2021-6-24

    Error boundaries Starting from react V16, the concept of boundary error is introduced. Core API getDerivedStateFromError componentDidCatch 1. Purpose: some UI crash, not the whole webapp crash 2. Attention ⚠️: Error bounds cannot capture errors in the following scenarios Event handling (learn more) Asynchronous code (for examplesetTimeoutorrequestAnimationFrameCallback function) Server rendering Errors thrown by itself (not […]

  • LeetCode 1248

    Time:2021-6-24

    Portal: https://leetcode-cn.com/probl… First, estimate the violent solution: loop through each subarray to determine whether it is a graceful subarray, and the odd number of the array needs to be obtained in the judgment process. It is not advisable to estimate o (N3).dynamic programmingFor this problem, we can decompose the problem and use the results of […]

  • CSS whimsy | single div drawing skills

    Time:2021-6-24

    Often see articles about CSS drawing, such as using pure HTML + CSS to draw a Doraemon picture. The way to achieve this is to stack divs step by step to achieve the picture one by one. There is no problem with this technique, but it is less difficult. With patience, many graphics can be […]