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.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/**
* 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
*
*/
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() {
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() {
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() {
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() {
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() {
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) {
this.valeur = valeur;
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.
* Utilise la librairie //d3js.org/d3.v3.min.js
......
......@@ -26,7 +26,7 @@ function Gauge(placeholderName, configuration)
this.config.redColor = configuration.redColor || "#DC3912";
this.config.transitionDuration = configuration.transitionDuration || 500;
}
};
this.render = function ()
{
......@@ -150,7 +150,7 @@ function Gauge(placeholderName, configuration)
.attr("d", pointerLine)
.style("fill", "#dc3912")
.style("stroke", "#c63310")
.style("fill-opacity", 0.7)
.style("fill-opacity", 0.7);
pointerContainer.append("svg:circle")
.attr("cx", this.config.cx)
......@@ -174,7 +174,7 @@ function Gauge(placeholderName, configuration)
.style("stroke-width", "0px");
this.redraw(this.config.min, 0);
}
};
this.buildPointerPath = function (value)
{
......@@ -198,7 +198,7 @@ function Gauge(placeholderName, configuration)
point.y -= self.config.cy;
return point;
}
}
};
this.drawBand = function (start, end, color)
{
......@@ -213,9 +213,9 @@ function Gauge(placeholderName, configuration)
.innerRadius(0.65 * this.config.raduis)
.outerRadius(0.85 * this.config.raduis))
.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)
{
......@@ -244,27 +244,27 @@ function Gauge(placeholderName, configuration)
{
var rotation = currentRotation + (targetRotation - currentRotation) * step;
return "translate(" + self.config.cx + ", " + self.config.cy + ") rotate(" + rotation + ")";
}
};
});
}
};
this.valueToDegrees = function (value)
{
// thanks @closealert
//return value / this.config.range * 270 - 45;
return value / this.config.range * 270 - (this.config.min / this.config.range * 270 + 45);
}
};
this.valueToRadians = function (value)
{
return this.valueToDegrees(value) * Math.PI / 180;
}
};
this.valueToPoint = function (value, factor)
{
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))};
}
};
// initialization
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') {
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') {
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') {
//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
* @class Controlleur
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
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) {
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
* @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
* @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.
* 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') {
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
*
*/
/*
* Script d'interaction graphique entre les lib JS et les pages HTML
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
......
/**
* 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
*
*/
/*
* Script d'interaction graphique entre les lib JS et les pages HTML
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment