text:
/* line 8, ../../sass/resume/style.scss */
header {
  background-color: #B8C1CC;
  color: #333631;
}
/* line 12, ../../sass/resume/style.scss */
header .decorative {
  background-color: #44697d;
  height: 35px;
  border-bottom: 1px solid #CCC;
}
/* line 18, ../../sass/resume/style.scss */
header .name {
  font-size: 3.5em;
  font-family: "Segoe UI Light", RobotoThin, Helvetica Neue, Segoe WP, sans-serif;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(68, 105, 125, 0.6);
  text-rendering: optimizeLegibility;
  margin: 10px 0 10px 0;
  white-space: nowrap;
}
/* line 28, ../../sass/resume/style.scss */
header .img {
  float: right;
  margin-top: -27px;
  width: 32px;
  height: 32px;
  opacity: .8;
  cursor: pointer;
}
/* line 35, ../../sass/resume/style.scss */
header .img:hover {
  opacity: 1;
}
/* line 39, ../../sass/resume/style.scss */
header .img.pdf {
  background: url(../images/file_icon_pdf.png) no-repeat;
  margin-right: 30px;
}
/* line 44, ../../sass/resume/style.scss */
header .img.doc {
  background: url(../images/file_icon_doc.png) no-repeat;
  margin-right: 5px;
}
@media print {
  /* line 28, ../../sass/resume/style.scss */
  header .img {
    display: none;
  }
}
/* line 54, ../../sass/resume/style.scss */
header p.summary {
  padding-top: 10px;
}
@media only screen and (min-width: 380px) {
  /* line 59, ../../sass/resume/style.scss */
  header .img {
    margin-top: 25px;
  }
}
@media only screen and (min-width: 768px) {
  /* line 65, ../../sass/resume/style.scss */
  header p.summary {
    padding-top: 0;
  }
}
@media only screen and (min-width: 1280px) {
  /* line 72, ../../sass/resume/style.scss */
  header p.summary span {
    text-decoration: underline;
    cursor: pointer;
    color: #44697d;
  }
  /* line 77, ../../sass/resume/style.scss */
  header p.summary span:hover {
    color: #000;
  }
}
/* line 84, ../../sass/resume/style.scss */
header .subheaders {
  padding-top: 3px;
}
/* line 86, ../../sass/resume/style.scss */
header .subheaders a {
  text-decoration: none;
  color: #333631;
}
/* line 90, ../../sass/resume/style.scss */
header .subheaders strong {
  font-family: "Segoe UI SemiBold", RobotoBold, Helvetica Neue, Segoe WP, sans-serif;
  font-weight: normal;
}

/* line 97, ../../sass/resume/style.scss */
footer {
  background-color: #B8C1CC;
}
/* line 100, ../../sass/resume/style.scss */
footer.expanded {
  margin-top: 20px;
}

@media only screen and (min-width: 768px) {
  /* line 106, ../../sass/resume/style.scss */
  section.leftside {
    text-align: right;
  }

  /* line 110, ../../sass/resume/style.scss */
  DIV.job {
    margin-top: 20px;
  }
}
/* line 117, ../../sass/resume/style.scss */
DIV.row.title + DIV.row.job {
  margin-top: 4px;
}

/* line 121, ../../sass/resume/style.scss */
DIV.row.title {
  margin-top: 1px;
}

/* line 126, ../../sass/resume/style.scss */
SECTION.workexperience strong {
  color: #B8C1CC;
  font-size: xx-large;
  white-space: nowrap;
}

/* line 136, ../../sass/resume/style.scss */
SECTION.skills strong {
  color: #FFF;
  font-size: xx-large;
  white-space: nowrap;
}

/* line 143, ../../sass/resume/style.scss */
section.leftside {
  line-height: 1.3em;
}

/* line 147, ../../sass/resume/style.scss */
DIV.companylogo {
  -webkit-border-radius: 4px;
  border: 1px solid #DDD;
  width: 150px;
  height: 100px;
  margin-top: 4px;
  margin-bottom: 4px;
}
@media print {
  /* line 147, ../../sass/resume/style.scss */
  DIV.companylogo {
    display: none;
  }
}
@media only screen and (min-width: 768px) {
  /* line 147, ../../sass/resume/style.scss */
  DIV.companylogo {
    float: right;
    margin-top: 30px;
    margin-bottom: 0;
  }
}
/* line 165, ../../sass/resume/style.scss */
DIV.companylogo DIV.sprite {
  background-image: url(../images/logosprite.png);
  background-repeat: no-repeat;
  margin-left: auto;
  margin-right: auto;
}
/* line 172, ../../sass/resume/style.scss */
DIV.companylogo .sprite-boalogo {
  background-position: 0 0;
  width: 140px;
  height: 41px;
  margin-top: 30px;
}
/* line 173, ../../sass/resume/style.scss */
DIV.companylogo .sprite-camc {
  background-position: 0 -46px;
  width: 87px;
  height: 85px;
  margin-top: 9px;
}
/* line 174, ../../sass/resume/style.scss */
DIV.companylogo .sprite-canadalogo {
  background-position: 0 -136px;
  width: 140px;
  height: 44px;
  margin-top: 26px;
}
/* line 175, ../../sass/resume/style.scss */
DIV.companylogo .sprite-simplesheets {
  background-position: 0 -185px;
  width: 140px;
  height: 45px;
  margin-top: 24px;
}

/* line 180, ../../sass/resume/style.scss */
.experience .companyname {
  padding-bottom: 3px;
}
/* line 181, ../../sass/resume/style.scss */
.experience .companyname span.name {
  font-family: "Segoe UI Light", RobotoThin, Helvetica Neue, Segoe WP, sans-serif;
  font-size: 1.5em;
  color: #44697d;
}
/* line 191, ../../sass/resume/style.scss */
.experience .companyinfo {
  color: #666;
  font-size: smaller;
}
/* line 196, ../../sass/resume/style.scss */
.experience .positioninfo {
  margin-top: 20px;
}
/* line 199, ../../sass/resume/style.scss */
.experience .positioninfo .info {
  font-family: "Segoe UI Light", RobotoThin, Helvetica Neue, Segoe WP, sans-serif;
  color: #44697d;
  font-size: 1.5em;
}
/* line 205, ../../sass/resume/style.scss */
.experience .positioninfo .dates span {
  display: inline-block;
  padding: 2px 4px;
  margin-top: 2px;
  white-space: nowrap;
  border-radius: 3px;
  background-color: #EEE;
  height: 1.2em;
  min-width: 75px;
  font-size: .8em;
}
/* line 219, ../../sass/resume/style.scss */
.experience .positioninfo p, .experience .positioninfo li {
  line-height: 1.5em;
  font-size: smaller;
}
/* line 220, ../../sass/resume/style.scss */
.experience .positioninfo p:first-child, .experience .positioninfo li:first-child {
  padding-top: 5px;
}
/* line 230, ../../sass/resume/style.scss */
.experience .positioninfo .skills span {
  display: inline-block;
  padding: 2px 4px;
  font-size: 11.844px;
  line-height: 14px;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  border-radius: 3px;
}
/* line 240, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.blue {
  background-color: #1e8cbe;
}
/* line 244, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.green {
  background-color: #88b131;
}
/* line 248, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.lightgreen {
  background-color: #92d13d;
}
/* line 252, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.darkgreen {
  background-color: #698925;
}
/* line 256, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.orange {
  background-color: #e97b00;
}
/* line 260, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.darkorange {
  background-color: #e8590a;
}
/* line 264, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.lightblue {
  background-color: #62A9E3;
}
/* line 268, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.red {
  background-color: #f14e32;
}
/* line 272, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.darkblue {
  background-color: #044a64;
}
/* line 276, ../../sass/resume/style.scss */
.experience .positioninfo .skills span.grey {
  background-color: #616161;
}

/* line 284, ../../sass/resume/style.scss */
.defaulthidden {
  display: none;
}
@media print {
  /* line 284, ../../sass/resume/style.scss */
  .defaulthidden {
    display: block;
  }
}

/* line 292, ../../sass/resume/style.scss */
ul {
  list-style-image: url("../images/bulletblue.png");
}
@media print {
  /* line 292, ../../sass/resume/style.scss */
  ul {
    margin-left: 10px;
  }
}

/* line 300, ../../sass/resume/style.scss */
.expanderbar {
  background-color: #44697d;
  height: 2.7em;
  color: #FFF;
  margin-top: 10px;
  cursor: pointer;
}
/* line 308, ../../sass/resume/style.scss */
.expanderbar span.expandtext {
  position: absolute;
  line-height: 1em;
  font-size: 3em;
  font-family: "Segoe UI SemiBold", RobotoBold, Helvetica Neue, Segoe WP, sans-serif;
}
/* line 315, ../../sass/resume/style.scss */
.expanderbar span.arrow {
  visibility: hidden;
  font-size: 30px;
  padding-left: 5px;
}
/* line 321, ../../sass/resume/style.scss */
.expanderbar:hover span.arrow {
  visibility: visible;
}
@media print {
  /* line 300, ../../sass/resume/style.scss */
  .expanderbar {
    display: none;
  }
}

/* line 332, ../../sass/resume/style.scss */
.softwareexperience .category span {
  font-family: "Segoe UI SemiBold", RobotoBold, Helvetica Neue, Segoe WP, sans-serif;
  color: #44697d;
  font-size: larger;
}
/* line 338, ../../sass/resume/style.scss */
.softwareexperience .category i {
  margin-top: 10px;
  display: inline-block;
  color: #FFF;
  font-size: larger;
  font-style: normal;
}

/* line 348, ../../sass/resume/style.scss */
.mobilesize {
  width: 550px;
  height: 724px;
  margin: 0 auto;
}

/* line 357, ../../sass/resume/style.scss */
.row.debug .column,
.row.debug .columns {
  border: 1px solid #666;
}


text:
FROM ubuntu:bionic

MAINTAINER S Roychowdhury <sroycode@gmail.com>

ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8

