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
"use strict"; | |
let _ = require("underscore"); | |
let g = {}; | |
function createArray (name, n, callback) { | |
let res = []; | |
for (let i=0; i<n; i++) { | |
res[i] = callback(i, res); |
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
"use strict"; | |
var program = `d m 100 100 u m 100 0 d m 200 100`; | |
var x = 0, y = 0, raised = true; | |
var words = program.match(/\w+/g); | |
for (var i = 0; i < words.length; i++) { | |
if (words[i].toUpperCase() == 'D') raised = false; | |
if (words[i].toUpperCase() == 'U') raised = true; | |
if (words[i].toUpperCase() == 'M') { |
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
"use strict"; | |
(function () { | |
var _inputData = `6 6 4`; | |
var _lastInputLineIndex = -1; | |
function readline () { return _inputData.split("\n")[++_lastInputLineIndex]; } | |
function write (str) { document.body.innerHTML += str.replace(/\n/g, "<br>"); } | |
function print (str) { write(str + "\n"); } |
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
------------------------------------------------------------ | |
2. Функции, закономерности и принципы педагогического | |
процесса. | |
http://i-educator.ru/vopros18 | |
существенные, устойчивые связи в развитии и | |
формировании личности, реализация которых | |
позволяет добиваться высоких результатов в ее воспитании | |
и обучении: | |
- Воспитание личности происходит только в процессе включения |
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
#include <iostream> | |
#include <limits> | |
#include <sstream> | |
#include <algorithm> | |
#include <vector> | |
#include <queue> | |
using namespace std; | |
#define forn(i, n) for (int i = 0; i < n; i++) | |
typedef vector<int> vi; |
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
loadkeys ru | |
setfont cyr-sun16 | |
/usr/share/kbd/consolefonts/ | |
vim /etc/locale.gen | |
http://eax.me/vim-commands/ | |
locale-gen | |
export LANG=ru_RU.UTF-8 | |
lsblk | grep -v "rom\|loop\|airoot" | |
cfdisk | |
mkfs.ext2 -L boot /dev/sda1 |
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
// LAMBDA WORLD ================================================================ | |
zero = p => x => x; | |
one = p => x => p(x); | |
inc = n => p => x => p(n(p)(x)); | |
two = inc(one); | |
three = inc(two); | |
add = n => m => m(inc)(n); | |
five = add(two)(three); | |
mul = n => m => m(add(n))(zero); |
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
from fractions import Fraction | |
a = [[1, 5, 1, 0, 0], | |
[3, 2, 0, 1, 0], | |
[2, 4, 0, 0, 1]] | |
b = [10, 12, 10] | |
c = [2, 3, 0, 0, 0] |
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
#!/bin/bash | |
inotifywait -m $PWD -r -e create -e moved_to -e delete | | |
while read path action file; do | |
TITLE="Filesystem changed" | |
MESSAGE="The file '$file' appeared in directory '$path' via '$action'" | |
echo ${MESSAGE} | |
notify-send "${TITLE}" "${MESSAGE}" | |
done |
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
-- http://www.tutorialspoint.com/compile_haskell_online.php | |
import Data.Tree | |
import Data.List | |
encodeTree :: Tree t -> String | |
encodeTree (Node root []) = "01" | |
encodeTree (Node root childs) = "0" ++ intercalate "" encodeChilds ++ "1" | |
where encodeChilds = sort $ map encodeTree childs |
OlderNewer