text:
module Aws::AutoScaling
  class LoadBalancer

    extend Aws::Deprecations

    # @overload def initialize(group_name, name, options = {})
    #   @param [String] group_name
    #   @param [String] name
    #   @option options [Client] :client
    # @overload def initialize(options = {})
    #   @option options [required, String] :group_name
    #   @option options [required, String] :name
    #   @option options [Client] :client
    def initialize(*args)
      options = Hash === args.last ? args.pop.dup : {}
      @group_name = extract_group_name(args, options)
      @name = extract_name(args, options)
      @data = options.delete(:data)
      @client = options.delete(:client) || Client.new(options)
    end

    # @!group Read-Only Attributes

    # @return [String]
    def group_name
      @group_name
    end

    # @return [String]
    def name
      @name
    end
    alias :load_balancer_name :name

    # One of the following load balancer states:
    #
    # * `Adding` - The instances in the group are being registered with the
    #   load balancer.
    #
    # * `Added` - All instances in the group are registered with the load
    #   balancer.
    #
    # * `InService` - At least one instance in the group passed an ELB
    #   health check.
    #
    # * `Removing` - The instances in the group are being deregistered from
    #   the load balancer. If connection draining is enabled, Elastic Load
    #   Balancing waits for in-flight requests to complete before
    #   deregistering the instances.
    #
    # * `Removed` - All instances in the group are deregistered from the
    #   load balancer.
    # @return [String]
    def state
      data[:state]
    end

    # @!endgroup

    # @return [Client]
    def client
      @client
    end

    # @raise [NotImplementedError]
    # @api private
    def load
      msg = "#load is not implemented, data only available via enumeration"
      raise NotImplementedError, msg
    end
    alias :reload :load

    # @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
    # @return [Types::LoadBalancerState]
    #   Returns the data for this {LoadBalancer}.
    def data
      load unless @data
      @data
    end

    # @return [Boolean]
    #   Returns `true` if this resource is loaded.  Accessing attributes or
    #   {#data} on an unloaded resource will trigger a call to {#load}.
    def data_loaded?
      !!@data
    end

    # @deprecated Use [Aws::AutoScaling::Client] #wait_until instead
    #
    # Waiter polls an API operation until a resource enters a desired
    # state.
    #
    # @note The waiting operation is performed on a copy. The original resource remains unchanged
    #
    # ## Basic Usage
    #
    # Waiter will polls until it is successful, it fails by
    # entering a terminal state, or until a maximum number of attempts
    # are made.
    #
    #     # polls in a loop until condition is true
    #     resource.wait_until(options) {|resource| condition}
    #
    # ## Example
    #
    #     instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
    #
    # ## Configuration
    #
    # You can configure the maximum number of polling attempts, and the
    # delay (in seconds) between each polling attempt. The waiting condition is set
    # by passing a block to {#wait_until}:
    #
    #     # poll for ~25 seconds
    #     resource.wait_until(max_attempts:5,delay:5) {|resource|...}
    #
    # ## Callbacks
    #
    # You can be notified before each polling attempt and before each
    # delay. If you throw `:success` or `:failure` from these callbacks,
    # it will terminate the waiter.
    #
    #     started_at = Time.now
    #     # poll for 1 hour, instead of a number of attempts
    #     proc = Proc.new do |attempts, response|
    #       throw :failure if Time.now - started_at > 3600
    #     end
    #
    #       # disable max attempts
    #     instance.wait_until(before_wait:proc, max_attempts:nil) {...}
    #
    # ## Handling Errors
    #
    # When a waiter is successful, it returns the Resource. When a waiter
    # fails, it raises an error.
    #
    #     begin
    #       resource.wait_until(...)
    #     rescue Aws::Waiters::Errors::WaiterFailed
    #       # resource did not enter the desired state in time
    #     end
    #
    #
    # @yield param [Resource] resource to be used in the waiting condition
    #
    # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
    #   because the waiter has entered a state that it will not transition
    #   out of, preventing success.
    #
    #   yet successful.
    #
    # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
    #   while polling for a resource that is not expected.
    #
    # @raise [NotImplementedError] Raised when the resource does not
    #
    # @option options [Integer] :max_attempts (10) Maximum number of
    # attempts
    # @option options [Integer] :delay (10) Delay between each
    # attempt in seconds
    # @option options [Proc] :before_attempt (nil) Callback
    # invoked before each attempt
    # @option options [Proc] :before_wait (nil) Callback
    # invoked before each wait
    # @return [Resource] if the waiter was successful
    def wait_until(options = {}, &block)
      self_copy = self.dup
      attempts = 0
      options[:max_attempts] = 10 unless options.key?(:max_attempts)
      options[:delay] ||= 10
      options[:poller] = Proc.new do
        attempts += 1
        if block.call(self_copy)
          [:success, self_copy]
        else
          self_copy.reload unless attempts == options[:max_attempts]
          :retry
        end
      end
      Aws::Waiters::Waiter.new(options).wait({})
    end

    # @!group Actions

    # @example Request syntax with placeholder values
    #
    #   load_balancer.attach()
    # @param [Hash] options ({})
    # @return [Types::AttachLoadBalancersResultType]
    def attach(options = {})
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        load_balancer_names: [@name]
      )
      resp = @client.attach_load_balancers(options)
      resp.data
    end

    # @example Request syntax with placeholder values
    #
    #   load_balancer.detach()
    # @param [Hash] options ({})
    # @return [Types::DetachLoadBalancersResultType]
    def detach(options = {})
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        load_balancer_names: [@name]
      )
      resp = @client.detach_load_balancers(options)
      resp.data
    end

    # @!group Associations

    # @return [AutoScalingGroup]
    def group
      AutoScalingGroup.new(
        name: @group_name,
        client: @client
      )
    end

    # @deprecated
    # @api private
    def identifiers
      {
        group_name: @group_name,
        name: @name
      }
    end
    deprecated(:identifiers)

    private

    def extract_group_name(args, options)
      value = args[0] || options.delete(:group_name)
      case value
      when String then value
      when nil then raise ArgumentError, "missing required option :group_name"
      else
        msg = "expected :group_name to be a String, got #{value.class}"
        raise ArgumentError, msg
      end
    end

    def extract_name(args, options)
      value = args[1] || options.delete(:name)
      case value
      when String then value
      when nil then raise ArgumentError, "missing required option :name"
      else
        msg = "expected :name to be a String, got #{value.class}"
        raise ArgumentError, msg
      end
    end

    class Collection < Aws::Resources::Collection

      # @!group Batch Actions

      # @param options ({})
      # @return [void]
      def batch_attach(options = {})
        batch_enum.each do |batch|
          params = Aws::Util.copy_hash(options)
          params[:auto_scaling_group_name] = batch[0].group_name
          params[:load_balancer_names] ||= []
          batch.each do |item|
            params[:load_balancer_names] << item.name
          end
          batch[0].client.attach_load_balancers(params)
        end
        nil
      end

      # @param options ({})
      # @return [void]
      def batch_detach(options = {})
        batch_enum.each do |batch|
          params = Aws::Util.copy_hash(options)
          params[:auto_scaling_group_name] = batch[0].group_name
          params[:load_balancer_names] ||= []
          batch.each do |item|
            params[:load_balancer_names] << item.name
          end
          batch[0].client.detach_load_balancers(params)
        end
        nil
      end

      # @!endgroup

    end
  end
end


text:
3DS Quick Shutdown more quickly
================================

3DS Quick Shutdown more quickly.

