text:
/**
 * CallToActionCreative.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.adwords.axis.v201406.video;

/**
 * Creative data that composes the core piece of the call-to-action.
 * This data is displayed
 *             to users.
 */
public class CallToActionCreative  implements java.io.Serializable {
    private com.google.api.ads.adwords.axis.v201406.video.CallToActionCreativeType type;

    /* This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty. */
    private java.lang.String headline;

    /* This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty. */
    private java.lang.String displayUrl;

    /* This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty. */
    private java.lang.String destinationUrl;

    /* Optional image object. */
    private com.google.api.ads.adwords.axis.v201406.video.CallToActionImage image;

    public CallToActionCreative() {
    }

    public CallToActionCreative(
           com.google.api.ads.adwords.axis.v201406.video.CallToActionCreativeType type,
           java.lang.String headline,
           java.lang.String displayUrl,
           java.lang.String destinationUrl,
           com.google.api.ads.adwords.axis.v201406.video.CallToActionImage image) {
           this.type = type;
           this.headline = headline;
           this.displayUrl = displayUrl;
           this.destinationUrl = destinationUrl;
           this.image = image;
    }

    /**
     * Gets the type value for this CallToActionCreative.
     *
     * @return type
     */
    public com.google.api.ads.adwords.axis.v201406.video.CallToActionCreativeType getType() {
        return type;
    }

    /**
     * Sets the type value for this CallToActionCreative.
     *
     * @param type
     */
    public void setType(com.google.api.ads.adwords.axis.v201406.video.CallToActionCreativeType type) {
        this.type = type;
    }

    /**
     * Gets the headline value for this CallToActionCreative.
     *
     * @return headline   * This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty.
     */
    public java.lang.String getHeadline() {
        return headline;
    }

    /**
     * Sets the headline value for this CallToActionCreative.
     *
     * @param headline   * This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty.
     */
    public void setHeadline(java.lang.String headline) {
        this.headline = headline;
    }

    /**
     * Gets the displayUrl value for this CallToActionCreative.
     *
     * @return displayUrl   * This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty.
     */
    public java.lang.String getDisplayUrl() {
        return displayUrl;
    }

    /**
     * Sets the displayUrl value for this CallToActionCreative.
     *
     * @param displayUrl   * This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty.
     */
    public void setDisplayUrl(java.lang.String displayUrl) {
        this.displayUrl = displayUrl;
    }

    /**
     * Gets the destinationUrl value for this CallToActionCreative.
     *
     * @return destinationUrl   * This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty.
     */
    public java.lang.String getDestinationUrl() {
        return destinationUrl;
    }

    /**
     * Sets the destinationUrl value for this CallToActionCreative.
     *
     * @param destinationUrl   * This field is required and
     * should not be {@code null}.
     *                 This string
     * must not be empty.
     */
    public void setDestinationUrl(java.lang.String destinationUrl) {
        this.destinationUrl = destinationUrl;
    }

    /**
     * Gets the image value for this CallToActionCreative.
     *
     * @return image   * Optional image object.
     */
    public com.google.api.ads.adwords.axis.v201406.video.CallToActionImage getImage() {
        return image;
    }

    /**
     * Sets the image value for this CallToActionCreative.
     *
     * @param image   * Optional image object.
     */
    public void setImage(com.google.api.ads.adwords.axis.v201406.video.CallToActionImage image) {
        this.image = image;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof CallToActionCreative)) return false;
        CallToActionCreative other = (CallToActionCreative) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.type==null && other.getType()==null) ||
             (this.type!=null &&
              this.type.equals(other.getType()))) &&
            ((this.headline==null && other.getHeadline()==null) ||
             (this.headline!=null &&
              this.headline.equals(other.getHeadline()))) &&
            ((this.displayUrl==null && other.getDisplayUrl()==null) ||
             (this.displayUrl!=null &&
              this.displayUrl.equals(other.getDisplayUrl()))) &&
            ((this.destinationUrl==null && other.getDestinationUrl()==null) ||
             (this.destinationUrl!=null &&
              this.destinationUrl.equals(other.getDestinationUrl()))) &&
            ((this.image==null && other.getImage()==null) ||
             (this.image!=null &&
              this.image.equals(other.getImage())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getType() != null) {
            _hashCode += getType().hashCode();
        }
        if (getHeadline() != null) {
            _hashCode += getHeadline().hashCode();
        }
        if (getDisplayUrl() != null) {
            _hashCode += getDisplayUrl().hashCode();
        }
        if (getDestinationUrl() != null) {
            _hashCode += getDestinationUrl().hashCode();
        }
        if (getImage() != null) {
            _hashCode += getImage().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "CallToAction.Creative"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("type");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "type"));
        elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "CallToAction.Creative.Type"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("headline");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "headline"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("displayUrl");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "displayUrl"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("destinationUrl");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "destinationUrl"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("image");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "image"));
        elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201406", "CallToActionImage"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        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:
import pytest

class TestPolicy:
    @staticmethod
    def _get_target_class():
        from google.api_core.iam import Policy

        return Policy

    def _make_one(self, *args, **kw):
        return self._get_target_class()(*args, **kw)

    def test_ctor_defaults(self):
        empty = frozenset()
        policy = self._make_one()
        assert policy.etag is None
        assert policy.version is None
        assert policy.owners == empty
        assert policy.editors == empty
        assert policy.viewers == empty
        assert len(policy) == 0
        assert dict(policy) == {}

    def test_ctor_explicit(self):
        VERSION = 17
        ETAG = "ETAG"
        empty = frozenset()
        policy = self._make_one(ETAG, VERSION)
        assert policy.etag == ETAG
        assert policy.version == VERSION
        assert policy.owners == empty
        assert policy.editors == empty
        assert policy.viewers == empty
        assert len(policy) == 0
        assert dict(policy) == {}

    def test___getitem___miss(self):
        policy = self._make_one()
        assert policy["nonesuch"] == set()

    def test___setitem__(self):
        USER = "user:phred@example.com"
        PRINCIPALS = set([USER])
        policy = self._make_one()
        policy["rolename"] = [USER]
        assert policy["rolename"] == PRINCIPALS
        assert len(policy) == 1
        assert dict(policy) == {"rolename": PRINCIPALS}

    def test___delitem___hit(self):
        policy = self._make_one()
        policy._bindings["rolename"] = ["phred@example.com"]
        del policy["rolename"]
        assert len(policy) == 0
        assert dict(policy) == {}

    def test___delitem___miss(self):
        policy = self._make_one()
        with pytest.raises(KeyError):
            del policy["nonesuch"]

    def test_owners_getter(self):
        from google.api_core.iam import OWNER_ROLE

        MEMBER = "user:phred@example.com"
        expected = frozenset([MEMBER])
        policy = self._make_one()
        policy[OWNER_ROLE] = [MEMBER]
        assert policy.owners == expected

    def test_owners_setter(self):
        import warnings
        from google.api_core.iam import OWNER_ROLE

        MEMBER = "user:phred@example.com"
        expected = set([MEMBER])
        policy = self._make_one()

        with warnings.catch_warnings(record=True) as warned:
            policy.owners = [MEMBER]

        warning, = warned
        assert warning.category is DeprecationWarning
        assert policy[OWNER_ROLE] == expected

    def test_editors_getter(self):
        from google.api_core.iam import EDITOR_ROLE

        MEMBER = "user:phred@example.com"
        expected = frozenset([MEMBER])
        policy = self._make_one()
        policy[EDITOR_ROLE] = [MEMBER]
        assert policy.editors == expected

    def test_editors_setter(self):
        import warnings
        from google.api_core.iam import EDITOR_ROLE

        MEMBER = "user:phred@example.com"
        expected = set([MEMBER])
        policy = self._make_one()

        with warnings.catch_warnings(record=True) as warned:
            policy.editors = [MEMBER]

        warning, = warned
        assert warning.category is DeprecationWarning
        assert policy[EDITOR_ROLE] == expected

    def test_viewers_getter(self):
        from google.api_core.iam import VIEWER_ROLE

        MEMBER = "user:phred@example.com"
        expected = frozenset([MEMBER])
        policy = self._make_one()
        policy[VIEWER_ROLE] = [MEMBER]
        assert policy.viewers == expected

    def test_viewers_setter(self):
        import warnings
        from google.api_core.iam import VIEWER_ROLE

        MEMBER = "user:phred@example.com"
        expected = set([MEMBER])
        policy = self._make_one()

        with warnings.catch_warnings(record=True) as warned:
            policy.viewers = [MEMBER]

        warning, = warned
        assert warning.category is DeprecationWarning
        assert policy[VIEWER_ROLE] == expected

    def test_user(self):
        EMAIL = "phred@example.com"
        MEMBER = "user:%s" % (EMAIL,)
        policy = self._make_one()
        assert policy.user(EMAIL) == MEMBER

    def test_service_account(self):
        EMAIL = "phred@example.com"
        MEMBER = "serviceAccount:%s" % (EMAIL,)
        policy = self._make_one()
        assert policy.service_account(EMAIL) == MEMBER

    def test_group(self):
        EMAIL = "phred@example.com"
        MEMBER = "group:%s" % (EMAIL,)
        policy = self._make_one()
        assert policy.group(EMAIL) == MEMBER

    def test_domain(self):
        DOMAIN = "example.com"
        MEMBER = "domain:%s" % (DOMAIN,)
        policy = self._make_one()
        assert policy.domain(DOMAIN) == MEMBER

    def test_all_users(self):
        policy = self._make_one()
        assert policy.all_users() == "allUsers"

    def test_authenticated_users(self):
        policy = self._make_one()
        assert policy.authenticated_users() == "allAuthenticatedUsers"

    def test_from_api_repr_only_etag(self):
        empty = frozenset()
        RESOURCE = {"etag": "ACAB"}
        klass = self._get_target_class()
        policy = klass.from_api_repr(RESOURCE)
        assert policy.etag == "ACAB"
        assert policy.version is None
        assert policy.owners == empty
        assert policy.editors == empty
        assert policy.viewers == empty
        assert dict(policy) == {}

    def test_from_api_repr_complete(self):
        from google.api_core.iam import OWNER_ROLE, EDITOR_ROLE, VIEWER_ROLE

        OWNER1 = "group:cloud-logs@google.com"
        OWNER2 = "user:phred@example.com"
        EDITOR1 = "domain:google.com"
        EDITOR2 = "user:phred@example.com"
        VIEWER1 = "serviceAccount:1234-abcdef@service.example.com"
        VIEWER2 = "user:phred@example.com"
        RESOURCE = {
            "etag": "DEADBEEF",
            "version": 17,
            "bindings": [
                {"role": OWNER_ROLE, "members": [OWNER1, OWNER2]},
                {"role": EDITOR_ROLE, "members": [EDITOR1, EDITOR2]},
                {"role": VIEWER_ROLE, "members": [VIEWER1, VIEWER2]},
            ],
        }
        klass = self._get_target_class()
        policy = klass.from_api_repr(RESOURCE)
        assert policy.etag == "DEADBEEF"
        assert policy.version == 17
        assert policy.owners, frozenset([OWNER1 == OWNER2])
        assert policy.editors, frozenset([EDITOR1 == EDITOR2])
        assert policy.viewers, frozenset([VIEWER1 == VIEWER2])
        assert dict(policy) == {
            OWNER_ROLE: set([OWNER1, OWNER2]),
            EDITOR_ROLE: set([EDITOR1, EDITOR2]),
            VIEWER_ROLE: set([VIEWER1, VIEWER2]),
        }

    def test_from_api_repr_unknown_role(self):
        USER = "user:phred@example.com"
        GROUP = "group:cloud-logs@google.com"
        RESOURCE = {
            "etag": "DEADBEEF",
            "version": 17,
            "bindings": [{"role": "unknown", "members": [USER, GROUP]}],
        }
        klass = self._get_target_class()
        policy = klass.from_api_repr(RESOURCE)
        assert policy.etag == "DEADBEEF"
        assert policy.version == 17
        assert dict(policy), {"unknown": set([GROUP == USER])}

    def test_to_api_repr_defaults(self):
        policy = self._make_one()
        assert policy.to_api_repr() == {}

    def test_to_api_repr_only_etag(self):
        policy = self._make_one("DEADBEEF")
        assert policy.to_api_repr() == {"etag": "DEADBEEF"}

    def test_to_api_repr_binding_wo_members(self):
        policy = self._make_one()
        policy["empty"] = []
        assert policy.to_api_repr() == {}

    def test_to_api_repr_binding_w_duplicates(self):
        import warnings
        from google.api_core.iam import OWNER_ROLE

        OWNER = "group:cloud-logs@google.com"
        policy = self._make_one()
        with warnings.catch_warnings(record=True):
            policy.owners = [OWNER, OWNER]
        assert policy.to_api_repr() == {
            "bindings": [{"role": OWNER_ROLE, "members": [OWNER]}]
        }

    def test_to_api_repr_full(self):
        import operator
        import warnings
        from google.api_core.iam import OWNER_ROLE, EDITOR_ROLE, VIEWER_ROLE

        OWNER1 = "group:cloud-logs@google.com"
        OWNER2 = "user:phred@example.com"
        EDITOR1 = "domain:google.com"
        EDITOR2 = "user:phred@example.com"
        VIEWER1 = "serviceAccount:1234-abcdef@service.example.com"
        VIEWER2 = "user:phred@example.com"
        BINDINGS = [
            {"role": OWNER_ROLE, "members": [OWNER1, OWNER2]},
            {"role": EDITOR_ROLE, "members": [EDITOR1, EDITOR2]},
            {"role": VIEWER_ROLE, "members": [VIEWER1, VIEWER2]},
        ]
        policy = self._make_one("DEADBEEF", 17)
        with warnings.catch_warnings(record=True):
            policy.owners = [OWNER1, OWNER2]
            policy.editors = [EDITOR1, EDITOR2]
            policy.viewers = [VIEWER1, VIEWER2]
        resource = policy.to_api_repr()
        assert resource["etag"] == "DEADBEEF"
        assert resource["version"] == 17
        key = operator.itemgetter("role")
        assert sorted(resource["bindings"], key=key) == sorted(BINDINGS, key=key)

