text:
> Handlebars helper. Returns true if a value exists in an array. Faster than using indexOf and won't blow up on null values.

## Install
Install with [npm](npmjs.org):

```bash
npm i handlebars-helper-inarray --save
```

## Usage

```js
var inArray = require('in-array');
var Handlebars = require('handlebars');
Handlebars.registerHelper('inArray', inArray);
```

With [Assemble](https://github.com/assemble/assemble):

```js
// helpers/in-array.js
module.exports.register = function(Handlebars) {
  Handlebars.registerHelper('inArray', inArray);
};
```
In the config:

```js
options: {
  helpers: ['helpers/in-array.js']
}
```

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 26, 2014._


text:
package ru.atom.geometry;

import java.lang.IllegalArgumentException;

/**
 * Created by zarina on 02.03.17.
 */
public class Bar implements Collider {
    private Point firstPoint;
    private Point secondPoint;

    public Bar(Point firstPoint, Point secondPoint) {
        this.firstPoint = firstPoint;
        this.secondPoint = secondPoint;
    }

    /**
     * @param o - other object to check equality with
     * @return true if two bar are equal and not null.
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        // cast from Object to Bar
        Bar other = (Bar) o;
        return this.firstPoint.equals(other.firstPoint) && this.secondPoint.equals(other.secondPoint)
            || this.firstPoint.equals(other.secondPoint) && this.secondPoint.equals(other.firstPoint)
            // different X
            || this.secondPoint.getX() == other.firstPoint.getX() && this.secondPoint.getY() == other.secondPoint.getY()
            && this.firstPoint.getX() == other.secondPoint.getX() && this.firstPoint.getY() == other.firstPoint.getY()
            // different Y
            || this.secondPoint.getX() == other.secondPoint.getX() && this.secondPoint.getY() == other.firstPoint.getY()
            && this.firstPoint.getX() == other.firstPoint.getX() && this.firstPoint.getY() == other.secondPoint.getY();
    }

    @Override
    public boolean isColliding(Collider o) {
        if (o instanceof Bar) {
            Bar other = (Bar) o;
            return this.equals(other)
                || this.isPointIntoBar(other.firstPoint) || this.isPointIntoBar(other.secondPoint)
                || other.isPointIntoBar(this.firstPoint) || other.isPointIntoBar(this.secondPoint);
        }
        if ((o instanceof Point)) {
            return this.isPointIntoBar((Point) o);
        }
        throw new IllegalArgumentException("Can't support argument type");
    }

    private boolean isPointIntoBar(Point point) {
        return this.firstPoint.getX() <= point.getX() && this.secondPoint.getX() >= point.getX()
            && this.firstPoint.getY() <= point.getY() && this.secondPoint.getY() >= point.getY();
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.gobblin.azkaban;

import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.Credentials;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.io.Closer;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigValue;

import azkaban.jobExecutor.AbstractJob;
import javax.annotation.Nullable;

import org.apache.gobblin.configuration.ConfigurationKeys;
import org.apache.gobblin.configuration.DynamicConfigGenerator;
import org.apache.gobblin.configuration.State;
import org.apache.gobblin.metrics.GobblinMetrics;
import org.apache.gobblin.metrics.RootMetricContext;
import org.apache.gobblin.metrics.Tag;
import org.apache.gobblin.metrics.event.TimingEvent;
import org.apache.gobblin.runtime.DynamicConfigGeneratorFactory;
import org.apache.gobblin.runtime.JobException;
import org.apache.gobblin.runtime.JobLauncher;
import org.apache.gobblin.runtime.JobLauncherFactory;
import org.apache.gobblin.runtime.app.ApplicationException;
import org.apache.gobblin.runtime.app.ApplicationLauncher;
import org.apache.gobblin.runtime.app.ServiceBasedAppLauncher;
import org.apache.gobblin.runtime.job_catalog.PackagedTemplatesJobCatalogDecorator;
import org.apache.gobblin.runtime.listeners.CompositeJobListener;
import org.apache.gobblin.runtime.listeners.EmailNotificationJobListener;
import org.apache.gobblin.runtime.listeners.JobListener;
import org.apache.gobblin.util.ClassAliasResolver;
import org.apache.gobblin.util.ConfigUtils;
import org.apache.gobblin.util.HadoopUtils;
import org.apache.gobblin.util.TimeRangeChecker;
import org.apache.gobblin.util.hadoop.TokenUtils;

import static org.apache.hadoop.security.UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION;

/**
 * A utility class for launching a Gobblin Hadoop MR job through Azkaban.
 *
 *

 *   By default, this class will use the {@link org.apache.gobblin.runtime.mapreduce.MRJobLauncher} to launch and run
 *   the Gobblin job unless a different job launcher type is explicitly specified in the job configuration
 *   using {@link ConfigurationKeys#JOB_LAUNCHER_TYPE_KEY}.
 *

 *
 *

 *   If the Azkaban job type is not contained in {@link #JOB_TYPES_WITH_AUTOMATIC_TOKEN}, the launcher assumes that
 *   the job does not get authentication tokens from Azkaban and it will negotiate them itself.
 *   See {@link TokenUtils#getHadoopTokens} for more information.
 *

 *
 * @author Yinan Li
 */
public class AzkabanJobLauncher extends AbstractJob implements ApplicationLauncher, JobLauncher {

  private static final Logger LOG = Logger.getLogger(AzkabanJobLauncher.class);

  public static final String GOBBLIN_LOG_LEVEL_KEY = "gobblin.log.levelOverride";
  public static final String GOBBLIN_CUSTOM_JOB_LISTENERS = "gobblin.custom.job.listeners";
  public static final String TEMPLATE_KEY = "gobblin.template.uri";

  private static final String HADOOP_FS_DEFAULT_NAME = "fs.default.name";
  private static final String AZKABAN_LINK_JOBEXEC_URL = "azkaban.link.jobexec.url";
  private static final String AZKABAN_FLOW_EXEC_ID = "azkaban.flow.execid";
  private static final String MAPREDUCE_JOB_CREDENTIALS_BINARY = "mapreduce.job.credentials.binary";

  private static final String AZKABAN_GOBBLIN_JOB_SLA_IN_SECONDS = "gobblin.azkaban.SLAInSeconds";
  private static final String DEFAULT_AZKABAN_GOBBLIN_JOB_SLA_IN_SECONDS = "-1"; // No SLA.

  private static final String HADOOP_JAVA_JOB = "hadoopJava";
  private static final String JAVA_JOB = "java";
  private static final String GOBBLIN_JOB = "gobblin";
  private static final Set<String> JOB_TYPES_WITH_AUTOMATIC_TOKEN =
      Sets.newHashSet(HADOOP_JAVA_JOB, JAVA_JOB, GOBBLIN_JOB);

  private final Closer closer = Closer.create();
  private final JobLauncher jobLauncher;
  private final JobListener jobListener;

  private final Properties props;
  private final ApplicationLauncher applicationLauncher;
  private final long ownAzkabanSla;

  public AzkabanJobLauncher(String jobId, Properties props)
      throws Exception {
      super(jobId, LOG);

    HadoopUtils.addGobblinSite();

    // Configure root metric context
    List<Tag<?>> tags = Lists.newArrayList();
    tags.addAll(Tag.fromMap(AzkabanTags.getAzkabanTags()));
    RootMetricContext.get(tags);

    if (props.containsKey(GOBBLIN_LOG_LEVEL_KEY)) {
      Level logLevel = Level.toLevel(props.getProperty(GOBBLIN_LOG_LEVEL_KEY), Level.INFO);
      Logger.getLogger("org.apache.gobblin").setLevel(logLevel);
    }

    this.props = new Properties();
    this.props.putAll(props);

    // initialize job listeners after properties has been initialized
    this.jobListener = initJobListener();

    // load dynamic configuration and add them to the job properties
    Config propsAsConfig = ConfigUtils.propertiesToConfig(props);
    DynamicConfigGenerator dynamicConfigGenerator =
        DynamicConfigGeneratorFactory.createDynamicConfigGenerator(propsAsConfig);
    Config dynamicConfig = dynamicConfigGenerator.generateDynamicConfig(propsAsConfig);

    // add the dynamic config to the job config
    for (Map.Entry<String, ConfigValue> entry : dynamicConfig.entrySet()) {
      this.props.put(entry.getKey(), entry.getValue().unwrapped().toString());
    }

    Configuration conf = new Configuration();

    String fsUri = conf.get(HADOOP_FS_DEFAULT_NAME);
    if (!Strings.isNullOrEmpty(fsUri)) {
      if (!this.props.containsKey(ConfigurationKeys.FS_URI_KEY)) {
        this.props.setProperty(ConfigurationKeys.FS_URI_KEY, fsUri);
      }
      if (!this.props.containsKey(ConfigurationKeys.STATE_STORE_FS_URI_KEY)) {
        this.props.setProperty(ConfigurationKeys.STATE_STORE_FS_URI_KEY, fsUri);
      }
    }

    // Set the job tracking URL to point to the Azkaban job execution link URL
    this.props
        .setProperty(ConfigurationKeys.JOB_TRACKING_URL_KEY, Strings.nullToEmpty(conf.get(AZKABAN_LINK_JOBEXEC_URL)));

    if (props.containsKey(JOB_TYPE) && JOB_TYPES_WITH_AUTOMATIC_TOKEN.contains(props.getProperty(JOB_TYPE))) {
      // Necessary for compatibility with Azkaban's hadoopJava job type
      // http://azkaban.github.io/azkaban/docs/2.5/#hadoopjava-type
      LOG.info(
          "Job type " + props.getProperty(JOB_TYPE) + " provides Hadoop tokens automatically. Using provided tokens.");
      if (System.getenv(HADOOP_TOKEN_FILE_LOCATION) != null) {
        this.props.setProperty(MAPREDUCE_JOB_CREDENTIALS_BINARY, System.getenv(HADOOP_TOKEN_FILE_LOCATION));
      }
    } else {
      // see javadoc for more information
      LOG.info(String.format("Job type %s does not provide Hadoop tokens. Negotiating Hadoop tokens.",
          props.getProperty(JOB_TYPE)));

      File tokenFile = File.createTempFile("mr-azkaban", ".token");
      TokenUtils.getHadoopTokens(new State(props), Optional.of(tokenFile), new Credentials());

      System.setProperty(HADOOP_TOKEN_FILE_LOCATION, tokenFile.getAbsolutePath());
      System.setProperty(MAPREDUCE_JOB_CREDENTIALS_BINARY, tokenFile.getAbsolutePath());
      this.props.setProperty(MAPREDUCE_JOB_CREDENTIALS_BINARY, tokenFile.getAbsolutePath());
      this.props.setProperty("env." + HADOOP_TOKEN_FILE_LOCATION, tokenFile.getAbsolutePath());
    }

    Properties jobProps = this.props;
    if (jobProps.containsKey(TEMPLATE_KEY)) {
      URI templateUri = new URI(jobProps.getProperty(TEMPLATE_KEY));
      Config resolvedJob = new PackagedTemplatesJobCatalogDecorator().getTemplate(templateUri)
          .getResolvedConfig(ConfigUtils.propertiesToConfig(jobProps));
      jobProps = ConfigUtils.configToProperties(resolvedJob);
    }

    GobblinMetrics.addCustomTagsToProperties(jobProps, tags);

    // If the job launcher type is not specified in the job configuration,
    // override the default to use the MAPREDUCE launcher.
    if (!jobProps.containsKey(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY)) {
      jobProps.setProperty(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY,
          JobLauncherFactory.JobLauncherType.MAPREDUCE.toString());
    }

    this.ownAzkabanSla = Long.parseLong(
        jobProps.getProperty(AZKABAN_GOBBLIN_JOB_SLA_IN_SECONDS, DEFAULT_AZKABAN_GOBBLIN_JOB_SLA_IN_SECONDS));

    List<? extends Tag<?>> metadataTags = Lists.newArrayList();
    //Is the job triggered using Gobblin-as-a-Service? If so, add additional tags needed for tracking
    //the job execution.
    if (jobProps.containsKey(ConfigurationKeys.FLOW_NAME_KEY)) {
      metadataTags = addAdditionalMetadataTags(jobProps);
    }

    // Create a JobLauncher instance depending on the configuration. The same properties object is
    // used for both system and job configuration properties because Azkaban puts configuration
    // properties in the .job file and in the .properties file into the same Properties object.
    this.jobLauncher = this.closer.register(JobLauncherFactory.newJobLauncher(jobProps, jobProps, null, metadataTags));

    // Since Java classes cannot extend multiple classes and Azkaban jobs must extend AbstractJob, we must use composition
    // verses extending ServiceBasedAppLauncher
    this.applicationLauncher =
        this.closer.register(new ServiceBasedAppLauncher(jobProps, "Azkaban-" + UUID.randomUUID()));
  }

  protected JobListener initJobListener() {
    CompositeJobListener compositeJobListener = new CompositeJobListener();
    List<String> listeners = new State(props).getPropAsList(GOBBLIN_CUSTOM_JOB_LISTENERS, EmailNotificationJobListener.class.getSimpleName());
    try {
      for (String listenerAlias: listeners) {
        ClassAliasResolver<JobListener> conditionClassAliasResolver = new ClassAliasResolver<>(JobListener.class);
        compositeJobListener.addJobListener(conditionClassAliasResolver.resolveClass(listenerAlias).newInstance());
      }
    } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {
      throw new IllegalArgumentException(e);
    }

    return compositeJobListener;
  }

  @Override
  public void run()
      throws Exception {
    if (isCurrentTimeInRange()) {
      if (this.ownAzkabanSla > 0) {
        LOG.info("Found gobblin defined SLA: " + this.ownAzkabanSla);
        final ExecutorService service = Executors.newSingleThreadExecutor();
        boolean isCancelled = false;
        Future<Void> future = service.submit(new Callable<Void>() {
          @Override
          public Void call()
              throws Exception {
            runRealJob();
            return null;
          }
        });

        try {
          future.get(this.ownAzkabanSla, TimeUnit.SECONDS);
        } catch (final TimeoutException e) {
          LOG.info("Cancelling job since SLA is reached: " + this.ownAzkabanSla);
          future.cancel(true);
          isCancelled = true;
          this.cancelJob(jobListener);
        } finally {
          service.shutdown();
          if (isCancelled) {
            this.cancel();
            // Need to fail the Azkaban job.
            throw new RuntimeException("Job failed because it reaches SLA limit: " + this.ownAzkabanSla);
          }
        }
      } else {
        runRealJob();
      }
    }
  }

  private void runRealJob()
      throws Exception {
    try {
      start();
      launchJob(jobListener);
    } finally {
      try {
        stop();
      } finally {
        close();
      }
    }
  }

  @Override
  public void cancel()
      throws Exception {
    try {
      stop();
    } finally {
      close();
    }
  }

  @Override
  public void start()
      throws ApplicationException {
    this.applicationLauncher.start();
  }

  @Override
  public void stop()
      throws ApplicationException {
    this.applicationLauncher.stop();
  }

  @Override
  public void launchJob(@Nullable JobListener jobListener)
      throws JobException {
    this.jobLauncher.launchJob(jobListener);
  }

  @Override
  public void cancelJob(@Nullable JobListener jobListener)
      throws JobException {
    this.jobLauncher.cancelJob(jobListener);
  }

  @Override
  public void close()
      throws IOException {
    this.closer.close();
  }

  /**
   * Uses the properties {@link ConfigurationKeys#AZKABAN_EXECUTION_DAYS_LIST},
   * {@link ConfigurationKeys#AZKABAN_EXECUTION_TIME_RANGE}, and
   * {@link TimeRangeChecker#isTimeInRange(List, String, String, DateTime)} to determine if the current job should
   * continue its execution based on the extra scheduled parameters defined in the config.
   *
   * @return true if this job should be launched, false otherwise.
   */
  private boolean isCurrentTimeInRange() {
    Splitter splitter = Splitter.on(",").omitEmptyStrings().trimResults();

    if (this.props.contains(ConfigurationKeys.AZKABAN_EXECUTION_DAYS_LIST) && this.props
        .contains(ConfigurationKeys.AZKABAN_EXECUTION_TIME_RANGE)) {

      List<String> executionTimeRange =
          splitter.splitToList(this.props.getProperty(ConfigurationKeys.AZKABAN_EXECUTION_TIME_RANGE));
      List<String> executionDays =
          splitter.splitToList(this.props.getProperty(ConfigurationKeys.AZKABAN_EXECUTION_DAYS_LIST));
      Preconditions.checkArgument(executionTimeRange.size() == 2,
          "The property " + ConfigurationKeys.AZKABAN_EXECUTION_DAYS_LIST
              + " should be a comma separated list of two entries");

      return TimeRangeChecker.isTimeInRange(executionDays, executionTimeRange.get(0), executionTimeRange.get(1),
          new DateTime(DateTimeZone.forID(ConfigurationKeys.PST_TIMEZONE_NAME)));
    }

    return true;
  }

  /**
   * Add additional properties such as flow.group, flow.name, executionUrl. Useful for tracking
   * job executions on Azkaban triggered by Gobblin-as-a-Service (GaaS).
   * @param jobProps job properties
   * @return a list of tags uniquely identifying a job execution on Azkaban.
   */
  private static List<? extends Tag<?>> addAdditionalMetadataTags(Properties jobProps) {
    List<Tag<?>> metadataTags = Lists.newArrayList();
    String jobExecutionId = jobProps.getProperty(AZKABAN_FLOW_EXEC_ID, "");
    String jobExecutionUrl = jobProps.getProperty(AZKABAN_LINK_JOBEXEC_URL, "");

    metadataTags.add(new Tag<>(TimingEvent.FlowEventConstants.FLOW_GROUP_FIELD,
        jobProps.getProperty(ConfigurationKeys.FLOW_GROUP_KEY, "")));
    metadataTags.add(new Tag<>(TimingEvent.FlowEventConstants.FLOW_NAME_FIELD,
        jobProps.getProperty(ConfigurationKeys.FLOW_NAME_KEY)));

    // use job execution id if flow execution id is not present
    metadataTags.add(new Tag<>(TimingEvent.FlowEventConstants.FLOW_EXECUTION_ID_FIELD,
        jobProps.getProperty(ConfigurationKeys.FLOW_EXECUTION_ID_KEY, jobExecutionId)));

    //Use azkaban.flow.execid as the jobExecutionId
    metadataTags.add(new Tag<>(TimingEvent.FlowEventConstants.JOB_EXECUTION_ID_FIELD, jobExecutionId));

    metadataTags.add(new Tag<>(TimingEvent.FlowEventConstants.JOB_GROUP_FIELD,
        jobProps.getProperty(ConfigurationKeys.JOB_GROUP_KEY, "")));
    metadataTags.add(new Tag<>(TimingEvent.FlowEventConstants.JOB_NAME_FIELD,
        jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY, "")));
    metadataTags.add(new Tag<>(TimingEvent.METADATA_MESSAGE, jobExecutionUrl));

    LOG.debug(String.format("AzkabanJobLauncher.addAdditionalMetadataTags: metadataTags %s", metadataTags));

    return metadataTags;
  }

}


text:
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $blockID := printf "td-cover-block-%d" .Ordinal }}
{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }}
{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }}
{{ $col_id := .Get "color" | default "dark" }}
{{ $image_anchor := .Get "image_anchor" | default "smart" }}
{{ $logo_anchor := .Get "logo_anchor" | default "smart" }}
{{/* Height can be one of: auto, min, med, max, full. */}}
{{ $height := .Get "height" | default "max"  }}
{{ with $promo_image }}
{{ $promo_image_big := (.Fill (printf "1920x1080 %s" $image_anchor)) }}
{{ $promo_image_small := (.Fill (printf "960x540 %s" $image_anchor)) }}
<link rel="preload" as="image" href="{{ $promo_image_small.RelPermalink }}" media="(max-width: 1200px)">
<link rel="preload" as="image" href="{{ $promo_image_big.RelPermalink }}" media="(min-width: 1200px)">

