text:
package com.ahmedelnahas.automation.core;

import com.ahmedelnahas.automation.resources.Pi4jHomeService;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

/**
 * The core application class. This will help initialize the application and run.
 *
 */
public class GarageApplication extends Application<AppConfigurations> {

    public static void main(String[] args) throws Exception {
        new GarageApplication().run(args);
    }

    @Override
    public String getName() {return "garage-automation";}

    /**
     * Initializes the application
     * @param bootstrap
     */
    @Override
    public void initialize(Bootstrap<AppConfigurations> bootstrap){

    }

    /**
     * runs the application
     * @param appConfigurations
     * @param environment
     * @throws Exception
     */
    public void run(AppConfigurations appConfigurations, Environment environment) throws Exception {
        final Pi4jHomeService garageResource = new Pi4jHomeService();

        environment.jersey().register(garageResource);
    }
}


text:
package zoekt

import (
	"fmt"
	"os"
)

// NewIndexFile returns a new index file. The index file takes
// ownership of the passed in file, and may close it.
func NewIndexFile(f *os.File) (IndexFile, error) {
	return &indexFileFromOS{f}, nil
}

type indexFileFromOS struct {
	f *os.File
}

func (f *indexFileFromOS) Read(off, sz uint32) ([]byte, error) {
	r := make([]byte, sz)
	_, err := f.f.ReadAt(r, int64(off))
	return r, err
}

func (f indexFileFromOS) Size() (uint32, error) {
	fi, err := f.f.Stat()
	if err != nil {
		return 0, err
	}

	sz := fi.Size()

	if sz >= maxUInt32 {
		return 0, fmt.Errorf("overflow")
	}

	return uint32(sz), nil
}

func (f indexFileFromOS) Close() {
	f.f.Close()
}

func (f indexFileFromOS) Name() string {
	return f.f.Name()
}

redpajama_set_name: RedPajamaGithub


text:
var http = require('http'),
    util = require('util'),
    url = require('url'),
    qs = require('qs'),
    EventEmitter = require('events').EventEmitter;

/**
 * A server that listens for POST requests from MailChimp which are issued on
 * special events as specified on their Webhook page. Please refer to that page
 * on how to set everything up.
 *
 * @see http://www.mailchimp.com/api/webhooks/
 *
 * If the server receives a valid request from MailChimp the received data is
 * wrapped in a nice object and an event is emitted which you can listen for
 * in your application and then take further action.
 *
 * Available options are:
 *  - port   Port the server is going to listen on. Defaults to 8100.
 *  - secret Secret key as suggested on the Webhook page which is then simply
 *           added as a pathname to the Webhook URL in your MailChimp account
 *           and checked for here. Nothing too fancy but a small enhancement to
 *           security. Leave empty (default setting) if you don't want to use a
 *           secret key. Example: If you set the secret to 'ChimpSecret' you
 *           would enter the Webhook URL http://www.yourdomain.com/ChimpSecret
 *           in the MailChimp Webhook settings.
 *  - secure Takes credentials generated by the crypto module and enables HTTPS
 *           support for the server when present.
 *
 * @param options Configuration options
 * @return Instance of {@link MailChimpWebhook}
 */
function MailChimpWebhook (options) {

	var self = this;

	if (!options)
		var options = {};

	EventEmitter.call(this);

	this.httpPort = options.port || 8100;
	this.secret = options.secret || '';
	this.secure = options.secure || false;

	this.allowedTypes = [
	                     'subscribe',
	                     'unsubscribe',
	                     'profile',
	                     'upemail',
	                     'cleaned'
	                    ];

	var server = http.createServer(function (request, response) {

		var requestBody = '';
		var requestUrl = url.parse(request.url);

		if (self.secret != '' && requestUrl.pathname !== '/'+self.secret) {
			self.emit('error', 'Received a request with an invalid secret key.');
			response.writeHead(500, { 'Content-Type' : 'text/plain' });
			response.end();
			return;
		}

		// Say "hi" to the webhook validator, the only request not sent via POST
		if (request.headers['user-agent'] === 'MailChimp.com WebHook Validator') {
			response.writeHead(200, { 'Content-Type' : 'text/plain' });
			response.end();
			return;
		}

		if (request.method != 'POST') {
			self.emit('error', 'Received something other than a POST request.');
			response.writeHead(500, { 'Content-Type' : 'text/plain' });
			response.end();
			return;
		}

        request.on('data', function (chunk) {
        	requestBody += chunk;
        });

        request.on('end', function () {

        	var payload = qs.parse(requestBody);
    		var meta = { type : payload.type, fired_at : payload.fired_at };
    		var data = payload.data;

    		if (meta.type && ~self.allowedTypes.indexOf(meta.type)) {
    			self.emit(payload.type, data, meta);
    			response.writeHead(200, { 'Content-Type' : 'text/plain' });
    			response.end();
    		} else {
    			self.emit('error', 'Received a request with an unknown type of payload.');
    			response.writeHead(500, { 'Content-Type' : 'text/plain' });
    			response.end();
    		}

        });

	});

	if (this.secure)
		server.setSecure(this.secure);

	server.listen(this.httpPort);

}

util.inherits(MailChimpWebhook, EventEmitter);
module.exports = MailChimpWebhook;


text:
var fs = require('fs');
var config = require('../config');

function createFolder(path) {
  try {
    console.log(">> Setting up folder : %s", path);
    fs.mkdirSync(path);
  } catch (ex) {
    console.error(">> Folder creation error.");
    console.error(ex);
  }
}

module.exports.prepare = function() {
  createFolder(config.downloadPath);
  createFolder(config.temporaryDownloadPath);
};


text:
<?php
/**
 * Smart Coupons Ajax Actions
 *
 * @author 		StoreApps
 * @since 		3.3.0
 * @version 	1.0
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! class_exists( 'WC_SC_Ajax' ) ) {

	/**
	 * Class for handling ajax actions for Smart Coupons
	 */
	class WC_SC_Ajax {

		/**
		 * Constructor
		 */
		public function __construct() {

			add_action( 'wp_ajax_sc_json_search_coupons', array( $this, 'sc_json_search_coupons' ) );
			add_action( 'wp_ajax_smart_coupons_json_search', array( $this, 'smart_coupons_json_search' ) );
			add_action( 'wp_ajax_hide_notice_delete_after_usage', array( $this, 'hide_notice_delete_after_usage' ) );

		}

		/**
		 * Handle call to functions which is not available in this class
		 *
		 * @param $function_name string
		 * @param $arguments array of arguments passed while calling $function_name
		 * @return result of function call
		 */
		public function __call( $function_name, $arguments = array() ) {

			global $woocommerce_smart_coupon;

			if ( ! is_callable( array( $woocommerce_smart_coupon, $function_name ) ) ) { return;
			}

			if ( ! empty( $arguments ) ) {
				return call_user_func_array( array( $woocommerce_smart_coupon, $function_name ), $arguments );
			} else {
				return call_user_func( array( $woocommerce_smart_coupon, $function_name ) );
			}

		}

		/**
		 * Function to search coupons
		 *
		 * @param string $x search term
		 * @param array  $post_types
		 */
		public function sc_json_search_coupons( $x = '', $post_types = array( 'shop_coupon' ) ) {
			global $woocommerce, $wpdb;

			check_ajax_referer( 'search-coupons', 'security' );

			$term = (string) urldecode( stripslashes( strip_tags( $_GET['term'] ) ) );

			if ( empty( $term ) ) { die();
			}

			$args = array(
				'post_type'     	=> $post_types,
				'post_status'       => 'publish',
				'posts_per_page'    => -1,
				's'             	=> $term,
				'fields'            => 'all',
			);

			$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}posts WHERE post_type = 'shop_coupon' AND post_title LIKE '$term%' AND post_status = 'publish'" );

			$found_products = array();

			$all_discount_types = wc_get_coupon_types();

			if ( $posts ) { foreach ( $posts as $post ) {

					$discount_type = get_post_meta( $post->ID, 'discount_type', true );

					if ( ! empty( $all_discount_types[ $discount_type ] ) ) {
						$discount_type = ' (Type: ' . $all_discount_types[ $discount_type ] . ')';
						$found_products[ get_the_title( $post->ID ) ] = get_the_title( $post->ID ) . $discount_type;
					}
			}
			}

			echo json_encode( $found_products );

			die();
		}

		/**
		 * JSON Search coupon via ajax
		 *
		 * @param string $x search text
		 * @param array  $post_types
		 */
		public function smart_coupons_json_search( $x = '', $post_types = array( 'shop_coupon' ) ) {
			global $woocommerce, $wpdb;

			check_ajax_referer( 'search-coupons', 'security' );

			$term = (string) urldecode( stripslashes( strip_tags( $_GET['term'] ) ) );

			if ( empty( $term ) ) { die();
			}

			$posts = $wpdb->get_results("SELECT *
										FROM {$wpdb->prefix}posts
										WHERE post_type = 'shop_coupon'
											AND post_title LIKE '$term%'
											AND post_status = 'publish'");

			$found_products = array();

			$all_discount_types = wc_get_coupon_types();

			if ( $posts ) { foreach ( $posts as $post ) {

					$discount_type = get_post_meta( $post->ID, 'discount_type', true );
					if ( ! empty( $all_discount_types[ $discount_type ] ) ) {

						$coupon = new WC_Coupon( get_the_title( $post->ID ) );

						if ( $this->is_wc_gte_30() ) {
							$discount_type = $coupon->get_discount_type();
							$coupon_amount = $coupon->get_amount();
						} else {
							$discount_type = ( ! empty( $coupon->discount_type ) ) ? $coupon->discount_type : '';
							$coupon_amount = ( ! empty( $coupon->amount ) ) ? $coupon->amount : 0;
						}

						switch ( $discount_type ) {

							case 'smart_coupon':
								$coupon_type = __( 'Store Credit', WC_SC_TEXT_DOMAIN );
								$coupon_amount = wc_price( $coupon_amount );
								break;

							case 'fixed_cart':
								$coupon_type = __( 'Cart Discount', WC_SC_TEXT_DOMAIN );
								$coupon_amount = wc_price( $coupon_amount );
								break;

							case 'fixed_product':
								$coupon_type = __( 'Product Discount', WC_SC_TEXT_DOMAIN );
								$coupon_amount = wc_price( $coupon_amount );
								break;

							case 'percent_product':
								$coupon_type = __( 'Product Discount', WC_SC_TEXT_DOMAIN );
								$coupon_amount = $coupon_amount . '%';
								break;

							case 'percent':
								$coupon_type = ( $this->is_wc_gte_30() ) ? __( 'Percentage Discount', WC_SC_TEXT_DOMAIN ) : __( 'Cart Discount', WC_SC_TEXT_DOMAIN );
								$coupon_amount = $coupon_amount . '%';
								break;

						}

						$discount_type = ' ( ' . $coupon_amount . ' ' . $coupon_type . ' )';
						$discount_type = wp_strip_all_tags( $discount_type );

						$found_products[ get_the_title( $post->ID ) ] = get_the_title( $post->ID ) . ' ' . $discount_type;
					}
				}
			}

			if ( ! empty( $found_products ) ) {
				echo json_encode( $found_products );
			}

			die();
		}

		/**
		 * Function to Hide Notice Delete After Usage
		 */
		public function hide_notice_delete_after_usage() {

			check_ajax_referer( 'hide-smart-coupons-notice', 'security' );

			$current_user_id = get_current_user_id();
		    update_user_meta( $current_user_id, 'hide_delete_credit_after_usage_notice', 'yes' );

		    echo json_encode( array( 'message' => 'success' ) );
		    die();

        }

	}

}

new WC_SC_Ajax();


