text:
function addAnItem(source, tag) {
    // si il n'y a pas de tag définie mettre __name__ par default
    tag = tag || "__name__";
    var regpat = new RegExp(tag, "gi")
    //    alert($(source).prevAll("div").first().prop("id"));
    // this function will add an item to a collection from a data-prototype as created by symfony 2's form with option allow_add and data-prototype set to true
    // It will use the length of the child in the data-prototype div, or, the length of all the childs of all the div with the data-join-class class.
    // This is to allow use to create many forms for a single type of relationship in a table inheritance situtation
    // -------------
    // #TODO : will have to redo the numbering, take into considaration that delete will remove some numbers in the so we can end up with 2 ..._2 if ..._1 was deleted <--- FIX PLZ
    tag = tag || "__name__";
    var regpat = new RegExp(tag, "gi")
    newnode = document.createElement("div");

    next_id = $("div").filter(function() {
        return this.id.match('^' + source + '[_][0-9]*$');
    }).length;
    newnode.innerHTML = $("#" + source).attr('data-prototype').replace(regpat, next_id);
    //     mets le selected sur l'option selon l'index du select pour mettre l' option en anglais plus nescessaire normalement à été corrigé dans translation.html.twig
//    $(newnode.firstChild).find("select[id$='trans_lang']").each(function(index, element) {
//        $(element).find("option:eq(" + index + ")").attr("selected", "selected");
//    });

    var ajouter = document.getElementById(source).appendChild(newnode.firstChild);

    // puts the ckeditor where it is needed, really it reloads for all ckeditor class under (ajouter)
    addCkEditorTo(ajouter);

    // clicker les nav langue pour afficher les bonne traductions, Sinon par défaut lors de l'ajout le nouveau item apparait en français'
    $(".nav").filter(".lang").find(".active").click();
}

function addHtmlContent(source, tag, cible) {
    // si il n'y a pas de tag définie mettre __name__ par default
    tag = tag || "__name__";
    var regpat = new RegExp(tag, "gi")
    newnode = document.createElement("div");

    next_id = $("div").filter(function() {
        return this.id.match('^' + source + '[_][0-9]*$');
    }).length;
    newnode.innerHTML = $("#" + source).attr('data-prototype').replace(regpat, next_id);
    //     mets le selected sur l'option selon l'index du select pour mettre l' option en anglais plus nescessaire normalement à été corrigé dans translation.html.twig

    var ajouter = document.getElementById(cible).appendChild(newnode.firstChild);
    $(ajouter).find("input[id$='area']").attr("value", cible);

    // puts the ckeditor where it is needed, really it reloads for all ckeditor class under (ajouter)
    addCkEditorTo(ajouter);

    // clicker les nav langue pour afficher les bonne traductions, Sinon par défaut lors de l'ajout le nouveau item apparait en français'
    $(".nav").filter(".lang").find(".active").click();
}
/*
 function addAnEntreprise(source){
 //    alert($(source).prevAll("div").first().prop("id"));
 // this function will add an item to a collection from a data-prototype as created by symfony 2's form with option allow_add and data-prototype set to true
 // It will use the length of the child in the data-prototype div, or, the length of all the childs of all the div with the data-join-class class.
 // This is to allow use to create many forms for a single type of relationship in a table inheritance situtation
 // -------------
 // #TODO : will have to redo the numbering, take into considaration that delete will remove some numbers in the so we can end up with 2 ..._2 if ..._1 was deleted <--- FIX PLZ
 newnode = document.createElement("div");
 //    next_id = $("#"+source).attr('data-join-class')?$("."+$("#"+source).attr('data-join-class')).children().length:$("#"+source).children().length;
 next_id = ($("#"+source).children("div:last").children().children().attr("id") == undefined)? 0 : parseInt($("#"+source).children("div:last").children().children().attr("id").match(/\d+\.?\d*$/g)) + 1;
 newnode.innerHTML =$("#"+source).attr('data-prototype').replace(/__name__/gi, next_id);
 //     mets le selected sur l'option selon l'index du select pour mettre l' option en anglais
 $(newnode.firstChild).find("select").each(function(index , element){
 $(element).find("option:eq("+index+")").attr("selected", "selected");
 });
 //    hides all the translations but the first one
 $(newnode.firstChild).find(".nav div.inside").children().each(function(index , element){
 if(index!==0)$(element).addClass("hidden");
 });
 document.getElementById(source).appendChild(newnode.firstChild);
 }
 */
function showFormElementClass(tab) {
//    alert($(tab).attr("data-formname"));
//    $("div[id^=" + $(tab).attr("data-formname")+"]").children("div.trans").hide();
//    $("div[id^=" + $(tab).attr("data-formname") + "]").each(function() {
//        alert($(this).html());
//    });
    $("div[id^=" + $(tab).attr("data-formname") + "]").filter("[id*='translations_']").filter(".trans_div").hide();
    $("div[id^=" + $(tab).attr("data-formname") + "]").filter("[id$='translations_" + $(tab).attr("data-langindex") + "']").filter(".trans_div").show();
    $(tab).siblings("li").removeClass("active");
    //$("." + $(tab).attr("rel")).show();
    $(tab).addClass("active");
}

//function showFormElement(tab) {
////    $("#" + $(tab).attr("rel")).siblings().hide();
////    $(tab).siblings("li").removeClass("active");
//    $(".trans").hide();
//    $("." + $(tab).attr("rel")).show();
//    $("#" + $(tab).attr("rel")).show();
////    $(tab).addClass("active");
//}

function ajaxLogin(form, data) {

    var login_infos = '_password=' + form.password.value + '&_username=' + form.username.value + '&_csrf_token=' + form._token.value;
    $.ajax({
        url: form.action,
        cache: false,
        type: "post",
        data: login_infos,
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "NotLoggedIn") {
                $("#login_div").html(obj.render);
            } else if (obj.message == "IsLoggedIn") {
                $("#user-greeter").hide();
                $("#user-greeter").html(obj.render).fadeIn("slow");

                $(form).parentsUntil('.container').fadeOut("slow");
                $("a.signin").remove();
                $("#monespace").removeAttr('onclick');
            }
        }
    });
    return false;
}

function ajaxRegister(form, data) {
    var register_infos = $(form).serialize();
    $.ajax({
        url: form.action,
        cache: false,
        type: "post",
        data: register_infos,
        datatype: "json",
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "NotRegistered") {
                $("#register_div").html(obj.render);
            } else if (obj.message == "IsRegistered") {
                $("#signin_menu").html(obj.render);
                //                $("#user-greeter").hide();
                //                $("#user-greeter").html(obj.render).fadeIn("slow");

                //                $(form).parentsUntil('.container').fadeOut("slow");
                //                $("a.signin").remove();
                //                $("#monespace").removeAttr('onclick');
            }
        }
    });
    return false;
}
function ajaxPostRequest(form, data) {
    var reset_infos = $(form).serialize();
    $.ajax({
        url: form.action,
        cache: false,
        type: "post",
        data: reset_infos,
        datatype: "json",
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "emailNotFound") {
                $("#inside-reset-box").html(obj.render);
            } else if (obj.message == "resetSent") {
                $("#inside-reset-box").html(obj.render);
            }
        }
    });
    return false;
}

function getHiddenDateElement(picker_date) {
    return $("#" + $(picker_date).attr("id").replace("_picker", ""))
}
function getDateAsArray(date, date_format, separator) {
    values = date.split(separator);
    formats = date_format.split(separator);
    date_array = [];
    for (key in formats) {
        date_array[formats[key]] = values[key];
    }
    return date_array;
}

function setCalendar() {
    $("input.datepicker").each(function() {

        /**
         * Récupère la valeur du champs date masqué.
         * Si il y aune valeur, expl
         */
        if (date_value = getHiddenDateElement(this).val()) {
            format = $(this).attr('data-date-format').split("/");
            date_as_array = getDateAsArray(date_value, "yy-mm-dd", "-");
            $(this).attr("value", date_as_array[format[0]] + "/" + date_as_array[format[1]] + "/" + date_as_array[format[2]]);
        }

        if (!$(this).hasClass("disable-datepicker")) {
            $(this).datepicker({
                showOn: "button",
                buttonImage: "/images/calendar.png",
                dateFormat: $(this).attr('data-date-format'),
                buttonImageOnly: true,
                onSelect: function(dateText, inst) {
                    date_as_array = getDateAsArray($(this).val(), $(this).attr('data-date-format'), "/");
                    $(getHiddenDateElement(this)).attr("value", date_as_array["yy"] + "-" + date_as_array["mm"] + "-" + date_as_array["dd"]);
                }
            });
        }
    });
}

function clearDatePicker(id) {
    $('#' + id).val("");
    $('#' + id + "_picker").val("");
}

function MenuOpen(target) {
    $(target).children("ul").slideDown();
    $(target).children("ul").mouseleave(function() {
        $(this).slideUp(); //slides back up
        $(this).off("mouseleave"); // then remove the event
    });
    $(target).mouseleave(function() {
        $(this).children("ul").slideUp(); //slides back up
        $(this).off("mouseleave"); // then remove the event
    });
}

function remove_item(button) {
    if (confirm("Cette information va être définitivement supprimée lors de la sauvegarde.")) {
        $(button).parent().parent().remove();
    }
    else {
        return false;
    }
}

function toggleRH(target) {
    if ($(target).find("input[type=radio]:checked").val() == 1) {
        $(target).siblings(".rh").show("slow");
    } else {
        $(target).siblings(".rh").hide("slow");
    }
    ;
}

function toggleAnItem(source, tag, courant) {
    //    trouve si il exist déjà un element
    if ($("#" + source).children("div:last").attr("id") == undefined) {
        addAnItem(source, tag);
        $(courant).html("Adresse identique")
    } else {
        $("#" + source).children("div:last").remove();
        $(courant).html("Adresse différente")
    }
}

