text:
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Metadata;
using System.Threading;
using Baseline.Reflection;
using LamarCodeGeneration;
using LamarCodeGeneration.Frames;
using LamarCodeGeneration.Model;
using Marten.Internal.CodeGeneration;
using Npgsql;
using NpgsqlTypes;

namespace Marten.Schema.Arguments
{
    public class DocTypeArgument: UpsertArgument
    {
        private static readonly MethodInfo _getAlias = ReflectionHelper.GetMethod<DocumentMapping>(x => x.AliasFor(null));
        private static readonly MethodInfo _getType = typeof(object).GetMethod("GetType");

        public DocTypeArgument()
        {
            Arg = "docType";
            Column = SchemaConstants.DocumentTypeColumn;
            DbType = NpgsqlDbType.Varchar;
            PostgresType = "varchar";
        }

        public override void GenerateCodeToModifyDocument(GeneratedMethod method, GeneratedType type, int i, Argument parameters,
            DocumentMapping mapping, StoreOptions options)
        {
            method.Frames.Code($"var docType = _mapping.{nameof(DocumentMapping.AliasFor)}(document.GetType());");

            if (mapping.Metadata.DocumentType.Member != null)
            {
                method.Frames.SetMemberValue(mapping.Metadata.DocumentType.Member, "docType", mapping.DocumentType, type);
            }
        }

        public override void GenerateCodeToSetDbParameterValue(GeneratedMethod method, GeneratedType type, int i, Argument parameters,
            DocumentMapping mapping, StoreOptions options)
        {
            method.Frames.Code($"{parameters.Usage}[{i}].{nameof(NpgsqlParameter.NpgsqlDbType)} = {{0}};", DbType);
            method.Frames.Code($"{parameters.Usage}[{i}].{nameof(NpgsqlParameter.Value)} = docType;");
        }

        public override void GenerateBulkWriterCode(GeneratedType type, GeneratedMethod load, DocumentMapping mapping)
        {
            load.Frames.Code($"var docType = _mapping.{nameof(DocumentMapping.AliasFor)}(document.GetType());");

            load.Frames.Code($"writer.Write(docType, {{0}});", DbType);
            if (mapping.Metadata.DocumentType.Member != null)
            {
                load.Frames.SetMemberValue(mapping.Metadata.DocumentType.Member, "docType", mapping.DocumentType, type);
            }
        }

