text:
// Fix navbar/settings nav position on small devices
$(document).ready(function(){
    var navbar = $('#lc-navbar');
    var settingsNav = $(".settings-nav");
    $(window).scroll(function(){
        if (navbar.visible(true)) {
          settingsNav.removeClass("top");
        } else {
          settingsNav.addClass("top");
        }
    })
})

if (typeof String.prototype.repeat !== 'function') {
    String.prototype.repeat = function( num ) {
        return new Array( num + 1 ).join( this );
    };
}
if (typeof String.prototype.capitalize !== 'function') {
    String.prototype.capitalize = function(lc, all) {
        if (all) {
            return this.split(" ").map(function(currentValue, index, array) {
                return currentValue.capitalize(lc);
            }, this).join(" ").split("-").map(
                    function(currentValue, index, array) {
                        return currentValue.capitalize(false);
                    }, this).join("-");
        } else {
            return lc ? this.charAt(0).toUpperCase()
                    + this.slice(1).toLowerCase() : this.charAt(0)
                    .toUpperCase()
                    + this.slice(1);
        }
    };
}
var QueryString = function () {
      // This function is anonymous, is executed immediately and
      // the return value is assigned to QueryString!
      var query_string = {};
      var query = window.location.search.substring(1);
      var vars = query.split("&");
      for (var i=0;i<vars.length;i++) {
        var pair = vars[i].split("=");
            // If first entry with this name
        if (typeof query_string[pair[0]] === "undefined") {
          query_string[pair[0]] = pair[1];
            // If second entry with this name
        } else if (typeof query_string[pair[0]] === "string") {
          var arr = [ query_string[pair[0]], pair[1] ];
          query_string[pair[0]] = arr;
            // If third or later entry with this name
        } else {
          query_string[pair[0]].push(pair[1]);
        }
      }
        return query_string;
    } ();

var validator = {};

validator.isValidCpf = function(cpf)
{
    var checkRepeat = new RegExp('([0-9])\\1{10}', 'g');
    var cleanup = new RegExp('[. \\-]', 'gi');
    cpf = cpf.replace(cleanup, '');

    var digitoUm = 0;
    var digitoDois = 0;

    if (cpf.length !== 11 || !$.isNumeric(cpf) || checkRepeat.test(cpf)) {
        return false;
    }

    for (var i = 0, x = 10; i <= 8; i++, x--) {
        digitoUm += cpf[i] * x;
    }
    for (var i = 0, x = 11; i <= 9; i++, x--) {
        var iStr = i.toString();
        if (iStr.repeat(11) === cpf) {
            return false;
        }
        digitoDois += cpf[i] * x;
    }

    var calculoUm = ((digitoUm % 11) < 2) ? 0 : 11 - (digitoUm % 11);
    var calculoDois = ((digitoDois % 11) < 2) ? 0 : 11 - (digitoDois % 11);
    if (calculoUm.toString() !== cpf[9] || calculoDois.toString() !== cpf[10]) {
        return false;
    }
    return true;
};

validator.formatCPF = function(element, cpf)
{
    if ($.isNumeric(cpf) && cpf.length === 11) {
        var cpfRegex = new RegExp('([0-9]{3})([0-9]{3})([0-9]{3})([0-9]{2})', 'gi');
        cpf = cpf.replace(cpfRegex, '$1.$2.$3-$4');
        element.val(cpf).data('masked', true);
    }
};

validator.onKeyUpMultiformat = function(obj, e)
{
    var c= String.fromCharCode(e.which);
    var isWordcharacter = c.match(/\w/);

    var val = $(obj).val().trim();
    var masked = $(obj).data('masked');
    var cpf = val;
    var cleanup = new RegExp('[. \\-]', 'gi');
    cpf = cpf.replace(cleanup, '');

    if (!isWordcharacter && e.keyCode !== 0) {
        validator.formatCPF($(obj), cpf);
        return;
    }

    if ($.isNumeric(cpf)) {
        if (cpf.length > 11) {
            cpf = cpf.substr(0,11);
        }
        validator.formatCPF($(obj), cpf);
    } else {
        if (masked === true) {
            val = val.replace(/([0-9]{3})[.]([0-9]{3})[.]([0-9]{3})-([0-9]{2})/, '$1$2$3$4');
            $(obj).val(val);
        }
    }

    return false;
};

validator.cep = {'parent': validator};
validator.cep.urlQuery = '/lc_consultaCep2';
validator.cep.findByCep = function(obj, callback) {
    if (obj.value === '') {
        validator.check.success(obj);
      return;
    }
    var cleanup = new RegExp('[. \\-]', 'gi');
    var val = obj.value.replace(cleanup, '');
    if (val === '' || val.length !== 8) {
        validator.check.error(obj, $('label[for=' + obj.id + ']').text() + ' invalido');
        return;
    }
     $.ajax({
         type: "GET",
         dataType: "json",
        url: validator.cep.urlQuery + '/' + val
    }).done(function(result) {
        if (result.code !== 200) {
            return this.fail(result);
             }
        if (result.items && result.items.length && callback) {
            callback(result.items[0]);
             }
        validator.check.success(obj);
    }).fail(function(result) {
        if (result.code !== 200) {
            validator.check.error(obj, $('label[for=' + obj.id + ']').text() + ' invalido');
            return;
         }
     });
};
validator.cep.popupConsult = function(obj, evt, callback) {
    var url = $(obj).attr('href') + '?callback='+callback;
    window.open(url, '', "width=600,height=450");
};

validator.mask = {'parent': validator};
validator.mask.int = function(e) {
    var charCode = e.which || e.keyCode;
    if ((charCode < 48 || charCode > 57) && (charCode != 8 && charCode != 46)) {
        e.returnValue = false;
        return false;
    }
    return true;
};
validator.mask.format = function(obj, mask, e) {
    var masked;
    var numerics = obj.value.toString().replace(/\-|\.|\/|\(|\)| /g, "");
    var pos = 0;
    var newVal = "";
    var sizeMask = numerics.length;

    if (e && e.keyCode != 8) {
        for (var i = 0; i <= sizeMask; i++) {
            masked = ((mask.charAt(i) == "-") || (mask.charAt(i) == ".") || (mask
                    .charAt(i) == "/"));
            masked = masked
                    || ((mask.charAt(i) == "(") || (mask.charAt(i) == ")") || (mask
                            .charAt(i) == " "));
            if (masked) {
                newVal += mask.charAt(i);
                sizeMask++;
            } else {
                newVal += numerics.charAt(pos);
                pos++;
            }
        }
        obj.value = newVal;
        return true;
    } else {
        return true;
    }
};

validator.check = {'parent': validator};
validator.check.mobile = function(obj, e) {
    if (obj.value.length) {
        var cel = obj.value.toString().replace(/\-|\.|\/|\(|\)| /g, "");
        if(cel.lengh < 8 || !$.isNumeric(cel)) {
            this.error(obj, $('label[for='+obj.id+']').text() + ' invalido!');
            return false;
        }
    }
    this.success(obj);
    return true;
};
validator.check.cep = function(obj, e) {
    if (obj.value.length) {
        var exp = /\d{2}\.\d{3}\-\d{3}/;
        if(!exp.test(obj.value)) {
            this.error(obj, $('label[for='+obj.id+']').text() + ' invalido!');
            return false;
        }
    }
    this.success(obj);
    return true;

};
validator.check.cpf = function(obj, e) {
    if (obj.value.length) {
        if(!this.parent.isValidCpf(obj.value))    {
            this.error(obj, $('label[for='+obj.id+']').text() + ' invalido!');
            return false;
        }
    }
    this.success(obj);
    return true;
};
validator.check.error = function(obj, msg) {
    var parent = $(obj).parent();
    parent.addClass('has-error has-feedback');
    parent.find('.input-error').html('

'+msg+'

');
};
validator.check.success = function(obj) {
    var parent = $(obj).parent();
    parent.removeClass('has-error has-feedback');
    parent.find('.input-error').html('');
};

function zeroPadding(str, size) {
    str = str.toString();
    return str.length < size ? zeroPadding("0" + str, size) : str;
    }
function checkVoterRegistration(inscricao) {
  var paddedInsc = inscricao;
  var dig1 = 0;
  var dig2 = 0;
  var tam = paddedInsc.length;
  var digitos = paddedInsc.substr(tam - 2, 2);
  var estado = paddedInsc.substr(tam - 4, 2);
  var titulo = paddedInsc.substr(0, tam - 2);
  var exce = (estado == '01') || (estado == '02');
  dig1 = (titulo.charCodeAt(0) - 48) * 9 + (titulo.charCodeAt(1) - 48) * 8
      + (titulo.charCodeAt(2) - 48) * 7 + (titulo.charCodeAt(3) - 48) * 6
      + (titulo.charCodeAt(4) - 48) * 5 + (titulo.charCodeAt(5) - 48) * 4
      + (titulo.charCodeAt(6) - 48) * 3 + (titulo.charCodeAt(7) - 48) * 2;
  var resto = (dig1 % 11);
  if (resto == 0) {
    if (exce) {
      dig1 = 1;
    } else {
      dig1 = 0;
    }
  } else {
    if (resto == 1) {
      dig1 = 0;
    } else {
      dig1 = 11 - resto;
    }
  }
  dig2 = (titulo.charCodeAt(8) - 48) * 4 + (titulo.charCodeAt(9) - 48) * 3
      + dig1 * 2;
  resto = (dig2 % 11);
  if (resto == 0) {
    if (exce) {
      dig2 = 1;
    } else {
      dig2 = 0;
    }
  } else {
    if (resto == 1) {
      dig2 = 0;
    } else {
      dig2 = 11 - resto;
    }
  }
  if ((digitos.charCodeAt(0) - 48 == dig1)
      && (digitos.charCodeAt(1) - 48 == dig2)) {
    return true; // Titulo valido
  } else {
    return false;
  }
}

//$(document).ajaxSend(lcAutoLoader.start);
//$(document).ajaxComplete(lcAutoLoader.stop);
function Pwindow(options) {
  var opts = {
    id : '__default',
    label : '',
    type: 'get',
    dataType : 'html',
    selector: null,
    _selector : function () {
      return opts.selector || $('#'+opts.id+' .modal-content');
    },
    beforeSend: function() {
      $('#'+opts.id).modal('hide');
      opts._selector().html('');
    },
    success : function(data, textStatus, jqXHR) {
      opts._selector().html(data);
    },
    complete: function() {
      $('#'+opts.id).modal('show');
    }
  };
  opts = $.extend(true, {}, opts, options);
  if (!$('#'+opts.id).length) {
    var html = '
'+
      '

';
    $('.settings-content').append(html);
  }
  if (!opts.url) {
    return alert('dunno');
  }
  $.ajax(opts);
}
var lcInfiniteGrid = {
  /* aqui eh funcao que cria a instancia do infintyscroll quando clica num botao*/
  "scrollNextButton" : function(event) {
    /* escondendo o botao */
    $(this).addClass('infinitescroll-loading');
    /*o data-retrive eh onde esta armazedo o id do elemento que vamos criar a instancia do scroll, eh onde esta a grid */
    lcInfiniteGrid.common($(this).attr('data-retrive'));
    $($(this).attr('data-retrive')).infinitescroll('retrieve');
  },
  /* aqui colocamos metodo para criar instancias do infinitescroll*/
  "common" : function(_id) {
    /*testamos se ja tem o bind do plugin infinitescroll 'https://github.com/paulirish/infinite-scroll', pois as vezes o elemento eh trocado e perde  a instancia */
    if (!$(_id).data('infinitescroll')) {
      /*opcoes padroes para um grid padrao usado o html criado pelo grid_layout.html.twig*/
      var opts = {
            debug: false,
              navSelector  : _id + ' .pagination',
              nextSelector : _id + ' .pagination a:last',
              itemSelector : _id + ' .row.common-grid-result',
              contentSelector: _id + ' .tab-pane.active',
              bufferPx     : 0,
              state : {
                /* tem que dizer qual o numero da pagina atual*/
                currPage: Number($(_id).attr('data-grid-currpage'))
              },
              loading: {
                /*aqui é para colocar um loader se quiser*/
                  msg: $('

'),
                  img: null
              },
              pathParse: function (path, currPage) {
                /* aqui colocamos uma expressao para filtrar da url qual o numero da pagina, pois isso importa para o plugin*/
                var matches = path.match(/^(.*[?|&]page=)\d+(.*|$)/);
                if (matches) {
                  return matches.slice(1);
                }
              }
          };
      /* fazemos um merge dos parametros extras que podem vir da grid*/
      var extraOpts = $(_id).data('grid-extra-opts');
      if (extraOpts) {
        if (extraOpts.binder) {
          extraOpts.binder = $(extraOpts.binder);
        }
      }
      opts = $.extend(true, {}, opts, extraOpts);
      $(_id).infinitescroll(opts,
        function( newElements, data, url ) {
        /*somente uma funcao de callback para ver se ja atingimos a ultima pagina para tirar o botao paginador*/
          var isLast = false;
          for (x in newElements) {
            if (isLast = newElements[x].classList.contains("row-last")) {
              break;
            }
          }
          if (isLast) {
            $(_id+' .infinitescroll-next-button').removeClass('infinitescroll-loading');
          }
      });
      /* aqui testamos se é para usar o autoscroll ou nao */
      if (extraOpts && extraOpts.behavior && extraOpts.behavior == 'local') {
        /*console.log('here');*/
      } else {
        /*isso aqui eh para tirar o autoscroll*/
        $(window).unbind('.infscr');
      }
      }
  },
  "startUp" : function() {
    /*funcao para criar instancia ao iniciar a pagina, important quando temo autoscroll sem o botao paginador*/
    lcInfiniteGrid.common('#'+$(this).attr('id'));
  }
}
/* conjunto de funcao para fazer um multiplo select, sem a listagem de todas as opcoes ao mesmo tempo */
var lcAcWidget = {
  /* funcao que dispara quando se clica no botao filtra do multiplo select */
  onSearch : function(event){
      var self = $(this);
      /*aqui pegamos os parametro de filtragem via ajax*/
      var opts = self.data('ac-attr');
      opts = opts.filter;
      var data = {};
      /* montamos os dados que vao ser enviado via ajax*/
      for (var x in opts.extra_form_prop) {
        data[x] = $('#'+opts.extra_form_prop[x]).val();
      }
      data[opts.search_prop] = $(this).parent().prev().val();
      $.ajax({
        type: 'get',
        url: opts.route,
        data: {"ac_data":data},
        dataType : 'html',
        success : function(data, textStatus, jqXHR) {
          /*aqui recebemos uma grid e disparamos os infinityscroll */
          self.parents().find('.ac-magicbox .ac-scrollspy-opts').html(data);
          lcInfiniteGrid.common('#' + $(data).attr('id'));
        }
        });
    },
    /*aqui eh acao do botao do multiple select, q quando diparado retira o item da grid de pesquisa e coloca na grid dos selecionados*/
  onClickFilteredItem : function(event){
      var src = '.ac-scrollspy-opts';
      var target = '.ac-scrollspy-opts-selected .common-grid-results .tab-pane.active';
      var id = '#'+ $(this).attr('id');
      if (!$(target).length || $(target+" .row:has("+id+"):last").length) {
        $(src+" .row:has("+id+"):last").remove();
      } else {
        $(src+" .row:has("+id+"):last").appendTo(target);
      }
    },
    /* aqui eh acao do botao do multiple select, q quando diparado retira o item da grid dos selecionado e coloca na grid de pesquisa*/
    onClickSelectedItem : function(event){
      var target = '.ac-scrollspy-opts .common-grid-results .tab-pane.active';
      var src = '.ac-scrollspy-opts-selected';
      var id = '#'+ $(this).attr('id');
      if (!$(target).length || $(target+" .row:has("+id+"):last").length) {
        $(src+" .row:has("+id+"):last").remove();
      } else {
        $(src+" .row:has("+id+"):last").appendTo(target);
      }
    },
    /* aqui é quando clico para poder abrir o multiplo select*/
    onClickSearchEnable : function(event) {
      $('.ac-search-loader').addClass('show');
      /* pegamos a referencia de qual elemento vamos criar nossa instancia do multiplesect*/
      var _id = '#'+$(this).attr('data-ac-reference');
      var mb = $(_id + ' + .ac-magicbox');
      $(_id).parent().find('.ac-tags-toolbar').toggleClass('in');
      /* checamos se o ja esta aberto ou nao o multipleselect*/
      if (mb.hasClass('in')) {
        mb.toggleClass('in');
        mb.find('.ac-scrollspy-opts-selected').html();
        mb.find('.ac-scrollspy-opts').html();
        return;
      }
      var opts = mb.find('[data-ac-attr]').data('ac-attr');
      /* criar uma funcao de callback apenas para disparar na instanciacao do nosso componente, para nao termos grid de selectionado vazia*/
      var callback = function () {
        var data = {};
        /*montamos os dados que serao enviados via ajax */
        if (opts.selected.extra_form_prop) {
            for (var x in opts.selected.extra_form_prop) {
              data[x] = $('#'+opts.selected.extra_form_prop[x]).val();
            }
        }
          $.ajax({
            type: 'get',
            url: opts.selected.route,
            /*encapsulamos numa unica variavel os dados do ajax para faciliar a vida quando a grid infinita tiver que ficar repopulando os dados*/
            data: {"ac_data":data},
            dataType : 'html',
            success : function(data, textStatus, jqXHR) {
              console.log(data);
              $('.ac-search-loader').removeClass('show');
              /*pegamos a grid de retorno e colocamos dentro da div de exibicao*/
              mb.find('.ac-scrollspy-opts-selected').html(data);
              mb.toggleClass('in');
              $('html, body').animate({scrollTop: mb.offset().top});
            }
            });
      }
      /* aqui temos um aquecimento caso nao tenhamos os itens ja selecionados*/
      var warmup = mb.find('.ac-scrollspy-opts:empty');
      if (warmup.length) {
          var data = {};
          /*montamos os dados que serao enviados via ajax*/
          for (var x in opts.filter.extra_form_prop) {
            data[x] = $('#'+opts.filter.extra_form_prop[x]).val();
          }
          $.ajax({
            type: 'get',
            url: opts.filter.route,
            /*encapsulamos numa unica variavel os dados do ajax para faciliar a vida quando a grid infinita tiver que ficar repopulando os dados*/
            data: {"ac_data":data},
            dataType : 'html',
            success : function(data, textStatus, jqXHR) {
              /*colocamos os dos dos na grid e disparmos o inifinity scroll*/
              warmup.html(data);
              lcInfiniteGrid.common('#' + $(data).attr('id'));
              callback();
            }
            });
      } else {
        callback();
      }

    },
    /* funcao apenas para fechar o componente*/
    onClickSearchCancel : function(event) {
      var _id = '#'+$(this).attr('data-ac-reference');
      var mb = $(_id + ' + .ac-magicbox');
      mb.toggleClass('in');
      $(_id).parent().find('.ac-tags-toolbar').toggleClass('in');
    },
    /*funcao para pegar os itens selecionados e converte-los para um select:multiple para poder ser enviado via formulario*/
    onClickSearchCommit : function(event) {
      /*limpamos os dados que estao presente no select:multiple*/
      var _id = '#'+$(this).attr('data-ac-reference');
      $(_id+' option').remove();
      /*limpamos as representações visuais de labels das opções do select:multiple*/
      var mb = $(_id + ' + .ac-magicbox');
      var tag = mb.parent().find('.ac-tags-toolbar');
      tag.children().remove();
      var opts = mb.find('[data-ac-attr]').data('ac-attr');
      /*pegamos os dados que estao na grid dos selecionados e colocamos eles select:multiple e criamos suas representacoes visuais*/
      mb.find('.ac-scrollspy-opts-selected .ac-search-select').each(function(a,b){
        /*pegamos os dados ocultos da grid*/
        var data = $(b).data('row');
        /*criamso as opcoes para colocar no select:multiple*/
        $(document.createElement('option')).attr('selected', 'selected').attr('value',data[opts.property_value]).text(data[opts.property_text]).appendTo(_id);
        /*criamso as "tags" que sao representacoes visuais das opcoes do select:multiple*/
        $(document.createElement('div')).addClass('btn-group').append(
        $(document.createElement('span')).addClass('label label-info').attr('type', 'button').text(data[opts.property_text])
        ).appendTo(tag);
      });
      /*exibimos a barra com as novas "tags" representando os itens do select:multiple*/
      mb.toggleClass('in');
      $(_id).parent().find('.ac-tags-toolbar').toggleClass('in');
    },
};
$(function() {

    // add bootstrap classes to forms
    $('.form-group input, .form-group select').not('.form-control').addClass('form-control');
    $('.form-group .input-error').not(':empty').parent('.form-group').addClass('has-error has-feedback');
    $('form .has-error .form-control').on('focusin', function() {
        $(this).parent('.form-group').removeClass('has-error has-feedback');
    });

    $('.file-upload .btn-upload').on('click', function() {
        $(this).siblings('input[type="file"]').trigger('click');
    });

    $('.file-upload input[type="file"]').change(function() {
        var val = $(this).val();
        $(this).siblings('.file-name').html(val.match(/[^\\/]+$/)[0]);
    });

    // sidebar behavior on mobile
    $('#toggle-settings-nav').on('click', function() {
      $('body').toggleClass('menu-open', 'no-scroll');
    });

    $('.nfgpopup').on('click', function (event){
      event.preventDefault();
        window.open($(this).attr('data-href'),'_blank','toolbar=0,location=0,scrollbars=no,resizable=no,top=0,left=500,width=400,height=750');
        return false;
    });
    $(document).on('click', 'a.link-popup', function (event){
        event.preventDefault();
        var e = $(this);
        var u = e.attr('data-href') ? e.attr('data-href') : e.attr('href');
        if (u) {
          window.open(u,'_blank',e.attr('data-specs'));
        }
        return false;
      });
    $(document).on('submit', '.form-ajax', function(event){
      event.preventDefault();
      var e = $(this);
      $.ajax({
        type: e.attr('method'),
        url: e.attr('action'),
        data: e.serialize(),
        dataType : 'html',
        success : function(data, textStatus, jqXHR) {
          $(e.attr('ajax-target')).html(data);
          history.pushState({ infiniteGrid: data }, '', '');
        }
        });
    });
    // Ajax history fix
    var currentState = history.state;
    if (currentState && currentState.infiniteGrid) {
      $("#ajax-result").html(currentState.infiniteGrid);
    }

    $(document).on('click', '.infinitescroll-next-button' , lcInfiniteGrid.scrollNextButton);
    $('[data-infinite-grid="true"]').each(lcInfiniteGrid.startUp);
    $("[data-enable-switch='1']").bootstrapSwitch();
    $(document).on('click', "[data-ac-attr]", lcAcWidget.onSearch);
    $(document).on('click', ".ac-scrollspy-opts .ac-search-select", lcAcWidget.onClickFilteredItem);
    $(document).on('click', ".ac-scrollspy-opts-selected .ac-search-select", lcAcWidget.onClickSelectedItem);
    $(document).on('click', ".ac-search-enable", lcAcWidget.onClickSearchEnable);
    $(document).on('click', ".ac-search-cancel", lcAcWidget.onClickSearchCancel);
    $(document).on('click', ".ac-search-commit", lcAcWidget.onClickSearchCommit);
    $(document).on('change mousedown', 'select[readonly="readonly"]', function(event){
        event.stopPropagation();
        event.preventDefault();
        $(this).val($(this).parents().find('[selected="selected"]').val());
    });
});

// navbar - notifications
$(function(){
  var navbarCount = $("#lc-navbar-ul .notification-total-unread-badge");

  $("#navbarUnread .notification-unread").on("click", function(event) {
    event.preventDefault();
    var self = $(this);
    var url = notificationUrl;
    url += '?'+$.param($.parseJSON(self.attr('data-row')));

    Pwindow({
      id : 'notification-modal',
      url : url,
      dataType :'json',
      selector: $('#notification-modal .modal-body'),
      success : function(data, textStatus, jqXHR) {
        if (!data) {
          return;
        }
        if (data.wasread) {
          var count  = parseInt(navbarCount.text()) - 1;
          $('.notification-total-unread-badge').text(count);
          if (self.data('row').client_id) {
              var sideSelector = $('#inbox-count-unread-'+self.data('row').client_id);
              if (sideSelector.length) {
                  sideSelector.contents().first().replaceWith(document.createTextNode(parseInt(sideSelector.text()) - 1));
              }
          }
        }
        if (!data.htmltpl) {
          data.htmltpl = '';
        }
        this.selector.html(data.htmltpl);
      }
    });

  });
});

redpajama_set_name: RedPajamaGithub


text:
import {readFileSync, writeFileSync} from 'fs';
import {dirname, join} from 'path';
import * as shx from 'shelljs';
import {Configuration, Linter} from 'tslint';

describe('Google3 initial navigation tslint rule', () => {
  const rulesDirectory = dirname(require.resolve('../../migrations/google3/initialNavigationRule'));

  let tmpDir: string;

  beforeEach(() => {
    tmpDir = join(process.env['TEST_TMPDIR']!, 'google3-test');
    shx.mkdir('-p', tmpDir);

    writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
  });

  afterEach(() => shx.rm('-r', tmpDir));

  function runTSLint(fix = true) {
    const program = Linter.createProgram(join(tmpDir, 'tsconfig.json'));
    const linter = new Linter({fix, rulesDirectory: [rulesDirectory]}, program);
    const config = Configuration.parseConfigFile({rules: {'initial-navigation': true}});

    program.getRootFileNames().forEach(fileName => {
      linter.lint(fileName, program.getSourceFile(fileName)!.getFullText(), config);
    });

    return linter;
  }

  function writeFile(fileName: string, content: string) {
    writeFileSync(join(tmpDir, fileName), content);
  }

  function getFile(fileName: string) {
    return readFileSync(join(tmpDir, fileName), 'utf8');
  }

  it('should migrate legacy_disabled to disabled', () => {
    writeFile('/index.ts', `
      import { NgModule } from '@angular/core';
      import { RouterModule } from '@angular/router';

      @NgModule({
        imports: [
          RouterModule.forRoot([], {initialNavigation: 'legacy_disabled'}),
        ]
      })
      export class AppModule {
      }
    `);

    runTSLint();

    expect(getFile('/index.ts')).toContain(`{initialNavigation: 'disabled'}`);
  });

  it(`should migrate false to disabled`, () => {
    writeFile('/index.ts', `
      import { NgModule } from '@angular/core';
      import { RouterModule } from '@angular/router';

      @NgModule({
        imports: [
          RouterModule.forRoot([], {initialNavigation: false}),
        ]
      })
      export class AppModule {
      }
    `);

    runTSLint();

    expect(getFile('/index.ts')).toContain(`{initialNavigation: 'disabled'}`);
  });

  it('should migrate legacy_enabled to enabledNonBlocking', () => {
    writeFile('/index.ts', `
      import { NgModule } from '@angular/core';
      import { RouterModule } from '@angular/router';

      @NgModule({
        imports: [
          RouterModule.forRoot([], {initialNavigation: 'legacy_enabled'}),
        ]
      })
      export class AppModule {
      }
    `);

    runTSLint(true);

    expect(getFile('/index.ts')).toContain(`{initialNavigation: 'enabledNonBlocking'}`);
  });

  it(`should migrate true to enabledNonBlocking`, () => {
    writeFile('/index.ts', `
      mport { NgModule } from '@angular/core';
        import { RouterModule } from '@angular/router';

        @NgModule({
          imports: [
            RouterModule.forRoot([], {initialNavigation: true}),
          ]
        })
        export class AppModule {
        }
    `);

    runTSLint(true);

    expect(getFile('/index.ts')).toContain(`{initialNavigation: 'enabledNonBlocking'}`);
  });

  it('should migrate nested objects', () => {
    writeFile('/index.ts', `
        import { NgModule } from '@angular/core';
        import { RouterModule } from '@angular/router';

        const options = {initialNavigation: 'legacy_enabled'};

        @NgModule({
          imports: [
            RouterModule.forRoot([], {initialNavigation: 'legacy_disabled', ...options}),
          ]
        })
        export class AppModule {
        }
      `);

    runTSLint(true);
    expect(getFile('/index.ts'))
        .toContain(`const options = {initialNavigation: 'enabledNonBlocking'};`);
    expect(getFile('/index.ts')).toContain(`{initialNavigation: 'disabled', ...options}`);
  });

  it('should migrate nested objects mixed validity', () => {
    writeFile('/index.ts', `
        import { NgModule } from '@angular/core';
        import { RouterModule } from '@angular/router';

        const options = {initialNavigation: 'legacy_enabled'};

        @NgModule({
          imports: [
            RouterModule.forRoot([], {initialNavigation: 'disabled', ...options}),
          ]
        })
        export class AppModule {
        }
      `);

    runTSLint(true);
    expect(getFile('/index.ts'))
        .toContain(`const options = {initialNavigation: 'enabledNonBlocking'};`);
  });

  it('should migrate nested objects opposite order', () => {
    writeFile('/index.ts', `
        import { NgModule } from '@angular/core';
        import { RouterModule } from '@angular/router';

        const options = {initialNavigation: 'legacy_enabled'};

        @NgModule({
          imports: [
            RouterModule.forRoot([], {...options, initialNavigation: 'legacy_disabled'}),
          ]
        })
        export class AppModule {
        }
      `);

    runTSLint(true);
    expect(getFile('/index.ts'))
        .toContain(`const options = {initialNavigation: 'enabledNonBlocking'};`);
    expect(getFile('/index.ts')).toContain(`{...options, initialNavigation: 'disabled'}`);
  });

  it('should migrate nested objects mixed validity opposite order', () => {
    writeFile('/index.ts', `
        import { NgModule } from '@angular/core';
        import { RouterModule } from '@angular/router';

        const options = {initialNavigation: 'legacy_enabled'};

        @NgModule({
          imports: [
            RouterModule.forRoot([], {...options, initialNavigation: 'disabled'}),
          ]
        })
        export class AppModule {
        }
      `);

    runTSLint(true);
    expect(getFile('/index.ts'))
        .toContain(`const options = {initialNavigation: 'enabledNonBlocking'};`);
    expect(getFile('/index.ts')).toContain(`{...options, initialNavigation: 'disabled'}`);
  });
});


text:
<ion-header>
  <ion-navbar>
    <ion-title>LCL Booking</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding class="no-scroll">

  <ion-list no-lines>

    <ion-item no-padding>
      <ion-label>POD</ion-label>
      <ion-select [(ngModel)]="pod">
        <ion-option selected value="default">Default</ion-option>
        <ion-option value="HK">Hongkong</ion-option>
        <ion-option value="JP">Japan</ion-option>
      </ion-select>
    </ion-item>

    <ion-item no-padding>
      <ion-label>Date</ion-label>
      <ion-datetime displayFormat="DDDD/DD/MMM/YYYY" min="2016" max="2020-10-31" [(ngModel)]="myDate" placeholder="Select Date"></ion-datetime>
    </ion-item>

    <ion-item no-padding>
      <ion-label>Volume (CBM) : </ion-label>
      <ion-input type="text" placeholder="volume"></ion-input>
    </ion-item>

    <ion-item no-padding>
      <ion-label>Gross Weight : </ion-label>
      <ion-input type="text" placeholder="g.w."></ion-input>
      <ion-select [(ngModel)]="gw">
        <ion-option selected value="ton">TON</ion-option>
        <ion-option value="kg">KG</ion-option>
      </ion-select>
    </ion-item>

  </ion-list>

  <button (click)="showMore=!showMore" ion-button icon-right small clear class="align-right">

			<span *ngIf="!showMore">More detail
			  <ion-icon name="arrow-down"></ion-icon>
			 </span>

    <span *ngIf="showMore">Hide detail
			  <ion-icon name="arrow-up"></ion-icon>
			 </span>

  </button>

  <ion-list *ngIf="showMore" no-lines>

    <ion-item no-padding>
      <ion-label>Commodity</ion-label>
      <ion-select [(ngModel)]="commodity">
        <ion-option selected value="default">Cartons</ion-option>
        <ion-option value="se">Ceramic</ion-option>
        <ion-option value="gl">Glasses</ion-option>
      </ion-select>
    </ion-item>

    <ion-item no-padding>
      <ion-label>Quantity : </ion-label>
      <ion-input type="text" placeholder="quantity"></ion-input>
      <ion-select [(ngModel)]="quantity">
        <ion-option selected value="default">EA</ion-option>
        <ion-option value="pi">Pieces</ion-option>
        <ion-option value="bx">Boxs</ion-option>
      </ion-select>
    </ion-item>

    <ion-item no-padding>
      <ion-label>Addition Detail : </ion-label>
      <ion-input type="text" placeholder="addition"></ion-input>
    </ion-item>

    <br/>
    <ion-list-header>
      Shipper Reference
    </ion-list-header>

    <ion-item no-padding>Carrier :</ion-item>
    <ion-item no-padding>Vessel :</ion-item>
    <ion-item no-padding>Feeder :</ion-item>
    <ion-item no-padding>Closing Date :</ion-item>
    <ion-item no-padding>ETD :</ion-item>
    <ion-item no-padding>ETA :</ion-item>

  </ion-list>
  <button (click)="toSummary();" ion-button icon-right block >
    Next
    <ion-icon ios="ios-arrow-forward" md="md-arrow-forward"></ion-icon>
  </button>
</ion-content>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using System.Globalization;
using System.Linq;
using AutoRest.CompositeSwagger.Model;
using AutoRest.CompositeSwagger.Properties;
using AutoRest.Core;
using AutoRest.Core.ClientModel;
using AutoRest.Core.Logging;
using AutoRest.Core.Utilities;
using AutoRest.Swagger;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace AutoRest.CompositeSwagger
{
    public class CompositeSwaggerModeler : Modeler
    {
        public CompositeSwaggerModeler(Settings settings) : base(settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
        }

        public override string Name
        {
            get { return "CompositeSwagger"; }
        }

        public override ServiceClient Build()
        {
            var compositeSwaggerModel = Parse(Settings.Input);
            if (compositeSwaggerModel == null)
            {
                throw ErrorManager.CreateError(Resources.ErrorParsingSpec);
            }

            if (!compositeSwaggerModel.Documents.Any())
            {
                throw ErrorManager.CreateError(string.Format(CultureInfo.InvariantCulture, "{0}. {1}",
                    Resources.ErrorParsingSpec, "Documents collection can not be empty."));
            }

            if (compositeSwaggerModel.Info == null)
            {
                throw ErrorManager.CreateError(Resources.InfoSectionMissing);
            }

            ServiceClient compositeClient = InitializeServiceClient(compositeSwaggerModel);

            foreach (var childSwaggerPath in compositeSwaggerModel.Documents)
            {
                Settings.Input = childSwaggerPath;
                var swaggerModeler = new SwaggerModeler(Settings);
                var serviceClient = swaggerModeler.Build();
                compositeClient = Merge(compositeClient, serviceClient);
            }
            return compositeClient;
        }

        private ServiceClient InitializeServiceClient(CompositeServiceDefinition compositeSwaggerModel)
        {
            ServiceClient compositeClient = new ServiceClient();

            if (string.IsNullOrWhiteSpace(Settings.ClientName))
            {
                if (compositeSwaggerModel.Info.Title == null)
                {
                    throw ErrorManager.CreateError(Resources.TitleMissing);
                }

                compositeClient.Name = compositeSwaggerModel.Info.Title.Replace(" ", "");
            }
            else
            {
                compositeClient.Name = Settings.ClientName;
            }
            compositeClient.Namespace = Settings.Namespace;
            compositeClient.Documentation = compositeSwaggerModel.Info.Description;

            return compositeClient;
        }

        private CompositeServiceDefinition Parse(string input)
        {
            var inputBody = Settings.FileSystem.ReadFileAsText(input);
            try
            {
                var settings = new JsonSerializerSettings
                {
                    TypeNameHandling = TypeNameHandling.None,
                    MetadataPropertyHandling = MetadataPropertyHandling.Ignore
                };
                return JsonConvert.DeserializeObject<CompositeServiceDefinition>(inputBody, settings);
            }
            catch (JsonException ex)
            {
                throw ErrorManager.CreateError(string.Format(CultureInfo.InvariantCulture, "{0}. {1}",
                    Resources.ErrorParsingSpec, ex.Message), ex);
            }
        }

        private static ServiceClient Merge(ServiceClient compositeClient, ServiceClient subClient)
        {
            if (compositeClient == null)
            {
                throw new ArgumentNullException("compositeClient");
            }

            if (subClient == null)
            {
                throw new ArgumentNullException("subClient");
            }

            // Merge
            if(compositeClient.BaseUrl == null)
            {
                compositeClient.BaseUrl = subClient.BaseUrl;
            }
            else
            {
                AssertEquals(compositeClient.BaseUrl, subClient.BaseUrl, "BaseUrl");
            }

            // Copy client properties
            foreach (var subClientProperty in subClient.Properties)
            {
                if (subClientProperty.SerializedName == "api-version")
                {
                    continue;
                }

                var compositeClientProperty = compositeClient.Properties.FirstOrDefault(p => p.Name == subClientProperty.Name);
                if (compositeClientProperty == null)
                {
                    compositeClient.Properties.Add(subClientProperty);
                }
                else
                {
                    AssertJsonEquals(compositeClientProperty, subClientProperty);
                }
            }

            // Copy models
            foreach (var subClientModel in subClient.ModelTypes)
            {
                var compositeClientModel = compositeClient.ModelTypes.FirstOrDefault(p => p.Name == subClientModel.Name);
                if (compositeClientModel == null)
                {
                    compositeClient.ModelTypes.Add(subClientModel);
                }
                else
                {
                    AssertJsonEquals(compositeClientModel, subClientModel);
                }
            }

            // Copy enum types
            foreach (var subClientModel in subClient.EnumTypes)
            {
                var compositeClientModel = compositeClient.EnumTypes.FirstOrDefault(p => p.Name == subClientModel.Name);
                if (compositeClientModel == null)
                {
                    compositeClient.EnumTypes.Add(subClientModel);
                }
                else
                {
                    AssertJsonEquals(compositeClientModel, subClientModel);
                }
            }

            // Copy error types
            foreach (var subClientModel in subClient.ErrorTypes)
            {
                var compositeClientModel = compositeClient.ErrorTypes.FirstOrDefault(p => p.Name == subClientModel.Name);
                if (compositeClientModel == null)
                {
                    compositeClient.ErrorTypes.Add(subClientModel);
                }
                else
                {
                    AssertJsonEquals(compositeClientModel, subClientModel);
                }
            }

            // Copy header types
            foreach (var subClientModel in subClient.HeaderTypes)
            {
                var compositeClientModel = compositeClient.HeaderTypes.FirstOrDefault(p => p.Name == subClientModel.Name);
                if (compositeClientModel == null)
                {
                    compositeClient.HeaderTypes.Add(subClientModel);
                }
                else
                {
                    AssertJsonEquals(compositeClientModel, subClientModel);
                }
            }

            // Copy methods
            foreach (var subClientMethod in subClient.Methods)
            {
                var apiVersionParameter = subClientMethod.Parameters.FirstOrDefault(p => p.SerializedName == "api-version");
                if (apiVersionParameter != null)
                {
                    apiVersionParameter.ClientProperty = null;
                    apiVersionParameter.IsConstant = true;
                    apiVersionParameter.DefaultValue = subClient.ApiVersion;
                    apiVersionParameter.IsRequired = true;
                }

                var compositeClientMethod = compositeClient.Methods.FirstOrDefault(m => m.ToString() == subClientMethod.ToString()
                    && m.Group == subClientMethod.Group);
                if (compositeClientMethod == null)
                {
                    // Re-link client parameters
                    foreach (var parameter in subClientMethod.Parameters.Where(p => p.ClientProperty != null))
                    {
                        var clientProperty = compositeClient.Properties
                            .FirstOrDefault(p => p.SerializedName == parameter.ClientProperty.SerializedName);
                        if (clientProperty != null)
                        {
                            parameter.ClientProperty = clientProperty;
                        }
                    }
                    compositeClient.Methods.Add(subClientMethod);
                }
            }

            return compositeClient;
        }

        private static void AssertJsonEquals<T>(T compositeParam, T subParam)
        {
            if (compositeParam != null)
            {
                var jsonSettings = new JsonSerializerSettings
                {
                    Formatting = Formatting.Indented,
                    NullValueHandling = NullValueHandling.Ignore,
                    ContractResolver = new CamelCaseContractResolver(),
                    ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                };
                jsonSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true });

                var compositeParamJson = JsonConvert.SerializeObject(compositeParam, jsonSettings);
                var subParamJson = JsonConvert.SerializeObject(subParam, jsonSettings);

                if (!compositeParamJson.Equals(subParamJson))
                {
                    throw ErrorManager.CreateError(string.Format(CultureInfo.InvariantCulture,
                        "{0}s are not the same.\nObject 1: {1}\nObject 2:{2}",
                        typeof(T).Name, compositeParamJson, subParamJson));
                }
            }
        }

        private static void AssertEquals<T>(T compositeProperty, T subProperty, string propertyName)
        {
            if (compositeProperty != null)
            {
                if (!compositeProperty.Equals(subProperty))
                {
                    throw ErrorManager.CreateError(string.Format(CultureInfo.InvariantCulture,
                        "{0} has different values in sub swagger documents.",
                        propertyName));
                }
            }
        }
    }
}