{{ end }}

          {{ with .Get "title" }}
{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}{{ end }}{{ $title | html }}
{{ end }}
          {{ with .Get "subtitle" }}
{{ . | html }}
{{ end }}

            {{ .Inner | markdownify}}


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _default;

function _default() {
  return function ({
    addUtilities,
    variants
  }) {
    addUtilities({
      '.static': {
        position: 'static'
      },
      '.fixed': {
        position: 'fixed'
      },
      '.absolute': {
        position: 'absolute'
      },
      '.relative': {
        position: 'relative'
      },
      '.sticky': {
        position: 'sticky'
      }
    }, variants('position'));
  };
}


text:
//
//  WHC_GestureUnlockScreenVC.h
//  WHC_GestureUnlockScreenDemo
//
//  Created by 吴海超 on 15/6/18.
//  Copyright (c) 2015年 吴海超. All rights reserved.
//

/*
 *  qq:712641411
 *  iOSqq群:302157745
 *  gitHub:https://github.com/netyouli
 *  csdn:http://blog.csdn.net/windwhc/article/category/3117381
 */

#import <UIKit/UIKit.h>
#import "WHC_PlateView.h"

@interface WHC_GestureUnlockScreenVC : UIViewController

@property (nonatomic , assign)WHCGestureUnlockType unlockType;
//! 设置背景图片
- (void)setBackgroudImage:(UIImage *)image;
//! 设置屏幕锁(默认当前VC)
+ (void)setUnlockScreen;
//! 设置屏幕锁(自定义当前VC)
+ (void)setUnlockScreenWithSelf:(UIViewController *)sf;
//! 设置屏幕锁(自定义类型默认当前VC)
+ (void)setUnlockScreenWithType:(WHCGestureUnlockType)unlockType;
//! 设置屏幕锁(自定义类型和VC)
+ (void)setUnlockScreenWithType:(WHCGestureUnlockType)unlockType withSelf:(UIViewController *)sf;
//! 修改解锁密码(自定义当前VC) 可以修改返回yes 否则no
+ (BOOL)modifyUnlockPasswrodWithVC:(UIViewController *)vc;
//! 删除手势密码(自定义当前VC) 可以删除返回yes 否则no
+ (BOOL)removeGesturePasswordWithVC:(UIViewController *)vc;