function showStates($id, $index) {
    $("#" + $id).find("option").hide();
    $("#" + $id).find("option." + $id + "_" + $index).show();
}
function evalItemAccordeon(item) {
    $(item).parent().siblings().find(".inside").hide("slow");
    $(item).parent().find(".inside").show("slow");
}
function showNewItem(item) {
    $("#" + item).children().find(".inside").hide("slow");
    $("#" + item).children().last().find(".inside").show("slow");
    //create the first point in ajouter jeu de points
    $("#" + item).children().last().find(".inside").find('label.btn').click();
}

function ajaxDossierUpdate(link, method, data) {
    //    il faut utiliser l'objet javascript FormData, car une simple serialization n'upload pas les fichiers
    if (data) {
        var form_data = new FormData($(data).get(0));
    }

    $.ajax({
        url: link.href,
        cache: false,
        type: method,
        data: form_data,
        datatype: "json",
        cache: false,
                contentType: false,
        processData: false,
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "success") {
                $("#dossierUpdateBox" + obj.id).html(obj.render);
                $("#dossierUpdateBox" + obj.id).dialog({
                    width: "65%",
                    modal: true
                });
            }
        }
    });
}

function ajaxDossierUpdateStatus(link, method, data) {
    //    il faut utiliser l'objet javascript FormData, car une simple serialization n'upload pas les fichiers
    if (data) {
        var form_data = new FormData($(data).get(0));
    }

    $.ajax({
        url: link.href,
        cache: false,
        type: method,
        data: form_data,
        datatype: "json",
        cache: false,
                contentType: false,
        processData: false,
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "success") {
                $("#dossierUpdateStatusBox").html(obj.render);
                $("#dossierUpdateStatusBox").dialog({
                    width: "60%",
                    modal: true
                });

                if (obj.reload) {
                    setTimeout("location.reload(true);", 3000);
                }
            }
        }
    });
}

function ajaxDossierChangeServiceState(link, method, element, service) {

    if (service === "reference") {
        link = link + "?&nb=" + parseFloat($("#website_bundle_sitebundle_dossiertype_service_" + service).children().length + $(".service_reference_child").length);
    } else {
        link = link + "?&nb=" + $("#website_bundle_sitebundle_dossiertype_service_" + service).children().length;
    }

    $.ajax({
        url: link,
        cache: false,
        type: method,
        datatype: "json",
        cache: false,
                contentType: false,
        processData: false,
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);

            if (obj.message == "success") {
                $(element).attr('class', 'btn ' + obj.state);
            } else if (obj.message == "error") {
                $(element).parent().parent().parent().find(".alert-error-service").html(obj.flash).fadeIn();
            }
        }
    });
    cancelBubble(event);
}

function ajaxChangeVisibilityDossier(link, method, element) {

    $.ajax({
        url: link,
        cache: false,
        type: method,
        datatype: "json",
        cache: false,
                contentType: false,
        processData: false,
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);

            if (obj.message == "success") {
                //   $(element).attr('class', 'btn '+obj.visibility);
                $(element).find("img").attr('src', '/images/' + obj.visibility + '.png');
            }
        }
    });
    cancelBubble(event);
}

function ajaxSearch(link, data) {
    if (data) {
        var form_data = $(data).serialize();
        // alert(data.action);
        // alert(link);
        //method = data.method;
    } else {
        // method = "GET"
    }
    $.ajax({
        url: link.href,
        cache: false,
        type: "get",
        data: form_data,
        datatype: "json",
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "success") {
                $("#searchBox").html(obj.render);
                $("#searchBox").dialog({
                    width: "80%",
                    modal: true
                });
            }
        }
    });
    return false;
}

function copycase(link) {
    //for( key in data)
    var data = {
        'lastname': $('#website_bundle_sitebundle_dossiertype_candidat_lastname').val(),
        'firstname': $('#website_bundle_sitebundle_dossiertype_candidat_firstname').val()
    };
    $.ajax({
        url: link.href,
        cache: false,
        type: "get",
        data: data,
        datatype: "json",
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "success") {
                $("#searchBox").html(obj.render);
                $("#searchBox").dialog({
                    width: "80%",
                    modal: true
                });
            }
        }
    });
    return false;
}

function ajaxToggleStatus(data) {
    var form_data = $(data).serialize();
    $.ajax({
        url: data.action,
        cache: false,
        type: data.method,
        data: form_data,
        datatype: "json",
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "success") {
                $("#searchBox").html(obj.render);
                $("#searchBox").dialog({
                    width: "80%",
                    modal: true
                });
            }
        }
    });
    return false;
}

function ajaxSelectConseiller(data, element) {
    var form_data = $(data).serialize();
    data.action = $(data).prop("action");
    $.ajax({
        url: data.action,
        cache: false,
        type: 'POST',
        data: form_data,
        datatype: "json",
        complete: function(data, status) {
            var obj = $.parseJSON(data.responseText);
            if (obj.message == "success") {
                $(element).parent().parent('.conseiller').html(obj.render);

                if (obj.reload)
                    $('#searchBox').dialog('option', 'close', function() {
                        parent.location.reload(true);
                    });
            }
        }
    });
    return false;
}

function collapse(target) {
    $(target).siblings().toggle();
    $(target).closest("table").find("tbody").toggle();
}

function getRequerant(data) {
    if ($(data).val()) {
        console.log($(data).val());
        console.log($(data).parent().attr("data-url"));
        var form_action = $(data).parent().attr("data-url");
        var form_data = $(data).serialize();
        console.log($(data).serialize());
        $.ajax({
            url: form_action,
            cache: false,
            type: "POST",
            data: form_data,
            datatype: "json",
            complete: function(data, status) {
                var obj = $.parseJSON(data.responseText);
                if (obj.message == "success") {
                    $("#requerant_box").html(obj.render);
                }
            }
        });
    } else {
        $("#requerant_box").html("");
    }
    return false;
}

function changeFormatRapport() {

    //    console.log($(select).find("input[type=radio]:checked").val());
    //    console.log($(select).val());
    //   console.log("-->"+default_rapport);

    if (!$(".report").children().children("div").size() || confirm("Êtes-vous sûre de vouloir éffacer " + $(".report").children().children("div").size() + " rapport(s).")) {
        // console.log($(".report").children().children("div").size());
        $(".report").children().children("div").remove();
        showRapportSelect();
    } else {
        $("#website_bundle_sitebundle_dossiertype_format_rapport").find("input[value=" + default_rapport + "]").prop("checked", "checked");
        return false;
    }
    return true;
}

function showRapportSelect() {
    switch ($("#website_bundle_sitebundle_dossiertype_format_rapport").find("input[type=radio]:checked").val()) {
        case "1" :
            target = $('.rep_text');
            break;
        case "2":
            target = $('.rep_point');
            break;
        case "3":
            target = $('.rep_synth');
            break;
    }
    $(".report").hide();
    $(target).show();
}

function changeServicesDemande(select) {
    var wrapper = $(select).closest('span[rel$="wrapper"]')

    if (wrapper.find("input[type=checkbox]:checked").length) {
        console.log("enable: " + wrapper.attr("rel"));
        $("#" + wrapper.attr("rel")).show();
        //enableAllIn($("#"+wrapper.attr("rel")));
    } else {
        if (!disableService(wrapper)) {
            //            remet le check si on a refuser d'éffacer les données existante'
            $(select).attr("checked", "checked");
        }
    }
}

// en fait le target est le wrapper des checkbox qui on le nom du div du service dans son attribut rel
function disableService(target) {
    //    pour disable le service on confirme avec l'usager si il y a des entrées, on enleve les instances de ckeditor, puis on enleve tout les entrées et on ferme le div du service.
    var serviceDiv = $("#" + $(target).attr("rel").substring(0, $(target).attr("rel").indexOf("_wrapper", 0))).children().first();
    var nombreElements = serviceDiv.children().length;
    if (nombreElements) {
        // ici il faudra trouver ou mettre le message.
        if (confirm("Il y a déjà des éléments(" + nombreElements + ") dans ce rapport. Si vous continuez ils seront éffacés")) {
            removeCkEditorFrom(serviceDiv);
            serviceDiv.children().remove();
        } else {
            //            retourne faux pour que l'on remette la coche sur le checkbox'
            return false;
        }
    }
    $("#" + $(target).attr("rel")).hide("slow");
    return true;
}

function addCkEditorTo(target) {
    $(target).find("textarea.ckeditor").each(function() {
        prepareEditor(this);
    });
}

function prepareEditor(editor) {
//    toolbar = ['NumberedList', 'Table'];
//    if ($(editor).hasClass("ck-criminal")) {
//        toolbar.push('TableCriminal');
//    } else if ($(editor).hasClass("ck-credit")) {
//        toolbar.push('TableCredit');
//        toolbar.push('TableRecouvrement');
//    } else if ($(editor).hasClass("ck-scolarite")) {
//        toolbar.push('TableScolarite');
//    }

    //        lang = $("#" + $(this).attr("id").replace(/text$/, "trans_lang") + " option:selected").html();
    CKEDITOR.replace(editor, {
        toolbar: [toolbar]
    });
}

function removeCkEditorFrom(target) {
    $(target).find("textarea.ckeditor").each(function() {
        // doit remove les instances de ckeditor par id
        CKEDITOR.remove(CKEDITOR.instances[$(this).attr("id")]);
    });
}

function cancelBubble(e) {
    var evt = e ? e : window.event;
    if (evt.stopPropagation)
        evt.stopPropagation();
    if (evt.cancelBubble != null)
        evt.cancelBubble = true;
}

