text:
package main

import (
	"flag"
	"fmt"
	"io"
	"log"
	"sort"
	"strconv"
	"strings"

	"golang.org/x/text/internal/gen"
	"golang.org/x/text/internal/language"
	"golang.org/x/text/unicode/cldr"
)

var (
	test = flag.Bool("test",
		false,
		"test existing tables; can be used to compare web data with package data.")
	outputFile = flag.String("output",
		"tables.go",
		"output file for generated tables")
)

func main() {
	gen.Init()

	w := gen.NewCodeWriter()
	defer w.WriteGoFile("tables.go", "language")

	b := newBuilder(w)
	gen.WriteCLDRVersion(w)

	b.writeConstants()
	b.writeMatchData()
}

type builder struct {
	w    *gen.CodeWriter
	hw   io.Writer // MultiWriter for w and w.Hash
	data *cldr.CLDR
	supp *cldr.SupplementalData
}

func (b *builder) langIndex(s string) uint16 {
	return uint16(language.MustParseBase(s))
}

func (b *builder) regionIndex(s string) int {
	return int(language.MustParseRegion(s))
}

func (b *builder) scriptIndex(s string) int {
	return int(language.MustParseScript(s))
}

func newBuilder(w *gen.CodeWriter) *builder {
	r := gen.OpenCLDRCoreZip()
	defer r.Close()
	d := &cldr.Decoder{}
	data, err := d.DecodeZip(r)
	if err != nil {
		log.Fatal(err)
	}
	b := builder{
		w:    w,
		hw:   io.MultiWriter(w, w.Hash),
		data: data,
		supp: data.Supplemental(),
	}
	return &b
}

// writeConsts computes f(v) for all v in values and writes the results
// as constants named _v to a single constant block.
func (b *builder) writeConsts(f func(string) int, values ...string) {
	fmt.Fprintln(b.w, "const (")
	for _, v := range values {
		fmt.Fprintf(b.w, "\t_%s = %v\n", v, f(v))
	}
	fmt.Fprintln(b.w, ")")
}

// TODO: region inclusion data will probably not be use used in future matchers.

var langConsts = []string{
	"de", "en", "fr", "it", "mo", "no", "nb", "pt", "sh", "mul", "und",
}

var scriptConsts = []string{
	"Latn", "Hani", "Hans", "Hant", "Qaaa", "Qaai", "Qabx", "Zinh", "Zyyy",
	"Zzzz",
}

var regionConsts = []string{
	"001", "419", "BR", "CA", "ES", "GB", "MD", "PT", "UK", "US",
	"ZZ", "XA", "XC", "XK", // Unofficial tag for Kosovo.
}

func (b *builder) writeConstants() {
	b.writeConsts(func(s string) int { return int(b.langIndex(s)) }, langConsts...)
	b.writeConsts(b.regionIndex, regionConsts...)
	b.writeConsts(b.scriptIndex, scriptConsts...)
}

type mutualIntelligibility struct {
	want, have uint16
	distance   uint8
	oneway     bool
}

type scriptIntelligibility struct {
	wantLang, haveLang     uint16
	wantScript, haveScript uint8
	distance               uint8
	// Always oneway
}

type regionIntelligibility struct {
	lang     uint16 // compact language id
	script   uint8  // 0 means any
	group    uint8  // 0 means any; if bit 7 is set it means inverse
	distance uint8
	// Always twoway.
}

// writeMatchData writes tables with languages and scripts for which there is
// mutual intelligibility. The data is based on CLDR's languageMatching data.
// Note that we use a different algorithm than the one defined by CLDR and that
// we slightly modify the data. For example, we convert scores to confidence levels.
// We also drop all region-related data as we use a different algorithm to
// determine region equivalence.
func (b *builder) writeMatchData() {
	lm := b.supp.LanguageMatching.LanguageMatches
	cldr.MakeSlice(&lm).SelectAnyOf("type", "written_new")

	regionHierarchy := map[string][]string{}
	for _, g := range b.supp.TerritoryContainment.Group {
		regions := strings.Split(g.Contains, " ")
		regionHierarchy[g.Type] = append(regionHierarchy[g.Type], regions...)
	}
	// Regions start at 1, so the slice must be one larger than the number of
	// regions.
	regionToGroups := make([]uint8, language.NumRegions+1)

	idToIndex := map[string]uint8{}
	for i, mv := range lm[0].MatchVariable {
		if i > 6 {
			log.Fatalf("Too many groups: %d", i)
		}
		idToIndex[mv.Id] = uint8(i + 1)
		// TODO: also handle '-'
		for _, r := range strings.Split(mv.Value, "+") {
			todo := []string{r}
			for k := 0; k < len(todo); k++ {
				r := todo[k]
				regionToGroups[b.regionIndex(r)] |= 1 << uint8(i)
				todo = append(todo, regionHierarchy[r]...)
			}
		}
	}
	b.w.WriteVar("regionToGroups", regionToGroups)

	// maps language id to in- and out-of-group region.
	paradigmLocales := [][3]uint16{}
	locales := strings.Split(lm[0].ParadigmLocales[0].Locales, " ")
	for i := 0; i < len(locales); i += 2 {
		x := [3]uint16{}
		for j := 0; j < 2; j++ {
			pc := strings.SplitN(locales[i+j], "-", 2)
			x[0] = b.langIndex(pc[0])
			if len(pc) == 2 {
				x[1+j] = uint16(b.regionIndex(pc[1]))
			}
		}
		paradigmLocales = append(paradigmLocales, x)
	}
	b.w.WriteVar("paradigmLocales", paradigmLocales)

	b.w.WriteType(mutualIntelligibility{})
	b.w.WriteType(scriptIntelligibility{})
	b.w.WriteType(regionIntelligibility{})

	matchLang := []mutualIntelligibility{}
	matchScript := []scriptIntelligibility{}
	matchRegion := []regionIntelligibility{}
	// Convert the languageMatch entries in lists keyed by desired language.
	for _, m := range lm[0].LanguageMatch {
		// Different versions of CLDR use different separators.
		desired := strings.Replace(m.Desired, "-", "_", -1)
		supported := strings.Replace(m.Supported, "-", "_", -1)
		d := strings.Split(desired, "_")
		s := strings.Split(supported, "_")
		if len(d) != len(s) {
			log.Fatalf("not supported: desired=%q; supported=%q", desired, supported)
			continue
		}
		distance, _ := strconv.ParseInt(m.Distance, 10, 8)
		switch len(d) {
		case 2:
			if desired == supported && desired == "*_*" {
				continue
			}
			// language-script pair.
			matchScript = append(matchScript, scriptIntelligibility{
				wantLang:   uint16(b.langIndex(d[0])),
				haveLang:   uint16(b.langIndex(s[0])),
				wantScript: uint8(b.scriptIndex(d[1])),
				haveScript: uint8(b.scriptIndex(s[1])),
				distance:   uint8(distance),
			})
			if m.Oneway != "true" {
				matchScript = append(matchScript, scriptIntelligibility{
					wantLang:   uint16(b.langIndex(s[0])),
					haveLang:   uint16(b.langIndex(d[0])),
					wantScript: uint8(b.scriptIndex(s[1])),
					haveScript: uint8(b.scriptIndex(d[1])),
					distance:   uint8(distance),
				})
			}
		case 1:
			if desired == supported && desired == "*" {
				continue
			}
			if distance == 1 {
				// nb == no is already handled by macro mapping. Check there
				// really is only this case.
				if d[0] != "no" || s[0] != "nb" {
					log.Fatalf("unhandled equivalence %s == %s", s[0], d[0])
				}
				continue
			}
			// TODO: consider dropping oneway field and just doubling the entry.
			matchLang = append(matchLang, mutualIntelligibility{
				want:     uint16(b.langIndex(d[0])),
				have:     uint16(b.langIndex(s[0])),
				distance: uint8(distance),
				oneway:   m.Oneway == "true",
			})
		case 3:
			if desired == supported && desired == "*_*_*" {
				continue
			}
			if desired != supported {
				// This is now supported by CLDR, but only one case, which
				// should already be covered by paradigm locales. For instance,
				// test case "und, en, en-GU, en-IN, en-GB ; en-ZA ; en-GB" in
				// testdata/CLDRLocaleMatcherTest.txt tests this.
				if supported != "en_*_GB" {
					log.Fatalf("not supported: desired=%q; supported=%q", desired, supported)
				}
				continue
			}
			ri := regionIntelligibility{
				lang:     b.langIndex(d[0]),
				distance: uint8(distance),
			}
			if d[1] != "*" {
				ri.script = uint8(b.scriptIndex(d[1]))
			}
			switch {
			case d[2] == "*":
				ri.group = 0x80 // not contained in anything
			case strings.HasPrefix(d[2], "$!"):
				ri.group = 0x80
				d[2] = "$" + d[2][len("$!"):]
				fallthrough
			case strings.HasPrefix(d[2], "$"):
				ri.group |= idToIndex[d[2]]
			}
			matchRegion = append(matchRegion, ri)
		default:
			log.Fatalf("not supported: desired=%q; supported=%q", desired, supported)
		}
	}
	sort.SliceStable(matchLang, func(i, j int) bool {
		return matchLang[i].distance < matchLang[j].distance
	})
	b.w.WriteComment(`
		matchLang holds pairs of langIDs of base languages that are typically
		mutually intelligible. Each pair is associated with a confidence and
		whether the intelligibility goes one or both ways.`)
	b.w.WriteVar("matchLang", matchLang)

	b.w.WriteComment(`
		matchScript holds pairs of scriptIDs where readers of one script
		can typically also read the other. Each is associated with a confidence.`)
	sort.SliceStable(matchScript, func(i, j int) bool {
		return matchScript[i].distance < matchScript[j].distance
	})
	b.w.WriteVar("matchScript", matchScript)

	sort.SliceStable(matchRegion, func(i, j int) bool {
		return matchRegion[i].distance < matchRegion[j].distance
	})
	b.w.WriteVar("matchRegion", matchRegion)
}


