text:
<?php

namespace Google\AdsApi\AdWords\v201702\cm;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class AdGroupCriterionService extends \Google\AdsApi\Common\AdsSoapClient
{

    /**
     * @var array $classmap The defined classes
     */
    private static $classmap = array (
      'AdGroupCriterion' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterion',
      'AdGroupCriterionError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionError',
      'AdGroupCriterionLabel' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionLabel',
      'AdGroupCriterionLabelOperation' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionLabelOperation',
      'AdGroupCriterionLabelReturnValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionLabelReturnValue',
      'AdGroupCriterionLimitExceeded' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionLimitExceeded',
      'AdGroupCriterionOperation' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionOperation',
      'AdGroupCriterionPage' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionPage',
      'AdGroupCriterionReturnValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdGroupCriterionReturnValue',
      'AdxError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AdxError',
      'AgeRange' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AgeRange',
      'ApiError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ApiError',
      'ApiException' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ApiException',
      'AppPaymentModel' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AppPaymentModel',
      'AppUrl' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AppUrl',
      'AppUrlList' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AppUrlList',
      'ApplicationException' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ApplicationException',
      'LabelAttribute' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\LabelAttribute',
      'AuthenticationError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AuthenticationError',
      'AuthorizationError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\AuthorizationError',
      'Bid' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Bid',
      'BiddableAdGroupCriterion' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\BiddableAdGroupCriterion',
      'BiddingErrors' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\BiddingErrors',
      'BiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\BiddingScheme',
      'BiddingStrategyConfiguration' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\BiddingStrategyConfiguration',
      'Bids' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Bids',
      'BudgetOptimizerBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\BudgetOptimizerBiddingScheme',
      'TextLabel' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\TextLabel',
      'DisplayAttribute' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\DisplayAttribute',
      'ClientTermsError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ClientTermsError',
      'CollectionSizeError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CollectionSizeError',
      'ComparableValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ComparableValue',
      'ConversionOptimizerBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ConversionOptimizerBiddingScheme',
      'CpaBid' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CpaBid',
      'CpcBid' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CpcBid',
      'CpmBid' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CpmBid',
      'Criterion' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Criterion',
      'CriterionError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CriterionError',
      'CriterionParameter' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CriterionParameter',
      'CriterionPolicyError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CriterionPolicyError',
      'CustomParameter' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CustomParameter',
      'CustomParameters' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CustomParameters',
      'DatabaseError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\DatabaseError',
      'DateError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\DateError',
      'DateRange' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\DateRange',
      'DistinctError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\DistinctError',
      'DoubleValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\DoubleValue',
      'EnhancedCpcBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\EnhancedCpcBiddingScheme',
      'EntityAccessDenied' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\EntityAccessDenied',
      'EntityCountLimitExceeded' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\EntityCountLimitExceeded',
      'EntityNotFound' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\EntityNotFound',
      'ExemptionRequest' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ExemptionRequest',
      'FieldPathElement' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\FieldPathElement',
      'ForwardCompatibilityError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ForwardCompatibilityError',
      'Gender' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Gender',
      'IdError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\IdError',
      'InternalApiError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\InternalApiError',
      'Keyword' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Keyword',
      'Label' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Label',
      'ListReturnValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ListReturnValue',
      'LongValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\LongValue',
      'ManualCpcBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ManualCpcBiddingScheme',
      'ManualCpmBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ManualCpmBiddingScheme',
      'MobileAppCategory' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\MobileAppCategory',
      'MobileApplication' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\MobileApplication',
      'Money' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Money',
      'MultiplierError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\MultiplierError',
      'NegativeAdGroupCriterion' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\NegativeAdGroupCriterion',
      'NewEntityCreationError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\NewEntityCreationError',
      'NotEmptyError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\NotEmptyError',
      'NullError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\NullError',
      'NumberValue' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\NumberValue',
      'Operation' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Operation',
      'OperationAccessDenied' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\OperationAccessDenied',
      'OperatorError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\OperatorError',
      'OrderBy' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\OrderBy',
      'Page' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Page',
      'PageOnePromotedBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\PageOnePromotedBiddingScheme',
      'Paging' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Paging',
      'PagingError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\PagingError',
      'Parent' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ParentCriterion',
      'Placement' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Placement',
      'PolicyViolationError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\PolicyViolationError',
      'PolicyViolationError.Part' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\PolicyViolationErrorPart',
      'PolicyViolationKey' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\PolicyViolationKey',
      'Predicate' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Predicate',
      'ProductAdwordsGrouping' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductAdwordsGrouping',
      'ProductAdwordsLabels' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductAdwordsLabels',
      'ProductBiddingCategory' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductBiddingCategory',
      'ProductBrand' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductBrand',
      'ProductCanonicalCondition' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductCanonicalCondition',
      'ProductChannel' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductChannel',
      'ProductChannelExclusivity' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductChannelExclusivity',
      'ProductLegacyCondition' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductLegacyCondition',
      'ProductCustomAttribute' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductCustomAttribute',
      'ProductDimension' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductDimension',
      'ProductOfferId' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductOfferId',
      'ProductPartition' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductPartition',
      'ProductType' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductType',
      'ProductTypeFull' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ProductTypeFull',
      'QualityInfo' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\QualityInfo',
      'QueryError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\QueryError',
      'QuotaCheckError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\QuotaCheckError',
      'RangeError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\RangeError',
      'RateExceededError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\RateExceededError',
      'ReadOnlyError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\ReadOnlyError',
      'RejectedError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\RejectedError',
      'RequestError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\RequestError',
      'RequiredError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\RequiredError',
      'Selector' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Selector',
      'SelectorError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\SelectorError',
      'SizeLimitError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\SizeLimitError',
      'SoapHeader' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\SoapHeader',
      'SoapResponseHeader' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\SoapResponseHeader',
      'StatsQueryError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\StatsQueryError',
      'StringFormatError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\StringFormatError',
      'StringLengthError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\StringLengthError',
      'String_StringMapEntry' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\String_StringMapEntry',
      'TargetCpaBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\TargetCpaBiddingScheme',
      'TargetOutrankShareBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\TargetOutrankShareBiddingScheme',
      'TargetRoasBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\TargetRoasBiddingScheme',
      'TargetSpendBiddingScheme' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\TargetSpendBiddingScheme',
      'UnknownProductDimension' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\UnknownProductDimension',
      'UrlError' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\UrlError',
      'UrlList' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\UrlList',
      'CriterionUserInterest' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CriterionUserInterest',
      'CriterionUserList' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\CriterionUserList',
      'Vertical' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Vertical',
      'Webpage' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\Webpage',
      'WebpageCondition' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\WebpageCondition',
      'WebpageParameter' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\WebpageParameter',
      'YouTubeChannel' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\YouTubeChannel',
      'YouTubeVideo' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\YouTubeVideo',
      'getResponse' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\getResponse',
      'mutateResponse' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\mutateResponse',
      'mutateLabelResponse' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\mutateLabelResponse',
      'queryResponse' => 'Google\\AdsApi\\AdWords\\v201702\\cm\\queryResponse',
    );

    /**
     * @param array $options A array of config values
     * @param string $wsdl The wsdl file to use
     */
    public function __construct(array $options = array(),
                $wsdl = 'https://adwords.google.com/api/adwords/cm/v201702/AdGroupCriterionService?wsdl')
    {
      foreach (self::$classmap as $key => $value) {
        if (!isset($options['classmap'][$key])) {
          $options['classmap'][$key] = $value;
        }
      }
      $options = array_merge(array (
      'features' => 1,
    ), $options);
      parent::__construct($wsdl, $options);
    }

    /**
     * Gets adgroup criteria.
     *
     * @param \Google\AdsApi\AdWords\v201702\cm\Selector $serviceSelector
     * @return \Google\AdsApi\AdWords\v201702\cm\AdGroupCriterionPage
     * @throws \Google\AdsApi\AdWords\v201702\cm\ApiException
     */
    public function get(\Google\AdsApi\AdWords\v201702\cm\Selector $serviceSelector)
    {
      return $this->__soapCall('get', array(array('serviceSelector' => $serviceSelector)))->getRval();
    }

    /**
     * Adds, removes or updates adgroup criteria.
     *
     * during checks on keywords to be added.
     *
     * @param \Google\AdsApi\AdWords\v201702\cm\AdGroupCriterionOperation[] $operations
     * @return \Google\AdsApi\AdWords\v201702\cm\AdGroupCriterionReturnValue
     * @throws \Google\AdsApi\AdWords\v201702\cm\ApiException
     */
    public function mutate(array $operations)
    {
      return $this->__soapCall('mutate', array(array('operations' => $operations)))->getRval();
    }

    /**
     * Adds labels to the AdGroupCriterion or removes labels from the AdGroupCriterion
     *
Add - Apply an existing label to an existing
     * {@linkplain AdGroupCriterion ad group criterion}. The {@code adGroupId} and
     * {@code criterionId}
     * must reference an existing {@linkplain AdGroupCriterion ad group criterion}. The
     * {@code labelId} must reference an existing {@linkplain Label label}.
     *
Remove - Removes the link between the specified
     * {@linkplain AdGroupCriterion ad group criterion} and {@linkplain Label label}.

     * applying the operation in the input list with the same index. For an
     * add operation, the returned AdGroupCriterionLabel contains the AdGroupId, CriterionId and the
     * LabelId. In the case of a remove operation, the returned AdGroupCriterionLabel will only have
     * AdGroupId and CriterionId.
     *
     * @param \Google\AdsApi\AdWords\v201702\cm\AdGroupCriterionLabelOperation[] $operations
     * @return \Google\AdsApi\AdWords\v201702\cm\AdGroupCriterionLabelReturnValue
     * @throws \Google\AdsApi\AdWords\v201702\cm\ApiException
     */
    public function mutateLabel(array $operations)
    {
      return $this->__soapCall('mutateLabel', array(array('operations' => $operations)))->getRval();
    }