//function ajaxSearchEnterKey(element) {
//    if (isEnterPress()) {
//        $("#search-button").click();
//        cancelKeypressEvent();
//    }
//}

//function cancelKeypressEvent() {
//    window.event.cancelBubble = true;
//    window.event.returnValue = false;
//
//    if (window.event.stopPropagation) {
//        window.event.stopPropagation();
//        window.event.preventDefault();
//    }
//}

//function isEnterPress() { // the arguments here are the event (needed to detect which key is pressed), and the name of the resulting function to run if Enter has been pressed.
//
//    var keynum; // establish variable to contain the value of the key that was pressed
//
//    // now, set that variable equal to the key that was pressed
//
//    if (window.event) // ID
//    {
//        keynum = window.event.keyCode;
//    }
//    else if (e.which) // other browsers
//    {
//        keynum = window.event.which;
//    }
//
//    if (keynum == 13) {  // if the key that was pressed was Enter (ascii code 13)
//        return true; // run the resulting function name that was specified as an argument
//    } else {
//        return false;
//    }
//}

//function uncomplete(target) {
//    if ($(target + ".done").length) {
//        confirm('Cette action va enlever le complete de ce service');
//    }
//    $(target + ".done").triggerHandler("click");
//}
function remove_item_by_id(id) {
    if (confirm("Cette information va être définitivement supprimée lors de la sauvegarde.")) {
        $("#" + id).find("div.ckeditor").find("textarea").each(
                function() {
                    CKEDITOR.instances[$(this).attr("id")].destroy();
                }
        );
        $("#" + id).remove();
    }
    else {
        return false;
    }
}

$(document).ready(setCalendar());
$(document).ready(function() {
    $('textarea.ckeditor').each(function() {
        prepareEditor(this);
    });
})

function ranking(arrow, line_element) {
    old_rank = $(arrow).closest(line_element).find("input[name$='rank']").val();

    if ($(arrow).hasClass('up')) {
        new_rank = $(arrow).closest(line_element).prev().find("input[name$='rank']").val();
        $(arrow).closest(line_element).insertBefore($(arrow).closest(line_element).prev()).next().find("input[name$='rank']").val(old_rank);
    } else {
        new_rank = $(arrow).closest(line_element).next().find("input[name$='rank']").val();
        $(arrow).closest(line_element).insertAfter($(arrow).closest('tr').next()).prev().find("input[name$='rank']").val(old_rank);
    }

    $(arrow).closest(line_element).find("input[name$='rank']").val(new_rank);
    $(arrow).closest(line_element).find("button").removeClass("hidden");
}

/**
 *
 * @param {type} element
 * @param {type} cible
 * @returns {undefined}
 *
 * La cible peut être un input ou un textarea dans ce cas la ligne pourra être:
 *
 * $(element).closest("form").find("texterea[id$='_title']").val(CKEDITOR.instances["title"].getData());
 * $(element).closest("form").find("input[id$='_title']").val(CKEDITOR.instances["title"].getData());
 */
function updateContent(element, cible) {
    $(element).closest("form").find(cible + "[id$='" + $(element).attr("id").replace("_inline", "") + "']").val($(element).html());
}

$(function() {
    $(".sortable").sortable({
        revert: true,
        update: function(event, ui) {
            ui.item.closest(".sortable").children().each(
                    function(key, value) {
                        $(this).find("input[name$='rank']").val(parseInt(key + 1));
                    }
            );
            ui.item.find("button").removeClass("hidden");
        }
    });
})


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
using Roslyn.Test.Utilities;
using System.Linq;
using System.Text;
using Xunit;

