<commit_before>var alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');

var columnDefs = [];

var checkboxSelectionColumn = {checkboxSelection: true, headerName: '', width: 24};
columnDefs.push(checkboxSelectionColumn);

alphabet.forEach( function(letter) {
    columnDefs.push({headerName: letter.toUpperCase(), field: letter, width: 80});
});

var gridOptions = {
    enableColResize: true,
    debug: true,
    columnDefs: columnDefs,
    rowModelType: 'virtual',
    rowSelection: 'multiple',
    maxPagesInCache: 2,
    suppressRowClickSelection: true,
    getRowNodeId: function(item) {
        return item.a;
    },
    datasource: new MyDatasource(100)
};

function MyDatasource(rowCount) {
    this.rowCount = rowCount;
}

MyDatasource.prototype.getRows = function(params) {

    var rowsThisPage = [];

    for (var rowIndex = params.startRow; rowIndex < params.endRow; rowIndex++) {
        var record = {};
        alphabet.forEach( function(letter, colIndex) {
            var randomNumber = 17+rowIndex+colIndex;
            var cellKey = letter.toUpperCase() + (rowIndex+1);
            record[letter] = cellKey + ' = ' + randomNumber;
        });
        rowsThisPage.push(record);
    }

    // no need to pass the second 'rowCount' parameter as we have already provided it
    params.successCallback(rowsThisPage);
};

document.addEventListener('DOMContentLoaded', function() {
    var gridDiv = document.querySelector('#myGrid');
    new agGrid.Grid(gridDiv, gridOptions);
});<commit_msg>added checkbox selection to one of the infinite scrolling examples<commit_after>var alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');

var columnDefs = [];

var checkboxSelectionColumn = {checkboxSelection: true, headerName: '', width: 24};
columnDefs.push(checkboxSelectionColumn);

alphabet.forEach( function(letter) {
    columnDefs.push({headerName: letter.toUpperCase(), field: letter, width: 80});
});

var gridOptions = {
    enableColResize: true,
    debug: true,
    columnDefs: columnDefs,
    rowModelType: 'virtual',
    rowSelection: 'multiple',
    maxPagesInCache: 2,
    suppressRowClickSelection: true,
    getRowNodeId: function(item) {
        return item.a;
    },
    datasource: new MyDatasource(100)
};

function MyDatasource(rowCount) {
    this.rowCount = rowCount;
}

MyDatasource.prototype.getRows = function(params) {

    var rowsThisPage = [];

    for (var rowIndex = params.startRow; rowIndex < params.endRow; rowIndex++) {
        var record = {};
        alphabet.forEach( function(letter, colIndex) {
            var randomNumber = 17+rowIndex+colIndex;
            var cellKey = letter.toUpperCase() + (rowIndex+1);
            record[letter] = cellKey + ' = ' + randomNumber;
        });
        rowsThisPage.push(record);
    }

    // to mimic server call, we reply after a short delay
    setTimeout( function() {
        // no need to pass the second 'rowCount' parameter as we have already provided it
        params.successCallback(rowsThisPage);
    }, 500);

};

document.addEventListener('DOMContentLoaded', function() {
    var gridDiv = document.querySelector('#myGrid');
    new agGrid.Grid(gridDiv, gridOptions);
});
{'fraction_non_alphanumeric': 0.1219281663516068, 'fraction_numerical': 0.007876496534341524, 'mean_word_length': 3.6081277213352685, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3021006', 'n_tokens_mistral': 969, 'n_tokens_neox': 935, 'n_words': 218}