redpajama_set_name: RedPajamaGithub


text:
set -euo pipefail

echo "${0#$PWD}" >> ~/.paas-script-usage

SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)

TARGET_EMAIL_USER=${TARGET_EMAIL_USER:-holly.challenger}
TARGET_ENVIRONMENT=${TARGET_ENVIRONMENT:-prod}
TARGET_ENVIRONMENT_API=${TARGET_ENVIRONMENT_API:-api.cloud.service.gov.uk}

# shellcheck disable=SC1090
source "${SCRIPT_DIR}/common.sh"

check_aws_account_used "${TARGET_ENVIRONMENT}"
check_logged_in_cf "${TARGET_ENVIRONMENT_API}"

"${SCRIPT_DIR}"/reset-org.py \
	-o paas_user_research \
	-s sandbox \
	-u \
	"${TARGET_EMAIL_USER}+1@digital.cabinet-office.gov.uk" \
	"${TARGET_EMAIL_USER}+2@digital.cabinet-office.gov.uk" \
	"${TARGET_EMAIL_USER}+3@digital.cabinet-office.gov.uk" \
	"${TARGET_EMAIL_USER}+4@digital.cabinet-office.gov.uk" \
	"${TARGET_EMAIL_USER}+5@digital.cabinet-office.gov.uk" \
	"${TARGET_EMAIL_USER}+6@digital.cabinet-office.gov.uk" \
	--org-managers \
	--space-managers \
	--space-developers \
	--quota small

"${SCRIPT_DIR}"/create-user.sh -r -m -o paas_user_research -e "${TARGET_EMAIL_USER}+1@digital.cabinet-office.gov.uk"
"${SCRIPT_DIR}"/create-user.sh -r -m -o paas_user_research -e "${TARGET_EMAIL_USER}+2@digital.cabinet-office.gov.uk"
"${SCRIPT_DIR}"/create-user.sh -r -m -o paas_user_research -e "${TARGET_EMAIL_USER}+3@digital.cabinet-office.gov.uk"
"${SCRIPT_DIR}"/create-user.sh -r -m -o paas_user_research -e "${TARGET_EMAIL_USER}+4@digital.cabinet-office.gov.uk"
"${SCRIPT_DIR}"/create-user.sh -r -m -o paas_user_research -e "${TARGET_EMAIL_USER}+5@digital.cabinet-office.gov.uk"
"${SCRIPT_DIR}"/create-user.sh -r -m -o paas_user_research -e "${TARGET_EMAIL_USER}+6@digital.cabinet-office.gov.uk"


text:
@extends('app')

@section('content')

{{$post['title']}}

by {{$post['author']}} — Posted on {{$post['created_at']}}

{!! $post['content'] !!}

                @if($post->nextPost())
                nextPost()->getUrl()}}">Next : {{$post->nextPost()['title']}}

                @endif

                @if($post->previousPost())
                previousPost()->getUrl()}}">
Previous : {{$post->previousPost()['title']}}

                @endif

        Please enable JavaScript to view the comments powered by Disqus.

@stop

@section('javascript')

