text:
bool MobileBlockImpl::init_gfx_ = false;
uint MobileBlockImpl::ramp_texture_id_ = 0;
//uint MobileBlockImpl::road_texture_id_ = 0;

MobileBlockHandle MobileBlockImpl::Create(const khTileAddr& addr, int sg,
                                          double width) {
  return khRefGuardFromNew(new MobileBlockImpl(addr, sg, width));
}

MobileBlockImpl::MobileBlockImpl(const khTileAddr& addr, int snap_grid,
                                 double width)
    : addr_(addr), width_(width) {
  snap_grid_ = static_cast<double>(snap_grid);
}

void MobileBlockImpl::InitGfx() {
  // build up an alpha texture for our ramp
  // the ramp goes linearly from 0 -> max -> 0 over our range
  // so half way through the range should be max
  // the ramp size should be a power of 2 to match a valid texture size
  const int kRampSize = 64;
  const int kMaxVal = 255;
  const float kRampStep = static_cast<float>(kMaxVal) /
                          static_cast<float>((kRampSize >> 1) - 1);
  uint8 tex_buff[kRampSize];
  for (int i = 0; i < (kRampSize >> 1); ++i) {
    tex_buff[i] = static_cast<int>((i * kRampStep) + 0.5);
    tex_buff[kRampSize - i - 1] = tex_buff[i];
  }

  // configure line texture
  glGenTextures(1, &ramp_texture_id_);
  glBindTexture(GL_TEXTURE_2D, ramp_texture_id_);

  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
  glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, kRampSize, 1, 0, GL_ALPHA,
               GL_UNSIGNED_BYTE, static_cast<void*>(tex_buff));
#if 0
  //
  // make a road texture that looks like the google maps road
  const int kRoadImageSize = 64;
  GLubyte road_image[kRoadImageSize][4];
  for (int i = 0; i < kRoadImageSize; ++i) {
    if (i < 2 || i >= 62) {
      road_image[i][0] = 0;
      road_image[i][1] = 0;
      road_image[i][2] = 0;
      road_image[i][3] = 0;
    } else if (i < 8 || i >= 56) {
      road_image[i][0] = 50;
      road_image[i][1] = 50;
      road_image[i][2] = 50;
      road_image[i][3] = 200;
    } else {
      road_image[i][0] = 200;
      road_image[i][1] = 200;
      road_image[i][2] = 0;
      road_image[i][3] = 255;
    }
  }

  glGenTextures(1, &road_texture_id_);
  glBindTexture(GL_TEXTURE_2D, road_texture_id_);

  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
               kRoadImageSize, 1, 0,
               GL_RGBA, GL_UNSIGNED_BYTE, road_image);
#endif
  init_gfx_ = true;
}

void MobileBlockImpl::Draw(const gstDrawState& state,
                           const BlendFuncModes& blend_modes) {
  if (!init_gfx_)
    InitGfx();

  glMatrixMode(GL_PROJECTION);
  glPushMatrix();
  glLoadIdentity();

  double width = state.cullbox.Width();
  double height = state.cullbox.Height();
  double grid_step = Grid::Step(addr_.level);

  double scale_x = (width / grid_step) * (snap_grid_);
  double scale_y = (height / grid_step) * (snap_grid_);

  glOrtho(0, scale_x, 0, scale_y, -1, 1);

  float trans_x = (static_cast<float>(addr_.col) -
                   (state.cullbox.w / grid_step)) * (snap_grid_);
  float trans_y = (static_cast<float>(addr_.row) -
                   (state.cullbox.s / grid_step)) * (snap_grid_);

  glTranslatef(trans_x, trans_y, 0);

  //
  // draw decimation grid
  //
  if (state.mode & DrawGrids) {
    //glEnable(GL_LINE_STIPPLE);
    //glLineStipple(1, 0xAAAA);
    glColor3f(0.7, 0.0, 0.7);
    glLineWidth(1);
    glBegin(GL_LINES);
    for (int r = 0; r < snap_grid_; r += 4096) {
      glVertex2f(0, r);
      glVertex2f(snap_grid_ - 1, r);
      glVertex2f(r, 0);
      glVertex2f(r, snap_grid_ - 1);
    }
    glEnd();
    //glDisable(GL_LINE_STIPPLE);
  }

  //
  // draw features here
  //
  // first polys
  glEnableClientState(GL_VERTEX_ARRAY);
  glEnable(GL_BLEND);
  glBlendFunc(blend_modes.src_factor, blend_modes.dest_factor);
  glLineWidth(2);
  glPointSize(3);
  uint off = 0;
  for (std::vector<uint>::const_iterator it = counts_.begin();
       it != counts_.end(); ++it) {
    glVertexPointer(2, GL_SHORT, 0, &vertexes_[off]);
    glColor4f(0.0, 0.8, 0.8, 0.8);
    glDrawArrays(GL_TRIANGLE_STRIP, 0, *it);
    off += *it;
  }

  glDisable(GL_BLEND);

  glDisableClientState(GL_VERTEX_ARRAY);
  glPopMatrix();
}

gstBBox MobileBlockImpl::GetBoundingBox() {
  double grid_step = Grid::Step(addr_.level);
  double w = static_cast<double>(addr_.col) * grid_step;
  double e = w + grid_step;
  double s = static_cast<double>(addr_.row) * grid_step;
  double n = s + grid_step;
  return gstBBox(w, e, s, n);
}

MobileVertex MobileBlockImpl::SnapVertexToLattice(double origin_x,
                                                  double origin_y,
                                                  double scale,
                                                  const gstVert2D& vert) {
  int x = static_cast<int>(((vert.x - origin_x) / scale) + 0.5);
  int y = static_cast<int>(((vert.y - origin_y) / scale) + 0.5);

  if (x > std::numeric_limits<MobileScalar>::max())
    x = std::numeric_limits<MobileScalar>::max();
  if (y > std::numeric_limits<MobileScalar>::max())
    y = std::numeric_limits<MobileScalar>::max();

  return MobileVertex(static_cast<MobileScalar>(x),
                      static_cast<MobileScalar>(y));
}

bool MobileBlockImpl::AddGeometry(const gstGeodeHandle geode) {
  if (geode->VertexCount(0) < 2)
    return false;

  double grid_step = Grid::Step(addr_.level);
  double origin_x = static_cast<double>(addr_.col) * grid_step;
  double origin_y = static_cast<double>(addr_.row) * grid_step;
  double scale = grid_step / (snap_grid_);

  notify(NFY_DEBUG, "l:%d r:%u c:%u vertex length:%d  -",
         addr_.level, addr_.row, addr_.col, geode->VertexCount(0));

  //
  // build center-lines
  //

  vertexes_.reserve(geode->VertexCount(0));
  for (uint v = 0; v < geode->VertexCount(0); ++v) {
    const gstVertex& vert = geode->GetVertex(0, v);
    vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale,
                                            gstVert2D(vert.x, vert.y)));
  }
  counts_.push_back(geode->VertexCount(0));

#if 0
  //
  // build polygons
  //
  int vertex_count = 0;
  gstVert2D prev_v0;
  gstVert2D prev_v1;
  gstVert2D prev_v2;
  gstVert2D prev_v3;
  for (uint n = 0; n < geode->VertexCount(0) - 1; ++n) {
    const gstVert2D a(geode->GetVertex(0, n).x, geode->GetVertex(0, n).y);
    const gstVert2D b(geode->GetVertex(0, n + 1).x, geode->GetVertex(0, n + 1).y);

    // find the simple vector of this segment
    gstVert2D v(b.x - a.x, b.y - a.y);
    v.Normalize();

    // rotate
    gstVert2D r(-v.y, v.x);

    // scale
    gstVert2D s(r.x * width_, r.y * width_);

    // find four courners of extruded line
    gstVert2D v0(a.x + s.x, a.y + s.y);
    gstVert2D v1(a.x - s.x, a.y - s.y);
    gstVert2D v2(b.x + s.x, b.y + s.y);
    gstVert2D v3(b.x - s.x, b.y - s.y);

    if (n == 0) {
      vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale, v0));
      vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale, v1));
      vertex_count += 2;
    } else {
      // skip any vertex that is on the same line as the previous two
      if (!prev_v2.AlmostEqual(v0, 0.0000001)) {
        // find four corners of extruded line
        gstVert2D v4 = gstVert2D::Intersect(prev_v0, prev_v2, v0, v2);
        gstVert2D v5 = gstVert2D::Intersect(prev_v1, prev_v3, v1, v3);

        vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale, v4));
        vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale, v5));
        vertex_count += 2;
      }
    }

    // special case end
    if (n == geode->VertexCount(0) - 2) {
      vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale, v2));
      vertexes_.push_back(SnapVertexToLattice(origin_x, origin_y, scale, v3));
      vertex_count += 2;
    }

    prev_v0 = v0;
    prev_v1 = v1;
    prev_v2 = v2;
    prev_v3 = v3;
  }
  counts_.push_back(vertex_count);
#endif

  return true;
}

void MobileBlockImpl::ReduceGeometry(std::list<MobileVertex>* snap_verts) {
  if (snap_verts->size() == 0)
    return;
  // remove duplicates
  std::list<MobileVertex>::iterator last = snap_verts->begin();
  std::list<MobileVertex>::iterator next = last;
  ++next;
  while (next != snap_verts->end()) {
    if (*last == *next)
      next = snap_verts->erase(next);
    else {
      last = next;
      ++next;
    }
  }

  // remove degenerates
  int before_size, after_size;
  do {
    before_size = snap_verts->size();
    if (before_size < 3)
      break;

    std::list<MobileVertex>::iterator a = snap_verts->begin();
    std::list<MobileVertex>::iterator b = a;
    ++b;
    std::list<MobileVertex>::iterator c = b;
    ++c;
    while (c != snap_verts->end()) {
      if (*a == *c) {
        b = snap_verts->erase(b);
        c = b;
        ++c;
      } else {
        ++a;
        ++b;
        ++c;
      }
    }

    after_size = snap_verts->size();
  } while (before_size != after_size);
}