text:
<?xml version="1.0" encoding="UTF-8"?>

		<sect1 id="language.function.foreach">
			<title>foreach,foreachelse</title>
            <informaltable frame="all">
                <tgroup cols="5">
                <colspec colname="param" align="center" />
                <colspec colname="type" align="center" />
                <colspec colname="required" align="center" />
                <colspec colname="default" align="center" />
                <colspec colname="desc" />

                    <row>
                        <entry>Nome do Atributo</entry>
                        <entry>Tipo</entry>
                        <entry>Obrigatório</entry>
                        <entry>Padrão</entry>
                        <entry>Descrição</entry>
                    </row>

                    <row>
                        <entry>from</entry>
                        <entry>string</entry>
                        <entry>Sim</entry>
                        <entry><emphasis>n/d</emphasis></entry>
                        <entry>O nome da matriz que você estará pegando os elementos</entry>
                    </row>
                    <row>
                        <entry>item</entry>
                        <entry>string</entry>
                        <entry>Yes</entry>
                        <entry><emphasis>n/d</emphasis></entry>
                        <entry>O nome da variável
                        que é o elemento atual</entry>
                    </row>
                    <row>
                        <entry>key</entry>
                        <entry>string</entry>
                        <entry>Não</entry>
						<entry><emphasis>n/d</emphasis></entry>
						<entry>O nome da variável que é a chave atual</entry>
                    </row>
                    <row>
                        <entry>name</entry>
                        <entry>string</entry>
                        <entry>Não</entry>
                        <entry><emphasis>n/d</emphasis></entry>
						<entry>O nome do loop foreach para acessar as
						propriedades foreach</entry>
                    </row>

                </tgroup>
            </informaltable>
			<para>
			Loops <emphasis>foreach</emphasis> são uma alternativa para loops
			<emphasis>section</emphasis>. <emphasis>foreach</emphasis> é usado
			para pegar cada elemento de uma matriz associativa simples.
			A sintaxe para <emphasis>foreach</emphasis> é muito mais simples do que
			<emphasis>section</emphasis>, mas tem a desvantagem de poder ser usada
			apenas para uma única matriz. Tags <emphasis>foreach</emphasis> devem ter
			seu par <emphasis>/foreach</emphasis>. Os parâmetros requeridos são
			<emphasis>from</emphasis> e <emphasis>item</emphasis>. O nome do loop
			foreach pode ser qualquer coisa que você queira, feito de letras, números
			e sublinhados. Loops <emphasis>foreach</emphasis>
			podem ser aninhados, e o nome dos loops aninhados devem ser diferentes
			um dos outros. A variável <emphasis>from</emphasis> (normalmente uma
			matriz de valores) determina o número de vezes do loop
			<emphasis>foreach</emphasis>.
			<emphasis>foreachelse</emphasis> é executado quando não houverem mais valores
			na variável <emphasis>from</emphasis>.
			</para>
<example>
<title>foreach</title>
<programlisting>
<![CDATA[
{* este exemplo irá mostrar todos os valores da matriz $custid *}
{foreach from=$custid item=curr_id}
	id: {$curr_id}

{/foreach}
]]>
</programlisting>
<para>MOSTRA:</para>
<programlisting>
<![CDATA[
id: 1000

id: 1001

id: 1002

]]>
</programlisting>
</example>

<example>
<title>foreach key</title>
<programlisting>
<![CDATA[
{* A key contém a chave para cada valor do loop

A definição se parece com isso:

$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
      array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));

*}

{foreach name=outer item=contact from=$contacts}
  {foreach key=key item=item from=$contact}
    {$key}: {$item}

  {/foreach}
{/foreach}
]]>
</programlisting>
<para>MOSTRA:</para>
<programlisting>
<![CDATA[
phone: 1

fax: 2

cell: 3

phone: 555-4444

fax: 555-3333

cell: 760-1234

]]>
</programlisting>
</example>

		<para>
		Loop foreach também tem as suas próprias variáveis para manipilar as propriedades
		foreach. Estas são indicadas assim: {$smarty.foreach.foreachname.varname} com
		foreachname sendo o nome especificado no atributo
		<emphasis>name</emphasis> do foreach.
		</para>

			<sect2 id="foreach.property.iteration">
			<title>iteration</title>
			<para>
        	iteration é usado para mostrar a interação atual do loop.
			</para>
			<para>
			Iteration sempre começa em 1 e
			é incrementado um a um em cada interação.
			</para>
			</sect2>

			<sect2 id="foreach.property.first">
			<title>first</title>
			<para>
        	<emphasis>first</emphasis> é definido como true se a interação atual
        	do foreach for a primeira.
			</para>
			</sect2>

			<sect2 id="foreach.property.last">
			<title>last</title>
			<para>
        	<emphasis>last</emphasis> é definido como true se a interação atual
        	do foreach for a última.
			</para>
			</sect2>

			<sect2 id="foreach.property.show">
			<title>show</title>
			<para>
        	<emphasis>show</emphasis> é usado como parâmetro para o foreach.
        	<emphasis>show</emphasis> é um valor booleano, true ou false. Se
        	false, o foreach não será mostrado. Se tiver um foreachelse
        	presente, este será alternativamente mostrado.
			</para>

			</sect2>
			<sect2 id="foreach.property.total">
			<title>total</title>
			<para>
			<emphasis>total</emphasis> é usado para mostrar o número de interações do
			foreach. Isto pode ser usado dentro ou depois do foreach.
			</para>
			</sect2>

</sect1>


text:
<?php
/**
 * Created by PhpStorm.
 * User: reglobbe
 * Date: 28/8/15
 * Time: 10:32 AM
 */

namespace auction\components;

use GuzzleHttp\Client;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\RequestException;

class JAPI extends \common\components\JAPI{

    public function process($p_api_url,$p_method = JAPI::HTTP_METHOD_GET,$p_data = array(),$p_raw_data= null,$p_raw_data_type = null,$p_unmask_status = false){
        $client = new Client([
            'base_uri'=>$this->baseAPIUrl,
            'timeout'  => $this->timeout,
            'verify'=>false,
            'allow_redirects'=>[
                'max'       => $this->maxRedirects,
                //'strict'    => false,
                //'referer'   => true,
                //'protocols' => ['http', 'https']
            ],
            'stream' => true
            //proxy'           => '192.168.16.1:10',
        ]);
        //NOT HANDLED
        /*
         * 'keepalive'    => $this->keepalive
         *  $client->setUnmaskStatus($p_unmask_status);
         */
        $options = array();

        $p_method = ($p_method == self::HTTP_METHOD_POST || $p_method == JAPI::HTTP_METHOD_DELETE || $p_method == JAPI::HTTP_METHOD_PUT)?$p_method:JAPI::HTTP_METHOD_GET;
        if($p_raw_data != null){
            $options["body"] = $p_raw_data;
            if($p_raw_data_type != null){
                $options["headers"]["Content-Type"] = $p_raw_data_type;
            }
        }
        if(is_array($p_data) && count($p_data) > 0){
            if($p_method == JAPI::HTTP_METHOD_POST || $p_method == JAPI::HTTP_METHOD_PUT){
                $options["form_params"] = $p_data;
            }else{
                $options["query"] = $p_data;
            }
        }

        $p_api_url = strrpos($p_api_url,"/") === 0 ? substr($p_api_url,1):$p_api_url;//REMOVING THE STARTING SLASH "/"
        try {
            $response = $client->request($p_method,$p_api_url, $options);
            if($response->getStatusCode() == 200){
                return $response->getBody()->getContents();
            }else{
                //TODO HANDLE ERRORS
                return null;
            }
        } catch (BadResponseException $e) {

            $responseBody = $e->getResponse()->getBody();

            $responseContent='';
            $i=0;
            while(!$responseBody->eof()){
                $i++;
                $responseContent.=  $responseBody->read($i);
            }

            return $responseContent;
        }
    }

}


text:
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.IO;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;

namespace Microsoft.DotNet.Tests.EndToEnd
{
    public class GivenDotNetUsesMSBuild : TestBase
    {
        [Fact]
        public void ItCanNewRestoreBuildRunCleanMSBuildProject()
        {
            using (DisposableDirectory directory = Temp.CreateDirectory())
            {
                string projectDirectory = directory.Path;

                new NewCommand()
                    .WithWorkingDirectory(projectDirectory)
                    .Execute("-t msbuild")
                    .Should()
                    .Pass();

                new Restore3Command()
                    .WithWorkingDirectory(projectDirectory)
                    .Execute()
                    .Should()
                    .Pass();

                new Build3Command()
                    .WithWorkingDirectory(projectDirectory)
                    .Execute()
                    .Should()
                    .Pass();

                //TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below.
                new Run3Command()
                    .WithWorkingDirectory(projectDirectory)
                    .ExecuteWithCapturedOutput("--framework netcoreapp1.0")
                    .Should()
                    .Pass()
                    .And
                    .HaveStdOutContaining("Hello World!");

                var binDirectory = new DirectoryInfo(projectDirectory).Sub("bin");
                binDirectory.Should().HaveFilesMatching("*.dll", SearchOption.AllDirectories);

                new Clean3Command()
                    .WithWorkingDirectory(projectDirectory)
                    .Execute()
                    .Should()
                    .Pass();

                binDirectory.Should().NotHaveFilesMatching("*.dll", SearchOption.AllDirectories);
            }
        }

        [Fact]
        public void ItCanRunToolsInACSProj()
        {
            var testAppName = "MSBuildTestApp";
            var testInstance = TestAssetsManager
                .CreateTestInstance(testAppName);

            var testProjectDirectory = testInstance.TestRoot;

            new Restore3Command()
                .WithWorkingDirectory(testProjectDirectory)
                .Execute()
                .Should()
                .Pass();

            new DotnetCommand()
                .WithWorkingDirectory(testInstance.TestRoot)
                .ExecuteWithCapturedOutput("portable")
                .Should()
                .Pass()
                .And
                .HaveStdOutContaining("Hello Portable World!");;
        }
    }
}


text:
// Exports

export * from './config';
export * from './controller-validate-result';
export * from './get-target-dom-element';
export * from './property-info';
export * from './property-accessor-parser';
export * from './validate-binding-behavior';
export * from './validate-event';
export * from './validate-instruction';
export * from './validate-result';
export * from './validate-trigger';
export * from './validation-controller';
export * from './validation-controller-factory';
export * from './validation-errors-custom-attribute';
export * from './validation-renderer-custom-attribute';
export * from './validation-renderer';
export * from './validator';

export * from './implementation/rule';
export * from './implementation/rules';
export * from './implementation/standard-validator';
export * from './implementation/validation-messages';
export * from './implementation/validation-message-parser';
export * from './implementation/validation-rules';

// Configuration

import { Container } from 'aurelia-dependency-injection';
import { GlobalValidationConfiguration } from './config';
import { ValidationMessageParser } from './implementation/validation-message-parser';
import { PropertyAccessorParser } from './property-accessor-parser';
import { ValidationRules } from './implementation/validation-rules';
import {
  ValidateBindingBehavior,
  ValidateManuallyBindingBehavior,
  ValidateOnBlurBindingBehavior,
  ValidateOnChangeBindingBehavior,
  ValidateOnChangeOrBlurBindingBehavior,
  ValidateOnFocusoutBindingBehavior,
  ValidateOnChangeOrFocusoutBindingBehavior
} from './validate-binding-behavior';
import { ValidationErrorsCustomAttribute } from './validation-errors-custom-attribute';
import { ValidationRendererCustomAttribute } from './validation-renderer-custom-attribute';

/**
 * Configures the plugin.
 */
export function configure(
  // tslint:disable-next-line:ban-types
  frameworkConfig: { container: Container, globalResources?: (...resources: any[]) => any },
  callback?: (config: GlobalValidationConfiguration) => void
) {
  // the fluent rule definition API needs the parser to translate messages
  // to interpolation expressions.
  const messageParser = frameworkConfig.container.get(ValidationMessageParser);
  const propertyParser = frameworkConfig.container.get(PropertyAccessorParser);
  ValidationRules.initialize(messageParser, propertyParser);

  // configure...
  const config = new GlobalValidationConfiguration();
  if (callback instanceof Function) {
    callback(config);
  }
  config.apply(frameworkConfig.container);

  // globalize the behaviors.
  if (frameworkConfig.globalResources) {
    frameworkConfig.globalResources(
      ValidateBindingBehavior,
      ValidateManuallyBindingBehavior,
      ValidateOnBlurBindingBehavior,
      ValidateOnFocusoutBindingBehavior,
      ValidateOnChangeBindingBehavior,
      ValidateOnChangeOrBlurBindingBehavior,
      ValidateOnChangeOrFocusoutBindingBehavior,
      ValidationErrorsCustomAttribute,
      ValidationRendererCustomAttribute);
  }
}


text:
<?php

namespace Jstewmc\Rtf\Element\Control\Word\FontFamily;

/**
 * Swiss, proportionally spaced sans serif fonts
 */
class Fswiss extends FontFamily
{
    protected string $fonts = 'Arial';

    public function __construct()
    {
        parent::__construct('fswiss');
    }
}


text:
package org.artifactory.api.rest.constant;

/**
 * @author Tomer Cohen
 */
