[debian-edu-commits] debian-edu/ 01/01: Imported Upstream version 0.9+dfsg

David Prévot taffit at moszumanska.debian.org
Thu Aug 28 14:58:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository algobox.

commit 093847f01f691df5dbd9abdeac659c5a1360f137
Author: David Prévot <taffit at debian.org>
Date:   Thu Aug 28 07:55:10 2014 -0400

    Imported Upstream version 0.9+dfsg
---
 Info.plist                                         |    4 +-
 algobox.cpp                                        |   18 +-
 algobox.pro                                        |    2 +-
 algobox.qrc                                        |    3 +-
 algoconsole.cpp                                    |   22 +
 algoconsole.h                                      |    1 +
 aproposdialog.cpp                                  |   22 +-
 aproposdialog.ui                                   |   27 +-
 browserdialog.cpp                                  |    9 +-
 documents/modelelatex.txt                          |    2 +
 documents/modelepagewebmac.txt                     | 1099 ++++++++++++++++++++
 images/treeview-branch-closed.png                  |  Bin 2979 -> 328 bytes
 images/treeview-branch-open.png                    |  Bin 3006 -> 355 bytes
 utilities/CHANGELOG.txt                            |   10 +
 utilities/algobox.spec                             |    2 +-
 .../apropos.txt => utilities/license_html.txt      |   11 -
 16 files changed, 1193 insertions(+), 39 deletions(-)

diff --git a/Info.plist b/Info.plist
index bb20a94..77fb861 100755
--- a/Info.plist
+++ b/Info.plist
@@ -35,9 +35,9 @@
 	<key>CFBundleName</key>
 	<string>algobox</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.8</string>
+	<string>0.9</string>
 	<key>CFBundleVersion</key>
-	<string>0.8</string>
+	<string>0.9</string>
 	<key>NSPrincipalClass</key>
 	<string>NSApplication</string>
         <key>NSHighResolutionCapable</key>
diff --git a/algobox.cpp b/algobox.cpp
index cdc1fd5..8ee0d7f 100644
--- a/algobox.cpp
+++ b/algobox.cpp
@@ -2361,7 +2361,7 @@ if (!afficheCadrePresentation)	ui.groupBoxDescription->hide();
 browserwidth=config->value( "Geometries/BrowserWidth",850).toInt();
 browserheight=config->value( "Geometries/BrowserHeight",540).toInt();
 
-arrondiAuto=config->value("Options/Arrondi",false).toBool();
+arrondiAuto=config->value("Options/Arrondi",true).toBool();
 maxBoucle=config->value("Options/MaxBoucle",500000).toInt();
 totalBoucles=config->value("Options/TotalBoucles",5000000).toInt();
 totalAffichages=config->value("Options/TotalAffichages",1000).toInt();
@@ -2769,7 +2769,11 @@ if (exporthtml)
   }
 else 
   {
-    modelefile.setFileName(":/documents/modelepageweb.txt");
+#if defined(Q_OS_MAC)
+modelefile.setFileName(":/documents/modelepagewebmac.txt");
+#else
+modelefile.setFileName(":/documents/modelepageweb.txt");
+#endif
   }
 modelefile.open(QIODevice::ReadOnly);
 QTextStream t(&modelefile);
@@ -3425,7 +3429,7 @@ if (parametres.count()>0)
 			    }
 			  }
 			  if (ui.lineEditDefautF2->text().isEmpty()) code+="return 1;\n";
-			  else code+="return "+ui.lineEditDefautF2->text()+";\n";
+			  else code+="return "+FiltreCalcul(ui.lineEditDefautF2->text())+";\n";
 			  code+="}\n";
 			  }
 		code+="function ALGOBOX_ALGO(ALGOBOX_PAS_A_PAS)\n{\n";
@@ -3847,7 +3851,9 @@ else if (xf.contains("Courier New",Qt::CaseInsensitive)) deft="Courier New";
 #endif
 else deft=qApp->font().family();
 QTextCharFormat output_format;
-//output_format.setFont(QFont(deft,10));  //bug Qt 4.5
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+output_format.setFont(QFont(deft,9));  //bug Qt 4.5
+#endif
 output_format.setFontFamily(deft);
 QTextDocument *document =new QTextDocument(this);
 document->setDefaultFont(QFont(deft,9));
@@ -6017,7 +6023,7 @@ QString MainWindow::highlightHtmlLine(const QString &text)
 {
 QString SpanComment, SpanBloc, SpanCommande, SpanSi, SpanTantQue, SpanPour, SpanFin;
 QStringList BlocWords,SiWords,TantQueWords,PourWords, CommandeWords;
-SpanComment = "<span style=\"color:#000000;font-style:italic;\">";
+SpanComment = "<span style=\"color:#000000;\">";
 SpanBloc="<span style=\"color:#800000;font-weight:bold;\">";
 SpanCommande="<span style=\"color:#0000CC;\">";
 SpanSi="<span style=\"color:#800080;font-weight:bold;\">";
@@ -6033,7 +6039,7 @@ PourWords=QString("\\bPOUR\\b,\\bALLANT_DE\\b,\\bDEBUT_POUR\\b,\\bFIN_POUR\\b").
 if (text.isEmpty()) return QString("");
 
 QString buffer=text;
-if (buffer.left(2)=="//") return SpanComment+buffer+SpanFin;
+if (buffer.contains("<i>//",Qt::CaseInsensitive)) return SpanComment+buffer+SpanFin;
   
 QList<int> code=detectChaine(buffer);
 if ( buffer.length() > 0 )
diff --git a/algobox.pro b/algobox.pro
index 80e26e0..1aa957c 100644
--- a/algobox.pro
+++ b/algobox.pro
@@ -8,7 +8,7 @@ QT += xml webkitwidgets network widgets printsupport
 } else {
 QT += xml webkit network
 }
-ALGOBOXVERSION=0.8
+ALGOBOXVERSION=0.9
 DEFINES += ALGOBOXVERSION=\\\"$${ALGOBOXVERSION}\\\"
 ###############################
 HEADERS	+= algobox.h \
diff --git a/algobox.qrc b/algobox.qrc
index 9746ac3..7fcb2d2 100644
--- a/algobox.qrc
+++ b/algobox.qrc
@@ -66,6 +66,7 @@
         <file>images/undo22 at 2x.png</file>
         <file>images/undo22.png</file>
         <file>documents/modelepageweb.txt</file>
+        <file>documents/modelepagewebmac.txt</file>
         <file>documents/modeleexportweb.txt</file>
         <file>documents/styleapplication.qss</file>
         <file>documents/aideaffectation.txt</file>
@@ -74,7 +75,6 @@
         <file>documents/aidetantque.txt</file>
         <file>documents/aideboucle.txt</file>
         <file>documents/aidefonction.txt</file>
-        <file>documents/apropos.txt</file>
         <file>documents/modelelatex.txt</file>
         <file>documents/interdits.txt</file>
         <file>documents/LiberationMono-Regular.ttf</file>
@@ -86,5 +86,6 @@
 	<file>documents/LiberationSans-Italic.ttf</file>
 	<file>documents/LiberationSans-Regular.ttf</file>
         <file>documents/completion.txt</file>
+	<file>utilities/license_html.txt</file>
     </qresource>
 </RCC>
diff --git a/algoconsole.cpp b/algoconsole.cpp
index 02c749a..7be34ea 100644
--- a/algoconsole.cpp
+++ b/algoconsole.cpp
@@ -12,6 +12,8 @@
 
 #include "algoconsole.h"
 #include <QScrollBar>
+#include <QAction>
+#include <QMenu>
 #include <QDebug>
 
 AlgoConsole::AlgoConsole(QWidget *parent) :
@@ -24,6 +26,26 @@ setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
     prompt="";
 }
 