//!强制删除手势密码,不需要用户输入现有手势密码
+ (void)removeGesturePassword;

+ (WHCGestureUnlockType)readDefaultUnlockType;

@end


text:
int main(int argc, char *argv[])
{
    //Для сохранения настроек проргаммы необходимо внести
    //ее в ереестр
    QCoreApplication::setOrganizationName("Verloka");
    QCoreApplication::setOrganizationDomain("verloka.github.io");
    QCoreApplication::setApplicationName("043.QT_AppSettings");

    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}


text:
class CefJSDialogHandlerCppToC
    : public CefCppToC<CefJSDialogHandlerCppToC, CefJSDialogHandler,
        cef_jsdialog_handler_t> {
 public:
  explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls);
  virtual ~CefJSDialogHandlerCppToC() {}
};

#endif  // USING_CEF_SHARED
#endif  // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_


text:
adsApp.factory('filter', function () {
    var params = {
        startPage: 1,
        pageSize: 10
    };

    function getParams() {
        return params;
    }

    function filterByCategory(category) {
        if (category == null) {
            params.categoryId = null;
            params.startPage = 1;
        } else {
            params.categoryId = category.id;
            params.startPage = 1;
        }
    }

    function filterByTown(town) {
        if (town == null) {
            params.townId = null;
            params.startPage = 1;
        } else {
            params.townId = town.id;
            params.startPage = 1;
        }
    }

    function setPageParams() {
        // TODO;
    }

    return {
        getParams: getParams,
        setPageParams: setPageParams,
        filterByCategory: filterByCategory,
        filterByTown: filterByTown
    };
});


text:
<!DOCTYPE html>

        <title>anonymous animals from google docs</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">


text:
/*
	Name  : Tasdik Rahman
	Question  : Tutorial 1, Program 1:

	Apply an Object oriented paradigm (hint:classes) using java to develop a stand
	alone application without a method to print "I am enjoying my program in JAVA and I swear I
	will put all my sincere efforts to grow each day technically" Level: Basic

*/

public class tut1_q1{
	public static void main(String[] args){
		System.out.println("I am enjoying my program in JAVA and I swear I will put all my sincere efforts\n"+
							" to grow each day technically") ;
	}
}


text:
namespace Microsoft.Azure.Management.Compute
{
    using System;
    using System.Collections.Generic;
    using System.Net.Http;
    using System.Threading;
    using System.Threading.Tasks;
    using Newtonsoft.Json;
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;

    /// <summary>
    /// Composite Swagger for Compute Client
    /// </summary>
    public partial interface IComputeManagementClient : IDisposable
    {
        /// <summary>
        /// The base URI of the service.
        /// </summary>
        Uri BaseUri { get; set; }

        /// <summary>
        /// Gets or sets json serialization settings.
        /// </summary>
        JsonSerializerSettings SerializationSettings { get; }

        /// <summary>
        /// Gets or sets json deserialization settings.
        /// </summary>
        JsonSerializerSettings DeserializationSettings { get; }

        /// <summary>
        /// Gets Azure subscription credentials.
        /// </summary>
        ServiceClientCredentials Credentials { get; }

        /// <summary>
        /// subscription credentials which uniquely identify Microsoft Azure
        /// subscription. The subscription ID forms part of the URI for every
        /// service call.
        /// </summary>
        string SubscriptionId { get; set; }

        /// <summary>
        /// Gets or sets the preferred language for the response.
        /// </summary>
        string AcceptLanguage { get; set; }

        /// <summary>
        /// Gets or sets the retry timeout in seconds for Long Running
        /// Operations. Default value is 30.
        /// </summary>
        int? LongRunningOperationRetryTimeout { get; set; }

        /// <summary>
        /// When set to true a unique x-ms-client-request-id value is
        /// generated and included in each request. Default is true.
        /// </summary>
        bool? GenerateClientRequestId { get; set; }

        /// <summary>
        /// Gets the IAvailabilitySetsOperations.
        /// </summary>
        IAvailabilitySetsOperations AvailabilitySets { get; }

        /// <summary>
        /// Gets the IVirtualMachineExtensionImagesOperations.
        /// </summary>
        IVirtualMachineExtensionImagesOperations VirtualMachineExtensionImages { get; }

        /// <summary>
        /// Gets the IVirtualMachineExtensionsOperations.
        /// </summary>
        IVirtualMachineExtensionsOperations VirtualMachineExtensions { get; }

        /// <summary>
        /// Gets the IVirtualMachineImagesOperations.
        /// </summary>
        IVirtualMachineImagesOperations VirtualMachineImages { get; }

        /// <summary>
        /// Gets the IUsageOperations.
        /// </summary>
        IUsageOperations Usage { get; }

        /// <summary>
        /// Gets the IVirtualMachineSizesOperations.
        /// </summary>
        IVirtualMachineSizesOperations VirtualMachineSizes { get; }

        /// <summary>
        /// Gets the IVirtualMachinesOperations.
        /// </summary>
        IVirtualMachinesOperations VirtualMachines { get; }

        /// <summary>
        /// Gets the IVirtualMachineScaleSetsOperations.
        /// </summary>
        IVirtualMachineScaleSetsOperations VirtualMachineScaleSets { get; }

        /// <summary>
        /// Gets the IVirtualMachineScaleSetVMsOperations.
        /// </summary>
        IVirtualMachineScaleSetVMsOperations VirtualMachineScaleSetVMs { get; }

        /// <summary>
        /// Gets the IContainerServiceOperations.
        /// </summary>
        IContainerServiceOperations ContainerService { get; }

    }
}


text:
import { Authentication, Client, WeakClient } from 'zetapush-js';

const weak = new WeakClient({
  sandboxId: ''
});

weak.onConnectionEstablished(() => {
  // onConnectionEstablished;
});
weak.connect();

const client = new Client({
  apiUrl: '',
  sandboxId: '',
  authentication: () => Authentication.simple({
    login: 'login',
    password: 'password'
  })
});
client.onConnectionEstablished(() => {
  // onConnectionEstablished;
});
client.connect();


text:
//
//  P2PManager.h
//  AiertApp
//
//  Created by Peter Lee on 14/10/31.
//  Copyright (c) 2014年 爱尔特电子有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

#define TURN_STOP       0
#define TURN_UP         1
#define TURN_DOWN       2
#define TURN_LEFT       3
#define TURN_RIGHT      4

