Objects-basis
An object is like a cabinet with signed files. Every piece of data is stored in its file by the key. key is a string (also called a “property name”), and value can be anything. An empty object (“empty cabinet”) can be create using one of two syntaxes: 12let user = new Object(); // "object constructor" syntaxlet user = {}; // "object literal" syntax Literals and properties1234let user = { // an object name: "John", // by key...
DOM-basis
DOM is the Document Object Model. Targeting nodes with selectorsWe could use the selectors target at nodes in the tree of DOM, just like the selectors in CSS; example: div.display .display #container > .display div#container > div.display DOM methodsWhen your HTML code is parse by a web browser, it is cconverted to the DOM. Now these nodes are JavaScript objects that have many properties and methods attached to them. These properties and methods are the primary tools we are going to...
function-basis
In JavaScript there is two different standards for the codes. One is the non-strict mod, and another is the strict mode. The strict mod limits the scope of a variable or a function to the block they nest in, while the non-strict mode doesn’t. Why should there be two different mod?Because the non-strict mode is the initial style when JS is newly created. And upon it is widely used, the problem of non-strict style imerged. So developments need to change it, but there are still so many old...
Flexbox
Flexbox is a way to arrange items into rows or columns. These items will flex based on some rules that you can define. Flexbox is not just a single CSS property but a whole toolbox of properties that you can use to put things where you need them. Some of these properties belong on the flex container, while some go on the flex items. This is an important concept. Flex container: any elements that has display: flex on it. Flex item: any element that lives directly inside of a flex...
The Box Model
The Box Model We could consider all the elements in the website a box. Yes, they are rectangular boxes, nesting in an other box, and lying beside an other box. Here we use padding, border, and margin to manipulate the size of these boxes, and the space between them. padding increases the space between the border of a box and the content of the box. border adds space (even if it’s only a pixel or two) between the margin and the padding margin increases the space between the borders of a box...
The Cascade
SpecificityA CSS declaration that is more specific will take precedence over less specific ones. First inline styles have the hightest specificity compared to selectors, while each type of selector has its own specificity level. ID selectors (most specific selector) Class selectors Type selectors Specificity will only be taken into account when an element has multiple, conflicting declarations targeting it, sort of like a tie-breaker. Note: When there is no declaration with a selector of...
Foundation Intro to CSS
Basic Syntax At the most basic level, CSS is made of various rules. These rules are made of a selector and a semicolon-separated list of declarations, with each of those declarations being made up of a property-value pair. Just like this: Selectors Selectors refer to the HTML elements to which CSS rules apply. Universal SelectorThe universal selector will select elements of every type (as in the whole document) 123* { color: purple;} Type SelectorA Type selector (or element...
javascript
What is javascript? JavaScript is a high-level scripting language mainly used for building interactive web pages. It runs in web browsers (like Chrome or Firefox) using an embedded engin (like V8 in Chrome).It can also run outside browsers using Node.js. How does javascript run? Not like C, JavaScript cannot be directly compiled into a binary file, then executed by operating system. Here I will clarify this layer by layer, from JS code to the Hardware. JavaScript Engine The execution of...
线代笔记
行列式的变换 行列式的计算三角形行列式的计算三角形行列式很好算,结果就等于主对角线的乘积。 范德蒙行列式的计算范德蒙行列式的结果就等于公比元素作差再相乘。并且这个作差是后边的减去前边的。 爪形行列式的计算爪形行列式通常化为三角形行列式进行计算。 一种与余子式有关的特殊题型 利用拆和的方法计算行列式 利用拉普拉斯公式计算行列式 矩阵矩阵的乘法矩阵乘法取第一个矩阵的行和第二个矩阵的列注意: 抽象矩阵求逆矩阵 数字型矩阵求逆对于较小的矩阵如二阶方阵,一般使用伴随矩阵法直接秒,而高阶方阵一般都使用初等行变换法,通过构造增广矩阵并进行初等变换来提取逆矩阵。 求解矩阵方程只要一步步解就行了 方阵的行列式这里主要讲几个公式: 矩阵的秩 行阶梯型矩阵就是每一行的第一个非零元素所在的列都比下一行的第一个非零元素所在的列更靠前。设 A 为一个矩阵,那么通过初等行变换将矩阵 A 转化为行阶梯型矩阵 B 之后,矩阵 B 中非零行的个数即位矩阵 A 的秩的值。 向量组的线性相关性判断数字型向量组的线性相关性多个向量组成的向量组...
高数下笔记
多元函数微分学二重极限的计算二重极限有这么几个计算方法: 对于非零元素可直接带入得到极限 对于整体元素,可以还原变成一元极限计算 对于0元素,可以使用等价无穷小替换 偏导数的计算一阶偏导数 一般情况:直接将其它变量当作常量进行求导即可 复合函数求偏导:链式法则,同枝相乘,异枝相加 二阶偏导数直接先求一阶导,再求二阶导就行了 多元函数全微分全微分就是函数关于各个自变量的偏导与自变量的微分之积的和 多元隐函数的偏导数直接对方程两遍同时求偏导再解方程即可,与一元隐函数求导的方法相同。 多元函数求极值 条件极值/最值使用拉格朗日乘数法: 二重积分非圆周区域上二重积分的计算首先确定积分区域的类型,x 型区域先积 y 再积 x;y 型区域先积 x 再积 y。 特殊情况有时候会遇到一些不可积函数,但是可能是对 y 不可积,但是对 x 却可积。在这种情况的题目中,一般都是可以选 x 型区域,也可以选择 y 型区域。这时候我们就要注意这种情况进行合理的区域类型选取。 example: 圆周相关区域上二重积分的计算当积分区域与圆有关,或者北极函数含有 $x^2 +...