<commit_before>﻿/// <reference path="//Microsoft.WinJS.1.0/js/ui.js" />
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="../../js/ocho.js" />
/// <reference path="///Microsoft.WinJS.1.0/js/wl.js" />
/// <reference path="/js/default.js" />

(function () {
    "use strict";
    var element, options;
    var demosListView;
    var adTimer;
    var AD_REFRESH_RATE = 32;
    WinJS.UI.Pages.define("/pages/home/home.html", {
        ready: function (e, o) {
            element = e;
            options = o;
            demosListView = q("#demosListView", element).winControl;
            this.bindList();
            this.layoutList();
            this.applySettings();
            WinJS.Namespace.define("codeSHOW.Pages.Home", {
                applySettings: this.applySettings //allow the settings pane to call this to change the tile color
            });
            Windows.ApplicationModel.Search.SearchPane.getForCurrentView().showOnKeyboardInput = true;
            adTimer = setInterval(this._refreshAd, AD_REFRESH_RATE * 1000);

        },
        _refreshAd: function () {
            //refresh ad
            if (q(".adTile") && q(".adTile").winControl) {
                var ad = q(".adTile").winControl;
                ad.refresh();
            }
            
            setInterval(this._refreshAd, AD_REFRESH_RATE * 1000);
        },
        unload: function () {
            app.sessionState.homeScrollPosition = demosListView.scrollPosition;
            q("#appbar").winControl.sticky = false;<commit_msg>add comment about ad refresh<commit_after>﻿/// <reference path="//Microsoft.WinJS.1.0/js/ui.js" />
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="../../js/ocho.js" />
/// <reference path="///Microsoft.WinJS.1.0/js/wl.js" />
/// <reference path="/js/default.js" />

(function () {
    "use strict";
    var element, options;
    var demosListView;
    var adTimer;
    var AD_REFRESH_RATE = 32; //refresh every 32 seconds seems to be better than 30
    WinJS.UI.Pages.define("/pages/home/home.html", {
        ready: function (e, o) {
            element = e;
            options = o;
            demosListView = q("#demosListView", element).winControl;
            this.bindList();
            this.layoutList();
            this.applySettings();
            WinJS.Namespace.define("codeSHOW.Pages.Home", {
                applySettings: this.applySettings //allow the settings pane to call this to change the tile color
            });
            Windows.ApplicationModel.Search.SearchPane.getForCurrentView().showOnKeyboardInput = true;
            adTimer = setInterval(this._refreshAd, AD_REFRESH_RATE * 1000);

        },
        _refreshAd: function () {
            //refresh ad
            if (q(".adTile") && q(".adTile").winControl) {
                var ad = q(".adTile").winControl;
                ad.refresh();
            }
            
            setInterval(this._refreshAd, AD_REFRESH_RATE * 1000);
        },
        unload: function () {
            app.sessionState.homeScrollPosition = demosListView.scrollPosition;
            q("#appbar").winControl.sticky = false;
{'fraction_non_alphanumeric': 0.14856783128737802, 'fraction_numerical': 0.0113314447592068, 'mean_word_length': 1.9673202614379084, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4524088', 'n_tokens_mistral': 946, 'n_tokens_neox': 904, 'n_words': 173}