text:
/**
 * ApproveProposals.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.google.api.ads.dfp.v201308;

/**
 * The action used for approving {@link Proposal} objects.
 */
public class ApproveProposals  extends com.google.api.ads.dfp.v201308.ProposalAction  implements java.io.Serializable {
    /* The list of IDs for the {@link WorkflowAction workflow actions}
     * to approve. This attribute is
     *                     required. */
    private long[] workflowActionIds;

    public ApproveProposals() {
    }

    public ApproveProposals(
           java.lang.String proposalActionType,
           long[] workflowActionIds) {
        super(
            proposalActionType);
        this.workflowActionIds = workflowActionIds;
    }

    /**
     * Gets the workflowActionIds value for this ApproveProposals.
     *
     * @return workflowActionIds   * The list of IDs for the {@link WorkflowAction workflow actions}
     * to approve. This attribute is
     *                     required.
     */
    public long[] getWorkflowActionIds() {
        return workflowActionIds;
    }

    /**
     * Sets the workflowActionIds value for this ApproveProposals.
     *
     * @param workflowActionIds   * The list of IDs for the {@link WorkflowAction workflow actions}
     * to approve. This attribute is
     *                     required.
     */
    public void setWorkflowActionIds(long[] workflowActionIds) {
        this.workflowActionIds = workflowActionIds;
    }

    public long getWorkflowActionIds(int i) {
        return this.workflowActionIds[i];
    }

