text:
package at.ac.tuwien.infosys
package amber

import scala.language.{dynamics, higherKinds, implicitConversions}

import java.util.concurrent.ConcurrentHashMap

import scala.collection.immutable.{HashMap, Seq, Set, Stream, Vector}
import scala.collection.JavaConversions._
import scala.concurrent.Future

import scalaz.Id.Id
import scalaz.std.vector._
import scalaz.syntax.monad._

import util.{Filter, Filterable, NotNothing, Type}

sealed trait Client[X[+_]] {
  this: origin.FinderComponent[X] =>

  def read[A: NotNothing : Type](query: Query): X[Seq[Origin.Value[A]]]

  class Query(val selection: Selection, val filter: Filter[Origin.MetaInfo])
      extends Filterable[Origin.MetaInfo, Query] {
    override def where(filter: Filter[Origin.MetaInfo]): Query = new Query(selection, filter)
  }

  implicit def selectionToQuery(selection: Selection): Query =
    new Query(selection, Filter.tautology)

  def readAll[A: NotNothing : Type](query: Query): X[Seq[A]] = read[A](query) map {_ map {_.value}}
  def readOne[A: NotNothing : Type](query: Query): X[Option[A]] =
    readAll[A](query) map {_.headOption}

  def readAll(definition: Entity.Definition): X[Seq[Entity.Instance]] = definition.instances()
  def readOne(definition: Entity.Definition): X[Option[Entity.Instance]] =
    readAll(definition) map {_.headOption}

  def entity(name: Entity.Name) = new Entity.Definition.Builder(name)

  object Entity {

    type Name = String

    object Field {

      type Name = String
      sealed trait Read[+A] extends ((Field.Name) => X[Seq[Value[A]]])

      implicit def readFromOption[A: util.Type](f: () => X[Option[A]]): Read[A] = new Read[A] {
        override def apply(name: Field.Name) = f() map {_.to[Stream] map (Value(name, _))}
      }
      implicit def readFromSeq[A: util.Type](f: () => X[Seq[A]]): Read[A] = new Read[A] {
        override def apply(name: Field.Name) = f() map {_.to[Stream] map (Value(name, _))}
      }

      private[Entity] class Type[+A](val name: Field.Name)(read: Read[A]) {
        def values(): X[Seq[Value[A]]] = read(name)
      }

      private[Entity] type Value[+A] = util.Value.Named[Field.Name, A]
      private[Entity] val Value = util.Value.Named

      private[Entity] object Values {
        def apply(types: Set[Type[_]]): X[Seq[Seq[Value[_]]]] =
          X.sequence(types.to[Vector] map {_.values()})
      }
    }

    class Definition private[Entity](val name: Entity.Name, val filter: Filter[Instance])
                                    (types: Set[Field.Type[_]]) {

      lazy val fields: Set[Field.Name] = types map {_.name}

      def instances(): X[Seq[Instance]] = {
        def cartesianProduct(values: X[Seq[Seq[Field.Value[_]]]]) =
          values map {_.foldRight(Seq(Vector.empty[Field.Value[_]])) {
            for {a <- _; bs <- _} yield bs :+ a
          }}

        Instances(name, cartesianProduct(Field.Values(types))) map {_ filter {filter(_)}}
      }

      override lazy val toString = name + types.mkString("(", ", " ,")")
    }

    object Definition {
      class Builder(val name: Entity.Name) extends Filterable[Instance, Unit] with Dynamic {

        private var filter: Filter[Instance] = Filter.tautology
        private val fields = new ConcurrentHashMap[Field.Name, Field.Type[_]]

        override def where(filter: Filter[Instance]) {this.filter = filter}

        def updateDynamic[A](name: String)(read: Field.Read[A]) {
          fields put (name, new Field.Type[A](name)(read))
        }

        def build(): Definition = new Definition(name, filter)(fields.values.to[Set])
      }
    }

    class Instance private[Entity](val name: Entity.Name)
                                  (values: Seq[Field.Value[_]]) extends Dynamic {

      private lazy val properties = HashMap.empty ++ (values map {v => (v.name, v)})
      lazy val fields: Set[Field.Name] = (values map {_.name}).to[Set]

      def selectDynamic(name: String): Option[Field.Value[_]] = properties.get(name)

      override lazy val toString = name + values.mkString("(", ", " ,")")
    }

    private[Entity] object Instances {
      def apply(name: Entity.Name, values: X[Seq[Seq[Field.Value[_]]]]): X[Seq[Instance]] =
        values map {_ map {new Instance(name)(_)}}
    }
  }
}

object Client {

  trait Local extends Client[Id] with origin.FinderComponent.Local {
    override def read[A: NotNothing : Type](query: Query) = for {
      origin <- origins.find(query.selection).to[Vector] if origin.returns[A]
      (value, meta) <- origin.asInstanceOf[Origin[A]].read() if query.filter(meta)
    } yield value
  }

  trait Remote extends Client[Future] with origin.FinderComponent.Remote {

    implicit protected def context = configuration.context

