text:
Agregar Punto Geolocalizable

<mat-divider class="lineaDivisoria"></mat-divider>

<mat-card class="panel">
    <mat-card-header>
      <mat-card-title>Añadir puntogeolocalizable</mat-card-title>
      <mat-card-subtitle>Introduce los parámetros</mat-card-subtitle>
   </mat-card-header>
   <mat-card-content>

      Nombre
      <input  type="text" id="inputNombrePuntoGeolocalizable" class="form-control" requiered [(ngModel)]="nombrePuntoGeolocalizable" placeholder="Escribe el nombre">

        Latitud (en grados decimales, ej: 41.3036)*
        <input  type="text" id="inputLatitudPuntoGeolocalizable" class="form-control" requiered [(ngModel)]="latitudPuntoGeolocalizable" placeholder="Escribe la latitud">

      Longitud (en grados decimales, ej: 2.1743)*
      <input  type="text" id="inputLongitudPuntoGeolocalizable" class="form-control" requiered [(ngModel)]="longitudPuntoGeolocalizable" placeholder="Escribe la longitud">

    Pista Fácil
    <input  type="text" id="inputPistaFacilPuntoGeolocalizable" class="form-control" requiered [(ngModel)]="pistafacilPuntoGeolocalizable" placeholder="Escribe la pista facil">

  Pista Difícil
  <input  type="text" id="inputPistaDificilPuntoGeolocalizable" class="form-control" requiered [(ngModel)]="pistadificilPuntoGeolocalizable" placeholder="Escribe la pista dificil">

    * En caso de no conocer las coordenadas, se podrán capturar mediante la aplicación móvil.

   </mat-card-content>

  <mat-card-actions align="end">
    <button  (click) = "LimpiarCampos()" type="button" class="btn Back">Limpiar Campos</button>
    <button  (click) = "AgregarPuntoGeolocalizableEscenario()"  class="btn Aceptar">Agregar PuntoGeolocalizable</button>
  </mat-card-actions>

  </mat-card>

      <form *ngIf="puntosgeolocalizablesAgregados[0]">

            PuntosGeolocalizables creados recientemente

          <ng-container matColumnDef="nombrePuntoGeolocalizable">
             Nombre
             {{puntogeolocalizable.Nombre}}
          </ng-container>

          <ng-container matColumnDef="latitudPuntoGeolocalizable">
             Latitud
             {{puntogeolocalizable.Latitud}}
          </ng-container>

          <ng-container matColumnDef="longitudPuntoGeolocalizable">
             Longitud
             {{puntogeolocalizable.Longitud}}
          </ng-container>

          <ng-container matColumnDef=" ">

              <button (click) = "BorrarPuntoGeolocalizable(puntogeolocalizable)" mat-icon-button matTooltip="Borrar el puntogeolocalizable {{puntogeolocalizable.Nombre}}">
                delete
              </button>

          </ng-container>

      </form>

<mat-dialog-actions align= "end">

  <button mat-button (click)= "Cerrar();" class="btn Cerrar">Cerrar</button>
</mat-dialog-actions>


text:
require 'concurrent/atomic/mutex_semaphore'
require 'concurrent/synchronization'

module Concurrent

  ###################################################################

  # @!macro semaphore_method_initialize
  #
  #   Create a new `Semaphore` with the initial `count`.
  #
  #   @param [Fixnum] count the initial count
  #
  #   @raise [ArgumentError] if `count` is not an integer or is less than zero

  # @!macro semaphore_method_acquire
  #
  #   Acquires the given number of permits from this semaphore,
  #     blocking until all are available.
  #
  #   @param [Fixnum] permits Number of permits to acquire
  #
  #   @raise [ArgumentError] if `permits` is not an integer or is less than
  #     one
  #
  #   @return [nil]

  # @!macro semaphore_method_available_permits
  #
  #   Returns the current number of permits available in this semaphore.
  #
  #   @return [Integer]

  # @!macro semaphore_method_drain_permits
  #
  #   Acquires and returns all permits that are immediately available.
  #
  #   @return [Integer]

  # @!macro semaphore_method_try_acquire
  #
  #   Acquires the given number of permits from this semaphore,
  #     only if all are available at the time of invocation or within
  #     `timeout` interval
  #
  #   @param [Fixnum] permits the number of permits to acquire
  #
  #   @param [Fixnum] timeout the number of seconds to wait for the counter
  #     or `nil` to return immediately
  #
  #   @raise [ArgumentError] if `permits` is not an integer or is less than
  #     one
  #
  #   @return [Boolean] `false` if no permits are available, `true` when
  #     acquired a permit

  # @!macro semaphore_method_release
  #
  #   Releases the given number of permits, returning them to the semaphore.
  #
  #   @param [Fixnum] permits Number of permits to return to the semaphore.
  #
  #   @raise [ArgumentError] if `permits` is not a number or is less than one
  #
  #   @return [nil]

  ###################################################################

  # @!macro semaphore_public_api
  #
  #   @!method initialize(count)
  #     @!macro semaphore_method_initialize
  #
  #   @!method acquire(permits = 1)
  #     @!macro semaphore_method_acquire
  #
  #   @!method available_permits
  #     @!macro semaphore_method_available_permits
  #
  #   @!method drain_permits
  #     @!macro semaphore_method_drain_permits
  #
  #   @!method try_acquire(permits = 1, timeout = nil)
  #     @!macro semaphore_method_try_acquire
  #
  #   @!method release(permits = 1)
  #     @!macro semaphore_method_release

  ###################################################################

  # @!visibility private
  # @!macro internal_implementation_note
  SemaphoreImplementation = case
                            when defined?(JavaSemaphore)
                              JavaSemaphore
                            else
                              MutexSemaphore
                            end
  private_constant :SemaphoreImplementation

  # @!macro semaphore
  #
  #   A counting semaphore. Conceptually, a semaphore maintains a set of
  #   permits. Each {#acquire} blocks if necessary until a permit is
  #   available, and then takes it. Each {#release} adds a permit, potentially
  #   releasing a blocking acquirer.
  #   However, no actual permit objects are used; the Semaphore just keeps a
  #   count of the number available and acts accordingly.
  #
  # @!macro semaphore_public_api
  # @example
  #   semaphore = Concurrent::Semaphore.new(2)
  #
  #   t1 = Thread.new do
  #     semaphore.acquire
  #     puts "Thread 1 acquired semaphore"
  #   end
  #
  #   t2 = Thread.new do
  #     semaphore.acquire
  #     puts "Thread 2 acquired semaphore"
  #   end
  #
  #   t3 = Thread.new do
  #     semaphore.acquire
  #     puts "Thread 3 acquired semaphore"
  #   end
  #
  #   t4 = Thread.new do
  #     sleep(2)
  #     puts "Thread 4 releasing semaphore"
  #     semaphore.release
  #   end
  #
  #   [t1, t2, t3, t4].each(&:join)
  #
  #   # prints:
  #   # Thread 3 acquired semaphore
  #   # Thread 2 acquired semaphore
  #   # Thread 4 releasing semaphore
  #   # Thread 1 acquired semaphore
  #
  class Semaphore < SemaphoreImplementation
  end
end

redpajama_set_name: RedPajamaGithub


text:
package net.sf.jasperreports.engine;

import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.util.Arrays;
import java.util.Map;

