text:
yOSON.AppCore.addModule("animate_logo_companies", function(Sb) {
  var afterCathDom, catchDom, dom, functions, initialize, st;
  dom = {};
  st = {
    listOverflow: '#divCompanies',
    companyBox: 'li',
    rowContent: '.overview',
    viewport: '.viewport',
    divLookJobs: '#divLookJobs'
  };
  catchDom = function() {
    dom.listOverflow = $(st.listOverflow);
    dom.rowContent = $(st.rowContent, st.listOverflow);
    dom.companyBox = $(st.companyBox, st.listOverflow);
    dom.viewport = $(st.viewport, st.listOverflow);
    dom.divLookJobs = $(st.divLookJobs);
  };
  afterCathDom = function() {
    functions.fnAnimateLogoTCN();
    functions.fnAnimateLogoCompanies();
  };
  functions = {
    fnAnimateLogoTCN: function() {
      dom.divLookJobs.tinycarousel({
        buttons: false,
        interval: true,
        duration: 500
      });
    },
    fnAnimateLogoCompanies: function() {
      var clock, heightOver, heightRow, tmp;
      heightOver = 220;
      heightRow = parseInt(dom.rowContent.height()) - 40;
      tmp = 0;
      clock = void 0;
      if (!$.support.cors) {
        dom.rowContent.height(heightRow + 40);
      }
      if (dom.companyBox.size() > 14) {
        clock = setInterval(function() {
          tmp = tmp + heightOver;
          if (tmp >= heightRow) {
            tmp = 0;
          }
          dom.viewport.animate({
            scrollTop: tmp
          }, '500', 'swing');
        }, 5000);
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    afterCathDom();
  };
  return {
    init: initialize
  };
}, ['/src/libs/jquery/jqTinycarousel.js']);

yOSON.AppCore.addModule("applicant_registration", function(Sb) {
  var afterCathDom, catchDom, dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    frm: '#frmPostulantRegistration',
    selDocument: '#fSelDoc',
    txtDocument: '#txtDocument, #txtDocumentCe',
    txtPassword: '#txtPassword',
    txtRepeatPassword: '#txtRepeatPassword',
    btnPostulantRegister: '#btnPostulantRegister',
    divMessage: '.parsley_info',
    xhrGetToken: null,
    xhrValidateInput: null
  };
  catchDom = function() {
    dom.frm = $(st.frm);
    dom.selDocument = $(st.selDocument, dom.frm);
    dom.txtDocument = $(st.txtDocument, dom.frm);
    dom.txtPassword = $(st.txtPassword, dom.frm);
    dom.txtRepeatPassword = $(st.txtRepeatPassword, dom.frm);
    dom.btnPostulantRegister = $(st.btnPostulantRegister, dom.frm);
  };
  afterCathDom = function() {
    dom.txtPassword.pstrength();
    dom.txtPassword.trigger('keyup');
  };
  suscribeEvents = function() {
    dom.txtPassword.on('keyup', events.eCleanRepeatPassword);
    dom.selDocument.on('change', events.eChangeTypeDocument);
    dom.frm.on('submit', events.eSubmit);
    dom.frm.parsley().subscribe('parsley:form:validate', events.eValidateForm);
  };
  events = {
    eCleanRepeatPassword: function() {
      dom.txtRepeatPassword.val('');
    },
    eChangeTypeDocument: function() {
      dom.txtDocument.focus();
      dom.txtDocument.val('');
      dom.txtDocument.parsley().destroy();
      utils.responseParsley('error', false, dom.txtDocument.siblings(st.divMessage));
      utils.responseParsley('success', false, dom.txtDocument.siblings(st.divMessage));
      switch ($(this).val()) {
        case 'dni#8':
          dom.txtDocument.removeAttr('minlength');
          dom.txtDocument.attr({
            'id': 'txtDocument',
            'maxlength': '8',
            'data-parsley-minlength': '8',
            'data-parsley-type': 'digits',
            'data-parsley-minlength-message': 'El DNI debe ser de 8 dígitos',
            'data-parsley-type-message': 'Ingrese un DNI válido'
          }).addClass('number');
          break;
        case 'ce#15':
          dom.txtDocument.attr({
            'id': 'txtDocumentCe',
            'maxlength': '20',
            'minlength': '8',
            'data-parsley-minlength': '8',
            'data-parsley-type': 'alphanum',
            'data-parsley-minlength-message': 'Ingrese carné de extranjería válido',
            'data-parsley-type-message': 'Ingrese carné de extranjería válido'
          }).removeClass('number');
      }
      dom.txtDocument.parsley();
    },
    eSubmit: function(event) {
      event.preventDefault();
    },
    eValidateForm: function(formInstance) {
      if (formInstance.isValid()) {
        if ($('.waiting', dom.frm).size() === 0) {
          dom.btnPostulantRegister.attr('disabled', true);
          document.getElementById(st.frm.substring(1)).submit();
        } else {
          $('html, body').scrollTop(parseInt($('.waiting', dom.frm).offset().top) - 100);
        }
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    afterCathDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, ['/src/libs/jquery/jqPstrength.min.js']);

yOSON.AppCore.addModule("autocomplete_text", function(Sb) {
  var dom, factory, initialize, st;
  factory = function(op) {
    this.st = {
      txtAutocomplete: '_institucion',
      selDepend: '_id_nivel_estudio',
      divWrap: '.skill-content',
      model: 'institucion',
      widthList: 252,
      classLoading: 'ui-autocomplete-loading',
      urlGetToken: '/registro/obtener-token/',
      urlAjax: '/mi-cuenta/busqueda-general/',
      xhrGetToken: null,
      xhrRequest: null
    };
    this.dom = {};
    this.op = op;
  };
  dom = {};
  st = factory.prototype = {
    eAutocomplete: function(event) {
      st = this.st;
      $('[name$="' + st.txtAutocomplete + '"]').autocomplete({
        source: function(request, response) {
          var value, wrap, _this;
          _this = this.element;
          value = _this.val();
          wrap = _this.parents(st.divWrap).parent();
          if (st.xhrGetToken) {
            st.xhrGetToken.abort();
          }
          if (st.xhrRequest) {
            st.xhrRequest.abort();
          }
          st.xhrGetToken = $.ajax({
            url: st.urlGetToken,
            type: 'POST',
            dataType: 'JSON',
            data: {
              csrfhash: $('body').attr('data-hash')
            },
            success: function(result) {
              st.xhrRequest = $.ajax({
                url: st.urlAjax,
                type: 'POST',
                dataType: 'JSON',
                data: {
                  csrfhash: result,
                  q: value,
                  model: st.model,
                  nivel: $('[name$="' + st.selDepend + '"]', wrap).val()
                },
                success: function(data) {
                  response($.map(data, function(item) {
                    return {
                      label: item.label,
                      value: item.value
                    };
                  }));
                  _this.removeClass(st.classLoading);
                },
                error: function(res) {}
              });
            }
          });
        },
        minLength: 3,
        open: function() {
          $(this).autocomplete("widget").addClass("txt_autocomplete").width(st.widthList);
          $(this).removeClass(st.classLoading);
        },
        close: function() {
          $(this).autocomplete("widget").removeClass("txt_autocomplete");
        },
        create: function() {
          $(this).data('ui-autocomplete')._renderItem = function(ul, item) {
            return $("<li>").attr("data-value", item.value).append($("<a>").html(item.label)).appendTo(ul);
          };
        }
      });
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.eAutocomplete();
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, ['/src/libs/jquery/jqUIcustom.js']);

yOSON.AppCore.addModule("bar_animation", function(Sb) {
  var afterCathDom, dom, events, initialize, st;
  dom = {};
  st = {
    spanPercent: '.percent',
    divRank: '.rank',
    spanBar: '.rank span'
  };
  afterCathDom = function() {
    dom.spanPercent = $(st.spanPercent);
    dom.divRank = $(st.divRank);
    dom.spanBar = $(st.spanBar);
  };
  events = {
    eAnimationBar: function(e) {
      var i, percent, valueTime;
      percent = parseInt(dom.divRank.data('percent'));
      i = 0;
      valueTime = setInterval(function() {
        if (i <= percent) {
          dom.spanBar.css('width', i + '%');
          dom.spanPercent.html(i + '%');
          i++;
        } else {
          clearInterval(valueTime);
        }
      }, 10);
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    afterCathDom();
    events.eAnimationBar();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("combos_depends", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      selParent: null,
      selChild: null,
      arrExceptions: [],
      jsonDefault: true,
      divskillContent: '.skill-content',
      urlGetToken: '/registro/obtener-token/',
      urlAjax: null,
      paramAjax: null,
      templateHtmlOption: null,
      xhrGetToken: null,
      xhrGetList: null
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
    },
    afterCatchDom: function() {
      this.st.templateHtmlOption = dataTemplate['all'].tpl_options;
    },
    suscribeEvents: function() {
      this.dom.context.on('change', '[name$="' + this.st.selParent + '"]', {
        inst: this
      }, this.eShowHideOptions);
    },
    eShowHideOptions: function(event) {
      var parentWrap, selChild, st, that, valueParent, _this;
      event.preventDefault();
      that = event.data.inst;
      st = that.st;
      _this = $(this);
      valueParent = Number(_this.val());
      if (st.xhrGetToken) {
        st.xhrGetToken.abort();
      }
      if (st.xhrGetList) {
        st.xhrGetList.abort();
      }
      if ($.inArray(valueParent, st.arrExceptions) !== -1) {
        return;
      }
      parentWrap = _this.parents(st.divskillContent).parent();
      selChild = $('[name$="' + st.selChild + '"]', parentWrap);
      selChild.addClass('waiting').attr('disabled', true);
      if (valueParent === 0) {
        selChild.find('option:first').siblings().remove();
      }
      st.xhrGetToken = $.ajax({
        url: st.urlGetToken,
        type: 'POST',
        dataType: 'JSON',
        data: {
          csrfhash: $('body').attr('data-hash')
        },
        success: function(result) {
          var dataToAjax;
          dataToAjax = {
            csrfhash: result
          };
          dataToAjax[st.paramAjax] = valueParent;
          st.xhrGetList = $.ajax({
            url: st.urlAjax,
            type: 'POST',
            dataType: 'JSON',
            data: dataToAjax,
            success: function(response) {
              var anyData;
              anyData = true;
              if ($.isEmptyObject(response)) {
                anyData = false;
              } else {
                if (response.length === 0) {
                  anyData = false;
                }
              }
              if (anyData) {
                selChild.find('option:first').siblings().remove();
                $.each(response, function(i, data) {
                  var compiled_template, objModel;
                  if (st.jsonDefault) {
                    objModel = {
                      value: i,
                      data: data
                    };
                  } else {
                    $.each(data, function(i, v) {
                      objModel = {
                        value: v.id,
                        data: v.nombre
                      };
                    });
                  }
                  compiled_template = _.template(st.templateHtmlOption, objModel);
                  selChild.append(compiled_template);
                });
                selChild.attr('disabled', false);
              }
              selChild.removeClass('waiting');
            },
            error: function(res) {
              selChild.find('option:first').siblings().remove();
              selChild.removeClass('waiting').attr('disabled', true);
            }
          });
        }
      });
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.catchDom();
      this.afterCatchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, ['src/libs/underscore.js']);

yOSON.AppCore.addModule("count_character", function(Sb) {
  var afterCatchDom, dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    input: '_comentarios',
    countLetter: '.count-letter',
    countChar: '#count-char',
    wrapSkills: '.wrap-skills',
    frmHorizontal: '.frm-horizontal',
    maxCharacter: 140
  };
  afterCatchDom = function() {
    if ($('> li', st.wrapSkills).length !== 0) {
      $.each($('> li', st.wrapSkills), function(i, elem) {
        var _thisCountChar, _thisInput;
        _thisInput = $('[id$="' + st.input + '"]', $(elem));
        _thisCountChar = $(st.countChar, $(elem));
        _thisCountChar.text(st.maxCharacter - _thisInput.val().length);
        _thisInput.on('keyup', events.eTypeWords);
      });
    } else {
      $(st.countChar).text(st.maxCharacter - $('[id$="' + st.input + '"]').val().length);
    }
  };
  suscribeEvents = function() {
    if ($('> li', st.wrapSkills).length !== 0) {
      $('.wrap-btn .btn', st.frmHorizontal).on('click', events.addSkill);
    } else {
      $(document).on('keyup', '[id$="' + st.input + '"]', events.eTypeWords);
    }
  };
  events = {
    addSkill: function() {
      var _thisInput;
      _thisInput = $('> li:last-child [id$="' + st.input + '"]', st.wrapSkills);
      _thisInput.on('keyup', events.eTypeWords);
    },
    eTypeWords: function(e) {
      var _this;
      _this = $(this);
      _this.siblings(st.countLetter).find(st.countChar).text(st.maxCharacter - _this.val().length);
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    afterCatchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("disable_combos", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      chkName: null,
      disableds: [],
      divWrap: '.skill-content'
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    suscribeEvents: function() {
      $(document).on('change', '[name$="' + this.st.chkName + '"]', {
        inst: this
      }, this.onTagsDisableds);
    },
    onTagsDisableds: function(event) {
      var st, that, wrap, _this;
      that = event.data.inst;
      st = that.st;
      _this = $(this);
      wrap = _this.parents(st.divWrap).parent();
      $.each(st.disableds, function(i, elemId) {
        var elem, localName;
        elem = $('[name$="' + elemId + '"]', wrap);
        localName = elem[0].tagName;
        switch (localName) {
          case 'INPUT':
            if (elem.attr('readonly')) {
              elem.attr('readonly', false);
            } else {
              elem.attr('readonly', true);
            }
            break;
          case 'SELECT':
            if (elem.is(':disabled')) {
              elem.attr('disabled', false);
            } else {
              elem.attr('disabled', true);
            }
        }
      });
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("featured_profile", function(Sb) {
  var afterCathDom, catchDom, dom, events, functions, initialize, st, suscribeEvents;
  dom = {};
  st = {
    frm: '#frmFeaturedProfile',
    rdTipoDoc: 'input[name="radioTipoDoc"]',
    divBoleta: '#divBoleta',
    divFactura: '#divFactura',
    txtRuc: '#txtRuc',
    txtName: '#txtName',
    selVia: '#selVia',
    txtLocation: '#txtLocation',
    btnPay: '#btnPay',
    hidEnteRuc: '#hidEnteRuc',
    hidRucAdecsys: '#hidRucAdecsys',
    classInputLoading: 'input_loading',
    classControlGroup: '.control-group',
    urlGetToken: '/registro/obtener-token/',
    urlAjax: '/perfil-destacado/valida-ruc-adecsys',
    xhrGetToken: null,
    xhrGetList: null
  };
  catchDom = function() {
    dom.frm = $(st.frm);
    dom.rdTipoDoc = $(st.rdTipoDoc, dom.frm);
    dom.divBoleta = $(st.divBoleta, dom.frm);
    dom.divFactura = $(st.divFactura, dom.frm);
    dom.txtRuc = $(st.txtRuc, dom.frm);
    dom.txtName = $(st.txtName, dom.frm);
    dom.btnPay = $(st.btnPay, dom.frm);
    dom.hidEnteRuc = $(st.hidEnteRuc, dom.frm);
    dom.hidRucAdecsys = $(st.hidRucAdecsys, dom.frm);
    dom.selVia = $(st.selVia, dom.frm);
    dom.txtLocation = $(st.txtLocation, dom.frm);
  };
  afterCathDom = function() {};
  suscribeEvents = function() {
    dom.rdTipoDoc.on('change', events.eChangeOption);
    dom.txtRuc.on('keyup', events.eSearchRucData);
  };
  events = {
    eChangeOption: function(e) {
      dom.divBoleta.toggle();
      dom.divFactura.toggle();
      dom.txtRuc.val('');
      dom.txtName.attr('readonly', false).val('');
      dom.selVia.attr('disabled', false).val('');
      dom.txtLocation.attr('readonly', false).val('');
      dom.txtRuc.parents(st.classControlGroup).siblings('div').addClass('hide');
      if ($(st.rdTipoDoc + ':checked').val() === 'factura') {
        dom.btnPay.attr('disabled', true);
      } else {
        dom.btnPay.attr('disabled', false);
      }
    },
    eSearchRucData: function(e) {
      var value, _this;
      _this = $(this);
      value = _this.val();
      dom.txtRuc.siblings('.invalid_ruc').remove();
      if (value.length === 11) {
        if (!functions.fnValidateRuc(value)) {
          $('<span/>', {
            "class": 'invalid_ruc response bad',
            text: 'Ruc inválido'
          }).insertAfter(st.txtRuc);
          dom.txtRuc.parents(st.classControlGroup).siblings('.control-group').addClass('hide');
          dom.btnPay.attr('disabled', true);
          return false;
        }
        _this.addClass(st.classInputLoading);
        if (st.xhrGetToken) {
          st.xhrGetToken.abort();
        }
        if (st.xhrGetList) {
          st.xhrGetList.abort();
        }
        st.xhrGetToken = $.ajax({
          url: st.urlGetToken,
          type: 'POST',
          dataType: 'JSON',
          data: {
            csrfhash: $('body').attr('data-hash')
          },
          success: function(result) {
            st.xhrGetList = $.ajax({
              url: st.urlAjax,
              type: 'POST',
              dataType: 'JSON',
              data: {
                csrfhash: result,
                ruc: value
              },
              success: function(response) {
                _this.removeClass(st.classInputLoading);
                dom.btnPay.attr('disabled', false);
                if (response.success === 1) {
                  dom.txtName.attr('readonly', true).val(response.nombreEmpresa);
                  dom.selVia.attr('disabled', true).val(response.via);
                  dom.txtLocation.attr('readonly', true).val(response.dir);
                } else {
                  dom.txtName.attr('readonly', false).val('');
                  dom.selVia.attr('disabled', false).val('');
                  dom.txtLocation.attr('readonly', false).val('');
                }
                dom.hidRucAdecsys.val(response.success);
                dom.hidEnteRuc.val(response.id);
                _this.parents(st.classControlGroup).siblings().removeClass('hide');
              },
              error: function(res) {}
            });
          }
        });
      } else {
        dom.txtRuc.parents(st.classControlGroup).siblings('.control-group').addClass('hide');
        dom.btnPay.attr('disabled', true);
      }
    }
  };
  functions = {
    fnValidateRuc: function(value) {
      var dig, dig_valid, dig_verif, dig_verif_aux, factor, flag_dig, i, item, j, narray, residuo, resta, suma;
      factor = "5432765432";
      if (typeof value === "undefined" || value.length !== 11) {
        return false;
      }
      dig_valid = [10, 20, 17, 15];
      dig = value.substr(0, 2);
      flag_dig = dig_valid.indexOf(parseInt(dig));
      if (flag_dig === -1) {
        return false;
      }
      dig_verif = value.substr(10, 1);
      narray = [];
      i = 0;
      while (i < 10) {
        item = value.substr(i, 1) * factor.substr(i, 1);
        narray.push(item);
        i++;
      }
      suma = 0;
      j = 0;
      while (j < narray.length) {
        suma = suma + narray[j];
        j++;
      }
      residuo = suma % 11;
      resta = 11 - residuo;
      dig_verif_aux = resta.toString().substr(-1);
      if (dig_verif === dig_verif_aux) {
        return true;
      } else {
        return false;
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    afterCathDom();
    catchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("hide_skill_block", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      chkInput: null,
      ulSkillWrap: '.wrap-skills',
      divBtnWrap: '.wrap-btn'
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
      this.dom.chkInput = $(this.st.chkInput, this.dom.context);
      this.dom.ulSkillWrap = $(this.st.ulSkillWrap, this.dom.context);
      this.dom.divBtnWrap = $(this.st.divBtnWrap, this.dom.context);
    },
    suscribeEvents: function() {
      this.dom.chkInput.on('change', {
        inst: this
      }, this.eShowHideBlock);
    },
    eShowHideBlock: function(event) {
      var dom, st, that;
      event.preventDefault();
      that = event.data.inst;
      st = that.st;
      dom = that.dom;
      dom.ulSkillWrap.toggle();
      dom.divBtnWrap.toggle();
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.catchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, ['src/libs/underscore.js']);

yOSON.AppCore.addModule("input_show_more", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      inputTagName: null,
      option: {},
      divControls: '.control-group',
      divWrap: '.skill-content',
      label: false,
      classFirstTitle: '.first_title',
      classSecondTitle: '.second_title'
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
    },
    suscribeEvents: function() {
      this.dom.context.on('change', '[name$="' + this.st.inputTagName + '"]', {
        inst: this
      }, this.eShowHideInputs);
    },
    eShowHideInputs: function(event) {
      var st, that, wrap, _this;
      that = event.data.inst;
      st = that.st;
      _this = $(this);
      if (_this.data('functionLock') === 1) {
        return;
      }
      wrap = _this.parents(st.divWrap).parent();
      switch (_this[0].tagName) {
        case 'SELECT':
          that.fnInputSel(wrap, _this);
          break;
        case 'INPUT':
          that.fnInput(wrap, _this);
      }
    },
    fnInputSel: function(wrap, _this) {
      var that;
      that = this;
      $.each(that.st.option, function(i, obj) {
        var value;
        if (that.st.label) {
          value = $('option:selected', _this).attr('label');
        } else {
          value = $('option:selected', _this).val();
        }
        if (value === i) {
          $.each(obj, function(i, arr) {
            var tag;
            tag = $('[name$="' + arr.name + '"]', wrap);
            tag.parents(that.st.divControls).removeClass('hide');
            if (arr.hasOwnProperty('title')) {
              wrap.find('.' + arr.title).removeClass(arr.title).attr('data-title', arr.title);
              return tag.addClass(arr.title);
            }
          });
        } else {
          $.each(obj, function(i, arr) {
            var tag;
            tag = $('[name$="' + arr.name + '"]', wrap);
            tag.parents(that.st.divControls).addClass('hide');
            if (arr.hasOwnProperty('title')) {
              tag = wrap.find('[data-title="' + arr.title + '"]');
              if (tag.length !== 0) {
                wrap.find('.' + arr.title).removeClass(arr.title);
                return tag.removeAttr('data-title').addClass(arr.title);
              }
            }
          });
        }
      });
    },
    fnInput: function(wrap, _this) {
      var that;
      that = this;
      $.each(that.st.option, function(i, arr) {
        var tag;
        tag = $('[name$="' + arr.name + '"]', wrap);
        if (tag.is(':hidden')) {
          tag.parents(that.st.divControls).removeClass('hide');
        } else {
          tag.parents(that.st.divControls).addClass('hide');
        }
      });
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.catchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("lazy_facebook_load", function(Sb) {
  var beforeCatchDom, catchDom, dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    wrapHTML: null,
    wrapFacebook: '#fbLikeBox',
    isRunScript: false,
    url: "http://connect.facebook.net/es_ES/all.js"
  };
  beforeCatchDom = function() {
    st.wrapHTML = $.browser.webkit ? "body" : "html";
  };
  catchDom = function() {
    dom.wrapHTML = $(st.wrapHTML);
    dom.wrapFacebook = $(st.wrapFacebook);
  };
  suscribeEvents = function() {
    $(window).on('scroll', events.eLoadPlugin);
  };
  events = {
    eLoadPlugin: function(e) {
      var posHtml, posWrap;
      posHtml = dom.wrapHTML.scrollTop() + dom.wrapHTML.height();
      posWrap = parseInt(dom.wrapFacebook.offset().top);
      if (!st.isRunScript && posHtml > posWrap) {
        st.isRunScript = true;
        $.ajaxSetup({
          cache: true
        });
        $.getScript([st.url], function() {
          FB.init({
            appId: tmp.appIdFacebook,
            status: true,
            xfbml: true
          });
        });
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    beforeCatchDom();
    catchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("location_job", function(Sb) {
  var afterCatchDom, catchDom, dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    context: '#frmPublishAd',
    selPais: '#fPais',
    selDepartamento: '#fDepart',
    selProvincia: '#fProvin',
    selDistrito: '#fDistri',
    urlGetToken: '/registro/obtener-token/',
    urlAjax: '/registro/filtrar-distritos/',
    dataPaisPeru: '2533',
    dataCallao: '3285',
    dataProvinciaLima: '3927',
    dataDepartamentoLima: '3926',
    templateHtmlOption: null,
    xhrGetList: null
  };
  catchDom = function() {
    dom.context = $(st.context);
    dom.selPais = $(st.selPais, dom.context);
    dom.selDepartamento = $(st.selDepartamento, dom.context);
    dom.selProvincia = $(st.selProvincia, dom.context);
    dom.selDistrito = $(st.selDistrito, dom.context);
  };
  afterCatchDom = function() {
    st.templateHtmlOption = dataTemplate['all'].tpl_options;
  };
  suscribeEvents = function() {
    dom.selPais.on('change', events.eChangeCountry);
    dom.selDepartamento.on('change', events.eChangeDepartment);
    dom.selProvincia.on('change', events.eChangeProvince);
  };
  events = {
    eChangeCountry: function(e) {
      var value, _this;
      _this = $(this);
      value = _this.val();
      if (st.xhrGetList) {
        st.xhrGetList.abort();
      }
      if (typeof window.Parsley !== 'undefined') {
        dom.selDepartamento.parsley().reset();
        dom.selProvincia.parsley().reset();
        dom.selDistrito.parsley().reset();
      }
      dom.selDepartamento.attr('disabled', true).val(0);
      dom.selProvincia.attr('disabled', true).val(0);
      dom.selDistrito.attr('disabled', true).val(0);
      if (value === st.dataPaisPeru) {
        dom.selDepartamento.attr('disabled', false);
      }
    },
    eChangeDepartment: function(e) {
      var value, _this;
      _this = $(this);
      value = _this.val();
      if (st.xhrGetList) {
        st.xhrGetList.abort();
      }
      if (typeof window.Parsley !== 'undefined') {
        dom.selProvincia.parsley().reset();
        dom.selDistrito.parsley().reset();
      }
      dom.selProvincia.attr('disabled', true).val(0);
      dom.selDistrito.attr('disabled', true).val(0);
      if (value === st.dataDepartamentoLima) {
        dom.selProvincia.attr('disabled', false);
      }
    },
    eChangeProvince: function(e) {
      var value, _this;
      _this = $(this);
      value = _this.val();
      if (st.xhrGetList) {
        st.xhrGetList.abort();
      }
      if (typeof window.Parsley !== 'undefined') {
        dom.selDistrito.parsley().reset();
      }
      dom.selDistrito.attr('disabled', true);
      dom.selDistrito.find('option:first').siblings().remove();
      if (value === st.dataProvinciaLima || value === st.dataCallao) {
        st.xhrGetList = $.ajax({
          url: st.urlGetToken,
          type: 'POST',
          dataType: 'JSON',
          data: {
            csrfhash: $('body').attr('data-hash')
          },
          success: function(result) {
            st.xhrGetList = $.ajax({
              url: st.urlAjax,
              type: 'POST',
              dataType: 'JSON',
              data: {
                csrfhash: result,
                id_ubigeo: value
              },
              success: function(response) {
                $.each(response, function(i, data) {
                  var compiled_template, objModel;
                  objModel = {
                    value: i,
                    data: data
                  };
                  compiled_template = _.template(st.templateHtmlOption, objModel);
                  dom.selDistrito.append(compiled_template);
                });
                dom.selDistrito.attr('disabled', false);
              },
              error: function(res) {
                dom.selDistrito.find('option:first').siblings().remove();
                dom.selDistrito.attr('disabled', false);
              }
            });
          }
        });
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    afterCatchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, ['src/libs/underscore.js']);

yOSON.AppCore.addModule("parsley_validation", function(Sb) {
  var afterCatchDom, catchDom, dom, functions, initialize, st;
  dom = {};
  st = {
    frm: '#frmRegisterUPC',
    selDocument: '#selDocument',
    txtDocument: '#txtDocument',
    txtApeMat: '#txtApeMat',
    rdNacionalidad: 'input[name="rdNacionalidad"]',
    classSchedule: '.upc_schedule',
    classAccordeon: '.accordeon'
  };
  catchDom = function() {
    dom.txtDocument = $(st.txtDocument);
    dom.txtApeMat = $(st.txtApeMat);
    dom.selDocument = $(st.selDocument);
    dom.rdNacionalidad = $(st.rdNacionalidad);
    dom.frm = $(st.frm);
    dom.classAccordeon = $(st.classAccordeon);
    dom.classSchedule = $(st.classSchedule);
  };
  afterCatchDom = function() {
    dom.classAccordeon.on('click', functions.onClickWrap);
  };
  functions = {
    onClickWrap: function(e) {
      $(this).parent().siblings().find('.open').removeClass('open').addClass('close').slideUp('fast');
      $(this).parents(st.classSchedule).siblings(st.classSchedule).find('.open').removeClass('open').addClass('close').slideUp('fast');
    },
    validate: function() {
      dom.frm.parsley({
        rules: {
          SelectName: {
            valueNotEquals: "0"
          }
        }
      });
      dom.rdNacionalidad.on('change', function() {
        dom.txtApeMat.parsley().destroy();
        switch ($(this).val()) {
          case 'Extranjera':
            dom.txtApeMat.removeAttr('required');
            break;
          case 'Peruana':
            dom.txtApeMat.attr('required', '');
        }
        dom.txtApeMat.parsley();
      });
      dom.selDocument.on('change', function() {
        dom.txtDocument.focus();
        dom.txtDocument.val('');
        dom.txtDocument.parsley().destroy();
        switch (parseInt($(this).val())) {
          case 1:
            dom.txtDocument.attr({
              'maxlength': '8',
              'data-parsley-minlength': '8',
              'data-parsley-type': 'digits',
              'data-parsley-minlength-message': 'El DNI debe ser de 8 dígitos',
              'data-parsley-type-message': 'Ingrese un DNI válido'
            });
            break;
          case 2:
            dom.txtDocument.attr({
              'maxlength': '20',
              'minlength': '8',
              'data-parsley-minlength': '8',
              'data-parsley-type': 'alphanum',
              'data-parsley-minlength-message': 'Ingrese un pasaporte válido',
              'data-parsley-type-message': 'Ingrese un pasaporte válido'
            });
            break;
          case 3:
            dom.txtDocument.attr({
              'maxlength': '20',
              'minlength': '8',
              'data-parsley-minlength': '8',
              'data-parsley-type': 'digits',
              'data-parsley-minlength-message': 'Ingrese carné de extranjería válido',
              'data-parsley-type-message': 'Ingrese carné de extranjería válido'
            });
        }
        dom.txtDocument.parsley();
      });
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    afterCatchDom();
    functions.validate();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("search_filters", function(Sb) {
  var catchDom, dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    divForm: '#formFind',
    txtSearch: '#fieldSearch',
    selArea: 'select[name=areas]',
    selUbicacion: 'select[name=ubicaciones]',
    selNivel: 'select[name=nivelPuestos]'
  };
  catchDom = function() {
    dom.divForm = $(st.divForm);
    dom.txtSearch = $(st.txtSearch, dom.divForm);
    dom.selArea = $(st.selArea, dom.divForm);
    dom.selUbicacion = $(st.selUbicacion, dom.divForm);
    dom.selNivel = $(st.selNivel, dom.divForm);
  };
  suscribeEvents = function() {
    dom.divForm.on('submit', events.onSubmit);
  };
  events = {
    onSubmit: function(e) {
      var area, cadena, nivelpuestos, returnString, ubicaciones;
      e.preventDefault();
      returnString = function(val) {
        val = val.replace(/-+/g, ' ');
        val = val.replace(/_+/g, ' ');
        val = val.replace(/\.+/g, '');
        val = val.replace(/\s/g, '+');
        val = val.replace(/,+/g, '');
        val = val.replace(/\%+/g, ' ');
        return val;
      };
      area = dom.selArea.val();
      nivelpuestos = dom.selNivel.val();
      ubicaciones = dom.selUbicacion.val();
      cadena = this.action + '/q/' + returnString($.trim(dom.txtSearch.val()));
      if (area !== 'none') {
        cadena += '/areas/' + area;
      }
      if (nivelpuestos !== 'none') {
        cadena += '/nivel/' + nivelpuestos;
      }
      if (ubicaciones !== 'none') {
        cadena += '/ubicacion/' + ubicaciones;
      }
      window.location = cadena;
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("search_tcn", function(Sb) {
  var afterCathDom, catchDom, dom, functions, initialize, st;
  dom = {};
  st = {
    frmSearchTcn: '#frmSearchTcn',
    txtSearch: '#txtSearch',
    btnSearch: '#btnSearch'
  };
  afterCathDom = function() {
    dom.frmSearchTcn = $(st.frmSearchTcn);
    dom.txtSearch = $(st.txtSearch, dom.frmSearchTcn);
    dom.btnSearch = $(st.btnSearch, dom.frmSearchTcn);
  };
  catchDom = function() {
    dom.frmSearchTcn.on('submit', functions.fnSearchTcn);
  };
  functions = {
    fnSearchTcn: function(e) {
      var url, valueSearch;
      e.preventDefault();
      valueSearch = dom.txtSearch.val();
      url = '/bolsas-de-trabajo';
      if ($.trim(valueSearch) !== '') {
        url = url + '/index/razonsocial/' + valueSearch;
      }
      window.location = url;
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    afterCathDom();
    catchDom();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("show_hide_options", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      selParent: null,
      selChild: null,
      divskillContent: '.skill-content'
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
    },
    suscribeEvents: function() {
      this.dom.context.on('change', '[name$="' + this.st.selParent + '"]', {
        inst: this
      }, this.eShowHideOptions);
    },
    eShowHideOptions: function(event) {
      var parentWrap, selChild, st, that, valueParent, _this;
      event.preventDefault();
      that = event.data.inst;
      st = that.st;
      _this = $(this);
      valueParent = _this.val();
      parentWrap = _this.parents(st.divskillContent).parent();
      selChild = $('[name$="' + st.selChild + '"]', parentWrap);
      selChild.attr('disabled', false).find('option[value="0"]').attr('selected', true);
      $.each(selChild.find('option'), function(i, elem) {
        var elemOption, rel;
        elemOption = $(elem);
        rel = elemOption.attr('rel');
        if (i !== 0) {
          if ($.inArray(valueParent, rel.split(/,/g)) !== -1) {
            elemOption.show();
          } else {
            elemOption.hide();
          }
        }
      });
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.catchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, ['src/libs/underscore.js']);

yOSON.AppCore.addModule("skill_add", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      separate: 'en',
      btn: '.wrap-btn .btn',
      ulSkillWrap: '.wrap-skills',
      divSkillContent: '.skill-content',
      divSkilltitle: '.skill-title',
      divNoSkill: '.no_skill',
      spanMessage: '.wrap-btn .response',
      classFirstTitle: '.first_title',
      classSecondTitle: '.second_title',
      classNumber: '.number',
      template: null,
      templateHtmlTitle: null,
      templateHtmlContent: null,
      validRepeat: false
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
      this.dom.btn = $(this.st.btn, this.dom.context);
      this.dom.ulSkillWrap = $(this.st.ulSkillWrap, this.dom.context);
      this.dom.divNoSkill = $(this.st.divNoSkill, this.dom.context);
      this.dom.spanMessage = $(this.st.spanMessage, this.dom.context);
      this.dom.template = $(this.st.template);
    },
    afterCatchDom: function() {
      this.st.templateHtmlTitle = dataTemplate['datos_usuario'].skill_title;
      this.st.templateHtmlContent = this.dom.template.html();
    },
    suscribeEvents: function() {
      this.dom.btn.on('click', {
        inst: this
      }, this.eAddSkill);
    },
    eAddSkill: function(event, dataTrigger) {
      var compiled_template, compiled_template2, dom, lastSkill, newIndex, objModel, skillWrap, spanNumber, st, that;
      event.preventDefault();
      that = event.data.inst;
      st = that.st;
      dom = that.dom;
      skillWrap = $('> li', dom.ulSkillWrap);
      lastSkill = skillWrap.last();
      if (!dom.context.data('valid')) {
        dom.spanMessage.removeClass('hide').text('Debe completar todos los campos requeridos');
        return;
      }
      if (st.validRepeat) {
        if (!that.fnRepeatTitles(lastSkill.siblings(), that.fnCaptureValue($(st.classFirstTitle, lastSkill)))) {
          dom.spanMessage.removeClass('hide').text('No se permiten campos repetidos');
          return;
        }
      }
      lastSkill.siblings().find(st.divSkillContent).slideUp('fast');
      dom.spanMessage.addClass('hide').text('');
      that.fnCompleteTitle(lastSkill);
      if (skillWrap.size() > 0) {
        dom.divNoSkill.slideUp('fast');
        dom.btn.text(dom.btn.data('more'));
      }
      objModel = {
        order: skillWrap.length,
        title1: that.fnCaptureValue($(st.classFirstTitle, lastSkill)),
        separate: st.separate,
        title2: that.fnCaptureValue($(st.classSecondTitle, lastSkill))
      };
      if (!dataTrigger) {
        $('html, body').animate({
          scrollTop: dom.context.offset().top - 40
        }, 400);
      }
      compiled_template = _.template(st.templateHtmlTitle, objModel);
      lastSkill.prepend($(compiled_template).hide().fadeIn());
      lastSkill.find(st.divSkillContent).hide();
      newIndex = parseInt(lastSkill.data('index')) + 1;
      compiled_template2 = st.templateHtmlContent.replace(/_blank_/g, '_' + newIndex + '_');
      dom.ulSkillWrap.append(compiled_template2);
      spanNumber = dom.context.prev().find(st.classNumber);
      if (spanNumber.length !== 0) {
        spanNumber.text('(' + skillWrap.length + ')');
      }
      $('> li:last', dom.ulSkillWrap).attr('data-index', newIndex);
    },
    fnCaptureValue: function($elem) {
      var tagName, value;
      if ($elem.length !== 0) {
        tagName = $elem[0].tagName;
        if (tagName === 'INPUT' || tagName === 'TEXTAREA') {
          value = $elem.val();
        } else if (tagName === 'SELECT') {
          value = $.trim($('option:selected', $elem).text());
        }
      } else {
        value = null;
      }
      return value;
    },
    fnRepeatTitles: function($listLi, valueTitle) {
      var flag, that;
      that = this;
      flag = true;
      $.each($listLi, function(i, elem) {
        var title;
        title = $.trim($(this).find(that.st.divSkilltitle).find('li:eq(1)').find('b:eq(0)').text());
        if (title === valueTitle) {
          flag = false;
        }
      });
      return flag;
    },
    fnCompleteTitle: function(lastSkill) {
      var st, that;
      that = this;
      st = that.st;
      $.each(lastSkill.siblings(), function(i, skill) {
        var compiled_template, objModel, _thisSkill;
        _thisSkill = $(skill);
        if (_thisSkill.find(st.divSkilltitle).size() === 0) {
          objModel = {
            order: _thisSkill.index() + 1,
            title1: that.fnCaptureValue($(st.classFirstTitle, _thisSkill)),
            separate: st.separate,
            title2: that.fnCaptureValue($(st.classSecondTitle, _thisSkill))
          };
          compiled_template = _.template(st.templateHtmlTitle, objModel);
          _thisSkill.prepend($(compiled_template).hide().fadeIn());
        }
      });
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.catchDom();
      this.afterCatchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP['Perfil_postulante'], function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, ['src/libs/underscore.js']);

yOSON.AppCore.addModule("skill_edit", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      ulWrap: '.wrap-skills',
      btn: '.wrap-btn .btn',
      divSkillTitle: '.skill-title',
      divSkillContent: '.skill-content',
      btnEdit: '.action-icons.edit',
      spanFirstTitle: '.first_title',
      spanSecondTitle: '.second_title',
      templateHtmlTitle: null,
      separate: 'en'
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
      this.dom.btnEdit = $(this.st.btnEdit, this.dom.context);
      this.dom.btn = $(this.st.btn, this.dom.context);
    },
    afterCatchDom: function() {
      this.st.templateHtmlTitle = dataTemplate['datos_usuario'].update_title;
    },
    suscribeEvents: function() {
      this.dom.context.on('click', this.st.btnEdit, {
        inst: this
      }, this.eOpenWrap);
    },
    eOpenWrap: function(event) {
      var listLI, skillContent, skillTitle, st, that, wrap, _this;
      event.preventDefault();
      that = event.data.inst;
      st = that.st;
      _this = $(this);
      wrap = _this.parents(st.ulWrap);
      listLI = $('> li:not(:last)', wrap);
      skillTitle = _this.parents(st.divSkillTitle);
      skillContent = skillTitle.next();
      if (!skillContent.data('valid')) {
        return false;
      }
      if (skillContent.is(':visible')) {
        that.fnUpdateTitle(skillTitle.parent());
      }
      if (skillContent.is(':visible')) {
        skillContent.slideUp('fast');
      } else {
        skillContent.slideDown('fast');
      }
    },
    fnUpdateTitle: function(listLI) {
      var compiled_template, liContent, objModel, that;
      that = this;
      liContent = $(listLI);
      objModel = {
        title1: that.fnCaptureValue(liContent.find(that.st.spanFirstTitle)),
        separate: that.st.separate,
        title2: that.fnCaptureValue(liContent.find(that.st.spanSecondTitle + ':visible'))
      };
      compiled_template = _.template(that.st.templateHtmlTitle, objModel);
      liContent.find(that.st.divSkillTitle).find('li').eq(1).html(compiled_template);
    },
    fnCaptureValue: function($elem) {
      var tagName, value;
      if ($elem.length !== 0) {
        tagName = $elem[0].tagName;
        if (tagName === 'INPUT' || tagName === 'TEXTAREA') {
          value = $elem.val();
        } else if (tagName === 'SELECT') {
          value = $.trim($('option:selected', $elem).text());
        }
      } else {
        value = null;
      }
      return value;
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.catchDom();
      this.afterCatchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    return $.each(oP['Perfil_postulante'], function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("skill_remove", function(Sb) {
  var factory, initialize;
  factory = function(op) {
    this.st = {
      context: null,
      btnEdit: '.action-icons.delete',
      ulSkillWrap: '.wrap-skills',
      ulTitle: '.skill-title',
      classNumber: '.number',
      divNoSkill: '.no_skill',
      btnAgree: '#btnAgree',
      btnClose: '#btnCancel',
      boxMessage: '.box-message',
      hidReference: '.delete_reference',
      templateHtmlTitle: null,
      urlGetToken: '/registro/obtener-token/'
    };
    this.dom = {};
    this.op = op;
  };
  factory.prototype = {
    catchDom: function() {
      this.dom.context = $(this.st.context);
      this.dom.ulSkillWrap = $(this.st.ulSkillWrap, this.dom.context);
      this.dom.divNoSkill = $(this.st.divNoSkill, this.dom.context);
      this.dom.hidReference = $(this.st.hidReference, this.dom.context);
    },
    afterCatchDom: function() {
      this.st.templateHtmlTitle = dataTemplate['datos_usuario'].modal_delete;
    },
    suscribeEvents: function() {
      this.dom.ulSkillWrap.on('click', this.st.btnEdit, {
        inst: this
      }, this.eShowModal);
      $(document).on('click', this.st.btnClose, this.eCloseModal);
      $(document).on('click', this.st.btnAgree, {
        inst: this
      }, this.eDeleteSkill);
    },
    eShowModal: function(event) {
      var block, dom, objModel, st, that, _this;
      event.preventDefault();
      that = event.data.inst;
      st = that.st;
      dom = that.dom;
      _this = $(this);
      block = _this.parents(st.ulTitle).parent();
      objModel = {
        content: '¿Está seguro que desea eliminarlo?'
      };
      $.fancybox({
        content: _.template(st.templateHtmlTitle, objModel),
        afterLoad: function() {
          dom.ulSkillWrap.data('dataBlock', block);
        }
      });
    },
    eCloseModal: function() {
      $.fancybox.close();
    },
    eDeleteSkill: function(event) {
      var divTodelete, dom, st, that;
      that = event.data.inst;
      dom = that.dom;
      st = that.st;
      $.fancybox.close();
      divTodelete = dom.ulSkillWrap.data('dataBlock');
      if (!divTodelete) {
        return false;
      }
      if (divTodelete.data('rol')) {
        $.fancybox.showLoading();
        $.ajax({
          url: st.urlGetToken,
          type: 'POST',
          dataType: 'JSON',
          success: function(result) {
            $.fancybox.showLoading();
            $.ajax({
              url: dom.context.data('delete'),
              type: 'POST',
              dataType: 'JSON',
              data: {
                id: divTodelete.data('rol'),
                idPost: divTodelete.data('rel'),
                csrfhash: result
              },
              success: function(res) {
                $.fancybox.hideLoading();
                if (res.status === 'ok') {
                  that.fnShowMessage(divTodelete);
                } else {
                  utils.boxMessage(dom.ulSkillWrap, 'prepend', res);
                }
              },
              error: function(res) {
                $.fancybox.hideLoading();
                utils.boxMessage(dom.ulSkillWrap, 'prepend', 'Error en la solicitud');
              }
            });
          }
        });
      } else {
        that.fnShowMessage(divTodelete);
      }
    },
    fnEnumeracionBlock: function() {
      var listLi, spanNumber, that;
      that = this;
      listLi = $('> li', that.dom.ulSkillWrap);
      $.each(listLi, function(i, elem) {
        var pos;
        elem = $(elem);
        pos = elem.index();
        $(that.st.ulTitle + ' li:first', elem).eq(0).text(pos + '. ');
      });
      spanNumber = that.dom.context.prev().find(that.st.classNumber);
      if (spanNumber.length !== 0) {
        if (listLi.length > 1) {
          spanNumber.text('(' + (listLi.length - 1) + ')');
        } else {
          spanNumber.text('');
        }
      }
    },
    fnShowMessage: function(divTodelete) {
      var dom, that;
      that = this;
      dom = that.dom;
      divTodelete.fadeOut(function() {
        var skillWrap, _this;
        _this = $(this);
        that.fnUpdateReference(_this);
        _this.remove();
        dom.ulSkillWrap.removeData();
        utils.boxMessage(dom.ulSkillWrap, 'prepend', 'Se eliminó correctamente');
        that.fnEnumeracionBlock();
        skillWrap = $('> li', dom.ulSkillWrap);
        if (skillWrap.size() === 1) {
          dom.divNoSkill.slideDown('fast');
        }
      });
    },
    fnUpdateReference: function(divTodelete) {
      var dom, index, value;
      dom = this.dom;
      value = dom.hidReference.val();
      index = divTodelete.data('index');
      if (index || index !== 'blank') {
        if (value === '') {
          dom.hidReference.val(index);
        } else {
          dom.hidReference.val(value + ',' + index);
        }
      }
    },
    execute: function() {
      this.st = $.extend({}, this.st, this.op);
      this.afterCatchDom();
      this.catchDom();
      this.suscribeEvents();
    }
  };
  initialize = function(oP) {
    $.each(oP['Perfil_postulante'], function(i, obj) {
      var instance;
      instance = new factory(obj);
      instance.execute();
    });
  };
  return {
    init: initialize
  };
}, ['/src/libs/jquery/jqFancybox.js']);

yOSON.AppCore.addModule("study_options", function(Sb) {
  var catchDom, dom, events, functions, initialize, st, suscribeEvents;
  dom = {};
  st = {
    context: '#studyF',
    inputTagName: '_id_nivel_estudio',
    divWrap: '.skill-content',
    divControls1: '.control-group',
    divControls2: '.cgroup-inline',
    classFirstTitle: 'first_title',
    classSecondTitle: 'second_title',
    selTipoEstudio: '_id_nivel_estudio_tipo',
    chkColegiatura: '_colegiatura',
    chkColegiaturaNum: '_colegiatura_numero',
    txtIntitucion: '_institucion',
    selPais: '_pais_estudio',
    selTipoCarrera: '_id_tipo_carrera',
    selCarrera: '_id_carrera',
    txtOtraCarrera: '_otro_carrera',
    selIniMes: '_inicio_mes',
    selIniAnio: '_inicio_ano',
    selFinMes: '_fin_mes',
    selFinAnio: '_fin_ano',
    chkEnCurso: '_en_curso'
  };
  catchDom = function() {
    dom.context = $(st.context);
  };
  suscribeEvents = function() {
    dom.context.on('change', '[id$="' + st.inputTagName + '"]', events.eChangeStudy);
  };
  events = {
    eChangeStudy: function(e) {
      var inputCarrera, value, wrap, _this;
      _this = $(this);
      wrap = _this.parents(st.divWrap).parent();
      value = parseInt($('option:selected', _this).val());
      $('[name$="' + st.txtIntitucion + '"]', wrap).addClass(st.classSecondTitle);
      functions.fnDisabledInputs({
        disabled: false,
        arr: [st.txtIntitucion, st.selIniMes, st.selIniAnio, st.selFinMes, st.selFinAnio, st.chkEnCurso, st.selTipoCarrera]
      }, wrap);
      $('[name$="' + st.selPais + '"]', wrap).attr('disabled', false);
      $('[name$="' + st.selTipoEstudio + '"]', wrap).parents(st.divControls1).removeClass('hide');
      $('[name$="' + st.selTipoCarrera + '"]', wrap).parents(st.divControls1).removeClass('hide');
      $('[name$="' + st.chkColegiatura + '"]', wrap).parents(st.divControls2).addClass('hide');
      $('[name$="' + st.chkColegiaturaNum + '"]', wrap).parents(st.divControls1).addClass('hide');
      if (value === 1 || value === 2 || value === 3) {
        $('[name$="' + st.selTipoEstudio + '"]', wrap).parents(st.divControls1).addClass('hide');
        $('[name$="' + st.selTipoCarrera + '"]', wrap).parents(st.divControls1).addClass('hide');
        inputCarrera = $('[name$="' + st.selCarrera + '"]', wrap);
        inputCarrera.parents(st.divControls1).addClass('hide');
        inputCarrera.removeClass(st.classFirstTitle);
        _this.addClass(st.classFirstTitle);
        if (value === 1) {
          $('[name$="' + st.txtIntitucion + '"]', wrap).removeClass(st.classSecondTitle);
          functions.fnDisabledInputs({
            disabled: true,
            arr: [st.txtIntitucion, st.selIniMes, st.selIniAnio, st.selFinMes, st.selFinAnio, st.chkEnCurso]
          }, wrap);
          $('[name$="' + st.selPais + '"]', wrap).attr('disabled', true);
        }
      } else {
        inputCarrera = $('[name$="' + st.selCarrera + '"]', wrap);
        inputCarrera.addClass(st.classFirstTitle);
        inputCarrera.parents(st.divControls1).removeClass('hide');
        _this.removeClass(st.classFirstTitle);
      }
    }
  };
  functions = {
    fnDisabledInputs: function(obj, wrap) {
      $.each(obj.arr, function(i, elem) {
        var input;
        input = $('[name$="' + elem + '"]', wrap);
        if (obj.disabled) {
          functions.fnCleanInput(input);
        }
        input.attr('disabled', obj.disabled);
      });
    },
    fnCleanInput: function($elem) {
      var tagName;
      tagName = $elem[0].tagName;
      if (tagName === 'INPUT') {
        $elem.val('');
      } else if (tagName === 'SELECT') {
        $('option:eq(0)', $elem).attr('selected', true);
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("update_date", function(Sb) {
  var dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    selTag: null,
    selDepend: null,
    divWrap: '.skill-content'
  };
  suscribeEvents = function() {
    $(document).on('change', '[id$="' + st.selTag + '"]', {
      selDep: st.selDepend
    }, events.eUpdate);
  };
  events = {
    eUpdate: function(e) {
      var tag, value, wrap, _this;
      _this = $(this);
      value = _this.val();
      wrap = _this.parents(st.divWrap).parent();
      tag = $('[id$="' + e.data.selDep + '"]', wrap);
      tag.find('option:selected').attr('disabled', false);
      tag.find('option[value="' + value + '"]').attr('selected', true);
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      $.extend(st, obj);
      suscribeEvents();
    });
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("validate_daybitrh", function(Sb) {
  var afterCatchDom, catchDom, dom, initialize, st;
  dom = {};
  st = {
    dia: ":input[name=selDia]",
    mes: ":input[name=selMes]",
    year: ":input[name=selAnio]"
  };
  catchDom = function() {
    dom.dia = $(st.dia);
    dom.mes = $(st.mes);
    dom.year = $(st.year);
  };
  afterCatchDom = function() {
    $().dateSelectBoxes(dom.mes, dom.dia, dom.year);
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    afterCatchDom();
  };
  return {
    init: initialize
  };
}, ['/src/libs/jquery/jqDateSelectBoxes.js']);

yOSON.AppCore.addModule("validate_skill_form", function(Sb) {
  var catchDom, dom, events, initialize, st, suscribeEvents;
  dom = {};
  st = {
    frm: '#frmSkills',
    chkExperience: '#chkExperience',
    chkStudy: '#chkStudy',
    spanREsponse: '#spanResponse',
    messageComplete: 'Debe completar el nivel de estudio y/o experiencia para poder continuar.',
    messageAgree: 'Debe Aceptar los términos y condiciones.',
    chkTerms: '#chkTerms',
    chkSendEmail: '#chkSendEmail',
    chkSendEmailAds: '#chkSendEmailAds',
    btnExperience: '#btnExperience',
    btnStudy: '#btnStudy',
    wrapExperience: '#experienceF',
    wrapStudy: '#studyF',
    wrapSkills: '.wrap-skills'
  };
  catchDom = function() {
    dom.frm = $(st.frm);
    dom.wrapExperience = $(st.wrapExperience);
    dom.wrapStudy = $(st.wrapStudy);
    dom.chkExperience = $(st.chkExperience, dom.frm);
    dom.chkStudy = $(st.chkStudy, dom.frm);
    dom.spanResponse = $(st.spanREsponse, dom.frm);
    dom.chkTerms = $(st.chkTerms, dom.frm);
    dom.chkSendEmail = $(st.chkSendEmail, dom.frm);
    dom.chkSendEmailAds = $(st.chkSendEmailAds, dom.frm);
    dom.btnExperience = $(st.btnExperience, dom.wrapExperience);
    dom.btnStudy = $(st.btnStudy, dom.wrapStudy);
  };
  suscribeEvents = function() {
    dom.frm.on('submit', events.eValidate);
  };
  events = {
    eValidate: function(event) {
      var wrapSkillsEst, wrapSkillsExp;
      if (dom.chkTerms.is(':checked')) {
        wrapSkillsExp = dom.wrapExperience.find(st.wrapSkills);
        if (wrapSkillsExp.is(':visible') && wrapSkillsExp.find('> li').length <= 1) {
          if (!dom.wrapExperience.data('valid')) {
            dom.btnExperience.trigger('click', {
              scroll: false
            });
            if (!dom.wrapExperience.data('valid')) {
              dom.spanResponse.removeClass('hide').text(st.messageComplete);
              return false;
            }
          }
        }
        wrapSkillsEst = dom.wrapStudy.find(st.wrapSkills);
        if (wrapSkillsEst.is(':visible') && wrapSkillsEst.find('> li').length <= 1) {
          if (!dom.wrapStudy.data('valid')) {
            dom.btnStudy.trigger('click', {
              scroll: false
            });
            if (!dom.wrapStudy.data('valid')) {
              dom.spanResponse.removeClass('hide').text(st.messageComplete);
              return false;
            }
          }
        }
      } else {
        dom.spanResponse.removeClass('hide').text(st.messageAgree);
        return false;
      }
      return dom.spanResponse.addClass('hide');
    }
  };
  initialize = function(oP) {
    $.each(oP, function(i, obj) {
      $.extend(st, obj);
      catchDom();
      suscribeEvents();
    });
  };
  return {
    init: initialize
  };
}, []);

yOSON.AppCore.addModule("viewmore_tooltip", function(Sb) {
  var catchDom, collection, dom, events, initialize, st, suscribeEvents;
  st = {
    winIModal: '.winIModal',
    moreWM: '.moreWM',
    closeH0WM: '.closeH0WM',
    rdInputs: '.iptRadioBA'
  };
  dom = {};
  collection = [];
  catchDom = function() {
    dom.winIModal = $(st.winIModal);
    dom.moreWM = $(st.moreWM);
    dom.closeH0WM = $(st.closeH0WM);
    dom.rdInputs = $(st.rdInputs);
  };
  suscribeEvents = function() {
    dom.winIModal.on('click', events.eShowTooltip);
    dom.closeH0WM.on('click', events.eHideTooltip);
    dom.rdInputs.on('change', events.eShowHideWrap);
  };
  events = {
    eShowTooltip: function(e) {
      var idH, tP, wrap, _this;
      e.preventDefault();
      _this = $(this);
      wrap = _this.attr('href');
      tP = _this.position().top;
      idH = $(wrap).height();
      dom.moreWM.hide();
      $(wrap).css('top', tP - idH - 30).fadeIn('fast');
      $(document).keyup(function(e) {
        if (e.keyCode === 27) {
          dom.closeH0WM.trigger('click');
        }
      });
    },
    eHideTooltip: function(e) {
      e.preventDefault();
      dom.moreWM.fadeOut('fast');
    },
    eShowHideWrap: function(e) {
      var alfabetico, cntList, numerico, _this;
      _this = $(this);
      cntList = _this.parents('.rel').next();
      numerico = $('.numerico', cntList);
      alfabetico = $('.alfabetico', cntList);
      if (_this.val() === 'numerico') {
        alfabetico.hide();
        numerico.show();
      } else {
        numerico.hide();
        alfabetico.show();
      }
    }
  };
  initialize = function(oP) {
    $.extend(st, oP);
    catchDom();
    suscribeEvents();
  };
  return {
    init: initialize
  };
}, []);


text:
using namespace std;

lexer::lexer (const string& line, error_container& err_repo)
    : prev(0), pos(0), line(line), err_repo(err_repo), end(false) {}

bool lexer::has_next() const {
    return !end;
}

const string& lexer::getline() const {
    return line;
}

token get_token(const string& word, int wpos, error_container& err_repo)
{
    token::type kind = token::st_map[word];
    smatch match;
    if (kind > 0)                                                         // keyword
        return token(kind, word, wpos);
    else if (regex_match(word, regex("[a-zA-z][a-zA-Z_0-9]*")))           // word
        return token(token::word, word, wpos);
    else if (regex_match(word, regex("([0]|[1-9][0-9]*)[.][0-9]*")))      // number
        return token(token::number, word, wpos);
    else if (regex_match(word, regex("([0]|[1-9][0-9]*)")))               // integer
        return token(token::integer, word, wpos);
    else if (regex_match(word, match, regex("\"([^\"]*)\""))) {
        return token(token::file, match[1], wpos);
    }

    // nothing found
    err_repo.add( shared_ptr<error>(new error_illegal(word, wpos)));
    return token(token::illegal, word, wpos);                      // illegal
}

token lexer::next() {
    string word;

    while ((pos = line.find_first_of(" ,()[]=-+", prev)) != string::npos ) {
        word = line.substr(prev, pos - prev + (pos == prev)*1 );
        int wpos = prev; prev = pos + (pos == prev)*1;
        if (!word.empty() && !isspace(word[0]))
            return get_token(word, wpos, err_repo);
    }

    // the last word
    if (pos == string::npos && prev < line.length()) {
        int wpos = prev; prev = string::npos;
        return get_token(line.substr(wpos, string::npos), wpos, err_repo);
    }

    // end has been reached and case of trailing space
    end = true;
    return token(token::eol, "", line.length());
}

redpajama_set_name: RedPajamaGithub


text:
#include "bus.hpp"

#include "../../io/io.hpp"
#include "../../kernel.hpp"

#include "device.hpp"

namespace MOSS { namespace Disk { namespace ATA {

void Bus::_StatusByte::print(void) const {
	kernel->write("[ERR %d, DRQ %d, SRV %d, DF %d, RDY %d, BSY %d]",err,drq,srv,df,drdy,bsy);
}

Bus::Bus(Controller* controller, int index) :
	_controller(controller),
	index(index),
	_io_base(index==0||index==1 ? (index==0 ? 0x01F0 : 0x0170) : (index==2 ? 0x01E8 : 0x0168))
{
	assert_term(index>=0&&index<=3,"Implementation error!");

	//Need to check that this is a real ATA bus.  In modern computers (and by default in Bochs), there
	//	are two: the primary and secondary.  Unfortunately, I can't find a way to do just this.  One
	//	suggestion is to just write a value (to the 0th device) and check if it sticks; this actually
	//	detects that a device exists on the bus, not just that the bus exists.  Maybe there's a better
	//	way that's more specific.
	//TODO: better way?
	//Note: an ATA bus can be disabled in Bochs by using "ata[0123]: enabled=0" in ".bochsrc".
	_write_uint8(Write::RegisterOffset::NUM_SECTORS,0xAB);
	if (_read_uint8(Read::RegisterOffset::NUM_SECTORS)!=0xAB) {
		valid = false;
		return;
	}
	valid = true;

	for (int i=0;i<2;++i) {
		devices[i] = new Device(this, i);
	}
	current = nullptr;

	for (int i=0;i<2;++i) {
		devices[i]->fill_information();

		if (!devices[i]->valid) {
			delete devices[i];
			devices[i] = nullptr;
		}
	}

	//bool interrupts_enabled = true;
	//uint8_t control = !interrupts_enabled;
	//_select_device(0);
	//_write_uint8(Write::DEVICE_CONTROL,control);
}
Bus::~Bus(void) {
	if (valid) {
		for (int i=0;i<2;++i) {
			if (devices[i]!=nullptr) delete devices[i];
		}
	}
}

void Bus::_transfer_block_into(uint8_t* data) const {
	//Transfer 256 words, a word at a time, into buffer. (In assembler, REP INSW works well for this).
	#if 0
		for (int j=0;j<512;j+=2) {
			uint16_t word = _read_uint16(Read::RegisterOffset::DATA);
			data[j  ] = static_cast<uint8_t>( word&0x00FF    );
			data[j+1] = static_cast<uint8_t>((word&0xFF00)>>8);
		}
	#else
		uint16_t* ptr = reinterpret_cast<uint16_t*>(data);
		for (int i=0;i<256;++i) {
			ptr[i] = _read_uint16(Read::RegisterOffset::DATA);
		}
	#endif
}

//Protocols (assuming nIEN is cleared and standard operation):
//	PIO data in command protocol (9.7; logical pg. [224,226]) (transfer of data from device to host):
//		1. Select device (9.6; logical pg. 223).
//		2. Write any required command parameters to the Features, Sector Count, Sector Number, Cylinder
//		   High, Cylinder Low, and Device/Head registers.
//		3. Write command code to the Command register; starts execution.
//		4. An interrupt happens.  In the handler, should read the Status register (after 400ns?).  If
//		   an error happened, we're done, and we can start over with a new command.  If not, proceed
//		   to 5.
//		5. Read the data register until the block transfer is complete.  If there's more data for the
//		   command, goto 4.  If not, read the alternate status register (ignore result) and then read
//		   the Status Register.
//	PIO data out command protocol (9.8; logical pg. [227,230]) (transfer of data from host to device):
//		1. Select device (9.6; logical pg. 223).
//		2. Write any required command parameters to the Features, Sector Count, Sector Number, Cylinder
//		   High, Cylinder Low, and Device/Head registers.
//		3. Write command code to the Command register; starts execution.
//		4. If an error happens, a terminal interrupt happens (goto 9).  If there is no error, proceed
//		   to 5.
//		5. Wait 400ns and then poll the Status or the Alternate Status register until BSY is clear and
//		   DRQ is set.
//		6. Write the Data register.  Repeat until the block transfer is complete.
//		7. Wait for an interrupt.  If that is all the data for the command, goto 9.  Else 8.
//		8. Intermediate interrupt handler: read the Status register, then goto 6.
//		9. Terminal interrupt handler: should read Status register, and then can start over with a new
//		   command.
//	Device reset protocol (9.4; logical pg. 219) (reset device)
//		1. Write DEVICE RESET in Command register
//		2. ???
//	Non-data command protocol (9.9; logical pg. [231,232]) (execution of commands with no data transfer)
//		1. Select device (9.6; logical pg. 223).
//		2. Write any required command parameters to the Features, Sector Count, Sector Number, Cylinder
//		   High, Cylinder Low, and Device/Head registers.
//		3. Write command code to the Command register; starts execution.
//		4. Wait for interrupt.  When received, read Status register.
void Bus::_select_device(int device_index) {
	//From ATA/ATAPI-4 9.6:
	//	"Before issuing any command to a device except the DEVICE RESET command, the host shall insure that
	//	the selected device is no longer busy, select the desired device, and insure that it is ready to
	//	accept a command."

	assert_term(device_index>=0&&device_index<=1,"Invalid device index \"%d\"!",device_index);
	assert_term(devices[device_index]!=nullptr,"Drive index %d does not exist!",device_index);

	//ATA/ATAPI-4 9.6 figure 11 (logical pg. 223)
	_StatusByte status;

	do {
		status = _read_uint8(Read::RegisterOffset::STATUS_REGULAR);
	} while (!(status.bsy==0 && status.drq==0));

	//	It is unclear whether this value bogusly depends on certain other bits to be set.  I'm going to
	//		assume not and hope for the best.
	uint8_t value = device_index << 4;
	_write_uint8(Write::RegisterOffset::DEVICE_HEAD,value);
	//	Wait >= 400ns
	for (int i=0;i<5;++i) IO::wait();

	do {
		status = _read_uint8(Read::RegisterOffset::STATUS_REGULAR);
	} while (!(status.bsy==0 && status.drq==0));

	/*#ifdef MOSS_DEBUG
	if ( status.bsy || !status.drdy || status.drq || status.err) {
		status.print(); kernel->write("\n");
		assert_term(false,"Unexpected status!");
	}
	#endif*/

	current = devices[device_index];
}
void Bus::_select_device_as_necessary(int device_index) {
	//TODO: cache which device index is currently selected!
	_select_device(device_index);
}
void Bus::_proto_pio_data_in(uint8_t const* end) {
	//PIO data in protocol steps 4 and 5.

	//Wait for interrupts to finish.  Termination when the command's buffer is filled or an error occurs.
	while ( _current_command_buffer!=nullptr && _current_command_buffer<end );

	_read_uint8(Read::RegisterOffset::STATUS_ALTERNATE);
	_read_uint8(Read::RegisterOffset::  STATUS_REGULAR);
}
/*void Bus::command_resetdevice(int device_index) {
	//ATA/ATAPI-4 8.7 (logical pg. 67)
	//	  7 |  6 |   5 |   4 |  3 |  2 |  1 |  0
	//	obs | na | obs | DEV | na | na | na | na
	//	Protocol: device reset (section 9.4)

	//0x08
	assert_term(false,"Not implemented!");
}*/
/*void Bus::command_flushcache(int device_index) {
	//ATA/ATAPI-4 8.10 (logical pg. 73)
	//	  7 |  6 |   5 |   4 |  3 |  2 |  1 |  0
	//	obs | na | obs | DEV | na | na | na | na
	//	Protocol: non-data
	_select_device_as_necessary(device_index);

	//Write::RegisterOffset::FEATURES_ERRORINFO not applicable
	//Write::RegisterOffset::       NUM_SECTORS not applicable
	//Write::RegisterOffset::           LBA_LOW not applicable
	//Write::RegisterOffset::           LBA_MID not applicable
	//Write::RegisterOffset::          LBA_HIGH not applicable
	_write_uint8(Write::RegisterOffset::DEVICE_HEAD,device_index<<4);
	_current_command                               = 0xE7;
	_write_uint8(Write::RegisterOffset::    COMMAND, 0xE7);

	assert_term(false,"Not implemented!");
}*/
bool Bus::command_identify(int device_index, uint8_t data_buffer[512]) {
	//The ATA specification must be lying.  The code below, implemented painstakingly from the documentation,
	//	fails because the standard-required interrupt never comes.  Instead, do what everyone else does.  See
	//	also http://forum.osdev.org/viewtopic.php?f=1&t=29074
	#if 0
		kernel->write("Selecting device %d on bus %d\n",device_index,index);

		//ATA/ATAPI-4 8.12 (logical pg. 77)
		//	  7 |  6 |   5 |   4 |  3 |  2 |  1 |  0
		//	obs | na | obs | DEV | na | na | na | na
		//	Protocol: PIO data in
		_select_device_as_necessary(device_index);

		kernel->write("Issuing command\n");

		//Write::RegisterOffset::FEATURES_ERRORINFO not applicable
		//Write::RegisterOffset::       NUM_SECTORS not applicable
		//Write::RegisterOffset::           LBA_LOW not applicable
		//Write::RegisterOffset::           LBA_MID not applicable
		//Write::RegisterOffset::          LBA_HIGH not applicable
		_write_uint8(Write::RegisterOffset::DEVICE_HEAD,device_index<<4);
		_current_command                               = 0xEC; _current_command_buffer=data_buffer;
		_write_uint8(Write::RegisterOffset::    COMMAND, 0xEC);

		kernel->write("PIO data in steps 4 and 5\n");

		_proto_pio_data_in(data_buffer+512);

		kernel->write("PIO data in complete!\n");
	#else
		//Inline comments from OSDev http://wiki.osdev.org/ATA_PIO_Mode#IDENTIFY_command

		//"[S]elect a target drive by sending 0xA0 for the master drive, or 0xB0 for the slave, to the \"drive
		//	select\" IO port.  On the Primary bus, this would be port 0x1F6."
		_select_device_as_necessary(device_index);

		//"Then set the Sectorcount, LBAlo, LBAmid, and LBAhi IO ports to 0 (port 0x1F2 to 0x1F5)."
		//	TODO: Write::RegisterOffset::FEATURES_ERRORINFO is not applicable?
		_write_uint8(Write::RegisterOffset::NUM_SECTORS, 0x00);
		_write_uint8(Write::RegisterOffset::    LBA_LOW, 0x00);
		_write_uint8(Write::RegisterOffset::    LBA_MID, 0x00);
		_write_uint8(Write::RegisterOffset::   LBA_HIGH, 0x00);
		//"Then send the IDENTIFY command (0xEC) to the Command IO port (0x1F7)."
		_current_command                               = 0xEC;
		_write_uint8(Write::RegisterOffset::    COMMAND, 0xEC);

		//"Then read the Status port (0x1F7) again."
		for (int i=0;i<5;++i) IO::wait();
		_StatusByte status = _read_uint8(Read::RegisterOffset::STATUS_REGULAR);
		//"If the value read is 0, the drive does not exist."
		if (status.byte==0x00) return false;
		//"For any other value: poll the Status port (0x1F7) until bit 7 (BSY, value = 0x80) clears."
		else {
			do {
				status = _read_uint8(Read::RegisterOffset::STATUS_REGULAR);
			} while (status.bsy);
		}

		//"Because of some ATAPI drives that do not follow spec, at this point you need to check the LBAmid and
		//	LBAhi ports (0x1F4 and 0x1F5) to see if they are non-zero."
		uint8_t  mid = _read_uint8(Read::RegisterOffset:: LBA_MID);
		uint8_t high = _read_uint8(Read::RegisterOffset::LBA_HIGH);
		//"If so, the drive is not ATA, and you should stop polling."
		//	TODO: what?  I'm not polling!
		if (mid || high) return false; //Not supported
		//"Otherwise, continue polling one of the Status ports until bit 3 (DRQ, value = 8) sets, or until bit 0
		//	(ERR, value = 1) sets."
		while (!status.drq && !status.err) {
			status = _read_uint8(Read::RegisterOffset::STATUS_REGULAR);
		}
		//"At that point, if ERR is clear, the data is ready to read from the Data port (0x1F0).  Read 256 16-bit
		//	values, and store them."
		_transfer_block_into(data_buffer);

		return true;
	#endif
}
void Bus::command_readsectors(int device_index, uint8_t* data_buffer, AbsoluteLBA lba,int num_sectors) {
	//ATA/ATAPI-4 8.27 (logical pg. 138)
	//	  7 |   6 |   5 |   4 |    3      2  1   0 |
	//	obs | LBA | obs | DEV | Head number or LBA |
	//	Protocol: PIO data in
	_select_device_as_necessary(device_index);

	assert_term(lba<=268435455ull,"LBA (%u) is larger than (2^28)-1!",static_cast<uint32_t>(lba)); //Only have 28 bits (maximum (2^28)-1 ~= 256 million sectors)
	assert_term(num_sectors<=256,"Number of sectors was larger than 256!"); //Can't be uint8_t, since 256 is valid (we have to pass it as zero though)
	uint8_t num_sectors_arg = num_sectors==256 ? 0 : static_cast<uint8_t>(num_sectors);

	//Write::RegisterOffset::FEATURES_ERRORINFO not applicable
	_write_uint8(Write::RegisterOffset::NUM_SECTORS,              num_sectors_arg);
	_write_uint8(Write::RegisterOffset::    LBA_LOW, (lba&0x00000000000000FF)    );
	_write_uint8(Write::RegisterOffset::    LBA_MID, (lba&0x000000000000FF00)>> 8);
	_write_uint8(Write::RegisterOffset::   LBA_HIGH, (lba&0x0000000000FF0000)>>16);
	_write_uint8(Write::RegisterOffset::DEVICE_HEAD, 0x40 | (device_index<<4) | (lba>>24)); //Note: 0x40 is because using an LBA.  Also note: (lba>>24) is <= 0x0F already.
	_current_command                               = 0x20; _current_command_buffer=data_buffer;
	_write_uint8(Write::RegisterOffset::    COMMAND, 0x20);

	_proto_pio_data_in(data_buffer+512*num_sectors);
}
/*void Bus::command_writesectors(int device_index) {
	//ATA/ATAPI-4 8.48 (logical pg. 207)
	//	  7 |   6 |   5 |   4 |    3      2  1   0 |
	//	obs | LBA | obs | DEV | Head number or LBA |
	//	Protocol: PIO data out
	//0x30
	_select_device_as_necessary(device_index);
	assert_term(false,"Not implemented!");
}*/

//Note: IRQs cannot be interrupted by other IRQs.
void Bus::handle_irq(void) {
	//kernel->write("IRQ begin %d\n", static_cast<int>(_current_command));
	switch (_current_command) {
		case 0xEC:   //IDENTIFY (PIO data in)
		case 0x20: { //READ SECTORS (PIO data in)
			_StatusByte status = _read_uint8(Read::RegisterOffset::STATUS_REGULAR);
			if (status.err) _current_command_buffer=nullptr;
			else {
				assert_term(current!=nullptr,"Current device was null somehow!");
				_transfer_block_into(_current_command_buffer);
				_current_command_buffer += 512;
			}
			break;
		}
		default: assert_term(false,"Interrupt handler for undefined command \"%d\"!",static_cast<int>(_current_command));
	}
	//kernel->write("IRQ end\n");
}

#if 0
void Bus::read_sectors_from_current_drive(AbsoluteLBA lba, uint8_t* data_buffer,int num_sectors) {
	assert_term(current!=nullptr,"Current drive was null somehow!");
	Drive::StatusByte status = current->get_status();
	kernel->write("Begin read; status ");
	status.print();
	kernel->write("\n");

	_irq_buffer = data_buffer;

	assert_term(lba<=562949953421311ull,"LBA is larger than (2^49)-1!"); //Only have 48 bits (equals maximum (2^49)-1 addresses = 512TiB)
	assert_term(num_sectors<=65536,"Number of sectors was larger than 65536!"); //Can't be unsigned short, since 65536 is valid (we have to pass it as zero though)
	unsigned short num_sectors_arg = num_sectors==65536 ? 0 : num_sectors;

	//http://wiki.osdev.org/ATA_PIO_Mode#x86_Directions

	//Note: the high bytes must be sent first.  Theoretically, there's a latch or something
	//	that requires this, flipping between whether the expected byte is high or low?  For
	//	performance reasons, also don't write to the same IO port twice in a row.
	IO::send<uint8_t>(_io_base+0x0002, (num_sectors_arg&        0x0000FF00)>> 8); //high byte of sector count
	IO::send<uint8_t>(_io_base+0x0003, (            lba&0x00000000FF000000)>>24); //byte 4 of LBA
	IO::send<uint8_t>(_io_base+0x0004, (            lba&0x000000FF00000000)>>32); //byte 5 of LBA
	IO::send<uint8_t>(_io_base+0x0005, (            lba&0x0000FF0000000000)>>40); //byte 6 of LBA
	IO::send<uint8_t>(_io_base+0x0002,  num_sectors_arg&        0x000000FF     ); //low byte of sector count
	IO::send<uint8_t>(_io_base+0x0003,              lba&0x00000000000000FF     ); //byte 1 of LBA
	IO::send<uint8_t>(_io_base+0x0004, (            lba&0x000000000000FF00)>> 8); //byte 2 of LBA
	IO::send<uint8_t>(_io_base+0x0005, (            lba&0x0000000000FF0000)>>16); //byte 3 of LBA

	//Send the "READ SECTORS EXT" command (0x24) to the command port:
	IO::send<uint8_t>(_io_base+0x0007, 0x24);

	//Busy wait for a series of IRQs to read the sector.  Not polling.
	while (_irq_buffer-data_buffer<512*num_sectors);

	//Note for polling PIO drivers: after transferring the last word of a PIO data block to the data IO port, give the drive a
	//400ns delay to reset its DRQ bit (and possibly set BSY again, while emptying/filling its buffer to/from the drive).
	/*IO::wait();
	IO::wait();
	IO::wait();
	IO::wait();
	IO::wait();*/
	/*for (int i=0;i<100;++i) {
		IO::wait();
	}*/

	status = current->get_status();
	kernel->write("End read; status ");
	status.print();
	kernel->write("\n");
}
#endif

uint8_t  Bus::  _read_uint8( Read::RegisterOffset offset               ) const {
	assert_term(offset!=Read::RegisterOffset::DATA,"Should use uint16_t method to read data port!");
	return IO::recv<uint8_t>(_io_base+offset);
}
uint16_t Bus:: _read_uint16( Read::RegisterOffset offset               ) const {
	assert_term(offset==Read::RegisterOffset::DATA,"Should use uint8_t method to read registers!");
	return IO::recv<uint16_t>(_io_base+offset);
}
void     Bus:: _write_uint8(Write::RegisterOffset offset,  uint8_t data) const {
	assert_term(offset!=Write::RegisterOffset::DATA,"Should use uint16_t method to write data port!");
	IO::send<uint8_t>(_io_base+offset,data);
}
void     Bus::_write_uint16(Write::RegisterOffset offset, uint16_t data) const {
	assert_term(offset==Write::RegisterOffset::DATA,"Should use uint8_t method to write registers!");
	IO::send<uint8_t>(_io_base+offset,data);
}

void Bus::print(int level) const {
	static char const* bus_names[4] = {"Primary","Secondary","Tertiary","Quaternary"};
	kernel->write_sys(level,"%d: %s bus.  Valid devices:\n",index,bus_names[index]);
	for (int j=0;j<2;++j) {
		Device* device = devices[j];
		if (device==nullptr) {
			kernel->write_sys(level+1,"%d: Invalid drive (or ATAPI)\n",j);
		} else {
			kernel->write_sys(level+1,"%d: Valid drive:\n",j);
			device->print(level+2);
		}
	}
}

}}}


text:
package ea.tool.db;

/**
 * Unit test for simple App.
 */
public class AppTest {
}


text:
<component name="libraryTable">
  <library name="badgeview">
    <CLASSES>
      <root url="jar://$USER_HOME$/Desktop/ZhiHuiDianTi/ZhiHuiDianTi/libs/badgeview.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>


text:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ForeignKey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('constraint_name', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='Schema',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('schema_name', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='Table',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('table_name', models.CharField(max_length=250)),
                ('schema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Schema')),
            ],
        ),
        migrations.CreateModel(
            name='TableField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('field_name', models.CharField(max_length=250)),
                ('table', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Table')),
            ],
        ),
        migrations.AddField(
            model_name='foreignkey',
            name='on_table',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='on_table', to='api.Table'),
        ),
        migrations.AddField(
            model_name='foreignkey',
            name='to_table',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_name', to='api.Table'),
        ),
    ]


text:
/**
* OWASP Benchmark Project v1.3alpha
*
* This file is part of the Open Web Application Security Project (OWASP)
* Benchmark Project. For details, please see
* https://www.owasp.org/index.php/Benchmark.
*
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation, version 2.
*
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* @author Nick Sanidas Aspect Security
* @created 2015
*/

package xss.BenchmarkTest;

import java.io.IOException;

import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

//@WebServlet(value="/xss-01/BenchmarkTest00643")
public class BenchmarkTest00643 extends HttpServlet {

	private static final long serialVersionUID = 1L;

	@Override
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	@Override
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html;charset=UTF-8");

		helpers.SeparateClassRequest scr = new helpers.SeparateClassRequest( request );
		String param = scr.getTheParameter("BenchmarkTest00643");
		if (param == null) param = "";

		StringBuilder sbxyz31207 = new StringBuilder(param);
		String bar = sbxyz31207.append("_SafeStuff").toString();

response.setHeader("X-XSS-Protection", "0");
		response.getWriter().print(bar.toCharArray());
	}

}


text:
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[{{ site.title }}]]></title>
  <link href="{{ '/atom.xml'| to_absurl }}" rel="self"/>
  <link href="{{ '/'| to_absurl }}"/>
  <updated>{{ site.time | date_to_xmlschema }}</updated>
  <id>{{ '/'| to_absurl }}</id>
  <author>
    <name><![CDATA[{{ site.author.name | strip_html }}]]></name>
    {% if site.author.email %}<email><![CDATA[{{ site.author.email }}]]></email>{% endif %}
  </author>
  <generator uri="http://getjpress.org/">JPress</generator>

  {% for post in site.posts limit: 20 %}
  <entry>
    <title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
    <link href="{{ post.url | to_absurl }}"/>
    <updated>{{ post.date | date_to_xmlschema }}</updated>
    <id>{{ post.url | to_absurl }}</id>
    <content type="html"><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]></content>
  </entry>
  {% endfor %}
</feed>


text:
package org.jetbrains.concurrency;

import com.intellij.util.Function;

public interface ObsolescentFunction<Param, Result> extends Function<Param, Result>, Obsolescent {
}


text:
package ca

import (
	"crypto/ecdsa"
	"crypto/x509"
	"database/sql"
	"errors"
	"math/big"

	"github.com/golang/protobuf/proto"
	"github.com/hyperledger/fabric/core/crypto/primitives"
	pb "github.com/hyperledger/fabric/membersrvc/protos"
	"golang.org/x/net/context"
	"google.golang.org/grpc"
)

// TLSCA is the tls certificate authority.
//
type TLSCA struct {
	*CA
	eca        *ECA
	gRPCServer *grpc.Server
}

// TLSCAP serves the public GRPC interface of the TLSCA.
//
type TLSCAP struct {
	tlsca *TLSCA
}

// TLSCAA serves the administrator GRPC interface of the TLS.
//
type TLSCAA struct {
	tlsca *TLSCA
}

func initializeTLSCATables(db *sql.DB) error {
	return initializeCommonTables(db)
}

// NewTLSCA sets up a new TLSCA.
//
func NewTLSCA(eca *ECA) *TLSCA {
	tlsca := &TLSCA{NewCA("tlsca", initializeTLSCATables), eca, nil}

	return tlsca
}

// Start starts the TLSCA.
//
func (tlsca *TLSCA) Start(srv *grpc.Server) {
	tlsca.startTLSCAP(srv)
	tlsca.startTLSCAA(srv)

	Info.Println("TLSCA started.")
}

func (tlsca *TLSCA) startTLSCAP(srv *grpc.Server) {
	pb.RegisterTLSCAPServer(srv, &TLSCAP{tlsca})
}

func (tlsca *TLSCA) startTLSCAA(srv *grpc.Server) {
	pb.RegisterTLSCAAServer(srv, &TLSCAA{tlsca})
}

// Stop stops the TCA services.
func (tlsca *TLSCA) Stop() error {
	Info.Println("Stopping the TLSCA services...")
	if tlsca.gRPCServer != nil {
		tlsca.gRPCServer.Stop()
	}
	err := tlsca.CA.Stop()
	if err != nil {
		Error.Println("Error stopping the TLSCA services ", err)
	} else {
		Info.Println("TLSCA services stopped")
	}
	return err
}

// ReadCACertificate reads the certificate of the TLSCA.
//
func (tlscap *TLSCAP) ReadCACertificate(ctx context.Context, in *pb.Empty) (*pb.Cert, error) {
	Trace.Println("grpc TLSCAP:ReadCACertificate")

	return &pb.Cert{Cert: tlscap.tlsca.raw}, nil
}

// CreateCertificate requests the creation of a new enrollment certificate by the TLSCA.
//
func (tlscap *TLSCAP) CreateCertificate(ctx context.Context, in *pb.TLSCertCreateReq) (*pb.TLSCertCreateResp, error) {
	Trace.Println("grpc TLSCAP:CreateCertificate")

	id := in.Id.Id

	sig := in.Sig
	in.Sig = nil

	r, s := big.NewInt(0), big.NewInt(0)
	r.UnmarshalText(sig.R)
	s.UnmarshalText(sig.S)

	raw := in.Pub.Key
	if in.Pub.Type != pb.CryptoType_ECDSA {
		return nil, errors.New("unsupported key type")
	}
	pub, err := x509.ParsePKIXPublicKey(in.Pub.Key)
	if err != nil {
		return nil, err
	}

	hash := primitives.NewHash()
	raw, _ = proto.Marshal(in)
	hash.Write(raw)
	if ecdsa.Verify(pub.(*ecdsa.PublicKey), hash.Sum(nil), r, s) == false {
		return nil, errors.New("signature does not verify")
	}

	if raw, err = tlscap.tlsca.createCertificate(id, pub.(*ecdsa.PublicKey), x509.KeyUsageDigitalSignature, in.Ts.Seconds, nil); err != nil {
		Error.Println(err)
		return nil, err
	}

	return &pb.TLSCertCreateResp{Cert: &pb.Cert{Cert: raw}, RootCert: &pb.Cert{Cert: tlscap.tlsca.raw}}, nil
}

// ReadCertificate reads an enrollment certificate from the TLSCA.
//
func (tlscap *TLSCAP) ReadCertificate(ctx context.Context, in *pb.TLSCertReadReq) (*pb.Cert, error) {
	Trace.Println("grpc TLSCAP:ReadCertificate")

	raw, err := tlscap.tlsca.readCertificateByKeyUsage(in.Id.Id, x509.KeyUsageKeyAgreement)
	if err != nil {
		return nil, err
	}

	return &pb.Cert{Cert: raw}, nil
}

// RevokeCertificate revokes a certificate from the TLSCA.  Not yet implemented.
//
func (tlscap *TLSCAP) RevokeCertificate(context.Context, *pb.TLSCertRevokeReq) (*pb.CAStatus, error) {
	Trace.Println("grpc TLSCAP:RevokeCertificate")

	return nil, errors.New("not yet implemented")
}

// RevokeCertificate revokes a certificate from the TLSCA.  Not yet implemented.
//
func (tlscaa *TLSCAA) RevokeCertificate(context.Context, *pb.TLSCertRevokeReq) (*pb.CAStatus, error) {
	Trace.Println("grpc TLSCAA:RevokeCertificate")

	return nil, errors.New("not yet implemented")
}


text:
<?php

namespace Iniaf\Bundle\BackendBundle\Controller;

use Iniaf\Bundle\SemilleraBundle\Entity\Semillera;
use Iniaf\Bundle\SemilleraBundle\Form\SemilleraType;
use Iniaf\Bundle\SemilleraBundle\Model\SemilleraModel;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class SemilleraController extends Controller
{
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();
        $entities = $em->getRepository('SemilleraBundle:Semillera')->findAll();

        $entity = new SemilleraModel();
        $form = $this->createForm(new SemilleraType(), $entity);

        return $this->render('BackendBundle:Semillera:index.html.twig', array(
            'entities'      =>  $entities,
            'form'          =>  $form->createView()
        ));
    }

    public function crearAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();
        $entity = new SemilleraModel();
        $form = $this->createForm(new SemilleraType(), $entity);

        $form->handleRequest($request);
        $validador = $em->getRepository('SemilleraBundle:Semillera')->findByNombre($entity->nombre);
        if($validador == null)
        {
            $semillera = new Semillera();
            $comunidad = $em->getRepository('LocalizacionBundle:Comunidad')->findOneById($entity->comunidad);
            $semillera->setNombre($entity->nombre);
            $semillera->setComunidad($comunidad);
            $semillera->setResponsable($entity->responsable);
            $semillera->setTecnicoResponsable($entity->tecnicoResponsable);
            $semillera->setTipo($entity->tipo);
            $semillera->setDireccion($entity->direccion);
            $semillera->setTelefono($entity->telefono);
            $semillera->setCiNit($entity->ciNit);
            $em->persist($semillera);
            $em->flush();
        }
        return $this->redirect($this->generateUrl('backend_semillera_home'));
    }

    public function filtrovarAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();
        $variedades = $em->getRepository('SemillaBundle:Variedad')->findByCultivo($request->get('cultivo_id'));

        return $this->render('BackendBundle:Variedad:filtrovar.html.twig', array(
            'variedades' => $variedades
        ));
    }

    public function editarAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();
        $semillera = $em->getRepository('SemilleraBundle:Semillera')->findOneById($id);
        $entity = new SemilleraModel();
        $entity->nombre = $semillera->getNombre();
        $entity->comunidad = $semillera->getComunidad();
        $entity->responsable = $semillera->getResponsable();
        $entity->tecnicoResponsable = $semillera->getTecnicoResponsable();
        $entity->tipo = $semillera->getTipo();
        $entity->direccion = $semillera->getDireccion();
        $entity->telefono = $semillera->getTelefono();
        $entity->ciNit = $semillera->getCiNit();

        $form = $this->createForm(new SemilleraType(), $entity);

        if ($request->isMethod('post'))
        {
            $form->handleRequest($request);

            $comunidad = $em->getRepository('LocalizacionBundle:Comunidad')->findOneById($entity->comunidad);
            $semillera->setNombre($entity->nombre);
            $semillera->setComunidad($comunidad);
            $semillera->setResponsable($entity->responsable);
            $semillera->setTecnicoResponsable($entity->tecnicoResponsable);
            $semillera->setTipo($entity->tipo);
            $semillera->setDireccion($entity->direccion);
            $semillera->setTelefono($entity->telefono);
            $semillera->setCiNit($entity->ciNit);

            $em->flush();

            return $this->redirect($this->generateUrl('backend_semillera_home'));
        }

        return $this->render('BackendBundle:Semillera:editar.html.twig', array(
            'form'      =>  $form->createView(),
            'entity'    =>  $semillera
        ));
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycologia 19(2): 57 (1927)

#### Original name
Aecidium pratae H.S. Jacks. & Holw.

### Remarks
null


text:
import { Component } from '@angular/core';

@Component({
  selector: 'sky-repeater-item-content',
  template: require('../shared/simple-content.html')
})
export class SkyRepeaterItemContentComponent { }


text:
import Rule from "../rule.js";

export default (Rule.makeRule({
    name: "table-missing-cells",
    severity: Rule.Severity.WARNING,
    selector: "table",
    lint: function (state, content, nodes, match) {
        const table = nodes[0];
        const headerLength = table.header.length;
        const rowLengths = table.cells.map((r) => r.length);
        for (let r = 0; r < rowLengths.length; r++) {
            if (rowLengths[r] !== headerLength) {
                return `Table rows don't match header:
The table header has ${headerLength} cells, but
Row ${r + 1} has ${rowLengths[r]} cells.`;
            }
        }
    },
}): Rule);


text:
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- Database: `reporting_system`
--

-- --------------------------------------------------------

--
-- Table structure for table `reports`
--

CREATE TABLE `reports` (
  `id` int(11) NOT NULL,
  `current_version_id` int(11) NOT NULL,
  `name` varchar(250) NOT NULL,
  `priority` enum('High','Low') NOT NULL DEFAULT 'Low',
  `description` text NOT NULL,
  `status` tinyint(1) NOT NULL,
  `employee_id` int(11) DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `reports_request`
--

CREATE TABLE `reports_request` (
  `id` int(11) NOT NULL,
  `report_id` int(11) NOT NULL,
  `version_id` int(11) NOT NULL,
  `name` varchar(250) NOT NULL,
  `priority` enum('High','Low') NOT NULL DEFAULT 'Low',
  `description` text NOT NULL,
  `status` tinyint(1) NOT NULL,
  `employee_id` int(11) DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `reports`
--
ALTER TABLE `reports`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `reports_request`
--
ALTER TABLE `reports_request`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `reports`
--
ALTER TABLE `reports`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `reports_request`
--
ALTER TABLE `reports_request`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;


text:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/practices/2013/entlib/semanticlogging/etw">

  <traceEventService sessionNamePrefix=""/> <!--warning, empty sessionNamePrefix-->

  <sinks>
    <consoleSink name=""> <!--warning, empty name-->
      <sources>
        <eventSource name="MyCompany"/>
      </sources>
    </consoleSink>
    <mySink xmlns="urn:test"/> <!--warning, no schema found-->
  </sinks>

</configuration>


text:
package api

import "github.com/go-ole/go-ole"

// Add adds an ADSI object to an existing group.
func (v *IADsGroup) Add(member string) (err error) {
	return ole.NewError(ole.E_NOTIMPL)
}

// Description retrieves the description of the group.
func (v *IADsGroup) Description() (desc string, err error) {
	return "", ole.NewError(ole.E_NOTIMPL)
}

// Members retrieves an IADsMembers interface that provides access to the
// membership of the group.
func (v *IADsGroup) Members() (members *IADsMembers, err error) {
	return nil, ole.NewError(ole.E_NOTIMPL)
}

// Remove removes the specified user object from this group. The operation
// does not remove the group object itself even when there is no member remaining in the group.
func (v *IADsGroup) Remove(member string) (err error) {
	return ole.NewError(ole.E_NOTIMPL)
}