    override def read[A: NotNothing : Type](query: Query) =
      origins.find(query.selection) flatMap {result =>
        X.sequence(
          for {origin <- result.to[Vector] if origin.returns[A]}
            yield origin.asInstanceOf[Origin[A]].read().run
        ) map {for {r <- _; (value, meta) <- r.to[Seq] if query.filter(meta)} yield value}
      }
  }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=struct.DeleteMarkerWriter.html">

Redirecting to struct.DeleteMarkerWriter.html...


text:
This is a browserify transform which converts [RequireJS](http://requirejs.org/) `require('text!...)` calls. Use with [brfs](https://github.com/substack/brfs). The use case for this module are codebases which need to simultaneously support RequireJS and browserify.

## Usage

1. [npm install requiredetextify](https://www.npmjs.com/package/requiredetextify)
2. Run browserify transforms `requiredetextify` and `brfs`

        "browserify": {
            "transform": [
                "requiredetextify",
                "brfs"
            ]
        }


text:
package cn.dx.sunny.domain.vo.webservice;

/**
 * Created by IntelliJ IDEA.
 * User: Liu Xiongwei
 * Date: 2016/8/9
 * Time: 16:55
 * Description: 处理接口请求数据
 * To change this template use File | Settings | File Templates.
 */
public class RequestObj {

    //客户唯一认证token
    private String token;
    //加密串
    private String reqData;
    //请求时间戳
    private String timestamp;
    //验签名
    private String signature;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getReqData() {
        return reqData;
    }

    public void setReqData(String reqData) {
        this.reqData = reqData;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

}


text:
using System;
using System.Diagnostics;
using HelperSharp;

namespace GeneticSharp.Domain.Chromosomes
{
    ///
    /// A base class for chromosomes.
    ///
    [DebuggerDisplay("Fitness:{Fitness}, Genes:{Length}")]
    public abstract class ChromosomeBase : IChromosome
    {
        #region Fields
        private Gene[] m_genes;
        private int m_length;
        #endregion

        #region Constructors
        ///
        /// Initializes a new instance of the <see cref="ChromosomeBase"/> class.
        ///
        /// <param name="length">The length, in genes, of the chromosome.</param>
        protected ChromosomeBase(int length)
        {
            ValidateLength(length);

            m_length = length;
            m_genes = new Gene[length];
        }
        #endregion

        #region Properties
        ///
        /// Gets or sets the fitness of the chromosome in the current problem.
        ///
        public double? Fitness { get; set; }

        ///
        /// Gets the length, in genes, of the chromosome.
        ///
        public int Length
        {
            get
            {
                return m_length;
            }
        }
        #endregion

        #region Methods
        ///
        /// Implements the operator ==.
        ///
        /// <param name="first">The first.</param>
        /// <param name="second">The second.</param>
        /// <returns>
        /// The result of the operator.
        /// </returns>
        public static bool operator ==(ChromosomeBase first, ChromosomeBase second)
        {
            if (Object.ReferenceEquals(first, second))
            {
                return true;
            }

            if (((object)first == null) || ((object)second == null))
            {
                return false;
            }

            return first.CompareTo(second) == 0;
        }

        ///
        /// Implements the operator !=.
        ///
        /// <param name="first">The first.</param>
        /// <param name="second">The second.</param>
        /// <returns>
        /// The result of the operator.
        /// </returns>
        public static bool operator !=(ChromosomeBase first, ChromosomeBase second)
        {
            return !(first == second);
        }

        ///
        /// Implements the operator <.
        ///
        /// <param name="first">The first.</param>
        /// <param name="second">The second.</param>
        /// <returns>
        /// The result of the operator.
        /// </returns>
        public static bool operator <(ChromosomeBase first, ChromosomeBase second)
        {
            if (Object.ReferenceEquals(first, second))
            {
                return false;
            }
            else if ((object)first == null)
            {
                return true;
            }
            else if ((object)second == null)
            {
                return false;
            }

            return first.CompareTo(second) < 0;
        }

        ///
        /// Implements the operator >.
        ///
        /// <param name="first">The first.</param>
        /// <param name="second">The second.</param>
        /// <returns>
        /// The result of the operator.
        /// </returns>
        public static bool operator >(ChromosomeBase first, ChromosomeBase second)
        {
            return !(first == second) && !(first < second);
        }

        ///
        /// Generates the gene for the specified index.
        ///
        /// <param name="geneIndex">Gene index.</param>
        /// <returns>The gene generated at the specified index.</returns>
        public abstract Gene GenerateGene(int geneIndex);

        ///
        /// Creates a new chromosome using the same structure of this.
        ///
        /// <returns>The new chromosome.</returns>
        public abstract IChromosome CreateNew();

        ///
        /// Creates a clone.
        ///
        /// <returns>The chromosome clone.</returns>
        public virtual IChromosome Clone()
        {
            var clone = CreateNew();
			clone.Resize (this.Length);
            clone.ReplaceGenes(0, GetGenes());
            clone.Fitness = Fitness;

            return clone;
        }

        ///
        /// Replaces the gene in the specified index.
        ///
        /// <param name="index">The gene index to replace.</param>
        /// <param name="gene">The new gene.</param>
        /// <exception cref="System.ArgumentOutOfRangeException">index;There is no Gene on index {0} to be replaced..With(index)</exception>
        public void ReplaceGene(int index, Gene gene)
        {
            if (index < 0 || index >= m_length)
            {
                throw new ArgumentOutOfRangeException("index", "There is no Gene on index {0} to be replaced.".With(index));
            }

            m_genes[index] = gene;
            Fitness = null;
        }

        ///
        /// Replaces the genes starting in the specified index.
        ///
        /// <param name="startIndex">Start index.</param>
        /// <param name="genes">The genes.</param>
        /// <remarks>
        /// The genes to be replaced can't be greater than the available space between the start index and the end of the chromosome.
        /// </remarks>
        public void ReplaceGenes(int startIndex, Gene[] genes)
        {
            ExceptionHelper.ThrowIfNull("genes", genes);

            if (genes.Length > 0)
            {
                if (startIndex < 0 || startIndex >= m_length)
                {
                    throw new ArgumentOutOfRangeException("index", "There is no Gene on index {0} to be replaced.".With(startIndex));
                }

                var genesToBeReplacedLength = genes.Length;

                var availableSpaceLength = m_length - startIndex;

                if (genesToBeReplacedLength > availableSpaceLength)
                {
                    throw new ArgumentException(
                        "genes", "The number of genes to be replaced is greater than available space, there is {0} genes between the index {1} and the end of chromosome, but there is {2} genes to be replaced.".With(availableSpaceLength, startIndex, genesToBeReplacedLength));
                }

                Array.Copy(genes, 0, m_genes, startIndex, genes.Length);

                Fitness = null;
            }
        }

        ///
        /// Resizes the chromosome to the new length.
        ///
        /// <param name="newLength">The new length.</param>
        public void Resize(int newLength)
        {
            ValidateLength(newLength);

            Array.Resize(ref m_genes, newLength);
            m_length = newLength;
        }

        ///
        /// Gets the gene in the specified index.
        ///
        /// <param name="index">The gene index.</param>
        /// <returns>
        /// The gene.
        /// </returns>
        public Gene GetGene(int index)
        {
            return m_genes[index];
        }

        ///
        /// Gets the genes.
        ///
        /// <returns>The genes.</returns>
        public Gene[] GetGenes()
        {
            return m_genes;
        }

        ///
        /// Compares the current object with another object of the same type.
        ///
        /// <returns>The to.</returns>
        /// <param name="other">The other chromosome.</param>
        public int CompareTo(IChromosome other)
        {
            if (other == null)
            {
                return -1;
            }

            var otherFitness = other.Fitness;

            if (Fitness == otherFitness)
            {
                return 0;
            }

            // TODO: chromosomes with same fitnesss are really equals?
            return Fitness > otherFitness ? 1 : -1;
        }

        ///
        /// Determines whether the specified <see cref="System.Object"/> is equal to the current <see cref="GeneticSharp.Domain.Chromosomes.ChromosomeBase"/>.
        ///
        /// <param name="obj">The <see cref="System.Object"/> to compare with the current <see cref="GeneticSharp.Domain.Chromosomes.ChromosomeBase"/>.</param>
        /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to the current
        /// <see cref="GeneticSharp.Domain.Chromosomes.ChromosomeBase"/>; otherwise, <c>false</c>.</returns>
        public override bool Equals(object obj)
        {
            var other = obj as IChromosome;

            if (other == null)
            {
                return false;
            }

            return CompareTo(other) == 0;
        }

        ///
        /// Returns a hash code for this instance.
        ///
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            return Fitness.GetHashCode();
        }

        ///
        /// Creates the gene on specified index.
        /// <remarks>
        /// It's a shortcut to:
        ///
        /// ReplaceGene(index, GenerateGene(index));
        ///
        /// </remarks>
        ///
        /// <param name="index">The gene index.</param>
        protected virtual void CreateGene(int index)
        {
            ReplaceGene(index, GenerateGene(index));
        }

        ///
        /// Creates all genes
        /// <remarks>
        /// It's a shortcut to:
        ///
        /// for (int i = 0; i < Length; i++)
        /// {
        ///     ReplaceGene(i, GenerateGene(i));
        /// }
        ///
        /// </remarks>
        ///
        protected virtual void CreateGenes()
        {
            for (int i = 0; i < Length; i++)
            {
                ReplaceGene(i, GenerateGene(i));
            }
        }

        ///
        /// Validates the length.
        ///
        /// <param name="length">The length.</param>
        /// <exception cref="System.ArgumentException">The minimum length for a chromosome is 2 genes.</exception>
        private static void ValidateLength(int length)
        {
            if (length < 2)
            {
                throw new ArgumentException("The minimum length for a chromosome is 2 genes.");
            }
        }
        #endregion
    }
}


text:
import { IProviderSettings, SETTINGS } from '@spinnaker/core';

export interface ICloudFoundryProviderSettings extends IProviderSettings {
  defaults: {
    account?: string;
  };
}

export const CloudFoundryProviderSettings: ICloudFoundryProviderSettings = (SETTINGS.providers
  .cloudfoundry as ICloudFoundryProviderSettings) || { defaults: {} };
if (CloudFoundryProviderSettings) {
  CloudFoundryProviderSettings.resetToOriginal = SETTINGS.resetProvider('cloudfoundry');
}


text:
module Chief
  class Tbl9 < Sequel::Model(Sequel::Model.db[:chief_tbl9].order(Sequel.asc(:fe_tsmp)))
  end
end


text:
Links: [download (.tar.xz)](http://faemiyah.fi/data/pinp.tar.xz), [download (.zip)](http://faemiyah.fi/data/pinp.zip), [video](http://faemiyah.fi/data/pinp.mp4), [pouet](http://www.pouet.net/prod.php?which=13065)
Release: Assembly 2004 4k intro compo, 10th place
Release platform: Linux-ia32
Ports: FreeBSD, Linux
Authors: Juippi, Trilkk, Warma


text:
package sun.security.provider;

import java.io.*;
import java.util.Collection;
import java.util.*;
import java.security.cert.*;
import sun.security.x509.X509CertImpl;
import sun.security.x509.X509CRLImpl;
import sun.security.pkcs.PKCS7;
import sun.security.provider.certpath.X509CertPath;
import sun.security.provider.certpath.X509CertificatePair;
import sun.security.util.DerValue;
import sun.security.util.Cache;
import sun.misc.BASE64Decoder;

/**
 * This class defines a certificate factory for X.509 v3 certificates &
 * certification paths, and X.509 v2 certificate revocation lists (CRLs).
 *
 * @author Jan Luehe
 * @author Hemma Prafullchandra
 * @author Sean Mullan
 *
 *
 * @see java.security.cert.CertificateFactorySpi
 * @see java.security.cert.Certificate
 * @see java.security.cert.CertPath
 * @see java.security.cert.CRL
 * @see java.security.cert.X509Certificate
 * @see java.security.cert.X509CRL
 * @see sun.security.x509.X509CertImpl
 * @see sun.security.x509.X509CRLImpl
 */

public class X509Factory extends CertificateFactorySpi {

    public static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----";
    public static final String END_CERT = "-----END CERTIFICATE-----";

    private static final int defaultExpectedLineLength = 80;

    private static final char[] endBoundary = "-----END".toCharArray();

    private static final int ENC_MAX_LENGTH = 4096 * 1024; // 4 MB MAX

    private static final Cache certCache = Cache.newSoftMemoryCache(750);
    private static final Cache crlCache = Cache.newSoftMemoryCache(750);

    /**
     * Generates an X.509 certificate object and initializes it with
     * the data read from the input stream is.
     *
     * @param is an input stream with the certificate data.
     *
     * @return an X.509 certificate object initialized with the data
     * from the input stream.
     *
     * @exception CertificateException on parsing errors.
     */
    public Certificate engineGenerateCertificate(InputStream is)
        throws CertificateException
    {
        if (is == null) {
            // clear the caches (for debugging)
            certCache.clear();
            X509CertificatePair.clearCache();
            throw new CertificateException("Missing input stream");
        }
        try {
            if (is.markSupported() == false) {
                // consume the entire input stream
                byte[] totalBytes;
                totalBytes = getTotalBytes(new BufferedInputStream(is));
                is = new ByteArrayInputStream(totalBytes);
            }
            byte[] encoding = readSequence(is);
            if (encoding != null) {
                X509CertImpl cert = (X509CertImpl)getFromCache(certCache, encoding);
                if (cert != null) {
                    return cert;
                }
                cert = new X509CertImpl(encoding);
                addToCache(certCache, cert.getEncodedInternal(), cert);
                return cert;
            } else {
                X509CertImpl cert;
                // determine if binary or Base64 encoding. If Base64 encoding,
                // the certificate must be bounded at the beginning by
                // "-----BEGIN".
                if (isBase64(is)) {
                    // Base64
                    byte[] data = base64_to_binary(is);
                    cert = new X509CertImpl(data);
                } else {
                    // binary
                    cert = new X509CertImpl(new DerValue(is));
                }
                return intern(cert);
            }
        } catch (IOException ioe) {
            throw (CertificateException)new CertificateException
            ("Could not parse certificate: " + ioe.toString()).initCause(ioe);
        }
    }

    /**
     * Read a DER SEQUENCE from an InputStream and return the encoding.
     * If data does not represent a SEQUENCE, it uses indefinite length
     * encoding, or is longer than ENC_MAX_LENGTH, the stream is reset
     * and this method returns null.
     */
    private static byte[] readSequence(InputStream in) throws IOException {
        in.mark(ENC_MAX_LENGTH);
        byte[] b = new byte[4];
        int i = readFully(in, b, 0, b.length);
        if ((i != b.length) || (b[0] != 0x30)) { // first byte must be SEQUENCE
            in.reset();
            return null;
        }
        i = b[1] & 0xff;
        int totalLength;
        if (i < 0x80) {
            int valueLength = i;
            totalLength = valueLength + 2;
        } else if (i == 0x81) {
            int valueLength = b[2] & 0xff;
            totalLength = valueLength + 3;
        } else if (i == 0x82) {
            int valueLength = ((b[2] & 0xff) << 8) | (b[3] & 0xff);
            totalLength = valueLength + 4;
        } else { // ignore longer length forms
            in.reset();
            return null;
        }
        if (totalLength > ENC_MAX_LENGTH) {
            in.reset();
            return null;
        }
        byte[] encoding = new byte[totalLength];
        if( totalLength < b.length ) {
            in.reset();
            i = readFully(in, encoding, 0, totalLength);
            if( i != totalLength ) {
                in.reset();
                return null;
            }
        } else {
            System.arraycopy(b, 0, encoding, 0, b.length);
            int n = totalLength - b.length;
            i = readFully(in, encoding, b.length, n);
            if (i != n) {
                in.reset();
                return null;
            }
        }
        return encoding;
    }

    /**
     * Read from the stream until length bytes have been read or EOF has
     * been reached. Return the number of bytes actually read.
     */
    private static int readFully(InputStream in, byte[] buffer, int offset,
            int length) throws IOException {
        int read = 0;
        while (length > 0) {
            int n = in.read(buffer, offset, length);
            if (n <= 0) {
                break;
            }
            read += n;
            length -= n;
            offset += n;
        }
        return read;
    }

    /**
     * Return an interned X509CertImpl for the given certificate.
     * If the given X509Certificate or X509CertImpl is already present
     * in the cert cache, the cached object is returned. Otherwise,
     * if it is a X509Certificate, it is first converted to a X509CertImpl.
     * Then the X509CertImpl is added to the cache and returned.
     *
     * Note that all certificates created via generateCertificate(InputStream)
     * are already interned and this method does not need to be called.
     * It is useful for certificates that cannot be created via
     * generateCertificate() and for converting other X509Certificate
     * implementations to an X509CertImpl.
     */
    public static synchronized X509CertImpl intern(X509Certificate c)
            throws CertificateException {
        if (c == null) {
            return null;
        }
        boolean isImpl = c instanceof X509CertImpl;
        byte[] encoding;
        if (isImpl) {
            encoding = ((X509CertImpl)c).getEncodedInternal();
        } else {
            encoding = c.getEncoded();
        }
        X509CertImpl newC = (X509CertImpl)getFromCache(certCache, encoding);
        if (newC != null) {
            return newC;
        }
        if (isImpl) {
            newC = (X509CertImpl)c;
        } else {
            newC = new X509CertImpl(encoding);
            encoding = newC.getEncodedInternal();
        }
        addToCache(certCache, encoding, newC);
        return newC;
    }

    /**
     * Return an interned X509CRLImpl for the given certificate.
     * For more information, see intern(X509Certificate).
     */
    public static synchronized X509CRLImpl intern(X509CRL c)
            throws CRLException {
        if (c == null) {
            return null;
        }
        boolean isImpl = c instanceof X509CRLImpl;
        byte[] encoding;
        if (isImpl) {
            encoding = ((X509CRLImpl)c).getEncodedInternal();
        } else {
            encoding = c.getEncoded();
        }
        X509CRLImpl newC = (X509CRLImpl)getFromCache(crlCache, encoding);
        if (newC != null) {
            return newC;
        }
        if (isImpl) {
            newC = (X509CRLImpl)c;
        } else {
            newC = new X509CRLImpl(encoding);
            encoding = newC.getEncodedInternal();
        }
        addToCache(crlCache, encoding, newC);
        return newC;
    }

    /**
     * Get the X509CertImpl or X509CRLImpl from the cache.
     */
    private static synchronized Object getFromCache(Cache cache,
            byte[] encoding) {
        Object key = new Cache.EqualByteArray(encoding);
        Object value = cache.get(key);
        return value;
    }

    /**
     * Add the X509CertImpl or X509CRLImpl to the cache.
     */
    private static synchronized void addToCache(Cache cache, byte[] encoding,
            Object value) {
        if (encoding.length > ENC_MAX_LENGTH) {
            return;
        }
        Object key = new Cache.EqualByteArray(encoding);
        cache.put(key, value);
    }

    /**
     * Generates a CertPath object and initializes it with
     * the data read from the InputStream inStream. The data
     * is assumed to be in the default encoding.
     *
     * @param inStream an InputStream containing the data
     * @return a CertPath initialized with the data from the
     *   InputStream
     * @exception CertificateException if an exception occurs while decoding
     * @since 1.4
     */
    public CertPath engineGenerateCertPath(InputStream inStream)
        throws CertificateException
    {
        if (inStream == null) {
            throw new CertificateException("Missing input stream");
        }
        try {
            if (inStream.markSupported() == false) {
                // consume the entire input stream
                byte[] totalBytes;
                totalBytes = getTotalBytes(new BufferedInputStream(inStream));
                inStream = new ByteArrayInputStream(totalBytes);
            }
            // determine if binary or Base64 encoding. If Base64 encoding,
            // each certificate must be bounded at the beginning by
            // "-----BEGIN".
            if (isBase64(inStream)) {
                // Base64
                byte[] data = base64_to_binary(inStream);
                return new X509CertPath(new ByteArrayInputStream(data));
            } else {
                return new X509CertPath(inStream);
            }
        } catch (IOException ioe) {
            throw new CertificateException(ioe.getMessage());
        }
    }

    /**
     * Generates a CertPath object and initializes it with
     * the data read from the InputStream inStream. The data
     * is assumed to be in the specified encoding.
     *
     * @param inStream an InputStream containing the data
     * @param encoding the encoding used for the data
     * @return a CertPath initialized with the data from the
     *   InputStream
     * @exception CertificateException if an exception occurs while decoding or
     *   the encoding requested is not supported
     * @since 1.4
     */
    public CertPath engineGenerateCertPath(InputStream inStream,
        String encoding) throws CertificateException
    {
        if (inStream == null) {
            throw new CertificateException("Missing input stream");
        }
        try {
            if (inStream.markSupported() == false) {
                // consume the entire input stream
                byte[] totalBytes;
                totalBytes = getTotalBytes(new BufferedInputStream(inStream));
                inStream = new ByteArrayInputStream(totalBytes);
            }
            // determine if binary or Base64 encoding. If Base64 encoding,
            // each certificate must be bounded at the beginning by
            // "-----BEGIN".
            if (isBase64(inStream)) {
                // Base64
                byte[] data = base64_to_binary(inStream);
                return new X509CertPath(new ByteArrayInputStream(data), encoding);
            } else {
                return(new X509CertPath(inStream, encoding));
            }
        } catch (IOException ioe) {
            throw new CertificateException(ioe.getMessage());
        }
    }

    /**
     * Generates a CertPath object and initializes it with
     * a List of Certificates.
     *

     * The certificates supplied must be of a type supported by the
     * CertificateFactory. They will be copied out of the supplied
     * List object.
     *
     * @param certificates a List of Certificates
     * @return a CertPath initialized with the supplied list of
     *   certificates
     * @exception CertificateException if an exception occurs
     * @since 1.4
     */
    public CertPath
        engineGenerateCertPath(List<? extends Certificate> certificates)
        throws CertificateException
    {
        return(new X509CertPath(certificates));
    }

    /**
     * Returns an iteration of the CertPath encodings supported
     * by this certificate factory, with the default encoding first.
     *

     * Attempts to modify the returned Iterator via its
     * remove method result in an
     * UnsupportedOperationException.
     *
     * @return an Iterator over the names of the supported
     *         CertPath encodings (as Strings)
     * @since 1.4
     */
    public Iterator<String> engineGetCertPathEncodings() {
        return(X509CertPath.getEncodingsStatic());
    }

    /**
     * Returns a (possibly empty) collection view of X.509 certificates read
     * from the given input stream is.
     *
     * @param is the input stream with the certificates.
     *
     * @return a (possibly empty) collection view of X.509 certificate objects
     * initialized with the data from the input stream.
     *
     * @exception CertificateException on parsing errors.
     */
    public Collection<? extends java.security.cert.Certificate>
            engineGenerateCertificates(InputStream is)
            throws CertificateException {
        if (is == null) {
            throw new CertificateException("Missing input stream");
        }
        try {
            if (is.markSupported() == false) {
                // consume the entire input stream
                is = new ByteArrayInputStream
                     (getTotalBytes(new BufferedInputStream(is)));
            }
            return parseX509orPKCS7Cert(is);
        } catch (IOException ioe) {
            throw new CertificateException(ioe);
        }
    }

    /**
     * Generates an X.509 certificate revocation list (CRL) object and
     * initializes it with the data read from the given input stream
     * is.
     *
     * @param is an input stream with the CRL data.
     *
     * @return an X.509 CRL object initialized with the data
     * from the input stream.
     *
     * @exception CRLException on parsing errors.
     */
    public CRL engineGenerateCRL(InputStream is)
        throws CRLException
    {
        if (is == null) {
            // clear the cache (for debugging)
            crlCache.clear();
            throw new CRLException("Missing input stream");
        }
        try {
            if (is.markSupported() == false) {
                // consume the entire input stream
                byte[] totalBytes;
                totalBytes = getTotalBytes(new BufferedInputStream(is));
                is = new ByteArrayInputStream(totalBytes);
            }
            byte[] encoding = readSequence(is);
            if (encoding != null) {
                X509CRLImpl crl = (X509CRLImpl)getFromCache(crlCache, encoding);
                if (crl != null) {
                    return crl;
                }
                crl = new X509CRLImpl(encoding);
                addToCache(crlCache, crl.getEncodedInternal(), crl);
                return crl;
            } else {
                X509CRLImpl crl;
                // determine if binary or Base64 encoding. If Base64 encoding,
                // the CRL must be bounded at the beginning by
                // "-----BEGIN".
                if (isBase64(is)) {
                    // Base64
                    byte[] data = base64_to_binary(is);
                    crl = new X509CRLImpl(data);
                } else {
                    // binary
                    crl = new X509CRLImpl(new DerValue(is));
                }
                return intern(crl);
            }
        } catch (IOException ioe) {
            throw new CRLException(ioe.getMessage());
        }
    }

    /**
     * Returns a (possibly empty) collection view of X.509 CRLs read
     * from the given input stream is.
     *
     * @param is the input stream with the CRLs.
     *
     * @return a (possibly empty) collection view of X.509 CRL objects
     * initialized with the data from the input stream.
     *
     * @exception CRLException on parsing errors.
     */
    public Collection<? extends java.security.cert.CRL> engineGenerateCRLs(InputStream
is)
        throws CRLException
    {
        if (is == null) {
            throw new CRLException("Missing input stream");
        }
        try {
            if (is.markSupported() == false) {
                // consume the entire input stream
                is = new ByteArrayInputStream
                    (getTotalBytes(new BufferedInputStream(is)));
            }
            return parseX509orPKCS7CRL(is);
        } catch (IOException ioe) {
            throw new CRLException(ioe.getMessage());
        }
    }

    /*
     * Parses the data in the given input stream as a sequence of DER
     * encoded X.509 certificates (in binary or base 64 encoded format) OR
     * as a single PKCS#7 encoded blob (in binary or base64 encoded format).
     */
    private Collection<? extends java.security.cert.Certificate>
        parseX509orPKCS7Cert(InputStream is)
        throws CertificateException, IOException
    {
        Collection<X509CertImpl> coll = new ArrayList<X509CertImpl>();
        boolean first = true;
        while (is.available() != 0) {
            // determine if binary or Base64 encoding. If Base64 encoding,
            // each certificate must be bounded at the beginning by
            // "-----BEGIN".
            InputStream is2 = is;
            if (isBase64(is2)) {
                // Base64
                is2 = new ByteArrayInputStream(base64_to_binary(is2));
            }
            if (first)
                is2.mark(is2.available());
            try {
                // treat as X.509 cert
                coll.add(intern(new X509CertImpl(new DerValue(is2))));
            } catch (CertificateException e) {
                Throwable cause = e.getCause();
                // only treat as PKCS#7 if this is the first cert parsed
                // and the root cause of the decoding failure is an IOException
                if (first && cause != null && (cause instanceof IOException)) {
                    // treat as PKCS#7
                    is2.reset();
                    PKCS7 pkcs7 = new PKCS7(is2);
                    X509Certificate[] certs = pkcs7.getCertificates();
                    // certs are optional in PKCS #7
                    if (certs != null) {
                        return Arrays.asList(certs);
                    } else {
                        // no certs provided
                        return new ArrayList<X509Certificate>(0);
                    }
                } else {
                    throw e;
                }
            }
            first = false;
        }
        return coll;
    }

    /*
     * Parses the data in the given input stream as a sequence of DER encoded
     * X.509 CRLs (in binary or base 64 encoded format) OR as a single PKCS#7
     * encoded blob (in binary or base 64 encoded format).
     */
    private Collection<? extends java.security.cert.CRL>
        parseX509orPKCS7CRL(InputStream is)
        throws CRLException, IOException
    {
        Collection<X509CRLImpl> coll = new ArrayList<X509CRLImpl>();
        boolean first = true;
        while (is.available() != 0) {
            // determine if binary or Base64 encoding. If Base64 encoding,
            // the CRL must be bounded at the beginning by
            // "-----BEGIN".
            InputStream is2 = is;
            if (isBase64(is)) {
                // Base64
                is2 = new ByteArrayInputStream(base64_to_binary(is2));
            }
            if (first)
                is2.mark(is2.available());
            try {
                // treat as X.509 CRL
                coll.add(new X509CRLImpl(is2));
            } catch (CRLException e) {
                // only treat as PKCS#7 if this is the first CRL parsed
                if (first) {
                    is2.reset();
                    PKCS7 pkcs7 = new PKCS7(is2);
                    X509CRL[] crls = pkcs7.getCRLs();
                    // CRLs are optional in PKCS #7
                    if (crls != null) {
                        return Arrays.asList(crls);
                    } else {
                        // no crls provided
                        return new ArrayList<X509CRL>(0);
                    }
                }
            }
            first = false;
        }
        return coll;
    }

    /*
     * Converts a Base64-encoded X.509 certificate or X.509 CRL or PKCS#7 data
     * to binary encoding.
     * In all cases, the data must be bounded at the beginning by
     * "-----BEGIN", and must be bounded at the end by "-----END".
     */
    private byte[] base64_to_binary(InputStream is)
        throws IOException
    {
        long len = 0; // total length of base64 encoding, including boundaries

        is.mark(is.available());

        BufferedInputStream bufin = new BufferedInputStream(is);
        BufferedReader br =
            new BufferedReader(new InputStreamReader(bufin, "ASCII"));

        // First read all of the data that is found between
        // the "-----BEGIN" and "-----END" boundaries into a buffer.
        String temp;
        if ((temp=readLine(br))==null || !temp.startsWith("-----BEGIN")) {
            throw new IOException("Unsupported encoding");
        } else {
            len += temp.length();
        }
        StringBuffer strBuf = new StringBuffer();
        while ((temp=readLine(br))!=null && !temp.startsWith("-----END")) {
            strBuf.append(temp);
        }
        if (temp == null) {
            throw new IOException("Unsupported encoding");
        } else {
            len += temp.length();
        }

        // consume only as much as was needed
        len += strBuf.length();
        is.reset();
        is.skip(len);

        // Now, that data is supposed to be a single X.509 certificate or
        // X.509 CRL or PKCS#7 formatted data... Base64 encoded.
        // Decode into binary and return the result.
        BASE64Decoder decoder = new BASE64Decoder();
        return decoder.decodeBuffer(strBuf.toString());
    }

    /*
     * Reads the entire input stream into a byte array.
     */
    private byte[] getTotalBytes(InputStream is) throws IOException {
        byte[] buffer = new byte[8192];
        ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
        int n;
        baos.reset();
        while ((n = is.read(buffer, 0, buffer.length)) != -1) {
            baos.write(buffer, 0, n);
        }
        return baos.toByteArray();
    }

    /*
     * Determines if input is binary or Base64 encoded.
     */
    private boolean isBase64(InputStream is) throws IOException {
        if (is.available() >= 10) {
            is.mark(10);
            int c1 = is.read();
            int c2 = is.read();
            int c3 = is.read();
            int c4 = is.read();
            int c5 = is.read();
            int c6 = is.read();
            int c7 = is.read();
            int c8 = is.read();
            int c9 = is.read();
            int c10 = is.read();
            is.reset();
            if (c1 == '-' && c2 == '-' && c3 == '-' && c4 == '-'
                && c5 == '-' && c6 == 'B' && c7 == 'E' && c8 == 'G'
                && c9 == 'I' && c10 == 'N') {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }

    /*
     * Read a line of text.  A line is considered to be terminated by any one
     * of a line feed ('\n'), a carriage return ('\r'), a carriage return
     * followed immediately by a linefeed, or an end-of-certificate marker.
     *
     * @return     A String containing the contents of the line, including
     *             any line-termination characters, or null if the end of the
     *             stream has been reached.
     */
    private String readLine(BufferedReader br) throws IOException {
        int c;
        int i = 0;
        boolean isMatch = true;
        boolean matched = false;
        StringBuffer sb = new StringBuffer(defaultExpectedLineLength);
        do {
            c = br.read();
            if (isMatch && (i < endBoundary.length)) {
                isMatch = ((char)c != endBoundary[i++]) ? false : true;
            }
            if (!matched)
                matched = (isMatch && (i == endBoundary.length));
            sb.append((char)c);
        } while ((c != -1) && (c != '\n') && (c != '\r'));

        if (!matched && c == -1) {
            return null;
        }
        if (c == '\r') {
            br.mark(1);
            int c2 = br.read();
            if (c2 == '\n') {
                sb.append((char)c);
            } else {
                br.reset();
            }
        }
        return sb.toString();
    }
}


text:
#ifndef __ASM_CRIS_PROCESSOR_H
#define __ASM_CRIS_PROCESSOR_H

#include <asm/page.h>
#include <asm/ptrace.h>
#include <arch/processor.h>
#include <arch/system.h>

struct task_struct;

#define STACK_TOP	TASK_SIZE
#define STACK_TOP_MAX	STACK_TOP

/* This decides where the kernel will search for a free chunk of vm
 * space during mmap's.
 */
#define TASK_UNMAPPED_BASE      (PAGE_ALIGN(TASK_SIZE / 3))

/* THREAD_SIZE is the size of the thread_info/kernel_stack combo.
 * normally, the stack is found by doing something like p + THREAD_SIZE
 * in CRIS, a page is 8192 bytes, which seems like a sane size
 */
#define THREAD_SIZE       PAGE_SIZE
#define THREAD_SIZE_ORDER (0)

/*
 * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack.
 * This macro allows us to find those regs for a task.
 * Notice that subsequent pt_regs stackings, like recursive interrupts occurring while
 * we're in the kernel, won't affect this - only the first user->kernel transition
 * registers are reached by this.
 */

#define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE)) - 1)

/*
 * Dito but for the currently running task
 */

#define task_pt_regs(task) user_regs(task_thread_info(task))

unsigned long get_wchan(struct task_struct *p);

#define KSTK_ESP(tsk)   ((tsk) == current ? rdusp() : (tsk)->thread.usp)

extern unsigned long thread_saved_pc(struct task_struct *tsk);

/* Free all resources held by a thread. */
static inline void release_thread(struct task_struct *dead_task)
{
        /* Nothing needs to be done.  */
}

#define init_stack      (init_thread_union.stack)

#define cpu_relax()     barrier()

void default_idle(void);

#endif /* __ASM_CRIS_PROCESSOR_H */


text:
#include <aws/chime/model/CreateAppInstanceUserRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Chime::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

CreateAppInstanceUserRequest::CreateAppInstanceUserRequest() :
    m_appInstanceArnHasBeenSet(false),
    m_appInstanceUserIdHasBeenSet(false),
    m_nameHasBeenSet(false),
    m_metadataHasBeenSet(false),
    m_clientRequestToken(Aws::Utils::UUID::RandomUUID()),
    m_clientRequestTokenHasBeenSet(true),
    m_tagsHasBeenSet(false)
{
}

Aws::String CreateAppInstanceUserRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_appInstanceArnHasBeenSet)
  {
   payload.WithString("AppInstanceArn", m_appInstanceArn);

  }

  if(m_appInstanceUserIdHasBeenSet)
  {
   payload.WithString("AppInstanceUserId", m_appInstanceUserId);

  }

  if(m_nameHasBeenSet)
  {
   payload.WithString("Name", m_name);

  }

  if(m_metadataHasBeenSet)
  {
   payload.WithString("Metadata", m_metadata);

  }

  if(m_clientRequestTokenHasBeenSet)
  {
   payload.WithString("ClientRequestToken", m_clientRequestToken);

  }

  if(m_tagsHasBeenSet)
  {
   Aws::Utils::Array<JsonValue> tagsJsonList(m_tags.size());
   for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
   {
     tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
   }
   payload.WithArray("Tags", std::move(tagsJsonList));

  }

  return payload.View().WriteReadable();
}


text:
@implementation RequestUserData

@end

@implementation JMASIHTTPRequest

@end


text:
<?php

$language = array(
    'lang_logout' => 'logout',
    'lang_edit_title' => 'Edit',
    'lang_interpreters_title' => 'Interpreters',
    'lang_events_title' => 'Events',
    'lang_firstname_title' => 'Name',

);


text:
namespace views {

namespace {

const int64 kTimeBeforeClearingMS = 1000;

void ConvertRectToScreen(const views::View* src, gfx::Rect* r) {
  DCHECK(src);

  gfx::Point new_origin = r->origin();
  views::View::ConvertPointToScreen(src, &new_origin);
  r->set_origin(new_origin);
}

}  // namespace

PrefixSelector::PrefixSelector(PrefixDelegate* delegate)
    : prefix_delegate_(delegate) {
}

PrefixSelector::~PrefixSelector() {
}

void PrefixSelector::OnViewBlur() {
  ClearText();
}

void PrefixSelector::SetCompositionText(
    const ui::CompositionText& composition) {
}

void PrefixSelector::ConfirmCompositionText() {
}

void PrefixSelector::ClearCompositionText() {
}

void PrefixSelector::InsertText(const base::string16& text) {
  OnTextInput(text);
}

void PrefixSelector::InsertChar(base::char16 ch, int flags) {
  OnTextInput(base::string16(1, ch));
}

gfx::NativeWindow PrefixSelector::GetAttachedWindow() const {
  return prefix_delegate_->GetWidget()->GetNativeWindow();
}

ui::TextInputType PrefixSelector::GetTextInputType() const {
  return ui::TEXT_INPUT_TYPE_TEXT;
}

ui::TextInputMode PrefixSelector::GetTextInputMode() const {
  return ui::TEXT_INPUT_MODE_DEFAULT;
}

int PrefixSelector::GetTextInputFlags() const {
  return 0;
}

bool PrefixSelector::CanComposeInline() const {
  return false;
}

gfx::Rect PrefixSelector::GetCaretBounds() const {
  gfx::Rect rect(prefix_delegate_->GetVisibleBounds().origin(), gfx::Size());
  // TextInputClient::GetCaretBounds is expected to return a value in screen
  // coordinates.
  ConvertRectToScreen(prefix_delegate_, &rect);
  return rect;
}

bool PrefixSelector::GetCompositionCharacterBounds(uint32 index,
                                                   gfx::Rect* rect) const {
  // TextInputClient::GetCompositionCharacterBounds is expected to fill |rect|
  // in screen coordinates and GetCaretBounds returns screen coordinates.
  *rect = GetCaretBounds();
  return false;
}

bool PrefixSelector::HasCompositionText() const {
  return false;
}

bool PrefixSelector::GetTextRange(gfx::Range* range) const {
  *range = gfx::Range();
  return false;
}

bool PrefixSelector::GetCompositionTextRange(gfx::Range* range) const {
  *range = gfx::Range();
  return false;
}

bool PrefixSelector::GetSelectionRange(gfx::Range* range) const {
  *range = gfx::Range();
  return false;
}

bool PrefixSelector::SetSelectionRange(const gfx::Range& range) {
  return false;
}

bool PrefixSelector::DeleteRange(const gfx::Range& range) {
  return false;
}

bool PrefixSelector::GetTextFromRange(const gfx::Range& range,
                                        base::string16* text) const {
  return false;
}

void PrefixSelector::OnInputMethodChanged() {
  ClearText();
}

bool PrefixSelector::ChangeTextDirectionAndLayoutAlignment(
    base::i18n::TextDirection direction) {
  return true;
}

void PrefixSelector::ExtendSelectionAndDelete(size_t before, size_t after) {
}

void PrefixSelector::EnsureCaretInRect(const gfx::Rect& rect) {
}

void PrefixSelector::OnCandidateWindowShown() {
}

void PrefixSelector::OnCandidateWindowUpdated() {
}

void PrefixSelector::OnCandidateWindowHidden() {
}

bool PrefixSelector::IsEditingCommandEnabled(int command_id) {
  return false;
}

void PrefixSelector::ExecuteEditingCommand(int command_id) {
}

void PrefixSelector::OnTextInput(const base::string16& text) {
  // Small hack to filter out 'tab' and 'enter' input, as the expectation is
  // that they are control characters and will not affect the currently-active
  // prefix.
  if (text.length() == 1 &&
      (text[0] == L'\t' || text[0] == L'\r' || text[0] == L'\n'))
    return;

  const int row_count = prefix_delegate_->GetRowCount();
  if (row_count == 0)
    return;

  // Search for |text| if it has been a while since the user typed, otherwise
  // append |text| to |current_text_| and search for that. If it has been a
  // while search after the current row, otherwise search starting from the
  // current row.
  int row = std::max(0, prefix_delegate_->GetSelectedRow());
  const base::TimeTicks now(base::TimeTicks::Now());
  if ((now - time_of_last_key_).InMilliseconds() < kTimeBeforeClearingMS) {
    current_text_ += text;
  } else {
    current_text_ = text;
    if (prefix_delegate_->GetSelectedRow() >= 0)
      row = (row + 1) % row_count;
  }
  time_of_last_key_ = now;

  const int start_row = row;
  const base::string16 lower_text(base::i18n::ToLower(current_text_));
  do {
    if (TextAtRowMatchesText(row, lower_text)) {
      prefix_delegate_->SetSelectedRow(row);
      return;
    }
    row = (row + 1) % row_count;
  } while (row != start_row);
}

bool PrefixSelector::TextAtRowMatchesText(int row,
                                          const base::string16& lower_text) {
  const base::string16 model_text(
      base::i18n::ToLower(prefix_delegate_->GetTextForRow(row)));
  return (model_text.size() >= lower_text.size()) &&
      (model_text.compare(0, lower_text.size(), lower_text) == 0);
}

void PrefixSelector::ClearText() {
  current_text_.clear();
  time_of_last_key_ = base::TimeTicks();
}

}  // namespace views


text:
common = require "pipelines/common"
ctx = { pipeline = this, main_framebuffer = "forward" }
do_gamma_mapping = true

local DEFAULT_RENDER_MASK = 1
local TRANSPARENT_RENDER_MASK = 2
local WATER_RENDER_MASK = 4
local FUR_RENDER_MASK = 8
local ALL_RENDER_MASK = DEFAULT_RENDER_MASK + TRANSPARENT_RENDER_MASK + WATER_RENDER_MASK + FUR_RENDER_MASK
local render_fur = true

addFramebuffer(this, "forward", {
	width = 1024,
	height = 1024,
	size_ratio = {1, 1},
	renderbuffers = {
		{ format = "rgba8" },
		{ format = "depth24stencil8" }
	}
})

addFramebuffer(this, "g_buffer", {
	width = 1024,
	height = 1024,
	screen_size = true,
	renderbuffers = {
		{ format = "rgba8" },
		{ format = "rgba8" },
		{ format = "rgba8" },
		{ format = "depth24stencil8" }
	}
})

common.init(ctx)
common.initShadowmap(ctx)

local texture_uniform = createUniform(this, "u_texture")
local screen_space_material = Engine.loadResource(g_engine, "pipelines/screenspace/screenspace.mat", "material")
local gbuffer0_uniform = createUniform(this, "u_gbuffer0")
local gbuffer1_uniform = createUniform(this, "u_gbuffer1")
local gbuffer2_uniform = createUniform(this, "u_gbuffer2")
local gbuffer_depth_uniform = createUniform(this, "u_gbuffer_depth")
local deferred_material = Engine.loadResource(g_engine, "pipelines/pbr/pbr.mat", "material")
local pbr_local_light_material = Engine.loadResource(g_engine, "pipelines/common/pbrlocallight.mat", "material")
local gamma_mapping_material = Engine.loadResource(g_engine, "pipelines/common/gamma_mapping.mat", "material")
local irradiance_map_uniform = createUniform(this, "u_irradiance_map")
local radiance_map_uniform = createUniform(this, "u_radiance_map")

function ingameGUI()
	newView(this, "ingame_gui")
		setPass(this, "MAIN")
		setFramebuffer(this, "default")
		clear(this, CLEAR_DEPTH, 0x303030ff)
		renderIngameGUI(this)
end

function deferred(camera_slot)
	deferred_view = newView(this, "deferred", DEFAULT_RENDER_MASK)
		setPass(this, "DEFERRED")
		setFramebuffer(this, "g_buffer")
		applyCamera(this, camera_slot)
		clear(this, CLEAR_ALL, 0x00000000)

		setStencil(this, STENCIL_OP_PASS_Z_REPLACE
			| STENCIL_OP_FAIL_Z_KEEP
			| STENCIL_OP_FAIL_S_KEEP
			| STENCIL_TEST_ALWAYS)
		setStencilRMask(this, 0xff)
		setStencilRef(this, 1)

	newView(this, "copyRenderbuffer");
		copyRenderbuffer(this, "g_buffer", 3, ctx.main_framebuffer, 1)

	newView(this, "decals")
		setPass(this, "DEFERRED")
		disableDepthWrite(this)
		setFramebuffer(this, "g_buffer")
		applyCamera(this, camera_slot)
		bindFramebufferTexture(this, ctx.main_framebuffer, 1, gbuffer_depth_uniform)
		renderDecalsVolumes(this)

	newView(this, "main")
		setPass(this, "MAIN")
		setFramebuffer(this, ctx.main_framebuffer)
		applyCamera(this, camera_slot)
		clear(this, CLEAR_COLOR | CLEAR_DEPTH, 0x00000000)

		setActiveGlobalLightUniforms(this)
		bindFramebufferTexture(this, "g_buffer", 0, gbuffer0_uniform)
		bindFramebufferTexture(this, "g_buffer", 1, gbuffer1_uniform)
		bindFramebufferTexture(this, "g_buffer", 2, gbuffer2_uniform)
		bindFramebufferTexture(this, "g_buffer", 3, gbuffer_depth_uniform)
		bindEnvironmentMaps(this, irradiance_map_uniform, radiance_map_uniform)
		drawQuad(this, 0, 0, 1, 1, deferred_material)

	newView(this, "deferred_debug_shapes")
		setPass(this, "EDITOR")
		setFramebuffer(this, ctx.main_framebuffer)
		applyCamera(this, camera_slot)
		setStencil(this, STENCIL_OP_PASS_Z_REPLACE
			| STENCIL_OP_FAIL_Z_KEEP
			| STENCIL_OP_FAIL_S_KEEP
			| STENCIL_TEST_ALWAYS)
		setStencilRMask(this, 0xff)
		setStencilRef(this, 1)
		renderDebugShapes(this)

	newView(this, "deferred_local_light")
		setPass(this, "MAIN")
		setFramebuffer(this, ctx.main_framebuffer)
		disableDepthWrite(this)
		enableBlending(this, "add")
		applyCamera(this, camera_slot)
		bindFramebufferTexture(this, "g_buffer", 0, gbuffer0_uniform)
		bindFramebufferTexture(this, "g_buffer", 1, gbuffer1_uniform)
		bindFramebufferTexture(this, "g_buffer", 2, gbuffer2_uniform)
		bindFramebufferTexture(this, "g_buffer", 3, gbuffer_depth_uniform)
		renderLightVolumes(this, pbr_local_light_material)
		disableBlending(this)

end

function water()
	water_view = newView(this, "WATER", WATER_RENDER_MASK)
		setPass(this, "MAIN")
		setFramebuffer(this, ctx.main_framebuffer)
		disableDepthWrite(this)
		applyCamera(this, "main")
		setActiveGlobalLightUniforms(this)
		bindFramebufferTexture(this, "g_buffer", 0, gbuffer0_uniform) -- refraction
		bindFramebufferTexture(this, "g_buffer", 1, gbuffer1_uniform)
		bindFramebufferTexture(this, "g_buffer", 2, gbuffer2_uniform)
		bindFramebufferTexture(this, "g_buffer", 3, gbuffer_depth_uniform) -- depth
		bindEnvironmentMaps(this, irradiance_map_uniform, radiance_map_uniform)
end

function fur()
	if not render_fur then return end
	fur_view = newView(this, "FUR", FUR_RENDER_MASK)
		setPass(this, "FUR")
		setFramebuffer(this, ctx.main_framebuffer)
		disableDepthWrite(this)
		enableBlending(this, "alpha")
		applyCamera(this, "main")
		setActiveGlobalLightUniforms(this)
		bindEnvironmentMaps(this, irradiance_map_uniform, radiance_map_uniform)
end

function pointLight()
	newView(this, "POINT_LIGHT")
		setPass(this, "POINT_LIGHT")
		setFramebuffer(this, ctx.main_framebuffer)
		disableDepthWrite(this)
		enableBlending(this, "add")
		applyCamera(this, "main")
		renderPointLightLitGeometry(this)
end

function render()
	common.shadowmap(ctx, "main", DEFAULT_RENDER_MASK)
	deferred("main")
	common.particles(ctx, "main")

	doPostprocess(this, _ENV, "pre_transparent", "main")

	water()
	fur()

	renderModels(this, ALL_RENDER_MASK)

	doPostprocess(this, _ENV, "main", "main")

	if do_gamma_mapping then
		newView(this, "SRGB")
			clear(this, CLEAR_ALL, 0x00000000)
			setPass(this, "MAIN")
			setFramebuffer(this, "default")
			bindFramebufferTexture(this, "forward", 0, texture_uniform)
			drawQuad(this, 0, 0, 1, 1, gamma_mapping_material)
	end
	ingameGUI()

end


text:
import redis from 'redis'
import redisWrapper from 'redis-conn-wrapper'
import { redis as redisConfig } from '../../config/server.config'

let { ip, port } = redisConfig
let client = redis.createClient(port, ip, {})
let wrapper = redisWrapper(redis, {
  host: ip,
  port,
})

client
  .on('ready', () => {
    console.log('redis connected successfully.')
  })
  .on('reconnecting', () => {
    console.log('redis reconnecting...')
  })
  .on('error', (err) => {
    console.error(`redis connect error:${err}`)
  })

export const longConnection = client
export const tempConnection = wrapper


text:
General architecture
===

Although Diffx is primarily designed for XML, you can use it to find differences or generate the shortest edit script
between list of any type.

To analyse the differences between two sources, Diffx does the following:

1. A `Loader` converts the sources (files, strings, objects, DOM, etc...) into a list of tokens.
2. An `Algorithm` takes two lists of tokens and reports differences and matches to the `Handler`
3. A `Handler` converts the result into the desired output, possibly transforming it in the process

A `Processor` has several built-in options to co

Loaders
---

Diffx provides several loaders for XML depending on your source:

- The `DOMLoader` converts the a DOM `Document` or `Node` object into a sequence
- The `SAXLoader` uses a SAX stream of events.
- The `XMLEventLoader` and `XMLStreamLoaders` is based on Stax.
- The `LineLoader` converts a document into lines.

When loading directly from a file or reader, the SAX and Stream loaders provides the best performance.

Loaders can split text nodes in a number of ways which will result in different sequences.

### Text granularity

The text granularity lets you choose how the

1. *Text*: text nodes are left untouched
2. *Punctuation*: text nodes are split by punctuation marks (`,`, `;`, `.`, `?`, `!`)
3. *SpaceWord* (default): A space followed by a word, this is the most efficient way to report differences at word level
4. *Word*: split text nodes into spaces and words, this is a bit more precise when SpaceWord but requires twice the amount of tokens
5. *Character*: create a token per character, this provides the highest level of precision but does not scale well.

Algorithms
---

Algorithms solve the shortest edit script (SES) for transforming A into B. Most algorithm implementations do so by
solving the equivalent Longest Common Subsequence (LCS) problem.

Generic algorithms report matches and differences (insertions or deletions) on any type of token by only checking
equality between tokens. There may be multiple possible LCS, but only one of them is reported.

XML-specific algorithms solve the SES problem taking into account XML specifics to ensure that the tokens are returned
as a well-formed XML sequence. XML-specific implementations only accept `XMLToken` implementations.

### XML-specific algorithms

In many situations, the XML-LCS is also a generic-LCS in which case producing the XML subsequence is simply an ordering
problem. However, in some case the generic algorithm is unable to produce an acceptable solution.

Consider the following example:

> A: `<p>A <b>black cat</b></p>`
>
> B: `<p>A <b>black</b> <b>cat</b></p>`

The generic algorithm will produce the following solution with only two differences:

> `<p><b>black``</b>` `<b>``cat</b></p>`

But this cannot be used to produce a well-formed sequence.
A correct solution would have at least 4 differences:

> `<p><b>black`` cat``</b>` `<b>cat</b>``</p>`

### Namespace handling

To simplify namespace handling, diffx computes a global namespace context used by both sequences and only considers the
namespace URI for comparison. In most cases, the prefix does not matter and the same prefix mapping is used for both
sequences.

By computing a namespace context, diffx can generate an XML output that uses the same namespace prefixes used in the
input sequences.

### Implementations

Diffx provides multiple implementations of generic and XML-specific algorithm.
Each implementation has different performance properties.

See [algorithms](algorithms.md) for details.

Tokens
---

From version 0.9, Diffx generic algorithms can report differences between any list of object as long as they implement
efficient `hashCode` and `equals` methods. So they can be used on lists of `String` directly.

Diffx does provide efficient token implementations for XML.

Handlers
---

Handlers provide simple callback method `handle(Operator, Token)` and can be used to generate an output or manipulate the
results.

See [Diff outputs](output.md)

### `CoalescingFilter`

When the several consecutive `TextToken` are found, the coalescing filter lets you report this as a single change
by merging them into a single token.

This filter also address issues when a insertions and deletions are interspersed but could be
lumped together if they were reordered.

For example:

> A beautiful pretty grey white cat

Into

> A beautiful grey pretty white cat

### `PostXMLFixer`

This filter attempts to fix sequences that would produce incorrect XML by reordering tokens based on whether they are
inserted, deleted or matching both sequences.

As a side effect, it also reorders tokens that have been inserted or deleted to be grouped together.

Only ordering issues can be fixed, that is when the XML-LCS matches the generic LCS.
It can correct:
- when an inserted or delete attribute is reported after a text token
- when end element tokens are not reported in the same order as the start token.

The post XML fixer can detect when the it is unable to produce a valid sequence.

Processors
---

Processors have built-in filters and common options to process the differences.

### Optimistic processor

When changes occur mostly in text nodes, the generic LCS is usually identical to the XML-LCS.

Since generic algorithms tend to return the same results as XML-specific more efficiently, the optimistic
processor attempts to process XML using the fastest generic algorithm. If it is unable to produce a well-formed
XML sequence, it falls back on an XML-specific implementation.


text:
from django.db import models

class Notes(models.Model):
    """Model to save our note"""
    title   = models.CharField(max_length=255)
    content = models.TextField()
    #automatically add timestamps when object is created
    added_at = models.DateTimeField(auto_now_add=True)
    #automatically add timestamps when object is updated
    last_update = models.DateTimeField(auto_now=True) #


text:
package com.teknonsys.twilio.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.teknonsys.twilio.client.Connection;

public class IncomingConnectionEvent extends GwtEvent<IncomingConnectionHandler>
  {
  private final Connection connection;
  public IncomingConnectionEvent(Connection connection) {this.connection=connection;}
  public Connection getConnection() {return connection;}

  private static GwtEvent.Type<IncomingConnectionHandler> TYPE;
  public static GwtEvent.Type<IncomingConnectionHandler> getType()
    {
    if(TYPE==null)
      TYPE=new GwtEvent.Type<IncomingConnectionHandler>();
    return TYPE;
    }

  public @Override GwtEvent.Type<IncomingConnectionHandler> getAssociatedType()
    {return TYPE;}
  public @Override void dispatch(IncomingConnectionHandler handler)
    {handler.onIncomingConnection(this);}
  }


text:
package io.spotnext.core.infrastructure.aspect;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.aop.TargetClassAware;
import org.springframework.stereotype.Service;

//import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.spotnext.core.infrastructure.annotation.logging.Log;
import io.spotnext.core.infrastructure.support.Logger;
import io.spotnext.core.infrastructure.support.spring.PostConstructor;

/**
 * Annotation-based aspect that logs method execution.
 *
 * @author mojo2012
 * @version 1.0
 * @since 1.0
 */
@Aspect
@Service
public class LogAspect extends AbstractBaseAspect implements PostConstructor {

	static final FastDateFormat DATEFORMAT = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");

	/**
	 * The spring init method
	 */
	@Override
	public void setup() {
		Logger.debug("Initialized logging aspect.");
	}

	/**
	 * Define the pointcut for all methods that are annotated with {@link io.spotnext.infrastructure.annotation.Logger.Log}.
	 */
	@Pointcut("@annotation(io.spotnext.core.infrastructure.annotation.logging.Log) && execution(* *.*(..))")
	final protected void logAnnotation() {
	};

	/**
	 * @param joinPoint a {@link ProceedingJoinPoint} object.
	 * @return the return value of the intercepted method
	 * @throws java.lang.Throwable in case there is any error
	 */
	@Around("logAnnotation()")
	public Object logAround(final ProceedingJoinPoint joinPoint) throws Throwable {
		final Log ann = getAnnotation(joinPoint, Log.class);

		Class<?> targetClass = getRealClass(joinPoint.getTarget());

		if (ann != null && ann.before() && StringUtils.isNotBlank(ann.message())) {
			Logger.log(ann.logLevel(),
					createLogMessage(joinPoint, "Before", ann.message(), targetClass, ann.messageArguments(), null), null, null,
					targetClass);
		}

		final long startTime = System.currentTimeMillis();
		boolean logTime = ann != null ? ann.measureExecutionTime() : false;

		final Object ret = joinPoint.proceed(joinPoint.getArgs());

		if (ann != null && (ann.after() || logTime)) {
			final Long executionTime = logTime ? (System.currentTimeMillis() - startTime) : null;

			if (ann.executionTimeThreshold() == -1 || (ann.executionTimeThreshold() > -1 && executionTime >= ann.executionTimeThreshold())) {
				Logger.log(ann.logLevel(),
						createLogMessage(joinPoint, "After", joinPoint.getSignature().toString(), targetClass, ann.messageArguments(), executionTime),
						null, null, targetClass);
			}
		}

		return ret;
	}

	private Class<?> getRealClass(Object object) {
		Class<?> objectClass = null;

		if (object instanceof TargetClassAware) {
			final TargetClassAware targetAware = ((TargetClassAware) object);

			if (targetAware.getTargetClass() != null) {
				objectClass = targetAware.getTargetClass();
			} else {
				objectClass = targetAware.getClass();
			}
		} else if (object != null) {
			if (object.getClass().getName().contains("CGLIB")) {
				objectClass = object.getClass().getSuperclass();
			} else {
				objectClass = object.getClass();
			}
		}
		return objectClass;
	}

	protected String createLogMessage(final JoinPoint joinPoint, final String marker, final String message, Class<?> klass,
			final Object[] arguments, final Long duration) {

		String msg = null;

		final String className;
		final String classSimpleName;

		if (klass != null) {
			className = klass.getName();
			classSimpleName = klass.getSimpleName();
		} else {
			className = "<null>";
			classSimpleName = "<null>";
		}

		if (StringUtils.isNotBlank(message)) {
			msg = String.format(message, arguments);

			msg = msg.replace("$className", className);
			msg = msg.replace("$classSimpleName", classSimpleName);
			msg = msg.replace("$timestamp", DATEFORMAT.format(new Date()));
		} else {
			msg = String.format("%s %s.%s", marker, classSimpleName, joinPoint.getSignature().getName());
		}

		if (duration != null) {
			msg += String.format(" (%s ms)", duration);
		}

		return msg;
	}
}


text:
layout: category
archive-type: "tag/"
permalink: "/yoga/"
title: "Yoga"
description: "Read about Yoga"
open-graph:
  title:        "Yoga"
  image:        "subscribe-bg.jpg"
---


text:
package org.markvarabyou.dao.sql;

import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.markvarabyou.dao.sql.helpers.SqlAgileToolDaoTestHelper;
import org.markvarabyou.entities.Board;
import org.markvarabyou.entities.BoardUserRole;
import org.markvarabyou.entities.User;
import org.markvarabyou.entities.enums.BoardUserRoleType;

import java.util.ArrayList;
import java.util.Date;

/**
 * Tests for Sql Data Access Object for entity BoardUserRole.
 * User: Mark Varabyou
 * Date: 11/6/13
 * Time: 8:27 PM
 */
public class SqlBoardUserRoleDaoTest extends SqlAgileToolDaoTestHelper {
    private SqlBoardUserRoleDao sqlBoardUserRoleDao;

    private BoardUserRole getValidBoardUserRole(){
        SqlUserDao sqlUserDao = new SqlUserDao(connection);
        User user = sqlUserDao.create(new User("test", "test", "test@test.com"));
        SqlBoardDao sqlBoardDao = new SqlBoardDao(connection);
        Board board = sqlBoardDao.create(new Board("test", user.getId(), new Date()));
        return new BoardUserRole(board.getId(), user.getId(), BoardUserRoleType.Team);
    }

    @Before
    public void setUp() throws Exception {
        setUpConnection();
        sqlBoardUserRoleDao = new SqlBoardUserRoleDao(connection);
    }

    @After
    public void tearDown() throws Exception {
        closeAndRollbackConnection();
    }

    @Test
    public void testCreateSuccess() {
        //Given
        BoardUserRole valid = getValidBoardUserRole();

        //When
        BoardUserRole created = sqlBoardUserRoleDao.create(valid);

        //Then
        Assert.assertNotNull(created);
        BoardUserRole read = sqlBoardUserRoleDao.read(created.getBoardId(), created.getUserId());
        Assert.assertEquals(created.getUserId(), read.getUserId());
        Assert.assertEquals(created.getBoardId(), read.getBoardId());
        Assert.assertEquals(created.getType(), read.getType());
    }

    @Test
    public void testCreateFailed() {
        //Given
        BoardUserRole invalid = getValidBoardUserRole();
        invalid.setBoardId(-1);

        //When
        BoardUserRole created = sqlBoardUserRoleDao.create(invalid);

        //Then
        Assert.assertNull(created);
    }

    @Test
    public void testReadByIdSuccess(){
        //Given
        BoardUserRole expected = sqlBoardUserRoleDao.create(getValidBoardUserRole());

        //When
        BoardUserRole actual = sqlBoardUserRoleDao.read(expected.getBoardId(), expected.getUserId());

        //Then
        Assert.assertNotNull(actual);
        Assert.assertEquals(expected.getUserId(), actual.getUserId());
        Assert.assertEquals(expected.getBoardId(), actual.getBoardId());
        Assert.assertEquals(expected.getType(), actual.getType());
    }

    @Test
    public void testReadByIdFailed(){
        //Given
        int wrongKey = -1;

        //When
        BoardUserRole read = sqlBoardUserRoleDao.read(wrongKey, wrongKey);

        //Then
        Assert.assertNull(read);
    }

    @Test
    public void testReadAll(){
        //Given
        BoardUserRole created = sqlBoardUserRoleDao.create(getValidBoardUserRole());

        //When
        ArrayList<BoardUserRole> boardUserRoles = sqlBoardUserRoleDao.read();

        //Then
        Assert.assertTrue(boardUserRoles.size() >= 1);
        boolean flag = false;
        for (BoardUserRole boardUserRole : boardUserRoles){
            if (boardUserRole.getBoardId() == created.getBoardId() && boardUserRole.getUserId() == created.getUserId())
                flag = true;
        }
        Assert.assertTrue(flag);
    }

    @Test
    public void testUpdateSuccess(){
        //Given
        BoardUserRole changed = sqlBoardUserRoleDao.create(getValidBoardUserRole());
        changed.setType(BoardUserRoleType.ProductOwner);

        //When
        BoardUserRole updated = sqlBoardUserRoleDao.update(changed);

        //Then
        Assert.assertNotNull(updated);
        Assert.assertEquals(changed.getBoardId(), updated.getBoardId());
        Assert.assertEquals(changed.getUserId(), updated.getUserId());
        Assert.assertEquals(changed.getType(), updated.getType());
    }

    @Test
    public void testUpdateFailed(){
        //Given
        BoardUserRole invalid = sqlBoardUserRoleDao.create(getValidBoardUserRole());
        invalid.setBoardId(-1); //Wrong id

        //When
        BoardUserRole updated = sqlBoardUserRoleDao.update(invalid);

        //Then
        Assert.assertNull(updated);
    }

    @Test
    public void testDeleteSuccess(){
        //Given
        BoardUserRole valid = sqlBoardUserRoleDao.create(getValidBoardUserRole());

        //When
        boolean isDeleted = sqlBoardUserRoleDao.delete(valid.getBoardId(), valid.getUserId());

        //Then
        Assert.assertTrue(isDeleted);
        Assert.assertNull(sqlBoardUserRoleDao.read(valid.getBoardId(), valid.getUserId()));
    }

    @Test
    public void testDeleteFailed(){
        //Given
        int wrongId = -1; //Wrong id

        //When
        boolean isDeleted = sqlBoardUserRoleDao.delete(wrongId, wrongId);

        //Then
        Assert.assertFalse(isDeleted);
    }
}


text:
package org.apache.kylin.rest.request;

/**
 * @author xduo
 *
 */
public class PrepareSqlRequest extends SQLRequest {

    public PrepareSqlRequest() {
        super();
    }

    private StateParam[] params;

    public StateParam[] getParams() {
        return params;
    }

    public void setParams(StateParam[] params) {
        this.params = params;
    }

    public static class StateParam {
        private String className;
        private String value;

        public StateParam() {
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }
}


text:
/*
 This file was generated by Dashcode.
 You may edit this file to customize your widget or web page
 according to the license.txt file included in the project.
 */

body {
    margin: 0px;
}

#frontImg {
    position: absolute;
    display: block;
    top: 0px;
    left: 0px;
    width: auto;
    height: auto;
    opacity: 1;
    right: 48px;
    bottom: 1px;
}

#info {
    position: absolute;
    right: 15px;
    bottom: 18px;
    width: 13px;
    height: 13px;
    top: 138px;
    left: 137px;
}

#back {
    display: none;
}

#backImg {
    position: absolute;
    display: block;
    top: 0px;
    left: 0px;
    width: auto;
    height: auto;
    right: 0px;
    bottom: 1px;
}

#done {
    position: absolute;
    right: 23px;
    margin-left: auto;
    bottom: 24px;
    margin-top: auto;
}

