<commit_before><!DOCTYPE html>
<html>
    <head>
        <title>TreeBrowser test</title>

        <!-- CSS libraries -->
        <link href="css/main.css" type="text/css" rel="stylesheet"/>
        <link href="css/dynatree/ui.dynatree.css" rel="stylesheet" type="text/css">
        <!-- // CSS libraries -->

        <!-- JS libraries -->
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui.min.js"></script>
        <script type="text/javascript" src="js/jquery.dynatree.min.js"></script>
        <script type="text/javascript" src="js/TreeBrowserWidget.js"></script>
        <!-- // External JS libraries -->

        <script type="text/javascript">

        /*********
         * UTILITY HELPERS
         */

          function S4() {
              return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
          }

          function guid() {
              return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
          }

          function logMessage( msg )
          {
              if ( window.console ) {
                  var d = new Date();
                  console.log( d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + "." + d.getMilliseconds() + ": " + msg );
              }
          }

        /*********
         * DOCUMENT READY
         */
          $(document).ready(function(){
              var treeBrowser = new TreeBrowserWidget( "dTreeBrowser" );

              //toplevel items
              var node1 = treeBrowser.createNode( null, { name: "Node1", hasChildren : true } );
              var node2 = treeBrowser.createNode( null, { name: "Node2", hasChildren : true } );
              var node3 = treeBrowser.createNode( null, { name: "Node3", hasChildren : true } );
              var node4 = treeBrowser.createNode( null, { name: "Node4", hasChildren : true } );
              var node5 = treeBrowser.createNode( null, { name: "Node5", hasChildren : false } );

              //remove node3 just for fun
              treeBrowser.deleteNode(node3);

              //handle node open
              treeBrowser.onNodeOpen = function( node ) {
                  var that = this;
                  setTimeout( function () {
                      that.createNode( node, { name: "Child1", hasChildren : false } );
                      that.createNode( node, { name: "Child2", hasChildren : false } );
                      that.createNode( node, { name: "Child3", hasChildren : false } );
                      that.createNode( node, { name: "Child4", hasChildren : false } );
                  }, 1000 );
              }

              //node3 does not exist but try to rename it
              treeBrowser.setCustomData( node3, { x: "soonToBeDeleted" } );
              setTimeout( function() { treeBrowser.renameNode( node3, "Node3 upadted" ); }, 2000 );

              //node4 rename
              treeBrowser.setCustomData( node4, { x: 1, y: 2 } );
              setTimeout( function() { treeBrowser.renameNode( node4, "Node4 updated" ); }, 4000 );
<commit_msg>updated because of the TreeBrowserWidet.js update<commit_after><!DOCTYPE html>
<html>
    <head>
        <title>TreeBrowser test</title>

        <!-- CSS libraries -->
        <link href="css/main.css" type="text/css" rel="stylesheet"/>
        <link href="css/dynatree/ui.dynatree.css" rel="stylesheet" type="text/css">
        <!-- // CSS libraries -->

        <!-- JS libraries -->
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui.min.js"></script>
        <script type="text/javascript" src="js/jquery.dynatree.min.js"></script>
        <script type="text/javascript" src="js/TreeBrowserWidget.js"></script>
        <!-- // External JS libraries -->

        <script type="text/javascript">

        /*********
         * UTILITY HELPERS
         */

          function S4() {
              return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
          }

          function guid() {
              return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
          }

          function logMessage( msg )
          {
              if ( window.console ) {
                  var d = new Date();
                  console.log( d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + "." + d.getMilliseconds() + ": " + msg );
              }
          }

        /*********
         * DOCUMENT READY
         */
          $(document).ready(function(){
              var treeBrowser = new TreeBrowserWidget( "dTreeBrowser" );

              //toplevel items
              var node1 = treeBrowser.createNode( null, { name: "Node1", hasChildren : true } );
              var node2 = treeBrowser.createNode( null, { name: "Node2", hasChildren : true } );
              var node3 = treeBrowser.createNode( null, { name: "Node3", hasChildren : true } );
              var node4 = treeBrowser.createNode( null, { name: "Node4", hasChildren : true } );
              var node5 = treeBrowser.createNode( null, { name: "Node5", hasChildren : false } );

              var node11 = treeBrowser.createNode( node1, { name: "Node1_1", hasChildren : true } );
              var node12 = treeBrowser.createNode( node1, { name: "Node1_2", hasChildren : true } );
              var node13 = treeBrowser.createNode( node1, { name: "Node1_3", hasChildren : true } );
              var node14 = treeBrowser.createNode( node1, { name: "Node1_4", hasChildren : true } );
              var node15 = treeBrowser.createNode( node1, { name: "Node1_5", hasChildren : true } );

              //remove node3 just for fun
              treeBrowser.deleteNode(node3);

              //handle node open
              treeBrowser.onNodeOpen = function( node ) {
                  var that = this;
                  setTimeout( function () {
                      that.createNode( node, { name: "Child1", hasChildren : false } );
                      that.createNode( node, { name: "Child2", hasChildren : false } );
                      that.createNode( node, { name: "Child3", hasChildren : false } );
                      that.createNode( node, { name: "Child4", hasChildren : false } );
                  }, 1000 );
              }

              //node3 does not exist but try to rename it
              treeBrowser.setCustomData( node3, { x: "soonToBeDeleted" } );
              setTimeout( function() { treeBrowser.renameNode( node3, "Node3 upadted" ); }, 2000 );

              //node4 rename
              treeBrowser.setCustomData( node4, { x: 1, y: 2 } );
              setTimeout( function() { treeBrowser.renameNode( node4, "Node4 updated" ); }, 4000 );

{'fraction_non_alphanumeric': 0.15674074074074074, 'fraction_numerical': 0.020888888888888887, 'mean_word_length': 1.8176126878130217, 'pattern_counts': {'":': 6, '<': 43, '<?xml version=': 0, '>': 43, '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': '7023520', 'n_tokens_mistral': 1966, 'n_tokens_neox': 1869, 'n_words': 423}