public interface ImportRestConstants {
    String PATH_ROOT = "import";
    String SYSTEM_PATH = "system";
    String REPOSITORIES_PATH = "repositories";
}


text:
#pragma once
#include "afx.h"

class CResetPacket :
	public CPacket
{
	DECLARE_DYNAMIC(CResetPacket)
public:
	CResetPacket(void);
	~CResetPacket(void);

public:
	bool InitPacket(void);
protected:
	bool PacketToStream(BYTE *buf, unsigned int *size); //convert the packet into a stream of bytes
	bool StreamToPacket(BYTE *buf, unsigned int *size);	//convert a stream of bytes into a packet
};


text:
class CDeterministicMint;
class CzNPCWallet;

class CzNPCTracker
{
private:
    bool fInitialized;
    std::string strWalletFile;
    std::map<uint256, CMintMeta> mapSerialHashes;
    std::map<uint256, uint256> mapPendingSpends; //serialhash, txid of spend
    std::map<uint256, std::unique_ptr<CoinWitnessData> > mapStakeCache; //serialhash, witness value, height
    bool UpdateStatusInternal(const std::set<uint256>& setMempool, CMintMeta& mint);
public:
    CzNPCTracker(std::string strWalletFile);
    ~CzNPCTracker();
    void Add(const CDeterministicMint& dMint, bool isNew = false, bool isArchived = false, CzNPCWallet* zNPCWallet = NULL);
    void Add(const CZerocoinMint& mint, bool isNew = false, bool isArchived = false);
    bool Archive(CMintMeta& meta);
    bool HasPubcoin(const CBigNum& bnValue) const;
    bool HasPubcoinHash(const uint256& hashPubcoin) const;
    bool HasSerial(const CBigNum& bnSerial) const;
    bool HasSerialHash(const uint256& hashSerial) const;
    bool HasMintTx(const uint256& txid);
    bool IsEmpty() const { return mapSerialHashes.empty(); }
    void Init();
    CMintMeta Get(const uint256& hashSerial);
    CMintMeta GetMetaFromPubcoin(const uint256& hashPubcoin);
    bool GetMetaFromStakeHash(const uint256& hashStake, CMintMeta& meta) const;
    CAmount GetBalance(bool fConfirmedOnly, bool fUnconfirmedOnly) const;
    std::vector<uint256> GetSerialHashes();
    mutable CCriticalSection cs_spendcache;
    CoinWitnessData* GetSpendCache(const uint256& hashStake) EXCLUSIVE_LOCKS_REQUIRED(cs_spendcache);
    bool ClearSpendCache() EXCLUSIVE_LOCKS_REQUIRED(cs_spendcache);
    std::vector<CMintMeta> GetMints(bool fConfirmedOnly) const;
    CAmount GetUnconfirmedBalance() const;
    std::set<CMintMeta> ListMints(bool fUnusedOnly, bool fMatureOnly, bool fUpdateStatus, bool fWrongSeed = false, bool fExcludeV1 = false);
    void RemovePending(const uint256& txid);
    void SetPubcoinUsed(const uint256& hashPubcoin, const uint256& txid);
    void SetPubcoinNotUsed(const uint256& hashPubcoin);
    bool UnArchive(const uint256& hashPubcoin, bool isDeterministic);
    bool UpdateZerocoinMint(const CZerocoinMint& mint);
    bool UpdateState(const CMintMeta& meta);
    void Clear();
};

#endif //NPCcoin_ZNPCTRACKER_H


text:
/////////////////////////////////////////////////////////////////////////////
// Shell Extension wrappers
//
// Written by Bjarke Viksoe (bjarke@viksoe.dk)
// Copyright (c) 2009 Bjarke Viksoe.
//
// This code may be used in compiled form in any way you desire. This
// source file may be redistributed by any means PROVIDING it is
// not sold for profit without the authors written consent, and
// providing that this notice and the authors name is included.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability if it causes any damage to you or your
// computer whatsoever. It's free, so don't hassle me about it.
//
// Beware of bugs.
//

#pragma once

#if !defined(STRICT_TYPED_ITEMIDS)
#error You must define STRICT_TYPED_ITEMIDS in the stdafx.h header
#endif

#include <propkey.h>
#include <propvarutil.h>
#pragma comment (lib, "propsys.lib")

///////////////////////////////////////////////////////////////////////////////
// CPidl

class CPidl
{
public:
   PIDLIST_ABSOLUTE m_p;

   // Constructor/Destructor

   CPidl() : m_p(NULL)
   {
   }

   ~CPidl()
   {
      Delete();
   }

   CPidl(const CPidl& pidl)
   {
      m_p = ILCloneFull(pidl.m_p);
   }

   CPidl(PCIDLIST_ABSOLUTE pidl)
   {
      m_p = ILCloneFull(pidl);
   }

   CPidl(PCUIDLIST_RELATIVE pidl)
   {
      m_p = ILCloneFull((PCUIDLIST_ABSOLUTE) pidl);
   }

   CPidl(PCUITEMID_CHILD pidl)
   {
      m_p = (PIDLIST_ABSOLUTE) ILCloneChild(pidl);
   }

   CPidl(PCIDLIST_ABSOLUTE pidl, PCUIDLIST_RELATIVE pidlPath)
   {
      m_p = ::ILCombine(pidl, pidlPath);
   }

   CPidl(PCIDLIST_ABSOLUTE pidl, PCUIDLIST_RELATIVE pidlPath, PCUITEMID_CHILD pidlChild)
   {
      m_p = ::ILCombine(pidl, pidlPath);
      if( pidlChild != NULL ) m_p = (PIDLIST_ABSOLUTE) ::ILAppendID(m_p, (LPSHITEMID) pidlChild, TRUE);
   }

   // Operations

   void Delete()
   {
      if( m_p != NULL ) ::ILFree(m_p);
      m_p = NULL;
   }

   BOOL Create(LPSHITEMID pSrcItem)
   {
      Delete();
      m_p = (PIDLIST_ABSOLUTE) ::ILAppendID(NULL, pSrcItem, TRUE);
      return m_p != NULL;
   }

   BOOL CreateDelegate(IMalloc* pMalloc, LPSHITEMID pSrcItem)
   {
      Delete();
      // Returns a PDELEGATEITEMID
      LPBYTE pDelegate = (LPBYTE) pMalloc->Alloc(pSrcItem->cb);
      if( pDelegate == NULL ) return FALSE;
      ::CopyMemory(pDelegate + 4, pSrcItem, pSrcItem->cb);
      m_p = reinterpret_cast<PIDLIST_ABSOLUTE>(pDelegate);
      return TRUE;
   }

   BOOL CreateFromPath(LPCSTR pstrFilename)
   {
      Delete();
      m_p = ::ILCreateFromPathA(pstrFilename);
      return m_p != NULL;
   }

   BOOL CreateFromPath(LPCWSTR pstrFilename)
   {
      Delete();
      m_p = ::ILCreateFromPathW(pstrFilename);
      return m_p != NULL;
   }

   BOOL CreateFromObject(IUnknown* pUnk)
   {
      Delete();
      return ::SHGetIDListFromObject(pUnk, &m_p) == S_OK;
   }

   BOOL CreateFromDisplayName(PCWSTR pszName, IBindCtx* pbc = NULL)
   {
      Delete();
      SFGAOF FlagsOut = 0;
      return ::SHParseDisplayName(pszName, pbc, &m_p, 0, &FlagsOut) == S_OK;
   }

   BOOL CreateFromKnownFolder(REFKNOWNFOLDERID FolderId, DWORD dwFlags = 0, HANDLE hToken = NULL)
   {
      Delete();
      return ::SHGetKnownFolderIDList(FolderId, dwFlags, hToken, &m_p) == S_OK;
   }

   BOOL Copy(PCIDLIST_ABSOLUTE pidl)
   {
      Delete();
      m_p = ILCloneFull(pidl);
      return m_p != NULL;
   }

   BOOL Copy(PCIDLIST_RELATIVE pidl)
   {
      Delete();
      m_p = ILCloneFull((PCIDLIST_ABSOLUTE) pidl);
      return m_p != NULL;
   }

   BOOL Copy(PCUITEMID_CHILD_ARRAY rgpidl, int cidl)
   {
      Delete();
      for( int i = 0; i < cidl; i++ ) m_p = (PIDLIST_ABSOLUTE) ::ILAppendID(m_p, (LPSHITEMID) rgpidl[i], TRUE);
      return m_p != NULL;
   }

   BOOL Append(PCUIDLIST_RELATIVE pidl)
   {
      PIDLIST_ABSOLUTE p = ::ILCombine(m_p, pidl);
      if( m_p != NULL ) ::ILFree(m_p);
      m_p = p;
      return p != NULL;
   }

   BOOL Append(PCUITEMID_CHILD pidl)
   {
      ATLASSERT(pidl);
      if( pidl != NULL ) m_p = (PIDLIST_ABSOLUTE) ::ILAppendID(m_p, (LPSHITEMID) pidl, TRUE);
      return m_p != NULL;
   }

   BOOL Append(const CPidl& pidl)
   {
      return Append((PCUIDLIST_RELATIVE) pidl.m_p);
   }

   BOOL AppendSHItemID(LPSHITEMID pSHItemID, BOOL bAppend = TRUE)
   {
      ATLASSERT(pSHItemID != NULL);
      if( pSHItemID != NULL ) m_p = (PIDLIST_ABSOLUTE) ::ILAppendID(m_p, pSHItemID, bAppend);
      return m_p != NULL;
   }

   BOOL IsEqual(PCIDLIST_ABSOLUTE pidl) const
   {
      ATLASSERT(m_p != NULL);
      return ::ILIsEqual(m_p, pidl);
   }

   BOOL IsSamePIDL(PCIDLIST_ABSOLUTE pidl) const
   {
      IShellFolder* pFolder = NULL;
      if( FAILED( ::SHGetDesktopFolder(&pFolder) ) ) return FALSE;
      HRESULT Hr = pFolder->CompareIDs(0, (PCUIDLIST_RELATIVE) m_p, (PCUIDLIST_RELATIVE) pidl);
      pFolder->Release();
      return (SUCCEEDED(Hr) && HRESULT_CODE(Hr) == 0);
   }

   CPidl& operator =(const CPidl& pidl)
   {
      Copy(pidl.m_p);
      return *this;
   }

   CPidl& operator =(PCIDLIST_ABSOLUTE pidl)
   {
      Copy(pidl);
      return *this;
   }

   bool operator ==(const CPidl& pidl) const
   {
      return IsEqual(pidl.m_p) == TRUE;
   }

   bool operator ==(PCIDLIST_ABSOLUTE pidl) const
   {
      return IsEqual(pidl) == TRUE;
   }

   bool operator !=(const CPidl& pidl) const
   {
      return IsEqual(pidl.m_p) != TRUE;
   }

   bool operator !=(PCIDLIST_ABSOLUTE pidl) const
   {
      return IsEqual(pidl) != TRUE;
   }

   CPidl& operator +=(const CPidl& pidl)
   {
      Append(pidl.m_p);
      return *this;
   }

   CPidl& operator +=(PCUIDLIST_ABSOLUTE pidl)
   {
      Append(pidl);
      return *this;
   }

   CPidl& operator +=(PCUIDLIST_RELATIVE pidl)
   {
      Append(pidl);
      return *this;
   }

   PIDLIST_RELATIVE* operator&()
   {
      return (PIDLIST_RELATIVE*) &m_p;
   }

   operator PIDLIST_RELATIVE() const
   {
      return m_p;
   }

   operator PIDLIST_ABSOLUTE() const
   {
      return m_p;
   }

   bool operator!() const
   {
      return IsEmpty() == TRUE;
   }

   PIDLIST_ABSOLUTE GetData() const
   {
      return m_p;
   }

   PCUIDLIST_RELATIVE GetNextItem() const
   {
      ATLASSERT(m_p != NULL);
      return ::ILGetNext((PCUIDLIST_RELATIVE) m_p);
   }

   BOOL IsNull() const
   {
      return m_p == NULL;
   }

   BOOL IsEmpty() const
   {
      return ILIsEmpty((PCUIDLIST_RELATIVE) m_p);
   }

   UINT GetByteSize() const
   {
      return ::ILGetSize((PCUIDLIST_RELATIVE) m_p);
   }

   BOOL RemoveLastItem()
   {
      ATLASSERT(m_p != NULL);
      return ::ILRemoveLastID((PUIDLIST_RELATIVE) m_p);
   }

