Skip to content

Instantly share code, notes, and snippets.

View mel.js
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 / dijkstra.cpp
Last active Dec 29, 2015
Инкрементация алгоритма Дейкстры.
View dijkstra.cpp
#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] = { // создаём матрицу инцидентности
evlogii / gist:7405717
Last active Dec 27, 2015
View gist:7405717
import java.util.*;
import java.lang.*;
/* 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 = "░";