text:
package net.sf.esfinge.querybuilder.jpa1;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import net.sf.esfinge.querybuilder.exception.InvalidQuerySequenceException;
import net.sf.esfinge.querybuilder.jpa1.JPAQLQueryVisitor;
import net.sf.esfinge.querybuilder.methodparser.ComparisonType;
import net.sf.esfinge.querybuilder.methodparser.OrderingDirection;
import net.sf.esfinge.querybuilder.methodparser.QueryRepresentation;
import net.sf.esfinge.querybuilder.methodparser.QueryVisitor;

public class TestJPAQLQueryVisitor extends GenericTestJPAQLQueryVisitor {

	@Test
	public void singleEntity(){
		visitor.visitEntity("Person");
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o");
	}

	@Test
	public void oneCondition(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.name = :nameEquals");
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void conectorBeforeCondition(){
		visitor.visitEntity("Person");
		visitor.visitConector("and");
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void firstConector(){
		visitor.visitConector("and");
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void firstCondition(){
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitEnd();
	}

	@Test
	public void twoConditions(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitConector("and");
		visitor.visitCondition("lastName", ComparisonType.EQUALS);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.name = :nameEquals and o.lastName = :lastNameEquals");
	}

	@Test
	public void compositeCondition(){
		visitor.visitEntity("Person");
		visitor.visitCondition("address.city", ComparisonType.EQUALS);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.address.city = :addressCityEquals");
	}

	@Test
	public void complexQuery(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitConector("or");
		visitor.visitCondition("lastName", ComparisonType.EQUALS);
		visitor.visitConector("and");
		visitor.visitCondition("address.city", ComparisonType.EQUALS);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.name = :nameEquals or o.lastName = :lastNameEquals and o.address.city = :addressCityEquals");
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void finishWithConector(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitConector("and");
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void entityAfterStart(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitEntity("Person");
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void twoEntities(){
		visitor.visitEntity("Person");
		visitor.visitEntity("Person");
		visitor.visitEnd();
	}

	@Test
	public void differentConditionTypes(){
		testCondition(ComparisonType.GREATER, "age", "o.age > :ageGreater");
		testCondition(ComparisonType.GREATER_OR_EQUALS, "age", "o.age >= :ageGreaterOrEquals");
		testCondition(ComparisonType.LESSER, "age", "o.age < :ageLesser");
		testCondition(ComparisonType.LESSER_OR_EQUALS, "age", "o.age <= :ageLesserOrEquals");
		testCondition(ComparisonType.NOT_EQUALS, "age", "o.age <> :ageNotEquals");
	}

	@Test
	public void stringConditionTypes(){
		testCondition(ComparisonType.CONTAINS, "name", "o.name LIKE :nameContains");
		testCondition(ComparisonType.STARTS, "name", "o.name LIKE :nameStarts");
		testCondition(ComparisonType.ENDS, "name", "o.name LIKE :nameEnds");
	}

	public void testCondition(ComparisonType cp, String property, String comparison){
		QueryVisitor visitor = new JPAQLQueryVisitor();
		visitor.visitEntity("Person");
		visitor.visitCondition(property, cp);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE "+comparison);
	}

	@Test
	public void fixParameterQuery(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS, "Maria");
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.name = :nameEquals");
		assertEquals(qr.getFixParameterValue("nameEquals"), "Maria");
		assertTrue(qr.getFixParameters().contains("nameEquals"));
	}

	@Test
	public void mixedWithfixParameterQuery(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS, "Maria");
		visitor.visitConector("and");
		visitor.visitCondition("age", ComparisonType.GREATER);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.name = :nameEquals and o.age > :ageGreater");
		assertEquals(qr.getFixParameterValue("nameEquals"), "Maria");
		assertTrue(qr.getFixParameters().contains("nameEquals"));
	}

	@Test
	public void mixedWithfixParameterQueryFromOtherClass(){
		visitor.visitEntity("Person");
		visitor.visitCondition("address.state", ComparisonType.EQUALS, "SP");
		visitor.visitConector("and");
		visitor.visitCondition("age", ComparisonType.GREATER);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.address.state = :addressStateEquals and o.age > :ageGreater");
		assertEquals(qr.getFixParameterValue("addressStateEquals"), "SP");
		assertTrue(qr.getFixParameters().contains("addressStateEquals"));
	}

	@Test
	public void oneOrderBy(){
		visitor.visitEntity("Person");
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o ORDER BY o.age ASC");
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void wrongOrderBy(){
		visitor.visitOrderBy("age", OrderingDirection.ASC);
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void orderByAfterConector(){
		visitor.visitEntity("Person");
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitConector("and");
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void entityAfterOrderBy(){
		visitor.visitEntity("Person");
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitEntity("Person");
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void conditionAfterOrderBy(){
		visitor.visitEntity("Person");
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitCondition("name", ComparisonType.EQUALS);
		visitor.visitEnd();
	}

	@Test(expected=InvalidQuerySequenceException.class)
	public void conectorAfterOrderBy(){
		visitor.visitEntity("Person");
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitConector("and");
		visitor.visitEnd();
	}

	@Test
	public void twoOrderBy(){
		visitor.visitEntity("Person");
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitOrderBy("name", OrderingDirection.DESC);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o ORDER BY o.age ASC, o.name DESC");
	}

	@Test
	public void orderByWithConditions(){
		visitor.visitEntity("Person");
		visitor.visitCondition("address.state", ComparisonType.EQUALS, "SP");
		visitor.visitConector("and");
		visitor.visitCondition("age", ComparisonType.GREATER);
		visitor.visitOrderBy("age", OrderingDirection.ASC);
		visitor.visitOrderBy("name", OrderingDirection.DESC);
		visitor.visitEnd();
		QueryRepresentation qr = visitor.getQueryRepresentation();

		String query = qr.getQuery().toString();
		assertEquals(query,"SELECT o FROM Person o WHERE o.address.state = :addressStateEquals and o.age > :ageGreater ORDER BY o.age ASC, o.name DESC");
	}

}


text:
include text = "

CREATE TABLE IF NOT EXISTS fk_city  (

  ID_CITY INT UNSIGNED NOT NULL,

  city varchar(255),
  country_id INT(5) NOT NULL,
  is_europe BOOLEAN NOT NULL,
  last_visit DATE,

    REVNAME                         CHAR(20)     NOT NULL ,
    REVDATE                         DATETIME        NOT NULL ,
    REVFIRST                        DATETIME        NOT NULL ,
    REVCREATOR                      CHAR(20)        NOT NULL,

  PRIMARY KEY ( ID_CITY )

) ENGINE=InnoDb CHARACTER SET utf8;

CREATE TABLE IF NOT EXISTS fk_address (

  ID_MANDANT INT UNSIGNED NOT NULL,
  ID_BUCHUNGSKREIS INT UNSIGNED NOT NULL,
  ID_ADDRESS INT UNSIGNED NOT NULL,

  ID_CITY INT UNSIGNED NOT NULL,
  ID_COUNTRY INT(6),

  Name VARCHAR(255),
  Vorname VARCHAR(255),

  PRIMARY KEY (ID_MANDANT, ID_BUCHUNGSKREIS, ID_ADDRESS ),
  FOREIGN KEY (ID_CITY) REFERENCES fk_city(ID_CITY)

) Engine = InnoDb CHARACTER SET utf8;

";

# first we add records to fk_city

reset data;
reset code;
reset actions;

filename is "output/random-fk-mysql.sql";

# ask for user name and user password
connection parameters are "localhost,db2phpsite_test,,";

read surnames from "data/de-surnames.txt";
read prenames from "data/de-prenames.txt";
read streets from "data/de-streets.txt";
# zip codes have two columns!
read zipcodes from "data/de-zips.txt";
read text from "data/de-text.txt";

# delete all records from the table fk_address
delete clause for fk_address is "";
do delete from fk_address;

# delete all records from the table fk_city
delete clause for fk_city is "";
do delete from fk_city;

work on table fk_city;

start with record 0;

export 150 records;

use ID_CITY as unique;
use city as city;
use REVNAME as surname ;
use REVCREATOR as surname ;

set is_europe to "1";
set last_visit to randomized DATE IN PAST;
set REVDATE to randomized DATETIME IN PAST;
set REVFIRST to randomized DATETIME IN PAST;

fetch 'country_id' using `select country_id from countries`;

run the export;

# then we add records to fk_address

# reset data; - we need the data
reset code;
reset actions;

work on table fk_address;

start with record 0;

export 50 records;

use Name as surname;
use Vorname as prename;

fetch 'ID_MANDANT,ID_BUCHUNGSKREIS' using "select ID_MANDANT,ID_BUCHUNGSKREIS from BUCHUNGSKREIS";
fetch 'ID_COUNTRY' using 'select country_id from countries';
fetch 'ID_CITY' using `select ID_CITY from fk_city`;

increment 'ID_ADDRESS' depending on 'ID_MANDANT, ID_BUCHUNGSKREIS';

run the export;

# now we are done :-)

redpajama_set_name: RedPajamaGithub


text:
namespace Microsoft.Azure.Management.DataLake.Analytics.Models
{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using Newtonsoft.Json;
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Microsoft.Rest.Azure;

    /// <summary>
    /// Additional Data Lake Store parameters.
    /// </summary>
    public partial class AddDataLakeStoreParameters
    {
        /// <summary>
        /// Initializes a new instance of the AddDataLakeStoreParameters class.
        /// </summary>
        public AddDataLakeStoreParameters() { }

        /// <summary>
        /// Initializes a new instance of the AddDataLakeStoreParameters class.
        /// </summary>
        /// <param name="properties">the properties for the Data Lake Store account being added.</param>
        public AddDataLakeStoreParameters(DataLakeStoreAccountInfoProperties properties)
        {
            Properties = properties;
        }

        /// <summary>
        /// Gets or sets the properties for the Data Lake Store account being
        /// added.
        /// </summary>
        [JsonProperty(PropertyName = "properties")]
        public DataLakeStoreAccountInfoProperties Properties { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (Properties == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "Properties");
            }
        }
    }
}


text:
(function( $ ){
  $.fn.hoverGrid = function( options ) {
	var settings = $.extend( {
      'itemClass' : '.item'
    }, options);

    return this.each(function() {
		var hoverGrid = $(this);
		hoverGrid.addClass('hover-grid');
		hoverGrid.find(settings.itemClass).addClass('hover-grid-item');

		$(hoverGrid).find(settings.itemClass).hover(function () {
			$(this).find('div.caption').stop(false, true).fadeIn(200);
		},
        function () {
            $(this).find('div.caption').stop(false, true).fadeOut(200);
        });
    });
  };
})( jQuery );


text:
package org.scalameta

import scala.{Seq => _}
import scala.collection.immutable.Seq

package object collections {
  implicit class XtensionCollection[T](seq: Seq[T]) {
    // TODO: We'll have to think what kind of collections
    // we want to use to signify laziness of tree's children.
    def isLazy: Boolean = seq.isInstanceOf[Stream[T]]
  }
}


text: JS_LOCATIONS['jquery'] = ['template/js/jquery/jquery-min.js']


text:
package calculation;

public class Configuration {

	//Current Values are Predefined and can be set at any time
	public double Duplication_Cost = 3 ;
	public double DBAccess_Cost = 0.5 ;
	public double Invalidation_Cost = 4;
	public double Comment_Cost = 0.3;
	public double Violation_Cost = 5 ;
	public double Cost_Per_Day = 2500;

}


text:
PRG="$0"
TEST_HOME=`dirname $PRG`

if [ ! -e $TEST_HOME/target/enunciate/compile/csharp/full.dll ]
then
  echo "$TEST_HOME/target/enunciate/compile/csharp/full.dll doesn't exist"
  exit 1
fi

mkdir $TEST_HOME/target/cstests > /dev/null
cp $TEST_HOME/target/enunciate/compile/csharp/full.dll $TEST_HOME/target/cstests
gmcs $TEST_HOME/src/test/cs/TestCSharpClient.cs /out:$TEST_HOME/target/cstests/fulltests.dll /target:library /r:nunit.framework /r:System.Web.Services /r:$TEST_HOME/target/cstests/full.dll
if [ 0 != $? ]
then
  echo "C# compile failed"
  exit 1
fi
bash -c cd $TEST_HOME/target && nunit-console $TEST_HOME/target/cstests/fulltests.dll


text:
require 'spec_helper'
require File.expand_path('../fixtures/classes', __FILE__)

describe Function::Predicate::Inclusion::Methods, '#include' do
  subject { object.include(other) }

  let(:object)          { described_class.new.freeze    }
  let(:described_class) { InclusionMethodsSpecs::Object }
  let(:other)           { [true, false].freeze          }

  it { should be_instance_of(Function::Predicate::Inclusion) }

  its(:left) { should be(object) }

  its(:right) { should be(other) }
end


text:
/* Should give proper results on macOS/OS X and Windows */
body {
    font-family: BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}


text:
package com.sun.jini.test.spec.jeri.basicinvocationhandler;

import java.util.logging.Level;

import java.util.logging.Level;
import java.lang.reflect.UndeclaredThrowableException;
import java.io.IOException;
import java.rmi.UnknownHostException;
import java.rmi.ConnectException;
import java.rmi.RemoteException;
import java.rmi.MarshalException;
import java.rmi.UnmarshalException;
import java.rmi.ConnectIOException;

/**
 * <pre>
 * Purpose
 *   This test verifies the behavior of the BasicInvocationHandler.invoke
 *   method when an exception is thrown by
 *   BasicInvocationHandler.createMarshalInputStream
 *
 * Test Cases
 *   This test iterates over a set of exceptions and boolean values.
 *   Each {firstResponseByte,deliveryStatus,exception} triple denotes one
 *   test case and is defined by the variables:
 *      byte firstResponseByte
 *      byte deliveryStatus
 *      Throwable createMarshalInputStreamException
 *
 * Infrastructure
 *   This test requires the following infrastructure:
 *     1) FakeInterface
 *          -an interface which declares one method that throws Throwable
 *     2) FakeObjectEndpoint
 *          -newCall returns OutboundRequestIterator passed to constructor
 *          -executeCall method returns null
 *     3) FakeOutboundRequestIterator
 *          -hasNext method returns true on first call and false after that
 *          -next method returns OutboundRequest passed to constructor
 *           and throws NoSuchElementException if called more than once
 *     4) FakeOutboundRequest
 *          -abort method does nothing
 *          -getDeliveryStatus method returns deliveryStatus
 *          -getRequestOutputStream method returns a ByteArrayOutputStream
 *          -getResponseInputStream method returns passed in
 *           ByteArrayInputStream
 *          -getUnfulfilledConstraints method return InvocationConstraints.EMPTY
 *          -populateContext method does nothing
 *     5) FakeBasicInvocationHandler
 *          -subclasses BasicInvocationHandler
 *          -overloaded createMarshalInputStream
 *           throws createMarshalInputStreamException
 *
 * Actions
 *   For each test case the test performs the following steps:
 *     1) construct a FakeOutboundRequest
 *     2) construct a FakeOutboundRequestIterator,passing in FakeOutboundRequest
 *     3) construct a FakeObjectEndpoint, passing in FakeOutboundRequestIterator
 *     4) construct a FakeBasicInvocationHandler, passing in FakeObjectEndpoint
 *        and FakeMethodConstraints
 *     5) create a dynamic proxy for the FakeInterface using the
 *        FakeBasicInvocationHandler
 *     6) write firstResponseByte to stream returned from
 *        FakeOutboundRequest.getResponseInputStream
 *     7) invoke FakeOutboundRequest.setDeliveryStatusReturn
 *        passing in deliveryStatus
 *     8) invoke FakeBasicInvocationHandler.setCreateMarshalInputStreamException
 *        passing in createMarshalInputStreamException
 *     9) invoke the method on the dynamic proxy
 *    10) assert createMarshalInputStreamException is thrown directly or
 *        appropriately wrapped
 * </pre>
 */
public class Invoke_CreateMarshalInputStreamExceptionTest
    extends AbstractInvokeTest
{
    // test cases
    Throwable[] cases = {
        new IOException(),
        new java.net.UnknownHostException(),    //IOException subclass
        new java.net.ConnectException(),        //IOException subclass
        new RemoteException(),                  //IOException subclass
        new java.rmi.UnknownHostException(""),  //RemoteException subclass
        new java.rmi.ConnectException(""),      //RemoteException subclass
        new MarshalException(""),               //RemoteException subclass
        new UnmarshalException(""),             //RemoteException subclass
        new ConnectIOException(""),             //RemoteException subclass
        new SecurityException(),                //RuntimeException subclass
        new ArrayIndexOutOfBoundsException(),   //RuntimeException subclass
        new UndeclaredThrowableException(null), //RuntimeException subclass
        new NullPointerException(),             //RuntimeException subclass
        new LinkageError(),                     //Error subclass
        new AssertionError()                    //Error subclass
    };

    boolean[] deliveryStatusCases = { true, false };

    int[] firstResponseByteCases = { 0x01, 0x02 };

    // inherit javadoc
    public void run() throws Exception {
        //loop over deliveryStatusCases, firstResponseByteCases and
        //exception test cases
        for (int g = 0; g < deliveryStatusCases.length; g++) {
            boolean deliveryStatus = deliveryStatusCases[g];

            for (int h = 0; h < firstResponseByteCases.length; h++) {
                int firstResponseByte = firstResponseByteCases[h];

                for (int i = 0; i < cases.length; i++) {
                    logger.log(Level.FINE,
                        "=================================");
                    Throwable createMarshalInputStreamException = cases[i];
                    logger.log(Level.FINE,"test case " + (counter++) + ": "
                        + "deliveryStatus:" + deliveryStatus
                        + ",firstResponseByte:" + firstResponseByte
                        + ",exception:" +createMarshalInputStreamException);
                    logger.log(Level.FINE,"");

                    iterator.init();
                    request.setDeliveryStatusReturn(deliveryStatus);
                    request.setResponseInputStream(firstResponseByte,null);
                    handler.setCreateMarshalInputStreamException(
                        createMarshalInputStreamException);

                    try {
                        impl.fakeMethod();
                        assertion(false);
                    } catch (Throwable t) {
                        check(true,deliveryStatus,false,true,
                            createMarshalInputStreamException,t);
                    }

                } //end inner loop
            } //end middle loop
        } //end outter loop
    }

}


text:
<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/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.autonlab.activesearch</groupId>
        <artifactId>ActiveSearchDaemon</artifactId>
        <packaging>jar</packaging>
        <version>1.0</version>
        <name>ActiveSearchDaemon</name>
        <url>http://maven.apache.org</url>

        <repositories>
                <repository>
                        <id>maven2-repository.java.net</id>
                        <name>Java.net Repository for Maven</name>
                        <url>http://download.java.net/maven/2/</url>
                        <layout>default</layout>
                </repository>
        </repositories>

        <dependencies>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>4.8.2</version>
                        <scope>test</scope>
                </dependency>

		<dependency>
		  <groupId>com.sun.jersey</groupId>
		  <artifactId>jersey-client</artifactId>
		  <version>1.9.1</version>
		</dependency>

		<dependency>
		  <groupId>org.cytoscape</groupId>
		  <artifactId>cytoscape3-api</artifactId>
		  <version>3.1.0</version>
		</dependency>

        </dependencies>

        <build>
          <plugins>
	    <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <version>2.4</version>
              <configuration>
		<archive>
		  <index>true</index>
		  <manifest>
		    <addClasspath>true</addClasspath>
		  </manifest>
		  <manifestEntries>
		    <Cytoscape-App-Version>0.3</Cytoscape-App-Version>
		    <Cytoscape-App-Name>ActiveSearch</Cytoscape-App-Name>
		    <Cytoscape-App>org.autonlab.activesearch.ActiveSearch</Cytoscape-App>
		    <Cytoscape-API-Compatibility>3.0</Cytoscape-API-Compatibility>
		  </manifestEntries>
		</archive>
              </configuration>
	    </plugin>
	    <plugin>
	      <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
      	      <configuration>
                <source>1.7</source>
                <target>1.7</target>
              </configuration>
    	    </plugin>
	  </plugins>
        </build>

</project>


text:
<?php

namespace umi\templating\helper;

use umi\i18n\ILocalizable;
use umi\i18n\translator\ITranslator;

/**
 * Помощники шаблонов для локализации.
 */
class TranslationHelper implements ILocalizable
{
    /**
     * Словарь по умолчанию
     */
    const DICTIONARY_DEFAULT = 'application';

    /**
     * @var ITranslator $translator транслятор
     */
    private $translator;

    /**
     * {@inheritdoc}
     */
    public function setTranslator(ITranslator $translator)
    {
        $this->translator = $translator;
    }

    /**
     * Переводит сообщение.
     * @param string $message сообщение
     * @param array $placeholders список плейсхолдеров
     * @param array $dictionaries
     * @return string
     */
    public function translate($message, array $placeholders = [], array $dictionaries = [])
    {
        $dictionaries = $dictionaries ?: [self::DICTIONARY_DEFAULT];

        if ($this->translator) {
            return $this->translator->translate($dictionaries, $message, $placeholders);
        }
        $replace = [];
        foreach ($placeholders as $key => $val) {
            $replace['{' . $key . '}'] = $val;
        }

        return strtr($message, $replace);
    }
}


text:
package io.quarkus.rest.client.reactive;

import static org.assertj.core.api.Assertions.assertThat;

import java.net.URI;
import java.util.concurrent.atomic.AtomicInteger;

import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.POST;
import javax.ws.rs.Path;

import org.eclipse.microprofile.rest.client.RestClientBuilder;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusUnitTest;
import io.quarkus.test.common.http.TestHTTPResource;

public class VoidReturnTypeTest {

    @RegisterExtension
    static final QuarkusUnitTest config = new QuarkusUnitTest()
            .withApplicationRoot((jar) -> jar.addClasses(Resource.class));

    @TestHTTPResource
    URI baseUri;

    @Test
    void testHeadersWithSubresource() {
        Client client = RestClientBuilder.newBuilder().baseUri(baseUri).build(Client.class);

        client.call();
        client.call();

        assertThat(Resource.COUNTER.get()).isEqualTo(2);
    }

    @Path("/")
    @ApplicationScoped
    public static class Resource {

        static final AtomicInteger COUNTER = new AtomicInteger(0);

        @POST
        public int returnCount() {
            return COUNTER.incrementAndGet();
        }
    }

    public interface Client {

        @Path("/")
        @POST
        void call();
    }
}


text:
//
// This code is part of the XPCOM extensions for Python.
//
// Written May 2000 by Mark Hammond.
//
// Based heavily on the Python COM support, which is
// (c) Mark Hammond and Greg Stein.
//
// (c) 2000, ActiveState corp.

#include "PyXPCOM_std.h"
#include <nsIEnumerator.h>

static nsIEnumerator *GetI(PyObject *self) {
	nsIID iid = NS_GET_IID(nsIEnumerator);

	if (!Py_nsISupports::Check(self, iid)) {
		PyErr_SetString(PyExc_TypeError, "This object is not the correct interface");
		return NULL;
	}
	return (nsIEnumerator *)Py_nsISupports::GetI(self);
}

static PyObject *PyFirst(PyObject *self, PyObject *args)
{
	if (!PyArg_ParseTuple(args, ":First"))
		return NULL;

	nsIEnumerator *pI = GetI(self);
	if (pI==NULL)
		return NULL;

	nsresult r;
	Py_BEGIN_ALLOW_THREADS;
	r = pI->First();
	Py_END_ALLOW_THREADS;
	return PyInt_FromLong(r);
}

static PyObject *PyNext(PyObject *self, PyObject *args)
{
	if (!PyArg_ParseTuple(args, ":Next"))
		return NULL;

	nsIEnumerator *pI = GetI(self);
	if (pI==NULL)
		return NULL;

	nsresult r;
	Py_BEGIN_ALLOW_THREADS;
	r = pI->Next();
	Py_END_ALLOW_THREADS;
	return PyInt_FromLong(r);
}

static PyObject *PyCurrentItem(PyObject *self, PyObject *args)
{
	PyObject *obIID = NULL;
	if (!PyArg_ParseTuple(args, "|O:CurrentItem", &obIID))
		return NULL;

	nsIID iid(NS_GET_IID(nsISupports));
	if (obIID != NULL && !Py_nsIID::IIDFromPyObject(obIID, &iid))
		return NULL;
	nsIEnumerator *pI = GetI(self);
	if (pI==NULL)
		return NULL;

	nsISupports *pRet = nsnull;
	nsresult r;
	Py_BEGIN_ALLOW_THREADS;
	r = pI->CurrentItem(&pRet);
	Py_END_ALLOW_THREADS;
	if ( NS_FAILED(r) )
		return PyXPCOM_BuildPyException(r);
	if (obIID) {
		nsISupports *temp;
		Py_BEGIN_ALLOW_THREADS;
		r = pRet->QueryInterface(iid, (void **)&temp);
		pRet->Release();
		Py_END_ALLOW_THREADS;
		if ( NS_FAILED(r) ) {
			return PyXPCOM_BuildPyException(r);
		}
		pRet = temp;
	}
	PyObject *ret = Py_nsISupports::PyObjectFromInterface(pRet, iid);
	NS_IF_RELEASE(pRet);
	return ret;
}

// A method added for Python performance if you really need
// it.  Allows you to fetch a block of objects in one
// hit, allowing the loop to remain implemented in C.
static PyObject *PyFetchBlock(PyObject *self, PyObject *args)
{
	PyObject *obIID = NULL;
	int n_wanted;
	int n_fetched = 0;
	if (!PyArg_ParseTuple(args, "i|O:FetchBlock", &n_wanted, &obIID))
		return NULL;

	nsIID iid(NS_GET_IID(nsISupports));
	if (obIID != NULL && !Py_nsIID::IIDFromPyObject(obIID, &iid))
		return NULL;
	nsIEnumerator *pI = GetI(self);
	if (pI==NULL)
		return NULL;

	// We want to fetch with the thread-lock released,
	// but this means we can not append to the PyList
	nsISupports **fetched = new nsISupports*[n_wanted];
	if (fetched==nsnull) {
		PyErr_NoMemory();
		return NULL;
	}
	memset(fetched, 0, sizeof(nsISupports *) * n_wanted);
	nsresult r = NS_OK;
	Py_BEGIN_ALLOW_THREADS;
	for (;n_fetched<n_wanted;) {
		nsISupports *pNew;
		r = pI->CurrentItem(&pNew);
		if (NS_FAILED(r)) {
			r = 0; // Normal enum end
			break;
		}
		if (obIID) {
			nsISupports *temp;
			r = pNew->QueryInterface(iid, (void **)&temp);
			pNew->Release();
			if ( NS_FAILED(r) ) {
				break;
			}
			pNew = temp;
		}
		fetched[n_fetched] = pNew;
		n_fetched++; // must increment before breaking out.
		if (NS_FAILED(pI->Next()))
			break; // not an error condition.
	}
	Py_END_ALLOW_THREADS;
	PyObject *ret;
	if (NS_SUCCEEDED(r)) {
		ret = PyList_New(n_fetched);
		if (ret)
			for (int i=0;i<n_fetched;i++) {
				PyObject *new_ob = Py_nsISupports::PyObjectFromInterface(fetched[i], iid);
				NS_IF_RELEASE(fetched[i]);
				PyList_SET_ITEM(ret, i, new_ob);
			}
	} else
		ret = PyXPCOM_BuildPyException(r);

	if ( ret == NULL ) {
		// Free the objects we consumed.
		for (int i=0;i<n_fetched;i++)
			fetched[i]->Release();

	}
	delete [] fetched;
	return ret;
}

static PyObject *PyIsDone(PyObject *self, PyObject *args)
{
	if (!PyArg_ParseTuple(args, ":IsDone"))
		return NULL;

	nsIEnumerator *pI = GetI(self);
	nsresult r;
	if (pI==NULL)
		return NULL;

	Py_BEGIN_ALLOW_THREADS;
	r = pI->IsDone();
	Py_END_ALLOW_THREADS;
	if (NS_FAILED(r))
		return PyXPCOM_BuildPyException(r);
	PyObject *ret = r==NS_OK ? Py_True : Py_False;
	Py_INCREF(ret);
	return ret;
}

struct PyMethodDef
PyMethods_IEnumerator[] =
{
	{ "First", PyFirst, 1},
	{ "first", PyFirst, 1},
	{ "Next", PyNext, 1},
	{ "next", PyNext, 1},
	{ "CurrentItem", PyCurrentItem, 1},
	{ "currentItem", PyCurrentItem, 1},
	{ "IsDone", PyIsDone, 1},
	{ "isDone", PyIsDone, 1},
	{ "FetchBlock", PyFetchBlock, 1},
	{ "fetchBlock", PyFetchBlock, 1},
	{NULL}
};


text:
$(document).ready(function(){
	var map = new L.Map("leaflet-map");

	/* Tilestream Layer example:
	var historicUrl = "http://opengis.azexperience.org/tiles/v2/azHistoric1880/{z}/{x}/{y}.png",
		historicLayer = new L.TileLayer(historicUrl, {maxZoom: 10}); */

	/* ESRI tiled service example: */
	var natGeoLayer = new L.TileLayer.ESRI("http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer");

	/* Bing maps example:
	var bingLayer = new L.TileLayer.Bing(<<Bing Maps API Key>>, "Road"); */

	/* WMS layer example: */
	var wmsUrl = "{{ gsconfig.BaseGeoserverUrl }}wms",
		wmsLayer = new L.TileLayer.WMS(wmsUrl, {
			layers: "gsmlp:GeologicUnitView",
			format: "image/png",
			styles: "{{ gm.name }}",
			transparent: true
		});

	var ll = new L.LatLng({{ bottom }}, {{ left }}),
		ur = new L.LatLng({{ top }}, {{ right }}),
		bounds = new L.LatLngBounds(ll, ur);

	/* WFS GeoJSON layer example:
	var wfsLayer = new L.GeoJSON.WFS("http://opengis.azexperience.org/geoserver/wfs", "vae:azhistoricmines", {
		pointToLayer: function(latlng) { return new L.CircleMarker(latlng); },
		popupObj: new JadeContent("templates/example.jade"),
		popupOptions: { maxWidth: 530, centered: false },
		hoverFld: "name"
	}); */

	map.fitBounds(bounds).addLayer(natGeoLayer);
	setTimeout(function() { map.addLayer(wmsLayer); }, 500);
});


text:
    width: 100%;
    border: 1px solid #a6c9e2;
    border-radius: 5px;
    background: #fcfdfd 50% bottom repeat-x;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

#bootstrap-overrides th, td, caption {
    vertical-align: middle;
}

#bootstrap-overrides caption {
    caption-side: unset;
    border: 1px solid #c5dbec;
    background: #dfeffc 50% 50% repeat-x;
    font-weight: bold;
    color: #2e6e9e;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

#bootstrap-overrides th, td, caption {
    padding: 15px 10px 15px 5px;
}

#bootstrap-overrides .form-control {
    padding: 0.187rem 0.375rem;
    font-size: 0.9rem;
}

#bootstrap-overrides .input-group-text {
    padding-top: unset;
    padding-bottom: unset;
    font-size: 0.9rem;
}

#bootstrap-overrides select.form-control:not([size]):not([multiple]) {
    height: unset;
}

.header {
    background: #5c9ccc 50% 50% repeat-x;
    color: #fff;
    font-weight: bold;
}


text:
@interface ChildViewController : UIViewController

- (IBAction)touchUpInsidePreviousButton:(id)sender;

- (IBAction)touchUpInsideNextButton:(id)sender;

@property (nonatomic) NSInteger childNumber;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end


text:
using System;
using System.Windows.Forms;

namespace ZBreak
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.ApplicationExit += (s, e) => Config.Save();
            Config.Read();
            ActiveMonitor.Run();
            Application.Run();
        }
    }
}