RUN apt-get -y update -qq && \
    apt-get -y install locales apt-utils software-properties-common && \
    locale-gen en_US.UTF-8 && \
    update-locale LANG=en_US.UTF-8 && \
    add-apt-repository ppa:exonum/rocksdb && \
    add-apt-repository ppa:maarten-fonville/protobuf && \
    add-apt-repository ppa:xapian-backports/ppa && \
    apt-get update -y -qq && \
    apt-get install -y \
    --no-install-recommends \
    git wget ccache cmake make libtool pkg-config g++ gcc autoconf automake curl jq lcov \
    protobuf-compiler vim-common libboost-all-dev libboost-all-dev \
    libcurl4-openssl-dev zlib1g-dev liblz4-dev libprotobuf-dev \
    libgoogle-glog-dev libgflags-dev libgoogle-perftools-dev libsnappy-dev libbz2-dev libz-dev libctemplate-dev \
    libtbb-dev libzstd-dev libsodium-dev libosmium-dev librocksdb-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    rm -rf /tmp/* /var/tmp/*

WORKDIR /app

#ENV MVERSION devel
ENV MVERSION v0.52

RUN git clone https://github.com/sroycode/identt.git \
	&& cd identt \
	&& git checkout ${MVERSION} \
	&& mkdir -p build templates \
	&& cd build \
	&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && make install

COPY identt.conf /usr/local/etc/identt.conf
COPY run_identt.sh /usr/local/bin/run_identt.sh

EXPOSE 9091
EXPOSE 9092

redpajama_set_name: RedPajamaGithub


text:
package org.apache.commons.functor.adapter;

import java.io.Serializable;

import org.apache.commons.functor.BinaryProcedure;
import org.apache.commons.functor.Procedure;
import org.apache.commons.lang3.Validate;

/**
 * Adapts a
 * {@link BinaryProcedure BinaryProcedure}
 * to the
 * {@link Procedure Procedure} interface
 * using a constant left-side argument.
 *

 * Note that although this class implements
 * {@link Serializable}, a given instance will
 * only be truly Serializable if the
 * underlying objects are.  Attempts to serialize
 * an instance whose delegates are not
 * Serializable will result in an exception.
 *
 * @param  the argument type.
 * @version $Revision: 1508677 $ $Date: 2013-07-30 19:48:02 -0300 (Tue, 30 Jul 2013) $
 */
public final class RightBoundProcedure implements Procedure, Serializable {
    /**
     * serialVersionUID declaration.
     */
    private static final long serialVersionUID = 3267188080481758226L;
    /** The {@link BinaryProcedure BinaryProcedure} I'm wrapping. */
    private final BinaryProcedure<? super A, Object> procedure;
    /** The parameter to pass to {@code procedure}. */
    private final Object param;

    /**
     * Create a new RightBoundProcedure.
     * @param <R> bound arg type
     * @param procedure the procedure to adapt
     * @param arg the constant argument to use
     */
    @SuppressWarnings("unchecked")
    public <R> RightBoundProcedure(BinaryProcedure<? super A, ? super R> procedure, R arg) {
        this.procedure =
            (BinaryProcedure<? super A, Object>) Validate.notNull(procedure,
                "BinaryProcedure argument was null");
        this.param = arg;
    }

    /**
     * {@inheritDoc}
     */
    public void run(A obj) {
        procedure.run(obj, param);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object that) {
        return that == this || (that instanceof RightBoundProcedure<?> && equals((RightBoundProcedure<?>) that));
    }

    /**
     * Learn whether another RightBoundProcedure is equal to this.
     * @param that RightBoundProcedure to test
     * @return boolean
     */
    public boolean equals(RightBoundProcedure<?> that) {
        return null != that
                && procedure.equals(that.procedure)
                && (null == param ? null == that.param : param.equals(that.param));
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int hash = "RightBoundProcedure".hashCode();
        hash <<= 2;
        hash ^= procedure.hashCode();
        if (null != param) {
            hash <<= 2;
            hash ^= param.hashCode();
        }
        return hash;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return "RightBoundProcedure<" + procedure + "(?," + param + ")>";
    }

    /**
     * Get a Procedure from procedure.
     * @param <L> the left argument type.
     * @param <R> the right argument type.
     * @param procedure to adapt
     * @param arg right side argument
     * @return RightBoundProcedure
     */
    public static <L, R> RightBoundProcedure<L> bind(BinaryProcedure<? super L, ? super R> procedure, R arg) {
        return null == procedure ? null : new RightBoundProcedure<L>(procedure, arg);
    }

}


text:
import mock
import completor
import re

from completers.common import Omni  # noqa
from completor.compat import to_unicode

def test_has_omnifunc(vim_mod):
    vim_mod.vars = {
        'completor_css_omni_trigger': br'([\w-]+|@[\w-]*|[\w-]+:\s*[\w-]*)$'
    }
    vim_mod.current.buffer.options['omnifunc'] = b''

    omni = completor.get('omni')
    assert omni.has_omnifunc('css') is False

    omni.trigger_cache = {}
    vim_mod.current.buffer.options['omnifunc'] = b'csscomplete#CompleteCSS'
    assert omni.has_omnifunc('css') is True

def test_on_data(vim_mod):
    omnifunc = mock.Mock()

    vim_mod.current.buffer.options['omnifunc'] = b'csscomplete#CompleteCSS'
    vim_mod.funcs[b'csscomplete#CompleteCSS'] = omnifunc
    vim_mod.current.window.cursor = (1, 2)
    vim_mod.buffers = []

    omni = completor.get('omni')
    omni.trigger_cache = {}
    omni.ft = 'css'

    assert omni.on_data(b'complete', b'text') == []

    omni.trigger_cache = {
        'css': re.compile(r'([\w-]+|@[\w-]*|[\w-]+:\s*[\w-]*)$', re.X | re.U)}

    omnifunc.side_effect = [1, [b'text-transform']]
    assert omni.on_data(b'complete', b'#') == []

    omnifunc.side_effect = [0, [b'text-transform']]
    vim_mod.current.window.cursor = (1, 2)
    omni.input_data = 'text'
    assert omni.on_data(b'complete', b'text') == [ {'word': b'text-transform', 'offset': 0}]  # noqa
    omnifunc.assert_called_with(0, b'text')

    omnifunc.side_effect = [17, [b'text-transform']]
    vim_mod.current.window.cursor = (1, 2)
    omni.input_data = to_unicode('które się nią opiekują', 'utf-8')
    omni.on_data(b'complete', omni.input_data)
    omnifunc.assert_called_with(0, b'opiekuj\xc4\x85')


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

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

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
This directory (examples) contains some example configuration files
for different components.

The files are

 * aurora_scheduler.yaml
   - this contains the configuration for aurora scheduler

 * heron_internals.yaml
   - this file contains several configuration elements that govern heron behavior

 * local_scheduler.yaml
   - this file contains the configuration for a local scheduler

 * localfs_statemgr.yaml
   - this file contains the configuration of a local file system state manager

 * localfs_uploader.yaml
   - this file contains the configuration of a local file system uploader

 * metrics_sinks.yaml
   - this file contains the configuration of sinks for several metrics collection

 * roundrobin_packing.yaml
   - this file contains the configuration for a round robin packing algorithm

 * local_stateful.yaml
   - this file contains the configuration for a local file system stateful storage


text:
<!DOCTYPE HTML>

<title>TeamGear Bootstarp Website Template | Checkout :: w3layouts</title>
<link href="web/css/bootstrap.css" rel='stylesheet' type='text/css' />

<link href="web/css/style.css" rel='stylesheet' type='text/css' />

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

<link href='http://fonts.googleapis.com/css?family=Open+Sans:100,200,300,400,500,600,700,800,900' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,400,500,600,700,800,900' rel='stylesheet' type='text/css'>

				  <form>
					 <input class="sb-search-input" placeholder="Enter your search term..." type="search" name="search" id="search">
					 <input class="sb-search-submit" type="submit" value="">

				  </form>

Shop by Product

Shop by Sport

Account
 |

Contact
 |

Checkout
 |

Log In
 |

Sign Up

Shopping Cart:  0 item(s)    $0.00

Shopping cart is empty

Shopping cart is empty

You have no items in your shopping cart.
Click here to continue shopping

Customer Service

Help & Contact

Shipping & taxes

Return policy

Careers

Affiliates

Legal Notice

Information

New products

Top sellers

Specials products

Manufacurers

Suppliers

Our Stores

My Account

My account

Personal Information

Addresses

Discount

Orders history

Your vouchers

Follow Us

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt

Subscribe to our Newsletter

					<form>
						<input type="text" value="Your Email Address" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Your Email Address';}">
						<input type="submit" value="Go">
					</form>

Call Team
Dragon Motorsports

1.800.123.4568

© 2014 Template by  w3layouts


text:
module QualtricsAPI
  class QuestionCollection < BaseCollection
    def [](survey_id, question_id)
      find(survey_id, question_id)
    end

    def find(survey_id, question_id)
      response = QualtricsAPI.connection(self).get(endpoint(survey_id, question_id))
      return nil unless response.status == 200
      build_result(response.body['result']).propagate_connection(self)
    end

    def each(survey_id)
      page = each_page(survey_id)
      page.each do |element|
        yield element
      end
    end

    def each_page(survey_id)
      endpoint = list_endpoint(survey_id)
      response = QualtricsAPI.connection(self).get(endpoint)
      parse_page(response)
    end

    protected

    def page_endpoint(fetched)
      raise NotSupported
    end

    private

    def build_result(element)
      QualtricsAPI::Question.new(element)
    end

    def list_endpoint(survey_id)
      "survey-definitions/#{survey_id}/questions"
    end

    def endpoint(survey_id, question_id)
      "survey-definitions/#{survey_id}/questions/#{question_id}"
    end
  end
end


text:
'''

New Integration Test for creating KVM VM with console type is vnc.
the global value is spice and spiceStreamingMode is all

@author: ye.tian
'''

import zstackwoodpecker.test_util as test_util
import test_stub
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.operations.config_operations as conf_ops

_config_ = {
        'timeout' : 360,
        'noparallel' : False
        }

vm = None
default_mode = None