   BOOL IsParent(PCIDLIST_ABSOLUTE pidl, BOOL bImmediate = TRUE) const
   {
      ATLASSERT(m_p != NULL);
      return ::ILIsParent(m_p, pidl, bImmediate);
   }

   PUITEMID_CHILD GetLastItem() const
   {
      ATLASSERT(m_p != NULL);
      return ::ILFindLastID((PCUIDLIST_RELATIVE) m_p);
   }

   // Returns a pointer to the pidl(s) beginning at the position.
   // Actual return-type is PUIDLIST_RELATIVE!
   PUITEMID_CHILD GetItem(int iIndex) const
   {
      if( iIndex < 0 ) return NULL;
      if( ::ILIsEmpty(m_p) ) return NULL;
      if( iIndex == 0 ) return (PUITEMID_CHILD) m_p;
      PUIDLIST_RELATIVE pidlItem = ::ILGetNext((PCUIDLIST_RELATIVE) m_p);
      while( !::ILIsEmpty(pidlItem) ) {
         if( --iIndex <= 0 ) return (PUITEMID_CHILD) pidlItem;
         pidlItem = ::ILGetNext(pidlItem);
      }
      return NULL;
   }

   HRESULT CopyTo(PIDLIST_ABSOLUTE* ppPidl) const
   {
      ATLASSERT(ppPidl != NULL);
      ATLASSERT(*ppPidl == NULL);
      *ppPidl = ILCloneFull(m_p);
      return S_OK;
   }

   BOOL IsChild() const
   {
      return ILIsChild((PCUIDLIST_RELATIVE) m_p);
   }

   PUIDLIST_RELATIVE FindChild(PCIDLIST_ABSOLUTE pidl) const
   {
      ATLASSERT(m_p != NULL);
      return ::ILFindChild(m_p, pidl);
   }

   UINT GetItemCount() const
   {
      if( IsEmpty() ) return 0;
      UINT nCount = 0;
      PCUIDLIST_RELATIVE pidlItem = m_p;
      while( (pidlItem = ::ILGetNext(pidlItem)) != NULL ) nCount++;
      return nCount;
   }

   void Attach(PIDLIST_ABSOLUTE pidl)
   {
      Delete();
      m_p = pidl;
   }

   void Attach(PIDLIST_RELATIVE pidl)
   {
      Delete();
      m_p = (PIDLIST_ABSOLUTE) pidl;
   }

   PIDLIST_ABSOLUTE Detach()
   {
      PIDLIST_ABSOLUTE pidlItem = m_p;
      m_p = NULL;
      return pidlItem;
   }

   BOOL IsAligned() const
   {
      return ILIsAligned((PCUIDLIST_RELATIVE) m_p);
   }

   PITEMID_CHILD CloneItem(int iIndex)
   {
      PUIDLIST_RELATIVE pidlItem = (PUIDLIST_RELATIVE) m_p;
      while( --iIndex >= 0 && pidlItem != NULL ) pidlItem = ::ILGetNext(pidlItem);
      if( pidlItem != NULL ) return ILCloneChild( (PUITEMID_CHILD) pidlItem );
      return NULL;
   }

   HRESULT LoadFromStream(IStream* pStream)
   {
      ATLASSERT(pStream != NULL);
      Delete();
      return ::ILLoadFromStream(pStream, (PIDLIST_RELATIVE*) &m_p);
   }

   HRESULT SaveToStream(IStream* pStream)
   {
      ATLASSERT(pStream != NULL);
      return ::ILSaveToStream(pStream, (PIDLIST_RELATIVE) m_p);
   }

   HRESULT GetName(SIGDN sigdnName, LPWSTR* ppszName)
   {
      ATLASSERT(m_p != NULL);
      return ::SHGetNameFromIDList(m_p, sigdnName, ppszName);
   }

   friend CPidl __stdcall operator +(const CPidl& string1, const CPidl& string2);
};

// CPidl "operator +" function

inline CPidl __stdcall operator +(const CPidl& pidl1, const CPidl& pidl2)
{
   CPidl pidl(pidl1);
   pidl.Append(pidl2);
   return pidl;
}

// CPidl helpers

inline VOID SHChangeNotify(LONG wEventId, UINT uFlags, const CPidl& pidl)
{
   ATLASSERT((uFlags & SHCNF_TYPE) == SHCNF_IDLIST);
   ATLASSERT(!pidl.IsNull());
   ::SHChangeNotify(wEventId, uFlags, pidl.GetData(), NULL);
}

inline VOID SHChangeNotify(LONG wEventId, UINT uFlags, const CPidl& pidl1, const CPidl& pidl2)
{
   ATLASSERT((uFlags & SHCNF_TYPE) == SHCNF_IDLIST);
   ATLASSERT(!pidl1.IsNull() && !pidl2.IsNull());
   ::SHChangeNotify(wEventId, uFlags, pidl1.GetData(), pidl2.GetData());
}

/////////////////////////////////////////////////////////////////////////////
// CPidlEnum

class ATL_NO_VTABLE CPidlEnum :
   public CComObjectRootEx<CComSingleThreadModel>,
   public IEnumIDList
{
public:
   CPidl m_pidl;
   PCUIDLIST_RELATIVE m_pCur;
   ULONG m_lCount;
   ULONG m_lPos;

   // Constructor

   CPidlEnum() : m_lCount(0), m_lPos(0), m_pCur(NULL)
   {
   }

DECLARE_NO_REGISTRY()

BEGIN_COM_MAP(CPidlEnum)
   COM_INTERFACE_ENTRY(IEnumIDList)
END_COM_MAP()

   // Operations

   HRESULT Init(PCIDLIST_ABSOLUTE pidl)
   {
      m_pidl.Copy(pidl);
      m_lCount = m_pidl.GetItemCount();
      m_lPos = 0;
      m_pCur = m_pidl;
      return S_OK;
   }

   // IEnumIDList

   STDMETHOD(Next)(ULONG celt, PITEMID_CHILD* rgelt, ULONG* pceltFetched)
   {
      ATLTRACE2(atlTraceCOM, 0, _T("IEnumIDList::Next\n"));
      *rgelt = NULL;
      if( pceltFetched != NULL ) *pceltFetched = 0;
      if( pceltFetched == NULL && celt != 1 ) return E_POINTER;
      ULONG nCount = 0;
      while( m_lPos < m_lCount && nCount < celt ) {
         rgelt[nCount++] = ::ILCloneFirst(m_pCur);
         m_pCur = ::ILGetNext(m_pCur);
         m_lPos++;
      }
      if( pceltFetched != NULL ) *pceltFetched = nCount;
      return celt == nCount ? S_OK : S_FALSE;
   }

   STDMETHOD(Reset)(void)
   {
      ATLTRACE2(atlTraceCOM, 0, _T("IEnumIDList::Reset\n"));
      m_lPos = 0;
      m_pCur = m_pidl;
      return S_OK;
   }

   STDMETHOD(Skip)(ULONG celt)
   {
      ATLTRACE2(atlTraceCOM, 0, _T("IEnumIDList::Skip\n"));
      ULONG nCount = 0;
      while( m_lPos < m_lCount && nCount < celt ) {
         m_pCur = ::ILGetNext(m_pCur);
         m_lPos++; nCount++;
      }
      return nCount == celt ? S_OK : S_FALSE;
   }

   STDMETHOD(Clone)(IEnumIDList** /*ppEnum*/)
   {
      ATLTRACENOTIMPL(_T("IEnumIDList::Clone"));
   }
};

//////////////////////////////////////////////////////////////////////////////
// CComEnum helpers

template<>
class _Copy<STATSTG>
{
public:
   static HRESULT copy(STATSTG* p1, const STATSTG* p2)
   {
      ATLENSURE(p1 != NULL && p2 != NULL);
      *p1 = *p2;
      if( p2->pwcsName == NULL ) return S_OK;
      ULONG len = ocslen(p2->pwcsName) + 1;
      p1->pwcsName = (LPOLESTR) ::ATL::AtlCoTaskMemCAlloc(len, (ULONG) sizeof(OLECHAR));
      if( p1->pwcsName == NULL ) return E_OUTOFMEMORY;
      if( ocscpy_s(p1->pwcsName, len, p2->pwcsName) == 0 ) return E_FAIL;
      return S_OK;
   }
   static void init(STATSTG* p) { p->pwcsName = NULL; }
   static void destroy(STATSTG* p) { ::CoTaskMemFree(p->pwcsName); }
};

/////////////////////////////////////////////////////////////////////////////
// CFileSystemBindData

class ATL_NO_VTABLE CFileSystemBindData :
   public CComObjectRootEx<CComSingleThreadModel>,
   public IFileSystemBindData
{
public:
   WIN32_FIND_DATAW m_wfd;

   // Constructor

   CFileSystemBindData()
   {
      ::ZeroMemory(&m_wfd, sizeof(m_wfd));
   }

DECLARE_NO_REGISTRY()

BEGIN_COM_MAP(CFileSystemBindData)
   COM_INTERFACE_ENTRY(IFileSystemBindData)
END_COM_MAP()

   // IFileSystemBindData

   STDMETHOD(SetFindData)(const WIN32_FIND_DATAW* pfd)
   {
      m_wfd = *pfd;
      return S_OK;
   }

   STDMETHOD(GetFindData)(WIN32_FIND_DATAW* pfd)
   {
      *pfd = m_wfd;
      return S_OK;
   }
};

//////////////////////////////////////////////////////////////////////////////
// IShellFolderViewCBImpl

template< class T >
class ATL_NO_VTABLE IShellFolderViewCBImpl : public IShellFolderViewCB
{
public:
   STDMETHOD(MessageSFVCB)(UINT uMsg, WPARAM wParam, LPARAM lParam)
   {
      ATLTRACE2(atlTraceCOM, 0, _T("IShellFolderViewCB::MessageSFVCB  msg=%ld wp=0x%X lp=0x%X\n"), uMsg, wParam, lParam);
      LRESULT lResult = 0;
      T* pT = static_cast<T*>(this); pT;
      BOOL bResult = pT->ProcessWindowMessage(NULL, uMsg, wParam, lParam, lResult, 0);
      return bResult ? (HRESULT) lResult : E_NOTIMPL;
   }
};

///////////////////////////////////////////////////////////////////////////////
// Propertykey

#ifndef _PROPERTYKEY_EQUALITY_OPERATORS_
#define _PROPERTYKEY_EQUALITY_OPERATORS_

inline int operator ==(REFPROPERTYKEY pkeyOne, REFPROPERTYKEY pkeyOther)
{
    return IsEqualPropertyKey(pkeyOne, pkeyOther);
}

inline int operator !=(REFPROPERTYKEY pkeyOne, REFPROPERTYKEY pkeyOther)
{
    return !(pkeyOne == pkeyOther);
}

#endif // _PROPERTYKEY_EQUALITY_OPERATORS_

///////////////////////////////////////////////////////////////////////////////
// CComPropVariant

class CComPropVariant : public tagPROPVARIANT
{
public:
   CComPropVariant()
   {
      ::PropVariantInit(this);
   }

   ~CComPropVariant()
   {
      Clear();
   }

   CComPropVariant(const PROPVARIANT& varSrc)
   {
      vt = VT_EMPTY;
      InternalCopy(&varSrc);
   }

   CComPropVariant(const CComPropVariant& varSrc)
   {
      vt = VT_EMPTY;
      InternalCopy(&varSrc);
   }

   CComPropVariant(const VARIANT& varSrc)
   {
      vt = VT_EMPTY;
      ::VariantToPropVariant(&varSrc, this);
   }

   CComPropVariant(const CComVariant& varSrc)
   {
      vt = VT_EMPTY;
      ::VariantToPropVariant(&varSrc, this);
   }

   CComPropVariant(bool bSrc)
   {
      ::InitPropVariantFromBoolean(bSrc ? TRUE : FALSE, this);
   }

   CComPropVariant(BYTE iSrc)
   {
      vt = VT_UI1;
      bVal = iSrc;
   }

   CComPropVariant(SHORT iSrc)
   {
      ::InitPropVariantFromInt16(iSrc, this);
   }

   CComPropVariant(USHORT wSrc)
   {
      ::InitPropVariantFromUInt16(wSrc, this);
   }

   CComPropVariant(LONG lSrc)
   {
      ::InitPropVariantFromInt32(lSrc, this);
   }

   CComPropVariant(ULONG ulSrc)
   {
      ::InitPropVariantFromUInt32(ulSrc, this);
   }

