<commit_before>/*global window hashProbeKA PARAMS */
(function() {
  "use strict";
  var av,           // The JSAV object
      solutionArr = [], // The (internal) array that stores the correct answer
      studentArr = [],  // A copy of the (internal) array at the start of the exercise for reset
      jsavArr;        // The array that the user manipulates (JSAV object)

  var hashLinearPPRO = {
    currentKey: null,     // the value that is inserted
    userInput: null,

    // Initialise the exercise
    initJSAV: function(arrSize) {
      var config = ODSA.UTILS.loadConfig();
console.log("PARAMS: " + PARAMS);
      var randomData = hashProbeKA.randomizeInputData(linearProbing, arrSize);

      // Get the correct solution
      solutionArr = randomData[2];
      studentArr = randomData[0];
      // store the value student needs to insert
      hashLinearPPRO.currentKey = randomData[1];

      reset();
      // Set up handler for reset button
      $("#reset").click(function() { reset(); });
    },

    // Check student's answer for correctness: User's array must match answer
    checkAnswer: function(arrSize) {
      var i;
      for (i = 0; i < arrSize; i++) {
        if (jsavArr.value(i) !== solutionArr[i]) {
          return false;
        }
      }
      return true;
    }

  };

  // Click event handler on the array
  function clickHandler(index) {
    this.value(index, hashLinearPPRO.currentKey);
    hashLinearPPRO.userInput = true;
  }
<commit_msg>Working on URL parameter example<commit_after>/*global window hashProbeKA PARAMS */
(function() {
  "use strict";
  var av,           // The JSAV object
      solutionArr = [], // The (internal) array that stores the correct answer
      studentArr = [],  // A copy of the (internal) array at the start of the exercise for reset
      jsavArr;        // The array that the user manipulates (JSAV object)

  var hashLinearPPRO = {
    currentKey: null,     // the value that is inserted
    userInput: null,

    // Initialise the exercise
    initJSAV: function(arrSize) {
      var config = ODSA.UTILS.loadConfig();
console.log("PARAMS: " + PARAMS);
// This is what I want to do:
//      var randomData = hashProbeKA.randomizeInputData(PARAMS["probe"], arrSize);
      var randomData = hashProbeKA.randomizeInputData(linearProbing, arrSize);
      // Get the correct solution
      solutionArr = randomData[2];
      studentArr = randomData[0];
      // store the value student needs to insert
      hashLinearPPRO.currentKey = randomData[1];

      reset();
      // Set up handler for reset button
      $("#reset").click(function() { reset(); });
    },

    // Check student's answer for correctness: User's array must match answer
    checkAnswer: function(arrSize) {
      var i;
      for (i = 0; i < arrSize; i++) {
        if (jsavArr.value(i) !== solutionArr[i]) {
          return false;
        }
      }
      return true;
    }

  };

  // Click event handler on the array
  function clickHandler(index) {
    this.value(index, hashLinearPPRO.currentKey);
    hashLinearPPRO.userInput = true;
  }

{'fraction_non_alphanumeric': 0.11154219204655674, 'fraction_numerical': 0.0025864856126737797, 'mean_word_length': 2.540045766590389, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1767212', 'n_tokens_mistral': 923, 'n_tokens_neox': 889, 'n_words': 285}