Using jsonp to grab cross domain data in Vue project

Download jsonp NPM install jsonp Add a jsonp.js in the JS folder to encapsulate a jsonp() How to encapsulate a jsonp() In the downloaded jsopn, JSON (url, options, callback) is a parameter in the native JSON method; Introducing download jsonp import originJsonp from 'jsonp'; Export your own defined JSON functions //This JSON function i ...

Added by hypertech on Sat, 09 Nov 2019 16:22:37 +0200

Talk about SizeBlockingQueue of Elasticsearch

order This paper focuses on the SizeBlockingQueue of elastic search SizeBlockingQueue elasticsearch-7.0.1/server/src/main/java/org/elasticsearch/common/util/concurrent/SizeBlockingQueue.java public class SizeBlockingQueue<E> extends AbstractQueue<E> implements BlockingQueue<E> { private final BlockingQueue<E> queue; ...

Added by shortysbest on Fri, 01 Nov 2019 19:01:44 +0200

Verification code - simple implementation

Verification Code: Create cached image: specify width=90,height=30Get brush objectSet brush colorFill rectangular areaThe characters char[] arr = {'A', 'B', 'C', 'D', 'N', 'E', 'W', 'B', 'o', 'y', '1', '2', '3', '4', '5', '6'} are randomly obtained from the character array.Cycle 4 times, draw 4 charactersSet the color of the word to randomSet t ...

Added by tbone05420 on Tue, 22 Oct 2019 20:59:31 +0300

React16 source code parsing Scheduler

Welcome to read the React source code analysis series:React16 source code analysis (I) - illustration of Fiber architectureReact16 source code analysis (2) - create updateReact16 source code analysis (III) - ExpirationTimeReact16 source code analysis (IV) - SchedulerReact16 source code analysis (V) - update process rendering stage 1React16 sour ...

Added by goldlikesnow on Fri, 18 Oct 2019 20:55:03 +0300

Insert Styles with javascript

function addCSS(cssText){ var style = document.createElement('style'), //Create a style element head = document.head || document.getElementsByTagName('head')[0]; //Get the head element style.type = 'text/css'; //Here you must show that the type attribute of the style element is text/css, otherwise it will not work in ie. ...

Added by tensionx on Sat, 12 Oct 2019 22:06:52 +0300

vue Small Case--Simple Comment Area

1. Small cases (commentary area) 1, process (1) Analysis of static pages. (vue project creation reference https://www.cnblogs.com/l-y-h/p/11241503.html)(2) Split static pages into components.(3) Coding components to generate dynamic pages. 2. Static pages Reference source: https://www.bilibili.com/video/av49099807/?P=22&t=1223 [Examp ...

Added by lixid on Thu, 10 Oct 2019 17:13:52 +0300

jQuery implements a 30s countdown for sending validation codes and is valid when refreshing pages

Here I will talk about the realization of this case (personal opinion)... Core idea: To prevent the countdown from failing when the page refreshes, the solution is to execute a function every time the page is refreshed, that is, the setStyle() function described below. This function determines whether the cookie value is in the countdown stage ...

Added by tina88 on Sat, 05 Oct 2019 16:53:58 +0300

IEnumerable and IEnumerator in C#

1. I do not understand what I mean when I read this: public class BinaryHeap<T> : IEnumerable<T> where T : IComparable <T> { private List<T> mHeap; ..... } It's not very clear, in short, to make the data structure support foreach operations. 2. How to und ...

Added by tomato on Fri, 04 Oct 2019 04:42:50 +0300

About jQuery Full Screen Scroll Plug-in FulPage.js

brief introductionOn April 15, Netease's mailbox was upgraded to version 6.0, and an introduction page (click visit) was released. The page adopted the popular "full screen" effect. The text, pictures and CSS3 animation made users understan ...

Added by TheOracle on Wed, 18 Sep 2019 15:14:46 +0300

Dojo Store Concept Explanation

Self translation https://github.com/dojo/framework/blob/master/docs/en/stores/supplemental.md State object In modern browsers, state objects are passed in as part of CommandRequest. Any modification to the state object will be translated into the corresponding operation and applied to the store. import { createCommandFactory } from '@dojo/fram ...

Added by mars_rahul on Wed, 11 Sep 2019 14:07:00 +0300