Или в чём разница между git pull и git fetch? Если совсем коротко, то:
git pull = git fetch + git merge
//Introduction | |
// Your task in order to complete this Kata is to write a function which formats a duration, given as a number of seconds, in a human-friendly way. | |
// The function must accept a non-negative integer. If it is zero, it just returns "now". Otherwise, the duration is expressed as a combination of years, days, hours, minutes and seconds. | |
// It is much easier to understand with an example: | |
// formatDuration(62) // returns "1 minute and 2 seconds" | |
// formatDuration(3662) // returns "1 hour, 1 minute and 2 seconds" | |
// For the purpose of this Kata, a year is 365 days and a day is 24 hours. | |
// Note that spaces are important. |
function debounce(originalFn, timeoutMs) { | |
let timeout; | |
return (...args) => { | |
clearTimeout(timeout); // clear timeout every time the function is called | |
timeout = setTimeout(() => originalFn(...args), timeoutMs); // call the original function once "timeoutMs" ms after the last call have elapsed | |
}; | |
} |
// Creates a throttled function that only invokes "originalFn" at most once per every "delayMs" milliseconds | |
function throttle(originalFn, delayMs) { | |
let timeout; // timeout to keep track of the executions | |
return (...args) => { | |
if (timeout) { // if timeout is set, this is NOT the first execution, so ignore | |
return; | |
} | |
// this is the first execution which we need to delay by "delayMs" milliseconds | |
timeout = setTimeout(() => { |
/* Styles for hiding the native checkbox */ | |
input[type='checkbox'].check-custom { | |
top: 0; | |
left: 0; | |
width: 0; | |
height: 0; | |
opacity: 0; | |
filter: alpha(opacity=0); | |
position: absolute; | |
visibility: hidden; |
git branch -m old_branch new_branch – переименовать локальную ветку | |
git push origin :old_branch – удалить старую ветку | |
git push --set-upstream origin new_branch – выгрузить новую ветку и "закрепить" ее за локальной веткой |
// Файл "tsconfig.json": | |
// - устанавливает корневой каталог проекта TypeScript; | |
// - выполняет настройку параметров компиляции; | |
// - устанавливает файлы проекта. | |
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
<template> | |
<div class="wrapper"> | |
<div class="box" @scroll="handleScroll"> | |
<p>Your content here...</p> | |
</div> | |
<a href="#" v-if="hasScrolledToBottom">Show After Scrolling</a> | |
</div> | |
</template> | |
<script> | |
export default { |
box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4) inset; | |
border-collapse: separate; | |
/* Notes on IE: https://caniuse.com/#feat=mdn-css_properties_box-shadow_inset */ |
import 'whatwg-fetch' | |
import Auth from './Auth'; | |
import Url from 'url-parse'; | |
const API_URL = process.env.API_URL | |
const http = { | |
get: get, | |
getAuthed: getAuthed, |