text:
__author__ = 'Mohammed Shokr <mohammedshokr2014@gmail.com>'

# import models
from nltk.corpus import brown    # import brown corpus
from nltk import Text            # import text nltk model

# brown corpus words
brown_words = brown.words(categories='humor')
print(brown_words)

# generate text from brown words
brownText = Text(brown_words)
print(brownText)

print(brownText.collocations())

print(brownText.count("car"))

print(brownText.similar('humor'))


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Lecanora substraminella B. de Lesd.

### Remarks
null


text:
if __FILE__ == $PROGRAM_NAME
  require 'fileutils'
  FileUtils.mkdir_p 'tmp'
  unless File.exists?('tmp/mruby')
    system 'git clone --depth 1 https://github.com/mruby/mruby.git tmp/mruby'
  end
  exit system(%Q[cd tmp/mruby; MRUBY_CONFIG=#{File.expand_path __FILE__} ./minirake #{ARGV.join(' ')}])
end

MRuby::Build.new do |conf|
  toolchain :clang
  conf.gembox 'default'
  conf.cc.defines += %w(ENABLE_READLINE)
  conf.gem "tmp/mruby/mrbgems/mruby-time"
  conf.gem "tmp/mruby/mrbgems/mruby-random"
  conf.gem :github => "matsumoto-r/mruby-sleep"
  conf.gem File.dirname(__FILE__)
end


text:
FOUNDATION_EXPORT double TTToolboxVersionNumber;

//! Project version string for TTToolbox.
FOUNDATION_EXPORT const unsigned char TTToolboxVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <TTToolbox/PublicHeader.h>


text:
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
                        unicode_literals, with_statement)

# ComplexityTheta(n log n)
# A bit slower in practice than quicksort - but has a better
# worst-case runtime.

# It can be slower than quicksort in practice because the worst-case
# of quicksort in most impls is very rare. And in heapsort
# there are a lot of element swaps, even if the data is already
# ordred.

# Not stable!

# Put the data in a min/max heap. The root is then the min/max.

# When an element is removed from the heap, it self balances
# so the next element will "bubble up" to the root. The
# heap operations are all superlinear - putting the elements
# in the list is dstrictly linear and is dominated by the heap operations.

# Heap properties
# Use a min-heap with the heap property of: A[PARENT (i)] <= A[i]
# Height of tree with n nodes is floor(lg n)
# nodes to height bounds: 2^h <= n <= 2^(h+1)-1  -- i.e. the last level must be between empty and full - 1.

# heapify - add an element and bubble it up to its proper position in the heap. O(lg n) - the heigth of the tree
# build_heap - linear time
# heap sort - O(n lg n)
# extract-min = remove the root rebalance= - O(lg n)

# Heap is a full binary tree (no empty spaces in interior levels) - so it can be represented as an array,
# which is space efficient.

import random

from betarepo.datastructures.comparison_mixin import ComparisonMixin
from betarepo.datastructures.trees.heap import Heap

def heapsort(A):
  # HEAPSORT procedure takes time O(n lg n), since the call to BUILD_HEAP takes time O(n) and
  #  each of the n -1 calls to Heapify takes time O(lg n).

  # implement when the heap is done.
  pass

### Test Suite ###

if __name__ == '__main__':
  #unittest.main()
  greg = Heap()
  nums = [2, 3, 6, 7, 8, 5, 90, 11, 78, 1, ]
  for num in nums:
    greg.heapify(num)

  import pdb; pdb.set_trace()


text:
package benchmark.serializer;

import java.util.Iterator;
import benchmark.model.*;
import benchmark.vocabulary.*;
import benchmark.generator.*;
import java.io.*;
import java.util.*;

public class NTriples implements Serializer {
	private FileWriter fileWriter;
	private boolean forwardChaining;
	private long nrTriples;

	public NTriples(String file, boolean forwardChaining)
	{
		try{
			fileWriter = new FileWriter(file);
		} catch(IOException e){
			System.err.println("Could not open File");
			System.exit(-1);
		}

		this.forwardChaining = forwardChaining;
		nrTriples = 0l;
	}

	public void gatherData(ObjectBundle bundle) {
		Iterator<BSBMResource> it = bundle.iterator();

		while(it.hasNext())
		{
			BSBMResource obj = it.next();
			try{
				if(obj instanceof ProductType){
					fileWriter.append(convertProductType((ProductType)obj));
				}
				else if(obj instanceof Offer){
					fileWriter.append(convertOffer((Offer)obj));
				}
				else if(obj instanceof Product){
					fileWriter.append(convertProduct((Product)obj));
				}
				else if(obj instanceof Person){
					fileWriter.append(convertPerson((Person)obj));
				}
				else if(obj instanceof Producer){
					fileWriter.append(convertProducer((Producer)obj));
				}
				else if(obj instanceof ProductFeature){
					fileWriter.append(convertProductFeature((ProductFeature)obj));
				}
				else if(obj instanceof Vendor){
					fileWriter.append(convertVendor((Vendor)obj));
				}
				else if(obj instanceof Review){
					fileWriter.append(convertReview((Review)obj));
				}
			}
			catch(IOException e){
				System.err.println("Could not write into File!");
				System.err.println(e.getMessage());
				System.exit(-1);
			}
		}
	}

	/*
	 * Converts the ProductType Object into an N-Triples String
	 * representation.
	 */
	private String convertProductType(ProductType pType)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = pType.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(BSBM.ProductType)));

		//rdfs:label
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.label),
				createLiteral(pType.getLabel())));

		//rdfs:comment
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.comment),
				createLiteral(pType.getComment())));

		//rdfs:subClassOf
		if(pType.getParent()!=null)
		{
			String parentURIREF = createURIref(BSBM.INST_NS, "ProductType"+pType.getParent().getNr());
			result.append(createTriple(
					subjectURIREF,
					createURIref(RDFS.subClassOf),
					parentURIREF));
		}

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				createURIref(BSBM.getStandardizationInstitution(1))));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(pType.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the Offer Object into an N-Triples String
	 * representation.
	 */
	private String convertOffer(Offer offer)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = offer.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(BSBM.Offer)));

		//bsbm:product
		int productNr = offer.getProduct();
		int producerNr = Generator.getProducerOfProduct(productNr);
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.product),
				Product.getURIref(productNr, producerNr)));

		//bsbm:vendor
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.vendor),
				Vendor.getURIref(offer.getVendor())));

		//bsbm:price
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.price),
				createDataTypeLiteral(offer.getPriceString(),createURIref(BSBM.USD))));

		//bsbm:validFrom
		GregorianCalendar validFrom = new GregorianCalendar();
		validFrom.setTimeInMillis(offer.getValidFrom());
		String validFromString = DateGenerator.formatDateTime(validFrom);
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.validFrom),
				createDataTypeLiteral(validFromString, createURIref(XSD.DateTime))));

		//bsbm:validTo
		GregorianCalendar validTo = new GregorianCalendar();
		validTo.setTimeInMillis(offer.getValidTo());
		String validToString = DateGenerator.formatDateTime(validTo);
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.validTo),
				createDataTypeLiteral(validToString, createURIref(XSD.DateTime))));

		//bsbm:deliveryDays
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.deliveryDays),
				createDataTypeLiteral(offer.getDeliveryDays().toString(), createURIref(XSD.Integer))));

		//bsbm:offerWebpage
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.offerWebpage),
				createURIref(offer.getOfferWebpage())));

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				Vendor.getURIref(offer.getVendor())));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(offer.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the Product Object into an N-Triples String
	 * representation.
	 */
	private String convertProduct(Product product)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = product.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(BSBM.Product)));

		//rdfs:label
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.label),
				createLiteral(product.getLabel())));

		//rdfs:comment
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.comment),
				createLiteral(product.getComment())));

		//bsbm:productType
		if(forwardChaining) {
			ProductType pt = product.getProductType();
			while(pt!=null) {
				result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						pt.toString()));
				pt = pt.getParent();
			}
		}
		else {
			result.append(createTriple(
					subjectURIREF,
					createURIref(RDF.type),
					product.getProductType().toString()));
		}

		//bsbm:producer
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.producer),
				Producer.getURIref(product.getProducer())));

		//bsbm:productPropertyNumeric
		Integer[] ppn = product.getProductPropertyNumeric();
		for(int i=0,j=1;i<ppn.length;i++,j++)
		{
			Integer value = ppn[i];
			if(value!=null)
				result.append(createTriple(
						subjectURIREF,
						createURIref(BSBM.getProductPropertyNumeric(j)),
						createDataTypeLiteral(value.toString(), createURIref(XSD.Integer))));
		}

		//bsbm:productPropertyTextual
		String[] ppt = product.getProductPropertyTextual();
		for(int i=0,j=1;i<ppt.length;i++,j++)
		{
			String value = ppt[i];
			if(value!=null)
				result.append(createTriple(
						subjectURIREF,
						createURIref(BSBM.getProductPropertyTextual(j)),
						createDataTypeLiteral(value, createURIref(XSD.String))));
		}

		//bsbm:productFeature
		Iterator<Integer> pf = product.getFeatures().iterator();
		while(pf.hasNext())
		{
			Integer value = pf.next();
			result.append(createTriple(
					subjectURIREF,
					createURIref(BSBM.productFeature),
					ProductFeature.getURIref(value)));
		}

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				Producer.getURIref(product.getProducer())));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(product.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the Person Object into an N-Triples String
	 * representation.
	 */
	private String convertPerson(Person person)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = person.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(FOAF.Person)));

		//foaf:name
		result.append(createTriple(
				subjectURIREF,
				createURIref(FOAF.name),
				createLiteral(person.getName())));

		//foaf:mbox_sha1sum
		result.append(createTriple(
				subjectURIREF,
				createURIref(FOAF.mbox_sha1sum),
				createLiteral(person.getMbox_sha1sum())));

		//bsbm:country
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.country),
				createURIref(ISO3166.find(person.getCountryCode()))));

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				RatingSite.getURIref(person.getPublisher())));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(person.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the Producer Object into an N-Triples String
	 * representation.
	 */
	private String convertProducer(Producer producer)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = producer.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(BSBM.Producer)));

		//rdfs:label
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.label),
				createLiteral(producer.getLabel())));

		//rdfs:comment
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.comment),
				createLiteral(producer.getComment())));

		//foaf:homepage
		result.append(createTriple(
				subjectURIREF,
				createURIref(FOAF.homepage),
				createURIref(producer.getHomepage())));

		//bsbm:country
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.country),
				createURIref(ISO3166.find(producer.getCountryCode()))));

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				producer.toString()));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(producer.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the ProductFeature Object into an N-Triples String
	 * representation.
	 */
	private String convertProductFeature(ProductFeature pf)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = createURIref(BSBM.INST_NS, "ProductFeature"+pf.getNr());

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(BSBM.ProductFeature)));

		//rdfs:label
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.label),
				createLiteral(pf.getLabel())));

		//rdfs:comment
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.comment),
				createLiteral(pf.getComment())));

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				createURIref(BSBM.getStandardizationInstitution(pf.getPublisher()))));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(pf.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the Vendor Object into an N-Triples String
	 * representation.
	 */
	private String convertVendor(Vendor vendor)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = vendor.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(BSBM.Vendor)));

		//rdfs:label
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.label),
				createLiteral(vendor.getLabel())));

		//rdfs:comment
		result.append(createTriple(
				subjectURIREF,
				createURIref(RDFS.comment),
				createLiteral(vendor.getComment())));

		//foaf:homepage
		result.append(createTriple(
				subjectURIREF,
				createURIref(FOAF.homepage),
				createURIref(vendor.getHomepage())));

		//bsbm:country
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.country),
				createURIref(ISO3166.find(vendor.getCountryCode()))));

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				vendor.toString()));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(vendor.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	/*
	 * Converts the Review Object into an N-Triples String
	 * representation.
	 */
	private String convertReview(Review review)
	{
		StringBuffer result = new StringBuffer();
		//First the uriref for the subject
		String subjectURIREF = review.toString();

		//rdf:type
		result.append(createTriple(
						subjectURIREF,
						createURIref(RDF.type),
						createURIref(REV.Review)));

		//bsbm:reviewFor
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.reviewFor),
				Product.getURIref(review.getProduct(), review.getProducerOfProduct())));

		//rev:reviewer
		result.append(createTriple(
				subjectURIREF,
				createURIref(REV.reviewer),
				Person.getURIref(review.getPerson(), review.getPublisher())));

		//bsbm:reviewDate
		GregorianCalendar reviewDate = new GregorianCalendar();
		reviewDate.setTimeInMillis(review.getReviewDate());
		String reviewDateString = DateGenerator.formatDateTime(reviewDate);
		result.append(createTriple(
				subjectURIREF,
				createURIref(BSBM.reviewDate),
				createDataTypeLiteral(reviewDateString, createURIref(XSD.DateTime))));

		//dc:title
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.title),
				createLiteral(review.getTitle())));

		//rev:text
		result.append(createTriple(
				subjectURIREF,
				createURIref(REV.text),
				createLanguageLiteral(review.getText(),ISO3166.language[review.getLanguage()])));

		//bsbm:ratingX
		Integer[] ratings = review.getRatings();
		for(int i=0,j=1;i<ratings.length;i++,j++)
		{
			Integer value = ratings[i];
			if(value!=null)
				result.append(createTriple(
						subjectURIREF,
						createURIref(BSBM.getRating(j)),
						createDataTypeLiteral(value.toString(), createURIref(XSD.Integer))));
		}

		//dc:publisher
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.publisher),
				RatingSite.getURIref(review.getPublisher())));

		//dc:date
		GregorianCalendar date = new GregorianCalendar();
		date.setTimeInMillis(review.getPublishDate());
		String dateString = DateGenerator.formatDate(date);
		result.append(createTriple(
				subjectURIREF,
				createURIref(DC.date),
				createDataTypeLiteral(dateString, createURIref(XSD.Date))));

		return result.toString();
	}

	//Create Literal
	private String createLiteral(String value)
	{
		StringBuffer result = new StringBuffer();
		result.append("\"");
		result.append(value);
		result.append("\"");
		return result.toString();
	}

	//Create typed literal
	private String createDataTypeLiteral(String value, String datatypeURI)
	{
		StringBuffer result = new StringBuffer();
		result.append("\"");
		result.append(value);
		result.append("\"^^");
		result.append(datatypeURI);
		return result.toString();
	}

	//Create language tagged literal
	private String createLanguageLiteral(String text, String languageCode)
	{
		StringBuffer result = new StringBuffer();
		result.append("\"");
		result.append(text);
		result.append("\"@");
		result.append(languageCode);
		return result.toString();
	}

	//Creates a triple
	private String createTriple(String subject, String predicate, String object)
	{
		StringBuffer result = new StringBuffer();
		result.append(subject);
		result.append(" ");
		result.append(predicate);
		result.append(" ");
		result.append(object);
		result.append(" .\n");

		nrTriples++;

		return result.toString();
	}

	//Create URIREF from namespace and element
	private String createURIref(String namespace, String element)
	{
		StringBuffer result = new StringBuffer();
		result.append("<");
		result.append(namespace);
		result.append(element);
		result.append(">");
		return result.toString();
	}

	//Create URIREF from URI
	private String createURIref(String uri)
	{
		StringBuffer result = new StringBuffer();
		result.append("<");
		result.append(uri);
		result.append(">");
		return result.toString();
	}

	public void serialize() {
		//Close File
		try {
			fileWriter.flush();
			fileWriter.close();
		} catch(IOException e) {
			System.err.println(e.getMessage());
			System.exit(-1);
		}
	}

	public Long triplesGenerated() {
		return nrTriples;
	}
}