   CComPropVariant(INT iSrc)
   {
      ::InitPropVariantFromInt32(iSrc, this);
   }

   CComPropVariant(UINT uiSrc)
   {
      ::InitPropVariantFromUInt32(uiSrc, this);
   }

   CComPropVariant(LONGLONG llSrc)
   {
      ::InitPropVariantFromInt64(llSrc, this);
   }

   CComPropVariant(ULONGLONG ullSrc)
   {
      ::InitPropVariantFromUInt64(ullSrc, this);
   }

   CComPropVariant(DOUBLE dblSrc, VARTYPE vtSrc = VT_R8)
   {
      vt = vtSrc;
      dblVal = dblSrc;
   }

   CComPropVariant(const FILETIME ftSrc)
   {
      if( FAILED( ::InitPropVariantFromFileTime(&ftSrc, this) ) ) vt = VT_EMPTY;
   }

   CComPropVariant(REFCLSID clsidSrc)
   {
      if( FAILED( ::InitPropVariantFromCLSID(clsidSrc, this) ) ) vt = VT_EMPTY;
   }

   CComPropVariant(BSTR bstrSrc)
   {
      if( FAILED( ::InitPropVariantFromString(bstrSrc, this) ) ) vt = VT_EMPTY;
   }

   CComPropVariant(LPCWSTR pwstrSrc)
   {
      if( FAILED( ::InitPropVariantFromString(pwstrSrc, this) ) ) vt = VT_EMPTY;
   }

   CComPropVariant(LPCVOID pBuffer, UINT cb)
   {
      if( FAILED( ::InitPropVariantFromBuffer(pBuffer, cb, this) ) ) vt = VT_EMPTY;
   }

   bool operator ==(const PROPVARIANT& varSrc) const
   {
      if( vt == VT_NULL && varSrc.vt == VT_NULL ) return true;
      if( vt != varSrc.vt ) return false;
      return ::PropVariantCompare(*this, varSrc) == 0;
   }

   bool operator !=(const PROPVARIANT& varSrc) const
   {
      return !operator==(varSrc);
   }

   int CompareTo(const PROPVARIANT& varSrc, PROPVAR_COMPARE_UNIT Unit = PVCU_DEFAULT, PROPVAR_COMPARE_FLAGS Flags = PVCF_DEFAULT) const
   {
      return ::PropVariantCompareEx(*this, varSrc, Unit, Flags);
   }

   CComPropVariant& operator=(const PROPVARIANT& varSrc)
   {
      if( &varSrc != this ) InternalCopy(&varSrc);
      return *this;
   }

   CComPropVariant& operator=(const CComPropVariant& varSrc)
   {
      if( &varSrc != this ) InternalCopy(&varSrc);
      return *this;
   }

   CComPropVariant& operator=(const VARIANT& varSrc)
   {
      Clear();
      ::VariantToPropVariant(&varSrc, this);
      return *this;
   }

   CComPropVariant& operator=(const CComVariant& varSrc)
   {
      Clear();
      ::VariantToPropVariant(&varSrc, this);
      return *this;
   }

   CComPropVariant& operator=(bool bSrc)
   {
      Clear();
      ::InitPropVariantFromBoolean(bSrc ? TRUE : FALSE, this);
      return *this;
   }

   CComPropVariant& operator=(BYTE iSrc)
   {
      Clear();
      vt = VT_UI1;
      bVal = iSrc;
      return *this;
   }

   CComPropVariant& operator=(SHORT iSrc)
   {
      Clear();
      ::InitPropVariantFromInt16(iSrc, this);
      return *this;
   }

   CComPropVariant& operator=(USHORT wSrc)
   {
      Clear();
      ::InitPropVariantFromUInt16(wSrc, this);
      return *this;
   }

   CComPropVariant& operator=(LONG lSrc)
   {
      Clear();
      ::InitPropVariantFromInt32(lSrc, this);
      return *this;
   }

   CComPropVariant& operator=(ULONG ulSrc)
   {
      Clear();
      ::InitPropVariantFromUInt32(ulSrc, this);
      return *this;
   }

   CComPropVariant& operator=(INT iSrc)
   {
      Clear();
      ::InitPropVariantFromInt32(iSrc, this);
      return *this;
   }

   CComPropVariant& operator=(UINT uiSrc)
   {
      Clear();
      ::InitPropVariantFromUInt32(uiSrc, this);
      return *this;
   }

   CComPropVariant& operator=(LONGLONG llSrc)
   {
      Clear();
      ::InitPropVariantFromInt64(llSrc, this);
      return *this;
   }

   CComPropVariant& operator=(ULONGLONG ullSrc)
   {
      Clear();
      ::InitPropVariantFromUInt64(ullSrc, this);
      return *this;
   }

   CComPropVariant& operator=(DOUBLE dblSrc)
   {
      Clear();
      ::InitPropVariantFromDouble(dblSrc, this);
      return *this;
   }

   CComPropVariant& operator=(BSTR bstrSrc)
   {
      Clear();
      ::InitPropVariantFromString(bstrSrc, this);
      return *this;
   }

   CComPropVariant& operator=(LPCWSTR pwstrSrc)
   {
      Clear();
      ::InitPropVariantFromString(pwstrSrc, this);
      return *this;
   }

   CComPropVariant& operator=(const FILETIME ftSrc)
   {
      Clear();
      ::InitPropVariantFromFileTime(&ftSrc, this);
      return *this;
   }

   CComPropVariant& operator=(CLSID clsidSrc)
   {
      Clear();
      ::InitPropVariantFromCLSID(clsidSrc, this);
      return *this;
   }

   HRESULT SetByScode(SCODE scSrc, VARTYPE vtSrc = VT_ERROR)
   {
      Clear();
      vt = vtSrc;
      scode = scSrc;
      return S_OK;
   }

   HRESULT SetByBuffer(LPCVOID pBuffer, UINT cb)
   {
      HRESULT Hr = Clear();
      if( FAILED(Hr) ) return Hr;
      return ::InitPropVariantFromBuffer(pBuffer, cb, this);
   }

   HRESULT SetByStrRet(STRRET* pStrRet, PCUITEMID_CHILD pidl)
   {
      HRESULT Hr = Clear();
      if( FAILED(Hr) ) return Hr;
      return ::InitPropVariantFromStrRet(pStrRet, pidl, this);
   }

   BOOL LoadString(UINT nID)
   {
      Clear();
      return ::InitPropVariantFromResource(_pModule->GetResourceInstance(), nID, this) == S_OK;
   }

   BOOL LoadString(HINSTANCE hInstance, UINT nID)
   {
      Clear();
      return ::InitPropVariantFromResource(hInstance, nID, this) == S_OK;
   }

   HRESULT CoerceToCanonicalValue(REFPROPERTYKEY pkey)
   {
      return ::PSCoerceToCanonicalValue(pkey, this);
   }

   HRESULT Attach(PROPVARIANT* pSrc)
   {
      if( pSrc == NULL ) return E_INVALIDARG;
      HRESULT Hr = Clear();
      if( FAILED(Hr) ) return Hr;
      Checked::memcpy_s(static_cast<PROPVARIANT*>(this), sizeof(PROPVARIANT), pSrc, sizeof(PROPVARIANT));
      pSrc->vt = VT_EMPTY;
      return S_OK;
   }

   HRESULT Detach(PROPVARIANT* pDest)
   {
      ATLASSERT(pDest != NULL);
      if( pDest == NULL ) return E_POINTER;
      HRESULT Hr = ::PropVariantClear(pDest);
      if( FAILED(Hr) ) return Hr;
      Checked::memcpy_s(pDest, sizeof(PROPVARIANT), static_cast<PROPVARIANT*>(this), sizeof(PROPVARIANT));
      vt = VT_EMPTY;
      return S_OK;
   }

   HRESULT Clear()
   {
      return ::PropVariantClear(this);
   }

   HRESULT CopyTo(PROPVARIANT* pDest) const
   {
      return ::PropVariantCopy(pDest, this);
   }

   HRESULT CopyTo(VARIANT* pDest) const
   {
      ATLASSERT(pDest != NULL);
      ATLASSERT(pDest->vt == VT_EMPTY);
      return ::PropVariantToVariant(this, pDest);
   }

   HRESULT CopyTo(BSTR* pDest) const
   {
      ATLASSERT(pDest != NULL);
      ATLASSERT(*pDest == NULL);
      return ::PropVariantToBSTR(*this, pDest);
   }

   HRESULT ChangeType(VARTYPE vtNew, const PROPVARIANT* pSrc = NULL, PROPVAR_CHANGE_FLAGS Flags = PVCHF_DEFAULT)
   {
      if( pSrc != NULL && pSrc != this ) return ::PropVariantChangeType(this, *pSrc, Flags, vtNew);
      PROPVARIANT vDest = { 0 };
      HRESULT Hr = ::PropVariantChangeType(&vDest, *this, Flags, vtNew);
      if( SUCCEEDED(Hr) ) Hr = Attach(&vDest);
      return Hr;
   }

   HRESULT LoadFromStream(IStream* pStream)
   {
      ATLASSERT(pStream != NULL);
      Clear();
      ULONG cb = 0, cbRead = 0;
      HRESULT Hr = pStream->Read(&cb, sizeof(cb), &cbRead);
      if( SUCCEEDED(Hr) && cb > 0 ) {
         SERIALIZEDPROPERTYVALUE* pSPV = (SERIALIZEDPROPERTYVALUE*) malloc(cb);
         Hr = pStream->Read(pSPV, cb, &cbRead);
         if( SUCCEEDED(Hr) ) Hr = ::StgDeserializePropVariant(pSPV, cb, this);
         free(pSPV);
      }
      return Hr;
   }

   HRESULT SaveToStream(IStream* pStream)
   {
      ATLASSERT(pStream != NULL);
      ULONG cb = 0;
      SERIALIZEDPROPERTYVALUE* pSPV = NULL;
      HRESULT Hr = ::StgSerializePropVariant(this, &pSPV, &cb);
      if( FAILED(Hr) ) return Hr;
      ULONG cbWritten = 0;
      Hr = pStream->Write(&cb, sizeof(cb), &cbWritten);
      if( SUCCEEDED(Hr) ) Hr = pStream->Write(pSPV, cb, &cbWritten);
      ::CoTaskMemFree(pSPV);
      return Hr;
   }

   // Implementation

   HRESULT InternalCopy(const PROPVARIANT* pSrc)
   {
      Clear();
      HRESULT Hr = ::PropVariantCopy(this, pSrc);
      if( FAILED(Hr) ) vt = VT_ERROR, scode = Hr;
      return Hr;
   }
};


text:
/* global Promise, fetch, window, cytoscape, document, tippy, _ */

