<commit_before><!DOCTYPE html>

<html>

<head>

    <title>SystematicCyclicCode.js</title>

    <meta name="viewport" content="width=device-width,initial-scale=1">

</head>

<body style="background-color: lightgray">

    <p>

        情報記号数:<input type="text" id="infolen"></input><br>
        生成多項式:<input type="text" id="genepoly"></input><br>
        <button id="button">計算</button>

    </p>

    <p>
        <h4>Console</h4> 
        情報記号列:対応符号語
        <div style="margin:5px,10px;padding:5px;background-color:white;"  id="console"></div>
    </p>

</body>





<script type="text/javascript" src="SystematicCyclicCode.js"></script>

<script type="text/javascript">
    
    document.getElementById("button").onclick = function(){
        if(null == document.getElementById("infolen").value.match(/[0-9]+/)){
            alert("情報記号数を正の整数値を入力してください");
            return;
        }
        if(null == document.getElementById("genepoly").value.match(/[01]+/)){
            alert("生成多項式を0,1の列で入力してください");
            return;
        }
        window.location.href = "index.html?infolen=" + document.getElementById("infolen").value + 
            "?genepoly=" + document.getElementById("genepoly").value;
    };

    //Default
    var infoLen = 4;
    var codeLen = 7;
    var genePoly = 0b1011;
    var genePolyDigree = 3;

    var urlParamInfoLen = window.location.href.match(/infolen=([0-9]+)(&[^\/]*)?/);
    var urlParamGenePoly = window.location.href.match(/genepoly=([01]+)(&[^\/]*)?/);
    if(null != urlParamInfoLen && null != urlParamGenePoly){
        infoLen = ParseInt(urlParamInfoLen[1]);
        genePoly = ParseInt(urlParamGenePoly[1], 2);
        genePolyDigree = urlParamGenePoly[1].length - 1;
        codeLen = infoLen + genePolyDigree;
    }
    
    var SCC = new SystematicCyclicCode(infoLen, codeLen, genePoly, genePolyDigree);
    for (var i = 0; i < Math.pow(2, infoLen); i++) {
        var printStr = (SCC.zero + i.toString(2)).slice(-infoLen) + "\t:" + SCC.generateToString(i);
        console.log(printStr);
        document.getElementById("console").innerHTML += printStr + "<br>\n";
    }

</script>

</html>
<commit_msg>status show<commit_after><!DOCTYPE html>

<html>

<head>

    <title>SystematicCyclicCode.js</title>

    <meta name="viewport" content="width=device-width,initial-scale=1">

</head>

<body style="background-color: lightgray">

    <p>

        情報記号数:<input type="text" id="infolen"></input><br>
        生成多項式:<input type="text" id="genepoly"></input><br>
        <button id="button">計算</button>

    </p>
    
    <p>
        
        情報記号数: <span id="a"></span><br>
        符号長: <span id="b"></span><br>
        生成多項式: <span id="c"></span><br>
        生成多項式次数: <span id="d"></span><br>
        
    </p>

    <p>
        <h4>Console</h4> 
        情報記号列:対応符号語
        <div style="margin:5px,10px;padding:5px;background-color:white;"  id="console"></div>
    </p>

</body>





<script type="text/javascript" src="SystematicCyclicCode.js"></script>

<script type="text/javascript">
    
    document.getElementById("button").onclick = function(){
        if(null == document.getElementById("infolen").value.match(/[0-9]+/)){
            alert("情報記号数を正の整数値を入力してください");
            return;
        }
        if(null == document.getElementById("genepoly").value.match(/[01]+/)){
            alert("生成多項式を0,1の列で入力してください");
            return;
        }
        window.location.href = "index.html?infolen=" + document.getElementById("infolen").value + 
            "?genepoly=" + document.getElementById("genepoly").value;
    };

    //Default
    var infoLen = 4;
    var codeLen = 7;
    var genePoly = 0b1011;
    var genePolyDigree = 3;

    var urlParamInfoLen = window.location.href.match(/infolen=([0-9]+)(&[^\/]*)?/);
    var urlParamGenePoly = window.location.href.match(/genepoly=([01]+)(&[^\/]*)?/);
    if(null != urlParamInfoLen && null != urlParamGenePoly){
        infoLen = ParseInt(urlParamInfoLen[1]);
        genePoly = ParseInt(urlParamGenePoly[1], 2);
        genePolyDigree = urlParamGenePoly[1].length - 1;
        codeLen = infoLen + genePolyDigree;
    }
    
    var SCC = new SystematicCyclicCode(infoLen, codeLen, genePoly, genePolyDigree);
    for (var i = 0; i < Math.pow(2, infoLen); i++) {
        var printStr = (SCC.zero + i.toString(2)).slice(-infoLen) + "\t:" + SCC.generateToString(i);
        console.log(printStr);
        document.getElementById("console").innerHTML += printStr + "<br>\n";
    }
    
    document.getElementById("a").innerHTML = infoLen;
    document.getElementById("b").innerHTML = codeLen;
    document.getElementById("c").innerHTML = (SCC.zero + genePoly.toString(2)).slice(-(genePolyDigree + 1));
    document.getElementById("d").innerHTML = genePolyDigree;
    

</script>

</html>

{'fraction_non_alphanumeric': 0.1811926605504587, 'fraction_numerical': 0.014178482068390326, 'mean_word_length': 2.957920792079208, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 79, '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': '755107', 'n_tokens_mistral': 1742, 'n_tokens_neox': 1668, 'n_words': 247}