import net.sf.jasperreports.engine.fill.JRFiller;
import net.sf.jasperreports.engine.util.JRLoader;
import net.sf.jasperreports.engine.util.JRSaver;
import net.sf.jasperreports.engine.util.LocalJasperReportsContext;
import net.sf.jasperreports.engine.util.SimpleFileResolver;

/**
 * Facade class for filling compiled report designs with data from report data sources,
 * in order to produce page-oriented documents, ready-to-print.
 *

 * It exposes a variety of methods that receive a report template in the form of an object, file,
 * or input stream, and also produces a document in various output forms (object, file, or
 * output stream).
 *

 * All methods receive a Map object that should contain the values for the report parameters.
 * These values are retrieved by the engine using the corresponding report parameter name as the key.
 *

 * There are two types of method signatures with regards to the data source
 * provided for filling the report:
 *

 *
Methods that receive an instance of the {@link net.sf.jasperreports.engine.JRDataSource} interface
 * and use it directly for retrieving report data;
 *
Methods that receive an instance of the java.sql.Connection interface and retrieve
 * the report data by executing the report internal SQL query through this JDBC connection and wrapping
 * the returned java.sql.ResultSet object inside a {@link net.sf.jasperreports.engine.JRResultSetDataSource}
 * instance.
 *

 *
 * @see net.sf.jasperreports.engine.JasperReport
 * @see net.sf.jasperreports.engine.JRDataSource
 * @see net.sf.jasperreports.engine.fill.JRFiller
 * @see net.sf.jasperreports.engine.JasperPrint
 * @author Teodor Danciu (teodord@users.sourceforge.net)
 * @version $Id: JasperFillManager.java 7199 2014-08-27 13:58:10Z teodord $
 */
public final class JasperFillManager
{
	private final JasperReportsContext jasperReportsContext;

	/**
	 *
	 */
	private JasperFillManager(JasperReportsContext jasperReportsContext)
	{
		this.jasperReportsContext = jasperReportsContext;
	}

	/**
	 *
	 */
	private static JasperFillManager getDefaultInstance()
	{
		return new JasperFillManager(DefaultJasperReportsContext.getInstance());
	}

	/**
	 *
	 */
	public static JasperFillManager getInstance(JasperReportsContext jasperReportsContext)
	{
		return new JasperFillManager(jasperReportsContext);
	}

	/**
	 * Fills the compiled report design loaded from the specified file.
	 * The result of this operation is another file that will contain the serialized
	 * {@link JasperPrint} object representing the generated document,
	 * having the same name as the report design as declared in the source file,
	 * plus the *.jrprint extension, located in the same directory as the source file.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param params     report parameters map
	 * @param connection     JDBC connection object to use for executing the report internal SQL query
	 */
	public String fillToFile(
		String sourceFileName,
		Map<String,Object> params,
		Connection connection
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		File destFile = new File(sourceFile.getParent(), jasperReport.getName() + ".jrprint");
		String destFileName = destFile.toString();

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		JasperPrint jasperPrint = JRFiller.fill(lcJrCtx, jasperReport, params, connection);

		JRSaver.saveObject(jasperPrint, destFileName);

		return destFileName;
	}

	/**
	 * Fills the compiled report design loaded from the specified file.
	 * The result of this operation is another file that will contain the serialized
	 * {@link JasperPrint} object representing the generated document,
	 * having the same name as the report design as declared in the source file,
	 * plus the *.jrprint extension, located in the same directory as the source file.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param params     report parameters map
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public String fillToFile(
		String sourceFileName,
		Map<String,Object> params
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		File destFile = new File(sourceFile.getParent(), jasperReport.getName() + ".jrprint");
		String destFileName = destFile.toString();

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		JasperPrint jasperPrint = JRFiller.fill(lcJrCtx, jasperReport, params);

		JRSaver.saveObject(jasperPrint, destFileName);

		return destFileName;
	}

	/**
	 * Fills the compiled report design loaded from the file received as the first parameter
	 * and places the result in the file specified by the second parameter.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param destFileName   file name to place the generated report into
	 * @param params     report parameters map
	 * @param connection     JDBC connection object to use for executing the report internal SQL query
	 */
	public void fillToFile(
		String sourceFileName,
		String destFileName,
		Map<String,Object> params,
		Connection connection
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		JasperPrint jasperPrint = JRFiller.fill(lcJrCtx, jasperReport, params, connection);

		JRSaver.saveObject(jasperPrint, destFileName);
	}

	/**
	 * Fills the compiled report design loaded from the file received as the first parameter
	 * and places the result in the file specified by the second parameter.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param destFileName   file name to place the generated report into
	 * @param params     report parameters map
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public void fillToFile(
		String sourceFileName,
		String destFileName,
		Map<String,Object> params
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		JasperPrint jasperPrint = JRFiller.fill(lcJrCtx, jasperReport, params);

		JRSaver.saveObject(jasperPrint, destFileName);
	}

	/**
	 * Fills the compiled report design received as the first parameter
	 * and places the result in the file specified by the second parameter.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param destFileName file name to place the generated report into
	 * @param parameters   report parameters map
	 * @param connection   JDBC connection object to use for executing the report internal SQL query
	 */
	public void fillToFile(
		JasperReport jasperReport,
		String destFileName,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		JasperPrint jasperPrint = fill(jasperReport, parameters, connection);

		JRSaver.saveObject(jasperPrint, destFileName);
	}

	/**
	 * Fills the compiled report design received as the first parameter
	 * and places the result in the file specified by the second parameter.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param destFileName file name to place the generated report into
	 * @param parameters   report parameters map
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public void fillToFile(
		JasperReport jasperReport,
		String destFileName,
		Map<String,Object> parameters
		) throws JRException
	{
		JasperPrint jasperPrint = fill(jasperReport, parameters);

		JRSaver.saveObject(jasperPrint, destFileName);
	}

	/**
	 * Fills the compiled report design loaded from the specified file and returns
	 * the generated report object.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param params     report parameters map
	 * @param connection     JDBC connection object to use for executing the report internal SQL query
	 * @return generated report object
	 */
	public JasperPrint fill(
		String sourceFileName,
		Map<String,Object> params,
		Connection connection
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		return JRFiller.fill(lcJrCtx, jasperReport, params, connection);
	}

	/**
	 * Fills the compiled report design loaded from the specified file and returns
	 * the generated report object.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param params     report parameters map
	 * @return generated report object
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public JasperPrint fill(
		String sourceFileName,
		Map<String,Object> params
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		return JRFiller.fill(lcJrCtx, jasperReport, params);
	}

	/**
	 * Fills the compiled report design loaded from the supplied input stream and writes
	 * the generated report object to the output stream specified by the second parameter.
	 *
	 * @param inputStream  input stream to read the compiled report design object from
	 * @param outputStream output stream to write the generated report object to
	 * @param parameters   report parameters map
	 * @param connection   JDBC connection object to use for executing the report internal SQL query
	 */
	public void fillToStream(
		InputStream inputStream,
		OutputStream outputStream,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(inputStream);

		fillToStream(jasperReport, outputStream, parameters, connection);
	}