+
+void AlgoConsole::contextMenuEvent(QContextMenuEvent *e)
+{
+QMenu *menu=new QMenu(this);
+//menu = createStandardContextMenu();
+QAction *a;
+
+
+a = menu->addAction(tr("Copy"), this, SLOT(copy()));
+a->setShortcut(Qt::CTRL+Qt::Key_C);
+a->setEnabled(textCursor().hasSelection());
+
+a = menu->addAction(tr("Select All"), this, SLOT(selectAll()));
+a->setShortcut(Qt::CTRL+Qt::Key_A);
+a->setEnabled(!document()->isEmpty());
+
+menu->exec(e->globalPos());
+delete menu;
+}
+
 void AlgoConsole::keyPressEvent(QKeyEvent *event)
 {
     if(isLocked) return;
diff --git a/algoconsole.h b/algoconsole.h
index c7ba0f2..ae5bdd2 100644
--- a/algoconsole.h
+++ b/algoconsole.h
@@ -26,6 +26,7 @@ public:
 protected:
     void keyPressEvent(QKeyEvent *);
     void mouseMoveEvent(QMouseEvent *);
+    void contextMenuEvent(QContextMenuEvent *e);
 private:
     QString prompt;
     bool isLocked;
diff --git a/aproposdialog.cpp b/aproposdialog.cpp
index 414d77f..bf6a4bf 100644
--- a/aproposdialog.cpp
+++ b/aproposdialog.cpp
@@ -32,18 +32,20 @@ pixmap.load(":/images/algobox128.png");
 ui.label->setPixmap(pixmap);
 setModal(true);
 QTextCodec *codec = QTextCodec::codecForName("UTF-8");
-QString contenu;
-QFile apropos(":/documents/apropos.txt");
-apropos.open(QIODevice::ReadOnly);
-QTextStream in(&apropos);
-in.setCodec(codec);
-while (!in.atEnd()) 
+QString contenu=QString::fromUtf8("<b>AlgoBox ")+QLatin1String(ALGOBOXVERSION)+QString::fromUtf8("</b><br>(compiled with Qt ")+QLatin1String(QT_VERSION_STR);
+ui.textBrowser1->setOpenExternalLinks(true);
+ui.textBrowser1->setHtml(contenu+QString::fromUtf8(")<p><b>AlgoBox :</b> logiciel libre et multi-plateforme d'aide à l'élaboration et à l'exécution d'algorithmes.<i>(interface graphique de création de pseudo-code algorithmique et d'interprétation du code obtenu en javascript)</i><br><br><b><i>Copyright (c) 2009/2014 par Pascal Brachet</i></b><br><br><i>(Merci à <b>J.Amblard</b> pour sa précieuse collaboration, à Frédérique Mounier et aux utilisateurs pour leurs remarques et suggestions)< [...]
+QString content;
+QFile licence(":/utilities/license_html.txt");
+licence.open(QIODevice::ReadOnly);
+QTextStream inl(&licence);
+inl.setCodec(codec);
+while (!inl.atEnd()) 
 	{
-	contenu+= in.readLine()+"\n";
+	content+= inl.readLine()+"\n";
 	}
-apropos.close();
-ui.textBrowser->setOpenExternalLinks(true);
-ui.textBrowser->setHtml(contenu);
+licence.close();
+ui.textBrowser2->setHtml(content);
 }
 
 AproposDialog::~AproposDialog(){
diff --git a/aproposdialog.ui b/aproposdialog.ui
index 3b9a3ca..3b8d701 100644
--- a/aproposdialog.ui
+++ b/aproposdialog.ui
@@ -25,10 +25,30 @@
     </widget>
    </item>
    <item row="0" column="1" rowspan="2">
-    <widget class="QTextBrowser" name="textBrowser">
-     <property name="readOnly">
-      <bool>true</bool>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>0</number>
      </property>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Version / Auteur</string>
+      </attribute>
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <widget class="QTextBrowser" name="textBrowser1"/>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2">
+      <attribute name="title">
+       <string>Licence</string>
+      </attribute>
+      <layout class="QHBoxLayout" name="horizontalLayout_3">
+       <item>
+        <widget class="QTextBrowser" name="textBrowser2"/>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
    <item row="1" column="0">
@@ -72,7 +92,6 @@
  </widget>
  <tabstops>
   <tabstop>pushButtonOk</tabstop>
-  <tabstop>textBrowser</tabstop>
  </tabstops>
  <resources>
   <include location="algobox.qrc"/>
diff --git a/browserdialog.cpp b/browserdialog.cpp
index d3dce4b..4940f0c 100644
--- a/browserdialog.cpp
+++ b/browserdialog.cpp
@@ -39,13 +39,16 @@ QString deft;
 QTextCharFormat output_format;
 if (xf.contains("Liberation Mono",Qt::CaseInsensitive)) deft="Liberation Mono";
 else if (xf.contains("DejaVu Sans Mono",Qt::CaseInsensitive)) deft="DejaVu Sans Mono";
-#if defined(Q_OS_MAC)
-else if (xf.contains("Courier",Qt::CaseInsensitive)) deft="Courier";
-#endif
 #if defined(Q_OS_WIN32)
 else if (xf.contains("Courier New",Qt::CaseInsensitive)) deft="Courier New";
 #endif
 else deft=qApp->font().family();
+
+#if defined(Q_OS_MAC)
+if (xf.contains("Monaco",Qt::CaseInsensitive)) deft="Monaco";
+else deft=qApp->font().family();
+#endif
+
 output_format.setFont(QFont(deft,qApp->font().pointSize()));
 // output_format.setFontFamily(deft);
 // output_format.setFontFixedPitch(true);
diff --git a/documents/modelelatex.txt b/documents/modelelatex.txt
index e0593e6..1329fdc 100644
--- a/documents/modelelatex.txt
+++ b/documents/modelelatex.txt
@@ -71,6 +71,8 @@
 \begin{ttfamily}
 \begin{algorithmic}[1]
 \begin{cadrecode}
+\labelwidth 1.5em
+\leftmargin\labelwidth \addtolength{\leftmargin}{\labelsep}
 }
 {%
 \end{cadrecode}
diff --git a/documents/modelepagewebmac.txt b/documents/modelepagewebmac.txt
new file mode 100644
index 0000000..989801f
--- /dev/null
+++ b/documents/modelepagewebmac.txt
@@ -0,0 +1,1099 @@
+<html>
+<head>
+<title>AlgoBox</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style type="text/css">
+BODY 
+{
+font-family:  'Liberation Sans', 'Arial',sans-serif;
+background-color:#FFFFFF;
+color:#000000;
+margin-top: 5px;
+margin-left: 5px;
+margin-right: 5px;
+margin-bottom: 5px;
+}
+A:link    { color:#335d88;font-weight: bold; text-decoration: none;}
+A:visited { color:#335d88;font-weight: bold;  text-decoration: none;}
+A:hover   { color:red; font-weight: bold; text-decoration: none;}
+
+textarea
+{
+border-width : 1px;
+font-family :  'Monaco', 'Courier New', monospace; 
+background : #f6f6f6;
+padding : .1em .3em;
+border-color : #000;
+}
+
+.header
+{
+    font-family: 'Liberation Sans', 'Arial',sans-serif;
+    font-size: normal;
+    font-weight:bold;
+    color: #fff;
+    background-color: #69c;
+    border:2px solid #69c;
+    font-size: 12pt;
+    padding: 4px 20px;
+    margin-left: 15px; 
+    border-radius: 8px; 
+    -webkit-border-radius: 8px;
+    -moz-border-radius: 8px; 
+}
+
+#footer
+{
+text-align: center;
+font-size: .8em;
+font-weight:bold;
+color:#479;
+font-family :  'Liberation Sans', 'Arial',sans-serif;
+padding: 2px;
+}
+
+.post
+{
+    margin-bottom: 20px;
+}
+
+.post > FIELDSET
+{
+    background-color: #f9f9f9;
+    padding: 0px;
+    padding-top: 10px;
+    padding-left: 10px;
+    border:1px solid #69c;
+    color:#000;
+    border-radius: 20px; 
+    -webkit-border-radius: 20px;
+    -moz-border-radius: 20px; 
+}
+
+.title
+{
+    background-color: #69c;
+    border:2px solid #69c;
+    font-size: 12pt;
+    padding: 4px 20px;
+    margin-left: 15px; 
+    border-radius: 8px; 
+    -webkit-border-radius: 8px;
+    -moz-border-radius: 8px; 
+}
+
+#title,
+LEGEND,
+LEGEND A
+{
+    font-family: 'Liberation Sans', 'Arial',sans-serif;
+    color: #fff;
+    font-weight:bold;
+}
+
+.code
+{
+    padding: 1px 15px;
+    color: #111111;
+    line-height: 120%;
+    font-size: 10pt;
+    font-family :  'Monaco', 'Courier New', monospace; 
+}
+
+.graphique
+{
+    padding: 1px 15px;
+    color: #111111;
+    font-size: 10pt;
+    font-family :  'Monaco', 'Courier New', monospace; 
+}
+
+.output
+{
+    overflow: auto;
+    padding: 1px 15px;
+    color: #111111;
+    font-size: 10pt;
+}
+.output pre 
+{
+margin: 0;
+font-family: 'Monaco', 'Courier New', monospace; 
+padding: 0;
+}
+
+</style>
+<script language="JavaScript">
+/***************************************************************************
+ *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   with the collaboration of Joël Amblard                                *
+ *                                                                         *
+ *   This program 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 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+var ALGOBOX_x1=0;
+var ALGOBOX_x2=450;
+var ALGOBOX_y1=0;
+var ALGOBOX_y2=450;
+var ALGOBOX_canevas_repere=document.createElement("canvas");
+if (navigator.appName!="Microsoft Internet Explorer")
+    {
+    var ALGOBOX_contexte_repere=ALGOBOX_canevas_repere.getContext("2d");
+    }
+ALGOBOX_canevas_repere.style.left=0;
+ALGOBOX_canevas_repere.style.zIndex=0;
+ALGOBOX_canevas_repere.setAttribute("width",ALGOBOX_x2+4);
+ALGOBOX_canevas_repere.setAttribute("height",ALGOBOX_y2+4);
+
+var ALGOBOX_canevas=document.createElement("canvas");
+if (navigator.appName!="Microsoft Internet Explorer")
+    {
+    var ALGOBOX_contexte=ALGOBOX_canevas.getContext("2d");
+    }
+ALGOBOX_canevas.style.left=0;
+ALGOBOX_canevas.style.position="absolute";
+ALGOBOX_canevas.style.zIndex=1;
+ALGOBOX_canevas.setAttribute("width",ALGOBOX_x2+4);
+ALGOBOX_canevas.setAttribute("height",ALGOBOX_y2+4);
+var ALGOBOX_REPERE_DEFINI=false;
+var ALGOBOX_Xmin=-10;
+var ALGOBOX_Xmax=10;
+var ALGOBOX_Ymin=-10;
+var ALGOBOX_Ymax=10;
+var ALGOBOX_gradx=1;
+var ALGOBOX_grady=1;
+var ALGOBOX_COMPTEUR_AFFICHAGE=0;
+var ALGOBOX_COMPTEUR_ETAPE=0;
+var ALGOBOX_DEPASSEMENT_AFFICHAGE=false;
+var ALGOBOX_COMPTEUR_BOUCLE_GLOBAL=0;
+var ALGOBOX_COMPTEUR_RECURSION=0;
+var ALGOBOX_LIGNE_COURANTE=1;
+var ALGOBOX_EMERGENCY_STOP=false;
+
+//*******************************
+function ALGOBOX_SOMME(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var somme=0;
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else somme+=liste[ind];
+  }
+return somme;
+}
+
+function ALGOBOX_MOYENNE(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var somme, result;
+somme=ALGOBOX_SOMME(liste,debut,fin);
+if (somme=="Erreur") return "Erreur";
+result=somme/(fin-debut+1);
+return result;
+}
+
+function ALGOBOX_VARIANCE(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var carres=new Array();
+var moyenne=ALGOBOX_MOYENNE(liste,debut,fin);
+var somme,result;
+if (moyenne=="Erreur") return "Erreur";
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else carres[ind]=Math.pow(liste[ind]-moyenne,2);
+  }
+somme=ALGOBOX_SOMME(carres,debut,fin);
+if (somme=="Erreur") return "Erreur";
+result=somme/(fin-debut+1);
+return result;
+}
+
+function ALGOBOX_ECART_TYPE(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var variance,result;
+variance=ALGOBOX_VARIANCE(liste,debut,fin);
+if ((variance=="Erreur") || (variance<0)) return "Erreur";
+result=Math.sqrt(variance);
+return result;
+}
+
+function ALGOBOX_MEDIANE(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var liste_triee=new Array();
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else liste_triee[ind-debut]=liste[ind];
+  }
+liste_triee.sort(function(a,b){ return a-b } );
+var eff=fin-debut+1;
+var rang=Math.floor(eff/2);
+var mediane;
+if (eff%2==0)  mediane=(liste_triee[rang]+liste_triee[rang-1])/2;
+else mediane=liste_triee[rang];
+return mediane;
+}
+
+function ALGOBOX_QUARTILE1(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var eff=fin-debut+1;
+if (eff<4) return "Erreur";
+var liste_triee=new Array();
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else liste_triee[ind-debut]=liste[ind];
+  }
+liste_triee.sort(function(a,b){ return a-b } );
+var quartile;
+var reste=eff%4;
+var quotient=Math.floor(eff/4);
+switch (reste)
+  {
+  case 0:
+  quartile=(liste_triee[quotient-1]+liste_triee[quotient])/2;
+  break;
+  case 1:
+  quartile=(liste_triee[quotient-1]+liste_triee[quotient])/2;
+  break;
+  case 2:
+  quartile=liste_triee[quotient];
+  break;
+  case 3:
+  quartile=liste_triee[quotient];
+  break;
+  }
+return quartile;
+}
+
+function ALGOBOX_QUARTILE3(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var eff=fin-debut+1;
+if (eff<4) return "Erreur";
+var liste_triee=new Array();
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else liste_triee[ind-debut]=liste[ind];
+  }
+liste_triee.sort(function(a,b){ return a-b } );
+var quartile;
+var reste=eff%4;
+var quotient=Math.floor(eff/4);
+switch (reste)
+  {
+  case 0:
+  quartile=(liste_triee[3*quotient-1]+liste_triee[3*quotient])/2;
+  break;
+  case 1:
+  quartile=(liste_triee[3*quotient]+liste_triee[3*quotient+1])/2;
+  break;
+  case 2:
+  quartile=liste_triee[3*quotient+1];
+  break;
+  case 3:
+  quartile=liste_triee[3*quotient+2];
+  break;
+  }
+return quartile;
+}
+
+function ALGOBOX_QUARTILE1_BIS(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var eff=fin-debut+1;
+if (eff<4) return "Erreur";
+var liste_triee=new Array();
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else liste_triee[ind-debut]=liste[ind];
+  }
+liste_triee.sort(function(a,b){ return a-b } );
+var quartile;
+var quotient=Math.floor(eff/4);
+var reste=eff/4-quotient;
+if (reste==0) quartile=liste_triee[quotient-1];
+else quartile=liste_triee[quotient];
+return quartile;
+}
+
+function ALGOBOX_QUARTILE3_BIS(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+var eff=fin-debut+1;
+if (eff<4) return "Erreur";
+var liste_triee=new Array();
+for (var ind = debut; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else liste_triee[ind-debut]=liste[ind];
+  }
+liste_triee.sort(function(a,b){ return a-b } );
+var quartile;
+var quotient=Math.floor(3*eff/4);
+var reste=3*eff/4-quotient;
+if (reste==0) quartile=liste_triee[quotient-1];
+else quartile=liste_triee[quotient];
+return quartile;
+}
+
+function ALGOBOX_MINIMUM(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+if ( (!isFinite(liste[debut])) || isNaN(liste[debut])) return "Erreur";
+var result=liste[debut];
+for (var ind = debut+1; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else if (liste[ind]<result) result=liste[ind];
+  }
+return result;
+}
+
+function ALGOBOX_POS_MINIMUM(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+if ( (!isFinite(liste[debut])) || isNaN(liste[debut])) return "Erreur";
+var result=debut;
+for (var ind = debut+1; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else if (liste[ind]<liste[result]) result=ind;
+  }
+return result;
+}
+
+function ALGOBOX_MAXIMUM(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+if ( (!isFinite(liste[debut])) || isNaN(liste[debut])) return "Erreur";
+var result=liste[debut];
+for (var ind = debut+1; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else if (liste[ind]>result) result=liste[ind];
+  }
+return result;
+}
+
+function ALGOBOX_POS_MAXIMUM(liste,debut,fin)
+{
+if ( (!isFinite(debut)) || isNaN(debut) || (!isFinite(fin)) || isNaN(fin)) return "Erreur";
+if ( (debut<0) && (debut>fin) ) return "Erreur";
+if ( (!isFinite(liste[debut])) || isNaN(liste[debut])) return "Erreur";
+var result=debut;
+for (var ind = debut+1; ind<=fin ; ind++)
+  {
+  if ( (!isFinite(liste[ind])) || isNaN(liste[ind])) return "Erreur";
+  else if (liste[ind]>liste[result]) result=ind;
+  }
+return result;
+}
+//*******************************
+function ALGOBOX_FACTORIELLE(n)
+{
+if ( (!isFinite(n)) || isNaN(n)) return "Erreur";
+if ( (n<0) || (n>69) ) return "Erreur";
+if ( parseInt(n)!=n ) return "Erreur";
+if (n<=1) return 1;
+else return n*ALGOBOX_FACTORIELLE(n-1);
+}
+
+function ALGOBOX_NB_COMBINAISONS(n,p)
+{
+var cn,cp,tp,result;
+if ( (!isFinite(n)) || isNaN(n)) return "Erreur";
+if ( (n<0) || (n>100) ) return "Erreur";
+if ( parseInt(n)!=n ) return "Erreur";
+if ( (!isFinite(p)) || isNaN(p)) return "Erreur";
+if ( (p<0) || (p>100) ) return "Erreur";
+if ( parseInt(p)!=p ) return "Erreur";
+cn=n;
+cp=p;
+if (cp>cn)  
+  {
+  tp=cn;
+  cn=cp;
+  cp=tp;
+  }
+if (cn==cp || cp==0) return 1;
+if (cp==1) return cn;
+result=cn/cp;
+for(var i=1;i<=cp-1;i++)
+  {
+  result=result*(cn-i)/(cp-i);
+  }
+return result;
+}
+
+function ALGOBOX_COEFF_BINOMIAL(n,p)
+{
+return ALGOBOX_NB_COMBINAISONS(n,p);
+}
+
+function ALGOBOX_LOI_BINOMIALE(n,p,k)
+{
+if ( (!isFinite(n)) || isNaN(n)) return "Erreur";
+if ( (n<0) || (n>100) ) return "Erreur";
+if ( parseInt(n)!=n ) return "Erreur";
+if ( (!isFinite(k)) || isNaN(k)) return "Erreur";
+if ( (k<0) || (k>100) ) return "Erreur";
+if ( parseInt(k)!=k ) return "Erreur";
+if ( k>n ) return "Erreur";
+if ( (!isFinite(p)) || isNaN(p)) return "Erreur";
+if ( (p<0) || (p>1) ) return "Erreur";
+var cn=ALGOBOX_NB_COMBINAISONS(n,k);
+if (cn=="Erreur") return "Erreur";
+return cn*Math.pow(p,k)*Math.pow(1-p,n-k);
+}
+
+function ALGOBOX_LOI_NORMALE_CR(x)
+{
+var xabs,s,t,b,q,i;
+if ( (!isFinite(x)) || isNaN(x)) return "Erreur";
+xabs=Math.abs(x);
+if (xabs<5)
+  {
+    s = xabs;
+    t = 0;
+    b = xabs;
+    q = xabs * xabs;
+    i = 1 ;
+    while(s > t) { s = (t = s) + (b *=q / (i += 2)) }
+    s= .5 + s * Math.exp(-.5 * q - .91893853320467274178) ;
+    s=Math.floor(s*100000000+0.5)/100000000;
+  }
+else s=1;
+if (x<0) s=1-s;
+return s;
+}
+
+function ALGOBOX_LOI_NORMALE(esp,ecart,x)
+{
+var xcr;
+if ( (!isFinite(esp)) || isNaN(esp)) return "Erreur";
+if ( (!isFinite(ecart)) || isNaN(ecart)) return "Erreur";
+if (ecart<=0) return "Erreur";
+if ( (!isFinite(x)) || isNaN(x)) return "Erreur";
+xcr=(x-esp)/ecart;
+return ALGOBOX_LOI_NORMALE_CR(xcr);
+}
+
+function ALGOBOX_INVERSE_LOI_NORMALE_CR(p)
+{
+if ( (!isFinite(p)) || isNaN(p)) return "Erreur";
+if ( (p<=0) || (p>=1) ) return "Erreur";
+var a_Ninv = [-39.69683028665376 ,  220.9460984245205 , -275.9285104469687 ,  138.3577518672690 , -30.66479806614716 ,  2.506628277459239] ;
+var b_Ninv = [-54.47609879822406,  161.5858368580409, -155.6989798598866,  66.80131188771972, -13.28068155288572 , 1] ;
+var c_Ninv = [-.007784894002430293 , -.3223964580411365 , -2.400758277161838, -2.549732539343734, 4.374664141464968,  2.938163982698783] ;
+var d_Ninv = [.007784695709041462, .3224671290700398, 2.445134137142996,  3.754408661907416 , 1] ;
+var horn = function(A , v) { var w = A[0] ; for (var i = 1 , l = A.length ; l - i ; i++) { w *= v ; w += A[i] } return w } ;
+var Phi = function (x) {
+    var s = x < 0 ? -x : x , t = 0 , b = s , q = s * s , i = 1 ;
+    while(s > t) s = (t = s) + (b *=q / (i += 2)) ;
+    s *= Math.exp(-.5 * q - .91893853320467274178) ;
+    return x < 0 ? .5 - s  : .5 + s 
+}
+var q , r,u,e,x ,result;
+if (p < 0.02425) x =  horn(c_Ninv , q  = Math.sqrt(-2*Math.log(p))) / horn(d_Ninv , q) ;
+else if (p > 0.97575) x = -horn(c_Ninv , q  = Math.sqrt(-2*Math.log(1 - p))) / horn(d_Ninv , q) ;
+else { q = p - 0.5 ; x = q * horn(a_Ninv , r = q*q) / horn(b_Ninv , r) }
+e = Phi(x) - p ; u = e * Math.sqrt(2 * Math.PI) * Math.exp(x*x/2) ;
+result= x - u ;
+result=Math.floor(result*100000000+0.5)/100000000;
+return result;
+}
+
+function ALGOBOX_INVERSE_LOI_NORMALE(esp,ecart,p)
+{
+var result;
+if ( (!isFinite(esp)) || isNaN(esp)) return "Erreur";
+if ( (!isFinite(ecart)) || isNaN(ecart)) return "Erreur";
+if (ecart<=0) return "Erreur";
+if ( (!isFinite(p)) || isNaN(p)) return "Erreur";
+if ( (p<=0) || (p>=1) ) return "Erreur";
+result=ALGOBOX_INVERSE_LOI_NORMALE_CR(p)*ecart+esp;
+return result;
+}
+
+function ALGOBOX_ALEA_ENT(p,n)
+{
+var cp,cn,tp;
+if ( (!isFinite(n)) || isNaN(n)) return "Erreur";
+if (n<0) return "Erreur";
+if ( parseInt(n)!=n ) return "Erreur";
+if ( (!isFinite(p)) || isNaN(p)) return "Erreur";
+if (p<0) return "Erreur";
+if ( parseInt(p)!=p ) return "Erreur";
+if (n==p) return "Erreur";
+cn=n;
+cp=p;
+if (cp>cn)  
+  {
+  tp=cn;
+  cn=cp;
+  cp=tp;
+  }
+return Math.floor((cn-cp+1)*Math.random()+cp);
+}
+
+//*******************************
+function ALGOBOX_CALCULER_EXPRESSION(calcul)
+{
+var r;
+calcul.replace(new RegExp("Math.PI","g"),"PI");
+while (calcul.charAt(0) == '0') 
+  {
+  if (calcul.length == 1) { break };
+  if (calcul.charAt(1) == '.') { break };
+  calcul = calcul.substr(1,calcul.length-1)
+  }
+with (Math) {r=eval(calcul)}
+if ( (!isFinite(r)) || isNaN(r)) return "Erreur";
+else return ALGOBOX_ARRONDI(r);
+}
+
+function ALGOBOX_FORMAT_TEXTE(u)
+{
+var r,negatif,m,p,result;
+if (isNaN(u)) result="Erreur";
+else 
+	{
+	if (u<0) negatif=true;
+	r=String(Math.abs(u).toPrecision(8));
+	if (r.lastIndexOf("e")>0)
+	  {
+	  m=r.substring(0,r.lastIndexOf("e"));
+	  p=r.substring(r.lastIndexOf("e"),r.length);
+ 	  while ((m.length>1) && (m.indexOf(".")>=0) && (m.lastIndexOf("0")==m.length-1)) {m=m.substring(0,m.length-1);}
+ 	  if ((m.length>1) && (m.lastIndexOf(".")==m.length-1)) {m=m.substring(0,m.length-1);}
+	  result=m+p;
+	  }
+	else
+	  {
+ 	  while ((r.length>1) && (r.indexOf(".")>=0) && (r.lastIndexOf("0")==r.length-1)) {r=r.substring(0,r.length-1);}
+ 	  if ((r.length>1) && (r.lastIndexOf(".")==r.length-1)) {r=r.substring(0,r.length-1);}
+	  result=r;
+	  }
+	if (result.substring(0,1)==".") result="0"+result;
+	if (negatif) result='-'+result;
+	}   
+return result;
+}
+
+function ALGOBOX_ENTIER(nb) 
+{ 
+if (Math.abs(nb)<1) return 0 
+else return parseInt(nb);
+}
+
+function ALGOBOX_ARRONDIR(nb,pre) 
+{
+if ( (!isFinite(nb)) || isNaN(nb)) return "Erreur";
+else return parseFloat(nb.toFixed(ALGOBOX_ENTIER(pre)));
+}
+
+function ALGOBOX_ARRONDI(nb) 
+{
+if ( (!isFinite(nb)) || isNaN(nb)) return "Erreur";
+#INSTRUCTION_ARRONDI#
+}
+//******************
+function ALGOBOX_HX(ALGOBOX_x)
+{
+return (ALGOBOX_x2-ALGOBOX_x1)/(ALGOBOX_Xmax-ALGOBOX_Xmin)*(ALGOBOX_x-ALGOBOX_Xmin)+ALGOBOX_x1;
+}
+
+function ALGOBOX_HY(ALGOBOX_y)
+{
+return (ALGOBOX_y1-ALGOBOX_y2)/(ALGOBOX_Ymax-ALGOBOX_Ymin)*(ALGOBOX_y-ALGOBOX_Ymax)+ALGOBOX_y1;
+}
+
+function ALGOBOX_AXEX()
+{
+ ALGOBOX_DESSINE(0,ALGOBOX_Ymin,0,ALGOBOX_Ymax,5);
+}
+
+function ALGOBOX_AXEY()
+{
+ALGOBOX_DESSINE(ALGOBOX_Xmin,0,ALGOBOX_Xmax,0,5);
+}
+
+function ALGOBOX_IHX(ALGOBOX_x)
+{
+return ALGOBOX_x*(ALGOBOX_Xmax-ALGOBOX_Xmin)/(ALGOBOX_x2-ALGOBOX_x1);
+}
+
+function ALGOBOX_IHY(ALGOBOX_y)
+{
+return ALGOBOX_y*(ALGOBOX_Ymax-ALGOBOX_Ymin)/(ALGOBOX_y1-ALGOBOX_y2);
+}
+
+function ALGOBOX_DESSINE(ALGOBOX_X,ALGOBOX_Y,ALGOBOX_U,ALGOBOX_V,ALGOBOX_coul)
+{
+if (navigator.appName=="Microsoft Internet Explorer") return;
+if (ALGOBOX_coul==9)
+{
+ALGOBOX_contexte.globalCompositeOperation = "destination-out";
+ALGOBOX_contexte.beginPath();
+ALGOBOX_contexte.lineWidth=4;
+ALGOBOX_contexte.strokeStyle="rgba(0,0,0,1)";
+ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
+ALGOBOX_contexte.moveTo(Math.round(ALGOBOX_HX(ALGOBOX_X))+2,Math.round(ALGOBOX_HY(ALGOBOX_Y))+2);
+ALGOBOX_contexte.lineTo(Math.round(ALGOBOX_HX(ALGOBOX_U))+2,Math.round(ALGOBOX_HY(ALGOBOX_V))+2);
+ALGOBOX_contexte.stroke();
+ALGOBOX_contexte.globalCompositeOperation = "source-over";
+}
+else
+{
+if ((ALGOBOX_coul==0) || (ALGOBOX_coul==5))  ALGOBOX_contexte_repere.beginPath();
+else ALGOBOX_contexte.beginPath();
+    switch (ALGOBOX_coul)
+    {
+    case 0:
+    ALGOBOX_contexte_repere.strokeStyle='#ccc';
+    ALGOBOX_contexte_repere.lineWidth=1;
+    break;
+    case 1:
+    ALGOBOX_contexte.strokeStyle="black";
+    ALGOBOX_contexte.lineWidth=2;
+    break;
+    case 2:
+    ALGOBOX_contexte.strokeStyle="#4040FF";
+    ALGOBOX_contexte.lineWidth=2;
+    break;
+    case 3:
+    ALGOBOX_contexte.strokeStyle="#FF420E";
+    ALGOBOX_contexte.lineWidth=2;
+    break;
+    case 4:
+    ALGOBOX_contexte.strokeStyle="#00CC00";
+    ALGOBOX_contexte.lineWidth=2;
+    break;
+    case 5:
+    ALGOBOX_contexte_repere.strokeStyle="black";
+    ALGOBOX_contexte_repere.lineWidth=1;
+    break;
+    }
+if ((ALGOBOX_coul==0) || (ALGOBOX_coul==5))
+  {
+  ALGOBOX_contexte_repere.moveTo(Math.round(ALGOBOX_HX(ALGOBOX_X))+2.5,Math.round(ALGOBOX_HY(ALGOBOX_Y))+2.5);
+  ALGOBOX_contexte_repere.lineTo(Math.round(ALGOBOX_HX(ALGOBOX_U))+2.5,Math.round(ALGOBOX_HY(ALGOBOX_V))+2.5);
+  ALGOBOX_contexte_repere.stroke();
+  }
+else
+  {
+  ALGOBOX_contexte.moveTo(Math.round(ALGOBOX_HX(ALGOBOX_X))+2,Math.round(ALGOBOX_HY(ALGOBOX_Y))+2);
+  ALGOBOX_contexte.lineTo(Math.round(ALGOBOX_HX(ALGOBOX_U))+2,Math.round(ALGOBOX_HY(ALGOBOX_V))+2);
+  ALGOBOX_contexte.stroke();
+  }
+}
+}
+
+function ALGOBOX_GRADUERY(ALGOBOX_originex,ALGOBOX_originey)
+{
+var ALGOBOX_temp=(ALGOBOX_originey-ALGOBOX_Ymin)/ALGOBOX_grady;
+var ALGOBOX_yd=(ALGOBOX_temp-parseInt(ALGOBOX_temp))*ALGOBOX_grady+ALGOBOX_Ymin;
+do
+	{
+	ALGOBOX_DESSINE(ALGOBOX_Xmin,ALGOBOX_yd,ALGOBOX_Xmax,ALGOBOX_yd,0);
+	//ALGOBOX_DESSINE(ALGOBOX_originex,ALGOBOX_yd,ALGOBOX_originex+ALGOBOX_IHX(0.01*(ALGOBOX_x2-ALGOBOX_x1)),ALGOBOX_yd,0);
+	ALGOBOX_yd=ALGOBOX_yd+ALGOBOX_grady;
+	}
+while (ALGOBOX_yd<=ALGOBOX_Ymax);
+}
+
+function ALGOBOX_GRADUERX(ALGOBOX_originex,ALGOBOX_originey)
+{
+var ALGOBOX_temp=(ALGOBOX_originex-ALGOBOX_Xmin)/ALGOBOX_gradx;
+var ALGOBOX_xd=(ALGOBOX_temp-parseInt(ALGOBOX_temp))*ALGOBOX_gradx+ALGOBOX_Xmin;
+do
+	{
+	ALGOBOX_DESSINE(ALGOBOX_xd,ALGOBOX_Ymin,ALGOBOX_xd,ALGOBOX_Ymax,0);
+	//ALGOBOX_DESSINE(ALGOBOX_xd,ALGOBOX_originey,ALGOBOX_xd,ALGOBOX_originey-ALGOBOX_IHY(0.01*(ALGOBOX_y2-ALGOBOX_y1)),0);
+	ALGOBOX_xd=ALGOBOX_xd+ALGOBOX_gradx;
+	}
+while (ALGOBOX_xd<=ALGOBOX_Xmax);
+}
+
+function ALGOBOX_GRADUATION()
+{
+if (ALGOBOX_Xmin*ALGOBOX_Xmax<=0) ALGOBOX_originex=0;
+else ALGOBOX_originex=ALGOBOX_Xmin;
+if (ALGOBOX_Ymin*ALGOBOX_Ymax<=0) ALGOBOX_originey=0;
+else ALGOBOX_originey=ALGOBOX_Ymin;
+ALGOBOX_GRADUERX(ALGOBOX_originex,ALGOBOX_originey);
+ALGOBOX_GRADUERY(ALGOBOX_originex,ALGOBOX_originey);
+}
+
+function ALGOBOX_CODAGE_POINT(ALGOBOX_x,ALGOBOX_y)
+{
+var tableau=new Array(4);
+if (ALGOBOX_x<ALGOBOX_Xmin) tableau[0]=1;
+else tableau[0]=0;
+if (ALGOBOX_x>ALGOBOX_Xmax) tableau[1]=1;
+else tableau[1]=0;
+if (ALGOBOX_y<ALGOBOX_Ymin) tableau[2]=1;
+else tableau[2]=0;
+if (ALGOBOX_y>ALGOBOX_Ymax) tableau[3]=1;
+else tableau[3]=0;
+return tableau;
+}
+
+function ALGOBOX_INTER(ALGOBOX_code1,ALGOBOX_code2)
+{
+var ALGOBOX_s=0;
+for (ALGOBOX_ind=0;ALGOBOX_ind<=3;ALGOBOX_ind++) 
+	{
+	ALGOBOX_s=ALGOBOX_s+ALGOBOX_code1[ALGOBOX_ind]*ALGOBOX_code2[ALGOBOX_ind];
+	}
+return ALGOBOX_s;
+}
+
+function ALGOBOX_DEDANS(ALGOBOX_c)
+{
+var ALGOBOX_result=true;
+for (ALGOBOX_ind=0;ALGOBOX_ind<=3;ALGOBOX_ind++) 
+	{
+	if (ALGOBOX_c[ALGOBOX_ind]==1) ALGOBOX_result=false;
+	}
+return ALGOBOX_result;
+}
+
+function ALGOBOX_POINT(ALGOBOX_xd,ALGOBOX_yd,ALGOBOX_coul)
+{
+if (navigator.appName=="Microsoft Internet Explorer") return;
+var ALGOBOX_code=ALGOBOX_CODAGE_POINT(ALGOBOX_xd,ALGOBOX_yd);
+if (ALGOBOX_DEDANS(ALGOBOX_code))
+    {
+    if (ALGOBOX_coul==9)
+      {
+      ALGOBOX_contexte.globalCompositeOperation = "destination-out";
+      ALGOBOX_contexte.beginPath();
+      ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
+      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+      ALGOBOX_contexte.closePath();
+      ALGOBOX_contexte.fill();
+      ALGOBOX_contexte.globalCompositeOperation = "source-over";
+      }
+    else
+    {
+	if (ALGOBOX_coul==0) ALGOBOX_contexte_repere.beginPath();
+	else ALGOBOX_contexte.beginPath();
+	switch (ALGOBOX_coul)
+	{
+	case 0:
+	ALGOBOX_contexte_repere.fillStyle="gray";
+	break;
+	case 1:
+	ALGOBOX_contexte.fillStyle="black";
+	break;
+	case 2:
+	ALGOBOX_contexte.fillStyle="#4040FF";
+	break;
+	case 3:
+	ALGOBOX_contexte.fillStyle="#FF420E";
+	break;
+	case 4:
+	ALGOBOX_contexte.fillStyle="#00CC00";
+	break;
+	}
+	if (ALGOBOX_coul==0)
+	{
+	ALGOBOX_contexte_repere.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+	ALGOBOX_contexte_repere.closePath();
+	ALGOBOX_contexte_repere.fill();    
+	}
+	else
+	{
+	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+	ALGOBOX_contexte.closePath();
+	ALGOBOX_contexte.fill();
+	}
+    }
+    }
+}
+
+function ALGOBOX_EFFACE_GRAPHIQUE()
+{
+ALGOBOX_contexte.clearRect(0, 0, ALGOBOX_canevas.width,ALGOBOX_canevas.height);
+}
+
+function ALGOBOX_TRAIT(ALGOBOX_xd,ALGOBOX_yd,ALGOBOX_xf,ALGOBOX_yf,ALGOBOX_coul)
+{
+var ALGOBOX_xdd=ALGOBOX_xd;
+var ALGOBOX_ydd=ALGOBOX_yd;
+var ALGOBOX_xff=ALGOBOX_xf;
+var ALGOBOX_yff=ALGOBOX_yf;
+var ALGOBOX_coded=ALGOBOX_CODAGE_POINT(ALGOBOX_xdd,ALGOBOX_ydd);
+var ALGOBOX_codef=ALGOBOX_CODAGE_POINT(ALGOBOX_xff,ALGOBOX_yff);
+if (ALGOBOX_DEDANS(ALGOBOX_coded) && ALGOBOX_DEDANS(ALGOBOX_codef)) ALGOBOX_DESSINE(ALGOBOX_xdd,ALGOBOX_ydd,ALGOBOX_xff,ALGOBOX_yff,ALGOBOX_coul);
+else
+{
+	if (ALGOBOX_INTER(ALGOBOX_coded,ALGOBOX_codef)==0)
+	{
+		do
+		{
+			ALGOBOX_dx=(ALGOBOX_xff-ALGOBOX_xdd);
+			ALGOBOX_dy=(ALGOBOX_yff-ALGOBOX_ydd);
+			if (ALGOBOX_coded[0]==1)
+					{
+					ALGOBOX_ydd=ALGOBOX_ydd+(ALGOBOX_Xmin-ALGOBOX_xdd)*ALGOBOX_dy/ALGOBOX_dx;
+					ALGOBOX_xdd=ALGOBOX_Xmin;
+					}
+			else if (ALGOBOX_coded[1]==1)
+					{
+					ALGOBOX_ydd=ALGOBOX_ydd+(ALGOBOX_Xmax-ALGOBOX_xdd)*ALGOBOX_dy/ALGOBOX_dx;
+					ALGOBOX_xdd=ALGOBOX_Xmax;
+					}
+				else if (ALGOBOX_coded[2]==1)
+						{
+						ALGOBOX_xdd=ALGOBOX_xdd+(ALGOBOX_Ymin-ALGOBOX_ydd)*ALGOBOX_dx/ALGOBOX_dy;
+						ALGOBOX_ydd=ALGOBOX_Ymin;
+						}
+					else if (ALGOBOX_coded[3]==1)
+							{
+							ALGOBOX_xdd=ALGOBOX_xdd+(ALGOBOX_Ymax-ALGOBOX_ydd)*ALGOBOX_dx/ALGOBOX_dy;
+							ALGOBOX_ydd=ALGOBOX_Ymax;
+							}
+			ALGOBOX_coded=ALGOBOX_CODAGE_POINT(ALGOBOX_xdd,ALGOBOX_ydd);
+		}
+		while (!ALGOBOX_DEDANS(ALGOBOX_coded));
+		do
+		{
+			ALGOBOX_dx=(ALGOBOX_xff-ALGOBOX_xdd);
+			ALGOBOX_dy=(ALGOBOX_yff-ALGOBOX_ydd);
+			if (ALGOBOX_codef[0]==1)
+					{
+					ALGOBOX_yff=ALGOBOX_ydd+(ALGOBOX_Xmin-ALGOBOX_xdd)*ALGOBOX_dy/ALGOBOX_dx;
+					ALGOBOX_xff=ALGOBOX_Xmin;
+					}
+			else if (ALGOBOX_codef[1]==1)
+					{
+					ALGOBOX_yff=ALGOBOX_ydd+(ALGOBOX_Xmax-ALGOBOX_xdd)*ALGOBOX_dy/ALGOBOX_dx;
+					ALGOBOX_xff=ALGOBOX_Xmax;
+					}
+				else if (ALGOBOX_codef[2]==1)
+						{
+						ALGOBOX_xff=ALGOBOX_xdd+(ALGOBOX_Ymin-ALGOBOX_ydd)*ALGOBOX_dx/ALGOBOX_dy;
+						ALGOBOX_yff=ALGOBOX_Ymin;
+						}
+					else if (ALGOBOX_codef[3]==1)
+							{
+							ALGOBOX_xff=ALGOBOX_xdd+(ALGOBOX_Ymax-ALGOBOX_ydd)*ALGOBOX_dx/ALGOBOX_dy;
+							ALGOBOX_yff=ALGOBOX_Ymax;
+							}
+			ALGOBOX_codef=ALGOBOX_CODAGE_POINT(ALGOBOX_xff,ALGOBOX_yff);
+		}
+		while (!ALGOBOX_DEDANS(ALGOBOX_codef));
+		ALGOBOX_DESSINE(ALGOBOX_xdd,ALGOBOX_ydd,ALGOBOX_xff,ALGOBOX_yff,ALGOBOX_coul);
+	}
+}
+}
+function ALGOBOX_REPERE(xmin,xmax,ymin,ymax,gradx,grady)
+{
+ALGOBOX_Xmin=xmin;
+ALGOBOX_Xmax=xmax;
+ALGOBOX_Ymin=ymin;
+ALGOBOX_Ymax=ymax;
+ALGOBOX_gradx=gradx;
+ALGOBOX_grady=grady;
+var output_legende=document.getElementById("legende");
+while (output_legende.firstChild) 
+  {
+  output_legende.removeChild(output_legende.firstChild);
+  }
+if (navigator.appName=="Microsoft Internet Explorer")
+    {
+    output_legende.appendChild(document.createTextNode("Votre navigateur ne permet pas l'affichage des graphiques : utilisez AlgoBox ou un navigateur autre qu'internet explorer."));
+    return;
+    }
+if ((ALGOBOX_Xmin>=ALGOBOX_Xmax) || (ALGOBOX_Ymin>=ALGOBOX_Ymax))
+    {
+    ALGOBOX_Xmin=-10;
+    ALGOBOX_Xmax=10;
+    ALGOBOX_Ymin=-10;
+    ALGOBOX_Ymax=10;
+    }
+if (ALGOBOX_gradx<=0) ALGOBOX_gradx=1;
+if (ALGOBOX_grady<=0) ALGOBOX_grady=1;
+if ((ALGOBOX_Xmax-ALGOBOX_Xmin)/ALGOBOX_gradx>45) ALGOBOX_gradx=Math.round((ALGOBOX_Xmax-ALGOBOX_Xmin)/45);
+if ((ALGOBOX_Ymax-ALGOBOX_Ymin)/ALGOBOX_grady>45) ALGOBOX_grady=Math.round((ALGOBOX_Ymax-ALGOBOX_Ymin)/45); 
+ALGOBOX_GRADUATION();
+ALGOBOX_contexte_repere.strokeStyle="black";
+ALGOBOX_contexte_repere.strokeRect(ALGOBOX_x1+2,ALGOBOX_y1+2,ALGOBOX_x2-ALGOBOX_x1,ALGOBOX_y2-ALGOBOX_y1);
+if (ALGOBOX_Xmin*ALGOBOX_Xmax<=0) ALGOBOX_AXEX();
+if (ALGOBOX_Ymin*ALGOBOX_Ymax<=0) ALGOBOX_AXEY();
+output_legende.appendChild(document.createTextNode("Xmin: "+ALGOBOX_FORMAT_TEXTE(ALGOBOX_Xmin)+" ; Xmax: "+ALGOBOX_FORMAT_TEXTE(ALGOBOX_Xmax)));
+output_legende.appendChild(document.createElement("br"));
+output_legende.appendChild(document.createTextNode("Ymin: "+ALGOBOX_FORMAT_TEXTE(ALGOBOX_Ymin)+" ; Ymax: "+ALGOBOX_FORMAT_TEXTE(ALGOBOX_Ymax)));
+output_legende.appendChild(document.createElement("br"));
+output_legende.appendChild(document.createTextNode("GradX: "+ALGOBOX_FORMAT_TEXTE(ALGOBOX_gradx)+" ; GradY: "+ALGOBOX_FORMAT_TEXTE(ALGOBOX_grady)));
+ALGOBOX_REPERE_DEFINI=true;
+}
+
+function ALGOBOX_AJOUTE_RESULTAT(texte)
+{
+var output=document.getElementById("output");
+var ligne=document.createElement("pre");
+ligne.appendChild(document.createTextNode(texte));
+output.appendChild(ligne);
+}
+
+function ALGOBOX_INIT_VARIABLES()
+{
+ALGOBOX_COMPTEUR_AFFICHAGE=0;
+ALGOBOX_COMPTEUR_ETAPE=0;
+ALGOBOX_DEPASSEMENT_AFFICHAGE=false;
+ALGOBOX_EMERGENCY_STOP=false;
+#INIT_VARIABLES#
+}
+
+function ALGOBOX_EFFACE_OUTPUT()
+{
+var output=document.getElementById("output");
+while (output.firstChild) 
+  {
+  output.removeChild(output.firstChild);
+  }
+browserDialog.scriptEffacer();
+}
+
+function ALGOBOX_PING_OUTPUT()
+{
+browserDialog.scriptAfficher("",false);
+}
+
+function ALGOBOX_AJOUTE_OUTPUT(texte,nl)
+{
+ALGOBOX_COMPTEUR_AFFICHAGE++;
+if (ALGOBOX_COMPTEUR_AFFICHAGE>=#MAX_AFFICHAGES#)
+  {
+  if (confirm("L'algorithme demande d'afficher un très grand nombre de données.\nSouhaitez-vous arrêter l'algorithme?")) ALGOBOX_DEPASSEMENT_AFFICHAGE=true;
+  else 
+	{
+	browserDialog.scriptAfficher(texte,nl);
+	}
+	ALGOBOX_COMPTEUR_AFFICHAGE=0;
+  }
+else browserDialog.scriptAfficher(texte,nl);
+}
+
+function ALGOBOX_AFFICHE_PASAPAS(texte,nl)
+{
+browserDialog.scriptAfficherVariables(texte,nl);
+}
+
+function ALGOBOX_AFFICHE_ETAT_VARIABLES(ALGOBOX_ID_LIGNE)
+{
+ALGOBOX_COMPTEUR_ETAPE++;
+ALGOBOX_AFFICHE_PASAPAS("#"+ALGOBOX_COMPTEUR_ETAPE+" Nombres/chaines (ligne "+ALGOBOX_ID_LIGNE+") -> ",false);
+#AFFICHE_VARIABLES#
+ALGOBOX_AFFICHE_PASAPAS(" ",true);
+}
+
+function ALGOBOX_PAUSE()
+{
+ALGOBOX_AJOUTE_OUTPUT(" ",true);
+ALGOBOX_AJOUTE_OUTPUT("***Pause***",true);
+browserDialog.scriptDebutPause();
+var reponse=confirm("Pause");
+browserDialog.scriptFinPause();
+return reponse;
+}
+
+function ALGOBOX_ACTIVER_LIGNE(ALGOBOX_ID_LIGNE)
+{
+var ligne_source=document.getElementById("ligne"+ALGOBOX_ID_LIGNE);
+ligne_source.style.background="rgba(255, 255, 0, 0.6)";
+}
+
+function ALGOBOX_DESACTIVER_LIGNE(ALGOBOX_ID_LIGNE)
+{
+var ligne_source=document.getElementById("ligne"+ALGOBOX_ID_LIGNE);
+ligne_source.style.background="#f9f9f9";
+}
+
+function ALGOBOX_PAUSE_PAS_A_PAS(ALGOBOX_ID_LIGNE)
+{
+window.location.href = "#"+ALGOBOX_ID_LIGNE;
+ALGOBOX_ACTIVER_LIGNE(ALGOBOX_ID_LIGNE);
+ALGOBOX_AFFICHE_ETAT_VARIABLES(ALGOBOX_ID_LIGNE);
+browserDialog.scriptDebutPause();
+var rep=confirm("Pause");
+browserDialog.scriptFinPause();
+ALGOBOX_DESACTIVER_LIGNE(ALGOBOX_ID_LIGNE)
+return rep;
+}
+
+function ALGOBOX_INFO_PAS_A_PAS(ALGOBOX_ID_LIGNE,ALGOBOX_INFO)
+{
+window.location.href = "#"+ALGOBOX_ID_LIGNE;
+ALGOBOX_ACTIVER_LIGNE(ALGOBOX_ID_LIGNE);
+ALGOBOX_AFFICHE_PASAPAS(ALGOBOX_INFO+" (ligne "+ALGOBOX_ID_LIGNE+")",true);
+browserDialog.scriptDebutPause();
+var rep=confirm("Pause");
+browserDialog.scriptFinPause();
+ALGOBOX_DESACTIVER_LIGNE(ALGOBOX_ID_LIGNE)
+return rep;
+}
+
+// Code Algorithme :
+#JAVASCRIPT#
+</script>
+</head>
+<body>
+<div align="center" style="margin:10px;"><span class="header">#TITRE#</span></div>
+#DESCRIPTION#
+
+<div class="post" id="contentgraphic" style="visibility : hidden;">
+#GRAPHIQUE#
+</div>
+
+<div class="post">
+<fieldset>
+<legend class="title">Code de l'algorithme</legend>
+<div class="code">
+#CODE#
+</div>
+<br clear="all">
+</fieldset>
+</div>
+
+<div class="post" >
+<fieldset style="width: 760px; height: 260px;">
+<legend class="title">Résultats</legend>
+<div style="width: 700px; height: 200px;" class="output" id="output" >
+</div>
+<br clear="all">
+</fieldset>
+</div>
+
+<div id="footer">Généré par AlgoBox</div>
+</body>
+</html>
+
diff --git a/images/treeview-branch-closed.png b/images/treeview-branch-closed.png
index 1fd101c..d46ec23 100644
Binary files a/images/treeview-branch-closed.png and b/images/treeview-branch-closed.png differ
diff --git a/images/treeview-branch-open.png b/images/treeview-branch-open.png
index 0b119a7..2f7d240 100644
Binary files a/images/treeview-branch-open.png and b/images/treeview-branch-open.png differ
diff --git a/utilities/CHANGELOG.txt b/utilities/CHANGELOG.txt
index ecc6d2e..3ea5e75 100644
--- a/utilities/CHANGELOG.txt
+++ b/utilities/CHANGELOG.txt
@@ -1,3 +1,13 @@
+version 0.8 -> 0.9 :
+--------------------
+Version de maintenance :
+- un bug dans l'utilisation de formules mathématiques pour la fonction F2 a été corrigé
+- la taille de la police est fixée à 9 lors de l'export au format odf
+- la police monaco est utilisée par défaut comme police à chasse fixe sous mac afin d'éviter un mauvais affichage de la police liberation 
+- il est maintenant plus possible de modifier par couper/coller les résultats affichés dans la console afin d'en maintenir l'intégrité
+- un petit problème de coloration syntaxique des lignes commentées lors de l'export en page web a été corrigé
+- l'export en latex fonctionne maintenant aussi si on utilise une taille de police de 11pt ou 12 pt
+
 version 0.7.x -> 0.8.x :
 --------------------
 Nouvelles fonctionnalités :
diff --git a/utilities/algobox.spec b/utilities/algobox.spec
index 4daec94..93cc5ec 100644
--- a/utilities/algobox.spec
+++ b/utilities/algobox.spec
@@ -1,6 +1,6 @@
 Name: algobox
 Summary: logiciel d'algorithmique
-Version: 0.8
+Version: 0.9
 Release: xm1
 License: GPL
 Group: Applications/Education
diff --git a/documents/apropos.txt b/utilities/license_html.txt
similarity index 94%
rename from documents/apropos.txt
rename to utilities/license_html.txt
index 9567bd4..a05c63a 100644
--- a/documents/apropos.txt
+++ b/utilities/license_html.txt
@@ -1,14 +1,3 @@
-<p><b>AlgoBox :</b> logiciel libre et multi-plateforme d'aide à l'élaboration et à l'exécution d'algorithmes.<i>(interface graphique de création de pseudo-code algorithmique et d'interprétation du code obtenu en javascript)</i><br>
-<b><i>Copyright (c) 2009/2012 par Pascal Brachet</i></b><br>
-<i>(Merci à <b>J.Amblard</b> pour sa précieuse collaboration, à Frédérique Mounier et aux utilisateurs pour leurs remarques et suggestions)</i><br><br>
-Site internet : <A href="http://www.xm1math.net/algobox/" target="_blank">http://www.xm1math.net/algobox/</A>
-</p>
-<ul>
-<li>Ce programme libre est distribué selon les termes de la licence GPL (voir ci-dessous)</li>
-<li>AlgoBox est développé à partir de l'environnement de développement libre et multi-plateforme <A href="http://qt-project.org/" target="_blank">Qt</a> .</li>
-<li>Certaines icônes du programme sont issues du thème Rosa (Licence: GPL).</li>
-</ul>
-<hr>
 <h3>The GNU General Public License (GPL)</h3>
 <b>Version 2, June 1991</b>
 <p> Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/algobox.git



More information about the debian-edu-commits mailing list