<commit_before>﻿(function ($) {
    function guid() {
        var s4 = function() {
            return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
        };
        return (s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4());
    };

    $.dialogue = function(url, options) {
        var id = "dialogue-" + guid();
        var options = $.extend({
            position: { my: "center", at: "center", of: window },
            modal: true,
            autoResize: true,
            width: "auto",
            dialogClass: 'ui-dialogue',
            title: 'Ajax Dialog',
            data: {},
            open: function(event, ui) {
                $(this).load(url, options.data, options.complete);
            },
            close: function(event, ui) {
                $(this).remove();
            },
            complete: function(response, status, xhr) {
                /* A callback function that is executed when the request completes. */
            }
        }, options);
        var dialog = $("<div id='" + id + "' class='" + (options.dialogClass || 'ui-dialogue') + "-content' style='display:none;'></div>").appendTo('body').dialog(options);

        return dialog;
    };
}(jQuery));<commit_msg>fixed dialog position<commit_after>﻿(function ($) {
    function guid() {
        var s4 = function() {
            return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
        };
        return (s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4());
    };

    $.dialogue = function(url, options) {
        var id = "dialogue-" + guid();
        var options = $.extend({
            autoResize: true,
            width: 'auto',
            height: 'auto',
            position: { my: "center", at: "center", of: window },
            modal: true,
            dialogClass: 'ui-dialogue',
            title: 'Ajax Dialog',
            data: '',
            open: function(event, ui) {
                $(this).load(url, options.data, function(response, status, xhr) {
                    setTimeout(function() {
                        dialog.dialog('option', 'position', options.position);
                    }, 100);
                    options.complete.call($(this), response, status, xhr);
                });
            },
            close: function(event, ui) {
                $(this).remove();
            },
            complete: function(response, status, xhr) {
                /* A callback function that is executed when the request completes. */
            }
        }, options);
        var dialog = $("<div id='" + id + "' class='" + (options.dialogClass || 'ui-dialogue') + "-content' style='display:none;'></div>").appendTo('body').dialog(options);

        return dialog;
    };
}(jQuery));
{'fraction_non_alphanumeric': 0.18372423596304194, 'fraction_numerical': 0.015280739161336177, 'mean_word_length': 1.6784015223596576, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1168121', 'n_tokens_mistral': 822, 'n_tokens_neox': 788, 'n_words': 188}