    public void setWorkflowActionIds(int i, long _value) {
        this.workflowActionIds[i] = _value;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ApproveProposals)) return false;
        ApproveProposals other = (ApproveProposals) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) &&
            ((this.workflowActionIds==null && other.getWorkflowActionIds()==null) ||
             (this.workflowActionIds!=null &&
              java.util.Arrays.equals(this.workflowActionIds, other.getWorkflowActionIds())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = super.hashCode();
        if (getWorkflowActionIds() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getWorkflowActionIds());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getWorkflowActionIds(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(ApproveProposals.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201308", "ApproveProposals"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("workflowActionIds");
        elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201308", "workflowActionIds"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setMaxOccursUnbounded(true);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ config('app.name', 'Laravel') }} </title>
    <base href="{{ asset('') }}">

    <link href='http://fonts.googleapis.com/css?family=Dosis:300,400' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="source/assets/dest/css/font-awesome.min.css">
    <link rel="stylesheet" href="source/assets/dest/vendors/colorbox/example3/colorbox.css">
    <link rel="stylesheet" href="source/assets/dest/rs-plugin/css/settings.css">
    <link rel="stylesheet" href="source/assets/dest/rs-plugin/css/responsive.css">
    <link rel="stylesheet" title="style" href="source/assets/dest/css/style.css">
    <link rel="stylesheet" href="source/assets/dest/css/animate.css">
    <link rel="stylesheet" title="style" href="source/assets/dest/css/huong-style.css">
    <link rel="stylesheet" href="{{ asset('css/style.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" />

</head>
<body>

   @include('layouts.header')
    <div class="rev-slider">
        @yield('content')
    </div>
    @include('layouts.footer')

    <!-- include js files -->
    <!-- jQuery library -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="{{ asset('js/jquery.min.js') }}"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
    <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
    <script src="{{ asset('js/myscript.js') }}"></script>
    <script src="{{ asset('js/myshop.js') }}"></script>
    <!-- <script src="source/assets/dest/js/jquery.js"></script> -->
    <script src="source/assets/dest/vendors/jqueryui/jquery-ui-1.10.4.custom.min.js"></script>
    <script src="source/assets/dest/vendors/bxslider/jquery.bxslider.min.js"></script>
    <script src="source/assets/dest/vendors/colorbox/jquery.colorbox-min.js"></script>
    <script src="source/assets/dest/vendors/animo/Animo.js"></script>
    <script src="source/assets/dest/vendors/dug/dug.js"></script>
    <script src="source/assets/dest/js/scripts.min.js"></script>
   <!--  <script src="source/assets/dest/rs-plugin/js/jquery.themepunch.tools.min.js"></script>
   <script src="source/assets/dest/rs-plugin/js/jquery.themepunch.revolution.min.js"></script> -->
    <script src="source/assets/dest/js/waypoints.min.js"></script>
    <script src="source/assets/dest/js/wow.min.js"></script>

    <!--customjs-->
    <script src="source/assets/dest/js/custom2.js"></script>
    <script>
    $(document).ready(function($) {
        $(window).scroll(function(){
            if($(this).scrollTop()>150){
            $(".header-bottom").addClass('fixNav')
            }else{
                $(".header-bottom").removeClass('fixNav')
            }}
        )
    })
    </script>
    <script>
        $(function(){
            $("#example").dataTable();
        })
    </script>

    <script>
    $('#key').typeahead({
        source:  function (query, process) {
        return $.get ('{{ route('searchdata') }}',
                      { query: query }, function (data) {
                console.log(data);
                data = $.parseJSON(data);

                return process(data);
            });
        }
    });

    </script>
</body>
</html>

redpajama_set_name: RedPajamaGithub


text:
<?php
	include 'connect.php';
	$id = $_GET['id'];
	$id_arc = $_GET['id_arc'];
	mysql_query("update architect_perusahaan set architect_perusahaan_status=0 where architect_perusahaan_id='$id'");
	header("location:architect-perusahaan.php?id=$id_arc");
?>


text:
package org.zstack.header.identity;

import org.zstack.header.configuration.PythonClassInventory;
import org.zstack.header.search.Inventory;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;

@Inventory(mappingVOClass = UserVO.class)
@PythonClassInventory
public class UserInventory {
    private String uuid;
    private String accountUuid;
    private String name;
    private String securityKey;
    private String token;
    private Timestamp createDate;
    private Timestamp lastOpDate;
    private List<UserGroupInventory> groups;
    private List<PolicyInventory> policies;

    public static UserInventory valueOf(UserVO vo) {
        UserInventory inv = new UserInventory();
        inv.setUuid(vo.getUuid());
        inv.setAccountUuid(vo.getAccountUuid());
        inv.setCreateDate(vo.getCreateDate());
        inv.setName(vo.getName());
        inv.setSecurityKey(vo.getSecurityKey());
        inv.setToken(vo.getToken());
        inv.setPolicies(PolicyInventory.valueOf(vo.getPolicies()));
        inv.setGroups(UserGroupInventory.valueOf(vo.getGroups()));
        inv.setLastOpDate(vo.getLastOpDate());
        return inv;
    }

    public static List<UserInventory> valueOf(Collection<UserVO> vos) {
        List<UserInventory> invs = new ArrayList<UserInventory>(vos.size());
        for (UserVO vo : vos) {
            invs.add(UserInventory.valueOf(vo));
        }
        return invs;
    }

    public String getUuid() {
        return uuid;
    }
    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
    public String getAccountUuid() {
        return accountUuid;
    }
    public void setAccountUuid(String accountUuid) {
        this.accountUuid = accountUuid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSecurityKey() {
        return securityKey;
    }
    public void setSecurityKey(String securityKey) {
        this.securityKey = securityKey;
    }
    public String getToken() {
        return token;
    }
    public void setToken(String token) {
        this.token = token;
    }

    public List<PolicyInventory> getPolicies() {
        return policies;
    }

    public void setPolicies(List<PolicyInventory> policies) {
        this.policies = policies;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public Timestamp getLastOpDate() {
        return lastOpDate;
    }

    public void setLastOpDate(Timestamp lastOpDate) {
        this.lastOpDate = lastOpDate;
    }

    public List<UserGroupInventory> getGroups() {
        return groups;
    }

    public void setGroups(List<UserGroupInventory> groups) {
        this.groups = groups;
    }
}


text:
/*
 * styling for goog.ui.menuBar and child buttons.
 *
 * @author tvykruta@google.com (Tomas Vykruta)
 */

.goog-menubar {
  cursor: default;
  outline: none;
  position: relative;
  white-space: nowrap;
  background: #fff;
}

.goog-menubar .goog-menu-button {
  padding: 1px 1px;
  margin: 0px 0px;
  outline: none;
  border: none;
  background: #fff;
  border: 1px solid #fff;
}

.goog-menubar .goog-menu-button-dropdown {
  display: none;
}

.goog-menubar .goog-menu-button-outer-box {
  border: none;
}

.goog-menubar .goog-menu-button-inner-box {
  border: none;
}

.goog-menubar .goog-menu-button-hover {
  background: #eee;
  border: 1px solid #eee;
}

.goog-menubar .goog-menu-button-open {
  background: #fff;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
}

.goog-menubar .goog-menu-button-disabled {
  color: #ccc;
}


text:
<!DOCTYPE html>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>오라클 클라우드 - IaaS</title>
<meta name="description" content="오라클 클라우드 기술 블로그">
<meta name="generator" content="Hugo 0.20.2" />
<meta property="og:title" content="오라클 클라우드 - IaaS" />
<meta property="og:description" content="" />
<meta property="og:type" content="article" />
<meta property="og:url" content="/opc-iaas/" />

<meta property="article:published_time" content="2017-04-05T10:31:21+09:00"/>
<meta property="article:modified_time" content="2017-04-05T10:31:21+09:00"/>

<link rel="dns-prefetch" href="//fonts.googleapis.com" />

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700" type="text/css" media="all" />
<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="/css/minsu.css" type="text/css" media="all" />

<link rel="shortcut icon" type="image/x-icon" href="/img/icon/oracle.png" />

한국 오라클 클라우드 팀

Oracle Public Cloud - 기술블로그

HOME

ORACLE CLOUD 소개

OPC IAAS

OPC PAAS

오라클 클라우드 새소식

오라클 클라우드 챗팅룸

오라클 클라우드 - IaaS

				<svg class="icon icon-time" height="14" viewBox="0 0 16 16" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m8-.0000003c-4.4 0-8 3.6-8 8 0 4.4000003 3.6 8.0000003 8 8.0000003 4.4 0 8-3.6 8-8.0000003 0-4.4-3.6-8-8-8zm0 14.4000003c-3.52 0-6.4-2.88-6.4-6.4000003 0-3.52 2.88-6.4 6.4-6.4 3.52 0 6.4 2.88 6.4 6.4 0 3.5200003-2.88 6.4000003-6.4 6.4000003zm.4-10.4000003h-1.2v4.8l4.16 2.5600003.64-1.04-3.6-2.1600003z"/></svg>
				<time class="post__meta-date" datetime="2017-04-05 10:31:21 +0900 KST">April 05, 2017</time>

		«Previous
오라클 클라우드 소개

		Next»
Oracle Public Cloud - PaaS

Please enable JavaScript to view the comments powered by Disqus.
comments powered by Disqus

	<form class="widget-search__form" role="search" method="get" action="//google.com/search">

			Search for:
			<input class="widget-search__field" type="search" placeholder="SEARCH..." value="" name="q">

		<input class="widget-search__submit" type="submit" value="Search">
		<input type="hidden" name="sitesearch" value="/" />
	</form>

최신글

taewan.kim 페이지

Oracle Container CS 생성 절차

Oracle Container Cloud Service 소개와 Docker 개요

오라클 클라우드에서 window VM 인스턴스 생성

오라클 IaaS를 이용한 VM 인스턴스 생성

오라클 클라우드 계정 생성하기

oracloud.kr 오픈

Posts

카테고리

Cloud

Container

Docker

Iaas

Oracle

Oracle-Cloud

테그

		cloud (3)
		demo (1)
		docker (2)
		iaas (2)
		oracle (3)
		oracle-cloud (2)
		tutorial (2)
		virtualization (1)
		vm (1)
		window (1)

SNS(Social Network Service)

오라클 클라우드 관련 사이트

				Oracle Public Cloud 홈페이지

				Oracle Developers

				오라클 클라우드 문서

				Oracle Learning Library

© 2017 한국 오라클 클라우드 팀.


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.

Device
=======

The Device abstract represents any hardware device with memory and compuation units.
All [Tensor operations](tensor.html) are scheduled by the resident device for execution.
Tensor memory is also managed by the device's memory manager. Therefore, optimization
of memory and execution are implemented in the Device class.

Specific devices
----------------
Currently, SINGA has three Device implmentations,

1. CudaGPU for an Nvidia GPU card which runs Cuda code
2. CppCPU for a CPU which runs Cpp code
3. OpenclGPU for a GPU card which runs OpenCL code

Python API
----------

.. automodule:: singa.device
   :members: create_cuda_gpus, create_cuda_gpus_on, get_default_device

The following code provides examples of creating devices::

   from singa import device
   cuda = device.create_cuda_gpu_on(0)  # use GPU card of ID 0
   host = device.get_default_device()  # get the default host device (a CppCPU)
   ary1 = device.create_cuda_gpus(2)  # create 2 devices, starting from ID 0
   ary2 = device.create_cuda_gpus([0,2])  # create 2 devices on ID 0 and 2

CPP API
---------


text:
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/*
 Copyright (C) 2009 Chris Kenyon

 This file is part of QuantLib, a free-software/open-source library
 for financial quantitative analysts and developers - http://quantlib.org/

 QuantLib is free software: you can redistribute it and/or modify it
 under the terms of the QuantLib license.  You should have received a
 copy of the license along with this program; if not, please email
 <quantlib-dev@lists.sf.net>. The license is also available online at
 <http://quantlib.org/license.shtml>.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.
 */

#include <ql/cashflows/inflationcoupon.hpp>
#include <ql/cashflows/cashflowvectors.hpp>
#include <ql/time/daycounters/thirty360.hpp>

#include <ql/cashflows/cpicoupon.hpp>
#include <ql/cashflows/cpicouponpricer.hpp>

namespace QuantLib {

    CPICoupon::
    CPICoupon(
              Real baseCPI, // user provided
              const Date& paymentDate,
              Real nominal,
              const Date& startDate,
              const Date& endDate,
              Natural fixingDays,
              const boost::shared_ptr<ZeroInflationIndex>& zeroIndex,
              const Period& observationLag,
              CPI::InterpolationType observationInterpolation,
              const DayCounter& dayCounter,
              Real fixedRate, // aka gearing
              Spread spread,
              const Date& refPeriodStart,
              const Date& refPeriodEnd)
    : InflationCoupon(paymentDate, nominal, startDate, endDate,
                      fixingDays, zeroIndex, observationLag,
                      dayCounter, refPeriodStart, refPeriodEnd),
        baseCPI_(baseCPI), fixedRate_(fixedRate), spread_(spread),
        observationInterpolation_(observationInterpolation) {

            QL_REQUIRE(std::fabs(baseCPI_) > 1e-16,
                       "|baseCPI_| < 1e-16, future divide-by-zero problem");
        }

    void CPICoupon::accept(AcyclicVisitor& v) {
        Visitor<CPICoupon>* v1 =
        dynamic_cast<Visitor<CPICoupon>*>(&v);
        if (v1 != 0)
            v1->visit(*this);
        else
            InflationCoupon::accept(v);
    }

    bool CPICoupon::checkPricerImpl(
            const boost::shared_ptr<InflationCouponPricer>&pricer) const {
        return static_cast<bool>(
                        boost::dynamic_pointer_cast<CPICouponPricer>(pricer));
    }

    Rate CPICoupon::indexFixing(const Date &d) const {
        // you may want to modify the interpolation of the index
        // this gives you the chance

        Rate I1;
        // what interpolation do we use? Index / flat / linear
        if (observationInterpolation() == CPI::AsIndex) {
            I1 = cpiIndex()->fixing(d);

        } else {
            // work out what it should be
            std::pair<Date,Date> dd = inflationPeriod(d, cpiIndex()->frequency());
            Real indexStart = cpiIndex()->fixing(dd.first);
            if (observationInterpolation() == CPI::Linear) {
                Real indexEnd = cpiIndex()->fixing(dd.second+Period(1,Days));
                // linear interpolation
                I1 = indexStart + (indexEnd - indexStart) * (d - dd.first)
                / (Real)( (dd.second+Period(1,Days)) - dd.first); // can't get to next period's value within current period
            } else {
                // no interpolation, i.e. flat = constant, so use start-of-period value
                I1 = indexStart;
            }

        }
        return I1;
    }

    Date CPICashFlow::baseDate() const {
        // you may not have a valid date
        QL_FAIL("no base date specified");
    }

    Real CPICashFlow::baseFixing() const {
        return baseFixing_;
    }

    Real CPICashFlow::amount() const {
        Real I0 = baseFixing();
        Real I1;

        // what interpolation do we use? Index / flat / linear
        if (interpolation() == CPI::AsIndex ) {
            I1 = index()->fixing(fixingDate());
        } else {
            // work out what it should be
            //std::cout << fixingDate() << " and " << frequency() << std::endl;
            //std::pair<Date,Date> dd = inflationPeriod(fixingDate(), frequency());
            //std::cout << fixingDate() << " and " << dd.first << " " << dd.second << std::endl;
            // work out what it should be
            std::pair<Date,Date> dd = inflationPeriod(fixingDate(), frequency());
            Real indexStart = index()->fixing(dd.first);
            if (interpolation() == CPI::Linear) {
                Real indexEnd = index()->fixing(dd.second+Period(1,Days));
                // linear interpolation
                //std::cout << indexStart << " and " << indexEnd << std::endl;
                I1 = indexStart + (indexEnd - indexStart) * (fixingDate() - dd.first)
                / ( (dd.second+Period(1,Days)) - dd.first); // can't get to next period's value within current period
            } else {
                // no interpolation, i.e. flat = constant, so use start-of-period value
                I1 = indexStart;
            }

        }

        if (growthOnly())
            return notional() * (I1 / I0 - 1.0);
        else
            return notional() * (I1 / I0);
    }

    CPILeg::CPILeg(const Schedule& schedule, const boost::shared_ptr<ZeroInflationIndex>& index,
                   const Real baseCPI, const Period& observationLag) :
    schedule_(schedule), index_(index),
    baseCPI_(baseCPI), observationLag_(observationLag),
    paymentDayCounter_(Thirty360()),
    paymentAdjustment_(ModifiedFollowing),
    fixingDays_(std::vector<Natural>(1,0)),
    observationInterpolation_(CPI::AsIndex),
    subtractInflationNominal_(true),
    spreads_(std::vector<Real>(1,0))
    {}

    CPILeg& CPILeg::withObservationInterpolation(CPI::InterpolationType interp) {
        observationInterpolation_ = interp;
        return *this;
    }

    CPILeg& CPILeg::withFixedRates(Real fixedRate) {
        fixedRates_ = std::vector<Real>(1,fixedRate);
        return *this;
    }

    CPILeg& CPILeg::withFixedRates(const std::vector<Real>& fixedRates) {
        fixedRates_ =   fixedRates;
        return *this;
    }

    CPILeg& CPILeg::withNotionals(Real notional) {
        notionals_ = std::vector<Real>(1,notional);
        return *this;
    }

    CPILeg& CPILeg::withNotionals(const std::vector<Real>& notionals) {
        notionals_ = notionals;
        return *this;
    }

    CPILeg& CPILeg::withSubtractInflationNominal(bool growthOnly) {
        subtractInflationNominal_ = growthOnly;
        return *this;
    }

    CPILeg& CPILeg::withPaymentDayCounter(const DayCounter& dayCounter) {
        paymentDayCounter_ = dayCounter;
        return *this;
    }

    CPILeg& CPILeg::withPaymentAdjustment(BusinessDayConvention convention) {
        paymentAdjustment_ = convention;
        return *this;
    }

    CPILeg& CPILeg::withFixingDays(Natural fixingDays) {
        fixingDays_ = std::vector<Natural>(1,fixingDays);
        return *this;
    }

    CPILeg& CPILeg::withFixingDays(const std::vector<Natural>& fixingDays) {
        fixingDays_ = fixingDays;
        return *this;
    }

    CPILeg& CPILeg::withSpreads(Spread spread) {
        spreads_ = std::vector<Spread>(1,spread);
        return *this;
    }

    CPILeg& CPILeg::withSpreads(const std::vector<Spread>& spreads) {
        spreads_ = spreads;
        return *this;
    }

    CPILeg& CPILeg::withCaps(Rate cap) {
        caps_ = std::vector<Rate>(1,cap);
        return *this;
    }

    CPILeg& CPILeg::withCaps(const std::vector<Rate>& caps) {
        caps_ = caps;
        return *this;
    }

    CPILeg& CPILeg::withFloors(Rate floor) {
        floors_ = std::vector<Rate>(1,floor);
        return *this;
    }

    CPILeg& CPILeg::withFloors(const std::vector<Rate>& floors) {
        floors_ = floors;
        return *this;
    }

    CPILeg::operator Leg() const {

        QL_REQUIRE(!notionals_.empty(), "no notional given");
        Size n = schedule_.size()-1;
        Calendar calendar = schedule_.calendar();
        Leg leg;
        leg.reserve(n+1);   // +1 for notional, we always have some sort ...
        if (n>0) {
            QL_REQUIRE(!fixedRates_.empty() || !spreads_.empty(),
                       "no fixedRates or spreads given");

            Date refStart, start, refEnd, end;

            for (Size i=0; i<n; ++i) {
                refStart = start = schedule_.date(i);
                refEnd   =   end = schedule_.date(i+1);
                Date paymentDate = calendar.adjust(end, paymentAdjustment_);
                if (i==0   && !schedule_.isRegular(i+1)) {
                    BusinessDayConvention bdc = schedule_.businessDayConvention();
                    refStart = schedule_.calendar().adjust(end - schedule_.tenor(), bdc);
                }
                if (i==n-1 && !schedule_.isRegular(i+1)) {
                    BusinessDayConvention bdc = schedule_.businessDayConvention();
                    refEnd = schedule_.calendar().adjust(start + schedule_.tenor(), bdc);
                }
                if (detail::get(fixedRates_, i, 1.0) == 0.0) { // fixed coupon
                    leg.push_back(boost::shared_ptr<CashFlow>
                                  (new FixedRateCoupon
                                   (paymentDate, detail::get(notionals_, i, 0.0),
                                    detail::effectiveFixedRate(spreads_,caps_,floors_,i),
                                    paymentDayCounter_, start, end, refStart, refEnd)));
                } else { // zero inflation coupon
                    if (detail::noOption(caps_, floors_, i)) { // just swaplet
                        boost::shared_ptr<CPICoupon> coup;

                        coup = boost::shared_ptr<CPICoupon>
                            (new CPICoupon(baseCPI_,    // all have same base for ratio
                                     paymentDate,
                                     detail::get(notionals_, i, 0.0),
                                     start, end,
                                     detail::get(fixingDays_, i, 0.0),
                                     index_, observationLag_,
                                     observationInterpolation_,
                                     paymentDayCounter_,
                                     detail::get(fixedRates_, i, 0.0),
                                     detail::get(spreads_, i, 0.0),
                                     refStart, refEnd));

                        // in this case you can set a pricer
                        // straight away because it only provides computation - not data
                        boost::shared_ptr<CPICouponPricer> pricer
                            (new CPICouponPricer);
                        coup->setPricer(pricer);
                        leg.push_back(boost::dynamic_pointer_cast<CashFlow>(coup));

                    } else  {     // cap/floorlet
                        QL_FAIL("caps/floors on CPI coupons not implemented.");
                    }
                }
            }
        }

        // in CPI legs you always have a notional flow of some sort
        Date paymentDate = calendar.adjust(schedule_.date(n), paymentAdjustment_);
        Date fixingDate = paymentDate - observationLag_;
        boost::shared_ptr<CashFlow> xnl(new CPICashFlow
                          (detail::get(notionals_, n, 0.0), index_,
                           Date(), // is fake, i.e. you do not have one
                           baseCPI_, fixingDate, paymentDate,
                           subtractInflationNominal_, observationInterpolation_,
                           index_->frequency())
                         );
        leg.push_back(xnl);

        return leg;
    }

} // namespace RiskLib


text:
namespace FLS.Data.WebApi.Aircraft
{
    public class AircraftStateListItem
    {
        public int AircraftStateId { get; set; }

        public string AircraftStateName { get; set; }

        public bool IsAircraftFlyable { get; set; }

    }
}


text:
import React, { Component } from 'react';
import PropTypes from 'utils/PropTypes';
import { toJS } from 'mobx';
import { observer } from 'mobx-react';
import { isEmpty } from 'utils/fp';
import clearSortedInfo from 'utils/clearSortedInfo';
import { TABLE } from 'utils/Issuers';
import withIssuer from 'hocs/withIssuer';
import TableContext from './TableContext';
import { Table as AntdTable } from 'antd';
import TableCell from './TableCell';
import TableHeadCell from './TableHeadCell';

const components = {
	header: { cell: TableHeadCell },
	body: { cell: TableCell },
};

@withIssuer({ issuer: TABLE })
@observer
export default class TableView extends Component {
	static propTypes = {
		store: PropTypes.shape({
			columns: PropTypes.array.isRequired,
			collection: PropTypes.array,
			isFetching: PropTypes.bool.isRequired,
			size: PropTypes.number.isRequired,
			setSelectedKeys: PropTypes.func.isRequired,
			toggleSelectedKey: PropTypes.func.isRequired,
			query: PropTypes.object.isRequired,
			config: PropTypes.object.isRequired,
		}),
		rowSelection: PropTypes.any,
		selectionType: PropTypes.oneOf(['checkbox', 'radio']),
	};

	static defaultProps = {
		selectionType: 'checkbox',
	};

	static contextTypes = {
		appConfig: PropTypes.object.isRequired,
	};

	constructor(props) {
		super(props);

		this.tableContext = { toggleSelectedKey: this._toggleSelectedKey };
	}

	_toggleSelectedKey = (selectedRowKey) => {
		if (this.props.selectionType === 'radio') {
			this.props.store.toggleSelectedKey(selectedRowKey);
		}
	};

	_handleSelectChange = (selectedRowKeys) => {
		this.props.store.setSelectedKeys(selectedRowKeys);
	};

	_handleChange = (pagination, filters, sorter) => {
		const {
			context: {
				appConfig,
				appConfig: {
					api: { sortKey, orderKey, descValue, ascValue },
				},
			},
			props: { store },
		} = this;
		if (isEmpty(sorter)) {
			return clearSortedInfo(appConfig);
		}
		store.setQuery({
			...store.query,
			[sortKey]: sorter.columnKey,
			[orderKey]: sorter.order === 'descend' ? descValue : ascValue,
		});
	};

	render() {
		const {
			props: { store, selectionType, rowSelection },
		} = this;
		const {
			columns,
			collection,
			isFetching,
			selectedKeys,
			uniqueKey,
			maxSelections,
			config,
		} = store;

		const defaultRowSelection = maxSelections ?
			{
				type: selectionType,
				selectedRowKeys: selectedKeys,
				onChange: this._handleSelectChange,
				getCheckboxProps: (record) => ({
					disabled:
							selectionType === 'checkbox' &&
							maxSelections > 0 &&
							selectedKeys.length >= maxSelections &&
							selectedKeys.indexOf(record[uniqueKey]) < 0,
				}),
			  } :
			undefined;

		return (
			<TableContext.Provider value={this.tableContext}>
				<AntdTable
					rowSelection={rowSelection || defaultRowSelection}
					columns={columns}
					dataSource={toJS(collection)}
					loading={isFetching}
					pagination={false}
					components={components}
					onChange={this._handleChange}
					size={config.viewSize}
				/>
			</TableContext.Provider>
		);
	}
}


text:
/**
 * \file HecoDSMDataGenerator.h
 * \date Apr 15, 2010
 * \author samael
 */

#ifndef HECODSMDATAGENERATOR_H_
#define HECODSMDATAGENERATOR_H_

#include <AActor.h>
#include <CSharedMemory.h>
#include <IDrop.h>

class HecoDSMDataGenerator: public wolf::AActor
{
public:
	HecoDSMDataGenerator(): _state(READY) { addPort(wolf::IPort::SOURCE); }
	~HecoDSMDataGenerator() { delete sourcePorts()[0]; }
	State state() { return _state; }
	void prefire();
	void fire();
	void postfire();

private:
	wolf::SharedMemory *_item;
	State _state;
};

#endif /* HECODSMDATAGENERATOR_H_ */


text:
package main

import (
	"flag"
	"fmt"
	"log"
	"net/url"
	"strings"
	"time"

	"github.com/coreos/etcd/clientv3"
	"github.com/jonathanwei/wile"
	"golang.org/x/crypto/acme"
	"golang.org/x/crypto/acme/autocert"
)

func main() {
	var (
		backendsFlag = flag.String("backends", "", "Comma-separated list of backends. Each backend is of the form <short-name>:<url>")
		hostsFlag    = flag.String("hosts", "", "Comma-separated list of hosts to serve and their correspondin backend. Each host is of the form <host>:<backend>")
		development  = flag.Bool("insecure_development_mode", false, "True iff the server should run in an insecure development mode.")
		acmeEndpoint = flag.String("acme", "https://acme-staging.api.letsencrypt.org/directory", "The ACME server to sign certs.")
		acmeEmail    = flag.String("email", "", "The email to use when registering with acme.")
		certKey      = flag.String("cert_key", "", "The key to encrypt certificates in etcd.")
	)

	flag.Parse()

	if *certKey == "" {
		log.Fatal("Must provide -cert_key")
	}

	backends := parseBackendSpecs(*backendsFlag)
	hosts := parseHostSpecs(*hostsFlag, backends)

	var domains []string
	for h := range hosts {
		domains = append(domains, h)
	}

	etcd, err := clientv3.New(clientv3.Config{
		Endpoints:   []string{"localhost:2378"},
		DialTimeout: 5 * time.Second,
	})
	if err != nil {
		log.Fatalf("Failed to connect to etcd: %v", err)
	}

	cache, err := wile.NewEncryptingCache(wile.NewEtcdCache(etcd, "/wile/acme/http"), []byte(*certKey))
	if err != nil {
		log.Fatalf("Failed to create cache: %v", err)
	}

	m := autocert.Manager{
		Prompt:      autocert.AcceptTOS,
		Cache:       cache,
		HostPolicy:  autocert.HostWhitelist(domains...),
		RenewBefore: 30 * 24 * time.Hour,
		Client:      &acme.Client{DirectoryURL: *acmeEndpoint},
		Email:       *acmeEmail,
	}

	run(backends, hosts, *development, &m)
}

func parseBackendSpecs(specs string) map[string]*url.URL {
	backends := make(map[string]*url.URL)
	for _, spec := range strings.Split(specs, ",") {
		fatal := func(msg string) {
			log.Fatalf("Invalid backend spec %q, %s", spec, msg)
		}

		idx := strings.Index(spec, ":")
		if idx == -1 {
			fatal("missing ':'")
		}

		name := spec[:idx]
		ustr := spec[idx+1:]

		if len(name) == 0 {
			fatal("empty name not allowed")
		}

		if len(ustr) == 0 {
			fatal("empty url not allowed")
		}

		if _, ok := backends[name]; ok {
			fatal("duplicate backend name")
		}

		u, err := url.Parse(ustr)
		if err != nil {
			fatal(fmt.Sprintf("couldn't parse url: %v", err))
		}

		backends[name] = u
	}

	return backends
}

func parseHostSpecs(specs string, backends map[string]*url.URL) map[string]string {
	hosts := make(map[string]string)
	for _, spec := range strings.Split(specs, ",") {
		fatal := func(msg string) {
			log.Fatalf("Invalid host spec %q, %s", spec, msg)
		}

		idx := strings.Index(spec, ":")
		if idx == -1 {
			fatal("missing ':'")
		}

		host := spec[:idx]
		backend := spec[idx+1:]

		if len(host) == 0 {
			fatal("empty host not allowed")
		}

		if _, ok := hosts[host]; ok {
			fatal("duplicate host not allowed")
		}

		if _, ok := backends[backend]; !ok {
			fatal("unknown backend")
		}

		hosts[host] = backend
	}

	return hosts
}


text:
package rakatan.data;

import java.io.PrintStream;

import net.phys2d.raw.Body;
import net.phys2d.raw.StaticBody;
import net.phys2d.raw.World;
import net.phys2d.raw.shapes.Box;

import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.geom.Rectangle;
import org.newdawn.slick.geom.Shape;
import org.w3c.dom.Element;

import rakatan.ShapeRenderer;

/**
 * TODO: Document this class
 *
 * @author kevin
 */
public class StaticBlockElement extends LevelElement {
	private int x;
	private int y;
	private int width;
	private int height;

	StaticBlockElement() {
	}

	public StaticBlockElement(int x, int y,int width, int height, Image image) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
		this.image = image;
		this.color = Color.white;

		body = new StaticBody(new Box(width * Level.SCALE,height * Level.SCALE));
		body.setPosition((x+(width/2))*Level.SCALE, (y+(height/2))*Level.SCALE);

		shapes.add(new Rectangle(-(width/2)*Level.SCALE,-(height/2)*Level.SCALE,width*Level.SCALE,height*Level.SCALE));
	}

	public boolean contains(float x, float y) {
		return false;
	}

	public void addToWorld(World world) {
		world.add(body);
	}

	protected void fillShape(Graphics g) {
		for (int i=0;i<shapes.size();i++) {
			ShapeRenderer.fill((Shape) shapes.get(i), image, 0.005f / Level.SCALE);
		}
	}

	/**
	 * @see rakatan.data.LevelElement#update(int)
	 */
	public void update(int delta) {
	}

	/**
	 * @see rakatan.data.LevelElement#save(java.io.PrintStream)
	 */
	public void save(PrintStream pout) {
		pout.print("<StaticBlock ");
		pout.print("id=\""+id+"\" ");
		pout.print("width=\""+width+"\" ");
		pout.print("height=\""+height+"\" ");
		pout.print("x=\""+x+"\" ");
		pout.print("y=\""+y+"\" ");
		pout.println(">");
		pout.println("</StaticBlock>");
	}

	/**
	 * @see rakatan.data.LevelElement#load(org.w3c.dom.Element, org.newdawn.slick.Image, org.newdawn.slick.Image)
	 */
	public LevelElement load(Element xml, Image stat, Image dynamic) {
		int id = Integer.parseInt(xml.getAttribute("id"));
		float width = Float.parseFloat(xml.getAttribute("width"));
		float height = Float.parseFloat(xml.getAttribute("height"));
		float x = Float.parseFloat(xml.getAttribute("x"));
		float y = Float.parseFloat(xml.getAttribute("y"));

		StaticBlockElement block = new StaticBlockElement((int) x,(int) y,(int) width,(int) height,stat);
		block.setID(id);

		return block;
	}

	public boolean isSameKind(LevelElement other) {
		if (other instanceof StaticBlockElement) {
			StaticBlockElement o = (StaticBlockElement) other;

			return (o.width == this.width) && (o.height == this.height);
		}

		return false;
	}
}


text:
export default function transitionEmit({ swiper, runCallbacks, direction, step }) {
  const { activeIndex, previousIndex } = swiper;
  let dir = direction;
  if (!dir) {
    if (activeIndex > previousIndex) dir = 'next';
    else if (activeIndex < previousIndex) dir = 'prev';
    else dir = 'reset';
  }

  swiper.emit(`transition${step}`);

  if (runCallbacks && activeIndex !== previousIndex) {
    if (dir === 'reset') {
      swiper.emit(`slideResetTransition${step}`);
      return;
    }
    swiper.emit(`slideChangeTransition${step}`);
    if (dir === 'next') {
      swiper.emit(`slideNextTransition${step}`);
    } else {
      swiper.emit(`slidePrevTransition${step}`);
    }
  }
}


text:
namespace Castle.DynamicProxy.Test
{
	using System;

	using NUnit.Framework;

	using Castle.DynamicProxy.Test.Classes;
	using Castle.DynamicProxy.Test.Mixins;
	using Castle.DynamicProxy.Test.ClassInterfaces;

	/// <summary>
	/// Summary description for CachedTypeTestCase.
	/// </summary>
#if !MONO
	[TestFixture]
#endif
	[Category("DotNetOnly")]
	public class MixinTestCase
	{
		private ProxyGenerator _generator;

		[SetUp]
		public void Init()
		{
			_generator = new ProxyGenerator();
		}

		[Test]
		public void SimpleMixin()
		{
			GeneratorContext context = new GeneratorContext();
			SimpleMixin mixin_instance = new SimpleMixin();
			context.AddMixinInstance( mixin_instance );

			AssertInvocationInterceptor interceptor = new AssertInvocationInterceptor();

			object proxy = _generator.CreateCustomClassProxy(
				typeof(SimpleClass), interceptor, context );

			Assert.IsNotNull(proxy);
			Assert.IsTrue( typeof(SimpleClass).IsAssignableFrom( proxy.GetType() ) );

			Assert.IsFalse( interceptor.Invoked );

			ISimpleMixin mixin = proxy as ISimpleMixin;
			Assert.IsNotNull(mixin);
			Assert.AreEqual(1, mixin.DoSomething());

			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin_instance, interceptor.mixin );
		}

		[Test]
		public void TwoMixins()
		{
			GeneratorContext context = new GeneratorContext();
			SimpleMixin mixin1 = new SimpleMixin();
			OtherMixin mixin2 = new OtherMixin();

			context.AddMixinInstance( mixin1 );
			context.AddMixinInstance( mixin2 );

			AssertInvocationInterceptor interceptor = new AssertInvocationInterceptor();

			object proxy = _generator.CreateCustomClassProxy(
				typeof(SimpleClass), interceptor, context );

			Assert.IsFalse( interceptor.Invoked );

			Assert.IsNotNull(proxy);
			Assert.IsTrue( typeof(SimpleClass).IsAssignableFrom( proxy.GetType() ) );

			ISimpleMixin mixin = proxy as ISimpleMixin;
			Assert.IsNotNull(mixin);
			Assert.AreEqual(1, mixin.DoSomething());

			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin1, interceptor.mixin );

			IOtherMixin other = proxy as IOtherMixin;
			Assert.IsNotNull(other);
			Assert.AreEqual(3, other.Sum(1,2));
			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin2, interceptor.mixin );

		}

		[Test]
		public void MixinImplementingMoreThanOneInterface()
		{
			GeneratorContext context = new GeneratorContext();
			ComplexMixin mixin_instance = new ComplexMixin();
			context.AddMixinInstance( mixin_instance );

			AssertInvocationInterceptor interceptor = new AssertInvocationInterceptor();

			object proxy = _generator.CreateCustomClassProxy(
				typeof(SimpleClass), interceptor, context );

			Assert.IsNotNull(proxy);
			Assert.IsTrue( typeof(SimpleClass).IsAssignableFrom( proxy.GetType() ) );

			Assert.IsFalse( interceptor.Invoked );

			IThird inter3 = proxy as IThird;
			Assert.IsNotNull(inter3);
			inter3.DoThird();

			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin_instance, interceptor.mixin );

			ISecond inter2 = proxy as ISecond;
			Assert.IsNotNull(inter2);
			inter2.DoSecond();

			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin_instance, interceptor.mixin );

			IFirst inter1 = proxy as IFirst;
			Assert.IsNotNull(inter1);
			inter1.DoFirst();

			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin_instance, interceptor.mixin );
		}

		[Test]
		public void MixinForInterfaces()
		{
			GeneratorContext context = new GeneratorContext();
			SimpleMixin mixin_instance = new SimpleMixin();
			context.AddMixinInstance( mixin_instance );

			AssertInvocationInterceptor interceptor = new AssertInvocationInterceptor();

			MyInterfaceImpl target = new MyInterfaceImpl();

			object proxy = _generator.CreateCustomProxy(
				typeof(IMyInterface), interceptor, target, context );

			Assert.IsNotNull(proxy);
			Assert.IsTrue( typeof(IMyInterface).IsAssignableFrom( proxy.GetType() ) );

			Assert.IsFalse( interceptor.Invoked );

			ISimpleMixin mixin = proxy as ISimpleMixin;
			Assert.IsNotNull(mixin);
			Assert.AreEqual(1, mixin.DoSomething());

			Assert.IsTrue( interceptor.Invoked );
			Assert.AreSame( proxy, interceptor.proxy );
			Assert.AreSame( mixin_instance, interceptor.mixin );
		}
	}

	public class AssertInvocationInterceptor : StandardInterceptor
	{
		public bool Invoked;
		public object proxy;
		public object mixin;

		protected override void PreProceed(IInvocation invocation, params object[] args)
		{
			Invoked = true;
			mixin = invocation.InvocationTarget;
			proxy = invocation.Proxy;

			base.PreProceed(invocation, args);
		}
	}
}


