This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Функция конструктор (способ создания в функциональном стиле ООП) - не приветствуется | |
function Animal(legs) { | |
this.legs = legs; | |
this.walks = function(){ | |
return 'Proudly walks on all ' + this.legs + ' legs'; | |
} | |
// Создание экземпляра класса | |
let animal = new Animal(4); | |
console.log(animal); //{ legs: 4, walks: [Function] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ========================================================================== | |
Style block comment | |
========================================================================== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ================================================== | |
HTML block comment | |
================================================== --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ================================================== | |
JS comment block style | |
================================================== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Reset */ | |
body,div,dl,dt,dd,ul,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,input,textarea,p,blockquote,th,td{ | |
margin: 0; | |
padding: 0; | |
} | |
table{ | |
border-collapse: collapse; | |
border-spacing: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run PowerShell as Administrator | |
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force | |
npm install -g npm-windows-upgrade | |
npm-windows-upgrade -p -v latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- https://ru.vuejs.org/v2/guide/single-file-components.html --> | |
<!-- my-component.vue --> | |
<template src="./my-component.html"></template> | |
<script src="./my-component.js"></script> | |
<style src="./my-component.css"></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Используется как справочный комментарий перед функцией – о том, что именно она делает, какие параметры принимает и что возвращает. | |
/** | |
* Возвращает x в степени n, только для натуральных n | |
* | |
* @param {number} x Число для возведения в степень. | |
* @param {number} n Показатель степени, натуральное число. | |
* @return {number} x в степени n. | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save-dev eslint-config-react-app babel-eslint@10.0.1 eslint@5.16.0 eslint-plugin-flowtype@3.10.1 eslint-plugin-import@2.17.3 eslint-plugin-jsx-a11y@6.2.1 eslint-plugin-react@7.13.0 eslint-plugin-react-hooks@1.6.0 | |
Usage Outside of Create React App | |
If you want to use this ESLint configuration in a project not built with Create React App, you can install it with the following steps. | |
First, install this package, ESLint and the necessary plugins. | |
npm install --save-dev eslint-config-react-app babel-eslint@10.0.1 eslint@5.16.0 eslint-plugin-flowtype@3.10.1 eslint-plugin-import@2.17.3 eslint-plugin-jsx-a11y@6.2.1 eslint-plugin-react@7.13.0 eslint-plugin-react-hooks@1.6.0 | |
Then create a file named .eslintrc.json with following contents in the root folder of your project: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch --set-upstream <remote-branch> | |
устанавливает удаленную ветвь по умолчанию для текущей локальной ветки. | |
Любая будущая команда git pull (с выводом текущей локальной ветки), | |
попытается выполнить фиксацию с <remote-branch> в текущую локальную ветвь. | |
Чтобы избежать путаницы, последние версии git обесценивают этот несколько неоднозначный параметр --set-upstream в пользу более подробного варианта --set-upstream-to с идентичным синтаксисом и поведением | |
git branch --set-upstream-to <remote-branch> |
OlderNewer