@endsection


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2012 Eric Niebler

  Distributed under the Boost
  Software License, Version 1.0. (See accompanying
  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  -->
<header name="boost/proto/make_expr.hpp">
  <para>
    Definition of the <computeroutput><functionname alt="boost::proto::make_expr">proto::make_expr()</functionname>
    </computeroutput> and <computeroutput><functionname alt="boost::proto::unpack_expr">proto::unpack_expr()</functionname>
    </computeroutput> utilities for building Proto expression nodes from child nodes or from a Fusion sequence of child
    nodes, respectively.
  </para>
  <namespace name="boost">
    <namespace name="proto">
      <namespace name="functional">
        <!-- proto::functional::make_expr -->
        <struct name="make_expr">
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Domain">
              <default><classname>proto::deduce_domain</classname></default>
            </template-type-parameter>
          </template>
          <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> equivalent to the <computeroutput>
            <functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput> function.</purpose>
          <description>
            <para>
              In all cases, <computeroutput>proto::functional::make_expr<Tag, Domain>()(a...)</computeroutput>
              is equivalent to <computeroutput><functionname>proto::make_expr</functionname><Tag, Domain>(a...)</computeroutput>.
            </para>
            <para>
              <computeroutput>proto::functional::make_expr<Tag>()(a...)</computeroutput> is equivalent to
              <computeroutput><functionname>proto::make_expr</functionname><Tag>(a...)</computeroutput>.
            </para>
          </description>
          <inherit>
            <type><classname>proto::callable</classname></type>
          </inherit>
          <struct-specialization name="result">
            <template>
              <template-type-parameter name="This"/>
              <template-type-parameter name="A" pack="1"/>
            </template>
            <specialization>
              <template-arg>This(A...)</template-arg>
            </specialization>
            <inherit>
              <type>
    <classname>proto::result_of::make_expr</classname>< Tag, Domain, A... ></type>
            </inherit>
          </struct-specialization>
          <method-group name="public member functions">
            <method name="operator()" cv="const">
              <type>typename <classname>proto::result_of::make_expr</classname>< Tag, Domain, A const... >::type const</type>
              <template>
                <template-type-parameter name="A" pack="1"/>
              </template>
              <parameter name="a" pack="1">
                <paramtype>A const &</paramtype>
              </parameter>
              <description>
                <para>
                  Construct an expression node with tag type <computeroutput>Tag</computeroutput> and in the
                  domain <computeroutput>Domain</computeroutput>.
                </para>
                <para>
                </para>
              </description>
              <returns>
                <para>
                  <computeroutput><functionname>proto::make_expr</functionname><Tag, Domain>(a...)</computeroutput>
                </para>
              </returns>
            </method>
          </method-group>
        </struct>

        <!-- proto::functional::unpack_expr -->
        <struct name="unpack_expr">
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Domain">
              <default><classname>proto::deduce_domain</classname></default>
            </template-type-parameter>
          </template>
          <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> equivalent to the
            <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput> function.
          </purpose>
          <description>
            <para>
              In all cases, <computeroutput>proto::functional::unpack_expr<Tag, Domain>()(seq)</computeroutput> is
              equivalent to <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname><Tag,
              Domain>(seq)</computeroutput>.
            </para>
            <para>
              <computeroutput>proto::functional::unpack_expr<Tag>()(seq)</computeroutput> is equivalent to
              <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname><Tag>(seq)</computeroutput>.
            </para>
          </description>
          <inherit>
            <type><classname>proto::callable</classname></type>
          </inherit>
          <struct-specialization name="result">
            <template>
              <template-type-parameter name="This"/>
              <template-type-parameter name="Sequence"/>
            </template>
            <specialization>
              <template-arg>This(Sequence)</template-arg>
            </specialization>
            <inherit>
              <type>
    <classname>proto::result_of::unpack_expr</classname><
      Tag,
      Domain,
      typename boost::remove_reference< Sequence >::type
    ></type>
            </inherit>
          </struct-specialization>
          <method-group name="public member functions">
            <method name="operator()" cv="const">
              <type>typename <classname>proto::result_of::unpack_expr</classname>< Tag, Domain, Sequence const >::type const</type>
              <template>
                <template-type-parameter name="Sequence"/>
              </template>
              <parameter name="sequence">
                <paramtype>Sequence const &</paramtype>
                <description>
                  <para>A Fusion Forward Sequence </para>
                </description>
              </parameter>
              <description>
                <para>
                  Construct an expression node with tag type <computeroutput>Tag</computeroutput> and in the
                  domain <computeroutput>Domain</computeroutput>.
                </para>
              </description>
              <returns>
                <para>
                  <computeroutput><functionname>proto::unpack_expr</functionname><Tag, Domain>(sequence)</computeroutput>
                </para>
              </returns>
            </method>
          </method-group>
        </struct>
      </namespace>

      <namespace name="result_of">
        <!-- proto::result_of::make_expr -->
        <struct name="make_expr">
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="A" pack="1"/>
          </template>
          <purpose>Metafunction that computes the return type of the
            <computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput>
            function, with a domain deduced from the domains of the children.</purpose>
          <description>
            <para>
              Computes the return type of the
              <computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput> function.
            </para>
            <para>
              In this specialization, the domain is deduced from the domains of the child types.
              If <computeroutput><classname>proto::is_domain</classname><A<subscript>0</subscript>>::value</computeroutput>
              is <computeroutput>true</computeroutput>, then another specialization is selected.
            </para>
          </description>
          <typedef name="D">
            <purpose>For exposition only</purpose>
            <type><replaceable>domain-deduced-from-child-types</replaceable></type>
            <description>
              <para>
                In this specialization, Proto uses the domains of the child expressions to compute the
                domain of the parent. See
                <computeroutput><classname>proto::deduce_domain</classname></computeroutput> for a full
                description of the procedure used.
              </para>
            </description>
          </typedef>
          <typedef name="type">
            <type>typename <classname>proto::result_of::make_expr</classname><Tag, D, A...>::type</type>
          </typedef>
        </struct>
        <struct-specialization name="make_expr">
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Domain"/>
            <template-type-parameter name="A" pack="1"/>
          </template>
          <specialization>
            <template-arg>Tag</template-arg>
            <template-arg>Domain</template-arg>
            <template-arg pack="1">A</template-arg>
          </specialization>
          <purpose>Metafunction that computes the return type of the
            <computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput>
            function, within the specified domain.</purpose>
          <description>
            <para>
              Computes the return type of the
              <computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput>
              function.
            </para>
          </description>
          <typedef name="type">
            <description>
              <para>
                Let <computeroutput><replaceable>WRAP<X></replaceable></computeroutput> be defined such that:
                <itemizedlist>
                  <listitem>
                    <para>
                      If <computeroutput>X</computeroutput> is <computeroutput>Y &</computeroutput>
                      or (possibly cv-qualified) <computeroutput>boost::reference_wrapper<Y></computeroutput>,
                      then <computeroutput><replaceable>WRAP<X></replaceable></computeroutput> is equivalent to
                      <computeroutput><classname>proto::result_of::as_child</classname><Y, Domain></computeroutput>.
                    </para>
                  </listitem>
                  <listitem>
                    <para>
                      Otherwise, <computeroutput><replaceable>WRAP<X></replaceable></computeroutput> is equivalent to
                      <computeroutput><classname>proto::result_of::as_expr</classname><X, Domain></computeroutput>.
                    </para>
                  </listitem>
                </itemizedlist>
              </para>
              <para>
                If <computeroutput><classname>proto::wants_basic_expr</classname><typename Domain::proto_generator>::value</computeroutput>
                is true, then let <computeroutput><replaceable>E</replaceable></computeroutput> be
                <computeroutput><classname>proto::basic_expr</classname></computeroutput>; otherwise,
                let <computeroutput><replaceable>E</replaceable></computeroutput> be
                <computeroutput><classname>proto::expr</classname></computeroutput>.
              </para>
              <para>
                If <computeroutput>Tag</computeroutput> is
                <computeroutput><classname>proto::tag::terminal</classname></computeroutput>, then
                <computeroutput>type</computeroutput> is a typedef for
                <computeroutput>typename <replaceable>WRAP<A<subscript>0</subscript>></replaceable>::type</computeroutput>.
              </para>
              <para>
                Otherwise, <computeroutput>type</computeroutput> is a typedef for
                <computeroutput>boost::result_of<Domain(<replaceable>E</replaceable><
                Tag, <classname alt="proto::listN">proto::list<emphasis>N</emphasis></classname><
                typename <replaceable>WRAP<A></replaceable>::type...> >)>::type</computeroutput>
              </para>
            </description>
            <type><emphasis>see-below</emphasis></type>
          </typedef>
        </struct-specialization>
        <!-- proto::result_of::unpack_expr -->
        <struct name="unpack_expr">
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Sequence"/>
            <template-type-parameter name="Void">
              <default><type>void</type></default>
            </template-type-parameter>
          </template>
          <purpose>Metafunction that computes the return type of the
            <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
            function, with a domain deduced from the domains of the children.
          </purpose>
          <description>
            <para>
              Compute the return type of the
              <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
              function.
            </para>
            <para>
              <computeroutput>Sequence</computeroutput> is a Fusion Forward Sequence.
            </para>
            <para>
              In this specialization, the domain is deduced from the domains of the child types.
              If <computeroutput><classname>proto::is_domain</classname><Sequence>::value</computeroutput>
              is <computeroutput>true</computeroutput>, then another specialization is selected.
            </para>
          </description>
          <typedef name="type">
            <purpose>Where S is a Fusion RandomAccessSequence equivalent to Sequence, and N is the size of S.</purpose>
            <type>
    typename <classname>proto::result_of::make_expr</classname><
      Tag,
      typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, 0>::type,
      ...
      typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, <replaceable>N</replaceable>-1>::type
    >::type
  </type>
          </typedef>
        </struct>
        <struct-specialization name="unpack_expr">
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Domain"/>
            <template-type-parameter name="Sequence"/>
          </template>
          <specialization>
            <template-arg>Tag</template-arg>
            <template-arg>Domain</template-arg>
            <template-arg>Sequence</template-arg>
          </specialization>
          <purpose>Metafunction that computes the return type of the
            <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
            function, within the specified domain.
          </purpose>
          <description>
            <para>
              Computes the return type of the
              <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
              function.
            </para>
          </description>
          <typedef name="type">
            <purpose>Where S is a RandomAccessSequence equivalent to Sequence, and N is the size of S.</purpose>
            <type>
    typename <classname>proto::result_of::make_expr</classname><
      Tag,
      Domain,
      typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, 0>::type,
      ...
      typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, <replaceable>N</replaceable>-1>::type
    >::type
  </type>
          </typedef>
        </struct-specialization>
      </namespace>

      <!-- proto::make_expr() -->
      <overloaded-function name="make_expr">
        <signature>
          <type>typename <classname>proto::result_of::make_expr</classname><Tag, A const...>::type const</type>
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="A" pack="1"/>
          </template>
          <parameter name="a" pack="1">
            <paramtype>A const &</paramtype>
          </parameter>
        </signature>
        <signature>
          <type>typename <classname>proto::result_of::make_expr</classname><Tag, Domain, A const...>::type const</type>
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Domain"/>
            <template-type-parameter name="A" pack="1"/>
          </template>
          <parameter name="a" pack="1">
            <paramtype>A const &</paramtype>
          </parameter>
        </signature>
        <purpose>Construct an expression of the requested tag type with a domain and with the specified
          arguments as children.</purpose>
        <description>
          <para>
            This function template may be invoked either with or without specifying a
            <computeroutput>Domain</computeroutput> template parameter. If no domain is specified, the domain
            is deduced by examining domains of the given arguments. See
            <computeroutput><classname>proto::deduce_domain</classname></computeroutput> for a full
            description of the procedure used.
          </para>
          <para>
            Let <computeroutput><replaceable>WRAP</replaceable>(x)</computeroutput> be defined such that:
            <itemizedlist>
              <listitem>
                <para>
                  If <computeroutput>x</computeroutput> is a <computeroutput>boost::reference_wrapper<></computeroutput>,
                  <computeroutput><replaceable>WRAP</replaceable>(x)</computeroutput> is equivalent to
                  <computeroutput><functionname>proto::as_child</functionname><Domain>(x.get())</computeroutput>.
                </para>
              </listitem>
              <listitem>
                <para>
                  Otherwise, <computeroutput><replaceable>WRAP</replaceable>(x)</computeroutput> is equivalent to
                  <computeroutput><functionname>proto::as_expr</functionname><Domain>(x)</computeroutput>.
                </para>
              </listitem>
            </itemizedlist>
          </para>
          <para>
            If <computeroutput><classname>proto::wants_basic_expr</classname><typename Domain::proto_generator>::value</computeroutput>
            is true, then let <computeroutput><replaceable>E</replaceable></computeroutput> be
            <computeroutput><classname>proto::basic_expr</classname></computeroutput>; otherwise,
            let <computeroutput><replaceable>E</replaceable></computeroutput> be
            <computeroutput><classname>proto::expr</classname></computeroutput>.
          </para>
          <para>
            Let <computeroutput><replaceable>MAKE</replaceable>(Tag, b...)</computeroutput> be defined as
            <computeroutput><replaceable>E</replaceable><Tag,
            <classname alt="proto::listN">proto::list<emphasis>N</emphasis></classname><decltype(b)...> >::make(b...)</computeroutput>.
          </para>
          <para>
            If <computeroutput>Tag</computeroutput> is
            <computeroutput><classname>proto::tag::terminal</classname></computeroutput>, then return
            <computeroutput><replaceable>WRAP</replaceable>(a<subscript>0</subscript>)</computeroutput>.
          </para>
          <para>
            Otherwise, return
            <computeroutput>Domain()(<replaceable>MAKE</replaceable>(Tag, <replaceable>WRAP</replaceable>(a)...))</computeroutput>.
          </para>
        </description>
      </overloaded-function>

      <!-- proto::unpack_expr() -->
      <overloaded-function name="unpack_expr">
        <signature>
          <type>typename <classname>proto::result_of::unpack_expr</classname><Tag, Sequence const>::type const</type>
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Sequence"/>
          </template>
          <parameter name="sequence">
            <paramtype>Sequence const &</paramtype>
            <description>
              <para>A Fusion Forward Sequence.</para>
            </description>
          </parameter>
        </signature>
        <signature>
          <type>typename <classname>proto::result_of::unpack_expr</classname><Tag, Domain, Sequence const>::type const</type>
          <template>
            <template-type-parameter name="Tag"/>
            <template-type-parameter name="Domain"/>
            <template-type-parameter name="Sequence"/>
          </template>
          <parameter name="sequence">
            <paramtype>Sequence const &</paramtype>
          </parameter>
        </signature>
        <purpose>Construct an expression of the requested tag type with a domain and with children
          from the specified Fusion Forward Sequence.</purpose>
        <description>
          <para>
            This function template may be invoked either with or without specifying a
            <computeroutput>Domain</computeroutput> argument. If no domain is specified, the domain
            is deduced by examining domains of each element of the sequence. See
            <computeroutput><classname>proto::deduce_domain</classname></computeroutput> for a full
            description of the procedure used.
          </para>
          <para>
            Let <computeroutput>s</computeroutput> be a Fusion RandomAccessSequence equivalent to
            <computeroutput>sequence</computeroutput>.
            Let <computeroutput><replaceable>WRAP</replaceable>(N, s)</computeroutput> be defined such that:
            <itemizedlist>
              <listitem>
                <para>
                  If <computeroutput>fusion::result_of::value_at_c<decltype(s),N>::type</computeroutput> is a reference type
                  or an instantiation of <computeroutput>boost::reference_wrapper<></computeroutput>,
                  <computeroutput><replaceable>WRAP</replaceable>(N, s)</computeroutput> is equivalent to
                  <computeroutput><functionname>proto::as_child</functionname><Domain>(fusion::at_c<N>(s))</computeroutput>.
                </para>
              </listitem>
              <listitem>
                <para>
                  Otherwise, <computeroutput><replaceable>WRAP</replaceable>(N, s)</computeroutput> is equivalent to
                  <computeroutput><functionname>proto::as_expr</functionname><Domain>(fusion::at_c<N>(s))</computeroutput>.
                </para>
              </listitem>
            </itemizedlist>
          </para>
          <para>
            If <computeroutput><classname>proto::wants_basic_expr</classname><typename Domain::proto_generator>::value</computeroutput>
            is true, then let <computeroutput><replaceable>E</replaceable></computeroutput> be
            <computeroutput><classname>proto::basic_expr</classname></computeroutput>; otherwise,
            let <computeroutput><replaceable>E</replaceable></computeroutput> be
            <computeroutput><classname>proto::expr</classname></computeroutput>.
          </para>
          <para>
            Let <computeroutput><replaceable>MAKE</replaceable>(Tag, b...)</computeroutput> be defined as
            <computeroutput><replaceable>E</replaceable><Tag,
            <classname alt="proto::listN">proto::list<emphasis>N</emphasis></classname><decltype(b)...> >::make(b...)</computeroutput>.
          </para>
          <para>
            If <computeroutput>Tag</computeroutput> is
            <computeroutput><classname>proto::tag::terminal</classname></computeroutput>, then return
            <computeroutput><replaceable>WRAP</replaceable>(0, s)</computeroutput>.
          </para>
          <para>
            Otherwise, return
            <computeroutput>Domain()(<replaceable>MAKE</replaceable>(Tag, <replaceable>WRAP</replaceable>(0, s),...
            <replaceable>WRAP</replaceable>(<replaceable>N</replaceable>-1, s)))</computeroutput>, where
            <replaceable>N</replaceable> is the size of <computeroutput>Sequence</computeroutput>.
          </para>
        </description>
      </overloaded-function>
    </namespace>
  </namespace>
</header>


text:
package org.ovirt.engine.core.uutils.ssh;

import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;

import java.io.IOException;

import javax.naming.TimeLimitExceededException;

import org.apache.sshd.ClientSession;
import org.apache.sshd.SshClient;
import org.apache.sshd.client.future.AuthFuture;
import org.apache.sshd.client.future.ConnectFuture;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class TimeoutTest {

    SSHClient client;

    @BeforeClass
    public static void init() {
        TestCommon.initialize();
    }

    @AfterClass
    public static void cleanUp() {
        TestCommon.terminate();
    }

    @Before
    public void setUp() {
        client = new SSHClient();
        client.setSoftTimeout(10 * 1000);
        client.setHardTimeout(60 * 1000);
        client.setHost(TestCommon.host, TestCommon.port);
        client.setUser(TestCommon.user);
        client.setPassword(TestCommon.password);
    }

    @After
    public void tearDown() {
        try {
            if (client != null) {
                client.close();
                client = null;
            }
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    @Test(expected=TimeLimitExceededException.class)
    public void testConnectTimeout() throws Exception {
        SSHClient _client = spy(client);
        SshClient ssh = spy(SshClient.setUpDefaultClient());
        ConnectFuture future = mock(ConnectFuture.class);

        doReturn(ssh).when(_client)._createSshClient();
        doReturn(future).when(ssh).connect(anyString(), anyInt());
        when(future.await(anyLong())).thenReturn(false);

        _client.connect();
    }

    @Test(expected=TimeLimitExceededException.class)
    public void testPasswordTimeout() throws Exception {
        SSHClient _client = spy(client);
        SshClient ssh = spy(SshClient.setUpDefaultClient());
        ConnectFuture future = mock(ConnectFuture.class);
        ClientSession session = mock(ClientSession.class);

        doReturn(ssh).when(_client)._createSshClient();
        doReturn(future).when(ssh).connect(anyString(), anyInt());
        when(future.await(anyLong())).thenReturn(true);
        when(future.getSession()).thenReturn(session);

        AuthFuture authFuture = mock(AuthFuture.class);
        when(authFuture.await(anyLong())).thenReturn(false);
        when(session.authPassword(anyString(), anyString())).thenReturn(authFuture);

        _client.connect();
        _client.authenticate();
    }
}


text:
using AutoMapper;
using Hinata.Models;

namespace Hinata
{
    public partial class MappingConfig
    {
        private static void CreateUserModelsMap()
        {
            Mapper.CreateMap<User, UserUpdateModel>();

            Mapper.CreateMap<UserCreateModel, User>();
            Mapper.CreateMap<UserUpdateModel, User>();

            Mapper.CreateMap<User, CollaboratorSearchResultModel>()
                .ForMember(d => d.IconUrl, o => o.MapFrom(s => s.IconUrl ?? GlobalSettings.NoImageUserIconUrl));
        }
    }
}


text:
#ifndef DedicatedWorkerContext_h
#define DedicatedWorkerContext_h

#include "core/dom/MessagePort.h"
#include "core/page/ContentSecurityPolicy.h"
#include "core/workers/WorkerContext.h"

namespace WebCore {

    class DedicatedWorkerThread;

    class DedicatedWorkerContext : public WorkerContext {
    public:
        typedef WorkerContext Base;
        static PassRefPtr<DedicatedWorkerContext> create(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin, double timeOrigin);
        virtual ~DedicatedWorkerContext();

        virtual bool isDedicatedWorkerContext() const OVERRIDE { return true; }

        // Overridden to allow us to check our pending activity after executing imported script.
        virtual void importScripts(const Vector<String>& urls, ExceptionCode&) OVERRIDE;

        // EventTarget
        virtual const AtomicString& interfaceName() const OVERRIDE;

        void postMessage(PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionCode&);

        DEFINE_ATTRIBUTE_EVENT_LISTENER(message);

        DedicatedWorkerThread* thread();

    private:
        DedicatedWorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, PassRefPtr<SecurityOrigin> topOrigin, double timeOrigin);
    };

} // namespace WebCore

#endif // DedicatedWorkerContext_h


text:
JavaScript framework designed primarily for asynchronous push communication with custom servers (comet). Python back-end examples included, as well as a basic JavaScript effects library, and ActionScript source for handling the active connections.

The Push Communication framework uses Flash's XMLSocket object as a middle layer. Sample back-end servers included are written in Twisted. Twisted is an event-driven networking engine written in Python

## Real Usage Example

#### Photos.cx's Photos Spy (now offline)

Used [photos.py](https://github.com/aonic/aonicjs/blob/master/python/photos.py) and [photos_sender.py](https://github.com/aonic/aonicjs/blob/master/python/photos_sender.py) along with the [Effects and Push framework](https://github.com/aonic/aonicjs/blob/master/js/AONIC.Com.js) to notify users of new public uploads. Featured real-time chat room used to discuss new uploads with other users. [Custom front-end code](https://github.com/aonic/aonicjs/blob/master/examples/photoscx-recent.html)

## Examples

#### Using the Push Communication Framework

	<embed width="0" height="0" allowscriptaccess="always" name="flashSock" id="flashSock"
	src="./swf/jsCom.swf" type="application/x-shockwave-flash"></embed>

#### Using the Effects Framework

#### Quick and Dirty Chat Room using chatd.py and Push Framework

Start the server: `python chatd.py`

#### Webpage

	<embed width="0" height="0" allowscriptaccess="always" name="flashSock" id="flashSock"
	src="./swf/jsCom.swf" type="application/x-shockwave-flash"></embed>

	<textarea readonly="readonly" id="chat" style="width: 600px; height: 150px; border: 0; overflow: hidden;">
	Enter a username in the input.</textarea>
	<form onsubmit="fs.sendMessage(AONIC.$('input')); return false;">
		<input type="text" id="input" style="width: 400px; font: 12px Arial;" />
	</form>


text:
inputFile=$1

# redirecting all output to a file
exec 1>>$2/$HOSTNAME"_sortbam.o"
exec 2>>$2/$HOSTNAME"_sortbam.o"

workspace=/scratch/workspace
rootdir=/shared/workspace/software
numThreads=16
sambamba=$rootdir/sambamba/0.4.7/bin/sambamba

tmpDir=/scratch/workspace/tmp

echo "Sort shell is processing: $workspace/$inputFile.bam"

### Sort BAM File ####
if [ ! -f $workspace/$inputFile.sort.bam ]; then
	$sambamba sort -t $numThreads -m 4G --tmpdir $tmpDir -o $workspace/$inputFile.sort.bam $workspace/$inputFile.bam

	rm $workspace/$inputFile.bam
fi

if [ ! -f $workspace/$inputFile.sort.bam.bai ]; then
	$sambamba index -t $numThreads $workspace/$inputFile.sort.bam $workspace/$inputFile.sort.bam.bai
fi


text:
package org.nd4j;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.nd4j.autodiff.opvalidation.*;
import org.nd4j.autodiff.validation.OpValidation;
import org.nd4j.imports.TFGraphs.TFGraphTestAllSameDiff;
import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.function.Function;

import static org.junit.Assume.assumeFalse;

/**
 * Op validation test suite.
 * Should include all classes using the {@link OpValidation} test framework, so test coverage can be calculated and reported.
 *
 * NOTE: For the op coverage information to work properly, we need the op validation to be run via this suite.
 * Otherwise, we could report coverage information before all test have run - underestimating coverage.
 *
 * For op coverage information to be collected, you need to execute a test like:

 * SINGLE OP TEST: OpValidation.validate(new OpTestCase(op).expectedOutputs(0, <INDArray here>))
 *     - OpTestCase checks the output values of a single op, no backprop/gradients

 *     - Returns an error message if op failed, or NULL if op passed

 * SAMEDIFF TEST:  OpValidation.validate(new TestCase(sameDiff).gradientCheck(true).expectedOutput("someVar", <INDArray>))

 *     - These tests can be used to check both gradients AND expected output, collecting coverage as required

 *     - Returns an error message if op failed, or NULL if op passed

 *     - Note gradientCheck(true) is the default

 *     - Expected outputs are optional

 *     - You can specify a function for validating the correctness of each output using {@link org.nd4j.autodiff.validation.TestCase#expected(String, Function)}

 *
 */
@RunWith(Suite.class)
@Suite.SuiteClasses({
        //Note: these will be run as part of the suite only, and will NOT be run again separately
        LayerOpValidation.class,
        LossOpValidation.class,
        MiscOpValidation.class,
        RandomOpValidation.class,
        ReductionBpOpValidation.class,
        ReductionOpValidation.class,
        ShapeOpValidation.class,
        TransformOpValidation.class,

        //TF import tests
        TFGraphTestAllSameDiff.class
        //TFGraphTestAllLibnd4j.class
})
//IMPORTANT: This ignore is added to avoid maven surefire running both the suite AND the individual tests in "mvn test"
// With it ignored here, the individual tests will run outside (i.e., separately/independently) of the suite in both "mvn test" and IntelliJ
@Ignore
public class OpValidationSuite {

    /*
    Change this variable from false to true to ignore any tests that call OpValidationSuite.ignoreFailing()

    The idea: failing SameDiff tests are disabled by default, but can be re-enabled.
    This is so we can prevent regressions on already passing tests
     */
    public static final boolean IGNORE_FAILING = true;

    public static void ignoreFailing(){
        //If IGNORE_FAILING
        assumeFalse(IGNORE_FAILING);
    }

    private static DataType initialType;

    @BeforeClass
    public static void beforeClass() {
        Nd4j.create(1);
        initialType = Nd4j.dataType();

        Nd4j.setDataType(DataType.DOUBLE);
        Nd4j.getRandom().setSeed(123);
    }

    @AfterClass
    public static void afterClass() {
        Nd4j.setDataType(initialType);

        // Log coverage information
        OpValidation.logCoverageInformation(true, true, true, true, true);
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Syll. fung. (Abellini) 8: 164 (1889)

#### Original name
Peziza adusta Schulzer

### Remarks
null


text:
package git4idea.repo;

import com.intellij.dvcs.repo.Repository;
import com.intellij.vcs.log.Hash;
import git4idea.GitLocalBranch;
import git4idea.GitRemoteBranch;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Map;

class GitBranchState {
  @Nullable private final String currentRevision;
  @Nullable private final GitLocalBranch currentBranch;
  @NotNull private final Repository.State state;
  @NotNull private final Map<GitLocalBranch, Hash> localBranches;
  @NotNull private final Map<GitRemoteBranch, Hash> remoteBranches;

  GitBranchState(@Nullable String currentRevision,
                 @Nullable GitLocalBranch currentBranch,
                 @NotNull Repository.State state,
                 @NotNull Map<GitLocalBranch, Hash> localBranches,
                 @NotNull Map<GitRemoteBranch, Hash> remoteBranches) {
    this.currentRevision = currentRevision;
    this.currentBranch = currentBranch;
    this.state = state;
    this.localBranches = localBranches;
    this.remoteBranches = remoteBranches;
  }

  @Nullable
  public String getCurrentRevision() {
    return currentRevision;
  }

  @Nullable
  public GitLocalBranch getCurrentBranch() {
    return currentBranch;
  }

  @NotNull
  public Repository.State getState() {
    return state;
  }

  @NotNull
  public Map<GitLocalBranch, Hash> getLocalBranches() {
    return localBranches;
  }

  @NotNull
  public Map<GitRemoteBranch, Hash> getRemoteBranches() {
    return remoteBranches;
  }
}


text:
using System.Collections.Generic;
using FaceGame.ViewModels.State;

namespace FaceGame.ViewModels.Data
{
    public class ScoreListVM
    {
        public IReadOnlyList<StateVM> Plays { get; set; }
    }
}


text:
namespace boost_no_variadic_macros = empty_boost;
#endif

int main( int, char *[] )
{
   return boost_no_variadic_macros::test();
}


text:
use crate::blogs::Manifest;
use comrak::ComrakOptions;
use regex::Regex;
use serde_derive::{Deserialize, Serialize};
use std::error::Error;
use std::path::{Path, PathBuf};

#[derive(Debug, PartialEq, Deserialize)]
struct YamlHeader {
    title: String,
    author: String,
    #[serde(default)]
    release: bool,
    team: Option<String>,
    layout: String,
}

#[derive(Debug, Clone, Serialize)]
pub(crate) struct Post {
    pub(crate) filename: String,
    pub(crate) layout: String,
    pub(crate) title: String,
    pub(crate) author: String,
    pub(crate) year: i32,
    pub(crate) show_year: bool,
    pub(crate) month: u32,
    pub(crate) day: u32,
    pub(crate) contents: String,
    pub(crate) url: String,
    pub(crate) published: String,
    pub(crate) updated: String,
    pub(crate) release: bool,
    pub(crate) has_team: bool,
    pub(crate) team: String,
    pub(crate) team_url: String,
}

impl Post {
    pub(crate) fn open(path: &Path, manifest: &Manifest) -> Result<Self, Box<dyn Error>> {
        // yeah this might blow up, but it won't
        let filename = path.file_name().unwrap().to_str().unwrap();

        // we need to get the metadata out of the url
        let mut split = filename.splitn(4, "-");

        // we do some unwraps because these need to be valid
        let year = split.next().unwrap().parse::<i32>().unwrap();
        let month = split.next().unwrap().parse::<u32>().unwrap();
        let day = split.next().unwrap().parse::<u32>().unwrap();
        let filename = split.next().unwrap().to_string();

        let contents = std::fs::read_to_string(path)?;

        // yaml headers.... we know the first four bytes of each file are "---\n"
        // so we need to find the end. we need the fours to adjust for those first bytes
        let end_of_yaml = contents[4..].find("---").unwrap() + 4;
        let yaml = &contents[..end_of_yaml];
        let YamlHeader {
            author,
            title,
            release,
            team: team_string,
            layout,
        } = serde_yaml::from_str(yaml)?;
        // next, the contents. we add + to get rid of the final "---\n\n"
        let options = ComrakOptions {
            ext_header_ids: Some(String::new()),
            unsafe_: true, // Allow rendering of raw HTML
            ..ComrakOptions::default()
        };

        let contents = comrak::markdown_to_html(&contents[end_of_yaml + 5..], &options);

        // finally, the url.
        let mut url = PathBuf::from(&*filename);
        url.set_extension("html");

        // this is fine
        let url = format!(
            "{:04}/{:02}/{:02}/{}",
            year,
            month,
            day,
            url.to_str().unwrap()
        );

        let published = build_post_time(year, month, day, 0);
        let updated = published.clone();

        // validate for now that the layout is specified as "post"
        match &*layout {
            "post" => (),
            _ => panic!(
                "blog post at path `{}` should have layout `post`",
                path.display()
            ),
        };

        // Enforce extra conditions
        if manifest.requires_team && team_string.is_none() {
            panic!("blog post at path `{}` lacks team metadata", path.display());
        }

        // If they supplied team, it should look like `team-text <team-url>`
        let (team, team_url) = match team_string {
            Some(s) => {
                lazy_static::lazy_static! {
                    static ref R: Regex = Regex::new(r"(?P<name>[^<]*) <(?P<url>[^>]+)>").unwrap();
                }
                let captures = match R.captures(&s) {
                    Some(c) => c,
                    None => panic!(
                        "team from path `{}` should have format `$name <$url>`",
                        path.display()
                    ),
                };
                (
                    Some(captures["name"].to_string()),
                    Some(captures["url"].to_string()),
                )
            }

            None => (None, None),
        };

        Ok(Self {
            filename,
            title,
            author,
            year,
            show_year: false,
            month,
            day,
            contents,
            url,
            published,
            updated,
            release,
            layout,
            has_team: team.is_some(),
            team: team.unwrap_or_default(),
            team_url: team_url.unwrap_or_default(),
        })
    }

    pub fn set_updated(&mut self, seconds: u32) {
        self.updated = build_post_time(self.year, self.month, self.day, seconds);
    }
}

fn build_post_time(year: i32, month: u32, day: u32, seconds: u32) -> String {
    chrono::DateTime::<chrono::Utc>::from_utc(
        chrono::NaiveDate::from_ymd(year, month, day).and_hms(0, 0, seconds),
        chrono::Utc,
    )
    .to_rfc3339()
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
      http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">

	<interceptors>
		<class>org.overlord.rtgov.ui.server.interceptors.UserContextInterceptor</class>
	</interceptors>

    <alternatives>
        <class>org.overlord.rtgov.ui.server.services.impl.MockSituationsServiceImpl</class>
        <class>org.overlord.rtgov.ui.server.services.impl.MockServicesServiceImpl</class>
        <class>org.overlord.rtgov.ui.server.services.impl.MockSituationEventGenerator</class>
    </alternatives>
</beans>


text:
#setItemEditor {
	background: #FFFFFF;
}

#setItemEditor #rightCol{
	clear:right;
	float:right;
	width: 250px;
	padding: 0px 10px 0px 10px;
	margin: 0px 0px 15px 0px;
	background-color: transparent;
  	border-width: 20px;
  	-webkit-border-image: url("../graphics/cardborderimage.jpg") 20 stretch;
  	-moz-border-image: url("../graphics/cardborderimage.jpg") 20 stretch;
  	-o-border-image: url("../graphics/cardborderimage.jpg") 20 stretch;
 	border-image: url("../graphics/cardborderimage.jpg") 20 fill stretch;

}
#setItemEditor #setsMenu{
	background: url("../graphics/cardhole.jpg") no-repeat center bottom, url("../graphics/cardbackground.jpg") repeat center top;
	padding-bottom:90px;
}
#setsMenu h2 {
	font-family: ff-dagny-web-pro, 'Helvetica Neue', Arial, sans-serif;
	font-size:14px;
	font-weight:bold;
	color: #333;
	margin:0px 0px 7px 0px;
	line-height:1.1em;
	font-size: 1.5em;
 	line-height: 1.125;
  	margin: 0.8em 0 0.7em;
  	padding-top: 0;
  	text-transform:none;
}

#setItemEditor #leftCol{
	width:620px;
}
#setItemList{
	margin:0px;
	padding:0px;
}