#txtHost {
    position: absolute;
    width: 99px;
    color: black;
    font-family: HelveticaNeue;
    font-size: 10pt;
    left: 18px;
    top: 93px;
}

#lblHost {
    font-size: 12px;
    font-family: 'Lucida Grande', Arial, sans-serif;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 51px;
    height: 18px;
    position: absolute;
    left: 18px;
    top: 75px;
    margin-top: 0px;
    color: rgb(0, 255, 255);
    cursor: default;
    -khtml-user-select: none;
}

.selected #lblHost {
    color: white;
}

#txtPort {
    position: absolute;
    width: 64px;
    color: black;
    font-family: HelveticaNeue;
    font-size: 10pt;
    left: 129px;
    top: 93px;
}

#lblPort {
    font-size: 12px;
    font-family: 'Lucida Grande', Arial, sans-serif;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 27px;
    height: 16px;
    position: absolute;
    left: 129px;
    top: 75px;
    margin-top: 0px;
    color: rgb(0, 255, 255);
    cursor: default;
    -khtml-user-select: none;
}

.selected #lblPort {
    color: white;
}

.navBtn {
    width: 26px;
    height: 26px;
}

#btnVolumeUp {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 73px;
    top: 19px;
    margin-top: 0px;
    background-image: url(Images/btnVolumeUp.png);
    height: 26px;
    width: 26px;
    background-repeat: no-repeat no-repeat;
}