uint32 MobileBlockImpl::ExportSize() const {
  uint32 size = 0;

  // primitive type
  size += sizeof(uint16);

  // number of prims
  size += sizeof(uint16);

  // length of each prim
  size += counts_.size() * sizeof(uint16);

  // vertex data
  size += vertexes_.size() * sizeof(MobileVertex);

  return size;
}

uint32 MobileBlockImpl::ExportRaw(char* buff) const {
  char* orig_buff = buff;

  // primitive type
  uint16* prim_type = reinterpret_cast<uint16*>(buff);
  *prim_type = Roads;
  buff += sizeof(uint16);

  // number of prims
  uint16* num_parts = reinterpret_cast<uint16*>(buff);
  *num_parts = static_cast<uint16>(counts_.size());
  buff += sizeof(uint16);

  // length of each prim
  uint16* counts = reinterpret_cast<uint16*>(buff);
  for (uint p = 0; p < counts_.size(); ++p) {
    counts[p] = counts_[p];
  }
  buff += sizeof(uint16) * counts_.size();

  // vertex data
  MobileVertex* verts = reinterpret_cast<MobileVertex*>(buff);
  for (uint v = 0; v < vertexes_.size(); ++v)
    verts[v] = vertexes_[v];
  buff += sizeof(MobileVertex) * vertexes_.size();

  return buff - orig_buff;
}

MobileBlockHandle MobileBlockImpl::FromRaw(const khTileAddr& addr,
                                           const char* buff) {
  MobileBlockHandle new_block = khRefGuardFromNew(
      new MobileBlockImpl(addr, kBlockLatticeRes, 0.001));

  //const char* tmp_buff = buff;

  // primitive type
  const uint16* prim_type = reinterpret_cast<const uint16*>(buff);
  new_block->prim_type_ = *prim_type;
  buff += sizeof(uint16);

  // number of prims
  const uint16* num_parts = reinterpret_cast<const uint16*>(buff);
  new_block->counts_.reserve(*num_parts);
  buff += sizeof(uint16);

  // length of each prim
  int total_length = 0;
  const uint16* counts = reinterpret_cast<const uint16*>(buff);
  for (uint p = 0; p < *num_parts; ++p) {
    new_block->counts_.push_back(counts[p]);
    total_length += counts[p];
  }
  buff += sizeof(uint16) * (*num_parts);

  // vertex data
  new_block->vertexes_.reserve(total_length);
  const MobileVertex* verts = reinterpret_cast<const MobileVertex*>(buff);
  for (int v = 0; v < total_length; ++v)
    new_block->vertexes_.push_back(verts[v]);
  //buff += sizeof(MobileVertex) * total_length;

  return new_block;
}


text:
'use strict'

var _ = require('underscore')
  , colors = require('colors')
  , less = require('less')
  , util = require('./util')
  , path = require('path')
  , fs = require('fs')

// core class defintion
function RECESS(path, options, callback) {
  this.path = path
  this.output = []
  this.errors = []
  this.options = _.extend({}, RECESS.DEFAULTS, options)
  path && this.read()
  this.callback = callback
}