    /**
     * Returns the list of AdGroupCriterion that match the query.
     *
     * @param string $query
     * @return \Google\AdsApi\AdWords\v201702\cm\AdGroupCriterionPage
     * @throws \Google\AdsApi\AdWords\v201702\cm\ApiException
     */
    public function query($query)
    {
      return $this->__soapCall('query', array(array('query' => $query)))->getRval();
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2013 The Android Open Source Project

     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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
    <include layout="@layout/include_headbar"/>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin">
        <GridLayout
            android:id="@+id/deviceInformation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:columnCount="2"
            android:useDefaultMargins="true">

            <TextView
                style="@style/GridLayoutTitleTextView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/label_device_address"/>

            <TextView
                android:id="@+id/device_address"
                style="@style/GridLayoutDataTextView"/>

            <TextView
                style="@style/GridLayoutTitleTextView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/label_state"/>

            <TextView
                android:id="@+id/connection_state"
                style="@style/GridLayoutDataTextView"/>
        </GridLayout>

        <View
            android:id="@+id/upperSepparator"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_below="@id/deviceInformation"
            android:background="@android:color/holo_blue_dark"/>

        <View
            android:id="@+id/gattInformationView"
            android:layout_width="match_parent"
            android:layout_alignParentBottom="true"
            android:layout_height="1dp"/>
        <GridLayout
            android:visibility="gone"
            android:id="@+id/gattInformation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:columnCount="2"
            android:useDefaultMargins="true">

            <TextView
                style="@style/GridLayoutTitleTextView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/label_uuid"/>

            <TextView
                android:id="@+id/uuid"
                style="@style/GridLayoutDataTextViewMonospace"/>

            <TextView
                style="@style/GridLayoutTitleTextView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/label_desc"/>

            <TextView
                android:id="@+id/description"
                style="@style/GridLayoutDataTextViewMonospace"/>

            <TextView
                style="@style/GridLayoutTitleTextView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/label_as_string"/>

            <TextView
                android:id="@+id/data_as_string"
                style="@style/GridLayoutDataTextViewMonospace"/>

            <TextView
                style="@style/GridLayoutTitleTextView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/label_as_array"/>

            <TextView
                android:id="@+id/data_as_array"
                style="@style/GridLayoutDataTextViewMonospace"/>
        </GridLayout>

        <View
            android:id="@+id/lowerSepparator"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_above="@id/gattInformationView"
            android:background="@android:color/holo_blue_dark"/>

        <ExpandableListView
            android:id="@+id/gatt_services_list"
            android:layout_width="match_parent"
            android:layout_height="fill_parent"
            android:layout_above="@id/lowerSepparator"
            android:layout_below="@id/upperSepparator"/>
    </RelativeLayout>

</LinearLayout>

redpajama_set_name: RedPajamaGithub


text:
skeleton for front-end application using React.js, ES2015, Browserify.

Inspired by [accommodavid/spooky-react](https://github.com/accommodavid/spooky-react) and [akabekobeko/examples-web-app](https://github.com/akabekobeko/examples-web-app/tree/master/front-end-starter)


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
Agric. Univ. Wageningen Pap. 91-4:126. 1992

#### Original name
null

### Remarks
null


text:
<?xml version="1.0" encoding="utf-8"?>
<Monster xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Name>water elemental</Name>
  <Attack1>Claw 5d6</Attack1>
  <Difficulty>10</Difficulty>
  <BaseLevel>8</BaseLevel>
  <BaseExperience>126</BaseExperience>
  <Speed>6</Speed>
  <BaseAC>2</BaseAC>
  <BaseMR>30</BaseMR>
  <Alignment>0 (neutral)</Alignment>
  <Frequency>(by normal means) 1 (Very rare)</Frequency>
  <GenoCidable>No</GenoCidable>
  <Weight>2500</Weight>
  <NutritionalValue>0</NutritionalValue>
  <Size>huge</Size>
  <Resistances>conveyed None</Resistances>
  <ResistancesConveyed>None</ResistancesConveyed>
  <Characteristics>
    <string>can swim. </string>
    <string>can survive underwater. </string>
    <string>has no eyes. </string>
    <string>has no limbs. </string>
    <string>has no head. </string>
    <string>is mindless. </string>
    <string>does not eat. (*) </string>
    <string>is neither male nor female. </string>
    <string>is strong. </string>
    <string>never leaves a corpse.</string>
  </Characteristics>
</Monster>


text:
using System;
using UnityEngine;
using System.Linq;

[ExecuteInEditMode]
[Serializable]
public class FromToRot : RideAnimationEvent
{
    [SerializeField]
    public RotateBetweenHP rotator;
    [SerializeField]
    public ParkitectObject obj;
    [SerializeField]
    float lastTime;
    public override string EventName
    {
        get
        {
            return "From-To Rot";
        }
    }

    public override void Enter()
    {
        lastTime = Time.realtimeSinceStartup;

        rotator.startFromTo();
        base.Enter();
    }
    public override void Run()
    {

        if (rotator)
        {

            rotator.tick(Time.realtimeSinceStartup - lastTime);
            lastTime = Time.realtimeSinceStartup;
            if (rotator.isStopped())
            {
                done = true;
            }
            base.Run();
        }

    }
}


text:
namespace LvEdEngine
{

class PerfTimer : public NonCopyable
{
public:
    PerfTimer() : m_lastMs(0)
    {
        LARGE_INTEGER freq;
        QueryPerformanceFrequency(&freq);
        m_freq = (double)freq.QuadPart;
    }
    void Start()
    {
        QueryPerformanceCounter(&m_start);
    }
    void Stop()
    {
        LARGE_INTEGER stopCycles;
        QueryPerformanceCounter(&stopCycles);
        double secondes = ( (double)(stopCycles.QuadPart - m_start.QuadPart) / m_freq );
        m_lastMs = secondes * 1000.0;
    }
    double ElapsedTimeMS()
    {
        return m_lastMs;
    }
    unsigned int ElapsedMilliseconds()
    {
        return (unsigned int)m_lastMs;
    }

private:
    double          m_freq;
    LARGE_INTEGER   m_start;
    double          m_lastMs;
};

// -------------------------------------------------------------------------------------------------------------
class ScopedTimer : public NonCopyable
{
public:
    ScopedTimer(const char* message)
    {
        m_message = message;
        m_timer.Start();
    }
    ~ScopedTimer()
    {
        m_timer.Stop();
        printf("%d ms - %s\n", m_timer.ElapsedMilliseconds(), m_message);
    }

private:
    ScopedTimer(){};
    PerfTimer m_timer;
    const char * m_message;

};

}; //namespace


text:
    <form action="./?action=authenticate" method="post" class="form-signin">

Please sign in

        <input type="text" placeholder="Username" name="username" class="input-block-level" />
        <input type="password" placeholder="Password" name="password" class="input-block-level" />
        <button class="btn btn-primary" type="submit" >Login</button>

            Reset password

    </form>


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

namespace ElasticAnalytics.Model
{
    public class VersioningMixin : IVersionable
    {
        protected long version;

        public VersioningMixin(long version = -1)
        {
            this.version = version;
        }

        public virtual void SetVersion(long newVersion)
        {
            if (newVersion < this.version)
            {
                throw new ArgumentOutOfRangeException("newVersion", "The version of an entity cannot be decremented. New version supplied : " + newVersion);
            }

            this.version = newVersion;
        }

        public virtual void IncrementVersion(long increment = 1)
        {
            if (this.version + increment <= this.version)
            {
                throw new ArgumentOutOfRangeException("increment", "The version of an entity must be incremented.  Increment supplied : " + increment);
            }

            this.version = this.version + increment;
        }

        public virtual long Version
        {
            get
            {
                return this.version;
            }
        }
    }
}


text:
// Copyright 2020 Jon Skeet. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.

using System.ComponentModel;
using VDrumExplorer.Model.Data.Fields;

namespace VDrumExplorer.ViewModel.Data
{
    public class EditableStringDataFieldViewModel : DataFieldViewModel<StringDataField>
    {
        public EditableStringDataFieldViewModel(StringDataField model) : base(model)
        {
        }

        protected override void OnPropertyModelChanged(object sender, PropertyChangedEventArgs e) =>
            RaisePropertyChanged(nameof(Text));

        public int MaxLength => Model.SchemaField.Length;

        // TODO: This is horrible, as it's really a GUI concern. We need to be able to guess a "reasonable average character width".
        public int MinWidth => MaxLength * 8;

        public string Text
        {
            get => Model.Text;
            set => Model.Text = value;
        }
    }
}


text:
using namespace std;

namespace myGSL {
  class Rng;
  class PoissonGenerator;
};

typedef myGSL::Rng GSLRng;

class myGSL::Rng {
public:
  Rng(const gsl_rng_type * T = gsl_rng_taus2, unsigned long seed = time(NULL))
    : rng(gsl_rng_alloc(T)), discrete_t(NULL)
  { gsl_rng_set(rng,seed); }

  Rng(const Rng& R)
    : rng(gsl_rng_clone(R.constptr())), discrete_t(NULL)
  {}

  ~Rng() {
    gsl_rng_free(rng);
    if (discrete_t != NULL) discrete_free();
  }

  inline void set(unsigned long seed) { gsl_rng_set(rng,seed); }
  inline unsigned long min() { return gsl_rng_min(rng); }
  inline unsigned long max() { return gsl_rng_max(rng); }

  // uniform distributions
  inline unsigned long get() { return gsl_rng_get(rng); }
  inline double uniform() { return gsl_rng_uniform(rng); }
  inline double uniform_pos() { return gsl_rng_uniform_pos(rng); }
  inline double uniform(double a, double b) { return a + (b-a)*uniform(); }
  inline unsigned long uniform_int(unsigned long n) { return gsl_rng_uniform_int(rng,n); }

  // other distributions
  inline double gaussian(double mu, double s) { return gsl_ran_gaussian(rng,s) + mu; }
  inline unsigned long binomial(double r, unsigned n) { return gsl_ran_binomial(rng,r,n); }
  inline unsigned int poisson(double mu) { return gsl_ran_poisson(rng,mu); }
  inline double exponential(double mu) { return gsl_ran_exponential(rng,mu); }

  // discrete distributions
  inline void discrete_preproc(int K, const double * P) { discrete_t = gsl_ran_discrete_preproc(K,P); }
  inline int  get_discrete() { return gsl_ran_discrete(rng,discrete_t); }
  inline void discrete_free() { gsl_ran_discrete_free(discrete_t); discrete_t = NULL; }

  template<typename T> inline void shuffle(vector<T>& src, size_t first = 0,
      size_t last = -1) {
    if (first >= src.size()) return;
    if (last > src.size()) last = src.size();
    gsl_ran_shuffle(rng,&src[first],last-first,sizeof(T));
  }

  template<typename T> inline void choose(vector<T>& src, vector<T>& dest) {
    gsl_ran_choose(rng,&dest[0],dest.size(),&src[0],src.size(),sizeof(T));
  }

  inline gsl_rng * ptr() { return rng; }
  inline const gsl_rng * constptr() const { return rng; }

private:
  gsl_rng * rng;
  gsl_ran_discrete_t * discrete_t;
};

class myGSL::PoissonGenerator {
  public:
    double mu;
    Rng* rng;
    PoissonGenerator(double m, Rng* r) { mu = m; rng = r; }
    double operator()() { return rng->poisson(mu); }
};

#endif


text:
package org.openjava.upay.web.infrastructure.session;

import io.protostuff.LinkedBuffer;
import io.protostuff.ProtostuffIOUtil;
import io.protostuff.Schema;
import io.protostuff.runtime.RuntimeSchema;

public class ProtocolStuffSerializer implements ISessionSerializer
{
    private Schema<String> keySchema = RuntimeSchema.getSchema(String.class);
    private Schema<SharedHttpSession> sessionSchema = RuntimeSchema.getSchema(SharedHttpSession.class);

    @Override
    public byte[] serializeKey(String key)
    {
        return ProtostuffIOUtil.toByteArray(key, keySchema, LinkedBuffer.allocate(256));
    }

    @Override
    public byte[] serializeSession(SharedHttpSession session)
    {
        return ProtostuffIOUtil.toByteArray(session, sessionSchema, LinkedBuffer.allocate(256));
    }

    @Override
    public SharedHttpSession deserializeSession(byte[] data)
    {
        SharedHttpSession session = new SharedHttpSession();
        ProtostuffIOUtil.mergeFrom(data, session, sessionSchema);
        return session;
    }
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.venky.swf.views.model;

import java.util.List;

import com.venky.swf.db.annotations.column.ui.PROTECTION.Kind;
import com.venky.swf.db.model.Model;
import com.venky.swf.path.Path;
import com.venky.swf.views.HtmlView;
import com.venky.swf.views.controls.model.ModelAwareness;

/**
 *
 * @author venky
 */
public abstract class AbstractModelView<M extends Model> extends HtmlView implements FieldUIMetaProvider {

	private ModelAwareness modelAwareness = null;
    public ModelAwareness getModelAwareness() {
		return modelAwareness;
	}

	public AbstractModelView(Path path, final String[] includedFields) {
        super(path);
        modelAwareness = new ModelAwareness(path,includedFields);
    }

    public List<String> getIncludedFields() {
        return modelAwareness.getIncludedFields();
    }

	public boolean isFieldVisible(String fieldName) {
		return modelAwareness.getReflector().isFieldVisible(fieldName);
	}

	public boolean isFieldEditable(String fieldName) {
		return modelAwareness.getReflector().isFieldEditable(fieldName);
	}

	public Kind getFieldProtection(String fieldName) {
		return modelAwareness.getReflector().getFieldProtection(fieldName);
	}
}


text:
class Api::V1::RolesController < Api::V1::CoreController

  def index
    # Include stock roles in this action only
    relation = Role.where(user_id: [current_user.id, nil])
    respond_with relation
  end

  private

  def permitted_params
    params.permit(role: [:name, {:permissions => []}])
  end

  def end_of_association_chain
    current_user.roles
  end
end


text:
static NSString *const kGenericTemplateTitleKey = @"title";
static NSString *const kGenericTemplateSubtitleKey = @"subtitle";
static NSString *const kGenericTemplateImageURLKey = @"imageURL";
static NSString *const kGenericTemplateDefaultActionKey = @"defaultAction";
static NSString *const kGenericTemplateButtonKey = @"button";

@implementation FBSDKShareMessengerGenericTemplateElement

#pragma mark - NSCoding

+ (BOOL)supportsSecureCoding
{
  return YES;
}

- (instancetype)initWithCoder:(NSCoder *)decoder
{
  if ((self = [self init])) {
    _title = [decoder decodeObjectOfClass:[NSString class] forKey:kGenericTemplateTitleKey];
    _subtitle = [decoder decodeObjectOfClass:[NSString class] forKey:kGenericTemplateSubtitleKey];
    _imageURL = [decoder decodeObjectOfClass:[NSURL class] forKey:kGenericTemplateImageURLKey];
    _defaultAction = [decoder decodeObjectForKey:kGenericTemplateDefaultActionKey];
    _button = [decoder decodeObjectForKey:kGenericTemplateButtonKey];

  }
  return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder
{
  [encoder encodeObject:_title forKey:kGenericTemplateTitleKey];
  [encoder encodeObject:_subtitle forKey:kGenericTemplateSubtitleKey];
  [encoder encodeObject:_imageURL forKey:kGenericTemplateImageURLKey];
  [encoder encodeObject:_defaultAction forKey:kGenericTemplateDefaultActionKey];
  [encoder encodeObject:_button forKey:kGenericTemplateButtonKey];
}

#pragma mark - NSCopying

- (id)copyWithZone:(NSZone *)zone
{
  FBSDKShareMessengerGenericTemplateElement *copy = [[FBSDKShareMessengerGenericTemplateElement alloc] init];
  copy->_title = [_title copy];
  copy->_subtitle = [_subtitle copy];
  copy->_imageURL = [_imageURL copy];
  copy->_defaultAction = [_defaultAction copy];
  copy->_button = [_button copy];
  return copy;
}

@end


text:
"""Utils to work with lists"""

__author__ = 'thorwhalen'

import numpy as np
import ut.util.var as util_var

from heapq import heappushpop, heappush
from numpy import array, argsort

class KeepMaxK(list):
    def __init__(self, k):
        super(self.__class__, self).__init__()
        self.k = k

    def push(self, item):
        if len(self) >= self.k:
            heappushpop(self, item)
        else:
            heappush(self, item)

class KeepMaxUnikK(object):
    def __init__(self, k):
        self.min_val_items = KeepMaxK(k)
        self.item_set = set()

    def push(self, item, val):
        if item not in self.item_set:
            self.item_set.add(item)
            self.min_val_items.push((val, item))

    def items_sorted(self):
        dists, items = list(zip(*self.min_val_items))
        return array(items)[argsort(dists)]

class KeepMinK(list):
    """
    Does what KeepMaxK does, but with min.
    NOTE: Only works with items that are pairs. This is because handling the more general case makes the push two
    times slower (overhead due to handling various cases).
    If you try to push items that are not list-like, it will raise a TypeError.
    If you push items that have only one element, it will raise an IndexError.
    If you push items that have more than 2 elements, only the first two will be taken into account.
    """

    def __init__(self, k):
        super(self.__class__, self).__init__()
        self.k = k

    def push(self, item):
        # try:
        #     item = [-item[0]] + list(item[1:])
        # except TypeError:
        #     item = -item

        if len(self) >= self.k:
            heappushpop(self, (-item[0], item[1]))
        else:
            heappush(self, (-item[0], item[1]))

    def get_list(self):
        return [(-item[0], item[1]) for item in self]

def first_non_zero(arr):
    """
    Return the index of the first element that is not zero, None, nan, or False
    (basically, what ever makes "if element" True)
    The other way to do this would be where(arr)[0][0], but in some cases (large array, few non zeros))
    this function is quicker.
    Note: If no element is "non zero", the function returns None
    """
    for i, a in enumerate(arr):
        if a:
            return i
    return None

def first_true_cond(cond, arr):
    """
    Return the index of the first element such that cond(element) returns True.
    The other way to do this would be where(map(cond, arr))[0][0], of where(cond(arr))[0][0] if cond is vectorized,
    but in some cases (large array, few cond(element) == True)) this function is quicker.
    Note: If no element satisfies the condition, the function returns None
    """
    for i, a in enumerate(arr):
        if cond(a):
            return i
    return None

def get_first_item_contained_in_intersection_of(
    find_first_item_of, in_iterable, default=None
):
    for item in in_iterable:
        if item in find_first_item_of:
            return item
    return default

def ismember_lidx(A, B):
    # returns an A-length bitmap specifying what elements of A are in B
    return [i in B for i in A]

# def ismember(a, b):
#     # tf = np.in1d(a,b) # for newer versions of numpy
#     tf = np.array([i in b for i in a])
#     u = np.unique(a[tf])
#     index = np.array([(np.where(b == i))[0][-1] if t else 0 for i,t in zip(a,tf)])
#     return tf, index

def sort_as(sort_x, as_y, **sorted_kwargs):
    return [x for (y, x) in sorted(zip(as_y, sort_x), **sorted_kwargs)]

def all_true(x):
    """
    returns true if all entries of x are true
    """
    return np.all(x)
    # return len([xx for xx in x if xx==True]) == len(x)

def any_true(x):
    """
    returns true if any entries of x are true
    """
    return np.any(x)
    # return len([xx for xx in x if xx==True]) != 0

def to_str(x, sep=','):
    return sep.join(ascertain_list(x))

def ascertain_list(x):
    """
    ascertain_list(x) blah blah returns [x] if x is not already a list, and x itself if it's already a list
    Use: This is useful when a function expects a list, but you want to also input a single element without putting this
    this element in a list
    """
    if not isinstance(x, list):
        ## The "all but where it's a problem approach"
        if util_var.is_an_iter(x) and not isinstance(x, dict):
            x = list(x)
        else:
            x = [x]
            ## The (less safe) "just force what you want to do differently in those cases only" approach
            # if isinstance(x, np.ndarray):
            #     x = list(x)
            # else:
            #     x = [x]
    return x


text:
<!DOCTYPE html>

  <meta charset=utf-8>
  <title>Undescore Prefix is Ignored Test</title>

Ensure that the "_" prefix is ignored.

Test


text:
define('rectContainsPoint', [], function() {
    return function rectangleContainsPoint(rect, point) {
    	if (rect.width <= 0 || rect.height <= 0) {
    		return false;
    	}

    	return (point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height);
    };
});


text:
package innova;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import innova.common.Constant;
import innova.common.Utility;
import innova.redis.ToRedis;
import innova.redis.ToRedisOperation;
import innova.redis.ToRedisProperty;
import innova.core.IPlugin;
import innova.protocol.InnovaProtocol.IdPtype;
import innova.protocol.InnovaProtocol.Region;
import redis.clients.jedis.Pipeline;

public class RegionCleaner implements IPlugin
{
	private final static Logger _logger = Logger.getLogger("");

	private ToRedis _redis;
	private Pipeline _pipline;

	private final List<Region> _regions = new ArrayList<Region>();

	// implement of IPlugin
	@Override
	public void Init( final String[] args )
	{
		_logger.trace( new Exception().getStackTrace()[0] );

		_redis = new ToRedis();

		//TODO set up cleaning regions
		for( int x = -10 ; x < 10 ; ++x )
			for( int z = -10 ; z < 10 ; ++z )
			{
				_regions.add( Utility.ToRegion( x , 0 , z , 0 ) );
			}
	}

	@Override
	public float Start( final String[] args )
	{
		_logger.trace( new Exception().getStackTrace()[0] );

		if( false == _redis.Connect( Constant.ADRESS_LOCALHOST ))
		{
			_logger.error( "Can not connect to redis." );
			return -1;
		}

		_pipline = _redis.Get().pipelined();

		return Constant.REGION_CLEANER_INTERVAL;
	}

	@Override
	public boolean Update( final float elapse )
	{
		_logger.trace( new Exception().getStackTrace()[0] + "( elapse = " + elapse + ")" );

		final long max_removing_time = _redis.GetTime() - Constant.INACTIVE_PROPERTY_REMAIN; //TODO use world server to synchronize time

		for( Region ri : _regions )
		{
			// max_removing_time must be > 0 because Redis server time is Unix timestamp,
			// so it is not necessary to check max_removing_time's sign.
			// we are sure that no active property will be in [-max_removing_time , 0],
			// because all the active properties will be in [ServerStartUnixTimeStamp , CurrentUnixTimeStamp].
			final List<IdPtype> aps = ToRedisProperty.UGetInactive( _pipline , ri , 0 , max_removing_time );

			// pop operations on these inactive properties
			for( IdPtype ap : aps )
			{
				ToRedisOperation.UPopOperations( _pipline , ap );
			}

			// remove these properties
			ToRedisProperty.PRemoveInactive( _pipline , ri , aps );
		}
		ToRedisProperty.PCommit( _pipline );

		return true;
	}

	@Override
	public void Pause()
	{
		_logger.trace( new Exception().getStackTrace()[0] );
	}

	@Override
	public void Resume()
	{
		_logger.trace( new Exception().getStackTrace()[0] );
	}

	@Override
	public void Stop( final String[] args )
	{
		_logger.trace( new Exception().getStackTrace()[0] );
		try
		{
			_pipline.close();
		}
		catch( IOException e )
		{
			_logger.error( e );
		}
		_redis.Disconnect();
	}

	@Override
	public void Deinit( final String[] args )
	{
		_logger.trace( new Exception().getStackTrace()[0] );
	}
}


text:
<!DOCTYPE html >

          <meta http-equiv="X-UA-Compatible" content="IE=edge" />
          <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
          <title>Spark NLP 4.2.3 ScalaDoc  - com.johnsnowlabs.nlp.Finisher</title>
          <meta name="description" content="Spark NLP 4.2.3 ScalaDoc - com.johnsnowlabs.nlp.Finisher" />
          <meta name="keywords" content="Spark NLP 4.2.3 ScalaDoc com.johnsnowlabs.nlp.Finisher" />
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

      <link href="../../../lib/index.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />

        Spark NLP 4.2.3 ScalaDoc
        < Back

            <input autocapitalize="none" placeholder="Search" id="index-input" type="text" accesskey="/" />
            
            

Packages

        

        package

        root

Definition Classes

root

        

        package

        com

Definition Classes

root

        

        package

        johnsnowlabs

Definition Classes

com

        

        package

        nlp

Definition Classes

johnsnowlabs

        

        package

        annotators

Definition Classes

nlp

        

        package

        embeddings

Definition Classes

nlp

        

        package

        pretrained

Definition Classes

nlp

        

        package

        recursive

Definition Classes

nlp

        

        package

        serialization

Definition Classes

nlp

        

        package

        training

Definition Classes

nlp

        

        package

        util

Definition Classes

nlp

                        ActivationFunction

                        Annotation

                        AnnotationAudio

                        AnnotationImage

                        AnnotatorApproach

                        AnnotatorModel

                        AnnotatorType

                        AudioAssembler

                        CanBeLazy

                        Chunk2Doc

                        Doc2Chunk

                        DocumentAssembler

                        EmbeddingsFinisher

                        FeaturesReader

                        FeaturesWriter

                        Finisher

                        GraphFinisher

                        HasAudioFeatureProperties

                        HasBatchedAnnotate

                        HasBatchedAnnotateAudio

                        HasBatchedAnnotateImage

                        HasCaseSensitiveProperties

                        HasClassifierActivationProperties

                        HasEnableCachingProperties

                        HasEngine

                        HasFeatures

                        HasImageFeatureProperties

                        HasInputAnnotationCols

                        HasMultipleInputAnnotationCols

                        HasOutputAnnotationCol

                        HasOutputAnnotatorType

                        HasPretrained

                        HasRecursiveFit

                        HasRecursiveTransform

                        HasSimpleAnnotate

                        IAnnotation

                        ImageAssembler

                        JavaAnnotation

                        LightPipeline

                        MultiDocumentAssembler

                        ParamsAndFeaturesReadable

                        ParamsAndFeaturesWritable

                        RawAnnotator

                        RecursivePipeline

                        RecursivePipelineModel

                        SparkNLP

                        TableAssembler

                        TokenAssembler

                        functions

c

com.johnsnowlabs.nlp

Finisher

        

            Companion object Finisher

        class

        Finisher extends Transformer with DefaultParamsWritable

Converts annotation results into a format that easier to use. It is useful to extract the
results from Spark NLP Pipelines. The Finisher outputs annotation(s) values into String.

For more extended examples on document pre-processing see the
Spark NLP Workshop.

Example

import spark.implicits._
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
import com.johnsnowlabs.nlp.Finisher

val data = Seq((1, "New York and New Jersey aren't that far apart actually.")).toDF("id", "text")

// Extracts Named Entities amongst other things
val pipeline = PretrainedPipeline("explain_document_dl")

val finisher = new Finisher().setInputCols("entities").setOutputCols("output")
val explainResult = pipeline.transform(data)

explainResult.selectExpr("explode(entities)").show(false)
+------------------------------------------------------------------------------------------------------------------------------------------------------+
|entities                                                                                |
+------------------------------------------------------------------------------------------------------------------------------------------------------+
|[[chunk, 0, 7, New York, [entity -> LOC, sentence -> 0, chunk -> 0], []], [chunk, 13, 22, New Jersey, [entity -> LOC, sentence -> 0, chunk -> 1], []]]|
+------------------------------------------------------------------------------------------------------------------------------------------------------+

val result = finisher.transform(explainResult)
result.select("output").show(false)
+----------------------+
|output                |
+----------------------+
|[New York, New Jersey]|
+----------------------+

See also

  EmbeddingsFinisher for finishing embeddings

            Linear Supertypes

DefaultParamsWritable, MLWritable, Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any

          

            <input id="mbrsel-input" placeholder="Filter all members" type="text" accesskey="/" />

          

            Ordering

Grouped

Alphabetic

By Inheritance

                  Inherited

Finisher

DefaultParamsWritable

MLWritable

Transformer

PipelineStage

Logging

Params

Serializable

Serializable

Identifiable

AnyRef

Any

Hide All

Show All

              Visibility

Public

All

Instance Constructors

        

        new

        Finisher()

        

        new

        Finisher(uid: String)

uid

  required uid for storing annotator to disk

Value Members

        

        final
        def

        !=(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        final
        def

        ##(): Int

Definition Classes

AnyRef → Any

        

        final
        def

        $[T](param: Param[T]): T

Attributes

protected

Definition Classes

Params

        

        final
        def

        ==(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        val

        annotationSplitSymbol: Param[String]

Character separating annotations (Default: @)

        

        final
        def

        asInstanceOf[T0]: T0

Definition Classes

Any

        

        val

        cleanAnnotations: BooleanParam

Whether to remove annotation columns (Default: true)

        

        final
        def

        clear(param: Param[_]): Finisher.this.type

Definition Classes

Params

        

        def

        clone(): AnyRef

Attributes

protected[lang]

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

                @native()

        

        def

        copy(extra: ParamMap): Transformer

Definition Classes

Finisher → Transformer → PipelineStage → Params

        

        def

        copyValues[T <: Params](to: T, extra: ParamMap): T

Attributes

protected

Definition Classes

Params

        

        final
        def

        defaultCopy[T <: Params](extra: ParamMap): T

Attributes

protected

Definition Classes

Params

        

        final
        def

        eq(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        

        def

        equals(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        def

        explainParam(param: Param[_]): String

Definition Classes

Params

        

        def

        explainParams(): String

Definition Classes

Params

        

        final
        def

        extractParamMap(): ParamMap

Definition Classes

Params

        

        final
        def

        extractParamMap(extra: ParamMap): ParamMap

Definition Classes

Params

        

        def

        finalize(): Unit

Attributes

protected[lang]

Definition Classes

AnyRef

Annotations

                @throws(

      classOf[java.lang.Throwable]
    )

        

        final
        def

        get[T](param: Param[T]): Option[T]

Definition Classes

Params

        

        def

        getAnnotationSplitSymbol: String

Character separating annotations (Default: #)

        

        final
        def

        getClass(): Class[_]

Definition Classes

AnyRef → Any

Annotations

                @native()

        

        def

        getCleanAnnotations: Boolean

Whether to remove annotation columns (Default: true)

        

        final
        def

        getDefault[T](param: Param[T]): Option[T]

Definition Classes

Params

        

        def

        getIncludeMetadata: Boolean

Annotation metadata format (Default: false)

        

        def

        getInputCols: Array[String]

Name of finisher output cols

        

        final
        def

        getOrDefault[T](param: Param[T]): T

Definition Classes

Params

        

        def

        getOutputAsArray: Boolean

Finisher generates an Array with the results instead of string (Default: true)

        

        def

        getOutputCols: Array[String]

Name of input annotation cols

        

        def

        getParam(paramName: String): Param[Any]

Definition Classes

Params

        

        def

        getValueSplitSymbol: String

Character separating annotations (Default: #)

        

        final
        def

        hasDefault[T](param: Param[T]): Boolean

Definition Classes

Params

        

        def

        hasParam(paramName: String): Boolean

Definition Classes

Params

        

        def

        hashCode(): Int

Definition Classes

AnyRef → Any

Annotations

                @native()

        

        val

        includeMetadata: BooleanParam

Annotation metadata format (Default: false)

        

        def

        initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean

Attributes

protected

Definition Classes

Logging

        

        def

        initializeLogIfNecessary(isInterpreter: Boolean): Unit

Attributes

protected

Definition Classes

Logging

        

        val

        inputCols: StringArrayParam

Name of input annotation cols

        

        final
        def

        isDefined(param: Param[_]): Boolean

Definition Classes

Params

        

        final
        def

        isInstanceOf[T0]: Boolean

Definition Classes

Any

        

        final
        def

        isSet(param: Param[_]): Boolean

Definition Classes

Params

        

        def

        isTraceEnabled(): Boolean

Attributes

protected

Definition Classes

Logging

        

        def

        log: Logger

Attributes

protected

Definition Classes

Logging

        

        def

        logDebug(msg: ⇒ String, throwable: Throwable): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logDebug(msg: ⇒ String): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logError(msg: ⇒ String, throwable: Throwable): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logError(msg: ⇒ String): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logInfo(msg: ⇒ String, throwable: Throwable): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logInfo(msg: ⇒ String): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logName: String

Attributes

protected

Definition Classes

Logging

        

        def

        logTrace(msg: ⇒ String, throwable: Throwable): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logTrace(msg: ⇒ String): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logWarning(msg: ⇒ String, throwable: Throwable): Unit

Attributes

protected

Definition Classes

Logging

        

        def

        logWarning(msg: ⇒ String): Unit

Attributes

protected

Definition Classes

Logging

        

        final
        def

        ne(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        

        final
        def

        notify(): Unit

Definition Classes

AnyRef

Annotations

                @native()

        

        final
        def

        notifyAll(): Unit

Definition Classes

AnyRef

Annotations

                @native()

        

        val

        outputAsArray: BooleanParam

Finisher generates an Array with the results instead of string (Default: true)

        

        val

        outputCols: StringArrayParam

Name of finisher output cols

        

        lazy val

        params: Array[Param[_]]

Definition Classes

Params

        

        val

        parseEmbeddingsVectors: BooleanParam

Whether to include embeddings vectors in the process (Default: false)

        

        def

        save(path: String): Unit

Definition Classes

MLWritable

Annotations

                @Since(

      "1.6.0"
    )

                @throws(

      ...
    )

        

        final
        def

        set(paramPair: ParamPair[_]): Finisher.this.type

Attributes

protected

Definition Classes

Params

        

        final
        def

        set(param: String, value: Any): Finisher.this.type

Attributes

protected

Definition Classes

Params

        

        final
        def

        set[T](param: Param[T], value: T): Finisher.this.type

Definition Classes

Params

        

        def

        setAnnotationSplitSymbol(value: String): Finisher.this.type

Character separating annotations (Default: #)

        

        def

        setCleanAnnotations(value: Boolean): Finisher.this.type

Whether to remove annotation columns (Default: true)

        

        final
        def

        setDefault(paramPairs: ParamPair[_]*): Finisher.this.type

Attributes

protected

Definition Classes

Params

        

        final
        def

        setDefault[T](param: Param[T], value: T): Finisher.this.type

Attributes

protected

Definition Classes

Params

        

        def

        setIncludeMetadata(value: Boolean): Finisher.this.type

Annotation metadata format (Default: false)

        

        def

        setInputCols(value: String*): Finisher.this.type

Name of input annotation cols

        

        def

        setInputCols(value: Array[String]): Finisher.this.type

Name of input annotation cols

        

        def

        setOutputAsArray(value: Boolean): Finisher.this.type

Finisher generates an Array with the results instead of string (Default: true)

        

        def

        setOutputCols(value: String*): Finisher.this.type

Name of finisher output cols

        

        def

        setOutputCols(value: Array[String]): Finisher.this.type

Name of finisher output cols

        

        def

        setValueSplitSymbol(value: String): Finisher.this.type

Character separating annotations (Default: #)

        

        final
        def

        synchronized[T0](arg0: ⇒ T0): T0

Definition Classes

AnyRef

        

        def

        toString(): String

Definition Classes

Identifiable → AnyRef → Any

        

        def

        transform(dataset: Dataset[_]): Dataset[Row]

Definition Classes

Finisher → Transformer

        

        def

        transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame

Definition Classes

Transformer

Annotations

                @Since(

      "2.0.0"
    )

        

        def

        transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame

Definition Classes

Transformer

Annotations

                @Since(

      "2.0.0"
    )

                @varargs()

        

        def

        transformSchema(schema: StructType): StructType

Definition Classes

Finisher → PipelineStage

        

        def

        transformSchema(schema: StructType, logging: Boolean): StructType

Attributes

protected

Definition Classes

PipelineStage

Annotations

                @DeveloperApi()

        

        val

        uid: String

Definition Classes

Finisher → Identifiable

        

        val

        valueSplitSymbol: Param[String]

Character separating annotations (Default: #)

        

        final
        def

        wait(): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        

        final
        def

        wait(arg0: Long, arg1: Int): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        

        final
        def

        wait(arg0: Long): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

                @native()

        

        def

        write: MLWriter

Definition Classes

DefaultParamsWritable → MLWritable

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

Parameters

  A list of (hyper-)parameter keys this annotator can take. Users can set and get the
  parameter values through setters and getters, respectively.

Members

Parameter setters

Parameter getters


text:
package ru.abusalimov.xposed.wifideepsleep;

import static de.robv.android.xposed.XposedHelpers.findClass;
import static de.robv.android.xposed.XposedHelpers.findField;
import static de.robv.android.xposed.XposedHelpers.findMethodBestMatch;
import static de.robv.android.xposed.XposedHelpers.getStaticBooleanField;
import static de.robv.android.xposed.XposedHelpers.getStaticIntField;
import static de.robv.android.xposed.XposedHelpers.getSurroundingThis;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

import ru.abusalimov.xposed.util.SingletonMethodHook;
import android.net.wifi.WifiManager;
import android.os.Message;
import android.os.WorkSource;

public class WifiControllerDeviceInactiveStateProcessMessageMethodHook extends SingletonMethodHook {
	public static final String WIFI_CONTROLLER = "com.android.server.wifi.WifiController";
	public static final String DEVICE_INACTIVE_STATE = WIFI_CONTROLLER + "$DeviceInactiveState";

	protected static final boolean HANDLED;
	protected static final boolean NOT_HANDLED;

	protected static final int CMD_SCREEN_ON;
	protected static final int CMD_USER_PRESENT;
	protected static final int CMD_LOCKS_CHANGED;

	protected static final Field M_NO_LOCK_HELD_STATE;
	protected static final Field M_DEVICE_ACTIVE_STATE;
	protected static final Field M_LOCKS;
	protected static final Field M_TMP_WORK_SOURCE;
	protected static final Field M_WIFI_STATE_MACHINE;

	protected static final Method GET_CURRENT_STATE;
	protected static final Method TRANSITION_TO;
	protected static final Method GET_STRONGEST_LOCK_MODE;
	protected static final Method UPDATE_BATTERY_WORK_SOURCE;

	@Override
	protected void beforeHookedMethod(MethodHookParam param)
			throws Throwable {
		Message msg = (Message) param.args[0];
		Object controller = getSurroundingThis(param.thisObject);

		/* NoLockHeldState does not override processMessage, unfortunately.
		 * So, we hook the method of its parent instead and check for
		 * actual state here. */
		if (GET_CURRENT_STATE.invoke(controller) ==
				M_NO_LOCK_HELD_STATE.get(controller)) {

			if (msg.what == CMD_SCREEN_ON) {
				/* Default action is to transitionTo(mDeviceActiveState).
				 * Skip instead, and proceed to DefaultState handling. */
				param.setResult(NOT_HANDLED);

			} else if (msg.what == CMD_USER_PRESENT) {
				/* There is no default action for this. Do what it used
				 * to do for CMD_SCREEN_ON before and delegate the rest
				 * to DefaultState as usual. */
				TRANSITION_TO.invoke(controller,
						M_DEVICE_ACTIVE_STATE.get(controller));
				param.setResult(NOT_HANDLED);

			} else if (msg.what == CMD_LOCKS_CHANGED) {
				Object lockList = M_LOCKS.get(controller);
				int strongestLock = (int) GET_STRONGEST_LOCK_MODE.invoke(lockList);

				/* Take a default action only for high performance locks,
				 * Otherwise only update battery stats ignoring any locks held. */
				if (strongestLock != WifiManager.WIFI_MODE_FULL_HIGH_PERF) {
					WorkSource tmpWorkSource =
							(WorkSource) M_TMP_WORK_SOURCE.get(controller);
					Object stateMachine = M_WIFI_STATE_MACHINE.get(controller);

					tmpWorkSource.clear();
					UPDATE_BATTERY_WORK_SOURCE.invoke(stateMachine, tmpWorkSource);

					param.setResult(HANDLED);
				}

			}
		}

	}

	static {
		Class<?> clazz = findClass(WIFI_CONTROLLER, null);

		HANDLED      = getStaticBooleanField(clazz, "HANDLED");
		NOT_HANDLED  = getStaticBooleanField(clazz, "NOT_HANDLED");

		CMD_SCREEN_ON      = getStaticIntField(clazz, "CMD_SCREEN_ON");
		CMD_USER_PRESENT   = getStaticIntField(clazz, "CMD_USER_PRESENT");
		CMD_LOCKS_CHANGED  = getStaticIntField(clazz, "CMD_LOCKS_CHANGED");

		M_NO_LOCK_HELD_STATE   = findField(clazz, "mNoLockHeldState");
		M_DEVICE_ACTIVE_STATE  = findField(clazz, "mDeviceActiveState");
		M_LOCKS                = findField(clazz, "mLocks");
		M_TMP_WORK_SOURCE      = findField(clazz, "mTmpWorkSource");
		M_WIFI_STATE_MACHINE   = findField(clazz, "mWifiStateMachine");

		GET_CURRENT_STATE           = findMethodBestMatch(clazz, "getCurrentState");
		TRANSITION_TO               = findMethodBestMatch(clazz, "transitionTo",
				GET_CURRENT_STATE.getReturnType());
		GET_STRONGEST_LOCK_MODE     = findMethodBestMatch(M_LOCKS.getType(),
				"getStrongestLockMode");
		UPDATE_BATTERY_WORK_SOURCE  = findMethodBestMatch(M_WIFI_STATE_MACHINE.getType(),
				"updateBatteryWorkSource", WorkSource.class);
	}

}


text:
//////////////////////////////////////////////////////////////////////
//Headset Presenter by w2solutions (Johan Rosenquist)
//(C) All rights reserved 2002-2007
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"

#include "HeadsetPresenter.h"
#include "..\header files\servicediscoverydialog.h"
#include "SuperController.h"
#include "SS_Log.h"

// ServiceDiscoveryDialog dialog

IMPLEMENT_DYNAMIC(ServiceDiscoveryDialog, CDialog)
ServiceDiscoveryDialog::ServiceDiscoveryDialog(CWnd* pParent /*=NULL*/)
	: HPDialog(ServiceDiscoveryDialog::IDD)
{
	hasUpperLine = true;
	imageToDraw = IDB_LOGO_50x50;
	selectedSCN = SCN_NOT_FOUND;
	selectedServiceName = "NA";
}

ServiceDiscoveryDialog::~ServiceDiscoveryDialog()
{
}

void ServiceDiscoveryDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}

void ServiceDiscoveryDialog::SetController(SuperController* iControl)
{
	myController = iControl;
}

int ServiceDiscoveryDialog::GetSCN()
{
	return selectedSCN;
}

CString ServiceDiscoveryDialog::GetServiceName()
{
	return selectedServiceName;
}

void ServiceDiscoveryDialog::AddServicesToList()
{

	CListBox* myListBox;
	myListBox = (CListBox*)GetDlgItem(IDC_SERVICES_LIST);

	CStringList* discoveredServices = myController->GetServiceListAsCStringList();
	//discoveredServices should probaly be deleted after use, allocated by the controllers
	POSITION cur,next;
	cur = discoveredServices->GetHeadPosition();
	while(cur != NULL)
	{
		next = cur;
		myListBox->AddString(discoveredServices->GetNext(next));
		cur = next;
	}

	if(discoveredServices->GetCount() < 1)
	{
		Log("SDD: No services found?");
		MessageBox("No Services found, contact support","",MB_OK);
	}
	else if(discoveredServices->GetCount() > 1)
	{
		CheckForKnownSpecialCases();  //Nokia for instance
	}
}

/*This function checks if there is any special information that can be displayed
  Best example is that Nokia "sometimes?" shows same name for both services*/
void ServiceDiscoveryDialog::CheckForKnownSpecialCases()
{
	//Check Nokia case with services having same name
	CListBox* myListBox;
	myListBox = (CListBox*)GetDlgItem(IDC_SERVICES_LIST);

	CString service1, service2;
	CString serviceInfo;
	myListBox->GetText(0,service1.GetBufferSetLength(myListBox->GetTextLen(0)));
	myListBox->GetText(1,service2.GetBufferSetLength(myListBox->GetTextLen(1)));

	if(service1.Compare(service2) == 0) //Same service name is displayed for both services
	{
		Log("SDD: Same service name for both services");
		if(service1.Find("Nokia") != -1)
		{
			 serviceInfo = "Your Headset does not present its services correcty. This is a known issue for some Nokia models and it means that HeadsetPresenter could not automatically configure your Headset. You must manually select one of the services above. Most likely you should try no.2 in the list but if you encounter difficulties you can always rerun the wizard and choose the first one";
		}
		else
		{
			serviceInfo = "Your Headset does not present its services correcty. This is a known issue for some headset models and it means that HeadsetPresenter could not automatically configure your Headset. You must manually select one of the services above. Most likely you should try no.1 in the list but if you encounter difficulties you can always rerun the wizard and choose the first one";
		}
		SetDlgItemText(IDC_STATIC_SERVICE_INFO, serviceInfo);
	}
}

BEGIN_MESSAGE_MAP(ServiceDiscoveryDialog, CDialog)
	ON_LBN_SELCHANGE(IDC_SERVICES_LIST, OnLbnSelchangeServicesList)
	ON_BN_CLICKED(IDNEXT, OnBnClickedNext)
//	ON_WM_FONTCHANGE()
ON_WM_ERASEBKGND()
ON_WM_CTLCOLOR()
ON_WM_PAINT()
END_MESSAGE_MAP()

// ServiceDiscoveryDialog message handlers

void ServiceDiscoveryDialog::OnLbnSelchangeServicesList()
{
	CListBox* myListBox;
	myListBox = (CListBox*)GetDlgItem(IDC_SERVICES_LIST);
	selectedSCN = myListBox->GetCurSel() + 1;  //Must add 1 since list is zero based and SCN starts on 1
	Log("SDD: Selected service with index: %d", selectedSCN);

	myListBox->GetText(myListBox->GetCurSel(), selectedServiceName);
	CButton* myButton;
	myButton = (CButton*)GetDlgItem(IDNEXT);
	myButton->EnableWindow(true);
}

void ServiceDiscoveryDialog::OnBnClickedNext()
{
	OnOK();
}

BOOL ServiceDiscoveryDialog::OnInitDialog()
{
	CDialog::OnInitDialog();
	PrintStaticHeadlines("Service Selection", "Select a service from the list below");

   	AddServicesToList();

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}

//void ServiceDiscoveryDialog::OnFontChange()
//{
//	CDialog::OnFontChange();
//
//	// TODO: Add your message handler code here
//}

BOOL ServiceDiscoveryDialog::OnEraseBkgnd(CDC* pDC)
{
	return HPDialog::OnEraseBkgnd(pDC);
}

HBRUSH ServiceDiscoveryDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
	return HPDialog::OnCtlColor(pDC,pWnd,nCtlColor);
}

void ServiceDiscoveryDialog::OnPaint()
{
	HPDialog::OnPaint();
}


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace Divan
{
    /// <summary>
    /// A CouchDB HTTP request with all its options. This is where we do the actual HTTP requests to CouchDB.
    /// </summary>
    public class CouchRequest : ICouchRequest
    {
        private const int UploadBufferSize = 100000;
        private readonly ICouchDatabase db;
        private Stream postStream;
        private readonly ICouchServer server;
        private string etag, etagToCheck;
        private readonly Dictionary<string, string> headers = new Dictionary<string, string>();

        // Query options
        private string method = "GET"; // PUT, DELETE, POST, HEAD
        private string mimeType;
        private string path;
        private string query;

        private JToken result;

        #region Contructors

        public CouchRequest(ICouchServer server)
        {
            this.server = server;
        }

        public CouchRequest(ICouchDatabase db)
        {
            server = db.Server;
            this.db = db;
        }

        #endregion

        /// <summary>
        /// Sets the e-tag value
        /// </summary>
        /// <param name="value">The e-tag value</param>
        /// <returns>A CouchRequest with the new e-tag value</returns>
        public ICouchRequest Etag(string value)
        {
            etagToCheck = value;
            headers["If-Modified"] = value;
            return this;
        }

        /// <summary>
        /// Sets the absolute path in the query
        /// </summary>
        /// <param name="name">The absolute path</param>
        /// <returns>A <see cref="CouchRequest"/> with the new path set.</returns>
        public ICouchRequest Path(string name)
        {
            path = name;
            return this;
        }

        /// <summary>
        /// Sets the raw query information in the request. Don't forget to start with a question mark (?).
        /// </summary>
        /// <param name="value">The raw query</param>
        /// <returns>A <see cref="CouchRequest"/> with the new query set.</returns>
        public ICouchRequest Query(string value)
        {
            query = value;
            return this;
        }

        public ICouchRequest QueryOptions(ICollection<KeyValuePair<string, string>> options)
        {
            if (options == null || options.Count == 0)
            {
                return this;
            }

            var sb = new StringBuilder();
            sb.Append("?");
            foreach (var q in options)
            {
                if (sb.Length > 1)
                {
                    sb.Append("&");
                }
                sb.Append(HttpUtility.UrlEncode(q.Key));
                sb.Append("=");
                sb.Append(HttpUtility.UrlEncode(q.Value));
            }

            return Query(sb.ToString());
        }

        /// <summary>
        /// Turn the request into a HEAD request, HEAD requests are problematic
        /// under Mono 2.4, but has been fixed in later releases.
        /// </summary>
        public ICouchRequest Head()
        {
            // NOTE: We need to do this until next release of mono where HEAD requests have been fixed!
            method = server.RunningOnMono ? "GET" : "HEAD";
            return this;
        }

        public ICouchRequest Copy()
        {
            method = "COPY";
            return this;
        }

        public ICouchRequest PostJson()
        {
            MimeTypeJson();
            return Post();
        }

        public ICouchRequest Post()
        {
            method = "POST";
            return this;
        }

        public ICouchRequest Get()
        {
            method = "GET";
            return this;
        }

        public ICouchRequest Put()
        {
            method = "PUT";
            return this;
        }

        public ICouchRequest Delete()
        {
            method = "DELETE";
            return this;
        }

        public ICouchRequest Data(string data)
        {
            return Data(Encoding.UTF8.GetBytes(data));
        }

        public ICouchRequest Data(byte[] data)
        {
            postStream = new MemoryStream(data);
            return this;
        }

        public ICouchRequest Data(Stream dataStream)
        {
            postStream = dataStream;
            return this;
        }

        public ICouchRequest MimeType(string type)
        {
            mimeType = type;
            return this;
        }

        public ICouchRequest MimeTypeJson()
        {
            MimeType("application/json");
            return this;
        }

        public JObject Result()
        {
            return (JObject)result;
        }

        public T Result<T>() where T : JToken
        {
            return (T)result;
        }

        public string Etag()
        {
            return etag;
        }

        public ICouchRequest Check(string message)
        {
            try
            {
                if (result == null)
                {
                    Parse();
                }
                if (!result["ok"].Value<bool>())
                {
                    throw CouchException.Create(string.Format(CultureInfo.InvariantCulture, message + ": {0}", result));
                }
                return this;
            }
            catch (WebException e)
            {
                throw CouchException.Create(message, e);
            }
        }

        private HttpWebRequest GetRequest()
        {
            var requestUri = new UriBuilder("http", server.Host, server.Port, ((db != null) ? db.Name + "/" : "") + path, query).Uri;
            var request = WebRequest.Create(requestUri) as HttpWebRequest;
            if (request == null)
            {
                throw CouchException.Create("Failed to create request");
            }
            request.Timeout = 3600000; // 1 hour. May use System.Threading.Timeout.Infinite;
            request.Method = method;

            if (mimeType != null)
            {
                request.ContentType = mimeType;
            }

            foreach (var header in headers)
            {
                request.Headers.Add(header.Key, header.Value);
            }

            if (!string.IsNullOrEmpty(server.EncodedCredentials))
			{
                request.Headers.Add("Authorization", server.EncodedCredentials);
			}

            if (postStream != null)
            {
                WriteData(request);
            }

            Trace.WriteLine(string.Format(CultureInfo.InvariantCulture, "Request: {0} Method: {1}", requestUri, method));
            return request;
        }

        private void WriteData(HttpWebRequest request)
        {
            request.ContentLength = postStream.Length;
            using (Stream ps = request.GetRequestStream())
            {
                var buffer = new byte[UploadBufferSize];
                int bytesRead;
                while ((bytesRead = postStream.Read(buffer, 0, buffer.Length)) != 0)
                {
                    ps.Write(buffer, 0, bytesRead);
                }
            }
        }

        public JObject Parse()
        {
            return Parse<JObject>();
        }

        public T Parse<T>() where T : JToken
        {
            using (WebResponse response = GetResponse())
            {
                using (Stream stream = response.GetResponseStream())
                {
                    using (var reader = new StreamReader(stream))
                    {
                        using (var textReader = new JsonTextReader(reader))
                        {
                            PickETag(response);
                            if (etagToCheck != null)
                            {
                                if (IsETagValid())
                                {
                                    return null;
                                }
                            }
                            result = JToken.ReadFrom(textReader); // We know it is a top level JSON JObject.
                        }
                    }
                }
            }

            return (T)result;
        }

        /// <summary>
        /// Returns a Json stream from the server
        /// </summary>
        /// <returns></returns>
        public JsonTextReader Stream()
        {
            return new JsonTextReader(new StreamReader(GetResponse().GetResponseStream()));
        }

        private void PickETag(WebResponse response)
        {
            etag = response.Headers["ETag"];
            if (etag != null)
            {
                etag = etag.EndsWith("\"") ? etag.Substring(1, etag.Length - 2) : etag;
            }
        }

        /// <summary>
        /// Return the request as a plain string instead of trying to parse it.
        /// </summary>
        public string String()
        {
            using (WebResponse response = GetResponse())
            {
                using (var reader = new StreamReader(response.GetResponseStream()))
                {
                    PickETag(response);
                    if (etagToCheck != null)
                    {
                        if (IsETagValid())
                        {
                            return null;
                        }
                    }
                    return reader.ReadToEnd();
                }
            }
        }

        public WebResponse Response()
        {
            WebResponse response = GetResponse();

            PickETag(response);
            if (etagToCheck != null)
            {
                if (IsETagValid())
                {
                    return null;
                }
            }
            return response;
        }

        private WebResponse GetResponse()
        {
            return GetRequest().GetResponse();
        }

        public ICouchRequest Send()
        {
            using (WebResponse response = GetResponse())
            {
                PickETag(response);
                return this;
            }
        }

        public bool IsETagValid()
        {
            return etagToCheck == etag;
        }

        public ICouchRequest AddHeader(string key, string value)
        {
            headers[key] = value;
            return this;
        }
    }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package library.management.system;

/**
 *
 * @author chathura
 */
public class Reservation {
    private Book book;
    private Reader reader;
    private Loan loan;

}


text:
require 'rails_helper'

RSpec.describe PersonFormBuilder, type: :form_builder do

  let(:object) { Object.new }
  let(:template) { ActionView::Base.new({}, {}, nil) }
  let(:options) { {} }
  let(:builder) { described_class.new(:person, object, template, options) }

  # patch String#strip_heredoc to remove whitespace resulting from line breaks
  class String
    def squish_heredoc
      squish.gsub(/\s*</, "<").gsub(/>\s*/, ">").strip_heredoc
    end
  end

  describe '#check_box' do
    subject { builder.check_box(:works_monday) }

    before do
      I18n.backend.store_translations(
        :en,
        helpers: {
          label: {
            person: {
              works_monday: 'Monday'
            }
          }
        }
      )
    end

    let(:output) do
      <<~HTML.squish_heredoc

            <input name="person[works_monday]" type="hidden" value="0" autocomplete="off" />
            <input type="checkbox" value="1" name="person[works_monday]" id="person_works_monday" />
            Monday

      HTML
    end

    it 'returns govuk styled check box' do
      expect(subject).to match output
    end

    it 'adds outer form-group div' do
      expect(subject).to match(/
.*<\/div>/)
    end

    it 'adds a selectable block-label inside the form-group' do
      expect(subject).to match(/.*form-group.*.*<\/label>/)
    end

    it 'adds a checkbox inside the label' do
      expect(subject).to match(/<label.*<input type="checkbox" value="1" name="person\[works_monday\]" id="person_works_monday" \/>.*<\/label>/)
    end

    it 'adds label from translation defined in specific scope' do
      expect(subject).to include 'Monday'
    end

  end

  describe '#text_field' do
    subject { builder.text_field(:test_field) }

    before do
      I18n.backend.store_translations(:en, translations)
      allow(object).to receive(:test_field)
      allow(object).to receive(:needed_for_completion?).and_return true
      allow(object).to receive(:class).and_return Person
    end

    let(:object) { double('person') }

    let(:translations) do
      {
        helpers: {
          label: {
            person: {
              test_field: 'Test label'
            }
          },
          hint: {
            person: {
              test_field: 'Test hint'
            }
          }
        }
      }
    end

    let(:output) do
      <<~HTML.squish_heredoc

            Test label
            Test hint

          <input class=\"form-control incomplete\" type=\"text\" name=\"person[test_field]\" id=\"person_test_field\" />

      HTML
    end

    it 'adds profile completion class to field if needed' do
      expect(subject).to include 'incomplete'
    end

    it 'does NOT add profile completion class to field if NOT needed' do
      allow(object).to receive(:needed_for_completion?).and_return false
      expect(subject).not_to include 'incomplete'
    end

    it 'returns govuk styled text field' do
      expect(subject).to eql output
    end
  end

end


text:
#include <assert.h>
#include <openthread-core-config.h>
#include <openthread/config.h>

#include <openthread/cli.h>
#include <openthread/diag.h>
#include <openthread/tasklet.h>
#include <openthread/platform/logging.h>

#include "openthread-system.h"

#if OPENTHREAD_EXAMPLES_POSIX
#include <setjmp.h>
#include <unistd.h>

jmp_buf gResetJump;

void __gcov_flush();
#endif

#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
void *otPlatCAlloc(size_t aNum, size_t aSize)
{
    return calloc(aNum, aSize);
}

void otPlatFree(void *aPtr)
{
    free(aPtr);
}
#endif

void otTaskletsSignalPending(otInstance *aInstance)
{
    OT_UNUSED_VARIABLE(aInstance);
}

int main(int argc, char *argv[])
{
    otInstance *instance;

#if OPENTHREAD_EXAMPLES_POSIX
    if (setjmp(gResetJump))
    {
        alarm(0);
#if OPENTHREAD_ENABLE_COVERAGE
        __gcov_flush();
#endif
        execvp(argv[0], argv);
    }
#endif

#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
    size_t   otInstanceBufferLength = 0;
    uint8_t *otInstanceBuffer       = NULL;
#endif

pseudo_reset:

    otSysInit(argc, argv);

#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
    // Call to query the buffer size
    (void)otInstanceInit(NULL, &otInstanceBufferLength);

    // Call to allocate the buffer
    otInstanceBuffer = (uint8_t *)malloc(otInstanceBufferLength);
    assert(otInstanceBuffer);

    // Initialize OpenThread with the buffer
    instance = otInstanceInit(otInstanceBuffer, &otInstanceBufferLength);
#else
    instance = otInstanceInitSingle();
#endif
    assert(instance);

    otCliUartInit(instance);

    while (!otSysPseudoResetWasRequested())
    {
        otTaskletsProcess(instance);
        otSysProcessDrivers(instance);
    }

    otInstanceFinalize(instance);
#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
    free(otInstanceBuffer);
#endif

    goto pseudo_reset;

    return 0;
}

/*
 * Provide, if required an "otPlatLog()" function
 */
#if OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_APP
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
{
    OT_UNUSED_VARIABLE(aLogLevel);
    OT_UNUSED_VARIABLE(aLogRegion);
    OT_UNUSED_VARIABLE(aFormat);

    va_list ap;
    va_start(ap, aFormat);
    otCliPlatLogv(aLogLevel, aLogRegion, aFormat, ap);
    va_end(ap);
}
#endif


text:
BLE Firmata
===========
Arduino [Firmata](http://firmata.org) implementation on BLE (Bluetooth Low Energy) and Node.js.

[![Build Status](https://travis-ci.org/shokai/node-ble-firmata.svg?branch=master)](https://travis-ci.org/shokai/node-ble-firmata)

- Firmata is a protocol to controll Arduino from software on PC.
  - You can embed Arduino code into Node.js application.
- supports [BlendMicro](http://redbearlab.squarespace.com/blendmicro/).
  - also should works on [BLE Shield](http://redbearlab.squarespace.com/bleshield/), but I dont't have it.

sites

- https://github.com/shokai/node-ble-firmata
- https://npmjs.org/package/ble-firmata

Install
-------

    % npm install ble-firmata

Requirements
------------

- [BlendMicro](http://redbearlab.squarespace.com/blendmicro)
  - you have to check pin function. pin 4/6/7 are reserved for BLE controll.
- Install [patched Standard Firmata v2.3](./firmware/BLEFirmataSketch/BLEFirmataSketch.ino) to BlendMicro
  - fix `#define BLE_NAME "BlendMicro"` if you need.
  - [download zip](https://github.com/shokai/node-ble-firmata/archive/master.zip)

Usage
-----

### Samples

- https://github.com/shokai/ble-arduino-firmata/tree/master/samples

### Setup

Connect
```javascript
var BLEFirmata = require('ble-firmata');
var arduino = new BLEFirmata();

// search device with BLE peripheral name
arduino.connect("BlendMicro");

// search with default name "BlendMicro"
arduino.connect();

arduino.on('connect', function(){

  console.log("board version"+arduino.boardVersion);
  // your-code-here

});
```

Reset
```javascript
arduino.reset(callback);
```

Close
```javascript
arduino.close(callback);
```

### I/O

Digital Write
```javascript
arduino.digitalWrite(13, true, callback);
arduino.digitalWrite(13, false, callback);
```

Digital Read
```javascript
arduino.pinMode(1, BLEFirmata.INPUT);
console.log( arduino.digitalRead(1) ); // => true/false
```

Digital Read (event)
```javascript
arduino.pinMode(1, BLEFirmata.INPUT);

arduino.on('digitalChange', function(e){
  console.log("pin" + e.pin + " : " + e.old_value + " -> " + e.value);
});
```

Analog Write (PWM)
```
setInterval(function(){
  var an = Math.random()*255; // 0 ~ 255
  arduino.analogWrite(9, an, callback);
}, 100);
```

Analog Read
```javascript
console.log( arduino.analogRead(0) ); // => 0 ~ 1023
```

Analog Read (event)
```javascript
arduino.on('analogChange', function(e){
  console.log("pin" + e.pin + " : " + e.old_value + " -> " + e.value);
});
```

Servo Motor
```javascript
setInterval(function(){
  var angle = Math.random()*180; // 0 ~ 180
  arduino.servoWrite(11, angle, callback);
}, 1000);
```

### Sysex

- http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
- https://github.com/shokai/ble-arduino-firmata/tree/master/samples/sysex

Send
```javascript
arduino.sysex(0x01, [13, 5, 2], callback);  // command, data_array, callback
```

Register Sysex Event
```javascript
arduino.on('sysex', function(e){
  console.log("command : " + e.command);
  console.log(e.data);
});
```

Debug
-----

set `DEBUG` env var

    % DEBUG=ble-firmata node samples/analog_write.js
    % DEBUG=*ble* node samples/analog_write.js

Test
----

### Install SysexLedBlinkFirmata into Arduino

* https://github.com/shokai/node-ble-firmata/blob/master/samples/sysex/BLEFirmataWithLedBlink/BLEFirmataWithLedBlink.ino

### Run Test

    % npm install
    % npm test

Contributing
------------
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
#ifndef HANDLER_H
#define HANDLER_H

#include "helper.h"
#include "oem.h"
#include "config.h"
#include "utils.h"

#include <string>
#include <cstdlib>

/**
 * @brief The LedLocker class implements a simple mechanism to turn on/off the CMOS led included the
 * fingerprint sensor.
 */
class LedLocker {
private:
    /**
     * @brief oem reference to the Oem object we will issue commands for turning on/off the CMOS
     * led.
     */
    Oem *oem;
public:

    /**
     * @brief LedLocker turns the CMOS led on.
     * @param _oem object representing the fingerprint sensor interface we will be talking to.
     */
    LedLocker(Oem *_oem);

    /**
      * Turns the CMOS led off of the connected fingerprint sensor.
      */
    ~LedLocker();
};

// Deprecated: remove in future versions
void handlerUiPolling(void *parameter=NULL);

/**
 * @brief The Controller class implements the high-level logic for talking to the sensor. It
 * includes an Oem object which is the sensor interface itself. This class does the
 * parameter/error/response handling, as well as it calls the proper UI methods for updating it.
 *
 * See the Helper class to understand the way it takes parameter and uses them to perform all the
 * actions.
 */
class Controller {

    Helper *ui;
    bool bContinue;
    Oem oem;
    void (*handlerUiPolling)(void*);

private:
    /**
     * @brief setResult outputs a message (optionally with a second line) in the current UI (no
     * matter it is MODE_WINDOW o console).
     * @param line1 first line of the message.
     * @param line2 second line of the message (is empty, only the first line is shown).
     */
    void setResult(const std::string &line1, const std::string &line2="");

public:
    /**
     * @brief Controller builds a new instance of Controller.
     */
    explicit Controller(CCommSerial *serial_port);

    /**
     * @brief setup sets the object where UI calls will be delegated.
     * @param _ui helper object where to delegate the UI related calls (updating the UI, drawing
     * images, showing text, showing modal dialogs to prompt filenames, etc.)
     * @param handler
     */
    void setup(Helper *_ui, void (*handler)(void* param));

public:

    /**
     * @brief __saveImageToFile saves the last captured image to disk.
     */
    void __saveImageToFile();

    /**
     * @brief __open opens the serial port and initializes the sensor communication.
     */
    void __open();

    /**
     * @brief __close closes the sensor communication and closes the serial port.
     */
    void __close();

    /**
     * @brief __enroll starts the process for enrolling a new user.
     */
    void __enroll();

    /**
     * @brief __getUserCount returns the count of enrolled users (users in the fingerprint sensor
     * internal database).
     */
    void __getUserCount();

    /**
     * @brief __verify verifies if the user matches an id.
     */
    void __verify();

    /**
     * @brief __deleteId deletes a previously enrolled user from the fingerprint internal database.
     */
    void __deleteId();

    /**
     * @brief __identify gets the id of an unknown fingerprint being taken from the sensor.
     */
    void __identify();

    /**
     * @brief __deleteAll clears the whole fingerprint internal database.
     */
    void __deleteAll();

    /**
     * @brief __verifyTemplate verifies if a template taken from a file matches an id.
     */
    void __verifyTemplate();

    /**
     * @brief __getTemplate gets a template for a user from the fingerprint internal database and
     * writes it to disk.
     */
    void __getTemplate();

    /**
     * @brief __identifyTemplate gets the id of an unknown template being taken from a file.
     */
    void __identifyTemplate();

    /**
     * @brief __setTemplate sets a template into the fingerprint internal database taking it from a
     * file.
     */
    void __setTemplate();

    /**
     * @brief __isPressedFinger checks whether a finger is pressed against the sensor (kind of a
     * button).
     */
    void __isPressedFinger();

    /**
     * @brief __getDatabase retrieves the whole fingerprint internal database and saves it to a
     * file.
     */
    void __getDatabase();

    /**
     * @brief __getImage captures and download to computer ram a fingerprint as an image. Make sure
     * to call __saveImageToFile() afterwards, to get the image file.
     */
    void __getImage();

    /**
     * @brief __setDatabase replaces the whole fingerprint internal database from a database taken
     * from a file.
     */
    void __setDatabase();

    /**
     * @brief __getRawImage captures and download to computer ram a raw fingerprint as an image.
     * Make sure to call __saveImageToFile() afterwards, to get the image file.
     */
    void __getRawImage();

    /**
     * @brief __cancel currently cancels the __getLiveImage() execution. It only works when
     * executing in MODE_WINDOW because it needs to be called from GUI thread.
     */
    void __cancel();

    /**
     * @brief __getLiveImage performs a continuous capturing and downloading of the current finger
     * pressed against the fingerprint sensor.
     */
    void __getLiveImage();
};

#endif // HANDLER_H


text:
#pragma warning disable 1591

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Serialization;
using DotNetCasClient.Validation.Schema.Saml20.Assertion;

namespace DotNetCasClient.Validation.Schema.Saml20.Protocol.Request
{
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(Namespace="urn:oasis:names:tc:SAML:2.0:protocol")]
    [XmlRoot("NameIDMappingRequest", Namespace="urn:oasis:names:tc:SAML:2.0:protocol", IsNullable=false)]
    public class NameIdMappingRequestType : RequestAbstractType {
        [XmlElement("BaseID", typeof(BaseIdAbstractType), Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
        [XmlElement("EncryptedID", typeof(EncryptedElementType), Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
        [XmlElement("NameID", typeof(NameIdType), Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
        public object Item
        {
            get;
            set;
        }

        [XmlElement("NameIDPolicy")]
        public NameIdPolicyType NameIdPolicy
        {
            get;
            set;
        }
    }
}

#pragma warning restore 1591