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
Надо добавить удаленную ветку, чтобы она синхронизировалась через pull/push. | |
Сначала надо создать удаленную ветку: | |
git push origin origin:refs/heads/new_branch_name | |
Стянуть ее | |
git pull origin | |
Посмотреть появилась ли в списке удаленных веток: | |
git branch -r |
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 threePlusOne(number) { | |
console.info(number); | |
if(number === 1 || number === 0) { | |
return number; | |
} else { | |
if(number%2) { | |
threePlusOne(number * 3 + 1); | |
} else { | |
threePlusOne(number / 2); | |
} |
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
document.getElementById("selectId").selectedIndex = 2; | |
// or | |
document.querySelector('#select').value = 'neededValue'; |
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
class Something { | |
private things: Thing[][]; | |
constructor() { | |
things = []; | |
for(var i: number = 0; i < 10; i++) { | |
this.things[i] = []; | |
for(var j: number = 0; j< 10; j++) { | |
this.things[i][j] = new Thing(); |
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
/* don't show the x for text inputs */ | |
::-ms-clear { | |
width : 0; | |
height: 0; | |
} | |
/* don't show the eye for password inputs */ | |
::-ms-reveal { | |
width : 0; | |
height: 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
export function setSameHeight(selector) { // Делает высоту всех элементов по селектору как у самого высокого | |
let arrayOfElements = document.querySelectorAll(selector); | |
let maxHeight = 0; | |
if(arrayOfElements.length > 0) { | |
for(let i = arrayOfElements.length - 1; i >= 0; i--) { | |
let heightOfElement = arrayOfElements[i].getBoundingClientRect().height; | |
if(maxHeight < heightOfElement) { | |
maxHeight = heightOfElement; | |
} | |
} |
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($){ | |
function equalizeHeights(selector) { | |
var heights = new Array(); | |
// Loop to get all element heights | |
$(selector).each(function() { | |
// Need to let sizes be whatever they want so no overflow on resize | |
$(this).css('height', 'auto'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> |
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
.scrollable-container { | |
&::-webkit-scrollbar { | |
-webkit-appearance: none; | |
} | |
&::-webkit-scrollbar:vertical { | |
width: 12px; | |
} | |
&::-webkit-scrollbar:horizontal { | |
height: 12px; | |
} |
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 -d branch-after-fail-merge |
NewerOlder