#btnVolumeUp:hover {
    background-image: url(Images/btnVolumeUp_on.png);
}

#btnVolumeDown {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 73px;
    top: 59px;
    margin-top: 0px;
    background-image: url(Images/btnVolumeDown.png);
    height: 26px;
    width: 26px;
    background-repeat: no-repeat no-repeat;
}

#btnVolumeDown:hover {
    background-image: url(Images/btnVolumeDown_on.png);
}

#lblCurrentHost {
    font-size: 10px;
    font-family: 'Lucida Grande';
    text-overflow: ellipsis;
    overflow: hidden;
    width: 133px;
    height: 23px;
    position: absolute;
    left: 17px;
    top: 133px;
    margin-top: 0px;
    color: rgb(0, 255, 255);
    text-align: center;
    cursor: default;
    -khtml-user-select: none;
}

.selected #lblCurrentHost {
    color: white;
}

#rectangleShape {
    width: 106px;
    height: 101px;
    position: absolute;
    left: 3px;
    top: 3px;
    right: auto;
    bottom: auto;
    margin-top: 0px;
}

#rectangleShape1 {
    width: 106px;
    height: 101px;
    position: absolute;
    left: 3px;
    top: 3px;
    right: auto;
    bottom: auto;
    margin-top: 0px;
}