// instance methods
RECESS.prototype = {

  constructor: RECESS

, log: function (str, force) {

    if (this.options.stripColors) str = str.stripColors

    // if compiling only write with force flag
    if (!this.options.compile || force) {
      this.options.cli ? console.log(str) : this.output.push(str)
    }

  }

, read: function () {
    var that = this

    // try to read data from path
    fs.readFile(this.path, 'utf8', function (err, data) {

      //  if err, exit with could not read message
      if (err) {
        that.errors.push(err)
        that.log('Error reading file: '.red + that.path.grey + '\n', true)
        return that.callback && that.callback()
      }

      // set instance data
      that.data = data

      // parse data
      that.parse()

    })
  }

, parse: function () {
    var that = this
      , options = {
          paths: [path.dirname(this.path)]
        , optimization: 0
        , filename: this.path && this.path.replace(/.*(?=\/)\//, '')
        }

    // try to parse with less parser
    try {

      // instantiate new parser with options
      new less.Parser(options)

        // parse data into tree
        .parse(this.data, function (err, tree) {

          if (err) {
            // push to errors array
            that.errors.push(err)

            // less gave up trying to parse the data ;_;
            that.log(err.name.red + ": " + err.message + ' of ' + err.filename.yellow + '\n')

            // if extract - then log it
            err.extract && err.extract.forEach(function (line, index) {
              that.log(util.padLine(err.line + index) + line)
            })

            // add extra line for readability after error log
            that.log(" ")

            // exit with callback if present
            return that.callback && that.callback()
          }

          // test to see if file has a less extension
          if (/less$/.test(that.path) && !that.parsed) {

            // if it's a LESS file, we flatten it
            that.data = tree.toCSS({})

            // set parse to true so as to not infinitely reparse less files
            that.parsed = true

            // reparse less file
            return that.parse()
          }

          // set definitions to parse tree
          that.definitions = tree.rules

          // validation defintions
          that.options.compile ? that.compile() : that.validate()
        })

    } catch (err) {

      // less exploded trying to parse the file (╯°□°)╯︵ ┻━┻
      // push to errors array
      that.errors.push(err)

      // log a message trying to explain why
      that.log(
          "Parse error".red
        + ": "
        + err.message
        + " on line "
        + util.getLine(err.index, this.data)
      )

      // exit with callback if present
      this.callback && this.callback()
    }
  }

, compile: function () {
    var that = this
      , key
      , css

    // activate all relevant compilers
    Object.keys(this.options).forEach(function (key) {
      that.options[key]
        && RECESS.COMPILERS[key]
        && RECESS.COMPILERS[key].on.call(that)
    })

    // iterate over defintions and compress them (join with new lines)
    css = this.definitions.map(function (def) {
      return def.toCSS([[]], { data: that.data, compress: that.options.compress })
    }).join(this.options.compress ? '' : '\n')

    // minify with cssmin
    if (that.options.compress) css = require('./min').compressor.cssmin(css)

    // deactivate all relevant compilers
    Object.keys(this.options).reverse().forEach(function (key) {
      that.options[key]
        && RECESS.COMPILERS[key]
        && RECESS.COMPILERS[key].off()
    })

    // cleanup trailing newlines
    css = css.replace(/[\n\s\r]*$/, '')

    // output css
    this.log(css, true)

    // callback and exit
    this.callback && this.callback()
  }

, validate: function () {
    var failed
      , key

    // iterate over instance options
    for (key in this.options) {

      // if option has a validation, then we test it
      this.options[key]
        && RECESS.RULES[key]
        && !this.test(RECESS.RULES[key])
        && (failed = true)

    }

    // exit with failed flag to validateStatus
    this.validateStatus(failed)
  }

, test: function (validation) {
    var l = this.definitions.length
      , i = 0
      , isValid = true
      , rule
      , def
      , j
      , k

    // test each definition against a given validation
    for (; i < l; i++) {
      def = this.definitions[i]
      if (!validation(def, this.data)) isValid = false
    }

    // return valid state
    return isValid
  }

, validateStatus: function (failed) {
    var that = this
      , fails

    if (failed) {

      // count errors
      fails = util.countErrors(this.definitions)

      // log file overview
      this.log('FILE: ' + this.path.cyan)
      this.log('STATUS: ' + 'Busted'.magenta)
      this.log('FAILURES: ' + (fails + ' failure' + (fails > 1 ? 's' : '')).magenta + '\n')

      // iterate through each definition
      this.definitions.forEach(function (def) {

        // if there's an error, log the error and optional err.extract
        def.errors
          && def.errors.length
          && def.errors.forEach(function (err) {
               that.log(err.message)
               err.extract && that.log(err.extract + '\n')
             })
      })

    } else {
      // it was a success - let the user know!
      this.log('FILE: ' + this.path.cyan)
      this.log('STATUS: ' + 'Perfect!\n'.yellow)
    }

    // callback and exit
    this.callback && this.callback()
  }

}

// import validation rules
RECESS.RULES = {}

fs.readdirSync(path.join(__dirname, 'lint')).forEach(function (name) {
  var camelName = name
    .replace(/(\-[a-z])/gi, function ($1) { return $1.toUpperCase().replace('-', '') })
    .replace(/\.js$/, '')
  RECESS.RULES[camelName] = require(path.join(__dirname, 'lint', name))
})

// import compilers
RECESS.COMPILERS = {}

fs.readdirSync(path.join(__dirname, 'compile')).forEach(function (name) {
  var camelName = name
    .replace(/(\-[a-z])/gi, function ($1) { return $1.toUpperCase().replace('-', '') })
    .replace(/\.js$/, '')
  RECESS.COMPILERS[camelName] = require(path.join(__dirname, 'compile', name))
})

// export class
module.exports = RECESS

redpajama_set_name: RedPajamaGithub


text:
(function () {
    'use strict';
    angular.module('auth')
        .directive('svCreateArticleBtn', function () {
            return {
                replace: true,
                templateUrl: 'scripts/article/directives/sv-create-article-btn.html',
                scope: {
                    isBlog:'='
                },
                link: function ($scope, el, attrs) {
                }
            };
        });
})();


text:
import os
import multiprocessing
import serial

def start_dosenet():
    os.system('sudo bash /home/pi/dosenet-raspberrypi/pocket.sh start')

def start_D3S():
    os.system('sudo bash /home/pi/dosenet-raspberrypi/D3S.sh start')

if __name__ == '__main__':
    print('Waiting for NTP to be synced...')
    os.system('sudo service ntp stop')
    os.system('sudo timeout 60s ntpd -gq')
    os.system('sudo service ntp start')

    try:
        ser = serial.Serial('/dev/ttyACM0')
        ser.flushInput()
        ser.close()
    except:
        pass

    p = multiprocessing.Process(target=start_D3S, args=())
    t = multiprocessing.Process(target=start_dosenet, args=())
    try:
        print('Starting D3S script process')
        p.start()
        print('Starting Pocket Geiger script process')
        t.start()
        print('started')
        p.join()
        t.join()
        print('we can reboot here')
    except:
        pass


text:
package org.microworld.mangopay.entities;

import com.google.gson.annotations.SerializedName;

public class Token {
    public static final String HEADER_NAME = "Authorization";
    private static final long NANOS = 1000000000L;
    private static final int SAFETY_MARGIN = 5;
    private final long creationTime = System.nanoTime();
    @SerializedName("access_token")
    private String value;
    @SerializedName("token_type")
    private String type;
    @SerializedName("expires_in")
    private int duration;

    public boolean isExpired() {
        return System.nanoTime() > creationTime + (duration - SAFETY_MARGIN) * NANOS;
    }

    public String getHeaderValue() {
        return type + " " + value;
    }

    public String getValue() {
        return value;
    }

    public String getType() {
        return type;
    }

    public int getDuration() {
        return duration;
    }

    public long getCreationTime() {
        return creationTime;
    }
}


text:
7/13/2015 Phoenix JS Meetup - Angular 2 Universal

To install:
  * npm install

To run:
  * npm run

Each project is separate in each folder:

  * step-1-standard-angular

        Angular 2 from QuickStart without Universal
  * step-2-with-universal

        Angular 2 with Universal
* routing-with-universal

        Angular 2 routing with universal


text:
import {DataSource, ImageryLayer} from 'cesium';

export class OlCesiumObjectMapItem {
  olObject: any;
  csObject: ImageryLayer | DataSource;
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.oltecnologias.hype.gui;

import br.oltecnologias.hype.model.Fornecedor;

/**
 *
 * @author Luender Lima
 */
public class VerDadosFornecedorDialog extends java.awt.Dialog {

    public VerDadosFornecedorDialog(java.awt.Frame parent, Fornecedor fornecedor) {
        super(parent);
        this.fornecedor = fornecedor;
        initComponents();
        this.setIconImage(new javax.swing.ImageIcon(getClass().getResource("/br/oltecnologias/hype/imagens/Icon borda branca.png")).getImage());
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        painelDadosPessoais = new javax.swing.JPanel();
        labelNome = new javax.swing.JLabel();
        labelCNPJ = new javax.swing.JLabel();
        painelEndereco = new javax.swing.JPanel();
        labelRua = new javax.swing.JLabel();
        labelNumero = new javax.swing.JLabel();
        labelBairro = new javax.swing.JLabel();
        labelCidade = new javax.swing.JLabel();
        labelUf = new javax.swing.JLabel();
        labelTelefone = new javax.swing.JLabel();
        botaoOk = new javax.swing.JButton();

        setBackground(java.awt.Color.white);
        setResizable(false);
        setTitle("Dados do fornecedor");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                closeDialog(evt);
            }
        });

        painelDadosPessoais.setBackground(new java.awt.Color(255, 255, 255));
        painelDadosPessoais.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados Gerais"));

        labelNome.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelNome.setText("Nome: "+fornecedor.getNome());

        labelCNPJ.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelCNPJ.setText("CNPJ: "+fornecedor.getCnpj());

        painelEndereco.setBackground(new java.awt.Color(255, 255, 255));
        painelEndereco.setBorder(javax.swing.BorderFactory.createTitledBorder("Endereço"));

        labelRua.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelRua.setText("Rua: "+fornecedor.getEndereco().getRua());

        labelNumero.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelNumero.setText("Número: "+fornecedor.getEndereco().getNumeroCasa());

        labelBairro.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelBairro.setText("Barrio: "+fornecedor.getEndereco().getBairro());

        labelCidade.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelCidade.setText("Cidade: "+fornecedor.getEndereco().getCidade());

        labelUf.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelUf.setText("UF: "+fornecedor.getEndereco().getUf());

        javax.swing.GroupLayout painelEnderecoLayout = new javax.swing.GroupLayout(painelEndereco);
        painelEndereco.setLayout(painelEnderecoLayout);
        painelEnderecoLayout.setHorizontalGroup(
            painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelEnderecoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(painelEnderecoLayout.createSequentialGroup()
                        .addComponent(labelRua, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(49, 49, 49)
                        .addComponent(labelNumero, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                        .addGap(16, 16, 16))
                    .addGroup(painelEnderecoLayout.createSequentialGroup()
                        .addComponent(labelBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(26, 26, 26)
                        .addComponent(labelCidade, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(18, 18, 18)
                        .addComponent(labelUf, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        painelEnderecoLayout.setVerticalGroup(
            painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelEnderecoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelRua, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelCidade, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelUf, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        labelTelefone.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelTelefone.setText("Telefone: "+fornecedor.getTelefone());

        javax.swing.GroupLayout painelDadosPessoaisLayout = new javax.swing.GroupLayout(painelDadosPessoais);
        painelDadosPessoais.setLayout(painelDadosPessoaisLayout);
        painelDadosPessoaisLayout.setHorizontalGroup(
            painelDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelDadosPessoaisLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(painelEndereco, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(painelDadosPessoaisLayout.createSequentialGroup()
                        .addComponent(labelNome, javax.swing.GroupLayout.PREFERRED_SIZE, 349, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(38, 38, 38)
                        .addComponent(labelCNPJ, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(painelDadosPessoaisLayout.createSequentialGroup()
                        .addComponent(labelTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        painelDadosPessoaisLayout.setVerticalGroup(
            painelDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelDadosPessoaisLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelNome, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelCNPJ, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(painelEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(labelTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        botaoOk.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        botaoOk.setText("  OK  ");
        botaoOk.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        botaoOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoOkActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(painelDadosPessoais, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(510, 510, 510)
                        .addComponent(botaoOk)))
                .addGap(23, 23, 23))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(painelDadosPessoais, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(botaoOk)
                .addGap(23, 23, 23))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
        setVisible(false);
        dispose();
    }//GEN-LAST:event_closeDialog

    private void botaoOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoOkActionPerformed
        setVisible(false);
        dispose();
    }//GEN-LAST:event_botaoOkActionPerformed

    private Fornecedor fornecedor;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoOk;
    private javax.swing.JLabel labelBairro;
    private javax.swing.JLabel labelCNPJ;
    private javax.swing.JLabel labelCidade;
    private javax.swing.JLabel labelNome;
    private javax.swing.JLabel labelNumero;
    private javax.swing.JLabel labelRua;
    private javax.swing.JLabel labelTelefone;
    private javax.swing.JLabel labelUf;
    private javax.swing.JPanel painelDadosPessoais;
    private javax.swing.JPanel painelEndereco;
    // End of variables declaration//GEN-END:variables
}


text:
Revision history for Haskell package learning-hmm
===

## Version 0.3.2.2
- Catch up with base-4.8

## Version 0.3.2.1
- Bug fix release

## Version 0.3.2.0
- Add function `euclideanDistance` which measures the Euclidean distance between
  two models

## Version 0.3.1.3
- Bug fix release

## Version 0.3.1.2
- Default the limit of Baum-Welch iteration to 10000 (in `baumWelch'`)

## Version 0.3.1.1
- Bug fix release

## Version 0.3.1.0
- Add function `baumWelch'` that performs the Baum-Welch algorithm and returns
  a result locally maximizing its likelihood. This behaviour is different from
  that of `baumWelch`, which returns a list of intermediate results.

## Version 0.3.0.0
- Add `Learning.IOHMM` which represents a class of input-output HMM
- Delete `Learning.HMM.new`

## Version 0.2.1.0
- Performance improvements with employing 'hmatrix'
- `withEmission` now does iterative re-estimation based on the Viterbi path

## Version 0.2.0.0
- Remove dependency on the 'logfloat' package
- Performance improvements

## Version 0.1.1.0
- Add function `init` for random initialization
- Add function `simulate` for running a Markov process

## Version 0.1.0.0
- Original version


text:
package org.apache.hadoop.hbase.regionserver.wal;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
import org.apache.hadoop.hbase.wal.WALFactory;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;

@Category({ RegionServerTests.class, MediumTests.class })
public class TestAsyncLogRollPeriod extends AbstractTestLogRollPeriod {

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    Configuration conf = AbstractTestLogRollPeriod.TEST_UTIL.getConfiguration();
    conf.set(WALFactory.WAL_PROVIDER, "asyncfs");
    AbstractTestLogRollPeriod.setUpBeforeClass();
  }
}


text:
declare namespace Jymfony.Component.DependencyInjection.Exception {
    /**
     * No entry was found in the container.
     */
    export class NotFoundExceptionInterface extends ExceptionInterface.definition implements MixinInterface {
        public static readonly definition: Newable<NotFoundExceptionInterface>;
    }
}


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace HOLMS.Types.Supply.Snapshot {

  /// Holder for reflection information generated from supply/snapshot/lodging_snapshot_response_record.proto
  public static partial class LodgingSnapshotResponseRecordReflection {

    #region Descriptor
    /// File descriptor for supply/snapshot/lodging_snapshot_response_record.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static LodgingSnapshotResponseRecordReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CjZzdXBwbHkvc25hcHNob3QvbG9kZ2luZ19zbmFwc2hvdF9yZXNwb25zZV9y",
            "ZWNvcmQucHJvdG8SG2hvbG1zLnR5cGVzLnN1cHBseS5zbmFwc2hvdBodcHJp",
            "bWl0aXZlL3BiX2xvY2FsX2RhdGUucHJvdG8aH3ByaW1pdGl2ZS9tb25ldGFy",
            "eV9hbW91bnQucHJvdG8aK3N1cHBseS9yb29tX3R5cGVzL3Jvb21fdHlwZV9p",
            "bmRpY2F0b3IucHJvdG8aL3N1cHBseS9zbmFwc2hvdC9sb2RnaW5nX3NuYXBz",
            "aG90X3F1YW50aXR5LnByb3RvIsECCh1Mb2RnaW5nU25hcHNob3RSZXNwb25z",
            "ZVJlY29yZBJDCglyb29tX3R5cGUYASABKAsyMC5ob2xtcy50eXBlcy5zdXBw",
            "bHkucm9vbV90eXBlcy5Sb29tVHlwZUluZGljYXRvchIwCgRkYXRlGAIgASgL",
            "MiIuaG9sbXMudHlwZXMucHJpbWl0aXZlLlBiTG9jYWxEYXRlEjwKDW9mZmVy",
            "ZWRfcHJpY2UYAyABKAsyJS5ob2xtcy50eXBlcy5wcmltaXRpdmUuTW9uZXRh",
            "cnlBbW91bnQSSAoKcXVhbnRpdGllcxgEIAEoCzI0LmhvbG1zLnR5cGVzLnN1",
            "cHBseS5zbmFwc2hvdC5Mb2RnaW5nU25hcHNob3RRdWFudGl0eRIhChlyZXF1",
            "aXJlZF9yZXNlcnZhdGlvbl90YWdzGAUgAygJQi9aD3N1cHBseS9zbmFwc2hv",
            "dKoCG0hPTE1TLlR5cGVzLlN1cHBseS5TbmFwc2hvdGIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::HOLMS.Types.Primitive.PbLocalDateReflection.Descriptor, global::HOLMS.Types.Primitive.MonetaryAmountReflection.Descriptor, global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicatorReflection.Descriptor, global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotQuantityReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotResponseRecord), global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotResponseRecord.Parser, new[]{ "RoomType", "Date", "OfferedPrice", "Quantities", "RequiredReservationTags" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class LodgingSnapshotResponseRecord : pb::IMessage<LodgingSnapshotResponseRecord> {
    private static readonly pb::MessageParser<LodgingSnapshotResponseRecord> _parser = new pb::MessageParser<LodgingSnapshotResponseRecord>(() => new LodgingSnapshotResponseRecord());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<LodgingSnapshotResponseRecord> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotResponseRecordReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LodgingSnapshotResponseRecord() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LodgingSnapshotResponseRecord(LodgingSnapshotResponseRecord other) : this() {
      RoomType = other.roomType_ != null ? other.RoomType.Clone() : null;
      Date = other.date_ != null ? other.Date.Clone() : null;
      OfferedPrice = other.offeredPrice_ != null ? other.OfferedPrice.Clone() : null;
      Quantities = other.quantities_ != null ? other.Quantities.Clone() : null;
      requiredReservationTags_ = other.requiredReservationTags_.Clone();
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LodgingSnapshotResponseRecord Clone() {
      return new LodgingSnapshotResponseRecord(this);
    }

    /// Field number for the "room_type" field.
    public const int RoomTypeFieldNumber = 1;
    private global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicator roomType_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicator RoomType {
      get { return roomType_; }
      set {
        roomType_ = value;
      }
    }

    /// Field number for the "date" field.
    public const int DateFieldNumber = 2;
    private global::HOLMS.Types.Primitive.PbLocalDate date_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Primitive.PbLocalDate Date {
      get { return date_; }
      set {
        date_ = value;
      }
    }

    /// Field number for the "offered_price" field.
    public const int OfferedPriceFieldNumber = 3;
    private global::HOLMS.Types.Primitive.MonetaryAmount offeredPrice_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Primitive.MonetaryAmount OfferedPrice {
      get { return offeredPrice_; }
      set {
        offeredPrice_ = value;
      }
    }

    /// Field number for the "quantities" field.
    public const int QuantitiesFieldNumber = 4;
    private global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotQuantity quantities_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotQuantity Quantities {
      get { return quantities_; }
      set {
        quantities_ = value;
      }
    }

    /// Field number for the "required_reservation_tags" field.
    public const int RequiredReservationTagsFieldNumber = 5;
    private static readonly pb::FieldCodec<string> _repeated_requiredReservationTags_codec
        = pb::FieldCodec.ForString(42);
    private readonly pbc::RepeatedField<string> requiredReservationTags_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> RequiredReservationTags {
      get { return requiredReservationTags_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as LodgingSnapshotResponseRecord);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(LodgingSnapshotResponseRecord other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(RoomType, other.RoomType)) return false;
      if (!object.Equals(Date, other.Date)) return false;
      if (!object.Equals(OfferedPrice, other.OfferedPrice)) return false;
      if (!object.Equals(Quantities, other.Quantities)) return false;
      if(!requiredReservationTags_.Equals(other.requiredReservationTags_)) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (roomType_ != null) hash ^= RoomType.GetHashCode();
      if (date_ != null) hash ^= Date.GetHashCode();
      if (offeredPrice_ != null) hash ^= OfferedPrice.GetHashCode();
      if (quantities_ != null) hash ^= Quantities.GetHashCode();
      hash ^= requiredReservationTags_.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (roomType_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(RoomType);
      }
      if (date_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Date);
      }
      if (offeredPrice_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(OfferedPrice);
      }
      if (quantities_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Quantities);
      }
      requiredReservationTags_.WriteTo(output, _repeated_requiredReservationTags_codec);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (roomType_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RoomType);
      }
      if (date_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Date);
      }
      if (offeredPrice_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(OfferedPrice);
      }
      if (quantities_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Quantities);
      }
      size += requiredReservationTags_.CalculateSize(_repeated_requiredReservationTags_codec);
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(LodgingSnapshotResponseRecord other) {
      if (other == null) {
        return;
      }
      if (other.roomType_ != null) {
        if (roomType_ == null) {
          roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicator();
        }
        RoomType.MergeFrom(other.RoomType);
      }
      if (other.date_ != null) {
        if (date_ == null) {
          date_ = new global::HOLMS.Types.Primitive.PbLocalDate();
        }
        Date.MergeFrom(other.Date);
      }
      if (other.offeredPrice_ != null) {
        if (offeredPrice_ == null) {
          offeredPrice_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
        }
        OfferedPrice.MergeFrom(other.OfferedPrice);
      }
      if (other.quantities_ != null) {
        if (quantities_ == null) {
          quantities_ = new global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotQuantity();
        }
        Quantities.MergeFrom(other.Quantities);
      }
      requiredReservationTags_.Add(other.requiredReservationTags_);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (roomType_ == null) {
              roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicator();
            }
            input.ReadMessage(roomType_);
            break;
          }
          case 18: {
            if (date_ == null) {
              date_ = new global::HOLMS.Types.Primitive.PbLocalDate();
            }
            input.ReadMessage(date_);
            break;
          }
          case 26: {
            if (offeredPrice_ == null) {
              offeredPrice_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
            }
            input.ReadMessage(offeredPrice_);
            break;
          }
          case 34: {
            if (quantities_ == null) {
              quantities_ = new global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotQuantity();
            }
            input.ReadMessage(quantities_);
            break;
          }
          case 42: {
            requiredReservationTags_.AddEntriesFrom(input, _repeated_requiredReservationTags_codec);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code


text:
package analysis_and_compare;

import java.util.ArrayList;

import manage_incomeoutlay.GetIncomeOutlayManager;
import manage_incomeoutlay.IncomeOutlay;
import member_system.User;
import member_system.VerifyAble;

public class CompareWithVerifyManager extends CompareManager {

	private Compare compareMethod;
	private VerifyAble verify;

	public CompareWithVerifyManager(Compare compareMethod, VerifyAble verify) {
		this.compareMethod = compareMethod;
		this.verify = verify;
	}

	@Override
	public ResultCompare compare(User user,
			ArrayList<IncomeOutlay> myIncomeOutlay,
			ArrayList<IncomeOutlay> anotherIncomeOutlay) throws Exception {

		boolean check = verify.verify(user);

		if(check)
		{
			return this.compareMethod.compare(myIncomeOutlay, anotherIncomeOutlay);
		}
		else
		{
			throw (new Exception("plese login"));
		}

	}
}


text:
//------------------------------------------------------------------------------
// <copyright file="CatalogPartChrome.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace System.Web.UI.WebControls.WebParts {

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Drawing;
    using System.Globalization;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public class CatalogPartChrome {

        private CatalogZoneBase _zone;

        // PERF: Cache these, since they are needed for every CatalogPart in the zone
        private Page _page;
        private Style _chromeStyleWithBorder;
        private Style _chromeStyleNoBorder;

        public CatalogPartChrome(CatalogZoneBase zone) {
            if (zone == null) {
                throw new ArgumentNullException("zone");
            }
            _zone = zone;
            _page = zone.Page;
        }

        protected CatalogZoneBase Zone {
            get {
                return _zone;
            }
        }

        protected virtual Style CreateCatalogPartChromeStyle(CatalogPart catalogPart, PartChromeType chromeType) {
            if (catalogPart == null) {
                throw new ArgumentNullException("catalogPart");
            }
            if ((chromeType < PartChromeType.Default) || (chromeType > PartChromeType.BorderOnly)) {
                throw new ArgumentOutOfRangeException("chromeType");
            }

            if (chromeType == PartChromeType.BorderOnly || chromeType == PartChromeType.TitleAndBorder) {
                if (_chromeStyleWithBorder == null) {
                    Style style = new Style();
                    style.CopyFrom(Zone.PartChromeStyle);

                    if (style.BorderStyle == BorderStyle.NotSet) {
                        style.BorderStyle = BorderStyle.Solid;
                    }
                    if (style.BorderWidth == Unit.Empty) {
                        style.BorderWidth = Unit.Pixel(1);
                    }
                    if (style.BorderColor == Color.Empty) {
                        style.BorderColor = Color.Black;
                    }

                    _chromeStyleWithBorder = style;
                }
                return _chromeStyleWithBorder;
            }
            else {
                if (_chromeStyleNoBorder == null) {
                    Style style = new Style();
                    style.CopyFrom(Zone.PartChromeStyle);

                    if (style.BorderStyle != BorderStyle.NotSet) {
                        style.BorderStyle = BorderStyle.NotSet;
                    }
                    if (style.BorderWidth != Unit.Empty) {
                        style.BorderWidth = Unit.Empty;
                    }
                    if (style.BorderColor != Color.Empty) {
                        style.BorderColor = Color.Empty;
                    }

                    _chromeStyleNoBorder = style;
                }
                return _chromeStyleNoBorder;
            }
        }

        public virtual void PerformPreRender() {
        }

        public virtual void RenderCatalogPart(HtmlTextWriter writer, CatalogPart catalogPart) {
            if (catalogPart == null) {
                throw new ArgumentNullException("catalogPart");
            }

            PartChromeType chromeType = Zone.GetEffectiveChromeType(catalogPart);
            Style partChromeStyle = CreateCatalogPartChromeStyle(catalogPart, chromeType);

            //
            if (!partChromeStyle.IsEmpty) {
                partChromeStyle.AddAttributesToRender(writer, Zone);
            }
            writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
            // Use CellPadding=2 to match WebPartChrome (VSWhidbey 324397)
            writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "2");
            writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");

            writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");

            writer.RenderBeginTag(HtmlTextWriterTag.Table);

            if (chromeType == PartChromeType.TitleOnly || chromeType == PartChromeType.TitleAndBorder) {
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);

                // Can apply PartTitleStyle directly, since the title bar doesn't contain a nested table
                Style partTitleStyle = Zone.PartTitleStyle;
                if (!partTitleStyle.IsEmpty) {
                    partTitleStyle.AddAttributesToRender(writer, Zone);
                }
                writer.RenderBeginTag(HtmlTextWriterTag.Td);

                RenderTitle(writer, catalogPart);

                writer.RenderEndTag();  // Td
                writer.RenderEndTag();  // Tr
            }

            if (catalogPart.ChromeState != PartChromeState.Minimized) {
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                Style partStyle = Zone.PartStyle;
                if (!partStyle.IsEmpty) {
                    partStyle.AddAttributesToRender(writer, Zone);
                }

                // For now, I don't think we should render extra padding here.  People writing custom
                // CatalogParts can add a margin to their contents if they want it.  This is not the
                // same as the WebPartChrome case, since for WebParts we allow people to use ServerControls,
                // that will likely not have a margin.  (VSWhidbey 324397)
                // writer.AddStyleAttribute(HtmlTextWriterStyle.Padding, "5px");

                writer.RenderBeginTag(HtmlTextWriterTag.Td);

                //
                RenderPartContents(writer, catalogPart);

                RenderItems(writer, catalogPart);

                writer.RenderEndTag();  // Td
                writer.RenderEndTag();  // Tr
            }

            writer.RenderEndTag();  // Table
        }

        private void RenderItem(HtmlTextWriter writer, WebPartDescription webPartDescription) {
            string description = webPartDescription.Description;
            if (String.IsNullOrEmpty(description)) {
                description = webPartDescription.Title;
            }

            RenderItemCheckBox(writer, webPartDescription.ID);

            writer.Write(" ");

            if (Zone.ShowCatalogIcons) {
                string icon = webPartDescription.CatalogIconImageUrl;
                if (!String.IsNullOrEmpty(icon)) {
                    RenderItemIcon(writer, icon, description);
                    writer.Write(" ");
                }
            }

            RenderItemText(writer, webPartDescription.ID, webPartDescription.Title, description);

            writer.WriteBreak();
        }

        private void RenderItemCheckBox(HtmlTextWriter writer, string value) {
            Zone.EditUIStyle.AddAttributesToRender(writer, Zone);
            writer.AddAttribute(HtmlTextWriterAttribute.Type, "checkbox");
            writer.AddAttribute(HtmlTextWriterAttribute.Id, Zone.GetCheckBoxID(value));
            writer.AddAttribute(HtmlTextWriterAttribute.Name, Zone.CheckBoxName);
            writer.AddAttribute(HtmlTextWriterAttribute.Value, value);
            writer.RenderBeginTag(HtmlTextWriterTag.Input);
            writer.RenderEndTag();  // Input

            if (_page != null) {
                _page.ClientScript.RegisterForEventValidation(Zone.CheckBoxName);
            }
        }

        private void RenderItemIcon(HtmlTextWriter writer, string iconUrl, string description) {
            System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image();
            img.AlternateText = description;

            //
            img.ImageUrl = iconUrl;
            img.BorderStyle = BorderStyle.None;
            img.Page = _page;
            img.RenderControl(writer);
        }

        private void RenderItemText(HtmlTextWriter writer, string value, string text, string description) {
            Zone.LabelStyle.AddAttributesToRender(writer, Zone);
            writer.AddAttribute(HtmlTextWriterAttribute.For, Zone.GetCheckBoxID(value));
            writer.AddAttribute(HtmlTextWriterAttribute.Title, description, true /* fEncode */);
            writer.RenderBeginTag(HtmlTextWriterTag.Label);
            writer.WriteEncodedText(text);
            writer.RenderEndTag();
        }

        private void RenderItems(HtmlTextWriter writer, CatalogPart catalogPart) {
            WebPartDescriptionCollection availableWebParts = catalogPart.GetAvailableWebPartDescriptions();

            if (availableWebParts != null) {
                foreach (WebPartDescription webPartDescription in availableWebParts) {
                    RenderItem(writer, webPartDescription);
                }
            }
        }

        protected virtual void RenderPartContents(HtmlTextWriter writer, CatalogPart catalogPart) {
            if (catalogPart == null) {
                throw new ArgumentNullException("catalogPart");
            }
            catalogPart.RenderControl(writer);
        }

        private void RenderTitle(HtmlTextWriter writer, CatalogPart catalogPart) {
            Label label = new Label();
            label.Text = catalogPart.DisplayTitle;
            label.ToolTip = catalogPart.Description;
            label.Page = _page;
            label.RenderControl(writer);
        }
    }
}


text:
using namespace fs::maths;
using namespace fs::randoms;

namespace fs {
	namespace games {
		enum class EntityType {
			None,
			Ball,
			Paddle,
			Plane,
		};

		struct Entity {
			EntityType entityType;
			Entity(const EntityType entityType) :
				entityType(entityType) {
			}
			Entity(const Entity &entity) :
				entityType(entity.entityType) {
			}
		};

		struct Moveable {
			Vec2f initialPosition = Vec2f();
			Vec2f position = Vec2f();
			Vec2f velocity = Vec2f();
			Vec2f acceleration = Vec2f();
			Vec2f delta = Vec2f();
			f32 speed = 0.0f;
			f32 initialSpeed = 0.0f;
		};

		struct Ball {
			Entity entity = Entity(EntityType::Ball);
			Moveable moveable = Moveable();
			f32 radius = 0.2f;
			Vec4f color = Vec4f::Yellow;
		};

		struct Paddle {
			Entity entity = Entity(EntityType::Paddle);
			Moveable moveable = Moveable();
			Vec2f ext = Vec2f(0.25f, 0.9f);
			f32 verticalDrag = 0.0f;
			Vec4f color = Vec4f::White;
		};

		enum class PlaneType {
			None,
			LeftSide,
			RightSide,
		};

		struct Plane {
			Entity entity = Entity(EntityType::Plane);
			PlaneType planeType = PlaneType::None;
			Vec2f normal = Vec2f();
			f32 distance = 0.0f;
			f32 visualLength = 0.0f;
			Plane() = default;
			Plane(const Plane &other) {
				this->entity = other.entity;
				this->planeType = other.planeType;
				this->normal = other.normal;
				this->distance = other.distance;
				this->visualLength = other.visualLength;
			}
			Plane(const PlaneType planeType, const Vec2f &normal, const f32 distance, const f32 visualLength) {
				this->entity = Entity(EntityType::Plane);
				this->planeType = planeType;
				this->normal = normal;
				this->distance = distance;
				this->visualLength = visualLength;
			}
		};

		struct ControlledPlayer {
			u32 playerIndex = 0;
			u32 controllerIndex = 0;
		};

		struct Pong : BaseGame {
		private:
			u32 CreatePaddle(const u32 planeIndex, const Vec4f &color);
			void SetExternalForces(const f32 dt);
			void MoveEntities(const f32 dt);
			void HandlePlayerInput(const Input &input);
			void UpdateAI(const f32 dt);
			s32 FindControlledPlayerIndex(const u32 controllerIndex);
			void HandleControllerConnections(const Input &input);
			void ResetBall();
			void HandleBallCollisions(Ball &ball, Entity *enemy);
		public:
			static constexpr f32 GAME_ASPECT = 16.0f / 9.0f;
			static constexpr f32 GAME_WIDTH = 20.0f;
			static constexpr f32 GAME_HEIGHT = GAME_WIDTH / GAME_ASPECT;
			static constexpr f32 GAME_HALF_WIDTH = GAME_WIDTH * 0.5f;
			static constexpr f32 GAME_HALF_HEIGHT = GAME_HEIGHT * 0.5f;

			Ball ball;
			std::vector<Paddle> paddles;
			std::vector<Plane> planes;
			std::vector<ControlledPlayer> controlledPlayers = std::vector<ControlledPlayer>();
			bool isStarted = false;
			RandomSeries entropy;

			Pong();
			~Pong() override;
			void Init() override;
			void Release() override;
			void HandleInput(const Input &input) override;
			void Update(const Input &input) override;
			void Render(const Input &input) override;
		};
	};
};


text:
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.CompilerServices;

namespace Ardalis.GuardClauses
{
    /// <summary>
    /// A collection of common guard clauses, implemented as extensions.
    /// </summary>
    /// <example>
    /// Guard.Against.Null(input, nameof(input));
    /// </example>
    public static partial class GuardClauseExtensions
    {
        /// <summary>
        /// Throws an <see cref="ArgumentNullException" /> if <paramref name="input" /> is null.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <returns><paramref name="input" /> if the value is not null.</returns>
#if NETSTANDARD || NETFRAMEWORK
        public static T Null<T>(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] T input,
            string parameterName,
            string? message = null)
#else
        public static T Null<T>(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull]T input,
            [CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null)
#endif
        {
            if (input is null)
            {
                if (string.IsNullOrEmpty(message))
                {
                    throw new ArgumentNullException(parameterName);
                }
                throw new ArgumentNullException(parameterName, message);
            }

            return input;
        }

        /// <summary>
        /// Throws an <see cref="ArgumentNullException" /> if <paramref name="input" /> is null.
        /// Throws an <see cref="ArgumentException" /> if <paramref name="input" /> is an empty string.
        /// </summary>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <returns><paramref name="input" /> if the value is not an empty string or null.</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="ArgumentException"></exception>
#if NETSTANDARD || NETFRAMEWORK
        public static string NullOrEmpty(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] string? input,
            string parameterName,
            string? message = null)
#else
        public static string NullOrEmpty(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] string? input,
            [CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null)
#endif
        {
            Guard.Against.Null(input, parameterName, message);
            if (input == string.Empty)
            {
                throw new ArgumentException(message ?? $"Required input {parameterName} was empty.", parameterName);
            }

            return input;
        }

        /// <summary>
        /// Throws an <see cref="ArgumentNullException" /> if <paramref name="input" /> is null.
        /// Throws an <see cref="ArgumentException" /> if <paramref name="input" /> is an empty guid.
        /// </summary>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <returns><paramref name="input" /> if the value is not an empty guid or null.</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="ArgumentException"></exception>
#if NETSTANDARD || NETFRAMEWORK
        public static Guid NullOrEmpty(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] Guid? input,
            string parameterName,
            string? message = null)
#else
        public static Guid NullOrEmpty(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] Guid? input,
            [CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null)
#endif
        {
            Guard.Against.Null(input, parameterName, message);
            if (input == Guid.Empty)
            {
                throw new ArgumentException(message ?? $"Required input {parameterName} was empty.", parameterName);
            }

            return input.Value;
        }

        /// <summary>
        /// Throws an <see cref="ArgumentNullException" /> if <paramref name="input" /> is null.
        /// Throws an <see cref="ArgumentException" /> if <paramref name="input" /> is an empty enumerable.
        /// </summary>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <returns><paramref name="input" /> if the value is not an empty enumerable or null.</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="ArgumentException"></exception>
#if NETSTANDARD || NETFRAMEWORK
        public static IEnumerable<T> NullOrEmpty<T>(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] IEnumerable<T>? input,
            string parameterName,
            string? message = null)
#else
        public static IEnumerable<T> NullOrEmpty<T>(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] IEnumerable<T>? input,
            [CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null)
#endif
        {
            Guard.Against.Null(input, parameterName, message);
            if (!input.Any())
            {
                throw new ArgumentException(message ?? $"Required input {parameterName} was empty.", parameterName);
            }

            return input;
        }

        /// <summary>
        /// Throws an <see cref="ArgumentNullException" /> if <paramref name="input" /> is null.
        /// Throws an <see cref="ArgumentException" /> if <paramref name="input" /> is an empty or white space string.
        /// </summary>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <returns><paramref name="input" /> if the value is not an empty or whitespace string.</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="ArgumentException"></exception>
#if NETSTANDARD || NETFRAMEWORK
        public static string NullOrWhiteSpace(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] string? input,
            string parameterName,
            string? message = null)
#else
        public static string NullOrWhiteSpace(this IGuardClause guardClause,
            [NotNull][ValidatedNotNull] string? input,
            [CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null)
#endif
        {
            Guard.Against.NullOrEmpty(input, parameterName, message);
            if (String.IsNullOrWhiteSpace(input))
            {
                throw new ArgumentException(message ?? $"Required input {parameterName} was empty.", parameterName);
            }

            return input;
        }

        /// <summary>
        /// Throws an <see cref="ArgumentException" /> if <paramref name="input" /> is default for that type.
        /// </summary>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <returns><paramref name="input" /> if the value is not default for that type.</returns>
        /// <exception cref="ArgumentException"></exception>
#if NETSTANDARD || NETFRAMEWORK
        public static T Default<T>(this IGuardClause guardClause,
            [AllowNull, NotNull] T input,
            string parameterName,
            string? message = null)
#else
        public static T Default<T>(this IGuardClause guardClause,
            [AllowNull, NotNull]T input,
            [CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null)
#endif
        {
            if (EqualityComparer<T>.Default.Equals(input, default(T)!) || input is null)
            {
                throw new ArgumentException(message ?? $"Parameter [{parameterName}] is default value for type {typeof(T).Name}", parameterName);
            }

            return input;
        }

        /// <summary>
        /// Throws an <see cref="ArgumentNullException"/> if <paramref name="input"/> is null
        /// Throws an <see cref="ArgumentException" /> if <paramref name="input"/> doesn't satisfy the <paramref name="predicate"/> function.
        /// </summary>
        /// <param name="guardClause"></param>
        /// <param name="input"></param>
        /// <param name="parameterName"></param>
        /// <param name="predicate"></param>
        /// <param name="message">Optional. Custom error message</param>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        /// <exception cref="ArgumentException"></exception>
        /// <exception cref="ArgumentNullException"></exception>
#if NETSTANDARD || NETFRAMEWORK
        public static T NullOrInvalidInput<T>(this IGuardClause guardClause,
            T input,
            string parameterName,
            Func<T, bool> predicate,
            string? message = null)
#else
        public static T NullOrInvalidInput<T>(this IGuardClause guardClause,
            T input,
            string parameterName,
            Func<T, bool> predicate,
            string? message = null)
#endif
        {
            Guard.Against.Null(input, parameterName, message);

            return Guard.Against.InvalidInput(input, parameterName, predicate, message);
        }
    }
}


text:
title: Plátano
modal-id: 49
img: platano.png
alt: image-alt
category: Fruta
description: El platano se produce en climas subtropicales. En la península podemos encontrarlo únicamente en algunas plantaciones de la costa granadina. El resto lo traemos de Canarias o importado de América latina o Senegal. Es una fruta climatérica, lo que significa que sigue madurando después de haber sido recogida. Se suele recolectar antes de su punto de madurez para que no llegue estropeada al lugar de comercialización.

---


text:
import Dog from './dog'

test('Dog.bark', () => {
  const testDog = new Dog('Test')
  expect(testDog.bark()).toBe('Wah wah, I am Test')
})


text:
<?php

namespace Oip\MszeBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Church
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Oip\MszeBundle\Entity\ChurchRepository")
 */
class Church
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=64)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="address", type="string", length=64)
     */
    private $address;

    /**
     * @var string
     *
     * @ORM\Column(name="latitude", type="text", length=64, nullable=true)
     */
    private $latitude;

    /**
     * @var string
     *
     * @ORM\Column(name="longitude", type="text", length=64, nullable=true)
     */
    private $longitude;

    /**
     * @var string
     *
     * @ORM\Column(name="slug", type="string", length=128)
     */
    private $slug;

    /**
     * @var string
     *
     * @ORM\Column(name="foto", type="string", length=64)
     */
    private $foto;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="string", length=255)
     */
    private $description;

    /**
     * @var string
     *
     * @ORM\Column(name="www", type="string", length=512)
     */
    private $www;

    /**
     * @ORM\ManyToOne(targetEntity="District", inversedBy="churches", fetch="LAZY")
     * @ORM\JoinColumn(name="district_id", referencedColumnName="id")
     */
    protected $district;

    /**
     * @ORM\OneToMany(targetEntity="Mass", mappedBy="church", fetch="LAZY")
     */
    protected $masses;

    public function __construct() {
        $this->masses = new ArrayCollection();
    }

    private function updateSlug() {
        $this->slug = \Oip\MszeBundle\OipHelpers::makeSlug(
                      ($this->name == null?'':$this->name) . ' ' .
                      ($this->address == null?'':$this->address) . ' ' .
                      ($this->description == null?'':$this->description));
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Church
     */
    public function setName($name)
    {
        $this->name = $name;
        $this->updateSlug();

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set address
     *
     * @param string $address
     * @return Church
     */
    public function setAddress($address)
    {
        $this->address = $address;
        $this->updateSlug();

        return $this;
    }

    /**
     * Get address
     *
     * @return string
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Set latitude
     *
     * @param string $latitude
     */
    public function setLatitude($latitude)
    {
        $this->latitude = $latitude;

        return $this;
    }

    /**
     * Get latitude
     *
     * @return string
     */
    public function getLatitude()
    {
        return $this->latitude;
    }

     /**
     * Set longitude
     *
     * @param string $longitude
     */
    public function setLongitude($longitude)
    {
        $this->longitude = $longitude;

        return $this;
    }

    /**
     * Get longitude
     *
     * @return string
     */
    public function getLongitude()
    {
        return $this->longitude;
    }

    /**
     * Set slug
     *
     * @param string $slug
     * @return Church
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;

        return $this;
    }

    /**
     * Get slug
     *
     * @return string
     */
    public function getSlug()
    {
        return $this->slug;
    }

    /**
     * Set foto
     *
     * @param string $foto
     * @return Church
     */
    public function setFoto($foto)
    {
        $this->foto = $foto;

        return $this;
    }

    /**
     * Get foto
     *
     * @return string
     */
    public function getFoto()
    {
        return $this->foto;
    }

    /**
     * Set desc
     *
     * @param string $desc
     * @return Church
     */
    public function setDescription($desc)
    {
        $this->description = $desc;
        $this->updateSlug();

        return $this;
    }

    /**
     * Get desc
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Add masses
     *
     * @param \Oip\MszeBundle\Entity\Mass $masses
     * @return Church
     */
    public function addMasse(\Oip\MszeBundle\Entity\Mass $masses)
    {
        $this->masses[] = $masses;

        return $this;
    }

    /**
     * Remove masses
     *
     * @param \Oip\MszeBundle\Entity\Mass $masses
     */
    public function removeMasse(\Oip\MszeBundle\Entity\Mass $masses)
    {
        $this->masses->removeElement($masses);
    }

    /**
     * Get masses
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getMasses()
    {
        return $this->masses;
    }

    /**
     * Set district
     *
     * @param \Oip\MszeBundle\Entity\District $district
     * @return Church
     */
    public function setDistrict(\Oip\MszeBundle\Entity\District $district = null)
    {
        $this->district = $district;

        return $this;
    }

    /**
     * Get district
     *
     * @return \Oip\MszeBundle\Entity\District
     */
    public function getDistrict()
    {
        return $this->district;
    }

    /**
     * Set www
     *
     * @param string $www
     * @return Church
     */
    public function setWWW($www)
    {
        $this->www = $www;

        return $this;
    }

    /**
     * Get www
     *
     * @return string
     */
    public function getWWW()
    {
        return $this->www;
    }
}


text:
<?php

declare(strict_types=1);

namespace Sonata\ProductBundle\Entity;

use Doctrine\ORM\QueryBuilder;
use Sonata\ClassificationBundle\Model\CategoryInterface;
use Sonata\Component\Product\ProductInterface;
use Sonata\Component\Product\ProductManagerInterface;
use Sonata\DatagridBundle\Pager\Doctrine\Pager;
use Sonata\DatagridBundle\Pager\PagerInterface;
use Sonata\Doctrine\Entity\BaseEntityManager;

class ProductManager extends BaseEntityManager implements ProductManagerInterface
{
    public function findInSameCollections($productCollections, $limit = null)
    {
        return $this->queryInSameCollections($productCollections, $limit)
            ->getQuery()
            ->execute();
    }

    public function findParentsInSameCollections($productCollections, $limit = null)
    {
        return $this->queryInSameCollections($productCollections, $limit)
            ->andWhere('p.parent IS NULL')
            ->andWhere('p.enabled = :enabled')
            ->setParameter('enabled', true)
            ->getQuery()
            ->execute();
    }

    /**
     * Returns partial product example (only to get its class) from $category.
     *
     * @return ProductInterface|null
     */
    public function findProductForCategory(CategoryInterface $category)
    {
        return $this->getCategoryProductsQueryBuilder($category)
            ->select('partial p.{id}')
            ->setMaxResults(1)
        ->getQuery()->getOneOrNullResult();
    }

    /**
     * Returns active products for a given category.
     *
     * @param CategoryInterface $category
     * @param string            $filter
     * @param mixed             $option
     *
     * @return QueryBuilder
     */
    public function getCategoryActiveProductsQueryBuilder(?CategoryInterface $category = null, $filter = null, $option = null)
    {
        $queryBuilder = $this->getCategoryProductsQueryBuilder($category);
        $queryBuilder->leftJoin('p.variations', 'pv')
            ->andWhere('p.parent IS NULL')      // Limit to master products or products without variations
            ->andWhere('p.enabled = :enabled')
            ->andWhere($queryBuilder->expr()->orX('pv.enabled = :enabled', 'pv.enabled IS NULL'))
            ->setParameter('enabled', true);

        if (null !== $filter) {
            // TODO manage various filter types
            $queryBuilder->andWhere(sprintf('p.%s %s :%s', $filter, '>', $filter))
                ->setParameter(sprintf(':%s', $filter), $option);
        }

        return $queryBuilder;
    }

    /**
     * Retrieve an active product from its id and its slug.
     *
     * @param int    $id
     * @param string $slug
     *
     * @return ProductInterface|null
     */
    public function findEnabledFromIdAndSlug($id, $slug)
    {
        return $this->getRepository()
            ->findOneBy([
                'id' => $id,
                'slug' => $slug,
                'enabled' => true,
            ]);
    }

    public function findVariations(ProductInterface $product)
    {
        $queryBuilder = $this->getRepository()->createQueryBuilder('p')
            ->where('p.parent = :parent')
            ->andWhere('p.enabled = :enabled')
            ->setParameter('parent', $product)
            ->setParameter('enabled', true);

        return $queryBuilder->getQuery()->execute();
    }

    public function updateStock($product, $diff): void
    {
        if (0 === $diff) {
            return;
        }

        $productId = $product instanceof ProductInterface ? $product->getId() : $product;

        $tableName = $this->getTableName();

        $operator = $diff > 0 ? '+' : '-';

        $this->getConnection()->query(sprintf('UPDATE %s SET stock = stock %s %d WHERE id = %d;', $tableName, $operator, abs($diff), $productId));
    }

    public function getPager(array $criteria, int $page, int $limit = 10, array $sort = []): PagerInterface
    {
        $query = $this->getRepository()
            ->createQueryBuilder('p')
            ->select('p');

        $fields = $this->getEntityManager()->getClassMetadata($this->class)->getFieldNames();
        foreach ($sort as $field => $direction) {
            if (!\in_array($field, $fields, true)) {
                unset($sort[$field]);
            }
        }
        if (0 === \count($sort)) {
            $sort = ['name' => 'ASC'];
        }
        foreach ($sort as $field => $direction) {
            $query->orderBy(sprintf('p.%s', $field), strtoupper($direction));
        }

        $parameters = [];

        if (isset($criteria['enabled'])) {
            $query->andWhere('p.enabled = :enabled');
            $parameters['enabled'] = $criteria['enabled'];
        }

        $query->setParameters($parameters);

        return Pager::create($query, $limit, $page);
    }

    final public function queryInCollection($collection, $limit = null): QueryBuilder
    {
        $queryBuilder = $this->getRepository()->createQueryBuilder('p')
            ->distinct()
            ->leftJoin('p.productCollections', 'pc')
            ->where('pc.collection = :collection')
            ->setParameter('collection', $collection->getId());

        if (null !== $limit) {
            $queryBuilder->setMaxResults($limit);
        }

        return $queryBuilder;
    }

    /**
     * Returns QueryBuilder for products.
     *
     * @param CategoryInterface $category
     *
     * @return QueryBuilder
     */
    protected function getCategoryProductsQueryBuilder(?CategoryInterface $category = null)
    {
        $queryBuilder = $this->getRepository()->createQueryBuilder('p')
            ->leftJoin('p.image', 'i')
            ->leftJoin('p.gallery', 'g');

        if ($category) {
            $queryBuilder
                ->leftJoin('p.productCategories', 'pc')
                ->andWhere('pc.category = :categoryId')
                ->setParameter('categoryId', $category->getId());
        }

        return $queryBuilder;
    }

    /**
     * @param array    $productCollections
     * @param int|null $limit
     *
     * @return \Doctrine\ORM\QueryBuilder
     */
    protected function queryInSameCollections($productCollections, $limit = null)
    {
        $collections = [];
        $productIds = [];

        foreach ($productCollections as $pCollection) {
            $collections[] = $pCollection->getCollection();
            if (false === array_search($pCollection->getProduct()->getId(), $productIds, true)) {
                $productIds[] = $pCollection->getProduct()->getId();
            }
        }

        $queryBuilder = $this->getRepository()->createQueryBuilder('p')
            ->distinct()
            ->leftJoin('p.productCollections', 'pc')
            ->where('pc.collection IN (:collections)')
            ->andWhere('p.id NOT IN (:productIds)')
            ->setParameter('collections', array_values($collections))
            ->setParameter('productIds', array_values($productIds));

        if (null !== $limit) {
            $queryBuilder->setMaxResults($limit);
        }

        return $queryBuilder;
    }
}


text:
package pipes.model;

import static pipes.model.BeatDivision.EIGHTH;
import static pipes.model.BeatDivision.QUARTER;
import static pipes.model.BeatDivision.SIXTEENTH;
import static pipes.model.BeatDivision.THIRTY_SECOND;
import static pipes.model.Pitch.A;
import static pipes.model.Pitch.B;
import static pipes.model.Pitch.D;
import static pipes.model.Pitch.E;
import static pipes.model.Pitch.F;
import static pipes.model.Pitch.G;
import static pipes.model.Pitch.LOW_A;
import static pipes.model.Pitch.LOW_G;
import static pipes.model.embellishment.EmbellishmentFamily.A_GRACE;
import static pipes.model.embellishment.EmbellishmentFamily.DOUBLING;
import static pipes.model.embellishment.EmbellishmentFamily.D_GRACE;
import static pipes.model.embellishment.EmbellishmentFamily.E_GRACE;
import static pipes.model.embellishment.EmbellishmentFamily.G_GRACE;
import static pipes.model.embellishment.EmbellishmentFamily.GRIP;
import static pipes.model.embellishment.EmbellishmentFamily.THROW;

public class TuneFactory {

	public static Tune getNewTune(NewTuneParameters parameters) {
		Tune t = new Tune();

		for (int i = 0; i<parameters.getLines(); ++i) {
			Line l = new Line();
			t.add(l);
			for (int j = 0; j<parameters.getMeasuresPerLine(); ++j)
				l.add(new Measure(parameters.getTimeSignature()));
		}

		t.getFirst().getFirst().setIsTimeSignatureChange(true);

		t.setName(parameters.getName());
		t.setAuthor(parameters.getAuthor());
		t.setType(parameters.getType());

		return t;
	}

	public static Tune getThreeFour() {
		// MacGregor of Rora
		Tune tune = new Tune();
		for (int i = 0; i<4; ++i) {
			Line l = new Line();
			for (int m = 0; m<4; ++m)
				l.add(new Measure(TimeSignature.THREE_FOUR));
			tune.add(l);
		}

		tune.getFirst().getFirst().setIsTimeSignatureChange(true);

		// Line 1

		// Line 2
		tune.get(1).get(0).addNote(new Note(tune, D, EIGHTH)).setEmbellishmentFamily(THROW);
		tune.get(1).get(0).addNote(new Note(tune, B, EIGHTH)).setEmbellishmentFamily(E_GRACE);
		tune.get(1).get(0).addNote(new Note(tune, D, QUARTER)).setEmbellishmentFamily(THROW);
		tune.get(1).get(0).addNote(new Note(tune, E, EIGHTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(1).get(0).addNote(new Note(tune, D, SIXTEENTH));

		tune.get(1).get(1).addNote(new Note(tune, B, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(1).get(1).addNote(new Note(tune, LOW_A, EIGHTH)).setEmbellishmentFamily(E_GRACE);
		tune.get(1).get(1).addNote(new Note(tune, LOW_A, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(1).get(1).addNote(new Note(tune, LOW_G, EIGHTH)).setEmbellishmentFamily(E_GRACE);
		tune.get(1).get(1).addNote(new Note(tune, G, EIGHTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(1).get(1).addNote(new Note(tune, F, SIXTEENTH));

		tune.get(1).get(2).addNote(new Note(tune, E, EIGHTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(1).get(2).addNote(new Note(tune, D, SIXTEENTH));
		tune.get(1).get(2).addNote(new Note(tune, B, SIXTEENTH)).setEmbellishmentFamily(G_GRACE);
		tune.get(1).get(2).addNote(new Note(tune, D, EIGHTH, false));
		tune.get(1).get(2).addNote(new Note(tune, LOW_G, QUARTER));

		tune.get(1).get(3).addNote(new Note(tune, LOW_A, QUARTER)).setEmbellishmentFamily(G_GRACE);
		tune.get(1).get(3).addNote(new Note(tune, B, QUARTER)).setEmbellishmentFamily(GRIP);
		tune.get(1).get(3).addNote(new Note(tune, LOW_A, QUARTER));

		// Line 3
		tune.get(2).get(0).addNote(new Note(tune, LOW_A, EIGHTH, true)).setEmbellishmentFamily(G_GRACE);
		tune.get(2).get(0).addNote(new Note(tune, B, SIXTEENTH)).setEmbellishmentFamily(D_GRACE);
		tune.get(2).get(0).addNote(new Note(tune, E, QUARTER)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(0).addNote(new Note(tune, A, QUARTER)).setEmbellishmentFamily(DOUBLING);

		tune.get(2).get(1).addNote(new Note(tune, G, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(1).addNote(new Note(tune, E, EIGHTH));
		tune.get(2).get(1).addNote(new Note(tune, E, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(1).addNote(new Note(tune, D, EIGHTH));
		tune.get(2).get(1).addNote(new Note(tune, B, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(1).addNote(new Note(tune, LOW_A, EIGHTH)).setEmbellishmentFamily(E_GRACE);

		tune.get(2).get(2).addNote(new Note(tune, LOW_A, EIGHTH, true)).setEmbellishmentFamily(G_GRACE);
		tune.get(2).get(2).addNote(new Note(tune, B, SIXTEENTH)).setEmbellishmentFamily(D_GRACE);
		tune.get(2).get(2).addNote(new Note(tune, E, QUARTER)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(2).addNote(new Note(tune, A, QUARTER)).setEmbellishmentFamily(DOUBLING);

		tune.get(2).get(3).addNote(new Note(tune, G, SIXTEENTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(3).addNote(new Note(tune, F, THIRTY_SECOND));
		tune.get(2).get(3).addNote(new Note(tune, E, SIXTEENTH, true)).setEmbellishmentFamily(G_GRACE);
		tune.get(2).get(3).addNote(new Note(tune, D, THIRTY_SECOND));
		tune.get(2).get(3).addNote(new Note(tune, G, QUARTER)).setEmbellishmentFamily(DOUBLING);
		tune.get(2).get(3).addNote(new Note(tune, LOW_G, QUARTER)).setEmbellishmentFamily(A_GRACE);

		// Line 4
		tune.get(3).get(0).addNote(new Note(tune, D, EIGHTH)).setEmbellishmentFamily(THROW);
		tune.get(3).get(0).addNote(new Note(tune, B, EIGHTH)).setEmbellishmentFamily(E_GRACE);
		tune.get(3).get(0).addNote(new Note(tune, D, QUARTER)).setEmbellishmentFamily(THROW);
		tune.get(3).get(0).addNote(new Note(tune, E, EIGHTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(3).get(0).addNote(new Note(tune, D, SIXTEENTH));

		tune.get(3).get(1).addNote(new Note(tune, B, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(3).get(1).addNote(new Note(tune, LOW_A, EIGHTH)).setEmbellishmentFamily(E_GRACE);
		tune.get(3).get(1).addNote(new Note(tune, LOW_A, EIGHTH)).setEmbellishmentFamily(DOUBLING);
		tune.get(3).get(1).addNote(new Note(tune, LOW_G, EIGHTH)).setEmbellishmentFamily(E_GRACE);
		tune.get(3).get(1).addNote(new Note(tune, G, EIGHTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(3).get(1).addNote(new Note(tune, F, SIXTEENTH));

		tune.get(3).get(2).addNote(new Note(tune, E, EIGHTH, true)).setEmbellishmentFamily(DOUBLING);
		tune.get(3).get(2).addNote(new Note(tune, D, SIXTEENTH));
		tune.get(3).get(2).addNote(new Note(tune, B, SIXTEENTH)).setEmbellishmentFamily(G_GRACE);
		tune.get(3).get(2).addNote(new Note(tune, D, EIGHTH, false));
		tune.get(3).get(2).addNote(new Note(tune, LOW_G, QUARTER));

		tune.get(3).get(3).addNote(new Note(tune, LOW_A, QUARTER)).setEmbellishmentFamily(G_GRACE);
		tune.get(3).get(3).addNote(new Note(tune, B, QUARTER)).setEmbellishmentFamily(GRIP);
		tune.get(3).get(3).addNote(new Note(tune, LOW_A, QUARTER));

		return tune;
	}
}


text:
/**
 * rcm-i18n
 */
angular.module('rcmI18n', ['pascalprecht.translate'])
    .config(
    [
        '$translateProvider',
        function ($translateProvider) {

            if (typeof rcmI18nTranslations !== 'object') {
                console.warn('rcmI18nTranslations was not defined, translations not loaded.');
                return;
            }
            $translateProvider.translations(
                rcmI18nTranslations.defaultLocale,
                rcmI18nTranslations.translations[rcmI18nTranslations.defaultLocale]
            );

            $translateProvider.preferredLanguage(rcmI18nTranslations.defaultLocale);

            // Sanitation is to be done on the server
            $translateProvider.useSanitizeValueStrategy(null);
        }
    ]
);

rcm.addAngularModule(
    'rcmI18n'
);


text:
<?php

namespace Google\Service\VersionHistory\Resource;

use Google\Service\VersionHistory\ListReleasesResponse;

/**
 * The "releases" collection of methods.
 * Typical usage is:
 *  <code>
 *   $versionhistoryService = new Google\Service\VersionHistory(...);
 *   $releases = $versionhistoryService->releases;
 *  </code>
 */
class PlatformsChannelsVersionsReleases extends \Google\Service\Resource
{
  /**
   * Returns list of releases of the given version.
   * (releases.listPlatformsChannelsVersionsReleases)
   *
   * @param string $parent Required. The version, which owns this collection of
   * releases. Format:
   * {product}/platforms/{platform}/channels/{channel}/versions/{version}
   * @param array $optParams Optional parameters.
   *
   * @opt_param string filter Optional. Filter string. Format is a comma separated
   * list of All comma separated filter clauses are conjoined with a logical
   * "and". Valid field_names are "version", "name", "platform", "channel",
   * "fraction" "starttime", and "endtime". Valid operators are "<", "<=", "=",
   * ">=", and ">". Channel comparison is done by distance from stable. must be a
   * valid channel when filtering by channel. Ex) stable < beta, beta < dev,
   * canary < canary_asan. Version comparison is done numerically. Ex) 1.0.0.8 <
   * 1.0.0.10. If version is not entirely written, the version will be appended
   * with 0 for the missing fields. Ex) version > 80 becoms version > 80.0.0.0
   * When filtering by starttime or endtime, string must be in RFC 3339 date
   * string format. Name and platform are filtered by string comparison. Ex)
   * "...?filter=channel<=beta, version >= 80 Ex) "...?filter=version > 80,
   * version < 81 Ex) "...?filter=starttime>2020-01-01T00:00:00Z
   * @opt_param string orderBy Optional. Ordering string. Valid order_by strings
   * are "version", "name", "starttime", "endtime", "platform", "channel", and
   * "fraction". Optionally, you can append "desc" or "asc" to specify the sorting
   * order. Multiple order_by strings can be used in a comma separated list.
   * Ordering by channel will sort by distance from the stable channel (not
   * alphabetically). A list of channels sorted in this order is: stable, beta,
   * dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour
   * as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in
   * descending order. If order_by is not specified the response will be sorted by
   * starttime in descending order. Ex) "...?order_by=starttime asc" Ex)
   * "...?order_by=platform desc, channel, startime desc"
   * @opt_param int pageSize Optional. Optional limit on the number of releases to
   * include in the response. If unspecified, the server will pick an appropriate
   * default.
   * @opt_param string pageToken Optional. A page token, received from a previous
   * `ListReleases` call. Provide this to retrieve the subsequent page.
   * @return ListReleasesResponse
   */
  public function listPlatformsChannelsVersionsReleases($parent, $optParams = [])
  {
    $params = ['parent' => $parent];
    $params = array_merge($params, $optParams);
    return $this->call('list', [$params], ListReleasesResponse::class);
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PlatformsChannelsVersionsReleases::class, 'Google_Service_VersionHistory_Resource_PlatformsChannelsVersionsReleases');