	/**
	 * Fills the compiled report design loaded from the supplied input stream and writes
	 * the generated report object to the output stream specified by the second parameter.
	 *
	 * @param inputStream  input stream to read the compiled report design object from
	 * @param outputStream output stream to write the generated report object to
	 * @param parameters   report parameters map
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public void fillToStream(
		InputStream inputStream,
		OutputStream outputStream,
		Map<String,Object> parameters
		) throws JRException
	{
		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(inputStream);

		fillToStream(jasperReport, outputStream, parameters);
	}

	/**
	 * Fills the compiled report design supplied as the first parameter and writes
	 * the generated report object to the output stream specified by the second parameter.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param outputStream output stream to write the generated report object to
	 * @param parameters   report parameters map
	 * @param connection   JDBC connection object to use for executing the report internal SQL query
	 */
	public void fillToStream(
		JasperReport jasperReport,
		OutputStream outputStream,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		JasperPrint jasperPrint = fill(jasperReport, parameters, connection);

		JRSaver.saveObject(jasperPrint, outputStream);
	}

	/**
	 * Fills the compiled report design supplied as the first parameter and writes
	 * the generated report object to the output stream specified by the second parameter.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param outputStream output stream to write the generated report object to
	 * @param parameters   report parameters map
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public void fillToStream(
		JasperReport jasperReport,
		OutputStream outputStream,
		Map<String,Object> parameters
		) throws JRException
	{
		JasperPrint jasperPrint = fill(jasperReport, parameters);

		JRSaver.saveObject(jasperPrint, outputStream);
	}

	/**
	 * Fills the compiled report design loaded from the supplied input stream and returns
	 * the generated report object.
	 *
	 * @param inputStream  input stream to read the compiled report design object from
	 * @param parameters   report parameters map
	 * @param connection   JDBC connection object to use for executing the report internal SQL query
	 * @return generated report object
	 */
	public JasperPrint fill(
		InputStream inputStream,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(inputStream);

		return fill(jasperReport, parameters, connection);
	}

	/**
	 * Fills the compiled report design loaded from the supplied input stream and returns
	 * the generated report object.
	 *
	 * @param inputStream  input stream to read the compiled report design object from
	 * @param parameters   report parameters map
	 * @return generated report object
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public JasperPrint fill(
		InputStream inputStream,
		Map<String,Object> parameters
		) throws JRException
	{
		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(inputStream);

		return fill(jasperReport, parameters);
	}

	/**
	 * Fills the compiled report design supplied as the first parameter and returns
	 * the generated report object.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param parameters   report parameters map
	 * @param connection   JDBC connection object to use for executing the report internal SQL query
	 * @return generated report object
	 */
	public JasperPrint fill(
		JasperReport jasperReport,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		return JRFiller.fill(jasperReportsContext, jasperReport, parameters, connection);
	}

	/**
	 * Fills the compiled report design supplied as the first parameter and returns
	 * the generated report object.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param parameters   report parameters map
	 * @return generated report object
	 * @see JRFiller#fill(JasperReportsContext, JasperReport, Map)
	 */
	public JasperPrint fill(
		JasperReport jasperReport,
		Map<String,Object> parameters
		) throws JRException
	{
		return JRFiller.fill(jasperReportsContext, jasperReport, parameters);
	}

	/**
	 * Fills the compiled report design loaded from the specified file.
	 * The result of this operation is another file that will contain the serialized
	 * {@link JasperPrint} object representing the generated document,
	 * having the same name as the report design as declared in the source file,
	 * plus the *.jrprint extension, located in the same directory as the source file.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param params     report parameters map
	 * @param dataSource     data source object
	 */
	public String fillToFile(
		String sourceFileName,
		Map<String,Object> params,
		JRDataSource dataSource
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		File destFile = new File(sourceFile.getParent(), jasperReport.getName() + ".jrprint");
		String destFileName = destFile.toString();

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		JasperPrint jasperPrint = JRFiller.fill(lcJrCtx, jasperReport, params, dataSource);

		JRSaver.saveObject(jasperPrint, destFileName);

		return destFileName;
	}

	/**
	 * Fills the compiled report design loaded from the file received as the first parameter
	 * and places the result in the file specified by the second parameter.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param destFileName   file name to place the generated report into
	 * @param params     report parameters map
	 * @param dataSource     data source object
	 */
	public void fillToFile(
		String sourceFileName,
		String destFileName,
		Map<String,Object> params,
		JRDataSource dataSource
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		JasperPrint jasperPrint = JRFiller.fill(lcJrCtx, jasperReport, params, dataSource);

		JRSaver.saveObject(jasperPrint, destFileName);
	}

	/**
	 * Fills the compiled report design received as the first parameter
	 * and places the result in the file specified by the second parameter.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param destFileName file name to place the generated report into
	 * @param parameters   report parameters map
	 * @param dataSource   data source object
	 */
	public void fillToFile(
		JasperReport jasperReport,
		String destFileName,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		JasperPrint jasperPrint = fill(jasperReport, parameters, dataSource);

		JRSaver.saveObject(jasperPrint, destFileName);
	}

	/**
	 * Fills the compiled report design loaded from the specified file and returns
	 * the generated report object.
	 *
	 * @param sourceFileName source file containing the compile report design
	 * @param params     report parameters map
	 * @param dataSource     data source object
	 * @return generated report object
	 */
	public JasperPrint fill(
		String sourceFileName,
		Map<String,Object> params,
		JRDataSource dataSource
		) throws JRException
	{
		File sourceFile = new File(sourceFileName);

		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

		JasperReportsContext lcJrCtx = getLocalJasperReportsContext(sourceFile);

		return JRFiller.fill(lcJrCtx, jasperReport, params, dataSource);
	}

	/**
	 * Fills the compiled report design loaded from the supplied input stream and writes
	 * the generated report object to the output stream specified by the second parameter.
	 *
	 * @param inputStream  input stream to read the compiled report design object from
	 * @param outputStream output stream to write the generated report object to
	 * @param parameters   report parameters map
	 * @param dataSource   data source object
	 */
	public void fillToStream(
		InputStream inputStream,
		OutputStream outputStream,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(inputStream);

		fillToStream(jasperReport, outputStream, parameters, dataSource);
	}

	/**
	 * Fills the compiled report design supplied as the first parameter and writes
	 * the generated report object to the output stream specified by the second parameter.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param outputStream output stream to write the generated report object to
	 * @param parameters   report parameters map
	 * @param dataSource   data source object
	 */
	public void fillToStream(
		JasperReport jasperReport,
		OutputStream outputStream,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		JasperPrint jasperPrint = fill(jasperReport, parameters, dataSource);

		JRSaver.saveObject(jasperPrint, outputStream);
	}

	/**
	 * Fills the compiled report design loaded from the supplied input stream and returns
	 * the generated report object.
	 *
	 * @param inputStream  input stream to read the compiled report design object from
	 * @param parameters   report parameters map
	 * @param dataSource   data source object
	 * @return generated report object
	 */
	public JasperPrint fill(
		InputStream inputStream,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		JasperReport jasperReport = (JasperReport)JRLoader.loadObject(inputStream);

		return fill(jasperReport, parameters, dataSource);
	}

	/**
	 * Fills the compiled report design supplied as the first parameter and returns
	 * the generated report object.
	 *
	 * @param jasperReport compiled report design object to use for filling
	 * @param parameters   report parameters map
	 * @param dataSource   data source object
	 * @return generated report object
	 */
	public JasperPrint fill(
		JasperReport jasperReport,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		return JRFiller.fill(jasperReportsContext, jasperReport, parameters, dataSource);
	}