namespace Microsoft.CodeAnalysis.CSharp.UnitTests
{
    // Tests that should take a long time, perhaps even exceeding
    // test timeout, without shortcuts in overload resolution.
    public class OverloadResolutionPerfTests : CSharpTestBase
    {
        [WorkItem(13685, "https://github.com/dotnet/roslyn/issues/13685")]
        [ConditionalFactAttribute(typeof(IsRelease), typeof(NoIOperationValidation))]
        public void Overloads()
        {
            const int n = 3000;
            var builder = new StringBuilder();
            builder.AppendLine("class C");
            builder.AppendLine("{");
            builder.AppendLine($"    static void F() {{ F(null); }}"); // matches n overloads: F(C0), F(C1), ...
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"    static void F(C{i} c) {{ }}");
            }
            builder.AppendLine("}");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            comp.VerifyDiagnostics(
                // (3,23): error CS0121: The call is ambiguous between the following methods or properties: 'C.F(C0)' and 'C.F(C1)'
                //     static void F() { F(null); }
                Diagnostic(ErrorCode.ERR_AmbigCall, "F").WithArguments("C.F(C0)", "C.F(C1)").WithLocation(3, 23));
        }

        [WorkItem(13685, "https://github.com/dotnet/roslyn/issues/13685")]
        [ConditionalFactAttribute(typeof(IsRelease), typeof(NoIOperationValidation))]
        public void BinaryOperatorOverloads()
        {
            const int n = 3000;
            var builder = new StringBuilder();
            builder.AppendLine("class C");
            builder.AppendLine("{");
            builder.AppendLine($"    static object F(C x) => x + null;"); // matches n overloads: +(C, C0), +(C, C1), ...
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"    public static object operator+(C x, C{i} y) => null;");
            }
            builder.AppendLine("}");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            comp.VerifyDiagnostics(
                // (3,29): error CS0034: Operator '+' is ambiguous on operands of type 'C' and '<null>'
                //     static object F(C x) => x + null;
                Diagnostic(ErrorCode.ERR_AmbigBinaryOps, "x + null").WithArguments("+", "C", "<null>").WithLocation(3, 29));
        }

        [ConditionalFact(typeof(IsRelease))]
        public void StaticMethodsWithLambda()
        {
            const int n = 100;
            var builder = new StringBuilder();
            builder.AppendLine("using System;");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            builder.AppendLine("static class S");
            builder.AppendLine("{");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"    internal static void F(C{i} x, Action<C{i}> a) {{ F(x, y => F(y, z => F(z, w => {{ }}))); }}");
            }
            builder.AppendLine("}");
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            comp.VerifyDiagnostics();
        }

        [ConditionalFact(typeof(IsRelease))]
        public void ConstructorsWithLambdaAndParams()
        {
            const int n = 100;
            var builder = new StringBuilder();
            builder.AppendLine("using System;");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            builder.AppendLine("class C");
            builder.AppendLine("{");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"    internal static C F(C{i} x, params object[] args) => new C(x, y => F(y, args[1]), args[0]);");
                builder.AppendLine($"    internal C(C{i} x, Func<C{i}, C> f, params object[] args) {{ }}");
            }
            builder.AppendLine("}");
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            comp.VerifyDiagnostics();
        }

        [ConditionalFact(typeof(IsRelease))]
        public void ExtensionMethodsWithLambda()
        {
            const int n = 100;
            var builder = new StringBuilder();
            builder.AppendLine("using System;");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            builder.AppendLine("static class S");
            builder.AppendLine("{");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"    internal static void F(this C{i} x, Action<C{i}> a) {{ x.F(y => y.F(z => z.F(w => {{ }}))); }}");
            }
            builder.AppendLine("}");
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            comp.VerifyDiagnostics();
        }

        [ConditionalFact(typeof(IsRelease))]
        public void ExtensionMethodsWithLambdaAndParams()
        {
            const int n = 100;
            var builder = new StringBuilder();
            builder.AppendLine("using System;");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            builder.AppendLine("static class S");
            builder.AppendLine("{");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"    internal static void F(this C{i} x, Action<C{i}> a, params object[] args) {{ x.F(y => y.F(z => z.F(w => {{ }}), args[1]), args[0]); }}");
            }
            builder.AppendLine("}");
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            comp.VerifyDiagnostics();
        }

        [ConditionalFactAttribute(typeof(IsRelease), typeof(NoIOperationValidation))]
        public void ExtensionMethodsWithLambdaAndErrors()
        {
            const int n = 200;
            var builder = new StringBuilder();
            builder.AppendLine("using System;");
            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"class C{i} {{ }}");
            }
            builder.AppendLine("static class S");
            builder.AppendLine("{");
            for (int i = 0; i < n; i++)
            {
                if (i % 2 == 0)
                {
                    builder.AppendLine($"    internal static void F(this C{i} x) {{ x.G(y => y.G(z => z.F())); }}"); // No match for x.G(...).
                }
                else
                {
                    builder.AppendLine($"    internal static void G(this C{i} x, Action<C{i}> a) {{ }}");
                }
            }
            builder.AppendLine("}");
            var source = builder.ToString();
            var comp = CreateCompilationWithMscorlib40AndSystemCore(source);
            // error CS1929: 'Ci' does not contain a definition for 'G' and the best extension method overload 'S.G(C1, Action<C1>)' requires a receiver of type 'C1'
            var diagnostics = Enumerable.Range(0, n / 2).
                Select(i => Diagnostic(ErrorCode.ERR_BadInstanceArgType, "x").WithArguments($"C{i * 2}", "G", "S.G(C1, System.Action<C1>)", "C1")).
                ToArray();
            comp.VerifyDiagnostics(diagnostics);
        }

        [Fact, WorkItem(29360, "https://github.com/dotnet/roslyn/pull/29360")]
        public void RaceConditionOnImproperlyCapturedAnalyzedArguments()
        {
            const int n = 6;
            var builder = new StringBuilder();
            builder.AppendLine("using System;");

            for (int i = 0; i < n; i++)
            {
                builder.AppendLine($"public class C{i}");
                builder.AppendLine("{");

                for (int j = 0; j < n; j++)
                {
                    builder.AppendLine($"    public string M{j}()");
                    builder.AppendLine("    {");

                    for (int k = 0; k < n; k++)
                    {
                        for (int l = 0; l < n; l++)
                        {
                            builder.AppendLine($"        Class.Method((C{k} x{k}) => x{k}.M{l});");
                        }
                    }

                    builder.AppendLine("        return null;");
                    builder.AppendLine("    }");
                }

                builder.AppendLine("}");
            }

            builder.AppendLine(@"
public static class Class
{
    public static void Method<TClass>(Func<TClass, Func<string>> method) { }
    public static void Method<TClass>(Func<TClass, Func<string, string>> method) { }
}
");
            var source = builder.ToString();
            var comp = CreateCompilation(source);
            comp.VerifyDiagnostics();
        }

        [Fact, WorkItem(35949, "https://github.com/dotnet/roslyn/issues/35949")]
        public void NotNull_Complexity()
        {
            var source = @"
#nullable enable
using System;
using System.Diagnostics.CodeAnalysis;
class C
{
    C f = null!;

    void M(C c)
    {
        c.f = c;
        c.NotNull(
            x => x.f.NotNull(
                y => y.f.NotNull(
                    z => z.f.NotNull(
                        q => q.f.NotNull(
                            w => w.f.NotNull(
                                e => e.f.NotNull(
                                    r => r.f.NotNull(
                                        _ =>
                                        {
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);
                                            """".NotNull(s => s);

                                            return """";
                                        }))))))));
    }
}

static class Ext
{
    public static V NotNull<T, V>([NotNull] this T t, Func<T, V> f) => throw null!;
}
";
            var comp = CreateCompilation(new[] { NotNullAttributeDefinition, source });
            comp.VerifyDiagnostics();
        }

        [ConditionalFactAttribute(typeof(IsRelease))]
        [WorkItem(40495, "https://github.com/dotnet/roslyn/issues/40495")]
        public void NestedLambdas_01()
        {
            var source =
@"#nullable enable
using System.Linq;
class Program
{
    static void Main()
    {
        Enumerable.Range(0, 1).Sum(a =>
            Enumerable.Range(0, 1).Sum(b =>
            Enumerable.Range(0, 1).Sum(c =>
            Enumerable.Range(0, 1).Sum(d =>
            Enumerable.Range(0, 1).Sum(e =>
            Enumerable.Range(0, 1).Sum(f =>
            Enumerable.Range(0, 1).Count(g => true)))))));
    }
}";
            var comp = CreateCompilation(source);
            comp.VerifyDiagnostics();
        }

        // Test should complete in several seconds if UnboundLambda.ReallyBind
        // uses results from _returnInferenceCache.
        [ConditionalFactAttribute(typeof(IsRelease))]
        [WorkItem(1083969, "https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1083969")]
        public void NestedLambdas_02()
        {
            var source =
@"using System.Collections.Generic;
using System.Linq;
class Program
{
    static void F(IEnumerable<int[]> x)
    {
        x.GroupBy(y => y[1]).SelectMany(x =>
        x.GroupBy(y => y[2]).SelectMany(x =>
        x.GroupBy(y => y[3]).SelectMany(x =>
        x.GroupBy(y => y[4]).SelectMany(x =>
        x.GroupBy(y => y[5]).SelectMany(x =>
        x.GroupBy(y => y[6]).SelectMany(x =>
        x.GroupBy(y => y[7]).SelectMany(x =>
        x.GroupBy(y => y[8]).SelectMany(x =>
        x.GroupBy(y => y[9]).SelectMany(x =>
        x.GroupBy(y => y[0]).SelectMany(x =>
        x.GroupBy(y => y[1]).SelectMany(x =>
        x.GroupBy(y => y[2]).SelectMany(x =>
        x.GroupBy(y => y[3]).SelectMany(x =>
        x.GroupBy(y => y[4]).SelectMany(x =>
        x.GroupBy(y => y[5]).SelectMany(x =>
        x.GroupBy(y => y[6]).SelectMany(x =>
        x.GroupBy(y => y[7]).SelectMany(x =>
        x.GroupBy(y => y[8]).SelectMany(x =>
        x.GroupBy(y => y[9]).SelectMany(x =>
        x.GroupBy(y => y[0]).Select(x => x.Average(z => z[0])))))))))))))))))))));
    }
}";
            var comp = CreateCompilation(source);
            comp.VerifyDiagnostics();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.collin.ui.menu;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Label;

import java.io.BufferedReader;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.condast.commons.authentication.core.AuthenticationEvent;
import org.condast.commons.authentication.core.IAuthenticationListener;
import org.condast.commons.authentication.core.ILoginProvider;
import org.condast.commons.messaging.http.AbstractHttpRequest;
import org.condast.commons.messaging.http.ResponseEvent;
import org.eclipse.equinox.security.auth.ILoginContext;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Text;

public class CollinComposite extends Composite {
	private static final long serialVersionUID = 1L;

	public static final String S_COLLIN = "collin";

	public static final String S_AUTHENTICATION_URL = "http://localhost:10080/collin/auth/";
	private Text textName;
	private Text textPassword;
	//public static final String S_COLLIN_URL = "http://www.condast.com:8080/collin/auth/";

	private ILoginContext module;

	public enum Requests{
		ACTIVATE,
		REGISTER,
		LOGIN,
		LOGOUT,
		UNREGISTER;

		public String getPath(){
			return S_AUTHENTICATION_URL + this.name().toLowerCase();
		}

		@Override
		public String toString() {
			String str = this.name().toLowerCase();
			return str;
		}

		public static Requests getRequest( URL url ){
			for( Requests request: values()){
				String path = url.toExternalForm();
				if( path.contains(request.toString()))
					return request;
			}
			return null;
		}
	}

	private enum Parameters{
		ID,
		NAME,
		PASSWORD,
		TOKEN;

		@Override
		public String toString() {
			return this.name().toLowerCase();
		}
	}

	private IAuthenticationListener alistener=  new IAuthenticationListener(){

		@Override
		public void notifyLoginChanged(final AuthenticationEvent event) {
			getDisplay().asyncExec( new Runnable() {

				@Override
				public void run() {
					try {
						switch( event.getEvent()) {
						case REGISTER:
						case LOGIN:
							menuButton.loggedIn( event.getUser());
							break;
						default:
							//ILoginUser user = menuButton.getData();
							//provider.logout( user.getId(), user.getToken() );
							menuButton.logOut();
							break;
						}
					}
					catch( Exception ex ) {
						ex.printStackTrace();
					}
				}
			});
		}
	};

	private ILoginProvider provider;

	private MenuButton menuButton;
	/**
	 * Create the composite.
	 * @param parent
	 * @param style
	 */
	public CollinComposite(Composite parent, int style) {
		super(parent, style);
		createComposite( parent, style );
	}

	protected void createComposite( Composite parent, int style ) {
		setLayout(new GridLayout(2, false));

		Label lblName = new Label(this, SWT.NONE);
		lblName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
		lblName.setText("Name:");

		textName = new Text(this, SWT.BORDER);
		textName.setText("TestNaam");
		textName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

		Label lblNewLabel = new Label(this, SWT.NONE);
		lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
		lblNewLabel.setText("Password");

		textPassword = new Text(this, SWT.BORDER);
		textPassword.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
		textPassword.setText("TestPassword");

		menuButton = new MenuButton(this, SWT.NONE);
		menuButton.setData( RWT.CUSTOM_VARIANT, S_COLLIN);
		menuButton.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));

		Link loginLink = new Link(this, SWT.NONE);
		loginLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		loginLink.setText("Login");
		loginLink.addSelectionListener(new SelectionAdapter() {
			private static final long serialVersionUID = 1L;

			@Override
			public void widgetSelected(SelectionEvent e) {
				WebClient client = new WebClient();
				try {
					Map<String, String> parameters = new HashMap<String, String>();
					parameters.put( Parameters.NAME.toString(), textName.getText());
					client.sendGet( Requests.LOGIN.getPath(), parameters);
				} catch (Exception e1) {
					e1.printStackTrace();
				}
			}
		});

		Link registerLink = new Link(this, SWT.NONE);
		registerLink.addSelectionListener(new SelectionAdapter() {
			private static final long serialVersionUID = 1L;

			@Override
			public void widgetSelected(SelectionEvent e) {
				try {
					WebClient client = new WebClient();
					Map<String, String> parameters = new HashMap<String, String>();
					parameters.put( Parameters.NAME.toString(), textName.getText());
					parameters.put( Parameters.PASSWORD.toString(), textPassword.getText());
					client.sendGet( Requests.REGISTER.getPath(), parameters);
				} catch (Exception e1) {
					e1.printStackTrace();
				}
			}
		});
		registerLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		registerLink.setText("Register");
	}

	public void setLoginProvider( ILoginProvider provider ) {
		this.provider = provider;
		this.provider.addAuthenticationListener(alistener);
	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}

	public void dispose() {
		this.provider.removeAuthenticationListener(alistener);
		super.dispose();
	}

	private class WebClient extends AbstractHttpRequest{

		public WebClient() {
			super();
		}

		@Override
		protected String onHandleResponse(URL url, int responsecode, BufferedReader reader) throws IOException {
			try{
				Requests request = Requests.getRequest(url);
				ResponseEvent response= new ResponseEvent( this, request.name(), reader );
				notifyListeners( response );
				return Responses.OK.name();
			}
			catch( Exception ex ){
				ex.printStackTrace();
			}
			return Responses.BAD.name();
		}

	}
}


text:
<TITLE>Review for Journal du séducteur, Le (1996)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Journal du séducteur, Le (1996)

reviewed by
Dennis Schwartz

