<commit_before>﻿// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkID=397704
// To debug code on page load in Ripple or on Android devices/emulators: launch your app, set breakpoints, 
// and then run "window.location.reload()" in the JavaScript Console.
(function () {
    "use strict";

    document.addEventListener('deviceready', onDeviceReady.bind(this), false);

    function onDeviceReady() {
        // Handle the Cordova pause and resume events
        document.addEventListener('pause', onPause.bind(this), false);
        document.addEventListener('resume', onResume.bind(this), false);

        // Initialize the Mobile Services client here.
        var client = new WindowsAzure.MobileServiceClient('https://todolist-cordova.azure-mobile.net/', 'ZPBJZlWeNQAMBTzibQiPHAHIVpeSut47'),
            todoItemTable = client.getTable('TodoItem');

        // Read current data and rebuild UI.
        // If you plan to generate complex UIs like this, consider using a JavaScript templating library.
        function refreshTodoItems() {
            $('#summary').html("Loading...");
            var query = todoItemTable;//.where({ complete: false });

            // Execute the query and then generate the array list.
            query.read().then(function (todoItems) {
                var listItems = $.map(todoItems, function (item) {
                    var listItem = $('<li>')
                        .attr('data-todoitem-id', item.id)
                        .append($('<button class="item-delete">Delete</button>'))
                        .append($('<input type="checkbox" class="item-complete">').prop('checked', item.complete))
                        .append($('<div>').append($('<input class="item-text">').val(item.text)));

                    // Only add the image if the URL exists.
                    if (item.imageUri)
                    {                      
                        listItem.append($('<img>').attr('src', item.imageUri));
                    }
                    return listItem;
                });

                $('#todo-items').empty().append(listItems).toggle(listItems.length > 0);<commit_msg>Removed service-specific info (URL and app key)<commit_after>﻿(function () {
    "use strict";

    document.addEventListener('deviceready', onDeviceReady.bind(this), false);

    function onDeviceReady() {
        // Handle the Cordova pause and resume events
        document.addEventListener('pause', onPause.bind(this), false);
        document.addEventListener('resume', onResume.bind(this), false);

        // Initialize the Mobile Services client here.
        var client = new WindowsAzure.MobileServiceClient('https://MY_MOBILE_SERVICE.azure-mobile.net/', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'),
            todoItemTable = client.getTable('TodoItem');

        // Read current data and rebuild UI.
        // If you plan to generate complex UIs like this, consider using a JavaScript templating library.
        function refreshTodoItems() {
            $('#summary').html("Loading...");
            var query = todoItemTable;//.where({ complete: false });

            // Execute the query and then generate the array list.
            query.read().then(function (todoItems) {
                var listItems = $.map(todoItems, function (item) {
                    var listItem = $('<li>')
                        .attr('data-todoitem-id', item.id)
                        .append($('<button class="item-delete">Delete</button>'))
                        .append($('<input type="checkbox" class="item-complete">').prop('checked', item.complete))
                        .append($('<div>').append($('<input class="item-text">').val(item.text)));

                    // Only add the image if the URL exists.
                    if (item.imageUri)
                    {                      
                        listItem.append($('<img>').attr('src', item.imageUri));
                    }
                    return listItem;
                });

                $('#todo-items').empty().append(listItems).toggle(listItems.length > 0);
{'fraction_non_alphanumeric': 0.13650564768084594, 'fraction_numerical': 0.002403268445085316, 'mean_word_length': 2.049084249084249, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6816821', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1015, 'n_words': 259}