        public override void GenerateBulkWriterCodeAsync(GeneratedType type, GeneratedMethod load, DocumentMapping mapping)
        {
            load.Frames.Code($"var docType = _mapping.{nameof(DocumentMapping.AliasFor)}(document.GetType());");

            load.Frames.CodeAsync($"await writer.WriteAsync(docType, {{0}}, {{1}});", DbType, Use.Type<CancellationToken>());
            if (mapping.Metadata.DocumentType.Member != null)
            {
                load.Frames.SetMemberValue(mapping.Metadata.DocumentType.Member, "docType", mapping.DocumentType, type);
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Copyright Kenneth Falck <kennu@iki.fi> 2012.
See LICENSE for copyright information (BSD license).

## Overview

StormBench is a distributed web load testing system for Amazon AWS.
It launch a number of EC2 instances and runs ApacheBench on each of
them to perform a distributed load test. The results are stored in
a central Redis server, which also coordinates the clients so they
start their benchmarks at the same time. At the end, StormBench
reads the results and combines them to a single report.

StormBench will tag all resources it uses on EC2 with the tag
"StormBench:True". This tag is used to clean them up afterwards,
even if a test run or image creation is aborted. Additionally, the
image names and Name tags of all resources will use a common prefix
(specified with the -p option), which helps you identify the resources
in the AWS Console.

## Usage

StormBench is a Python script which performs all the necessary operations.
The main functionalities are documented here. You can also run the script
to get usage information.

### Common options

All stormbench.py commands accept these options:

    -k
    --key                 AWS access key to use. REQUIRED
    -s
    --secret              AWS secret access key to use. REQUIRED
    -r us-east-1
    --region us-east-1    AWS region to use. Default: eu-west-1
    -p tag-prefix
    --prefix tag-prefix   AWS tag prefix. Default: stormbench

### Creating an Amazon EC2 AMI image

A custom AMI image is prepared so that each node of the distributed test
cluster can start up automatically and independently. The AMI image is
based on the official Ubuntu 12.04 LTS 32-bit AMI:

http://cloud-images.ubuntu.com/releases/precise/release/

The preparation phase will launch an EC2 instance in the specified EC2
region, install all available updates, install Redis and ab, and set up
the necessary init scripts. A new AMI is then created and the temporary
micro instance is terminated.

Command line usage:

    ./stormbench.py [options] createimage

Options:

    -b ami-c7aaabb3
    --base ami-c7aaabb3   Base AMI image. This will default to the
                          Ubuntu 12.04 EBS 32-bit AMI for the active
                          region.

### Performing a distributed load test

Command line usage:

    ./stormbench.py [options] benchmark <url>

Arguments:

    <url>                 The URL to test. REQUIRED

Options:

    -i 100
    --instances 100       Number of client instances to start. Default: 1
    -n 1000
    --numrequests         Number of requests/client to make. Default: 1
    -c 50
    --concurrency 50      Concurrency of each client. Default: 1
    -o <options>
    --options <options>   Specify additional options for ApacheBench.
                          See man ab(1) for more information.

### Checking the resource usage status

This command will show the Amazon EC2 resources that are currently used
by StormBench. The status display is based on the StormBench:True tag.

Command line usage:

    ./stormbench.py [options] status

### Cleaning up resources used by StormBench

This command will clean up all Amazon EC2 resources that have been launched
by StormBench. They are identified by the StormBench:True tag.

Command line usage:

    ./stormbench.py [options] cleanup

### About the central Redis server

StormBench requires one centralized Redis server for all distributed
nodes to connect to. It will be started automatically whenever needed.
If you have created a custom AMI image, the image will be used to
launch the server. Otherwise a virgin Ubuntu AMI will be used.

Note that all EC2 instances must be able to contact the server at the
specified address. The server is used to synchronize the startup time
of the test and collect the results from all nodes.


text:
package pb

import (
	specs "github.com/opencontainers/image-spec/specs-go/v1"
)

func (p *Platform) Spec() specs.Platform {
	return specs.Platform{
		OS:           p.OS,
		Architecture: p.Architecture,
		Variant:      p.Variant,
		OSVersion:    p.OSVersion,
		OSFeatures:   p.OSFeatures,
	}
}

func PlatformFromSpec(p specs.Platform) Platform {
	return Platform{
		OS:           p.OS,
		Architecture: p.Architecture,
		Variant:      p.Variant,
		OSVersion:    p.OSVersion,
		OSFeatures:   p.OSFeatures,
	}
}

func ToSpecPlatforms(p []Platform) []specs.Platform {
	out := make([]specs.Platform, 0, len(p))
	for _, pp := range p {
		out = append(out, pp.Spec())
	}
	return out
}

func PlatformsFromSpec(p []specs.Platform) []Platform {
	out := make([]Platform, 0, len(p))
	for _, pp := range p {
		out = append(out, PlatformFromSpec(pp))
	}
	return out
}


text:
<?php

// Related Posts Function, matches posts by tags - call using podium_related_posts(); )
function podium_related_posts()
{
    global $post;
    $tags = wp_get_post_tags($post->ID);

    if ($tags) {

        foreach ($tags as $tag) {
            $tag_arr .= $tag->slug . ',';
        }

        $args = [
            'tag'         => $tag_arr,
            'numberposts' => 3, /* you can change this to show more */
            'post__not_in' => [$post->ID]
        ];
        $related_posts = get_posts($args);

        if ($related_posts) {

            echo '
Related Posts
';
            echo '
';

            foreach ($related_posts as $post) {
                setup_postdata($post);
                ?>

                    <a href="<?php the_permalink()?>" title="<?php the_title_attribute();?>"><?php the_title();?>
                    <?php get_template_part('parts/content', 'byline');?>

                <?php

            }

        }

    }

    wp_reset_postdata();
    echo '
';
}

/* end podium related posts function */
?>


text:
from django.db import models
from django.contrib.auth.models import User
from apps.courses.models import Course

# Create your models here.

class Person(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    course = models.ManyToManyField(Course)
    first_name = models.CharField(max_length=50)
    middle_name = models.CharField(max_length=50)
    last_name = models.CharField(max_length=50)
    email = models.CharField(max_length=150)
    PROFESSOR = 'PR'
    COORDINATOR = 'CO'
    STUDENT = 'ST'
    PERSON_ROLE = (
        (PROFESSOR, 'Professor'),
        (COORDINATOR, 'Coordinator'),
        (STUDENT, 'Student'),
    )
    role_in_app = models.CharField(
        max_length=2,
        default=STUDENT,
    )

    def __str__(self):
        return  self.first_name + ' ' + self.last_name


text:
SpellCheckTokenizer::SpellCheckTokenizer(const QString *text)
{
    this->text = text;
    boundaryFinder = QTextBoundaryFinder(QTextBoundaryFinder::Word, *text);
    position = 0;
    startWord = -1;

    if(boundaryFinder.boundaryReasons() & QTextBoundaryFinder::StartOfItem)
        startWord = 0;
}

bool SpellCheckTokenizer::hasNextWord()
{
    nextWord.clear();
    while(true){
        position = boundaryFinder.toNextBoundary();
        if(position==-1)
            return false;

        const QTextBoundaryFinder::BoundaryReasons reasons = boundaryFinder.boundaryReasons();
        if(reasons & QTextBoundaryFinder::EndOfItem){
            if(startWord==-1)
                continue;
            //skip empty words
            if(position==startWord)
                continue;
            nextWord = text->mid(startWord, position-startWord);
            start=startWord;
            end=position;

            if(reasons & QTextBoundaryFinder::StartOfItem)
                startWord = position;
            else
                startWord = -1;
            return true;
        }

        if(reasons & QTextBoundaryFinder::StartOfItem)
            startWord = position;
    }
    return false;
}

QString SpellCheckTokenizer::getNextWord() const
{
    return nextWord;
}

int SpellCheckTokenizer::nextWordStart() const
{
    return start;
}

int SpellCheckTokenizer::nextWordEnd() const
{
    return end;
}

//SpellChecker *SpellChecker::spellCheckInstance = NULL;

//SpellChecker* SpellChecker::getInstance()
//{
//    Configuration *conf = Configuration::getInstance();
//    if(!spellCheckInstance && conf->isCheckSpell()){
//        QString filePath = conf->getLanguageSpellCheckDictPath(conf->getSpellCheckLanguage());
//        if(!filePath.isEmpty()){
//            QString withoutSuffixFilePath = filePath.left(filePath.lastIndexOf('.'));
//            qDebug(withoutSuffixFilePath.toAscii());
//            spellCheckInstance = new SpellChecker(withoutSuffixFilePath, conf->getLanguageSpellCheckUserDictPath(), conf->getSpellCheckLanguage());
//        } else {
//            conf->setCheckSpell(false);
//            conf->setSpellCheckLanguage(QString());
//            spellCheckInstance = NULL;
//        }
//    }
//    return spellCheckInstance;
//}

//void SpellChecker::reload()
//{
//    Configuration *conf = Configuration::getInstance();

//    if(conf->isCheckSpell()){
//        if(spellCheckInstance!=NULL&&spellCheckInstance->getLan()!=conf->getSpellCheckLanguage()){
//            delete spellCheckInstance;
//            spellCheckInstance = NULL;
//        }
//        getInstance();
//        return;
//    }else{
//        delete spellCheckInstance;
//        spellCheckInstance = NULL;
//        return;
//    }
//}

SpellChecker::SpellChecker(const QString &dictionaryPath, const QString &userDictionary, const QString &lan)
{
    this->lan = lan;
    this->userDictionary = userDictionary;
    QString dictFilePath = dictionaryPath + ".dic";
    QString affixFilePath = dictionaryPath + ".aff";
    QByteArray dictFilePathBA = dictFilePath.toLocal8Bit();
    QByteArray affixFilePathBA = affixFilePath.toLocal8Bit();
    hunspell = std::make_shared<Hunspell>(affixFilePathBA.constData(), dictFilePathBA.constData());

    encoding = "ISO8859-1";
    QFile affixFile(affixFilePath);
    if(affixFile.open(QIODevice::ReadOnly)) {
        QTextStream stream(&affixFile);
        QRegExp enc_detector("^\\s*SET\\s+([A-Z0-9\\-]+)\\s*", Qt::CaseInsensitive);
        for(QString line = stream.readLine(); !line.isEmpty(); line=stream.readLine()) {
            if(enc_detector.indexIn(line) > -1) {
                encoding = enc_detector.cap(1);
                qDebug("Encoding set to %s", encoding.toLocal8Bit().constData());
                break;
            }
        }
        affixFile.close();
    }
    codec = QTextCodec::codecForName(encoding.toLatin1().constData());
    if(userDictionary.isEmpty()) {
        QFile userDictionaryFile(userDictionary);
        if(userDictionaryFile.open(QIODevice::ReadOnly)) {
            QTextStream stream(&userDictionaryFile);
            for(QString word=stream.readLine(); !word.isEmpty(); word=stream.readLine())
                put_word(word);
            userDictionaryFile.close();
        } else {
            qWarning("User dictionary in %s could not be opened", userDictionary.toLocal8Bit().constData());
        }
    } else {
        qDebug("User dictionary not set.");
    }
}

SpellChecker::~SpellChecker()
{
}

bool SpellChecker::spell(const QString &word)
{
    return hunspell->spell(codec->fromUnicode(word).constData()) != 0;
}

SpellCheckResultList SpellChecker::checkString(const QString &text)
{
    SpellCheckResultList resultList;
    if (text.isEmpty())
        return resultList;//Found 0 error
    SpellCheckTokenizer tokenizer(&text);
    while(tokenizer.hasNextWord()){
        QString word = tokenizer.getNextWord();
        if(!Utils::isLetterOrNumberString(word))
            continue;
        //only accept alhpanumeric string
        if(!hunspell->spell(codec->fromUnicode(word))){
            SpellCheckResult result;
            result.start = tokenizer.nextWordStart();
            result.end = tokenizer.nextWordEnd();
            resultList.append(result);
        }
    }
    return resultList;
}

QStringList SpellChecker::suggest(const QString &word)
{
    char **suggestWordList;

    int numSuggestions = hunspell->suggest(&suggestWordList, codec->fromUnicode(word).constData());
    QStringList suggestions;
    for(int i=0; i<numSuggestions; ++i) {
        suggestions << codec->toUnicode(suggestWordList[i]);
        free(suggestWordList[i]);
    }
    return suggestions;
}

void SpellChecker::ignoreWord(const QString &word)
{
    put_word(word);
}

void SpellChecker::put_word(const QString &word)
{
    hunspell->add(codec->fromUnicode(word).constData());
}

void SpellChecker::addToUserWordlist(const QString &word)
{
    put_word(word);
    if(userDictionary.isEmpty()) {
        QFile userDictionaryFile(userDictionary);
        if(userDictionaryFile.open(QIODevice::Append)) {
            QTextStream stream(&userDictionaryFile);
            stream << word << "\n";
            userDictionaryFile.close();
        } else {
            qWarning("User dictionary in %s could not be opened for appending a new word", userDictionary.toLocal8Bit().constData());
        }
    } else {
        qDebug("User dictionary not set.");
    }
}

QString SpellChecker::getLan()
{
    return lan;
}


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Ads.GoogleAds.V10.Services {

  /// Holder for reflection information generated from google/ads/googleads/v10/services/conversion_goal_campaign_config_service.proto
  public static partial class ConversionGoalCampaignConfigServiceReflection {

    #region Descriptor
    /// File descriptor for google/ads/googleads/v10/services/conversion_goal_campaign_config_service.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static ConversionGoalCampaignConfigServiceReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Ck9nb29nbGUvYWRzL2dvb2dsZWFkcy92MTAvc2VydmljZXMvY29udmVyc2lv",
            "bl9nb2FsX2NhbXBhaWduX2NvbmZpZ19zZXJ2aWNlLnByb3RvEiFnb29nbGUu",
            "YWRzLmdvb2dsZWFkcy52MTAuc2VydmljZXMaOmdvb2dsZS9hZHMvZ29vZ2xl",
            "YWRzL3YxMC9lbnVtcy9yZXNwb25zZV9jb250ZW50X3R5cGUucHJvdG8aSGdv",
            "b2dsZS9hZHMvZ29vZ2xlYWRzL3YxMC9yZXNvdXJjZXMvY29udmVyc2lvbl9n",
            "b2FsX2NhbXBhaWduX2NvbmZpZy5wcm90bxocZ29vZ2xlL2FwaS9hbm5vdGF0",
            "aW9ucy5wcm90bxoXZ29vZ2xlL2FwaS9jbGllbnQucHJvdG8aH2dvb2dsZS9h",
            "cGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdvb2dsZS9hcGkvcmVzb3VyY2Uu",
            "cHJvdG8aIGdvb2dsZS9wcm90b2J1Zi9maWVsZF9tYXNrLnByb3RvIqwCCipN",
            "dXRhdGVDb252ZXJzaW9uR29hbENhbXBhaWduQ29uZmlnc1JlcXVlc3QSGAoL",
            "Y3VzdG9tZXJfaWQYASABKAlCA+BBAhJhCgpvcGVyYXRpb25zGAIgAygLMkgu",
            "Z29vZ2xlLmFkcy5nb29nbGVhZHMudjEwLnNlcnZpY2VzLkNvbnZlcnNpb25H",
            "b2FsQ2FtcGFpZ25Db25maWdPcGVyYXRpb25CA+BBAhIVCg12YWxpZGF0ZV9v",
            "bmx5GAMgASgIEmoKFXJlc3BvbnNlX2NvbnRlbnRfdHlwZRgEIAEoDjJLLmdv",
            "b2dsZS5hZHMuZ29vZ2xlYWRzLnYxMC5lbnVtcy5SZXNwb25zZUNvbnRlbnRU",
            "eXBlRW51bS5SZXNwb25zZUNvbnRlbnRUeXBlIrkBCiVDb252ZXJzaW9uR29h",
            "bENhbXBhaWduQ29uZmlnT3BlcmF0aW9uEi8KC3VwZGF0ZV9tYXNrGAIgASgL",
            "MhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxJSCgZ1cGRhdGUYASABKAsy",
            "QC5nb29nbGUuYWRzLmdvb2dsZWFkcy52MTAucmVzb3VyY2VzLkNvbnZlcnNp",
            "b25Hb2FsQ2FtcGFpZ25Db25maWdIAEILCglvcGVyYXRpb24iiwEKK011dGF0",
            "ZUNvbnZlcnNpb25Hb2FsQ2FtcGFpZ25Db25maWdzUmVzcG9uc2USXAoHcmVz",
            "dWx0cxgBIAMoCzJLLmdvb2dsZS5hZHMuZ29vZ2xlYWRzLnYxMC5zZXJ2aWNl",
            "cy5NdXRhdGVDb252ZXJzaW9uR29hbENhbXBhaWduQ29uZmlnUmVzdWx0IugB",
            "CihNdXRhdGVDb252ZXJzaW9uR29hbENhbXBhaWduQ29uZmlnUmVzdWx0ElEK",
            "DXJlc291cmNlX25hbWUYASABKAlCOvpBNwo1Z29vZ2xlYWRzLmdvb2dsZWFw",
            "aXMuY29tL0NvbnZlcnNpb25Hb2FsQ2FtcGFpZ25Db25maWcSaQofY29udmVy",
            "c2lvbl9nb2FsX2NhbXBhaWduX2NvbmZpZxgCIAEoCzJALmdvb2dsZS5hZHMu",
            "Z29vZ2xlYWRzLnYxMC5yZXNvdXJjZXMuQ29udmVyc2lvbkdvYWxDYW1wYWln",
            "bkNvbmZpZzKcAwojQ29udmVyc2lvbkdvYWxDYW1wYWlnbkNvbmZpZ1NlcnZp",
            "Y2USrQIKI011dGF0ZUNvbnZlcnNpb25Hb2FsQ2FtcGFpZ25Db25maWdzEk0u",
            "Z29vZ2xlLmFkcy5nb29nbGVhZHMudjEwLnNlcnZpY2VzLk11dGF0ZUNvbnZl",
            "cnNpb25Hb2FsQ2FtcGFpZ25Db25maWdzUmVxdWVzdBpOLmdvb2dsZS5hZHMu",
            "Z29vZ2xlYWRzLnYxMC5zZXJ2aWNlcy5NdXRhdGVDb252ZXJzaW9uR29hbENh",
            "bXBhaWduQ29uZmlnc1Jlc3BvbnNlImeC0+STAkgiQy92MTAvY3VzdG9tZXJz",
            "L3tjdXN0b21lcl9pZD0qfS9jb252ZXJzaW9uR29hbENhbXBhaWduQ29uZmln",
            "czptdXRhdGU6ASraQRZjdXN0b21lcl9pZCxvcGVyYXRpb25zGkXKQRhnb29n",
            "bGVhZHMuZ29vZ2xlYXBpcy5jb23SQSdodHRwczovL3d3dy5nb29nbGVhcGlz",
            "LmNvbS9hdXRoL2Fkd29yZHNClAIKJWNvbS5nb29nbGUuYWRzLmdvb2dsZWFk",
            "cy52MTAuc2VydmljZXNCKENvbnZlcnNpb25Hb2FsQ2FtcGFpZ25Db25maWdT",
            "ZXJ2aWNlUHJvdG9QAVpJZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29v",
            "Z2xlYXBpcy9hZHMvZ29vZ2xlYWRzL3YxMC9zZXJ2aWNlcztzZXJ2aWNlc6IC",
            "A0dBQaoCIUdvb2dsZS5BZHMuR29vZ2xlQWRzLlYxMC5TZXJ2aWNlc8oCIUdv",
            "b2dsZVxBZHNcR29vZ2xlQWRzXFYxMFxTZXJ2aWNlc+oCJUdvb2dsZTo6QWRz",
            "OjpHb29nbGVBZHM6OlYxMDo6U2VydmljZXNiBnByb3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeReflection.Descriptor, global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfigReflection.Descriptor, global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigsRequest), global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigsRequest.Parser, new[]{ "CustomerId", "Operations", "ValidateOnly", "ResponseContentType" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation), global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation.Parser, new[]{ "UpdateMask", "Update" }, new[]{ "Operation" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigsResponse), global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigsResponse.Parser, new[]{ "Results" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult), global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult.Parser, new[]{ "ResourceName", "ConversionGoalCampaignConfig" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// Request message for
  /// [ConversionGoalCampaignConfigService.MutateConversionGoalCampaignConfig][].
  ///
  public sealed partial class MutateConversionGoalCampaignConfigsRequest : pb::IMessage<MutateConversionGoalCampaignConfigsRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MutateConversionGoalCampaignConfigsRequest> _parser = new pb::MessageParser<MutateConversionGoalCampaignConfigsRequest>(() => new MutateConversionGoalCampaignConfigsRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MutateConversionGoalCampaignConfigsRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigServiceReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigsRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigsRequest(MutateConversionGoalCampaignConfigsRequest other) : this() {
      customerId_ = other.customerId_;
      operations_ = other.operations_.Clone();
      validateOnly_ = other.validateOnly_;
      responseContentType_ = other.responseContentType_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigsRequest Clone() {
      return new MutateConversionGoalCampaignConfigsRequest(this);
    }

    /// Field number for the "customer_id" field.
    public const int CustomerIdFieldNumber = 1;
    private string customerId_ = "";
    ///
    /// Required. The ID of the customer whose custom conversion goals are being modified.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CustomerId {
      get { return customerId_; }
      set {
        customerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "operations" field.
    public const int OperationsFieldNumber = 2;
    private static readonly pb::FieldCodec<global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation> _repeated_operations_codec
        = pb::FieldCodec.ForMessage(18, global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation.Parser);
    private readonly pbc::RepeatedField<global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation> operations_ = new pbc::RepeatedField<global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation>();
    ///
    /// Required. The list of operations to perform on individual conversion goal campaign
    /// config.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigOperation> Operations {
      get { return operations_; }
    }

    /// Field number for the "validate_only" field.
    public const int ValidateOnlyFieldNumber = 3;
    private bool validateOnly_;
    ///
    /// If true, the request is validated but not executed. Only errors are
    /// returned, not results.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool ValidateOnly {
      get { return validateOnly_; }
      set {
        validateOnly_ = value;
      }
    }

    /// Field number for the "response_content_type" field.
    public const int ResponseContentTypeFieldNumber = 4;
    private global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType responseContentType_ = global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType.Unspecified;
    ///
    /// The response content type setting. Determines whether the mutable resource
    /// or just the resource name should be returned post mutation.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType ResponseContentType {
      get { return responseContentType_; }
      set {
        responseContentType_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MutateConversionGoalCampaignConfigsRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MutateConversionGoalCampaignConfigsRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (CustomerId != other.CustomerId) return false;
      if(!operations_.Equals(other.operations_)) return false;
      if (ValidateOnly != other.ValidateOnly) return false;
      if (ResponseContentType != other.ResponseContentType) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (CustomerId.Length != 0) hash ^= CustomerId.GetHashCode();
      hash ^= operations_.GetHashCode();
      if (ValidateOnly != false) hash ^= ValidateOnly.GetHashCode();
      if (ResponseContentType != global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType.Unspecified) hash ^= ResponseContentType.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (CustomerId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CustomerId);
      }
      operations_.WriteTo(output, _repeated_operations_codec);
      if (ValidateOnly != false) {
        output.WriteRawTag(24);
        output.WriteBool(ValidateOnly);
      }
      if (ResponseContentType != global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType.Unspecified) {
        output.WriteRawTag(32);
        output.WriteEnum((int) ResponseContentType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (CustomerId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CustomerId);
      }
      operations_.WriteTo(ref output, _repeated_operations_codec);
      if (ValidateOnly != false) {
        output.WriteRawTag(24);
        output.WriteBool(ValidateOnly);
      }
      if (ResponseContentType != global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType.Unspecified) {
        output.WriteRawTag(32);
        output.WriteEnum((int) ResponseContentType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (CustomerId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CustomerId);
      }
      size += operations_.CalculateSize(_repeated_operations_codec);
      if (ValidateOnly != false) {
        size += 1 + 1;
      }
      if (ResponseContentType != global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType.Unspecified) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseContentType);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MutateConversionGoalCampaignConfigsRequest other) {
      if (other == null) {
        return;
      }
      if (other.CustomerId.Length != 0) {
        CustomerId = other.CustomerId;
      }
      operations_.Add(other.operations_);
      if (other.ValidateOnly != false) {
        ValidateOnly = other.ValidateOnly;
      }
      if (other.ResponseContentType != global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType.Unspecified) {
        ResponseContentType = other.ResponseContentType;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            CustomerId = input.ReadString();
            break;
          }
          case 18: {
            operations_.AddEntriesFrom(input, _repeated_operations_codec);
            break;
          }
          case 24: {
            ValidateOnly = input.ReadBool();
            break;
          }
          case 32: {
            ResponseContentType = (global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType) input.ReadEnum();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            CustomerId = input.ReadString();
            break;
          }
          case 18: {
            operations_.AddEntriesFrom(ref input, _repeated_operations_codec);
            break;
          }
          case 24: {
            ValidateOnly = input.ReadBool();
            break;
          }
          case 32: {
            ResponseContentType = (global::Google.Ads.GoogleAds.V10.Enums.ResponseContentTypeEnum.Types.ResponseContentType) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// A single operation (update) on a conversion goal campaign config.
  ///
  public sealed partial class ConversionGoalCampaignConfigOperation : pb::IMessage<ConversionGoalCampaignConfigOperation>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<ConversionGoalCampaignConfigOperation> _parser = new pb::MessageParser<ConversionGoalCampaignConfigOperation>(() => new ConversionGoalCampaignConfigOperation());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<ConversionGoalCampaignConfigOperation> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigServiceReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ConversionGoalCampaignConfigOperation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ConversionGoalCampaignConfigOperation(ConversionGoalCampaignConfigOperation other) : this() {
      updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null;
      switch (other.OperationCase) {
        case OperationOneofCase.Update:
          Update = other.Update.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ConversionGoalCampaignConfigOperation Clone() {
      return new ConversionGoalCampaignConfigOperation(this);
    }

    /// Field number for the "update_mask" field.
    public const int UpdateMaskFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_;
    ///
    /// FieldMask that determines which resource fields are modified in an update.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask {
      get { return updateMask_; }
      set {
        updateMask_ = value;
      }
    }

    /// Field number for the "update" field.
    public const int UpdateFieldNumber = 1;
    ///
    /// Update operation: The conversion goal campaign config is expected to have
    /// a valid resource name.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig Update {
      get { return operationCase_ == OperationOneofCase.Update ? (global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig) operation_ : null; }
      set {
        operation_ = value;
        operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.Update;
      }
    }

    private object operation_;
    /// Enum of possible cases for the "operation" oneof.
    public enum OperationOneofCase {
      None = 0,
      Update = 1,
    }
    private OperationOneofCase operationCase_ = OperationOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public OperationOneofCase OperationCase {
      get { return operationCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearOperation() {
      operationCase_ = OperationOneofCase.None;
      operation_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as ConversionGoalCampaignConfigOperation);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ConversionGoalCampaignConfigOperation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(UpdateMask, other.UpdateMask)) return false;
      if (!object.Equals(Update, other.Update)) return false;
      if (OperationCase != other.OperationCase) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (updateMask_ != null) hash ^= UpdateMask.GetHashCode();
      if (operationCase_ == OperationOneofCase.Update) hash ^= Update.GetHashCode();
      hash ^= (int) operationCase_;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (operationCase_ == OperationOneofCase.Update) {
        output.WriteRawTag(10);
        output.WriteMessage(Update);
      }
      if (updateMask_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(UpdateMask);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (operationCase_ == OperationOneofCase.Update) {
        output.WriteRawTag(10);
        output.WriteMessage(Update);
      }
      if (updateMask_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(UpdateMask);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (updateMask_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask);
      }
      if (operationCase_ == OperationOneofCase.Update) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Update);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ConversionGoalCampaignConfigOperation other) {
      if (other == null) {
        return;
      }
      if (other.updateMask_ != null) {
        if (updateMask_ == null) {
          UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
        }
        UpdateMask.MergeFrom(other.UpdateMask);
      }
      switch (other.OperationCase) {
        case OperationOneofCase.Update:
          if (Update == null) {
            Update = new global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig();
          }
          Update.MergeFrom(other.Update);
          break;
      }

      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig subBuilder = new global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig();
            if (operationCase_ == OperationOneofCase.Update) {
              subBuilder.MergeFrom(Update);
            }
            input.ReadMessage(subBuilder);
            Update = subBuilder;
            break;
          }
          case 18: {
            if (updateMask_ == null) {
              UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
            }
            input.ReadMessage(UpdateMask);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig subBuilder = new global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig();
            if (operationCase_ == OperationOneofCase.Update) {
              subBuilder.MergeFrom(Update);
            }
            input.ReadMessage(subBuilder);
            Update = subBuilder;
            break;
          }
          case 18: {
            if (updateMask_ == null) {
              UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
            }
            input.ReadMessage(UpdateMask);
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// Response message for a conversion goal campaign config mutate.
  ///
  public sealed partial class MutateConversionGoalCampaignConfigsResponse : pb::IMessage<MutateConversionGoalCampaignConfigsResponse>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MutateConversionGoalCampaignConfigsResponse> _parser = new pb::MessageParser<MutateConversionGoalCampaignConfigsResponse>(() => new MutateConversionGoalCampaignConfigsResponse());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MutateConversionGoalCampaignConfigsResponse> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigServiceReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigsResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigsResponse(MutateConversionGoalCampaignConfigsResponse other) : this() {
      results_ = other.results_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigsResponse Clone() {
      return new MutateConversionGoalCampaignConfigsResponse(this);
    }

    /// Field number for the "results" field.
    public const int ResultsFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult> _repeated_results_codec
        = pb::FieldCodec.ForMessage(10, global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult.Parser);
    private readonly pbc::RepeatedField<global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult> results_ = new pbc::RepeatedField<global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult>();
    ///
    /// All results for the mutate.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Google.Ads.GoogleAds.V10.Services.MutateConversionGoalCampaignConfigResult> Results {
      get { return results_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MutateConversionGoalCampaignConfigsResponse);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MutateConversionGoalCampaignConfigsResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!results_.Equals(other.results_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= results_.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      results_.WriteTo(output, _repeated_results_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      results_.WriteTo(ref output, _repeated_results_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      size += results_.CalculateSize(_repeated_results_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MutateConversionGoalCampaignConfigsResponse other) {
      if (other == null) {
        return;
      }
      results_.Add(other.results_);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            results_.AddEntriesFrom(input, _repeated_results_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            results_.AddEntriesFrom(ref input, _repeated_results_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// The result for the conversion goal campaign config mutate.
  ///
  public sealed partial class MutateConversionGoalCampaignConfigResult : pb::IMessage<MutateConversionGoalCampaignConfigResult>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MutateConversionGoalCampaignConfigResult> _parser = new pb::MessageParser<MutateConversionGoalCampaignConfigResult>(() => new MutateConversionGoalCampaignConfigResult());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MutateConversionGoalCampaignConfigResult> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V10.Services.ConversionGoalCampaignConfigServiceReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigResult() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigResult(MutateConversionGoalCampaignConfigResult other) : this() {
      resourceName_ = other.resourceName_;
      conversionGoalCampaignConfig_ = other.conversionGoalCampaignConfig_ != null ? other.conversionGoalCampaignConfig_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateConversionGoalCampaignConfigResult Clone() {
      return new MutateConversionGoalCampaignConfigResult(this);
    }

    /// Field number for the "resource_name" field.
    public const int ResourceNameFieldNumber = 1;
    private string resourceName_ = "";
    ///
    /// Returned for successful operations.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ResourceName {
      get { return resourceName_; }
      set {
        resourceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "conversion_goal_campaign_config" field.
    public const int ConversionGoalCampaignConfigFieldNumber = 2;
    private global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig conversionGoalCampaignConfig_;
    ///
    /// The mutated ConversionGoalCampaignConfig with only mutable fields after
    /// mutate. The field will only be returned when response_content_type is set
    /// to "MUTABLE_RESOURCE".
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig ConversionGoalCampaignConfig {
      get { return conversionGoalCampaignConfig_; }
      set {
        conversionGoalCampaignConfig_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MutateConversionGoalCampaignConfigResult);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MutateConversionGoalCampaignConfigResult other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ResourceName != other.ResourceName) return false;
      if (!object.Equals(ConversionGoalCampaignConfig, other.ConversionGoalCampaignConfig)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (ResourceName.Length != 0) hash ^= ResourceName.GetHashCode();
      if (conversionGoalCampaignConfig_ != null) hash ^= ConversionGoalCampaignConfig.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (ResourceName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ResourceName);
      }
      if (conversionGoalCampaignConfig_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(ConversionGoalCampaignConfig);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (ResourceName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ResourceName);
      }
      if (conversionGoalCampaignConfig_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(ConversionGoalCampaignConfig);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (ResourceName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ResourceName);
      }
      if (conversionGoalCampaignConfig_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConversionGoalCampaignConfig);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MutateConversionGoalCampaignConfigResult other) {
      if (other == null) {
        return;
      }
      if (other.ResourceName.Length != 0) {
        ResourceName = other.ResourceName;
      }
      if (other.conversionGoalCampaignConfig_ != null) {
        if (conversionGoalCampaignConfig_ == null) {
          ConversionGoalCampaignConfig = new global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig();
        }
        ConversionGoalCampaignConfig.MergeFrom(other.ConversionGoalCampaignConfig);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            ResourceName = input.ReadString();
            break;
          }
          case 18: {
            if (conversionGoalCampaignConfig_ == null) {
              ConversionGoalCampaignConfig = new global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig();
            }
            input.ReadMessage(ConversionGoalCampaignConfig);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            ResourceName = input.ReadString();
            break;
          }
          case 18: {
            if (conversionGoalCampaignConfig_ == null) {
              ConversionGoalCampaignConfig = new global::Google.Ads.GoogleAds.V10.Resources.ConversionGoalCampaignConfig();
            }
            input.ReadMessage(ConversionGoalCampaignConfig);
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code


text:
data Tree a = Node a (Tree a) (Tree a)
            | Empty
              deriving (Show)
treeHeight :: Tree t -> Int
treeHeight Empty = 0
treeHeight (Node _ left right) = if a >= b
                                 then a + 1
                                 else b + 1
                                   where a = treeHeight left
                                         b = treeHeight right


text:
<!doctype html>

	<meta charset="UTF-8">
	<title>SWAMP Project Invitation</title>

		Dear {{ $invitation->invitee_name }},

		You have been invited by {{ $inviter->GetFullName() }} to join the project, {{ $project->full_name }}.

		In order to join this project, you must first register to become a member of the SWAMP.  To register for an account, first click this link:
		{{ $register_url }}

		Once you have registered for an account, to join this project, click this link:
		invitation_key }}">{{ $confirm_url }}/{{ $invitation->invitation_key }}

		-The Software Assurance Marketplace (SWAMP)


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <link rel="stylesheet" href="node_modules/purecss/build/pure.css" />
  <link rel="stylesheet" href="node_modules/font-awesome/css/font-awesome.min.css" />
  <link rel="stylesheet" href="style.css" />
  <title>Speed Dating</title>

      <button id="run" class="pure-button"></button>

      <button id="stop" class="pure-button"></button>

      <button id="edit" class="pure-button"></button>

0 : 00

  <audio id="beep" src="warning.wav">err</audio>


text:
package org.apache.batik.ext.awt.image.codec.util;

import java.awt.image.ColorModel;
import java.awt.image.Raster;

/**
 * A simple class that provides RenderedImage functionality
 * given a Raster and a ColorModel.
 *
 * @version $Id$
 */
public class SingleTileRenderedImage extends SimpleRenderedImage {

    Raster ras;

    /**
     * Constructs a SingleTileRenderedImage based on a Raster
     * and a ColorModel.
     *
     * @param ras A Raster that will define tile (0, 0) of the image.
     * @param colorModel A ColorModel that will serve as the image's
     *                   ColorModel.
     */
    public SingleTileRenderedImage(Raster ras, ColorModel colorModel) {
        this.ras = ras;

        this.tileGridXOffset = this.minX = ras.getMinX();
        this.tileGridYOffset = this.minY = ras.getMinY();
        this.tileWidth = this.width = ras.getWidth();
        this.tileHeight = this.height = ras.getHeight();
        this.sampleModel = ras.getSampleModel();
        this.colorModel = colorModel;
    }

    /**
     * Returns the image's Raster as tile (0, 0).
     */
    public Raster getTile(int tileX, int tileY) {
        if (tileX != 0 || tileY != 0) {
            throw new IllegalArgumentException(PropertyUtil.getString("SingleTileRenderedImage0"));
        }
        return ras;
    }
}


text:
package cn.aezo.designpattern.c20_iterator.t1_array_list;

public interface MyCollection {
	void add(Object o);
	int size();
	MyIterator iterator();
}


text:
require 'json'

def sorted_json(obj)
  case obj
    when String, Fixnum, Float, TrueClass, FalseClass, NilClass
      return obj.to_json
    when Array
      arrayRet = []
      obj.each do |a|
        arrayRet.push(sorted_json(a))
      end
      return "[" << arrayRet.join(',') << "]";
    when Hash
      ret = []
      obj.keys.sort.each do |k|
        ret.push(k.to_json << ":" << sorted_json(obj[k]))
      end
      return "{" << ret.join(",") << "}";
    else
      raise Exception("Unable to handle object of type <%s>" % obj.class.to_s)
  end
end

module Puppet::Parser::Functions
  newfunction(:sorted_json, :type => :rvalue, :doc => <<-EOS
This function takes data, outputs making sure the hash keys are sorted

*Examples:*

    sorted_json({'key'=>'value'})

Would return: {'key':'value'}
    EOS
  ) do |arguments|
    raise(Puppet::ParseError, "sorted_json(): Wrong number of arguments " +
      "given (#{arguments.size} for 1)") if arguments.size != 1

    json = arguments[0]
    return sorted_json(json)
  end
end


text:
// @flow

/* eslint no-console:0 */

import path from 'path';
import download from 'download-github-repo';
import chalk from 'chalk';
import isDirectory from 'is-directory';
import { execSync } from 'child_process';
import * as utils from './utils';

function github(url, destination) {
  return new Promise((resolve, reject) => {
    download(url, destination, (err) => {
      if (err) {
        reject(err);
      } else {
        resolve();
      }
    });
  });
}

export default async function create(name: string) {
  let rootDir = path.join(process.cwd(), name);
  if (isDirectory.sync(rootDir)) {
    console.error(chalk.red(`项目创建失败:"${rootDir}" 已经存在`));
    process.exit();
  }
  let tips = `
  1: Alaska core project without any services & plugins.
  2: Basic project with React server side rendering.
  3: With User service and RBAC system.
  4: With Admin service for generate admin dashboard automatically.
  5: With Post service for blog site.
  6: With Goods and Order service for shopping site.
`;
  console.log(tips);
  let type = await utils.readValue({
    prompt: 'Please select project template?',
    default: 6
  }, (p) => (p >= 1 && p <= 5));
  let branch = '';
  switch (type) {
    case '1':
      branch = 'core';
      break;
    case '2':
      branch = 'base';
      break;
    case '3':
      branch = 'user';
      break;
    case '4':
      branch = 'admin';
      break;
    case '5':
      branch = 'post';
      break;
    case '6':
    default:
      branch = 'goods';
      break;
  }
  console.log(chalk.green('Download project code...'));
  await github(`maichong/alaska-init#${branch}`, rootDir);

  console.log(chalk.green('Download Completed.'));
  let pkgFile = path.join(rootDir, 'package.json');
  let pkg = utils.readJSON(pkgFile);
  pkg.name = name;
  utils.writeJson(pkgFile, pkg);

  console.log(chalk.green('Install dependencies...'));

  execSync('npm install', {
    cwd: rootDir,
    stdio: ['inherit', 'inherit', 'inherit'],
    env: Object.assign({
      NPM_CONFIG_LOGLEVEL: 'http',
      NPM_CONFIG_PROGRESS: 'false'
    }, process.env)
  });

  console.log(chalk.green('--- Alaska project created, please type the following commands for start server. ---'));
  console.log(chalk.gray('>'), chalk.blue('cd ' + name));
  console.log(chalk.gray('>'), chalk.blue('node server.js'));
}


text:
'use strict';
var Generator = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');

module.exports = Generator.extend({
  prompting: function () {
    // Have Yeoman greet the user.
    this.log(yosay(
      'Welcome to the pioneering ' + chalk.red('generator-spring-rest-jwt') + ' generator!'
    ));

    var prompts = [{
      type: 'input',
      name: 'resourceName',
      message: 'Resource Name?',
      default: 'ResourceName'
    }, {
      type: 'input',
      name: 'packageName',
      message: 'Package Name?',
      default: 'com.project.resource'
    }];

    return this.prompt(prompts).then(function (props) {
      // To access props later use this.props.someAnswer;
      this.props = props;
    }.bind(this));
  },

  writing: function () {

    var packagePath = this.props.packageName.replace(/\./g, '/');
    var lowerResourceName = this.props.resourceName.charAt(0).toLowerCase() + this.props.resourceName.slice(1);
    var options = { packageName: this.props.packageName, resourceName: this.props.resourceName, lowerResourceName: lowerResourceName };

    this.fs.copyTpl(
      this.templatePath('_Resource.java'),
      this.destinationPath('src/main/java/' + packagePath + '/' + this.props.resourceName + '.java'),
      options
    );

    this.fs.copyTpl(
      this.templatePath('_ResourceRepository.java'),
      this.destinationPath('src/main/java/' + packagePath + '/' + this.props.resourceName + 'Repository.java'),
      options
    );

    this.fs.copyTpl(
      this.templatePath('_ResourceRestController.java'),
      this.destinationPath('src/main/java/' + packagePath + '/' + this.props.resourceName + 'RestController.java'),
      options
    );

  }

});


text:
package ca.uhn.fhir.rest.client;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.io.ByteArrayInputStream;

import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.*;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicStatusLine;
import org.hl7.fhir.r4.model.Binary;
import org.hl7.fhir.r4.model.IdType;
import org.junit.*;
import org.mockito.ArgumentCaptor;
import org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.annotation.*;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.client.api.IBasicClient;
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.util.TestUtil;

public class BinaryClientTest {

	private FhirContext mtCtx;
	private HttpClient myHttpClient;
	private HttpResponse httpResponse;

	// atom-document-large.xml

	@Before
	public void before() {
		mtCtx = FhirContext.forR4();

		myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs());
		mtCtx.getRestfulClientFactory().setHttpClient(myHttpClient);
		mtCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER);

		httpResponse = mock(HttpResponse.class, new ReturnsDeepStubs());
	}

	@Test
	public void testRead() throws Exception {
		ArgumentCaptor<HttpUriRequest> capt = ArgumentCaptor.forClass(HttpUriRequest.class);
		when(myHttpClient.execute(capt.capture())).thenReturn(httpResponse);
		when(httpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK"));
		when(httpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", "foo/bar"));
		when(httpResponse.getEntity().getContent()).thenReturn(new ByteArrayInputStream(new byte[] { 1, 2, 3, 4 }));

		IClient client = mtCtx.newRestfulClient(IClient.class, "http://foo");
		Binary resp = client.read(new IdType("http://foo/Patient/123"));

		assertEquals(HttpGet.class, capt.getValue().getClass());
		HttpGet get = (HttpGet) capt.getValue();
		assertEquals("http://foo/Binary/123", get.getURI().toString());

		assertEquals("foo/bar", resp.getContentType());
		assertArrayEquals(new byte[] { 1, 2, 3, 4 }, resp.getContent());
	}

	@Test
	public void testCreate() throws Exception {
		Binary res = new Binary();
		res.setContent(new byte[] { 1, 2, 3, 4 });
		res.setContentType("text/plain");

		ArgumentCaptor<HttpUriRequest> capt = ArgumentCaptor.forClass(HttpUriRequest.class);
		when(myHttpClient.execute(capt.capture())).thenReturn(httpResponse);
		when(httpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 201, "OK"));
		when(httpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_XML));
		when(httpResponse.getEntity().getContent()).thenReturn(new ByteArrayInputStream(new byte[] {}));

		IClient client = mtCtx.newRestfulClient(IClient.class, "http://foo");
		client.create(res);

		assertEquals(HttpPost.class, capt.getValue().getClass());
		HttpPost post = (HttpPost) capt.getValue();
		assertEquals("http://foo/Binary", post.getURI().toString());

		assertEquals("text/plain", capt.getValue().getFirstHeader("Content-Type").getValue());
		assertArrayEquals(new byte[] { 1, 2, 3, 4 }, IOUtils.toByteArray(post.getEntity().getContent()));

	}

	private interface IClient extends IBasicClient {

		@Read(type = Binary.class)
		public Binary read(@IdParam IdType theBinary);

		@Create(type = Binary.class)
		public MethodOutcome create(@ResourceParam Binary theBinary);

	}

	@AfterClass
	public static void afterClassClearContext() {
		TestUtil.clearAllStaticFieldsForUnitTest();
	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="1.0">

    <persistence-unit name="teste_aula_cc" >
       	<provider>org.hibernate.ejb.HibernatePersistence</provider>
        <class>br.ufc.Order</class>
        <class>br.ufc.Invoice</class>
        <class>br.ufc.Customer</class>
        <class>br.ufc.Product</class>

        <properties>
			<property name="javax.persisteence.jdbc.driver" value="com.mysql.jdbc.Driver" />
			<property name="javax.persistence.jdbc.url" value="jdbc:mysql://200.129.39.219/java_web_cc" />
			<property name="javax.persistence.jdbc.user" value="root" />
			<property name="javax.persistence.jdbc.password" value="root" />
			<!-- propriedades do hibernate -->
			<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
			<property name="hibernate.show_sql" value="false" />
			<property name="hibernate.format_sql" value="true" />
			<!-- atualiza o banco, gera as tabelas se for preciso -->
			<property name="hibernate.hbm2ddl.auto" value="update" />
        </properties>
    </persistence-unit>

</persistence>


text:
//=============================================================================
/**
 *  @file    Bound_Ptr_Test.h
 *
 *  $Id: Bound_Ptr_Test.h 93638 2011-03-24 13:16:05Z johnnyw $
 *
 *  Define class needed for generating templates. IBM C++ requires this to
 *  be in its own file for auto template instantiation.
 *
 *
 *  @author @author Christopher Kohlhoff <chris@kohlhoff.com>
 */
//=============================================================================

#ifndef ACE_TESTS_BOUND_PTR_TEST_H
#define ACE_TESTS_BOUND_PTR_TEST_H

#include "ace/Activation_Queue.h"
#include "ace/Bound_Ptr.h"
#include "ace/Task.h"
#include "ace/Thread_Mutex.h"

struct Printer
{
  Printer (const char *message);
  ~Printer (void) ;

  void print (void);

  const char *message_;
  static size_t instance_count_;
};

#if defined (ACE_HAS_THREADS)

typedef ACE_Strong_Bound_Ptr<Printer, ACE_Thread_Mutex> Printer_var;

/**
 * @class Scheduler
 *
 * @brief The scheduler for the Active Object.
 *
 * This class also plays the role of the Proxy and the Servant
 * in the Active Object pattern.  Naturally, these roles could
 * be split apart from the Scheduler.
 */
class Scheduler : public ACE_Task<ACE_SYNCH>
{

  friend class Method_Request_print;
  friend class Method_Request_end;
public:
  // = Initialization and termination methods.
  /// Constructor.
  Scheduler (Scheduler * = 0);

  /// Initializer.
  virtual int open (void *args = 0);

  /// Terminator.
  virtual int close (u_long flags = 0);

  /// Destructor.
  virtual ~Scheduler (void);

  // = These methods are part of the Active Object Proxy interface.
  void print (Printer_var &printer);
  void end (void);

protected:
  /// Runs the Scheduler's event loop, which dequeues <Method_Requests>
  /// and dispatches them.
  virtual int svc (void);

private:
  // = These are the <Scheduler> implementation details.
  ACE_Activation_Queue activation_queue_;
  Scheduler *scheduler_;
};

#endif /* ACE_HAS_THREADS */
#endif /* ACE_TESTS_BOUND_PTR_TEST_H */


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('fileuploads', '0004_auto_20160327_2017'),
    ]

    operations = [
        migrations.AddField(
            model_name='video',
            name='filename',
            field=models.CharField(default='filename', max_length=400),
            preserve_default=False,
        ),
    ]


text:
{-# LANGUAGE
    OverloadedStrings
  , ScopedTypeVariables
  #-}

module Pages.NotFound where

import Application.Types
import Templates.Master

import Data.Url
import Web.Page.Lucid
import qualified Data.Text as T
import Lucid
import Lucid.Base

import Data.Monoid
import Data.Default
import Control.Monad.Trans
import Control.Monad.Reader

notFoundContent :: ( Monad m
                   , Functor m
                   ) => HtmlT (AbsoluteUrlT T.Text (ReaderT Env m)) ()
notFoundContent = do
  root <- lift $ plainUrl ""

  let page = masterPage { metaVars = meta_ [ makeAttribute "http-equiv" "refresh"
                                           , content_ ("3;url=" <> root)
                                           ]
                        }

  masterTemplate Nothing (page `appendTitle` "404 - Not Found") $
    div_ [class_ "one column row"] $
      div_ [class_ "column"] $ do
        h1_ [class_ "ui center aligned header"] "Not Found!"
        p_ [] $ do
          "Your request was not found. Redirecting you to "
          a_ [href_ root] "the homepage"
          "..."


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"

    >

    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginTop="4dp"
        android:scrollbars="horizontal"
        android:scrollbarThumbHorizontal="@color/gray2000"
        >
        <!--text match-->
        <TextView
            android:id="@+id/text_match"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:textColor="@android:color/black"
            />
    </HorizontalScrollView>

</RelativeLayout>