Skip to content

Instantly share code, notes, and snippets.

@evlogii
evlogii / mel.js
Last active October 4, 2016 06:57
class BlockOfComments {
var id; // just in case
var numberOfComments;
var comments[]; //array of Comment instances
var addComment = function(text, ownerID, parent){
var comment = new Comment(text, ownerID, parent);
var indexOfComment = this.comments.indexOf(comment);
if (index != -1) {
alert("comment already exist");
@evlogii
evlogii / dijkstra.cpp
Last active December 29, 2015 07:09
Инкрементация алгоритма Дейкстры.
#define NUM_VERTICES 5
#define SOURCE 0 // от этой вершины до всех остальных
#include <limits>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]) {
int myMatrix[NUM_VERTICES][NUM_VERTICES] = { // создаём матрицу инцидентности
{INT_MAX, 3,INT_MAX,INT_MAX,INT_MAX},
{INT_MAX,INT_MAX, 1, 3,INT_MAX},
@evlogii
evlogii / gist:7405717
Last active December 27, 2015 23:28
ОСТОРОЖНО БЫДЛОКОД
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static final String ROCKSYMBOL = "▓";
public static final String WATERSYMBOL = "▒";
public static final String AIRSYMBOL = "░";