	/**
	 * @see #fillToFile(String, Map, Connection)
	 */
	public static String fillReportToFile(
		String sourceFileName,
		Map<String,Object> params,
		Connection connection
		) throws JRException
	{
		return getDefaultInstance().fillToFile(sourceFileName, params, connection);
	}

	/**
	 * @see #fillToFile(String, Map)
	 */
	public static String fillReportToFile(
		String sourceFileName,
		Map<String,Object> params
		) throws JRException
	{
		return getDefaultInstance().fillToFile(sourceFileName, params);
	}

	/**
	 * @see #fillToFile(String, String, Map, Connection)
	 */
	public static void fillReportToFile(
		String sourceFileName,
		String destFileName,
		Map<String,Object> params,
		Connection connection
		) throws JRException
	{
		getDefaultInstance().fillToFile(sourceFileName, destFileName, params, connection);
	}

	/**
	 * @see #fillToFile(String, String, Map)
	 */
	public static void fillReportToFile(
		String sourceFileName,
		String destFileName,
		Map<String,Object> params
		) throws JRException
	{
		getDefaultInstance().fillToFile(sourceFileName, destFileName, params);
	}

	/**
	 * @see #fillToFile(JasperReport, String, Map, Connection)
	 */
	public static void fillReportToFile(
		JasperReport jasperReport,
		String destFileName,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		getDefaultInstance().fillToFile(jasperReport, destFileName, parameters, connection);
	}

	/**
	 * @see #fillToFile(JasperReport, String, Map)
	 */
	public static void fillReportToFile(
		JasperReport jasperReport,
		String destFileName,
		Map<String,Object> parameters
		) throws JRException
	{
		getDefaultInstance().fillToFile(jasperReport, destFileName, parameters);
	}

	/**
	 * @see #fill(String, Map, Connection)
	 */
	public static JasperPrint fillReport(
		String sourceFileName,
		Map<String,Object> params,
		Connection connection
		) throws JRException
	{
		return getDefaultInstance().fill(sourceFileName, params, connection);
	}

	/**
	 * @see #fill(String, Map)
	 */
	public static JasperPrint fillReport(
		String sourceFileName,
		Map<String,Object> params
		) throws JRException
	{
		return getDefaultInstance().fill(sourceFileName, params);
	}

	/**
	 * @see #fillToStream(InputStream, OutputStream, Map, Connection)
	 */
	public static void fillReportToStream(
		InputStream inputStream,
		OutputStream outputStream,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		getDefaultInstance().fillToStream(inputStream, outputStream, parameters, connection);
	}

	/**
	 * @see #fillToStream(InputStream, OutputStream, Map)
	 */
	public static void fillReportToStream(
		InputStream inputStream,
		OutputStream outputStream,
		Map<String,Object> parameters
		) throws JRException
	{
		getDefaultInstance().fillToStream(inputStream, outputStream, parameters);
	}

	/**
	 * @see #fillToStream(JasperReport, OutputStream, Map, Connection)
	 */
	public static void fillReportToStream(
		JasperReport jasperReport,
		OutputStream outputStream,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		getDefaultInstance().fillToStream(jasperReport, outputStream, parameters, connection);
	}

	/**
	 * @see #fillToStream(JasperReport, OutputStream, Map)
	 */
	public static void fillReportToStream(
		JasperReport jasperReport,
		OutputStream outputStream,
		Map<String,Object> parameters
		) throws JRException
	{
		getDefaultInstance().fillToStream(jasperReport, outputStream, parameters);
	}

	/**
	 * @see #fill(InputStream, Map, Connection)
	 */
	public static JasperPrint fillReport(
		InputStream inputStream,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		return getDefaultInstance().fill(inputStream, parameters, connection);
	}

	/**
	 * @see #fill(InputStream, Map)
	 */
	public static JasperPrint fillReport(
		InputStream inputStream,
		Map<String,Object> parameters
		) throws JRException
	{
		return getDefaultInstance().fill(inputStream, parameters);
	}

	/**
	 * @see #fill(JasperReport, Map, Connection)
	 */
	public static JasperPrint fillReport(
		JasperReport jasperReport,
		Map<String,Object> parameters,
		Connection connection
		) throws JRException
	{
		return getDefaultInstance().fill(jasperReport, parameters, connection);
	}

	/**
	 * @see #fill(JasperReport, Map)
	 */
	public static JasperPrint fillReport(
		JasperReport jasperReport,
		Map<String,Object> parameters
		) throws JRException
	{
		return getDefaultInstance().fill(jasperReport, parameters);
	}

	/**
	 * @see #fillToFile(String, Map, JRDataSource)
	 */
	public static String fillReportToFile(
		String sourceFileName,
		Map<String,Object> params,
		JRDataSource dataSource
		) throws JRException
	{
		return getDefaultInstance().fillToFile(sourceFileName, params, dataSource);
	}

	/**
	 * @see #fillToFile(String, String, Map, JRDataSource)
	 */
	public static void fillReportToFile(
		String sourceFileName,
		String destFileName,
		Map<String,Object> params,
		JRDataSource dataSource
		) throws JRException
	{
		getDefaultInstance().fillToFile(sourceFileName, destFileName, params, dataSource);
	}

	/**
	 * @see #fillToFile(JasperReport, String, Map, JRDataSource)
	 */
	public static void fillReportToFile(
		JasperReport jasperReport,
		String destFileName,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		getDefaultInstance().fillToFile(jasperReport, destFileName, parameters, dataSource);
	}

	/**
	 * @see #fill(String, Map, JRDataSource)
	 */
	public static JasperPrint fillReport(
		String sourceFileName,
		Map<String,Object> params,
		JRDataSource dataSource
		) throws JRException
	{
		return getDefaultInstance().fill(sourceFileName, params, dataSource);
	}

	/**
	 * @see #fillToStream(InputStream, OutputStream, Map, JRDataSource)
	 */
	public static void fillReportToStream(
		InputStream inputStream,
		OutputStream outputStream,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		getDefaultInstance().fillToStream(inputStream, outputStream, parameters, dataSource);
	}

	/**
	 * @see #fillToStream(JasperReport, OutputStream, Map, JRDataSource)
	 */
	public static void fillReportToStream(
		JasperReport jasperReport,
		OutputStream outputStream,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		getDefaultInstance().fillToStream(jasperReport, outputStream, parameters, dataSource);
	}

	/**
	 * @see #fill(InputStream, Map, JRDataSource)
	 */
	public static JasperPrint fillReport(
		InputStream inputStream,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		return getDefaultInstance().fill(inputStream, parameters, dataSource);
	}

	/**
	 * @see #fill(JasperReport, Map, JRDataSource)
	 */
	public static JasperPrint fillReport(
		JasperReport jasperReport,
		Map<String,Object> parameters,
		JRDataSource dataSource
		) throws JRException
	{
		return getDefaultInstance().fill(jasperReport, parameters, dataSource);
	}

	/**
	 *
	 */
	protected JasperReportsContext getLocalJasperReportsContext(File file)
	{
		SimpleFileResolver fileResolver =
			new SimpleFileResolver(
				Arrays.asList(new File[]{file.getParentFile(), new File(".")})
				);
		fileResolver.setResolveAbsolutePath(true);

		LocalJasperReportsContext localJasperReportsContext = new LocalJasperReportsContext(jasperReportsContext);
		localJasperReportsContext.setFileResolver(fileResolver);
		return localJasperReportsContext;
	}
}