#btnStepBack {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 10px;
    top: 41px;
    margin-top: 0px;
    background-image: url(Images/btnStepBackward.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnStepBack:hover {
    background-image: url(Images/btnStepBackward_on.png);
}

#btnPause {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 43px;
    top: 9px;
    margin-top: 0px;
    background-image: url(Images/btnPause.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnPause:hover {
    background-image: url(Images/btnPause_on.png);
}

#btnStepForward {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 76px;
    top: 41px;
    margin-top: 0px;
    background-image: url(Images/btnStepForward.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnStepForward:hover {
    background-image: url(Images/btnStepForward_on.png);
}

#btnRewind {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 10px;
    top: 9px;
    margin-top: 0px;
    background-image: url(Images/btnRewind.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnRewind:hover {
    background-image: url(Images/btnRewind_on.png);
}

#btnBigStepBack {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 10px;
    top: 73px;
    margin-top: 0px;
    background-image: url(Images/btnSkipPrevious.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnBigStepBack:hover {
    background-image: url(Images/btnSkipPrevious_on.png);
}

#btnPlay {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 43px;
    top: 41px;
    margin-top: 0px;
    background-image: url(Images/btnPlay.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnPlay:hover {
    background-image: url(Images/btnPlay_on.png);
}

#btnStop {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 43px;
    top: 73px;
    margin-top: 0px;
    background-image: url(Images/btnStop.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnStop:hover {
    background-image: url(Images/btnStop_on.png);
}

#btnFastForward {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 76px;
    top: 9px;
    margin-top: 0px;
    background-image: url(Images/btnFastForward.png);
    min-height: 28px;
    width: 26px;
    height: 28px;
    background-repeat: no-repeat no-repeat;
}

#btnFastForward:hover {
    background-image: url(Images/btnFastForward_on.png);
}

#btnBigStepForward {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 76px;
    top: 73px;
    margin-top: 0px;
    background-image: url(Images/btnSkipNext.png);
    min-height: 28px;
    width: 26px;
    height: auto;
    bottom: 6px;
    background-repeat: no-repeat no-repeat;
}

#btnBigStepForward:hover {
    background-image: url(Images/btnSkipNext_on.png);
}

#stkControls {
    overflow: hidden;
    z-index: 0;
    width: 112px;
    height: 107px;
    position: absolute;
    left: 39px;
    top: 18px;
    right: 0px;
    bottom: 39px;
    margin-top: 0px;
}

#vwNavigation {
    width: 100%;
    display: none;
    position: relative;
    height: auto;
    min-height: 107px;
}

#vwPlayback {
    width: 100%;
    min-height: 107px;
    display: none;
    position: relative;
}