#setItems .setItem {
	position: relative;
	display: block;
	float: left;
	list-style-type: none;
	height: 180px;
	width: 140px;
	border: solid 1px #eee;
	box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
	margin: 5px 10px 5px 0px;
	background: #F5F5F5;
	text-align: center;

}

#setItems .setItem:hover {
	border: solid 1px #aaa;
	box-shadow: 1px 1px 4px rgba(0, 0, 0, 1);
}

#setItems div{
	font-size: 10px;
	margin: 5px 0px 0px 0px;
	width:140px;
	text-align:left;
}

#setItems a{
	cursor:move;
}

#setItems a{
	color: #636363;
}

#setItems .remove{
	position: absolute;
	left:127px;
	top: -10px;
	width:7px;
	padding: 2px 1px 1px 5px;
	background-color:#aaa;
	-moz-border-radius: 8px;
	border-radius:8px;
	-webkit-border-radius: 8px;
	width:11px;
	height:13px;
	box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
#setItems .remove:hover{
	position: absolute;
	left:127px;
	top: -10px;
	width:7px;
	padding: 2px 1px 1px 5px;
	background-color:#CA1919;
	-moz-border-radius: 8px;
	border-radius:8px;
	-webkit-border-radius: 8px;
	width:11px;
	height:13px;
	box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