text:
export Chip from './Chip'
export ButtonChip from './ButtonChip'
export ChipContact from './ChipContact'


text:
import request from 'api/request.js';

export const fetchSideBar = request('newspaper/news-at/api/4/themes');


text:
package com.example.bumblebee.intelligentsurgicalknife.model;

import android.content.ContentValues;

import org.litepal.crud.DataSupport;

import java.util.List;

/**
 * Created by bumblebee on 2017/1/17.
 *
 */

public class Teacher extends DataSupport {
    private String teacherName;
    private String teacherPassword;

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public void setTeacherPassword(String teacherPassword) {
        this.teacherPassword = teacherPassword;
    }

    public String getTeacherName() {

        return teacherName;
    }

    public String getTeacherPassword() {
        return teacherPassword;
    }

    public static void changePassword(String username, String password) {
        ContentValues values = new ContentValues();
        values.put("teacherPassword", password);
        DataSupport.updateAll(Teacher.class, values, "teacherName = ?", username);
    }
    public static boolean signUp(String username, String password) {
        Teacher teacher = new Teacher();
        teacher.setTeacherName(username);
        teacher.setTeacherPassword(password);

        return teacher.save();
    }
    public static boolean isIdentityLegal(String username, String password) {
        List<Teacher> teachers = DataSupport.findAll(Teacher.class);
        for (Teacher teacher : teachers) {
            if (teacher.getTeacherName().equals(username)) {
                if (teacher.getTeacherPassword().equals(password)) {
                    return true;
                }
                return false;
            }
        }
        return false;
    }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.aksw.sdw</groupId>
	<artifactId>AvroImporter</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>AvroImporter</name>
	<parent>
		<groupId>org.aksw.sdw</groupId>
		<artifactId>SmartDataWebUtils</artifactId>
		<version>0.0.1-SNAPSHOT</version>
	</parent>
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<mainClass>aksw.org.sdw.importer.avro.Main</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<mainClass>aksw.org.sdw.importer.avro.Main</mainClass>
						</manifest>
					</archive>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<repositories>
		<repository>
			<id>SD4M.net repository</id>
			<name>SD4M.net repository</name>
			<url>http://readonly:readonly@sd4m.net:8085/artifactory/libs-snapshot-local</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>jitpack.io</id>
			<url>https://jitpack.io</url>
		</repository>
	</repositories>
	<dependencies>
		<dependency>
			<groupId>com.github.NLP2RDF</groupId>
			<artifactId>NIF-lib</artifactId>
			<version>369e096d45</version>
		</dependency>
<!-- 		<dependency>
			<groupId>com.github.jitpack</groupId>
			<artifactId>maven-simple</artifactId>
			<version>master-SNAPSHOT</version>
		</dependency> -->
<!-- 	<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-tdb</artifactId>
			<version>3.3.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-core</artifactId>
			<version>3.3.0</version>
		</dependency>
 		<dependency>
			<groupId>org.nlp2rdf</groupId>
			<artifactId>nif</artifactId>
			<version>0.3.8</version>
		</dependency> -->
		<dependency>
			<groupId>org.apache.avro</groupId>
			<artifactId>avro</artifactId>
			<version>1.8.1</version>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.0</version>
		</dependency>
		<dependency>
			<groupId>de.dfki.lt.spree</groupId>
			<artifactId>sdw-tools</artifactId>
			<version>1.0-SNAPSHOT</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
		<dependency>
			<groupId>commons-cli</groupId>
			<artifactId>commons-cli</artifactId>
			<version>1.2</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.eclipse.rdf4j/rdf4j-rio-trig -->
		<dependency>
			<groupId>org.eclipse.rdf4j</groupId>
			<artifactId>rdf4j-rio-trig</artifactId>
			<version>2.2.2</version>
		</dependency>
	</dependencies>
</project>


text:
from solum.api.controllers import common_types
from solum.api.controllers.v1.datamodel import types as api_types

class Formats(api_types.Base):
    """CAMP v1.1 formats resource model."""

