text:
--------------------------------
-- @overload self
-- @overload self
-- @function [parent=#AnimationFrame] getUserInfo
-- @param self
-- @return map_table#map_table ret (return value: map_table)

--------------------------------
--  Sets the units of time the frame takes.

-- param delayUnits The units of time the frame takes.
-- @function [parent=#AnimationFrame] setDelayUnits
-- @param self
-- @param #float delayUnits
-- @return AnimationFrame#AnimationFrame self (return value: cc.AnimationFrame)

--------------------------------
--
-- @function [parent=#AnimationFrame] clone
-- @param self
-- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame)

--------------------------------
--  Return a SpriteFrameName to be used.

-- return a SpriteFrameName to be used.
-- @function [parent=#AnimationFrame] getSpriteFrame
-- @param self
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)

--------------------------------
--  Gets the units of time the frame takes.

-- return The units of time the frame takes.
-- @function [parent=#AnimationFrame] getDelayUnits
-- @param self
-- @return float#float ret (return value: float)

--------------------------------
--  Sets user information.

-- param userInfo A dictionary as UserInfo.
-- @function [parent=#AnimationFrame] setUserInfo
-- @param self
-- @param #map_table userInfo
-- @return AnimationFrame#AnimationFrame self (return value: cc.AnimationFrame)

--------------------------------
--  initializes the animation frame with a spriteframe, number of delay units and a notification user info
-- @function [parent=#AnimationFrame] initWithSpriteFrame
-- @param self
-- @param #cc.SpriteFrame spriteFrame
-- @param #float delayUnits
-- @param #map_table userInfo
-- @return bool#bool ret (return value: bool)

--------------------------------
-- Creates the animation frame with a spriteframe, number of delay units and a notification user info.

-- param spriteFrame The animation frame with a spriteframe.

-- param delayUnits Number of delay units.

-- param userInfo A notification user info.

-- since 3.0
-- @function [parent=#AnimationFrame] create
-- @param self
-- @param #cc.SpriteFrame spriteFrame
-- @param #float delayUnits
-- @param #map_table userInfo
-- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame)

--------------------------------
-- js ctor
-- @function [parent=#AnimationFrame] AnimationFrame
-- @param self
-- @return AnimationFrame#AnimationFrame self (return value: cc.AnimationFrame)

return nil


text:
using Newtonsoft.Json.Linq;

namespace LoveSeat
{
    /// <summary>
    /// Repersent response object from CouchDB as JSON.
    /// </summary>
    public class CouchResponseObject : JObject
    {
        public CouchResponseObject(JObject obj)
            : base(obj)
        {
        }

        /// <summary>
        /// Get the HTTP status code of the response.
        /// </summary>
        public int StatusCode { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
promise-ops
===========

A couple of operators on promises that I found myself using in more than one project.

I needed this in several of my private projects so I decided to extract it as a library.

Installation
------------

```
npm install promise-ops
```

Usage, Features, API, wtf...?!
------------------------------
Please refer to the [test suite](./spec/utils-p-spec.coffee).


text:
package org.apache.deltaspike.core.util.bean;

import org.apache.deltaspike.core.api.literal.AnyLiteral;
import org.apache.deltaspike.core.api.literal.DefaultLiteral;
import org.apache.deltaspike.core.util.Annotateds;
import org.apache.deltaspike.core.util.metadata.builder.ContextualLifecycle;
import org.apache.deltaspike.core.util.metadata.builder.DelegatingContextualLifecycle;
import org.apache.deltaspike.core.util.metadata.builder.DummyInjectionTarget;

import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InjectionTarget;
import javax.inject.Named;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

/**
 *

 * A builder class for creating immutable beans. The builder can create
 * {@link javax.enterprise.inject.spi.PassivationCapable} beans.
 *

 *

 *

 * The builder can read from an {@link AnnotatedType} and have any attribute
 * modified. This class is not thread-safe, but the bean created by calling
 * {@link #create()} is.
 *

 *

 *

 * It is advised that a new bean builder is instantiated for each bean created.
 *

 */
// X TODO: Add tests
public class BeanBuilder<T>
{

    private final BeanManager beanManager;

    private Class<?> beanClass;
    private String name;
    private Set<Annotation> qualifiers;
    private Class<? extends Annotation> scope;
    private Set<Class<? extends Annotation>> stereotypes;
    private Set<Type> types;
    private Set<InjectionPoint> injectionPoints;
    private boolean alternative;
    private boolean nullable;
    private ContextualLifecycle<T> beanLifecycle;
    private boolean passivationCapable;
    private String id;
    private String toString;

    /**
     * Instantiate a new bean builder.
     *
     * @param beanManager the bean manager to use for creating injection targets
     *                    and determining if annotations are qualifiers, scopes or
     *                    stereotypes.
     */
    public BeanBuilder(BeanManager beanManager)
    {
        this.beanManager = beanManager;
    }

    /**
     *

     * Read the {@link AnnotatedType}, creating a bean from the class and it's
     * annotations.
     *

     *

     *

     * By default the bean lifecycle will wrap the result of calling
     * {@link BeanManager#createInjectionTarget(AnnotatedType)}.
     *

     *

     *

     * {@link BeanBuilder} does not support reading members of the class
     * to create producers or observer methods.
     *

     *
     * @param type the type to read
     */
    public BeanBuilder<T> readFromType(AnnotatedType<T> type)
    {
        this.beanClass = type.getJavaClass();
        InjectionTarget<T> injectionTarget;
        if (!type.getJavaClass().isInterface())
        {
            injectionTarget = beanManager.createInjectionTarget(type);
        }
        else
        {
            injectionTarget = new DummyInjectionTarget<T>();
        }
        this.beanLifecycle = new DelegatingContextualLifecycle<T>(injectionTarget);
        this.injectionPoints = injectionTarget.getInjectionPoints();
        this.qualifiers = new HashSet<Annotation>();
        this.stereotypes = new HashSet<Class<? extends Annotation>>();
        this.types = new HashSet<Type>();
        for (Annotation annotation : type.getAnnotations())
        {
            if (beanManager.isQualifier(annotation.annotationType()))
            {
                this.qualifiers.add(annotation);
            }
            else if (beanManager.isScope(annotation.annotationType()))
            {
                this.scope = annotation.annotationType();
            }
            else if (beanManager.isStereotype(annotation.annotationType()))
            {
                this.stereotypes.add(annotation.annotationType());
            }
            if (annotation instanceof Named)
            {
                this.name = ((Named) annotation).value();
            }
            if (annotation instanceof Alternative)
            {
                this.alternative = true;
            }
        }
        if (this.scope == null)
        {
            this.scope = Dependent.class;
        }
        for (Class<?> c = type.getJavaClass(); c != Object.class && c != null; c = c.getSuperclass())
        {
            this.types.add(c);
        }
        for (Class<?> i : type.getJavaClass().getInterfaces())
        {
            this.types.add(i);
        }
        if (qualifiers.isEmpty())
        {
            qualifiers.add(new DefaultLiteral());
        }
        qualifiers.add(new AnyLiteral());
        this.id = ImmutableBeanWrapper.class.getName() + ":" + Annotateds.createTypeId(type);
        return this;
    }

    /**
     *

     * Use the bean builder's current state to define the bean.
     *

     *
     * @return the bean
     */
    public Bean<T> create()
    {
        if (!passivationCapable)
        {
            return new ImmutableBean<T>(beanClass, name, qualifiers, scope, stereotypes, types, alternative, nullable,
                    injectionPoints, toString, beanLifecycle);
        }
        else
        {
            return new ImmutablePassivationCapableBean<T>(beanClass, name, qualifiers, scope, stereotypes, types,
                    alternative, nullable, injectionPoints, toString, beanLifecycle, id);
        }
    }

    /**
     * Qualifiers currently defined for bean creation.
     *
     * @return the qualifiers current defined
     */
    public Set<Annotation> getQualifiers()
    {
        return qualifiers;
    }

    /**
     * Define the qualifiers used for bean creation.
     *
     * @param qualifiers the qualifiers to use
     */
    public BeanBuilder<T> qualifiers(Set<Annotation> qualifiers)
    {
        this.qualifiers = qualifiers;
        return this;
    }

    /**
     * Define the qualifiers used for bean creation.
     *
     * @param qualifiers the qualifiers to use
     */
    public BeanBuilder<T> qualifiers(Annotation... qualifiers)
    {
        this.qualifiers = new HashSet<Annotation>(Arrays.asList(qualifiers));
        return this;
    }

    /**
     * Add to the qualifiers used for bean creation.
     *
     * @param qualifier the additional qualifier to use
     */
    public BeanBuilder<T> addQualifier(Annotation qualifier)
    {
        this.qualifiers.add(qualifier);
        return this;
    }

    /**
     * Add to the qualifiers used for bean creation.
     *
     * @param qualifiers the additional qualifiers to use
     */
    public BeanBuilder<T> addQualifiers(Annotation... qualifiers)
    {
        this.qualifiers.addAll(new HashSet<Annotation>(Arrays.asList(qualifiers)));
        return this;
    }

    /**
     * Add to the qualifiers used for bean creation.
     *
     * @param qualifiers the additional qualifiers to use
     */
    public BeanBuilder<T> addQualifiers(Collection<Annotation> qualifiers)
    {
        this.qualifiers.addAll(qualifiers);
        return this;
    }

    /**
     * Scope currently defined for bean creation.
     *
     * @return the scope currently defined
     */
    public Class<? extends Annotation> getScope()
    {
        return scope;
    }

    /**
     * Define the scope used for bean creation.
     *
     * @param scope the scope to use
     */
    public BeanBuilder<T> scope(Class<? extends Annotation> scope)
    {
        this.scope = scope;
        return this;
    }

    /**
     * Stereotypes currently defined for bean creation.
     *
     * @return the stereotypes currently defined
     */
    public Set<Class<? extends Annotation>> getStereotypes()
    {
        return stereotypes;
    }

    /**
     * Define the stereotypes used for bean creation.
     *
     * @param stereotypes the stereotypes to use
     */
    public BeanBuilder<T> stereotypes(Set<Class<? extends Annotation>> stereotypes)
    {
        this.stereotypes = stereotypes;
        return this;
    }

    /**
     * Type closure currently defined for bean creation.
     *
     * @return the type closure currently defined
     */
    public Set<Type> getTypes()
    {
        return types;
    }

    /**
     * Define the type closure used for bean creation.
     *
     * @param types the type closure to use
     */
    public BeanBuilder<T> types(Set<Type> types)
    {
        this.types = types;
        return this;
    }

    /**
     * Define the type closure used for bean creation.
     *
     * @param types the type closure to use
     */
    public BeanBuilder<T> types(Type... types)
    {
        this.types = new HashSet<Type>(Arrays.asList(types));
        return this;
    }

    /**
     * Add to the type closure used for bean creation.
     *
     * @param type additional type to use
     */
    public BeanBuilder<T> addType(Type type)
    {
        this.types.add(type);
        return this;
    }

    /**
     * Add to the type closure used for bean creation.
     *
     * @param types the additional types to use
     */
    public BeanBuilder<T> addTypes(Type... types)
    {
        this.types.addAll(new HashSet<Type>(Arrays.asList(types)));
        return this;
    }

    /**
     * Add to the type closure used for bean creation.
     *
     * @param types the additional types to use
     */
    public BeanBuilder<T> addTypes(Collection<Type> types)
    {
        this.types.addAll(types);
        return this;
    }

    /**
     * Whether the created bean will be an alternative.
     *
     * @return true if the created bean will be an alternative,
     *         otherwise false
     */
    public boolean isAlternative()
    {
        return alternative;
    }

    /**
     * Define that the created bean will (or will not) be an alternative.
     *
     * @param alternative true if the created bean should be an
     *                    alternative, otherwise false
     */
    public BeanBuilder<T> alternative(boolean alternative)
    {
        this.alternative = alternative;
        return this;
    }

    /**
     * Whether the created bean will be nullable.
     *
     * @return true if the created bean will be nullable, otherwise
     *         false
     */
    public boolean isNullable()
    {
        return nullable;
    }

    /**
     * Define that the created bean will (or will not) be nullable.
     *
     * @param nullable true if the created bean should be nullable,
     *                 otherwise false
     */
    public BeanBuilder<T> nullable(boolean nullable)
    {
        this.nullable = nullable;
        return this;
    }

    /**
     * The {@link ContextualLifecycle} currently defined for bean creation.
     *
     * @return the bean lifecycle currently defined
     */
    public ContextualLifecycle<T> getBeanLifecycle()
    {
        return beanLifecycle;
    }

    /**
     * Define the {@link ContextualLifecycle} used for bean creation.
     *
     * @param beanLifecycle the {@link ContextualLifecycle} to use for bean
     *                      creation.
     */
    public BeanBuilder<T> beanLifecycle(ContextualLifecycle<T> beanLifecycle)
    {
        this.beanLifecycle = beanLifecycle;
        return this;
    }

    /**
     * The bean class currently defined for bean creation.
     *
     * @return the bean class currently defined.
     */
    public Class<?> getBeanClass()
    {
        return beanClass;
    }

    /**
     * Define the bean class used for bean creation.
     *
     * @param beanClass the bean class to use
     */
    public BeanBuilder<T> beanClass(Class<?> beanClass)
    {
        this.beanClass = beanClass;
        return this;
    }

    /**
     * The bean manager in use. This cannot be changed for this
     * {@link BeanBuilder}.
     *
     * @return the bean manager in use
     */
    public BeanManager getBeanManager()
    {
        return beanManager;
    }

    /**
     * The name of the bean currently defined for bean creation.
     *
     * @return the name of the bean or null if the bean has no name
     */
    public String getName()
    {
        return name;
    }

    /**
     * Define the name of the bean used for bean creation.
     *
     * @param name the name of the bean to use or null if the bean
     *             should have no name
     */
    public BeanBuilder<T> name(String name)
    {
        this.name = name;
        return this;
    }

    /**
     * Whether the created bean will be passivation capable.
     *
     * @return true if the created bean will be passivation capable,
     *         otherwise false
     */
    public boolean isPassivationCapable()
    {
        return passivationCapable;
    }

    /**
     * Define that the created bean will (or will not) be passivation capable.
     *
     * @param passivationCapable true if the created bean should be
     *                           passivation capable, otherwise false
     */
    public BeanBuilder<T> passivationCapable(boolean passivationCapable)
    {
        this.passivationCapable = passivationCapable;
        return this;
    }

    /**
     * The id currently defined for bean creation.
     *
     * @return the id currently defined.
     */
    public String getId()
    {
        return id;
    }

    /**
     * Define the id used for bean creation.
     *
     * @param id the id to use
     */
    public BeanBuilder<T> id(String id)
    {
        this.id = id;
        return this;
    }

    /**
     * The injection points currently defined for bean creation.
     *
     * @return the injection points currently defined.
     */
    public Set<InjectionPoint> getInjectionPoints()
    {
        return injectionPoints;
    }

    /**
     * Define the injection points used for bean creation.
     *
     * @param injectionPoints the injection points to use
     */
    public BeanBuilder<T> injectionPoints(Set<InjectionPoint> injectionPoints)
    {
        this.injectionPoints = injectionPoints;
        return this;
    }

    /**
     * Define the string used when {@link #toString()} is called on the bean.
     *
     * @param toString the string to use
     */
    public BeanBuilder<T> toString(String toString)
    {
        this.toString = toString;
        return this;
    }

    /**
     * The string used when {@link #toString()} is called on the bean.
     *
     * @return the string currently defined
     */
    public String getToString()
    {
        return toString;
    }

}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v10/resources/ad_group_ad.proto

namespace Google\Ads\GoogleAds\V10\Resources;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * An ad group ad.
 *
 * Generated from protobuf message google.ads.googleads.v10.resources.AdGroupAd
 */
class AdGroupAd extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The resource name of the ad.
     * Ad group ad resource names have the form:
     * `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`
     *
     * Generated from protobuf field string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
     */
    protected $resource_name = '';
    /**
     * The status of the ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3;
     */
    protected $status = 0;
    /**
     * Immutable. The ad group to which the ad belongs.
     *
     * Generated from protobuf field optional string ad_group = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
     */
    protected $ad_group = null;
    /**
     * Immutable. The ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.resources.Ad ad = 5 [(.google.api.field_behavior) = IMMUTABLE];
     */
    protected $ad = null;
    /**
     * Output only. Policy information for the ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.resources.AdGroupAdPolicySummary policy_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     */
    protected $policy_summary = null;
    /**
     * Output only. Overall ad strength for this ad group ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.enums.AdStrengthEnum.AdStrength ad_strength = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     */
    protected $ad_strength = 0;
    /**
     * Output only. A list of recommendations to improve the ad strength. For example, a
     * recommendation could be "Your headlines are a little too similar.
     * Try adding more distinct headlines.".
     *
     * Generated from protobuf field repeated string action_items = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     */
    private $action_items;
    /**
     * Output only. The resource names of labels attached to this ad group ad.
     *
     * Generated from protobuf field repeated string labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
     */
    private $labels;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Immutable. The resource name of the ad.
     *           Ad group ad resource names have the form:
     *           `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`
     *     @type int $status
     *           The status of the ad.
     *     @type string $ad_group
     *           Immutable. The ad group to which the ad belongs.
     *     @type \Google\Ads\GoogleAds\V10\Resources\Ad $ad
     *           Immutable. The ad.
     *     @type \Google\Ads\GoogleAds\V10\Resources\AdGroupAdPolicySummary $policy_summary
     *           Output only. Policy information for the ad.
     *     @type int $ad_strength
     *           Output only. Overall ad strength for this ad group ad.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $action_items
     *           Output only. A list of recommendations to improve the ad strength. For example, a
     *           recommendation could be "Your headlines are a little too similar.
     *           Try adding more distinct headlines.".
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $labels
     *           Output only. The resource names of labels attached to this ad group ad.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V10\Resources\AdGroupAd::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The resource name of the ad.
     * Ad group ad resource names have the form:
     * `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`
     *
     * Generated from protobuf field string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Immutable. The resource name of the ad.
     * Ad group ad resource names have the form:
     * `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`
     *
     * Generated from protobuf field string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * The status of the ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3;
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * The status of the ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3;
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V10\Enums\AdGroupAdStatusEnum\AdGroupAdStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Immutable. The ad group to which the ad belongs.
     *
     * Generated from protobuf field optional string ad_group = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
     * @return string
     */
    public function getAdGroup()
    {
        return isset($this->ad_group) ? $this->ad_group : '';
    }

    public function hasAdGroup()
    {
        return isset($this->ad_group);
    }

    public function clearAdGroup()
    {
        unset($this->ad_group);
    }

    /**
     * Immutable. The ad group to which the ad belongs.
     *
     * Generated from protobuf field optional string ad_group = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
     * @param string $var
     * @return $this
     */
    public function setAdGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->ad_group = $var;

        return $this;
    }

    /**
     * Immutable. The ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.resources.Ad ad = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * @return \Google\Ads\GoogleAds\V10\Resources\Ad|null
     */
    public function getAd()
    {
        return $this->ad;
    }

    public function hasAd()
    {
        return isset($this->ad);
    }

    public function clearAd()
    {
        unset($this->ad);
    }

    /**
     * Immutable. The ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.resources.Ad ad = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * @param \Google\Ads\GoogleAds\V10\Resources\Ad $var
     * @return $this
     */
    public function setAd($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V10\Resources\Ad::class);
        $this->ad = $var;

        return $this;
    }

    /**
     * Output only. Policy information for the ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.resources.AdGroupAdPolicySummary policy_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return \Google\Ads\GoogleAds\V10\Resources\AdGroupAdPolicySummary|null
     */
    public function getPolicySummary()
    {
        return $this->policy_summary;
    }

    public function hasPolicySummary()
    {
        return isset($this->policy_summary);
    }

    public function clearPolicySummary()
    {
        unset($this->policy_summary);
    }

    /**
     * Output only. Policy information for the ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.resources.AdGroupAdPolicySummary policy_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param \Google\Ads\GoogleAds\V10\Resources\AdGroupAdPolicySummary $var
     * @return $this
     */
    public function setPolicySummary($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V10\Resources\AdGroupAdPolicySummary::class);
        $this->policy_summary = $var;

        return $this;
    }

    /**
     * Output only. Overall ad strength for this ad group ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.enums.AdStrengthEnum.AdStrength ad_strength = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return int
     */
    public function getAdStrength()
    {
        return $this->ad_strength;
    }

    /**
     * Output only. Overall ad strength for this ad group ad.
     *
     * Generated from protobuf field .google.ads.googleads.v10.enums.AdStrengthEnum.AdStrength ad_strength = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param int $var
     * @return $this
     */
    public function setAdStrength($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V10\Enums\AdStrengthEnum\AdStrength::class);
        $this->ad_strength = $var;

        return $this;
    }

    /**
     * Output only. A list of recommendations to improve the ad strength. For example, a
     * recommendation could be "Your headlines are a little too similar.
     * Try adding more distinct headlines.".
     *
     * Generated from protobuf field repeated string action_items = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getActionItems()
    {
        return $this->action_items;
    }

    /**
     * Output only. A list of recommendations to improve the ad strength. For example, a
     * recommendation could be "Your headlines are a little too similar.
     * Try adding more distinct headlines.".
     *
     * Generated from protobuf field repeated string action_items = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setActionItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->action_items = $arr;

        return $this;
    }

    /**
     * Output only. The resource names of labels attached to this ad group ad.
     *
     * Generated from protobuf field repeated string labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Output only. The resource names of labels attached to this ad group ad.
     *
     * Generated from protobuf field repeated string labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

}


text:
select
	c_date,
	c_time,
	c_integer,
	cast(count(*) over (partition by c_date ORDER BY c_time) as varchar(20))  ||  cast(sum(c_integer) OVER (partition by c_bigint order by c_time) as varchar(20))
from
	j6_v
where
	c_integer is not null;


text:
'use strict';

/**
 * Layout
 *
 * @constructor
 * @param {Object} [opts]
 */
module.exports = function (opts) {

  if (opts && opts.type) {
    if (typeof opts.type !== 'string') {
      throw new Error('Expected type to be a string.');
    }
    this.type = opts.type;
  }

  if (opts && opts.title) {
    if (typeof opts.title !== 'string') {
      throw new Error('Expected title to be a string.');
    }
    this.title = opts.title;
  }

  if (opts && opts.shortTitle) {
    if (typeof opts.shortTitle !== 'string') {
      throw new Error('Expected shortTitle to be a string.');
    }
    this.shortTitle = opts.shortTitle;
  }

  if (opts && opts.subtitle) {
    if (typeof opts.subtitle !== 'string') {
      throw new Error('Expected subtitle to be a string.');
    }
    this.subtitle = opts.subtitle;
  }

  if (opts && opts.body) {
    if (typeof opts.body !== 'string') {
      throw new Error('Expected body to be a string.');
    }
    this.body = opts.body;
  }

  if (opts && opts.tinyIcon) {
    if (typeof opts.tinyIcon !== 'string') {
      throw new Error('Expected tinyIcon to be a string.');
    }
    this.tinyIcon = opts.tinyIcon;
  }

  if (opts && opts.smallIcon) {
    if (typeof opts.smallIcon !== 'string') {
      throw new Error('Expected smallIcon to be a string.');
    }
    this.smallIcon = opts.smallIcon;
  }

  if (opts && opts.largeIcon) {
    if (typeof opts.largeIcon !== 'string') {
      throw new Error('Expected largeIcon to be a string.');
    }
    this.largeIcon = opts.largeIcon;
  }

  if (opts && opts.foregroundColor) {
    if (typeof opts.foregroundColor !== 'string') {
      throw new Error('Expected foregroundColor to be a string.');
    }
    this.foregroundColor = opts.foregroundColor;
  }

  if (opts && opts.primaryColor) {
    if (typeof opts.primaryColor !== 'string') {
      throw new Error('Expected primaryColor to be a string.');
    }
    this.primaryColor = opts.primaryColor;
  }

  if (opts && opts.secondaryColor) {
    if (typeof opts.secondaryColor !== 'string') {
      throw new Error('Expected secondaryColor to be a string.');
    }
    this.secondaryColor = opts.secondaryColor;
  }

  if (opts && opts.backgroundColor) {
    if (typeof opts.backgroundColor !== 'string') {
      throw new Error('Expected backgroundColor to be a string.');
    }
    this.backgroundColor = opts.backgroundColor;
  }

  if (opts && opts.headings) {
    if (!(opts.headings instanceof Array)) {
      throw new Error('Expected headings to be an array.');
    }
    opts.headings.forEach(function (heading) {
      if (typeof heading !== 'string') {
        throw new Error('Expected headings array to contain strings.');
      }
    });
    this.headings = opts.headings;
  }

  if (opts && opts.paragraphs) {
    if (!(opts.paragraphs instanceof Array)) {
      throw new Error('Expected paragraphs to be an array.');
    }
    opts.paragraphs.forEach(function (paragraph) {
      if (typeof paragraph !== 'string') {
        throw new Error('Expected paragraphs array to contain strings.');
      }
    });
    this.paragraphs = opts.paragraphs;
  }

  if (this.headings || this.paragraphs) {
    if (!this.headings) {
      throw new Error('Expected headings as paragraphs is set.');
    }
    if (!this.paragraphs) {
      throw new Error('Expected paragraphs as headings is set.');
    }
    if (this.headings.length !== this.paragraphs.length) {
      throw new Error('Number of headings must equal the number of paragraphs.');
    }
  }

  if (opts && opts.lastUpdated) {
    if (!(opts.lastUpdated instanceof Date)) {
      throw new Error('Expected lastUpdated to be a Date.');
    }
    this.lastUpdated = opts.lastUpdated;
  }

  if (opts && opts.locationName) {
    if (typeof opts.locationName !== 'string') {
      throw new Error('Expected locationName to be a string.');
    }
    this.locationName = opts.locationName;
  }

  if (opts && opts.sender) {
    if (typeof opts.sender !== 'string') {
      throw new Error('Expected sender to be a string.');
    }
    this.sender = opts.sender;
  }

  if (opts && opts.broadcaster) {
    if (typeof opts.broadcaster !== 'string') {
      throw new Error('Expected broadcaster to be a string.');
    }
    this.broadcaster = opts.broadcaster;
  }

  if (opts && opts.rankAway) {
    if (typeof opts.rankAway !== 'string') {
      throw new Error('Expected rankAway to be a string.');
    }
    this.rankAway = opts.rankAway;
  }

  if (opts && opts.rankHome) {
    if (typeof opts.rankHome !== 'string') {
      throw new Error('Expected rankHome to be a string.');
    }
    this.rankHome = opts.rankHome;
  }

  if (opts && opts.nameAway) {
    if (typeof opts.nameAway !== 'string') {
      throw new Error('Expected nameAway to be a string.');
    }
    this.nameAway = opts.nameAway;
  }

  if (opts && opts.nameHome) {
    if (typeof opts.nameHome !== 'string') {
      throw new Error('Expected nameHome to be a string.');
    }
    this.nameHome = opts.nameHome;
  }

  if (opts && opts.recordAway) {
    if (typeof opts.recordAway !== 'string') {
      throw new Error('Expected recordAway to be a string.');
    }
    this.recordAway = opts.recordAway;
  }

  if (opts && opts.recordHome) {
    if (typeof opts.recordHome !== 'string') {
      throw new Error('Expected recordHome to be a string.');
    }
    this.recordHome = opts.recordHome;
  }

  if (opts && opts.scoreAway) {
    if (typeof opts.scoreAway !== 'string') {
      throw new Error('Expected scoreAway to be a string.');
    }
    this.scoreAway = opts.scoreAway;
  }

  if (opts && opts.scoreHome) {
    if (typeof opts.scoreHome !== 'string') {
      throw new Error('Expected scoreHome to be a string.');
    }
    this.scoreHome = opts.scoreHome;
  }

  if (opts && opts.sportsGameState) {
    if (typeof opts.sportsGameState !== 'string') {
      throw new Error('Expected sportsGameState to be a string.');
    }
    this.sportsGameState = opts.sportsGameState;
  }

  if (!this.type) {
    throw new Error('`type` is required by Layout.');
  }

  switch (this.type) {
    case 'genericPin':
      if (!this.title) {
        throw new Error('`title` is required by a genericPin Layout.');
      }
      if (!this.tinyIcon) {
        throw new Error('`tinyIcon` is required by a genericPin Layout.');
      }
      break;

    case 'calendarPin':
      if (!this.title) {
        throw new Error('`title` is required by a calendarPin Layout.');
      }
      break;

    case 'genericReminder':
      if (!this.title) {
        throw new Error('`title` is required by a genericReminder Layout.');
      }
      if (!this.tinyIcon) {
        throw new Error('`tinyIcon` is required by a genericReminder Layout.');
      }
      break;

    case 'genericNotification':
      if (!this.title) {
        throw new Error('`title` is required by a genericNotification Layout.');
      }
      if (!this.tinyIcon) {
        throw new Error('`tinyIcon` is required by a genericNotification Layout.');
      }
      break;

    case 'commNotification':
      if (!this.title) {
        throw new Error('`title` is required by a commNotification Layout.');
      }
      if (!this.tinyIcon) {
        throw new Error('`tinyIcon` is required by a commNotification Layout.');
      }
      if (!this.sender) {
        throw new Error('`sender` is required by a commNotification Layout.');
      }
      break;

    case 'weatherPin':
      if (!this.title) {
        throw new Error('`title` is required by a weatherPin Layout.');
      }
      if (!this.tinyIcon) {
        throw new Error('`tinyIcon` is required by a weatherPin Layout.');
      }
      if (!this.largeIcon) {
        throw new Error('`largeIcon` is required by a weatherPin Layout.');
      }
      if (!this.locationName) {
        throw new Error('`locationName` is required by a weatherPin Layout.');
      }
      break;

    case 'sportsPin':
      if (!this.title) {
        throw new Error('`title` is required by a sportsPin Layout.');
      }
      if (!this.tinyIcon) {
        throw new Error('`tinyIcon` is required by a sportsPin Layout.');
      }
      if (!this.largeIcon) {
        throw new Error('`largeIcon` is required by a sportsPin Layout.');
      }
      break;

    default:
      throw new Error(this.type + ' is not a valid Layout type');
  }
};


text:
var readline = require('readline');
var path = require('path');
var glob = require('glob');
var mm = require('minimatch');
var exec = require('child_process').exec;

var helper = require('./helper');
var logger = require('./logger');
var constant = require('./constants');

var log = logger.create('init');

var StateMachine = require('./init/state_machine');
var COLOR_SCHEME = require('./init/color_schemes');
var formatters = require('./init/formatters');

// TODO(vojta): coverage
// TODO(vojta): html preprocessors
// TODO(vojta): SauceLabs
// TODO(vojta): BrowserStack

var logQueue = [];
var printLogQueue = function() {
  while (logQueue.length) {
    logQueue.shift()();
  }
};

var NODE_MODULES_DIR = path.resolve(__dirname, '../..');

// Karma is not in node_modules, probably a symlink,
// use current working dir.
if (!/node_modules$/.test(NODE_MODULES_DIR)) {
  NODE_MODULES_DIR = path.resolve('node_modules');
}

var installPackage = function(pkgName) {
  // Do not install if already installed.
  try {
    require(NODE_MODULES_DIR + '/' + pkgName);
    return;
  } catch (e) {}

  log.debug('Missing plugin "%s". Installing...', pkgName);

  var options = {
    cwd: path.resolve(NODE_MODULES_DIR, '..')
  };

  exec('npm install ' + pkgName + ' --save-dev', options, function(err, stdout, stderr) {
    // Put the logs into the queue and print them after answering current question.
    // Otherwise the log would clobber the interactive terminal.
    logQueue.push(function() {
      if (!err) {
        log.debug('%s successfully installed.', pkgName);
      } else if (/is not in the npm registry/.test(stderr)) {
        log.warn('Failed to install "%s". It is not in the NPM registry!\n' +
                 '  Please install it manually.', pkgName);
      } else if (/Error: EACCES/.test(stderr)) {
        log.warn('Failed to install "%s". No permissions to write in %s!\n' +
                 '  Please install it manually.', pkgName, options.cwd);
      } else {
        log.warn('Failed to install "%s"\n  Please install it manually.', pkgName);
      }
    });
  });
};

var validatePattern = function(pattern) {
  if (!glob.sync(pattern).length) {
    log.warn('There is no file matching this pattern.\n');
  }
};

var validateBrowser = function(name) {
  // TODO(vojta): check if the path resolves to a binary
  installPackage('karma-' + name.toLowerCase().replace('canary', '') + '-launcher');
};

var validateFramework = function(name) {
  installPackage('karma-' + name);
};

var validateRequireJs = function(useRequire) {
  if (useRequire) {
    validateFramework('requirejs');
  }
};

var questions = [{
  id: 'framework',
  question: 'Which testing framework do you want to use ?',
  hint: 'Press tab to list possible options. Enter to move to the next question.',
  options: ['jasmine', 'mocha', 'qunit', 'nodeunit', 'nunit', ''],
  validate: validateFramework
}, {
  id: 'requirejs',
  question: 'Do you want to use Require.js ?',
  hint: 'This will add Require.js plugin.\n' +
        'Press tab to list possible options. Enter to move to the next question.',
  options: ['no', 'yes'],
  validate: validateRequireJs,
  boolean: true
}, {
  id: 'browsers',
  question: 'Do you want to capture any browsers automatically ?',
  hint: 'Press tab to list possible options. Enter empty string to move to the next question.',
  options: ['Chrome', 'ChromeCanary', 'Firefox', 'Safari', 'PhantomJS', 'Opera', 'IE', ''],
  validate: validateBrowser,
  multiple: true
}, {
  id: 'files',
  question: 'What is the location of your source and test files ?',
  hint: 'You can use glob patterns, eg. "js/*.js" or "test/**/*Spec.js".\n' +
        'Enter empty string to move to the next question.',
  multiple: true,
  validate: validatePattern
}, {
  id: 'exclude',
  question: 'Should any of the files included by the previous patterns be excluded ?',
  hint: 'You can use glob patterns, eg. "**/*.swp".\n' +
        'Enter empty string to move to the next question.',
  multiple: true,
  validate: validatePattern
}, {
  id: 'generateTestMain',
  question: 'Do you wanna generate a bootstrap file for RequireJS?',
  hint: 'This will generate test-main.js/coffee that configures RequiseJS and starts the tests.',
  options: ['no', 'yes'],
  boolean: true,
  condition: function(answers) {
    return answers.requirejs;
  }
}, {
  id: 'includedFiles',
  question: 'Which files do you want to include with <script> tag ?',
  hint: 'This should be a script that bootstraps your test by configuring Require.js and ' +
        'kicking __karma__.start(), probably your test-main.js file.\n' +
        'Enter empty string to move to the next question.',
  multiple: true,
  validate: validatePattern,
  condition: function(answers) {
    return answers.requirejs && !answers.generateTestMain;
  }
}, {
  id: 'autoWatch',
  question: 'Do you want Karma to watch all the files and run the tests on change ?',
  hint: 'Press tab to list possible options.',
  options: ['yes', 'no'],
  boolean: true
}];

var getBasePath = function(configFilePath, cwd) {
  var configParts = path.dirname(configFilePath).split(path.sep);
  var cwdParts = cwd.split(path.sep);
  var base = [];

  while (configParts.length && configParts[0] === cwdParts[0]) {
    configParts.shift();
    cwdParts.shift();
  }

  while (configParts.length) {
    var part = configParts.shift();
    if (part === '..') {
      base.unshift(cwdParts.pop());
    } else if (part !== '.') {
      base.unshift('..');
    }
  }

  return base.join(path.sep);
};

var processAnswers = function(answers, basePath, testMainFile) {

  var processedAnswers = {
    basePath: basePath,
    files: answers.files,
    onlyServedFiles: [],
    exclude: answers.exclude,
    autoWatch: answers.autoWatch,
    generateTestMain: answers.generateTestMain,
    browsers: answers.browsers,
    frameworks: [],
    preprocessors: {}
  };

  if (answers.framework) {
    processedAnswers.frameworks.push(answers.framework);
  }

  if (answers.requirejs) {
    processedAnswers.frameworks.push('requirejs');
    processedAnswers.files = answers.includedFiles || [];
    processedAnswers.onlyServedFiles = answers.files;

    if (answers.generateTestMain) {
      processedAnswers.files.push(testMainFile);
    }
  }

  var allPatterns = answers.files.concat(answers.includedFiles || []);
  if (allPatterns.some(function(pattern) {
    return mm(pattern, '**/*.coffee');
  })) {
    installPackage('karma-coffee-preprocessor');
    processedAnswers.preprocessors['**/*.coffee'] = ['coffee'];
  }

  return processedAnswers;
};

exports.init = function(config) {
  var useColors = true;
  var logLevel = constant.LOG_INFO;
  var colorScheme = COLOR_SCHEME.ON;

  if (helper.isDefined(config.colors)) {
    colorScheme = config.colors ? COLOR_SCHEME.ON : COLOR_SCHEME.OFF;
    useColors = config.colors;
  }

  if (helper.isDefined(config.logLevel)) {
    logLevel = config.logLevel;
  }

  logger.setup(logLevel, useColors);

  // need to be registered before creating readlineInterface
  process.stdin.on('keypress', function(s, key) {
    sm.onKeypress(key);
  });

  var rli = readline.createInterface(process.stdin, process.stdout);
  var sm = new StateMachine(rli, colorScheme);

  rli.on('line', sm.onLine.bind(sm));

  // clean colors
  rli.on('SIGINT', function() {
    sm.kill();
    process.exit(0);
  });

  sm.on('next_question', printLogQueue);

  sm.process(questions, function(answers) {
    var cwd = process.cwd();
    var configFile = config.configFile || 'karma.conf.js';
    var testMainFile = (/\.coffee$/).test(configFile) ? 'test-main.coffee' : 'test-main.js';
    var formatter = formatters.createForPath(configFile);
    var processedAnswers = processAnswers(answers, getBasePath(configFile, cwd), testMainFile);
    var configFilePath = path.resolve(cwd, configFile);
    var testMainFilePath = path.resolve(cwd, testMainFile);

    if (processedAnswers.generateTestMain) {
      formatter.writeRequirejsConfigFile(testMainFilePath);
      console.log(colorScheme.success(
        'RequireJS bootstrap file generated at "' + testMainFilePath + '".\n'
      ));
    }

    formatter.writeConfigFile(configFilePath, processedAnswers);
    console.log(colorScheme.success('Config file generated at "' + configFilePath + '".\n'));
  });
};


text:
Windows 10 x64 (18362.476)

_HEAP_FAILURE_TYPE

   heap_failure_internal = 0n0

   heap_failure_unknown = 0n1

   heap_failure_generic = 0n2

   heap_failure_entry_corruption = 0n3

   heap_failure_multiple_entries_corruption = 0n4

   heap_failure_virtual_block_corruption = 0n5

   heap_failure_buffer_overrun = 0n6

   heap_failure_buffer_underrun = 0n7

   heap_failure_block_not_busy = 0n8

   heap_failure_invalid_argument = 0n9

   heap_failure_invalid_allocation_type = 0n10

   heap_failure_usage_after_free = 0n11

   heap_failure_cross_heap_operation = 0n12

   heap_failure_freelists_corruption = 0n13

   heap_failure_listentry_corruption = 0n14

   heap_failure_lfh_bitmap_mismatch = 0n15

   heap_failure_segment_lfh_bitmap_corruption = 0n16

   heap_failure_segment_lfh_double_free = 0n17

   heap_failure_vs_subsegment_corruption = 0n18

   heap_failure_null_heap = 0n19

   heap_failure_allocation_limit = 0n20

   heap_failure_commit_limit = 0n21

   heap_failure_invalid_va_mgr_query = 0n22


text:
var CustomListItemView = require('builder/components/custom-list/custom-list-item-view');
var _ = require('underscore');

module.exports = CustomListItemView.extend({

  render: function () {
    this.$el.empty();
    this.clearSubViews();

    this.$el.append(
      this.options.template(
        _.extend(
          {
            typeLabel: this.options.typeLabel,
            isSelected: this.model.get('selected'),
            isSourceType: this.model.get('isSourceType'),
            name: this.model.getName(),
            val: this.model.getValue()
          },
          this.model.attributes
        )
      )
    );

    this.$el
      .attr('data-val', this.model.getValue())
      .toggleClass('is-disabled', !!this.model.get('disabled'));

    return this;
  }

});


text:
#ifndef MITK_STANDARD_FILE_LOCATIONS_H_INCLUDED_SWDG
#define MITK_STANDARD_FILE_LOCATIONS_H_INCLUDED_SWDG

#include <string>

#include <MitkCoreExports.h>
#include <itkObject.h>
#include <itkObjectFactory.h>

namespace mitk
{
  /*! \brief Provides a method to look for configuration and option files etc.

  Call mitk::StandardFileLocations::FindFile(filename) to look for configuration files.
  Call mitk::StandardFileLocations::GetOptionDirectory() to look for/save option files.
  */
  class MITKCORE_EXPORT StandardFileLocations : public itk::Object
  {
  public:
    typedef StandardFileLocations Self;
    typedef itk::Command Superclass;
    typedef itk::SmartPointer<Self> Pointer;

    /*!
    \brief Adds a directory into the search queue:
    \      Use this function in combination with FindFile(), after adding some
    \      directories, they will also be searched for the requested file
    \param dir         directory you want to be searched in
    \param insertInFrontOfSearchList  wheather this search request shall be processed first
    */
    void AddDirectoryForSearch(const char *dir, bool insertInFrontOfSearchList = true);

    /*!
    \brief Remove a directory from the search queue:
    \      Use this function in combination with FindFile().
    \param dir         directory you want to be searched in
    */
    void RemoveDirectoryForSearch(const char *dir);

    /*!
    \brief looks for a file in several standard locations
    \param filename         The file you want to fine, without any path
    \param pathInSourceDir  Where in the source tree hierarchy would that file be?
    \return The absolute path to the file including the filename

    This method appends several standard locations to the end of the searchqueue (if they not already exist)
    and then searches for the file within all directories contained in the search queue:

    <ol>
      <li> Add the directory specified in the environment variable MITKCONF
      <li> Add the .mitk directory in the home folder of the user
      <li> Add the current working directory
      <li> Add the (current working directory)/bin directory
      <li> Add the directory specified in pathInSourceDir, that is relative to the source code directory root (which is
  determined at compile time)
    </ol>

  Already added directories in the searchqueue by using AddDirectoryForSearch before calling FindFile are still searched
  first,
    because above mentioned standard locations are always appended at the end of the list.

  */
    std::string FindFile(const char *filename, const char *pathInSourceDir = nullptr);

    /*!
    \brief Return directory of/for option files
    \return The absolute path to the directory for option files.

    This method looks for the directory of/for option files in two ways. The logic is as follows

    1. If there is an environment variable MITKOPTIONS, then use that directory.
    2. Use .mitk-subdirectory in home directory of the user

    The directory will be created if it does not exist.
    */
    std::string GetOptionDirectory();

    static StandardFileLocations *GetInstance();

  protected:
    itkFactorylessNewMacro(Self) itkCloneMacro(Self)

      typedef std::vector<std::string> FileSearchVectorType;
    FileSearchVectorType m_SearchDirectories;

    StandardFileLocations();
    virtual ~StandardFileLocations();

    std::string SearchDirectoriesForFile(const char *filename);

  private:
    // Private Copy Constructor
    StandardFileLocations(const StandardFileLocations &);
  };

} // namespace

#endif


text:
package com.mx.popcorn.dao;

import com.mx.popcorn.domain.CinemaComment;

/**
 * Created by Administrator on 2014-10-28.
 */
public interface CinemaCommentDao extends DaoSupport<CinemaComment> {
}


text:
<?php

namespace Tests;

use InfyOm\Generator\InfyOmGeneratorServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

class TestCase extends Orchestra
{
    protected function getPackageProviders($app)
    {
        return [
            InfyOmGeneratorServiceProvider::class,
        ];
    }
}


text:
namespace headless {

HeadlessClipboard::HeadlessClipboard()
    : default_store_buffer_(ui::ClipboardBuffer::kCopyPaste) {}

HeadlessClipboard::~HeadlessClipboard() = default;

void HeadlessClipboard::OnPreShutdown() {}

uint64_t HeadlessClipboard::GetSequenceNumber(
    ui::ClipboardBuffer buffer) const {
  return GetStore(buffer).sequence_number;
}

bool HeadlessClipboard::IsFormatAvailable(const ui::ClipboardFormatType& format,
                                          ui::ClipboardBuffer buffer) const {
  return base::Contains(GetStore(buffer).data, format);
}

void HeadlessClipboard::Clear(ui::ClipboardBuffer buffer) {
  GetStore(buffer).Clear();
}

void HeadlessClipboard::ReadAvailableTypes(
    ui::ClipboardBuffer buffer,
    std::vector<base::string16>* types) const {
  DCHECK(types);
  types->clear();

  if (IsFormatAvailable(ui::ClipboardFormatType::GetPlainTextType(), buffer))
    types->push_back(base::UTF8ToUTF16(ui::kMimeTypeText));
  if (IsFormatAvailable(ui::ClipboardFormatType::GetHtmlType(), buffer))
    types->push_back(base::UTF8ToUTF16(ui::kMimeTypeHTML));

  if (IsFormatAvailable(ui::ClipboardFormatType::GetRtfType(), buffer))
    types->push_back(base::UTF8ToUTF16(ui::kMimeTypeRTF));
  if (IsFormatAvailable(ui::ClipboardFormatType::GetBitmapType(), buffer))
    types->push_back(base::UTF8ToUTF16(ui::kMimeTypePNG));
}

std::vector<base::string16>
HeadlessClipboard::ReadAvailablePlatformSpecificFormatNames(
    ui::ClipboardBuffer buffer) const {
  const auto& data = GetStore(buffer).data;
  std::vector<base::string16> types;
  types.reserve(data.size());
  for (const auto& it : data) {
    base::string16 type = base::UTF8ToUTF16(it.first.GetName());
    types.push_back(type);
  }

  return types;
}

void HeadlessClipboard::ReadText(ui::ClipboardBuffer buffer,
                                 base::string16* result) const {
  std::string result8;
  ReadAsciiText(buffer, &result8);
  *result = base::UTF8ToUTF16(result8);
}

void HeadlessClipboard::ReadAsciiText(ui::ClipboardBuffer buffer,
                                      std::string* result) const {
  result->clear();
  const DataStore& store = GetStore(buffer);
  auto it = store.data.find(ui::ClipboardFormatType::GetPlainTextType());
  if (it != store.data.end())
    *result = it->second;
}

void HeadlessClipboard::ReadHTML(ui::ClipboardBuffer buffer,
                                 base::string16* markup,
                                 std::string* src_url,
                                 uint32_t* fragment_start,
                                 uint32_t* fragment_end) const {
  markup->clear();
  src_url->clear();
  const DataStore& store = GetStore(buffer);
  auto it = store.data.find(ui::ClipboardFormatType::GetHtmlType());
  if (it != store.data.end())
    *markup = base::UTF8ToUTF16(it->second);
  *src_url = store.html_src_url;
  *fragment_start = 0;
  *fragment_end = base::checked_cast<uint32_t>(markup->size());
}

void HeadlessClipboard::ReadRTF(ui::ClipboardBuffer buffer,
                                std::string* result) const {
  result->clear();
  const DataStore& store = GetStore(buffer);
  auto it = store.data.find(ui::ClipboardFormatType::GetRtfType());
  if (it != store.data.end())
    *result = it->second;
}

void HeadlessClipboard::ReadImage(ui::ClipboardBuffer buffer,
                                  ReadImageCallback callback) const {
  std::move(callback).Run(GetStore(buffer).image);
}

void HeadlessClipboard::ReadCustomData(ui::ClipboardBuffer clipboard_buffer,
                                       const base::string16& type,
                                       base::string16* result) const {}

void HeadlessClipboard::ReadBookmark(base::string16* title,
                                     std::string* url) const {
  const DataStore& store = GetDefaultStore();
  auto it = store.data.find(ui::ClipboardFormatType::GetUrlType());
  if (it != store.data.end())
    *url = it->second;
  *title = base::UTF8ToUTF16(store.url_title);
}

void HeadlessClipboard::ReadData(const ui::ClipboardFormatType& format,
                                 std::string* result) const {
  result->clear();
  const DataStore& store = GetDefaultStore();
  auto it = store.data.find(format);
  if (it != store.data.end())
    *result = it->second;
}

void HeadlessClipboard::WritePortableRepresentations(ui::ClipboardBuffer buffer,
                                                     const ObjectMap& objects) {
  Clear(buffer);
  default_store_buffer_ = buffer;
  for (const auto& kv : objects)
    DispatchPortableRepresentation(kv.first, kv.second);
  default_store_buffer_ = ui::ClipboardBuffer::kCopyPaste;
}

void HeadlessClipboard::WritePlatformRepresentations(
    ui::ClipboardBuffer buffer,
    std::vector<Clipboard::PlatformRepresentation> platform_representations) {
  Clear(buffer);
  default_store_buffer_ = buffer;
  DispatchPlatformRepresentations(std::move(platform_representations));
  default_store_buffer_ = ui::ClipboardBuffer::kCopyPaste;
}

void HeadlessClipboard::WriteText(const char* text_data, size_t text_len) {
  std::string text(text_data, text_len);
  GetDefaultStore().data[ui::ClipboardFormatType::GetPlainTextType()] = text;
  if (IsSupportedClipboardBuffer(ui::ClipboardBuffer::kSelection)) {
    GetStore(ui::ClipboardBuffer::kSelection)
        .data[ui::ClipboardFormatType::GetPlainTextType()] = text;
  }
}

void HeadlessClipboard::WriteHTML(const char* markup_data,
                                  size_t markup_len,
                                  const char* url_data,
                                  size_t url_len) {
  base::string16 markup;
  base::UTF8ToUTF16(markup_data, markup_len, &markup);
  GetDefaultStore().data[ui::ClipboardFormatType::GetHtmlType()] =
      base::UTF16ToUTF8(markup);
  GetDefaultStore().html_src_url = std::string(url_data, url_len);
}

void HeadlessClipboard::WriteRTF(const char* rtf_data, size_t data_len) {
  GetDefaultStore().data[ui::ClipboardFormatType::GetRtfType()] =
      std::string(rtf_data, data_len);
}

void HeadlessClipboard::WriteBookmark(const char* title_data,
                                      size_t title_len,
                                      const char* url_data,
                                      size_t url_len) {
  GetDefaultStore().data[ui::ClipboardFormatType::GetUrlType()] =
      std::string(url_data, url_len);
  GetDefaultStore().url_title = std::string(title_data, title_len);
}

void HeadlessClipboard::WriteWebSmartPaste() {
  // Create a dummy entry.
  GetDefaultStore().data[ui::ClipboardFormatType::GetWebKitSmartPasteType()];
}

void HeadlessClipboard::WriteBitmap(const SkBitmap& bitmap) {
  // Create a dummy entry.
  GetDefaultStore().data[ui::ClipboardFormatType::GetBitmapType()];
  SkBitmap& dst = GetDefaultStore().image;
  if (dst.tryAllocPixels(bitmap.info())) {
    bitmap.readPixels(dst.info(), dst.getPixels(), dst.rowBytes(), 0, 0);
  }
}

void HeadlessClipboard::WriteData(const ui::ClipboardFormatType& format,
                                  const char* data_data,
                                  size_t data_len) {
  GetDefaultStore().data[format] = std::string(data_data, data_len);
}

HeadlessClipboard::DataStore::DataStore() : sequence_number(0) {}

HeadlessClipboard::DataStore::DataStore(const DataStore& other) = default;

HeadlessClipboard::DataStore::~DataStore() = default;

void HeadlessClipboard::DataStore::Clear() {
  data.clear();
  url_title.clear();
  html_src_url.clear();
  image = SkBitmap();
}

const HeadlessClipboard::DataStore& HeadlessClipboard::GetStore(
    ui::ClipboardBuffer buffer) const {
  CHECK(IsSupportedClipboardBuffer(buffer));
  return stores_[buffer];
}

HeadlessClipboard::DataStore& HeadlessClipboard::GetStore(
    ui::ClipboardBuffer buffer) {
  CHECK(IsSupportedClipboardBuffer(buffer));
  DataStore& store = stores_[buffer];
  ++store.sequence_number;
  return store;
}

const HeadlessClipboard::DataStore& HeadlessClipboard::GetDefaultStore() const {
  return GetStore(default_store_buffer_);
}

HeadlessClipboard::DataStore& HeadlessClipboard::GetDefaultStore() {
  return GetStore(default_store_buffer_);
}

}  // namespace headless


text:
[![CocoaPods](https://img.shields.io/cocoapods/v/YogaKit.svg?style=flat)](https://cocoapods.org/pods/YogaKit)
[![Platform](https://img.shields.io/badge/platforms-iOS-orange.svg)](https://facebook.github.io/yoga/docs/api/yogakit/)
[![Languages](https://img.shields.io/badge/languages-ObjC%20%7C%20Swift-orange.svg)](https://facebook.github.io/yoga/docs/api/yogakit/)

## Installation
YogaKit is available to install via [CocoaPods](https://cocoapods.org/).

```
pod 'YogaKit', '~> 1.7'
```

## Getting Started
Checkout the docs [here](https://facebook.github.io/yoga/docs/api/yogakit/).

We also have a sample project. To try it out, clone this repo and open `YogaKitSample.xcodeproj` in the [YogaKitSample](https://github.com/facebook/yoga/tree/main/YogaKit/YogaKitSample) directory.

## Contributing
We welcome all pull-requests! At Facebook we sync the open source version of `YogaKit` daily, so we're always testing the latest changes.

See the [CONTRIBUTING.md](https://github.com/facebook/yoga/blob/main/CONTRIBUTING.md) file for how to help out.


text:
package rx.internal.operators;

import java.util.concurrent.atomic.AtomicReference;

import rx.*;
import rx.Observable.Operator;
import rx.exceptions.Exceptions;
import rx.functions.Func2;
import rx.observers.SerializedSubscriber;

/**
 * Combines values from two sources only when the main source emits.
 * @param <T> the element type of the main observable
 * @param <U> the element type of the other observable that is merged into the main
 * @param <R> the result element type
 */
public final class OperatorWithLatestFrom<T, U, R> implements Operator<R, T>  {
    final Func2<? super T, ? super U, ? extends R> resultSelector;
    final Observable<? extends U> other;
    /** Indicates the other has not yet emitted a value. */
    static final Object EMPTY = new Object();

    public OperatorWithLatestFrom(Observable<? extends U> other, Func2<? super T, ? super U, ? extends R> resultSelector) {
        this.other = other;
        this.resultSelector = resultSelector;
    }
    @Override
    public Subscriber<? super T> call(Subscriber<? super R> child) {
        // onError and onCompleted may happen either from the main or from other.
        final SerializedSubscriber<R> s = new SerializedSubscriber<R>(child, false);
        child.add(s);

        final AtomicReference<Object> current = new AtomicReference<Object>(EMPTY);

        final Subscriber<T> subscriber = new Subscriber<T>(s, true) {
            @Override
            public void onNext(T t) {
                Object o = current.get();
                if (o != EMPTY) {
                    try {
                        @SuppressWarnings("unchecked")
                        U u = (U)o;
                        R result = resultSelector.call(t, u);

                        s.onNext(result);
                    } catch (Throwable e) {
                        Exceptions.throwOrReport(e, this);
                    }
                }
            }
            @Override
            public void onError(Throwable e) {
                s.onError(e);
                s.unsubscribe();
            }
            @Override
            public void onCompleted() {
                s.onCompleted();
                s.unsubscribe();
            }
        };

        Subscriber<U> otherSubscriber = new Subscriber<U>() {
            @Override
            public void onNext(U t) {
                current.set(t);
            }
            @Override
            public void onError(Throwable e) {
                s.onError(e);
                s.unsubscribe();
            }
            @Override
            public void onCompleted() {
                if (current.get() == EMPTY) {
                    s.onCompleted();
                    s.unsubscribe();
                }
            }
        };
        s.add(subscriber);
        s.add(otherSubscriber);

        other.unsafeSubscribe(otherSubscriber);

        return subscriber;
    }
}


text:
package org.apache.arrow.vector.file;

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

import java.io.IOException;
import java.nio.channels.Pipe;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;

import org.apache.arrow.memory.BufferAllocator;
import org.apache.arrow.memory.RootAllocator;
import org.apache.arrow.vector.NullableTinyIntVector;
import org.apache.arrow.vector.VectorSchemaRoot;
import org.apache.arrow.vector.schema.ArrowMessage;
import org.apache.arrow.vector.stream.ArrowStreamReader;
import org.apache.arrow.vector.stream.ArrowStreamWriter;
import org.apache.arrow.vector.stream.MessageSerializerTest;
import org.apache.arrow.vector.types.pojo.Schema;
import org.junit.Assert;
import org.junit.Test;

public class TestArrowStreamPipe {
  Schema schema = MessageSerializerTest.testSchema();
  BufferAllocator alloc = new RootAllocator(Long.MAX_VALUE);

  private final class WriterThread extends Thread {

    private final int numBatches;
    private final ArrowStreamWriter writer;
    private final VectorSchemaRoot root;

    public WriterThread(int numBatches, WritableByteChannel sinkChannel)
        throws IOException {
      this.numBatches = numBatches;
      BufferAllocator allocator = alloc.newChildAllocator("writer thread", 0, Integer.MAX_VALUE);
      root = VectorSchemaRoot.create(schema, allocator);
      writer = new ArrowStreamWriter(root, null, sinkChannel);
    }

    @Override
    public void run() {
      try {
        writer.start();
        for (int j = 0; j < numBatches; j++) {
          root.getFieldVectors().get(0).allocateNew();
          NullableTinyIntVector.Mutator mutator = (NullableTinyIntVector.Mutator) root.getFieldVectors().get(0).getMutator();
          // Send a changing batch id first
          mutator.set(0, j);
          for (int i = 1; i < 16; i++) {
            mutator.set(i, i < 8 ? 1 : 0, (byte)(i + 1));
          }
          mutator.setValueCount(16);
          root.setRowCount(16);

          writer.writeBatch();
        }
        writer.close();
        root.close();
      } catch (IOException e) {
        e.printStackTrace();
        Assert.fail(e.toString()); // have to explicitly fail since we're in a separate thread
      }
    }

    public long bytesWritten() { return writer.bytesWritten(); }
  }

  private final class ReaderThread extends Thread {
    private int batchesRead = 0;
    private final ArrowStreamReader reader;
    private final BufferAllocator alloc = new RootAllocator(Long.MAX_VALUE);
    private boolean done = false;

    public ReaderThread(ReadableByteChannel sourceChannel)
        throws IOException {
      reader = new ArrowStreamReader(sourceChannel, alloc) {
        @Override
        protected ArrowMessage readMessage(ReadChannel in, BufferAllocator allocator) throws IOException {
          // Read all the batches. Each batch contains an incrementing id and then some
          // constant data. Verify both.
          ArrowMessage message = super.readMessage(in, allocator);
          if (message == null) {
            done = true;
          } else {
            batchesRead++;
          }
          return message;
        }
        @Override
        public void loadNextBatch() throws IOException {
          super.loadNextBatch();
          if (!done) {
            VectorSchemaRoot root = getVectorSchemaRoot();
            Assert.assertEquals(16, root.getRowCount());
            NullableTinyIntVector vector = (NullableTinyIntVector) root.getFieldVectors().get(0);
            Assert.assertEquals((byte)(batchesRead - 1), vector.getAccessor().get(0));
            for (int i = 1; i < 16; i++) {
              if (i < 8) {
                Assert.assertEquals((byte)(i + 1), vector.getAccessor().get(i));
              } else {
                Assert.assertTrue(vector.getAccessor().isNull(i));
              }
            }
          }
        }
      };
    }

    @Override
    public void run() {
      try {
        assertEquals(schema, reader.getVectorSchemaRoot().getSchema());
        assertTrue(
            reader.getVectorSchemaRoot().getSchema().getFields().get(0).getTypeLayout().getVectorTypes().toString(),
            reader.getVectorSchemaRoot().getSchema().getFields().get(0).getTypeLayout().getVectors().size() > 0);
        while (!done) {
          reader.loadNextBatch();
        }
      } catch (IOException e) {
        e.printStackTrace();
        Assert.fail(e.toString()); // have to explicitly fail since we're in a separate thread
      }
    }

    public int getBatchesRead() { return batchesRead; }
    public long bytesRead() { return reader.bytesRead(); }
  }

  // Starts up a producer and consumer thread to read/write batches.
  @Test
  public void pipeTest() throws IOException, InterruptedException {
    int NUM_BATCHES = 10;
    Pipe pipe = Pipe.open();
    WriterThread writer = new WriterThread(NUM_BATCHES, pipe.sink());
    ReaderThread reader = new ReaderThread(pipe.source());

    writer.start();
    reader.start();
    reader.join();
    writer.join();

    assertEquals(NUM_BATCHES, reader.getBatchesRead());
    assertEquals(writer.bytesWritten(), reader.bytesRead());
  }
}


text:
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{% endblock %}</title>

    {% load staticfiles %}

    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'font-awesome/css/font-awesome.css' %}">
    <link rel="stylesheet" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" href="{% static 'css/style.css' %}">

    {% block additional_css_to_load %}{% endblock %}

    <link rel="shortcut icon" href="{% static 'favicon/favicon.ico' %}">

</head>

{% block body %}
{% endblock %}

<!-- My scripts. -->
<script src="{% static 'js/my_js/base/outside_pages_base.js' %}"></script>

</html>


text:
package plans;

import cases.TestCase;
import core.TestPlanFramework;

public class OtherTestPlan extends TestPlanFramework{

	@Override
	public void execute(String Path) {
		// TODO Auto-generated method stub
		TestCase testCase = new TestCase(this.getClass().getName(), Path);
		addToTestReport(testCase.getClass().getName(), testCase.executeTest());
	}

}


text:
/*! angular-input-confirm - v0.1.2 - 2015-09-23 */
angular.module('config', [])

.constant('bower', {name:'angular-input-confirm',description:'',version:'0.1.0',homepage:'https://github.com/thisissoon/angular-input-confirm',license:'MIT',private:false,dependencies:{angular:'~1.3.15'},devDependencies:{'angular-mocks':'~1.3.15'}})

.constant('pkg', {name:'angular-input-confirm',private:false,version:'0.1.0',description:'',repository:'https://github.com/thisissoon/angular-input-confirm',license:'MIT',dependencies:{bower:'~1.4.1',grunt:'~0.4.5'},devDependencies:{'connect-livereload':'~0.5.3','connect-modrewrite':'~0.7.11',coveralls:'~2.11.2','grunt-bump':'~0.3.0','grunt-contrib-clean':'~0.6.0','grunt-contrib-concat':'~0.5.1','grunt-contrib-connect':'~0.10.1','grunt-contrib-copy':'~0.8.0','grunt-contrib-jasmine':'~0.8.2','grunt-contrib-jshint':'~0.11.1','grunt-contrib-less':'~1.0.1','grunt-contrib-uglify':'~0.9.1','grunt-contrib-watch':'~0.6.1','grunt-contrib-yuidoc':'~0.7.0','grunt-ng-constant':'~1.1.0','grunt-processhtml':'~0.3.7','grunt-protractor-runner':'~2.0.0','grunt-protractor-webdriver':'~0.2.0','grunt-sails-linker':'^0.10.1','grunt-template-jasmine-istanbul':'~0.3.3',protractor:'~2.0.0','yuidoc-bootstrap-theme':'~1.0.4'},scripts:{postinstall:'bower install'}})

.constant('env', {BASE_URL:'/app/'})

;;'use strict';
/*
 * @module   sn.inputConfirm
 * @author   SOON_
 */
angular.module('sn.inputConfirm', [

])
/**
 * @example
    <input type='password'
           name='password_confirm'
           ng-model='password_confirm'
           sn-input-confirm='password'>
 * @constructor
 * @class snInputConfirm
 */
.directive('snInputConfirm',[
  function (){
    return {
      restrict: 'A',
      require: 'ngModel',
      link: function($scope, $element, attrs, ctrl){

        if (!ctrl || !attrs.snInputConfirm) return; // jshint ignore:line

        /**
         * @function validate
         */
        var validate = function validate() {
          var compare = $scope.$eval( attrs.snInputConfirm ),
              viewValue = ctrl.$viewValue;

          if ( compare !== viewValue ){
            ctrl.$setValidity('inputConfirm', false);
            return viewValue;
          } else {
            ctrl.$setValidity('inputConfirm', true);
            return viewValue;
          }
        };

        ctrl.$parsers.unshift(validate);
        $scope.$watch(attrs.snInputConfirm, validate);

      }
    };
  }
]);


text:
package com.yangyu.mycustomtab01;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.widget.TextView;

import com.yangyu.mycustomtab01.Constant.ConValue;

/**
 * @author yangyu
 *	¹¦ÄÜÃèÊö£ºµÚÒ»ÖÖʵÏÖ·½·¨,×Ô¶¨ÒåTabHost
 */
public class CustomTabActivity1 extends TabActivity{

	//¶¨ÒåTabHost¶ÔÏó
	private TabHost	tabHost;

	//¶¨ÒåÒ»¸ö²¼¾Ö
	private LayoutInflater layoutInflater;

	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_tab_layout1);

        initView();
    }

	/**
	 * ³õ'»¯×é¼þ
	 */
	private void initView(){
		//ʵÀý»¯TabHost¶ÔÏ󣬵õ½TabHost
		tabHost = getTabHost();

		//ʵÀý»¯²¼¾Ö¶ÔÏó
		layoutInflater = LayoutInflater.from(this);

		//µÃµ½ActivityµÄ¸öÊý
		int count = ConValue.mTabClassArray.length;

		for(int i = 0; i < count; i++){
			//Ϊÿһ¸öTab°´Å¥ÉèÖÃͼ±ê¡¢ÎÄ×ÖºÍÄÚÈÝ
			TabSpec tabSpec = tabHost.newTabSpec(ConValue.mTextviewArray[i]).setIndicator(getTabItemView(i)).setContent(getTabItemIntent(i));
			//½«Tab°´Å¥Ìí¼Ó½øTabÑ¡ÏÖÐ
			tabHost.addTab(tabSpec);
			//ÉèÖÃTab°´Å¥µÄ±³¾°
			tabHost.getTabWidget().getChildAt(i).setBackgroundResource(R.drawable.selector_tab_background);
		}
	}

	/**
	 * ¸øTab°´Å¥ÉèÖÃͼ±êºÍÎÄ×Ö
	 */
	private View getTabItemView(int index){
		View view = layoutInflater.inflate(R.layout.tab_item_view, null);

		ImageView imageView = (ImageView) view.findViewById(R.id.imageview);

		if (imageView != null){
			imageView.setImageResource(ConValue.mImageViewArray[index]);
		}
		TextView textView = (TextView) view.findViewById(R.id.textview);

		textView.setText(ConValue.mTextviewArray[index]);

		return view;
	}

	/**
	 * ¸øTabÑ¡ÏÉèÖÃÄÚÈÝ£¨Ã¿¸öÄÚÈݶ¼ÊÇÒ»¸öActivity£©
	 */
	private Intent getTabItemIntent(int index){
		Intent intent = new Intent(this, ConValue.mTabClassArray[index]);

		return intent;
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

Actions: Detail view  Back to full view

A single action in detail.
About the action rulebooks

Standard actions which change the state of things
Locking it with , Unlocking it with , Switching on , Switching off , Opening , Closing , Wearing , Taking off

Locking something with something  (past tense locked it with)

Locking is the act of
using an object such as a key to ensure that something such as a door or
container cannot be opened unless first unlocked. (Only closed things can be
locked.)

Locking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't lock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.

We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'

Inform checks whether the key fits using the 'can't lock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')

The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform.

Typed commands leading to this action

"lock [something] with [something preferably held]"

"use [something preferably held] on [an unlocked lockable thing]"
 reversed

Rules controlling this action

before    doing anything except examining, waiting, looking, smelling, listening, going, or entering when the player is a ghost

instead of    doing anything except looking or examining in the presence of Mictlantecuhtli

check    an actor locking something with  can't lock without a lock rule   name  unlist

check    an actor locking something with  can't lock what's already locked rule   name  unlist

check    an actor locking something with  can't lock what's open rule   name  unlist

check    an actor locking something with  can't lock without the correct key rule   name  unlist

carry out    an actor locking something with  standard locking rule   name  unlist

report    an actor locking something with  standard report locking rule   name  unlist


text:
'use strict';

/**
 * @ngdoc function
 * @name intervalTimerApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the intervalTimerApp
 */
angular.module('intervalTimerApp')
  .controller('MainCtrl', function ($scope) {

  	// These variables store the start values
  	$scope.roundTime = 0;
  	$scope.intervalTime = 0;
  	$scope.roundNumber = 0;
  	// These varibles are counted down on
  	var thisRoundTime = 0;
  	var thisIntervalTime = 0;
  	var thisRoundNumber = 1;
  	var timePassed = 0;

  	//Start time
  	var startTime = null;
  	var countdownTimer;

  	//Show/hide variable for buttons
  	$scope.showStartButton = true;
  	$scope.showResetButton = true;
  	$scope.showPauseButton = false;
  	$scope.showStopButton = false;
  	$scope.showRestartButton = false;

  	//audio
  	var pointAudioPlayedInRound = false;
  	var endAudio = new Audio('audio/endBeep.wav');
  	var pointAudio = new Audio('audio/partBeep.wav');

  	$scope.showDisplay = false;
  	$scope.showInput = true;

  	//Calculates the total amount of time to display
  	$scope.total = function(){
  	  return Math.round((($scope.roundTime / 1000) + ($scope.intervalTime / 1000)) * $scope.roundNumber) - (timePassed / 1000);
  	};

  	///////////// Button functions /////////////

  	//Function when the start button is pressed
  	$scope.startButtonPress = function(){
  		//Change Display
  		$scope.showStartButton = false;
  		$scope.showResetButton = false;
  		$scope.showStopButton = true;
  		$scope.showPauseButton = true;

  		$scope.showDisplay = true;
  		$scope.showInput = false;

  		//Function
  		thisRoundTime = $scope.roundTime * 1000;
  		thisIntervalTime = $scope.intervalTime * 1000;
  		thisRoundNumber = Math.floor($scope.roundNumber);
  		timePassed = 0;

  		startCountDown();
  	};

  	//Function when the stop button is pressed
  	$scope.stopButtonPress = function(){
  		//Change Display
  		$scope.showStartButton = true;
  		$scope.showResetButton = true;
  		$scope.showStopButton = false;
  		$scope.showPauseButton = false;
  		$scope.showRestartButton = false;

  		$scope.showDisplay = false;
  		$scope.showInput = true;

  		//Function
  		endCountDown();
  		$scope.roundTime = 0;
  		$scope.intervalTime = 0;
  		$scope.roundNumber = 1;
  		timePassed = 0;
  	};

  	//Function when the pause button is pressed
  	$scope.pauseButtonPress = function(){
  		//Change Display
  		$scope.showPauseButton = false;
  		$scope.showRestartButton = true;

  		//Function
  		endCountDown();
  	};

  	//Function for reset button is pressed
  	$scope.resetButtonPress = function(){
  		//Change Display

  		//Functiom
  		$scope.roundTime = 0;
  		$scope.intervalTime = 0;
  		$scope.roundNumber = 1;
  	};

  	//function for restarting the countdown after a pause
  	$scope.restartButtonPress = function(){
  		//Change Display
  		$scope.showPauseButton = true;
  		$scope.showRestartButton = false;

  		//Function
  		startCountDown();
  	};

  	///////////// Count functions /////////////

  	//Function for starting counting functionality
  	var startCountDown = function(){
  		//milliseconds since
  		startTime = Date.now();

  		//require interval timer for updating the values
			countdownTimer = setInterval(findTimePassed, 50);
  	};

  	//find the real time passed
  	//Note this may be a bit off as we are counting second and not milliseconds. tempted to change this, but will be easy to fix later
  	var findTimePassed = function(){
  		var thisTime = Date.now();
  		var timePassed = thisTime - startTime;
  		startTime = thisTime;
  		countDown(timePassed);
  	};

  	//the final countdown function
  	var countDown = function(timePassed){
  		//counts down one for each millisecond that has passed
  		for(var i = 0; i < timePassed; i++){
	  		if(thisRoundTime === 0){
	  			if(!pointAudioPlayedInRound){
	  				pointAudioPlayedInRound = true;
	  				playPartAudio();
	  			}
	  			if(thisIntervalTime === 0){
	  				if(pointAudioPlayedInRound){
	  					playPartAudio();
	  				}
	  				//Time is indexed to 0, number of times counted indexed to 1
	  				if(thisRoundNumber === 1){
							playEndAudio();
	  					endCountDown();
	  					break;
	  				}else{
	  					countDownRound();
	  				}
	  			}else{
	  				countDownInterval();
	  			}
	  		}else{
	  			countDownTime();
	  		}
	  	}
  		$scope.$apply();
  	};

  	//Function when the countdown is finished
  	var endCountDown = function(){
			clearInterval(countdownTimer);
			startTime = null;
  	};

  	//function for counting down the value of the time
  	//TODO add error checking on these three
  	var countDownTime = function(){
  		thisRoundTime -= 1;
  		timePassed += 1;
  	};

  	//Function for counting down the value of the interval
		var countDownInterval = function(){
  		thisIntervalTime -= 1;
  		timePassed += 1;
  	};

  	// Fucntion for counting down the value of the round
		var countDownRound = function(){
  		thisRoundNumber -= 1;
  		thisRoundTime = $scope.roundTime * 1000;
  		thisIntervalTime = $scope.intervalTime * 1000;
  		timePassed += 1;
  		pointAudioPlayedInRound = false;
  	};

  	///////////// Audio Functions /////////////

  	var playEndAudio = function(){
			endAudio.play();
  	};

  	var playPartAudio = function(){
			pointAudio.play();
  	};

  	///////////// Misc Functions /////////////

  	$scope.getThisRoundTime = function(){
  		return Math.round(thisRoundTime / 1000);
  	};

  	$scope.getThisIntervalTime = function(){
  		return Math.round(thisIntervalTime / 1000);
  	};

  	$scope.getThisRoundNumber = function(){
  		// console.log(thisRoundNumber);
  		return thisRoundNumber;
  	};

  });


text:
// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0(the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace GoogleVR.PermissionsDemo {
  using UnityEngine;
  using System.Collections.Generic;
  using UnityEngine.UI;

#if UNITY_ANDROID || UNITY_EDITOR
    // Manages the permission flow in PermissionsDemo.
    public class PermissionsFlowManager : MonoBehaviour {
    private static string[] permissionNames = { "android.permission.READ_EXTERNAL_STORAGE" };

    public Text statusText;

    private static List<GvrPermissionsRequester.PermissionStatus> permissionList =
        new List<GvrPermissionsRequester.PermissionStatus>();

    public void CheckPermission() {
      statusText.text = "Checking permission....";
      GvrPermissionsRequester permissionRequester = GvrPermissionsRequester.Instance;
      if (permissionRequester != null) {
        bool granted = permissionRequester.IsPermissionGranted(permissionNames[0]);
        statusText.text = permissionNames[0] + ": " + (granted ? "Granted" : "Denied");
      } else {
        statusText.text = "Permission requester cannot be initialized.";
      }
    }

    public void RequestPermissions() {
      if (statusText != null) {
        statusText.text = "Requesting permission....";
      }
      GvrPermissionsRequester permissionRequester = GvrPermissionsRequester.Instance;
      if (permissionRequester == null) {
        statusText.text = "Permission requester cannot be initialized.";
        return;
      }
      Debug.Log("Permissions.RequestPermisions: Check if permission has been granted");
      if (!permissionRequester.IsPermissionGranted(permissionNames[0])) {
        Debug.Log("Permissions.RequestPermisions: Permission has not been previously granted");
        if (permissionRequester.ShouldShowRational(permissionNames[0])) {
          statusText.text = "This game needs to access external storage.  Please grant permission when prompted.";
          statusText.color = Color.red;
        }
        permissionRequester.RequestPermissions(permissionNames,
            (GvrPermissionsRequester.PermissionStatus[] permissionResults) =>
            {
              statusText.color = Color.cyan;
              permissionList.Clear();
              permissionList.AddRange(permissionResults);
              string msg = "";
              foreach (GvrPermissionsRequester.PermissionStatus p in permissionList) {
                msg += p.Name + ": " + (p.Granted ? "Granted" : "Denied") + "\n";
              }
              statusText.text = msg;
            });
      }
      else {
        statusText.text = "ExternalStorage permission already granted!";
      }
    }
  }
#endif  // (UNITY_ANDROID || UNITY_EDITOR)
}


text:
package pl.java.scalatech.exception;

import java.io.IOException;

public class SimpleExceptionGenerator {

    public void throwRuntimeException() {
        throw new IllegalArgumentException("illegal test");
    }

    public void throwException() throws IOException {
        throw new IOException("io exception test");
    }

    public void throwsRuntimeWithCause() {
        throw new MyRuntimeException(new IllegalStateException("Illegal state"));
    }

}


text:
namespace Envoy {
namespace Grpc {

void RpcChannelImpl::cancel() {
  http_request_->cancel();
  onComplete();
}

void RpcChannelImpl::CallMethod(const Protobuf::MethodDescriptor* method, Protobuf::RpcController*,
                                const Protobuf::Message* grpc_request,
                                Protobuf::Message* grpc_response, Protobuf::Closure*) {
  ASSERT(!http_request_ && !grpc_method_ && !grpc_response_);
  grpc_method_ = method;
  grpc_response_ = grpc_response;

  // For proto3 messages this should always return true.
  ASSERT(grpc_request->IsInitialized());

  // This should be caught in configuration, and a request will fail normally anyway, but assert
  // here for clarity.
  ASSERT(cluster_->features() & Upstream::ClusterInfo::Features::HTTP2);

  Http::MessagePtr message =
      Common::prepareHeaders(cluster_->name(), method->service()->full_name(), method->name());
  message->body() = Common::serializeBody(*grpc_request);

  callbacks_.onPreRequestCustomizeHeaders(message->headers());
  http_request_ =
      cm_.httpAsyncClientForCluster(cluster_->name()).send(std::move(message), *this, timeout_);
}

void RpcChannelImpl::incStat(bool success) {
  Common::chargeStat(*cluster_, grpc_method_->service()->full_name(), grpc_method_->name(),
                     success);
}

void RpcChannelImpl::onSuccess(Http::MessagePtr&& http_response) {
  try {
    Common::validateResponse(*http_response);

    // A gRPC response contains a 5 byte header. Currently we only support unary responses so we
    // ignore the header. @see serializeBody().
    if (!http_response->body() || (http_response->body()->length() < 5)) {
      throw Exception(Optional<uint64_t>(), "bad serialized body");
    }

    http_response->body()->drain(5);
    Buffer::ZeroCopyInputStreamImpl stream(std::move(http_response->body()));
    if (!grpc_response_->ParseFromZeroCopyStream(&stream)) {
      throw Exception(Optional<uint64_t>(), "bad serialized body");
    }

    callbacks_.onSuccess();
    incStat(true);
    onComplete();
  } catch (const Exception& e) {
    onFailureWorker(e.grpc_status_, e.what());
  }
}

void RpcChannelImpl::onFailureWorker(const Optional<uint64_t>& grpc_status,
                                     const std::string& message) {
  callbacks_.onFailure(grpc_status, message);
  incStat(false);
  onComplete();
}

void RpcChannelImpl::onFailure(Http::AsyncClient::FailureReason reason) {
  switch (reason) {
  case Http::AsyncClient::FailureReason::Reset:
    onFailureWorker(Optional<uint64_t>(), "stream reset");
    break;
  }
}

void RpcChannelImpl::onComplete() {
  http_request_ = nullptr;
  grpc_method_ = nullptr;
  grpc_response_ = nullptr;
}

} // namespace Grpc
} // namespace Envoy


text:
#ifndef __UTIL_H__
#define __UTIL_H__

#include <redismodule.h>
#include <stdarg.h>

/// make sure the response is not NULL or an error, and if it is sends the error to the client and
/// exit the current function
#define RMUTIL_ASSERT_NOERROR(ctx, r)                                   \
  if (r == NULL) {                                                      \
    return RedisModule_ReplyWithError(ctx, "ERR reply is NULL");        \
  } else if (RedisModule_CallReplyType(r) == REDISMODULE_REPLY_ERROR) { \
    RedisModule_ReplyWithCallReply(ctx, r);                             \
    return REDISMODULE_ERR;                                             \
  }

#define __rmutil_register_cmd(ctx, cmd, f, mode)                                \
  if (RedisModule_CreateCommand(ctx, cmd, f, mode, 1, 1, 1) == REDISMODULE_ERR) \
    return REDISMODULE_ERR;

#define RMUtil_RegisterReadCmd(ctx, cmd, f) __rmutil_register_cmd(ctx, cmd, f, "readonly")

#define RMUtil_RegisterWriteCmd(ctx, cmd, f) __rmutil_register_cmd(ctx, cmd, f, "write")

#define RMUtil_RegisterWriteDenyOOMCmd(ctx, cmd, f) __rmutil_register_cmd(ctx, cmd, f, "write deny-oom")

/* RedisModule utilities. */

/** DEPRECATED: Return the offset of an arg if it exists in the arg list, or 0 if it's not there */
int RMUtil_ArgExists(const char *arg, RedisModuleString **argv, int argc, int offset);

/* Same as argExists but returns -1 if not found. Use this, RMUtil_ArgExists is kept for backwards
compatibility. */
int RMUtil_ArgIndex(const char *arg, RedisModuleString **argv, int argc);

/**
Automatically conver the arg list to corresponding variable pointers according to a given format.
You pass it the command arg list and count, the starting offset, a parsing format, and pointers to
the variables.
The format is a string consisting of the following identifiers:

    c -- pointer to a Null terminated C string pointer.
    s -- pointer to a RedisModuleString
    l -- pointer to Long long integer.
    d -- pointer to a Double
    * -- do not parse this argument at all

Example: If I want to parse args[1], args[2] as a long long and double, I do:
    double d;
    long long l;
    RMUtil_ParseArgs(argv, argc, 1, "ld", &l, &d);
*/
int RMUtil_ParseArgs(RedisModuleString **argv, int argc, int offset, const char *fmt, ...);

/**
Same as RMUtil_ParseArgs, but only parses the arguments after `token`, if it was found.
This is useful for optional stuff like [LIMIT [offset] [limit]]
*/
int RMUtil_ParseArgsAfter(const char *token, RedisModuleString **argv, int argc, const char *fmt,
                          ...);

int rmutil_vparseArgs(RedisModuleString **argv, int argc, int offset, const char *fmt, va_list ap);

#define RMUTIL_VARARGS_BADARG ((size_t)-1)
/**
 * Parse arguments in the form of KEYWORD {len} {arg} .. {arg}_len.
 * If keyword is present, returns the position within `argv` containing the arguments.
 * Returns NULL if the keyword is not found.
 * If a parse error has occurred, `nargs` is set to RMUTIL_VARARGS_BADARG, but
 * the return value is not NULL.
 */
RedisModuleString **RMUtil_ParseVarArgs(RedisModuleString **argv, int argc, int offset,
                                        const char *keyword, size_t *nargs);

/**
 * Default implementation of an AoF rewrite function that simply calls DUMP/RESTORE
 * internally. To use this function, pass it as the .aof_rewrite value in
 * RedisModuleTypeMethods
 */
void RMUtil_DefaultAofRewrite(RedisModuleIO *aof, RedisModuleString *key, void *value);

// A single key/value entry in a redis info map
typedef struct {
  char *key;
  char *val;
} RMUtilInfoEntry;

// Representation of INFO command response, as a list of k/v pairs
typedef struct {
  RMUtilInfoEntry *entries;
  int numEntries;
} RMUtilInfo;

/**
* Get redis INFO result and parse it as RMUtilInfo.
* Returns NULL if something goes wrong.
* The resulting object needs to be freed with RMUtilRedisInfo_Free
*/
RMUtilInfo *RMUtil_GetRedisInfo(RedisModuleCtx *ctx);

/**
* Free an RMUtilInfo object and its entries
*/
void RMUtilRedisInfo_Free(RMUtilInfo *info);

/**
* Get an integer value from an info object. Returns 1 if the value was found and
* is an integer, 0 otherwise. the value is placed in 'val'
*/
int RMUtilInfo_GetInt(RMUtilInfo *info, const char *key, long long *val);

/**
* Get a string value from an info object. The value is placed in str.
* Returns 1 if the key was found, 0 if not
*/
int RMUtilInfo_GetString(RMUtilInfo *info, const char *key, const char **str);

/**
* Get a double value from an info object. Returns 1 if the value was found and is
* a correctly formatted double, 0 otherwise. the value is placed in 'd'
*/
int RMUtilInfo_GetDouble(RMUtilInfo *info, const char *key, double *d);

/*
* Returns a call reply array's element given by a space-delimited path. E.g.,
* the path "1 2 3" will return the 3rd element from the 2 element of the 1st
* element from an array (or NULL if not found)
*/
RedisModuleCallReply *RedisModule_CallReplyArrayElementByPath(RedisModuleCallReply *rep,
                                                              const char *path);

/**
 * Extract the module type from an opened key.
 */
typedef enum {
  RMUTIL_VALUE_OK = 0,
  RMUTIL_VALUE_MISSING,
  RMUTIL_VALUE_EMPTY,
  RMUTIL_VALUE_MISMATCH
} RMUtil_TryGetValueStatus;

/**
 * Tries to extract the module-specific type from the value.
 * @param key an opened key (may be null)
 * @param type the pointer to the type to match to
 * @param[out] out if the value is present, will be set to it.
 * @return a value in the @ref RMUtil_TryGetValueStatus enum.
 */
int RedisModule_TryGetValue(RedisModuleKey *key, const RedisModuleType *type, void **out);

#endif