#image {
    width: 50px;
    height: 50px;
    position: absolute;
    left: 79px;
    top: 18px;
    right: auto;
    bottom: auto;
    margin-top: 0px;
}

#inner_image1 {
    position: absolute;
    bottom: 0px;
    right: 0px;
    left: 0px;
    top: 0px;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

#image1 {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 17px;
    top: 23px;
    right: auto;
    bottom: auto;
    margin-top: 0px;
}

#inner_image2 {
    position: absolute;
    bottom: 0px;
    right: 0px;
    left: 0px;
    top: 0px;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

#btnMuteOn {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 43px;
    top: 19px;
    margin-top: 0px;
    background-image: url(Images/btnMuteOn.png);
    height: 26px;
    width: 26px;
    background-repeat: no-repeat no-repeat;
}

#btnMuteOn:hover {
    background-image: url(Images/btnMuteOn_on.png);
}

#btnMuteOff {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 43px;
    top: 59px;
    margin-top: 0px;
    background-image: url(Images/btnMuteOff.png);
    height: 26px;
    width: 26px;
    background-repeat: no-repeat no-repeat;
}

#btnMuteOff:hover {
    background-image: url(Images/btnMuteOff_on.png);
}

#btnPowerOn {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 13px;
    top: 19px;
    margin-top: 0px;
    background-image: url(Images/btnPower.png);
    height: 26px;
    width: 26px;
    background-repeat: no-repeat no-repeat;
}