#define TURN_LEFT_RIGHT 5
#define TURN_UP_DOWN    6

#define DEFAULT_SETTING_VALUE 128

typedef NS_ENUM(NSUInteger, CONNECT_TYPE){

    CONNECT_P2P_TYPE = 0,   //The p2p connect type
    CONNECT_RELAY_TYPE,     //The relay connect type
    CONNECT_LAN_TYPE        //The lan connect type
};

typedef NS_ENUM(NSUInteger, CAMERA_TURN_TYPE){

    CAMERA_TURN_TYPE_STOP = 0,
    CAMERA_TURN_TYPE_UP = 1,
    CAMERA_TURN_TYPE_DOWN = 2,
    CAMERA_TURN_TYPE_LEFT = 3,
    CAMERA_TURN_TYPE_RIGHT = 4,
    CAMERA_TURN_TYPE_UP_DOWN = 5,
    CAMERA_TURN_TYPE_LEFT_RIGHT = 6
};

typedef NS_ENUM(NSUInteger, CAMERA_PLAY_TYPE){

    CAMERA_PLAY_TYPE_QVGA = 0,
    CAMERA_PLAY_TYPE_VGA = 1,
    CAMERA_PLAY_TYPE_720 = 2
};

@protocol P2PManagerDelegate;

@interface P2PManager : NSObject

@property (weak, nonatomic)  id<P2PManagerDelegate> delegate;

+ (P2PManager *)sharedInstance;

- (instancetype)initWithDelegate:(id<P2PManagerDelegate>)delegate;
- (void)removeDelegate;

- (dispatch_queue_t)p2pVideoPlayManagerQueue;
- (void *)p2pVideoPlayManagerQueueTag;

/**
 *  用设备id连接进行网络连接
 *
 *  @param deviceID 设备ID
 */
- (void)startWithSID:(int)SID;
- (void)checkConnectTypeWithDeviceID:(NSString *)deviceID;
- (void)startIpcamStream:(int)avindex withPlayType:(CAMERA_PLAY_TYPE)playType;
- (void)start:(NSString *)UID;

- (void)closeConnection;

- (void)setMirrorUpDown;
- (void)setMirrorLeftRight;
- (void)stopTurnCamera;
- (void)startTurnCameraWithSpeed:(unsigned char)speed type:(CAMERA_TURN_TYPE)cameraTurnType;
- (void)turnWithSpeed:(unsigned char)speed type:(CAMERA_TURN_TYPE)cameraTurnType;

- (void)setCameraBrightness:(NSInteger)Brightness;
- (void)setCameraContrast:(NSInteger)Contrast;
- (void)setCameraSaturation:(NSInteger)Saturation;
- (void)setCameraDefauleValue;

- (void)setAudioStart:(BOOL)start;

@end

@protocol P2PManagerDelegate <NSObject>

@optional

- (void)p2pManager:(P2PManager *)p2pManager didConnectDeviceID:(NSString *)deviceID withType:(CONNECT_TYPE)connectType ip:(NSString *)ip port:(NSUInteger)port sid:(int)sid;
- (void)p2pManager:(P2PManager *)p2pManager didFailedConnectDeviceID:(NSString *)deviceID;
- (void)p2pManager:(P2PManager *)p2pManager didFailedStartPlayWithDeviceID:(NSString *)deviceID;
- (void)p2pManager:(P2PManager *)p2pManager didReadAudioData:(NSData *)data;
- (void)p2pManager:(P2PManager *)p2pManager didReadVideoData:(NSData *)data;
- (void)p2pManager:(P2PManager *)p2pManager didReadRawData:(NSData *)data tag:(NSInteger)tag;
- (void)p2pManager:(P2PManager *)p2pManager didReadAudioResponse:(NSInteger)code;
- (void)p2pManager:(P2PManager *)p2pManager didReadMicResponse:(NSInteger)code;

- (void)p2pManager:(P2PManager *)p2pManager didStartTryToPlayerWithDeviceID:(NSString *)deviceID;
- (void)p2pManager:(P2PManager *)p2pManager didStartPlayWithDEviceID:(NSString *)deviceID;
- (void)p2pManager:(P2PManager *)p2pManager didStopPlayWithDEviceID:(NSString *)deviceID;

- (void)p2pManager:(P2PManager *)p2pManager didPlayTimeoutWithEviceID:(NSString *)deviceID;

- (void)didReadDataTimeOut;
- (void)didDisconnect;
- (void)didConnected;
- (void)didLoginSuccess;

@end


text:
var host = location.hostname;
var baze = [ 'kontniplans', 'budzets', 'kontniplan-staris' ];
var kontniplans = false;
var kontniplan_staris = false;
var socket = io.connect(host);
var disabled = 'disabled';

socket.on('message', function(data){
    check();
    $('.data-service-info-renderer').append(setup.success(data));
});

$(document).ready(function () {
    check();
});

function check(){
    // pobrisi ako je bilo sta ispisano
    $('.data-status-renderer').empty();

    // provjeri
    baze.forEach(function(x){
        $.getJSON("/data/objs/counters/" + x)
         .done(function(data) { done(data, x) })
         .fail(function(data) { fail(data, x) })
         .always(function(data) { always(data, x) });
    });
}

// izvris kada kolekcija postoji
function done(data, x){
    switch(x){
        case("kontniplans"):
            kontniplans = true;

        break;
        case("kontniplan-staris"):
            kontniplan_staris = true;

        break;
        case("budzets"):
            (kontniplans && kontniplan_staris)? (disabled = 'enabled', removeLoading()) : disabled = 'disabled';
            $(".data-status-renderer").append(setup.button(data, x, disabled, true));
            $("#budzets").izgradi();

        break;
    }
    $(".data-status-renderer").append(setup.consistent(data, x));
    setup.removers(data, x);
}

// izvrsi kada kolekcija ne postoji
function fail(data, x){
    // provjeri da li obe varijante true
    switch(x){
        case("budzets"):
            (kontniplans && kontniplan_staris)? disabled = 'enabled' : disabled = 'disabled';
            $(".data-status-renderer").append(setup.button(data, x, disabled, true));
            $("#" + x).izgradi();

            if(disabled == 'enabled')
                removeLoading();
        break;
        default:
             $(".data-status-renderer").append(setup.button(data, x, ''));
             $("#" + x).izgradi();
        break;
    }
}

function always(data, x){
    // ako su obe verzije true, omoguci unos budzeta
    if(kontniplans && kontniplan_staris)
        removeLoading();
}

function removeLoading(){
    $('#budzets').removeClass('disabled');
    $('#date').removeAttr('disabled');

}


text:
package com.coolweather.app.util;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;

public class HttpUtil {

	public static  void sendHttpRequest(final String address,final HttpCallbackListener listener) {
		  new Thread(new Runnable() {
			@Override
			public void run() {
				// TODO Auto-generated method stub
				HttpsURLConnection connection  = null;
				try {
					URL url = new URL(address);
					connection = (HttpsURLConnection) url.openConnection();
					connection.setRequestMethod("GET");
					connection.setConnectTimeout(8000);
					connection.setReadTimeout(8000);
					InputStream  in = connection.getInputStream();
					BufferedReader reader = new BufferedReader(new InputStreamReader(in));
					StringBuilder response = new StringBuilder();
					String line;
					while ((line=reader.readLine())!=null) {
						response.append(line);
					}

					if (listener !=null) {
						//»Øµ÷onFinish()·½·¨
						listener.onFinish(response.toString());
					}
				} catch (Exception e) {
					// TODO Auto-generated catch block
//					e.printStackTrace();
					//»Øµ÷onError()·½·¨
					if (listener!=null) {
						listener.onError(e);
					}
				}finally{
					if (connection!=null) {
						connection.disconnect();
					}
				}
			}
		}).start();
	}

}


text:
using System.Web;
using System.Web.Routing;
using AttributeRouting.Constraints;

namespace AttributeRouting.Web.Constraints
{
    public class RangeRouteConstraint : RangeRouteConstraintBase, IRouteConstraint
    {
        public RangeRouteConstraint(string min, string max)
        {
            MinConstraint = new MinRouteConstraint(min);
            MaxConstraint = new MaxRouteConstraint(max);
        }

        public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
        {
            return IsMatch(parameterName, values);
        }
    }
}


