now start with no vertices, add vertices when clicking. Some print bug I think due to the fact that the pointer is "on" a vertice after clicking.
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
path { | |
fill: yellow; | |
stroke: #000; | |
} | |
circle { |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
path { | |
fill: yellow; | |
stroke: #000; | |
} | |
circle { |
you need to add the first vertices blindly since nothing is showed before that
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
-module(index). | |
-export([get_file_contents/1, | |
show_file_contents/1, | |
index_file/1, | |
index_sample_files/0]). | |
-include_lib("eunit/include/eunit.hrl"). | |
index_sample_files() -> | |
io:format("~p~n", [index_file("gettysburg-address.txt")]), | |
io:format("~p~n", [index_file("dickens-christmas.txt")]). |
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
-module(palindrome). | |
-export([palindrome_check/1, server/1, serve/1]). | |
-export([server_of_clients/0, serve_client/0]). | |
-export([servers_of_clients/0,servers_balancer/3,many_serve_client/1]). | |
rem_punct(String) -> lists:filter(fun (Ch) -> | |
not(lists:member(Ch,"\"\'\t\n ")) | |
end, | |
String). |
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
-module(concurrent18). | |
-export([receiver/0, receiver_slow/0, receiver_in_order/0]). | |
receiver() -> | |
receive | |
stop -> io:format("stop", []); | |
X -> io:format("~p~n", [X]), | |
receiver() | |
end. |
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
%% Based on code from | |
%% Erlang Programming | |
%% Francecso Cesarini and Simon Thompson | |
%% O'Reilly, 2008 | |
%% http://oreilly.com/catalog/9780596518189/ | |
%% http://www.erlangprogramming.org/ | |
%% (c) Francesco Cesarini and Simon Thompson | |
-module(frequency). | |
-export([start/0,allocate/0,deallocate/1,stop/0]). |