#setItems .remove a{
	font-size: 10px;
	color: #fff;
	text-decoration:none;
	font-weight:bold;
	cursor:default;
}

.setItemThumbnail {
	padding: 10px 10px 3px 10px;
}
#setItems .setItemCaption {
font-style: italic;
font-size: 1.1em;
line-height: 1.4286;
color: #666;
letter-spacing: 1px;
width: 120px;
padding-left: 10px;
overflow: hidden;
}
#setItems .setItemCaption a{
	text-decoration:none;
	color:#000000;
}
.setTooltip {
	text-align:left;
	padding:5px;
}
#helpTips ul{
	margin: 0px 0px 0px 5px;
	padding:5px 5px 0px 22px;
}

#helpTips li{
	list-style-image: url(../graphics/arrow_right_gray.gif);
	margin: 0px 0px 10px 0px;
	padding:0px;
}
.optionsList{
	margin-top:5px;
	margin-left:10px;
}
.optionsList a{
	text-decoration:none;
}
.setsList{
	margin-top:5px;
	margin-left:10px;
}
.setsListCurrent{
	color:#828282;
	margin-top:5px;
	margin-left:10px;
}
.setsList a{
	text-decoration:none;
}
div.setInfo{
	margin-left:10px;
}
a.hide{
	text-decoration:none;
	float:right;
	text-transform: uppercase;
	font-size:13px;
	color: #828282;
}
a.hide:hover{
	color:none;
}
div.edit{
	text-align:right;
}
div.edit a{
	text-decoration:none;
	text-transform: uppercase;
	font-size:13px;
	color: #828282;
}
div.edit a:hover{
	color:none;
}

