tar xvjf archive.tar.bz2
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 <vector> | |
#include <algorithm> | |
using namespace std; | |
template <class EventType> | |
class Observer { | |
public: | |
virtual ~Observer() {} | |
virtual void onNotify(const EventType &event) = 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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class Process { | |
public: | |
virtual bool isPause() = 0; | |
virtual bool isDone() = 0; | |
virtual void tick() = 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
#include <iostream> | |
#include <map> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
struct Event { | |
Event(int akey, int ach) : key(akey), ch(ach) {} |
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
typedef unsigned char byte; | |
struct Bitset { | |
size_t data_size, count_bits, count_sets; | |
byte *data; | |
Bitset() : data_size(0), count_bits(0), count_sets(0), data(NULL) {} | |
~Bitset() { if (data != NULL) delete[] data; } | |
void setSize(size_t n) { | |
if (data != NULL) delete[] data; | |
count_bits = 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
# Continued fraction | |
import fractions as F | |
def to_cf(n, m): | |
res = [] | |
g = F.gcd(n, 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
// https://repl.it/CCAm/2 | |
"use strict"; | |
var map = | |
`..... | |
..... | |
.###. | |
..... | |
.....`.split("\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
C-h t -- Туториал | |
C-h k -- Объяснит комбинацию клавишь | |
C-h w -- Объяснит команду | |
# SLIME | |
C-c C-] -- slime-close-parens-at-point |
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
import itertools as it | |
import sys | |
N = 40 | |
x, y = 22, 30 | |
c = 0 | |
def partitions(n): | |
if n == 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
Как сделать хороший платформер. Рекомендации | |
http://www.ant-karlov.ru/kak-sdelat-horoshiy-platformer-rekomendatsii.html | |