<commit_before>var resultDiv;

document.addEventListener("deviceready", init, false);
function init() {
    document.querySelector("#startScan").addEventListener("touchend", startScan, false);
    resultDiv = document.querySelector("#results");
}
function save_code2(){
    var sid = document.getElementById("results").innerHTML;
      //alert(res); 
      //var sid = document.getElementById("StudentID").value;
       var tid = localStorage.teacher_id;
       alert(sid);
       alert(tid);
        $.ajax({
          url: 'http://192.168.200.107/github/qrcscanner/home/updateattendance',
          type: 'POST',
          data: {id_number: sid,teacher_id:tid},
          success: function(response) {
                          alert(response);
          }
            });
      
}
function save_code(){

  //save


  /*
<commit_msg>a<commit_after>var resultDiv;

document.addEventListener("deviceready", init, false);
function init() {
    document.querySelector("#startScan").addEventListener("touchend", startScan, false);
    resultDiv = document.querySelector("#results");
}
function save_code2(){
        var sid = document.getElementById("results").innerHTML;
        var tid = localStorage.teacher_id;
        //alert(sid);
        //alert(tid);
        $.ajax({
          url: 'http://192.168.200.107/github/qrcscanner/home/updateattendance',
          type: 'POST',
          data: {id_number: sid,teacher_id:tid},
          success: function(response) {
                          alert(response);
                            alert(id_number);
        }
    });
    var modalbutton1=document.getElementById("close");
  modalbutton1.click();
  startScan();
      
}
function save_code(){

  //save


  /*

{'fraction_non_alphanumeric': 0.1445221445221445, 'fraction_numerical': 0.016317016317016316, 'mean_word_length': 2.511247443762781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6361644', 'n_tokens_mistral': 501, 'n_tokens_neox': 479, 'n_words': 81}