text:
package cn.itcast_06;

public class Student {
	private String name;
	private int age;

	public Student() {
		super();
	}

	public Student(String name, int age) {
		super();
		this.name = name;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

}


text:
"""This is an experimental deployment script for Oppia. It should only be used
for experimental testing, since it omits several safeguards: for example, it
does not run tests and it does not use a 'deploy_data' folder.

USE THIS SCRIPT AT YOUR OWN RISK!

Note:

1.  Before running this script, you must install third-party dependencies by
    running

        bash scripts/start.sh

    at least once.

2.  This script should be run from the oppia root folder:

        python scripts/experimental_deploy.py --app_name=[APP_NAME]

    where [APP_NAME] is the name of your app. Note that the root folder MUST be
    named 'oppia'.
"""

import argparse
import datetime
import os
import shutil
import subprocess

import common

_PARSER = argparse.ArgumentParser()
_PARSER.add_argument(
    '--app_name', help='name of the app to deploy to', type=str)

parsed_args = _PARSER.parse_args()
if parsed_args.app_name:
    APP_NAME = parsed_args.app_name
    if APP_NAME in ['oppiaserver', 'oppiatestserver']:
        raise Exception(
            'This script should not be used for updating %s. Please use '
            'scripts/deploy.py instead.' % APP_NAME)
else:
    raise Exception('No app name specified.')

CURRENT_DATETIME = datetime.datetime.utcnow()

RELEASE_DIR_NAME = '%s-experimental-deploy-%s' % (
    '-'.join('-'.join(APP_NAME.split('.')).split(':')),
    CURRENT_DATETIME.strftime('%Y%m%d-%H%M%S'))
RELEASE_DIR_PATH = os.path.join(os.getcwd(), '..', RELEASE_DIR_NAME)

APPCFG_PATH = os.path.join(
    '..', 'oppia_tools', 'google_appengine_1.9.11', 'google_appengine',
    'appcfg.py')

LOG_FILE_PATH = os.path.join('..', 'experimental_deploy.log')

THIRD_PARTY_DIR = os.path.join('.', 'third_party')

def preprocess_release():
    """Pre-processes release files.

    This function should be called from within RELEASE_DIR_NAME. Currently it
    does the following:

    (1) Changes the app name in app.yaml to APP_NAME.
    """
    # Change the app name in app.yaml.
    f = open('app.yaml', 'r')
    content = f.read()
    os.remove('app.yaml')
    content = content.replace('oppiaserver', APP_NAME)
    d = open('app.yaml', 'w+')
    d.write(content)

# Check that the current directory is correct.
common.require_cwd_to_be_oppia()

CURRENT_GIT_VERSION = subprocess.check_output(
    ['git', 'rev-parse', 'HEAD']).strip()

print ''
print 'Starting experimental deployment process.'

if not os.path.exists(THIRD_PARTY_DIR):
    raise Exception(
        'Could not find third_party directory at %s. Please run start.sh '
        'prior to running this script.' % THIRD_PARTY_DIR)

# Create a folder in which to save the release candidate.
print 'Ensuring that the release directory parent exists'
common.ensure_directory_exists(os.path.dirname(RELEASE_DIR_PATH))

# Copy files to the release directory. Omits the .git subfolder.
print 'Copying files to the release directory'
shutil.copytree(
    os.getcwd(), RELEASE_DIR_PATH, ignore=shutil.ignore_patterns('.git'))

# Change the current directory to the release candidate folder.
with common.CD(RELEASE_DIR_PATH):
    if not os.getcwd().endswith(RELEASE_DIR_NAME):
        raise Exception(
            'Invalid directory accessed during deployment: %s' % os.getcwd())