/*  FORMS */
#newSetForm .formLabel, #editSetForm .formLabel, #emailSetForm .formLabel, #shareSetForm .formLabel{
	font-weight:bold;
	margin: 10px 0px 2px 0px;
}
#emailSetForm .formLabelNote, #shareSetForm .formLabelNote, #newSetForm .formLabelNote, #editSetForm .formLabelNote{
	font-size:11px;
	font-weight:normal;
}
#newSetForm input, #editSetForm input, #emailSetForm input, #shareSetForm input {
	font-size:11px;
	font-family: Arial, sans-serif;
	font-weight: normal;
	padding: 0px 2px 0px 2px;
	margin: 0px;
	border: 1px solid #828282;
	width:240px;
}
#shareSetForm input {
	width:220px;
}
#newSetForm ul, #editSetForm ul, #emailSetForm ul, #shareSetForm ul {
	width:244px;
}
#newSetForm li, #editSetForm li, #emailSetForm, #shareSetForm li {
	width:244px;
}
#newSetForm input[type="text"], #editSetForm input[type="text"], #emailSetForm input[type="text"], #shareSetForm input[type="text"] {
	font-size:11px;
	font-family: Arial, sans-serif;
	font-weight: normal;
	padding: 2px 2px 2px 2px;
	margin: 0px;
	border: 1px solid #828282;
	width:240px;
}
#shareSetForm input[type="text"] {
	width:220px;
	margin-bottom:5px;
}
#newSetForm textarea, #editSetForm textarea, #emailSetForm textarea, #shareSetForm textarea {
	font-size:11px;
	font-family: Arial, sans-serif;
	font-weight: normal;
	padding: 0px 2px 0px 2px;
	margin: 0px;
	border: 1px solid #828282;
	width:240px;
}
#newSetForm input[type="textarea"], #editSetForm input[type="textarea"], #emailSetForm input[type="textarea"], #shareSetForm input[type="textarea"] {
	font-size:11px;
	font-family: Arial, sans-serif;
	font-weight: normal;
	padding: 2px 2px 2px 2px;
	margin: 0px;
	border: 1px solid #828282;
	width:240px;
}
#newSetForm a, #editSetForm a, #emailSetForm a, #shareSetForm a{
	text-transform:uppercase;
	font-family: Arial, sans-serif;
	font-size:14px;
	color: #545454;
	font-weight:bold;
	text-decoration:none;
	margin: 0px;
	padding: 5px 0px 0px 0px;
}
#newSetForm a:hover, #editSetForm a:hover, #emailSetForm a:hover, #shareSetForm a:hover{
	color: #828282;
	text-decoration:none;
}
#shareSetForm div.caAddItemButton a{
	text-transform:none;
	font-size:12px;
}
table.caListItem td {
	vertical-align:top;
}
table.caListItem td img{
	padding-top:13px;
}

/* overlay (for slideshow) */
#caSetsSlideshowPanel {
	position: fixed;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	display: none;
	margin: 0 auto;
	padding: 0px;
	z-index: 31000;			/* needs to be on top of menu bar, which has z-index=30000 */
}
#caSetsSlideshowPanel #close{
	position: absolute;
	top: 0px;
	right: 0px;
	width:34px;
	height:34px;
	margin:0px 3px 0px 0px;
	background-image:url("../graphics/close.png");
	background-repeat:no-repeat;
	z-index: 32000;
}
#caSetsSlideshowPanel #close a{
	text-decoration:none;
	font-size:32px;
	width:34px;
	height:34px;
	border:0px;
}
#caSetsSlideshowPanelContentArea {
	width: 700px;
	height: 700px;
	margin-left:auto;
	margin-right:auto;
}
#caSetsSlideshowContainer{
	text-align:center;
	position:relative;
	width:80%;
	margin-left:auto;
	margin-right:auto;
}
#caSetsSlideshow div{
	width:100%;
	text-align:center;
}

.caSetsSlideshowCaption{
	color: #828282;
	font-size:13px;
	padding-top:10px;
}
/*#caSetsSlideshowPrevious {
	position:absolute;
	top:250px;
	left:-20px;
}
#caSetsSlideshowNext {
	position:absolute;
	top:250px;
	right:-20px;
}*/
#caSetsSlideshowPrevious {
	float:left;
}
#caSetsSlideshowNext {
	float:right;
}
#caSetsSlideshowNext a, #caSetsSlideshowPrevious a{
	font-size:35px;
	color:#828282;
	text-decoration:none;
}
#caSetsSlideshowPlayPause a{
	color:#828282;
	font-size:20px;
	text-decoration:none;
}
#caSetsSlideshowToolBar{
	width:120px;
	background-color:#EDEDED;
	border-radius: 8px;
	-moz-border-radius: 8px;
	-webkit-border-radius: 8px;
	margin-left:auto;
	margin-right:auto;
	margin-top:20px;
	margin-bottom:20px;
	padding:10px;
}

/* styles for the slideshow when in media panel */
#caSetsSlideshowPanelContentArea #caSetsSlideshowContainer{
	text-align:center;
	position:relative;
	width:100%;
}

#caSetsSlideshowPanelContentArea #caSetsSlideshowContainer H1{
	color: #FFF;
}
#caSetsSlideshowPanelContentArea .caSetsSlideshowCaption{
	color: #FFF;
}
#caSetsSlideshowPanelContentArea #caSetsSlideshowToolBar{
	background-color: #828282;
}
#caSetsSlideshowPanelContentArea #caSetsSlideshowNext a, #caSetsSlideshowPanelContentArea #caSetsSlideshowPrevious a{
	color:#ededed;
}
#caSetsSlideshowPanelContentArea #caSetsSlideshowPlayPause a{
	color:#ededed;
}


text:
Offseason2012