    format_links = [common_types.Link]
    """This attribute contains Links to Format resources that contain
     information about data serialization formats supported by the Platform."""

    def __init__(self, **kwds):
        super(Formats, self).__init__(**kwds)


text:
using Bebop
using Base.Test

if length(ARGS) < 1
    error("missing argument")
end

const duration = 5

openFile(ARGS[1]) do file
    sampRate = file.sfinfo.samplerate
    channels = file.sfinfo.channels
    frames = readFrames(file, sampRate * duration)
    letsjam(sampRate, channels, Int16) do
        play(frames)
    end
end


text:
//
//  GetCodeBtn.m
//  Sfj
//
//  Created by M on 2017/3/25.
//  Copyright © 2017年 dabao. All rights reserved.
//

#import "GetCodeBtn.h"

@interface GetCodeBtn ()

@property (nonatomic, assign) NSInteger second;
@property (nonatomic, weak) NSTimer *timer;

@end

@implementation GetCodeBtn

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)init {
    if (self = [super init]) {
        self.backgroundColor = [UIColor colorWithRed:0.80 green:0.80 blue:0.80 alpha:1.00];
        [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [self setTitle:@"获取验证码" forState:UIControlStateNormal];
        self.titleLabel.font = kSystemFont(14);
        self.selected = YES;

        [[self rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {

//            AFHTTPSessionManager *session = [AFHTTPSessionManager manager];
//            session.requestSerializer = [AFHTTPRequestSerializer serializer];
//            session.responseSerializer = [AFHTTPResponseSerializer serializer];
//            [session.responseSerializer setAcceptableContentTypes:[NSSet setWithObjects:@"text/html",@"text/plain",@"text/javascript",@"application/json",@"text/json",nil]];
//            [session POST:@"http://api.shifangju.com/user/v1/captcha/sms/send" parameters:@{@"mobile":@"13676620483", @"type":@"login"} success:^(NSURLSessionDataTask *task, id responseObject) {
//                NSLog(@"%@",responseObject);
//            } failure:^(NSURLSessionDataTask *task, NSError *error) {
//                NSLog(@"%@",error);
//            }];

            // 此处应该当在发送验证码请求成功之后执行
            if (!_timer) {

                self.selected = YES;
                _second = 60;
                _timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(countdown) userInfo:nil repeats:YES];
                [self setTitle:[NSString stringWithFormat:@"已发送(%lds)",(long)--_second] forState:UIControlStateNormal];
                self.backgroundColor = [UIColor colorWithRed:0.00 green:0.80 blue:1.00 alpha:1.00];
            }

        }];

    }
    return self;
}

- (void)countdown {

    [self setTitle:[NSString stringWithFormat:@"已发送(%lds)",(long)--_second] forState:UIControlStateNormal];

    if (_second == 0) {
        [_timer invalidate];//释放定时器
        _timer = nil;//把定时器设置成空.不然不起作用.

        [self setTitle:@"重新发送" forState:UIControlStateNormal];
        self.backgroundColor = [UIColor colorWithRed:1.00 green:0.40 blue:0.00 alpha:1.00];
    }
}

@end


text:
+++
title = "Linux"
description = "Posts about Linux: commands, scripts, and so on"
weight = 60
alwaysopen = false
+++

## Overview

This category has posts related to Linux

{{%children style="h3" description="true"%}}


text:
echo $PATH
export LC_ALL=C.UTF-8

if [[ -d .cabal && -d .ghc ]]; then
    cp -a .cabal .ghc /root
fi

cabal update

# Detect if the cache is warmed up.  If so build both versions.
if ghc-pkg --package-db /root/.cabal/store/ghc-`ghc --numeric-version`/package.db list | grep jsaddle-dom; then
    cabal new-build
    cabal new-build -fwebkit
    all_done=true
else
    # Just build jsaddle-dom
    cabal new-build jsaddle-dom
    all_done=false
fi

# update the cache
rm -rf .cabal
cp -a /root/.cabal ./
rm -rf .ghc
cp -a /root/.ghc ./

if [ "$all_done" = false ]; then
    echo "Still warming up the Cache.  Please rerun this build."
    exit 1
fi


text:
package org.docksidestage.sqlite.dbflute.readonly.bsentity;

import java.util.List;
import java.util.ArrayList;

import org.dbflute.dbmeta.DBMeta;
import org.dbflute.dbmeta.AbstractEntity;
import org.dbflute.dbmeta.accessory.DomainEntity;
import org.docksidestage.sqlite.dbflute.readonly.allcommon.RoyDBMetaInstanceHandler;
import org.docksidestage.sqlite.dbflute.readonly.exentity.*;

/**
 * The entity of PURCHASE_PAYMENT as TABLE.

 *

 * [primary-key]
 *     PURCHASE_PAYMENT_ID
 *
 * [column]
 *     PURCHASE_PAYMENT_ID, PURCHASE_ID, PAYMENT_AMOUNT, PAYMENT_DATETIME, PAYMENT_METHOD_CODE, REGISTER_DATETIME, REGISTER_USER, REGISTER_PROCESS, UPDATE_DATETIME, UPDATE_USER, VERSION_NO
 *
 * [sequence]
 *
 *
 * [identity]
 *     PURCHASE_PAYMENT_ID
 *
 * [version-no]
 *     VERSION_NO
 *
 * [foreign table]
 *
 *
 * [referrer table]
 *
 *
 * [foreign property]
 *
 *
 * [referrer property]
 *
 *
 * [get/set template]
 * /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 * Integer purchasePaymentId = entity.getPurchasePaymentId();
 * Integer purchaseId = entity.getPurchaseId();
 * String paymentAmount = entity.getPaymentAmount();
 * java.time.LocalDateTime paymentDatetime = entity.getPaymentDatetime();
 * String paymentMethodCode = entity.getPaymentMethodCode();
 * java.time.LocalDateTime registerDatetime = entity.getRegisterDatetime();
 * String registerUser = entity.getRegisterUser();
 * String registerProcess = entity.getRegisterProcess();
 * java.time.LocalDateTime updateDatetime = entity.getUpdateDatetime();
 * String updateUser = entity.getUpdateUser();
 * Integer versionNo = entity.getVersionNo();
 * entity.setPurchasePaymentId(purchasePaymentId);
 * entity.setPurchaseId(purchaseId);
 * entity.setPaymentAmount(paymentAmount);
 * entity.setPaymentDatetime(paymentDatetime);
 * entity.setPaymentMethodCode(paymentMethodCode);
 * entity.setRegisterDatetime(registerDatetime);
 * entity.setRegisterUser(registerUser);
 * entity.setRegisterProcess(registerProcess);
 * entity.setUpdateDatetime(updateDatetime);
 * entity.setUpdateUser(updateUser);
 * entity.setVersionNo(versionNo);
 * = = = = = = = = = =/
 *

 * @author DBFlute(AutoGenerator)
 */
public abstract class RoyBsPurchasePayment extends AbstractEntity implements DomainEntity {

    // ===================================================================================
    //                                                                          Definition
    //                                                                          ==========
    /** The serial version UID for object serialization. (Default) */
    private static final long serialVersionUID = 1L;

    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    /** PURCHASE_PAYMENT_ID: {PK, ID, NotNull, INTEGER(2000000000, 10)} */
    protected Integer _purchasePaymentId;

    /** PURCHASE_ID: {NotNull, INTEGER(2000000000, 10)} */
    protected Integer _purchaseId;

    /** PAYMENT_AMOUNT: {NotNull, DECIMAL(10,2)(2000000000, 10)} */
    protected String _paymentAmount;

    /** PAYMENT_DATETIME: {NotNull, DATETIME(2000000000, 10)} */
    protected java.time.LocalDateTime _paymentDatetime;

    /** PAYMENT_METHOD_CODE: {NotNull, CHAR(3)(2000000000, 10)} */
    protected String _paymentMethodCode;

    /** REGISTER_DATETIME: {NotNull, DATETIME(2000000000, 10)} */
    protected java.time.LocalDateTime _registerDatetime;

    /** REGISTER_USER: {NotNull, VARCHAR(200)(2000000000, 10)} */
    protected String _registerUser;

    /** REGISTER_PROCESS: {NotNull, TEXT(2000000000, 10)} */
    protected String _registerProcess;

    /** UPDATE_DATETIME: {NotNull, DATETIME(2000000000, 10)} */
    protected java.time.LocalDateTime _updateDatetime;

    /** UPDATE_USER: {NotNull, VARCHAR(200)(2000000000, 10)} */
    protected String _updateUser;

    /** VERSION_NO: {NotNull, INTEGER(2000000000, 10)} */
    protected Integer _versionNo;

    // ===================================================================================
    //                                                                             DB Meta
    //                                                                             =======
    /** {@inheritDoc} */
    public DBMeta asDBMeta() {
        return RoyDBMetaInstanceHandler.findDBMeta(asTableDbName());
    }

    /** {@inheritDoc} */
    public String asTableDbName() {
        return "PURCHASE_PAYMENT";
    }

    // ===================================================================================
    //                                                                        Key Handling
    //                                                                        ============
    /** {@inheritDoc} */
    public boolean hasPrimaryKeyValue() {
        if (_purchasePaymentId == null) { return false; }
        return true;
    }

    // ===================================================================================
    //                                                                    Foreign Property
    //                                                                    ================
    // ===================================================================================
    //                                                                   Referrer Property
    //                                                                   =================
    protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import
        return new ArrayList<ELEMENT>();
    }

    // ===================================================================================
    //                                                                      Basic Override
    //                                                                      ==============
    @Override
    protected boolean doEquals(Object obj) {
        if (obj instanceof RoyBsPurchasePayment) {
            RoyBsPurchasePayment other = (RoyBsPurchasePayment)obj;
            if (!xSV(_purchasePaymentId, other._purchasePaymentId)) { return false; }
            return true;
        } else {
            return false;
        }
    }

    @Override
    protected int doHashCode(int initial) {
        int hs = initial;
        hs = xCH(hs, asTableDbName());
        hs = xCH(hs, _purchasePaymentId);
        return hs;
    }

    @Override
    protected String doBuildStringWithRelation(String li) {
        return "";
    }

    @Override
    protected String doBuildColumnString(String dm) {
        StringBuilder sb = new StringBuilder();
        sb.append(dm).append(xfND(_purchasePaymentId));
        sb.append(dm).append(xfND(_purchaseId));
        sb.append(dm).append(xfND(_paymentAmount));
        sb.append(dm).append(xfND(_paymentDatetime));
        sb.append(dm).append(xfND(_paymentMethodCode));
        sb.append(dm).append(xfND(_registerDatetime));
        sb.append(dm).append(xfND(_registerUser));
        sb.append(dm).append(xfND(_registerProcess));
        sb.append(dm).append(xfND(_updateDatetime));
        sb.append(dm).append(xfND(_updateUser));
        sb.append(dm).append(xfND(_versionNo));
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length());
        }
        sb.insert(0, "{").append("}");
        return sb.toString();
    }

    @Override
    protected String doBuildRelationString(String dm) {
        return "";
    }

    @Override
    public RoyPurchasePayment clone() {
        return (RoyPurchasePayment)super.clone();
    }

    // ===================================================================================
    //                                                                            Accessor
    //                                                                            ========
    /**
     * [get] PURCHASE_PAYMENT_ID: {PK, ID, NotNull, INTEGER(2000000000, 10)}

     * @return The value of the column 'PURCHASE_PAYMENT_ID'. (basically NotNull if selected: for the constraint)
     */
    public Integer getPurchasePaymentId() {
        checkSpecifiedProperty("purchasePaymentId");
        return _purchasePaymentId;
    }

    /**
     * [set] PURCHASE_PAYMENT_ID: {PK, ID, NotNull, INTEGER(2000000000, 10)}

     * @param purchasePaymentId The value of the column 'PURCHASE_PAYMENT_ID'. (basically NotNull if update: for the constraint)
     */
    public void setPurchasePaymentId(Integer purchasePaymentId) {
        registerModifiedProperty("purchasePaymentId");
        _purchasePaymentId = purchasePaymentId;
    }

    /**
     * [get] PURCHASE_ID: {NotNull, INTEGER(2000000000, 10)}

     * @return The value of the column 'PURCHASE_ID'. (basically NotNull if selected: for the constraint)
     */
    public Integer getPurchaseId() {
        checkSpecifiedProperty("purchaseId");
        return _purchaseId;
    }

    /**
     * [set] PURCHASE_ID: {NotNull, INTEGER(2000000000, 10)}

     * @param purchaseId The value of the column 'PURCHASE_ID'. (basically NotNull if update: for the constraint)
     */
    public void setPurchaseId(Integer purchaseId) {
        registerModifiedProperty("purchaseId");
        _purchaseId = purchaseId;
    }

    /**
     * [get] PAYMENT_AMOUNT: {NotNull, DECIMAL(10,2)(2000000000, 10)}

     * @return The value of the column 'PAYMENT_AMOUNT'. (basically NotNull if selected: for the constraint)
     */
    public String getPaymentAmount() {
        checkSpecifiedProperty("paymentAmount");
        return _paymentAmount;
    }

    /**
     * [set] PAYMENT_AMOUNT: {NotNull, DECIMAL(10,2)(2000000000, 10)}

     * @param paymentAmount The value of the column 'PAYMENT_AMOUNT'. (basically NotNull if update: for the constraint)
     */
    public void setPaymentAmount(String paymentAmount) {
        registerModifiedProperty("paymentAmount");
        _paymentAmount = paymentAmount;
    }

    /**
     * [get] PAYMENT_DATETIME: {NotNull, DATETIME(2000000000, 10)}

     * @return The value of the column 'PAYMENT_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getPaymentDatetime() {
        checkSpecifiedProperty("paymentDatetime");
        return _paymentDatetime;
    }

    /**
     * [set] PAYMENT_DATETIME: {NotNull, DATETIME(2000000000, 10)}

     * @param paymentDatetime The value of the column 'PAYMENT_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setPaymentDatetime(java.time.LocalDateTime paymentDatetime) {
        registerModifiedProperty("paymentDatetime");
        _paymentDatetime = paymentDatetime;
    }

    /**
     * [get] PAYMENT_METHOD_CODE: {NotNull, CHAR(3)(2000000000, 10)}

     * @return The value of the column 'PAYMENT_METHOD_CODE'. (basically NotNull if selected: for the constraint)
     */
    public String getPaymentMethodCode() {
        checkSpecifiedProperty("paymentMethodCode");
        return _paymentMethodCode;
    }

    /**
     * [set] PAYMENT_METHOD_CODE: {NotNull, CHAR(3)(2000000000, 10)}

     * @param paymentMethodCode The value of the column 'PAYMENT_METHOD_CODE'. (basically NotNull if update: for the constraint)
     */
    public void setPaymentMethodCode(String paymentMethodCode) {
        registerModifiedProperty("paymentMethodCode");
        _paymentMethodCode = paymentMethodCode;
    }

    /**
     * [get] REGISTER_DATETIME: {NotNull, DATETIME(2000000000, 10)}

     * @return The value of the column 'REGISTER_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getRegisterDatetime() {
        checkSpecifiedProperty("registerDatetime");
        return _registerDatetime;
    }

    /**
     * [set] REGISTER_DATETIME: {NotNull, DATETIME(2000000000, 10)}

     * @param registerDatetime The value of the column 'REGISTER_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterDatetime(java.time.LocalDateTime registerDatetime) {
        registerModifiedProperty("registerDatetime");
        _registerDatetime = registerDatetime;
    }

    /**
     * [get] REGISTER_USER: {NotNull, VARCHAR(200)(2000000000, 10)}

     * @return The value of the column 'REGISTER_USER'. (basically NotNull if selected: for the constraint)
     */
    public String getRegisterUser() {
        checkSpecifiedProperty("registerUser");
        return _registerUser;
    }

    /**
     * [set] REGISTER_USER: {NotNull, VARCHAR(200)(2000000000, 10)}

     * @param registerUser The value of the column 'REGISTER_USER'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterUser(String registerUser) {
        registerModifiedProperty("registerUser");
        _registerUser = registerUser;
    }

    /**
     * [get] REGISTER_PROCESS: {NotNull, TEXT(2000000000, 10)}

     * @return The value of the column 'REGISTER_PROCESS'. (basically NotNull if selected: for the constraint)
     */
    public String getRegisterProcess() {
        checkSpecifiedProperty("registerProcess");
        return _registerProcess;
    }

    /**
     * [set] REGISTER_PROCESS: {NotNull, TEXT(2000000000, 10)}

     * @param registerProcess The value of the column 'REGISTER_PROCESS'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterProcess(String registerProcess) {
        registerModifiedProperty("registerProcess");
        _registerProcess = registerProcess;
    }

    /**
     * [get] UPDATE_DATETIME: {NotNull, DATETIME(2000000000, 10)}

     * @return The value of the column 'UPDATE_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getUpdateDatetime() {
        checkSpecifiedProperty("updateDatetime");
        return _updateDatetime;
    }

    /**
     * [set] UPDATE_DATETIME: {NotNull, DATETIME(2000000000, 10)}

     * @param updateDatetime The value of the column 'UPDATE_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setUpdateDatetime(java.time.LocalDateTime updateDatetime) {
        registerModifiedProperty("updateDatetime");
        _updateDatetime = updateDatetime;
    }

    /**
     * [get] UPDATE_USER: {NotNull, VARCHAR(200)(2000000000, 10)}

     * @return The value of the column 'UPDATE_USER'. (basically NotNull if selected: for the constraint)
     */
    public String getUpdateUser() {
        checkSpecifiedProperty("updateUser");
        return _updateUser;
    }

    /**
     * [set] UPDATE_USER: {NotNull, VARCHAR(200)(2000000000, 10)}

     * @param updateUser The value of the column 'UPDATE_USER'. (basically NotNull if update: for the constraint)
     */
    public void setUpdateUser(String updateUser) {
        registerModifiedProperty("updateUser");
        _updateUser = updateUser;
    }

    /**
     * [get] VERSION_NO: {NotNull, INTEGER(2000000000, 10)}

     * @return The value of the column 'VERSION_NO'. (basically NotNull if selected: for the constraint)
     */
    public Integer getVersionNo() {
        checkSpecifiedProperty("versionNo");
        return _versionNo;
    }

    /**
     * [set] VERSION_NO: {NotNull, INTEGER(2000000000, 10)}

     * @param versionNo The value of the column 'VERSION_NO'. (basically NotNull if update: for the constraint)
     */
    public void setVersionNo(Integer versionNo) {
        registerModifiedProperty("versionNo");
        _versionNo = versionNo;
    }
}