text:
require 'rom/support/array_dataset'
require 'rom'
require 'rfm'
require 'rom/fmp/rfm/layout'
require 'charlatan'

module ROM
  module FMP

    class Dataset
      # This was used but is not now.
      #include ArrayDataset

      # TODO: Find out why datasets never have @data or @loaded.
      # Is @loaded even a ROM attribute? Or is it just my own creation? Answer: @loaded is part of the rfm layout or database object.

      # Used to compile compound queries from chained relations.
      extend ::Rfm::Scope

      DEFAULT_REQUEST_OPTIONS = {}

      # Dataset instance expects to hold Array of data in @data,
      # but it will also hold a FM Layout instance.
      # If any call to Dataset instance returns Array instance,
      # it will be wrapped in a new Dataset instance.
      include Charlatan.new(:data, kind: Array)
      attr_reader :layout, :data, :queries

      # Is now in Rfm::Scope
      # def self.delineate_query(*request)
      #   options = (request.last.is_a?(Hash) && request.size > 1) ? request.pop : {}
      #   query = request.pop || {}
      #   action = request.pop || (query.size==0 ? :all : :find)
      #   [action, query, options]
      # end

      # Mixes chained queries together into single query.
      # Now works with multiple-request queries (using new rfm scope feature).
      # NOTE: Each query must be an array representing a full rfm request.
      # Other ways: consider mixing multi-request queries with intersection: (result1 & result2),
      # or with the new scope feature: query1(scope:query2(scope:query3))
      def self.compile_query(queries)
        #puts "DATASET COMPILE QUERIES input:#{queries}"

        # Old way: works but doesn't handle fmp compound queries.
        #query.each_with_object([{},{}]){|x,o| o[0].merge!(x[0] || {}); o[1].merge!(x[1] || {})}

        # New way: handles compound queries. Reqires ginjo-rfm 3.0.11.
        return [] unless queries.any?  # This should help introspecting dataset that results from record deletion. TODO: test this.
        rslt = queries.inject {|new_query,scope| apply_scope(new_query, scope)}
        #puts "DATASET COMPILE QUERIES output:#{rslt}"
        #rslt
      end

      # Store layout, data, query in new dataset.
      # Why data & queries? ROM doesn't appear to be using those,
      # yet the linter insists on them.
      def initialize(_layout, _data=[], _queries=[])
        # puts "DATASET NEW LAYOUT #{_layout}"
        # puts "DATASET NEW DATA #{_data}"
        # puts "DATASET NEW QUERIES #{_queries}"
        @layout = _layout
        @queries = _queries
        # Linter insists on this too.
        super(_data)
      end

      # Creates new dataset with existing data & queries, plus new query
      def find(*args)
        #self.class.new(layout, data, (queries.dup << args))
        wrap_data(data, (queries.dup << args))
      end

      def any(options={})
        wrap_data(layout.any(options))
      end

      def all(options={})
        wrap_data(layout.all(DEFAULT_REQUEST_OPTIONS.merge(options)))
      end

      def count(*args)
        compiled_query = self.class.compile_query(queries)
        compiled_query.any? ? layout.count(*compiled_query) : layout.total_count
      end

      def create(attributes={})
        puts "Would create #{layout.name} with #{attributes}, but instead will just find\n"
        #get_results(:create, [attributes])
        get_results(:any, {})
      end

      def update(*args)
        attributes = args.last.is_a?(Hash) ? args.pop : {}
        record_id = args[0] || [:id, :record_id, 'id', 'record_id'].find {|x| attributes.delete(x)}
        puts "Would update #{record_id} with #{attributes}, but instead will just find\n"
        #get_results(:edit, [record_id, attributes])
        get_results(:find, record_id)
      end

      def delete(record_id)
        puts "Would delete #{record_id}, but instead will just find\n"
        #get_results(:delete, record_id)
        get_results(:find, record_id)
      end

      # Triggers actual fm action.
      def to_a
        (data.nil? || data.empty?) ? call.data.to_a : data.to_a
      end

      # Triggers actual fm action.
      def each
        # passes block - if any - to upstream each.
        to_a.each(&Proc.new)
      end

      # Combines all queries, sends to FM, returns result in new dataset.
      def call
        compiled_query = self.class.compile_query(queries)
        wrap_data(compiled_query.any? ? layout.find(*compiled_query) : layout.all(DEFAULT_REQUEST_OPTIONS))
      end

      # Send method & query to layout, and wrap results in new dataset.
      def get_results(_method, query=queries, _layout=layout)
        #puts "Dataset#get_results self: #{self} method: #{_method}, query: #{query}, layout: #{layout}"

        # This works just as well as the next one.
        wrap_data(_layout.send(_method, *query), query, _layout)

        # Lingering @data might be causing problems with 2+n calls to commands.
        #@data = _layout.send(_method, *query)
        #wrap_data(@data, query, _layout)
      end

      # Returns new dataset containing data, layout, query.
      def wrap_data(_data=data, _queries=queries, _layout=layout)
        self.class.new(_layout, _data, _queries)
      end

    end # Dataset
  end # FMP
end # ROM


text:
using System;
using System.Collections;

namespace Amazon.Lambda.RuntimeSupport
{
    /// <summary>
    /// Implementation of IEnvironmentVariables that accesses the real System.Environment
    /// </summary>
    internal class SystemEnvironmentVariables : IEnvironmentVariables
    {
        public string GetEnvironmentVariable(string variable)
        {
            return Environment.GetEnvironmentVariable(variable);
        }

        public IDictionary GetEnvironmentVariables()
        {
            return Environment.GetEnvironmentVariables();
        }

        public void SetEnvironmentVariable(string variable, string value)
        {
            Environment.SetEnvironmentVariable(variable, value);
        }
    }
}


text:
<?php

namespace JanDolata\CrudeCRUD\Engine\Interfaces;

interface WithThumbnailInterface
{
    public function uploadThumbnailByIdAndColumn($id, $column, $file);
    public function deleteThumbnailByIdAndColumn($id, $column);
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="{{suite_name}}" tests="1" errors="1" failures="0" skip="0">
    <testcase classname="suites_runner.SuitesScheduler" name="{{test_name}}" time="{{time}}">
        <error type="{{error_type}}" message="{{error_message}}"/>
        <system-out><![CDATA[{{system_out}}]]></system-out>
        <system-err><![CDATA[{{system_err}}]]></system-err>
    </testcase>
</testsuite>


text:
using System;
using System.Windows.Media;
using Microsoft.Devices;
using System.IO;

namespace NxtLocalization.Utilities
{
    /// <summary>
    /// Class defining a utility for taking pictures with the phone's camera.
    /// </summary>
    public class PictureCapturingUtility : IDisposable
    {
        #region fields

        //reference to the phone's camera
        private PhotoCamera _camera;
        private bool _disposed;

        #endregion

        #region constructors