This is the LuNaTeCs C++ code for the 2012 FRC offseason. It is released under the BSD 2-Clause License, a copy of which is included in the LICENSE.txt file.


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <meta name="description" content="">
    <meta name="description" content="">
    <title>Blog post</title>

      <link rel="stylesheet" href="libs/normalize-css/normalize.css">
      <link rel="stylesheet" href="css/styles.min.css">

JOIN OUR MAILING LIST

SHOP WINES

SEARCH

OUR WINE

lorem

ipsum

amet

WE ARE McWILLIAM'S

lorem

ipsum

amet

OUR BACKYARD

lorem

ipsum

amet

OUR COMMUNITY

lorem

ipsum

amet

CONTACT

lorem

ipsum

amet

ARTICLE TITLE

by Author Name, 28 February 2017

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

Sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, .

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

Sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, .

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

Sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, .

buttons here

BLOG TAGS

TAG

TAG

TAG

TAG

TAG

TAG

TAG

TAG

TAG

TAG

DISCOVER MORE OF OUR FEATURED ARTICLES

ARTICLE TITLEAuthor Name

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Ut enim ad minim veniam, quis nostrud exercitation

READ MORE

ARTICLE TITLEAuthor Name

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Ut enim ad minim veniam, quis nostrud exercitation

READ MORE

ARTICLE TITLEAuthor Name

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Ut enim ad minim veniam, quis nostrud exercitation

READ MORE

BECOME PART OF THE McWILLIAM'S COMMUNITY.

Join our mailing list for our latest news, offers and events.

          <form action="" class="m-contact-form">

<input type="text" placeholder="Name" class="m-contact-form__input"/>

<input type="text" placeholder="e-mail" class="m-contact-form__input"/>

            <button class="m-btn">SIGN UP</button>
          </form>

CONTACT US

TERMS & CONDITIONS

PRIVACY POLICY

INTERNATIONAL WEBSITES

CANADA (French)

GERMANY

HONG KONG (English)

HONG KONG (Traditional Character)

HONG KONG (Simplified Character)

OUR WINE BRANDS

CANADA (French)

GERMANY

HONG KONG (English)

HONG KONG (Traditional Character)

HONG KONG (Simplified Character)

CORPORATE

couple

test

items

New South Wales Liquor Licence: LIQP700383194. Liquor Act 2007. It is against the law to sell or supply alcohol to, or to obtain alcohol on behalf of, a person under the age of 18 years.


text:
<Alloy>
  <View id="row">
    <ImageView id="sport_icon"/>
    <View id="info_box" onClick="gameClick">
      <View id="top">
        <ImageView id="profile_photo"/>
        <Label id="name"/>
        <View id="description">
          <Label id="action"/>
          <Label id="game_type"/>
        </View>
        <View id="counts">
          <ImageView id="pin_icon"/>
          <Label id="distance"/>
          <ImageView id="people_icon"/>
          <Label id="headcount"/>
        </View>
      </View>
      <View id="bottom">
        <ImageView id="clock_icon"/>
        <Label id="date_time"/>
        <View id="bubble">
          <Label id="comment_count"/>
        </View>
      </View>
    </View>
  </View>
</Alloy>


text:
<?php

class Utils
{
    /**
     * Checks if $response contains $str
     * @param string $response
     * @param string $str
     * @return bool
     */
    public static function contains($response, $str)
    {
        if (strpos($response, $str) !== false) {
            return true;
        }
        return false;
    }

    /**
     * Checks if oxidemod plugin version is greater than the installed one
     * @param string $currentVersion Ex: 3.54.7
     * @param string $ownVersion Ex: 2.3.6
     * @return bool|int Returns 2 if the difference is a major release
     */
    public static function isGreater($currentVersion, $ownVersion)
    {
        if ($currentVersion == $ownVersion) {
            return false;
        }

        $cVersion = explode(".", $currentVersion);
        $oVersion = explode(".", $ownVersion);
        $totalSteps = sizeof($cVersion) - 1;

        foreach ($cVersion as $k => $number) {
            $oNumber = $oVersion[$k];

            if ($oNumber == "x") {
                $oNumber = 0;
            }

            if ($number < $oNumber) {
                return false;
            } else if ($number > $oNumber) {

                // check if its a major version (as it maybe have breaking changes)
                if ($k != $totalSteps) {
                    return 2;
                }
                return 1;
            }
        }
        return false;
    }

    /**
     * Prints a message adapted to cli or browser
     * @param string $message
     */
    public static function p($message, $newline = true)
    {
        if ($newline) {
            if (php_sapi_name() === 'cli') {
                $message .= "\n";
            } else {
                $message .= "<br>";
            }
        }

        echo $message;
    }
}


text:
'use strict';

angular.module('vehicles')
	.config([
		'$stateProvider',
		function($stateProvider) {
			$stateProvider.state('vehicles', {
				url: '/vehicles',
				abstract: 'true',
				template: '<ui-view/>'
			})
			.state('vehicles.list', {
				url: '',
				template: '/modules/vehicles/client/views/vehicles.list.client.view.html'
			})
			.state('vehicles.create', {
				url: '/create',
				template: '/modules/vehicles/client/views/vehicles.create.client.view.html'
			})
			.state('vehicles.edit', {
				url: '',
				template: '/modules/vehicles/client/views/vehicles.edit.client.view.html'
			})
		}
	]);


text:
require 'fog/openstackhp/request_common'
require 'fog/openstackcore/service_catalog'
require 'fog/openstackcore/services/identity_v2'

module Fog
  module OpenStackHp
    class IdentityV2 < Fog::OpenStackCore::IdentityV2

      requires :hp_secret_key, :hp_tenant_id, :hp_avl_zone
      recognizes :hp_auth_uri, :credentials, :hp_service_type, :hp_tenant_name
      recognizes :hp_use_upass_auth_style, :hp_auth_version, :user_agent
      recognizes :hp_access_key
      secrets :hp_secret_key

      DEFAULT_AUTH_URI = "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens"

      request_path 'fog/openstackhp/requests/identity/v2'

      ## Token Operations
      request :create_token
      request :validate_token

      # minimal requirement
      class Mock
      end

      class Real < Fog::OpenStackCore::IdentityV2::Real

        include Fog::OpenStackHp::RequestCommon

        def initialize(options={})
           @hp_options = options.dup
           super(customize_options(options))
        end

        private

        def customize_options(options)
          opts = options.dup
          opts.merge!(:openstack_username => opts.delete(:hp_access_key))
          opts.merge!(:openstack_api_key => opts.delete(:hp_secret_key))
          opts.merge!(:openstack_auth_url => opts.delete(:hp_auth_uri) || DEFAULT_AUTH_URI)
          opts.merge!(:openstack_region => opts.delete(:hp_avl_zone))
          opts.merge!(:openstack_tenant => opts.delete(:hp_tenant_name))
          opts
        end

        def authenticate
          return auth_with_credentials_and_tenant
        end

        def auth_with_credentials_and_tenant

          data = create_token(@hp_options[:hp_access_key],
                              @hp_options[:hp_secret_key],
                              nil,
                              @hp_options[:hp_tenant_id])
          access_hash = data.body.delete('access')

          @auth_token = access_hash['token']['id']

          @service_catalog =
            Fog::OpenStackCore::ServiceCatalog.from_response(self, access_hash.delete('serviceCatalog'))

          self
        end

      end # Real

    end # IdentityV2
  end # HP
end # Fog


text:
layout: page
title: Banner Valley Enterprises Trade Fair
date: 2016-05-24
author: Kathleen Watson
tags: weekly links, java
status: published
summary: Morbi id finibus tellus. In finibus massa vitae.
banner: images/banner/wedding.jpg
booking:
  startDate: 05/01/2017
  endDate: 05/05/2017
  ctyhocn: DVNPTHX
  groupCode: BVETF
published: true
---
Quisque pellentesque nibh in ipsum lobortis volutpat. Phasellus id lacus lacus. Quisque vestibulum augue sapien, et ultrices quam vehicula ac. Integer semper rhoncus sapien, sed egestas purus ullamcorper et. Interdum et malesuada fames ac ante ipsum primis in faucibus. Integer rutrum libero ac lacinia vestibulum. Quisque sapien orci, vulputate condimentum nisi eu, pharetra tincidunt lorem. Aliquam velit urna, interdum a lorem vel, interdum malesuada dui. Integer ultricies ante et lacus dignissim, id efficitur quam hendrerit. Nulla malesuada mollis ante. Suspendisse pulvinar turpis tristique tristique pharetra. Aenean id diam erat. Maecenas vel ante ex. In at purus rhoncus erat tempus imperdiet at in neque. Maecenas a ipsum vitae velit ornare suscipit.

1 Quisque porta ante nec sagittis feugiat
1 Sed molestie ex eu porttitor consequat
1 Donec aliquet ante at arcu condimentum interdum
1 Etiam facilisis sem ac pretium tincidunt.

Vivamus hendrerit sed arcu vitae malesuada. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Quisque bibendum ipsum quam, non egestas leo posuere at. Nullam posuere imperdiet mi id consequat. Donec eu ipsum imperdiet, pulvinar sapien vitae, sollicitudin risus. Phasellus lacus diam, volutpat et hendrerit in, blandit a sem. Praesent metus sapien, tempus et felis eget, ullamcorper fermentum odio.


text:
package com.mongodb.gridfs;

import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import com.mongodb.MongoException;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * This class enables retrieving a GridFS file metadata and content. Operations include:
 *

 *
Writing data to a file on disk or an OutputStream

 *
Creating an {@code InputStream} to stream the data into

 *

 *
 * @mongodb.driver.manual core/gridfs/ GridFS
 */
public class GridFSDBFile extends GridFSFile {
    /**
     * Returns an InputStream from which data can be read.
     *
     * @return the input stream
     */
    public InputStream getInputStream() {
        return new GridFSInputStream();
    }

    /**
     * Writes the file's data to a file on disk.
     *
     * @param filename the file name on disk
     * @return number of bytes written
     * @throws IOException if there are problems writing to the file
     */
    public long writeTo(final String filename) throws IOException {
        return writeTo(new File(filename));
    }

    /**
     * Writes the file's data to a file on disk.
     *
     * @param file the File object
     * @return number of bytes written
     * @throws IOException if there are problems writing to the {@code file}
     */
    public long writeTo(final File file) throws IOException {
        FileOutputStream out = null;
        try {
            out = new FileOutputStream(file);
            return writeTo(out);
        } finally {
            if (out != null) {
                out.close();
            }
        }
    }

