text:
<link rel="stylesheet" href="man.css">
<title> R4RS prims in JScheme
</title>

List of all Scheme Primitive Procedures

Jscheme adopts almost all of the

standard procedures of

R4RS Scheme.

It does not fully implement call/cc.
Also, while JScheme provides string mutators <tt>string-set!</tt> and
<tt>string-fill!</tt>, JScheme strings are implemented as Java Strings
which are considered immutable, so use these procedures carefully.

The only R4RS primitives that
are not fully supported are

 (call-with-current-continuation )
ONLY PARTIALLY IMPLEMENTED

 (complex? )
NOT IMPLEMENTED

 (rational? )  UNIMPLEMENTED

 (real? ) UNIMPLEMENTED

A list of all essential R4RS primitives is provided below.

 (exact->inexact n ) -- converts an exact number n to an inexact number

 (inexact->exact x ) -- converts an inexact number x to an exact number

 (* x y ... z)  multiplies a sequence of numbers

 (+ x y ... z ) adds a sequence of numbers

 (- x y ) subtracts two numbers

 (/ x y ) divides two numbers

 (< x y ) compares two numbers, returns #t if x is less than y

 (<=x y )  compares two numbers, returns #t if x is less than or equal to y

 (= x y)    compares two numbers, returns #t if x is equal to y

 (> x y )   compares two numbers, returns #t if x is greater than y

 (>= x y )   compares two numbers, returns #t if x is greater than or equal to y

 (abs x ) the absolute value of x

 (acos x ) the arc cosine of x

 (append x y) appends two lists x y to get a new list

 (apply f arguments ) applies the function f to the list of arguments

 (asin x) the arc sine of x

 (assoc x alist) alist is a list of pairs (key value), if x is one of those keys, the value is returned.
equal? is used to compare x and key.

 (assq x alist) Same as assoc, but eq? is used to compare x and key.

 (assv x alist) Same as assoc, but eqv? is used to compare x and key.

 (atan x) the arc tangent of x

 (boolean? b )  #t if b is a boolean value: #t or #f

 (caaaar )  (lambda (x) (car (car (car (car x)))))

 (caaadr ) (lambda (x) (car (car (car (cdr x)))))

 (caaar ) (lambda (x) (car (car (car x))))

 (caadar ) (lambda (x) (car (car (cdr (car x)))))

 (caaddr ) (lambda (x) (car (car (cdr (cdr x)))))

 (caadr ) (lambda (x) (car (car (cdr x))))

 (caar ) (lambda (x) (car (car x)))

 (cadaar ) (lambda (x) (car (cdr (car (car x)))))

 (cadadr ) (lambda (x) (car (cdr (car (cdr x)))))

 (cadar ) (lambda (x) (car (cdr (car x))))

 (caddar ) (lambda (x) (car (cdr (cdr (car x)))))

 (cadddr ) (lambda (x) (car (cdr (cdr (cdr x)))))

 (caddr ) (lambda (x) (car (cdr (cdr x))))

 (cadr ) (lambda (x) (car (cdr x)))

 (call-with-current-continuation )
ONLY PARTIALLY IMPLEMENTED

 (call-with-input-file )

 (call-with-output-file )

 (car L ) the first element in the list L
(src)

 (cdaaar ) (lambda (x) (cdr (car (car (car x)))))

 (cdaadr ) (lambda (x) (cdr (car (car (cdr x)))))

 (cdaar ) (lambda (x) (cdr (car (car x))))

 (cdadar ) (lambda (x) (cdr (car (cdr (car x)))))

 (cdaddr ) (lambda (x) (cdr (car (cdr (cdr x)))))

 (cdadr ) (lambda (x) (cdr (car (cdr x))))

 (cdar ) (lambda (x) (cdr (car x)))

 (cddaar ) (lambda (x) (cdr (cdr (car (car x)))))

 (cddadr ) (lambda (x) (cdr (cdr (car (cdr x)))))

 (cddar ) (lambda (x) (cdr (cdr (car x))))

 (cdddar ) (lambda (x) (cdr (cdr (cdr (car x)))))

 (cddddr ) (lambda (x) (cdr (cdr (cdr (cdr x)))))

 (cdddr ) (lambda (x) (cdr (cdr (cdr x))))

 (cddr ) (lambda (x) (cdr (cdr x)))

 (cdr L ) the list obtained by removing the first element from the list L

 (ceiling x ) return the smallest integer greater than or equal to x

 (char->integer )

 (char-alphabetic? )

 ((char-ci<=? C1 C2) ) case-insensitive comparison of characters C1,C2

 (char-ci<? )

 (char-ci=? )

 (char-ci>=? )

 (char-ci>? )

 (char-downcase )

 (char-lower-case? )

 (char-numeric? )

 (char-upcase )

 (char-upper-case? )

 (char-whitespace? )

 ((char<=? C1 C2) ) case-sensitive comparison of characters

 (char<? )

 (char=? )

 (char>=? )

 (char>? )

 (char? )

 (close-input-port )

 (close-output-port )

 (complex? ) NOT IMPLEMENTED

 (cons x L ) the list obtained by adding x to the beginning of the list L
(src)

 (cos x)  the cosine of x in radians

 ((current-input-port) )

 ((current-output-port) )

 (display T ) print the term T on the Java console

 ((eof-object? X) ) returns true if X is the end of file object returned by read

 ((eq? A B) )  returns #t when A and B are
both #null or when they are both the same object

 (equal? x y)
returns #t if x and y are both #null or
represent the same numbers, or are ".equals" as Java objects,
or are lists whose corresponding elements are "equal?", or are arrays whose corresponding elements are "equal?".
or are

 ((eqv? A B) )
returns #t if x and y are both #null or
represent the same numbers, or are ".equals" as Java objects.

 ((eval T) ) this evaluates the expression T in
the current toplevel environment. The expression T is an expression formed from symbols and objects
cons'd together.

 (even? x)  #t if x is an even number

 ((exact? x) ) #t if x is a byte, short, or int

 (exp x ) the exponential function applied to x

 (expt n e ) raise n to the power e

 (floor x) return the largest integer less than x

 (for-each P L ) apply the procedure P to every element of the list L

 (force )

 (gcd x y ) find the greatest common divisor of x and y

 ((inexact? x) ) #t if x is a float or double

 ((input-port? x) )

 ((integer->char i) ) converts i to 16 bit unicode character

