This file contains hidden or 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
semantic versioning | |
https://semver.org/lang/ru/ |
This file contains hidden or 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
//the source https://medium.com/@andreasmcd/how-my-team-converted-our-website-from-jquery-to-react-in-small-steps-cd4390f0a146 | |
//before : | |
// The controller manages all events and will update the page as necessary. | |
// In this example there is not much happening. | |
// But in our real application, these controllers could be very large and own a lot of logic. | |
class Controller { | |
constructor() { | |
this.$openModalBtn = $('#openModal'); | |
this.$mediaModal = $('#mediaModal'); |
This file contains hidden or 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://www.codewars.com/kata/chess-fun-number-12-possible-rook-moves/train/javascript | |
function possibleRookMoves(b, square, flag) { | |
const letter = square[0].toLowerCase(), | |
letterNum = letter.charCodeAt(0) - 97, | |
num = b.length - square[1], | |
arrayNum = num + 1, | |
enemy = flag === 1 ? -1 : 1, | |
ally = flag === 1 ? 1 : -1; | |
const row = definePosition(b[num],'hor', letterNum) |
This file contains hidden or 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
"editor.tokenColorCustomizations": { | |
"textMateRules": [{ | |
"scope": "entity.name.class, entity.name.type", | |
"settings": { | |
"foreground": "#A6E22E" | |
} | |
}] | |
} |
This file contains hidden or 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
width:1em; | |
word-break:break-word; | |
float:left; | |
letter-spacing:1em; | |
white-space:pre-wrap |
This file contains hidden or 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
<script> | |
var num = [10, 100, 2, 0, 10, 50]; | |
var text = "<ul>" + num; | |
var startAgain = false; | |
var temp; | |
for ( i = 0, i < num.lenght, i++ ){ | |
for ( j = 0, j < num.lenght-1-i, j++){ | |
do | |
if ( num[j] > num[j+1]){ | |
startAgain = true; |
NewerOlder