    /**
     * Writes the file's data to an OutputStream.
     *
     * @param out the OutputStream
     * @return number of bytes written
     * @throws IOException if there are problems writing to {@code out}
     */
    public long writeTo(final OutputStream out) throws IOException {
        int nc = numChunks();
        for (int i = 0; i < nc; i++) {
            out.write(getChunk(i));
        }
        return length;
    }

    private byte[] getChunk(final int chunkNumber) {
        if (fs == null) {
            throw new IllegalStateException("No GridFS instance defined!");
        }

        DBObject chunk = fs.getChunksCollection().findOne(new BasicDBObject("files_id", id).append("n", chunkNumber));
        if (chunk == null) {
            throw new MongoException("Can't find a chunk!  file id: " + id + " chunk: " + chunkNumber);
        }

        return (byte[]) chunk.get("data");
    }

    /**
     * Removes file from GridFS i.e. removes documents from files and chunks collections.
     */
    void remove() {
        fs.getFilesCollection().remove(new BasicDBObject("_id", id));
        fs.getChunksCollection().remove(new BasicDBObject("files_id", id));
    }

    private class GridFSInputStream extends InputStream {

        private final int numberOfChunks;
        private int currentChunkId = -1;
        private int offset = 0;
        private byte[] buffer = null;

        GridFSInputStream() {
            this.numberOfChunks = numChunks();
        }

        @Override
        public int available() {
            if (buffer == null) {
                return 0;
            }
            return buffer.length - offset;
        }

        @Override
        public int read() {
            byte[] b = new byte[1];
            int res = read(b);
            if (res < 0) {
                return -1;
            }
            return b[0] & 0xFF;
        }

        @Override
        public int read(final byte[] b) {
            return read(b, 0, b.length);
        }

        @Override
        public int read(final byte[] b, final int off, final int len) {

            if (buffer == null || offset >= buffer.length) {
                if (currentChunkId + 1 >= numberOfChunks) {
                    return -1;
                }

                buffer = getChunk(++currentChunkId);
                offset = 0;
            }

            int r = Math.min(len, buffer.length - offset);
            System.arraycopy(buffer, offset, b, off, r);
            offset += r;
            return r;
        }

        /**
         * Will smartly skip over chunks without fetching them if possible.
         */
        @Override
        public long skip(final long bytesToSkip) throws IOException {
            if (bytesToSkip <= 0) {
                return 0;
            }

            if (currentChunkId == numberOfChunks) {
                //We're actually skipping over the back end of the file, short-circuit here
                //Don't count those extra bytes to skip in with the return value
                return 0;
            }

            // offset in the whole file
            long offsetInFile = 0;
            if (currentChunkId >= 0) {
                offsetInFile = currentChunkId * chunkSize + offset;
            }
            if (bytesToSkip + offsetInFile >= length) {
                currentChunkId = numberOfChunks;
                buffer = null;
                return length - offsetInFile;
            }

            int temp = currentChunkId;
            currentChunkId = (int) ((bytesToSkip + offsetInFile) / chunkSize);
            if (temp != currentChunkId) {
                buffer = getChunk(currentChunkId);
            }
            offset = (int) ((bytesToSkip + offsetInFile) % chunkSize);

            return bytesToSkip;
        }
    }
}


text:
require 'awesome_print'
require_relative 'count_frequency'
require_relative 'words_from_string'

text = %{The problem breaks down into two parts. First, given some text as a string, return a list of words. That sounds like an array. Then, build a count for each distinct word. That sounds like a use for a hash---we can index it with the word and use the corresponding entry to keep a count.}

words_list = words_from_string text
frequencies = count_frequency(words_list)
sorted = frequencies.sort_by {|word, count| count }
top_five = sorted.last(5)
# top_five.each {|word, count| puts "#{word}: #{count}"}
# sorted.last(5).each {|pair| puts "#{pair[0]}: #{pair[1]}"}
# p top_five.map {|key, value| "#{key}: #{value}"}
mapped = top_five.map {|pair| "#{pair[0]}: #{pair[1]}"}
puts mapped[0].class


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        $this->load->model('user_model');
    }
    public  function  index(){

        $this->load->view('admin/login.html');

    }
    public function loginAction()
    {
        $pass = $this->input->post('name');
        $json =$this->input->post('json');

        $this->load->library('Aes');
        $result = $this->aes->cryptoJsAesDecrypt($pass,$json);

        if($pass == 'admin' && $result == 'admin') {
            $this->load->library('session');
            $this->session->set_userdata(array('isAdmin'=>true));
            echo json_encode(array('status'=>0));
        } else {
            echo json_encode(array('status'=>-1,'msg'=>'登陆失败'));
        }
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>datepicker demo </title>
<link type="text/css" rel="stylesheet"  href="../highlight/shCore.css"/>
<link type="text/css" rel="stylesheet" href="../style/avalon.doc.css"/>

            <fieldset style="margin-top: 20px; padding: 20px 10px;">
                <legend>set datepicker calendarWidth</legend>
                <input ms-widget="datepicker, d1" data-datepicker-calendar-width='300'/>
            </fieldset>

                <!DOCTYPE HTML>
                <html>
                <head>
                    <meta charset='utf-8'/>
                    <title>datepicker demo</title>
                    <style type="text/css">
                        .oni-datepicker-calendar-days tr {
                            border-bottom: 1px solid #ccc;
                        }
                        .oni-datepicker-calendar-days td {
                            padding: 3px 0 0;
                        }
                        .oni-datepicker-calendar-days td.oni-datepicker-selected {
                            background: #fff;
                        }
                        .oni-datepicker-selected .calendarCell{
                            background: #fcbe15;
                            color: #fff;
                        }
                        .calendarCell {
                            padding: 3px;
                        }
                        .calendarCell .activity {
                            background: #aaa;
                            color: #fff;
                            margin-top: 10px;
                        }
                        .oni-datepicker-selected .calendarCell .activity {
                            background: #09b6de;
                        }
                        .calendarCell p {
                            margin: 0;
                        }
                    </style>
                    <script src='avalon.js'></script>
                </head>
                <body>
                    <div ms-controller="demo">
                        <fieldset style="margin-top: 20px; padding: 20px 10px;">
                            <legend>set datepicker calendarWidth</legend>
                            <input ms-widget="datepicker, d1" data-datepicker-calendar-width='300'/>
                        </fieldset>
                        <script>
                            require(["datepicker/avalon.datepicker"], function(avalon) {
                                var model = avalon.define("demo", function(vm) {
                                    vm.datepicker = {
                                         dateCellRender: function(date, vmodel, dateObject) {
                                            return "<div class='calendarCell'><p>"+date+"</p><p class='activity'>活动</p></div>"
                                            return date
                                        }

                                    }
                                })
                                avalon.scan();
                            })
                        </script>
                    </div>
                </body>
                </html>


text:
title:  Usko Ja Historia
date:  04/06/2020
---

Emme elä tyhjiössä. Valintamme vaikuttavat paitsi itseemme myös toisiin. Samalla tavoin monien muinoin eläneiden Jumalan lasten elämällä on ollut suuri vaikutus muidenkin tulevaisuuteen kuin vain heidän omaansa. Hepr. 11, tuo kuuluisa uskon esikuvista kertova luku, tekee yhteenvetoa siitä, millainen vaikutus muinaisten uskonsankareiden uskolla on ollut.

**Lue Hepr. 11:1–40. Mitä voimme oppia näiden uskonsankareiden elämästä?**

`Henok`

`Nooa`

`Abraham`

`Saara`

`Joosef`

`Mooses`

`Rahab`

`Simson`

Usko ei ole vain sitä, että uskomme johonkin tai johonkuhun; se on myös toimimista uskomme mukaan. Usko näkyy toimintana; juuri tätä pidetään vanhurskautena. Juuri tällaiset uskonteot muuttavat historiaa. Jokainen uskonteko on sen varassa, että niissä turvaudutaan Jumalan sanaan.

Nooa toimi uskon varassa rakentaessaan arkin. Hän luotti Jumalan sanaan silloinkin, kun kokemus ja järki sanoivat muuta. Koska ei ollut koskaan satanut, kaikki viittasi siihen, että puhe tulvasta oli täyttä hölynpölyä. Nooa kuitenkin totteli Jumalaa ja ihmiskunta pelastui. Abraham lähti eteläisessä Mesopotamiassa sijaitsevasta Urista, joka oli sen ajan kehittynein kaupunki, kohti tuntematonta, johon Jumala hänet johtaisi. Hän valitsi toimia Jumalan käskyn mukaan. Mooses valitsi mieluummin olla paimen, joka johtaisi Jumalan kansan luvattuun maahan, kuin olla kuninkaana Egyptissä, sen ajan mahtavimmassa valtakunnassa. Hän luotti Kaikkivaltiaan ääneen, joka kutsui häntä palavasta pensaasta. Rahab päätti luottaa niihin uutisiin, joita oli kuullut Jumalan voimateoista. Hän suojeli kahta vakoojaa ja hänestä tuli yksi Jeesuksen esiäideistä. Miten vähän tiedämmekään siitä, miten päätöksemme tulevat vaikuttamaan lukemattoman moniin ihmisiin niin tässä kuin tulevissakin sukupolvissa!


text:
package com.InfinityRaider.elemancy.magic.spell.projectile;

import com.InfinityRaider.elemancy.magic.DuplicateSpellException;
import com.InfinityRaider.elemancy.magic.Element;
import com.InfinityRaider.elemancy.magic.spell.SpellProjectile;
import com.InfinityRaider.elemancy.reference.Names;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public final class SpellForgeElemental extends SpellProjectile {
    public SpellForgeElemental() throws DuplicateSpellException {
        super(Element.FIRE, Element.LIFE, Names.Spells.FORGE_ELEMENTAL);
    }

    @Override
    public boolean isChanneled() {
        return false;
    }

    @Override
    public void castSpell(World world, int x, int y, int z, EntityPlayer player, int lvl1, int lvl2, int channelTicks) {

    }

    @Override
    public void onStopChannel(World world, int x, int y, int z, EntityPlayer player, int lvl1, int lvl2, int channelTicks) {

    }

    @Override
    public void spellParticles(World world, int x, int y, int z, EntityPlayer player, int lvl1, int lvl2, int channelTicks) {

    }
}