DIARY OF A SEDUCER (director: Daniele Dubroux; cast: Chiara
Mastroianni(Claire), Melvil Poupaud (Gregoire Moreau), Hubert
Saint-Macary (Hubert Markus), Mathieu Amalric(Sebastien), Daniele
Dubroux (Anne), Jean-Pierre Leaud (Hugo), Micheline Presle (Diane),
Serge Merlin (scientist), 1995-Fr.)

The movie is very loosely adapted from Soren Kierkegaard's early
treatise on beauty, infatuation and the power of intellectual
persuasion. An old copy of the Danish philosopher's work is passed from
person to person to act as a love potion, as it turns those who possess
it into becoming irrational romantics.

The film is a romantic comedy, with the trappings for a detective story
thrown in for good measure, as murder somehow gets into the story, with
the help of all the vulnerable and oddball characters who are involved
in the romantic shenanigans going on. But the explicit sex is kept to
the minimum; instead, it uses the need to find romance as a form of
irony to point out the thin line that separates love from madness. The
film is very brutal on psychoanalysts and their pet theories. It
pretends to be supportive of philosophy and its intrinsic intellectual
powers that society has very little value for, but does not move the
film in that direction. Instead, it opts for light comedy.

Gregoire Moreau (Melvil Poupaud) is a philosophy student who looks a lot
like the young Greenwich Village Bob Dylan looked ...his diabolical aim
is to score girls, and the Diary is the perfect prop for him to do this.
We pick up the tale, when he lays his trap for Claire (Chiara
Mastroianni), a college student, who is undergoing  psychoanalysis. All
the characters in this story have some problem with understanding who
they are and what are the boundaries for their behavior. So, even if the
story tends to be implausible, it still makes sense in a nonsense sort
of way, as Claire, soon after reading the Diary, drops the virginal and
sexually ambivalent suitor Sebastien (Mathieu Amalric), who has somehow
managed to move in with her and her single mother, Anne (Daniele), who
happens to be a doctor. The chemistry is much better between Sebastien
and Anne, a match that no one can possibly believe should be taking
place, but is funny to watch as the opinionated and pushy Sebastien
operates his inane charm on the sophisticated and attractive older
woman, until she nearly makes a complete fool of herself. He does this
without having read the Diary, but is working on his own diary, which
Anne reads and is insulted but somewhat flattered by, reading the
immaturity of his statements about her that he wrote in the diary, of
how he would like to conquer her since her daughter has rejected him.

Hugo (Jean-Pierre Leaud) who seems to be reduced to playing small parts
as  weirdoes in recent films, I'm thinking of films like IRMA VEP, is
smashing in his role as the former professor of Gregoire who has gone
mad after reading the Diary, waxing on at a party about his love for the
stand-offish Diane (Micheline), who is the agoraphobic, former actress
grandmother of Gregoire. At his party, which he invited thirty guests,
he manages only to lure Claire and a late arrival and two musicians
playing music from India, who all leave after seeing how bizarre Hugo
is, waving a gun, talking about suicide if he can't have Diane, and
ranting like a lunatic.

The main focus of the story is about the developing relationship between
the nice girl Claire and the stealth, quiet-spoken Gregoire. Claire,
dependent on her all-knowing shrink, Hubert (Hubert), for answers,
naturally she tells him about the Diary, Gregoire, and the corpse she
found in the refrigerator of his apartment. The shrink reads the Diary
and falls madly in love with Claire, losing hold of himself and
endangering his marriage, this is in contrast to his previously superior
rational couch-side manner he had when doing a therapy session. He is
now in need of a shrink, himself.

With all these characters and precarious situations abounding, the movie
still had a flatness to it, though, admittedly, in some spots the
craziness of the characters was hilarious. The flatness is derived from
some spark that is missing from the film. As for me, I wasn't taken with
the main character, Gregoire, and therefore, had little interest in his
strange love affair and his affixation with magic. The story itself was
weakened by its not being developed further. It seemed to be thrown
together as if it were a series of comedy skits. The film did have a
good sense of tongue-in-cheek humor, keeping it lighthearted. But for a
film about a book a great philosopher wrote, not to be thoughtful, is in
my humble opinion, only an example of a filmmaker trying so hard to be
devilish but succeeding only in becoming vulgar in a Philistine way.

REVIEWED ON 2/21/99                                         GRADE: C

Dennis Schwartz: "Movie Reviews"

ozus@sover.net
 [Image]

http://www.sover.net/~ozus

© ALL RIGHTS RESERVED   DENNIS SCHWARTZ

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
package io.reist.dali.drawables;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import io.reist.dali.ScaleMode;

public class CircleFadingDaliDrawable extends FadingDaliDrawable {

    public CircleFadingDaliDrawable(
            @Nullable Bitmap bitmap,
            @NonNull ScaleMode scaleMode,
            float targetWidth,
            float targetHeight,
            @Nullable Drawable placeholder,
            @Nullable Bitmap placeholderBitmap,
            boolean noFade
    ) {
        super(bitmap, scaleMode, targetWidth, targetHeight, placeholder, placeholderBitmap, noFade);
    }

    @Override
    protected void drawBitmap(@NonNull Canvas canvas, RectF dst, Paint paint) {
        float radius = Math.min(targetWidth, targetHeight) / 2;
        canvas.drawCircle(
                dst.centerX(),
                dst.centerY(),
                radius,
                paint
        );
    }

    @Override
    protected void drawPlaceholder(@NonNull Canvas canvas, RectF dst, Paint paint) {
        float radius = Math.min(targetWidth, targetHeight) / 2;
        canvas.drawCircle(
                dst.centerX(),
                dst.centerY(),
                radius,
                paint
        );
    }

}


text:
package com.inet.lib.less;

/**
 * Container for formatted CSS result.
 */
abstract class CssOutput {

    /**
     * Write the this output to the target
     * @param target the target
     * @param lessExtends all extends in the less
     * @param formatter a formatter
     */
    abstract void appendTo( StringBuilder target, LessExtendMap lessExtends, CssFormatter formatter );

    /**
     * If this output has content
     *
     * @param lessExtends
     *            current extends container
     * @return true, if there is content
     */
    abstract boolean hasContent( LessExtendMap lessExtends );

    /**
     * Get the selectors of this rule.
     *
     * @return the selectors
     */
    abstract String[] getSelectors();

    /**
     * Get the native output buffer
     *
     * @return the buffer
     */
    abstract StringBuilder getOutput();
}


text:
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^', include('pages.urls')),
    url(r'^blog/', include('blog.urls')),
    url(r'^admin/', admin.site.urls),
]


text:
"""Embedded-friendly SSDFeatureExtractor for MobilenetV1 features."""

import tensorflow as tf

from object_detection.models import feature_map_generators
from object_detection.models import ssd_mobilenet_v1_feature_extractor
from object_detection.utils import ops
from nets import mobilenet_v1

slim = tf.contrib.slim

class EmbeddedSSDMobileNetV1FeatureExtractor(
    ssd_mobilenet_v1_feature_extractor.SSDMobileNetV1FeatureExtractor):
  """Embedded-friendly SSD Feature Extractor using MobilenetV1 features.

  This feature extractor is similar to SSD MobileNetV1 feature extractor, and
  it fixes input resolution to be 256x256, reduces the number of feature maps
  used for box prediction and ensures convolution kernel to be no larger
  than input tensor in spatial dimensions.

  This feature extractor requires support of the following ops if used in
  embedded devices:
  - Conv
  - DepthwiseConv
  - Relu6

  All conv/depthwiseconv use SAME padding, and no additional spatial padding is
  needed.
  """

  def __init__(self,
               is_training,
               depth_multiplier,
               min_depth,
               pad_to_multiple,
               conv_hyperparams,
               batch_norm_trainable=True,
               reuse_weights=None,
               use_explicit_padding=False,
               use_depthwise=False):
    """MobileNetV1 Feature Extractor for Embedded-friendly SSD Models.

    Args:
      is_training: whether the network is in training mode.
      depth_multiplier: float depth multiplier for feature extractor.
      min_depth: minimum feature extractor depth.
      pad_to_multiple: the nearest multiple to zero pad the input height and
        width dimensions to. For EmbeddedSSD it must be set to 1.
      conv_hyperparams: tf slim arg_scope for conv2d and separable_conv2d ops.
      batch_norm_trainable:  Whether to update batch norm parameters during
        training or not. When training with a small batch size
        (e.g. 1), it is desirable to disable batch norm update and use
        pretrained batch norm params.
      reuse_weights: Whether to reuse variables. Default is None.
      use_explicit_padding: Whether to use explicit padding when extracting
        features. Default is False.
      use_depthwise: Whether to use depthwise convolutions. Default is False.

    Raises:
      ValueError: upon invalid `pad_to_multiple` values.
    """
    if pad_to_multiple != 1:
      raise ValueError('Embedded-specific SSD only supports `pad_to_multiple` '
                       'of 1.')

    super(EmbeddedSSDMobileNetV1FeatureExtractor, self).__init__(
        is_training, depth_multiplier, min_depth, pad_to_multiple,
        conv_hyperparams, batch_norm_trainable, reuse_weights,
        use_explicit_padding, use_depthwise)

  def extract_features(self, preprocessed_inputs):
    """Extract features from preprocessed inputs.

    Args:
      preprocessed_inputs: a [batch, height, width, channels] float tensor
        representing a batch of images.

    Returns:
      feature_maps: a list of tensors where the ith tensor has shape
        [batch, height_i, width_i, depth_i]

    Raises:
      ValueError: if image height or width are not 256 pixels.
    """
    image_shape = preprocessed_inputs.get_shape()
    image_shape.assert_has_rank(4)
    image_height = image_shape[1].value
    image_width = image_shape[2].value

    if image_height is None or image_width is None:
      shape_assert = tf.Assert(
          tf.logical_and(tf.equal(tf.shape(preprocessed_inputs)[1], 256),
                         tf.equal(tf.shape(preprocessed_inputs)[2], 256)),
          ['image size must be 256 in both height and width.'])
      with tf.control_dependencies([shape_assert]):
        preprocessed_inputs = tf.identity(preprocessed_inputs)
    elif image_height != 256 or image_width != 256:
      raise ValueError('image size must be = 256 in both height and width;'
                       ' image dim = %d,%d' % (image_height, image_width))

    feature_map_layout = {
        'from_layer': [
            'Conv2d_11_pointwise', 'Conv2d_13_pointwise', '', '', ''
        ],
        'layer_depth': [-1, -1, 512, 256, 256],
        'conv_kernel_size': [-1, -1, 3, 3, 2],
        'use_explicit_padding': self._use_explicit_padding,
        'use_depthwise': self._use_depthwise,
    }

    with slim.arg_scope(self._conv_hyperparams):
      with slim.arg_scope([slim.batch_norm], fused=False):
        with tf.variable_scope('MobilenetV1',
                               reuse=self._reuse_weights) as scope:
          _, image_features = mobilenet_v1.mobilenet_v1_base(
              ops.pad_to_multiple(preprocessed_inputs, self._pad_to_multiple),
              final_endpoint='Conv2d_13_pointwise',
              min_depth=self._min_depth,
              depth_multiplier=self._depth_multiplier,
              scope=scope)
          feature_maps = feature_map_generators.multi_resolution_feature_maps(
              feature_map_layout=feature_map_layout,
              depth_multiplier=self._depth_multiplier,
              min_depth=self._min_depth,
              insert_1x1_conv=True,
              image_features=image_features)

    return feature_maps.values()