def test():
    global vm
    global default_mode
    global default_mode1
    default_mode = conf_ops.change_global_config('mevoco', 'vm.consoleMode', 'spice')
    default_mode1 = conf_ops.change_global_config('vm', 'spiceStreamingMode', 'all')
    vm = test_stub.create_spice_vm()
    vm.check()

    vm_inv=vm.get_vm()
    vm_uuid=vm_inv.uuid
    vm_state = vm.get_vm().state
    host_inv = test_lib.lib_find_host_by_vm(vm_inv)
    host_ip= host_inv.managementIp
    host_username=host_inv.username
    host_password=host_inv.password

    test_util.test_dsc('check the vm console protocol is spice via read xml')
    cmd='''virsh dumpxml %s |grep spice | grep -v spicevmc | grep -v com.redhat.spice.0 |awk  '{print $2}' |awk -F= '{print $2}' '''% (vm_uuid)
    result=test_lib.lib_execute_ssh_cmd(host_ip, host_username, host_password, cmd, 180)
    if eval(result) == "spice" :
	print "Vm console protocol is spice, test success"
    else :
	print "Vm console protocol is %s " % eval(result)
	print "test is fail"
        test_util.test_fail('Create VM with spice Test Failed')

    test_util.test_dsc('check the spiceStreamingMode is all via read xml')
    cmd='''virsh dumpxml %s |grep streaming|awk -F/ '{print $1}' |awk -F= '{print $2}' '''% (vm_uuid)
    result=test_lib.lib_execute_ssh_cmd(host_ip, host_username, host_password, cmd, 180)
    if eval(result) == "all" :
	print "Vm spiceStreamingMode is all, test success"
    else :
	print "Vm spiceStreamingModeis %s " % eval(result)
	print "test is fail"
        test_util.test_fail('Create VM with spice and spiceStreamingMode is all Test Failed')

    vm.destroy()
    vm.check()
    test_util.test_pass('Create VM with spice and spiceStreamingMode is all Test Success')

#Will be called only if exception happens in test().
def error_cleanup():
    global vm
    if vm:
        vm.destroy()


text:
"""
qm9 dataset loader.
"""
import os
import deepchem as dc
from deepchem.molnet.load_function.molnet_loader import TransformerGenerator, _MolnetLoader
from deepchem.data import Dataset
from typing import List, Optional, Tuple, Union

GDB9_URL = "https://deepchemdata.s3-us-west-1.amazonaws.com/datasets/gdb9.tar.gz"
QM9_CSV_URL = "https://deepchemdata.s3-us-west-1.amazonaws.com/datasets/qm9.csv"
QM9_TASKS = [
    "mu", "alpha", "homo", "lumo", "gap", "r2", "zpve", "cv", "u0", "u298",
    "h298", "g298"
]

class _QM9Loader(_MolnetLoader):

  def create_dataset(self) -> Dataset:
    dataset_file = os.path.join(self.data_dir, "gdb9.sdf")
    if not os.path.exists(dataset_file):
      dc.utils.data_utils.download_url(url=GDB9_URL, dest_dir=self.data_dir)
      dc.utils.data_utils.untargz_file(
          os.path.join(self.data_dir, "gdb9.tar.gz"), self.data_dir)
    loader = dc.data.SDFLoader(tasks=self.tasks,
                               featurizer=self.featurizer,
                               sanitize=True)
    return loader.create_dataset(dataset_file, shard_size=4096)

def load_qm9(
    featurizer: Union[dc.feat.Featurizer, str] = dc.feat.CoulombMatrix(29),
    splitter: Union[dc.splits.Splitter, str, None] = 'random',
    transformers: List[Union[TransformerGenerator, str]] = ['normalization'],
    reload: bool = True,
    data_dir: Optional[str] = None,
    save_dir: Optional[str] = None,
    **kwargs
) -> Tuple[List[str], Tuple[Dataset, ...], List[dc.trans.Transformer]]:
  """Load QM9 dataset

  QM9 is a comprehensive dataset that provides geometric, energetic,
  electronic and thermodynamic properties for a subset of GDB-17
  database, comprising 134 thousand stable organic molecules with up
  to 9 heavy atoms.  All molecules are modeled using density
  functional theory (B3LYP/6-31G(2df,p) based DFT).

  Random splitting is recommended for this dataset.

  The source data contain:

  - qm9.sdf: molecular structures
  - qm9.sdf.csv: tables for molecular properties

    - "mol_id" - Molecule ID (gdb9 index) mapping to the .sdf file
    - "A" - Rotational constant (unit: GHz)
    - "B" - Rotational constant (unit: GHz)
    - "C" - Rotational constant (unit: GHz)
    - "mu" - Dipole moment (unit: D)
    - "alpha" - Isotropic polarizability (unit: Bohr^3)
    - "homo" - Highest occupied molecular orbital energy (unit: Hartree)
    - "lumo" - Lowest unoccupied molecular orbital energy (unit: Hartree)
    - "gap" - Gap between HOMO and LUMO (unit: Hartree)
    - "r2" - Electronic spatial extent (unit: Bohr^2)
    - "zpve" - Zero point vibrational energy (unit: Hartree)
    - "u0" - Internal energy at 0K (unit: Hartree)
    - "u298" - Internal energy at 298.15K (unit: Hartree)
    - "h298" - Enthalpy at 298.15K (unit: Hartree)
    - "g298" - Free energy at 298.15K (unit: Hartree)
    - "cv" - Heat capavity at 298.15K (unit: cal/(mol*K))
    - "u0_atom" - Atomization energy at 0K (unit: kcal/mol)
    - "u298_atom" - Atomization energy at 298.15K (unit: kcal/mol)
    - "h298_atom" - Atomization enthalpy at 298.15K (unit: kcal/mol)
    - "g298_atom" - Atomization free energy at 298.15K (unit: kcal/mol)

  "u0_atom" ~ "g298_atom" (used in MoleculeNet) are calculated from the
  differences between "u0" ~ "g298" and sum of reference energies of all
  atoms in the molecules, as given in
  https://figshare.com/articles/Atomref%3A_Reference_thermochemical_energies_of_H%2C_C%2C_N%2C_O%2C_F_atoms./1057643

  Parameters
  ----------
  featurizer: Featurizer or str
    the featurizer to use for processing the data.  Alternatively you can pass
    one of the names from dc.molnet.featurizers as a shortcut.
  splitter: Splitter or str
    the splitter to use for splitting the data into training, validation, and
    test sets.  Alternatively you can pass one of the names from
    dc.molnet.splitters as a shortcut.  If this is None, all the data
    will be included in a single dataset.
  transformers: list of TransformerGenerators or strings
    the Transformers to apply to the data.  Each one is specified by a
    TransformerGenerator or, as a shortcut, one of the names from
    dc.molnet.transformers.
  reload: bool
    if True, the first call for a particular featurizer and splitter will cache
    the datasets to disk, and subsequent calls will reload the cached datasets.
  data_dir: str
    a directory to save the raw data in
  save_dir: str
    a directory to save the dataset in

  Note
  ----
  DeepChem 2.4.0 has turned on sanitization for this dataset by
  default.  For the QM9 dataset, this means that calling this
  function will return 132480 compounds instead of 133885 in the
  source dataset file. This appears to be due to valence
  specification mismatches in the dataset that weren't caught in
  earlier more lax versions of RDKit. Note that this may subtly
  affect benchmarking results on this dataset.

  References
  ----------
  .. [1] Blum, Lorenz C., and Jean-Louis Reymond. "970 million druglike small
     molecules for virtual screening in the chemical universe database GDB-13."
     Journal of the American Chemical Society 131.25 (2009): 8732-8733.
  .. [2] Ramakrishnan, Raghunathan, et al. "Quantum chemistry structures and
     properties of 134 kilo molecules." Scientific data 1 (2014): 140022.
  """
  loader = _QM9Loader(featurizer, splitter, transformers, QM9_TASKS, data_dir,
                      save_dir, **kwargs)
  return loader.load_dataset('qm9', reload)


text:
package com.dolphinmum.Model;

import com.dolphinmum.web.db.model.T_category_score_type;
import com.dolphinmum.web.db.model.T_category_score_type_standard;

import java.util.List;

/**
 * Created by meajhlp on 15/5/5.
 * 类目评分点详情
 */
public class CategoryScoreTypeDetail {

    private T_category_score_type category_score_type;
    private List<T_category_score_type_standard> score_type_standardList;

    public T_category_score_type getCategory_score_type() {
        return category_score_type;
    }

    public void setCategory_score_type(T_category_score_type category_score_type) {
        this.category_score_type = category_score_type;
    }

    public List<T_category_score_type_standard> getScore_type_standardList() {
        return score_type_standardList;
    }

    public void setScore_type_standardList(List<T_category_score_type_standard> score_type_standardList) {
        this.score_type_standardList = score_type_standardList;
    }
}


text:
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Routing;
using Owin;
using Xunit;
using Xunit.Extensions;

namespace Microsoft.Owin.Host.IntegrationTests
{
    public class SystemWebIntegrationTests : TestBase
    {
        public void ModuleAndHandlerEnvKeys(IAppBuilder app)
        {
            app.UseErrorPage();
            app.Use(async (context, next) =>
            {
                context.Set("test.IntegratedPipleine", "before");
                await next();
                Assert.Equal("after", context.Get<string>("test.IntegratedPipleine"));
            });

            RouteTable.Routes.MapOwinPath("/", app2 =>
            {
                app2.Run(context2 =>
                {
                    Assert.Equal("before", context2.Get<string>("test.IntegratedPipleine"));
                    context2.Set("test.IntegratedPipleine", "after");
                    return Task.FromResult(0);
                });
            });
        }

        [Theory]
        [InlineData("Microsoft.Owin.Host.SystemWeb")]
        public Task ModuleAndHandlerEnvKeys_SharedEnv(string serverName)
        {
            int port = RunWebServer(
                serverName,
                ModuleAndHandlerEnvKeys);

            return SendRequestAsync(port);
        }