    print 'Changing directory to %s' % os.getcwd()

    print 'Preprocessing release...'
    preprocess_release()

    # Do a build; ensure there are no errors.
    print 'Building and minifying scripts...'
    subprocess.check_output(['python', 'scripts/build.py'])

    # Deploy to GAE.
    subprocess.check_output([APPCFG_PATH, 'update', '.', '--oauth2'])

    # Writing log entry.
    common.ensure_directory_exists(os.path.dirname(LOG_FILE_PATH))
    with open(LOG_FILE_PATH, 'a') as log_file:
        log_file.write(
            'Successfully completed experimental deployment to %s at %s '
            '(version %s)\n' % (
                APP_NAME, CURRENT_DATETIME.strftime('%Y-%m-%d %H:%M:%S'),
                CURRENT_GIT_VERSION))

    print 'Returning to oppia/ root directory.'

print 'Done!'


text:
execute "Install the dependant gcc-c++" do
 user "root"
 cwd "/tmp/"
 command "zypper -n --no-gpg-checks install -l gcc-c++"
  action :run
end

execute "Install the dependant sqlite3-devel" do
 user "root"
 cwd "/tmp/"
 command " zypper -n --no-gpg-checks install -l sqlite3-devel"
  action :run
end

execute "Install mailcatcher" do
 user "root"
 cwd "/tmp/"
 command "gem install mailcatcher --no-rdoc --no-ri --no-format-executable"
  action :run
end

