Finish CSS in a day: box model content, padding, border, margin-06

1. box model Attribute names often heard in Web design: content, padding, border, margin, CSS box pattern all have these attributes. These attributes can be understood by using the box as a metaphor, which is a common thing in everyday life, so we call it the box pattern. 2. Box model can be divided into standard box model and non-standard ...

Posted by faraway on Mon, 11 Feb 2019 08:33:19 -0800

@ Angular/cli: How do I make @angular/cli-generated projects compatible with IE9/10/11?

One nauseating thing is that @angular/cli generated projects do not support IE well by default, and neither does 9/10/11. The good news is that @angular/cli generates the polyfill.ts file by default, which can be supported in a few simple steps. Step 1: Create a project with @angular/cli ng new ie-test cd ie-test ng ser ...

Posted by vulcant13 on Sat, 09 Feb 2019 17:42:20 -0800

leetCode#121. Best Time to Buy and Sell Stock

Description Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit. Example 1: Input: [7, 1, 5, 3, 6, 4] Output: 5 max. dif ...

Posted by rledieu on Wed, 06 Feb 2019 00:39:16 -0800

VUE Learning Path (2) - - Vue.directive of Global API

One. Global API: APIA global is not in the constructor, but declares global variables first or defines some new functions directly on VUE. VUE has built-in global APII, such as Vue.directive. Simply put, we define new functions with API functions provided by Vue outside the constructor. Two. Vue.directive 1. Let's make a sma ...

Posted by silviuchingaru on Mon, 04 Feb 2019 06:03:16 -0800

[LeetCode] 116. Populating Next Right Pointers in Each Node

Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL. Initially, all next po ...

Posted by TimC on Sun, 03 Feb 2019 15:06:16 -0800

How do you simulate real concurrent requests in Java?

Sometimes it is necessary to test the concurrency performance of a function without resorting to other tools. It is most convenient to have a concurrent request in your own development language. Simulating concurrent requests in Java is naturally very convenient, as long as you open a few more threads, it is good to initiate requests. However, ...

Posted by Spikey on Sun, 03 Feb 2019 12:12:16 -0800

Native javascript implementation magnifier

The effect is as follows Knowledge Points Used offsetTop property: This attribute can get the distance between the upper and outer edges of the element and the nearest location of the inner wall of the parent element. If the location is not used in the parent element, the distance between the upper and outer edges of the e ...

Posted by cjacks on Sat, 02 Feb 2019 11:21:16 -0800

Python crawler example: download multi-page topic content from Baidu Post Bar

Last week in the web crawler course, a practice was left: download multi-page topic content from Baidu Post Bar. What I accomplished was to crawl multi-page content from a post in the post bar, which was different from the topic asked by the teacher. Moreover, after the teacher commented, I found the gap between myself and the ...

Posted by maciek4 on Thu, 31 Jan 2019 10:03:15 -0800

Javaascript Data Type Judgment

JavaScript has six types of data, which can be divided into primitive type (aka basic type) and object type (aka reference type). There are five primitive types: number, string, boolean, undefined and null. Common object types are Function, Array, Date, and regular ES6 Added Symbol Judgment of pleasure provided by JavaScript itself ...

Posted by nesargha on Thu, 31 Jan 2019 02:00:15 -0800

Some methods commonly used in project sorting out

1. Judging the current browser type function isBrower(){ var ua = navigator.userAgent.toLowerCase(); var isMiscro = ua.indexOf("micromessenger")>-1;//Wechat Browser var isChrome = ua.indexOf('chrome')>-1 && ua.indexOf('safari')>-1; //Chrome var isSafari = ua.indexOf('safari')>-1 && ua.indexOf('chrome')= ...

Posted by rbastien on Thu, 24 Jan 2019 04:06:13 -0800