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
void main() { | |
// 1. Используя switch, напишите программу в методе main(), которая выводит название месяца по номеру от 1 до 12. | |
String getMonthName(int monthIndex) { | |
String result = 'Нет такого месяца'; | |
switch (monthIndex) { | |
case 1: | |
result = 'Январь'; | |
break; |
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
void main() { | |
// 1. Создать глобальную переменную типа int с именем a | |
int a = 11; | |
print(a); | |
double showLocalVariable() { | |
// 2. Создать локальную переменную типа double с именем b | |
double b = 20.0; | |
return b; | |
} |
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
python manage.py dumpdata --exclude auth.permission --exclude contenttypes --exclude sessions --exclude admin > all.json |
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
function deepSearch(arr, x) { | |
var result = false; | |
function loopSearch(arr) { | |
arr.forEach(function(item, i, arr) { | |
if (item instanceof Array) { | |
loopSearch(item); | |
} else { | |
if (item == x) { | |
result = true; |
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
function getNumbers(n) { | |
function generateRange(n) { | |
var arr = []; | |
for (var idx = 1; n*n > arr.length; idx++) { | |
arr.push(idx); | |
} | |
return arr; | |
} | |
function generateSquare(n) { |
NewerOlder