<commit_before> function initLoadedPage() {

    $("#hdnId").val('');
        var grid = $("#grid-sirketler").bootgrid({
            ajax: false,
            formatters: {
                "commands": function(column, row)
                {
                    return "<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.idSirket + "\"><span class=\"fa fa-pencil\"></span></button> " + 
                        "<button type=\"button\" class=\"btn btn-xs btn-default command-delete\" data-row-id=\"" + row.idSirket + "\"><span class=\"fa fa-trash-o\"></span></button>";
                }
            }
        }).on("loaded.rs.jquery.bootgrid", function()
        {
            /* Executes after data is loaded and rendered */
            grid.find(".command-edit").on("click", function(e)
            {
                var lstVeri= listTable("sirketler");
                var id=$(this).data("row-id");
                setEditRow(id);
                // $(this).bootgrid("reload");

            }).end().find(".command-delete").on("click", function(e)
            {
                var id=$(this).data("row-id");
                firebase.database().ref().child("sirketler").child(id).remove();
                initLoadedPage();
            });
        });

        firebase.database().ref('sirketler').once('value').then(function (snapshot) {

            grid.bootgrid("clear");
            var rows = [];
            snapshot.forEach(function (element) {
                var cleanelement = JSON.parse(JSON.stringify(element));
                cleanelement['id'] = rows.length + 1;
                rows.push(cleanelement);
            });
            grid.bootgrid("append", rows);
        });
    }


    function setEditRow(id){
         firebase.database().ref('/sirketler/' + id).once('value').then(function(snapshot) {
                $("#hdnId").val(snapshot.val().idSirket);
                $("#txtSirketAdi").val(snapshot.val().sirketAdi);
                $("#txtSirketAdresi").val(snapshot.val().sirketAdresi);
                $("#txtSirketTelefon").val(snapshot.val().sirketTelefon);
                $("#txtSirketSGKSicilNo").val(snapshot.val().sirketSGKSicilNo);
                $("#txtSirketIlgiliKisi").val(snapshot.val().sirketIlgiliKisi);
                $("#txtSirketTelefonCep").val(snapshot.val().sirketTelefonCep);
                $("#txtSirketEposta").val(snapshot.val().sirketEposta);
                $("#txtSirketIsyeriHekimi").val(snapshot.val().sirketIsyeriHekimi);
                $("#txtSirketIsyeriGuvenlikUzmani").val(snapshot.val().sirketIsGuvenligiUzmani);
                $('#myModal').modal('show');
            });
  // ...
}

function kaydetSirketBilgileri() {
    var d = new Date();
    var n = d.getTime()

    var sirketAdi = $("#txtSirketAdi").val();
    var idSirket = firebase.database().ref("sirketler").push().key; //sirketAdi.replace(/[^\x00-\x7F]/g, "") + n;
    
    if($("#hdnId").val()!="" && $("#hdnId").val()!=null )
    {
        idSirket=$("#hdnId").val();
    }
    var sirketAdresi = $("#txtSirketAdresi").val();
    var sirketTelefon = $("#txtSirketTelefon").val();
    var sirketSGKSicilNo = $("#txtSirketSGKSicilNo").val();
    var sirketIlgiliKisi = $("#txtSirketIlgiliKisi").val();
    var sirketTelefonCep = $("#txtSirketTelefonCep").val();
    var sirketEposta = $("#txtSirketEposta").val();
    var sirketIsyeriHekimi = $("#txtSirketIsyeriHekimi").val();
    var sirketIsGuvenligiUzmani = $("#txtSirketIsGuvenligiUzmani").val();

    //(Firma Adı, adresi, tel, SGK sicil No, İlgili Kişi, Cep, Email ve İşyeri Hekimi, İş güvenliği Uzmanı)

    var veri = {
        "idSirket": idSirket,
        "sirketAdi": sirketAdi,
        "sirketAdresi": sirketAdresi,
        "sirketTelefon": sirketTelefon,
        "sirketSGKSicilNo": sirketSGKSicilNo,
        "sirketIlgiliKisi": sirketIlgiliKisi,
        "sirketTelefonCep": sirketTelefonCep,
        "sirketEposta": sirketEposta,
        "sirketIsyeriHekimi": sirketIsyeriHekimi,
        "sirketIsGuvenligiUzmani": sirketIsGuvenligiUzmani,
        "kayitEden": firebase.auth().currentUser.uid
    }

    kaydetVeritabani("sirketler", idSirket, veri);
    initLoadedPage();
}