text:
/*=============================================================================
	Author:			Eric M. Barnard - @ericmbarnard
	License:		MIT (http://opensource.org/licenses/mit-license.php)

	Description:	Validation Library for KnockoutJS
	Version:		2.0.1
===============================================================================
*/
/*globals require: false, exports: false, define: false, ko: false */

(function (factory) {
	// Module systems magic dance.

	if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
		// CommonJS or Node: hard-coded dependency on "knockout"
		factory(require("knockout"), exports);
	} else if (typeof define === "function" && define["amd"]) {
		// AMD anonymous module with hard-coded dependency on "knockout"
		define(["knockout", "exports"], factory);
	} else {
		//


text:
<title>
Bush's pal holds onto his fortune
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

Treasury secretary nominee will get a huge tax write-off

Bush's pal holds onto his fortune

By Nicole Colson | June 9, 2006 | Page 2

IN AN administration already brimming with millionaires, Henry Paulson Jr., George Bush's choice as the new Treasury Secretary, towers above the rest, with an estimated net worth of at least $700 million. And thanks to his appointment to replace outgoing Treasury Secretary John Snow, Paulson will be able to hold on to even more of that wealth.

Even if he wasn't dedicated to pushing the administration's conservative orthodoxy, Paulson would have to consider taking the job--because of the possibilities for a huge tax write-off.

As the head of Goldman Sachs--with a CEO paycheck of $37 million in total compensation last year alone--Paulson amassed a huge stake in the Wall Street firm's stock, worth hundreds of millions of dollars.

Paulson is required by government law to sell the majority of his Goldman Sachs holdings in order to avoid a conflict of interest in his new job. Under normal circumstances, he would have to pay at least $60 million in capital gains taxes to sell of his shares and get his hands on the proceeds.

But Paulson is poised, according to Forbes magazine, "to take advantage of a tax loophole that allows government officials to defer capital gains taxes on assets they have to sell to avoid a conflict of interest, as long as the proceeds are reinvested in government securities or a broad array of mutual funds approved by the government within 60 days."

As long as he holds onto the "replacement assets," Paulson never has to pay the taxes--saving him an estimated $60-100 million in taxes.

As Forbes points out, the loophole, created specifically for members of the executive branch during George Bush Sr.'s administration, "was designed to ensure that the wealthy are not deterred from taking posts in government because they fear a big tax hit. But it amounts to a significant perk of public office."

According to the New York Times' calculation, the sale of Paulson's holdings in Goldman Sachs would net him an estimated $325 million. The tax on the sale should be $48 million, which Paulson will get to keep under the Bush Sr. loophole.

Don't expect any griping from the Democratic "opposition" about Paulson's good fortune. Leading Democrats had nothing but kind words for Bush's nominee. And no wonder--the last chief executive of Goldman Sachs to become treasury secretary was Robert Rubin, of the Clinton administration.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
package com.firebasecontinue;

import com.google.android.gms.tasks.Continuation;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ServerValue;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;

/**
 * The Firebase Continue for Android library.
 *
 * Firebase Continue enables mobile developers to easily integrate activity transitioning
 * from their mobile apps to the web by way of Chrome extensions.
 * For more details, see: https://github.com/firebase/firebase-continue.
 *
 * Please see the usage instructions in the relevant README file(s).
 * There is also more specific documentation within the library itself below.
 *
 * TODO: Add unit tests, including tests while the app/Firebase is offline.
 */
public final class FirebaseContinue {

    /**
     * Attempts to asynchronously broadcast an Activity (codified as a URL) within an application
     * that the currently signed in user may wish to continue elsewhere (in the immediate future)
     * to all potential clients (i.e. Chrome extension(s)) which could allow the user to do so by
     * opening said URL.
     *
     * Note that, by design, only the most recently successfully broadcast Activity (for a given
     * application) could possibly be relevant to the user. The Firebase Continue database rules
     * and libraries enforce this. For more details, please see the relevant README file(s).
     *
     * @param activityUrl The URL which, if the current user were to navigate to,
     *                    would allow the user to continue their Activity.
     * @param applicationName The name of the application, as defined in the Firebase Realtime
     *                        Database rules for Firebase Continue, that the user's Activity is
     *                        within.
     * @return A Task which, upon completion, signals whether or not the Firebase Continue Activity
     * with the provided URL (within the context of the application with the provided appName)
     * was successfully broadcast to all potential clients which could allow the user to continue
     * the Activity, or that the broadcast failed. To understand how to use Tasks,
     * see: https://developers.google.com/android/guides/tasks.
     */
    public static Task<Void> broadcastActivityToContinue(final String activityUrl,
                                                         final String applicationName) {
        // Use a chain of Tasks to eventually set the value for the current user of the most
        // recent Activity they may wish to continue within the application.
        return Tasks.call(new Callable<DatabaseReference>() {
            @Override
            public DatabaseReference call() throws Exception {
                // First, ensure the inputs could be valid.
                if (activityUrl == null || activityUrl.trim().length() == 0) {
                    throw new IllegalArgumentException("activityUrl is invalid");
                } else if (applicationName == null || applicationName.trim().length() == 0) {
                    throw new IllegalArgumentException("applicationName is invalid");
                }

                // Next, ensure the current user is signed in.
                FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();
                if (currentUser == null) {
                    throw new IllegalStateException("The current user must be signed in");
                }

                // Provide the proceeding Task with the DatabaseReference for the most recent
                // Activity the current user may wish to continue (within the context of the
                // "applicationName" application).
                return FirebaseDatabase.getInstance().getReference()
                        .child("firebaseContinue")
                        .child(applicationName)
                        .child(currentUser.getUid());
            }
        }).continueWithTask(new Continuation<DatabaseReference, Task<DatabaseReference>>() {
            @Override
            public Task<DatabaseReference> then(Task<DatabaseReference> task) throws Exception {
                // Since we now have a DatabaseReference for it, delete any current value for the
                // most recent Activity the user may wish to continue.
                // We do this because Activities are considered immutable within the database, so
                // before setting a value any existing value must first be deleted.

                final TaskCompletionSource<DatabaseReference> deletionTaskCompletion =
                        new TaskCompletionSource<>();
                DatabaseReference mostRecentActivityRef = task.getResult();
                mostRecentActivityRef.removeValue(
                        new DatabaseReference.CompletionListener() {
                            @Override
                            public void onComplete(DatabaseError error, DatabaseReference ref) {
                                if (error == null) {
                                    // Set that this Task was successful and pass along the
                                    // DatabaseReference to the next Task.
                                    deletionTaskCompletion.setResult(ref);
                                } else {
                                    // Set that this Task was unsuccessful.
                                    deletionTaskCompletion.setException(error.toException());
                                }
                            }
                        });

                return deletionTaskCompletion.getTask();
            }
        }).continueWithTask(new Continuation<DatabaseReference, Task<Void>>() {
            @Override
            public Task<Void> then(Task<DatabaseReference> task) throws Exception {
                // Now we can set the new value for the most recent Activity the user may wish
                // to continue within the application, since any previous value has been deleted.

                // Create a Firebase Continue Activity to use as the new most recent Activity
                // the user may wish to continue within the application.
                // The schema of each Activity is defined in
                // sample-firebase-continue-database.rules.json.
                Map<String, Object> activityMetadata = new HashMap<>();
                activityMetadata.put("addedAt", ServerValue.TIMESTAMP);
                Map<String, Object> activity = new HashMap<>();
                activity.put("url", activityUrl);
                activity.put("metadata", activityMetadata);

                final TaskCompletionSource<Void> setValueTaskCompletion =
                        new TaskCompletionSource<>();
                DatabaseReference mostRecentActivityRef = task.getResult();
                mostRecentActivityRef.setValue(
                        activity,
                        new DatabaseReference.CompletionListener() {
                            @Override
                            public void onComplete(DatabaseError error, DatabaseReference ref) {
                                if (error == null) {
                                    // Set that this Task was successful.
                                    setValueTaskCompletion.setResult(null);
                                } else {
                                    // Set that this Task was unsuccessful.
                                    setValueTaskCompletion.setException(error.toException());
                                }
                            }
                        });

                return setValueTaskCompletion.getTask();
            }
        });
    }

    // TODO: Possibly add a "dismissActivityToContinue(String activityUrl, String appName)"
    // method akin to dismissing within the Chrome extensions library.
    // This could be used by mobile apps when an Activity that
    // was broadcast would certainly no longer be relevant to the user (rather than letting the
    // Chrome extension library itself (or the user within a Chrome extension) decide that).

    /**
     * This library only exposes static methods, so no instances are necessary.
     */
    private FirebaseContinue() {
        throw new UnsupportedOperationException("FirebaseContinue cannot be instantiated");
    }
}


text:
ACCEPTED

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

#### Published in
Syll. gen. sp. crypt. (Paris) 109 (1856)

#### Original name
Leotia atra Weinm., 1856

### Remarks
null


text:
package main

type TimelyQueryForm struct {
    Metric               string            `json:"metric"`
    Alias                string            `json:"alias"`
    Aggregator           string            `json:"aggregator"`
    DisableDownsampling  bool              `json:"disableDownsampling"`
    DownsampleAggregator string            `json:"downsampleAggregator"`
    DownsampleFillPolicy string            `json:"downsampleFillPolicy"`
    DownsampleInterval   string            `json:"downsampleInterval"`
    Tags                 map[string]string `json:"tags"`
    Filters              []Filter          `json:"filters"`
    ShouldComputeRate    bool              `json:"shouldComputeRate"`
    IsCounter            bool              `json:"isCounter"`
    CounterMax           string            `json:"counterMax"`
    CounterResetValue    string            `json:"counterResetValue"`
    Tsuids               []string          `json:"tsuids"`
    QueryType            string            `json:"queryType"`
    RefId                string            `json:"refId"`
    Datasource           string            `json:"datasource"`
    DatasourceId         int64             `json:"datasourceId"`
    IntervalMs           int64             `json:"intervalMs"`
    MaxDataPoints        int64             `json:"maxDataPoints"`
    OrgId                int64             `json:"ordId"`
}

type TimelyQueryServer struct {
    Metric               string            `json:"metric"`
    Aggregator           string            `json:"aggregator"`
    DisableDownsampling  bool              `json:"disableDownsampling"`
    DownsampleAggregator string            `json:"downsampleAggregator"`
    DownsampleFillPolicy string            `json:"downsampleFillPolicy"`
    DownsampleInterval   string            `json:"downsampleInterval"`
    Tags                 map[string]string `json:"tags"`
    Filters              []Filter          `json:"filters"`
    ShouldComputeRate    bool              `json:"shouldComputeRate"`
    IsCounter            bool              `json:"isCounter"`
    CounterMax           string            `json:"counterMax"`
    CounterResetValue    string            `json:"counterResetValue"`
    Tsuids               []string          `json:"tsuids"`
    QueryType            string            `json:"queryType"`
    RefId                string            `json:"refId"`
}

type Filter struct {
    Type    string `json:"type"`
    TagK    string `json:"tagk"`
    Filter  string `json:"filter"`
    GroupBy bool   `json:"groupBy"`
}

type RateOptions struct {
    Counter    bool  `json:"counter"`
    CounterMax int32 `json:"counterMax"`
    ResetValue int32 `json:"resetValue"`
}

type TimelyQuery struct {
    Metric      string            `json:"metric"`
    Aggregator  string            `json:"aggregator"`
    Rate        bool              `json:"rate"`
    RateOptions RateOptions       `json:"rateOptions"`
    Downsample  string            `json:"downsample"`
    Tags        map[string]string `json:"tags"`
    Filters     []Filter          `json:"filters"`
    Tsuids      []string          `json:"tsuids"`
}

type TimelyRequest struct {
    MsResolution      bool          `json:"msResolution"`
    GlobalAnnotations bool          `json:"globalAnnotations"`
    Start             int64         `json:"start"`
    End               int64         `json:"end"`
    Queries           []TimelyQuery `json:"queries"`
}

type TimelyResponse struct {
    Metric         string            `json:"metric"`
    Tags           map[string]string `json:"tags"`
    AggregatedTags []string          `json:"aggregatedTags"`
    DataPoints     map[int64]float64 `json:"dps"`
}

type TimelyDataSourceOptions struct {
    TimelyHost                      string `json:"timelyHost"`
    HttpsPort                       string `json:"httpsPort"`
    OauthPassThru                   bool `json:"oauthPassThru"`
    UseClientCertWhenOAuthMissing   bool `json:"useClientCertWhenOAuthMissing"`
    ClientCertificatePath           string `json:"clientCertificatePath"`
    ClientKeyPath                   string `json:"clientKeyPath"`
    CertificateAuthorityPath        string `json:"certificateAuthorityPath"`
    AllowInsecureSsl                bool `json:"allowInsecureSsl"`
}

type TimelyErrorResponse struct {
    ResponseCode                    int32 `json:responseCode`
    Message                         string `json:message`
    DetailMessage                   string `json:detailMessage`
}


text:
const int64_t kEventLen = 32;

// Conversion between uint64_t and byte array.
void itos(uint8_t *dst, uint64_t val, int len);
uint64_t stoi(const uint8_t *src, int len);

// Check for event types.
bool is_data_event(const uint8_t *event);
bool is_tombstone(const uint8_t *event);

// Return the seq# of a data event, or the left boundary of a tombstone event.
int64_t get_begin_seq(const uint8_t *event);
// Return the seq# + 1 of a data event, or the right boundary of a
// tombstone event.
int64_t get_end_seq(const uint8_t *event);
// Check if a seq# fits in the range of an event.
// For data event, return true if the seq# equals its own; for tombstone,
// return true if begin <= seq# < end holds.
bool in_range(const uint8_t *event, int64_t seq);

// Returns the object id in a data event.
int64_t get_object_id(const uint8_t *event);

// Get the timestamp when this events is first stored at the local proxy.
int64_t get_timestamp(const uint8_t *event);

// Convert a data event into a singleton tombstone.
void to_tombstone(uint8_t *event);

// For debugging: print a chunk of memory in integers.
void debug_show_memory(const uint8_t *ptr, int size, int log_level);

#endif  // SPRINKLER_COMMON_H_


text:
using namespace ouro::gpu::d3d;

namespace ouro {

const char* as_string(const gpu::rasterizer_state::value& _Value)
{
	switch (_Value)
	{
		case gpu::rasterizer_state::front_face: return "front_face";
		case gpu::rasterizer_state::back_face: return "back_face";
		case gpu::rasterizer_state::two_sided: return "two_sided";
		case gpu::rasterizer_state::front_wireframe: return "front_wireframe";
		case gpu::rasterizer_state::back_wireframe: return "back_wireframe";
		case gpu::rasterizer_state::two_sided_wireframe: return "two_sided_wireframe";
		default: break;
	}
	return "?";
}
oDEFINE_TO_FROM_STRING(gpu::rasterizer_state::value);

namespace gpu {

Device* get_device(device& dev);
DeviceContext* get_dc(command_list& cl);

void rasterizer_state::initialize(const char* name, device& dev)
{
	deinitialize();

	static const D3D11_FILL_MODE sFills[] =
	{
		D3D11_FILL_SOLID,
		D3D11_FILL_SOLID,
		D3D11_FILL_SOLID,
		D3D11_FILL_WIREFRAME,
		D3D11_FILL_WIREFRAME,
		D3D11_FILL_WIREFRAME,
	};
	static_assert(oCOUNTOF(sFills) == count, "array mismatch");

	static const D3D11_CULL_MODE sCulls[] =
	{
		D3D11_CULL_BACK,
		D3D11_CULL_FRONT,
		D3D11_CULL_NONE,
		D3D11_CULL_BACK,
		D3D11_CULL_FRONT,
		D3D11_CULL_NONE,
	};
	static_assert(oCOUNTOF(sCulls) == count, "array mismatch");

	mstring n;
	D3D11_RASTERIZER_DESC desc;
  desc.FrontCounterClockwise = false;
  desc.DepthBias = D3D11_DEFAULT_DEPTH_BIAS;
  desc.DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP;
  desc.SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
  desc.DepthClipEnable = true;
  desc.ScissorEnable = false;
  desc.MultisampleEnable = false;
  desc.AntialiasedLineEnable = false;

	Device* D3DDevice = get_device(dev);
	for (int i = 0; i < count; i++)
	{
		desc.FillMode = sFills[i];
		desc.CullMode = sCulls[i];
		oV(D3DDevice->CreateRasterizerState(&desc, (RasterizerState**)&states[i]));
		snprintf(n, "%s::%s", name, as_string(value(i)));
		debug_name((RasterizerState*)states[i], n);
	}
}

void rasterizer_state::deinitialize()
{
	for (auto& p : states)
	{
		oSAFE_RELEASEV(p);
	}
}

void rasterizer_state::set(command_list& cl, const value& state)
{
	get_dc(cl)->RSSetState((RasterizerState*)states[state]);
}

}}


text:
@implementation OrdersModel

- (id) init {

    if (self = [super init]) {
        _lines = [[NSMutableArray alloc] init];
        _totalAmount = 0;
    }

    return self;
}

- (void) addLine: (OffersModel *)offer {
    OrderLinesModel *line = [[OrderLinesModel alloc] init];
    line.itemCode = offer.ItemCode;
    line.itemName = offer.ItemName;
    line.icon = offer.PictureURL;
    line.image = offer.itemImage;
    line.price = offer.Price;
    line.quantity = 1;

    OrderLinesModel * existingLine = [self isLine:line];
    if (existingLine == nil)
    {
        [self.lines addObject:line];
    }
    else
    {
        existingLine.price += (existingLine.price / existingLine.quantity);
        existingLine.quantity += 1;
    }

    self.totalAmount = self.totalAmount + offer.Price;
}

- (OrderLinesModel *)isLine:(OrderLinesModel *)newLine {
    for (OrderLinesModel *line in self.lines){
        if ([newLine.itemCode isEqualToString:line.itemCode])
            return line;
    }

    return nil;
}

@end


text:
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
'''

__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'

import json
from mock import Mock
import unittest
from unittest import TestCase

import six

from gremlin_python.statics import *
from gremlin_python.structure.graph import Vertex
from gremlin_python.structure.graph import Path
from gremlin_python.structure.io.graphson import GraphSONWriter, GraphSONReader, GraphSONUtil
import gremlin_python.structure.io.graphson
from gremlin_python.process.traversal import P
from gremlin_python.process.strategies import SubgraphStrategy
from gremlin_python.process.graph_traversal import __

class TestGraphSONReader(TestCase):
    graphson_reader = GraphSONReader()

    def test_number_input(self):
        x = self.graphson_reader.readObject(json.dumps({
            "@type": "g:Int32",
            "@value": 31
        }))
        assert isinstance(x, int)
        assert 31 == x
        ##
        x = self.graphson_reader.readObject(json.dumps({
            "@type": "g:Int64",
            "@value": 31
        }))
        assert isinstance(x, long)
        assert long(31) == x
        ##
        x = self.graphson_reader.readObject(json.dumps({
            "@type": "g:Float",
            "@value": 31.3
        }))
        assert isinstance(x, float)
        assert 31.3 == x
        ##
        x = self.graphson_reader.readObject(json.dumps({
            "@type": "g:Double",
            "@value": 31.2
        }))
        assert isinstance(x, float)
        assert 31.2 == x

    def test_graph(self):
        vertex = self.graphson_reader.readObject(
            """{"@type":"g:Vertex", "@value":{"id":{"@type":"g:Int32","@value":1},"label":"person","outE":{"created":[{"id":{"@type":"g:Int32","@value":9},"inV":{"@type":"g:Int32","@value":3},"properties":{"weight":{"@type":"g:Double","@value":0.4}}}],"knows":[{"id":{"@type":"g:Int32","@value":7},"inV":{"@type":"g:Int32","@value":2},"properties":{"weight":{"@type":"g:Double","@value":0.5}}},{"id":{"@type":"g:Int32","@value":8},"inV":{"@type":"g:Int32","@value":4},"properties":{"weight":{"@type":"g:Double","@value":1.0}}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"marko"}],"age":[{"id":{"@type":"g:Int64","@value":1},"value":{"@type":"g:Int32","@value":29}}]}}}""")
        assert isinstance(vertex, Vertex)
        assert "person" == vertex.label
        assert 1 == vertex.id
        assert isinstance(vertex.id, int)
        assert vertex == Vertex(1)

    def test_path(self):
        path = self.graphson_reader.readObject(
            """{"@type":"g:Path","@value":{"labels":[["a"],["b","c"],[]],"objects":[{"@type":"g:Vertex","@value":{"id":{"@type":"g:Int32","@value":1},"label":"person","properties":{"name":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"g:Int64","@value":0},"value":"marko","label":"name"}}],"age":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"g:Int64","@value":1},"value":{"@type":"g:Int32","@value":29},"label":"age"}}]}}},{"@type":"g:Vertex","@value":{"id":{"@type":"g:Int32","@value":3},"label":"software","properties":{"name":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"g:Int64","@value":4},"value":"lop","label":"name"}}],"lang":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"g:Int64","@value":5},"value":"java","label":"lang"}}]}}},"lop"]}}"""
        )
        assert isinstance(path, Path)
        if six.PY3:
            assert "[v[1], v[3], 'lop']" == str(path)
        else:
            assert "[v[1], v[3], u'lop']" == str(path)
        assert Vertex(1) == path[0]
        assert Vertex(1) == path["a"]
        assert "lop" == path[2]
        assert 3 == len(path)

    def test_custom_mapping(self):

        # extended mapping
        class X(object):
            pass

        type_string = "test:Xtype"
        override_string = "g:Int64"
        serdes = Mock()

        reader = GraphSONReader(deserializer_map={type_string: serdes})
        assert type_string in reader.deserializers

        # base dicts are not modified
        assert type_string not in gremlin_python.structure.io.graphson._deserializers

        x = X()
        o = reader.toObject({GraphSONUtil.TYPE_KEY: type_string, GraphSONUtil.VALUE_KEY: x})
        serdes.objectify.assert_called_once_with(x, reader)
        assert o is serdes.objectify()

        # overridden mapping
        type_string = "g:Int64"
        serdes = Mock()
        reader = GraphSONReader(deserializer_map={type_string: serdes, override_string: serdes})
        assert gremlin_python.structure.io.graphson._deserializers[type_string] is not reader.deserializers[type_string]

        value = 3
        o = reader.toObject({GraphSONUtil.TYPE_KEY: type_string, GraphSONUtil.VALUE_KEY: value})
        serdes.objectify.assert_called_once_with(value, reader)
        assert o is serdes.objectify()

class TestGraphSONWriter(TestCase):

    graphson_writer = GraphSONWriter()

    def test_number_output(self):
        assert {"@type":"g:Int64","@value":2} == json.loads(self.graphson_writer.writeObject(long(2)))
        assert {"@type":"g:Int32","@value":1} == json.loads(self.graphson_writer.writeObject(1))
        assert {"@type":"g:Double","@value":3.2} == json.loads(self.graphson_writer.writeObject(3.2))
        assert """true""" == self.graphson_writer.writeObject(True)

    def test_numbers(self):
        assert {"@type": "g:Int64", "@value": 2} == json.loads(self.graphson_writer.writeObject(long(2)))
        assert {"@type": "g:Int32", "@value": 1} == json.loads(self.graphson_writer.writeObject(1))
        assert {"@type": "g:Double", "@value": 3.2} == json.loads(self.graphson_writer.writeObject(3.2))
        assert """true""" == self.graphson_writer.writeObject(True)

    def test_P(self):
        assert """{"@type":"g:P","@value":{"predicate":"and","value":[{"@type":"g:P","@value":{"predicate":"or","value":[{"@type":"g:P","@value":{"predicate":"lt","value":"b"}},{"@type":"g:P","@value":{"predicate":"gt","value":"c"}}]}},{"@type":"g:P","@value":{"predicate":"neq","value":"d"}}]}}""" == self.graphson_writer.writeObject(
            P.lt("b").or_(P.gt("c")).and_(P.neq("d")))

    def test_strategies(self):
        # we have a proxy model for now given that we don't want to have to have g:XXX all registered on the Gremlin traversal machine (yet)
        assert {"@type": "g:SubgraphStrategy", "@value": {}} == json.loads(self.graphson_writer.writeObject(SubgraphStrategy))
        assert {"@type": "g:SubgraphStrategy", "@value": {
            "vertices": {"@type": "g:Bytecode", "@value": {"step": [["has", "name", "marko"]]}}}} == json.loads(
            self.graphson_writer.writeObject(SubgraphStrategy(vertices=__.has("name", "marko"))))

    def test_custom_mapping(self):

        # extended mapping
        class X(object):
            pass

        serdes = Mock()
        writer = GraphSONWriter(serializer_map={X: serdes})
        assert X in writer.serializers

        # base dicts are not modified
        assert X not in gremlin_python.structure.io.graphson._serializers

        obj = X()
        d = writer.toDict(obj)
        serdes.dictify.assert_called_once_with(obj, writer)
        assert d is serdes.dictify()

        # overridden mapping
        serdes = Mock()
        writer = GraphSONWriter(serializer_map={int: serdes})
        assert gremlin_python.structure.io.graphson._serializers[int] is not writer.serializers[int]

        value = 3
        d = writer.toDict(value)
        serdes.dictify.assert_called_once_with(value, writer)
        assert d is serdes.dictify()

if __name__ == '__main__':
    unittest.main()


text:
.class public abstract Landroid/os/IUpdateLock$Stub;
.super Landroid/os/Binder;
.source "IUpdateLock.java"

# interfaces
.implements Landroid/os/IUpdateLock;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/os/IUpdateLock;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x409
    name = "Stub"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/os/IUpdateLock$Stub$Proxy;
    }
.end annotation

# static fields
.field private static final DESCRIPTOR:Ljava/lang/String; = "android.os.IUpdateLock"

.field static final TRANSACTION_acquireUpdateLock:I = 0x1

.field static final TRANSACTION_releaseUpdateLock:I = 0x2

# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 19
    invoke-direct {p0}, Landroid/os/Binder;-><init>()V

    .line 20
    const-string v0, "android.os.IUpdateLock"

    invoke-virtual {p0, p0, v0}, Landroid/os/IUpdateLock$Stub;->attachInterface(Landroid/os/IInterface;Ljava/lang/String;)V

    .line 21
    return-void
.end method

.method public static asInterface(Landroid/os/IBinder;)Landroid/os/IUpdateLock;
    .locals 2
    .param p0, "obj"    # Landroid/os/IBinder;

    .prologue
    .line 28
    if-nez p0, :cond_0

    .line 29
    const/4 v0, 0x0

    .line 35
    :goto_0
    return-object v0

    .line 31
    :cond_0
    const-string v1, "android.os.IUpdateLock"

    invoke-interface {p0, v1}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;

    move-result-object v0

    .line 32
    .local v0, "iin":Landroid/os/IInterface;
    if-eqz v0, :cond_1

    instance-of v1, v0, Landroid/os/IUpdateLock;

    if-eqz v1, :cond_1

    .line 33
    check-cast v0, Landroid/os/IUpdateLock;

    goto :goto_0

    .line 35
    :cond_1
    new-instance v0, Landroid/os/IUpdateLock$Stub$Proxy;

    .end local v0    # "iin":Landroid/os/IInterface;
    invoke-direct {v0, p0}, Landroid/os/IUpdateLock$Stub$Proxy;-><init>(Landroid/os/IBinder;)V

    goto :goto_0
.end method

# virtual methods
.method public asBinder()Landroid/os/IBinder;
    .locals 0

    .prologue
    .line 39
    return-object p0
.end method

.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
    .locals 4
    .param p1, "code"    # I
    .param p2, "data"    # Landroid/os/Parcel;
    .param p3, "reply"    # Landroid/os/Parcel;
    .param p4, "flags"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x1

    .line 43
    sparse-switch p1, :sswitch_data_0

    .line 71
    invoke-super {p0, p1, p2, p3, p4}, Landroid/os/Binder;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    move-result v2

    :goto_0
    return v2

    .line 47
    :sswitch_0
    const-string v3, "android.os.IUpdateLock"

    invoke-virtual {p3, v3}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V

    goto :goto_0

    .line 52
    :sswitch_1
    const-string v3, "android.os.IUpdateLock"

    invoke-virtual {p2, v3}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 54
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v0

    .line 56
    .local v0, "_arg0":Landroid/os/IBinder;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v1

    .line 57
    .local v1, "_arg1":Ljava/lang/String;
    invoke-virtual {p0, v0, v1}, Landroid/os/IUpdateLock$Stub;->acquireUpdateLock(Landroid/os/IBinder;Ljava/lang/String;)V

    .line 58
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    goto :goto_0

    .line 63
    .end local v0    # "_arg0":Landroid/os/IBinder;
    .end local v1    # "_arg1":Ljava/lang/String;
    :sswitch_2
    const-string v3, "android.os.IUpdateLock"

    invoke-virtual {p2, v3}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 65
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v0

    .line 66
    .restart local v0    # "_arg0":Landroid/os/IBinder;
    invoke-virtual {p0, v0}, Landroid/os/IUpdateLock$Stub;->releaseUpdateLock(Landroid/os/IBinder;)V

    .line 67
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    goto :goto_0

    .line 43
    nop

    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_1
        0x2 -> :sswitch_2
        0x5f4e5446 -> :sswitch_0
    .end sparse-switch
.end method


text:
export * from './validator';
export * from './project-by-id-validator';
export * from './project-by-tenant-id-validator';


text:
<?php

namespace ExchangeBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class ExchangeBundle extends Bundle
{
}


text:
#include <stdio.h>
#include <setjmp.h>

#ifndef EXCEPTION_H
#define EXCEPTION_H

void exception(char * err);

#endif


text:
require 'spec_helper'
require 'integration/length_validator/spec_helper'

describe 'DataMapper::Validations::Fixtures::BoatDock' do
  before :all do
    DataMapper::Validations::Fixtures::BoatDock.auto_migrate!

    @model = DataMapper::Validations::Fixtures::BoatDock.new
  end

  describe "with default values that are valid" do
    it_should_behave_like "valid model"
  end
end


text:
package io.github.mzmine.modules.dataprocessing.align_hierarchical;

import java.util.logging.Logger;

public class TriangularMatrixFloat extends TriangularMatrix {

  private Logger logger = Logger.getLogger(this.getClass().getName());

  // private final float[] list;
  private final LargeArrayFloat list;

  public TriangularMatrixFloat(int dimension) {

    list = new LargeArrayFloat(sumFormula(dimension));
    this.setDimension(dimension);
  }

  @Override
  public double set(int row, int column, double value) {

    long listIndex = getListIndex(row, column);
    float oldValue = list.get(listIndex);
    list.set(listIndex, (float) value);

    return oldValue;
  }

  @Override
  public double get(int row, int column) {

    return list.get(getListIndex(row, column));
  }

  @Override
  public void printVector() {
    logger.info(list.toString());
  }

}


text:
namespace GW2Radial
{

SettingsMenu::SettingsMenu()
	: showKeybind_("show_settings", "Show settings", "__core__", { GetScanCodeFromVirtualKey('M'), Modifier::SHIFT | Modifier::ALT }, false)
{
	showKeybind_.callback([&](Activated a) {
		if (a) {
			isVisible_ = true;
			Input::i().ClearActive();
		}
		return true;
	});
}

void SettingsMenu::OnInputLanguageChange()
{
	showKeybind_.key(GetScanCodeFromVirtualKey('M'));
}

void SettingsMenu::Draw()
{
	isFocused_ = false;

	if(isVisible_)
		Input::i().BlockKeybinds(1);
	else
		Input::i().UnblockKeybinds(1);

	if (isVisible_)
	{
		ImGui::SetNextWindowSize({ 750, 600 }, ImGuiCond_FirstUseEver);
		if(!ImGui::Begin("GW2Radial Options Menu", &isVisible_))
		{
			ImGui::End();
			return;
		}

		isFocused_ = ImGui::IsWindowFocused();

		if (!implementers_.empty())
		{
			if(currentTab_ == nullptr)
				currentTab_ = implementers_.front();

			if(ImGui::BeginTabBar("GW2RadialMainTabBar", ImGuiTabBarFlags_Reorderable | ImGuiTabBarFlags_NoCloseWithMiddleMouseButton | ImGuiTabBarFlags_FittingPolicyScroll)) {
			    for (cref i : implementers_)
			    {
					if(!i->visible())
						continue;

				    if(ImGui::BeginTabItem(i->GetTabName(), nullptr, 0)) {
					    currentTab_ = i;
					    i->DrawMenu(&currentEditedKeybind_);
				        ImGui::EndTabItem();
				    }
			    }

			    ImGui::EndTabBar();
			}
		}

		ImGui::End();
	}
}

#if 0
void SettingsMenu::OnInputChange(bool changed, const std::set<ScanCode>& scs, const std::list<EventKey>& changedKeys, InputResponse& response)
{
	bool allowedThrough = false;
	if (allowThroughAlt_ != ScanCode::NONE && std::any_of(changedKeys.begin(), changedKeys.end(), [&](const auto& ek) { return ek.sc == allowThroughAlt_ && ek.down == false; })) {
		allowThroughAlt_ = ScanCode::NONE;
		allowedThrough = true;
	}

	if (allowThroughShift_ != ScanCode::NONE && std::any_of(changedKeys.begin(), changedKeys.end(), [&](const auto& ek) { return ek.sc == allowThroughShift_ && ek.down == false; })) {
		allowThroughShift_ = ScanCode::NONE;
		allowedThrough = true;
	}

	if (allowedThrough)
		return;

	if (isFocused_)
		response |= InputResponse::PREVENT_KEYBOARD;

	const bool isMenuKeybind = showKeybind_.matchesNoLeftRight(scs);
	if (isMenuKeybind) {
		if (isVisible_) {
			isVisible_ = false;
		}
		else
		{
		    isVisible_ = true;
		    Keybind::ForceRefreshDisplayStrings();
		}

		allowThroughAlt_ = scs.contains(ScanCode::ALTLEFT) ? ScanCode::ALTLEFT : ScanCode::ALTRIGHT;
		allowThroughShift_ = scs.contains(ScanCode::SHIFTLEFT) ? ScanCode::SHIFTLEFT : ScanCode::SHIFTRIGHT;

		response |= InputResponse::PREVENT_KEYBOARD;
	}
}
#endif

}


text:
.. _version_4.0.1:

=============
Version 4.0.1
=============

Released on 2019/07/08.

.. NOTE::

    Please consult the :ref:`version_4.0.0_upgrade_notes` before upgrading.
    Before upgrading to 4.0.1 you should be running a CrateDB cluster that is
    at least on 3.0.7.

    An upgrade to :ref:`version_4.0.1` requires a `full restart upgrade`_.

    When restarting, CrateDB will migrate indexes to a newer format. Depending
    on the amount of data, this may delay node start-up time.

.. WARNING::

    Tables that were created prior CrateDB 3.x will not function with 4.x
    and must be recreated before moving to 4.x.x.

    You can recreate tables using ``COPY TO`` and ``COPY FROM`` or by
    `inserting the data into a new table`_.

    Before upgrading, you should `back up your data`_.

.. _full restart upgrade: https://crate.io/docs/crate/howtos/en/latest/admin/full-restart-upgrade.html
.. _back up your data: https://crate.io/docs/crate/reference/en/latest/admin/snapshots.html
.. _inserting the data into a new table: https://crate.io/docs/crate/reference/en/latest/admin/system-information.html#tables-need-to-be-recreated

.. rubric:: Table of Contents

.. contents::
   :local:

See the :ref:`version_4.0.0` release notes for a full list of changes in the
4.0 series.

Fixes
=====

- Fixed a possible NPE which could occur when querying the ``sys.allocations``
  table.

- Fixed the tables compatibility check to correctly indicate when tables need
  to be recreated in preparation for a CrateDB upgrade towards the next major
  version of CrateDB.

- Fixed an issue that led to DEFAULT constraints of inner columns of object
  columns to be ignored.

- The values provided in INSERT or UPDATE statements for object columns which
  contain generated expressions are now validated. The computed expression must
  match the provided value. This makes the behavior consistent with how top
  level columns of a table are treated.

- Fixed support for ordering by literal constants.
  Example: ``SELECT 1, * FROM t ORDER BY 1"``


text:
set -e

if [ -z "$IMAGE" ]; then
  echo "IMAGE needs to be set to the dnsmasq image"
fi

echo "Checking ${IMAGE} ${ARCH}"

# Check that dnsmasq is correctly compiled and has the right
# dynamic libraries to run.
python3 validate_dynamic_deps.py --image ${IMAGE} --target-bin /usr/sbin/dnsmasq

# Check that dnsmasq is able to start.
exec docker run --rm -- "${IMAGE}" --version >/dev/null


text:
Description
-----------
iAirport is a tool that leverages information from both the Mac OS X system-tool iairport as well as the debug logs located in /var/log/wifi.log.

It displays the information to give you a clue on how the laptop is connecting and roaming in enterprise networks. It also gives you live information on much data is going through the Wi-Fi NIC as well as how much data was transfered since the script was started.

Usage
-----
Run iAirport with the -h or --help flag to get extended information on the command.

It is recommended to enable wireless debugging on the system to get the most out of this script, but it is not necessary.


text:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cuid from 'cuid';

import EventItem from '../EventItem';

class EventTitle extends Component {
  static propTypes = {
    baseURL: PropTypes.string.isRequired,
    title: PropTypes.string,
    item: PropTypes.shape({}),
  };

  static defaultProps = {
    title: 'ซื้อเครื่องดื่ม/ขนม',
    bgImage: 'images/product-full.png',
    item: {},
  };

  render() {
    const { title, baseURL, item } = this.props;
    return (

{title}

          <EventItem
            key={cuid()}
            baseURL={baseURL}
            item={item}
            handleClick={() => console.log('')}
            hasButton={false}
          />;

    );
  }
}

export default EventTitle;


text:
FOUNDATION_EXPORT double PulsingHaloVersionNumber;

//! Project version string for PulsingHalo.
FOUNDATION_EXPORT const unsigned char PulsingHaloVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <PulsingHalo/PublicHeader.h>

#import <PulsingHalo/MultiplePulsingHaloLayer.h>
#import <PulsingHalo/PulsingHaloLayer.h>


text:
/*globals window, $, _, Backbone, Validator */
(function () {
    "use strict";

    var Ghost = {
        Layout      : {},
        Views       : {},
        Collections : {},
        Models      : {},
        Validate    : new Validator(),

        settings: {
            apiRoot: '/api/v0.1'
        },

        // This is a helper object to denote legacy things in the
        // middle of being transitioned.
        temporary: {},

        currentView: null,
        router: null
    };

    _.extend(Ghost, Backbone.Events);

    Ghost.init = function () {
        Ghost.router = new Ghost.Router();

        // This is needed so Backbone recognizes elements already rendered server side
        // as valid views, and events are bound
        Ghost.notifications = new Ghost.Views.NotificationCollection({model: []});

        Backbone.history.start({
            pushState: true,
            hashChange: false,
            root: '/ghost'
        });
    };

    Ghost.Validate.error = function (object) {
        this._errors.push(object);

        return this;
    };

    Ghost.Validate.handleErrors = function () {
        Ghost.notifications.clearEverything();
        _.each(Ghost.Validate._errors, function (errorObj) {

            Ghost.notifications.addItem({
                type: 'error',
                message: errorObj.message || errorObj,
                status: 'passive'
            });
            if (errorObj.hasOwnProperty('el')) {
                errorObj.el.addClass('input-error');
            }
        });
    };

    window.Ghost = Ghost;

}());


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

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.BorderFactory;
import javax.swing.JPanel;

/**
 *
 * @author gerri
 */
public class StatusOrderpickSection extends JPanel {
    public StatusOrderpickSection() {
        setPreferredSize(new Dimension(395, 405));

        setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Status ophaalrobot"));

        setVisible(true);
    }

    @Override
    public void paintComponent(Graphics g) {
        g.setColor(Color.green);
        g.fillRect(315, 325, 50, 50);
        g.setColor(Color.red);
        g.fillRect(30, 325, 50, 50);
        g.fillRect(167, 180, 50, 50);

        g.setColor(Color.black);
        g.drawLine(80, 325, 167, 230);
        g.drawLine(217, 230, 315, 325);

        g.fillOval(217, 230, 25, 25);

    }
}


text:
{% if jekyll.environment == "production" %}
<!-- ad-unit-01 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="{{ site.google.adsense }}"
     data-ad-slot="3161912249"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}


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

<manifest package="io.taig.android.parcelable" />


text:
package com.amazonaws.services.route53.model.transform;

import org.w3c.dom.Node;
import javax.annotation.Generated;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.transform.StandardErrorUnmarshaller;

import com.amazonaws.services.route53.model.IncompatibleVersionException;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class IncompatibleVersionExceptionUnmarshaller extends StandardErrorUnmarshaller {

    public IncompatibleVersionExceptionUnmarshaller() {
        super(IncompatibleVersionException.class);
    }

    @Override
    public AmazonServiceException unmarshall(Node node) throws Exception {
        // Bail out if this isn't the right error code that this
        // marshaller understands
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("IncompatibleVersion"))
            return null;

        IncompatibleVersionException e = (IncompatibleVersionException) super.unmarshall(node);

        return e;
    }
}


text:
Beebotte Client .Net SDK
========================

| what          | where                                         |
|---------------|-----------------------------------------------|
| overview      | http://beebotte.com/overview                  |
| tutorials     | http://beebotte.com/tutorials                 |
| source        | https://github.com/beebotte/bbt_client_dotnet |

### Bugs / Feature Requests

Think you.ve found a bug? Want to see a new feature in beebotte? Please open an
issue in github. Please provide as much information as possible about the issue type and how to reproduce it.

    https://github.com/beebotte/bbt_client_dotnet/issues

## Install

Nuget Install: https://www.nuget.org/packages/Beebotte.API.Client.Net

    Install-package Beebotte.API.Client.Net

Cloning:
Clone the source code from github

    git clone https://github.com/beebotte/bbt_client_dotnet.git

## Usage
To use the library, you need to be a registered user. If this is not the case, create your account at <http://beebotte.com> and note your access credentials.

As a reminder, Beebotte resource description uses a two levels hierarchy:

* Channel: physical or virtual connected object (an application, an arduino, a coffee machine, etc) providing some resources
* Resource: most elementary part of Beebotte, this is the actual data source (e.g. temperature from a domotics sensor)

### Beebotte Constructor
Use your account API and secret keys to initialize Beebotte connector:

    string accesskey  = "YOUR_API_KEY";
    string secretkey  = "YOUR_SECRET_KEY";
    string hostname   = "http://ws.beebotte.com";
    var connector = new Connector(accesskey, secretkey, hostname);

### Connecting and subscribing to a resource
After having initialized Beebotte connector, use the 'Connect' method To connect to Beebotte:

    connector.Connect();

In order to subscribe to a resource:

    string channelName  = "YOUR_Channel"; //the channel name to subscribe to
    string resourceName  = "YOUR_Resource"; //the resource to subscribe to
    bool isPrivateChannel = true; //Boolean indicating if the channel is private
    bool readAccess = true; //Boolean indicating if the connection has read access on the channel/resource
    bool writeAccess = true; //Boolean indicating if the connection has write access on the channel/resource

    connector.OnConnected += (u, m) =>
      {
          var subscription = connector.Subscribe(channelName, resourceName , isPrivateChannel, readAccess , writeAccess);
          subscription.OnMessage += (i, n) =>
          {
              System.Console.WriteLine(n.Message.data); //Add here the code you want to execute on message received.
          };
      };

### Writing Data
You can write data to the resource you're subscribed to using:

    connector.Write(channelName, resourceName, isPrivateChannel, dataToWrite);

### Publishing Data
You can publish data to the resource you're subscribed to using:

    connector.Publish(channelName, resourceName, isPrivateChannel, dataToPublish);

## License
Copyright 2013 - 2017 Beebotte.

[The MIT License](http://opensource.org/licenses/MIT)


text:
package org.apache.servicecomb.it.schema;

import org.apache.servicecomb.provider.rest.common.RestSchema;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@RestSchema(schemaId = "acceptTypeSpringmvcSchema")
@RequestMapping(path = "/v1/acceptTypeSpringmvcSchema")
public class AcceptTypeSpringmvcSchema {
  @RequestMapping(path = "/sayHi", method = RequestMethod.GET, produces = "text/plain;charset=UTF-8")
  public String sayHi(@RequestParam(name = "name", defaultValue = "test") String name) {
    return name;
  }

  @RequestMapping(path = "/sayHello", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
  public String sayHello(@RequestParam(name = "name", defaultValue = "test") String name) {
    return name;
  }
}


text:
<!DOCTYPE html>
<meta charset="utf-8">
<title>beforematch fired on ScrollToTextFragment</title>
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>

<script src="/common/utils.js"></script>
<script src="/scroll-to-text-fragment/stash.js"></script>

<script>
promise_test(t => new Promise((resolve, reject) => {
  const key = token();
  test_driver.bless('Open a scroll to text fragment URL', () => {
    window.open(
      `resources/beforematch-scroll-to-text-fragment-basic.html?key=${key}#:~:text=foo`,
      '_blank',
      'noopener');
  });
  fetchResults(key, resolve, reject);
}).then(results => {
  assert_equals(results.pageYOffsetDuringBeforematch, 0,
    'Scrolling should happen after beforematch is fired.');
  assert_true(results.beforematchFiredOnFoo,
    'Foo was searched for, so it should get a beforematch event.');
  assert_false(results.beforematchFiredOnBar,
    'Bar was not searched for, so it should not get a beforematch event.');
  assert_true(results.pageYOffsetAfterRaf > 0,
    'The page should be scrolled down to foo.');
}), 'Verifies that the beforematch event is fired on the matching element of a ScrollToTextFragment navigation.');

promise_test(t => new Promise((resolve, reject) => {
  const key = token();
  test_driver.bless('Open a scroll to text fragment URL', () => {
    window.open(
      `resources/beforematch-scroll-to-text-fragment-with-anchor.html?key=${key}#:~:text=foo`,
      '_blank',
      'noopener');
  });
  fetchResults(key, resolve, reject);
}).then(results => {
  assert_true(results.beforematchFiredOnFoo,
    'foo was searched for, so it should get the beforematch event.');
  assert_false(results.beforematchFiredOnBar,
    'bar should not get the beforematch event despite being the target of an element fragment due to the text fragment.');
}), 'Verifies that beforematch is only fired on elements targeted by a text fragment when there is both a text fragment and an element fragment.');

promise_test(t => new Promise((resolve, reject) => {
  const key = token();
  test_driver.bless('Open a scroll to text fragment URL', () => {
    window.open(
      `resources/beforematch-scroll-to-text-fragment-bubble.html?key=${key}#:~:text=foo`,
      '_blank',
      'noopener');
  });
  fetchResults(key, resolve, reject);
}).then(results => {
  assert_true(results.beforematchFiredOnChild,
    'The element containing the searched text should have beforematch fired on it.');
  assert_true(results.beforematchFiredOnParent,
    'The parent element of the element containing the matching text should have the beforematch event fired on it because the event should bubble.');
}), 'Verifies that the beforematch event bubbles with scroll to text fragment.');

// TODO(jarhar): Write more tests here once we decide on a behavior here: https://github.com/WICG/display-locking/issues/150
</script>


text:
<Record>
<Term>Bacterial Arthritis</Term>
<SemanticType>Disease or Syndrome</SemanticType>
<ParentTerm>Infective Arthritis</ParentTerm>
<ClassificationPath>Findings_and_Disorders_Kind/Disease, Disorder or Finding/Disease or Disorder/Non-Neoplastic Disorder/Non-Neoplastic Disorder by Site/Non-Neoplastic Connective and Soft Tissue Disorder/Non-Neoplastic Bone Disorder/Bone Infection/Bacterial Arthritis,/NCIThesaurus/Findings_and_Disorders_Kind/Disease, Disorder or Finding/Disease or Disorder/Non-Neoplastic Disorder/Non-Neoplastic Disorder by Special Category/Infectious Disorder/Bacterial Infection/Bacterial Arthritis,/NCIThesaurus/Findings_and_Disorders_Kind/Disease, Disorder or Finding/Disease or Disorder/Non-Neoplastic Disorder/Non-Neoplastic Disorder by Site/Non-Neoplastic Connective and Soft Tissue Disorder/Arthropathy/Arthritis/Infective Arthritis/Bacterial Arthritis</ClassificationPath>
<BroaderTerm>Non-Neoplastic Disorder</BroaderTerm>
<BroaderTerm>Non-Neoplastic Disorder by Site</BroaderTerm>
<BroaderTerm>Bacterial Infection</BroaderTerm>
<BroaderTerm>Arthropathy</BroaderTerm>
<BroaderTerm>Bone Infection</BroaderTerm>
<BroaderTerm>NCIThesaurus</BroaderTerm>
<BroaderTerm>Non-Neoplastic Bone Disorder</BroaderTerm>
<BroaderTerm>Non-Neoplastic Disorder by Special Category</BroaderTerm>
<BroaderTerm>Infective Arthritis</BroaderTerm>
<BroaderTerm>Findings_and_Disorders_Kind</BroaderTerm>
<BroaderTerm>Disease, Disorder or Finding</BroaderTerm>
<BroaderTerm>Arthritis</BroaderTerm>
<BroaderTerm>Infectious Disorder</BroaderTerm>
<BroaderTerm>Disease or Disorder</BroaderTerm>
<BroaderTerm>Non-Neoplastic Connective and Soft Tissue Disorder</BroaderTerm>
<BroaderTerm>Bacterial Arthritis</BroaderTerm>
<BroaderTerm>Bacterial Arthritis,</BroaderTerm>
<ChildTerm>Septic Arthritis</ChildTerm>
<ChildTerm>Arthritis or Polyarthritis due to Staphylococcus</ChildTerm>
<ChildTerm>Blennorrhagic Arthritis</ChildTerm>
<ChildTerm>Arthritis or Polyarthritis due to Streptococcus</ChildTerm>
<ChildTerm>Arthritis or Polyarthritis due to Pseudomonas</ChildTerm>
<ChildTerm>Arthritis or Polyarthritis due to Pneumococcus</ChildTerm>
<ChildTerm>Arthritis or Polyarthritis due to Escherichia Coli</ChildTerm>
<Synonym>Bacterial Arthritis</Synonym>
<Source>NCI Thesaurus</Source>
</Record>


text:
function install {
    echo installing $1
    shift
    apt-get -y install "$@" >/dev/null 2>&1
}

echo updating package information
apt-add-repository -y ppa:brightbox/ruby-ng >/dev/null 2>&1
apt-get -y update >/dev/null 2>&1

install 'development tools' build-essential

install Ruby ruby2.3 ruby2.3-dev
update-alternatives --set ruby /usr/bin/ruby2.3 >/dev/null 2>&1
update-alternatives --set gem /usr/bin/gem2.3 >/dev/null 2>&1

echo installing Bundler
gem install bundler -N >/dev/null 2>&1

install Git git

install PostgreSQL postgresql postgresql-contrib libpq-dev
sudo -u postgres createuser --superuser vagrant

install 'ExecJS runtime' nodejs

install Emacs emacs24

echo 'all set, rock on!'


text:
package flagmaker.Overlays.OverlayTypes;

import flagmaker.Extensions.ColorExtensions;
import flagmaker.Overlays.Attributes.*;
import flagmaker.Overlays.Overlay;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;
import javafx.scene.shape.SVGPath;
import javafx.scene.shape.Shape;

public class OverlayPall extends Overlay
{
	public OverlayPall(int maximumX, int maximumY)
	{
		super("pall", new Attribute[]
		{
			new ColorAttribute("Color", Color.BLACK),
			new DoubleAttribute("X", 1, maximumX, true),
			new DoubleAttribute("Width", 1, maximumX, true)
		}, maximumX, maximumY);
	}

	public OverlayPall(Color color, double x, double width, int maximumX, int maximumY)
	{
		super("pall", new Attribute[]
		{
			new ColorAttribute("Color", color),
			new DoubleAttribute("X", x, maximumX, true),
			new DoubleAttribute("Width", width, maximumX, true)
		}, maximumX, maximumY);
	}

	@Override
	protected Shape[] Thumbnail()
	{
		Line l1 = new Line(0, 5, 15, 15);
		Line l2 = new Line(0, 25, 15, 15);
		Line l3 = new Line(15, 15, 30, 15);
		l1.setStrokeWidth(5);
		l2.setStrokeWidth(5);
		l3.setStrokeWidth(5);

		return new Shape[] { l1, l2, l3 };
	}

	@Override
	public void Draw(Pane canvas)
	{
		double theWidth = GetDoubleAttribute("Width") / MaximumX * canvas.getWidth() / 2;
		double x = canvas.getWidth() * (GetDoubleAttribute("X") / MaximumX);

		SVGPath p = new SVGPath();
		p.setContent(String.format("M 0,0 %1$.3f,0 %2$.3f,%3$.3f %4$.3f,%3$.3f %4$.3f,%6$.3f %2$.3f,%6$.3f %1$.3f,%5$.3f 0,%5$.3f 0,%7$.3f %9$.3f,%8$.3f 0,%1$.3f",
				theWidth / 2,
				x + (double)theWidth / 3,
				canvas.getHeight() / 2 - (double)theWidth / 3,
				canvas.getWidth(),
				canvas.getHeight(),
				canvas.getHeight() / 2 + (double)theWidth / 3,
				canvas.getHeight() - (double)theWidth / 2,
				canvas.getHeight() / 2,
				x - (double)theWidth / 3));
		p.setFill(GetColorAttribute("Color"));

		canvas.getChildren().add(p);
	}

	@Override
	public String ExportSvg(int width, int height)
	{
		double theWidth = GetDoubleAttribute("Width") / MaximumX * width / 2;
		double x = width * (GetDoubleAttribute("X") / MaximumX);

		return String.format("<path d=\"M 0,0 %1$.3f,0 %2$.3f,%3$.3f %4$d,%3$.3f %4$d,%6$.3f %2$.3f,%6$.3f %1$.3f,%5$d 0,%5$d 0,%7$.3f %9$.3f,%8$.3f 0,%1$.3f\" %10$s />",
				theWidth / 2,
				x + (double)theWidth / 3,
				height / 2 - (double)theWidth / 3,
				width,
				height,
				height / 2 + (double)theWidth / 3,
				height - (double)theWidth / 2,
				height / 2.0,
				x - (double)theWidth / 3,
				ColorExtensions.ToSvgFillWithOpacity(GetColorAttribute("Color")));
	}
}


text:
<DisplaySettings>
  <News>
    <Date>October 2013</Date>
    <Title>New Releases Update !</Title>
    <Text>We have over 120 new titles being released on November 4th.  Please contact Gary at Quantum for further details.</Text>
  </News>
</DisplaySettings>


text:
A Digital Thermostat
=================
* A page built using JQuery to emulate a digital thermometer to control your home's heating.

Set Up:
-----
* Fork and download this repo.
* Run ```$ open Thermostat.html``` from the terminal.

Usage:
-----
* Use the up and down arrows to adjust the desired temperature.
* There is a button to toggle "Power Saver Mode" which prevents the thermostat from going above 25 degrees.
* While "Power Saver Mode" is disabled, temperature can be set between 10 and 32 degrees.
* There is a "Reset" button to reset the thermostat temperature to 20 degrees.
* The thermostat utilizes the http://openweathermap.org/ API to pull in the temperature in any city the user wishes.
![thermostat](https://cloud.githubusercontent.com/assets/21045269/21565364/bd86fc74-ce8e-11e6-81f0-2897d7d49e30.jpg)

Technologies:
-----
* JavaScript, JQuery, CSS and HTML. TDD carried out with Jasmine.


text:
/**
 * Created by debayan on 7/23/16.
 */
var notifier = require('./notifier');
var NodeHelper = require('node_helper');
var _ = require('underscore');

module.exports = NodeHelper.create({
	start : function() {
		console.log("Starting node helper for: " + this.name);
	},

	socketNotificationReceived : function(notification, payload) {
		if (notification === 'LISTEN_EMAIL') {
			console.log('listening for emails...');
			this.config = payload.config;
			this.payload = payload.payload;
			this.loaded = payload.loaded;
			final = [];
			imap = {
				user : this.config.user,
				password : this.config.password,
				host : this.config.host,
				port : this.config.port,
				tls : this.config.tls,
				tlsOptions : this.config.tlsOptions,
				markSeen : false,
				authTimeout : this.config.authTimeout
			};
			var that = this;

			var seqs = [];
			if (this.payload.length > 0)
				this.payload.forEach(function(o) {
					seqs.push(o.id);
				});

			var n = notifier(imap);
			n.on('end', function() {// session closed
				final = _.sortBy(final, 'id').reverse();
				final = _.uniq(final, true, 'id');

				that.sendSocketNotification('EMAIL_RESPONSE', final);
				n.stop();
			}).on('mail', function(m, s) {
				if (seqs.indexOf(s) == -1) {
					console.log('NEW MAIL');
					var a = [{
						address : m.from[0].address,
						name : m.from[0].name
					}];
					var b = m.subject;
					var tmp = {
						sender : a,
						subject : b,
						id : s
					};
					final.push(tmp);
					n.stop();
				}
			}).on('error', function(e) {
				console.log('Email notifier error: ', e);
				n.start();
			}).on('nonew', function() {
				if (!that.loaded) {
					n.stop();
				}
			}).start();
		}
	}
});


text:
mbtiles-mapper
==============

A client-side [mbtiles](https://github.com/mapbox/mbtiles-spec) mapper for mbtiles uncompressed file.
Supports utfgrid and reads all metadata created by [Tilemil](https://www.mapbox.com/tilemill/).

Usage
=====

* Git clone this repository

* Uncompress your mbtiles file using [mbutil](https://github.com/mapbox/mbutil) with the `--grid_callback=""` option:

```
mb-util --grid_callback="" your_file.mbtiles destination_folder
```

* Modify `tiles_path` option in `config.json` with the destination folder path

* Start a static server to serve your map. For example, with [http-server](https://www.npmjs.org/package/http-server), go to your map directory and run:

```
http-server ./
```

* So you have your map in `http://localhost:8080`

Options
-------

Tiles path can be specified with params: `?tiles=path_to_tiles`.

Options can be modified in `config.json`. The `use_mbtiles_legend` option allows you to toggle between Tilemil generated legend and the one
created by you in index.html. Path specified in `tiles_path` option is loaded by default if `tiles` param is not present.

Libraries
=========

In the `lib` folder there are the needed libraries:

* [Jquery](http://jquery.com/)
* [Leaflet](https://github.com/Leaflet/Leaflet)
* [utfgrid.leaflet](https://github.com/danzel/Leaflet.utfgrid)

License
=======
MIT