(interaction-environment)Return the current interaction environment.

 (integer? x ) #t if x is an integer

 (lcm x y)  return the least common multiple of x and y

 (length L)  return the length of the list L

 (list x y ... z)  make a list from the elements x, y, ... z

 ((list->string Cs) ) converts the list Cs of characters to a string

 ((list->vector Os) ) converts the list Os of objects to a vector

 ((list-ref L N ) returns the (N+1)st element of L. So
(list-ref L 0) returns the first element of L.

 (list-tailL N ) returns the list obtained by removing the
first N elements from L

 (list? L)  returns #t if L is a list

 (load F)  reads and interprets the Scheme expressions in
the file F in the current toplevel environment

 (log x) the natural log function applied to x

 (macroexpand X)

 (make-string )

 (make-vector )

 (map F L) return the list obtained by applying the function F to every element of the list L

 (max a b c ... d) find the largest of the numbers a, b, ..., d

 (member x L) return #t if x is a member of the list L

 (memq )

 (memv )

 (min a b c ... d) find the smallest of the numbers a, b, ..., d

 (modulo n d) return the remainder of n divided by d

 (negative? x)  return #t if x is a negative number

 (newline) write a newline on the Java console

 (not b) negates the truth value b

 (null-environment )

 (null? L ) return #t if L is the empty list

 (number->string )

 (number? x ) return #t if x is a number

 (odd? x)  return #t if x is an odd number

 (open-input-file )

 (open-output-file )

 (output-port? )

 (pair? L) return #t if L is a pair.

 (peek-char )

 (positive? x) return #t if x is a positive number

 (procedure? p)  return #t if p is a procedure

 (quotient x y ) return the integer quotient of x divided by y

 (rational? )  UNIMPLEMENTED

 (read )

 (read-char )

 (real? ) UNIMPLEMENTED

 (remainder x y)  return the remainder of x divided by y

 (reverse L) reverse the list L

 (round x) return the nearest integer to the number x

 (scheme-report-environment )

 (set-car! )

 (set-cdr! )

 (sin x)  the sine of x

 (sqrt x) the square root of x

 (string )

 (string->list )

 (string->number )

 (string->symbol )

 (string-append a b c ... d) combine the strings a, b, ..., d into a single new string

 (string-ci<=? )

 (string-ci<? )

 (string-ci=? )

 (string-ci>=? )

 (string-ci>? )

 (string-copy )

 (string-fill! )

 (string-length x) return the number of characters in the string x

 (string-ref )

 (string-set! )

 (string<=? )

 (string<? )

 (string=? )

 (string>=? )

 (string>? )

 (string? )

 (substring s i j ) return the substring of s that starts at position i and ends right before position j,
where 0 is the first position in the string.

 (symbol->string )

 (symbol? s)  return #t if s is a symbol

 (tan x) tangent of x

 (truncate x) remove the fractional part of the decimal x to get an integer

 (vector )

 (vector->list )

 (vector-fill! )

 (vector-length )

 (vector-ref )

 (vector-set! )

 (vector? )

 (write )

 (write-char )

 (zero? z) return #t if z equals 0


text:
<?php

namespace Acl\Entity;

use Vivo\Entity\AbstractEntity;
use Doctrine\ORM\Mapping as ORM;
use Zend\Stdlib\Hydrator;

/**
 * AclPrivilegio
 *
 * @ORM\Table(name="acl_privilegio", indexes={@ORM\Index(name="fk_acl_privilegio_acl_papel", columns={"id_papel"}), @ORM\Index(name="fk_acl_privilegio_acl_recurso", columns={"id_acl_recurso"})})
 * @ORM\Entity
 */
class AclPrivilegio extends AbstractEntity {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="nome", type="string", length=50, nullable=false)
     */
    private $nome;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="criado_em", type="datetime", nullable=false)
     */
    private $criadoEm;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="alterado_em", type="datetime", nullable=false)
     */
    private $alteradoEm;

    /**
     * @var \AclPapel
     *
     * @ORM\ManyToOne(targetEntity="AclPapel")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_papel", referencedColumnName="id")
     * })
     */
    private $papel;

    /**
     * @var \AclRecurso
     *
     * @ORM\ManyToOne(targetEntity="AclRecurso")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_acl_recurso", referencedColumnName="id")
     * })
     */
    private $recurso;

    public function __construct(array $options = array()) {
        (new Hydrator\ClassMethods())->hydrate($options, $this);

        $this->criadoEm = new \DateTime("now");
        $this->alteradoEm = new \DateTime("now");
    }

    public function getId() {
        return $this->id;
    }

    public function getNome() {
        return $this->nome;
    }

    public function getCriadoEm() {
        return $this->criadoEm;
    }

    public function getAlteradoEm() {
        return $this->alteradoEm;
    }

    public function getPapel() {
        return $this->papel;
    }

    public function getRecurso() {
        return $this->recurso;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function setNome($nome) {
        $this->nome = $nome;
    }

    public function setCriadoEm(\DateTime $criadoEm) {
        $this->criadoEm = $criadoEm;
    }

    public function setAlteradoEm(\DateTime $alteradoEm) {
        $this->alteradoEm = $alteradoEm;
    }

    public function setPapel(AclPapel $idPapel) {
        $this->papel = $idPapel;
    }

    public function setRecurso(AclRecurso $idAclRecurso) {
        $this->recurso = $idAclRecurso;
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>structure</artifactId>
        <groupId>com.tachograph.structure</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>tachographStructure</artifactId>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>6</source>
                    <target>6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.7</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.9.7</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.9.7</version>
        </dependency>
    </dependencies>
</project>


text:
<?php
declare(strict_types = 1);

namespace App\Entity\Image;

use App\Entity\HttpResource\Identity as HttpResourceIdentity;
use Domain\Entity\Image\Identity as IdentityInterface;
use Innmind\Rest\Server\Identity as RestIdentity;

final class Identity extends HttpResourceIdentity implements IdentityInterface, RestIdentity
{
}


text:
<?php

namespace Vinyett\PhotoBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class PhotoBundle extends Bundle
{
}


text:
'''
Created on 14/12/2015

@author: victor
'''
from optparse import OptionParser
from nma_algo_char.common import load_control_json, create_directory,\
    pair_parameter_values, parameter_value_to_string, MetropolisMCSimulator,\
    get_values_by_hue
import os
from _collections import defaultdict
from nma_algo_char.mode_application_analysis import load_cc_data, load_ic_data,\
    process_energy_differences, process_after_perturb_rmsd, load_data,\
    load_energy
import numpy
import matplotlib.pyplot as plt
import seaborn as sns
import cPickle as pickle
from anmichelpers.tools.measure import coords_rmsf
from trajectory_comparison.compare_two_rmsfs import rms
import scipy.stats

if __name__ == '__main__':
    sns.set_style("whitegrid")

    parser = OptionParser()
    parser.add_option("--experiment", dest="experiment")
    parser.add_option("--workspace", dest="workspace")

    (options, args) = parser.parse_args()

    if not options.experiment:
        parser.error('Experiment file not given')

    experiment_details = load_control_json(options.experiment)
    if options.workspace is not None:
        workspace = os.path.normpath(options.workspace)
    else:
        workspace = os.path.normpath(experiment_details["workspace"])

    # Things to load
    all_anm_energies = {}
    all_final_energies = {}

    ## ONLY FOR CC SIMULATIONS
    temperatures = [300, 583, 866, 1150, 1432, 2000, 2568, 300, 300]
    for T in temperatures:
        all_anm_energies[T] = []
        all_final_energies[T] = []
        main_folder = "%s_%d"%(experiment_details["prefix"],T)
        print "Processing %s"%main_folder
        for (p1,v1),(p2,v2) in pair_parameter_values(experiment_details["check"], experiment_details["parameter_values"]):

            folder_name = "%s_%s_%s_%s_%s"%("CC",
                                            experiment_details["parameter_abbv"][p1], parameter_value_to_string(v1),
                                            experiment_details["parameter_abbv"][p2], parameter_value_to_string(v2))

            data_folder = os.path.join(main_folder, workspace, folder_name,"info")

            beg_ener = load_energy(data_folder, "perturb_energy_before.log")
            anm_ener = load_energy(data_folder, "perturb_energy_after.log")
            fin_ener = load_energy(data_folder, "final_energy.log")

            min_len = min(len(anm_ener), len(fin_ener), len(beg_ener))

            all_anm_energies[T].extend(anm_ener[:min_len]-beg_ener[:min_len])
            all_final_energies[T].extend(fin_ener[:min_len]-beg_ener[:min_len])
        numpy.savetxt("%s_final.txt"%main_folder, numpy.array(all_final_energies[T]).T)
        numpy.savetxt("%s_anm.txt"%main_folder, numpy.array(all_anm_energies[T]).T)

    def prepare_subplots(row_len, col_len):
        if row_len > 1 or col_len > 1:
            f, axes = plt.subplots( col_len, row_len, sharey='row', sharex='col')
            f.subplots_adjust(hspace=0.4, wspace=0.3 )
            f.set_size_inches(12, 12, forward=True)
        else:
            f = plt.gcf()
            axes = {(0,0): plt.gca()}
        return f, axes

    def filter_outliers(ener1,ener2):
        filter_1 = []
        filter_2 = []
        for i in range(len(ener1)):
            if ener1[i]< -80 and ener2[i]<150:
                pass
            else:
                filter_1.append(ener1[i])
                filter_2.append(ener2[i])
        return numpy.array(filter_1), numpy.array(filter_2)

#     row_len = 3
#     col_len = 3
#     f, axes = prepare_subplots(row_len, col_len)
#     for i,T in enumerate(temperatures):
#         ax = axes[i/row_len, i%row_len]
# #         ax = plt.gca()
#         x , y = filter_outliers(all_anm_energies[T], all_final_energies[T])
#         ax.scatter(x, y, marker=',', c = "g", alpha = 0.3, lw = 0, s=0.6)
#         ax.set_title("T = %d"%T)
#         ax.set_xlim((-20,80))
#         ax.set_ylim((-40,60))
#         if i%row_len == 0:
#             ax.set_ylabel("Step U inc.")
#         if i/row_len == 2:
#             ax.set_xlabel("ANM U inc.")
#
#     plt.show()

    for T in sorted(list(set(temperatures))):
        ranked_anm_energies = scipy.stats.rankdata(numpy.array(all_anm_energies[T]))
        ranked_final_energies = scipy.stats.rankdata(numpy.array(all_final_energies[T]))
        scaled_ranked_anm_energies = ranked_anm_energies*numpy.max(ranked_final_energies)/numpy.max(ranked_anm_energies)
        rho, p_val =  scipy.stats.spearmanr(scaled_ranked_anm_energies, ranked_final_energies)
        print "%d\t%.3f\t%.3f"%(T, rho, p_val)

    def filter_by_final_increment(anm_ener, final_ener, T):
        filt_anm_ener = []
        filt_final_ener = []
        threshold_ener = MetropolisMCSimulator.energy_for_probability(0.1, T)

        for i in range(len(anm_ener)):
            if final_ener[i]<threshold_ener:
                filt_anm_ener.append(anm_ener[i])
                filt_final_ener.append(final_ener[i])

        return filt_anm_ener, filt_final_ener, threshold_ener

    for T in sorted(list(set(temperatures))):
        filt_anm_ener, filt_final_ener, threshold_ener = filter_by_final_increment(all_anm_energies[T], all_final_energies[T], T)
        ranked_anm_energies = scipy.stats.rankdata(numpy.array(filt_anm_ener))
        ranked_final_energies = scipy.stats.rankdata(numpy.array(filt_final_ener))
        scaled_ranked_anm_energies = ranked_anm_energies*numpy.max(ranked_final_energies)/numpy.max(ranked_anm_energies)
        rho, p_val =  scipy.stats.spearmanr(scaled_ranked_anm_energies, ranked_final_energies)
        print "%d\t%d\t%.3f\t%.3f\t%.3f"%(T, len(filt_anm_ener), threshold_ener, rho, p_val)


text:
<script>
    if (window.layoutTestController)
        layoutTestController.dumpAsText();
</script>

HTTPS is <?= $_SERVER['HTTPS'] ?>!


text:
package BIDMach.updaters

import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat}
import BIDMat.MatFunctions._
import BIDMat.SciFunctions._
import BIDMach.models._

class BatchNorm(override val opts:BatchNorm.Opts = new BatchNorm.Options) extends Updater {
  var accumulators:Array[Mat] = null

  override def init(model0:Model) = {
    super.init(model0)
    val modelmats = model.modelmats
    val updatemats = model.updatemats
    accumulators = new Array[Mat](updatemats.length)
    for (i <- 0 until accumulators.length) {
    	accumulators(i) = updatemats(i).zeros(updatemats(i).nrows, updatemats(i).ncols)
    }
  }

  def update(ipass:Int, step:Long) = {
  	val updatemats = model.updatemats
    for (i <- 0 until accumulators.length) {
    	accumulators(i) ~ accumulators(i) + updatemats(i)
    }
  }

  override def clear() = {
	  for (i <- 0 until accumulators.length) {
	  	accumulators(i).clear
	  }
  }

  override def updateM(ipass:Int):Unit = {
    val mm = model.modelmats(0)
    mm ~ accumulators(0) / accumulators(1)
    mm ~ mm / sum(mm,2)
    clear
  }
}

object BatchNorm {
  trait Opts extends Updater.Opts {
  }

  class Options extends Opts {}
}


text:
@interface LBMerchantSubmissionFourViewController : UIViewController

@end


text:
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftobjs.h>
#include <freetype/internal/services/svprop.h>
#include <freetype/ftoutln.h>
#include <freetype/ftbitmap.h>
#include "ftsdfrend.h"
#include "ftsdf.h"

#include "ftsdferrs.h"

  /**************************************************************************
   *
   * The macro FT_COMPONENT is used in trace mode.  It is an implicit
   * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
   * messages during execution.
   */
#undef  FT_COMPONENT
#define FT_COMPONENT  sdf

  /**************************************************************************
   *
   * macros and default property values
   *
   */
#define SDF_RENDERER( rend )  ( (SDF_Renderer)rend )

  /**************************************************************************
   *
   * for setting properties
   *
   */

  /* property setter function */
  static FT_Error
  sdf_property_set( FT_Module    module,
                    const char*  property_name,
                    const void*  value,
                    FT_Bool      value_is_string )
  {
    FT_Error      error  = FT_Err_Ok;
    SDF_Renderer  render = SDF_RENDERER( FT_RENDERER( module ) );

    FT_UNUSED( value_is_string );

    if ( ft_strcmp( property_name, "spread" ) == 0 )
    {
      FT_Int  val = *(const FT_Int*)value;

      if ( val > MAX_SPREAD || val < MIN_SPREAD )
      {
        FT_TRACE0(( "[sdf] sdf_property_set:"
                    " the `spread' property can have a value\n" ));
        FT_TRACE0(( "                       "
                    " within range [%d, %d] (value provided: %d)\n",
                    MIN_SPREAD, MAX_SPREAD, val ));

        error = FT_THROW( Invalid_Argument );
        goto Exit;
      }

      render->spread = (FT_UInt)val;
      FT_TRACE7(( "[sdf] sdf_property_set:"
                  " updated property `spread' to %d\n", val ));
    }

    else if ( ft_strcmp( property_name, "flip_sign" ) == 0 )
    {
      FT_Int  val = *(const FT_Int*)value;

      render->flip_sign = val ? 1 : 0;
      FT_TRACE7(( "[sdf] sdf_property_set:"
                  " updated property `flip_sign' to %d\n", val ));
    }

    else if ( ft_strcmp( property_name, "flip_y" ) == 0 )
    {
      FT_Int  val = *(const FT_Int*)value;

      render->flip_y = val ? 1 : 0;
      FT_TRACE7(( "[sdf] sdf_property_set:"
                  " updated property `flip_y' to %d\n", val ));
    }

    else if ( ft_strcmp( property_name, "overlaps" ) == 0 )
    {
      FT_Bool  val = *(const FT_Bool*)value;

      render->overlaps = val;
      FT_TRACE7(( "[sdf] sdf_property_set:"
                  " updated property `overlaps' to %d\n", val ));
    }

    else
    {
      FT_TRACE0(( "[sdf] sdf_property_set:"
                  " missing property `%s'\n", property_name ));
      error = FT_THROW( Missing_Property );
    }

  Exit:
    return error;
  }

  /* property getter function */
  static FT_Error
  sdf_property_get( FT_Module    module,
                    const char*  property_name,
                    void*        value )
  {
    FT_Error      error  = FT_Err_Ok;
    SDF_Renderer  render = SDF_RENDERER( FT_RENDERER( module ) );

    if ( ft_strcmp( property_name, "spread" ) == 0 )
    {
      FT_UInt*  val = (FT_UInt*)value;

      *val = render->spread;
    }

    else if ( ft_strcmp( property_name, "flip_sign" ) == 0 )
    {
      FT_Int*  val = (FT_Int*)value;

      *val = render->flip_sign;
    }

    else if ( ft_strcmp( property_name, "flip_y" ) == 0 )
    {
      FT_Int*  val = (FT_Int*)value;

      *val = render->flip_y;
    }

    else if ( ft_strcmp( property_name, "overlaps" ) == 0 )
    {
      FT_Int*  val = (FT_Int*)value;

      *val = render->overlaps;
    }

    else
    {
      FT_TRACE0(( "[sdf] sdf_property_get:"
                  " missing property `%s'\n", property_name ));
      error = FT_THROW( Missing_Property );
    }

    return error;
  }

  FT_DEFINE_SERVICE_PROPERTIESREC(
    sdf_service_properties,

    (FT_Properties_SetFunc)sdf_property_set,        /* set_property */
    (FT_Properties_GetFunc)sdf_property_get )       /* get_property */

  FT_DEFINE_SERVICEDESCREC1(
    sdf_services,

    FT_SERVICE_ID_PROPERTIES, &sdf_service_properties )

  static FT_Module_Interface
  ft_sdf_requester( FT_Renderer  render,
                    const char*  module_interface )
  {
    FT_UNUSED( render );

    return ft_service_list_lookup( sdf_services, module_interface );
  }

  /*************************************************************************/
  /*************************************************************************/
  /**                                                                     **/
  /**  OUTLINE TO SDF CONVERTER                                           **/
  /**                                                                     **/
  /*************************************************************************/
  /*************************************************************************/

  /**************************************************************************
   *
   * interface functions
   *
   */

  static FT_Error
  ft_sdf_init( FT_Renderer  render )
  {
    SDF_Renderer  sdf_render = SDF_RENDERER( render );

    sdf_render->spread    = DEFAULT_SPREAD;
    sdf_render->flip_sign = 0;
    sdf_render->flip_y    = 0;
    sdf_render->overlaps  = 0;

    return FT_Err_Ok;
  }

  static void
  ft_sdf_done( FT_Renderer  render )
  {
    FT_UNUSED( render );
  }

  /* generate signed distance field from a glyph's slot image */
  static FT_Error
  ft_sdf_render( FT_Renderer       module,
                 FT_GlyphSlot      slot,
                 FT_Render_Mode    mode,
                 const FT_Vector*  origin )
  {
    FT_Error     error   = FT_Err_Ok;
    FT_Outline*  outline = &slot->outline;
    FT_Bitmap*   bitmap  = &slot->bitmap;
    FT_Memory    memory  = NULL;
    FT_Renderer  render  = NULL;

    FT_Pos  x_shift = 0;
    FT_Pos  y_shift = 0;

    FT_Pos  x_pad = 0;
    FT_Pos  y_pad = 0;

    SDF_Raster_Params  params;
    SDF_Renderer       sdf_module = SDF_RENDERER( module );

    render = &sdf_module->root;
    memory = render->root.memory;

    /* check whether slot format is correct before rendering */
    if ( slot->format != render->glyph_format )
    {
      error = FT_THROW( Invalid_Glyph_Format );
      goto Exit;
    }

    /* check whether render mode is correct */
    if ( mode != FT_RENDER_MODE_SDF )
    {
      error = FT_THROW( Cannot_Render_Glyph );
      goto Exit;
    }

    /* deallocate the previously allocated bitmap */
    if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
    {
      FT_FREE( bitmap->buffer );
      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
    }

    /* preset the bitmap using the glyph's outline;         */
    /* the sdf bitmap is similar to an anti-aliased bitmap  */
    /* with a slightly bigger size and different pixel mode */
    if ( ft_glyphslot_preset_bitmap( slot, FT_RENDER_MODE_NORMAL, origin ) )
    {
      error = FT_THROW( Raster_Overflow );
      goto Exit;
    }

    /* the rows and pitch must be valid after presetting the */
    /* bitmap using outline                                  */
    if ( !bitmap->rows || !bitmap->pitch )
    {
      FT_ERROR(( "ft_sdf_render: failed to preset bitmap\n" ));

      error = FT_THROW( Cannot_Render_Glyph );
      goto Exit;
    }

    /* the padding will simply be equal to the `spread' */
    x_pad = sdf_module->spread;
    y_pad = sdf_module->spread;

    /* apply the padding; will be in all the directions */
    bitmap->rows  += y_pad * 2;
    bitmap->width += x_pad * 2;

    /* ignore the pitch, pixel mode and set custom */
    bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
    bitmap->pitch      = (int)( bitmap->width );
    bitmap->num_grays  = 255;

    /* allocate new buffer */
    if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
      goto Exit;

    slot->internal->flags |= FT_GLYPH_OWN_BITMAP;

    slot->bitmap_top  += y_pad;
    slot->bitmap_left -= x_pad;

    x_shift  = 64 * -slot->bitmap_left;
    y_shift  = 64 * -slot->bitmap_top;
    y_shift += 64 * (FT_Int)bitmap->rows;

    if ( origin )
    {
      x_shift += origin->x;
      y_shift += origin->y;
    }

    /* translate outline to render it into the bitmap */
    if ( x_shift || y_shift )
      FT_Outline_Translate( outline, x_shift, y_shift );

    /* set up parameters */
    params.root.target = bitmap;
    params.root.source = outline;
    params.root.flags  = FT_RASTER_FLAG_SDF;
    params.spread      = sdf_module->spread;
    params.flip_sign   = sdf_module->flip_sign;
    params.flip_y      = sdf_module->flip_y;
    params.overlaps    = sdf_module->overlaps;

    /* render the outline */
    error = render->raster_render( render->raster,
                                   (const FT_Raster_Params*)&params );

    /* transform the outline back to the original state */
    if ( x_shift || y_shift )
      FT_Outline_Translate( outline, -x_shift, -y_shift );

  Exit:
    if ( !error )
    {
      /* the glyph is successfully rendered to a bitmap */
      slot->format = FT_GLYPH_FORMAT_BITMAP;
    }
    else if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
    {
      FT_FREE( bitmap->buffer );
      slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
    }

    return error;
  }

  /* transform the glyph using matrix and/or delta */
  static FT_Error
  ft_sdf_transform( FT_Renderer       render,
                    FT_GlyphSlot      slot,
                    const FT_Matrix*  matrix,
                    const FT_Vector*  delta )
  {
    FT_Error  error = FT_Err_Ok;

    if ( slot->format != render->glyph_format )
    {
      error = FT_THROW( Invalid_Argument );
      goto Exit;
    }

    if ( matrix )
      FT_Outline_Transform( &slot->outline, matrix );

    if ( delta )
      FT_Outline_Translate( &slot->outline, delta->x, delta->y );

  Exit:
    return error;
  }

  /* return the control box of a glyph's outline */
  static void
  ft_sdf_get_cbox( FT_Renderer   render,
                   FT_GlyphSlot  slot,
                   FT_BBox*      cbox )
  {
    FT_ZERO( cbox );

    if ( slot->format == render->glyph_format )
      FT_Outline_Get_CBox( &slot->outline, cbox );
  }

  /* set render specific modes or attributes */
  static FT_Error
  ft_sdf_set_mode( FT_Renderer  render,
                   FT_ULong     mode_tag,
                   FT_Pointer   data )
  {
    /* pass it to the rasterizer */
    return render->clazz->raster_class->raster_set_mode( render->raster,
                                                         mode_tag,
                                                         data );
  }

  FT_DEFINE_RENDERER(
    ft_sdf_renderer_class,

    FT_MODULE_RENDERER,
    sizeof ( SDF_Renderer_Module ),

    "sdf",
    0x10000L,
    0x20000L,

    NULL,

    (FT_Module_Constructor)ft_sdf_init,
    (FT_Module_Destructor) ft_sdf_done,
    (FT_Module_Requester)  ft_sdf_requester,

    FT_GLYPH_FORMAT_OUTLINE,

    (FT_Renderer_RenderFunc)   ft_sdf_render,     /* render_glyph    */
    (FT_Renderer_TransformFunc)ft_sdf_transform,  /* transform_glyph */
    (FT_Renderer_GetCBoxFunc)  ft_sdf_get_cbox,   /* get_glyph_cbox  */
    (FT_Renderer_SetModeFunc)  ft_sdf_set_mode,   /* set_mode        */

    (FT_Raster_Funcs*)&ft_sdf_raster              /* raster_class    */
  )

  /*************************************************************************/
  /*************************************************************************/
  /**                                                                     **/
  /**  BITMAP TO SDF CONVERTER                                            **/
  /**                                                                     **/
  /*************************************************************************/
  /*************************************************************************/

  /* generate signed distance field from glyph's bitmap */
  static FT_Error
  ft_bsdf_render( FT_Renderer       module,
                  FT_GlyphSlot      slot,
                  FT_Render_Mode    mode,
                  const FT_Vector*  origin )
  {
    FT_Error   error  = FT_Err_Ok;
    FT_Memory  memory = NULL;

    FT_Bitmap*   bitmap  = &slot->bitmap;
    FT_Renderer  render  = NULL;
    FT_Bitmap    target;

    FT_Pos  x_pad = 0;
    FT_Pos  y_pad = 0;

    SDF_Raster_Params  params;
    SDF_Renderer       sdf_module = SDF_RENDERER( module );

    /* initialize the bitmap in case any error occurs */
    FT_Bitmap_Init( &target );

    render = &sdf_module->root;
    memory = render->root.memory;

    /* check whether slot format is correct before rendering */
    if ( slot->format != render->glyph_format )
    {
      error = FT_THROW( Invalid_Glyph_Format );
      goto Exit;
    }

    /* check whether render mode is correct */
    if ( mode != FT_RENDER_MODE_SDF )
    {
      error = FT_THROW( Cannot_Render_Glyph );
      goto Exit;
    }

    if ( origin )
    {
      FT_ERROR(( "ft_bsdf_render: can't translate the bitmap\n" ));

      error = FT_THROW( Unimplemented_Feature );
      goto Exit;
    }

    /* Do not generate SDF if the bitmap is not owned by the       */
    /* glyph: it might be that the source buffer is already freed. */
    if ( !( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
    {
      FT_ERROR(( "ft_bsdf_render: can't generate SDF from"
                 " unowned source bitmap\n" ));

      error = FT_THROW( Invalid_Argument );
      goto Exit;
    }

    if ( !bitmap->rows || !bitmap->pitch )
    {
      FT_ERROR(( "ft_bsdf_render: invalid bitmap size\n" ));

      error = FT_THROW( Invalid_Argument );
      goto Exit;
    }

    FT_Bitmap_New( &target );

    /* padding will simply be equal to `spread` */
    x_pad = sdf_module->spread;
    y_pad = sdf_module->spread;

    /* apply padding, which extends to all directions */
    target.rows  = bitmap->rows  + y_pad * 2;
    target.width = bitmap->width + x_pad * 2;

    /* set up the target bitmap */
    target.pixel_mode = FT_PIXEL_MODE_GRAY;
    target.pitch      = (int)( target.width );
    target.num_grays  = 255;

    if ( FT_ALLOC_MULT( target.buffer, target.rows, target.pitch ) )
      goto Exit;

    /* set up parameters */
    params.root.target = ⌖
    params.root.source = bitmap;
    params.root.flags  = FT_RASTER_FLAG_SDF;
    params.spread      = sdf_module->spread;
    params.flip_sign   = sdf_module->flip_sign;
    params.flip_y      = sdf_module->flip_y;

    error = render->raster_render( render->raster,
                                   (const FT_Raster_Params*)&params );

  Exit:
    if ( !error )
    {
      /* the glyph is successfully converted to a SDF */
      if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
      {
        FT_FREE( bitmap->buffer );
        slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
      }

      slot->bitmap           = target;
      slot->bitmap_top      += y_pad;
      slot->bitmap_left     -= x_pad;
      slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
    }
    else if ( target.buffer )
      FT_FREE( target.buffer );

    return error;
  }

  FT_DEFINE_RENDERER(
    ft_bitmap_sdf_renderer_class,

    FT_MODULE_RENDERER,
    sizeof ( SDF_Renderer_Module ),

    "bsdf",
    0x10000L,
    0x20000L,

    NULL,

    (FT_Module_Constructor)ft_sdf_init,
    (FT_Module_Destructor) ft_sdf_done,
    (FT_Module_Requester)  ft_sdf_requester,

    FT_GLYPH_FORMAT_BITMAP,

    (FT_Renderer_RenderFunc)   ft_bsdf_render,    /* render_glyph    */
    (FT_Renderer_TransformFunc)ft_sdf_transform,  /* transform_glyph */
    (FT_Renderer_GetCBoxFunc)  ft_sdf_get_cbox,   /* get_glyph_cbox  */
    (FT_Renderer_SetModeFunc)  ft_sdf_set_mode,   /* set_mode        */

    (FT_Raster_Funcs*)&ft_bitmap_sdf_raster       /* raster_class    */
  )

/* END */


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OOP_Review_2017_3.FactoryPattern
{
    class OrderManager
    {
        private HaitaiFoodFactory haitaiFoodFactory { set; get; }

        public OrderManager(HaitaiFoodFactory factory)
        {
            haitaiFoodFactory = factory;
        }

        public Snack Jagabee
        {
            get
            {
                return haitaiFoodFactory.CreateJagabee();
            }
        }

        public IEnumerable<Snack> OrderJagabee(uint count)
        {
            for (int i = 0; i < count; i++)
            {
                yield return haitaiFoodFactory.CreateJagabee();
            }
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.pillar"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="19" />

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.pillar.MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.example.pillar.InstructionActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.example.pillar.AuthenticateActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.example.pillar.SettingsActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.example.pillar.DoneActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.example.pillar.ConnectionActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
    </application>

</manifest>


text:
package com.njit.ece.senior_project.medical_sensor.data.util;

/**
 * A utility class with helpful functions for converting between data types
 */
public class DataHelper {

    public static byte[] hexStringToByteArray(String s) {
        try {
            int len = s.length();
            byte[] data = new byte[len / 2];
            for (int i = 0; i < len; i += 2) {
                data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
                        + Character.digit(s.charAt(i + 1), 16));
            }
            return data;
        } catch (Exception e) {
            //TODO: why does this happen???
            return new byte[]{0,0,0,0,0,0};
        }
    }

    public static double magnitude(float[] v) {
        int norm = 0;
        for(int i = 0; i < v.length; i++) {
            norm += v[i] * v[i];
        }
        return Math.sqrt(norm);
    }

}


text:
<?php

namespace Asoc\Dadatata\Exception;

class InvalidCommandParameterException extends Exception
{

}


text:
/* jshint node: true */
'use strict';

module.exports = {
  name: 'ember-tachyons-components'
};


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Trans. Wis. Acad. Sci. Arts Lett. 53: 213 (1964)

#### Original name
Camarosporium pteridis H.C. Greene

### Remarks
null


text:
<?xml version="1.0"?>
<automater_root>
    <site name="robtex_dns">
        <sitetype>
		<entry>ip</entry>
	</sitetype>
        <domainurl>http://robtex.com/</domainurl>
        <reportstringforresult>
		<entry>[+] A records from Robtex.com:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>RobTex DNS</entry>
	</sitefriendlyname>
        <regex>
		<entry>robtex\.com\/dns\/(.+)\.html.+\<\/a\>\<\/li</entry>
	</regex>
	<fullurl>https://robtex.com/%TARGET%</fullurl>
        <importantproperty>
		<entry>Results</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="fortinet_classify">
        <sitetype>
		<entry>ip</entry>
		<entry>hostname</entry>
	</sitetype>
        <domainurl>http://fortiguard.com/</domainurl>
        <reportstringforresult>
		<entry>[+] Fortinet URL Category:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>Fortinet URL</entry>
	</sitefriendlyname>
        <regex>
		<entry>Category:\s(.+)\<\/h3\>\s\<a</entry>
	</regex>
	<fullurl>http://www.fortiguard.com/ip_rep/index.php?data=%TARGET%&lookup=Lookup</fullurl>
        <importantproperty>
		<entry>Results</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="alienvault_reputation">
        <sitetype>
		<entry>ip</entry>
	</sitetype>
        <domainurl>http://labs.alienvault.com/</domainurl>
        <reportstringforresult>
		<entry>[+] Found in AlienVault reputation DB:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>AlienVault Reputation</entry>
	</sitefriendlyname>
        <regex>
		<entry>.*Reputation\sMonitor\sIP\sDetail.*</entry>
	</regex>
	<fullurl>http://www.alienvault.com/apps/rep_monitor/ip/%TARGET%</fullurl>
        <importantproperty>
		<entry>FullURL</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="vtpDNSIP">
        <sitetype>
        <entry>ip</entry>
	</sitetype>
        <domainurl>https://www.virustotal.com/en/#search</domainurl>
        <reportstringforresult>
        	<entry>[+] pDNS data from VirusTotal:</entry>
	        <entry>[+] pDNS malicious URLs from VirusTotal:</entry>
	</reportstringforresult>
        <sitefriendlyname>
	        <entry>pDNSDomain</entry>
	        <entry>pDNSURL</entry>
	</sitefriendlyname>
        <regex>
	        <entry>(\d{4}\-\d{1,2}\-\d{1,2})\s+<.{30,70}\/en\/domain\/(.{1,80})\/information</entry>
	        <entry>(\d{4}\-\d{1,2}\-\d{1,2}).{1,20}\s+<.{10,80}\/en\/url\/.{1,100}\/analysis\/.{1,5}\s+(http.{1,70}\/)</entry>
	</regex>
	<fullurl>https://www.virustotal.com/en/ip-address/%TARGET%/information/</fullurl>
        <importantproperty>
	        <entry>Results</entry>
	        <entry>Results</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="ipvoid">
        <sitetype>
		<entry>ip</entry>
	</sitetype>
        <domainurl>http://www.ipvoid.com/</domainurl>
        <reportstringforresult>
		<entry>[+] Blacklist from IPVoid:</entry>
		<entry>[+] ISP from IPvoid:</entry>
		<entry>[+] Country from IPVoid:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>IPVoid Blacklist</entry>
		<entry>IPVoid ISP</entry>
		<entry>IPVoid Geo</entry>
	</sitefriendlyname>
        <regex>
		<entry>An\sError\soccurred</entry>
		<entry>Detected\<\/font\>\<\/td..td..a.rel..nofollow..href.\"(.{6,75})\"\stitle\=\"View</entry>
		<entry>ISP\<\/td\>\<td\>(.+)\<\/td\></entry>
		<entry>Country\sCode.+flag\"\s\/\>\s(.+)\<\/td\></entry>
	</regex>
	<fullurl>http://www.ipvoid.com/scan/%TARGET%</fullurl>
        <importantproperty>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
	</importantproperty>
	<params>
		<entry key="ip">%TARGET%</entry>
		<entry key="go">Scan Now</entry>
	</params>
	<headers>
		<entry key="Content-type">application/x-www-form-urlencoded</entry>
	</headers>
	<apikey></apikey>
    </site>
    <site name="virustotal">
        <sitetype>
		<entry>md5</entry>
	</sitetype>
        <domainurl>https://www.virustotal.com</domainurl>
        <reportstringforresult>
		<entry>[+] MD5 found on VT:</entry>
		<entry>[+] Scan date submitted:</entry>
		<entry>[+] # of virus engines detected on:</entry>
		<entry>[+] # of total scan engines:</entry>
		<entry>[+] Malware detected on:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>VirusTotal Found</entry>
		<entry>VirusTotal Date</entry>
		<entry>VirusTotal Virus Engines Detected</entry>
		<entry>VirusTotal Total Engines</entry>
		<entry>VirusTotal Malware Detected On</entry>
	</sitefriendlyname>
        <regex>
		<entry>response_code...(1)</entry>
		<entry>scan_date....(.{18,25})\"\,</entry>
		<entry>positives...(\d{1,2})\,</entry>
		<entry>total...(\d{1,2})\,</entry>
		<entry>\}\,\s\"(.{3,20})\"....detected...true.{19,32}result....(.{11,30})....update</entry>
	</regex>
	<fullurl>https://www.virustotal.com/vtapi/v2/file/report</fullurl>
        <importantproperty>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
	</importantproperty>
	<params>
		<entry key="resource">%TARGET%</entry>
		<entry key="apikey">b8af96be86983eccfe209fc5dfefa59f65fafa698a74ed638b63a3e367679e5a</entry>
	</params>
	<headers>
		<entry key="Content-type">application/x-www-form-urlencoded</entry>
	</headers>
	<apikey>
		<entry>b8af96be86983eccfe209fc5dfefa59f65fafa698a74ed638b63a3e367679e5a</entry>
	</apikey>
    </site>
    <site name="threatexpert">
        <sitetype>
		<entry>md5</entry>
	</sitetype>
        <domainurl>http://www.threatexpert.com/</domainurl>
        <reportstringforresult>
		<entry>[+] Hash found at ThreatExpert:</entry>
		<entry>[+] Malicious Indicators from ThreatExpert:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>ThreatExpert Date</entry>
		<entry>Malicious Indicators</entry>
	</sitefriendlyname>
        <regex>
		<entry>Submission\sreceived.\s(.+)\<\/li\></entry>
		<entry>1\">(.{5,100})\<\/td.{10,35}src\=</entry>
	</regex>
	<fullurl>http://www.threatexpert.com/report.aspx?md5=%TARGET%</fullurl>
        <importantproperty>
		<entry>Results</entry>
		<entry>Results</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="vxvault">
        <sitetype>
    	    <entry>md5</entry>
    	</sitetype>
        <domainurl>http://vxvault.siri-urz.net/</domainurl>
        <reportstringforresult>
    	    <entry>[+] Date found at VXVault:</entry>
    	    <entry>[+] URL found at VXVault:</entry>
	</reportstringforresult>
        <sitefriendlyname>
	        <entry>VxVault Date</entry>
	        <entry>VxVault URL</entry>
	</sitefriendlyname>
        <regex>
	        <entry>\>(\d{2}\-\d{2})\<</entry>
	        <entry>\[D\].{2,40}\Wphp\?id.{2,10}\>(.{5,100})<\/a</entry>
	</regex>
	<fullurl>http://vxvault.siri-urz.net/ViriList.php?MD5=%TARGET%</fullurl>
        <importantproperty>
        	<entry>Results</entry>
        	<entry>Results</entry>
	    </importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="unshortme">
        <sitetype>
		<entry>hostname</entry>
	</sitetype>
        <domainurl>http://unshort.me</domainurl>
        <reportstringforresult>
		<entry>[+] URL redirects to:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>UnShort.me Redirect</entry>
	</sitefriendlyname>
        <regex>
		<entry>result\"\>\s\<a\shref\=\".+\>(.+)\<\/a\>\s</entry>
	</regex>
	<fullurl>http://unshort.me/index.php?r=%TARGET%</fullurl>
        <importantproperty>
		<entry>Results</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
    <site name="urlvoid">
        <sitetype>
		<entry>hostname</entry>
	</sitetype>
        <domainurl>http://www.urlvoid.com/</domainurl>
        <reportstringforresult>
		<entry>[+] IP from URLVoid:</entry>
		<entry>[+] Blacklist from URLVoid:</entry>
		<entry>[+] Domain Age from URLVoid:</entry>
		<entry>[+] Geo Coordinates from URLVoid:</entry>
		<entry>[+] Country from URLVoid:</entry>
	</reportstringforresult>
        <sitefriendlyname>
		<entry>URLVoid IP</entry>
		<entry>URLVoid Blacklists</entry>
		<entry>URLVoid Domain</entry>
		<entry>URLVoid Location</entry>
		<entry>URLVoid Country</entry>
	</sitefriendlyname>
        <regex>
		<entry>An\sError\soccurred</entry>
		<entry>(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}).+Scan\swith\s</entry>
		<entry>DETECTED.{25,50}href..(.{10,100}).\s*titl</entry>
		<entry>Domain\s1st\sRegistered.+\<td\>(.+)\<\/td\></entry>
		<entry>latitude\s\/\slongitude.+\<td\>(.+)\<\/td\></entry>
		<entry>alt\=\"flag\".+\>(.+)\<\/td\></entry>
	</regex>
	<fullurl>http://www.urlvoid.com/scan/%TARGET%</fullurl>
        <importantproperty>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
		<entry>Results</entry>
	</importantproperty>
	<params>
		<entry key="ip">%TARGET%</entry>
		<entry key="go">Scan Now</entry>
	</params>
	<headers>
		<entry key="Content-type">application/x-www-form-urlencoded</entry>
	</headers>
	<apikey></apikey>
    </site>
    <site name="vtpDNSDom">
        <sitetype>
	        <entry>hostname</entry>
	</sitetype>
        <domainurl>https://www.virustotal.com/en/#search</domainurl>
        <reportstringforresult>
	        <entry>[+] pDNS data from VirusTotal:</entry>
	        <entry>[+] pDNS malicious URLs from VirusTotal:</entry>
	</reportstringforresult>
        <sitefriendlyname>
	        <entry>pDNSIP</entry>
	        <entry>pDNSURL</entry>
	</sitefriendlyname>
        <regex>
	        <entry>(\d{4}\-\d{1,2}\-\d{1,2})\s+<.{30,70}\/en\/ip-address\/(.{1,80})\/information</entry>
	        <entry>(\d{4}\-\d{1,2}\-\d{1,2}).{1,20}\s+<.{10,80}\/en\/url\/.{1,100}\/analysis\/.{1,5}\s+(http.{1,70}\/)</entry>
	</regex>
	<fullurl>https://www.virustotal.com/en/domain/%TARGET%/information/</fullurl>
        <importantproperty>
	        <entry>Results</entry>
	        <entry>Results</entry>
	</importantproperty>
	<params></params>
	<headers></headers>
	<apikey></apikey>
    </site>
</automater_root>


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Duss, Enum. Champ. Guadeloupe (Lons-le-Saunier) 21 (1903)

#### Original name
Thelephora quisquiliaris Berk. & M.A. Curtis, 1868

### Remarks
null


text:
/*
 * Decompiled with CFR 0_119.
 */
package script.systemCalls;

import script.InternalScriptError;
import script.LRhighTokens.TypeDefinition;
import script.Script;
import script.dataObjects.DataObject;
import script.dataObjects.DataType;
import script.dataObjects.ObjObject;
import script.names.NameResolver;
import script.patterns.MatcherBuilder;
import script.patterns.NullTransformer;
import script.patterns.PatternTransformer;
import script.systemCalls.Trap;

public class Trap_GetMatcher
extends Trap {
    public Trap_GetMatcher(Script s) {
        super(s);
    }

    @Override
    public DataObject apply() throws InternalScriptError {
        DataType e = new DataType(this.owner.getNameResolver().getUserDef("Matcher"));
        ObjObject o = new ObjObject(new MatcherBuilder(new NullTransformer()));
        DataObject i = o.explicitCastTo(e);
        return i;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<spirit:component xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <spirit:vendor>xilinx.com</spirit:vendor>
  <spirit:library>user</spirit:library>
  <spirit:name>comparator</spirit:name>
  <spirit:version>1.0</spirit:version>
  <spirit:model>
    <spirit:views>
      <spirit:view>
        <spirit:name>xilinx_anylanguagesynthesis</spirit:name>
        <spirit:displayName>Synthesis</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:synthesis</spirit:envIdentifier>
        <spirit:language>VHDL</spirit:language>
        <spirit:modelName>comparator</spirit:modelName>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_anylanguagesynthesis_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>viewChecksum</spirit:name>
            <spirit:value>eb4358b3</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_anylanguagebehavioralsimulation</spirit:name>
        <spirit:displayName>Simulation</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:simulation</spirit:envIdentifier>
        <spirit:language>VHDL</spirit:language>
        <spirit:modelName>comparator</spirit:modelName>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>viewChecksum</spirit:name>
            <spirit:value>eb4358b3</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_xpgui</spirit:name>
        <spirit:displayName>UI Layout</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:xgui.ui</spirit:envIdentifier>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_xpgui_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>viewChecksum</spirit:name>
            <spirit:value>03b001a3</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
    </spirit:views>
    <spirit:ports>
      <spirit:port>
        <spirit:name>x</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.WIDTH')) - 1)">31</spirit:left>
            <spirit:right spirit:format="long">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic_vector</spirit:typeName>
              <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>y</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.WIDTH')) - 1)">31</spirit:left>
            <spirit:right spirit:format="long">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic_vector</spirit:typeName>
              <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>z</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
    </spirit:ports>
    <spirit:modelParameters>
      <spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="integer">
        <spirit:name>WIDTH</spirit:name>
        <spirit:displayName>Width</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.WIDTH">32</spirit:value>
      </spirit:modelParameter>
    </spirit:modelParameters>
  </spirit:model>
  <spirit:fileSets>
    <spirit:fileSet>
      <spirit:name>xilinx_anylanguagesynthesis_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>comparator.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:userFileType>CHECKSUM_eb4358b3</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>comparator.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_xpgui_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>xgui/comparator_v1_0.tcl</spirit:name>
        <spirit:fileType>tclSource</spirit:fileType>
        <spirit:userFileType>CHECKSUM_b030f5a2</spirit:userFileType>
        <spirit:userFileType>XGUI_VERSION_2</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
  </spirit:fileSets>
  <spirit:description>comparator_v1_0</spirit:description>
  <spirit:parameters>
    <spirit:parameter>
      <spirit:name>WIDTH</spirit:name>
      <spirit:displayName>Width</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.WIDTH">32</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>Component_Name</spirit:name>
      <spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">comparator_v1_0</spirit:value>
    </spirit:parameter>
  </spirit:parameters>
  <spirit:vendorExtensions>
    <xilinx:coreExtensions>
      <xilinx:supportedFamilies>
        <xilinx:family xilinx:lifeCycle="Production">zynq</xilinx:family>
      </xilinx:supportedFamilies>
      <xilinx:taxonomies>
        <xilinx:taxonomy>/UserIP</xilinx:taxonomy>
      </xilinx:taxonomies>
      <xilinx:displayName>comparator_v1_0</xilinx:displayName>
      <xilinx:definitionSource>package_project</xilinx:definitionSource>
      <xilinx:coreRevision>2</xilinx:coreRevision>
      <xilinx:coreCreationDateTime>2017-05-28T01:20:38Z</xilinx:coreCreationDateTime>
      <xilinx:tags>
        <xilinx:tag xilinx:name="xilinx.com:user:comparator:1.0_ARCHIVE_LOCATION">c:/zyboip/general_ip/comparator/comparator.srcs/sources_1/new</xilinx:tag>
      </xilinx:tags>
    </xilinx:coreExtensions>
    <xilinx:packagingInfo>
      <xilinx:xilinxVersion>2016.4</xilinx:xilinxVersion>
      <xilinx:checksum xilinx:scope="fileGroups" xilinx:value="8a5b4470"/>
      <xilinx:checksum xilinx:scope="ports" xilinx:value="da9464e1"/>
      <xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="1be4dfc0"/>
      <xilinx:checksum xilinx:scope="parameters" xilinx:value="94ee018e"/>
    </xilinx:packagingInfo>
  </spirit:vendorExtensions>
</spirit:component>


text:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- mapred-queue-acls.xml -->
<configuration>

<!-- queue default -->

  <property>
    <name>mapred.queue.default.acl-submit-job</name>
    <value>*</value>
  </property>

  <property>
    <name>mapred.queue.default.acl-administer-jobs</name>
    <value>*</value>
  </property>

  <!-- END ACLs -->

</configuration>


text:
HTTP/HTTPS Load Balancer written in GO

## Installation - Vagrant
The easiest way to have a local development installation of eps-conduit is to use vagrant.

### Dependencies

- Virtualbox
- Vagrant

### Installation

#### 1. Clone the repo

`$ git clone git@github.com:orlandogolang/eps-conduit.git`

#### 2. Run Vagrant Commands

`$ vagrant up`

These vagrant commands should create everything you need to develop and test eps-conduit. In particular, a lightweight "hello world" web application is running in the backgorund on ports 8001 and 8002. It is managed with [supervisor](http://supervisord.org/).

#### 3. SSH in to Vagrant Machine and Run eps-conduit

`$ vagrant ssh`

`$ cd /vagrant/bin`

`$ sudo ./eps-conduit`

**Note**

	You must run eps-conduit as sudo to use the default logpath. Otherwise, specify a logpath
	accessible by a non-root user.

After running these commands, eps-conduit should be running in your terminal session.

#### 4. Verify Installation From Host Machine

Open another terminal window on your host machine, and run the following command:

`$ curl localhost:8000`

You should see a message similar to the following:

	Hello world, I'm answering your request from backend port 8001

Subsequent `curl` commands should yield responses from alternating ports (8001 & 8002) which confirms the load balancer is distributing requests, via round-robin, across the two available "hello world" processes

***

## Usage

By default, eps-conduit will bind to port 8000, but any port can be specified.

### Flags

| Flag  | Description                                       | Example Usage                             |
| ----- | ------------------------------------------------- | ----------------------------------------- |
| -b    | specify a list of backend hosts                   | eps-conduit -b "10.2.8.1, 10.2.8.2"       |
| -bind | specify what port to bind to (defaults to 8000)   | eps-conduit -bind 80                      |
| -mode | specifies what mode to use (http or https)        | eps-conduit -mode https                   |
| -cert | specify an SSL cert file (for https mode)         | eps-conduit -cert mycert.crt              |
| -key  | specify an SSL keyfile (for https mode)           | eps-conduit -key mykeyfile.key            |
| -log  | specify a path to store access logs               | eps-conduit -log /var/log/eps-conduit.log |


text:
#include "config.h"
#include "GetterSetter.h"

#include "JSObject.h"
#include <wtf/Assertions.h>

namespace JSC {

void GetterSetter::markChildren(MarkStack& markStack)
{
    JSCell::markChildren(markStack);

    if (m_getter)
        markStack.append(m_getter);
    if (m_setter)
        markStack.append(m_setter);
}

bool GetterSetter::isGetterSetter() const
{
    return true;
}

} // namespace JSC


text:
- [Description](#description)
- [Signature](#signature)
	- [Static members](#static-members)
		-[m.redraw.sync()](#mredrawsync)
- [How it works](#how-it-works)

---

### Description

Updates the DOM after a change in the application data layer.

You DON'T need to call it if data is modified within the execution context of an event handler defined in a Mithril view, or after request completion when using `m.request`/`m.jsonp`. The [autoredraw](autoredraw.md) system, which is built on top of `m.redraw()` will take care of it.

You DO need to call it in `setTimeout`/`setInterval`/`requestAnimationFrame` callbacks, or callbacks from 3rd party libraries.

---

### Signature

`m.redraw()`

Argument    | Type                 | Required | Description
----------- | -------------------- | -------- | ---
**returns** |                      |          | Returns nothing

#### Static members

##### m.redraw.sync

`m.redraw.sync()`

Argument    | Type                 | Required | Description
----------- | -------------------- | -------- | ---
**returns** |                      |          | Returns nothing

---

### How it works

When callbacks outside of Mithril run, you need to notify Mithril's rendering engine that a redraw is needed. External callbacks could be `setTimeout`/`setInterval`/`requestAnimationFrame` callbacks, web socket library callbacks, event handlers in jQuery plugins, third party XHR request callbacks, etc.

To trigger a redraw, call `m.redraw()`. Note that `m.redraw` only works if you used `m.mount` or `m.route`. If you rendered via `m.render`, you should use `m.render` to redraw.

`m.redraw()` always triggers an asynchronous redraws, whereas `m.redraw.sync()` triggers a synchronous one. `m.redraw()` is tied to `window.requestAnimationFrame()`. It will thus typically fire at most 60 times per second. It may fire faster if your monitor has a higher refresh rate.

`m.redraw.sync()` is mostly intended to make videos play work in iOS. That only works in response to user-triggered events. It comes with several caveat:

- You should not call `m.redraw.sync()` from a [lifecycle method](lifecycle-methods.md) or the `view()` method of a component. Doing so will result in undefined behavior (it throws an error when possible).
- `m.redraw.sync()` called from an event handler can cause the DOM to be modified while an event is bubbling. Depending on the structure of the old and new DOM trees, the event can finish the bubbling phase in the new tree and trigger unwanted handlers.
- It is not throttled. One call to `m.redraw.sync()` causes immediately one `m.render()` call per root registered with [`m.mount()`](mount.md) or [`m.route()`](route.md).

`m.redraw()` doesn't have any of those issues, you can call it from wherever you like.


text:
'use strict';

var system = angular.module('service.utility', []);

system.factory('utilityService', function($http, $location, $rootScope, $modal, $timeout) {
    return {
        convertToHighChartDatePair : function(dates){
            var result = [];
            for(var i = 0; i < dates.length; i++){
                var d = new Date(dates[i].date);
                var d_utc = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
                result.push([d_utc, dates[i].duration])
            }

            return result;
        },

        // Shows yes no modal box
        yesNoModal : function(header, message, callback){
            var modalInstance = $modal.open({
                templateUrl: 'views/partial/modal.html',
                controller: function ($scope, $modalInstance, header, message) {
                    $scope.header = header;
                    $scope.message = message;
                    $scope.ok = function () {
                        $modalInstance.close();
                    };

                    $scope.cancel = function () {
                        $modalInstance.dismiss('cancel');
                    };
                },
                resolve: {
                    header: function () { return header; },
                    message: function () { return message; }
                }
            });

            modalInstance.result.then(function () {
                callback(true);
            }, function () {
                callback(false);
            });
        },

        shuffle: function(array){
            var shuffle = [];

            // copy array
            angular.copy(array, shuffle);

            // shuffle elements
            var i = shuffle.length;
            while (--i) {
                var j = Math.floor(Math.random() * (i + 1))
                var temp = shuffle[i];
                shuffle[i] = shuffle[j];
                shuffle[j] = temp;
            }

            // return mixed array
            return shuffle;
        }
    }
});


text:
"""
Base class for Pipeline API data loaders.
"""
from abc import (
    ABCMeta,
    abstractmethod,
)

from six import with_metaclass

class PipelineLoader(with_metaclass(ABCMeta)):
    """
    ABC for classes that can load data for use with zipline.pipeline APIs.

    TODO: DOCUMENT THIS MORE!
    """
    @abstractmethod
    def load_adjusted_array(self, columns, mask):
        pass


text:
    (Context.IsEnabled &&                                                               \
    (                                                                                \
        (LevelParam <= ((Context).Level)) ||                                                    \
        ((Context.Level) == 0)                                                           \
    ) &&                                                                                \
    (   \
        (Keyword == (ULONGLONG)0) ||    \
        (   \
            (Keyword & (Context.MatchAnyKeyword)) && \
            (   \
                (Keyword & (Context.MatchAllKeyword)) == (Context.MatchAllKeyword)    \
            )   \
        )   \
    )   \
    )

class EEType;
class Module;
class BulkTypeEventLogger;

namespace ETW
{
    // Class to wrap all type system logic for ETW
    class TypeSystemLog
    {
    public:
        // This enum is unused on Redhawk, but remains here to keep Redhawk / desktop CLR
        // code shareable.
        enum TypeLogBehavior
        {
            kTypeLogBehaviorTakeLockAndLogIfFirstTime,
            kTypeLogBehaviorAssumeLockAndLogIfFirstTime,
            kTypeLogBehaviorAlwaysLog,
        };

        static void LogTypeAndParametersIfNecessary(BulkTypeEventLogger * pLogger, UInt64 thAsAddr, TypeLogBehavior typeLogBehavior);
    };

    class LoaderLog
    {
    public:
        static void SendModuleEvent(Module *pModule);
    };
};

struct EventRCWEntry
{
    UInt64 ObjectID;
    UInt64 TypeID;
    UInt64 IUnk;
    UInt64 VTable;
    UInt32 RefCount;
    UInt32 Flags;
};

#pragma pack(push, 1)
struct EventCCWEntry
{
    UInt64 RootID;
    UInt64 ObjectID;
    UInt64 TypeID;
    UInt64 IUnk;
    UInt32 RefCount;
    UInt32 JupiterRefCount;
    UInt32 Flags;
};

C_ASSERT(sizeof(EventCCWEntry) == 44);
#pragma pack(pop)

const UInt32 cbComMaxEtwEvent = 64 * 1024;

// Does all logging for RCWs and CCWs in the process.
class BulkComLogger
{
public:
    // Returns true is gc heap collection is on.
    static bool ShouldReportComForGCHeapEtw();

    // Write one CCW to the CCW buffer.
    static void WriteCCW(void* CCWGCHandle, void* objectID, void* typeRawValue, void* IUnknown, long comRefCount, long jupiterRefCount, long flags);

    // Write one RCW to the RCW buffer.
    static void WriteRCW(void* objectID, void* typeRawValue, void* IUnknown, void* VTable, long refCount, long flags);

    // Gets or creates a unique BulkComLogger instance
    static BulkComLogger* GetInstance();

    // Write the remaining events and deletes the static instance.
    static void FlushComETW();

private:
    BulkComLogger();
    ~BulkComLogger();

    // Forces a flush of all ETW events not yet fired.
    void FireBulkComEvent();

    // Writes one RCW to the RCW buffer.  May or may not fire the event.
    void WriteRcw(const EventRCWEntry& rcw);

    // Writes one CCW to the CCW buffer.  May or may not fire the event.
    void WriteCcw(const EventCCWEntry& ccw);

    // Forces a flush of all RCW ETW events not yet fired.
    void FlushRcw();

    // Forces a flush of all CCW ETW events not yet fired.
    void FlushCcw();

    // Distroys the unique instance and forces a flush for all ETW events not yet fired.
    void Cleanup();

private:
    // The maximum number of RCW/CCW events we can batch up based on the max size of an ETW event.
    static const int kMaxRcwCount = (cbComMaxEtwEvent - 0x30) / sizeof(EventRCWEntry);
    static const int kMaxCcwCount = (cbComMaxEtwEvent - 0x30) / sizeof(EventCCWEntry);

    int m_currRcw;  // The current number of batched (but not emitted) RCW events.
    int m_currCcw;  // The current number of batched (but not emitted) CCW events.

    BulkTypeEventLogger *m_typeLogger;  // Type logger to emit type data for.

    EventRCWEntry *m_etwRcwData;  // RCW buffer.
    EventCCWEntry *m_etwCcwData;  // CCW buffer.

    static BulkComLogger* s_comLogger;
};

#else
#define FireEtwGCPerHeapHistorySpecial(DataPerHeap, DataSize, ClrId)
#endif

#endif //__RHEVENTTRACE_INCLUDED


text:
require 'test_helper'

class NewRelicDashboardsUserTest < ActiveSupport::TestCase
  # test "the truth" do
  #   assert true
  # end
end


text:
module NLP
  class Text
    attr_reader :sentences

    def initialize
      @sentences = []
    end

    def << sentence
      @sentences.push sentence
    end

    def words_per_sentence
      @sentences.collect{|s| s.words_number}.mean
    end

    def flatten
      flattened = []
      @sentences.each{ |s| s.tokens.each{|t| flattened.push t } }
      flattened
    end

  end
end