text:
package org.assertj.core.internal.shorts;

import static org.assertj.core.test.TestData.someInfo;

import org.assertj.core.internal.ShortsBaseTest;
import org.junit.Test;

/**
 * Tests for <code>{@link Shorts#assertIsNotPositive(AssertionInfo, Short))}</code>.
 *
 * @author Nicolas François
 */
public class Shorts_assertIsNotPositive_Test extends ShortsBaseTest {

  @Test
  public void should_succeed_since_actual_is_not_positive() {
    shorts.assertIsNotPositive(someInfo(), (short) -6);
  }

  @Test
  public void should_succeed_since_actual_is_zero() {
    shorts.assertIsNotPositive(someInfo(), (short) 0);
  }

  @Test
  public void should_fail_since_actual_is_positive() {
    thrown.expectAssertionError("Expecting:%n <6>%nto be less than or equal to:%n <0>");
    shorts.assertIsNotPositive(someInfo(), (short) 6);
  }

  @Test
  public void should_fail_since_actual_can_be_positive_according_to_custom_comparison_strategy() {
    thrown.expectAssertionError("Expecting:%n <-1>%nto be less than or equal to:%n <0> when comparing values using 'AbsValueComparator'");
    shortsWithAbsValueComparisonStrategy.assertIsNotPositive(someInfo(), (short) -1);
  }

  @Test
  public void should_fail_since_actual_is_positive_according_to_custom_comparison_strategy() {
    thrown.expectAssertionError("Expecting:%n <1>%nto be less than or equal to:%n <0> when comparing values using 'AbsValueComparator'");
    shortsWithAbsValueComparisonStrategy.assertIsNotPositive(someInfo(), (short) 1);
  }

}


text:
.class final Lcom/quizup/lib/widgets/bannerPager/BannerViewPager$if;
.super Landroid/view/GestureDetector$SimpleOnGestureListener;
.source ""

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/quizup/lib/widgets/bannerPager/BannerViewPager;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "if"
.end annotation

# instance fields
.field private synthetic ˊ:Lcom/quizup/lib/widgets/bannerPager/BannerViewPager;

# direct methods
.method constructor <init>(Lcom/quizup/lib/widgets/bannerPager/BannerViewPager;)V
    .locals 0

    .line 38
    iput-object p1, p0, Lcom/quizup/lib/widgets/bannerPager/BannerViewPager$if;->ˊ:Lcom/quizup/lib/widgets/bannerPager/BannerViewPager;

    invoke-direct {p0}, Landroid/view/GestureDetector$SimpleOnGestureListener;-><init>()V

    return-void
.end method

