View mel.js
This file contains 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
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"); |
View dijkstra.cpp
This file contains 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
#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}, |
View gist:7405717
This file contains 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 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 = "░"; |