<commit_before>{{ define "title" }} - Simulator{{ end }}

{{ define "scripts" }}
<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script src="/static/js/lib/physicsjs/physicsjs-full.js"></script>
<script src="/static/js/lib/eq-solver.js"></script>
<script src="/static/js/simulator/globals.js"></script>
<script src="/static/js/simulator/simulation.js"></script>
<script src="/static/js/simulator/ui-controller.js"></script>
<script src="/static/js/simulator/rendering.js"></script>
<script src="/static/js/simulator/utility.js"></script>
<script src="/static/js/simulator/components/mass.js"></script>
<script src="/static/js/simulator/components/spring.js"></script>
<script src="/static/js/simulator/components/pulley.js"></script>
<script src="/static/js/simulator/modules/kinematics.js"></script>

<script>
  Kinematics1D.initModule({{ .Data.simulation.Simulator }});
  var GlobalKeyNames = {
    User: {{ .User.KeyName }},
    Simulation: {{ .Data.simulation.KeyName }},
  }
</script>

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>

<script src="/static/js/simulator/base.js"></script>
<script src="/static/js/forms.js"></script>
<script src="/static/js/view.js"></script>


{{ end }}

{{ define "content" }}
<div class="main-container simulator-container">
  <div class="row">
    <div class="col s12">
      <div class="card-panel">
        {{ template "simulatorFrag" . }}

        <div class="row">
          <!-- Div for switching between keyframes. Enable playback when keyframes have no unknowns. -->
          <div class="col s8">
            <div>
              <h5>Keyframes:
              <a class="btn-floating btn-small waves-effect waves-light red" id="add-keyframe"><i class="fa fa-plus"></i></a>
              </h5>
              <div>
                <div id="keyframelist">
                  <ul id="keyframe-list">
                    <li>
                      <div class="keyframe-tile">
                        <div class="remove-keyframe-btn">
                          <a class="btn-floating btn-small waves-effect waves-light red kf-btn-placeholder" id="remove-keyframe-0"><i class="fa fa-times"></i></a>
                        </div>
                          <h6>Frame 1: </h6>
                          <canvas id="keyframe-0" class="keyframe" style="border:4px solid #0000cc"></canvas>
                     
                        <div class="input-field">
                              <input id="keyframe-0-dt" type="text" readonly value="0"></input>
                              <label for="keyframe-0-dt" class="active">dt</label>
                        </div>
                       </div>
                    </li>
                    <li>
                      <div class="keyframe-tile">
                        <div class="remove-keyframe-btn">
                          <a class="btn-floating btn-small waves-effect waves-light red delete-kf-btn" id="remove-keyframe-1"><i class="fa fa-times"></i></a>
                        </div>
                          <h6>Frame 2: </h6>
                          <canvas id="keyframe-1" class="keyframe" ></canvas>
                     
                        <div class="input-field">
                              <input id="keyframe-1-dt" type="text" value="?"></input>
                              <label for="keyframe-1-dt" class="active">dt</label>
                        </div>
                       </div>
                    </li>
                  
                  </ul>
                </div>

                <div class="row">
                  <div class="col s12 center">
                    <div class="input-field col s12" >
                      <a class="waves-effect waves-light btn blue darken-1" id="solve-btn">Solve for Unknowns</a>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col s6">
                <h6>Solution details:</h6>
                <div class="row solution-details-container" style="overflow:auto;">
                  <p id="solution-details" style="white-space: pre-wrap;"></p>                  
                </div>
              </div>
            </div>
          </div>

          <div class="col s4">
            <h5>Example Problem:</h5>
            <img src="/static/img/example-problem.png" class="responsive-img">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

{{ if .Data.simulation.KeyName }}
  <div class="main-container simulator-container">
    {{ template "commentsFrag" . }}
  </div>
{{ end }}
{{ end }}
<commit_msg>adding extra include to kinematics page<commit_after>{{ define "title" }} - Simulator{{ end }}