Promise.all([
  fetch('cy-style.json')
    .then(function(res) {
      return res.json();
    }),
  fetch('data.json')
    .then(function(res) {
      return res.json();
    })
])
  .then(function(dataArray) {
    var h = function(tag, attrs, children){
      var el = document.createElement(tag);

      Object.keys(attrs).forEach(function(key){
        var val = attrs[key];

        el.setAttribute(key, val);
      });

      children.forEach(function(child){
        el.appendChild(child);
      });

      return el;
    };

    var t = function(text){
      var el = document.createTextNode(text);

      return el;
    };

    var $ = document.querySelector.bind(document);

    var cy = window.cy = cytoscape({
      container: document.getElementById('cy'),
      style: dataArray[0],
      elements: dataArray[1],
      layout: { name: 'random' }
    });

    var params = {
      name: 'cola',
      nodeSpacing: 5,
      edgeLengthVal: 45,
      animate: true,
      randomize: false,
      maxSimulationTime: 1500
    };
    var layout = makeLayout();

    layout.run();

    var $btnParam = h('div', {
      'class': 'param'
    }, []);

    var $config = $('#config');

    $config.appendChild( $btnParam );

    var sliders = [
      {
        label: 'Edge length',
        param: 'edgeLengthVal',
        min: 1,
        max: 200
      },

      {
        label: 'Node spacing',
        param: 'nodeSpacing',
        min: 1,
        max: 50
      }
    ];

    var buttons = [
      {
        label: h('span', { 'class': 'fa fa-random' }, []),
        layoutOpts: {
          randomize: true,
          flow: null
        }
      },

      {
        label: h('span', { 'class': 'fa fa-long-arrow-down' }, []),
        layoutOpts: {
          flow: { axis: 'y', minSeparation: 30 }
        }
      }
    ];

    sliders.forEach( makeSlider );

    buttons.forEach( makeButton );

    function makeLayout( opts ){
      params.randomize = false;
      params.edgeLength = function(e){ return params.edgeLengthVal / e.data('weight'); };

      for( var i in opts ){
        params[i] = opts[i];
      }

      return cy.layout( params );
    }

    function makeSlider( opts ){
      var $input = h('input', {
        id: 'slider-'+opts.param,
        type: 'range',
        min: opts.min,
        max: opts.max,
        step: 1,
        value: params[ opts.param ],
        'class': 'slider'
      }, []);

      var $param = h('div', { 'class': 'param' }, []);

      var $label = h('label', { 'class': 'label label-default', for: 'slider-'+opts.param }, [ t(opts.label) ]);

      $param.appendChild( $label );
      $param.appendChild( $input );

      $config.appendChild( $param );

      var update = _.throttle(function(){
        params[ opts.param ] = $input.value;

        layout.stop();
        layout = makeLayout();
        layout.run();
      }, 1000/30);

      $input.addEventListener('input', update);
      $input.addEventListener('change', update);
    }

    function makeButton( opts ){
      var $button = h('button', { 'class': 'btn btn-default' }, [ opts.label ]);

      $btnParam.appendChild( $button );

      $button.addEventListener('click', function(){
        layout.stop();

        if( opts.fn ){ opts.fn(); }

        layout = makeLayout( opts.layoutOpts );
        layout.run();
      });
    }

    var makeTippy = function(node, html){
      return tippy( node.popperRef(), {
        html: html,
        trigger: 'manual',
        arrow: true,
        placement: 'bottom',
        hideOnClick: false,
        interactive: true
      } ).tooltips[0];
    };

    var hideTippy = function(node){
      var tippy = node.data('tippy');

      if(tippy != null){
        tippy.hide();
      }
    };

    var hideAllTippies = function(){
      cy.nodes().forEach(hideTippy);
    };

    cy.on('tap', function(e){
      if(e.target === cy){
        hideAllTippies();
      }
    });

    cy.on('tap', 'edge', function(e){
      hideAllTippies();
    });

    cy.on('zoom pan', function(e){
      hideAllTippies();
    });

    cy.nodes().forEach(function(n){
      var g = n.data('name');

      var $links = [
        {
          name: 'GeneCard',
          url: 'http://www.genecards.org/cgi-bin/carddisp.pl?gene=' + g
        },
        {
          name: 'UniProt search',
          url: 'http://www.uniprot.org/uniprot/?query='+ g +'&fil=organism%3A%22Homo+sapiens+%28Human%29+%5B9606%5D%22&sort=score'
        },
        {
          name: 'GeneMANIA',
          url: 'http://genemania.org/search/human/' + g
        }
      ].map(function( link ){
        return h('a', { target: '_blank', href: link.url, 'class': 'tip-link' }, [ t(link.name) ]);
      });

      var tippy = makeTippy(n, h('div', {}, $links));

      n.data('tippy', tippy);

      n.on('click', function(e){
        tippy.show();

        cy.nodes().not(n).forEach(hideTippy);
      });
    });

    $('#config-toggle').addEventListener('click', function(){
      $('body').classList.toggle('config-closed');

      cy.resize();
    });

  });


text:
#ifndef __USB_CDC_ACM_H__
#define __USB_CDC_ACM_H__

#include <stdint.h>

/**
 * CDC-ACM Product ID.
 *
 * This is used by the host to select the host side driver for this
 * USB device. The below is just a placeholder.
 */
#define CDC_PRODUCT_ID (0xD017)

/* Max packet size for Bulk endpoints. */
#define CDC_BULK_EP_MPS (64)

/* Max packet size for Interrupt endpoints. */
#define CDC_INTERRUPT_EP_MPS (16)

/* Max CDC ACM class request max data size. */
#define CDC_CLASS_REQ_MAX_DATA_SIZE (8)

/* Number of configurations for the USB Device. */
#define CDC_NUM_CONF (0x01)
/* Number of interfaces in the configuration. */
#define CDC_NUM_ITF (0x02)
/* Number of Endpoints in the first interface. */
#define CDC_ITF1_NUM_EP (0x01)
/* Number of Endpoints in the second interface. */
#define CDC_ITF2_NUM_EP (0x02)

#define CDC_ENDP_INT (0x81)
#define CDC_ENDP_OUT (0x03)
#define CDC_ENDP_IN (0x84)

/* Decriptor size in bytes. */
#define USB_HFUNC_DESC_SIZE (5)   /* Header Functional Descriptor. */
#define USB_CMFUNC_DESC_SIZE (5)  /* Call Management Functional Descriptor. */
#define USB_ACMFUNC_DESC_SIZE (4) /* ACM Functional Descriptor. */
#define USB_UFUNC_DESC_SIZE (5)   /* Union Functional Descriptor. */

/* Descriptor type. */
#define CS_INTERFACE (0x24)
#define CS_ENDPOINT (0x25)

/* Descriptor subtype. */
#define USB_HFUNC_SUBDESC (0x00)
#define USB_CMFUNC_SUBDESC (0x01)
#define USB_ACMFUNC_SUBDESC (0x02)
#define USB_UFUNC_SUBDESC (0x06)

/* Class specific request. */
#define CDC_SET_LINE_CODING (0x20)
#define CDC_GET_LINE_CODING (0x21)
#define CDC_SET_CONTROL_LINE_STATE (0x22)

/* Control line state signal bitmap. */
#define CDC_CONTROL_LINE_STATE_DTR (0x1)
#define CDC_CONTROL_LINE_STATE_RTS (0x2)

/* Serial state notification bitmap. */
#define CDC_CONTROL_SERIAL_STATE_DCD (0x1)
#define CDC_CONTROL_SERIAL_STATE_DSR (0x2)

/* Serial state notification timeout. */
#define CDC_CONTROL_SERIAL_STATE_TIMEOUT_US (100000)

/*
 * Size in bytes of the configuration sent to the Host on GetConfiguration()
 * request.
 *
 * For CDC-ACM: CONF + (2 x ITF) + (3 x EP) + HF + CMF + ACMF + UF -> 67 bytes.
 */
#define CDC_CONF_SIZE                                                          \
	(USB_CONFIGURATION_DESC_SIZE + (2 * USB_INTERFACE_DESC_SIZE) +         \
	 (3 * USB_ENDPOINT_DESC_SIZE) + 19)

/* Common line controls for console. */
#define LINE_CTRL_BAUD_RATE (1 << 0)
#define LINE_CTRL_RTS (1 << 1)
#define LINE_CTRL_DTR (1 << 2)
#define LINE_CTRL_DCD (1 << 3)
#define LINE_CTRL_DSR (1 << 4)

extern volatile bool cdc_acm_tx_busy;
extern volatile bool cdc_acm_rx_busy;

/**
 * Initialize CDC-ACM Device.
 *
 * @return Standard errno return type for QMSI.
 * @retval 0 on success.
 * @retval Negative @ref errno for possible error codes.
 */
int cdc_acm_init(void);

/**
 * Manipulate line control for console.
 *
 * @param[in] ctrl The line control to be manipulated.
 * @param[in] val Value to set the line control.
 *
 * @return Standard errno return type for QMSI.
 * @retval 0 on success.
 * @retval Negative @ref errno for possible error codes.
 */
int cdc_acm_line_ctrl_set(uint32_t ctrl, uint32_t val);

/**
 * Read line control for console.
 *
 * @param[in] ctrl The line control to be manipulated.
 * @param[in] val Value to set the line control.
 *
 * @return Standard errno return type for QMSI.
 * @retval 0 on success.
 * @retval Negative @ref errno for possible error codes.
 */
int cdc_acm_line_ctrl_get(uint32_t ctrl, uint32_t *const val);

/**
 * Fill FIFO with data.
 *
 * @param[in] tx_data Data to transmit.
 * @param[in] len Number of bytes to send.
 *
 * @return Standard errno return type for QMSI.
 * @retval 0 on success.
 * @retval Negative @ref errno for possible error codes.
 */
int cdc_acm_fifo_fill(const uint8_t *const tx_data, int len);

/**
 * Read data from FIFO.
 *
 * @param[out] rx_data Pointer to data container.
 * @param[in] size Container size.
 *
 * @return Standard errno return type for QMSI.
 * @retval 0 on success.
 * @retval Negative @ref errno for possible error codes.
 */
int cdc_acm_fifo_read(uint8_t *const rx_data, const int size);

#endif /* __USB_CDC_ACM_H__ */


text:
package com.sabre.oss.conf4j.factory.javassist;

import com.sabre.oss.conf4j.factory.AbstractParametrizedConfigurationTest;

public class JavassistStaticParametrizedConfigurationTest extends AbstractParametrizedConfigurationTest<JavassistStaticConfigurationFactory> {
    @Override
    protected JavassistStaticConfigurationFactory createConfigurationFactory() {
        return new JavassistStaticConfigurationFactory();
    }
}


text:
package util;

import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import models.AST;
import models.ASTID;
import models.ASTWithComplement;
import models.Context;
import models.Node;
import models.Output;
import models.Program;
import models.Subtree;
import models.SubtreeInfo;
import models.SubtreeLocation;

public class Helper {

  public static Map<Context, Map<Integer, Integer>> getContextHistograms(Map<ASTID, Program> programs) {
    HashMap<Context, Map<Integer, Integer>> ans = new HashMap<Context, Map<Integer, Integer>>();
    for (Program p : programs.values()) addProgramToHistograms(p, ans);
    return ans;
  }

  public static void addProgramToHistograms(Program program, Map<Context, Map<Integer, Integer>> contextHistograms) {
    for (Context c : program.getAllContexts()) {
      if (!contextHistograms.containsKey(c)) contextHistograms.put(c, new TreeMap<Integer, Integer>());
      Map<Integer, Integer> histogram = contextHistograms.get(c);
      if (!histogram.containsKey(program.output)) histogram.put(program.output, 0);
      histogram.put(program.output, histogram.get(program.output) + 1);
    }
  }

  // MAKE SURE THAT THE PROGRAM WAS PREVIOUSLY ADDED FIRST!
  public static void removeProgramFromHistograms(Program program, Map<Context, Map<Integer, Integer>> contextHistograms) {
    for (Context c : program.getAllContexts()) {
      Map<Integer, Integer> histogram = contextHistograms.get(c);
      histogram.put(program.output, histogram.get(program.output) - 1);
    }
  }

  public static Map<AST, Map<Integer, Integer>> getSubtreeHistograms(Map<ASTID, Program> programs) {
    HashMap<AST, Map<Integer, Integer>> ans = new HashMap<AST, Map<Integer, Integer>>();
    for (Program p : programs.values()) addProgramToSubtreeHistograms(p, ans);
    return ans;
  }

  public static void addProgramToSubtreeHistograms(Program program, Map<AST, Map<Integer, Integer>> subtreeHistograms) {
    for (int i = 0; i < program.ast.size(); i++) {
      AST c = program.getSubtree(i);
      if (!subtreeHistograms.containsKey(c)) subtreeHistograms.put(c, new TreeMap<Integer, Integer>());
      Map<Integer, Integer> histogram = subtreeHistograms.get(c);
      if (!histogram.containsKey(program.output)) histogram.put(program.output, 0);
      histogram.put(program.output, histogram.get(program.output) + 1);
    }
  }

  // MAKE SURE THAT THE PROGRAM WAS PREVIOUSLY ADDED FIRST!
  public static void removeProgramFromSubtreeHistograms(Program program, Map<AST, Map<Integer, Integer>> subtreeHistograms) {
    for (int i = 0; i < program.ast.size(); i++) {
      AST c = program.getSubtree(i);
      Map<Integer, Integer> histogram = subtreeHistograms.get(c);
      histogram.put(program.output, histogram.get(program.output) - 1);
    }
  }

	public static List<Subtree> getSubtrees(Map<ASTID, Program> programs, int maxNum, int iteration) {
		HashMap<AST, SubtreeInfo> subtreeMap = getSubtreeMap(programs);
		ArrayList<Subtree> subtrees = new ArrayList<Subtree>();
		int idCounter = 0;
		for (AST ast : subtreeMap.keySet()) {
			SubtreeInfo info = subtreeMap.get(ast);
			Subtree newSubtree = new Subtree(idCounter, ast, info);
			subtrees.add(newSubtree);
			idCounter++;
		}
		Collections.sort(subtrees, new Comparator<Subtree>() {
			@Override
			public int compare(Subtree a, Subtree b) {
				return b.info.getCount() - a.info.getCount();
			}
		});

		if (iteration >= 0) printSubtrees(subtrees, iteration);
		// Warning: There is a possibility of subtrees.size being larger than
		// maxInt.
		//System.out.println("subtrees.size: " + subtrees.size());
		//System.out.println("subtrees.size: " + maxNum);
		if(subtrees.size() > maxNum) {
			throw new RuntimeException("More subtrees than maxInt");
		}

		return subtrees.subList(0, Math.min(maxNum, subtrees.size()));
	}