text:
insert into operationCached (id, checkSum, operationResult) values (1, 'aaaa', 10);
insert into operationCached (id, checkSum, operationResult) values (2, 'bbbb', 20);
insert into operationCached (id, checkSum, operationResult) values (3, 'cccc', 30);
insert into operationCached (id, checkSum, operationResult) values (4, 'dddd', 40);
insert into operationCached (id, checkSum, operationResult) values (5, 'eeee', 50);

insert into dbsequence (id, lastValue) values ('idopcached', 6);


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <color name="colorPrimary">#3F51B5</color>
  <!--<color name="colorPrimary">@android:color/white</color>-->
  <color name="colorPrimaryDark">#303F9F</color>
  <!--<color name="colorPrimaryDark">@android:color/white</color>-->
  <color name="colorAccent">#FF4081</color>
</resources>


text:
goog.require('goog.dom');
goog.require('goog.ui.Button');
goog.require('goog.ui.LabelInput');
goog.require('goog.ui.Textarea');
goog.require('schedul.pq.Base');
goog.require('schedul.pq.Binary');

var heap = new schedul.pq.Binary(schedul.pq.Base.min);

var pushingDom = goog.dom.getElement('pushing');
var pushingLabelInput = new goog.ui.LabelInput('Pushing');
pushingLabelInput.render(pushingDom);

