<commit_before><h1> 3 Way binding using Rivets.js</h1>

<div id="myComponent">
    <input rv-value="scope.name">
    <p><span rv-html="scope.name"></span></p>
</div>

<ul>
    <li rv-each-person="scope.persons">
        <span rv-html="person"></span>
    </li>
</ul>



<div id="log"></div>
<script src="/bower_components/rivets/dist/rivets.bundled.min.js"></script>
<script src="/bower_components/socket.io-client/socket.io.js"></script>

<script src="load1.js"></script>
<script>

    var a = {
        name: "<NAME>",
        id:"23465436fssdfg",
        persons: ["a", "b", "c"]
    };

    sightglass.adapters = rivets.adapters;
    sightglass.root = '.';

    sightglass(a, "name", function () {
        document.getElementById("log").innerHTML = "Sending XHR call to update a.name -><br/>" + 'util.ajax("/update/person/' + a.id + '", {name:"'+a.name+'"})';
    });
    window.setTimeout(function () {
        alert("Ohh, we have received Some data from socket.io");
        a.name = "<NAME>";
        //TODO - updating a.name this way should not generate additional XHR call !
    }, 6000);

    rivets.bind(document.getElementById("myComponent"), {
        scope: a
    });
</script><commit_msg>changes<commit_after><h1>SyncLib = (MultiTab + MultiWindow + Server Side ) Shared Variable using socket.io </h1>
<div id="log"></div>

<script src="/bower_components/socket.io-client/socket.io.js"></script>
<script src="SyncLib.js"></script>
<script src="load.js"></script>

{'fraction_non_alphanumeric': 0.2037914691943128, 'fraction_numerical': 0.012186865267433988, 'mean_word_length': 3.347058823529412, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 42, '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': '6043270', 'n_tokens_mistral': 520, 'n_tokens_neox': 501, 'n_words': 99}