  execute "Start mailcatcher" do
 user "root"
 cwd "/tmp/"
 command "mailcatcher --ip=0.0.0.0"
  action :run
end


text:
package com.amazonaws.services.sns.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *

 * The endpoint for mobile app and device.
 *

 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Endpoint implements Serializable, Cloneable {

    /**
     *

     * The EndpointArn for mobile app and device.
     *

     */
    private String endpointArn;
    /**
     *

     * Attributes for endpoint.
     *

     */
    private com.amazonaws.internal.SdkInternalMap<String, String> attributes;

    /**
     *

     * The EndpointArn for mobile app and device.
     *

     *
     * @param endpointArn
     *        The EndpointArn for mobile app and device.
     */

    public void setEndpointArn(String endpointArn) {
        this.endpointArn = endpointArn;
    }

    /**
     *

     * The EndpointArn for mobile app and device.
     *

     *
     * @return The EndpointArn for mobile app and device.
     */

    public String getEndpointArn() {
        return this.endpointArn;
    }

    /**
     *

     * The EndpointArn for mobile app and device.
     *

     *
     * @param endpointArn
     *        The EndpointArn for mobile app and device.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Endpoint withEndpointArn(String endpointArn) {
        setEndpointArn(endpointArn);
        return this;
    }

    /**
     *

     * Attributes for endpoint.
     *

     *
     * @return Attributes for endpoint.
     */

    public java.util.Map<String, String> getAttributes() {
        if (attributes == null) {
            attributes = new com.amazonaws.internal.SdkInternalMap<String, String>();
        }
        return attributes;
    }

    /**
     *

     * Attributes for endpoint.
     *

     *
     * @param attributes
     *        Attributes for endpoint.
     */

    public void setAttributes(java.util.Map<String, String> attributes) {
        this.attributes = attributes == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(attributes);
    }

    /**
     *

     * Attributes for endpoint.
     *

     *
     * @param attributes
     *        Attributes for endpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Endpoint withAttributes(java.util.Map<String, String> attributes) {
        setAttributes(attributes);
        return this;
    }

    /**
     * Add a single Attributes entry
     *
     * @see Endpoint#withAttributes
     * @returns a reference to this object so that method calls can be chained together.
     */

    public Endpoint addAttributesEntry(String key, String value) {
        if (null == this.attributes) {
            this.attributes = new com.amazonaws.internal.SdkInternalMap<String, String>();
        }
        if (this.attributes.containsKey(key))
            throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
        this.attributes.put(key, value);
        return this;
    }

    /**
     * Removes all the entries added into Attributes.
     *
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Endpoint clearAttributesEntries() {
        this.attributes = null;
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getEndpointArn() != null)
            sb.append("EndpointArn: ").append(getEndpointArn()).append(",");
        if (getAttributes() != null)
            sb.append("Attributes: ").append(getAttributes());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof Endpoint == false)
            return false;
        Endpoint other = (Endpoint) obj;
        if (other.getEndpointArn() == null ^ this.getEndpointArn() == null)
            return false;
        if (other.getEndpointArn() != null && other.getEndpointArn().equals(this.getEndpointArn()) == false)
            return false;
        if (other.getAttributes() == null ^ this.getAttributes() == null)
            return false;
        if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode());
        hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode());
        return hashCode;
    }

    @Override
    public Endpoint clone() {
        try {
            return (Endpoint) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
import Constants  from '../constants';
import { push }   from 'react-router-redux';

function setCurrentProject(channel, project) {
  return {
    type: Constants.CURRENT_PROJECT_SET,
    channel: channel,
    project: { ...project },
  };
}

export function fetchProject(socket, id) {
  return dispatch => {
    const channel = socket.channel(`project:${id}`);

    channel.join()
    .receive('ok', (response) => {
      dispatch(setCurrentProject(channel, response));
    })
    .receive('error', (response) => {
      dispatch({
        type: Constants.CURRENT_PROJECT_ERROR,
        error: response.reason,
      });
    });

    channel.on('update', (payload) => {
      dispatch(setCurrentProject(channel, payload.project));
    });

    channel.on('deleted', (payload) => {
      channel.leave().receive('ok', () => dispatch(push('/projects')));
    });
  };
}

export function filterStories(data) {
  return dispatch => {
    dispatch({
      type: Constants.CURRENT_PROJECT_FILTER_STORIES,
      data: data,
    });
  };
}

export function deleteProject(channel) {
  return dispatch => {
    channel.push('project:delete')
    .receive('error', (payload) => {
      console.log('Error deleting project');
    });;
  };
}

export function reset(channel) {
  return dispatch => {
    channel.leave();

    dispatch({ type: Constants.CURRENT_PROJECT_RESET });
  };
}


text:
package io.opentelemetry.api.baggage;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;

@SuppressWarnings("JavadocMethod")
@State(Scope.Thread)
public class BaggageBenchmark {

  @Param({"0", "1", "10", "100"})
  public int itemsToAdd;

  // pre-allocate the keys & values to remove one possible confounding factor
  private static final List<String> keys = new ArrayList<>(100);
  private static final List<String> values = new ArrayList<>(100);

  static {
    for (int i = 0; i < 100; i++) {
      keys.add("key" + i);
      values.add("value" + i);
    }
  }

  @Benchmark
  @BenchmarkMode({Mode.AverageTime})
  @Fork(1)
  @Measurement(iterations = 15, time = 1)
  @OutputTimeUnit(TimeUnit.NANOSECONDS)
  @Warmup(iterations = 5, time = 1)
  public Baggage baggageItemBenchmark() {
    BaggageBuilder builder = Baggage.builder();
    for (int i = 0; i < itemsToAdd; i++) {
      builder.put(keys.get(i), values.get(i));
    }
    return builder.build();
  }

  @Benchmark
  @BenchmarkMode({Mode.AverageTime})
  @Fork(1)
  @Measurement(iterations = 15, time = 1)
  @OutputTimeUnit(TimeUnit.NANOSECONDS)
  @Warmup(iterations = 5, time = 1)
  public Baggage baggageToBuilderBenchmark() {
    Baggage baggage = Baggage.empty();
    for (int i = 0; i < itemsToAdd; i++) {
      baggage = baggage.toBuilder().put(keys.get(i), values.get(i)).build();
    }
    return baggage;
  }
}


text:
var hyperApp = angular.module('hyperApp', ['ngResource', 'ngRoute', 'ui.bootstrap', 'angular-google-gapi', 'angularPayments']);

hyperApp.config(['$routeProvider', function ($routeProvider) {

    $routeProvider
        .when('/signup', {
            templateUrl: 'signup',
            controller: 'signupCtrl',
            controllerAs: 'vm'
        })
        .when('/login', {
            templateUrl: 'login',
            controller: 'loginCtrl',
            controllerAs: 'vm'
        })
        .when('/checkout', {
            templateUrl: 'checkout',
            controller: 'checkoutCtrl',
            controllerAs: 'vm'
        })
        .when('/officers', {
            templateUrl: 'officers',
            controller: 'officerListCtrl',
            controllerAs: 'vm'
        })
        .when('/home', {
            templateUrl: 'home',
            controller: 'homeCtrl',
            controllerAs: 'vm'
        })
        .when('/about', {
            templateUrl: 'about',
            controller: 'aboutCtrl',
            controllerAs: 'vm'
        })
        .when('/finishTrial', {
            templateUrl: 'static/html/finishTrial.html'
        })
        .otherwise({
            redirectTo: '/home'
        });
}]);
hyperApp.factory('AdmissionsOfficer', ['$resource', function ($resource) {
    //var AdmissionsOfficer = $resource('https://centralparkedu.appspot.com/_ah/api/centralparkedu/v1/hyperadmit/adoffs/:id', {id: '@id'}, {

    var AdmissionsOfficer = $resource('http://localhost:8080/_ah/api/centralparkedu/v1/hyperadmit/adoffs/:id', {id: '@id'}, {
        'get': {method: 'GET'},
        'update': {method: 'POST'}
    });
    //AdmissionsOfficer.add = $resource('https://centralparkedu.appspot.com/_ah/api/centralparkedu/v1/hyperadmit/insertadoff', {}, {
    AdmissionsOfficer.add = $resource('http://localhost:8080/_ah/api/centralparkedu/v1/hyperadmit/insertadoff', {}, {
        'insert': {method: 'POST'}
    });
    //AdmissionsOfficer.list = $resource('https://centralparkedu.appspot.com/_ah/api/centralparkedu/v1/hyperadmit/getadoffs', {pageToken: '@pageToken'}, {
    AdmissionsOfficer.list = $resource('http://localhost:8080/_ah/api/centralparkedu/v1/hyperadmit/getadoffs', {pageToken: '@pageToken'}, {

        'query': {method: 'GET', isArray: false}
    });
    return AdmissionsOfficer
}]);

hyperApp.factory('crypto', function () {
    return {
        hash: function (value) {
            return CryptoJS.SHA256(value).toString();
        }
    };
});
hyperApp.factory('sessionService', ['$http', function ($http) {
  return {
    set: function (key, value) {
      return sessionStorage.setItem(key, value);
    },
    get: function (key) {
      return sessionStorage.getItem(key);
    },
    destroy: function (key) {
      return sessionStorage.removeItem(key);
    }
  };
}]);
hyperApp.run(['$window', 'GApi', '$rootScope', '$location', 'loginService', function ($window, GApi, $rootScope, $location, loginService) {
    var base_url = $window.location.host;
    var api_url = '';
    if (base_url.indexOf('localhost') > -1) {
        api_url = 'http://localhost:8080/_ah/api';
    }
    else {
        api_url = 'https://centralparkedu.appspot.com/_ah/api';
    }

    GApi.load('centralparkedu', 'v1', api_url);
    GApi.load('plus', 'v1');
    GApi.load('oauth2', 'v2');

    $rootScope.$on('$routeChangeStart', function () {
        if ($location.path() !== '/login' && !loginService.isLogged() && $location.path() !== '/signup' && $location.path() !== '/reset' && $location.path() !== '/home' && $location.path() !== '/finishTrial' && $location.path() !== '/about' && $location.path() !== '/freeTrial') {
            $location.path('/home');
        }
    });
}]);


text:
//
//  LoginViewController.m
//  TTLockDemo
//
//  Created by wjjxx on 16/9/5.
//  Copyright © 2016年 wjj. All rights reserved.
//

#import "LoginViewController.h"
#import "RequestService.h"
@interface LoginViewController ()

@end

@implementation LoginViewController{
    UITextField *_passField;
    UITextField *_phoneField;
    UIButton *_loginButton;
}

- (void)viewDidLoad {
    [super viewDidLoad];

     [self createView];
    // Do any additional setup after loading the view.
}
- (void)createView{
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.view.backgroundColor = [UIColor  whiteColor];

    _phoneField = [[UITextField alloc]initWithFrame:CGRectMake(15, 64+10, SCREEN_WIDTH-15-15, 50)];
    _phoneField.placeholder = LS(@"input_email_or_account");
    _phoneField.clearButtonMode = UITextFieldViewModeAlways;
    [self.view addSubview:_phoneField];

    UILabel *line = [[UILabel alloc]initWithFrame:CGRectMake(15, 64+10+50, SCREEN_WIDTH-15-15, 1)];
    line.backgroundColor = COMMON_BLUE_COLOR;
    [self.view addSubview:line];

    _passField = [[UITextField alloc]initWithFrame:CGRectMake(15, 64+10+50+15, SCREEN_WIDTH-15-15, 50)];
    _passField.placeholder = LS(@"words_login_ps_holdspace");
    _passField.secureTextEntry = YES; //密码
    _passField.clearButtonMode = UITextFieldViewModeAlways;
    [self.view addSubview:_passField];

    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(15, 64+10+50+15+50, SCREEN_WIDTH-15-15, 1)];
    line2.backgroundColor = COMMON_BLUE_COLOR;
    [self.view addSubview:line2];

    //    登陆界面
    _loginButton = [[UIButton alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-200)/2, 64+10+50+15+50+30, 200, 50)];
    [_loginButton setTitle:LS(@"words_login") forState:UIControlStateNormal];
    [_loginButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _loginButton.backgroundColor = COMMON_BLUE_COLOR;
    _loginButton.layer.cornerRadius = 50/2;
    [self.view addSubview:_loginButton];
    [_loginButton addTarget:self action:@selector(loginButtonClick) forControlEvents:UIControlEventTouchUpInside];

}
- (void)loginButtonClick{
    [self.view endEditing:YES];
    if (_phoneField.text.length == 0 || _passField.text.length == 0) {
        [self showToast:LS(@"alter_empty")];
        return;
    }
    [self showHUD:nil];
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        __block id ret;
        dispatch_sync(dispatch_get_global_queue(0, 0), ^{

            ret = [RequestService loginWithUsername:_phoneField.text password:_passField.text];

        });
        dispatch_sync(dispatch_get_main_queue(), ^{

            if ([ret isKindOfClass:[NSDictionary class]]) {
                [self hideHUD];
                [SettingHelper setAccessToken:ret[@"access_token"]];
                [SettingHelper setOpenID:ret[@"openid"]];
                [SettingHelper setExpireIn:ret[@"expires_in"]];
                [SettingHelper setUid:ret[@"uid"]];
                [self.navigationController popViewControllerAnimated:YES];
            }
        });
    });
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


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

    <groupId>se.albin.jbinary</groupId>
    <artifactId>JBinary</artifactId>
    <version>2.0.0</version>

    <name>JBinary</name>
    <url>https://jitpack.io/#AlbinEriksson/JBinary/2.0.0</url>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.9</source>
                    <target>1.9</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


text:
Code that uses e-mail alerts from my Yale burglar alarm to trigger a raspberry-pi security camera.

Google APIs have default request limits per project. It looks like more than 1 request per second for a period over 100 seconds will lead to issues. The code by default checks emails every 5 seconds, and that should be fine. https://developers.google.com/analytics/devguides/reporting/core/v3/limits-quotas

## Acknowledgements
### For reading gmail stuff
This great blog post, and the couple of posts before it: http://wescpy.blogspot.co.uk/2015/08/accessing-gmail-from-python-plus-bonus.html

The gmail API documentation, especially the code snippets: https://developers.google.com/gmail/api/v1/reference/

The checkInternet function is entirely thanks to 7h3rAm's answer to this question: http://stackoverflow.com/questions/3764291/checking-network-connection

### For dropbox upload stuff
http://raspi.tv/2013/how-to-use-dropbox-with-raspberry-pi


text:
<?php

namespace console\controllers;

use yii\console\controllers\MigrateController;

/**
 * @author Eugene Terentev <eugene@terentev.net>
 */
class RbacMigrateController extends MigrateController
{
    /**
     * Creates a new migration instance.
     * @param string $class the migration class name
     * @return \common\rbac\Migration the migration instance
     */
    protected function createMigration($class)
    {
        $file = $this->migrationPath . DIRECTORY_SEPARATOR . $class . '.php';
        require_once($file);

        return new $class();
    }
}


text:
/**
 * CloseableLock implementations used for caching resources.
 *
 * @author standon
 * @since 4.0.0
 */
@ParametersAreNonnullByDefault
package com.netflix.genie.agent.utils.locks.impl;

import javax.annotation.ParametersAreNonnullByDefault;


text:
<?php

namespace denbora\R_T_G_Services\examples\RESTv2\Account;

use denbora\R_T_G_Services\casino\CasinoRestV2;
use denbora\R_T_G_Services\examples\RESTv2\RestExample;
use denbora\R_T_G_Services\R_T_G_ServiceException;

class ActivatePlayerPOST extends RestExample
{
    /**
     * ActivatePlayerPOST constructor.
     * @param CasinoRestV2 $casino
     */
    public function __construct(CasinoRestV2 $casino)
    {
        try {
            $query = [
                'player_id' => '10307426' //this is tony_0001
            ];

            $result = $casino->AccountService->activatePlayerPOST(json_encode($query));
            dd($result);
        } catch (R_T_G_ServiceException $exception) {
            dd($exception->getMessage());
        }
    }
}


text:
package io.dropwizard.configuration;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.cache.CacheBuilderSpec;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;
import io.dropwizard.jackson.Jackson;
import io.dropwizard.validation.BaseValidator;
import org.assertj.core.data.MapEntry;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import javax.validation.Valid;
import javax.validation.Validator;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.File;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

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

public class ConfigurationFactoryTest {

    private static final String NEWLINE = System.lineSeparator();

    @SuppressWarnings("UnusedDeclaration")
    public static class ExampleServer {

        @JsonProperty
        private int port = 8000;

        public int getPort() {
            return port;
        }

        public static ExampleServer create(int port) {
            ExampleServer server = new ExampleServer();
            server.port = port;
            return server;
        }

    }

    @SuppressWarnings("UnusedDeclaration")
    public static class Example {

        @NotNull
        @Pattern(regexp = "[\\w]+[\\s]+[\\w]+([\\s][\\w]+)?")
        private String name;

        @JsonProperty
        private int age = 1;

        List<String> type;

        @JsonProperty
        private Map<String, String> properties = new LinkedHashMap<>();

        @JsonProperty
        private List<ExampleServer> servers = new ArrayList<>();

        private boolean admin;

        @JsonProperty("my.logger")
        private Map<String, String> logger = new LinkedHashMap<>();

        public String getName() {
            return name;
        }

        public List<String> getType() {
            return type;
        }

        public Map<String, String> getProperties() {
            return properties;
        }

        public List<ExampleServer> getServers() {
            return servers;
        }

        public boolean isAdmin() {
            return admin;
        }

        public void setAdmin(boolean admin) {
            this.admin = admin;
        }

        public Map<String, String> getLogger() {
            return logger;
        }
    }

    static class ExampleWithDefaults {

        @NotNull
        @Pattern(regexp = "[\\w]+[\\s]+[\\w]+([\\s][\\w]+)?")
        @JsonProperty
        String name = "Coda Hale";

        @JsonProperty
        List<String> type = ImmutableList.of("coder", "wizard");

        @JsonProperty
        Map<String, String> properties = ImmutableMap.of("debug", "true", "settings.enabled", "false");

        @JsonProperty
        List<ExampleServer> servers = ImmutableList.of(
                ExampleServer.create(8080), ExampleServer.create(8081), ExampleServer.create(8082));

        @JsonProperty
        @Valid
        CacheBuilderSpec cacheBuilderSpec = CacheBuilderSpec.disableCaching();
    }

    static class NonInsatiableExample {

        @JsonProperty
        String name = "Code Hale";

        NonInsatiableExample(@JsonProperty("name") String name) {
            this.name = name;
        }
    }

    private final Validator validator = BaseValidator.newValidator();
    private final YamlConfigurationFactory<Example> factory =
            new YamlConfigurationFactory<>(Example.class, validator, Jackson.newObjectMapper(), "dw");
    private File malformedFile;
    private File emptyFile;
    private File invalidFile;
    private File validFile;

    private static File resourceFileName(String resourceName) throws URISyntaxException {
        return new File(Resources.getResource(resourceName).toURI());
    }

    @After
    public void resetConfigOverrides() {
        for (Enumeration<?> props = System.getProperties().propertyNames(); props.hasMoreElements();) {
            String keyString = (String) props.nextElement();
            if (keyString.startsWith("dw.")) {
                System.clearProperty(keyString);
            }
        }
    }

    @Before
    public void setUp() throws Exception {
        this.malformedFile = resourceFileName("factory-test-malformed.yml");
        this.emptyFile = resourceFileName("factory-test-empty.yml");
        this.invalidFile = resourceFileName("factory-test-invalid.yml");
        this.validFile = resourceFileName("factory-test-valid.yml");
    }

    @Test
    public void usesDefaultedCacheBuilderSpec() throws Exception {
        final ExampleWithDefaults example =
            new YamlConfigurationFactory<>(ExampleWithDefaults.class, validator, Jackson.newObjectMapper(), "dw")
                .build();
        assertThat(example.cacheBuilderSpec)
            .isNotNull();
        assertThat(example.cacheBuilderSpec)
            .isEqualTo(CacheBuilderSpec.disableCaching());
    }

    @Test
    public void loadsValidConfigFiles() throws Exception {
        final Example example = factory.build(validFile);

        assertThat(example.getName())
                .isEqualTo("Coda Hale");

        assertThat(example.getType().get(0))
                .isEqualTo("coder");
        assertThat(example.getType().get(1))
                .isEqualTo("wizard");

        assertThat(example.getProperties())
                .contains(MapEntry.entry("debug", "true"),
                        MapEntry.entry("settings.enabled", "false"));

        assertThat(example.getServers())
                .hasSize(3);
        assertThat(example.getServers().get(0).getPort())
                .isEqualTo(8080);

    }

    @Test
    public void handlesSimpleOverride() throws Exception {
        System.setProperty("dw.name", "Coda Hale Overridden");
        final Example example = factory.build(validFile);
        assertThat(example.getName())
            .isEqualTo("Coda Hale Overridden");
    }

    @Test
    public void handlesExistingOverrideWithPeriod() throws Exception {
        System.setProperty("dw.my\\.logger.level", "debug");
        final Example example = factory.build(validFile);
        assertThat(example.getLogger().get("level"))
            .isEqualTo("debug");
    }

    @Test
    public void handlesNewOverrideWithPeriod() throws Exception {
        System.setProperty("dw.my\\.logger.com\\.example", "error");
        final Example example = factory.build(validFile);
        assertThat(example.getLogger().get("com.example"))
            .isEqualTo("error");
    }

    @Test
    public void handlesArrayOverride() throws Exception {
        System.setProperty("dw.type", "coder,wizard,overridden");
        final Example example = factory.build(validFile);
        assertThat(example.getType().get(2))
                .isEqualTo("overridden");
        assertThat(example.getType().size())
                .isEqualTo(3);
    }

    @Test
    public void handlesArrayOverrideEscaped() throws Exception {
        System.setProperty("dw.type", "coder,wizard,overr\\,idden");
        final Example example = factory.build(validFile);
        assertThat(example.getType().get(2))
                .isEqualTo("overr,idden");
        assertThat(example.getType().size())
                .isEqualTo(3);
    }

    @Test
    public void handlesSingleElementArrayOverride() throws Exception {
        System.setProperty("dw.type", "overridden");
        final Example example = factory.build(validFile);
        assertThat(example.getType().get(0))
                .isEqualTo("overridden");
        assertThat(example.getType().size())
                .isEqualTo(1);
    }

    @Test
    public void overridesArrayWithIndices() throws Exception {
        System.setProperty("dw.type[1]", "overridden");
        final Example example = factory.build(validFile);

        assertThat(example.getType().get(0))
                .isEqualTo("coder");
        assertThat(example.getType().get(1))
                .isEqualTo("overridden");
    }

    @Test
    public void overridesArrayWithIndicesReverse() throws Exception {
        System.setProperty("dw.type[0]", "overridden");
        final Example example = factory.build(validFile);

        assertThat(example.getType().get(0))
                .isEqualTo("overridden");
        assertThat(example.getType().get(1))
                .isEqualTo("wizard");
    }

    @Test
    public void overridesArrayPropertiesWithIndices() throws Exception {
        System.setProperty("dw.servers[0].port", "7000");
        System.setProperty("dw.servers[2].port", "9000");
        final Example example = factory.build(validFile);

        assertThat(example.getServers())
                .hasSize(3);
        assertThat(example.getServers().get(0).getPort())
                .isEqualTo(7000);
        assertThat(example.getServers().get(2).getPort())
                .isEqualTo(9000);
    }

    @Test
    public void overrideMapProperty() throws Exception {
        System.setProperty("dw.properties.settings.enabled", "true");
        final Example example = factory.build(validFile);
        assertThat(example.getProperties())
                .contains(MapEntry.entry("debug", "true"),
                        MapEntry.entry("settings.enabled", "true"));
    }

    @Test
    public void throwsAnExceptionOnUnexpectedArrayOverride() throws Exception {
        System.setProperty("dw.servers.port", "9000");
        try {
            factory.build(validFile);
            failBecauseExceptionWasNotThrown(IllegalArgumentException.class);
        } catch (IllegalArgumentException e) {
            assertThat(e.getMessage())
                    .containsOnlyOnce("target is an array but no index specified");
        }
    }

    @Test(expected = ConfigurationParsingException.class)
    public void throwsAnExceptionOnArrayOverrideWithInvalidType() throws Exception {
        System.setProperty("dw.servers", "one,two");

        factory.build(validFile);
        failBecauseExceptionWasNotThrown(ConfigurationParsingException.class);
    }

    @Test
    public void throwsAnExceptionOnOverrideArrayIndexOutOfBounds() throws Exception {
        System.setProperty("dw.type[2]", "invalid");
        try {
            factory.build(validFile);
            failBecauseExceptionWasNotThrown(ArrayIndexOutOfBoundsException.class);
        } catch (ArrayIndexOutOfBoundsException e) {
            assertThat(e.getMessage())
                    .containsOnlyOnce("index is greater than size of array");
        }
    }

    @Test
    public void throwsAnExceptionOnOverrideArrayPropertyIndexOutOfBounds() throws Exception {
        System.setProperty("dw.servers[4].port", "9000");
        try {
            factory.build(validFile);
            failBecauseExceptionWasNotThrown(ArrayIndexOutOfBoundsException.class);
        } catch (ArrayIndexOutOfBoundsException e) {
            assertThat(e.getMessage())
                    .containsOnlyOnce("index is greater than size of array");
        }
    }

    @Test
    public void throwsAnExceptionOnMalformedFiles() throws Exception {
        try {
            factory.build(malformedFile);
            failBecauseExceptionWasNotThrown(ConfigurationParsingException.class);
        } catch (ConfigurationParsingException e) {
            assertThat(e.getMessage())
                    .containsOnlyOnce(" * Failed to parse configuration; Can not construct instance of io.dropwizard.configuration.ConfigurationFactoryTest$Example");
        }
    }

    @Test
    public void throwsAnExceptionOnEmptyFiles() throws Exception {
        try {
            factory.build(emptyFile);
            failBecauseExceptionWasNotThrown(ConfigurationParsingException.class);
        } catch (ConfigurationParsingException e) {
            assertThat(e.getMessage())
                    .containsOnlyOnce(" * Configuration at " + emptyFile.toString() + " must not be empty");
        }
    }

    @Test
    public void throwsAnExceptionOnInvalidFiles() throws Exception {
        try {
            factory.build(invalidFile);
            failBecauseExceptionWasNotThrown(ConfigurationValidationException.class);
        } catch (ConfigurationValidationException e) {
            if ("en".equals(Locale.getDefault().getLanguage())) {
                assertThat(e.getMessage())
                        .endsWith(String.format(
                                "factory-test-invalid.yml has an error:%n" +
                                        "  * name must match \"[\\w]+[\\s]+[\\w]+([\\s][\\w]+)?\"%n"));
            }
        }
    }

    @Test
    public void handleOverrideDefaultConfiguration() throws Exception {
        System.setProperty("dw.name", "Coda Hale Overridden");
        System.setProperty("dw.type", "coder,wizard,overridden");
        System.setProperty("dw.properties.settings.enabled", "true");
        System.setProperty("dw.servers[0].port", "8090");
        System.setProperty("dw.servers[2].port", "8092");

        final ExampleWithDefaults example =
                new YamlConfigurationFactory<>(ExampleWithDefaults.class, validator, Jackson.newObjectMapper(), "dw")
                        .build();

        assertThat(example.name).isEqualTo("Coda Hale Overridden");
        assertThat(example.type.get(2)).isEqualTo("overridden");
        assertThat(example.type.size()).isEqualTo(3);
        assertThat(example.properties).containsEntry("settings.enabled", "true");
        assertThat(example.servers.get(0).getPort()).isEqualTo(8090);
        assertThat(example.servers.get(2).getPort()).isEqualTo(8092);
    }

    @Test
    public void handleDefaultConfigurationWithoutOverriding() throws Exception {
        final ExampleWithDefaults example =
                new YamlConfigurationFactory<>(ExampleWithDefaults.class, validator, Jackson.newObjectMapper(), "dw")
                        .build();

        assertThat(example.name).isEqualTo("Coda Hale");
        assertThat(example.type).isEqualTo(ImmutableList.of("coder", "wizard"));
        assertThat(example.properties).isEqualTo(ImmutableMap.of("debug", "true", "settings.enabled", "false"));
        assertThat(example.servers.get(0).getPort()).isEqualTo(8080);
        assertThat(example.servers.get(1).getPort()).isEqualTo(8081);
        assertThat(example.servers.get(2).getPort()).isEqualTo(8082);
    }

    @Test
    public void throwsAnExceptionIfDefaultConfigurationCantBeInstantiated() throws Exception {
        System.setProperty("dw.name", "Coda Hale Overridden");
        final YamlConfigurationFactory<NonInsatiableExample> factory =
            new YamlConfigurationFactory<>(NonInsatiableExample.class, validator, Jackson.newObjectMapper(), "dw");
        assertThatThrownBy(factory::build)
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessage("Unable create an instance of the configuration class: " +
                "'io.dropwizard.configuration.ConfigurationFactoryTest.NonInsatiableExample'");
    }

    @Test
    public void printsDidYouMeanOnUnrecognizedField() throws Exception {
        final File resourceFileName = resourceFileName("factory-test-typo.yml");
        assertThatThrownBy(() -> factory.build(resourceFileName))
            .isInstanceOf(ConfigurationParsingException.class)
            .hasMessage(resourceFileName + " has an error:" + NEWLINE +
                "  * Unrecognized field at: propertis" + NEWLINE +
                "    Did you mean?:" + NEWLINE +
                "      - properties" + NEWLINE +
                "      - servers" + NEWLINE +
                "      - type" + NEWLINE +
                "      - name" + NEWLINE +
                "      - age" + NEWLINE +
                "        [2 more]" + NEWLINE);
    }

    @Test
    public void incorrectTypeIsFound() throws Exception {
        final File resourceFileName = resourceFileName("factory-test-wrong-type.yml");
        assertThatThrownBy(() -> factory.build(resourceFileName))
            .isInstanceOf(ConfigurationParsingException.class)
            .hasMessage(resourceFileName + " has an error:" + NEWLINE +
                "  * Incorrect type of value at: age; is of type: String, expected: int" + NEWLINE);
    }

    @Test
    public void printsDetailedInformationOnMalformedYaml() throws Exception {
        final File resourceFileName = resourceFileName("factory-test-malformed-advanced.yml");
        assertThatThrownBy(() -> factory.build(resourceFileName))
            .hasMessageContaining(String.format(
                "factory-test-malformed-advanced.yml has an error:%n" +
                "  * Malformed YAML at line: 2, column: 21; while parsing a flow sequence\n" +
                " in 'reader', line 2, column 7:\n" +
                "    type: [ coder,wizard\n" +
                "          ^\n" +
                "expected ',' or ']', but got StreamEnd\n" +
                " in 'reader', line 2, column 21:\n" +
                "    wizard\n" +
                "          ^"));
    }
}


text:
package com.amazonaws.services.personalize.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Provides the name and range of a continuous hyperparameter.
 *

 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ContinuousHyperParameterRange implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * The name of the hyperparameter.
     *

     */
    private String name;
    /**
     *

     * The minimum allowable value for the hyperparameter.
     *

     */
    private Double minValue;
    /**
     *

     * The maximum allowable value for the hyperparameter.
     *

     */
    private Double maxValue;

    /**
     *

     * The name of the hyperparameter.
     *

     *
     * @param name
     *        The name of the hyperparameter.
     */

    public void setName(String name) {
        this.name = name;
    }

    /**
     *

     * The name of the hyperparameter.
     *

     *
     * @return The name of the hyperparameter.
     */

    public String getName() {
        return this.name;
    }

    /**
     *

     * The name of the hyperparameter.
     *

     *
     * @param name
     *        The name of the hyperparameter.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ContinuousHyperParameterRange withName(String name) {
        setName(name);
        return this;
    }

    /**
     *

     * The minimum allowable value for the hyperparameter.
     *

     *
     * @param minValue
     *        The minimum allowable value for the hyperparameter.
     */

    public void setMinValue(Double minValue) {
        this.minValue = minValue;
    }

    /**
     *

     * The minimum allowable value for the hyperparameter.
     *

     *
     * @return The minimum allowable value for the hyperparameter.
     */

    public Double getMinValue() {
        return this.minValue;
    }

    /**
     *

     * The minimum allowable value for the hyperparameter.
     *

     *
     * @param minValue
     *        The minimum allowable value for the hyperparameter.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ContinuousHyperParameterRange withMinValue(Double minValue) {
        setMinValue(minValue);
        return this;
    }

    /**
     *

     * The maximum allowable value for the hyperparameter.
     *

     *
     * @param maxValue
     *        The maximum allowable value for the hyperparameter.
     */

    public void setMaxValue(Double maxValue) {
        this.maxValue = maxValue;
    }

    /**
     *

     * The maximum allowable value for the hyperparameter.
     *

     *
     * @return The maximum allowable value for the hyperparameter.
     */

    public Double getMaxValue() {
        return this.maxValue;
    }

    /**
     *

     * The maximum allowable value for the hyperparameter.
     *

     *
     * @param maxValue
     *        The maximum allowable value for the hyperparameter.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ContinuousHyperParameterRange withMaxValue(Double maxValue) {
        setMaxValue(maxValue);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getMinValue() != null)
            sb.append("MinValue: ").append(getMinValue()).append(",");
        if (getMaxValue() != null)
            sb.append("MaxValue: ").append(getMaxValue());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ContinuousHyperParameterRange == false)
            return false;
        ContinuousHyperParameterRange other = (ContinuousHyperParameterRange) obj;
        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getMinValue() == null ^ this.getMinValue() == null)
            return false;
        if (other.getMinValue() != null && other.getMinValue().equals(this.getMinValue()) == false)
            return false;
        if (other.getMaxValue() == null ^ this.getMaxValue() == null)
            return false;
        if (other.getMaxValue() != null && other.getMaxValue().equals(this.getMaxValue()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getMinValue() == null) ? 0 : getMinValue().hashCode());
        hashCode = prime * hashCode + ((getMaxValue() == null) ? 0 : getMaxValue().hashCode());
        return hashCode;
    }

    @Override
    public ContinuousHyperParameterRange clone() {
        try {
            return (ContinuousHyperParameterRange) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.personalize.model.transform.ContinuousHyperParameterRangeMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
var dbAdapter = require("../adapters/DBAdapter");

var GET_ALL = "SELECT * FROM person;";

var GET = "SELECT * FROM person where id=?;";

var PersonDAO = (function() {

	return {

		getAll: function() {
			return new Promise(function(resolve, reject) {
				dbAdapter.query(GET_ALL, function(error, rows, fields) {
					resolve(rows);
				});
			});
		},
		get: function(id) {
			return new Promise(function(resolve, reject) {
				dbAdapter.query(GET, [id], function(error, rows, fields) {
					resolve(rows[0]);
				});
			});
		}
	}
})();

module.exports = PersonDAO;


text:
<?php

final class PhabricatorAuthManagementRecoverWorkflow
  extends PhabricatorAuthManagementWorkflow {

  protected function didConstruct() {
    $this
      ->setName('recover')
      ->setExamples('**recover** __username__')
      ->setSynopsis(
        'Recover access to an administrative account if you have locked '.
        'yourself out of Phabricator.')
      ->setArguments(
        array(
          'username' => array(
            'name' => 'username',
            'wildcard' => true,
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {

    $can_recover = id(new PhabricatorPeopleQuery())
      ->setViewer($this->getViewer())
      ->withIsAdmin(true)
      ->execute();
    if (!$can_recover) {
      throw new PhutilArgumentUsageException(
        pht(
          'This Phabricator installation has no recoverable administrator '.
          'accounts. You can use `bin/accountadmin` to create a new '.
          'administrator account or make an existing user an administrator.'));
    }
    $can_recover = mpull($can_recover, 'getUsername');
    sort($can_recover);
    $can_recover = implode(', ', $can_recover);

    $usernames = $args->getArg('username');
    if (!$usernames) {
      throw new PhutilArgumentUsageException(
        pht('You must specify the username of the account to recover.'));
    } else if (count($usernames) > 1) {
      throw new PhutilArgumentUsageException(
        pht('You can only recover the username for one account.'));
    }

    $username = head($usernames);

    $user = id(new PhabricatorPeopleQuery())
      ->setViewer($this->getViewer())
      ->withUsernames(array($username))
      ->executeOne();

    if (!$user) {
      throw new PhutilArgumentUsageException(
        pht(
          'No such user "%s". Recoverable administrator accounts are: %s.',
          $username,
          $can_recover));
    }

    if (!$user->getIsAdmin()) {
      throw new PhutilArgumentUsageException(
        pht(
          'You can only recover administrator accounts, but %s is not an '.
          'administrator. Recoverable administrator accounts are: %s.',
          $username,
          $can_recover));
    }

    $console = PhutilConsole::getConsole();
    $console->writeOut(
      pht(
        'Use this link to recover access to the "%s" account from the web '.
        'interface:',
        $username));
    $console->writeOut("\n\n");
    $console->writeOut("    %s", $user->getEmailLoginURI());
    $console->writeOut("\n\n");
    $console->writeOut(
      pht(
        'After logging in, you can use the "Auth" application to add or '.
        'restore authentication providers and allow normal logins to '.
        'succeed.')."\n");

    return 0;
  }

}


text:
package org.jetbrains.plugins.gradle.model;

import org.gradle.api.Nullable;
import org.jetbrains.annotations.NotNull;

import java.io.File;
import java.util.Collection;

/**
 * @author Vladislav.Soroka
 */
public interface FileCollectionDependency extends ExternalDependency {
  /**
   * Returns files of this dependency.
   *
   * @return file collection
   */
  @NotNull
  Collection<File> getFiles();
}


text:
// -*- c-basic-offset: 4; related-file-name: "../../lib/driver.cc" -*-
#ifndef CLICK_DRIVER_HH
#define CLICK_DRIVER_HH
#include <click/package.hh>

#define CLICK_DEFAULT_PROVIDES	/* nada */

#if defined(CLICK_USERLEVEL) || defined(CLICK_MINIOS)
CLICK_DECLS
class Router;
class Master;
class ErrorHandler;
class Lexer;
struct ArchiveElement;

void click_static_initialize();
void click_static_cleanup();

Lexer *click_lexer();
Router *click_read_router(String filename, bool is_expr, ErrorHandler * = 0, bool initialize = true, Master * = 0);

String click_compile_archive_file(const Vector<ArchiveElement> &ar,
		const ArchiveElement *ae,
		String package, const String &target, int quiet,
		bool &tmpdir_populated, ErrorHandler *errh);

CLICK_ENDDECLS
#elif CLICK_TOOL
CLICK_DECLS
class ErrorHandler;
struct ArchiveElement;

void click_static_initialize();

String click_compile_archive_file(const Vector<ArchiveElement> &archive,
		const ArchiveElement *ae,
		String package, const String &target, int quiet,
		bool &tmpdir_populated, ErrorHandler *errh);

CLICK_ENDDECLS
#endif

#endif