var pushButton = new goog.ui.Button('Push');
pushButton.render(goog.dom.getElement('push_button'));

var dumpTextarea = new goog.ui.Textarea('');
dumpTextarea.render(goog.dom.getElement('dump'));

var popButton = new goog.ui.Button('Pop');
popButton.render(goog.dom.getElement('pop_button'));

var poppedDom = goog.dom.getElement('popped');
var poppedLabelInput = new goog.ui.LabelInput('Popped');
poppedLabelInput.render(poppedDom);

var updateDump = function(){
  var dumped = heap.dump();
  dumpTextarea.setValue(dumped);
};

updateDump();

goog.events.listen(pushButton,goog.ui.Component.EventType.ACTION, function(e) {
  var pushingValue = Number(pushingLabelInput.getValue());
  heap.push(pushingValue);
  updateDump();
  pushingLabelInput.setValue('');
});

goog.events.listen(popButton,goog.ui.Component.EventType.ACTION, function(e) {
  var poppedValue = heap.pop();
  poppedLabelInput.setValue(poppedValue+'');
  updateDump();
});


text:
package org.apereo.cas.configuration.model.support.sms;

import org.apereo.cas.configuration.model.RestEndpointProperties;
import org.apereo.cas.configuration.support.RequiresModule;

import com.fasterxml.jackson.annotation.JsonFilter;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;

