Gitlab CSE Unil

Commit 6f0e1f29 authored by M. Chardon's avatar M. Chardon
Browse files

add licences

parent 33302b42
/* /**
* To change this license header, choose License Headers in Project Properties. * Copyright (C) 2018 Université de Lausanne, RISET,
* To change this template file, choose Tools | Templates * < http://www.unil.ch/riset/ >
* and open the template in the editor. * This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/ */
var delaiRentention = 10; var delaiRentention = 10;
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function Global() { function Global() {
this.total = 0; this.total = 0;
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function ModeleFour() { function ModeleFour() {
this.lastInsert0 = -1; this.lastInsert0 = -1;
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function ModeleMaskEight() { function ModeleMaskEight() {
this.source = ""; this.source = "";
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function ModeleThree() { function ModeleThree() {
this.lastInsert0 = -1; this.lastInsert0 = -1;
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function ModeleTwo() { function ModeleTwo() {
this.lastInsert = -1; this.lastInsert = -1;
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function Resultat(valeur, probabilite) { function Resultat(valeur, probabilite) {
this.valeur = valeur; this.valeur = valeur;
this.probabilite = probabilite; this.probabilite = probabilite;
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
/* /*
* Librairie graphique pour le projet Vignere. * Librairie graphique pour le projet Vignere.
* Utilise la librairie //d3js.org/d3.v3.min.js * Utilise la librairie //d3js.org/d3.v3.min.js
......
...@@ -26,7 +26,7 @@ function Gauge(placeholderName, configuration) ...@@ -26,7 +26,7 @@ function Gauge(placeholderName, configuration)
this.config.redColor = configuration.redColor || "#DC3912"; this.config.redColor = configuration.redColor || "#DC3912";
this.config.transitionDuration = configuration.transitionDuration || 500; this.config.transitionDuration = configuration.transitionDuration || 500;
} };
this.render = function () this.render = function ()
{ {
...@@ -150,7 +150,7 @@ function Gauge(placeholderName, configuration) ...@@ -150,7 +150,7 @@ function Gauge(placeholderName, configuration)
.attr("d", pointerLine) .attr("d", pointerLine)
.style("fill", "#dc3912") .style("fill", "#dc3912")
.style("stroke", "#c63310") .style("stroke", "#c63310")
.style("fill-opacity", 0.7) .style("fill-opacity", 0.7);
pointerContainer.append("svg:circle") pointerContainer.append("svg:circle")
.attr("cx", this.config.cx) .attr("cx", this.config.cx)
...@@ -174,7 +174,7 @@ function Gauge(placeholderName, configuration) ...@@ -174,7 +174,7 @@ function Gauge(placeholderName, configuration)
.style("stroke-width", "0px"); .style("stroke-width", "0px");
this.redraw(this.config.min, 0); this.redraw(this.config.min, 0);
} };
this.buildPointerPath = function (value) this.buildPointerPath = function (value)
{ {
...@@ -198,7 +198,7 @@ function Gauge(placeholderName, configuration) ...@@ -198,7 +198,7 @@ function Gauge(placeholderName, configuration)
point.y -= self.config.cy; point.y -= self.config.cy;
return point; return point;
} }
} };
this.drawBand = function (start, end, color) this.drawBand = function (start, end, color)
{ {
...@@ -213,9 +213,9 @@ function Gauge(placeholderName, configuration) ...@@ -213,9 +213,9 @@ function Gauge(placeholderName, configuration)
.innerRadius(0.65 * this.config.raduis) .innerRadius(0.65 * this.config.raduis)
.outerRadius(0.85 * this.config.raduis)) .outerRadius(0.85 * this.config.raduis))
.attr("transform", function () { .attr("transform", function () {
return "translate(" + self.config.cx + ", " + self.config.cy + ") rotate(270)" return "translate(" + self.config.cx + ", " + self.config.cy + ") rotate(270)";
}); });
} };
this.redraw = function (value, transitionDuration) this.redraw = function (value, transitionDuration)
{ {
...@@ -244,27 +244,27 @@ function Gauge(placeholderName, configuration) ...@@ -244,27 +244,27 @@ function Gauge(placeholderName, configuration)
{ {
var rotation = currentRotation + (targetRotation - currentRotation) * step; var rotation = currentRotation + (targetRotation - currentRotation) * step;
return "translate(" + self.config.cx + ", " + self.config.cy + ") rotate(" + rotation + ")"; return "translate(" + self.config.cx + ", " + self.config.cy + ") rotate(" + rotation + ")";
} };
}); });
} };
this.valueToDegrees = function (value) this.valueToDegrees = function (value)
{ {
// thanks @closealert // thanks @closealert
//return value / this.config.range * 270 - 45; //return value / this.config.range * 270 - 45;
return value / this.config.range * 270 - (this.config.min / this.config.range * 270 + 45); return value / this.config.range * 270 - (this.config.min / this.config.range * 270 + 45);
} };
this.valueToRadians = function (value) this.valueToRadians = function (value)
{ {
return this.valueToDegrees(value) * Math.PI / 180; return this.valueToDegrees(value) * Math.PI / 180;
} };
this.valueToPoint = function (value, factor) this.valueToPoint = function (value, factor)
{ {
return {x: this.config.cx - this.config.raduis * factor * Math.cos(this.valueToRadians(value)), return {x: this.config.cx - this.config.raduis * factor * Math.cos(this.valueToRadians(value)),
y: this.config.cy - this.config.raduis * factor * Math.sin(this.valueToRadians(value))}; y: this.config.cy - this.config.raduis * factor * Math.sin(this.valueToRadians(value))};
} };
// initialization // initialization
this.configure(configuration); this.configure(configuration);
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function initLang(lang = 'en') { function initLang(lang = 'en') {
document.cookie = "lang=" + lang + "; path=/"; document.cookie = "lang=" + lang + "; path=/";
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function initLang(lang = 'en') { function initLang(lang = 'en') {
document.cookie = "lang=" + lang + "; path=/"; document.cookie = "lang=" + lang + "; path=/";
......
/**
* Copyright (C) 2018 Université de Lausanne, RISET,
* < http://www.unil.ch/riset/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function initFooter(lang = 'en') { function initFooter(lang = 'en') {
//var lang = navigator.language || navigator.userLanguage; //var lang = navigator.language || navigator.userLanguage;
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
/** /**
* @public * @public
* @class Controlleur * @class Controlleur
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
function Controlleur() { function Controlleur() {
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function Letter(lettre) { function Letter(lettre) {
this.lettre = lettre; this.lettre = lettre;
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
/** /**
* @private * @private
* @class Patern * @class Patern
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
/** /**
* @private * @private
* @class Text * @class Text
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
/* /*
* Librairie graphique pour le projet Vignere. * Librairie graphique pour le projet Vignere.
* Utilise la librairie //d3js.org/d3.v3.min.js * Utilise la librairie //d3js.org/d3.v3.min.js
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/
function initLang(lang = 'en') { function initLang(lang = 'en') {
document.cookie = "lang=" + lang + "; path=/"; document.cookie = "lang=" + lang + "; path=/";
......
/**
* Copyright (C) 2018 Université de Lausanne, ESC,
* < http://www.unil.ch/esc/ >
* This file is part of CryptoLab.
* CryptoLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CryptoLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* This copyright notice MUST APPEAR in all copies of the file.
*
* @AUTHOR: Marion Chardon <Marion.Chardon@unil.ch>
* @CREATION-DATE: 20.04.18
*
*/