*original version:*
- Use NSS:ShutdownAsync (http://3dbrew.org/wiki/NSS:ShutdownAsync)
- Wrapped call PTM:ShutdownAsync with timeout value of 14 seconds.

*more quickly version:*
- Use PTM:ShutdownAsync (http://3dbrew.org/wiki/PTM:ShutdownAsync)
- Direct call PTM:ShutdownAsync with timeout value of 0 seconds.

Credits
=======

- Original version by [thedax](https://github.com/thedax/3DS_Quick_Shutdown).
- Development tools by [DevKitPro](http://sourceforge.net/projects/devkitpro/).
- Build tools by [Steveice10](https://github.com/Steveice10/buildtools).

redpajama_set_name: RedPajamaGithub


text:
var urllib = require("url");

module.exports.CookieJar = CookieJar;

function CookieJar(options){
    this.options = options || {};
    this.options.sessionTimeout = this.options.sessionTimeout || 1800; // 30min

    this.cookies = {};
}

CookieJar.prototype.addCookie = function(cookie){

    if(!cookie || !cookie.name) return;

    var lcookie;

    if(!this.cookies[cookie.name]){
        this.cookies[cookie.name] = [];
    }

    // overwrite if has same params
    for(var i=0, len=this.cookies[cookie.name].length; i<len; i++){
        lcookie = this.cookies[cookie.name][i];
        if(
            lcookie.path == cookie.path &&
            lcookie.domain == cookie.domain &&
            lcookie.secure == cookie.secure &&
            lcookie.httponly == cookie.httponly
        ){
            this.cookies[cookie.name][i] = cookie;
            return;
        }
    }

    this.cookies[cookie.name].push(cookie);
}

CookieJar.prototype.getCookies = function(url){
    var keys = Object.keys(this.cookies),
        cookie, cookies = [];

    for(var i=0, len = keys.length; i<len; i++){
        if(Array.isArray(this.cookies[keys[i]])){
            for(var j=0, lenj = this.cookies[keys[i]].length; j<lenj; j++){
                cookie = this.cookies[keys[i]][j];
                if(this.matchCookie(cookie, url)){
                    cookies.push(cookie.name +"="+cookie.value);
                }
            }
        }
    }
    return cookies.join("; ");
}

CookieJar.prototype.matchCookie = function(cookie, url){
    var urlparts = urllib.parse(url || "", false, true),
        path;

    // check expire
    if(cookie.expire){
        if(cookie.expire.getTime() < Date.now()){
            return;
        }
    }

    // check if hostname matches
    if(urlparts.hostname && cookie._domain){
        if(!(urlparts.hostname == cookie._domain || urlparts.hostname.substr(-(cookie._domain.length+1)) == "."+cookie._domain)){
            return false;
        }
    }

    // check if path matches
    if(cookie.path && urlparts.pathname){

        path = (urlparts.pathname || "/").split("/");
        path.pop();
        path = path.join("/").trim();
        if(path.substr(0,1)!="/"){
            path = "/" + path;
        }
        if(path.substr(-1)!="/"){
            path += "/";
        }

        if(path.substr(0, cookie.path.length) != cookie.path){
            return false;
        }
    }

    // check secure
    if(cookie.secure && urlparts.protocol){
        if(urlparts.protocol != "https:"){
            return false;
        }
    }

    // check httponly
    if(cookie.httponly && urlparts.protocol){
        if(urlparts.protocol != "http:"){
            return false;
        }
    }

    return true;
}

CookieJar.prototype.setCookie = function(cookie_str, url){
    var parts = (cookie_str || "").split(";"),
        cookie = {}, upath,
        urlparts = urllib.parse(url || "", false, true);

    parts.forEach((function(part){
        var key, val;
        part = part.split("=");
        key = part.shift().trim();
        val = part.join("=").trim();

        if(!key)return;

        switch(key.toLowerCase()){

            case "expires":

                cookie.expires = new Date(val);
                break;

            case "path":
                cookie.path = val.trim();
                break;

            case "domain":
                cookie.domain = val.toLowerCase();
                break;

            case "max-age":
                cookie.expires = new Date(Date.now() + (Number(val) || 0)*1000);
                break;

            case "secure":
                cookie.secure = true;
                break;

            case "httponly":
                cookie.httponly = true;
                break;

            default:
                if(!cookie.name){
                    cookie.name = key;
                    cookie.value = val;
                }
        }
    }).bind(this));

    // use current path when path is not specified
    if(!cookie.path){
        path = (urlparts.pathname || "/").split("/");
        path.pop();
        cookie.path = path.join("/").trim();
        if(cookie.path.substr(0,1)!="/"){
            cookie.path = "/" + cookie.path;
        }
        if(cookie.path.substr(-1)!="/"){
            cookie.path += "/";
        }
    }

    // if no expire date, then use sessionTimeout value
    if(!cookie.expires){
        cookie._expires = new Date(Date.now() + (Number(this.options.sessionTimeout) || 0)*1000);
    }else{
        cookie._expires = cookie.expires;
    }

    if(!cookie.domain){
        if(urlparts.hostname){
            cookie._domain = urlparts.hostname;
        }
    }else{
        cookie._domain = cookie.domain;
    }

    this.addCookie(cookie);
}


text:
require 'rails_helper'

module RailsWorkflow
  RSpec.describe OperationBuilder do
    let(:operation_runner) { OperationRunner }
    let(:manager) { ProcessManager.new(process) }
    let(:process) { create :process }
    let(:operation) { described_class.new(process, template).create_operation }

    let(:template) do
      create :operation_template,
             operation_class: 'RailsWorkflow::UserByGroupOperation'
    end

    before do
      allow_any_instance_of(RailsWorkflow::Process)
        .to receive(:manager).and_return(manager)
    end

    it { expect(operation.title).to eq template.title }
    it { expect(operation.async).to eq template.async }
    it { expect(operation.is_background).to eq template.is_background }
    it { expect(operation).to be_kind_of UserByGroupOperation }
    it { expect(operation.template).to eq template }
    it { expect(operation.process).to eq process }
    it { expect(operation.manager).to eq manager }
    it { expect(operation.status).to eq Status::NOT_STARTED }
    it { expect(operation.persisted?).to be true }

    context 'sets dependencies' do
      context 'from template' do
        let(:operation) { create :operation, status: Status::ERROR }
        let(:dependencies) do
          [
            { 'operation_id' => operation.id, 'status' => operation.status }
          ]
        end
        let(:operation_with_dependencies) do
          described_class.new(process, template, [operation]).create_operation
        end

        it do
          expect(operation_with_dependencies.dependencies).to eq dependencies
        end
      end

      it 'when no dependencies' do
        expect(operation.dependencies).to eq []
      end
    end

    context 'operation context data' do
      it { expect(operation.data).to eq(msg: 'Test message') } # from factory

      context 'custom' do
        before do
          new_class = Class.new(RailsWorkflow::OperationTemplate) do
            def after_operation_create(new_operation)
              new_operation.data[:new_key] = 'abc'
            end
          end
          stub_const('NewTemplateClass', new_class)
        end

        let(:operation_template) do
          create :operation_template,
                 type: 'NewTemplateClass',
                 operation_class: 'RailsWorkflow::UserByGroupOperation'
        end

        let(:template) { operation_template.becomes(NewTemplateClass) }

        it { expect(operation.data).to include(new_key: 'abc') }
      end
    end

    context 'should build child process' do
      let(:parent_template) { create :parent_operation_template }

      let(:parent_operation) do
        described_class.new(
          process, parent_template, [operation]
        ).create_operation
      end

      it do
        expect(parent_operation.child_process)
          .to be_a_kind_of RailsWorkflow::Process
      end
    end
  end
end


text:
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "DTD/xhtml1-strict.dtd">

    <title>API docs for “pymine.poster.streaminghttp”</title>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <link href="apidocs.css" type="text/css" rel="stylesheet" />

Module p.p.streaminghttp

      Part of pymine.poster

Streaming HTTP uploads module.

This module extends the standard httplib and urllib2 objects so that
iterable objects can be used in the body of HTTP requests.

In most cases all one should have to do is call
:func:`register_openers()` to register the new streaming http handlers
which will take priority over the default handlers, and then you can use
iterable objects in the body of HTTP requests.

**N.B.** You must specify a Content-Length header if using an iterable
object since there is no way to determine in advance the total size that
will be yielded, and there is no way to reset an interator.

Example usage:

>>> from StringIO import StringIO
>>> import urllib2, poster.streaminghttp

>>> opener = poster.streaminghttp.register_openers()

>>> s = "Test file data"
>>> f = StringIO(s)

>>> req = urllib2.Request("http://localhost:5000", f, {'Content-Length': len(s)})

    Class
    _StreamingHTTPMixin
    No class docstring; 1/1 methods documented

    Class
    StreamingHTTPConnection
    Subclass of `httplib.HTTPConnection` that overrides the `send()`
method

    Class
    StreamingHTTPRedirectHandler
    Subclass of `urllib2.HTTPRedirectHandler` that overrides the

    Class
    StreamingHTTPHandler
    Subclass of `urllib2.HTTPHandler` that uses

    Class
    StreamingHTTPSConnection
    Subclass of `httplib.HTTSConnection` that overrides the `send()`
method

    Class
    StreamingHTTPSHandler
    Subclass of `urllib2.HTTPSHandler` that uses

    Function
    register_openers
    Register the streaming http handlers in the global urllib2 default

        def register_openers():

Register the streaming http handlers in the global urllib2 default
opener object.

Returns the created OpenerDirector object.

    <address>
      API Documentation for pymine, generated by pydoctor at 2010-04-07 23:15:24.
    </address>


text:
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}

module FunPtr where

import Ivory.Compile.C.CmdlineFrontend
import Ivory.Language

f :: Def ('[Sint32] ':-> Sint32)
f  = proc "f" (\ n -> body (ret (n + 1)))

invoke :: Def ('[ ProcPtr ('[Sint32] ':-> Sint32), Sint32] ':-> Sint32)
invoke  = proc "invoke" (\ k n -> body (ret =<< indirect k n))

test :: Def ('[] ':-> Sint32)
test  = proc "fun_ptr_test" (body (ret =<< call invoke (procPtr f) 10))

runFunPtr :: IO ()
runFunPtr = runCompiler [cmodule] [] initialOpts { outDir = Nothing }

cmodule :: Module
cmodule = package "FunPtr" $ do
  incl f
  incl test
  incl invoke


text:
package handler

import (
	"errors"
	"io"
	"net/http/httptest"
	"testing"

	"github.com/openshift/ansible-service-broker/pkg/broker"
	ft "github.com/openshift/ansible-service-broker/pkg/fusortest"
)

// test object to marshall in the request
type Foo struct {
	Msg  string
	Code int
}

// request object
type TestRequest struct {
	Msg  string
	done bool
}

func (r TestRequest) Read(p []byte) (n int, err error) {

	if r.done {
		return 0, io.EOF
	}
	for i, b := range []byte(r.Msg) {
		p[i] = b
	}
	r.done = true
	return len(r.Msg), nil
}

func TestReadRequest(t *testing.T) {
	var req *broker.ProvisionRequest

	trr := TestRequest{Msg: "{\"plan_id\": \"4c10ff43-be89-420a-9bab-27a9bef9aed8\",\"service_id\": \"f32de3bc-3225-429a-b23b-cef47ca1d25b\", \"parameters\": { \"MYSQL_USER\": \"username\"}}"}

	r := httptest.NewRequest("PUT", "/does/not/matter", trr)
	r.Header.Add("Content-Type", "application/json")

	err := readRequest(r, &req)
	if err != nil {
		t.Fatal(err)
	}

	ft.AssertNotNil(t, r, "r")
	ft.AssertNotNil(t, req, "req")
	ft.AssertEqual(t, req.PlanID, "4c10ff43-be89-420a-9bab-27a9bef9aed8", "planid doesn't match")
	ft.AssertEqual(t, req.ServiceID, "f32de3bc-3225-429a-b23b-cef47ca1d25b", "serviceid doesn't match")
	ft.AssertEqual(t, req.Parameters["MYSQL_USER"], "username", "parameters don't match")
}

func TestInvalidContentType(t *testing.T) {
	var req *broker.ProvisionRequest
	r := httptest.NewRequest("PUT", "/does/not/matter", nil)
	err := readRequest(r, &req)
	if err == nil {
		t.Fatal(err)
	}
	ft.AssertEqual(t, err.Error(), "error: invalid content-type", "expected error")

}

func TestWriteResponse(t *testing.T) {
	expected := `{
  "Msg": "hello world",
  "Code": 10
}
`
	w := httptest.NewRecorder()
	tobj := Foo{Msg: "hello world", Code: 10}
	err := writeResponse(w, 200, tobj)
	if err != nil {
		t.Fatal(err)
	}
	ft.AssertEqual(t, w.Code, 200, "code not equal")
	ft.AssertEqual(t, w.Body.String(), expected, "body not equal")
}

func TestErrorResponse(t *testing.T) {
	expected := `{
  "Msg": "hello world",
  "Code": 10
}
`
	w := httptest.NewRecorder()
	tobj := Foo{Msg: "hello world", Code: 10}
	err := writeResponse(w, 200, tobj)
	if err != nil {
		t.Fatal(err)
	}
	ft.AssertEqual(t, w.Code, 200, "code not equal")
	ft.AssertEqual(t, w.Body.String(), expected, "body not equal")
}

func TestServerError(t *testing.T) {
	expected := `{
  "description": "failure is not an option"
}
`
	w := httptest.NewRecorder()
	tobj := Foo{Msg: "hello world", Code: 10}
	daerr := errors.New("failure is not an option")
	err := writeDefaultResponse(w, 200, tobj, daerr)
	if err != nil {
		t.Fatal(err)
	}
	ft.AssertEqual(t, w.Code, 500, "code should be ISE")
	ft.AssertEqual(t, w.Body.String(), expected, "body not equal")
}

func TestWriteDefaultResponse(t *testing.T) {
	expected := `{
  "Msg": "hello world",
  "Code": 10
}
`
	w := httptest.NewRecorder()
	tobj := Foo{Msg: "hello world", Code: 10}
	err := writeDefaultResponse(w, 200, tobj, nil)
	if err != nil {
		t.Fatal(err)
	}
	ft.AssertEqual(t, w.Code, 200, "code not equal")
	ft.AssertEqual(t, w.Body.String(), expected, "body not equal")
}


text:
'*******************************************************************************************'
'                                                                                '
' Download Free Evaluation Version From:     https://bytescout.com/download/web-installer   '
'                                                                                '
' Also available as Web API! Get free API Key https://app.pdf.co/signup                     '
'                                                                                '
' Copyright © 2017-2020 ByteScout, Inc. All rights reserved.                                '
' https://www.bytescout.com                                                                 '
' https://www.pdf.co                                                                        '
'*******************************************************************************************'

Imports System.Collections
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Configuration.Install

<RunInstaller(True)> _
Public Partial Class ProjectInstaller
	Inherits System.Configuration.Install.Installer
	Public Sub New()
		InitializeComponent()
	End Sub
End Class


text:
//* @flow */
import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { browserHistory } from 'react-router'
import classes from 'styles/sitewide/index.scss'
import d3 from 'd3'
import { loadDensityComposite,loadNewValues,loadShare,loadShareEmpNoAccRet,loadShareEmpHighTech, } from 'redux/modules/densityData'
import { loadFluidityComposite,loadInc5000Data, loadNetMigrationIrs, loadTotalMigration,loadAnnualChurn } from 'redux/modules/fluidityData'
import { loadDiversityComposite,loadOpportunityData,loadForeignBornData,loadEmpVarianceData,loadEmpHHIData } from 'redux/modules/diversityData'
import { loadCombinedComposite } from 'redux/modules/combinedData'
import CategoryNames from 'components/misc/categoryNames'
import CategoryUnits from 'components/misc/categoryUnits'

let roundFormat = d3.format(".2f")

let categories = {
  combined: ['combinedcomposite', 'densitycomposite', 'fluiditycomposite', 'diversitycomposite'],
  density: ['densitycomposite','densitynewfirms', 'densityshareofemploymentinnewfirms','densityshareEmpNoAccRet','densityshareEmpHighTech'],
  diversity: ['diversitycomposite','diversityincomebasedonchildhood','diversitypercentageofforeignbornpopulation','diversityemploymentlocationquotientvariance','diversityemploymenthhi'],
  fluidity: ['fluiditycomposite','fluidityhighgrowthfirms','fluiditynetmigration','fluiditytotalmigration','fluidityannualchurn'],
  qwiDensity: ['qwiDensityshareEmpAll','qwiDensityshareEmpInfo','qwiDensityshareEmpPro']
}

export class HoverBox extends React.Component<void, Props, void> {
  constructor () {
    super()
    //this.onMouseover = this.onMouseover.bind(this)
  }

  _checkData (type) {
    let hasdata = true;
    categories[type].forEach((cat) => {
      if(!this.props[cat]){
        this.props['get'+cat]()
        hasdata = false
      }
    })
    return hasdata
  }

  renderCombinedScores(type,year){
    if(!this._checkData(type)){
      return (
)
    }
    return categories[type].map((cat) => {
      let fulldata = this.props[cat] && this.props[cat].relative ? this.props[cat].relative : this.props[cat]

      fulldata = fulldata || [];

      let isData = fulldata.filter(metro => {
        return metro.key == this.props.metroId
      })[0]

      let data = isData && isData.values ? isData.values : []

      let score = {};
      if(cat == 'diversityincomebasedonchildhood'){
        score = data.filter(d =>
          { return d.x === 'combined' })[0] || {}
      }
      else{
        score = data.filter(d =>
          { return d.x === year })[0] || {}
      }

      console.log()

      return (

          {CategoryNames[cat]}
          {score.rank ? score.rank : ""}
          {(score.score || score.score === 0) ? roundFormat(score.score) : ""}
          {CategoryNames[cat].split(' ').length > 1 ? (score.y || score.y === 0) ? roundFormat(score.y) + ((CategoryUnits[CategoryNames[cat]] == "%") ? "%" : '') : "" : ""}

      )
    })
  }

  render () {
    if(!this.props.metroId) return ()

    let year = this.props.year ? this.props.year : 2013;

    return (

            {this.props.metros[this.props.metroId] ? this.props.metros[this.props.metroId].name.split('-').join(' ') : ''}

              {year}

              Rank
              Score
              Value

            {this.renderCombinedScores(this.props.activeComponent, year)}

    )
  }
}

const mapStateToProps = (state) => ({
  densitycomposite:state.densityData.compositeData,
  densitynewfirms:state.densityData.newValuesData,
  densityshareofemploymentinnewfirms:state.densityData.shareData,
  densityshareEmpNoAccRet:state.densityData.shareEmpNoAccRet,
  densityshareEmpHighTech:state.densityData.shareEmpHighTech,
  fluiditycomposite:state.fluidityData.compositeData,
  fluidityhighgrowthfirms:state.fluidityData.inc5000,
  fluiditynetmigration:state.fluidityData.irsNet,
  fluiditytotalmigration:state.fluidityData.totalMigrationFlow,
  fluidityannualchurn:state.fluidityData.annualChurn,
  diversitycomposite : state.diversityData.diversitycomposite,
  diversityincomebasedonchildhood:state.diversityData.opportunity,
  diversitypercentageofforeignbornpopulation:state.diversityData.foreignborn,
  diversityemploymentlocationquotientvariance:state.diversityData.empVariance,
  diversityemploymenthhi:state.diversityData.empHHI,
  combinedcomposite : state.combinedData.combinedcomposite,
  metros : state.metros,
})

export default connect((mapStateToProps), {
  getdensitycomposite: () => loadDensityComposite(),
  getdensitynewfirms: () => loadNewValues(),
  getdensityshareofemploymentinnewfirms: () => loadShare(),
  getdensityshareEmpNoAccRet: () => loadShareEmpNoAccRet(),
  getdensityshareEmpHighTech: () => loadShareEmpHighTech(),
  getfluiditycomposite: () => loadFluidityComposite(),
  getfluidityhighgrowthfirms: () => loadInc5000Data(),
  getfluiditynetmigration: () => loadNetMigrationIrs(),
  getfluiditytotalmigration: () => loadTotalMigration(),
  getfluidityannualchurn:() => loadAnnualChurn(),
  getdiversitycomposite: () => loadDiversityComposite(),
  getdiversityincomebasedonchildhood: () => loadOpportunityData(),
  getdiversitypercentageofforeignbornpopulation: () => loadForeignBornData(),
  getdiversityemploymentlocationquotientvariance: () => loadEmpVarianceData(),
  getdiversityemploymenthhi: () => loadEmpHHIData(),
  getcombinedcomposite: () => loadCombinedComposite(),
  changeHomeState: (state) => changeHomeState(state)
})(HoverBox)


text:
package org.testifyproject.core.instance;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;

import java.util.List;
import java.util.Optional;

import org.junit.Before;
import org.junit.Test;
import org.mockito.Answers;
import org.testifyproject.Instance;
import org.testifyproject.LocalResourceInfo;
import org.testifyproject.LocalResourceInstance;
import org.testifyproject.TestContext;
import org.testifyproject.annotation.LocalResource;
import org.testifyproject.guava.common.collect.ImmutableList;

/**
 *
 * @author saden
 */
public class LocalResourceInstanceProviderTest {

    LocalResourceInstanceProvider sut;

    @Before
    public void init() {
        sut = new LocalResourceInstanceProvider();
    }

    @Test
    public void givenTestContextWithLocalResourceInstancesWithoutNameGetShouldReturnInstnaces() {
        TestContext testContext = mock(TestContext.class);
        LocalResourceInfo resourceInstance = mock(LocalResourceInfo.class);
        List<LocalResourceInfo> localResourcesInstances = ImmutableList.of(
                resourceInstance);
        LocalResourceInstance value = mock(LocalResourceInstance.class);
        LocalResource annotation = mock(LocalResource.class, Answers.RETURNS_MOCKS);
        String fqn = "test";
        Instance resource = mock(Instance.class);
        Instance client = mock(Instance.class);
        Optional<Instance<Object>> foundClient = Optional.of(client);

        given(testContext.getLocalResources()).willReturn(localResourcesInstances);
        given(resourceInstance.getValue()).willReturn(value);
        given(resourceInstance.getAnnotation()).willReturn(annotation);
        given(annotation.name()).willReturn("");
        given(value.getFqn()).willReturn(fqn);
        given(value.getResource()).willReturn(resource);
        given(value.getClient()).willReturn(foundClient);

        List<Instance> result = sut.get(testContext);

        assertThat(result).hasSize(3).contains(resource, client);
    }

    @Test
    public void givenTestContextWithLocalResourceInstancesWithNameGetShouldReturnInstnaces() {
        TestContext testContext = mock(TestContext.class);
        LocalResourceInfo resourceInstance = mock(LocalResourceInfo.class);
        List<LocalResourceInfo> localResourcesInstances = ImmutableList.of(
                resourceInstance);
        LocalResourceInstance value = mock(LocalResourceInstance.class);
        LocalResource annotation = mock(LocalResource.class, Answers.RETURNS_MOCKS);
        Instance resource = mock(Instance.class);
        Instance client = mock(Instance.class);
        Optional<Instance<Object>> foundClient = Optional.of(client);

        given(testContext.getLocalResources()).willReturn(localResourcesInstances);
        given(resourceInstance.getValue()).willReturn(value);
        given(resourceInstance.getAnnotation()).willReturn(annotation);
        given(annotation.name()).willReturn("test");
        given(value.getResource()).willReturn(resource);
        given(value.getClient()).willReturn(foundClient);

        List<Instance> result = sut.get(testContext);

        assertThat(result).hasSize(3).contains(resource, client);
    }

}


text:
Yii 2 Starter Kit
================================
This is Yii2 start application template.

It was created and developing as a fast start for building an advanced sites based on Yii2.

It covers typical use cases for a new project and will help you not to waste your time doing the same work in every project

FEATURES
--------
- Beautiful and open source dashboard theme for backend AdminLTE 2 (http://almsaeedstudio.com/AdminLTE)
- I18N + 3 translations: English, Russian, Ukrainian
- I18N DbMessageSource CRUD module
- Language change action + behavior to choose locale based on browser preferred language
- Sign in, Sign up, profile(avatar, locale, personal data) etc
- OAuth authorization
- User management: CRUD
- RBAC with predefined `guest`, `user`, `manager` and `administrator` roles
- Content management components: articles, categories, static pages, editable menu, editable carousels, text blocks
- Ready-to-go RESTful API module
- File storage component + file upload widget (https://github.com/trntv/yii2-file-kit)
- [thephpleague/glide](https://github.com/thephpleague/glide) integration with [trntv/yii2-glide](https://github.com/trntv/yii2-glide)
- Key-value storage component
- Useful behaviors (GlobalAccessBehavior, CacheInvalidateBehavior, MaintenanceBehavior)
- Yii2 log web interface
- Application timeline component
- Cache web controller
- Maintenance mode component ([more](#maintenance-mode))
- System information web interface
- dotenv support
- `ExtendedMessageController` with ability to replace source code language and migrate messages between message sources
- Aceeditor widget (http://ace.c9.io, https://github.com/trntv/yii2-aceeditor),
- Datetimepicker widget (https://github.com/trntv/yii2-bootstrap-datetimepicker),
- Imperavi Reactor Widget (http://imperavi.com/redactor, https://github.com/asofter/yii2-imperavi-redactor),
- Elfinder Extension (http://elfinder.org, https://github.com/MihailDev/yii2-elfinder)
- Xhprof Debug panel (https://github.com/trntv/yii2-debug-xhprof)
- Extended IDE autocompletion
- Nginx config example
- Test-ready
- Vagrant support
- many other features i'm lazy to write about :-)

DEMO
----
Frontend:
http://yii2-starter-kit.terentev.net

Backend:
http://backend.yii2-starter-kit.terentev.net

`administrator` role account
```
Login: webmaster
Password: webmaster
```

`manager` role account
```
Login: manager
Password: manager
```

`user` role account
```
Login: user
Password: user
```

REQUIREMENTS
------------

The minimum requirement by this application template that your Web server supports PHP 5.4.0.

INSTALLATION
------------

### Before installation
If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions
at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

Install composer-asset-plugin needed for yii assets management
```bash
composer global require "fxp/composer-asset-plugin"
```

### Clone from GitHub

Extract the github archive file or clone this repository.
```bash
git clone https://github.com/trntv/yii2-starter-kit.git
```

After clone run
```
composer install
```

### Install via Composer

You can install this application template with `composer` using the following command:

```
composer create-project --prefer-dist --stability=dev trntv/yii2-starter-kit
```

Application configuration process include:

1. Initialise application
2. Prepare web server
3. Configure environment local settings
4. Apply migrations
5. Initialise RBAC

### Vagrant
If you want, you can use bundled Vagrant instead of installing app to your local machine.
1. Install [Vagrant](https://www.vagrantup.com/)
2. Rename `vagrant.dist.yaml` to `vagrant.yaml`
3. Create GitHub [personal API token](https://github.com/blog/1509-personal-api-tokens) and paste in into `vagrant.yml`
4. Run:
```
vagrant plugin install vagrant-hostmanager
vagrant up
```
That`s all. After provision application will be accessible on http://yii2-starter-kit.dev

#### 0. Initialization
Initialise application
```
./init #init.bat for windows
```

#### 1. Web Server

You should configure web server with three different web roots:

`yii2-starter-kit.dev` => `/path/to/yii2-starter-kit/frontend/web`

`backend.yii2-starter-kit.dev` => `/path/to/yii2-starter-kit/backend/web`

`storage.yii2-starter-kit.dev` => `/path/to/yii2-starter-kit/storage/web`

**NOTE:** You can use `nginx.conf` file that is located in the project root.

#### 1. Initialization
Initialise application
```
./init // init.bat for windows
```

#### 2. Setup environment
Adjust settings in `.env` file

##### 2.1 Database
Edit the file `.env` with your data:
```
DB_DSN           = mysql:host=127.0.0.1;port=3306;dbname=yii2-starter-kit
DB_USERNAME      = user
DB_PASSWORD      = password
```
**NOTE:** Yii won't create the database for you, this has to be done manually before you can access it.

##### 2.2 Application urls
Set your current application urls in `.env`

```php
FRONTEND_URL    = http://yii2-starter-kit.dev
BACKEND_URL     = http://backend.yii2-starter-kit.dev
STORAGE_URL     = http://storage.yii2-starter-kit.dev
```
#### 3. Apply migrations

```php
php console/yii migrate
```

#### 4. Initialise RBAC config

```php
php console/yii rbac/init
```
**IMPORTANT: without rbac/init you CAN'T LOG IN into backend**

### Demo user
~~~
Login: webmaster
Password: webmaster
~~~

COMPONENTS
----------
### I18N
If you want to store application messages in DB and to have ability to edit them from backend, run:
```php
php console/yii message/migrate @common/config/messages/php.php @common/config/messages/db.php
```
it will copy all existing messages to database

Then uncomment config for `DbMessageSource` in
```php
common/config/_base.php
```

### KeyStorage
Key storage is a key-value storage to store different information. Application params for example.
Values can be stored both via api or by backend CRUD component.
```
Yii::$app->keyStorage->set('key', 'value');
Yii::$app->keyStorage->get('articles-per-page');
```

### ExtendedMessageController
This controller extends default MessageController to provide some useful actions

Migrate messages between different message sources:
``yii message/migrate @common/config/messages/php.php @common/config/messages/db.php``

Replace source code language:
``yii message/replace-source-language @path language-LOCALE``

Remove Yii::t from code
``yii message/replace-source-language @path``

### Maintenance mode
Starter kit has built-in component to provide a maintenance functionality. All you have to do is to configure ``maintenance``
component in your config
```php
'bootstrap' => ['maintenance'],
...
'components' => [
    ...
    'maintenance' => [
        'class' => 'common\components\maintenance\Maintenance',
        'enabled' => Astronomy::isAFullMoonToday()
    ]
    ...
]
```
This component will catch all incoming requests, set proper response HTTP headers (503, "Retry After") and show a maintenance message.
Additional configuration options can be found in a corresponding class.

Starter kit configured to turn on maintenance mode if ``frontend.maintenance`` key in KeyStorage is set to ``true``

### Behaviors
#### CacheInvalidateBehavior
```php
 public function behaviors()
 {
     return [
         [
             'class' => `common\components\behaviors\CacheInvalidateBehavior`,
             'tags' => [
                  'awesomeTag',
                   function($model){
                       return "tag-{$model->id}"
                  }
              ],
             'keys' => [
                  'awesomeKey',
                  function($model){
                      return "key-{$model->id}"
                  }
              ]
         ],
     ];
 }
```
#### GlobalAccessBehavior
usage example in ``backend\config\web.php``

### Widgets configurable from backend
#### Carousel
TBD

#### DbText
TBD

#### DbMenu
```php
echo common\components\widgets\DbMenu::widget([
      'key'=>'stored-menu-key',
      /* any other option from \yii\widgets\Menu */
])
```

### Input widgets
- WYSIWYG Redactor widget (https://github.com/asofter/yii2-imperavi-redactor)
- Datetimepicker - (http://eonasdan.github.io/bootstrap-datetimepicker, https://github.com/trntv/yii2-bootstrap-datetimepicker)
- Ace Editor - (https://github.com/trntv/yii2-aceeditor)

### Grid
#### EnumColumn
```php
 [
      'class'=>'\common\components\grid\EnumColumn',
      'attribute'=>'status',
      'enum'=>User::getStatuses() // [0=>'Deleted', 1=>'Active']
 ]
```
### API
TBD

### Many more useful components
- ``common\components\behaviors\GlobalAccessBehavior`` allows to set access rules for your application in application config
- ``common\components\validators\JsonValidator`` validates a value to be a valid json
- ElFinder - (https://github.com/MihailDev/yii2-elfinder)
- RBAC OwnModelRule - simple rule to check if the current user is model owner

OTHER
-----
### Updates
Add remote repository `upstream`.
```
git remote add upstream https://github.com/trntv/yii2-starter-kit.git
```
Fetch latest changes from it
```
git fetch upstream
```
Merge these changes into your repository
```
git merge upstream/master
```
**IMPORTANT: there might be a conflicts between `upstream` and your code. You should resolve conflicts on your own**

### READ MORE
https://github.com/yiisoft/yii2/blob/master/apps/advanced/README.md
https://github.com/yiisoft/yii2/tree/master/docs

### Have any questions?
mail to `eugene@terentev.net`

#### NOTE
This template was created mostly for developers NOT for end users.
This is a point where you can begin your application, rather than creating it from scratch.
Good luck!


text:
namespace em = enterprise_management;

namespace policy {

ONCUserPolicyValueValidator::ONCUserPolicyValueValidator()
    : ONCPolicyValueValidatorBase<em::CloudPolicySettings>(
          key::kOpenNetworkConfiguration,
          ::onc::ONCSource::ONC_SOURCE_USER_POLICY) {}

absl::optional<std::string>
ONCUserPolicyValueValidator::GetONCStringFromPayload(
    const em::CloudPolicySettings& policy_payload) const {
  if (policy_payload.has_opennetworkconfiguration()) {
    const em::StringPolicyProto& policy_proto =
        policy_payload.opennetworkconfiguration();
    if (policy_proto.has_value())
      return policy_proto.value();
  }
  return absl::nullopt;
}

}  // namespace policy


text:
package com.github.pavlovspec.report;

public class StandardOutSpecReporter implements SpecReporter {
    @Override
    public void report(String report) {
        System.out.println(report);
    }
}


text:
package jp.gr.java_conf.kgd.library.cool.jsfml.component.animation.blink;

import jp.gr.java_conf.kgd.library.cool.jsfml.component.IVisibleState;
import jp.gr.java_conf.kgd.library.cool.jsfml.component.base.IShapeState;

public interface IBlinkShapeState
extends IConstBlinkShapeState, IShapeState, IBlinkAnimationState, IVisibleState
{

}


text:
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        # Deleting field 'PublicAccount.enabled'
        db.delete_column(u'weixin_publicaccount', 'enabled')

        # Adding field 'App.enabled'
        db.add_column(u'weixin_app', 'enabled',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

    def backwards(self, orm):
        # Adding field 'PublicAccount.enabled'
        db.add_column(u'weixin_publicaccount', 'enabled',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Deleting field 'App.enabled'
        db.delete_column(u'weixin_app', 'enabled')

    models = {
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        u'auth.permission': {
            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'auth.user': {
            'Meta': {'object_name': 'User'},
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        u'contenttypes.contenttype': {
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'weixin.app': {
            'Meta': {'object_name': 'App'},
            'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
            'thumbnail_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'weixin.event': {
            'Meta': {'object_name': 'Event'},
            'create_time': ('django.db.models.fields.BigIntegerField', [], {}),
            'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
            'event_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'from_user_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
            'public_account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['weixin.PublicAccount']"}),
            'to_user_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'xml_content': ('django.db.models.fields.TextField', [], {})
        },
        u'weixin.message': {
            'Meta': {'object_name': 'Message'},
            'create_time': ('django.db.models.fields.BigIntegerField', [], {}),
            'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
            'from_user_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
            'msg_id': ('django.db.models.fields.BigIntegerField', [], {}),
            'msg_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'public_account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['weixin.PublicAccount']"}),
            'to_user_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'xml_content': ('django.db.models.fields.TextField', [], {})
        },
        u'weixin.publicaccount': {
            'Meta': {'object_name': 'PublicAccount'},
            'callback_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'connect_status': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
            'thumbnail_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'token': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'type': ('django.db.models.fields.CharField', [], {'default': "'subscribe'", 'max_length': '10'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'winxin_id': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'weixin.publicaccountapp': {
            'Meta': {'object_name': 'PublicAccountApp'},
            'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['weixin.App']"}),
            'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
            'public_account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['weixin.PublicAccount']"})
        }
    }

    complete_apps = ['weixin']


text:
<!DOCTYPE html>

    <link rel="icon" href="imgs/iconMicropigment32.png" sizes="16x16 32x32" type="image/png">

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" media="(max-width: 640px)" href="css/main-max-640px.css">
    <link rel="stylesheet" media="(min-width: 640px)" href="css/main-min-640px.css">

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <meta name="google-site-verification" content="YZ86kcKhW947fZxqeFJnGbgYvlMR4Cums9wOAj9A2cU" />

    <link href='https://fonts.googleapis.com/css?family=Slabo+27px' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Merriweather:300,900,700' rel='stylesheet' type='text/css'>
    <title>MICROPIGMENT servicios e insumos</title>
    <meta name="theme-color" content="#d9edf7">
    <meta name="description" content="Servicios, insumos y cursos de micropigmentación en Chile">
    <meta name="keywords" content="Micropigmentación, Chile">
    <meta name="author" content="Rodrigo Barahona Montecinos">

                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar1">
                            Menú

                        </button>
                        Menú

Inicio

                                Servicios

Delineado de cejas

Delineado de ojos

Delineado y relleno de labios

                                Insumos

Agujas y punteros

Pigmentos

Accesorios

Inductores de pigmento

Pieles

Academia

Cursos

Contacto

Nosotros

Agujas & punteros

                En Micropigment nos dedicamos a seleccionar los mejores materiales para realizar un trabajo de micropigmentación
                de excelencia. Queremos ayudarte a realizar tu trabajo ofreciendo altos estándares de calidad a precios convenientes, mejorando
                la experiencia de tus clientes.

                Realizamos despacho a regiones con previa cancelación mediante depósito o transferencia bancaria.

Agujas

Agujas 1R 10u
$ 4.990

Agujas 2R 10u
$ 4.990

Agujas 3R 10u
$ 4.990

Agujas 5R 10u
$ 4.990

Agujas 3F 10u
$ 4.990

Agujas 5F 10u
$ 4.990

Aguja microblading 7D 10un.
$ 9.990

Aguja microblading 14C 10un.
$ 9.990

Aguja microblading 18C 10un.
$ 9.990

Punteros

Punteros 5R 10u
$ 4.990

Agujas 3F 10u
$ 4.990

Punteros 5F 10u
$ 4.990

MICROPIGMENT servicios e insumos para micropigmentación.

Diseñado por Rodrigo Barahona Montecinos para MICROPIGMENT 2016.


text:
"""List tickets."""
# :license: MIT, see LICENSE for more details.

import click

import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting

@click.command()
@click.option('--open / --closed', 'is_open',
              help="Display only open or closed tickets",
              default=True)
@environment.pass_env
def cli(env, is_open):
    """List tickets."""
    ticket_mgr = SoftLayer.TicketManager(env.client)

    tickets = ticket_mgr.list_tickets(open_status=is_open,
                                      closed_status=not is_open)

    table = formatting.Table(['id', 'assigned_user', 'title',
                              'last_edited', 'status'])

    for ticket in tickets:
        user = formatting.blank()
        if ticket.get('assignedUser'):
            user = "%s %s" % (ticket['assignedUser']['firstName'],
                              ticket['assignedUser']['lastName'])

        table.add_row([
            ticket['id'],
            user,
            click.wrap_text(ticket['title']),
            ticket['lastEditDate'],
            ticket['status']['name'],
        ])

    env.fout(table)


text:
from ponyexpress.database import db

class Repository(db.Model):
    __tablename__ = 'repositories'

    id = db.Column(db.Integer, autoincrement=True, primary_key=True)

    name = db.Column(db.String(255))

    uri = db.Column(db.String(255))

    label = db.Column(db.String(255))

    provider = db.Column(db.String(12))

    def __init__(self):
        pass

    def __repr__(self):
        return '%r' % self.id


text:
spark-submit  --class com.iwantfind.Analyser  /Users/renbaoling/Documents/workspace/iwantfind-tool/target/iwantfind-tool-0.1-SNAPSHOT.jar   /Users/renbaoling/Documents/workspace/iwantfind-tool/target/

spark-submit --master yarn --deploy-mode client --name type   --class com.iwantfind.ASAnalyser --num-executors 10 --executor-memory 2g  /tmp/iwantfind-tool-0.1-SNAPSHOT.jar /testdata


text:
package org.jboss.elasticsearch.river.jira;

import java.io.IOException;
import java.util.Date;
import java.util.Map;

import org.elasticsearch.action.bulk.BulkRequestBuilder;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.search.SearchHit;

/**
 * Class used to run one index update process for one JIRA project. Can be used only for one run, then must be discarded
 * and new instance created!
 *
 * @author Vlastimil Elias (velias at redhat dot com)
 */
public class JIRAProjectIndexer implements Runnable {

	private ESLogger logger = Loggers.getLogger(JIRAProjectIndexer.class);

	/**
	 * Property value where "last indexed issue update date" is stored
	 *
	 * @see IESIntegration#storeDatetimeValue(String, String, Date, BulkRequestBuilder)
	 * @see IESIntegration#readDatetimeValue(String, String)
	 */
	protected static final String STORE_PROPERTYNAME_LAST_INDEXED_ISSUE_UPDATE_DATE = "lastIndexedIssueUpdateDate";

	protected final IJIRAClient jiraClient;

	protected final IESIntegration esIntegrationComponent;

	/**
	 * Configured JIRA issue index structure builder to be used.
	 */
	protected final IJIRAIssueIndexStructureBuilder jiraIssueIndexStructureBuilder;

	/**
	 * Key of JIRA project updated.
	 */
	protected final String projectKey;

	/**
	 * Time when indexing started.
	 */
	protected long startTime = 0;

	/**
	 * Info about current indexing.
	 */
	protected ProjectIndexingInfo indexingInfo;

	/**
	 * Create and configure indexer.
	 *
	 * @param projectKey JIRA project key for project to be indexed by this indexer.
	 * @param fullUpdate true to request full index update
	 * @param jiraClient configured JIRA client to be used to obtain informations from JIRA.
	 * @param esIntegrationComponent to be used to call River component and ElasticSearch functions
	 * @param jiraIssueIndexStructureBuilder to be used during indexing
	 */
	public JIRAProjectIndexer(String projectKey, boolean fullUpdate, IJIRAClient jiraClient,
			IESIntegration esIntegrationComponent, IJIRAIssueIndexStructureBuilder jiraIssueIndexStructureBuilder) {
		if (projectKey == null || projectKey.trim().length() == 0)
			throw new IllegalArgumentException("projectKey must be defined");
		logger = esIntegrationComponent.createLogger(getClass());
		this.jiraClient = jiraClient;
		this.projectKey = projectKey;
		this.esIntegrationComponent = esIntegrationComponent;
		this.jiraIssueIndexStructureBuilder = jiraIssueIndexStructureBuilder;
		indexingInfo = new ProjectIndexingInfo(projectKey, fullUpdate);
	}

	@Override
	public void run() {
		startTime = System.currentTimeMillis();
		indexingInfo.startDate = new Date(startTime);
		try {
			processUpdate();
			processDelete(new Date(startTime));
			indexingInfo.timeElapsed = (System.currentTimeMillis() - startTime);
			indexingInfo.finishedOK = true;
			esIntegrationComponent.reportIndexingFinished(indexingInfo);
			logger.info("Finished {} update for JIRA project {}. {} updated and {} deleted issues. Time elapsed {}s.",
					indexingInfo.fullUpdate ? "full" : "incremental", projectKey, indexingInfo.issuesUpdated,
					indexingInfo.issuesDeleted, (indexingInfo.timeElapsed / 1000));
		} catch (Throwable e) {
			indexingInfo.timeElapsed = (System.currentTimeMillis() - startTime);
			indexingInfo.errorMessage = e.getMessage();
			indexingInfo.finishedOK = false;
			esIntegrationComponent.reportIndexingFinished(indexingInfo);
			Throwable cause = e;
			// do not log stacktrace for some operational exceptions to keep log file much clear
			if (((cause instanceof IOException) || (cause instanceof InterruptedException)) && cause.getMessage() != null)
				cause = null;
			logger.error("Failed {} update for JIRA project {} due: {}", cause, indexingInfo.fullUpdate ? "full"
					: "incremental", projectKey, e.getMessage());
		}
	}

	/**
	 * Process update of search index for configured JIRA project. A {@link #updatedCount} field is updated inside of this
	 * method. A {@link #fullUpdate} field can be updated inside of this method.
	 *
	 * @throws Exception
	 */
	protected void processUpdate() throws Exception {
		indexingInfo.issuesUpdated = 0;
		Date updatedAfter = null;
		if (!indexingInfo.fullUpdate) {
			updatedAfter = DateTimeUtils.roundDateTimeToMinutePrecise(readLastIssueUpdatedDate(projectKey));
		}
		Date updatedAfterStarting = updatedAfter;
		if (updatedAfter == null)
			indexingInfo.fullUpdate = true;
		Date lastIssueUpdatedDate = null;

		int startAt = 0;

		logger.info("Go to perform {} update for JIRA project {}", indexingInfo.fullUpdate ? "full" : "incremental",
				projectKey);

		boolean cont = true;
		while (cont) {
			if (isClosed())
				throw new InterruptedException("Interrupted because River is closed");

			if (logger.isDebugEnabled())
				logger.debug("Go to ask for updated JIRA issues for project {} with startAt {} updated {}", projectKey,
						startAt, (updatedAfter != null ? ("after " + updatedAfter) : "in whole history"));

			ChangedIssuesResults res = jiraClient.getJIRAChangedIssues(projectKey, startAt, updatedAfter, null);

			if (res.getIssuesCount() == 0) {
				cont = false;
			} else {
				if (isClosed())
					throw new InterruptedException("Interrupted because River is closed");

				Date firstIssueUpdatedDate = null;
				BulkRequestBuilder esBulk = esIntegrationComponent.prepareESBulkRequestBuilder();
				for (Map<String, Object> issue : res.getIssues()) {
					String issueKey = jiraIssueIndexStructureBuilder.extractIssueKey(issue);
					if (issueKey == null) {
						throw new IllegalArgumentException("Issue 'key' field not found in JIRA response for project " + projectKey
								+ " within issue data: " + issue);
					}
					lastIssueUpdatedDate = DateTimeUtils.roundDateTimeToMinutePrecise(jiraIssueIndexStructureBuilder
							.extractIssueUpdated(issue));
					logger.debug("Go to update index for issue {} with updated {}", issueKey, lastIssueUpdatedDate);
					if (lastIssueUpdatedDate == null) {
						throw new IllegalArgumentException("'updated' field not found in JIRA response data for issue " + issueKey);
					}
					if (firstIssueUpdatedDate == null) {
						firstIssueUpdatedDate = lastIssueUpdatedDate;
					}

					jiraIssueIndexStructureBuilder.indexIssue(esBulk, projectKey, issue);
					indexingInfo.issuesUpdated++;
					if (isClosed())
						throw new InterruptedException("Interrupted because River is closed");
				}

				storeLastIssueUpdatedDate(esBulk, projectKey, lastIssueUpdatedDate);
				esIntegrationComponent.executeESBulkRequest(esBulk);

				// next logic depends on issues sorted by update time ascending when returned from
				// jiraClient.getJIRAChangedIssues()!!!!
				if (!lastIssueUpdatedDate.equals(firstIssueUpdatedDate)) {
					// processed issues updated in different times, so we can continue by issue filtering based on latest time
					// of update which is more safe for concurrent changes in JIRA
					updatedAfter = lastIssueUpdatedDate;
					cont = res.getTotal() > (res.getStartAt() + res.getIssuesCount());
					startAt = 0;
				} else {
					// more issues updated in same time, we must go over them using pagination only, which may sometimes lead
					// to some issue update lost due concurrent changes in JIRA
					startAt = res.getStartAt() + res.getIssuesCount();
					cont = res.getTotal() > startAt;
				}
			}
		}

		if (indexingInfo.issuesUpdated > 0 && lastIssueUpdatedDate != null && updatedAfterStarting != null
				&& updatedAfterStarting.equals(lastIssueUpdatedDate)) {
			// no any new issue during this update cycle, go to increment lastIssueUpdatedDate in store by one minute not to
			// index last issue again and again in next cycle - this is here due JQL minute precise on timestamp search
			storeLastIssueUpdatedDate(null, projectKey,
					DateTimeUtils.roundDateTimeToMinutePrecise(new Date(lastIssueUpdatedDate.getTime() + 64 * 1000)));
		}
	}

	/**
	 * Process delete of issues from search index for configured JIRA project. A {@link #deleteCount} field is updated
	 * inside of this method.
	 *
	 * @param boundDate date when full update was started. We delete all search index documents not updated after this
	 *          date (which means these issues are not in jira anymore).
	 */
	protected void processDelete(Date boundDate) throws Exception {

		if (boundDate == null)
			throw new IllegalArgumentException("boundDate must be set");

		indexingInfo.issuesDeleted = 0;
		indexingInfo.commentsDeleted = 0;

		if (!indexingInfo.fullUpdate)
			return;

		logger.debug("Go to process JIRA deletes for project {} for issues not updated in index after {}", projectKey,
				boundDate);

		String indexName = jiraIssueIndexStructureBuilder.getIssuesSearchIndexName(projectKey);
		esIntegrationComponent.refreshSearchIndex(indexName);

		logger.debug("go to delete indexed issues for project {} not updated after {}", projectKey, boundDate);
		SearchRequestBuilder srb = esIntegrationComponent.prepareESScrollSearchRequestBuilder(indexName);
		jiraIssueIndexStructureBuilder.buildSearchForIndexedDocumentsNotUpdatedAfter(srb, projectKey, boundDate);

		SearchResponse scrollResp = esIntegrationComponent.executeESSearchRequest(srb);

		if (scrollResp.getHits().getTotalHits() > 0) {
			if (isClosed())
				throw new InterruptedException("Interrupted because River is closed");
			scrollResp = esIntegrationComponent.executeESScrollSearchNextRequest(scrollResp);
			BulkRequestBuilder esBulk = esIntegrationComponent.prepareESBulkRequestBuilder();
			while (scrollResp.getHits().getHits().length > 0) {
				for (SearchHit hit : scrollResp.getHits()) {
					logger.debug("Go to delete indexed issue for document id {}", hit.getId());
					if (jiraIssueIndexStructureBuilder.deleteIssueDocument(esBulk, hit)) {
						indexingInfo.issuesDeleted++;
					} else {
						indexingInfo.commentsDeleted++;
					}
				}
				if (isClosed())
					throw new InterruptedException("Interrupted because River is closed");
				scrollResp = esIntegrationComponent.executeESScrollSearchNextRequest(scrollResp);
			}
			esIntegrationComponent.executeESBulkRequest(esBulk);
		}
	}

	/**
	 * Check if we must interrupt update process because ElasticSearch runtime needs it.
	 *
	 * @return true if we must interrupt update process
	 */
	protected boolean isClosed() {
		return esIntegrationComponent != null && esIntegrationComponent.isClosed();
	}

	/**
	 * Get date of last issue updated for given JIRA project from persistent store inside ES cluster, so we can continue
	 * in update process from this point.
	 *
	 * @param jiraProjectKey JIRA project key to get date for.
	 * @return date of last issue updated or null if not available (in this case indexing starts from the beginning of
	 *         project history)
	 * @throws IOException
	 * @see #storeLastIssueUpdatedDate(BulkRequestBuilder, String, Date)
	 */
	protected Date readLastIssueUpdatedDate(String jiraProjectKey) throws Exception {
		return esIntegrationComponent.readDatetimeValue(jiraProjectKey, STORE_PROPERTYNAME_LAST_INDEXED_ISSUE_UPDATE_DATE);
	}

	/**
	 * Store date of last issue updated for given JIRA project into persistent store inside ES cluster, so we can continue
	 * in update process from this point next time.
	 *
	 * @param esBulk ElasticSearch bulk request to be used for update
	 * @param jiraProjectKey JIRA project key to store date for.
	 * @param lastIssueUpdatedDate date to store
	 * @throws Exception
	 * @see #readLastIssueUpdatedDate(String)
	 */
	protected void storeLastIssueUpdatedDate(BulkRequestBuilder esBulk, String jiraProjectKey, Date lastIssueUpdatedDate)
			throws Exception {
		esIntegrationComponent.storeDatetimeValue(jiraProjectKey, STORE_PROPERTYNAME_LAST_INDEXED_ISSUE_UPDATE_DATE,
				lastIssueUpdatedDate, esBulk);
	}

	/**
	 * Get current indexing info.
	 *
	 * @return indexing info instance.
	 */
	public ProjectIndexingInfo getIndexingInfo() {
		return indexingInfo;
	}

}


text:
namespace Vsts.Vault.TeamServices
{
    /// <summary>
    ///
    /// </summary>
    public class Repository
    {
        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>
        /// The identifier.
        /// </value>
        public string id { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        public string name { get; set; }

        /// <summary>
        /// Gets or sets the URL.
        /// </summary>
        /// <value>
        /// The URL.
        /// </value>
        public string url { get; set; }

        /// <summary>
        /// Gets or sets the project.
        /// </summary>
        /// <value>
        /// The project.
        /// </value>
        public Project project { get; set; }

        /// <summary>
        /// Gets or sets the default branch.
        /// </summary>
        /// <value>
        /// The default branch.
        /// </value>
        public string defaultBranch { get; set; }

        /// <summary>
        /// Gets or sets the remote URL.
        /// </summary>
        /// <value>
        /// The remote URL.
        /// </value>
        public string remoteUrl { get; set; }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
<root>
  <document>
    <sentences>
      <sentence id="1">
        <tokens>
          <token id="1">
            <word>The</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>0</CharacterOffsetBegin>
            <CharacterOffsetEnd>3</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="2">
            <word>university</word>
            <lemma>university</lemma>
            <CharacterOffsetBegin>4</CharacterOffsetBegin>
            <CharacterOffsetEnd>14</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="3">
            <word>asked</word>
            <lemma>ask</lemma>
            <CharacterOffsetBegin>15</CharacterOffsetBegin>
            <CharacterOffsetEnd>20</CharacterOffsetEnd>
            <POS>VBD</POS>
          </token>
          <token id="4">
            <word>students</word>
            <lemma>student</lemma>
            <CharacterOffsetBegin>21</CharacterOffsetBegin>
            <CharacterOffsetEnd>29</CharacterOffsetEnd>
            <POS>NNS</POS>
          </token>
          <token id="5">
            <word>to</word>
            <lemma>to</lemma>
            <CharacterOffsetBegin>30</CharacterOffsetBegin>
            <CharacterOffsetEnd>32</CharacterOffsetEnd>
            <POS>TO</POS>
          </token>
          <token id="6">
            <word>``</word>
            <lemma>``</lemma>
            <CharacterOffsetBegin>33</CharacterOffsetBegin>
            <CharacterOffsetEnd>34</CharacterOffsetEnd>
            <POS>``</POS>
          </token>
          <token id="7">
            <word>shelter</word>
            <lemma>shelter</lemma>
            <CharacterOffsetBegin>34</CharacterOffsetBegin>
            <CharacterOffsetEnd>41</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="8">
            <word>in</word>
            <lemma>in</lemma>
            <CharacterOffsetBegin>42</CharacterOffsetBegin>
            <CharacterOffsetEnd>44</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="9">
            <word>place</word>
            <lemma>place</lemma>
            <CharacterOffsetBegin>45</CharacterOffsetBegin>
            <CharacterOffsetEnd>50</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="10">
            <word>''</word>
            <lemma>''</lemma>
            <CharacterOffsetBegin>50</CharacterOffsetBegin>
            <CharacterOffsetEnd>51</CharacterOffsetEnd>
            <POS>''</POS>
          </token>
          <token id="11">
            <word>and</word>
            <lemma>and</lemma>
            <CharacterOffsetBegin>52</CharacterOffsetBegin>
            <CharacterOffsetEnd>55</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="12">
            <word>warned</word>
            <lemma>warn</lemma>
            <CharacterOffsetBegin>56</CharacterOffsetBegin>
            <CharacterOffsetEnd>62</CharacterOffsetEnd>
            <POS>VBD</POS>
          </token>
          <token id="13">
            <word>students</word>
            <lemma>student</lemma>
            <CharacterOffsetBegin>63</CharacterOffsetBegin>
            <CharacterOffsetEnd>71</CharacterOffsetEnd>
            <POS>NNS</POS>
          </token>
          <token id="14">
            <word>who</word>
            <lemma>who</lemma>
            <CharacterOffsetBegin>72</CharacterOffsetBegin>
            <CharacterOffsetEnd>75</CharacterOffsetEnd>
            <POS>WP</POS>
          </token>
          <token id="15">
            <word>are</word>
            <lemma>be</lemma>
            <CharacterOffsetBegin>76</CharacterOffsetBegin>
            <CharacterOffsetEnd>79</CharacterOffsetEnd>
            <POS>VBP</POS>
          </token>
          <token id="16">
            <word>off-campus</word>
            <lemma>off-campus</lemma>
            <CharacterOffsetBegin>80</CharacterOffsetBegin>
            <CharacterOffsetEnd>90</CharacterOffsetEnd>
            <POS>JJ</POS>
          </token>
          <token id="17">
            <word>to</word>
            <lemma>to</lemma>
            <CharacterOffsetBegin>91</CharacterOffsetBegin>
            <CharacterOffsetEnd>93</CharacterOffsetEnd>
            <POS>TO</POS>
          </token>
          <token id="18">
            <word>stay</word>
            <lemma>stay</lemma>
            <CharacterOffsetBegin>94</CharacterOffsetBegin>
            <CharacterOffsetEnd>98</CharacterOffsetEnd>
            <POS>VB</POS>
          </token>
          <token id="19">
            <word>away</word>
            <lemma>away</lemma>
            <CharacterOffsetBegin>99</CharacterOffsetBegin>
            <CharacterOffsetEnd>103</CharacterOffsetEnd>
            <POS>RB</POS>
          </token>
          <token id="20">
            <word>from</word>
            <lemma>from</lemma>
            <CharacterOffsetBegin>104</CharacterOffsetBegin>
            <CharacterOffsetEnd>108</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="21">
            <word>the</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>109</CharacterOffsetBegin>
            <CharacterOffsetEnd>112</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="22">
            <word>university</word>
            <lemma>university</lemma>
            <CharacterOffsetBegin>113</CharacterOffsetBegin>
            <CharacterOffsetEnd>123</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="23">
            <word>.</word>
            <lemma>.</lemma>
            <CharacterOffsetBegin>123</CharacterOffsetBegin>
            <CharacterOffsetEnd>124</CharacterOffsetEnd>
            <POS>.</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (NP (DT The) (NN university)) (VP (VP (VBD asked) (NP (NNS students)) (PP (TO to) (`` ``) (NP (NN shelter))) (PP (IN in) (NP (NN place)))) ('' '') (CC and) (VP (VBD warned) (NP (NP (NNS students)) (SBAR (WHNP (WP who)) (S (VP (VBP are) (ADJP (JJ off-campus) (S (VP (TO to) (VP (VB stay) (ADVP (RB away)) (PP (IN from) (NP (DT the) (NN university))))))))))))) (. .))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="3">asked</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">university</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="3">asked</governor>
            <dependent idx="2">university</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="3">asked</governor>
            <dependent idx="4">students</dependent>
          </dep>
          <dep type="prep">
            <governor idx="3">asked</governor>
            <dependent idx="5">to</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="5">to</governor>
            <dependent idx="7">shelter</dependent>
          </dep>
          <dep type="prep">
            <governor idx="3">asked</governor>
            <dependent idx="8">in</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="8">in</governor>
            <dependent idx="9">place</dependent>
          </dep>
          <dep type="cc">
            <governor idx="3">asked</governor>
            <dependent idx="11">and</dependent>
          </dep>
          <dep type="conj">
            <governor idx="3">asked</governor>
            <dependent idx="12">warned</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="12">warned</governor>
            <dependent idx="13">students</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="16">off-campus</governor>
            <dependent idx="14">who</dependent>
          </dep>
          <dep type="cop">
            <governor idx="16">off-campus</governor>
            <dependent idx="15">are</dependent>
          </dep>
          <dep type="rcmod">
            <governor idx="13">students</governor>
            <dependent idx="16">off-campus</dependent>
          </dep>
          <dep type="aux">
            <governor idx="18">stay</governor>
            <dependent idx="17">to</dependent>
          </dep>
          <dep type="xcomp">
            <governor idx="16">off-campus</governor>
            <dependent idx="18">stay</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="18">stay</governor>
            <dependent idx="19">away</dependent>
          </dep>
          <dep type="prep">
            <governor idx="18">stay</governor>
            <dependent idx="20">from</dependent>
          </dep>
          <dep type="det">
            <governor idx="22">university</governor>
            <dependent idx="21">the</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="20">from</governor>
            <dependent idx="22">university</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="3">asked</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">university</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="3">asked</governor>
            <dependent idx="2">university</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="3">asked</governor>
            <dependent idx="4">students</dependent>
          </dep>
          <dep type="prep_to">
            <governor idx="3">asked</governor>
            <dependent idx="7">shelter</dependent>
          </dep>
          <dep type="prep_in">
            <governor idx="3">asked</governor>
            <dependent idx="9">place</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="3">asked</governor>
            <dependent idx="12">warned</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="12">warned</governor>
            <dependent idx="13">students</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="16">off-campus</governor>
            <dependent idx="14">who</dependent>
          </dep>
          <dep type="cop">
            <governor idx="16">off-campus</governor>
            <dependent idx="15">are</dependent>
          </dep>
          <dep type="rcmod">
            <governor idx="13">students</governor>
            <dependent idx="16">off-campus</dependent>
          </dep>
          <dep type="aux">
            <governor idx="18">stay</governor>
            <dependent idx="17">to</dependent>
          </dep>
          <dep type="xcomp">
            <governor idx="16">off-campus</governor>
            <dependent idx="18">stay</dependent>
          </dep>
          <dep type="det">
            <governor idx="22">university</governor>
            <dependent idx="21">the</dependent>
          </dep>
          <dep type="prep_away_from">
            <governor idx="18">stay</governor>
            <dependent idx="22">university</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="3">asked</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">university</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="3">asked</governor>
            <dependent idx="2">university</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="12">warned</governor>
            <dependent idx="2">university</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="3">asked</governor>
            <dependent idx="4">students</dependent>
          </dep>
          <dep type="prep_to">
            <governor idx="3">asked</governor>
            <dependent idx="7">shelter</dependent>
          </dep>
          <dep type="prep_in">
            <governor idx="3">asked</governor>
            <dependent idx="9">place</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="3">asked</governor>
            <dependent idx="12">warned</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="12">warned</governor>
            <dependent idx="13">students</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="16">off-campus</governor>
            <dependent idx="14">who</dependent>
          </dep>
          <dep type="cop">
            <governor idx="16">off-campus</governor>
            <dependent idx="15">are</dependent>
          </dep>
          <dep type="rcmod">
            <governor idx="13">students</governor>
            <dependent idx="16">off-campus</dependent>
          </dep>
          <dep type="aux">
            <governor idx="18">stay</governor>
            <dependent idx="17">to</dependent>
          </dep>
          <dep type="xcomp">
            <governor idx="16">off-campus</governor>
            <dependent idx="18">stay</dependent>
          </dep>
          <dep type="det">
            <governor idx="22">university</governor>
            <dependent idx="21">the</dependent>
          </dep>
          <dep type="prep_away_from">
            <governor idx="18">stay</governor>
            <dependent idx="22">university</dependent>
          </dep>
        </dependencies>
      </sentence>
      <sentence id="2">
        <tokens>
          <token id="1">
            <word>official</word>
            <lemma>official</lemma>
            <CharacterOffsetBegin>125</CharacterOffsetBegin>
            <CharacterOffsetEnd>133</CharacterOffsetEnd>
            <POS>JJ</POS>
          </token>
          <token id="2">
            <word>instructions</word>
            <lemma>instruction</lemma>
            <CharacterOffsetBegin>134</CharacterOffsetBegin>
            <CharacterOffsetEnd>146</CharacterOffsetEnd>
            <POS>NNS</POS>
          </token>
          <token id="3">
            <word>to</word>
            <lemma>to</lemma>
            <CharacterOffsetBegin>147</CharacterOffsetBegin>
            <CharacterOffsetEnd>149</CharacterOffsetEnd>
            <POS>TO</POS>
          </token>
          <token id="4">
            <word>stay</word>
            <lemma>stay</lemma>
            <CharacterOffsetBegin>150</CharacterOffsetBegin>
            <CharacterOffsetEnd>154</CharacterOffsetEnd>
            <POS>VB</POS>
          </token>
          <token id="5">
            <word>safe</word>
            <lemma>safe</lemma>
            <CharacterOffsetBegin>155</CharacterOffsetBegin>
            <CharacterOffsetEnd>159</CharacterOffsetEnd>
            <POS>JJ</POS>
          </token>
          <token id="6">
            <word>where</word>
            <lemma>where</lemma>
            <CharacterOffsetBegin>160</CharacterOffsetBegin>
            <CharacterOffsetEnd>165</CharacterOffsetEnd>
            <POS>WRB</POS>
          </token>
          <token id="7">
            <word>you</word>
            <lemma>you</lemma>
            <CharacterOffsetBegin>166</CharacterOffsetBegin>
            <CharacterOffsetEnd>169</CharacterOffsetEnd>
            <POS>PRP</POS>
          </token>
          <token id="8">
            <word>are</word>
            <lemma>be</lemma>
            <CharacterOffsetBegin>170</CharacterOffsetBegin>
            <CharacterOffsetEnd>173</CharacterOffsetEnd>
            <POS>VBP</POS>
          </token>
          <token id="9">
            <word>and</word>
            <lemma>and</lemma>
            <CharacterOffsetBegin>174</CharacterOffsetBegin>
            <CharacterOffsetEnd>177</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="10">
            <word>not</word>
            <lemma>not</lemma>
            <CharacterOffsetBegin>178</CharacterOffsetBegin>
            <CharacterOffsetEnd>181</CharacterOffsetEnd>
            <POS>RB</POS>
          </token>
          <token id="11">
            <word>come</word>
            <lemma>come</lemma>
            <CharacterOffsetBegin>182</CharacterOffsetBegin>
            <CharacterOffsetEnd>186</CharacterOffsetEnd>
            <POS>VB</POS>
          </token>
          <token id="12">
            <word>near</word>
            <lemma>near</lemma>
            <CharacterOffsetBegin>187</CharacterOffsetBegin>
            <CharacterOffsetEnd>191</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="13">
            <word>campus</word>
            <lemma>campus</lemma>
            <CharacterOffsetBegin>192</CharacterOffsetBegin>
            <CharacterOffsetEnd>198</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (NP (JJ official) (NNS instructions)) (VP (TO to) (VP (VB stay) (ADJP (JJ safe)) (SBAR (WHADVP (WRB where)) (S (NP (PRP you)) (VP (VP (VBP are)) (CC and) (VP (RB not) (VB come) (PP (IN near) (NP (NN campus))))))))))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="5">safe</dependent>
          </dep>
          <dep type="amod">
            <governor idx="2">instructions</governor>
            <dependent idx="1">official</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="5">safe</governor>
            <dependent idx="2">instructions</dependent>
          </dep>
          <dep type="aux">
            <governor idx="5">safe</governor>
            <dependent idx="3">to</dependent>
          </dep>
          <dep type="cop">
            <governor idx="5">safe</governor>
            <dependent idx="4">stay</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="8">are</governor>
            <dependent idx="6">where</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="8">are</governor>
            <dependent idx="7">you</dependent>
          </dep>
          <dep type="advcl">
            <governor idx="5">safe</governor>
            <dependent idx="8">are</dependent>
          </dep>
          <dep type="cc">
            <governor idx="8">are</governor>
            <dependent idx="9">and</dependent>
          </dep>
          <dep type="neg">
            <governor idx="11">come</governor>
            <dependent idx="10">not</dependent>
          </dep>
          <dep type="conj">
            <governor idx="8">are</governor>
            <dependent idx="11">come</dependent>
          </dep>
          <dep type="prep">
            <governor idx="11">come</governor>
            <dependent idx="12">near</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="12">near</governor>
            <dependent idx="13">campus</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="5">safe</dependent>
          </dep>
          <dep type="amod">
            <governor idx="2">instructions</governor>
            <dependent idx="1">official</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="5">safe</governor>
            <dependent idx="2">instructions</dependent>
          </dep>
          <dep type="aux">
            <governor idx="5">safe</governor>
            <dependent idx="3">to</dependent>
          </dep>
          <dep type="cop">
            <governor idx="5">safe</governor>
            <dependent idx="4">stay</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="8">are</governor>
            <dependent idx="6">where</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="8">are</governor>
            <dependent idx="7">you</dependent>
          </dep>
          <dep type="advcl">
            <governor idx="5">safe</governor>
            <dependent idx="8">are</dependent>
          </dep>
          <dep type="neg">
            <governor idx="11">come</governor>
            <dependent idx="10">not</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="8">are</governor>
            <dependent idx="11">come</dependent>
          </dep>
          <dep type="prep_near">
            <governor idx="11">come</governor>
            <dependent idx="13">campus</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="5">safe</dependent>
          </dep>
          <dep type="amod">
            <governor idx="2">instructions</governor>
            <dependent idx="1">official</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="5">safe</governor>
            <dependent idx="2">instructions</dependent>
          </dep>
          <dep type="aux">
            <governor idx="5">safe</governor>
            <dependent idx="3">to</dependent>
          </dep>
          <dep type="cop">
            <governor idx="5">safe</governor>
            <dependent idx="4">stay</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="8">are</governor>
            <dependent idx="6">where</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="8">are</governor>
            <dependent idx="7">you</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="11">come</governor>
            <dependent idx="7">you</dependent>
          </dep>
          <dep type="advcl">
            <governor idx="5">safe</governor>
            <dependent idx="8">are</dependent>
          </dep>
          <dep type="neg">
            <governor idx="11">come</governor>
            <dependent idx="10">not</dependent>
          </dep>
          <dep type="advcl">
            <governor idx="5">safe</governor>
            <dependent idx="11">come</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="8">are</governor>
            <dependent idx="11">come</dependent>
          </dep>
          <dep type="prep_near">
            <governor idx="11">come</governor>
            <dependent idx="13">campus</dependent>
          </dep>
        </dependencies>
      </sentence>
    </sentences>
  </document>
</root>


text:
import wx
import wx.lib.ogl as ogl

class Dialog_text_edit(wx.Dialog):

	def __init__(self, parent, title):
		super(Dialog_text_edit, self).__init__(parent, title=title,size=(240,200))
		self.parent = parent

		self.texto = wx.TextCtrl( self, wx.ID_ANY, style=wx.TE_MULTILINE , size=(220,120), pos=(10,10))

		aceptar = wx.Button( self, wx.ID_ANY, u"Aceptar",pos=(10,140))

		aceptar.Bind(wx.EVT_BUTTON,self.text)

		self.label_content()

	def text(self,evt):
		r = self.texto.GetValue()

		self.parent.modify_label(r,10,self.type_shape)
		self.Destroy()

	def label_content(self):
		id_shape = self.parent.shape_selected.GetId()
		self.type_shape = ''
		for data in self.parent.diccionary_shapes_info:
			if data[1] == id_shape:
				self.texto.SetValue(str(data[3]))
				type_shape = str(data[2])


text:
var request = require('request');
//CREATE ROOM
exports.createRoom = function() {
    return new Promise(function(resolve, reject) {
        var options = {
            method: 'POST',
            url: 'http://localhost:8080/api/room/create'
        }
        request(options, function(error, response, body) {
            if (error) {
                reject(error)
            } else {
                resolve(body);
            }
        });
    });
}
//CREATE USER
exports.createUser = function(alias) {
    return new Promise(function(resolve, reject) {
        var options = {
            method: 'POST',
            url: 'http://localhost:8080/api/user/create',
            headers: {
                'content-type': 'application/json'
            },
            body: {
                alias: alias ? alias : 'JOE SCHMOE'
            },
            json: true
        };
        request(options, function(error, response, body) {
            if (error) {
                reject(error)
            } else {
                resolve(JSON.stringify(body));
            }
        });
    });
}
// //JOIN ROOM
exports.joinRoom = function(roomId, userId) {
    return new Promise(function(resolve, reject) {
        var options = {
            method: 'PATCH',
            url: 'http://localhost:8080/api/room/' + roomId,
            headers: {
                'content-type': 'application/json',
                'user-id': userId
            },
            body: {
                action: 'JOIN'
            },
            json: true
        };
        request(options, function(error, response, body) {
            if (error) {
                reject(error)
            } else {
                resolve(JSON.stringify(body));
            }
        });
    });
}

//GET ROOM
exports.getRoom = function(roomId) {
    return new Promise(function(resolve, reject) {
        var options = {
            method: 'GET',
            url: 'http://localhost:8080/api/room/' + roomId
        }
        request(options, function(error, response, body) {
            if (error) {
                reject(error)
            } else {
                resolve(body);
            }
        });
    });
}