<commit_msg>dfdf<commit_after> function initLoadedPage() {

    $("#hdnId").val('');
        var grid = $("#grid-sirketler").bootgrid({
            ajax: false,
            formatters: {
                "commands": function(column, row)
                {
                    return "<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.idSirket + "\"><span class=\"fa fa-pencil\"></span></button> " + 
                        "<button type=\"button\" class=\"btn btn-xs btn-default command-delete\" data-row-id=\"" + row.idSirket + "\"><span class=\"fa fa-trash-o\"></span></button>";
                }
            }
        }).on("loaded.rs.jquery.bootgrid", function()
        {
            /* Executes after data is loaded and rendered */
            grid.find(".command-edit").on("click", function(e)
            {
                var lstVeri= listTable("sirketler");
                var id=$(this).data("row-id");
                setEditRow(id);
                // $(this).bootgrid("reload");

            }).end().find(".command-delete").on("click", function(e)
            {
                var id=$(this).data("row-id");
                firebase.database().ref().child("sirketler").child(id).remove();
                initLoadedPage();
            });
        });

        firebase.database().ref('sirketler').once('value').then(function (snapshot) {

            grid.bootgrid("clear");
            var rows = [];
            snapshot.forEach(function (element) {
                var cleanelement = JSON.parse(JSON.stringify(element));
                cleanelement['id'] = rows.length + 1;
                rows.push(cleanelement);
            });
            grid.bootgrid("append", rows);
        });
    }


    function setEditRow(id){
         firebase.database().ref('/sirketler/' + id).once('value').then(function(snapshot) {
                $("#hdnId").val(snapshot.val().idSirket);
                $("#txtSirketAdi").val(snapshot.val().sirketAdi);
                $("#txtSirketAdresi").val(snapshot.val().sirketAdresi);
                $("#txtSirketTelefon").val(snapshot.val().sirketTelefon);
                $("#txtSirketSGKSicilNo").val(snapshot.val().sirketSGKSicilNo);
                $("#txtSirketIlgiliKisi").val(snapshot.val().sirketIlgiliKisi);
                $("#txtSirketTelefonCep").val(snapshot.val().sirketTelefonCep);
                $("#txtSirketEposta").val(snapshot.val().sirketEposta);
                $("#txtSirketIsyeriHekimi").val(snapshot.val().sirketIsyeriHekimi);
                $("#txtSirketIsyeriGuvenlikUzmani").val(snapshot.val().sirketIsGuvenligiUzmani);
                $('#myModal').modal('show');
            });
  // ...
}

function kaydetSirketBilgileri() {
    var d = new Date();
    var n = d.getTime()

    var sirketAdi = $("#txtSirketAdi").val();
    var idSirket = firebase.database().ref("sirketler").push().key; //sirketAdi.replace(/[^\x00-\x7F]/g, "") + n;
    
    if($("#hdnId").val()!="" && $("#hdnId").val()!=null )
    {
        idSirket=$("#hdnId").val();
    }
    var sirketAdresi = $("#txtSirketAdresi").val();
    var sirketTelefon = $("#txtSirketTelefon").val();
    var sirketSGKSicilNo = $("#txtSirketSGKSicilNo").val();
    var sirketIlgiliKisi = $("#txtSirketIlgiliKisi").val();
    var sirketTelefonCep = $("#txtSirketTelefonCep").val();
    var sirketEposta = $("#txtSirketEposta").val();
    var sirketIsyeriHekimi = $("#txtSirketIsyeriHekimi").val();
    var sirketIsGuvenligiUzmani = $("#txtSirketIsGuvenligiUzmani").val();

    //(Firma Adı, adresi, tel, SGK sicil No, İlgili Kişi, Cep, Email ve İşyeri Hekimi, İş güvenliği Uzmanı)

    var veri = {
        "idSirket": idSirket,
        "sirketAdi": sirketAdi,
        "sirketAdresi": sirketAdresi,
        "sirketTelefon": sirketTelefon,
        "sirketSGKSicilNo": sirketSGKSicilNo,
        "sirketIlgiliKisi": sirketIlgiliKisi,
        "sirketTelefonCep": sirketTelefonCep,
        "sirketEposta": sirketEposta,
        "sirketIsyeriHekimi": sirketIsyeriHekimi,
        "sirketIsGuvenligiUzmani": sirketIsGuvenligiUzmani,
        "kayitEden": firebase.auth().currentUser.uid
    }

    kaydetVeritabani("sirketler", idSirket, veri);
    initLoadedPage();
    clearAllFields();
}
function clearAllFields()
{
    $("#txtSirketAdresi").val("");
    $("#txtSirketTelefon").val("");
    $("#txtSirketSGKSicilNo").val("");
    $("#txtSirketIlgiliKisi").val("");
    $("#txtSirketTelefonCep").val("");
    $("#txtSirketEposta").val("");
    $("#txtSirketIsyeriHekimi").val("");
    $("#txtSirketIsGuvenligiUzmani").val("");
}



{'fraction_non_alphanumeric': 0.18399274458678155, 'fraction_numerical': 0.0009069266523069947, 'mean_word_length': 2.4193798449612403, 'pattern_counts': {'":': 24, '<': 19, '<?xml version=': 0, '>': 19, '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': '5600781', 'n_tokens_mistral': 3077, 'n_tokens_neox': 2955, 'n_words': 371}