<commit_before>/*global define, moment, console*/
(function () {
	'use strict';

	define(['app/split', 'app/model', 'app/util', 'mustache',
		'text!app/templates/form.html', 'text!app/templates/bill-row.html',
		'text!app/templates/person-row.html', 'text!app/templates/result.html',
		'jquery', 'jquery.validate', 'jquery.cookie', 'jquery-ui', 'domReady!',
		'bootstrap-datepicker'],
		function (split, model, util, Mustache, formTemplateSrc, billRowSrc,
			personRowSrc, resultSrc, $) {

			var	peopleCount = 0,
				billCount = 0,
				formTmpl = Mustache.render(formTemplateSrc),
				removable,
				calculate,
				initializeDatepicker,
				results,
				// The two array below are declared here instead of inside
				// calculate() in order to make it easy to save to cookies
				people = [],
				bills = [];

			removable = function (count) {
				return (count !== 1);
			};

			// Quick and dirty way to scroll to an element.
			// Code from http://stackoverflow.com/questions/500336/how-to-scroll-to-an-element-in-jquery
			$.fn.extend({
				scrollToMe: function () {
				    var x = $(this).offset().top - 100;
				    $('html,body').animate({scrollTop: x}, 500);
				}
			});

			/**
			 * Start the calculations!<commit_msg>Fix cookie not setting expiration<commit_after>/*global define, moment, console*/
(function () {
	'use strict';

	define(['app/split', 'app/model', 'app/util', 'mustache',
		'text!app/templates/form.html', 'text!app/templates/bill-row.html',
		'text!app/templates/person-row.html', 'text!app/templates/result.html',
		'jquery', 'jquery.validate', 'jquery.cookie', 'jquery-ui', 'domReady!',
		'bootstrap-datepicker'],
		function (split, model, util, Mustache, formTemplateSrc, billRowSrc,
			personRowSrc, resultSrc, $) {

			var	peopleCount = 0,
				billCount = 0,
				formTmpl = Mustache.render(formTemplateSrc),
				removable,
				calculate,
				initializeDatepicker,
				results,
				// The two array below are declared here instead of inside
				// calculate() in order to make it easy to save to cookies
				people = [],
				bills = [];

			removable = function (count) {
				return (count !== 1);
			};

			// Quick and dirty way to scroll to an element.
			// Code from http://stackoverflow.com/questions/500336/how-to-scroll-to-an-element-in-jquery
			$.fn.extend({
				scrollToMe: function () {
				    var x = $(this).offset().top - 100;
				    $('html,body').animate({scrollTop: x}, 500);
				}
			});
			// Set up the cookie expiration date
			$.cookie.defaults.expires = 365;

			/**
			 * Start the calculations!
{'fraction_non_alphanumeric': 0.15871774824081314, 'fraction_numerical': 0.012900703674745896, 'mean_word_length': 3.222772277227723, 'pattern_counts': {'":': 0, '<': 3, '<?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': '189241', 'n_tokens_mistral': 1001, 'n_tokens_neox': 797, 'n_words': 201}