        public PictureCapturingUtility(ref VideoBrush videoBrush)
        {
            this._disposed = false;

            if ((PhotoCamera.IsCameraTypeSupported(CameraType.Primary) == true) || (PhotoCamera.IsCameraTypeSupported(CameraType.FrontFacing) == true))
            {
                if (PhotoCamera.IsCameraTypeSupported(CameraType.FrontFacing))
                    this._camera = new PhotoCamera(CameraType.FrontFacing);
                else
                    this._camera = new PhotoCamera(CameraType.Primary);

                this._camera.CaptureImageAvailable += CameraImageAvailable;

                videoBrush.SetSource(this._camera);
            }
        }

        #endregion

        #region destructors

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (!this._disposed)
            {
                if (disposing)
                {
                    this._camera.Dispose();
                    this._camera.CaptureImageAvailable -= CameraImageAvailable;
                }
            }

            this._disposed = true;
        }

        #endregion

        #region methods

        /// <summary>
        /// Takes a picture with the phone's camera;
        /// note that the method doesn't take the direction into account.
        /// </summary>
        public void CaptureImage()
        {
            if(this._camera != null)
                this._camera.CaptureImage();
        }

        /// <summary>
        /// Calls a method in ''NxtServiceClientWrapper for saving the captured image to local PC storage.
        /// </summary>
        private void CameraImageAvailable(object sender, ContentReadyEventArgs e)
        {
            try
            {
                e.ImageStream.Seek(0, SeekOrigin.Begin);

                byte[] imageBytes = new byte[1024];
                byte[] imageStream;
                using (MemoryStream stream = new MemoryStream())
                {
                    while (e.ImageStream.Read(imageBytes, 0, imageBytes.Length) > 0)
                        stream.Write(imageBytes, 0, imageBytes.Length);

                    imageStream = stream.ToArray();
                    NxtServiceClientWrapper.ServiceClient.SaveImageAsync(imageStream);
                }
            }
            finally
            {
                e.ImageStream.Close();
            }
        }

        #endregion
    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
    "http://struts.apache.org/dtds/struts-2.5.dtd">

<struts>

	<package name="bsc-formula" extends="bsc-default" namespace="/" >

		<action name="bsc.formulaManagementAction" class="bsc.web.controller.FormulaManagementAction">
			<result name="input">/pages/formula/formula-management.jsp</result>
			<result name="success">/pages/formula/formula-management.jsp</result>
		</action>

		<action name="bsc.formulaCreateAction" class="bsc.web.controller.FormulaManagementAction" method="create">
			<result name="input">/pages/formula/formula-create.jsp</result>
			<result name="success">/pages/formula/formula-create.jsp</result>
		</action>

		<action name="bsc.formulaEditAction" class="bsc.web.controller.FormulaManagementAction" method="edit">
			<result name="input">/pages/formula/formula-edit.jsp</result>
			<result name="success">/pages/formula/formula-edit.jsp</result>
		</action>

	</package>

	<package name="bsc-formula-json" extends="bsc-default,json-default" namespace="/" >

		<default-interceptor-ref name="greenStepDefaultCustomStack" />

		<action name="bsc.formulaManagementGridQueryAction" class="bsc.web.controller.FormulaManagementGridQueryAction" >
			<result type="json">
  				<param name="contentType">text/html</param>
  				<param name="noCache">true</param>
			</result>
		</action>

		<action name="bsc.formulaSaveAction" class="bsc.web.controller.FormulaSaveOrUpdateAction" method="doSave">
			<result type="json">
  				<param name="contentType">text/html</param>
  				<param name="noCache">true</param>
			</result>
		</action>

		<action name="bsc.formulaUpdateAction" class="bsc.web.controller.FormulaSaveOrUpdateAction" method="doUpdate">
			<result type="json">
  				<param name="contentType">text/html</param>
  				<param name="noCache">true</param>
			</result>
		</action>

		<action name="bsc.formulaDeleteAction" class="bsc.web.controller.FormulaSaveOrUpdateAction" method="doDelete">
			<result type="json">
  				<param name="contentType">text/html</param>
  				<param name="noCache">true</param>
			</result>
		</action>

		<action name="bsc.formulaTestAction" class="bsc.web.controller.FormulaSaveOrUpdateAction" method="doTestFormula">
			<result type="json">
  				<param name="contentType">text/html</param>
  				<param name="noCache">true</param>
			</result>
		</action>

	</package>

</struts>


text:
#include "vector.h"

#include <math.h>
#include <stdio.h>

vector vectorCreate(double x, double y, double z) {
  return (vector){ x, y, z };
}

vector vectorParse(const char *line) {
  double x, y, z;

  sscanf(line, " %lf %lf %lf", &x, &y, &z);

  return vectorCreate(x,y,z);
}

double vectorLength(vector self) {
  return sqrt(vectorDotProduct(self,self));
}

vector vectorUnit(vector self) {
  return vectorDivide(self, vectorLength(self));
}

vector vectorAddition(vector a,vector b) {
  return vectorCreate(a.x + b.x, a.y + b.y, a.z + b.z);
}

vector vectorSubtraction(vector a, vector b) {
  return vectorCreate(a.x - b.x, a.y - b.y, a.z - b.z);
}

vector vectorMultiply(vector self, double r) {
  return vectorCreate(self.x * r, self.y * r, self.z * r);
}

vector vectorDivide(vector self, double r) {
  return vectorCreate(self.x / r, self.y / r, self.z / r);
}

vector vectorXProduct(vector a, vector b) {
  return vectorCreate(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);
}

double vectorDotProduct(vector a,vector b) {
  return a.x * b.x + a.y * b.y + a.z * b.z;
}


text:
<?php
namespace LolAPI\GameConstants\TeamSide\UnknownSidePolicy;

use LolAPI\GameConstants\TeamSide\TeamSideInterface;
use LolAPI\GameConstants\TeamSide\UnknownSidePolicyInterface;

class ThrowOutOfBoundsExceptionPolicy implements UnknownSidePolicyInterface
{
    /**
     * Throws OutOfBoundsException on unknown side
     * @param int $sideId
     * @return TeamSideInterface
     */
    public function getUnknownSide($sideId)
    {
        throw new \OutOfBoundsException(sprintf("Unknown side with ID `%d`", $sideId));
    }
}


text: new Error("foo", { cause: new Error("bar") });


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/spanner/admin/database/v1/backup.proto

package com.google.spanner.admin.database.v1;

public interface CreateBackupEncryptionConfigOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateBackupEncryptionConfig)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. The encryption type of the backup.
   *

   *
   *
   * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   *
   * @return The enum numeric value on the wire for encryptionType.
   */
  int getEncryptionTypeValue();
  /**
   *
   *
   *

   * Required. The encryption type of the backup.
   *

   *
   *
   * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   *
   * @return The encryptionType.
   */
  com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType
      getEncryptionType();

  /**
   *
   *
   *

   * Optional. The Cloud KMS key that will be used to protect the backup.
   * This field should be set only when
   * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] is
   * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
   * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
   *

   *
   *
   * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The kmsKeyName.
   */
  java.lang.String getKmsKeyName();
  /**
   *
   *
   *

   * Optional. The Cloud KMS key that will be used to protect the backup.
   * This field should be set only when
   * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] is
   * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
   * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
   *

   *
   *
   * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The bytes for kmsKeyName.
   */
  com.google.protobuf.ByteString getKmsKeyNameBytes();
}