	public static Map<Context, List<Subtree>> getComplements(Map<ASTID, Program> programs, int maxNum, int iteration) {
		List<Subtree> subtrees = getSubtrees(programs, maxNum, iteration);
		Map<Context, List<Subtree>> complementMap = new HashMap<Context, List<Subtree>>();

		for (Subtree tree : subtrees) {
			Collection<Context> complements = tree.info.getComplements();

			for (Context complement : complements) {
				if (!complementMap.containsKey(complement)) {
					complementMap.put(complement, new ArrayList<Subtree>());
				}
				complementMap.get(complement).add(tree);
			}
		}

		return complementMap;

	}

	public static HashMap<AST, SubtreeInfo> getSubtreeMap(Map<ASTID, Program> programs) {

		HashMap<AST, SubtreeInfo> subtrees = new HashMap<AST, SubtreeInfo>();
		for (ASTID astId : programs.keySet()) {
			Program program = programs.get(astId);
			AST current = program.ast;
			for (int j = 0; j < current.size(); j++) {
				int nodeId = current.getNodeId(j);
				//System.out.println(nodeId + " " + j);
				List<Integer> treeNodeList = new ArrayList<Integer>();
				treeNodeList.add(nodeId);
				SubtreeLocation treeLoc = new SubtreeLocation(astId, treeNodeList);

				Helper.recordSubforest(program.getSubtree(j), program.getComplement(j),
						program.code, program.map, program.getScore(), subtrees, treeLoc, null);

				for (ASTWithComplement cur : program.subforests(j)) {
					List<Integer> forestNodeList = new ArrayList<Integer>();
					for (int k = 0; k < cur.ast.size(); k++) {
						forestNodeList.add(cur.ast.getNodeId(k));
					}
					SubtreeLocation forestLoc = new SubtreeLocation(astId, forestNodeList);
					Helper.recordSubforest(cur.ast, cur.complement, program.code, program.map,
							program.getScore(), subtrees, forestLoc, null);
				}

			}
		}
		return subtrees;
	}

	public static HashMap<ASTWithComplement, ASTID> getASTidMap(Map<ASTID, Program> programs)
	{
		HashMap<ASTWithComplement, ASTID> astIdMap = new HashMap<ASTWithComplement, ASTID>();
		for(ASTID astId : programs.keySet()) {
			Program program = programs.get(astId);
			AST current = program.ast;
			for(int j = 0; j < current.size(); j++) {
				astIdMap.put(new ASTWithComplement(program.getSubtree(j), program.getComplement(j),-1,-1), astId);
				for(ASTWithComplement cur : program.subforests(j))
					astIdMap.put(cur, astId);
			}
		}
		return astIdMap;
	}

	// extracts a code sample from the ast subtree
	// put into util
	public static String getCode(ArrayList<String> code, int[][] map, AST ast) {
	  if (ast == AST.NULL) return "{{empty}}";
	  HashSet<Integer> ids = new HashSet<Integer>();
		for (Node n : ast.getNodes())
			ids.add(n.id);
		StringBuffer ans = new StringBuffer();
		int lastrow = -1;
		for (int i = 0; i < map.length; i++) {
			for (int j = 0; j < map[i].length; j++) {
				if (ids.contains(map[i][j])) {
					if (lastrow != -1 && lastrow != i)
						ans.append('\n');
					lastrow = i;
					ans.append(code.get(i).charAt(j));
				}
			}
		}
		return ans.toString();
	}

	// builds out giant table of all trees
	// take subtrees as a parameter
	// util
	public static void recordSubforest(AST subforest, Context complement,
			ArrayList<String> code, int[][] map, int output,
			HashMap<AST, SubtreeInfo> subtrees, SubtreeLocation loc, Subtree parent) {
		if (!subtrees.containsKey(subforest)) {
			subtrees.put(
					subforest,
					new SubtreeInfo(
							subforest.getRoot(),
							getCode(code, map, subforest),
							parent));
		}
		SubtreeInfo info = subtrees.get(subforest);
		info.add(complement, loc, (output));
	}

	public static void printSubtrees(ArrayList<Subtree> subtreeList, int iteration){
		String fileDir = FileSystem.getSubtreeDir();
		File theDir = new File(fileDir);
		if (!theDir.exists()) {
			theDir.mkdir();
		}
		String fileName = iteration + ".txt";
		String path = fileDir + fileName;
		try{
		PrintWriter writer = new PrintWriter(path, "UTF-8");
		int cnt = 0;
		for (Subtree subtree : subtreeList){
			writer.println("************************************************");
			writer.println("Index: " + cnt);
			writer.println("Subtree index: " + subtree.getId());
			writer.println("Count: " + subtree.info.getCount());
			writer.println(subtree.info.code);
			cnt++;
		}
		writer.close();
		} catch (Exception e){
			e.printStackTrace();
			throw new RuntimeException("Failed to write equivalence", e);
		}
	}

	public static void saveReducedPrograms(Map<ASTID, Program> corrects,
					Map<AST, Integer> ASTCounts, int iteration){

		String fileDir = FileSystem.getReducedOutDir();
		File theDir = new File(fileDir);
		if (!theDir.exists()) {
			theDir.mkdir();
		}
		String fileName = iteration + ".txt";
		String path = fileDir + fileName;
		final Map<AST,Integer> constCounts = ASTCounts;
		try{
			List<Program> list = new ArrayList<Program>(corrects.values());
			Collections.sort(list, new Comparator<Program>() {
				@Override
				public int compare(Program a, Program b) { // reverse sort
					return constCounts.get(b.ast) - constCounts.get(a.ast);
				}
			});

			PrintWriter writer = new PrintWriter(path, "UTF-8");
			for (Program P : list){
				int count = ASTCounts.get(P.ast);
				writer.println("Count: " + count);
				for (String line : P.code) {
					writer.println(line);
				}
				writer.println("\n=================================\n");
			}
			writer.close();
		} catch (Exception e) {
			e.printStackTrace();
			throw new RuntimeException("Failed to write equivalence", e);
		}

	}

}


text:
package org.drools.modelcompiler.builder.generator.visitor.pattern;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import com.github.javaparser.ast.expr.BinaryExpr;
import com.github.javaparser.ast.expr.Expression;
import com.github.javaparser.ast.expr.MethodCallExpr;
import org.drools.compiler.compiler.DescrBuildError;
import org.drools.compiler.lang.descr.AccumulateDescr;
import org.drools.compiler.lang.descr.BaseDescr;
import org.drools.compiler.lang.descr.ExprConstraintDescr;
import org.drools.compiler.lang.descr.PatternDescr;
import org.drools.compiler.lang.descr.PatternSourceDescr;
import org.drools.core.util.ClassUtils;
import org.drools.modelcompiler.builder.PackageModel;
import org.drools.modelcompiler.builder.errors.InvalidExpressionErrorResult;
import org.drools.modelcompiler.builder.generator.AggregateKey;
import org.drools.modelcompiler.builder.generator.ConstraintUtil;
import org.drools.modelcompiler.builder.generator.DeclarationSpec;
import org.drools.modelcompiler.builder.generator.DrlxParseUtil;
import org.drools.modelcompiler.builder.generator.RuleContext;
import org.drools.modelcompiler.builder.generator.WindowReferenceGenerator;
import org.drools.modelcompiler.builder.generator.drlxparse.ConstraintExpression;
import org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser;
import org.drools.modelcompiler.builder.generator.drlxparse.DrlxParseFail;
import org.drools.modelcompiler.builder.generator.drlxparse.DrlxParseResult;
import org.drools.modelcompiler.builder.generator.drlxparse.DrlxParseSuccess;
import org.drools.modelcompiler.builder.generator.drlxparse.ParseResultVisitor;
import org.drools.modelcompiler.builder.generator.drlxparse.ParseResultVoidVisitor;
import org.drools.modelcompiler.builder.generator.visitor.DSLNode;
import org.drools.modelcompiler.builder.generator.visitor.FromVisitor;

import static org.drools.model.impl.NamesGenerator.generateName;
import static org.drools.model.impl.VariableImpl.GENERATED_VARIABLE_PREFIX;
import static org.drools.modelcompiler.builder.generator.DrlxParseUtil.getPatternListenedProperties;
import static org.drools.modelcompiler.builder.generator.DrlxParseUtil.validateDuplicateBindings;
import static org.drools.modelcompiler.util.StreamUtils.optionalToStream;
import static org.drools.mvel.parser.printer.PrintUtil.printConstraint;

public abstract class PatternDSL implements DSLNode {

    protected final RuleContext context;
    protected final PackageModel packageModel;
    protected final PatternDescr pattern;
    private final List<? extends BaseDescr> constraintDescrs;
    protected Class<?> patternType;

    PatternDSL(RuleContext context, PackageModel packageModel, PatternDescr pattern, List<? extends BaseDescr> constraintDescrs, Class<?> patternType) {
        this.context = context;
        this.packageModel = packageModel;
        this.pattern = pattern;
        this.constraintDescrs = constraintDescrs;
        this.patternType = patternType;
    }

    public DeclarationSpec initPattern() {
        generatePatternIdentifierIfMissing();
        context.addPatternBinding(pattern.getIdentifier());
        final Optional<Expression> declarationSource = buildFromDeclaration(pattern);
        return context.addDeclaration(pattern.getIdentifier(), patternType, Optional.of(pattern), declarationSource);
    }

    private static boolean isPositional(BaseDescr constraint) {
        return constraint instanceof ExprConstraintDescr &&
                ((ExprConstraintDescr) constraint).getType() == ExprConstraintDescr.Type.POSITIONAL &&
                !constraint.getText().contains( ":=" );
    }

    private Optional<Expression> buildFromDeclaration(PatternDescr pattern) {
        Optional<PatternSourceDescr> source = Optional.ofNullable(pattern.getSource());
        try {
            patternType = context.getTypeResolver().resolveType( pattern.getObjectType() );
        } catch (ClassNotFoundException e) {
            throw new RuntimeException( e );
        }
        Optional<Expression> declarationSourceFrom = source.flatMap(new FromVisitor(context, packageModel, patternType)::visit);
        if (declarationSourceFrom.isPresent()) {
            return declarationSourceFrom;
        }
        return source.flatMap(new WindowReferenceGenerator(packageModel, context.getTypeResolver())::visit);
    }

    private void generatePatternIdentifierIfMissing() {
        if (pattern.getIdentifier() == null) {
            final String generatedName = generateName("pattern_" + patternType.getSimpleName());
            final String patternNameAggregated = findFirstInnerBinding(constraintDescrs, patternType)
                    .map(ib -> context.getAggregatePatternMap().putIfAbsent(new AggregateKey(ib, patternType), generatedName))
                    .orElse(generatedName);
            pattern.setIdentifier( GENERATED_VARIABLE_PREFIX + patternNameAggregated);
        }
    }

    private Optional<String> findFirstInnerBinding(List<? extends BaseDescr> constraintDescrs, Class<?> patternType) {
        return constraintDescrs.stream()
                .map( constraint -> ConstraintExpression.createConstraintExpression( context, patternType, constraint, isPositional(constraint) ).getExpression() )
                .map( DrlxParseUtil::parseExpression )
                .filter( drlx -> drlx.getBind() != null )
                .map( drlx -> drlx.getBind().asString() )
                .findFirst();
    }

