<commit_before><div class="row">
  <div class="small-12">
    <header>
      <h1>Data Structures in Javascript</h1>
      <p>An exercise on data structures and algorithms in Javascript, AngularJS and testing.</p>
    </header>
  </div>
</div>
<div class="row">
  <div class="small-12">
  <div class="linked-list">
    <h2>Linked List</h2>
    <ul class="linked-list__graphic-representation">
      <p ng-hide="linkedList.toArray().length > 0">Start playing with the list below!</p>
      <li class="linked-list__node" ng-repeat="(key, value) in linkedList.toArray()">
        <div class="linked-list__node__index">{{printIndex(key)}}</div>
        {{value.data}}
        <div class="linked-list__node__next">Next: {{value.next.data || 'null'}}</div>
      </li>
      <li class="linked-list__node__count">Node count: {{linkedList._length}}</li>
    </ul>
    <!-- <div class="panel">
      <pre>{{linkedList.toArray() | json}}</pre>
    </div> -->
    <input type="text" ng-model="node.data" placeholder="red, blue, green or something like that…" focus-me="focusLinkedList">
    <menu role="toolbar">
      <button ng-click="linkedList.add(node.data); focusLinkedList = true;">Add</button>
      <button ng-click="linkedList.remove(node.data)">Remove <small ng-if="node.data">({{node.data}})</small></button>
      <button ng-click="linkedList.removeLast()">Remove Last</button>
      <button ng-click="linkedList.clear()">Clear</button>
    </menu>
  </div>
  </div>
</div><commit_msg>focus the input in any button press<commit_after><div class="row">
  <div class="small-12">
    <header>
      <h1>Data Structures in Javascript</h1>
      <p>An exercise on data structures and algorithms in Javascript, AngularJS and testing.</p>
    </header>
  </div>
</div>
<div class="row">
  <div class="small-12">
  <div class="linked-list">
    <h2>Linked List</h2>
    <ul class="linked-list__graphic-representation">
      <p ng-hide="linkedList.toArray().length > 0">Start playing with the list below!</p>
      <li class="linked-list__node" ng-repeat="(key, value) in linkedList.toArray()">
        <div class="linked-list__node__index">{{printIndex(key)}}</div>
        {{value.data}}
        <div class="linked-list__node__next">Next: {{value.next.data || 'null'}}</div>
      </li>
      <li class="linked-list__node__count">Node count: {{linkedList._length}}</li>
    </ul>
    <!-- <div class="panel">
      <pre>{{linkedList.toArray() | json}}</pre>
    </div> -->
    <input type="text" ng-model="node.data" placeholder="red, blue, green or something like that…" focus-me="focusLinkedList">
    <menu role="toolbar">
      <button ng-click="linkedList.add(node.data); focusLinkedList = true;">Add</button>
      <button ng-click="linkedList.remove(node.data); focusLinkedList = true;">Remove <small ng-if="node.data">({{node.data}})</small></button>
      <button ng-click="linkedList.removeLast(); focusLinkedList = true;">Remove Last</button>
      <button ng-click="linkedList.clear(); focusLinkedList = true;">Clear</button>
    </menu>
  </div>
  </div>
</div>
{'fraction_non_alphanumeric': 0.19387422613229066, 'fraction_numerical': 0.005865102639296188, 'mean_word_length': 3.888535031847134, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 101, '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': '6300766', 'n_tokens_mistral': 1020, 'n_tokens_neox': 983, 'n_words': 203}