<commit_before>window.onload = function() {
    ArrayBilles = [];

    for(var i = 0; i < cours.length;i++)
    {
        ArrayBilles[i] = [];
        ArrayBilles[i].titre = cours[i]["cou_titre"];
        ArrayBilles[i].no = cours[i]["cou_no"];
        cmpt = 0;
        for(var j = 0; j < ens.length;j++)
        {
            if(ens[j]["ens_inactif"] == 0)
            {
                ArrayBilles[i][cmpt] = [];
                ArrayBilles[i][cmpt].alias = ens[j]["ens_alias"];
                if (Dummy[ens[j]["ens_alias"]] == null || Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]] == null) {
                    ArrayBilles[i][cmpt].billes = 0;
                    ArrayBilles[i][cmpt].fois = 0;
                    ArrayBilles[i][cmpt].bid = 0;
                }
                else {
                    ArrayBilles[i][cmpt].billes = Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]].billes;
                    ArrayBilles[i][cmpt].fois = Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]].compteur;
                    ArrayBilles[i][cmpt].bid = Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]].bid;
                }
                cmpt++;
            }
        }
    }
    clickTableau();
};

function clickTableau()
{
    document.getElementById("bC").className = "selected";
    var html = "";
    html += "<table id='tabBilles'>";
    html += "<tr> <th onclick=\"clickTableau()\">INFO</th>";
    for(var i = 0; i < ArrayBilles[0].length;i++)
    {
        if(ArrayBilles[0][i].alias != null)
        {
            html += "<th onclick=\"clickProfs(\'" + ArrayBilles[0][i].alias + "\')\">" + ArrayBilles[0][i].alias + "</th>";
        }

    }
    html += "</tr>";
    for(var i = 0; i < ArrayBilles.length;i++)
    {
        html += "<tr>";
        html += "<th onclick=\"clickCours(\'" + ArrayBilles[i].no + "\')\">" + ArrayBilles[i].titre + "</th>";
        for(var j = 0; j < ArrayBilles[i].length;j++)
        {
            if(ArrayBilles[i][j].alias != null) {
                html += "<td>" + ((langue == "FR") ? "Billes: " : "Marbles: ") + ArrayBilles[i][j].billes + ((langue == "FR") ? "<br /> Fois: " : "<br /> Times: ") + ArrayBilles[i][j].fois + "</td>";
            }
        }
        html += "</tr>";
    }
    html += "</table>";
    document.getElementById("contentBilles").innerHTML = html;
}

function clickProfs(pId)
{

    var html = "";
    html += "<h3>" + pId + "</h3>"
    html += "<table id='tabBilles'>";
    html += "<tr> <th>INFO</th>";
    html += "<th>" + ((langue == "FR") ? "FOIS" : "TIMES") + "</th>";
    html += "<th>" + ((langue == "FR") ? "BILLES" : "MARBLES") + "</th>";
    html += "<th>BID</th>";
    html += "</tr>";
    for(var i = 0; i < ArrayBilles.length;i++)
    {

        for(var j = 0; j < ArrayBilles[i].length;j++)
        {
                if(ArrayBilles[i][j].alias == pId)
                {
                    html += "<tr>";
                    html += "<th onclick=\"clickCours(\'" + ArrayBilles[i].no + "\')\">" + ArrayBilles[i].titre + "</th>";
                    html += "<td>" + ArrayBilles[i][j].billes + "</td>";
                    html += "<td>" + ArrayBilles[i][j].fois + "</td>";
                    html += "<td>" + ArrayBilles[i][j].bid + "</td>";
                    html += "</tr>";
                }
            }
    }
    html += "</table>";
    document.getElementById("contentBilles").innerHTML = html;
}

function clickCours(cId)
{
    for(var i = 0; i < ArrayBilles.length;i++) {
        if(ArrayBilles[i].no == cId){
            titre = ArrayBilles[i].titre;
        }
    }
    var html = "";
    html += "<h3>" + cId + ":" + titre + "</h3>"
    html += "<table id='tabBilles'>";
    html += "<tr> <th>INFO</th>";
    html += "<th>" + ((langue == "FR") ? "FOIS" : "TIMES") + "</th>";
    html += "<th>" + ((langue == "FR") ? "BILLES" : "MARBLES") + "</th>";
    html += "<th>BID</th>";
    html += "</tr>";
    for(var i = 0; i < ArrayBilles.length;i++)
    {
        if(ArrayBilles[i].no == cId)
        {
            for(var j = 0; j < ArrayBilles[i].length;j++)
            {
                html += "<tr>";
                html += "<th onclick=\"clickProfs(\'" + ArrayBilles[i][j].alias + "\')\">" + ArrayBilles[i][j].alias + "</th>";
                html += "<td>" + ArrayBilles[i][j].billes + "</td>";
                html += "<td>" + ArrayBilles[i][j].fois + "</td>";
                html += "<td>" + ArrayBilles[i][j].bid + "</td>";
                html += "</tr>";
            }
        }
    }
    html += "</table>";
    document.getElementById("contentBilles").innerHTML = html;
}<commit_msg>fix messages inverser billes et fois<commit_after>window.onload = function() {
    ArrayBilles = [];

    for(var i = 0; i < cours.length;i++)
    {
        ArrayBilles[i] = [];
        ArrayBilles[i].titre = cours[i]["cou_titre"];
        ArrayBilles[i].no = cours[i]["cou_no"];
        cmpt = 0;
        for(var j = 0; j < ens.length;j++)
        {
            if(ens[j]["ens_inactif"] == 0)
            {
                ArrayBilles[i][cmpt] = [];
                ArrayBilles[i][cmpt].alias = ens[j]["ens_alias"];
                if (Dummy[ens[j]["ens_alias"]] == null || Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]] == null) {
                    ArrayBilles[i][cmpt].billes = 0;
                    ArrayBilles[i][cmpt].fois = 0;
                    ArrayBilles[i][cmpt].bid = 0;
                }
                else {
                    ArrayBilles[i][cmpt].billes = Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]].billes;
                    ArrayBilles[i][cmpt].fois = Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]].compteur;
                    ArrayBilles[i][cmpt].bid = Dummy[ens[j]["ens_alias"]]["cours"][cours[i]["cou_no"]].bid;
                }
                cmpt++;
            }
        }
    }
    console.log(Dummy);
    console.log(ens);
    console.log(cours);
    console.log(ArrayBilles);
    clickTableau();
};