    private List<PatternConstraintParseResult> findAllConstraint(PatternDescr pattern, List<? extends BaseDescr> constraintDescrs, Class<?> patternType) {
        ConstraintParser constraintParser = new ConstraintParser(context, packageModel);
        List<PatternConstraintParseResult> patternConstraintParseResults = new ArrayList<>();

        for (BaseDescr constraint : constraintDescrs) {
            String patternIdentifier = pattern.getIdentifier();

            boolean isPositional = isPositional(constraint);

            ConstraintExpression constraintExpression = ConstraintExpression.createConstraintExpression(context, patternType, constraint, isPositional);
            if (constraintExpression == null) {
                continue;
            }

            DrlxParseResult drlxParseResult;
            try {
                context.setCurrentConstraintDescr(Optional.of(constraint));
                drlxParseResult = constraintParser.drlxParse(patternType, patternIdentifier, constraintExpression, isPositional);
            } finally {
                context.resetCurrentConstraintDescr();
            }

            String expression = constraintExpression.getExpression();
            if (drlxParseResult.isSuccess() && (( DrlxParseSuccess ) drlxParseResult).isRequiresSplit() && (( DrlxParseSuccess ) drlxParseResult).getExpr().isBinaryExpr()) {
                BinaryExpr expr = ((DrlxParseSuccess) drlxParseResult).getExpr().asBinaryExpr();
                String leftExpression = printConstraint(expr.asBinaryExpr().getLeft());
                DrlxParseResult leftExpressionReparsed = constraintParser.drlxParse(patternType, patternIdentifier, leftExpression, isPositional);
                patternConstraintParseResults.add(new PatternConstraintParseResult(leftExpression, patternIdentifier, leftExpressionReparsed));

                String rightExpression = printConstraint(expr.asBinaryExpr().getRight());
                DrlxParseResult rightExpressionReparsed = constraintParser.drlxParse(patternType, patternIdentifier, rightExpression, isPositional);
                DrlxParseResult normalizedParseResult = ConstraintUtil.normalizeConstraint(rightExpressionReparsed);
                patternConstraintParseResults.add(new PatternConstraintParseResult(rightExpression, patternIdentifier, normalizedParseResult));
            } else {
                DrlxParseResult normalizedParseResult = ConstraintUtil.normalizeConstraint(drlxParseResult);
                patternConstraintParseResults.add(new PatternConstraintParseResult(expression, patternIdentifier, normalizedParseResult));
            }
        }

        addImplicitCastExpr(constraintParser, pattern.getIdentifier(), patternConstraintParseResults);

        return patternConstraintParseResults;
    }

    private void addImplicitCastExpr(ConstraintParser constraintParser, String patternIdentifier, List<PatternConstraintParseResult> patternConstraintParseResults) {
        final boolean hasInstanceOfExpr = patternConstraintParseResults.stream()
                .anyMatch(r -> r.getDrlxParseResult().acceptWithReturnValue(new ParseResultVisitor<Boolean>() {
                    @Override
                    public Boolean onSuccess(DrlxParseSuccess t) {
                        return t.getExpr() != null && t.getExpr().isInstanceOfExpr();
                    }

                    @Override
                    public Boolean onFail(DrlxParseFail failure) {
                        return false;
                    }
                }));

        final Optional<Expression> implicitCastExpression =
                patternConstraintParseResults.stream()
                .flatMap(r -> optionalToStream(r.getDrlxParseResult().acceptWithReturnValue(new ParseResultVisitor<Optional<Expression>>() {
                    @Override
                    public Optional<Expression> onSuccess(DrlxParseSuccess t) {
                        return t.getImplicitCastExpression();
                    }

                    @Override
                    public Optional<Expression> onFail(DrlxParseFail failure) {
                        return Optional.empty();
                    }
                })))
                .findFirst();

        implicitCastExpression.ifPresent(ce -> {
            if(!hasInstanceOfExpr) {
                String instanceOfExpression = printConstraint(ce);
                DrlxParseResult instanceOfExpressionParsed = constraintParser.drlxParse(patternType, patternIdentifier, instanceOfExpression, false);
                patternConstraintParseResults.add(0, new PatternConstraintParseResult(instanceOfExpression, patternIdentifier, instanceOfExpressionParsed));
            }
        });
    }

    void buildConstraint(PatternDescr pattern, Class<?> patternType, PatternConstraintParseResult patternConstraintParseResult) {
        DrlxParseResult drlxParseResult = patternConstraintParseResult.getDrlxParseResult();
        String expression = patternConstraintParseResult.getExpression();

        DrlxParseResult withBindingCheck = drlxParseResult.acceptWithReturnValue(new ParseResultVisitor<DrlxParseResult>() {
            @Override
            public DrlxParseResult onSuccess(DrlxParseSuccess drlxParseResult) {

                String exprBinding = drlxParseResult.getExprBinding();
                if (exprBinding == null && !drlxParseResult.isPredicate() && !drlxParseResult.getImplicitCastExpression().isPresent()) {
                    return new DrlxParseFail(new DescrBuildError(context.getRuleDescr(), context.getRuleDescr(), "",
                                                                 String.format("Predicate '%s' must be a Boolean expression", drlxParseResult.getOriginalDrlConstraint())));
                } else {
                    return drlxParseResult;
                }
            }

            @Override
            public DrlxParseResult onFail(DrlxParseFail failure) {
                return failure;
            }
        });

        withBindingCheck.accept(
                new ParseResultVoidVisitor() {
                    @Override
                    public void onSuccess( DrlxParseSuccess drlxParseResult ) {
                        DSLNode constraint = drlxParseResult.isOOPath() ?
                            new ConstraintOOPath( context, packageModel, pattern, patternType, patternConstraintParseResult, expression, drlxParseResult ) :
                            createSimpleConstraint( drlxParseResult, pattern );
                        constraint.buildPattern();
                        registerUsedBindingInOr(drlxParseResult.getExprBinding());
                    }

                    @Override
                    public void onFail( DrlxParseFail failure ) {
                        if (failure.getError() != null) {
                            context.addCompilationError( failure.getError() );
                        }
                    }
                } );
    }

    private void registerUsedBindingInOr(String exprBinding) {
        if(context.isNestedInsideOr()) {
            context.getBindingOr().add(exprBinding);
        }
    }

    @Override
    public void buildPattern() {
        DeclarationSpec declarationSpec = initPattern();

        if (constraintDescrs.isEmpty() && !(pattern.getSource() instanceof AccumulateDescr)) {
            context.addExpression(input(declarationSpec));
        } else {
            final List<PatternConstraintParseResult> patternConstraintParseResults = findAllConstraint(pattern, constraintDescrs, patternType);
            final List<String> allBindings = patternConstraintParseResults
                    .stream()
                    .map(p -> p.getDrlxParseResult().acceptWithReturnValue( DrlxParseSuccess::getExprBinding ))
                    .filter(Objects::nonNull)
                    .collect(Collectors.toList());

            validateDuplicateBindings(context.getRuleName(), allBindings).ifPresent(context::addCompilationError);

            if (!context.hasErrors()) {
                buildPattern(declarationSpec, patternConstraintParseResults);
            }
        }
    }

    Set<String> getSettableWatchedProps() {
        Set<String> settableWatchedProps = new HashSet<>();
        Collection<String> settableProps = ClassUtils.getAccessibleProperties(patternType);

        Collection<String> lookAheadProps = context.getRuleDescr().lookAheadFieldsOfIdentifier(pattern);
        lookAheadProps.stream().forEach(prop -> populateSettableWatchedProps(prop, settableProps, settableWatchedProps, false)); // okay to have non-settable prop in lookAhead

        List<String> propertiesInWatch = getPatternListenedProperties(pattern);
        propertiesInWatch.stream().forEach(prop -> populateSettableWatchedProps(prop, settableProps, settableWatchedProps, true));
        return settableWatchedProps;
    }

    private void populateSettableWatchedProps(String prop, Collection<String> settableProps, Set<String> settableWatchedProps, boolean raiseErrorForNonSettableProp) {
        String actualProp = prop.startsWith("!") ? prop.substring(1) : prop;
        if (actualProp.equals("*") || settableProps.contains(actualProp)) {
            settableWatchedProps.add(prop);
        } else if (raiseErrorForNonSettableProp) {
            context.addCompilationError(new InvalidExpressionErrorResult("Unknown property " + actualProp + " in @watch annotation"));
        }
    }

    protected abstract void buildPattern(DeclarationSpec declarationSpec, List<PatternConstraintParseResult> patternConstraintParseResults);

    protected abstract MethodCallExpr input(DeclarationSpec declarationSpec);

    protected abstract DSLNode createSimpleConstraint( DrlxParseSuccess drlxParseResult, PatternDescr pattern );
}


text:
<?php

namespace Fakerino\Test\Core\FakeHandler;

use Fakerino\Core\FakeElement;
use Fakerino\Core\FakeHandler\DefaultFakerClass;

/**
 * @group handler
 */
class DefaultFakerClassTest extends \PHPUnit_Framework_TestCase
{
    public function testHandler()
    {
        $handler = new DefaultFakerClass();
        $customClass = new FakeElement('GenericString');

        $this->assertInstanceOf('Fakerino\Core\FakeHandler\Handler', $handler);
        $this->assertInternalType('string', $handler->handle($customClass));
    }
}


text:
package schema

import "testing"

func BenchmarkSerializeMetricPointStaticBuffer(b *testing.B) {
	metrics := getDifferentMetricPoints(b.N)
	data := make([]byte, 0, b.N*32)
	b.ResetTimer()
	var err error
	for _, m := range metrics {
		data, err = m.Marshal32(data)
		checkErr(b, err)
	}
	b.Logf("with %10d metrics -> final size: %.1f bytes per metric", b.N, float64(len(data))/float64(b.N))
}

func BenchmarkSerializeMetricPoint(b *testing.B) {
	metrics := getDifferentMetricPoints(b.N)
	b.ResetTimer()
	var data []byte
	var err error
	for _, m := range metrics {
		data, err = m.Marshal(data)
		checkErr(b, err)
	}
	b.Logf("with %10d metrics -> final size: %.1f bytes per metric", b.N, float64(len(data))/float64(b.N))
}

func BenchmarkDeSerializeMetricPoint(b *testing.B) {
	metrics := getDifferentMetricPoints(b.N)
	var data []byte
	var err error
	for _, m := range metrics {
		data, err = m.Marshal(data)
		checkErr(b, err)
	}
	b.ResetTimer()
	p := &MetricPoint{}
	for len(data) != 0 {
		data, err = p.Unmarshal(data)
		checkErr(b, err)
	}
}


text:
package net.bither.ui.base;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.nineoldandroids.animation.ObjectAnimator;

import net.bither.R;
import net.bither.util.LogUtil;

public class SyncProgressView extends FrameLayout {
    private static final int AnimationDuration = 500;
	private ImageView iv;
	private double progress;
    private ObjectAnimator animator;

	public SyncProgressView(Context context) {
		super(context);
		initView();
	}

	public SyncProgressView(Context context, AttributeSet attrs) {
		super(context, attrs);
		initView();
	}

	public SyncProgressView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		initView();
	}

	private void initView() {
		removeAllViews();
		iv = new ImageView(getContext());
		iv.setBackgroundResource(R.drawable.sync_progress_foreground);
		addView(iv, 0, LayoutParams.WRAP_CONTENT);
	}

	public void setProgress(final double progress) {
		removeCallbacks(delayedShowProgress);
		removeCallbacks(delayHide);
		this.progress = progress;
        LogUtil.d("progress", "progress:" + progress);
		if (progress >= 0 && progress <= 1) {
			if (getWidth() <= 0) {
				postDelayed(delayedShowProgress, 100);
				return;
			}
			double p = Math.max(Math.min(progress, 1.0f), 0.2f);
            if(animator != null && animator.isRunning()){
                animator.cancel();
            }
            animator = ObjectAnimator.ofInt(new WrapLayoutParamsForAnimator(iv), "width", (int) (p * getWidth()));
            animator.setDuration(AnimationDuration);
            animator.start();
			setVisibility(View.VISIBLE);
		}
        if(progress < 0 || progress >= 1) {
			if (getVisibility() == VISIBLE) {
				postDelayed(delayHide, AnimationDuration);
			} else {
				setVisibility(View.GONE);
			}
		}
	}

	private Runnable delayHide = new Runnable() {
		@Override
		public void run() {
            if(progress < 0 || progress >= 1) {
                setVisibility(View.GONE);
            }
		}
	};

	private Runnable delayedShowProgress = new Runnable() {

		@Override
		public void run() {
			setVisibility(View.VISIBLE);
			setProgress(progress);
			LogUtil.d("progress", "postDelayed:" + progress);
		}
	};

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
	<plugins>
	    <plugin interceptor="com.github.pagehelper.PageHelper">
	        <property name="dialect" value="mysql"/>
	        <property name="offsetAsPageNum" value="true"/>
	        <property name="reasonable" value="true"/>
		</plugin>
	</plugins>
</configuration>