#btnPowerOn:hover {
    background-image: url(Images/btnPower_on.png);
}

#btnPowerOff {
    border-width: 1px;
    border-color: black;
    position: absolute;
    left: 13px;
    top: 59px;
    margin-top: 0px;
    background-image: url(Images/btnPower.png);
    height: 26px;
    width: 26px;
    background-repeat: no-repeat no-repeat;
}

#btnPowerOff:hover {
    background-image: url(Images/btnPower_on.png);
}


text:
class ChromeMockRenderThread : public content::MockRenderThread {
 public:
  ChromeMockRenderThread();
  ~ChromeMockRenderThread() override;

  // content::RenderThread overrides.
  scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override;

  //////////////////////////////////////////////////////////////////////////
  // The following functions are called by the test itself.

  void set_io_task_runner(
      const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);

 protected:
  scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;

  DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread);
};

#endif  // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_


text:
package apps::virtualization::ovirt::plugin;

use strict;
use warnings;
use base qw(centreon::plugins::script_custom);

sub new {
    my ($class, %options) = @_;
    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
    bless $self, $class;

    $self->{version} = '1.0';
    %{$self->{modes}} = (
        'cpu-host'          => 'apps::virtualization::ovirt::mode::cpuhost',
        'list-clusters'     => 'apps::virtualization::ovirt::mode::listclusters',
        'list-datacenters'  => 'apps::virtualization::ovirt::mode::listdatacenters',
        'list-hosts'        => 'apps::virtualization::ovirt::mode::listhosts',
    );

    $self->{custom_modes}{api} = 'apps::virtualization::ovirt::custom::api';
    return $self;
}