function clickTableau()
{
    document.getElementById("bC").className = "selected";
    var html = "";
    html += "<table id='tabBilles'>";
    html += "<tr> <th onclick=\"clickTableau()\">INFO</th>";
    for(var i = 0; i < ArrayBilles[0].length;i++)
    {
        if(ArrayBilles[0][i].alias != null)
        {
            html += "<th onclick=\"clickProfs(\'" + ArrayBilles[0][i].alias + "\')\">" + ArrayBilles[0][i].alias + "</th>";
        }

    }
    html += "</tr>";
    for(var i = 0; i < ArrayBilles.length;i++)
    {
        html += "<tr>";
        html += "<th onclick=\"clickCours(\'" + ArrayBilles[i].no + "\')\">" + ArrayBilles[i].titre + "</th>";
        for(var j = 0; j < ArrayBilles[i].length;j++)
        {
            if(ArrayBilles[i][j].alias != null) {
                html += "<td>" + ((langue == "FR") ? "Billes: " : "Marbles: ") + ArrayBilles[i][j].billes + ((langue == "FR") ? "<br /> Fois: " : "<br /> Times: ") + ArrayBilles[i][j].fois + "</td>";
            }
        }
        html += "</tr>";
    }
    html += "</table>";
    document.getElementById("contentBilles").innerHTML = html;
}

function clickProfs(pId)
{

    var html = "";
    html += "<h3>" + pId + "</h3>"
    html += "<table id='tabBilles'>";
    html += "<tr> <th>INFO</th>";
    html += "<th>" + ((langue == "FR") ? "BILLES" : "MARBLES") + "</th>";
    html += "<th>" + ((langue == "FR") ? "FOIS" : "TIMES") + "</th>";
    html += "<th>BID</th>";
    html += "</tr>";
    for(var i = 0; i < ArrayBilles.length;i++)
    {

        for(var j = 0; j < ArrayBilles[i].length;j++)
        {
                if(ArrayBilles[i][j].alias == pId)
                {
                    html += "<tr>";
                    html += "<th onclick=\"clickCours(\'" + ArrayBilles[i].no + "\')\">" + ArrayBilles[i].titre + "</th>";
                    html += "<td>" + ArrayBilles[i][j].billes + "</td>";
                    html += "<td>" + ArrayBilles[i][j].fois + "</td>";
                    html += "<td>" + ArrayBilles[i][j].bid + "</td>";
                    html += "</tr>";
                }
            }
    }
    html += "</table>";
    document.getElementById("contentBilles").innerHTML = html;
}

function clickCours(cId)
{
    for(var i = 0; i < ArrayBilles.length;i++) {
        if(ArrayBilles[i].no == cId){
            titre = ArrayBilles[i].titre;
        }
    }
    var html = "";
    html += "<h3>" + cId + ":" + titre + "</h3>"
    html += "<table id='tabBilles'>";
    html += "<tr> <th>INFO</th>";
    html += "<th>" + ((langue == "FR") ? "BILLES" : "MARBLES") + "</th>";
    html += "<th>" + ((langue == "FR") ? "FOIS" : "TIMES") + "</th>";
    html += "<th>BID</th>";
    html += "</tr>";
    for(var i = 0; i < ArrayBilles.length;i++)
    {
        if(ArrayBilles[i].no == cId)
        {
            for(var j = 0; j < ArrayBilles[i].length;j++)
            {
                html += "<tr>";
                html += "<th onclick=\"clickProfs(\'" + ArrayBilles[i][j].alias + "\')\">" + ArrayBilles[i][j].alias + "</th>";
                html += "<td>" + ArrayBilles[i][j].billes + "</td>";
                html += "<td>" + ArrayBilles[i][j].fois + "</td>";
                html += "<td>" + ArrayBilles[i][j].bid + "</td>";
                html += "</tr>";
            }
        }
    }
    html += "</table>";
    document.getElementById("contentBilles").innerHTML = html;
}
{'fraction_non_alphanumeric': 0.23963330135380023, 'fraction_numerical': 0.004903528408485236, 'mean_word_length': 1.906443618339529, 'pattern_counts': {'":': 2, '<': 151, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4850528', 'n_tokens_mistral': 3343, 'n_tokens_neox': 3257, 'n_words': 537}