Compare commits
26 Commits
7b1c5b0a50
...
hw6
| Author | SHA1 | Date | |
|---|---|---|---|
| 63af3ed7b4 | |||
| b2c005e22c | |||
| 4cf2f56749 | |||
| b0c3660f16 | |||
| b47e479b95 | |||
| eb509fb846 | |||
| 9870335263 | |||
| 7cc781c0b9 | |||
| 8eaf1ed628 | |||
| 4cc6b7e9d8 | |||
| 73ea28eab6 | |||
| ea0b091c8a | |||
| c53abdb678 | |||
| 2b4a36c1ff | |||
| 03e7b28167 | |||
| a25b444c01 | |||
| d54afa7b2e | |||
| 01dfe8011d | |||
| 5f692a4708 | |||
| b98abb94cc | |||
| deeb9dbd5c | |||
| 2f44691a98 | |||
| b653d69e77 | |||
| 6720bfd450 | |||
| 726b6e7adb | |||
| 093d57a619 |
5
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
to_reform
|
||||
**node_modules
|
||||
**to_reform
|
||||
.vscode
|
||||
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 347 KiB After Width: | Height: | Size: 347 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 5.2 MiB After Width: | Height: | Size: 5.2 MiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
112
hw/hw6/hw6.js
Normal file
@@ -0,0 +1,112 @@
|
||||
let templates = [
|
||||
[
|
||||
"X--X----",
|
||||
"-XXX-X--",
|
||||
"----X---",
|
||||
"----X---",
|
||||
"------XX",
|
||||
"----XX--",
|
||||
"X-------",
|
||||
"-XX--X--"
|
||||
],
|
||||
[
|
||||
"---XX---",
|
||||
"----X-X-",
|
||||
"---XX---",
|
||||
"---X----",
|
||||
"-X------",
|
||||
"X----X-X",
|
||||
"--X--X--",
|
||||
"-X----XX"
|
||||
],
|
||||
[
|
||||
"-X-X----",
|
||||
"---X-X--",
|
||||
"X-XX--X-",
|
||||
"--X-X---",
|
||||
"------X",
|
||||
"--------",
|
||||
"X-----X-",
|
||||
"-X-X---X"
|
||||
],
|
||||
[
|
||||
"-XX-X---",
|
||||
"-----X--",
|
||||
"----X---",
|
||||
"-----X-X",
|
||||
"-X-X--X-",
|
||||
"-XX----X",
|
||||
"-X------",
|
||||
"XX------"
|
||||
], [
|
||||
"----XX-X",
|
||||
"X-------",
|
||||
"--------",
|
||||
"-----XX-",
|
||||
"---X-X--",
|
||||
"-X---XX-",
|
||||
"-X-X----",
|
||||
"----XXX-"
|
||||
], [
|
||||
"XX------",
|
||||
"-----X--",
|
||||
"-------X",
|
||||
"-X-X----",
|
||||
"X-X----X",
|
||||
"-X-X-X-X",
|
||||
"----X-X-",
|
||||
"-X------"
|
||||
],
|
||||
];
|
||||
const squareSize = templates[0].length;
|
||||
|
||||
//convert to arrays for mutability
|
||||
let temp = []
|
||||
for (let n = 0; n < templates.length; n++) {
|
||||
temp.push([])
|
||||
for (let i = 0; i < squareSize; i++) {
|
||||
temp[n].push([]);
|
||||
for (let j = 0; j < squareSize; j++) {
|
||||
temp[n][i].push(templates[n][i][j] == "X" ? 1 : 0);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
templates = temp;
|
||||
|
||||
const encodedMsg = "Р_НАЙА_СЛЗДЕ_ЛОСЖСТОИКНОЛЬЛЬТКУЮО__КЗАЕ_ДВАОКАЧОЖЗ_УЧАСМОДУ_ТЮЖЕ";
|
||||
|
||||
|
||||
function rotateTemplate(template) {
|
||||
for (let i = 0; i < squareSize; i++) {
|
||||
for (let j = 0; j < i; j++) {
|
||||
let temp = template[i][j];
|
||||
template[i][j] = template[j][i];
|
||||
template[j][i] = temp;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < squareSize; i++) {
|
||||
for (let j = 0; j < squareSize / 2; j++) {
|
||||
let temp = template[i][j];
|
||||
template[i][j] = template[i][(squareSize - 1) - j];
|
||||
template[i][(squareSize - 1) - j] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let n = 0; n < templates.length; n++) {
|
||||
let out = ""
|
||||
for (let rot = 0; rot < 4; rot++) {
|
||||
for (let i = 0; i < squareSize; i++) {
|
||||
for (let j = 0; j < squareSize; j++) {
|
||||
if (templates[n][i][j]) {
|
||||
out += encodedMsg[i * squareSize + j];
|
||||
}
|
||||
}
|
||||
}
|
||||
rotateTemplate(templates[n]);
|
||||
}
|
||||
console.log(out);
|
||||
console.log("=======");
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 37 KiB |
69
lectures/lecture3.txt
Normal file
@@ -0,0 +1,69 @@
|
||||
ol#list(type="I")
|
||||
li Препроцессоры HTML
|
||||
ul(type="disc")
|
||||
li.first
|
||||
a(href="#") Haml
|
||||
li Pug
|
||||
li Препроцессоры CSS
|
||||
ul(type="circle")
|
||||
li.first SAAS
|
||||
li Stylus
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- var tag = 'h'
|
||||
- var i = 1
|
||||
|
||||
#{tag+i} Уровень #{i}
|
||||
- i++
|
||||
#{tag+i} Уровень #{i}
|
||||
- i++
|
||||
#{tag+i} Уровень #{i}
|
||||
- i++
|
||||
#{tag+i} Уровень #{i}
|
||||
|
||||
|
||||
|
||||
|
||||
- var products ={"Товар":"Цена","ручка":30.5, "карандаш":50, "альбом":156, "тетрадь":21.5, "ластик":10.2}
|
||||
table
|
||||
each name,price in products
|
||||
tr
|
||||
td #{name}
|
||||
td #{price}
|
||||
|
||||
|
||||
|
||||
table
|
||||
- for(var i=0;i<10;i++)
|
||||
tr
|
||||
- for(var j=0;j<10;j++)
|
||||
- if((i + j) % 2 == 0)
|
||||
td.white
|
||||
- else
|
||||
td.black
|
||||
|
||||
|
||||
|
||||
mixin createList(listType, items, tag)
|
||||
- var dispListType = "ul"
|
||||
- if (listType == "ol")
|
||||
- dispListType = "ol"
|
||||
|
||||
#{dispListType}.list
|
||||
each item in items
|
||||
li
|
||||
#{tag} #{item}
|
||||
|
||||
// Вызов миксина
|
||||
+createList('ul', ['Python', 'JavaScript', 'Java'], 'strong')
|
||||
|
||||
|
||||
size=1%
|
||||
section
|
||||
box-shadow: size size (2*size) rgba(0,0,0,0.5)
|
||||
padding:size*2
|
||||
margin:size*4
|
||||