        public void ExpectedKeys(IAppBuilder app)
        {
            app.UseErrorPage();
            app.Use((context, next) =>
            {
                var env = context.Environment;
                object ignored;
                Assert.True(env.TryGetValue("owin.RequestMethod", out ignored));
                Assert.Equal("GET", env["owin.RequestMethod"]);

                Assert.True(env.TryGetValue("owin.RequestPath", out ignored));
                Assert.Equal("/", env["owin.RequestPath"]);

                Assert.True(env.TryGetValue("owin.RequestPathBase", out ignored));
                Assert.Equal(string.Empty, env["owin.RequestPathBase"]);

                Assert.True(env.TryGetValue("owin.RequestProtocol", out ignored));
                Assert.Equal("HTTP/1.1", env["owin.RequestProtocol"]);

                Assert.True(env.TryGetValue("owin.RequestQueryString", out ignored));
                Assert.Equal(string.Empty, env["owin.RequestQueryString"]);

                Assert.True(env.TryGetValue("owin.RequestScheme", out ignored));
                Assert.Equal("http", env["owin.RequestScheme"]);

                Assert.True(env.TryGetValue("owin.Version", out ignored));
                Assert.Equal("1.0", env["owin.Version"]);

                Assert.True(env.TryGetValue("owin.RequestId", out ignored));
                Assert.False(string.IsNullOrWhiteSpace((string)env["owin.RequestId"]));

                return Task.FromResult(0);
            });
        }

        [Theory]
        [InlineData("Microsoft.Owin.Host.SystemWeb")]
        public Task ExpectedKeys_Present(string serverName)
        {
            int port = RunWebServer(
                serverName,
                ExpectedKeys);

            return SendRequestAsync(port);
        }

        public void ModuleAndHandlerSyncException(IAppBuilder app)
        {
            app.UseErrorPage();
            app.Use(async (context, next) =>
            {
                // Expect async exception from the handler.
                try
                {
                    await next();
                    Assert.True(false, "Handler exception expected");
                }
                catch (NotFiniteNumberException)
                {
                }
            });

            RouteTable.Routes.MapOwinPath("/", app2 =>
            {
                app2.Run(context2 =>
                {
                    // Sync exception should become async before module sees it.
                    throw new NotFiniteNumberException("Handler exception");
                });
            });
        }

        [Theory]
        [InlineData("Microsoft.Owin.Host.SystemWeb")]
        public Task ModuleAndHandlerSyncException_ModuleSeesHandlerException(string serverName)
        {
            int port = RunWebServer(
                serverName,
                ModuleAndHandlerSyncException);

            return SendRequestAsync(port);
        }

        public void ModuleAndHandlerAsyncException(IAppBuilder app)
        {
            app.UseErrorPage();
            app.Use(async (context, next) =>
            {
                try
                {
                    // Expect async exception from the handler.
                    await next();
                    Assert.True(false, "Handler exception expected");
                }
                catch (Exception ex)
                {
                    Assert.IsType<AggregateException>(ex);
                    Assert.IsType<NotFiniteNumberException>(ex.GetBaseException());
                }
            });

            RouteTable.Routes.MapOwinPath("/", app2 =>
            {
                app2.Run(context2 =>
                {
                    TaskCompletionSource<object> tcs = new TaskCompletionSource<object>();
                    tcs.TrySetException(new NotFiniteNumberException("Handler exception"));
                    return tcs.Task;
                });
            });
        }

        [Theory]
        [InlineData("Microsoft.Owin.Host.SystemWeb")]
        public Task ModuleAndHandlerAsyncException_ModuleSeesHandlerException(string serverName)
        {
            int port = RunWebServer(
                serverName,
                ModuleAndHandlerAsyncException);

            return SendRequestAsync(port);
        }

        private async Task SendRequestAsync(int port)
        {
            var client = new HttpClient();
            client.Timeout = TimeSpan.FromSeconds(5);
            var response = await client.GetAsync("http://localhost:" + port);
            Assert.Equal(String.Empty, await response.Content.ReadAsStringAsync());
            response.EnsureSuccessStatusCode();
        }
    }
}


text:
from __future__ import absolute_import, print_function, division

__author__ = 'Alistair Miles <alimanfoo@googlemail.com>'

import zipfile
from nose.tools import eq_

from petl.testutils import ieq
from petl.io.csv import fromcsv, tocsv, appendcsv, fromtsv, totsv
from petl.io.sources import StringSource, PopenSource, ZipSource

def test_stringsource():

    table1 = (('foo', 'bar'),
             ('a', '1'),
             ('b', '2'),
             ('c', '2'))

    # test writing to a string buffer
    ss = StringSource()
    tocsv(table1, ss)
    expect = "foo,bar\r\na,1\r\nb,2\r\nc,2\r\n"
    actual = ss.getvalue()
    eq_(expect, actual)

    # test reading from a string buffer
    table2 = fromcsv(StringSource(actual))
    ieq(table1, table2)
    ieq(table1, table2)

    # test appending
    appendcsv(table1, ss)
    actual = ss.getvalue()
    expect = "foo,bar\r\na,1\r\nb,2\r\nc,2\r\na,1\r\nb,2\r\nc,2\r\n"
    eq_(expect, actual)

def test_popensource():

    expect = (('foo', 'bar'),
              ('a', '1'))
    actual = fromcsv(PopenSource(r'echo -e foo bar\\na 1',
                                 shell=True,
                                 executable='/bin/bash'),
                     delimiter=' ')
    ieq(expect, actual)

def test_zipsource():

    # setup
    table = [('foo', 'bar'), ('a', '1'), ('b', '2')]
    totsv(table, 'tmp/issue_241.tsv')
    z = zipfile.ZipFile('tmp/issue_241.zip', mode='w')
    z.write('tmp/issue_241.tsv', 'data.tsv')
    z.close()

    # test
    actual = fromtsv(ZipSource('tmp/issue_241.zip', 'data.tsv'))
    ieq(table, actual)


text:
이 포스팅은 한국어, 영어로 적혀 있습니다. 위 셀렉트 박스에서 언어 설정이 가능합니다. 형편없는 영어 실력 양해 바랍니다.

This posting is written in both Korean, English. You can select language with 'select box', above this article. excuse my poor english.

---

## Project Synopsis
This project's goal is build service that provides bus location which user want to be notified, and notify it to user via push notification.

---