# virtual methods
.method public final onScroll(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z
    .locals 2

    .line 43
    iget-object v0, p0, Lcom/quizup/lib/widgets/bannerPager/BannerViewPager$if;->ˊ:Lcom/quizup/lib/widgets/bannerPager/BannerViewPager;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/quizup/lib/widgets/bannerPager/BannerViewPager;->requestDisallowInterceptTouchEvent(Z)V

    .line 44
    const/4 v0, 0x0

    return v0
.end method


text:
package edu.wpi.secrets.objects;

import edu.wpi.disco.Actor;
import edu.wpi.disco.game.*;
import edu.wpi.disco.game.actions.ExecuteTaskAction;
import edu.wpi.disco.game.gt.*;

import java.util.*;
import java.lang.Object;

/**
 * An ice block that can be on land or floating in water.
 *
 * @author Philip Hanson <phanson@wpi.edu>
 *
 */
public class IceBlock extends InteractableObject {
	private boolean inWater;
	private boolean pushed = false;
	private Area to;

	public IceBlock(GTLevel level, Area toArea, boolean inWater, boolean tooHeavy) {
		super(level);
		this.to = toArea;
		this.inWater = inWater;

		setImage(level.getImage("resources/images/IceBlock.png"));

		actions.put(0, "push");
	}

	public synchronized void pushIntoWater() {
		this.inWater = true;
		this.location.setLocation(-100, -100);
	}

	public boolean isInWater() {
		return inWater;
	}

	@Override
	public String toString() {
		return "an ice block";
	}

	@Override
	public void doAction(int index, Map<String,Object> world, NWayInteraction interaction, Actor a) {
		switch(index) {
		case 0:
			if (!pushed) {
				pushed = true;
				HashMap<String,Object> slots = new HashMap<String,Object>();
				slots.put("to", to);
				interaction.getPlayer().doAction(
						new ExecuteTaskAction(a, "urn:secrets.wpi.edu:models:IceBlocks", "PushIceBlock", slots)
						);
			}
			break;
		default:
			break;
		}
	}
}


text:
#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/GrSurfaceProxyPriv.h"

#include "include/gpu/GrContext.h"
#include "include/private/GrRecordingContext.h"
#include "src/core/SkMathPriv.h"
#include "src/core/SkMipMap.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrClip.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrGpuResourcePriv.h"
#include "src/gpu/GrOpsTask.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrStencilAttachment.h"
#include "src/gpu/GrSurfacePriv.h"
#include "src/gpu/GrTextureContext.h"
#include "src/gpu/GrTexturePriv.h"
#include "src/gpu/GrTextureRenderTargetProxy.h"

#ifdef SK_DEBUG
#include "src/gpu/GrRenderTarget.h"
#include "src/gpu/GrRenderTargetPriv.h"

static bool is_valid_lazy(const GrSurfaceDesc& desc, SkBackingFit fit) {
    // A "fully" lazy proxy's width and height are not known until instantiation time.
    // So fully lazy proxies are created with width and height < 0. Regular lazy proxies must be
    // created with positive widths and heights. The width and height are set to 0 only after a
    // failed instantiation. The former must be "approximate" fit while the latter can be either.
    return desc.fConfig != kUnknown_GrPixelConfig &&
           ((desc.fWidth < 0 && desc.fHeight < 0 && SkBackingFit::kApprox == fit) ||
            (desc.fWidth > 0 && desc.fHeight > 0));
}

static bool is_valid_non_lazy(const GrSurfaceDesc& desc) {
    return desc.fWidth > 0 && desc.fHeight > 0 && desc.fConfig != kUnknown_GrPixelConfig;
}
#endif

// Deferred version
GrSurfaceProxy::GrSurfaceProxy(const GrBackendFormat& format,
                               const GrSurfaceDesc& desc,
                               GrRenderable renderable,
                               GrSurfaceOrigin origin,
                               const GrSwizzle& textureSwizzle,
                               SkBackingFit fit,
                               SkBudgeted budgeted,
                               GrProtected isProtected,
                               GrInternalSurfaceFlags surfaceFlags,
                               UseAllocator useAllocator)
        : fSurfaceFlags(surfaceFlags)
        , fFormat(format)
        , fConfig(desc.fConfig)
        , fWidth(desc.fWidth)
        , fHeight(desc.fHeight)
        , fOrigin(origin)
        , fTextureSwizzle(textureSwizzle)
        , fFit(fit)
        , fBudgeted(budgeted)
        , fUseAllocator(useAllocator)
        , fIsProtected(isProtected)
        , fGpuMemorySize(kInvalidGpuMemorySize) {
    SkASSERT(fFormat.isValid());
    SkASSERT(is_valid_non_lazy(desc));
    if (GrPixelConfigIsCompressed(desc.fConfig)) {
        SkASSERT(renderable == GrRenderable::kNo);
        fSurfaceFlags |= GrInternalSurfaceFlags::kReadOnly;
    }
}

// Lazy-callback version
GrSurfaceProxy::GrSurfaceProxy(LazyInstantiateCallback&& callback,
                               const GrBackendFormat& format,
                               const GrSurfaceDesc& desc,
                               GrRenderable renderable,
                               GrSurfaceOrigin origin,
                               const GrSwizzle& textureSwizzle,
                               SkBackingFit fit,
                               SkBudgeted budgeted,
                               GrProtected isProtected,
                               GrInternalSurfaceFlags surfaceFlags,
                               UseAllocator useAllocator)
        : fSurfaceFlags(surfaceFlags)
        , fFormat(format)
        , fConfig(desc.fConfig)
        , fWidth(desc.fWidth)
        , fHeight(desc.fHeight)
        , fOrigin(origin)
        , fTextureSwizzle(textureSwizzle)
        , fFit(fit)
        , fBudgeted(budgeted)
        , fUseAllocator(useAllocator)
        , fLazyInstantiateCallback(std::move(callback))
        , fIsProtected(isProtected)
        , fGpuMemorySize(kInvalidGpuMemorySize) {
    SkASSERT(fFormat.isValid());
    SkASSERT(fLazyInstantiateCallback);
    SkASSERT(is_valid_lazy(desc, fit));
    if (GrPixelConfigIsCompressed(desc.fConfig)) {
        SkASSERT(renderable == GrRenderable::kNo);
        fSurfaceFlags |= GrInternalSurfaceFlags::kReadOnly;
    }
}

// Wrapped version
GrSurfaceProxy::GrSurfaceProxy(sk_sp<GrSurface> surface,
                               GrSurfaceOrigin origin,
                               const GrSwizzle& textureSwizzle,
                               SkBackingFit fit,
                               UseAllocator useAllocator)
        : fTarget(std::move(surface))
        , fSurfaceFlags(fTarget->surfacePriv().flags())
        , fFormat(fTarget->backendFormat())
        , fConfig(fTarget->config())
        , fWidth(fTarget->width())
        , fHeight(fTarget->height())
        , fOrigin(origin)
        , fTextureSwizzle(textureSwizzle)
        , fFit(fit)
        , fBudgeted(fTarget->resourcePriv().budgetedType() == GrBudgetedType::kBudgeted
                            ? SkBudgeted::kYes
                            : SkBudgeted::kNo)
        , fUseAllocator(useAllocator)
        , fUniqueID(fTarget->uniqueID())  // Note: converting from unique resource ID to a proxy ID!
        , fIsProtected(fTarget->isProtected() ? GrProtected::kYes : GrProtected::kNo)
        , fGpuMemorySize(kInvalidGpuMemorySize) {
    SkASSERT(fFormat.isValid());
}

GrSurfaceProxy::~GrSurfaceProxy() {
    // For this to be deleted the opsTask that held a ref on it (if there was one) must have been
    // deleted. Which would have cleared out this back pointer.
    SkASSERT(!fLastRenderTask);
}

bool GrSurfaceProxyPriv::AttachStencilIfNeeded(GrResourceProvider* resourceProvider,
                                               GrSurface* surface, int minStencilSampleCount) {
    if (minStencilSampleCount) {
        GrRenderTarget* rt = surface->asRenderTarget();
        if (!rt) {
            SkASSERT(0);
            return false;
        }

        if (!resourceProvider->attachStencilAttachment(rt, minStencilSampleCount)) {
            return false;
        }
    }

    return true;
}

sk_sp<GrSurface> GrSurfaceProxy::createSurfaceImpl(GrResourceProvider* resourceProvider,
                                                   int sampleCnt,
                                                   int minStencilSampleCount,
                                                   GrRenderable renderable,
                                                   GrMipMapped mipMapped) const {
    SkASSERT(mipMapped == GrMipMapped::kNo || fFit == SkBackingFit::kExact);
    SkASSERT(!this->isLazy());
    SkASSERT(!fTarget);
    GrSurfaceDesc desc;
    desc.fWidth = fWidth;
    desc.fHeight = fHeight;
    desc.fConfig = fConfig;

    sk_sp<GrSurface> surface;
    if (SkBackingFit::kApprox == fFit) {
        surface = resourceProvider->createApproxTexture(desc, fFormat, renderable, sampleCnt,
                                                        fIsProtected);
    } else {
        surface = resourceProvider->createTexture(desc, fFormat, renderable, sampleCnt, mipMapped,
                                                  fBudgeted, fIsProtected);
    }
    if (!surface) {
        return nullptr;
    }

    if (!GrSurfaceProxyPriv::AttachStencilIfNeeded(resourceProvider, surface.get(),
                                                   minStencilSampleCount)) {
        return nullptr;
    }

    return surface;
}

bool GrSurfaceProxy::canSkipResourceAllocator() const {
    if (fUseAllocator == UseAllocator::kNo) {
        // Usually an atlas or onFlush proxy
        return true;
    }

    auto peek = this->peekSurface();
    if (!peek) {
        return false;
    }
    // If this resource is already allocated and not recyclable then the resource allocator does
    // not need to do anything with it.
    return !peek->resourcePriv().getScratchKey().isValid();
}

void GrSurfaceProxy::assign(sk_sp<GrSurface> surface) {
    SkASSERT(!fTarget && surface);

    SkDEBUGCODE(this->validateSurface(surface.get());)

    fTarget = std::move(surface);

#ifdef SK_DEBUG
    if (this->asRenderTargetProxy()) {
        SkASSERT(fTarget->asRenderTarget());
        if (int minStencilSampleCount = this->asRenderTargetProxy()->numStencilSamples()) {
            auto* stencil = fTarget->asRenderTarget()->renderTargetPriv().getStencilAttachment();
            SkASSERT(stencil);
            SkASSERT(stencil->numSamples() >= minStencilSampleCount);
        }
    }

    if (kInvalidGpuMemorySize != this->getRawGpuMemorySize_debugOnly()) {
        SkASSERT(fTarget->gpuMemorySize() <= this->getRawGpuMemorySize_debugOnly());
    }
#endif
}

bool GrSurfaceProxy::instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt,
                                     int minStencilSampleCount, GrRenderable renderable,
                                     GrMipMapped mipMapped, const GrUniqueKey* uniqueKey) {
    SkASSERT(!this->isLazy());
    if (fTarget) {
        if (uniqueKey && uniqueKey->isValid()) {
            SkASSERT(fTarget->getUniqueKey().isValid() && fTarget->getUniqueKey() == *uniqueKey);
        }
        return GrSurfaceProxyPriv::AttachStencilIfNeeded(resourceProvider, fTarget.get(),
                                                         minStencilSampleCount);
    }

    sk_sp<GrSurface> surface = this->createSurfaceImpl(
            resourceProvider, sampleCnt, minStencilSampleCount, renderable, mipMapped);
    if (!surface) {
        return false;
    }

    // If there was an invalidation message pending for this key, we might have just processed it,
    // causing the key (stored on this proxy) to become invalid.
    if (uniqueKey && uniqueKey->isValid()) {
        resourceProvider->assignUniqueKeyToResource(*uniqueKey, surface.get());
    }

    this->assign(std::move(surface));

    return true;
}

void GrSurfaceProxy::deinstantiate() {
    SkASSERT(this->isInstantiated());
    fTarget = nullptr;
}

void GrSurfaceProxy::computeScratchKey(GrScratchKey* key) const {
    SkASSERT(!this->isFullyLazy());
    GrRenderable renderable = GrRenderable::kNo;
    int sampleCount = 1;
    if (const auto* rtp = this->asRenderTargetProxy()) {
        renderable = GrRenderable::kYes;
        sampleCount = rtp->numSamples();
    }

    const GrTextureProxy* tp = this->asTextureProxy();
    GrMipMapped mipMapped = GrMipMapped::kNo;
    if (tp) {
        mipMapped = tp->mipMapped();
    }

    int width = this->worstCaseWidth();
    int height = this->worstCaseHeight();

    GrTexturePriv::ComputeScratchKey(this->config(), width, height, renderable, sampleCount,
                                     mipMapped, fIsProtected, key);
}

void GrSurfaceProxy::setLastRenderTask(GrRenderTask* renderTask) {
#ifdef SK_DEBUG
    if (fLastRenderTask) {
        SkASSERT(fLastRenderTask->isClosed());
    }
#endif

    // Un-reffed
    fLastRenderTask = renderTask;
}

GrOpsTask* GrSurfaceProxy::getLastOpsTask() {
    return fLastRenderTask ? fLastRenderTask->asOpsTask() : nullptr;
}

int GrSurfaceProxy::worstCaseWidth() const {
    SkASSERT(!this->isFullyLazy());
    if (fTarget) {
        return fTarget->width();
    }

    if (SkBackingFit::kExact == fFit) {
        return fWidth;
    }
    return GrResourceProvider::MakeApprox(fWidth);
}

int GrSurfaceProxy::worstCaseHeight() const {
    SkASSERT(!this->isFullyLazy());
    if (fTarget) {
        return fTarget->height();
    }

    if (SkBackingFit::kExact == fFit) {
        return fHeight;
    }
    return GrResourceProvider::MakeApprox(fHeight);
}

#ifdef SK_DEBUG
void GrSurfaceProxy::validate(GrContext_Base* context) const {
    if (fTarget) {
        SkASSERT(fTarget->getContext() == context);
    }
}
#endif

sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrRecordingContext* context,
                                           GrSurfaceProxy* src,
                                           GrColorType srcColorType,
                                           GrMipMapped mipMapped,
                                           SkIRect srcRect,
                                           SkBackingFit fit,
                                           SkBudgeted budgeted,
                                           RectsMustMatch rectsMustMatch) {
    SkASSERT(!src->isFullyLazy());
    GrProtected isProtected = src->isProtected() ? GrProtected::kYes : GrProtected::kNo;
    int width;
    int height;

    SkIPoint dstPoint;
    if (rectsMustMatch == RectsMustMatch::kYes) {
        width = src->width();
        height = src->height();
        dstPoint = {srcRect.fLeft, srcRect.fTop};
    } else {
        width = srcRect.width();
        height = srcRect.height();
        dstPoint = {0, 0};
    }

    if (!srcRect.intersect(SkIRect::MakeWH(src->width(), src->height()))) {
        return nullptr;
    }
    auto colorType = GrPixelConfigToColorType(src->config());
    if (src->backendFormat().textureType() != GrTextureType::kExternal) {
        auto dstContext = context->priv().makeDeferredTextureContext(
                fit, width, height, colorType, kUnknown_SkAlphaType, nullptr, mipMapped,
                src->origin(), budgeted, isProtected);
        if (!dstContext) {
            return nullptr;
        }
        if (dstContext->copy(src, srcRect, dstPoint)) {
            return dstContext->asTextureProxyRef();
        }
    }
    if (src->asTextureProxy()) {
        auto dstContext = context->priv().makeDeferredRenderTargetContext(
                fit, width, height, colorType, nullptr, 1, mipMapped, src->origin(), nullptr,
                budgeted);

        if (dstContext && dstContext->blitTexture(src->asTextureProxy(), srcColorType, srcRect,
                                                  dstPoint)) {
            return dstContext->asTextureProxyRef();
        }
    }
    // Can't use backend copies or draws.
    return nullptr;
}

sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrRecordingContext* context, GrSurfaceProxy* src,
                                           GrColorType srcColorType, GrMipMapped mipMapped,
                                           SkBackingFit fit, SkBudgeted budgeted) {
    SkASSERT(!src->isFullyLazy());
    return Copy(context, src, srcColorType, mipMapped, SkIRect::MakeWH(src->width(), src->height()),
                fit, budgeted);
}

#if GR_TEST_UTILS
int32_t GrSurfaceProxy::testingOnly_getBackingRefCnt() const {
    if (fTarget) {
        return fTarget->testingOnly_getRefCnt();
    }

    return -1; // no backing GrSurface
}

GrInternalSurfaceFlags GrSurfaceProxy::testingOnly_getFlags() const {
    return fSurfaceFlags;
}
#endif

void GrSurfaceProxyPriv::exactify(bool allocatedCaseOnly) {
    SkASSERT(!fProxy->isFullyLazy());
    if (this->isExact()) {
        return;
    }

    SkASSERT(SkBackingFit::kApprox == fProxy->fFit);

    if (fProxy->fTarget) {
        // The kApprox but already instantiated case. Setting the proxy's width & height to
        // the instantiated width & height could have side-effects going forward, since we're
        // obliterating the area of interest information. This call (exactify) only used
        // when converting an SkSpecialImage to an SkImage so the proxy shouldn't be
        // used for additional draws.
        fProxy->fWidth = fProxy->fTarget->width();
        fProxy->fHeight = fProxy->fTarget->height();
        return;
    }

#ifndef SK_CRIPPLE_TEXTURE_REUSE
    // In the post-implicit-allocation world we can't convert this proxy to be exact fit
    // at this point. With explicit allocation switching this to exact will result in a
    // different allocation at flush time. With implicit allocation, allocation would occur
    // at draw time (rather than flush time) so this pathway was encountered less often (if
    // at all).
    if (allocatedCaseOnly) {
        return;
    }
#endif

    // The kApprox uninstantiated case. Making this proxy be exact should be okay.
    // It could mess things up if prior decisions were based on the approximate size.
    fProxy->fFit = SkBackingFit::kExact;
    // If fGpuMemorySize is used when caching specialImages for the image filter DAG. If it has
    // already been computed we want to leave it alone so that amount will be removed when
    // the special image goes away. If it hasn't been computed yet it might as well compute the
    // exact amount.
}

bool GrSurfaceProxyPriv::doLazyInstantiation(GrResourceProvider* resourceProvider) {
    SkASSERT(fProxy->isLazy());

    sk_sp<GrSurface> surface;
    if (fProxy->asTextureProxy() && fProxy->asTextureProxy()->getUniqueKey().isValid()) {
        // First try to reattach to a cached version if the proxy is uniquely keyed
        surface = resourceProvider->findByUniqueKey<GrSurface>(
                                                        fProxy->asTextureProxy()->getUniqueKey());
    }

    bool syncKey = true;
    bool releaseCallback = false;
    if (!surface) {
        auto result = fProxy->fLazyInstantiateCallback(resourceProvider);
        surface = std::move(result.fSurface);
        syncKey = result.fKeyMode == GrSurfaceProxy::LazyInstantiationKeyMode::kSynced;
        releaseCallback = surface && result.fReleaseCallback;
    }
    if (!surface) {
        fProxy->fWidth = 0;
        fProxy->fHeight = 0;
        return false;
    }

    if (fProxy->isFullyLazy()) {
        // This was a fully lazy proxy. We need to fill in the width & height. For partially
        // lazy proxies we must preserve the original width & height since that indicates
        // the content area.
        fProxy->fWidth = surface->width();
        fProxy->fHeight = surface->height();
    }

    SkASSERT(fProxy->fWidth <= surface->width());
    SkASSERT(fProxy->fHeight <= surface->height());

    auto rt = fProxy->asRenderTargetProxy();
    int minStencilSampleCount = rt ? rt->numSamples() : 0;

    if (!GrSurfaceProxyPriv::AttachStencilIfNeeded(
            resourceProvider, surface.get(), minStencilSampleCount)) {
        return false;
    }

    if (GrTextureProxy* texProxy = fProxy->asTextureProxy()) {
        texProxy->setTargetKeySync(syncKey);
        if (syncKey) {
            const GrUniqueKey& key = texProxy->getUniqueKey();
            if (key.isValid()) {
                if (!surface->asTexture()->getUniqueKey().isValid()) {
                    // If 'surface' is newly created, attach the unique key
                    resourceProvider->assignUniqueKeyToResource(key, surface.get());
                } else {
                    // otherwise we had better have reattached to a cached version
                    SkASSERT(surface->asTexture()->getUniqueKey() == key);
                }
            } else {
                SkASSERT(!surface->getUniqueKey().isValid());
            }
        }
    }

    this->assign(std::move(surface));
    if (releaseCallback) {
        fProxy->fLazyInstantiateCallback = nullptr;
    }

    return true;
}

#ifdef SK_DEBUG
void GrSurfaceProxy::validateSurface(const GrSurface* surface) {
    SkASSERT(surface->config() == fConfig);

    this->onValidateSurface(surface);
}
#endif


text:
package edu.csulb.android.androidscoretracker;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

import java.util.ArrayList;

public class GameDatabaseManager {

    private SQLiteDatabase db;
    private GameSessionDatabaseManager dbSession;

    private final String TABLE_NAME = "game";
    private final String COLUMN_ID = "id";
    private final String COLUMN_NAME = "name";

    public GameDatabaseManager () {
        db = DatabaseManager.getInstance().getDb();
        dbSession = new GameSessionDatabaseManager(this);
    }

    //add a game in the database
    public void addGame(Game game) {
        ContentValues values = new ContentValues();
        values.put(COLUMN_NAME, game.getName());
        db.insert(TABLE_NAME, null, values);
    }

    //Get a game from database by the name
    public Game getGame(String name) {
        Cursor res = db.rawQuery("select * from " + TABLE_NAME + " where " + COLUMN_NAME + " = '" + name + "';", null);
        res.moveToFirst();

        Game game = new Game();
        game.setId(res.getInt(res.getColumnIndex(COLUMN_ID)));
        game.setName(res.getString(res.getColumnIndex(COLUMN_NAME)));
        game.setSessions(dbSession.getAllGameSessionsFromGameId(game.getId()));
        res.close();

        return game;
    }

    //Get a game from database by the id
    public Game getGame(int id) {
        Cursor res = db.rawQuery("select * from " + TABLE_NAME + " where " + COLUMN_ID + " = " + id + ";", null);
        res.moveToFirst();

        Game game = new Game();
        game.setId(res.getInt(res.getColumnIndex(COLUMN_ID)));
        game.setName(res.getString(res.getColumnIndex(COLUMN_NAME)));
        game.setSessions(dbSession.getAllGameSessionsFromGameId(game.getId()));
        res.close();

        return game;
    }

    public int countGame() {
        Cursor res= db.rawQuery("select count(*) from " + TABLE_NAME + ";", null);
        res.moveToFirst();
        int count= res.getInt(0);
        res.close();

        return count;
    }

    public Game getLastGame() {
        Cursor res = db.rawQuery("select * from " + TABLE_NAME + " order by " + COLUMN_ID + " DESC LIMIT 1;", null);
        res.moveToFirst();

        Game game = new Game();
        game.setId(res.getInt(res.getColumnIndex(COLUMN_ID)));
        game.setName(res.getString(res.getColumnIndex(COLUMN_NAME)));
        game.setSessions(dbSession.getAllGameSessionsFromGameId(game.getId()));
        res.close();

        return game;
    }

    //Get all games from the database
    public ArrayList<Game> getAllGames() {
        ArrayList<Game> games = new ArrayList<>();

        Cursor res = db.rawQuery("select * from " + TABLE_NAME + ";", null);
        res.moveToFirst();

        while(!res.isAfterLast()){
            Game game = new Game();
            game.setId(res.getInt(res.getColumnIndex(COLUMN_ID)));
            game.setName(res.getString(res.getColumnIndex(COLUMN_NAME)));
            game.setSessions(dbSession.getAllGameSessionsFromGameId(game.getId()));
            games.add(game);
            res.moveToNext();
        }
        res.close();

        return games;
    }

    //Update a game in the database
    public void updateGame(Game game) {
        ContentValues values = new ContentValues();
        values.put(COLUMN_NAME, game.getName());
        db.update(TABLE_NAME, values, "id = ?", new String[]{Integer.toString(game.getId())});
    }

    //Delete a game from a database
    public void deleteGame(Game game) {
        db.delete(TABLE_NAME, "id = ?", new String[]{Integer.toString(game.getId())});
    }
}


text:
namespace StatePubSub
{
    public enum Gender
    {
        Female, Male
    }
}