text:
module Quality
  module Tools
    # Adds 'scalastyle' tool support to quality gem
    class Scalastyle < Tool
      def scalastyle_args
        c = " -c '#{scalastyle_config}' " if scalastyle_config
        x = " -x '#{scalastyle_exclude}' " if scalastyle_exclude
        args = ''
        args += c if c
        args += x if x
        args += scala_files.join(' ')
        args
      end

      def quality_scalastyle
        ratchet_quality_cmd('scalastyle',
                            args: scalastyle_args,
                            gives_error_code_on_no_relevant_code: true,
                            gives_error_code_on_violations: true) do |line|
          if line =~ /file=/
            1
          else
            0
          end
        end
      end
    end
  end
end


text:
#include "BtSocketsEngine.h"
#include "BtSocketsRead.h"
#include "BtSocketsWrite.h"
#include "Log.h"

#define LOGPOINTER if(iLog)iLog
#include "LogMacros.h"

_LIT(KRfComm, "RFCOMM");
_LIT(KBtSocketsEngine, "BtSockEngine");
enum TBtSocketsEnginePanics {
   EDestroyedWhileDisconnecting = 0,
};

CBtSocketsEngine::CBtSocketsEngine(class MBtSocketsPeer& aPeer) :
   CActiveLog(EPriorityStandard, "BtSocketsEngine"),
   iState(ENotConnected), iPeer(aPeer)
{
}

void CBtSocketsEngine::ConstructL(const class TBTDevAddr& aAddress, TInt aPort)
{
   CActiveScheduler::Add(this);
   User::LeaveIfError(iSocketServ.Connect());

   iSocketsRead = CBtSocketsRead::NewL(iPeer, iSocket);
   iSocketsWrite = CBtSocketsWrite::NewL(iPeer, iSocket);
   UpdateLogMastersL();

   DBG("Initialized with address "PRIxBTADDR" and port %d",
       PRIxBTEXPAND(aAddress), aPort);

   iAddress.SetBTAddr(aAddress);
   iAddress.SetPort(aPort);
}

class CBtSocketsEngine* CBtSocketsEngine::NewL(class MBtSocketsPeer& aPeer,
                                               const class TBTDevAddr& aAddr,
                                               TInt aPort)
{
   class CBtSocketsEngine* self = CBtSocketsEngine::NewLC(aPeer, aAddr, aPort);
   CleanupStack::Pop(self);
   return self;
}

class CBtSocketsEngine* CBtSocketsEngine::NewLC(class MBtSocketsPeer& aPeer,
                                                const class TBTDevAddr& aAddr,
                                                TInt aPort)
{
   class CBtSocketsEngine* self = new (ELeave) CBtSocketsEngine(aPeer);
   CleanupStack::PushL(self);
   self->ConstructL(aAddr, aPort);
   return self;
}

CBtSocketsEngine::~CBtSocketsEngine()
{
   if(IsActive() && iState == EConnecting){
      DBG("Destructing while connecting");
      Cancel();
   } else if(iState == EConnected){
      DBG("Destructing while connected");
      Disconnect();
      DBG("Disconnect done");
   } else if(iState == EDisconnecting){
      DBG("Destructing while disconnecting");
      //XXX is this right?
      User::Panic(KBtSocketsEngine, EDestroyedWhileDisconnecting);
      DBG("Disconnect done");
   }
   delete iSocketsWrite;
   delete iSocketsRead;
   iSocketServ.Close();
   DBG("SocketsEngine destroyed.");
}

void CBtSocketsEngine::CancelAll()
{
   if(iState == EConnecting){
      CancelConnect();
   } else if(iState == EDisconnecting){
      CancelDisconnect();
   } else {
      Complete(KErrCancel); //should be safe....
   }
}

void CBtSocketsEngine::ConnectL(class TRequestStatus* aStatus)
{
   DBG("ConnectL");
   iState = EConnecting;
   User::LeaveIfError( iSocket.Open( iSocketServ, KRfComm ) );
   iSocket.Connect( iAddress, iStatus );
   SetActive();
   Activate(aStatus);
}

void CBtSocketsEngine::CancelConnect()
{
   if(iState == EConnecting){
      Complete(KErrCancel);
      iSocket.CancelConnect();
   } else {
      WARN("Unable to cancelconnect, not connecting");
   }
}

TBool CBtSocketsEngine::DisconnectInternal(class TRequestStatus& aStatus)
{
   DBG("Disconnect common");
   TBool ret = EFalse;
   if((ret = IsConnected())){
      iState = EDisconnecting;
      iSocketsRead->CancelRead();
      iSocketsRead->Cancel();
      iSocketsWrite->Cancel();
      iSocket.Shutdown(RSocket::EImmediate, aStatus);
   }
   DBG("Was %sconnected", ret ? "" : "not ");
   return ret;
}

void CBtSocketsEngine::Disconnect()
{
   DBG("Disconnect synchronous");
   class TRequestStatus status = KRequestPending;
   if(DisconnectInternal(status)){
      DBG("Shutdown and then waitforrrequest.");
      User::WaitForRequest(status);
      DBG("I'm done waiting!");
      iState = ENotConnected;
      iSocket.Close();
   }
}

//things get to complicated with asynchronous disconnects.
void CBtSocketsEngine::Disconnect(class TRequestStatus* aStatus)
{
   DBG("Disconnect %p", aStatus);
   TBool disconnecting = DisconnectInternal(iStatus);
   Activate(aStatus); //handles NULL pointer as NOP.
   SetActive();

   if(disconnecting){
      DBG("Set as active, will RunL when disconnected.");
   } else {
      DBG("Not connected, complete immediately with KErrNone");
      //complete self since we do not know if the caller has SetActive
      //yet.
      class TRequestStatus* status = &iStatus;
      User::RequestComplete(status, KErrNone); //XXX other status code?
   }
}

void CBtSocketsEngine::CancelDisconnect()
{
   if(iState == EDisconnecting){
      Complete(KErrCancel);
      WARN("Cancel while disconnecting. Complete request with KErrCancel, "
           "but do nothing with the socket");
   } else {
      WARN("Unable to CancelDisconnect, not disconnecting");
   }
}

void CBtSocketsEngine::WriteL(const TDesC8& aData)
{
   iSocketsWrite->IssueWriteL(aData);
}

void CBtSocketsEngine::Read()
{
   iSocketsRead->Start();
}

TBool CBtSocketsEngine::IsConnected() const
{
   return iState == EConnected;
}

void CBtSocketsEngine::DoCancel()
{
   Complete(KErrCancel);
   if(iState == EConnecting){
      DBG("DoCancel while connecting");
      iSocket.CancelConnect();
   }
   if(iState == EDisconnecting){
      DBG("DoCancel while disconnecting");
      //XXX we don't want to cancel this op, but we probably have to
      //do something.
   }
}

void CBtSocketsEngine::RunL()
{
   Complete(iStatus); //complete waiting object with same status
   if(iStatus == KErrNone){
      if(iState == EConnecting){
         DBG("Connect complete");
         iState = EConnected;
         Read();
      } else if(iState == EDisconnecting){
         DBG("Disconnect complete");
         iState = ENotConnected;
         iSocket.Close();
         DBG("SocketsReader is %sactive, SocketsWriter is %sactive",
             iSocketsRead->IsActive()  ? "" : "not ",
             iSocketsWrite->IsActive() ? "" : "not ");
      } else {
         DBG("Disconnect while not connected.");
      }
   } else {
      DBG("Op failed %d, setting state to ENotConnected", iStatus.Int());
      iState = ENotConnected;
   }
}