/**
 * This is {@link RestfulSmsProperties}.
 *
 * @author Misagh Moayyed
 * @since 6.4.0
 */
@RequiresModule(name = "cas-server-core-util", automated = true)
@Getter
@Setter
@Accessors(chain = true)
@JsonFilter("RestfulSmsProperties")
public class RestfulSmsProperties extends RestEndpointProperties {
    @Serial
    private static final long serialVersionUID = -8102345678378393382L;

    public RestfulSmsProperties() {
        setMethod("POST");
    }
}


text:
namespace FQ {
    V8ScriptEngine::V8ScriptEngine(const char *defaultPath) {
//    const char* flags = "--stack-trace-limit 10";
//    const char* flags = "--expose_gc";
//    v8::V8::SetFlagsFromString(flags, (int)strlen(flags));
//    V8::InitializeICUDefaultLocation(defaultPath);
//    V8::InitializeExternalStartupData(defaultPath);
        V8::InitializeICUDefaultLocation(defaultPath);
        V8::InitializeExternalStartupData(defaultPath);
        platform = platform::CreateDefaultPlatform();
        V8::InitializePlatform(platform);
        V8::Initialize();

        // Create a new Isolate and make it the current one.
        create_params = new Isolate::CreateParams();
        create_params->array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
    }

    V8ScriptEngine::~V8ScriptEngine() {
        V8::Dispose();
        V8::ShutdownPlatform();
        delete platform;
        delete create_params->array_buffer_allocator;
        delete create_params;
    }

}


text:
<?php $this->load->view('includes/head') ?>

      <img src="<?php echo base_url() ?>assets/assets/img/login-bg.jpg" data-src="<?php echo base_url() ?>assets/assets/img/login-bg.jpg" data-src-retina="<?php echo base_url() ?>assets/assets/img/login-bg.jpg" alt="" class="lazy">

          Tactic Fixed online Makes it easy to play poll, anywhere, anytime on any device!

          Tactic Fixed Limited All rights reserved

          © <?php echo date('Y') ?> TACTIC.

        <img src="<?php echo base_url() ?>assets/assets/img/logo.png" alt="logo" data-src="<?php echo base_url() ?>assets/assets/img/logo.png" data-src-retina="<?php echo base_url() ?>assets/assets/img/logo_2x.png" width="78" height="22">

Sign into your tactic admin account

          <?php echo validation_errors(); ?>
          <?php echo $this->session->flashdata('message'); ?>
        <form id="form-login" class="p-t-15" role="form" action="<?php echo site_url('auth/admin_login') ?>" method="post">

            Phone

              <input type="text" name="admin_phone" placeholder="phone" class="form-control" required>

            Password

              <input type="password" class="form-control" name="password" placeholder="Password" required>

                <input type="checkbox" value="1" id="checkbox1">
                Keep Me Signed in

              Help? Contact Support

          <?php  $csrf = array(
                        'name' => $this->security->get_csrf_token_name(),
                        'hash' => $this->security->get_csrf_hash());
                       ?>
                      <input type="hidden" name="<?=$csrf['name'];?>" value="<?=$csrf['hash'];?>" />
          <input name="submit" class="btn btn-primary btn-cons m-t-10" type="submit" value="Sign in">
        </form>

        <img class="overlay-brand" src="<?php echo base_url() ?>assets/assets/img/logo.png" alt="logo" data-src="assets/img/logo.png" data-src-retina="assets/img/logo_2x.png" width="78" height="22">


text:
#include <vector>
#include <memory>
#include <array>

#include <curl/curl.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#include "ip.h"

namespace shared
{
  namespace network
  {
    namespace ip
    {
      std::string get_internal()
      {
        std::array<char, 256> hostname;
        gethostname(hostname.data(), hostname.size());
        hostent * const entry{ gethostbyname(hostname.data()) };

        return { inet_ntoa(*reinterpret_cast<in_addr*>(*entry->h_addr_list)) };
      }

      static size_t writer(void * const contents, size_t const size, size_t const count, void * const userp)
      {
        size_t const realsize{ size * count };
        char * const data{ static_cast<char*>(contents) };
        auto * const buff(static_cast<std::vector<char>*>(userp));
        std::copy(data, data + realsize, std::back_inserter(*buff));

        return realsize;
      }

      std::string get_external()
      {
        std::vector<char> buff;
        std::unique_ptr<CURL, decltype(&curl_easy_cleanup)> curl{ curl_easy_init(), &curl_easy_cleanup };
        if(curl)
        {
          curl_easy_setopt(curl.get(), CURLOPT_URL, "http://ipecho.net/plain");
          curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, &writer);
          curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &buff);

          /* TODO: What if the router redirected to another site? Validate IP? */
          CURLcode const res{ curl_easy_perform(curl.get()) };
          if(res != CURLE_OK)
          { return "ip error"; }
          else
          { return { buff.data() }; }
        }
        else
        { return "ip error"; }
      }
    }
  }
}


text:
var util = require('util');
var Handle = process.binding('handle_wrap').Handle;

function Timer() {
  this._timer = new io.nodyn.timer.TimerWrap( process._process );
  Handle.call( this, this._timer );
}
util.inherits( Timer, Handle );

Timer.prototype.start = function(msec, repeat) {
  this._timer.start(msec, repeat);
}

Timer.prototype.stop = function() {
  this._timer.stop();
}

Timer.now = io.nodyn.timer.TimerWrap.now;

module.exports.Timer = Timer;


text:
<!DOCTYPE html>
<% local function escape_xml(str)
	return tostring(str):gsub("&", "&"):gsub("'", "'"):gsub(">", ">"):gsub("<", "<"):gsub("\"", """)
end

local function escape_double_quotes(str)
	return tostring(str):gsub("\"", """)
end

local function get_rgba(hex, opacity)
	local h = tostring(hex):gsub("#", "")
	return "rgba(" .. tonumber(h:sub(1, 2), 16) .. "," .. tonumber(h:sub(3, 4), 16) .. "," .. tonumber(h:sub(5, 6), 16) .. "," .. tonumber(opacity, 10) / 100 .. ")"
end %>

		<title><%= escape_xml(model.juicebox.galleryTitle) %></title>
		<meta charset="utf-8" />
		<meta name="viewport" id="jb-viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1, user-scalable=0" />
		<meta name="description" content="" />

		<meta property="og:description" content="" />
		<meta property="og:image" content="" />
		<meta property="og:title" content="<%= escape_double_quotes(model.juicebox.galleryTitle) %>" />
		<meta property="og:type" content="website" />
		<meta property="og:url" content="" />