undefined
;null
;0
;- пустая строка;
NaN
.
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
1) Помощь при использовании Git'а | |
Команда: git help | |
2) Открыть руководство по необходимой команде | |
Команда: git <команда> --help или git help config | |
3) Узнать версию Git | |
Команда: git version | |
4) Создание репозитория в существующем каталоге | |
Команда: git init | |
5) Клонирование существующего репозитория | |
Команда: git clone [url] |
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
Структура PHP и его команды: | |
1. Определяет начало и конец работы с php. | |
<?php | |
//php-код | |
?> | |
2. Создание переменной начинается с $. | |
$some_Var = "text"; | |
3. Запись текущей даты (ДД.ММ.ГГ) в переменную |
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 = -17; | |
//если перменная $x < 0, тогда меняем значение, иначе оставлеям все как есть | |
$x = $x < 0 ? -$x : $x; | |
echo $x; |
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
$g = "global variable"; | |
$text = "some text"; | |
function output() | |
{ | |
//гворим функции, что мы будем использовать глобальную переменную $g | |
global $g; | |
echo $g."<br />"; | |
} | |
output();//выведет глобальную перменную, содержащую "global variable" |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<p>Логин: <input type="text" id="login"></p> | |
<p>Пароль: <input type="text" id="password"></p> | |
<button>Отправить</button> |
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
var numberArray=[60, 50, 62, 58, 54, 54]; | |
numberArray.sort(compareNumbers); | |
console.log(numberArray); | |
/*сортировка в порядке возрастания*/ | |
function compareNumbers(num1, num2) { | |
if (num1>num2) { | |
return 1; | |
} else if (num1===num2){ | |
return 0; |
OlderNewer