text:
(function(){
    'use strict';

    angular.module('mdDataTable', ['mdtTemplates', 'ngMaterial', 'ngMdIcons']);
}());
(function(){
    'use strict';

    function mdtAlternateHeadersDirective(){
        return {
            restrict: 'E',
            templateUrl: '/main/templates/mdtAlternateHeaders.html',
            transclude: true,
            replace: true,
            scope: true,
            require: ['^mdtTable'],
            link: function($scope){
                $scope.deleteSelectedRows = deleteSelectedRows;

                function deleteSelectedRows(){
                    var deletedRows = $scope.tableDataStorageService.deleteSelectedRows();

                    $scope.deleteRowCallback({rows: deletedRows});
                }
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtAlternateHeaders', mdtAlternateHeadersDirective);
}());
(function(){
    'use strict';

    mdtTableDirective.$inject = ['TableDataStorageFactory', 'mdtPaginationHelperFactory', 'mdtAjaxPaginationHelperFactory'];
    function mdtTableDirective(TableDataStorageFactory, mdtPaginationHelperFactory, mdtAjaxPaginationHelperFactory){
        return {
            restrict: 'E',
            templateUrl: '/main/templates/mdtTable.html',
            transclude: true,
            scope: {
                tableCard: '=',
                selectableRows: '=',
                alternateHeaders: '=',
                sortableColumns: '=',
                deleteRowCallback: '&',
                animateSortIcon: '=',
                rippleEffect: '=',
                paginatedRows: '=',
                mdtRow: '=',
                mdtRowPaginator: '&?'
            },
            controller: ['$scope', function($scope){
                var vm = this;
                vm.addHeaderCell = addHeaderCell;

                initTableStorageServiceAndBindMethods();

                function initTableStorageServiceAndBindMethods(){
                    $scope.tableDataStorageService = TableDataStorageFactory.getInstance();

                    if(!$scope.mdtRowPaginator){
                        $scope.mdtPaginationHelper = mdtPaginationHelperFactory
                            .getInstance($scope.tableDataStorageService, $scope.paginatedRows, $scope.mdtRow);
                    }else{
                        $scope.mdtPaginationHelper = mdtAjaxPaginationHelperFactory
                            .getInstance($scope.tableDataStorageService, $scope.paginatedRows, $scope.mdtRowPaginator, $scope.mdtRow);
                    }

                    vm.addRowData = _.bind($scope.tableDataStorageService.addRowData, $scope.tableDataStorageService);
                }

                function addHeaderCell(ops){
                    $scope.tableDataStorageService.addHeaderCellData(ops);
                }
            }],
            link: function($scope, element, attrs, ctrl, transclude){
                injectContentIntoTemplate();

                $scope.isAnyRowSelected = _.bind($scope.tableDataStorageService.isAnyRowSelected, $scope.tableDataStorageService);
                $scope.isPaginationEnabled = isPaginationEnabled;

                if(!_.isEmpty($scope.mdtRow)) {
                    //local search/filter
                    if (angular.isUndefined(attrs.mdtRowPaginator)) {
                        $scope.$watch('mdtRow', function (mdtRow) {
                            $scope.tableDataStorageService.storage = [];

                            addRawDataToStorage(mdtRow['data']);
                        }, true);

                    }else{
                        //if it's used for 'Ajax pagination'
                    }
                }

                function addRawDataToStorage(data){
                    var rowId;
                    var columnValues = [];
                    _.each(data, function(row){
                        rowId = _.get(row, $scope.mdtRow['table-row-id-key']);
                        columnValues = [];

                        _.each($scope.mdtRow['column-keys'], function(columnKey){
                            columnValues.push(_.get(row, columnKey));
                        });

                        $scope.tableDataStorageService.addRowData(rowId, columnValues);
                    });
                }

                function isPaginationEnabled(){
                    if($scope.paginatedRows === true || ($scope.paginatedRows && $scope.paginatedRows.hasOwnProperty('isEnabled') && $scope.paginatedRows.isEnabled === true)){
                        return true;
                    }

                    return false;
                }

                function injectContentIntoTemplate(){
                    transclude(function (clone) {
                        var headings = [];
                        var body = [];

                        _.each(clone, function (child) {
                            var $child = angular.element(child);

                            if ($child.hasClass('theadTrRow')) {
                                headings.push($child);
                            } else {
                                body.push($child);
                            }
                        });

                        element.find('#reader').append(headings).append(body);
                    });
                }
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtTable', mdtTableDirective);
}());
(function(){
    'use strict';

    TableDataStorageFactory.$inject = ['$log'];
    function TableDataStorageFactory($log){

        function TableDataStorageService(){
            this.storage = [];
            this.header = [];

            this.sortByColumnLastIndex = null;
            this.orderByAscending = true;
        }

        TableDataStorageService.prototype.addHeaderCellData = function(ops){
            this.header.push(ops);
        };

        TableDataStorageService.prototype.addRowData = function(explicitRowId, rowArray){
            if(!(rowArray instanceof Array)){
                $log.error('`rowArray` parameter should be array');
                return;
            }

            this.storage.push({
                rowId: explicitRowId,
                optionList: {
                    selected: false,
                    deleted: false,
                    visible: true
                },
                data: rowArray
            });
        };

        TableDataStorageService.prototype.getRowData = function(index){
            if(!this.storage[index]){
                $log.error('row is not exists at index: '+index);
                return;
            }

            return this.storage[index].data;
        };

        TableDataStorageService.prototype.getRowOptions = function(index){
            if(!this.storage[index]){
                $log.error('row is not exists at index: '+index);
                return;
            }

            return this.storage[index].optionList;
        };

        TableDataStorageService.prototype.setAllRowsSelected = function(isSelected, isPaginationEnabled){
            if(typeof isSelected === 'undefined'){
                $log.error('`isSelected` parameter is required');
                return;
            }

            _.each(this.storage, function(rowData){
                if(isPaginationEnabled) {
                    if (rowData.optionList.visible) {
                        rowData.optionList.selected = isSelected ? true : false;
                    }
                }else{
                    rowData.optionList.selected = isSelected ? true : false;
                }
            });
        };

        TableDataStorageService.prototype.reverseRows = function(){
            this.storage.reverse();
        };

        TableDataStorageService.prototype.sortByColumn = function(columnIndex, iteratee){
            if(this.sortByColumnLastIndex === columnIndex){
                this.reverseRows();

                this.orderByAscending = !this.orderByAscending;
            }else{
                this.sortByColumnIndex(columnIndex, iteratee);

                this.sortByColumnLastIndex = columnIndex;
                this.orderByAscending = true;
            }

            return this.orderByAscending ? -1 : 1;
        };

        TableDataStorageService.prototype.sortByColumnIndex = function(index, iteratee){

            var sortFunction;
            if (typeof iteratee === 'function') {
                sortFunction = function(rowData) {
                    return iteratee(rowData.data[index], rowData, index);
                };
            } else {
                sortFunction = function (rowData) {
                    return rowData.data[index];
                };
            }

            var res = _.sortBy(this.storage, sortFunction);

            this.storage = res;
        };

        TableDataStorageService.prototype.isAnyRowSelected = function(){
            return _.some(this.storage, function(rowData){
                return rowData.optionList.selected === true && rowData.optionList.deleted === false;
            });
        };

        TableDataStorageService.prototype.getNumberOfSelectedRows = function(){
            var res = _.countBy(this.storage, function(rowData){
                return rowData.optionList.selected === true && rowData.optionList.deleted === false ? 'selected' : 'unselected';
            });

            return res.selected ? res.selected : 0;
        };

        TableDataStorageService.prototype.deleteSelectedRows = function(){
            var deletedRows = [];

            _.each(this.storage, function(rowData){
                if(rowData.optionList.selected && rowData.optionList.deleted === false){

                    if(rowData.rowId){
                        deletedRows.push(rowData.rowId);

                    //Fallback when no id was specified
                    } else{
                        deletedRows.push(rowData.data);
                    }

                    rowData.optionList.deleted = true;
                }
            });

            return deletedRows;
        };

        return {
            getInstance: function(){
                return new TableDataStorageService();
            }
        };
    }

    angular
        .module('mdDataTable')
        .factory('TableDataStorageFactory', TableDataStorageFactory);
}());
(function(){
    'use strict';

    function mdtAjaxPaginationHelperFactory(){

        function mdtAjaxPaginationHelper(tableDataStorageService, paginationSetting, mdtRowPaginatorFunction, mdtRowOptions){
            this.tableDataStorageService = tableDataStorageService;
            this.rowOptions = mdtRowOptions;

            if(paginationSetting &&
                paginationSetting.hasOwnProperty('rowsPerPageValues') &&
                paginationSetting.rowsPerPageValues.length > 0){

                this.rowsPerPageValues = paginationSetting.rowsPerPageValues;
            }else{
                this.rowsPerPageValues = [10,20,30,50,100];
            }

            this.rowsPerPage = this.rowsPerPageValues[0];
            this.page = 1;
            this.totalResultCount = 0;
            this.totalPages = 0;
            this.paginatorFunction = mdtRowPaginatorFunction;
            this.isLoading = false;

            //fetching the 1st page
            this.fetchPage(this.page);
        }

        mdtAjaxPaginationHelper.prototype.getStartRowIndex = function(){
            return (this.page-1) * this.rowsPerPage;
        };

        mdtAjaxPaginationHelper.prototype.getEndRowIndex = function(){
            return this.getStartRowIndex() + this.rowsPerPage-1;
        };

        mdtAjaxPaginationHelper.prototype.getTotalRowsCount = function(){
            return this.totalPages;
        };

        mdtAjaxPaginationHelper.prototype.getRows = function(){
            return this.tableDataStorageService.storage;
        };

        mdtAjaxPaginationHelper.prototype.previousPage = function(){
            var that = this;
            if(this.page > 1){
                this.fetchPage(this.page-1).then(function(){
                    that.page--;
                });
            }
        };

        mdtAjaxPaginationHelper.prototype.nextPage = function(){
            var that = this;
            if(this.page < this.totalPages){
                this.fetchPage(this.page+1).then(function(){
                    that.page++;
                });
            }
        };

        mdtAjaxPaginationHelper.prototype.fetchPage = function(page){
            this.isLoading = true;

            var that = this;

            return this.paginatorFunction({page: page, pageSize: this.rowsPerPage})
                .then(function(data){
                    that.tableDataStorageService.storage = [];
                    that.setRawDataToStorage(that, data.results, that.rowOptions['table-row-id-key'], that.rowOptions['column-keys']);
                    that.totalResultCount = data.totalResultCount;
                    that.totalPages = Math.ceil(data.totalResultCount / that.rowsPerPage);
                    that.isLoading = false;
                });
        };

        mdtAjaxPaginationHelper.prototype.setRawDataToStorage = function(that, data, tableRowIdKey, columnKeys){
            var rowId;
            var columnValues = [];
            _.each(data, function(row){
                rowId = _.get(row, tableRowIdKey);
                columnValues = [];

                _.each(columnKeys, function(columnKey){
                    columnValues.push(_.get(row, columnKey));
                });

                that.tableDataStorageService.addRowData(rowId, columnValues);
            });
        };

        mdtAjaxPaginationHelper.prototype.setRowsPerPage = function(rowsPerPage){
            this.rowsPerPage = rowsPerPage;
            this.page = 1;

            this.fetchPage(this.page);
        };

        return {
            getInstance: function(tableDataStorageService, isEnabled, paginatorFunction, rowOptions){
                return new mdtAjaxPaginationHelper(tableDataStorageService, isEnabled, paginatorFunction, rowOptions);
            }
        };
    }

    angular
        .module('mdDataTable')
        .service('mdtAjaxPaginationHelperFactory', mdtAjaxPaginationHelperFactory);
}());
(function(){
    'use strict';

    function mdtPaginationHelperFactory(){

        function mdtPaginationHelper(tableDataStorageService, paginationSetting){
            this.tableDataStorageService = tableDataStorageService;

            if(paginationSetting &&
                paginationSetting.hasOwnProperty('rowsPerPageValues') &&
                paginationSetting.rowsPerPageValues.length > 0){

                this.rowsPerPageValues = paginationSetting.rowsPerPageValues;
            }else{
                this.rowsPerPageValues = [10,20,30,50,100];
            }

            this.rowsPerPage = this.rowsPerPageValues[0];
            this.page = 1;
        }

        mdtPaginationHelper.prototype.calculateVisibleRows = function (){
            var that = this;

            _.each(this.tableDataStorageService.storage, function (rowData, index) {
                if(index >= that.getStartRowIndex() && index <= that.getEndRowIndex()) {
                    rowData.optionList.visible = true;
                } else {
                    rowData.optionList.visible = false;
                }
            });
        };

        mdtPaginationHelper.prototype.getStartRowIndex = function(){
            return (this.page-1) * this.rowsPerPage;
        };

        mdtPaginationHelper.prototype.getEndRowIndex = function(){
            return this.getStartRowIndex() + this.rowsPerPage-1;
        };

        mdtPaginationHelper.prototype.getTotalRowsCount = function(){
            return this.tableDataStorageService.storage.length;
        };

        mdtPaginationHelper.prototype.getRows = function(){
            this.calculateVisibleRows();

            return this.tableDataStorageService.storage;
        };

        mdtPaginationHelper.prototype.previousPage = function(){
            if(this.page > 1){
                this.page--;
            }
        };

        mdtPaginationHelper.prototype.nextPage = function(){
            var totalPages = Math.ceil(this.getTotalRowsCount() / this.rowsPerPage);

            if(this.page < totalPages){
                this.page++;
            }
        };

        mdtPaginationHelper.prototype.setRowsPerPage = function(rowsPerPage){
            this.rowsPerPage = rowsPerPage;
            this.page = 1;
        };

        return {
            getInstance: function(tableDataStorageService, isEnabled){
                return new mdtPaginationHelper(tableDataStorageService, isEnabled);
            }
        };
    }

    angular
        .module('mdDataTable')
        .service('mdtPaginationHelperFactory', mdtPaginationHelperFactory);
}());
(function(){
    'use strict';

    ColumnAlignmentHelper.$inject = ['ColumnOptionProvider'];
    function ColumnAlignmentHelper(ColumnOptionProvider){
        var service = this;
        service.getColumnAlignClass = getColumnAlignClass;

        function getColumnAlignClass(alignRule) {
            if (alignRule === ColumnOptionProvider.ALIGN_RULE.ALIGN_RIGHT) {
                return 'rightAlignedColumn';
            } else {
                return 'leftAlignedColumn';
            }
        }
    }

    angular
        .module('mdDataTable')
        .service('ColumnAlignmentHelper', ColumnAlignmentHelper);
}());
(function(){
    'use strict';

    var ColumnOptionProvider = {
        ALIGN_RULE : {
            ALIGN_LEFT: 'left',
            ALIGN_RIGHT: 'right'
        }
    };

    angular.module('mdDataTable')
        .value('ColumnOptionProvider', ColumnOptionProvider);
})();
(function(){
    'use strict';

    mdtCellDirective.$inject = ['$parse'];
    function mdtCellDirective($parse){
        return {
            restrict: 'E',
            replace: true,
            transclude: true,
            require: ['^mdtTable','^mdtRow'],
            link: function($scope, element, attr, ctrl, transclude){
                var mdtRowCtrl = ctrl[1];

                transclude(function (clone) {
                    //TODO: rework, figure out something for including html content
                    if(attr.htmlContent){
                        mdtRowCtrl.addToRowDataStorage(clone, 'htmlContent');
                    }else{
                        //TODO: better idea?
                        var cellValue = $parse(clone.html().replace('{{', '').replace('}}', ''))($scope.$parent);
                        mdtRowCtrl.addToRowDataStorage(cellValue);
                    }
                });
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtCell', mdtCellDirective);
}());
(function(){
    'use strict';

    function mdtRowDirective(){
        return {
            restrict: 'E',
            transclude: true,
            require: '^mdtTable',
            scope: {
                tableRowId: '='
            },
            controller: ['$scope', function($scope){
                var vm = this;

                vm.addToRowDataStorage = addToRowDataStorage;
                $scope.rowDataStorage = [];

                function addToRowDataStorage(value, contentType){
                    if(contentType === 'htmlContent'){
                        $scope.rowDataStorage.push({value: value, type: 'html'});
                    }else{
                        $scope.rowDataStorage.push(value);
                    }
                }
            }],
            link: function($scope, element, attrs, ctrl, transclude){
                appendColumns();

                ctrl.addRowData($scope.tableRowId, $scope.rowDataStorage);
                //ctrl.increaseIndex();

                function appendColumns(){
                    transclude(function (clone) {
                        element.append(clone);
                    });
                }
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtRow', mdtRowDirective);
}());
(function(){
    'use strict';

    function mdtColumnDirective(){
        return {
            restrict: 'E',
            transclude: true,
            replace: true,
            scope: {
                alignRule: '@',
                sortBy: '=',
                columnDefinition: '@'
            },
            require: ['^mdtTable'],
            link: function ($scope, element, attrs, ctrl, transclude) {
                var mdtTableCtrl = ctrl[0];

                transclude(function (clone) {
                    mdtTableCtrl.addHeaderCell({
                        alignRule: $scope.alignRule,
                        sortBy: $scope.sortBy,
                        columnDefinition: $scope.columnDefinition,
                        columnName: clone.html()
                    });
                });
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtColumn', mdtColumnDirective);
}());
(function(){
    'use strict';

    function mdtGeneratedHeaderCellContentDirective(){
        return {
            restrict: 'E',
            templateUrl: '/main/templates/mdtGeneratedHeaderCellContent.html',
            replace: true,
            scope: false,
            link: function(){

            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtGeneratedHeaderCellContent', mdtGeneratedHeaderCellContentDirective);
}());
(function(){
    'use strict';

    function mdtHeaderRowDirective(){
        return {
            restrict: 'E',
            replace: true,
            transclude: true,
            require: '^mdtTable',
            scope: true,
            link: function($scope, element, attrs, mdtCtrl, transclude){
                appendColumns();

                function appendColumns(){
                    transclude(function (clone) {
                        element.append(clone);
                    });
                }
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtHeaderRow', mdtHeaderRowDirective);
}());
(function(){
    'use strict';

    mdtAddAlignClass.$inject = ['ColumnAlignmentHelper'];
    function mdtAddAlignClass(ColumnAlignmentHelper){
        return {
            restrict: 'A',
            scope: {
                mdtAddAlignClass: '='
            },
            link: function($scope, element){
                var classToAdd = ColumnAlignmentHelper.getColumnAlignClass($scope.mdtAddAlignClass);

                element.addClass(classToAdd);
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtAddAlignClass', mdtAddAlignClass);
}());
(function(){
    'use strict';

    function mdtAddHtmlContentToCellDirective(){
        return {
            restrict: 'A',
            link: function($scope, element, attr){
                $scope.$watch('htmlContent', function(){
                    element.empty();
                    element.append($scope.$eval(attr.mdtAddHtmlContentToCell));
                });
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtAddHtmlContentToCell', mdtAddHtmlContentToCellDirective);
}());
(function(){
    'use strict';

    function mdtAnimateSortIconHandlerDirective(){
        return {
            restrict: 'A',
            scope: false,
            link: function($scope, element){
                if($scope.animateSortIcon){
                    element.addClass('animate-sort-icon');
                }
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtAnimateSortIconHandler', mdtAnimateSortIconHandlerDirective);
}());
(function(){
    'use strict';

    function mdtSelectAllRowsHandlerDirective(){
        return {
            restrict: 'A',
            scope: false,
            link: function($scope){
                $scope.selectAllRows = false;

                $scope.$watch('selectAllRows', function(val){
                    $scope.tableDataStorageService.setAllRowsSelected(val, $scope.isPaginationEnabled());
                });
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtSelectAllRowsHandler', mdtSelectAllRowsHandlerDirective);
}());
(function(){
    'use strict';

    function mdtSortHandlerDirective(){
        return {
            restrict: 'A',
            scope: false,
            link: function($scope, element){
                var columnIndex = $scope.$index;
                $scope.isSorted = isSorted;
                $scope.direction = 1;

                element.on('click', sortHandler);

                function sortHandler(){
                    if($scope.sortableColumns){
                        $scope.$apply(function(){
                            $scope.direction = $scope.tableDataStorageService.sortByColumn(columnIndex, $scope.headerRowData.sortBy);
                        });
                    }

                }

                function isSorted(){
                    return $scope.tableDataStorageService.sortByColumnLastIndex === columnIndex;
                }

                $scope.$on('$destroy', function(){
                    element.off('click', sortHandler);
                });
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtSortHandler', mdtSortHandlerDirective);
}());
(function(){
    'use strict';

    mdtCardFooterDirective.$inject = ['$timeout'];
    function mdtCardFooterDirective($timeout){
        return {
            restrict: 'E',
            templateUrl: '/main/templates/mdtCardFooter.html',
            transclude: true,
            replace: true,
            scope: true,
            require: ['^mdtTable'],
            link: function($scope){
                $scope.rowsPerPage = $scope.mdtPaginationHelper.rowsPerPage;

                $scope.$watch('rowsPerPage', function(newVal, oldVal){
                    $scope.mdtPaginationHelper.setRowsPerPage(newVal);
                });
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtCardFooter', mdtCardFooterDirective);
}());
(function(){
    'use strict';

    function mdtCardHeaderDirective(){
        return {
            restrict: 'E',
            templateUrl: '/main/templates/mdtCardHeader.html',
            transclude: true,
            replace: true,
            scope: true,
            require: ['^mdtTable'],
            link: function($scope){
                $scope.isTableCardEnabled = false;

                if($scope.tableCard && $scope.tableCard.visible !== false){
                    $scope.isTableCardEnabled = true;
                }
            }
        };
    }

    angular
        .module('mdDataTable')
        .directive('mdtCardHeader', mdtCardHeaderDirective);
}());

redpajama_set_name: RedPajamaGithub


text:
package org.apache.ambari.logsearch.conf;

import org.apache.zookeeper.data.ACL;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class SolrAuditLogPropsConfig implements SolrPropsConfig {

  @Value("${logsearch.solr.audit.logs.url:}")
  private String solrUrl;

  @Value("${logsearch.solr.audit.logs.zk_connect_string:}")
  private String zkConnectString;

  @Value("${logsearch.solr.collection.audit.logs:audit_logs}")
  private String collection;

  @Value("${logsearch.ranger.audit.logs.collection.name:}")
  private String rangerCollection;

  @Value("${logsearch.solr.audit.logs.config.name:audit_logs}")
  private String configName;

  @Value("${logsearch.solr.audit.logs.alias.name:audit_logs_alias}")
  private String aliasNameIn;

  @Value("${logsearch.audit.logs.split.interval.mins:none}")
  private String splitInterval;

  @Value("${logsearch.collection.audit.logs.numshards:1}")
  private Integer numberOfShards;

  @Value("${logsearch.collection.audit.logs.replication.factor:1}")
  private Integer replicationFactor;

  @Value("#{ACLPropertiesSplitter.parseAcls('${logsearch.solr.audit.logs.zk.acls:}')}")
  private List<ACL> zkAcls;

  @Value("${logsearch.solr.audit.logs.config_set.folder:/etc/ambari-logsearch-portal/conf/solr_configsets}")
  private String configSetFolder;

  @Override
  public String getSolrUrl() {
    return solrUrl;
  }

  @Override
  public void setSolrUrl(String solrUrl) {
    this.solrUrl = solrUrl;
  }

  @Override
  public String getCollection() {
    return collection;
  }

  @Override
  public void setCollection(String collection) {
    this.collection = collection;
  }

  @Override
  public String getZkConnectString() {
    return zkConnectString;
  }

  @Override
  public void setZkConnectString(String zkConnectString) {
    this.zkConnectString = zkConnectString;
  }

  @Override
  public String getConfigName() {
    return configName;
  }

  @Override
  public void setConfigName(String configName) {
    this.configName = configName;
  }

  @Override
  public Integer getNumberOfShards() {
    return numberOfShards;
  }

  @Override
  public void setNumberOfShards(Integer numberOfShards) {
    this.numberOfShards = numberOfShards;
  }

  @Override
  public Integer getReplicationFactor() {
    return replicationFactor;
  }

  @Override
  public void setReplicationFactor(Integer replicationFactor) {
    this.replicationFactor = replicationFactor;
  }

  @Override
  public String getSplitInterval() {
    return splitInterval;
  }

  @Override
  public void setSplitInterval(String splitInterval) {
    this.splitInterval = splitInterval;
  }

  @Override
  public List<ACL> getZkAcls() {
    return zkAcls;
  }

  @Override
  public void setZkAcls(List<ACL> zkAcls) {
    this.zkAcls = zkAcls;
  }

  @Override
  public String getConfigSetFolder() {
    return configSetFolder;
  }

  @Override
  public void setConfigSetFolder(String configSetFolder) {
    this.configSetFolder = configSetFolder;
  }

  public String getRangerCollection() {
    return rangerCollection;
  }

  public void setRangerCollection(String rangerCollection) {
    this.rangerCollection = rangerCollection;
  }

  public String getAliasNameIn() {
    return aliasNameIn;
  }

  public void setAliasNameIn(String aliasNameIn) {
    this.aliasNameIn = aliasNameIn;
  }
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/documentai/v1/document_io.proto

package com.google.cloud.documentai.v1;

/**
 *
 *
 *

 * Payload message of raw document content (bytes).
 *

 *
 * Protobuf type {@code google.cloud.documentai.v1.RawDocument}
 */
public final class RawDocument extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.RawDocument)
    RawDocumentOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use RawDocument.newBuilder() to construct.
  private RawDocument(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private RawDocument() {
    content_ = com.google.protobuf.ByteString.EMPTY;
    mimeType_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new RawDocument();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.documentai.v1.DocumentIoProto
        .internal_static_google_cloud_documentai_v1_RawDocument_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.documentai.v1.DocumentIoProto
        .internal_static_google_cloud_documentai_v1_RawDocument_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.documentai.v1.RawDocument.class,
            com.google.cloud.documentai.v1.RawDocument.Builder.class);
  }

  public static final int CONTENT_FIELD_NUMBER = 1;
  private com.google.protobuf.ByteString content_;
  /**
   *
   *
   *

   * Inline document content.
   *

   *
   * bytes content = 1;
   *
   * @return The content.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getContent() {
    return content_;
  }

  public static final int MIME_TYPE_FIELD_NUMBER = 2;
  private volatile java.lang.Object mimeType_;
  /**
   *
   *
   *

   * An IANA MIME type (RFC6838) indicating the nature and format of the
   * [content].
   *

   *
   * string mime_type = 2;
   *
   * @return The mimeType.
   */
  @java.lang.Override
  public java.lang.String getMimeType() {
    java.lang.Object ref = mimeType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      mimeType_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   * An IANA MIME type (RFC6838) indicating the nature and format of the
   * [content].
   *

   *
   * string mime_type = 2;
   *
   * @return The bytes for mimeType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMimeTypeBytes() {
    java.lang.Object ref = mimeType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      mimeType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!content_.isEmpty()) {
      output.writeBytes(1, content_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!content_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, content_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.documentai.v1.RawDocument)) {
      return super.equals(obj);
    }
    com.google.cloud.documentai.v1.RawDocument other =
        (com.google.cloud.documentai.v1.RawDocument) obj;

    if (!getContent().equals(other.getContent())) return false;
    if (!getMimeType().equals(other.getMimeType())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + CONTENT_FIELD_NUMBER;
    hash = (53 * hash) + getContent().hashCode();
    hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMimeType().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.documentai.v1.RawDocument parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.documentai.v1.RawDocument prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   *

   * Payload message of raw document content (bytes).
   *

   *
   * Protobuf type {@code google.cloud.documentai.v1.RawDocument}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.RawDocument)
      com.google.cloud.documentai.v1.RawDocumentOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.documentai.v1.DocumentIoProto
          .internal_static_google_cloud_documentai_v1_RawDocument_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.documentai.v1.DocumentIoProto
          .internal_static_google_cloud_documentai_v1_RawDocument_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.documentai.v1.RawDocument.class,
              com.google.cloud.documentai.v1.RawDocument.Builder.class);
    }

    // Construct using com.google.cloud.documentai.v1.RawDocument.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      content_ = com.google.protobuf.ByteString.EMPTY;

      mimeType_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.documentai.v1.DocumentIoProto
          .internal_static_google_cloud_documentai_v1_RawDocument_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.documentai.v1.RawDocument getDefaultInstanceForType() {
      return com.google.cloud.documentai.v1.RawDocument.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.documentai.v1.RawDocument build() {
      com.google.cloud.documentai.v1.RawDocument result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.documentai.v1.RawDocument buildPartial() {
      com.google.cloud.documentai.v1.RawDocument result =
          new com.google.cloud.documentai.v1.RawDocument(this);
      result.content_ = content_;
      result.mimeType_ = mimeType_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.documentai.v1.RawDocument) {
        return mergeFrom((com.google.cloud.documentai.v1.RawDocument) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.documentai.v1.RawDocument other) {
      if (other == com.google.cloud.documentai.v1.RawDocument.getDefaultInstance()) return this;
      if (other.getContent() != com.google.protobuf.ByteString.EMPTY) {
        setContent(other.getContent());
      }
      if (!other.getMimeType().isEmpty()) {
        mimeType_ = other.mimeType_;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                content_ = input.readBytes();

                break;
              } // case 10
            case 18:
              {
                mimeType_ = input.readStringRequireUtf8();

                break;
              } // case 18
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
    /**
     *
     *
     *

     * Inline document content.
     *

     *
     * bytes content = 1;
     *
     * @return The content.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getContent() {
      return content_;
    }
    /**
     *
     *
     *

     * Inline document content.
     *

     *
     * bytes content = 1;
     *
     * @param value The content to set.
     * @return This builder for chaining.
     */
    public Builder setContent(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }

      content_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Inline document content.
     *

     *
     * bytes content = 1;
     *
     * @return This builder for chaining.
     */
    public Builder clearContent() {

      content_ = getDefaultInstance().getContent();
      onChanged();
      return this;
    }

    private java.lang.Object mimeType_ = "";
    /**
     *
     *
     *

     * An IANA MIME type (RFC6838) indicating the nature and format of the
     * [content].
     *

     *
     * string mime_type = 2;
     *
     * @return The mimeType.
     */
    public java.lang.String getMimeType() {
      java.lang.Object ref = mimeType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        mimeType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * An IANA MIME type (RFC6838) indicating the nature and format of the
     * [content].
     *

     *
     * string mime_type = 2;
     *
     * @return The bytes for mimeType.
     */
    public com.google.protobuf.ByteString getMimeTypeBytes() {
      java.lang.Object ref = mimeType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        mimeType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * An IANA MIME type (RFC6838) indicating the nature and format of the
     * [content].
     *

     *
     * string mime_type = 2;
     *
     * @param value The mimeType to set.
     * @return This builder for chaining.
     */
    public Builder setMimeType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      mimeType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * An IANA MIME type (RFC6838) indicating the nature and format of the
     * [content].
     *

     *
     * string mime_type = 2;
     *
     * @return This builder for chaining.
     */
    public Builder clearMimeType() {

      mimeType_ = getDefaultInstance().getMimeType();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * An IANA MIME type (RFC6838) indicating the nature and format of the
     * [content].
     *

     *
     * string mime_type = 2;
     *
     * @param value The bytes for mimeType to set.
     * @return This builder for chaining.
     */
    public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      mimeType_ = value;
      onChanged();
      return this;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.RawDocument)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.RawDocument)
  private static final com.google.cloud.documentai.v1.RawDocument DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.RawDocument();
  }

  public static com.google.cloud.documentai.v1.RawDocument getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<RawDocument> PARSER =
      new com.google.protobuf.AbstractParser<RawDocument>() {
        @java.lang.Override
        public RawDocument parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<RawDocument> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<RawDocument> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.documentai.v1.RawDocument getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
module Spud
	module Search
		require 'spud_search/configuration'
    require 'spud_search/searchable'
		require 'spud_search/engine' if defined?(Rails)
	end
end


text:
package host

import (
	"errors"
	"fmt"

	master "github.com/openshift/origin/pkg/cmd/server/api"
	configvalidation "github.com/openshift/origin/pkg/cmd/server/api/validation"
	"github.com/openshift/origin/pkg/oc/admin/diagnostics/diagnostics/log"
	"github.com/openshift/origin/pkg/oc/admin/diagnostics/diagnostics/types"
)

// MasterConfigCheck is a Diagnostic to check that the master config file is valid
type MasterConfigCheck struct {
	MasterConfigFile string
	masterConfig     *master.MasterConfig
}

const MasterConfigCheckName = "MasterConfigCheck"

func (d *MasterConfigCheck) Name() string {
	return MasterConfigCheckName
}

func (d *MasterConfigCheck) Description() string {
	return "Check the master config file"
}

func (d *MasterConfigCheck) Requirements() (client bool, host bool) {
	return false, true
}

func (d *MasterConfigCheck) Complete(logger *log.Logger) error {
	masterConfig, err := GetMasterConfig(d.MasterConfigFile, logger)
	if err != nil {
		return err
	}
	d.masterConfig = masterConfig
	return nil
}

func (d *MasterConfigCheck) CanRun() (bool, error) {
	if len(d.MasterConfigFile) == 0 {
		return false, errors.New("No master config file was detected")
	}

	return true, nil
}

func (d *MasterConfigCheck) Check() types.DiagnosticResult {
	r := types.NewDiagnosticResult(MasterConfigCheckName)

	results := configvalidation.ValidateMasterConfig(masterConfig, nil)
	if len(results.Errors) > 0 {
		errText := fmt.Sprintf("Validation of master config file '%s' failed:\n", d.MasterConfigFile)
		for _, err := range results.Errors {
			errText += fmt.Sprintf("%v\n", err)
		}
		r.Error("DH0004", nil, errText)
	}
	if len(results.Warnings) > 0 {
		warnText := fmt.Sprintf("Validation of master config file '%s' warned:\n", d.MasterConfigFile)
		for _, warn := range results.Warnings {
			warnText += fmt.Sprintf("%v\n", warn)
		}
		r.Warn("DH0005", nil, warnText)
	}
	return r
}


text:
<?php
/**
 *
 * This file is part of Aura for PHP.
 *
 * @license http://opensource.org/licenses/bsd-license.php BSD
 *
 */
namespace Aura\SqlQuery\Common;

/**
 *
 * An interface for ORDER BY clauses.
 *
 * @package Aura.SqlQuery
 *
 */
interface OrderByInterface
{
    /**
     *
     * Adds a column order to the query.
     *
     * @param array $spec The columns and direction to order by.
     *
     * @return $this
     *
     */
    public function orderBy(array $spec);
}


text:
*** Ceci est un message généré automatiquement ***

Bonjour {{ user_firstname }} {{ user_lastname }},

Votre inscription à "{{ app_name }}" a été acceptée.

    Vous pouvez dès à présent vous connecter sur
    {{ app_url }}

Pour rappel, votre identifiant de connexion est : {{ user_login }}

{% if text_addon != '' %}
    {{ text_addon }}
{% endif%}

Bien cordialement,

l'administrateur.


text:
package org.apache.storm.streams.processors;

import org.apache.storm.state.KeyValueState;

/**
 * Top level interface for processors that does stateful processing.
 *
 * @param <K> the key type
 * @param <V> the value type
 */
public interface StatefulProcessor<K, V> {
    /**
     * Initialize the state of the processor with the given {@link KeyValueState}.
     *
     * @param keyValueState the key-value state
     */
    void initState(KeyValueState<K, V> keyValueState);
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
L-Index (BattleSys Documentation)
</TITLE>

<META NAME="date" CONTENT="2012-10-27">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

NBattleSys Doc

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A B C D E F G H I L M N O P R S T U V W Z

L

listString(String[], String) -
Static method in class battlesys.Utility

Combine all elements in a string array to one string

livingPlayer() -
Method in class battlesys.PlayerList

Given a whole list of player, return a new list of player whose are living (hp > 0)

livingPlayerCount() -
Method in class battlesys.PlayerList

Count the number of living players in an array of player

loadMoves() -
Static method in class battlesys.Move

Load the moves in the move folder.

loadTournamentData() -
Static method in class battlesys.Player

Load the allowed points to allocate from the file "tournamentPoints.txt".

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

NBattleSys Doc

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A B C D E F G H I L M N O P R S T U V W Z


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="action_add">Добавить</string>
    <string name="action_add_category">Добавить категорию</string>
    <string name="action_add_to_home_screen">Добавить на главный экран</string>
    <string name="action_bookmark">Закладка</string>
    <string name="action_cancel">Отмена</string>
    <string name="action_clear">Очистить</string>
    <string name="action_delete">Удалить</string>
    <string name="action_display">Отобразить</string>
    <string name="action_display_grid">Сетка</string>
    <string name="action_display_list">Список</string>
    <string name="action_display_mode">Изменить отображение</string>
    <string name="action_download">Загрузить</string>
    <string name="action_edit">Изменить</string>
    <string name="action_edit_categories">Изменить категорию</string>
    <string name="action_edit_cover">Изменить обложку</string>
    <string name="action_filter">Фильтр</string>
    <string name="action_filter_bookmarked">Закладки</string>
    <string name="action_filter_downloaded">Загруженные</string>
    <string name="action_filter_empty">Удалить фильтр</string>
    <string name="action_filter_read">Читать</string>
    <string name="action_filter_unread">Непрочитанные</string>
    <string name="action_install">Установить</string>
    <string name="action_mark_as_read">Отметить как прочитанное</string>
    <string name="action_mark_as_unread">Пометить как непрочитанное</string>
    <string name="action_mark_previous_as_read">Отметить предыдущие как прочит</string>
    <string name="action_move_category">Поместить в категорию</string>
    <string name="action_next_chapter">Следующая глава</string>
    <string name="action_next_unread">Следующая непрочитанная</string>
    <string name="action_open_in_browser">Открыть в браузере</string>
    <string name="action_pause">Пауза</string>
    <string name="action_previous_chapter">Предыдущая глава</string>
    <string name="action_remove">Удалить</string>
    <string name="action_remove_bookmark">Удалить закладку</string>
    <string name="action_rename_category">Переименовать категорию</string>
    <string name="action_reset">Сбросить</string>
    <string name="action_resume">Продолжить</string>
    <string name="action_retry">Повторить</string>
    <string name="action_save">Сохранить</string>
    <string name="action_search">Поиск</string>
    <string name="action_select_all">Выбрать всё</string>
    <string name="action_set_filter">Установить фильтр</string>
    <string name="action_settings">Настройки</string>
    <string name="action_share">Поделиться</string>
    <string name="action_show_downloaded">Загруженные</string>
    <string name="action_sort">Сортировать</string>
    <string name="action_sort_alpha">По алфавиту</string>
    <string name="action_sort_down">По убыванию</string>
    <string name="action_sort_last_read">Последняя прочитанная</string>
    <string name="action_sort_last_updated">Последняя обновленная</string>
    <string name="action_sort_up">По возрастанию</string>
    <string name="action_start">Старт</string>
    <string name="action_stop">Стоп</string>
    <string name="action_update">Обновить</string>
    <string name="action_update_library">Обновить библиотеку</string>
    <string name="all">Все</string>
    <string name="backup">Резервная копия</string>
    <string name="black_background">Черный</string>
    <string name="build_time">Дата сборки</string>
    <string name="cache_delete_error">Возникла ошибка при удалении кэша</string>
    <string name="cache_deleted">Кэш удален. %1$d файлов было удалено</string>
    <string name="chapter_downloaded">Загружено</string>
    <string name="chapter_downloading">Загружается</string>
    <string name="chapter_downloading_progress">Загружается (%1$d/%2$d)</string>
    <string name="chapter_error">Ошибка</string>
    <string name="chapter_progress">Страница: %1$d</string>
    <string name="chapter_queued">В очереди</string>
    <string name="chapter_subtitle">Глава %1$s</string>
    <string name="chapters">Главы</string>
    <string name="charging">Заряжается</string>
    <string name="choices_reset">Опции выбора сбросятся</string>
    <string name="circular_icon">Круглая иконка</string>
    <string name="clear_database_completed">Данные удалены</string>
    <string name="clear_database_confirmation">Вы уверены? Прочитанные главы и прогресс не библиотечной манги будет потерян</string>
    <string name="color_filter_a_value">А</string>
    <string name="color_filter_r_value">R</string>
    <string name="color_filter_g_value">G</string>
    <string name="color_filter_b_value">B</string>
    <string name="completed">Завершено</string>
    <string name="confirm_delete_chapters">Вы уверены что хотите удалить выбранные главы?</string>
    <string name="confirm_delete_manga">Вы уверены что хотите удалить выбранные манга?</string>
    <string name="confirm_set_image_as_cover">Вы хотите установить эту картинку как обложку?</string>
    <string name="confirm_update_manga_sync">Обновить последнюю прочитанную главу в сервисе на %1$d?</string>
    <string name="cookies_cleared">Куки удалены</string>
    <string name="cover_updated">Обложка обновлена</string>
    <string name="custom_dir">Пользовательский каталог</string>
    <string name="custom_filter">Пользовательский фильтр</string>
    <string name="dark_theme">Темная тема</string>
    <string name="decode_image_error">Не удалось декодировать изображение</string>
    <string name="default_columns">По умолчанию</string>
    <string name="default_viewer">По умолчанию</string>
    <string name="deleting">Удаление…</string>
    <string name="description">Описание</string>
    <string name="description_backdrop">Фоновое изображение манги</string>
    <string name="description_cover">Обложка манги</string>
    <string name="dialog_with_checkbox_remove_description">Это действие удалит дату прочтения главы. Вы уверены?</string>
    <string name="dialog_with_checkbox_reset">Сбросить все главы для этой манги</string>
    <string name="disabled">Отключено</string>
    <string name="display_mode_chapter">Глава %1$s</string>
    <string name="download_1">Загрузить следующую главу</string>
    <string name="download_10">Загрузить 10 следующих глав</string>
    <string name="download_5">Загрузить 5 следующих глав</string>
    <string name="download_all">Загрузить все</string>
    <string name="download_notifier_downloader_title">Загрузчик</string>
    <string name="download_notifier_no_network">Нет сетевого соединения</string>
    <string name="download_notifier_page_error">Страница отсутствует в каталоге</string>
    <string name="download_notifier_page_ready_error">Страница не загружена</string>
    <string name="download_notifier_text_only_wifi">Нет Wi-Fi соединения</string>
    <string name="download_notifier_title_error">Ошибка</string>
    <string name="download_notifier_unkown_error">Неожиданная ошибка при загрузке главы</string>
    <string name="download_progress">Загружено %1$d%%</string>
    <string name="download_queue_error">Произошла ошибка при загрузке глав. Попробуйте еще раз в разделе загрузки</string>
    <string name="download_unread">Загрузить непрочитанные</string>
    <string name="downloading">Загрузка…</string>
    <string name="dropped">Брошенный</string>
    <string name="error_category_exists">Категория с таким именем уже существует!</string>
    <string name="fetch_chapters_error">Ошибка при извлечении глав</string>
    <string name="fifth_to_last">Пятую от прочитанной главы</string>
    <string name="file_select_backup">Выбрать файл бэкапа</string>
    <string name="file_select_cover">Выбрать обложку</string>
    <string name="file_select_icon">Выбрать ярлык</string>
    <string name="fourth_to_last">Четвертую от прочитанной</string>
    <string name="icon_creation_fail">Невозможно создать ярлык!</string>
    <string name="icon_shape">Форма иконки</string>
    <string name="information_empty_library">Ваша библиотека пуста, вы можете добавить из Каталога.</string>
    <string name="information_no_downloads">Нет загрузок</string>
    <string name="information_no_recent">Нет новых глав</string>
    <string name="information_no_recent_manga">Нет недавно прочитанных глав</string>
    <string name="invalid_login">Ошибка авторизации</string>
    <string name="label_backup">Резервное копирование</string>
    <string name="label_catalogues">Каталоги</string>
    <string name="label_categories">Категории</string>
    <string name="label_download_queue">Очередь загрузки</string>
    <string name="label_latest_updates">Последние обновления</string>
    <string name="label_library">Библиотека</string>
    <string name="label_recent_manga">История</string>
    <string name="label_recent_updates">Обновления библиотеки</string>
    <string name="label_selected">Выбраны: %1$d</string>
    <string name="label_settings">Настройки</string>
    <string name="landscape">Горизонтальная</string>
    <string name="last_read_chapter">Последняя прочитанная глава</string>
    <string name="left_to_right_viewer">Слева направо</string>
    <string name="library_search_hint">Название или автор…</string>
    <string name="licensed">Лицензировано</string>
    <string name="light_theme">Основная тема</string>
    <string name="loading">Загрузка…</string>
    <string name="login">Авторизация</string>
    <string name="login_success">Успешная авторизация</string>
    <string name="login_title">Авторизация для %1$s</string>
    <string name="manga_chapter_no_title">Нет названия</string>
    <string name="manga_chapters_tab">Главы</string>
    <string name="manga_detail_tab">Информация</string>
    <string name="manga_download">Загрузить</string>
    <string name="manga_info_artist_label">Художник</string>
    <string name="manga_info_author_label">Автор</string>
    <string name="manga_info_chapters_label">Главы</string>
    <string name="manga_info_genres_label">Жанры</string>
    <string name="manga_info_status_label">Статус</string>
    <string name="manga_info_source_label">Источник</string>
    <string name="manga_not_in_db">Эта манга была удалена из базы данных!</string>
    <string name="manga_tracking_tab">Отслеживать</string>
    <string name="name">Название</string>
    <string name="no_next_chapter">Следующая глава не найдена</string>
    <string name="no_previous_chapter">Предыдущая глава не найдена</string>
    <string name="no_valid_sources">Пожалуйста включите хотя бы один источник</string>
    <string name="notification_cover_update_failed">Не удалось обновить обложку</string>
    <string name="notification_first_add_to_library">Пожалуйста добавьте мангу в свою библиотеку, перед тем как делать это</string>
    <string name="notification_new_chapters">Новые главы найдены</string>
    <string name="notification_no_connection_body">Соединение не доступно</string>
    <string name="notification_no_connection_title">Синхронизация отменена</string>
    <string name="notification_not_connected_to_ac_body">Не заряжается</string>
    <string name="notification_not_connected_to_ac_title">Синхронизация отменена</string>
    <string name="notification_update_progress">Статус обновления: %1$d/%2$d</string>
    <string name="on_hold">Заморожено</string>
    <string name="ongoing">Выпускается</string>
    <string name="options">Опции</string>
    <string name="page_downloaded">Страница скопирована в %1$s</string>
    <string name="password">Пароль</string>
    <string name="picture_saved">Картинка сохранена</string>
    <string name="plan_to_read">Планирую прочитать</string>
    <string name="portrait">Вертикальная</string>
    <string name="pref_acra_summary">Помогает исправлять любые баги. Личные данные не передаются</string>
    <string name="pref_auto_update_manga_sync">Синхронизировать главы после прочтения</string>
    <string name="pref_category_about">Информация</string>
    <string name="pref_category_advanced">Дополнительно</string>
    <string name="pref_category_downloads">Загрузки</string>
    <string name="pref_category_general">Главные</string>
    <string name="pref_category_reader">Читалка</string>
    <string name="pref_category_sources">Источники</string>
    <string name="pref_category_tracking">Отслеживание</string>
    <string name="pref_clear_chapter_cache">Очистить кэш глав</string>
    <string name="pref_clear_cookies">Очистить куки</string>
    <string name="pref_clear_database">Очистить базу данных</string>
    <string name="pref_clear_database_summary">Удалять мангу и главы которые больше не находятся в библиотеке</string>
    <string name="pref_custom_brightness">Использовать пользовательскую яркость</string>
    <string name="pref_custom_color_filter">Использовать пользовательский цветовой фильтр</string>
    <string name="pref_download_directory">Каталог загрузок</string>
    <string name="pref_download_new">Загружать новые главы</string>
    <string name="pref_download_only_over_wifi">Загружать только через Wi-Fi</string>
    <string name="pref_enable_acra">Отсылать отчеты о падениях</string>
    <string name="pref_enable_automatic_updates">Проверять обновления</string>
    <string name="pref_enable_automatic_updates_summary">Автоматически проверять новые версии</string>
    <string name="pref_page_transitions">Включить переходы</string>
    <string name="pref_fullscreen">Полноэкранный режим</string>
    <string name="pref_image_decoder">Декодер изображений</string>
    <string name="pref_image_scale_type">Масштабирование</string>
    <string name="pref_keep_screen_on">Держать экран включенным</string>
    <string name="pref_language">Язык</string>
    <string name="pref_library_columns">Количество в ряд</string>
    <string name="pref_library_update_categories">Категории включенные в глобальный поиск</string>
    <string name="pref_library_update_interval">Частота обновления библиотеки</string>
    <string name="pref_library_update_restriction">Ограничения обновления библиотеки</string>
    <string name="pref_library_update_restriction_summary">Обновлять когда условия выполнены</string>
    <string name="pref_lock_orientation">Блокировать ориентацию</string>
    <string name="pref_read_with_tapping">Нажатие</string>
    <string name="pref_read_with_volume_keys">Клавиши громкости</string>
    <string name="pref_reader_navigation">Навигация</string>
    <string name="pref_reader_theme">Цвет фона</string>
    <string name="pref_refresh_library_metadata">Обновлять библиотечные метаданные</string>
    <string name="pref_refresh_library_metadata_summary">Обновить обложки, жанры, описания и информацию о мангах</string>
    <string name="pref_remove_after_marked_as_read">Удалить когда отмечена как прочитанная</string>
    <string name="pref_remove_after_read">Удалять после прочтения</string>
    <string name="pref_rotation_type">Ориентация</string>
    <string name="pref_show_page_number">Показывать номер страницы</string>
    <string name="pref_start_screen">Стартовый экран</string>
    <string name="pref_theme">Тема приложения</string>
    <string name="pref_update_only_non_completed">Обновлять только ongoing мангу</string>
    <string name="pref_viewer_type">Направление чтения</string>
    <string name="pref_zoom_start">Стартовая позиция увеличения</string>
    <string name="reading">В процессе чтения</string>
    <string name="recent_manga_source">%1$s - Гл.%2$s</string>
    <string name="remove_from_library">Удалить из библиотеки</string>
    <string name="right_to_left_viewer">Справа налево</string>
    <string name="rotation_force_landscape">Горизонтальная</string>
    <string name="rotation_force_portrait">Вертикальная</string>
    <string name="rotation_free">Свободная</string>
    <string name="rotation_lock">Заблокированная</string>
    <string name="rounded_icon">Округленные иконки</string>
    <string name="saving_picture">Сохранить картинку</string>
    <string name="scale_type_fit_height">По высоте</string>
    <string name="scale_type_fit_screen">По экрану</string>
    <string name="scale_type_fit_width">По ширине</string>
    <string name="scale_type_original_size">Исходный размер</string>
    <string name="scale_type_smart_fit">Умная</string>
    <string name="scale_type_stretch">Растянутая</string>
    <string name="score">Оценка</string>
    <string name="second_to_last">Предпоследняя</string>
    <string name="select_source">Выберите каталог</string>
    <string name="services">Сервисы</string>
    <string name="set_as_cover">Установить как обложку</string>
    <string name="shortcut_title">Название ярлыка</string>
    <string name="show_chapter_number">Показывать номер главы</string>
    <string name="show_password">Показывать пароль</string>
    <string name="show_title">Показывать название</string>
    <string name="snack_add_to_library">Добавить мангу в библиотеку?</string>
    <string name="sort_by_number">По номеру главы</string>
    <string name="sort_by_source">По каталогу</string>
    <string name="sorting_mode">Метод сортировки</string>
    <string name="source_requires_login">Этот каталог требует авторизации</string>
    <string name="square_icon">Квадратная иконка</string>
    <string name="star_icon">Звездочная иконка</string>
    <string name="status">Статус</string>
    <string name="system_default">Системный</string>
    <string name="third_to_last">Третью от прочитанной главы</string>
    <string name="title">Заголовок</string>
    <string name="unknown">Неизвестно</string>
    <string name="unknown_error">Неизвестная ошибка</string>
    <string name="update_12hour">Каждые 12 часов</string>
    <string name="update_24hour">Ежедневно</string>
    <string name="update_1hour">Каждый час</string>
    <string name="update_2hour">Каждые 2 часа</string>
    <string name="update_3hour">Каждые 3 часа</string>
    <string name="update_48hour">Каждые 2 дня</string>
    <string name="update_6hour">Каждые 6 часов</string>
    <string name="update_check_confirm">Загрузить</string>
    <string name="update_check_download_started">Загрузка началась</string>
    <string name="update_check_ignore">Игнорировать</string>
    <string name="update_check_look_for_updates">Ищу обновления</string>
    <string name="update_check_no_new_updates">Обновлений не обнаружено</string>
    <string name="update_check_notification_download_complete">Загрузка завершена</string>
    <string name="update_check_notification_download_error">Ошибка загрузки</string>
    <string name="update_check_notification_download_in_progress">Загрузка в процессе</string>
    <string name="update_check_notification_file_download">Обновление загрузки</string>
    <string name="update_check_notification_update_available">Доступно обновление</string>
    <string name="update_check_title">Доступны новые обновления!</string>
    <string name="update_never">Ручное</string>
    <string name="updating_category">Обновление категории</string>
    <string name="used_cache">Использовано: %1$s</string>
    <string name="username">Имя пользователя</string>
    <string name="version">Версия</string>
    <string name="vertical_viewer">Вертикальный</string>
    <string name="viewer_for_this_series">Отображение для этой серии</string>
    <string name="webtoon_viewer">Веб-комикс</string>
    <string name="white_background">Белый</string>
    <string name="wifi">Wi-Fi</string>
    <string name="zoom_start_automatic">Автоматическая</string>
    <string name="zoom_start_center">Центральная</string>
    <string name="zoom_start_left">Слева</string>
    <string name="zoom_start_right">Справа</string>
    <string name="action_close">Закрыть</string>
    <string name="action_create">Создать</string>
    <string name="action_export">Экспортировать</string>
    <string name="action_move">Переместить</string>
    <string name="action_restore">Восстановить</string>
    <string name="action_undo">Отменить</string>
    <string name="added_to_library">Эта манга уже добавлена в библиотеку</string>
    <string name="also_delete_chapters">Так же удалить загруженные главы</string>
    <string name="amoled_theme">AMOLED тема</string>
    <string name="backup_choice">Что вы хотите бэкапить?</string>
    <string name="backup_created">Бэкап создан</string>
    <string name="backup_restore_content">При восстановлении используются данные из каталогов, что может вызвать большой расход трафика.\nТакже авторизуйтесь в каталогах, которые этого требуют.</string>
    <string name="categories">Категории</string>
    <string name="chapter_paused">Пауза</string>
    <string name="creating_backup">Создаем бэкап</string>
    <string name="default_category">Категория по умолчанию</string>
    <string name="default_category_summary">Всегда спрашивать</string>
    <string name="delete_downloads_for_manga">Удалять загруженные главы?</string>
    <string name="dialog_restoring_backup">Восстановления бэкапа \n%1$s добавлено в библиотеку</string>
    <string name="dialog_restoring_source_not_found">Восстановления бэкапа \n%1$s, каталог не найден</string>
    <string name="download_notifier_download_paused">Загрузка приостановлена</string>
    <string name="error_opening_log">Ошибка открытия лога</string>
    <string name="file_saved">Файл сохранен в %1$s</string>
    <string name="history">История</string>
    <string name="invalid_combination">Категория по умолчанию не может быть выбрана вместе с другими категориями</string>
    <string name="local_source">Локальная манга</string>
    <string name="manga">Манга</string>
    <string name="manga_info_last_chapter_label">Последняя глава</string>
    <string name="no_more_results">Больше нет результатов</string>
    <string name="notification_new_chapters_text">Для %1$d тайтлов</string>
    <string name="pref_backup_directory">Каталог бэкапа</string>
    <string name="pref_backup_interval">Частота бэкапа</string>
    <string name="pref_backup_service_category">Служба</string>
    <string name="pref_backup_slots">Максимальное количество бэкапов</string>
    <string name="pref_create_backup">Создать бэкап</string>
    <string name="pref_create_backup_summ">Можно использовать для восстановления текущей библиотеки</string>
    <string name="pref_crop_borders">Границы обрезки</string>
    <string name="pref_download_new_categories">Категории для включения в загружаемые</string>
    <string name="pref_refresh_library_tracking">Обновить отслеживаемую метадату</string>
    <string name="pref_refresh_library_tracking_summary">Обновить статус, счет и последнюю главу от отслеживаемых каталогов</string>
    <string name="pref_restore_backup">Восстановить бэкап</string>
    <string name="pref_restore_backup_summ">Восстановить библиотеку из бэкапа</string>
    <string name="restore_completed">Восстановление закончено</string>
    <string name="restore_completed_content">Восстановление заняло %1$s.\n%2$s ошибок обнаружено.</string>
    <string name="restoring_backup">Восстановление бэкапа</string>
    <string name="short_recent_updates">Обновления</string>
    <string name="snack_categories_deleted">Категория удалена</string>
    <string name="source_not_found">Каталог не найден</string>
    <string name="track">Отслеживание</string>
    <string name="update_monthly">Ежемесячно</string>
    <string name="update_weekly">Еженедельно</string>
    <string name="action_sort_total">По количеству глав</string>
    <string name="action_open_log">Открыть лог</string>
    <string name="app_not_available">Приложение не отвечает</string>
    <string name="pref_read_with_volume_keys_inverted">Инвертировать клавиши громкости</string>
    <string name="action_global_search">Глобальный поиск</string>
    <string name="action_display_download_badge">Значок загруженных</string>
    <string name="action_open">Открыть</string>
    <string name="action_login">Логин</string>
    <string name="local_source_badge">Локальная</string>
    <string name="other_source">Другие</string>
    <string name="action_global_search_hint">Глобальный поиск…</string>
    <string name="latest">Последняя</string>
    <string name="browse">Смотреть</string>
    <string name="shortcut_created">Ярлык был добавлен на главный экран.</string>
    <string name="channel_common">Обычный</string>
    <string name="channel_library">Библиотека</string>
    <string name="channel_downloader">Загрузчик</string>
    <string name="information_empty_category">У вас нет категорий. Нажмите кнопку + для начала организации вашей библиотеки.</string>
    <string name="label_migration">Перемещение источника</string>
    <string name="label_extensions">Дополнения</string>
    <string name="label_extension_info">Информация о дополнении</string>
    <string name="all_lang">Все</string>
    <string name="ext_details">Детали</string>
    <string name="ext_update">Обновление</string>
    <string name="ext_install">Установить</string>
    <string name="ext_pending">Ожидается</string>
    <string name="ext_downloading">Скачивается</string>
    <string name="ext_installing">Устанавливается</string>
    <string name="ext_installed">Установлено</string>
    <string name="ext_untrusted">Ненадежное</string>
    <string name="ext_uninstall">Удалить</string>
    <string name="ext_preferences">Настройки</string>
    <string name="ext_available">Доступно</string>
    <string name="untrusted_extension">Ненадежное расширение</string>
    <string name="untrusted_extension_message">Это расширение было подписано ненадежным сертификатом и не было активировано.  Вредоносное расширение может считывать любые учетные данные для входа, хранящиеся в Tachiyomi, или выполнять произвольный код.  Доверяя этому сертификату, вы принимаете эти риски.</string>
    <string name="ext_version_info">Версия: %1$s</string>
    <string name="ext_language_info">Язык: %1$s</string>
    <string name="ext_empty_preferences">Нет настроек для редактирования этого расширения</string>
    <string name="pref_double_tap_anim_speed">Скорость анимации при двойном нажатии</string>
    <string name="double_tap_anim_speed_0">Без анимации</string>
    <string name="double_tap_anim_speed_normal">Нормальная</string>
    <string name="double_tap_anim_speed_fast">Быстрая</string>
    <string name="manga_info_full_title_label">Заголовок</string>
    <string name="manga_added_library">Добавить в библиотеку</string>
    <string name="manga_removed_library">Удалить из библиотеки</string>
    <string name="manga_info_latest_data_label">Обновлено</string>
    <string name="copied_to_clipboard">%1$s скопорован в буфер</string>
    <string name="custom_download">Загрузить определенное количество</string>
    <string name="custom_hint">количество</string>
    <string name="download_custom">Загрузить другое кол-во</string>
    <string name="migration_info">Нажмите, чтобы выбрать источник для миграции</string>
    <string name="migration_dialog_what_to_include">Выберите данные для включения</string>
    <string name="select">Выбрать</string>
    <string name="migrate">Мигрировать</string>
    <string name="copy">Копировать</string>
    <string name="migrating">Мигрирую…</string>
    <string name="source_search_options">Поисковые фильтры</string>
    <string name="ext_trust">Достоверный</string>
    <string name="pager_viewer">Страница</string>
    <string name="source_not_installed">Источник не установлен: %1$s</string>
    <string name="repeating">Перечитываю</string>
    <string name="track_status">Статус</string>
    <string name="track_start_date">Начато</string>
    <string name="track_type">Тип</string>
    <string name="track_author">Автор</string>
    <string name="url_not_set">"Ссылка манги не установлена, пожалуйста нажмите на заголовок и выберите мангу снова "</string>
    <string name="transition_finished">Закончено:</string>
    <string name="transition_current">Текущий:</string>
    <string name="transition_next">Следующий:</string>
    <string name="transition_previous">Предыдущий:</string>
    <string name="transition_no_next">Следующей части нет</string>
    <string name="transition_no_previous">Предыдущей части нет</string>
    <string name="transition_pages_loading">Идёт загрузка страниц…</string>
    <string name="transition_pages_error">Не удалось загрузить страницы: %1$s</string>
    <string name="darkblue_theme">Темно-синяя тема</string>
    <string name="pref_read_with_long_tap">Диалог при долгом нажатии</string>
    <string name="reader_pull_up_for_more_options">Потяните вверх для раскрытия меню</string>
</resources>


text:
 const alg = "RS256";
 const use = "sig";
 var certificate1 = context.getVariable("private.certificate1");
 var certificate2 = context.getVariable("private.certificate2");
 var certificatelist = {};

 certificatelist.keys = [];

 if (!certificate1) {
    throw Error("No certificate found");
 }

 var key1 = KEYUTIL.getKey(certificate1);
 var jwk1 = KEYUTIL.getJWKFromKey(key1);
 var cert1_kid = context.getVariable("private.certificate1_kid") || null;

 if (cert1_kid !== null) {
    jwk1.kid = cert1_kid;
    jwk1.alg = alg;
    jwk1.use = use;
 }
 certificatelist.keys.push(jwk1);

 if (certificate2) {
    var key2 = KEYUTIL.getKey(certificate2);
    var jwk2 = KEYUTIL.getJWKFromKey(key2);
    var cert2_kid = context.getVariable("private.certificate2_kid") || null;
    if (cert2_kid !== null) {
        jwk2.kid = cert2_kid;
        jwk2.alg = alg;
        jwk2.use = use;
    }
    certificatelist.keys.push(jwk2);
 }

 context.setVariable("jwkmessage", JSON.stringify(certificatelist));


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <stroke
        android:width="1dp"
        android:color="#0080ff" />
</shape>


text:
All of the functionality provided by this role and more is available in the [DebOps project](http://debops.org). If you are using some of my roles in conjunction with each other, you will find the move to DebOps most pleasurable.

This role will be **removed** from the **galaxy** and from **github** anywhere from 42 microseconds to 2-3 weeks after you read this message.

---

## What is ansible-postgres? [![Build Status](https://secure.travis-ci.org/nickjj/ansible-postgres.png)](http://travis-ci.org/nickjj/ansible-postgres)

It is an [ansible](http://www.ansible.com/home) role to install postgres 9.3.

### What problem does it solve and why is it useful?

Often times you just want a single database server without any fuss or headaches. The only thing you need to supply to this role is the username/password it should use for the postgres user account and you're on your way.

It also allows you to configure a few popular configuration options if you need to stray off the path of the default settings.

## Role variables

```
---
# A list of 1 or more hosts to listen on.
postgres_listen_addresses:
  - 0.0.0.0

# Which port should the host listen on?
postgres_port: 5432

# The postgres username and password.
postgres_username: deploy
postgres_password: pleasedonthackme

# How should logs be reported?
# It can be: stderr (default), syslog or eventlog.
postgres_log_destination: stderr

# Configuration settings for syslog.
postgres_syslog_facility: LOCAL0
postgres_syslog_ident: postgres

# Allow access from remote hosts, explained more below.
postgres_allowed_hosts: []

# The amount in seconds to cache apt-update.
apt_cache_valid_time: 86400
```

### Allow remote hosts to access your postgres server

If your database is on a different host than the servers using your postgres connection then you need to white list them in your hba config. You can do that by populating `postgres_allowed_hosts`.

```
postgres_allowed_hosts:
    # What list of IPs are allowed to connect?
    # OPTIONAL: Defaults to [] (only localhost can connect).
  - hosts: []

    # What network interface should be used?
    # OPTIONAL: Defaults to eth0.
    interface: "eth0"

    # How is the connection to the server made?
    # OPTIONAL: Defaults to host.
    # VALUES: local, host, hostssl or hostnossl
    type: "host"

    # What database can the connection be made to?
    # OPTIONAL: Defaults to all.
    database: "all"

    # Which user can make the connection?
    # OPTIONAL: Defaults to all.
    user: "all"

    # How should the user authenticate?
    # OPTIONAL: Defaults to md5.
    auth: "md5"
```

## Example playbook

For the sake of this example let's say you have a group called **database** and you have a typical `site.yml` file.

To use this role edit your `site.yml` file to look something like this:

```
---
- name: ensure database servers are configured
  hosts: database

  roles:
    - { role: nickjj.postgres, tags: postgres }
```

Let's say you want to edit a few defaults, you can do this by opening or creating `group_vars/app.yml` which is located relative to your `inventory` directory and then making it look something like this:

```
---
postgres_user: hulk
postgres_password: notverysecure
postgres_log_destination: syslog

# If you wanted to add multiple groups or servers...
postgres_allowed_hosts:
  - hosts: "{{ groups['my_rails_apps'] }}"
  - hosts: "{{ groups['my_golang_apps'] }}"
    interface: "eth1"
  - hosts: ["www.sometrustworthy.com"]
    auth: "trust"
```

#### More secure passwords

If you plan to publish your inventory somewhere and you do not want plain text passwords to be checked in then you must remove the password out of this file. You can use ansible's `lookup` module to have the password stored locally outside of version control and then load it into your inventory. Here is an example:

```
postgres_password: "{{ lookup('password', '/path/to/secrets/' + 'database_password') }}"
```

In the above case `database_password` would be a text file containing your password. You can encrypt this file on your local file system if you want but that is outside of the scope of this documentation.

## Installation

`$ ansible-galaxy install nickjj.postgres`

## Requirements

Tested on ubuntu 12.04 LTS and debian wheezy but it should work on other versions that are similar.

## Ansible galaxy

You can find it on the official [ansible galaxy](https://galaxy.ansible.com/list#/roles/867) if you want to rate it.

## License

MIT