text:
// Generated from: ProtoGen/descriptor.proto
namespace google.protobuf
{
  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"FileDescriptorSet")]
  public partial class FileDescriptorSet : global::ProtoBuf.IExtensible
  {
    public FileDescriptorSet() {}

    private readonly global::System.Collections.Generic.List<google.protobuf.FileDescriptorProto> _file = new global::System.Collections.Generic.List<google.protobuf.FileDescriptorProto>();
    [global::ProtoBuf.ProtoMember(1, Name=@"file", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.FileDescriptorProto> file
    {
      get { return _file; }
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"FileDescriptorProto")]
  public partial class FileDescriptorProto : global::ProtoBuf.IExtensible
  {
    public FileDescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }

    private string _package = "";
    [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"package", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string package
    {
      get { return _package; }
      set { _package = value; }
    }
    private readonly global::System.Collections.Generic.List<string> _dependency = new global::System.Collections.Generic.List<string>();
    [global::ProtoBuf.ProtoMember(3, Name=@"dependency", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<string> dependency
    {
      get { return _dependency; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.DescriptorProto> _message_type = new global::System.Collections.Generic.List<google.protobuf.DescriptorProto>();
    [global::ProtoBuf.ProtoMember(4, Name=@"message_type", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.DescriptorProto> message_type
    {
      get { return _message_type; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.EnumDescriptorProto> _enum_type = new global::System.Collections.Generic.List<google.protobuf.EnumDescriptorProto>();
    [global::ProtoBuf.ProtoMember(5, Name=@"enum_type", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.EnumDescriptorProto> enum_type
    {
      get { return _enum_type; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.ServiceDescriptorProto> _service = new global::System.Collections.Generic.List<google.protobuf.ServiceDescriptorProto>();
    [global::ProtoBuf.ProtoMember(6, Name=@"service", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.ServiceDescriptorProto> service
    {
      get { return _service; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto> _extension = new global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto>();
    [global::ProtoBuf.ProtoMember(7, Name=@"extension", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto> extension
    {
      get { return _extension; }
    }

    private google.protobuf.FileOptions _options = null;
    [global::ProtoBuf.ProtoMember(8, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.FileOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"DescriptorProto")]
  public partial class DescriptorProto : global::ProtoBuf.IExtensible
  {
    public DescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }
    private readonly global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto> _field = new global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto>();
    [global::ProtoBuf.ProtoMember(2, Name=@"field", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto> field
    {
      get { return _field; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto> _extension = new global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto>();
    [global::ProtoBuf.ProtoMember(6, Name=@"extension", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.FieldDescriptorProto> extension
    {
      get { return _extension; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.DescriptorProto> _nested_type = new global::System.Collections.Generic.List<google.protobuf.DescriptorProto>();
    [global::ProtoBuf.ProtoMember(3, Name=@"nested_type", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.DescriptorProto> nested_type
    {
      get { return _nested_type; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.EnumDescriptorProto> _enum_type = new global::System.Collections.Generic.List<google.protobuf.EnumDescriptorProto>();
    [global::ProtoBuf.ProtoMember(4, Name=@"enum_type", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.EnumDescriptorProto> enum_type
    {
      get { return _enum_type; }
    }

    private readonly global::System.Collections.Generic.List<google.protobuf.DescriptorProto.ExtensionRange> _extension_range = new global::System.Collections.Generic.List<google.protobuf.DescriptorProto.ExtensionRange>();
    [global::ProtoBuf.ProtoMember(5, Name=@"extension_range", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.DescriptorProto.ExtensionRange> extension_range
    {
      get { return _extension_range; }
    }

    private google.protobuf.MessageOptions _options = null;
    [global::ProtoBuf.ProtoMember(7, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.MessageOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"ExtensionRange")]
  public partial class ExtensionRange : global::ProtoBuf.IExtensible
  {
    public ExtensionRange() {}

    private int _start = default(int);
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"start", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(int))]
    public int start
    {
      get { return _start; }
      set { _start = value; }
    }

    private int _end = default(int);
    [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"end", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(int))]
    public int end
    {
      get { return _end; }
      set { _end = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"FieldDescriptorProto")]
  public partial class FieldDescriptorProto : global::ProtoBuf.IExtensible
  {
    public FieldDescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }

    private int _number = default(int);
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"number", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(int))]
    public int number
    {
      get { return _number; }
      set { _number = value; }
    }

    private google.protobuf.FieldDescriptorProto.Label _label = google.protobuf.FieldDescriptorProto.Label.LABEL_OPTIONAL;
    [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"label", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(google.protobuf.FieldDescriptorProto.Label.LABEL_OPTIONAL)]
    public google.protobuf.FieldDescriptorProto.Label label
    {
      get { return _label; }
      set { _label = value; }
    }

    private google.protobuf.FieldDescriptorProto.Type _type = google.protobuf.FieldDescriptorProto.Type.TYPE_DOUBLE;
    [global::ProtoBuf.ProtoMember(5, IsRequired = false, Name=@"type", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(google.protobuf.FieldDescriptorProto.Type.TYPE_DOUBLE)]
    public google.protobuf.FieldDescriptorProto.Type type
    {
      get { return _type; }
      set { _type = value; }
    }

    private string _type_name = "";
    [global::ProtoBuf.ProtoMember(6, IsRequired = false, Name=@"type_name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string type_name
    {
      get { return _type_name; }
      set { _type_name = value; }
    }

    private string _extendee = "";
    [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"extendee", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string extendee
    {
      get { return _extendee; }
      set { _extendee = value; }
    }

    private string _default_value = "";
    [global::ProtoBuf.ProtoMember(7, IsRequired = false, Name=@"default_value", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string default_value
    {
      get { return _default_value; }
      set { _default_value = value; }
    }

    private google.protobuf.FieldOptions _options = null;
    [global::ProtoBuf.ProtoMember(8, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.FieldOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
    [global::ProtoBuf.ProtoContract(Name=@"Type")]
    public enum Type
    {

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_DOUBLE", Value=1)]
      TYPE_DOUBLE = 1,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_FLOAT", Value=2)]
      TYPE_FLOAT = 2,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_INT64", Value=3)]
      TYPE_INT64 = 3,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_UINT64", Value=4)]
      TYPE_UINT64 = 4,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_INT32", Value=5)]
      TYPE_INT32 = 5,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_FIXED64", Value=6)]
      TYPE_FIXED64 = 6,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_FIXED32", Value=7)]
      TYPE_FIXED32 = 7,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_BOOL", Value=8)]
      TYPE_BOOL = 8,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_STRING", Value=9)]
      TYPE_STRING = 9,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_GROUP", Value=10)]
      TYPE_GROUP = 10,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_MESSAGE", Value=11)]
      TYPE_MESSAGE = 11,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_BYTES", Value=12)]
      TYPE_BYTES = 12,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_UINT32", Value=13)]
      TYPE_UINT32 = 13,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_ENUM", Value=14)]
      TYPE_ENUM = 14,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_SFIXED32", Value=15)]
      TYPE_SFIXED32 = 15,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_SFIXED64", Value=16)]
      TYPE_SFIXED64 = 16,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_SINT32", Value=17)]
      TYPE_SINT32 = 17,

      [global::ProtoBuf.ProtoEnum(Name=@"TYPE_SINT64", Value=18)]
      TYPE_SINT64 = 18
    }

    [global::ProtoBuf.ProtoContract(Name=@"Label")]
    public enum Label
    {

      [global::ProtoBuf.ProtoEnum(Name=@"LABEL_OPTIONAL", Value=1)]
      LABEL_OPTIONAL = 1,

      [global::ProtoBuf.ProtoEnum(Name=@"LABEL_REQUIRED", Value=2)]
      LABEL_REQUIRED = 2,

      [global::ProtoBuf.ProtoEnum(Name=@"LABEL_REPEATED", Value=3)]
      LABEL_REPEATED = 3
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"EnumDescriptorProto")]
  public partial class EnumDescriptorProto : global::ProtoBuf.IExtensible
  {
    public EnumDescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }
    private readonly global::System.Collections.Generic.List<google.protobuf.EnumValueDescriptorProto> _value = new global::System.Collections.Generic.List<google.protobuf.EnumValueDescriptorProto>();
    [global::ProtoBuf.ProtoMember(2, Name=@"value", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.EnumValueDescriptorProto> value
    {
      get { return _value; }
    }

    private google.protobuf.EnumOptions _options = null;
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.EnumOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"EnumValueDescriptorProto")]
  public partial class EnumValueDescriptorProto : global::ProtoBuf.IExtensible
  {
    public EnumValueDescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }

    private int _number = default(int);
    [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"number", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(int))]
    public int number
    {
      get { return _number; }
      set { _number = value; }
    }

    private google.protobuf.EnumValueOptions _options = null;
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.EnumValueOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"ServiceDescriptorProto")]
  public partial class ServiceDescriptorProto : global::ProtoBuf.IExtensible
  {
    public ServiceDescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }
    private readonly global::System.Collections.Generic.List<google.protobuf.MethodDescriptorProto> _method = new global::System.Collections.Generic.List<google.protobuf.MethodDescriptorProto>();
    [global::ProtoBuf.ProtoMember(2, Name=@"method", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.MethodDescriptorProto> method
    {
      get { return _method; }
    }

    private google.protobuf.ServiceOptions _options = null;
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.ServiceOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"MethodDescriptorProto")]
  public partial class MethodDescriptorProto : global::ProtoBuf.IExtensible
  {
    public MethodDescriptorProto() {}

    private string _name = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string name
    {
      get { return _name; }
      set { _name = value; }
    }

    private string _input_type = "";
    [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"input_type", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string input_type
    {
      get { return _input_type; }
      set { _input_type = value; }
    }

    private string _output_type = "";
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"output_type", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string output_type
    {
      get { return _output_type; }
      set { _output_type = value; }
    }

    private google.protobuf.MethodOptions _options = null;
    [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"options", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public google.protobuf.MethodOptions options
    {
      get { return _options; }
      set { _options = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"FileOptions")]
  public partial class FileOptions : global::ProtoBuf.IExtensible
  {
    public FileOptions() {}

    private string _java_package = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"java_package", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string java_package
    {
      get { return _java_package; }
      set { _java_package = value; }
    }

    private string _java_outer_classname = "";
    [global::ProtoBuf.ProtoMember(8, IsRequired = false, Name=@"java_outer_classname", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string java_outer_classname
    {
      get { return _java_outer_classname; }
      set { _java_outer_classname = value; }
    }

    private bool _java_multiple_files = (bool)false;
    [global::ProtoBuf.ProtoMember(10, IsRequired = false, Name=@"java_multiple_files", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue((bool)false)]
    public bool java_multiple_files
    {
      get { return _java_multiple_files; }
      set { _java_multiple_files = value; }
    }

    private google.protobuf.FileOptions.OptimizeMode _optimize_for = google.protobuf.FileOptions.OptimizeMode.SPEED;
    [global::ProtoBuf.ProtoMember(9, IsRequired = false, Name=@"optimize_for", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(google.protobuf.FileOptions.OptimizeMode.SPEED)]
    public google.protobuf.FileOptions.OptimizeMode optimize_for
    {
      get { return _optimize_for; }
      set { _optimize_for = value; }
    }
    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    private string _namespace = "";
    [global::ProtoBuf.ProtoMember(52500, IsRequired = false, Name=@"namespace", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string @namespace
    {
      get { return _namespace; }
      set { _namespace = value; }
    }
    [global::ProtoBuf.ProtoContract(Name=@"OptimizeMode")]
    public enum OptimizeMode
    {

      [global::ProtoBuf.ProtoEnum(Name=@"SPEED", Value=1)]
      SPEED = 1,

      [global::ProtoBuf.ProtoEnum(Name=@"CODE_SIZE", Value=2)]
      CODE_SIZE = 2
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"MessageOptions")]
  public partial class MessageOptions : global::ProtoBuf.IExtensible
  {
    public MessageOptions() {}

    private bool _message_set_wire_format = (bool)false;
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"message_set_wire_format", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue((bool)false)]
    public bool message_set_wire_format
    {
      get { return _message_set_wire_format; }
      set { _message_set_wire_format = value; }
    }
    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"FieldOptions")]
  public partial class FieldOptions : global::ProtoBuf.IExtensible
  {
    public FieldOptions() {}

    private google.protobuf.FieldOptions.CType _ctype = google.protobuf.FieldOptions.CType.CORD;
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"ctype", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(google.protobuf.FieldOptions.CType.CORD)]
    public google.protobuf.FieldOptions.CType ctype
    {
      get { return _ctype; }
      set { _ctype = value; }
    }

    private bool _packed = default(bool);
    [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"packed", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(default(bool))]
    public bool packed
    {
      get { return _packed; }
      set { _packed = value; }
    }

    private bool _deprecated = (bool)false;
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"deprecated", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue((bool)false)]
    public bool deprecated
    {
      get { return _deprecated; }
      set { _deprecated = value; }
    }

    private string _experimental_map_key = "";
    [global::ProtoBuf.ProtoMember(9, IsRequired = false, Name=@"experimental_map_key", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string experimental_map_key
    {
      get { return _experimental_map_key; }
      set { _experimental_map_key = value; }
    }
    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    [global::ProtoBuf.ProtoContract(Name=@"CType")]
    public enum CType
    {

      [global::ProtoBuf.ProtoEnum(Name=@"CORD", Value=1)]
      CORD = 1,

      [global::ProtoBuf.ProtoEnum(Name=@"STRING_PIECE", Value=2)]
      STRING_PIECE = 2
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"EnumOptions")]
  public partial class EnumOptions : global::ProtoBuf.IExtensible
  {
    public EnumOptions() {}

    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"EnumValueOptions")]
  public partial class EnumValueOptions : global::ProtoBuf.IExtensible
  {
    public EnumValueOptions() {}

    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"ServiceOptions")]
  public partial class ServiceOptions : global::ProtoBuf.IExtensible
  {
    public ServiceOptions() {}

    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"MethodOptions")]
  public partial class MethodOptions : global::ProtoBuf.IExtensible
  {
    public MethodOptions() {}

    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> _uninterpreted_option = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption>();
    [global::ProtoBuf.ProtoMember(999, Name=@"uninterpreted_option", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption> uninterpreted_option
    {
      get { return _uninterpreted_option; }
    }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"UninterpretedOption")]
  public partial class UninterpretedOption : global::ProtoBuf.IExtensible
  {
    public UninterpretedOption() {}

    private readonly global::System.Collections.Generic.List<google.protobuf.UninterpretedOption.NamePart> _name = new global::System.Collections.Generic.List<google.protobuf.UninterpretedOption.NamePart>();
    [global::ProtoBuf.ProtoMember(2, Name=@"name", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public global::System.Collections.Generic.List<google.protobuf.UninterpretedOption.NamePart> name
    {
      get { return _name; }
    }

    private string _identifier_value = "";
    [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"identifier_value", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string identifier_value
    {
      get { return _identifier_value; }
      set { _identifier_value = value; }
    }

    private ulong _positive_int_value = default(ulong);
    [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"positive_int_value", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(ulong))]
    public ulong positive_int_value
    {
      get { return _positive_int_value; }
      set { _positive_int_value = value; }
    }

    private long _negative_int_value = default(long);
    [global::ProtoBuf.ProtoMember(5, IsRequired = false, Name=@"negative_int_value", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(long))]
    public long negative_int_value
    {
      get { return _negative_int_value; }
      set { _negative_int_value = value; }
    }

    private double _double_value = default(double);
    [global::ProtoBuf.ProtoMember(6, IsRequired = false, Name=@"double_value", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    [global::System.ComponentModel.DefaultValue(default(double))]
    public double double_value
    {
      get { return _double_value; }
      set { _double_value = value; }
    }

    private byte[] _string_value = null;
    [global::ProtoBuf.ProtoMember(7, IsRequired = false, Name=@"string_value", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue(null)]
    public byte[] string_value
    {
      get { return _string_value; }
      set { _string_value = value; }
    }
  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"NamePart")]
  public partial class NamePart : global::ProtoBuf.IExtensible
  {
    public NamePart() {}

    private string _name_part;
    [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"name_part", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public string name_part
    {
      get { return _name_part; }
      set { _name_part = value; }
    }
    private bool _is_extension;
    [global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"is_extension", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public bool is_extension
    {
      get { return _is_extension; }
      set { _is_extension = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

}
// Generated from: protobuf-net.proto
// Note: requires additional types generated from: descriptor.proto
namespace protobuf_net
{
}


text:
Gatekeeper
==========

Gatekeeper is a flexible authorization library in PHP... With attitude. It's designed for complex systems with support for **custom policies** - Gatekeeper lets you mix and match between different models of permissions and access control.

This is an *authorization* package - use it alongside whatever authentication model, package or function you like. Authoriazation is about determining if a user is allowed to do this or that, *not* if the user is who they claim to be. This separation is intentional; whether you've got OAuth 2.0 sessions or good ol' passwords, Gatekeeper doesn't mind.

*Please understand that Gatekeeper has flexibility and extendibility in mind*. It may be a tad more difficult to get the hang of, compared to other packages and their shortcuts. That's deliberate; Gatekeeper makes no assumptions and doesn't restrict itself, so you'll need to tell it exactly what to do. We provide as little automagic as possible.

## Example

Vanilla PHP:

```php
$gatekeeper = new Gatekeeper;

// set policies; start with an ACL list in a JSON file
$gatekeeper->pushPolicy(
  new RoleBasedACLPolicy(new JsonRoleBasedACLStore('permissions/acl.json'))
);

// set a ban list policy using a custom class that implements the BanListStore interface
$gatekeeper->pushPolicy(new BanListPolicy(new YourCustomBanListStore()));

// set a custom policy for your own application
$gatekeeper->pushPolicy(new YourCustomApplicationPolicy());

// check permissions; do this right before executing a sensitive operation.
// will throw an exception if the user is not given access.
$gatekeeper->iAm($user)->mayI('create', 'post')->please();
```

## Configuring

Install using Composer.

Initialize Gatekeeper in PHP simply by doing `new Gatekeeper`. Ideally every point in your app that uses Gatekeeper should refer to the same instance, so you only need to do `iAm` once. The Laravel facade already does this by default.

Your application's user model should implement the GatekeeperUser interface. It currently has no required methods; it's just to tell Gatekeeper that this is a representation of a user.

Currently, Gatekeeper will prioritize denials; it goes through all policies and will allow access if any policies say "allow", but a single "deny" will cause Gatekeeper to refuse. This will be customizable in the future.

## Checking Permissions

First, Gatekeeper needs to know who the user is. For instance, in Laravel 4:

```php
$gatekeeper = new Gatekeeper;
$gatekeeper->iAm(Auth::user());
```

If you don't use `iAm`, or you give it null, it assumes the user is a guest.

Now it's just a matter of asking Gatekeeper nicely. These methods are chainable, so you can do this:

```php
$gatekeeper->iAm(Auth::user())->mayI('create', 'post')->please();
```

(Blame PHP for not letting us use a question mark as a function name.)

This goes through all the policies you have in place, and checks if the current `$user` is allowed to `$verb` (create) a `$noun` (post). If the user is granted access, the code continues normally; otherwise, a GatekeeperException is thrown.

If you need to debug a Gatekeeper check, you can either use `getReport` or take it out of the exception:

```php
try {
  $gatekeeper->iAm($user)->andMayI('create', 'post')->please();
} catch (GatekeeperException $e) {
  echo($e->getReport());
  exit;
}
echo $gatekeeper->getReport();
```

`andMayI` is an alias of `mayI`.

You can also use `canI` instead of `mayI` to get a boolean true/false instead of throwing an exception, but that makes Gatekeeper sad.

### Implicit iAm

If you're tired of telling Gatekeeper `iAm` all the time, you can tell Gatekeeper where to get the user identity by default:

```php
$gatekeeper->setImplicitIdentity(function(){
  return Auth::user(); // laravel's auth facade
});
```

If the return value is an instance of GatekeeperUser, it will use this user for checks. If a user has already been explicitly set with `iAm`, implicit identity checks will *not* happen.

## Checking Resource Permissions

The same syntax also applies for protecting a **Resource**. Resources are models, entities, or otherwise _some class_ that you want to protect with Gatekeeper - such as a message, social media post, or photo album. The resource acts as the $noun:

```php
$gatekeeper->mayI('update', $post)->please();
```

And otherwise acts the same way.

Protected resources should implement the `ProtectedResource` interface. This interface requires two methods: `getResourceName`, which should return a string for matching in permission policies, and `checkOwnership(GatekeeperUser $user)`, which should return true if $user has ownership upon this resource. This way, a resource can determine for itself if the given user "owns" itself, so you can have a single resource with multiple owners.

## Configuring Permission Policies

Welcome to the cool bit.

Gatekeeper recognizes **Policies**, which are classes that can tell Gatekeeper if a given user is granted or denied access. Policies _may_ also need a **Store**, which refers to where the permission information is actually kept; this model is optional, if you want to separate between the policy logic and policy rules. The provided policies all do this.

### In-the-box Policies

See the full reference at the bottom of this page for details.

- `RoleBasedACLPolicy` - Your standard role-based access control list. Intended as the "primary" form of access control, as most projects use this.
- `GroupBasedACLPolicy` - Similar to the above, except a user can be in multiple groups at once.
- `ResourceACLPolicy` - Each resource has an explicit list of who can do what to them. Best used alongside the others.
- `BanListPolicy` - Stop particular users from doing a particular verb on a particular noun or resource.
- `SuperuserPolicy` - If the user is on the list, they have access to everything.

Utility policies:

- `OpenToAllPolicy` - Send ALLOW to all; this reverses the built-in policy that no response means denial.
- `DenyGuestsPolicy` - Send DENY to all guests.
- `DenyEveryonePolicy` - What it says on the tin. Useful for temporary blocking everything.
- `FulfillAllPolicy` - Accepts an array of _other policies_, and will only return ALLOW if _all_ of the sub-policies do.
- `FulfillAnyPolicy` - Also accepts an array of policies, and returns ALLOW if _at least one_ sub-policy does.
- `RequiredPolicy` - Accepts another policy, and returns DENY if the contained policy does not return ALLOW.

A bit more advanced:

- `UserCriteriaPolicy` - Uses the [criteria pattern](http://en.wikipedia.org/wiki/Criteria_Pattern) applied on the user.
- `ResourceCriteriaPolicy` - Same as above, applied on the resource.
- `CriteriaPolicy` - Applies a criteria that accepts both the user and resource.

### Custom Policies

This is the real beef of Gatekeeper - you can create your *own* policies to fit your application needs.

Policies implement GatekeeperPolicy interfaces, which just have 2 methods: `checkIfUserMay($user, $verb, $noun, $resource)` amd `checkIfGuestMay($verb, $noun, $resource)`. These methods should return Gatekeeper::ALLOW to permit access, Gatekeeper::DENY to restrict; anything else will just ignore this policy and move on to the next. If no explicit response is given, Gatekeeper will deny access.

Here's a custom policy that lets users create posts only if they have over 100 reputation:

```php
class ReputationBasedPolicy implements GatekeeperPolicy {

  public function checkIfGuestMay($verb, $noun, $resource ='')
  {
    return; // this policy does not apply to guests
  }

  public function checkIfUserMay(GatekeeperUser $user, $verb, $noun, $resource ='')
  {
    if ($verb == 'create' && $noun == 'post' && $user->reputation > 100) {
      return Gatekeeper::ALLOW;
    } else{
      return;
    }
  }

}
```

Note that this policy does not **deny** on failure, only pass, because we assume users might be allowed to create posts based on another policy (e.g. superusers can always post). As long as we don't set another policy that grants this, we're fine.

### Custom Stores

Policies may use stores to separate between the policy logic and the actual policy data; for instance, you might want to store your role-power lists on a JSON file, or in some PHP class, or maybe via MySQL. Each policy has their own store interfaces because they need different things.

You're welcome to create your own stores - particularly for database-based stores, you probably want to customize the exact SQL, table names, column names and whatnot.

For instance, the SuperuserListStore interface has one method, called `isSuperuser($user)`, so one could make this based on the user:

```php
class YourAppSuperuserListStore implements SuperuserListStore
{
  public function isSuperuser(GatekeeperUser $user)
  {
    return (bool) $user->super;
  }
}
```

Or embedded right in a class:

```php
class YourAppSuperuserListStore implements SuperuserListStore
{

  protected $superusers = [
    'john@example.com', 'jane@example.com'
  ];

  public function isSuperuser(GatekeeperUser $user)
  {
    return in_array($user->email, $this->superusers);
  }
}
```

Or one that involves the database in Laravel 4:

```php
class YourAppSuperuserListStore implements SuperuserListStore
{
  public function isSuperuser(GatekeeperUser $user)
  {
    return (bool) DB::table('superusers')->where('user_id', $user->id)->count() === 1;
  }
}
```

### Doing Operations on Policies and Stores

So far we've talked about how to check if a user can do this or that, but we haven't talked much about manipulating these rules during runtime. For instance, if you have a BanListPolicy, you might want to be able to ban a user. These operations are specific to a policy, and are not a property of Gatekeeper, so you'll want to store separate instances of them:

```php
$banList = new BanListPolicy(new WriteableTextBanListStore);
$gatekeeper->pushPolicy($banlist);

// somewhere else...
$banList->ban($user, $verb, $noun);
```

Some stores, like the provided JSON-based stores, are read-only; you'd have to go into the file and edit it to change the list. Others, like the WriteableText version above, *are* writeable.

## Word of Warning

Please **remember to fully test your security policies in your application**. Use whatever flavor of testing you like - never trust any piece of code, by anyone, to be foolproof. It's very easy for security holes to emerge, not due to bad programming, but simple lapses in judgement. *Always* test your code thoroughly.

--

## Provided Policy & Store Reference

### CriteriaPolicy

Invokes a `GatekeeperCriteria`-implementing class that accepts both the user and the resource, plus the verb. This is pretty close to being a Policy in and of itself, except that it **passes on guests and non-resource $nouns**. Basically just a handy shortcut.

It's suitable for checks along the lines of "if the user has this and the resource has that, can we do $verb to it?"

Example; if the *user* and *resource* share the same city, the user is allowed to *vote* on it:

```php
class SameCityCriteria implements GatekeeperCriteria {
  public function isSatisfiedBy(GatekeeperUser $user, ProtectedResource $resource, $verb)
  {
    if ($user->city == $resource->city && $verb == "vote") {
      return Gatekeeper::ALLOW;
    }
  }
}

$gatekeeper->pushPolicy(new CriteriaPolicy(new SameCityCriteria));
$gatekeeper->mayI('vote', $restaurant)->please();
```

CriteriaPolicy accepts a second argument: a class or interface name that the resource should match in order for it to be processed. For instance, `$resource->city` in the example above isn't very well-written, because `city` isn't a guaranteed property of ProtectedResource. Instead, we may want to create a VenueResource interface that extends it, which in turn defines a `getCity()` method.

```php
$gatekeeper->pushPolicy(new CriteriaPolicy(new SameCityCriteria, 'YourApp\VenueResource'));
```

CriteriaPolicy is also handy for **resource-based permissions** in general. For instance, you may want users to view a gallery page as public or just themselves and friends:

```php
class MatchGalleryViewingPrivacyCriteria implements GatekeeperCriteria {
  public function isSatisfiedBy(GatekeeperUser $user, Gallery $resource, $verb)
  {

    $isOwner = $resource->checkOwnership($user);
    $hasFriendAccess = $resource->getPrivacyLevel() == "friend" && $resource->owner->isFriendsWith($user);
    $isPublic = $resource->getPrivacyLevel() == "public";

    if (($isOwner || $hasFriendAccess || $isPublic) && $verb == 'view') {
      return Gatekeeper::ALLOW;
    }
  }
}

$gatekeeper->pushPolicy(new CriteriaPolicy(new MatchGalleryViewingPrivacyCriteria, 'YourApp\Gallery'));
$gatekeeper->mayI('view', $gallery)->please();
```

### UserCriteriaPolicy

Very similar to the above, except it only checks the user. A tad less useful.

Example; if the user has a confirmed email address, they're allowed to post comments:

```php
class ValidatedEmailCriteria implements GatekeeperUserCriteria {
  public function isSatisfiedBy(GatekeeperUser $user, $verb)
  {
    if ($user->hasConfirmedEmail() && $verb == "comment") {
      return Gatekeeper::ALLOW;
    }
  }
}

$gatekeeper->pushPolicy(new UserCriteriaPolicy(new ValidatedEmailCriteria));
$gatekeeper->mayI('comment', $post)->please();
```

### ResourceCriteriaPolicy

Also similar to CriteriaPolicy, this time only checking the resource.

Example; if the board is public, anyone can post messages to it:

```php
class PublicCriteria implements GatekeeperResourceCriteria {
  public function isSatisfiedBy(ProtectedResource $resource, $verb)
  {
    if ($resource->isPublic() && $verb == "create_post") {
      return Gatekeeper::ALLOW;
    }
  }
}

$gatekeeper->pushPolicy(new ResourceCriteriaPolicy(new PublicCriteria));
$gatekeeper->mayI('create_post', $board)->please();
```

Like the CriteriaPolicy, it also accepts a second argument with a class or interface name, defining which resource to run on.


text:
radzinzki.github.io
===================


text:
package de.gishmo.gwt.example.mvp4g2.simpleapplication.client;

import de.gishmo.gwt.example.mvp4g2.simpleapplication.client.model.ClientContext;
import com.github.mvp4g.mvp4g2.core.eventbus.IsEventFilter;

public class LoginFilter
  implements IsEventFilter<Mvp4g2SimpleApplicationWithLoginEventBus> {
  @Override
  public boolean filterEvent(Mvp4g2SimpleApplicationWithLoginEventBus eventBus,
                             String eventName,
                             Object... params) {
    // we do not filter the logoff event!
    if ("gotoLogin".equals(eventName) ||
        "logoff".equals(eventName) ||
        "setStatus".equals(eventName) ||
        "noValidLogin".equals(eventName)) {
      return true;
    }
    if (ClientContext.get().isLoggedIn()) {
      return true;
    }
    // inform the user, that he is not logged in! (not for the logoff event!)
    if (!"logoff".equals(eventName)) {
      eventBus.noValidLogin();
    }
    return false;
  }
}


text:
from   ubuntu:14.04
from    ubuntu:14.04
run     locale-gen en_US.UTF-8
env     LANG en_US.UTF-8
env     LANGUAGE en_US:en
env     LC_ALL en_US.UTF-8
run    apt-get update
run    DEBIAN_FRONTEND=noninteractive apt-get install wget curl apt-transport-https -y --force-yes
run    wget http://github.com/leandrosouza/basebuilder/tarball/master -O basebuilder.tar.gz --no-check-certificate
run    mkdir /var/lib/tsuru
run    tar -xvf basebuilder.tar.gz -C /var/lib/tsuru --strip 1
run    cp /var/lib/tsuru/nodejs/deploy /var/lib/tsuru
run    cp /var/lib/tsuru/base/start /var/lib/tsuru
run    curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
run    echo 'deb https://deb.nodesource.com/node_0.12 trusty main' > /etc/apt/sources.list.d/nodesource.list
run    apt-get update
run    apt-get install nodejs -y --force-yes
run    /var/lib/tsuru/base/install
run    npm install -g gulp bower node-gyp
run    ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime


text:
package fr.adrienbrault.idea.symfony2plugin.action.bundle;

import com.intellij.openapi.application.Result;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiElement;
import com.jetbrains.php.lang.psi.elements.PhpClass;
import fr.adrienbrault.idea.symfony2plugin.Symfony2Icons;
import fr.adrienbrault.idea.symfony2plugin.util.StringUtils;
import fr.adrienbrault.idea.symfony2plugin.util.psi.PhpBundleFileFactory;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.util.HashMap;

/**
 * @author Daniel Espendiller <daniel@espendiller.net>
 */
public class NewBundleCommandAction extends NewBundleFileActionAbstract {

    public NewBundleCommandAction() {
        super("Command", "Create Command Class", Symfony2Icons.SYMFONY);
    }

    protected void write(@NotNull final Project project, @NotNull final PhpClass phpClass, @NotNull String className) {

        if(!className.endsWith("Command")) {
            className += "Command";
        }

        final String finalClassName = className;
        new WriteCommandAction(project) {
            @Override
            protected void run(@NotNull Result result) throws Throwable {

                PsiElement bundleFile = null;
                try {

                    bundleFile = PhpBundleFileFactory.createBundleFile(phpClass, "command", "Command\\" + finalClassName, new HashMap<String, String>() {{
                        String name = phpClass.getName();
                        if(name.endsWith("Bundle")) {
                            name = name.substring(0, name.length() - "Bundle".length());
                        }
                        put("name", StringUtils.underscore(name) + ":" + StringUtils.underscore(finalClassName));
                    }});

                } catch (Exception e) {
                    JOptionPane.showMessageDialog(null, "Error:" + e.getMessage());
                    return;
                }

                new OpenFileDescriptor(getProject(), bundleFile.getContainingFile().getVirtualFile(), 0).navigate(true);
            }

            @Override
            public String getGroupID() {
                return "Create Command";
            }
        }.execute();
    }

}


text:
class MessageLoop;
namespace IPC {
class Message;
}

// A NotificationObjectProxy stands in for the JavaScript Notification object
// which corresponds to a notification toast on the desktop.  It can be signaled
// when various events occur regarding the desktop notification, and the
// attached JS listeners will be invoked in the renderer or worker process.
class NotificationObjectProxy
    : public NotificationDelegate {
 public:
  // Creates a Proxy object with the necessary callback information.
  NotificationObjectProxy(int process_id, int route_id,
                          int notification_id, bool worker);

  // NotificationDelegate implementation.
  virtual void Display();
  virtual void Error();
  virtual void Close(bool by_user);
  virtual void Click();
  virtual std::string id() const;

 protected:
  friend class base::RefCountedThreadSafe<NotificationObjectProxy>;

  virtual ~NotificationObjectProxy() {}

 private:
  // Called on UI thread to send a message.
  void Send(IPC::Message* message);

  // Callback information to find the JS Notification object where it lives.
  int process_id_;
  int route_id_;
  int notification_id_;
  bool worker_;
};

#endif  // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_


text:
package com.ggx.andzilla.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by jerry.guan on 4/21/2017.
 */
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
public @interface AuthorityFail {

    int value();
}


text:
from __future__ import print_function
import io
import logging
import pickle
import numpy

import pyximport
pyximport.install(setup_args={"include_dirs": numpy.get_include()})

from cort.preprocessing import pipeline
from cort.core import mention_extractor
from cort.coreference.approaches import mention_ranking
from cort.coreference import cost_functions, clusterer
from cort.coreference import experiments
from cort.coreference import features
from cort.coreference import instance_extractors
from cort.core import corpora
from cort.analysis import visualization, error_extractors, spanning_tree_algorithms

try:
    import tkinter as tki
except ImportError:
    import Tkinter as tki

__author__ = 'smartschat'

logging.basicConfig(level=logging.INFO,
                    format='%(asctime)s %(levelname)s %(''message)s')

class LiveDemo():
    def __init__(self):
        mention_features = [
            features.fine_type,
            features.gender,
            features.number,
            features.sem_class,
            features.deprel,
            features.head_ner,
            features.length,
            features.head,
            features.first,
            features.last,
            features.preceding_token,
            features.next_token,
            features.governor,
            features.ancestry
        ]

        pairwise_features = [
            features.exact_match,
            features.head_match,
            features.same_speaker,
            features.alias,
            features.sentence_distance,
            features.embedding,
            features.modifier,
            features.tokens_contained,
            features.head_contained,
            features.token_distance
        ]

        self.extractor = instance_extractors.InstanceExtractor(
            mention_ranking.extract_substructures,
            mention_features,
            pairwise_features,
            cost_functions.null_cost
        )

        logging.info("Loading model.")

        priors, weights = pickle.load(open("latent-model-train.obj", "rb"))

        self.perceptron = mention_ranking.RankingPerceptron(
            priors=priors,
            weights=weights,
            cost_scaling=0
        )

        logging.info("Loading CoreNLP models.")
        self.p = pipeline.Pipeline(
            "/home/sebastian/Downloads/stanford-corenlp-full-2015-04-20")

        self.root = tki.Tk()
        self.root.title("cort Demo")

        # create a Frame for the Text and Scrollbar
        self.txt_frm = tki.Frame(self.root, width=400, height=200)
        self.txt_frm.pack(fill="both", expand=True)

        # ensure a consistent GUI size
        self.txt_frm.grid_propagate(False)

        # implement stretchability
        self.txt_frm.grid_rowconfigure(0, weight=1)
        self.txt_frm.grid_columnconfigure(0, weight=1)

        # create a Text widget
        self.txt = tki.Text(self.txt_frm, borderwidth=3, relief="sunken")
        self.txt.config(font=("consolas", 12), undo=True, wrap='word')
        self.txt.grid(row=0, column=0, sticky="nsew", padx=2, pady=2)

        # create a Scrollbar and associate it with txt
        scrollb = tki.Scrollbar(self.txt_frm, command=self.txt.yview)
        scrollb.grid(row=0, column=1, sticky='nsew')
        self.txt['yscrollcommand'] = scrollb.set

        self.button = tki.Button(self.root, text='Resolve Coreference',
                            command=self.do_coreference)

        self.button.pack()

    def run(self):
        self.root.mainloop()

    def do_coreference(self):
        testing_corpus = corpora.Corpus("input", [self.p.run_on_doc(
            io.StringIO(self.txt.get("0.0", tki.END)), "input")])

        logging.info("Extracting system mentions.")
        for doc in testing_corpus:
            doc.system_mentions = mention_extractor.extract_system_mentions(doc)

        mention_entity_mapping, antecedent_mapping = experiments.predict(
            testing_corpus,
            self.extractor,
            self.perceptron,
            clusterer.all_ante
        )

        testing_corpus.read_coref_decisions(mention_entity_mapping, antecedent_mapping)

        logging.info("Visualize")

        for doc in testing_corpus:
            max_id = 0

            for mention in doc.system_mentions[1:]:
                set_id = mention.attributes["set_id"]

                if set_id:
                    max_id = max(set_id, max_id)

            max_id += 1

            doc.annotated_mentions = []

            for i, mention in enumerate(doc.system_mentions[1:]):
                if mention.attributes["set_id"]:
                    mention.attributes["annotated_set_id"] = mention.attributes[
                        "set_id"]
                else:
                    mention.attributes["annotated_set_id"] = max_id + i
                doc.annotated_mentions.append(mention)

        ex = error_extractors.ErrorExtractor(testing_corpus,
                                         spanning_tree_algorithms.recall_accessibility,
                                         spanning_tree_algorithms.precision_system_output)

        ex.add_system(testing_corpus)

        decisions = ex.get_errors()

        visualizer = visualization.Visualizer(decisions, "input",
                                              for_raw_input=True)

        visualizer.run()

demo = LiveDemo()

demo.run()