1;

__END__

=head1 PLUGIN DESCRIPTION

Check oVirt using API.

=cut


text:
namespace MassTransit
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Serialization;
    using Transports;

    public static class SerializerContextExtensions
    {
        public static T? GetValue<T>(this IObjectDeserializer context, IReadOnlyDictionary<string, object> dictionary, string key, T? defaultValue = null)
            where T : class
        {
            if (!dictionary.TryGetValue(key, out var value) && !dictionary.TryGetValueCamelCase(key, out value))
                return defaultValue;

            return context.DeserializeObject(value, defaultValue);
        }

        public static T? GetValue<T>(this IObjectDeserializer context, IReadOnlyDictionary<string, object> dictionary, string key, T? defaultValue = null)
            where T : struct
        {
            if (!dictionary.TryGetValue(key, out var value) && !dictionary.TryGetValueCamelCase(key, out value))
                return defaultValue;

            return context.DeserializeObject(value, defaultValue);
        }

        public static T? GetValue<T>(this IObjectDeserializer context, IDictionary<string, object> dictionary, string key, T? defaultValue = null)
            where T : class
        {
            if (!dictionary.TryGetValue(key, out var value) && !dictionary.TryGetValueCamelCase(key, out value))
                return defaultValue;

            return context.DeserializeObject(value, defaultValue);
        }

        public static T? GetValue<T>(this IObjectDeserializer context, IDictionary<string, object> dictionary, string key, T? defaultValue = null)
            where T : struct
        {
            if (!dictionary.TryGetValue(key, out var value) && !dictionary.TryGetValueCamelCase(key, out value))
                return defaultValue;

            return context.DeserializeObject(value, defaultValue);
        }

        public static T? GetValue<T>(this IObjectDeserializer context, IHeaderProvider dictionary, string key, T? defaultValue = null)
            where T : class
        {
            return dictionary.TryGetHeader(key, out var value) ? context.DeserializeObject(value, defaultValue) : defaultValue;
        }

        public static T? GetValue<T>(this IObjectDeserializer context, IHeaderProvider dictionary, string key, T? defaultValue = null)
            where T : struct
        {
            return dictionary.TryGetHeader(key, out var value) ? context.DeserializeObject(value, defaultValue) : defaultValue;
        }

        public static bool TryGetValue<T>(this IObjectDeserializer context, IDictionary<string, object> dictionary, string key,
            [NotNullWhen(true)] out T? value)
            where T : class
        {
            if (!dictionary.TryGetValue(key, out var obj) && !dictionary.TryGetValueCamelCase(key, out obj))
            {
                value = null;
                return false;
            }

            value = context.DeserializeObject<T>(obj);
            return value != null;
        }

        public static string? SerializeDictionary(this IObjectDeserializer deserializer, IEnumerable<KeyValuePair<string, object>> values)
        {
            var dictionary = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);

            foreach (KeyValuePair<string, object> pair in values)
            {
                if (pair.Value != null)
                    dictionary[pair.Key] = pair.Value;
            }

            return dictionary.Count == 0
                ? null
                : deserializer.SerializeObject(dictionary).GetString();
        }

        public static Dictionary<string, TValue>? DeserializeDictionary<TValue>(this IObjectDeserializer deserializer, string? text)
        {
            if (!string.IsNullOrWhiteSpace(text))
            {
                List<KeyValuePair<string, TValue>>? headers = deserializer.DeserializeObject<IEnumerable<KeyValuePair<string, TValue>>>(text)?.ToList();
                if (headers != null && headers.Count > 0)
                {
                    var dictionary = new Dictionary<string, TValue>(StringComparer.OrdinalIgnoreCase);
                    foreach (KeyValuePair<string, TValue> x in headers)
                        dictionary.Add(x.Key, x.Value);

                    return dictionary;
                }
            }

            return null;
        }

        public static bool TryGetValue<T>(this IObjectDeserializer context, IDictionary<string, object> dictionary, string key,
            [NotNullWhen(true)] out T? value)
            where T : struct
        {
            if (!dictionary.TryGetValue(key, out var obj) && !dictionary.TryGetValueCamelCase(key, out obj))
            {
                value = null;
                return false;
            }

            value = context.DeserializeObject<T>(obj);
            return value != null;
        }

        public static bool TryGetHeader<T>(this ConsumeContext context, string key, [NotNullWhen(true)] out T? value)
            where T : class
        {
            if (!context.Headers.TryGetHeader(key, out var headerValue))
            {
                value = null;
                return false;
            }

            value = context.SerializerContext.DeserializeObject<T>(headerValue);
            return value != null;
        }

        public static bool TryGetHeader<T>(this ConsumeContext context, string key, [NotNullWhen(true)] out T? value)
            where T : struct
        {
            if (!context.Headers.TryGetHeader(key, out var headerValue))
            {
                value = null;
                return false;
            }

            value = context.SerializerContext.DeserializeObject<T>(headerValue);
            return value != null;
        }

        public static bool TryGetHeader<T>(this SendContext context, string key, [NotNullWhen(true)] out T? value)
            where T : class
        {
            if (context.Headers.TryGetHeader(key, out var headerValue))
            {
                value = headerValue as T;
                return value != null;
            }

            value = null;
            return false;
        }

        public static bool TryGetHeader<T>(this SendContext context, string key, [NotNullWhen(true)] out T? value)
            where T : struct
        {
            if (context.Headers.TryGetHeader(key, out var headerValue))
            {
                value = headerValue as T?;
                return value != null;
            }

            value = null;
            return false;
        }

        public static string? GetHeader(this ConsumeContext context, string key, string? defaultValue = null)
        {
            if (!context.Headers.TryGetHeader(key, out var headerValue))
                return defaultValue;

            if (headerValue is string text)
                return text;

            return context.SerializerContext.DeserializeObject<string>(headerValue) ?? defaultValue;
        }

        public static T? GetHeader<T>(this ConsumeContext context, string key, T? defaultValue = null)
            where T : class
        {
            if (!context.Headers.TryGetHeader(key, out var headerValue))
                return defaultValue;

            return context.SerializerContext.DeserializeObject<T>(headerValue) ?? defaultValue;
        }

        public static T? GetHeader<T>(this ConsumeContext context, string key, T? defaultValue = null)
            where T : struct
        {
            if (!context.Headers.TryGetHeader(key, out var headerValue))
                return defaultValue;

            return context.SerializerContext.DeserializeObject<T>(headerValue) ?? defaultValue;
        }

        public static Dictionary<string, object> ToDictionary<T>(this ConsumeContext context, T value)
            where T : class
        {
            return context.SerializerContext.ToDictionary(value);
        }
    }
}


text:
//
//  DKQueryTableViewController.h
//  DataKit
//
//  Created by Erik Aigner on 05.03.12.
//  Copyright (c) 2012 chocomoko.com. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "DKQuery.h"
#import "DKEntity.h"

/**
 A table view to display a specified entity paginated
 */
@interface DKQueryTableViewController : UITableViewController

/** @name Initializing Entity Tables */

/**
 Initializes a new query table for the specified entity
 @param entityName The entity name displayed in the table
 @return The initialized query table
 */
- (id)initWithEntityName:(NSString *)entityName;

/**
 Initializes a new query table for the specified entity
 @param style The table view style
 @param entityName The entity name displayed in the table
 @return The initialized query table
 */
- (id)initWithStyle:(UITableViewStyle)style entityName:(NSString *)entityName;

/** @name Configuration */

/**
 The entity name used for the table
 */
@property (nonatomic, copy) NSString *entityName;

/**
 The entity key to use for the cell title text
 */
@property (nonatomic, copy) NSString *displayedTitleKey;

/**
 The entity key to use for the cell image data
 */
@property (nonatomic, copy) NSString *displayedImageKey;

/**
 The number of objects displayed per page
 */
@property (nonatomic, assign) NSUInteger objectsPerPage;

/**
 If the table view is currently fetching a page
 */
@property (nonatomic, assign, readonly) BOOL isLoading;

/**
 The currently loaded objects

 Objects can be either of type <DKEntity> or NSDictionary
 */
@property (nonatomic, strong, readonly) NSMutableArray *objects;

/**
 The search bar

 Use this property to configure it.
 */
@property (nonatomic, strong, readonly) UISearchBar *searchBar;

/** @name Reloading */

/**
 Reloads the table in the background
 */
- (void)reloadInBackground;

/**
 Reloads the table in the background
 @param block The block that is called when the reload finished.
 */
- (void)reloadInBackgroundWithBlock:(void (^)(NSError *error))block;

/**
 Called when the table is about to reload it's objects
 */
- (void)queryTableWillReload;

/**
 Called when the table did reload it's objects
 */
- (void)queryTableDidReload;

/**
 Give subclasses a chance to do custom post processing on the table objects on a different queue.
 */
- (void)postProcessResults;

/** @name Methods to Override */

/**
 Determines if table shows a search bar in the header view

 The search bar is updated on each reload, so this property can change any time.
 @return `YES` if the table should display a search bar in the header, `NO` otherwise.
 */
- (BOOL)hasSearchBar;

/**
 Specify a custom query by overriding this method

 @return The query to use for the tables objects
 */
- (DKQuery *)tableQuery;

/**
 Returns a query for the entered search text

 @param text The query text
 @return The search query
 */
- (DKQuery *)tableQueryForSearchText:(NSString *)text;

/**
 Specify a map reduce operation for the query by overriding this method

 Make sure the map reduce returns an array of NSDictionaries so the query table can interprete the results as entities. You can do so by setting an appropriate result processor block on the map reduce. If <tableQuery> returns `nil` this method won't be called.
 @return The map reduce to use to display the table objects
 */
- (DKMapReduce *)tableQueryMapReduce;

/**
 Determines if the cell at the index path is a next-page cell
 @param indexPath The cell index path to check.
 @return NO if the cell represents a <DKEntity>, YES if it is the next-page cell.
 */
- (BOOL)tableViewCellIsNextPageCellAtIndexPath:(NSIndexPath *)indexPath;

/**
 Returns the cell for the given index path
 @param tableView The calling table view
 @param indexPath The index path for the cell
 @return The initialized or dequeued table cell
 */
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

/**
 Returns the cell used as the next-page cell
 @param tableView The calling table view
 @return The initialized or dequeued next-page cell
 */
- (UITableViewCell *)tableViewNextPageCell:(UITableView *)tableView;

/**
 Called when a table row is selected
 @param tableView The calling table view
 @param indexPath The index path of the selected row
 @param object The selected object. Can be of type <DKEntity> or NSDictionary.
 */
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath object:(id)object;

@end