Tag:Definition

  • Three definition methods of JS function

    Time:2021-7-30

    How functions are defined Function declaration: it must have a name. It will promote the function. It has been created in the pre parsing stage. It can be called before and after the declaration //Function declaration //Define function name function fn(){ console.log(123); } Function expression: a variable assignment function expression can have no name (anonymous […]

  • Leetcode78. Subset Python implementation

    Time:2021-7-30

    Title Requirements: Idea: Define a res to save the result set Traverse the array, add the current value to all values in the res result set, and then append to the result set. After traversing the array, res appends a [[]], which is the result Core code: res = [[]] for i in range(len(nums)): for […]

  • Recursion and miracle

    Time:2021-7-30

    <!– Recursion and miracles — > < # header from mengniang encyclopedia, address: https://zh.moegirl.org.cn/File:Bg_ chara_ 201912.png #> preface I call some exciting things miracles There are currently three parts: Part I-From recursion to tail recursion: sort out someCase of non tail recursion transcribed to tail recursion。 At first, it was just because the author of […]

  • MindSpore! I love this just open source deep learning framework!

    Time:2021-7-29

    [Abstract]This paper mainly adopts two practical application cases: one is MNIST handwritten data recognition based on local jupyter notebook; Second, based on the cifar-10 image classification of Huawei cloud server, this paper introduces the open source framework mindspire. I still remember that at this year’s Huawei Developer Conference HDC 2020, mindspire, a deep learning framework […]

  • Markdonw syntax

    Time:2021-7-29

    catalogue Introduction to markdown syntax **Bold** *Italics* title Split line 1(#_35) ++Underline++strikethrough \==Mark== Paragraph reference list task list link Code paragraph Table Footnotes Emoji $\ \ KAtex $formula layout definition abbr Introduction to markdown syntax Grammar explanation bold **Bold** __ Bold__ Italics *Italics* _ Italics_ title #Primary title# Primary title ==== ##Secondary title## Secondary title […]

  • How to design API interface to realize uniform format return?

    Time:2021-7-29

    Front and rear interface interaction As we all know, the front end usually obtains data through the interface provided by the background to complete the rendering of front-end pages. The front end can be PC, m, applet, app, etc. No more nonsense here. That’s not the point. Interface return value Convention Return value specification Set […]

  • Introduction to angular pipe

    Time:2021-7-29

    PIPE, translated as pipeline.AngularA pipeline is a way to write a display value transformation that can be declared in an HTML component.AngularBefore the pipeAngularJSIs called a filter fromAngular 2It was called a pipe from the beginning. The pipeline takes data as input and converts it to the desired output. Angular PipesTake integer, string, array and […]

  • 3 lines of code Python handles picture definition recognition. It turns out that this is not necessarily the case

    Time:2021-7-29

    Under normal circumstances, whether the picture is clear is a perceptual understanding. For the same picture, you may feel that it is passable, while others will feel that it is not clear and lack a unified standard. However, there are some algorithms that can quantify the clarity of the picture, so that there are rules […]

  • Quickly understand the service mesh microservice architecture and realize grpc communication between services

    Time:2021-7-29

    In the previous article, we introduced how to play the service mesh microservice architecture step by step based on kubernetes and istio! In this article, we demonstrate a case that is very close to the actual combat. Here we review the structure of the case, as shown in the figure below: This case demonstrates the […]

  • Android kotlin uses annotations to realize the anti button connection function

    Time:2021-7-29

    SingleClick: @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.FUNCTION) annotation class SingleClick( //Click interval, MS val value: Long = 500 ) SingleClickAspect: import android.os.SystemClock import org.aspectj.lang.ProceedingJoinPoint import org.aspectj.lang.annotation.Around import org.aspectj.lang.annotation.Aspect import org.aspectj.lang.annotation.Pointcut import org.aspectj.lang.reflect.MethodSignature @Aspect class SingleClickAspect { /** *Define the tangent point and mark the tangent point as all the methods annotated by @ singleclick *Note: here, me.baron.test.annotation.singleclick needs to […]

  • Using cookies for identity authentication in asp.net core applications

    Time:2021-7-28

    Overview Identity authentication is the most basic function of the website. Recently, due to a demand of the business department, a gadget website that has existed for a long time needs to be transformed. Because some discrete systems are gradually migrating to the. Net core, we take this opportunity to upgrade the old. Net framework […]

  • How to use Lamar in ASP. Net core

    Time:2021-7-28

    ASP. Net comes with a minimalist coreOut of the boxIn fact, you can also use third-party dependency injection containersDependency injection containerInstead of it, dependency injection is a design pattern that can effectively decouple objects and improve unit testing and maintainability. You can use itDependency injectionTo improve your code design, instead of new objects everywhere. Lamar […]