## Used/Referenced
1. [**React native**](http://facebook.github.io/react-native/) - facebook

facebook's mobile app dev framework. good for fast mobile app realization, and good performance!(compare with other 'hybrid app')

   1. [**React native Korean Tutorial**](https://www.gitbook.com/book/g6ling/react-native-tutorial-korean)
facebook's React native Doc is good enough, but this Tutorial doc is more comfortable for developer who uses korean in native.

   2. [**React native router flux**](https://github.com/aksonov/react-native-router-flux)

   Scene control

   3. [**React native beacons manager**](https://github.com/MacKentoch/react-native-beacons-manager)

   Beacon Listeners

   4. [**React native background timer**](https://github.com/ocetnik/react-native-background-timer)
Background timer for push notification

   5. [**React native push notification**](https://github.com/zo0r/react-native-push-notification)
mobile native(iOS, Android) push notification library

   6. [**React native Elements**](https://github.com/react-native-training/react-native-elements)
Awesome UI Library!

2. **Raspberry Pi** - School provides to us. old version.(no Wifi, no bluetooth, no gps.)

   1. **GPS module**
with external antenna.

   2. **Bluetooth Low Energy(BLE) module**
beacon broadcasting. we use iBeacon standard.

---

## Scene Flow
![](/img/BLE_Bus_Notifier/SceneFlow.png)

Scene Flow Pic

Scenes' transactions is like above. let me write details scene by scenes.

---

## Scenes

|     |     |     |
|=====
|  Scene 0    |  Scene 1      |   Scene  2
{: rules="groups"}

### Scene 0 - Beacon Ranging Scene
 First, 'Beacon Ranging Scene'. in this scene, app tries to detect bus' beacons. for find appropriate beacon, we use fixed `UUID`. if app detects **only one** suitable `UUID`, app automatically goes to Next Scene. when app finds **More than one** proper `UUID`, app shows list with Bus Number and its current location.(like above screenshot) I implement bus' number with iBeacon's `Major` value and bus' location with `Minor` value.

### Scene 1 - Bus Detail Scene ; Destination not set
 When app listens proper bus' beacon, app's beacon Listener add Major value to listen only one beacon. (so, UUID and Major value. e.g, *listening for beacon* `UUID`: **ABCDEFGH - EEEE - EEEE - EEEE - ABCDEFGHIJKL**, `Major` : **28**.) and app listens beacon's 'Minor' value changes. that means bus' location. I use euclidean distance for get where current bus' stop is. (this is not implemented in App part, but in Raspberry Pi - beacon part. not in repository. Sorry!) when Raspberry Pi determines that bus is at next stop, it changes beacon's `Minor` value. and app receives that and shows it.

 App user have to select destination for get push notification. user can select destination with clicking '목적지 설정' button. it shows sidebar menu.

### Scene 2 - Bus Detail Scene ; Destination setting
 Sidebar menu for set destination. it shows favorite destination, and can select destination of course. app determines Favorite stop with your destination set history. dest set history implements with [AsyncStorage](http://facebook.github.io/react-native/docs/asyncstorage.html)(SQLite, local DB storage). with key`(bus' Number, bus stop)` - value`(destination set counts)` pair. When user set destination, app starts count remaining stops.

 |     |     |
 |=====
 |  Scene 3    |   Scene 4
 {: rules="groups"}

### Scene 3 - Bus Detail Scene ; Destination is set
 App shows how many stops remain to destination. app refreshes [state](http://facebook.github.io/react-native/docs/state.html) with received beacon advertisement and `refreshState` function. if remaining stops is lesser then two, app sends push notification that remaining stops is few.

### Scene 4 - Background Push ; destination is next stop!
 App sends background push notification like above.(Scene 4, push message - *destination is next stop!*)

 |     |     |
 |=====
 |  Scene 5    |   Scene 6
 {: rules="groups"}

### Scene 5 - Background Push ; arrived to destination!
App sends background push notification like above.(Scene 5, push message - *Arrived to destination!*)

### Scene 6 - Foreground Alert ; arrived to destination!
 When app is on foreground, app sends alert message.(Scene 6, alert message - *Arrived to destination!* )


text:
using Cofoundry.Domain.Extendable;

namespace Cofoundry.Domain.Internal;

public class ContentRepositoryPageGetAllQueryBuilder
    : IContentRepositoryPageGetAllQueryBuilder
    , IExtendableContentRepositoryPart
{
    public ContentRepositoryPageGetAllQueryBuilder(
        IExtendableContentRepository contentRepository
        )
    {
        ExtendableContentRepository = contentRepository;
    }

    public IExtendableContentRepository ExtendableContentRepository { get; }

    public IDomainRepositoryQueryContext<ICollection<PageRoute>> AsRoutes()
    {
        var query = new GetAllPageRoutesQuery();
        return DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository);
    }
}


text:
package org.adligo.addoc.client.presenter;

import com.google.gwt.core.shared.GWT;
import com.google.gwt.user.client.Window;

import org.adligo.addoc.client.i18n.AddocI18nConstants;
import org.adligo.addoc.client.i18n.SizeParser;
import org.adligo.addoc.client.models.I_AddocContent;
import org.adligo.addoc.client.models.I_Article;
import org.adligo.addoc.client.models.I_ArticleBrief;
import org.adligo.addoc.client.models.I_ArticleTree;
import org.adligo.addoc.client.models.I_ContentCache;
import org.adligo.addoc.client.presenter.content.I_ArticleBriefRequestor;
import org.adligo.addoc.client.presenter.content.I_ArticleRequestor;
import org.adligo.addoc.client.presenter.content.I_ArticleTreeRequestor;
import org.adligo.addoc.client.presenter.content.I_ContentManager;
import org.adligo.addoc.client.ui.I_ArticleTreeView;
import org.adligo.addoc.client.ui.I_ArticleView;
import org.adligo.addoc.client.ui.I_DialogView;
import org.adligo.addoc.client.ui.I_FrameView;
import org.adligo.addoc.client.ui.I_MenuView;
import org.adligo.addoc.client.ui.events.AddocEvent;
import org.adligo.addoc.client.ui.events.I_AddocHandler;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class ArticlePresenter implements I_AddocHandler, I_ArticleTreeRequestor, I_ArticleBriefRequestor, I_ArticleRequestor {
  private AddocI18nConstants CONSTANTS = GWT.create(AddocI18nConstants.class);

  private I_MenuView menuView_;
  private I_ArticleTreeView articleTreeView_;
  private I_ArticleView articleView_;
  private I_ContentManager contentManager_;
  private I_ContentCache cache_;

  private Integer requestedTreeId_;
  private Set<Integer> requestedArticleBriefs_ = new HashSet<Integer>();
  private Set<Integer> requestedArticles_ = new HashSet<Integer>();

  private I_ArticleTree currentTree_;
  private I_ArticleBrief currentArticleBrief_;
  private I_ArticleBrief currentArticlePreviousBrief_;
  private int [] currentTreeSelection_;
  private I_Article currentArticle_;
  private I_Article currentArticlePreviousArticle_;

  private I_DialogView dialogView_;
  private List<I_FrameView> adViews_ = new ArrayList<I_FrameView>();
  private String browserWindowUrl_;
  private String [] lastTreePath_;
  private ArticlePresenterRoot root_;

  public I_MenuView getMenuView() {
    return menuView_;
  }
  public void setMenuView(I_MenuView menuView) {
    menuView_ = menuView;
    menuView_.setHandler(this);
  }
  public I_ArticleTreeView getArticleTreeView() {
    return articleTreeView_;
  }
  public void setArticleTreeView(I_ArticleTreeView articleTreeView) {
    articleTreeView_ = articleTreeView;
    articleTreeView_.setHandler(this);
  }
  public I_ArticleView getArticleView() {
    return articleView_;
  }
  public void setArticleView(I_ArticleView articleView) {
    articleView_ = articleView;
  }
  public I_ContentManager getContentManager() {
    return contentManager_;
  }
  public void setContentManager(I_ContentManager contentManager) {
    contentManager_ = contentManager;
  }

  public void start(String browserUrl) {
    browserWindowUrl_ = browserUrl;
    I_AddocContent addocContent = contentManager_.getAddocContent();
    cache_ = addocContent.getContentCache();

    int hi = browserUrl.indexOf("#");

    if (hi != -1) {
      String history = browserUrl.substring(hi + 1, browserUrl.length());
      dialogView_.setCloseButtonVisible();
      dialogView_.setHeight("100px");
      dialogView_.setWidth("400px");
      dialogView_.setMessageText("ToDo History support for incoming history links is not availiable yet.", true);
      dialogView_.show();
    } else {
      root_ = ArticlePresenterRoot.LoadLatestTreeWithDefaultArticle;
      requestedTreeId_ = contentManager_.getLatestTree();
      //note when I get to change tree from a event this needs to occur
      //cache_.reduceArticleCache(Collections.singleton(requestedTreeId_), 10000, millisecondsPast);
      contentManager_.requestTree(requestedTreeId_, this);

    }
    /*
    currentTree_ = content_.getLatestTree();
    articleTreeView_.setDateModified(currentTree_.getDate());

    List<Integer> tops =currentTree_.getTop();
    for (Integer top: tops) {
      I_Article article = content_.getArticle(top);
      String name = article.getName();
      articleTreeView_.addNode(new String[] {name});
      List<String> parents = new ArrayList<String>();
      parents.add(name);
      addChildNodes(new int[] {top}, parents);
    }
    */
  }

  @Override
  public void onSimpleEvent(AddocEvent event) {
    switch (event) {
      case IndexClick:
          articleTreeView_.show();
        break;
      default:
        Window.alert("non handled event " + event);
    }
  }
  @Override
  public void onArticleClick(String[] nodePath) {
    String topNode = nodePath[0];
    /*
    I_Article topArticle = null;
    List<Integer> ids = currentTree_.getTop();
    for (int i = 0; i < ids.size(); i++) {
      int id = ids.get(i);
      I_Article art = content_.getArticle(id);
      if (topNode.equals(art.getName())) {
        topArticle = art;
        break;
      }
    }
    if (topArticle != null) {
      if (nodePath.length >= 2) {

      } else {

      }
    }
    */
  }

  private void getArticle(I_Article parent, String [] nodePath, int pathPart) {

  }

  @Override
  public void onSubArticleClick(String subArticleName) {
    // TODO Auto-generated method stub

  }
  public List<I_FrameView> getAdViews() {
    return adViews_;
  }

  public void setAdViews(List<I_FrameView> adViews) {
    adViews_.clear();
    if (adViews != null) {
      adViews_.addAll(adViews);
    }
  }

  private void reloadAds() {
    for (I_FrameView adView: adViews_) {
      adView.reloadAd();
    }
  }
  public I_DialogView getDialogView() {
    return dialogView_;
  }
  public void setDialogView(I_DialogView dialogView) {
    this.dialogView_ = dialogView;
  }

  @Override
  public void onFailure(Throwable caught) {
    dialogView_.resetDefaults();
    if (requestedTreeId_ != null) {
      String error = CONSTANTS.getObtainArticleTreeError();
      String webMaster = CONSTANTS.getWebMaster();
      String errorSize = CONSTANTS.getObtainArticleTreeErrorSize();
      SizeParser sp = new SizeParser(errorSize);
      dialogView_.setMessageText(error + webMaster, true);
      dialogView_.setHeight(sp.getHeight());
      dialogView_.setWidth(sp.getWidth());
    } else if (requestedArticleBriefs_.size() >= 1) {
      String error = CONSTANTS.getObtainArticleBriefError();
      String webMaster = CONSTANTS.getWebMaster();
      String errorSize = CONSTANTS.getObtainArticleBriefErrorSize();
      SizeParser sp = new SizeParser(errorSize);
      dialogView_.setMessageText(error + webMaster, true);
      dialogView_.setHeight(sp.getHeight());
      dialogView_.setWidth(sp.getWidth());
    } else {

    }
    dialogView_.show();
  }

  @Override
  public void onSuccess(I_Article article) {
    if (currentArticle_ == null) {
      currentArticle_ = article;
      int previousId = article.getPreviousId();
      if (previousId >= 0) {
        loadCurrentArticlePrevious(previousId);
      } else {
        displayArticle();
      }
    } else {
      currentArticlePreviousArticle_ = article;
      displayArticle();
    }
  }

  @SuppressWarnings("boxing")
  @Override
  public void onSuccess(List<I_ArticleBrief> briefs) {
    int treeId = currentTree_.getId();
    List<Integer> previousVersions = new ArrayList<Integer>();

    for (I_ArticleBrief articleBrief: briefs) {
      requestedArticleBriefs_.remove(articleBrief.getId());
      cache_.addArticleBreif(treeId, articleBrief);
      int previousId = articleBrief.getPreviousId();
      if (previousId >= 0) {
        previousVersions.add(previousId);
      }
    }
    cache_.removeCachedArticleIds(previousVersions);
    if (previousVersions.size() >= 1) {
      loadArticleBriefs(previousVersions);
    }
    loadArticlesForArticleView();
    if (requestedArticleBriefs_.size() == 0) {
      displayTree();
    }
  }
  /**
   * if loading, load the articles for the
   * article view (article, previous article).
   */
  public void loadArticlesForArticleView() {
    if (root_ != null) {
      switch (root_) {
        case LoadLatestTreeWithDefaultArticle:
          List<Integer> topIds = currentTree_.getTop();
          Integer topId = topIds.get(0);
          currentTreeSelection_ = new int[] {topId};
          if (currentArticleBrief_ == null) {
            loadCurrentArticle();
            lastTreePath_ = new String[] {currentArticleBrief_.getName()};
          } else if (currentArticleBrief_.getId() != topId) {
            loadCurrentArticle();
          }
          break;
      }
    }
  }

  @SuppressWarnings("boxing")
  public void loadCurrentArticle() {
    currentArticle_ = null;
    int artcicleId = currentTreeSelection_[currentTreeSelection_.length - 1];
    currentArticleBrief_ = cache_.getArticleBrief(artcicleId);
    if (currentArticleBrief_ != null) {
      contentManager_.requestArticle(currentArticleBrief_, this);
    }
  }

  @SuppressWarnings("boxing")
  public void loadCurrentArticlePrevious(Integer topId) {
    currentArticlePreviousArticle_ = null;
    currentArticlePreviousBrief_ = cache_.getArticleBrief(topId);
    if (currentArticlePreviousBrief_ != null) {
      contentManager_.requestArticle(currentArticlePreviousBrief_, this);
    }
  }

  @SuppressWarnings("boxing")
  @Override
  public void onSuccess(I_ArticleTree tree) {
    requestedTreeId_ = null;
    currentTree_ = tree;
    menuView_.setLastModifiedDate(currentTree_.getDate());
    List<Integer> top = currentTree_.getTop();

    loadArticleBriefs(top);
    for (Integer id: top) {
      loadChildNodes(new int[] {id});
    }
  }

  @SuppressWarnings("boxing")
  private void loadArticleBriefs(List<Integer> ids) {
    Set<Integer> topCopy = new HashSet<Integer>();
    for (Integer id: ids) {
      int groupStartId = findStartArticleBriefGroup(id);
      if (!requestedArticleBriefs_.contains(groupStartId)) {
        topCopy.add(groupStartId);
      }
    }

    cache_.removeCachedArticleIds(topCopy);
    if (topCopy.size() >= 1) {
      requestedArticleBriefs_.addAll(topCopy);
      contentManager_.requestArticleBriefs(topCopy, this);
    }
  }

  @SuppressWarnings("boxing")
  private void loadChildNodes(int [] parentIds) {
    List<Integer> ids = currentTree_.getIds(parentIds);
    if (ids == null) {
      return;
    }
    loadArticleBriefs(ids);
    for (Integer id: ids) {
      int [] nextParentIds = new int [parentIds.length + 1];
      for (int i = 0; i < parentIds.length; i++) {
        nextParentIds[i] = parentIds[i];
      }
      nextParentIds[parentIds.length] = id;
      loadChildNodes(nextParentIds);
    }
  }

  private void displayArticle() {
    articleView_.setTitle(currentArticle_.getName());

    articleView_.setHeight(currentArticle_.getHeight() + "px");
    if (currentArticlePreviousArticle_ != null) {
      articleView_.setPreviousEnabled(true);
      articleView_.setVersions(currentArticlePreviousArticle_.getDate(), currentArticle_.getDate());
    } else {
      articleView_.setVersions(null, currentArticle_.getDate());
    }
    articleView_.setTextHtml(currentArticle_.getContent());
    String baseUrl = browserWindowUrl_;
    int pound = browserWindowUrl_.indexOf("#");
    if (pound != -1) {
      baseUrl = browserWindowUrl_.substring(0, pound);
    }
    articleView_.setTopicUrl(baseUrl + "#topic/"  + getTreePathAsUrl());
    articleView_.setArticleUrl(baseUrl + "#article/"  + currentArticle_.getId());
    List<Integer> subs = currentTree_.getIds(currentTreeSelection_);
    //articleView_.set
  }

  public String getTreePathAsUrl() {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < lastTreePath_.length; i++) {
      if (i != 0) {
        sb.append("/");
      } else {
        sb.append(lastTreePath_[i]);
      }
    }
    return sb.toString();
  }

  @SuppressWarnings("boxing")
  private void displayTree() {
    articleTreeView_.clearNodes();
    List<Integer> topIds = currentTree_.getTop();
    for (Integer id: topIds) {
      I_ArticleBrief articleBrief = cache_.getArticleBrief(id);
      String articleName = articleBrief.getName();
      articleTreeView_.addNode(new String[] {articleName});
      addChildNodes(new int[]{id}, Collections.singletonList(articleName));
    }
  }

  @SuppressWarnings("boxing")
  public void addChildNodes(int [] parentIds, List<String> parents) {
    List<Integer> ids = currentTree_.getIds(parentIds);
    if (ids == null) {
      return;
    }
    for (Integer id: ids) {
      I_ArticleBrief article = cache_.getArticleBrief(id);
      String name = article.getName();
      String [] path = new String[parents.size() + 1];
      for (int i = 0; i < path.length - 1; i++) {
        path[i] = parents.get(i);
      }
      path[parents.size()] = name;

      articleTreeView_.addNode(path);
      List<String> nodeParents = new ArrayList<String>(parents);
      nodeParents.add(name);
      int [] nextParentIds = new int [parentIds.length + 1];
      for (int i = 0; i < parentIds.length; i++) {
        nextParentIds[i] = parentIds[i];
      }
      nextParentIds[parentIds.length] = id;
      addChildNodes(nextParentIds, nodeParents);
    }
  }

  @SuppressWarnings("boxing")
  private int findStartArticleBriefGroup(int id) {
    if (id < 100) {
      return 0;
    } else {
      String idString = new String(""+ id);
      idString = idString.substring(0, idString.length() - 2) + "00";
      return new Integer(idString);
    }
  }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.zstudio.app.cinemovie">
    >
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name=".CineApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppThemeNoActionBar">
        <activity
            android:name=".MainActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppThemeNoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.HomeActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppThemeNoActionBar" />
        <activity
            android:name=".activity.GameActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppThemeNoActionBar" />
        <activity
            android:name=".activity.AchievementActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".activity.AboutActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppThemeNoActionBar" />
        <activity android:name=".activity.MovieDetailsActivity"></activity>
    </application>

</manifest>


text:
<?php

/**
 * This file is part of the Spryker Demoshop.
 * For full license information, please view the LICENSE file that was distributed with this source code.
 */

namespace Pyz\Zed\ProductCategory\Persistence;

use Spryker\Zed\ProductCategory\Persistence\ProductCategoryQueryContainerInterface as SprykerProductCategoryQueryContainerInterface;

interface ProductCategoryQueryContainerInterface extends SprykerProductCategoryQueryContainerInterface
{
    /**
     * @api
     *
     * @param int $idProductAbstract
     * @param int[] $idsCategoryNode
     *
     * @return \Orm\Zed\ProductCategory\Persistence\SpyProductCategoryQuery
     */
    public function queryProductCategoryMappingsByIdAbstractProductAndIdsCategoryNode(
        $idProductAbstract,
        array $idsCategoryNode
    );
}


text:
/**
 *
 *  Shopping Cart
 *
 */

(function($) {
    var ShoppingCart = {

        name: 'shoppingCart',

        models: {
            cartInfo: {},
            products: {}
        },

        init: function() {
            log('initializing cart');
            var localStorageCart = JSON.parse(localStorage.getItem(ShoppingCart.name));
            RenderCartDom(localStorageCart);
            this.bindRemoveItem();
        },

        add: function(product){
            log('adding to cart');
            log(product);
            addItemToCart(product);
        },

        remove: function(product_id){
            RemoveItemFromCart(product_id);
        },

        bindRemoveItem: function(){
            var ShoppingCart = this;
            $('#shopping-list').on('click', 'li', function(){
                ShoppingCart.remove($(this).attr('id'));
                $(this).remove();
            });
        }
    };

    window.ShoppingCart = ShoppingCart;

    $(document).ready(function() {

        ShoppingCart.init();

    });

})(jQuery);

function addItemToCart(product){
    var localStorageCart = addElementToLocalStorage(product);
    log(localStorage.getItem(ShoppingCart.name));

    RenderCartDom(localStorageCart);
}

function RenderCartDom(localStorageCart){
    if (localStorageCart == undefined) return true;

    var productsHtml    = productsDom(localStorageCart);
    var priceHtml       = priceDom(localStorageCart);

    $('#shopping-items').html(productsHtml + priceHtml);

}
function productsDom(localStorageCart){
    var ProductsLayout = '<% _.each(products, function(product) { %>' +
                                '<li id= <%= product.id %> >' +
                                    '
' +
                                         '<%= product.quantity %> <%= product.name %>  - <%= product.price * product.quantity %>' +
                                    '
' +
                                '
' +
                           '<% });%>';

    return _.template(ProductsLayout,{products : localStorageCart[ShoppingCart.models.products]});
}

function priceDom(localStorageCart){
    var totalPriceHtml;

    //TODO better performance with adding to total price and not recalcing every time
    totalPriceHtml = calcTotalPrice(localStorageCart);
    return totalPriceHtml;
}

function calcTotalPrice(localStorageCart){
    var products    = localStorageCart[ShoppingCart.models.products];
    var totalPrice  = 0;
    _.each(products, function(product) {
        totalPrice += (product.price || 0) * product.quantity;
    });

    if (totalPrice == 0){
        return '';
    }else{
        return '
 Total Price '+ totalPrice +'$
'
    }
}

function addElementToLocalStorage(product){
    var localStorageCart    = getCartFromLocalStorage();

    localStorageCart        = smartAddToProducts(localStorageCart, product);
    setCartInLocalStorage(localStorageCart);
    return localStorageCart;
}

function smartAddToProducts(cartObject, productToAdd){
    var products            = cartObject[ShoppingCart.models.products] || {};

    cartObject[ShoppingCart.models.products] = addOrSetItemToCart(products, productToAdd);

    return cartObject;
}

function getCartFromLocalStorage(){
    return JSON.parse(localStorage.getItem(ShoppingCart.name)) || {};
}

function addOrSetItemToCart(products, productToAdd){
    if (doesNotHaveKey(products, productToAdd.id)){
        var productToSave = $.extend(productToAdd, {quantity: 1});
        products[productToAdd.id] = productToSave;
    }else{
        products[productToAdd.id]['quantity'] += 1;
    }
    return products;
}

function setCartInLocalStorage(cart){
    localStorage.setItem(ShoppingCart.name, JSON.stringify(cart));
}

function RemoveItemFromCart(productId){
    var localStorageCart    = getCartFromLocalStorage();

    delete localStorageCart[ShoppingCart.models.products][productId];

    setCartInLocalStorage(localStorageCart);
}


text:
Checklist.GeoEntity = DS.Model.extend({
  id: DS.attr('number'),
  name: DS.attr('string'),
  iso_code2: DS.attr('string'),
  is_current: DS.attr('boolean')
});

Checklist.GeoEntity.reopenClass({
  collectionUrl: 'geo_entities'
});


text:
/**
* list schema (auto-generated)
*/
const mongoose = require('mongoose');

const listSchema = new mongoose.Schema({
  title: String,
  todos: Array,
});

/*
// decompose a virtual value from the model into database schema fields
listSchema.virtual('prop.path.here').set(val => {
  this.first = val.split(' ')[0];
  this.last = val.split(' ')[1];
});
// compose a virtual value from the model instance and store as a field
listSchema.virtual('prop.path.here').get(() => {
  return `${this.first} ${this.last}`; // a full name virtual property
});
*/

const list = mongoose.model('list', listSchema);
module.exports = list;


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.springframework.sync</groupId>
	<artifactId>spring-sync-android-test</artifactId>
	<version>0.0.1</version>
	<packaging>apk</packaging>
	<name>spring-sync-android-test</name>
	<description>Spring Sync Android Tests</description>
	<url>https://github.com/spring-projects/spring-sync</url>
	<inceptionYear>2014</inceptionYear>

	<organization>
		<name>Pivotal Software, Inc.</name>
		<url>http://www.spring.io</url>
	</organization>

	<properties>
		<!-- use UTF-8 for everything -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<android-platform>21</android-platform>
		<android-maven-plugin-version>3.9.0-rc.2</android-maven-plugin-version>
		<maven-compiler-plugin-version>3.1</maven-compiler-plugin-version>
		<java-version>1.6</java-version>
		<android-version>5.0_r1</android-version>
		<org.springframework.android-version>2.0.0.BUILD-SNAPSHOT</org.springframework.android-version>
		<org.springframework.sync-version>1.0.0.BUILD-SNAPSHOT</org.springframework.sync-version>
		<com.fasterxml.jackson.core-version>2.3.4</com.fasterxml.jackson.core-version>
		<org.easymock-version>3.2</org.easymock-version>
		<org.hamcrest-version>1.3</org.hamcrest-version>
		<org.mockito-version>1.9.5</org.mockito-version>
		<com.google.dexmaker-version>1.1</com.google.dexmaker-version>
		<maven-surefire-plugin-version>2.17</maven-surefire-plugin-version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>android</groupId>
			<artifactId>android</artifactId>
			<version>${android-version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.sync</groupId>
			<artifactId>spring-sync-core-android</artifactId>
			<version>${org.springframework.sync-version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${com.fasterxml.jackson.core-version}</version>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>${org.easymock-version}</version>
			<exclusions>
				<exclusion>
					<artifactId>cglib-nodep</artifactId>
					<groupId>cglib</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<version>${org.hamcrest-version}</version>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${org.mockito-version}</version>
		</dependency>
		<dependency>
			<groupId>com.google.dexmaker</groupId>
			<artifactId>dexmaker-mockito</artifactId>
			<version>${com.google.dexmaker-version}</version>
		</dependency>
		<dependency>
			<groupId>com.google.dexmaker</groupId>
			<artifactId>dexmaker</artifactId>
			<version>${com.google.dexmaker-version}</version>
		</dependency>
	</dependencies>

	<repositories>
		<repository>
			<id>spring-snapshot</id>
			<name>Spring Snapshot Repository</name>
			<url>http://repo.spring.io/libs-snapshot</url>
		</repository>
	</repositories>

	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<plugin>
				<groupId>com.jayway.maven.plugins.android.generation2</groupId>
				<artifactId>android-maven-plugin</artifactId>
				<version>${android-maven-plugin-version}</version>
				<configuration>
					<sdk>
						<platform>${android-platform}</platform>
					</sdk>
					<deleteConflictingFiles>true</deleteConflictingFiles>
					<undeployBeforeDeploy>true</undeployBeforeDeploy>
					<deviceThreads>4</deviceThreads>
				</configuration>
				<extensions>true</extensions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin-version}</version>
				<configuration>
					<source>${java-version}</source>
					<target>${java-version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin-version}</version>
				<configuration>
					<testFailureIgnore>true</testFailureIgnore>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${maven-surefire-plugin-version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>2.4</version>
			</plugin>
		</plugins>
	</reporting>

</project>


text:
"""
    celery.security.serialization
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Secure serializer.

"""
from __future__ import absolute_import
from __future__ import with_statement

import base64

from kombu.serialization import registry, encode, decode
from kombu.utils.encoding import bytes_to_str, str_to_bytes

from .certificate import Certificate, FSCertStore
from .key import PrivateKey
from .utils import reraise_errors

def b64encode(s):
    return bytes_to_str(base64.b64encode(str_to_bytes(s)))

def b64decode(s):
    return base64.b64decode(str_to_bytes(s))

class SecureSerializer(object):

    def __init__(self, key=None, cert=None, cert_store=None,
                 digest='sha1', serializer='json'):
        self._key = key
        self._cert = cert
        self._cert_store = cert_store
        self._digest = digest
        self._serializer = serializer

    def serialize(self, data):
        """serialize data structure into string"""
        assert self._key is not None
        assert self._cert is not None
        with reraise_errors('Unable to serialize: %r', (Exception, )):
            content_type, content_encoding, body = encode(
                data, serializer=self._serializer)
            # What we sign is the serialized body, not the body itself.
            # this way the receiver doesn't have to decode the contents
            # to verify the signature (and thus avoiding potential flaws
            # in the decoding step).
            return self._pack(body, content_type, content_encoding,
                              signature=self._key.sign(body, self._digest),
                              signer=self._cert.get_id())

    def deserialize(self, data):
        """deserialize data structure from string"""
        assert self._cert_store is not None
        with reraise_errors('Unable to deserialize: %r', (Exception, )):
            payload = self._unpack(data)
            signature, signer, body = (payload['signature'],
                                       payload['signer'],
                                       payload['body'])
            self._cert_store[signer].verify(body, signature, self._digest)
        return decode(body, payload['content_type'],
                      payload['content_encoding'], force=True)

    def _pack(self, body, content_type, content_encoding, signer, signature,
              sep='\x00\x01'):
        return b64encode(sep.join([signer, signature,
                                   content_type, content_encoding, body]))

    def _unpack(self, payload, sep='\x00\x01',
                fields=('signer', 'signature', 'content_type',
                        'content_encoding', 'body')):
        return dict(zip(fields, b64decode(payload).split(sep)))

def register_auth(key=None, cert=None, store=None, digest='sha1',
                  serializer='json'):
    """register security serializer"""
    s = SecureSerializer(key and PrivateKey(key),
                         cert and Certificate(cert),
                         store and FSCertStore(store),
                         digest=digest, serializer=serializer)
    registry.register('auth', s.serialize, s.deserialize,
                      content_type='application/data',
                      content_encoding='utf-8')


text:
namespace Aurora.DataAccess.Identity
{
    public static class RoleNames
    {
        public const string Admin = "Admin";
    }
}


text:
unless Kernel.respond_to?(:require_relative)
  module Kernel
    def require_relative(path)
      require File.join(File.dirname(caller.first), path.to_str)
    end
  end
end

lib_dir = __dir__

$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?(lib_dir)

os_config = File.join(lib_dir, "brightbox-cli", "os_config.rb")
require os_config if File.exist? os_config

vendor_dir = File.expand_path(File.join(lib_dir, "brightbox-cli", "vendor"))

# Add any vendored libraries into search path
Dir.glob("#{vendor_dir}/*").each do |f|
  $LOAD_PATH.unshift File.join(f, "lib")
end

require "multi_json"
require "date"
require "gli"
require "i18n"
require "fog/brightbox"

# I18n stuff to clean up scattered text everywhere
I18n.enforce_available_locales = false
I18n.default_locale = :en
I18n.load_path = [File.join("#{File.dirname(__FILE__)}/../locales/en.yml")]

module Brightbox
  DEFAULT_API_ENDPOINT = ENV.fetch("BRIGHTBOX_API_URL", "https://api.gb1.brightbox.com")
  EMBEDDED_APP_ID = "app-12345".freeze
  EMBEDDED_APP_SECRET = "mocbuipbiaa6k6c".freeze

  autoload :Server, File.expand_path("brightbox-cli/servers", __dir__)
  autoload :DetailedServer, File.expand_path("brightbox-cli/detailed_server", __dir__)
  autoload :Image, File.expand_path("brightbox-cli/images", __dir__)
  autoload :Type, File.expand_path("brightbox-cli/types", __dir__)
  autoload :Zone, File.expand_path("brightbox-cli/zones", __dir__)
  autoload :CloudIP, File.expand_path("brightbox-cli/cloud_ips", __dir__)
  autoload :User, File.expand_path("brightbox-cli/users", __dir__)
  autoload :Account, File.expand_path("brightbox-cli/accounts", __dir__)
  autoload :CollaboratingAccount, File.expand_path("brightbox-cli/collaborating_account", __dir__)
  autoload :LoadBalancer, File.expand_path("brightbox-cli/load_balancers", __dir__)
  autoload :ServerGroup, File.expand_path("brightbox-cli/server_groups", __dir__)
  autoload :DetailedServerGroup, File.expand_path("brightbox-cli/detailed_server_group", __dir__)
  autoload :FirewallPolicy, File.expand_path("brightbox-cli/firewall_policy", __dir__)
  autoload :FirewallRule, File.expand_path("brightbox-cli/firewall_rule", __dir__)
  autoload :FirewallRules, File.expand_path("brightbox-cli/firewall_rules", __dir__)
  autoload :Collaboration, File.expand_path("brightbox-cli/collaboration", __dir__)
  autoload :UserCollaboration, File.expand_path("brightbox-cli/user_collaboration", __dir__)
  autoload :DatabaseType, File.expand_path("brightbox-cli/database_type", __dir__)
  autoload :DatabaseServer, File.expand_path("brightbox-cli/database_server", __dir__)
  autoload :DatabaseSnapshot, File.expand_path("brightbox-cli/database_snapshot", __dir__)
  autoload :Token, File.expand_path("brightbox-cli/token", __dir__)

  module Config
    autoload :SectionNameDeduplicator, File.expand_path("brightbox-cli/config/section_name_deduplicator", __dir__)
  end
end

require_relative "brightbox/cli/config"

require_relative "brightbox-cli/connection_manager"
require_relative "brightbox-cli/tables"
require_relative "brightbox-cli/logging"
require_relative "brightbox-cli/api"
require_relative "brightbox-cli/config/cache"
require_relative "brightbox-cli/config/gpg_encrypted_passwords"
require_relative "brightbox-cli/config/password_helper"
require_relative "brightbox-cli/config/two_factor_auth"
require_relative "brightbox-cli/config/two_factor_helper"
require_relative "brightbox-cli/config/authentication_tokens"
require_relative "brightbox-cli/config/accounts"
require_relative "brightbox-cli/config/clients"
require_relative "brightbox-cli/config/sections"
require_relative "brightbox-cli/config/api_client"
require_relative "brightbox-cli/config/user_application"
require_relative "brightbox-cli/config/to_fog"
require_relative "brightbox-cli/config/dirty"
require_relative "brightbox-cli/config"
require_relative "brightbox-cli/version"
require_relative "brightbox-cli/ruby_core_ext"
require_relative "brightbox-cli/nilable_hash"
require_relative "brightbox-cli/error_parser"

require_relative "brightbox-cli/gli_global_hooks"


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

namespace RecursiveFactorial
{

    class Program
    {
        private static long Factorial(int n)
        {
            if (n == 0 || n == 1)
            {
                return 1;
            }
            else
            {
                return n * Factorial(n - 1);
            }
        }

        static void Main(string[] args)
        {
            int number = int.Parse(Console.ReadLine());

            Console.WriteLine(Factorial(number));
        }
    }
}


text:
<?xml version="1.0" ?>
<configuration label="Esri Globe">
    <imageurl>assets/images/globe.png</imageurl>
    <linkurl>http://www.esri.com</linkurl>
</configuration>

<!--
    See Static Image widget documentation at
    http://links.esri.com/staticimagewidget
-->


text:
require 'delegate'

class Shoes
  module Logger
    class Ruby < SimpleDelegator
      def initialize(device=STDERR)
        require 'logger'
        logger = ::Logger.new(device)
        logger.formatter = proc do |severity, datetime, progname, message|
          "%s: %s\n" % [severity, message]
        end
        super(logger)
      end
    end
  end
end

Shoes::Logger.register(:ruby, Shoes::Logger::Ruby)


text:
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace SkyTimer.Model
{
    [Serializable]
    public class RecordList
    {
        public string Name { get; set; }

        public string ScrambleType { get; set; } = "333";

        public List<Record> List { get; set; } = new List<Record>();

        public bool IncludeScramble { get; set; }
    }
}


text:
declare module 'fuzzaldrin' {
  declare module.exports: {
    score(string: string, query: string): number,
    filter<T: string|Object>(candidates: Array<T>, query: string, options?: {
      key?: string,
      maxResults?: number,
    }): Array<T>,
  }
}


text:
import net.bmjames.json.scalacheck.ArbitraryInstances
import org.scalacheck.Properties
import org.scalacheck.Prop.forAll
import org.json4s.JValue
import net.bmjames.json.JsonLikeLaws
import net.bmjames.json.json4s._

object JsonLikeSpec extends Properties("JsonLike[JValue]") {

  val instances = ArbitraryInstances[JValue]
  import instances._

  val laws = new JsonLikeLaws[JValue]

  property("array") = forAll(laws.array _)

  property("obj") = forAll(laws.obj _)

  property("int") = forAll(laws.int _)

  property("bool") = forAll(laws.bool _)

  property("string") = forAll(laws.string _)

  property("double") = forAll(laws.double _)

}


text:
<?php

namespace Google\Service\Compute;

class InstancesStartWithEncryptionKeyRequest extends \Google\Collection
{
  protected $collection_key = 'disks';
  protected $disksType = CustomerEncryptionKeyProtectedDisk::class;
  protected $disksDataType = 'array';

  /**
   * @param CustomerEncryptionKeyProtectedDisk[]
   */
  public function setDisks($disks)
  {
    $this->disks = $disks;
  }
  /**
   * @return CustomerEncryptionKeyProtectedDisk[]
   */
  public function getDisks()
  {
    return $this->disks;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstancesStartWithEncryptionKeyRequest::class, 'Google_Service_Compute_InstancesStartWithEncryptionKeyRequest');


text:
package ua.qa.training.mantis.model;

/**
 * Created by osoboleva on 11/3/2016.
 */
public class MailMessage {
    public String to;
    public String text;

    public MailMessage(String to, String text){
        this.to = to;
        this.text = text;
    }
}


text:
<?php
App::uses('RKImageProxyState', 'ApertureConnector.Model');

/**
 * RKImageProxyState Test Case
 *
 */
class RKImageProxyStateTest extends CakeTestCase {

/**
 * Fixtures
 *
 * @var array
 */
	public $fixtures = array(
		'plugin.aperture_connector.r_k_image_proxy_state'
	);

/**
 * setUp method
 *
 * @return void
 */
	public function setUp() {
		parent::setUp();
		$this->RKImageProxyState = ClassRegistry::init('ApertureConnector.RKImageProxyState');
	}

/**
 * tearDown method
 *
 * @return void
 */
	public function tearDown() {
		unset($this->RKImageProxyState);

		parent::tearDown();
	}

}


text:
package codingbat.logic1;

//We'll say a number is special if it is a multiple of 11 or
//if it is one more than a multiple of 11.
//Return true if the given non-negative number is special.
//Use the % "mod" operator -- see Introduction to Mod
//
//specialEleven(22) = true
//specialEleven(23) = true
//specialEleven(24) = false

public class SpecialElevenTest {

  public static void main(String[] args) {

    SpecialElevenTest test = new SpecialElevenTest();

    System.out.println(">" + test.specialEleven(22) + "<");
    System.out.println(">" + test.specialEleven(23) + "<");
    System.out.println(">" + test.specialEleven(24) + "<");
  }

  public boolean specialEleven(int n) {
    if (n % 11 == 0 || n % 11 == 1) {
      return true;
    }

    return false;
  }

}


text:
package internal

import "context"

// backgroundContext is an implementation of the context.Context interface that wraps a child Context. Value requests
// are forwarded to the child Context but the Done and Err functions are overridden to ensure the new context does not
// time out or get cancelled.
type backgroundContext struct {
	context.Context
	childValuesCtx context.Context
}

// NewBackgroundContext creates a new Context whose behavior matches that of context.Background(), but Value calls are
// forwarded to the provided ctx parameter. If ctx is nil, context.Background() is returned.
func NewBackgroundContext(ctx context.Context) context.Context {
	if ctx == nil {
		return context.Background()
	}

	return &backgroundContext{
		Context:        context.Background(),
		childValuesCtx: ctx,
	}
}

func (b *backgroundContext) Value(key interface{}) interface{} {
	return b.childValuesCtx.Value(key)
}


text:
package microsoft.exchange.webservices.data.core.response;

import microsoft.exchange.webservices.data.core.EwsServiceXmlReader;
import microsoft.exchange.webservices.data.core.EwsUtilities;
import microsoft.exchange.webservices.data.exception.ServiceLocalException;
import microsoft.exchange.webservices.data.exception.ServiceXmlDeserializationException;
import microsoft.exchange.webservices.data.notification.SubscriptionBase;

import javax.xml.stream.XMLStreamException;

/**
 * Represents the base response class to subscription creation operations.
 *
 * @param <TSubscription> Subscription type
 */
public final class SubscribeResponse<TSubscription extends SubscriptionBase> extends ServiceResponse {

  /**
   * The subscription.
   */
  private TSubscription subscription;

  /**
   * Initializes a new instance of the SubscribeResponse<TSubscription
   * class.
   *
   * @param subscription The Subscription
   */
  public SubscribeResponse(TSubscription subscription) {
    super();
    EwsUtilities.EwsAssert(subscription != null, "SubscribeResponse.ctor", "subscription is null");
    this.subscription = subscription;
  }

  /**
   * Reads response elements from XML.
   *
   * @param reader The reader.
   * @throws microsoft.exchange.webservices.data.exception.ServiceXmlDeserializationException  the service xml deserialization exception
   * @throws javax.xml.stream.XMLStreamException the xML stream exception
   * @throws InstantiationException              the instantiation exception
   * @throws IllegalAccessException              the illegal access exception
   * @throws ServiceLocalException               the service local exception
   * @throws Exception                           the exception
   */
  @Override
  protected void readElementsFromXml(EwsServiceXmlReader reader)
      throws ServiceXmlDeserializationException, XMLStreamException,
      InstantiationException, IllegalAccessException, ServiceLocalException, Exception {
    super.readElementsFromXml(reader);
    this.subscription.loadFromXml(reader);
  }

  /**
   * Gets the subscription.
   *
   * @return the subscription
   */
  public TSubscription getSubscription() {
    return this.subscription;
  }
}


text:
#ifndef _CNTR_TREE_H_
#define _CNTR_TREE_H_

/*
 * store multi instance in the tree if they equals
 */
#define SET_MULTI_INS           (1 << 0)

/*
 * store single instance in the tree if they equals,
 * when add a new object that equals to an exist object,
 * replace it with the new object.
 * if this bit is not set, when equals, the newly added object
 * will be ignored.
 */
#define SET_EQUAL_REPLACE       (1 << 1)

#endif /* _CNTR_TREE_H_ */


text:
using System;
using RestSharp;

namespace Solitude.Server.Tests
{
	public static class Values
	{
		public static RestClient testClient = new RestClient("http://prozum.dk:8080/api/");
		public static Random r = new Random();
		public static string testUsername, testToken = "", token_type = "";
		public static string password = "Testkurt123!";
	}
}