Tag:method

  • Selected contents of JavaScript language essence

    Time:2020-4-3

    Recently reading《The essence of JavaScript language》This book is written byDouglas Crockford;Douglas CrockfordIt’s a guy fromYahoo!SeniorJavaScript architectTo create and maintainJSON(JavaScript object notation)The format is well known. He will regularly publish relevant information in various meetingsAdvanced JavaScriptA keynote speech. He is also.ESMAscriptOne of the members of the Committee.I wanted to write a post reading article, but think […]

  • Pipeline of spark mllib

    Time:2020-4-3

    The spark pipeline API is inspired by scikit learn and aims to simplify the creation, tuning and validation of machine learning processes.Ml pipeline usually consists of the following stages: Data preprocessing feature extraction Creation of algorithm model and fitting of model parameters Verification The phases of ML pipeline are implemented by a series of converters […]

  • Handwritten react router DOM

    Time:2020-4-2

    Functions to be implemented Routing mode:hash,browser Components:HashRouter,BrowserRouter,Route,Switch,Redirect,Link Current route information: Pathpathname, parametersquery Route jump:push,replace,go,goBack How to use react router DOM //Routing configuration import React from ‘react’ // react-router-dom import { HashRouter as Router, Route, Redirect, Switch } from ‘react-router-dom’ //Handwritten react router DOM // import { HashRouter as Router, Route, Redirect, Switch } from ‘@/plugins/my-router-dom’ […]

  • Differences between factory, service and provider in angularjs

    Time:2020-4-2

    Angularjs supplier ($provide) $provideService responsible for informingAngularJSHow to create a new injectable thing: a service. Services are defined by something called a provider, and can be used$provideTo create a supplier. How to create a supplier: Use$provideMediumprovider()Method to define a supplier; By request$provideInjected into an applicationconfigFunction to get$provideService; How to define suppliers constant value service factory […]

  • Python blinker Library Learning

    Time:2020-4-2

    Refer to blinker documentation Blinker is a powerful signal library based on python, which supports both simple object-to-object communication and multicast for multiple objects. Flask’s signaling mechanism is based on it. Although blinker’s kernel is small, it has powerful functions. It supports the following features: Support for registering global naming signals Support anonymous signal Support […]

  • Tsinghua big guy takes you to finish Mini Tomcat (with source code)

    Time:2020-4-2

    Preface Tomcat, this 3-legged cat, has known each other since college. Until now, he often deals with it at work. This is a magical cat. Today, let me Abstract you and realize you! Write MyTomcat Tomcat is a very popular web server. It is also a container that meets the servlet specification. So think about […]

  • Pull down to refresh, pull up to load on the mobile end

    Time:2020-4-2

    In mobile development, when processing list page turning and data, pull-down refresh and pull-up loading are widely used. Today, we recommend a Vue plug-in, vuesocroll. First, the figure above: I don’t have much to say, but I’m going to code it: 1、 Introducing and using vuescroll import VueScroller from ‘vue-scroller’; Vue.use(VueScroller) 2、 Used in HTML […]

  • [technical translation] write asynchronous tasks in modern JavaScript

    Time:2020-4-2

    This week, we will translate some technical articles. This time, we expect to translate three articles as follows: Generate static websites with nuxt How web content can affect power usage Write asynchronous tasks in modern JavaScript (https://web.dev/off-main-thread/) All my translated technical articles are put in a GitHub warehouse. If you find it useful, please click […]

  • C# generic

    Time:2020-4-2

    This article is from: https://www.cnblogs.com/netbatman/p/10374072.html What is generics? C and common language runtime (CLR) added generics in version 2.0. Generics introduce the concept of type parameters into the. Net framework so that classes and methods with the same characteristics can be designed: before client code declares and initializes these classes and methods, they delay specifying […]

  • Go interface (similar to polymorphism in Python class)

    Time:2020-4-2

    1、 Define interface type Person interface { Run() // if there is a run method, it is a person structure } //There are also ways to define type Person2 interface { Speak() Person // is equivalent to run () } 2、 Actual use package main import “fmt” type Person interface { Run() } type Person2 […]

  • Spark ml parameter

    Time:2020-4-1

    In machine learning, how to fit parameters for the algorithm model according to the given data set, so that the model can achieve the optimal effect, this process is called “tuning”.Spark’s mlib providesCrossValidatorandTrainValidationSplitThere are two ways to help tune the model.Generally, the following settings are required to use the above two methods, setEstimatorMethod to specify […]

  • Vue uses clipper.js to capture pictures and compress them

    Time:2020-4-1

    1. This compression method is to obtain the image and then compress it after intercepting it ` <template> <div class=”cropper-page”> <slot> < button @ Click = “Upload” > upload picture < / button > </slot> <div id=”demo”> <! — mask layer — > <div class=”container” v-show=”panel”> <div class=”cropper-box”> <img id=”image” :src=”url”> </div> <div class=”bottom-btn-box”> < […]