{{ define "scripts" }}
<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script src="/static/js/lib/physicsjs/physicsjs-full.js"></script>
<script src="/static/js/lib/eq-solver.js"></script>
<script src="/static/js/simulator/globals.js"></script>
<script src="/static/js/simulator/simulation.js"></script>
<script src="/static/js/simulator/ui-controller.js"></script>
<script src="/static/js/simulator/rendering.js"></script>
<script src="/static/js/simulator/utility.js"></script>
<script src="/static/js/simulator/components/mass.js"></script>
<script src="/static/js/simulator/components/spring.js"></script>
<script src="/static/js/simulator/components/pulley.js"></script>
<script src="/static/js/simulator/modules/kinematics.js"></script>
<script src="/static/js/lib/canvasjs.min.js"></script>

<script>
  Kinematics1D.initModule({{ .Data.simulation.Simulator }});
  var GlobalKeyNames = {
    User: {{ .User.KeyName }},
    Simulation: {{ .Data.simulation.KeyName }},
  }
</script>

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>

<script src="/static/js/simulator/base.js"></script>
<script src="/static/js/forms.js"></script>
<script src="/static/js/view.js"></script>


{{ end }}

{{ define "content" }}
<div class="main-container simulator-container">
  <div class="row">
    <div class="col s12">
      <div class="card-panel">
        {{ template "simulatorFrag" . }}

        <div class="row">
          <!-- Div for switching between keyframes. Enable playback when keyframes have no unknowns. -->
          <div class="col s8">
            <div>
              <h5>Keyframes:
              <a class="btn-floating btn-small waves-effect waves-light red" id="add-keyframe"><i class="fa fa-plus"></i></a>
              </h5>
              <div>
                <div id="keyframelist">
                  <ul id="keyframe-list">
                    <li>
                      <div class="keyframe-tile">
                        <div class="remove-keyframe-btn">
                          <a class="btn-floating btn-small waves-effect waves-light red kf-btn-placeholder" id="remove-keyframe-0"><i class="fa fa-times"></i></a>
                        </div>
                          <h6>Frame 1: </h6>
                          <canvas id="keyframe-0" class="keyframe" style="border:4px solid #0000cc"></canvas>
                     
                        <div class="input-field">
                              <input id="keyframe-0-dt" type="text" readonly value="0"></input>
                              <label for="keyframe-0-dt" class="active">dt</label>
                        </div>
                       </div>
                    </li>
                    <li>
                      <div class="keyframe-tile">
                        <div class="remove-keyframe-btn">
                          <a class="btn-floating btn-small waves-effect waves-light red delete-kf-btn" id="remove-keyframe-1"><i class="fa fa-times"></i></a>
                        </div>
                          <h6>Frame 2: </h6>
                          <canvas id="keyframe-1" class="keyframe" ></canvas>
                     
                        <div class="input-field">
                              <input id="keyframe-1-dt" type="text" value="?"></input>
                              <label for="keyframe-1-dt" class="active">dt</label>
                        </div>
                       </div>
                    </li>
                  
                  </ul>
                </div>

                <div class="row">
                  <div class="col s12 center">
                    <div class="input-field col s12" >
                      <a class="waves-effect waves-light btn blue darken-1" id="solve-btn">Solve for Unknowns</a>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col s6">
                <h6>Solution details:</h6>
                <div class="row solution-details-container" style="overflow:auto;">
                  <p id="solution-details" style="white-space: pre-wrap;"></p>                  
                </div>
              </div>
            </div>
          </div>

          <div class="col s4">
            <h5>Example Problem:</h5>
            <img src="/static/img/example-problem.png" class="responsive-img">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

{{ if .Data.simulation.KeyName }}
  <div class="main-container simulator-container">
    {{ template "commentsFrag" . }}
  </div>
{{ end }}
{{ end }}

{'fraction_non_alphanumeric': 0.1729741063004508, 'fraction_numerical': 0.00796729216899046, 'mean_word_length': 1.6640603183468305, 'pattern_counts': {'":': 0, '<': 253, '<?xml version=': 0, '>': 253, 'https://': 2, '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': '1859986', 'n_tokens_mistral': 2890, 'n_tokens_neox': 2755, 'n_words': 491}