CArrayPtr<CActiveLog>* CBtSocketsEngine::SubLogArrayLC()
{
   CArrayPtr<CActiveLog>* logs = new (ELeave) CArrayPtrFlat<CActiveLog>(2);
   CleanupStack::PushL(logs);
   logs->AppendL(iSocketsWrite);
   logs->AppendL(iSocketsRead);
   return logs;
}


text:
var del = require('del');
var gulp = require('gulp');
var merge = require('merge-stream');
var wiredep = require('wiredep').stream;
var $ = require('gulp-load-plugins')({ lazy: true });

var client = 'client/';
var temp = './.tmp/';

var config = {
    // local files
    css: client + 'css/',
    html: client + 'index.html',
    fonts: [
        client + 'fonts/*.*',
        './bower_components/bootstrap/dist/fonts/*.*',
        './bower_components/roboto-fontface/fonts/Roboto-Bold.*',
        './bower_components/roboto-fontface/fonts/Roboto-Light.*',
        './bower_components/roboto-fontface/fonts/Roboto-Medium.*',
        './bower_components/roboto-fontface/fonts/Roboto-Regular.*'
    ],
    js: client + 'js/',
    templates: client + 'js/**/*.html',

    // local folders
    client: client,
    dist: './dist/',
    temp: temp,

    // htmlmin
    htmlmin: {
        collapseWhitespace: true
    },

    // ng-annotate
    ngAnnotate: {
        add: true,
        single_quotes: true
    },

    // angular template cache
    templateCache: {
        file: 'templates.js',
        options: {
            module: 'main',
            root: '/js/',
            standAlone: false
        }
    },

    // useref
    useref: {
        searchPath: './'
    },

    // wiredep
    wiredep: {
        ignorePath: '..',
        overrides: {
            bootstrap: {
                main: [
                    'dist/css/bootstrap.css',
                    'dist/js/bootstrap.js'
                ]
            },
            'ng-focus-if': {
                main: 'focusIf.min.js'
            },
            octicons: {
                main: [
                    'octicons/octicons.css',
                    'octicons/octicons.eot',
                    'octicons/octicons.svg',
                    'octicons/octicons.ttf',
                    'octicons/octicons.woff'
                ]
            }
        }
    }
};

var googleAnalytics = 'google-analytics.js';

// linting
config.jscs = {
    src: [
        config.js + '**/*.js',
        '!' + config.js + '**/definitions.js',
        '!' + config.js + '**/' + googleAnalytics
    ]
}

// inject
config.inject = {
    css: {
        src: config.css + '**/*.css',
        order: [
            '**/*(!main*).css',
            '**/main-xs.css'
        ]
    },
    js: {
        src: [
            config.js + '**/*.js',
            '!' + config.js + '**/' + googleAnalytics
        ],
        order: [
            '**/app.module.js',
            '**/app.config.js',
            '**/app.constants.js',
            '**/app.routes.js',
            '**/shared/*.js',
            '**/models/*.js',
            '**/services/*.js',
            '**/**/*.js'
        ],
    },
    googleAnalytics: {
        src: config.js + googleAnalytics,
        name: 'inject:analytics'
    },
    templates: {
        src: temp + config.templateCache.file,
        name: 'inject:templates'
    }
};

/**
 * Validates the styling of the client-side JavaScript.
 * @returns {Object} The stream.
 */
gulp.task('check', function() {
    return gulp
        .src(config.jscs.src)
        .pipe($.jscs())
        .pipe($.jscs.reporter());
});

/**
 * Cleans the distribution folder.
 */
gulp.task('clean', function() {
    var delConfig = [config.dist, config.temp];
    return del(delConfig);
});

/**
 * Moves all required fonts to the build folder.
 * @returns {Object} The stream.
 */
gulp.task('fonts', ['clean'], function() {
    return gulp
        .src(config.fonts)
        .pipe(gulp.dest(config.dist + 'fonts'));
});

/**
 * Injects the dependencies into the html.
 * @returns {Object} The stream.
 */
gulp.task('inject', function() {
    return gulp
        .src(config.html)
        // bower
        .pipe(wiredep(config.wiredep))
        // css and js
        .pipe($.inject(orderSrc(config.inject.css.src, config.inject.css.order)))
        .pipe($.inject(orderSrc(config.inject.js.src, config.inject.js.order)))
        .pipe(gulp.dest(config.client));
});

/**
 * Optimizes the client files for distribution.
 * @returns {Object} The stream.
 */
gulp.task('optimize', ['inject', 'template-cache'], function() {
    var assets = $.useref.assets({searchPath: ['.tmp', 'client', '.']});

    return gulp.src(config.html)
        // inject the anyltics and templates
        .pipe($.inject(gulp.src(config.inject.googleAnalytics.src), config.inject.googleAnalytics))
        .pipe($.inject(gulp.src(config.inject.templates.src), config.inject.templates))
        .pipe(assets)
        // minify js and css
        .pipe($.if('*.js', $.uglify()))
        .pipe($.if('*.css', $.cssnano()))
        // cache-bust
        .pipe($.rev())
        .pipe(assets.restore())
        .pipe($.useref())
        .pipe($.revReplace())
        // minify html
        .pipe($.if('*.html', $.htmlmin(config.htmlmin)))
        .pipe(gulp.dest(config.dist));
});

/**
 * Create $templateCache from the html templates
 * @returns {Object} The stream.
 */
gulp.task('template-cache', ['clean'], function() {
    return gulp
        .src(config.templates)
        .pipe($.htmlmin(config.htmlmin))
        .pipe($.angularTemplatecache(config.templateCache.file, config.templateCache.options))
        .pipe(gulp.dest(config.temp));
});

/**
 * Injects the CSS and JS into the HTML, and runs the server; everything is monitored.
 * @returns {Object} The stream.
 */
gulp.task('serve', ['inject'], function() {
    return $.nodemon({
        script: './bin/www',
        ignore: [
            'bower_components/**/*',
            'client/**/*',
            'gulpfile.js'
        ]
    }).on('start', function(ev) {
        gulp.watch(config.inject.js.src, function(ev) {
            if (ev.type === 'added' || ev.type === 'deleted') {
                gulp.start('inject');
            };
        });
    });
});

/**
 * Order a stream.
 * @param {Stream} src The gulp.src stream.
 * @param {Array} order Glob array pattern.
 * @returns {Stream} The ordered stream.
 */
function orderSrc(src, order) {
    return gulp
        .src(src)
        .pipe($.if(order, $.order(order)));
}

gulp.task('default', ['inject', 'serve']);
gulp.task('dist', ['clean', 'fonts', 'optimize']);


text:
package nl.gridline.zieook.inx.movielens.categories;

import java.io.IOException;

import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.mapreduce.TableReducer;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;

/**
 * [purpose]
 *

 * Project zieook-movielens

 * CategoriesImportReduce.java created Mar 24, 2011
 *

 * Copyright, all rights reserved 2011 GridLine Amsterdam
 * @author Job
 * @version $Revision:$, $Date:$
 */
public class CategoriesImportReduce extends TableReducer<Text, Put, Text>
{
	protected void reduce(Text key, Iterable<Put> values, Context context) throws IOException, InterruptedException
	{
		for (Writable value : values)
		{
			context.write(key, value);
		}
		context.progress();
	};
}