text:
package org.elasticsearch.xpack.ml.integration;

import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.bulk.BulkRequestBuilder;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.xpack.core.ml.action.ExplainDataFrameAnalyticsAction;
import org.elasticsearch.xpack.core.ml.action.PutDataFrameAnalyticsAction;
import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsConfig;
import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsSource;
import org.elasticsearch.xpack.core.ml.dataframe.analyses.BoostedTreeParams;
import org.elasticsearch.xpack.core.ml.dataframe.analyses.Classification;
import org.elasticsearch.xpack.core.ml.dataframe.analyses.Regression;
import org.elasticsearch.xpack.core.ml.dataframe.analyses.OutlierDetection;
import org.elasticsearch.xpack.core.ml.utils.QueryProvider;

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

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.lessThanOrEqualTo;

public class ExplainDataFrameAnalyticsIT extends MlNativeDataFrameAnalyticsIntegTestCase {

    public void testExplain_GivenMissingSourceIndex() {
        DataFrameAnalyticsConfig config = new DataFrameAnalyticsConfig.Builder()
            .setSource(new DataFrameAnalyticsSource(new String[] {"missing_index"}, null, null))
            .setAnalysis(new OutlierDetection.Builder().build())
            .buildForExplain();

        ResourceNotFoundException e = expectThrows(ResourceNotFoundException.class, () -> explainDataFrame(config));
        assertThat(e.getMessage(), equalTo("cannot retrieve data because index [missing_index] does not exist"));
    }

    public void testSourceQueryIsApplied() throws IOException {
        // To test the source query is applied when we extract data,
        // we set up a job where we have a query which excludes all but one document.
        // We then assert the memory estimation is low enough.

        String sourceIndex = "test-source-query-is-applied";

        client().admin().indices().prepareCreate(sourceIndex)
            .setMapping(
                "numeric_1", "type=double",
                "numeric_2", "type=unsigned_long",
                "categorical", "type=keyword",
                "filtered_field", "type=keyword")
            .get();

        BulkRequestBuilder bulkRequestBuilder = client().prepareBulk();
        bulkRequestBuilder.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);

        for (int i = 0; i < 30; i++) {
            IndexRequest indexRequest = new IndexRequest(sourceIndex);
            indexRequest.source(
                "numeric_1", 1.0,
                "numeric_2", 2,
                "categorical", i % 2 == 0 ? "class_1" : "class_2",
                "filtered_field", i < 2 ? "bingo" : "rest"); // We tag bingo on the first two docs to ensure we have 2 classes
            bulkRequestBuilder.add(indexRequest);
        }
        BulkResponse bulkResponse = bulkRequestBuilder.get();
        if (bulkResponse.hasFailures()) {
            fail("Failed to index data: " + bulkResponse.buildFailureMessage());
        }

        String id = "test_source_query_is_applied";

        DataFrameAnalyticsConfig config = new DataFrameAnalyticsConfig.Builder()
            .setId(id)
            .setSource(new DataFrameAnalyticsSource(new String[] { sourceIndex },
                QueryProvider.fromParsedQuery(QueryBuilders.termQuery("filtered_field", "bingo")),
                null))
            .setAnalysis(new Classification("categorical"))
            .buildForExplain();

        ExplainDataFrameAnalyticsAction.Response explainResponse = explainDataFrame(config);

        assertThat(explainResponse.getMemoryEstimation().getExpectedMemoryWithoutDisk().getKb(), lessThanOrEqualTo(1024L));
    }

    public void testTrainingPercentageIsApplied() throws IOException {
        String sourceIndex = "test-training-percentage-applied";
        RegressionIT.indexData(sourceIndex, 100, 0);

        DataFrameAnalyticsConfig config = new DataFrameAnalyticsConfig.Builder()
            .setId("dfa-training-100-" + sourceIndex)
            .setSource(new DataFrameAnalyticsSource(new String[] { sourceIndex },
                QueryProvider.fromParsedQuery(QueryBuilders.matchAllQuery()),
                null))
            .setAnalysis(new Regression(RegressionIT.DEPENDENT_VARIABLE_FIELD,
                BoostedTreeParams.builder().build(),
                null,
                100.0,
                null,
                null,
                null,
                null))
            .buildForExplain();

        ExplainDataFrameAnalyticsAction.Response explainResponse = explainDataFrame(config);

        ByteSizeValue allDataUsedForTraining = explainResponse.getMemoryEstimation().getExpectedMemoryWithoutDisk();

        config = new DataFrameAnalyticsConfig.Builder()
            .setId("dfa-training-50-" + sourceIndex)
            .setSource(new DataFrameAnalyticsSource(new String[] { sourceIndex },
                QueryProvider.fromParsedQuery(QueryBuilders.matchAllQuery()),
                null))
            .setAnalysis(new Regression(RegressionIT.DEPENDENT_VARIABLE_FIELD,
                BoostedTreeParams.builder().build(),
                null,
                50.0,
                null,
                null,
                null,
                null))
            .buildForExplain();

        explainResponse = explainDataFrame(config);

        assertThat(explainResponse.getMemoryEstimation().getExpectedMemoryWithoutDisk(),
                   lessThanOrEqualTo(allDataUsedForTraining));
    }

    public void testSimultaneousExplainSameConfig() throws IOException {

        final int simultaneousInvocationCount = 10;

        String sourceIndex = "test-simultaneous-explain";
        RegressionIT.indexData(sourceIndex, 100, 0);

        DataFrameAnalyticsConfig config = new DataFrameAnalyticsConfig.Builder()
            .setId("dfa-simultaneous-explain-" + sourceIndex)
            .setSource(new DataFrameAnalyticsSource(new String[]{sourceIndex},
                QueryProvider.fromParsedQuery(QueryBuilders.matchAllQuery()),
                null))
            .setAnalysis(new Regression(RegressionIT.DEPENDENT_VARIABLE_FIELD,
                BoostedTreeParams.builder().build(),
                null,
                100.0,
                null,
                null,
                null,
                null))
            .buildForExplain();

        List<ActionFuture<ExplainDataFrameAnalyticsAction.Response>> futures = new ArrayList<>();

        for (int i = 0; i < simultaneousInvocationCount; ++i) {
            futures.add(client().execute(ExplainDataFrameAnalyticsAction.INSTANCE, new PutDataFrameAnalyticsAction.Request(config)));
        }

        ExplainDataFrameAnalyticsAction.Response previous = null;
        for (ActionFuture<ExplainDataFrameAnalyticsAction.Response> future : futures) {
            // The main purpose of this test is that actionGet() here will throw an exception
            // if any of the simultaneous calls returns an error due to interaction between
            // the many estimation processes that get run
            ExplainDataFrameAnalyticsAction.Response current = future.actionGet(10000);
            if (previous != null) {
                // A secondary check the test can perform is that the multiple invocations
                // return the same result (but it was failures due to unwanted interactions
                // that caused this test to be written)
                assertEquals(previous, current);
            }
            previous = current;
        }
    }

    @Override
    boolean supportsInference() {
        return false;
    }
}


text:
package org.apache.arrow.memory.util;

import static org.junit.Assert.assertEquals;

import org.apache.arrow.memory.ArrowBuf;
import org.apache.arrow.memory.BufferAllocator;
import org.apache.arrow.memory.RootAllocator;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class TestByteFunctionHelpers {

  private BufferAllocator allocator;

  private static final int SIZE = 100;

  @Before
  public void init() {
    allocator = new RootAllocator(Long.MAX_VALUE);

  }

  @After
  public void terminate() throws Exception {
    allocator.close();
  }

  @Test
  public void testEquals() {
    ArrowBuf buffer1 = allocator.buffer(SIZE);
    ArrowBuf buffer2 = allocator.buffer(SIZE);

    for (int i = 0; i < SIZE; i++) {
      buffer1.setByte(i, i);
      buffer2.setByte(i, i);
    }

    //test three cases, length>8, length>3, length<3

    assertEquals(1, ByteFunctionHelpers.equal(buffer1, 0, SIZE - 1,
        buffer2, 0, SIZE - 1));
    assertEquals(1, ByteFunctionHelpers.equal(buffer1, 0, 6,
        buffer2, 0, 6));
    assertEquals(1, ByteFunctionHelpers.equal(buffer1, 0, 2,
        buffer2, 0, 2));

    //change value at index1
    buffer1.setByte(1, 10);

    assertEquals(0, ByteFunctionHelpers.equal(buffer1, 0, SIZE - 1,
        buffer2, 0, SIZE - 1));
    assertEquals(0, ByteFunctionHelpers.equal(buffer1, 0, 6,
        buffer2, 0, 6));
    assertEquals(0, ByteFunctionHelpers.equal(buffer1, 0, 2,
        buffer2, 0, 2));

    buffer1.close();
    buffer2.close();

  }

  @Test
  public void testCompare() {
    ArrowBuf buffer1 = allocator.buffer(SIZE);
    ArrowBuf buffer2 = allocator.buffer(SIZE);

    for (int i = 0; i < SIZE; i++) {
      buffer1.setByte(i, i);
      buffer2.setByte(i, i);
    }

    //test three cases, length>8, length>3, length<3

    assertEquals(0, ByteFunctionHelpers.compare(buffer1, 0, SIZE - 1,
        buffer2, 0, SIZE - 1));
    assertEquals(0, ByteFunctionHelpers.compare(buffer1, 0, 6,
        buffer2, 0, 6));
    assertEquals(0, ByteFunctionHelpers.compare(buffer1, 0, 2,
        buffer2, 0, 2));

    //change value at index 1
    buffer1.setByte(1, 0);

    assertEquals(-1, ByteFunctionHelpers.compare(buffer1, 0, SIZE - 1,
        buffer2, 0, SIZE - 1));
    assertEquals(-1, ByteFunctionHelpers.compare(buffer1, 0, 6,
        buffer2, 0, 6));
    assertEquals(-1, ByteFunctionHelpers.compare(buffer1, 0, 2,
        buffer2, 0, 2));

    buffer1.close();
    buffer2.close();

  }

  @Test
  public void testStringCompare() {
    String[] leftStrings = {"cat", "cats", "catworld", "dogs", "bags"};
    String[] rightStrings = {"dog", "dogs", "dogworld", "dog", "sgab"};

    for (int i = 0; i < leftStrings.length; ++i) {
      String leftStr = leftStrings[i];
      String rightStr = rightStrings[i];

      ArrowBuf left = allocator.buffer(SIZE);
      left.setBytes(0, leftStr.getBytes());
      ArrowBuf right = allocator.buffer(SIZE);
      right.setBytes(0, rightStr.getBytes());

      assertEquals(leftStr.compareTo(rightStr) < 0 ? -1 : 1,
          ByteFunctionHelpers.compare(left, 0, leftStr.length(), right, 0, rightStr.length()));

      left.close();
      right.close();
    }
  }

  @Test
  public void testCompareWithByteArray() {
    ArrowBuf buffer1 = allocator.buffer(SIZE);
    byte[] buffer2 = new byte[SIZE];

    for (int i = 0; i < SIZE; i++) {
      buffer1.setByte(i, i);
      buffer2[i] = (byte) i;
    }

    //test three cases, length>8, length>3, length<3

    assertEquals(0, ByteFunctionHelpers.compare(buffer1, 0, SIZE - 1,
        buffer2, 0, SIZE - 1));
    assertEquals(0, ByteFunctionHelpers.compare(buffer1, 0, 6,
        buffer2, 0, 6));
    assertEquals(0, ByteFunctionHelpers.compare(buffer1, 0, 2,
        buffer2, 0, 2));

    //change value at index 1
    buffer1.setByte(1, 0);

    assertEquals(-1, ByteFunctionHelpers.compare(buffer1, 0, SIZE - 1,
        buffer2, 0, SIZE - 1));
    assertEquals(-1, ByteFunctionHelpers.compare(buffer1, 0, 6,
        buffer2, 0, 6));
    assertEquals(-1, ByteFunctionHelpers.compare(buffer1, 0, 2,
        buffer2, 0, 2));

    buffer1.close();
  }
}

redpajama_set_name: RedPajamaGithub


text:
require 'ting_yun/support/helper'
require 'ting_yun/support/coerce'
require 'ting_yun/agent/database'

module TingYun
  module Agent
    class Transaction
      class TraceNode

        attr_reader :entry_timestamp, :parent_node, :called_nodes
        attr_accessor :metric_name, :exit_timestamp, :uri, :count, :klass, :method, :name

        UNKNOWN_NODE_NAME = '<unknown>'.freeze

        def initialize(timestamp, metric_name)
          @entry_timestamp = timestamp
          @metric_name     = metric_name || UNKNOWN_NODE_NAME
          @called_nodes    = nil
          @count           = 1
          self["exception"] ||= []
        end

        def add_called_node(s)
          @called_nodes ||= []
          @called_nodes << s
          s.parent_node = self
        end

        def end_trace(timestamp)
          @exit_timestamp = timestamp
        end

        # return the total duration of this node
        def duration
          TingYun::Helper.time_to_millis(@exit_timestamp - @entry_timestamp)
        end

        def pre_metric_name(metric_name)
          @name ||= if metric_name.start_with?('Database ')
                      "#{metric_name.split('/')[0]}%2F#{metric_name.split('%2F')[-1]}"
                    else
                      metric_name
                    end
        end

        def to_array
          [TingYun::Helper.time_to_millis(entry_timestamp),
           TingYun::Helper.time_to_millis(exit_timestamp),
           TingYun::Support::Coerce.string(metric_name),
           TingYun::Support::Coerce.string(uri)||'',
           TingYun::Support::Coerce.int(count),
           TingYun::Support::Coerce.string(klass)||TingYun::Support::Coerce.string(pre_metric_name(metric_name)),
           TingYun::Support::Coerce.string(method)||'',
           params] +
              [(@called_nodes ? @called_nodes.map{|s| s.to_array} : [])]
        end

        def custom_params
          {}
        end

        def request_params
          {}
        end

        def []=(key, value)
          # only create a parameters field if a parameter is set; this will save
          # bandwidth etc as most nodes have no parameters
          params[key] = value
        end

        def [](key)
          params[key]
        end

        def params
          @params ||= {}
        end

        def params=(p)
          @params = p
        end

        def merge(hash)
          params.merge! hash
        end

        def each_call(&blk)
          blk.call self

          if @called_nodes
            @called_nodes.each do |node|
              node.each_call(&blk)
            end
          end
        end

        def explain_sql
          return params[:explainPlan] if params.key?(:explainPlan)

          statement = params[:sql]
          return nil unless statement.respond_to?(:config) &&
              statement.respond_to?(:explainer)

          TingYun::Agent::Database.explain_sql(statement)
        end

        def add_error(error)
          if error.respond_to?(:tingyun_external)
            self["exception"] << {"message" => error.message,
                                  "class" => "External #{error.tingyun_code}"
                                  }
          else
            if ::TingYun::Agent.config[:'nbs.exception.stack_enabled']
              self["exception"] << {"message" => error.message,
                                    "class" => error.class.name ,
                                    "stacktrace"=> error.backtrace.reject! { |t| t.include?('tingyun_rpm') }
              }
            else
              self["exception"] << {"message" => error.message,
                                    "class" => error.class.name
              }
            end
          end
        end

        protected
        def parent_node=(s)
          @parent_node = s
        end
      end
    end
  end
end


text:
package cmd

import (
	"github.com/gobuffalo/buffalo/buffalo/cmd/destroy"
	"github.com/spf13/cobra"
)

// DestroyCmd destroys generated code
var DestroyCmd = &cobra.Command{
	Use:     "destroy",
	Short:   "Destroy generated components",
	Aliases: []string{"d"},
}

func init() {
	DestroyCmd.AddCommand(destroy.ResourceCmd)
	DestroyCmd.AddCommand(destroy.ActionCmd)
	DestroyCmd.AddCommand(destroy.MailerCmd)

	DestroyCmd.PersistentFlags().BoolVarP(&destroy.YesToAll, "yes", "y", false, "confirms all beforehand")

	decorate("destroy", DestroyCmd)
	RootCmd.AddCommand(DestroyCmd)
}


text:
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Copyright (c) 2015 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.xwalk.core.xwview.test;

import android.content.Context;
import android.graphics.Point;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.WindowManager;

import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.util.CallbackHelper;

import java.util.Locale;

/**
 * Test suite for setInitialScale().
 */
public class SetInitialScaleTest extends XWalkViewTestBase {
    private TestHelperBridge.OnScaleChangedHelper mOnScaleChangedHelper;

    @Override
    public void setUp() throws Exception {
        super.setUp();
        mOnScaleChangedHelper = mTestHelperBridge.getOnScaleChangedHelper();
    }

    @SmallTest
    @Feature({"setInitialScale"})
    public void testSetInitialScale1() throws Throwable {

        final String pageTemplate = ""
                + "<meta name='viewport' content='initial-scale=%d' />"
                + ""
                + "
A big div
"
                + "";
        final int initialScale4 = 4;
        final int initialScale1 = 1;
        final String pageScale4 = String.format((Locale) null, pageTemplate, initialScale4);
        final String page = String.format((Locale) null, pageTemplate, initialScale1);
        final double dipScale = getDipScale();

        // Page scale updates are asynchronous. There is an issue that we can't
        // reliably check, whether the scale as NOT changed (i.e. remains to be 1.0).
        // So we first change the scale to some non-default value, and then wait
        // until it gets back to 1.0.
        int onScaleChangedCallCount = mOnScaleChangedHelper.getCallCount();
        loadDataSync(null, pageScale4, "text/html", false);
        mOnScaleChangedHelper.waitForCallback(onScaleChangedCallCount);
        assertEquals(4.0f, getScaleFactor());

        // The following call to set initial scale will be ignored. However, a temporary
        // page scale change may occur, and this makes the usual onScaleChanged-based workflow
        // flaky. So instead, we are just polling the scale until it becomes 1.0.
        setInitialScale(50);
        loadDataSync(null, page, "text/html", false);
        ensureScaleBecomes(1.0f);
    }

    @SmallTest
    @Feature({"setInitialScale"})
    public void testSetInitialScale2() throws Throwable {
        CallbackHelper onPageFinishedHelper = mTestHelperBridge.getOnPageFinishedHelper();

        WindowManager wm = (WindowManager) getInstrumentation().getTargetContext()
                .getSystemService(Context.WINDOW_SERVICE);
        Point screenSize = new Point();
        wm.getDefaultDisplay().getSize(screenSize);
        // Make sure after 50% scale, page width still larger than screen.
        int height = screenSize.y * 2 + 1;
        int width = screenSize.x * 2 + 1;
        final String page = ""
                + "
"
                + "testSetInitialScale
";
        final float defaultScaleFactor = 0;
        final float defaultScale = 0.5f;
        final float scaleFactor = 0.25f;

        assertEquals(defaultScaleFactor, getScaleFactor(), .01f);
        loadDataSync(null, page, "text/html", false);
        assertEquals(scaleFactor, getScaleFactor(), .01f);

        int onScaleChangedCallCount = mOnScaleChangedHelper.getCallCount();
        setInitialScale(60);
        loadDataSync(null, page, "text/html", false);
        mOnScaleChangedHelper.waitForCallback(onScaleChangedCallCount);
        assertEquals(0.6f, getPixelScale(), .01f);

        onScaleChangedCallCount = mOnScaleChangedHelper.getCallCount();
        setInitialScale(500);
        loadDataSync(null, page, "text/html", false);
        mOnScaleChangedHelper.waitForCallback(onScaleChangedCallCount);
        assertEquals(5.0f, getPixelScale(), .01f);

        onScaleChangedCallCount = mOnScaleChangedHelper.getCallCount();
        // default min-scale will be used.
        setInitialScale(0);
        loadDataSync(null, page, "text/html", false);
        mOnScaleChangedHelper.waitForCallback(onScaleChangedCallCount);
        assertEquals(defaultScale, getPixelScale(), .01f);
    }
}


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

    <string name="app_name">Yogyakarta Tour</string>
    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="action_map">Maps</string>
    <string name="action_ar">AR</string>
    <string name="drawer_open">Open</string>
    <string name="drawer_close">Close</string>
    <string name="text_close_eng">Close</string>
    <string name="text_image_eng">Description Image</string>
    <string name="text_hide_radar">Hide Radar</string>
    <string name="text_hide_zoom">Hide Zoom Bar</string>
    <string name="text_exit">Exit</string>
    <string name="text_category">Category</string>

</resources>


text:
package com.thed.service.soap;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for getReleaseById complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="getReleaseById">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="releaseId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
 *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getReleaseById", propOrder = {
    "releaseId",
    "token"
})
public class GetReleaseById {

    protected Long releaseId;
    protected String token;

    /**
     * Gets the value of the releaseId property.
     *
     * @return
     *     possible object is
     *     {@link Long }
     *
     */
    public Long getReleaseId() {
        return releaseId;
    }

    /**
     * Sets the value of the releaseId property.
     *
     * @param value
     *     allowed object is
     *     {@link Long }
     *
     */
    public void setReleaseId(Long value) {
        this.releaseId = value;
    }

    /**
     * Gets the value of the token property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getToken() {
        return token;
    }

    /**
     * Sets the value of the token property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setToken(String value) {
        this.token = value;
    }

}


text:
.class Landroid/net/wifi/WifiConfiguration$1;
.super Ljava/lang/Object;
.source "WifiConfiguration.java"

# interfaces
.implements Ljava/util/Comparator;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Landroid/net/wifi/WifiConfiguration;->trimScanResultsCache(I)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Landroid/net/wifi/WifiConfiguration;

# direct methods
.method constructor <init>(Landroid/net/wifi/WifiConfiguration;)V
    .locals 0

    .prologue
    .line 1050
    iput-object p1, p0, Landroid/net/wifi/WifiConfiguration$1;->this$0:Landroid/net/wifi/WifiConfiguration;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public compare(Ljava/lang/Object;Ljava/lang/Object;)I
    .locals 6
    .param p1, "o1"    # Ljava/lang/Object;
    .param p2, "o2"    # Ljava/lang/Object;

    .prologue
    .line 1052
    move-object v0, p1

    check-cast v0, Landroid/net/wifi/ScanResult;

    .local v0, "a":Landroid/net/wifi/ScanResult;
    move-object v1, p2

    .line 1053
    check-cast v1, Landroid/net/wifi/ScanResult;

    .line 1054
    .local v1, "b":Landroid/net/wifi/ScanResult;
    iget-wide v2, v0, Landroid/net/wifi/ScanResult;->seen:J

    iget-wide v4, v1, Landroid/net/wifi/ScanResult;->seen:J

    cmp-long v2, v2, v4

    if-lez v2, :cond_0

    .line 1055
    const/4 v2, 0x1

    .line 1060
    :goto_0
    return v2

    .line 1057
    :cond_0
    iget-wide v2, v0, Landroid/net/wifi/ScanResult;->seen:J

    iget-wide v4, v1, Landroid/net/wifi/ScanResult;->seen:J

    cmp-long v2, v2, v4

    if-gez v2, :cond_1

    .line 1058
    const/4 v2, -0x1

    goto :goto_0

    .line 1060
    :cond_1
    iget-object v2, v0, Landroid/net/wifi/ScanResult;->BSSID:Ljava/lang/String;

    iget-object v3, v1, Landroid/net/wifi/ScanResult;->BSSID:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I

    move-result v2

    goto :goto_0
.end method


text:
using namespace boost;
using namespace std;

DECLARE_bool(abort_on_config_error);
DEFINE_int32(num_cores, 0, "(Advanced) If > 0, it sets the number of cores available to"
    " Impala. Setting it to 0 means Impala will use all available cores on the machine"
    " according to /proc/cpuinfo.");

namespace impala {

bool CpuInfo::initialized_ = false;
int64_t CpuInfo::hardware_flags_ = 0;
int64_t CpuInfo::original_hardware_flags_;
long CpuInfo::cache_sizes_[L3_CACHE + 1];
int64_t CpuInfo::cycles_per_ms_;
int CpuInfo::num_cores_ = 1;
string CpuInfo::model_name_ = "unknown";

static struct {
  string name;
  int64_t flag;
} flag_mappings[] =
{
  { "ssse3",  CpuInfo::SSSE3 },
  { "sse4_1", CpuInfo::SSE4_1 },
  { "sse4_2", CpuInfo::SSE4_2 },
  { "popcnt", CpuInfo::POPCNT },
};
static const long num_flags = sizeof(flag_mappings) / sizeof(flag_mappings[0]);

// Helper function to parse for hardware flags.
// values contains a list of space-seperated flags.  check to see if the flags we
// care about are present.
// Returns a bitmap of flags.
int64_t ParseCPUFlags(const string& values) {
  int64_t flags = 0;
  for (int i = 0; i < num_flags; ++i) {
    if (contains(values, flag_mappings[i].name)) {
      flags |= flag_mappings[i].flag;
    }
  }
  return flags;
}

void CpuInfo::Init() {
  string line;
  string name;
  string value;

  float max_mhz = 0;
  int num_cores = 0;

  memset(&cache_sizes_, 0, sizeof(cache_sizes_));

  // Read from /proc/cpuinfo
  ifstream cpuinfo("/proc/cpuinfo", ios::in);
  while (cpuinfo) {
    getline(cpuinfo, line);
    size_t colon = line.find(':');
    if (colon != string::npos) {
      name = line.substr(0, colon - 1);
      value = line.substr(colon + 1, string::npos);
      trim(name);
      trim(value);
      if (name.compare("flags") == 0) {
        hardware_flags_ |= ParseCPUFlags(value);
      } else if (name.compare("cpu MHz") == 0) {
        // Every core will report a different speed.  We'll take the max, assuming
        // that when impala is running, the core will not be in a lower power state.
        // TODO: is there a more robust way to do this, such as
        // Window's QueryPerformanceFrequency()
        float mhz = atof(value.c_str());
        max_mhz = max(mhz, max_mhz);
      } else if (name.compare("processor") == 0) {
        ++num_cores;
      } else if (name.compare("model name") == 0) {
        model_name_ = value;
      }
    }
  }
  if (cpuinfo.is_open()) cpuinfo.close();

  // Call sysconf to query for the cache sizes
  cache_sizes_[0] = sysconf(_SC_LEVEL1_DCACHE_SIZE);
  cache_sizes_[1] = sysconf(_SC_LEVEL2_CACHE_SIZE);
  cache_sizes_[2] = sysconf(_SC_LEVEL3_CACHE_SIZE);

  if (max_mhz != 0) {
    cycles_per_ms_ = max_mhz * 1000;
  } else {
    cycles_per_ms_ = 1000000;
  }
  original_hardware_flags_ = hardware_flags_;

  if (num_cores > 0) {
    num_cores_ = num_cores;
  } else {
    num_cores_ = 1;
  }

  if (FLAGS_num_cores > 0) num_cores_ = FLAGS_num_cores;

  initialized_ = true;
}

void CpuInfo::VerifyCpuRequirements() {
  if (!CpuInfo::IsSupported(CpuInfo::SSSE3)) {
    LOG(ERROR) << "CPU does not support the Supplemental SSE3 (SSSE3) instruction set, "
               << "which is required. Exiting if Supplemental SSE3 is not functional...";
  }
}

void CpuInfo::EnableFeature(long flag, bool enable) {
  DCHECK(initialized_);
  if (!enable) {
    hardware_flags_ &= ~flag;
  } else {
    // Can't turn something on that can't be supported
    DCHECK((original_hardware_flags_ & flag) != 0);
    hardware_flags_ |= flag;
  }
}

string CpuInfo::DebugString() {
  DCHECK(initialized_);
  stringstream stream;
  int64_t L1 = CacheSize(L1_CACHE);
  int64_t L2 = CacheSize(L2_CACHE);
  int64_t L3 = CacheSize(L3_CACHE);
  stream << "Cpu Info:" << endl
         << "  Model: " << model_name_ << endl
         << "  Cores: " << num_cores_ << endl
         << "  L1 Cache: " << PrettyPrinter::Print(L1, TUnit::BYTES) << endl
         << "  L2 Cache: " << PrettyPrinter::Print(L2, TUnit::BYTES) << endl
         << "  L3 Cache: " << PrettyPrinter::Print(L3, TUnit::BYTES) << endl
         << "  Hardware Supports:" << endl;
  for (int i = 0; i < num_flags; ++i) {
    if (IsSupported(flag_mappings[i].flag)) {
      stream << "    " << flag_mappings[i].name << endl;
    }
  }
  return stream.str();
}

}


text:
require 'rubygems/test_case'
require 'rubygems/commands/build_command'
require 'rubygems/format'

class TestGemCommandsBuildCommand < Gem::TestCase

  def setup
    super

    @gem = quick_spec 'some_gem' do |s|
      s.rubyforge_project = 'example'
    end

    @cmd = Gem::Commands::BuildCommand.new
  end

  def test_execute
    gemspec_file = File.join(@tempdir, @gem.spec_name)

    File.open gemspec_file, 'w' do |gs|
      gs.write @gem.to_ruby
    end

    util_test_build_gem @gem, gemspec_file
  end

  def test_execute_yaml
    gemspec_file = File.join(@tempdir, @gem.spec_name)

    File.open gemspec_file, 'w' do |gs|
      gs.write @gem.to_yaml
    end

    util_test_build_gem @gem, gemspec_file
  end

  def test_execute_bad_spec
    @gem.date = "2010-11-08"

    gemspec_file = File.join(@tempdir, @gem.spec_name)

    File.open gemspec_file, 'w' do |gs|
      gs.write @gem.to_ruby.sub(/11-08/, "11-8")
    end

    @cmd.options[:args] = [gemspec_file]

    out, err = use_ui @ui do
      capture_io do
        assert_raises Gem::MockGemUi::TermError do
          @cmd.execute
        end
      end
    end

    assert_equal "", out
    assert_match(/invalid date format in specification/, err)

    assert_equal '', @ui.output
    assert_equal "ERROR:  Error loading gemspec. Aborting.\n", @ui.error
  end

  def test_execute_missing_file
    @cmd.options[:args] = %w[some_gem]
    use_ui @ui do
      assert_raises Gem::MockGemUi::TermError do
        @cmd.execute
      end
    end

    assert_equal '', @ui.output
    assert_equal "ERROR:  Gemspec file not found: some_gem\n", @ui.error
  end

  def util_test_build_gem(gem, gemspec_file)
    @cmd.options[:args] = [gemspec_file]

    use_ui @ui do
      Dir.chdir @tempdir do
        @cmd.execute
      end
    end

    output = @ui.output.split "\n"
    assert_equal "  Successfully built RubyGem", output.shift
    assert_equal "  Name: some_gem", output.shift
    assert_equal "  Version: 2", output.shift
    assert_equal "  File: some_gem-2.gem", output.shift
    assert_equal [], output
    assert_equal '', @ui.error

    gem_file = File.join @tempdir, File.basename(gem.cache_file)
    assert File.exist?(gem_file)

    spec = Gem::Format.from_file_by_path(gem_file).spec

    assert_equal "some_gem", spec.name
    assert_equal "this is a summary", spec.summary
  end

  def test_execute_force
    @gem.instance_variable_set :@required_rubygems_version, nil

    gemspec_file = File.join(@tempdir, @gem.spec_name)

    File.open gemspec_file, 'w' do |gs|
      gs.write @gem.to_yaml
    end

    @cmd.options[:args] = [gemspec_file]
    @cmd.options[:force] = true

    util_test_build_gem @gem, gemspec_file
  end

end


text:
layout: tag
section-type: tag
title: retrospectives
---
## Tag


text:
from __future__ import print_function
from __future__ import absolute_import

from tornado.web import Application

class Site(Application):
    """ Tornado Website with multiple :class:`Application`'s.

    @celrymon ver0.5.0.

    """

    def __init__(self, applications, *args, **kwargs):
        handlers = []
        for urlprefix, application in applications:
            for urlmatch, handler in application:
                handlers.append((urlprefix + urlmatch, handler))
        kwargs["handlers"] = handlers
        super(Site, self).__init__(*args, **kwargs)


text:
<?php

namespace Google\Service\CloudNaturalLanguage;

class AnalyzeEntitiesResponse extends \Google\Collection
{
  protected $collection_key = 'entities';
  protected $entitiesType = Entity::class;
  protected $entitiesDataType = 'array';
  /**
   * @var string
   */
  public $language;

  /**
   * @param Entity[]
   */
  public function setEntities($entities)
  {
    $this->entities = $entities;
  }
  /**
   * @return Entity[]
   */
  public function getEntities()
  {
    return $this->entities;
  }
  /**
   * @param string
   */
  public function setLanguage($language)
  {
    $this->language = $language;
  }
  /**
   * @return string
   */
  public function getLanguage()
  {
    return $this->language;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AnalyzeEntitiesResponse::class, 'Google_Service_CloudNaturalLanguage_AnalyzeEntitiesResponse');


text:
require 'helper'

#
# Unit tests for dialogs
#
# Note that these teste are being excluded when the plain +rake+ file is run because these tests require manual
# intervention.
#
# Run these tests separately with
#
#   rake TEST=test/acceptance/test_dialogs.rb
#
class TestPasswordDialog < Test::Unit::TestCase
  CANDIDATES = %w[Homer Marge Bart Lisa Maggie Martin Ralph]

  def test_get_with_spaces
    expected = "#{CANDIDATES[Random.rand(CANDIDATES.size)]} #{CANDIDATES[Random.rand(CANDIDATES.size)]}"
    get_text(expected, Pwl::Dialog::Password)
  end

  def test_get_empty
    assert_equal('', Pwl::Dialog::Password.new(self.class.name, "Please just press Enter without entering any text.").get_input)
  end

  def test_get_without_spaces
    expected = CANDIDATES[Random.rand(CANDIDATES.size)]
    get_text(expected, Pwl::Dialog::Password)
  end

  def test_cancel
    assert_raise Pwl::Dialog::Cancelled do
      Pwl::Dialog::Password.new(self.class.name, "Please press the Escape key.").get_input
    end

    assert_raise Pwl::Dialog::Cancelled do
      Pwl::Dialog::Password.new(self.class.name, "Please press the Cancel button.").get_input
    end
  end

  private

  def get_text(expected, dlg_class)
    assert_equal(expected, dlg_class.new(self.class.name, "Please enter the string '#{expected}' (without the quotes) and press Enter.").get_input)
  end
end


text:
#pragma once
#include <aws/fms/FMS_EXPORTS.h>
#include <aws/fms/FMSRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace FMS
{
namespace Model
{

  /**
   */
  class AWS_FMS_API GetComplianceDetailRequest : public FMSRequest
  {
  public:
    GetComplianceDetailRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "GetComplianceDetail"; }

    Aws::String SerializePayload() const override;

    Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline const Aws::String& GetPolicyId() const{ return m_policyId; }

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; }

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); }

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); }

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline GetComplianceDetailRequest& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;}

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline GetComplianceDetailRequest& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;}

    /**
     *
The ID of the policy that you want to get the details for.
     * PolicyId is returned by PutPolicy and by
     * ListPolicies.

     */
    inline GetComplianceDetailRequest& WithPolicyId(const char* value) { SetPolicyId(value); return *this;}

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline const Aws::String& GetMemberAccount() const{ return m_memberAccount; }

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline bool MemberAccountHasBeenSet() const { return m_memberAccountHasBeenSet; }

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline void SetMemberAccount(const Aws::String& value) { m_memberAccountHasBeenSet = true; m_memberAccount = value; }

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline void SetMemberAccount(Aws::String&& value) { m_memberAccountHasBeenSet = true; m_memberAccount = std::move(value); }

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline void SetMemberAccount(const char* value) { m_memberAccountHasBeenSet = true; m_memberAccount.assign(value); }

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline GetComplianceDetailRequest& WithMemberAccount(const Aws::String& value) { SetMemberAccount(value); return *this;}

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline GetComplianceDetailRequest& WithMemberAccount(Aws::String&& value) { SetMemberAccount(std::move(value)); return *this;}

    /**
     *
The AWS account that owns the resources that you want to get the details
     * for.

     */
    inline GetComplianceDetailRequest& WithMemberAccount(const char* value) { SetMemberAccount(value); return *this;}

  private:

    Aws::String m_policyId;
    bool m_policyIdHasBeenSet;

    Aws::String m_memberAccount;
    bool m_memberAccountHasBeenSet;
  };

} // namespace Model
} // namespace FMS
} // namespace Aws


text:
var profile = require('../../../lib/util/profile');

exports.getMockedProfile = function () {
  var newProfile = new profile.Profile();

  newProfile.addSubscription(new profile.Subscription({
    id: '2c224e7e-3ef5-431d-a57b-e71f4662e3a6',
    name: 'Node CLI Test',
    user: {
      name: 'user@domain.example',
      type: 'user'
    },
    tenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47',
    state: 'Enabled',
    registeredProviders: [],
    _eventsCount: '1',
    isDefault: true
  }, newProfile.environments['AzureCloud']));

  return newProfile;
};

exports.setEnvironment = function() {
  process.env['AZURE_VM_TEST_LOCATION'] = 'West US';
  process.env['AZURE_STORAGE_TEST_TYPE'] = 'LRS';
};

exports.scopes = [[function (nock) {
var result =
nock('http://management.core.windows.net:443')
  .filteringRequestBody(function (path) { return '*';})
.put('/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/services/networking/CliGtTestVnet9897/gateway/connection/CliGtTestLocNetwork5468/sharedkey', '*')
  .reply(202, "<GatewayOperationAsyncResponse xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><ID>a9a1af84-7be7-45da-baa5-337e0b11e9ba</ID></GatewayOperationAsyncResponse>", { 'cache-control': 'no-cache',
  'content-length': '210',
  'content-type': 'application/xml; charset=utf-8',
  server: '1.0.6198.357 (rd_rdfe_stable.160413-1538) Microsoft-HTTPAPI/2.0',
  'x-ms-servedbyregion': 'ussouth3',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-ms-request-id': 'c1e39d4bca9bad5e9f4043bfef8c8638',
  date: 'Mon, 25 Apr 2016 09:28:26 GMT',
  connection: 'close' });
 return result; },
function (nock) {
var result =
nock('https://management.core.windows.net:443')
  .filteringRequestBody(function (path) { return '*';})
.put('/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/services/networking/CliGtTestVnet9897/gateway/connection/CliGtTestLocNetwork5468/sharedkey', '*')
  .reply(202, "<GatewayOperationAsyncResponse xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><ID>a9a1af84-7be7-45da-baa5-337e0b11e9ba</ID></GatewayOperationAsyncResponse>", { 'cache-control': 'no-cache',
  'content-length': '210',
  'content-type': 'application/xml; charset=utf-8',
  server: '1.0.6198.357 (rd_rdfe_stable.160413-1538) Microsoft-HTTPAPI/2.0',
  'x-ms-servedbyregion': 'ussouth3',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-ms-request-id': 'c1e39d4bca9bad5e9f4043bfef8c8638',
  date: 'Mon, 25 Apr 2016 09:28:26 GMT',
  connection: 'close' });
 return result; },
function (nock) {
var result =
nock('http://management.core.windows.net:443')
  .get('/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/services/networking/operation/a9a1af84-7be7-45da-baa5-337e0b11e9ba')
  .reply(200, "<GatewayOperation xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><Data/><HealthStatus/><ID>a9a1af84-7be7-45da-baa5-337e0b11e9ba</ID><OperationName>ResetSharedKey</OperationName><OperationStartedTime>2016-04-25T09:28:24.9186233</OperationStartedTime><Status>InProgress</Status></GatewayOperation>", { 'cache-control': 'no-cache',
  'content-length': '350',
  'content-type': 'application/xml; charset=utf-8',
  server: '1.0.6198.357 (rd_rdfe_stable.160413-1538) Microsoft-HTTPAPI/2.0',
  'x-ms-servedbyregion': 'ussouth3',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-ms-request-id': '79336bbdfafea481930d6dcaba3b9a1e',
  date: 'Mon, 25 Apr 2016 09:28:59 GMT',
  connection: 'close' });
 return result; },
function (nock) {
var result =
nock('https://management.core.windows.net:443')
  .get('/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/services/networking/operation/a9a1af84-7be7-45da-baa5-337e0b11e9ba')
  .reply(200, "<GatewayOperation xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><Data/><HealthStatus/><ID>a9a1af84-7be7-45da-baa5-337e0b11e9ba</ID><OperationName>ResetSharedKey</OperationName><OperationStartedTime>2016-04-25T09:28:24.9186233</OperationStartedTime><Status>InProgress</Status></GatewayOperation>", { 'cache-control': 'no-cache',
  'content-length': '350',
  'content-type': 'application/xml; charset=utf-8',
  server: '1.0.6198.357 (rd_rdfe_stable.160413-1538) Microsoft-HTTPAPI/2.0',
  'x-ms-servedbyregion': 'ussouth3',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-ms-request-id': '79336bbdfafea481930d6dcaba3b9a1e',
  date: 'Mon, 25 Apr 2016 09:28:59 GMT',
  connection: 'close' });
 return result; },
function (nock) {
var result =
nock('http://management.core.windows.net:443')
  .get('/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/services/networking/operation/a9a1af84-7be7-45da-baa5-337e0b11e9ba')
  .reply(200, "<GatewayOperation xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><Data/><HealthStatus/><HttpStatusCode>OK</HttpStatusCode><ID>a9a1af84-7be7-45da-baa5-337e0b11e9ba</ID><OperationCompletedTime>2016-04-25T09:29:18.8033863</OperationCompletedTime><OperationName>ResetSharedKey</OperationName><OperationStartedTime>2016-04-25T09:28:24.9186233</OperationStartedTime><Status>Successful</Status></GatewayOperation>", { 'cache-control': 'no-cache',
  'content-length': '461',
  'content-type': 'application/xml; charset=utf-8',
  server: '1.0.6198.357 (rd_rdfe_stable.160413-1538) Microsoft-HTTPAPI/2.0',
  'x-ms-servedbyregion': 'ussouth3',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-ms-request-id': '56de34a1f50d95979b96678d5c75a984',
  date: 'Mon, 25 Apr 2016 09:29:29 GMT',
  connection: 'close' });
 return result; },
function (nock) {
var result =
nock('https://management.core.windows.net:443')
  .get('/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/services/networking/operation/a9a1af84-7be7-45da-baa5-337e0b11e9ba')
  .reply(200, "<GatewayOperation xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><Data/><HealthStatus/><HttpStatusCode>OK</HttpStatusCode><ID>a9a1af84-7be7-45da-baa5-337e0b11e9ba</ID><OperationCompletedTime>2016-04-25T09:29:18.8033863</OperationCompletedTime><OperationName>ResetSharedKey</OperationName><OperationStartedTime>2016-04-25T09:28:24.9186233</OperationStartedTime><Status>Successful</Status></GatewayOperation>", { 'cache-control': 'no-cache',
  'content-length': '461',
  'content-type': 'application/xml; charset=utf-8',
  server: '1.0.6198.357 (rd_rdfe_stable.160413-1538) Microsoft-HTTPAPI/2.0',
  'x-ms-servedbyregion': 'ussouth3',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-ms-request-id': '56de34a1f50d95979b96678d5c75a984',
  date: 'Mon, 25 Apr 2016 09:29:29 GMT',
  connection: 'close' });
 return result; }]];


text:
package com.example.android.horizontalpaging;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * Created by Pi on 25-May-15.
 */
public class f1 extends Fragment {

    public f1() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
        //Dummy just change the R.layout.f1 fragment in xml okay? add images and done... :)
        View rootView = inflater.inflate(R.layout.f1, container, false);
        return rootView;
    }
}


text:
package org.apache.drill.exec.expr.fn;

public class FunctionBody {
  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionBody.class);

  public static enum BodyType{
    SETUP, EVAL_INNER, EVAL_OUTER,
  }

}


text:
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var isWindows = process.platform === 'win32';
var util = require('util');

// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
  // if the path tries to go above the root, `up` ends up > 0
  var up = 0;
  for (var i = parts.length - 1; i >= 0; i--) {
    var last = parts[i];
    if (last == '.') {
      parts.splice(i, 1);
    } else if (last === '..') {
      parts.splice(i, 1);
      up++;
    } else if (up) {
      parts.splice(i, 1);
      up--;
    }
  }

  // if the path is allowed to go above the root, restore leading ..s
  if (allowAboveRoot) {
    for (; up--; up) {
      parts.unshift('..');
    }
  }

  return parts;
}

if (isWindows) {
  // Regex to split a windows path into three parts: [*, device, slash,
  // tail] windows-only
  var splitDeviceRe =
      /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?([\s\S]*?)$/;

  // Regex to split the tail part of the above into [*, dir, basename, ext]
  var splitTailRe =
      /^([\s\S]+[\\\/](?!$)|[\\\/])?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/\\]*)?)$/;

  // Function to split a filename into [root, dir, basename, ext]
  // windows version
  var splitPath = function(filename) {
    // Separate device+slash from tail
    var result = splitDeviceRe.exec(filename),
        device = (result[1] || '') + (result[2] || ''),
        tail = result[3] || '';
    // Split the tail into dir, basename and extension
    var result2 = splitTailRe.exec(tail),
        dir = result2[1] || '',
        basename = result2[2] || '',
        ext = result2[3] || '';
    return [device, dir, basename, ext];
  };

  // path.resolve([from ...], to)
  // windows version
  exports.resolve = function() {
    var resolvedDevice = '',
        resolvedTail = '',
        resolvedAbsolute = false;

    for (var i = arguments.length - 1; i >= -1; i--) {
      var path;
      if (i >= 0) {
        path = arguments[i];
      } else if (!resolvedDevice) {
        path = process.cwd();
      } else {
        // Windows has the concept of drive-specific current working
        // directories. If we've resolved a drive letter but not yet an
        // absolute path, get cwd for that drive. We're sure the device is not
        // an unc path at this points, because unc paths are always absolute.
        path = process.env['=' + resolvedDevice];
        // Verify that a drive-local cwd was found and that it actually points
        // to our drive. If not, default to the drive's root.
        if (!path || path.slice(0, 3).toLowerCase() !==
            resolvedDevice.toLowerCase() + '\\') {
          path = resolvedDevice + '\\';
        }
      }

      // Skip empty and invalid entries
      if (typeof path !== 'string' || !path) {
        continue;
      }

      var result = splitDeviceRe.exec(path),
          device = result[1] || '',
          isUnc = device && device.charAt(1) !== ':',
          isAbsolute = !!result[2] || isUnc, // UNC paths are always absolute
          tail = result[3];

      if (device &&
          resolvedDevice &&
          device.toLowerCase() !== resolvedDevice.toLowerCase()) {
        // This path points to another device so it is not applicable
        continue;
      }

      if (!resolvedDevice) {
        resolvedDevice = device;
      }
      if (!resolvedAbsolute) {
        resolvedTail = tail + '\\' + resolvedTail;
        resolvedAbsolute = isAbsolute;
      }

      if (resolvedDevice && resolvedAbsolute) {
        break;
      }
    }

    // Replace slashes (in UNC share name) by backslashes
    resolvedDevice = resolvedDevice.replace(/\//g, '\\');

    // At this point the path should be resolved to a full absolute path,
    // but handle relative paths to be safe (might happen when process.cwd()
    // fails)

    // Normalize the tail path

    function f(p) {
      return !!p;
    }

    resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/).filter(f),
                                  !resolvedAbsolute).join('\\');

    return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) ||
           '.';
  };

  // windows version
  exports.normalize = function(path) {
    var result = splitDeviceRe.exec(path),
        device = result[1] || '',
        isUnc = device && device.charAt(1) !== ':',
        isAbsolute = !!result[2] || isUnc, // UNC paths are always absolute
        tail = result[3],
        trailingSlash = /[\\\/]$/.test(tail);

    // Normalize the tail path
    tail = normalizeArray(tail.split(/[\\\/]+/).filter(function(p) {
      return !!p;
    }), !isAbsolute).join('\\');

    if (!tail && !isAbsolute) {
      tail = '.';
    }
    if (tail && trailingSlash) {
      tail += '\\';
    }

    // Convert slashes to backslashes when `device` points to an UNC root.
    device = device.replace(/\//g, '\\');

    return device + (isAbsolute ? '\\' : '') + tail;
  };

  // windows version
  exports.join = function() {
    function f(p) {
      return p && typeof p === 'string';
    }

    var paths = Array.prototype.slice.call(arguments, 0).filter(f);
    var joined = paths.join('\\');

    // Make sure that the joined path doesn't start with two slashes
    // - it will be mistaken for an unc path by normalize() -
    // unless the paths[0] also starts with two slashes
    if (/^[\\\/]{2}/.test(joined) && !/^[\\\/]{2}/.test(paths[0])) {
      joined = joined.slice(1);
    }

    return exports.normalize(joined);
  };

  // path.relative(from, to)
  // it will solve the relative path from 'from' to 'to', for instance:
  // from = 'C:\\orandea\\test\\aaa'
  // to = 'C:\\orandea\\impl\\bbb'
  // The output of the function should be: '..\\..\\impl\\bbb'
  // windows version
  exports.relative = function(from, to) {
    from = exports.resolve(from);
    to = exports.resolve(to);

    // windows is not case sensitive
    var lowerFrom = from.toLowerCase();
    var lowerTo = to.toLowerCase();

    function trim(arr) {
      var start = 0;
      for (; start < arr.length; start++) {
        if (arr[start] !== '') break;
      }

      var end = arr.length - 1;
      for (; end >= 0; end--) {
        if (arr[end] !== '') break;
      }

      if (start > end) return [];
      return arr.slice(start, end - start + 1);
    }

    var toParts = trim(to.split('\\'));

    var lowerFromParts = trim(lowerFrom.split('\\'));
    var lowerToParts = trim(lowerTo.split('\\'));

    var length = Math.min(lowerFromParts.length, lowerToParts.length);
    var samePartsLength = length;
    for (var i = 0; i < length; i++) {
      if (lowerFromParts[i] !== lowerToParts[i]) {
        samePartsLength = i;
        break;
      }
    }

    if (samePartsLength == 0) {
      return to;
    }

    var outputParts = [];
    for (var i = samePartsLength; i < lowerFromParts.length; i++) {
      outputParts.push('..');
    }

    outputParts = outputParts.concat(toParts.slice(samePartsLength));

    return outputParts.join('\\');
  };

  exports.sep = '\\';

} else /* posix */ {

  // Split a filename into [root, dir, basename, ext], unix version
  // 'root' is just a slash, or nothing.
  var splitPathRe =
      /^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/;
  var splitPath = function(filename) {
    var result = splitPathRe.exec(filename);
    return [result[1] || '', result[2] || '', result[3] || '', result[4] || ''];
  };

  // path.resolve([from ...], to)
  // posix version
  exports.resolve = function() {
    var resolvedPath = '',
        resolvedAbsolute = false;

    for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
      var path = (i >= 0) ? arguments[i] : process.cwd();

      // Skip empty and invalid entries
      if (typeof path !== 'string' || !path) {
        continue;
      }

      resolvedPath = path + '/' + resolvedPath;
      resolvedAbsolute = path.charAt(0) === '/';
    }

    // At this point the path should be resolved to a full absolute path, but
    // handle relative paths to be safe (might happen when process.cwd() fails)

    // Normalize the path
    resolvedPath = normalizeArray(resolvedPath.split('/').filter(function(p) {
      return !!p;
    }), !resolvedAbsolute).join('/');

    return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  };

  // path.normalize(path)
  // posix version
  exports.normalize = function(path) {
    var isAbsolute = path.charAt(0) === '/',
        trailingSlash = path.slice(-1) === '/';

    // Normalize the path
    path = normalizeArray(path.split('/').filter(function(p) {
      return !!p;
    }), !isAbsolute).join('/');

    if (!path && !isAbsolute) {
      path = '.';
    }
    if (path && trailingSlash) {
      path += '/';
    }

    return (isAbsolute ? '/' : '') + path;
  };

  // posix version
  exports.join = function() {
    var paths = Array.prototype.slice.call(arguments, 0);
    return exports.normalize(paths.filter(function(p, index) {
      return p && typeof p === 'string';
    }).join('/'));
  };

  // path.relative(from, to)
  // posix version
  exports.relative = function(from, to) {
    from = exports.resolve(from).substr(1);
    to = exports.resolve(to).substr(1);

    function trim(arr) {
      var start = 0;
      for (; start < arr.length; start++) {
        if (arr[start] !== '') break;
      }

      var end = arr.length - 1;
      for (; end >= 0; end--) {
        if (arr[end] !== '') break;
      }

      if (start > end) return [];
      return arr.slice(start, end - start + 1);
    }

    var fromParts = trim(from.split('/'));
    var toParts = trim(to.split('/'));

    var length = Math.min(fromParts.length, toParts.length);
    var samePartsLength = length;
    for (var i = 0; i < length; i++) {
      if (fromParts[i] !== toParts[i]) {
        samePartsLength = i;
        break;
      }
    }

    var outputParts = [];
    for (var i = samePartsLength; i < fromParts.length; i++) {
      outputParts.push('..');
    }

    outputParts = outputParts.concat(toParts.slice(samePartsLength));

    return outputParts.join('/');
  };

  exports.sep = '/';
}

exports.dirname = function(path) {
  var result = splitPath(path),
      root = result[0],
      dir = result[1];

  if (!root && !dir) {
    // No dirname whatsoever
    return '.';
  }

  if (dir) {
    // It has a dirname, strip trailing slash
    dir = dir.substring(0, dir.length - 1);
  }

  return root + dir;
};

exports.basename = function(path, ext) {
  var f = splitPath(path)[2];
  // TODO: make this comparison case-insensitive on windows?
  if (ext && f.substr(-1 * ext.length) === ext) {
    f = f.substr(0, f.length - ext.length);
  }
  return f;
};

exports.extname = function(path) {
  return splitPath(path)[3];
};

exports.exists = util.deprecate(function(path, callback) {
  require('fs').exists(path, callback);
}, 'path.exists is now called `fs.exists`.');

exports.existsSync = util.deprecate(function(path) {
  return require('fs').existsSync(path);
}, 'path.existsSync is now called `fs.existsSync`.');

if (isWindows) {
  exports._makeLong = function(path) {
    path = '' + path;
    if (!path) {
      return '';
    }

    var resolvedPath = exports.resolve(path);

    if (resolvedPath.match(/^[a-zA-Z]\:\\/)) {
      // path is local filesystem path, which needs to be converted
      // to long UNC path.
      return '\\\\?\\' + resolvedPath;
    } else if (resolvedPath.match(/^\\\\[^?.]/)) {
      // path is network UNC path, which needs to be converted
      // to long UNC path.
      return '\\\\?\\UNC\\' + resolvedPath.substring(2);
    }

    return path;
  };
} else {
  exports._makeLong = function(path) {
    return path;
  };
}


text:
Algorithm Challenger.

#Category
##major> cs> computer-science-journals-and-conferences >
###Computer Science Journals & Conferences to be added to Algorithm Challenger Github project:

#Topics
##Category/Class
###Journals/Conferences/Github

#Computer Sciences
##Journal/C
###- [ ] International Journal of Foundations of Computer Science
###- [ ] Discrete Event Dynamic Systems – Theory and Applications
###- [ ] Formal Methods in System Design
###- [ ] Higher-Order and Symbolic Computation
###- [ ] Archive for Mathematical Logic


text:
extern "C" {
#endif  // __cplusplus

typedef HASH_CTX LITE_SHA256_CTX;

void SHA256_init(LITE_SHA256_CTX *ctx);
void SHA256_update(LITE_SHA256_CTX *ctx, const void *data, size_t len);
const uint8_t *SHA256_final(LITE_SHA256_CTX *ctx);

// Convenience method. Returns digest address.
const uint8_t *SHA256_hash(const void *data, size_t len, uint8_t *digest);

#define SHA256_DIGEST_SIZE 32

#ifdef __cplusplus
}
#endif  // __cplusplus

#endif  // OPENTITAN_HW_IP_HMAC_DV_CRYPTOC_DPI_SHA256_H_


text:
package sql

import (
	"database/sql/driver"
	"fmt"
	"reflect"
	"regexp"
	"time"
	"unicode"
)

var (
	sqlRegexp                = regexp.MustCompile(`\?`)
	numericPlaceHolderRegexp = regexp.MustCompile(`\$\d+`)
)

func SqlParse(sql string, vars []interface{}) string {
	var (
		sqlStr          string
		formattedValues []string
	)
	for _, value := range vars {
		indirectValue := reflect.Indirect(reflect.ValueOf(value))
		if indirectValue.IsValid() {
			value = indirectValue.Interface()
			if t, ok := value.(time.Time); ok {
				formattedValues = append(formattedValues, fmt.Sprintf("'%v'", t.Format("2006-01-02 15:04:05")))
			} else if b, ok := value.([]byte); ok {
				if str := string(b); isPrintable(str) {
					formattedValues = append(formattedValues, fmt.Sprintf("'%v'", str))
				} else {
					formattedValues = append(formattedValues, "'<binary>'")
				}
			} else if r, ok := value.(driver.Valuer); ok {
				if value, err := r.Value(); err == nil && value != nil {
					formattedValues = append(formattedValues, fmt.Sprintf("'%v'", value))
				} else {
					formattedValues = append(formattedValues, "NULL")
				}
			} else {
				formattedValues = append(formattedValues, fmt.Sprintf("'%v'", value))
			}
		} else {
			formattedValues = append(formattedValues, "NULL")
		}
	}

	// differentiate between $n placeholders or else treat like ?
	if numericPlaceHolderRegexp.MatchString(sql) {
		sqlStr = sql
		for index, value := range formattedValues {
			placeholder := fmt.Sprintf(`\$%d`, index+1)
			sqlStr = regexp.MustCompile(placeholder).ReplaceAllString(sqlStr, value)
		}
	} else {
		formattedValuesLength := len(formattedValues)
		for index, value := range sqlRegexp.Split(sql, -1) {
			sqlStr += value
			if index < formattedValuesLength {
				sqlStr += formattedValues[index]
			}
		}

	}

	return sqlStr
}

func isPrintable(s string) bool {
	for _, r := range s {
		if !unicode.IsPrint(r) {
			return false
		}
	}
	return true
}


text:
namespace blink {

// static
PermissionStatus* PermissionStatus::take(ScriptPromiseResolver* resolver,
                                         MojoPermissionStatus status,
                                         MojoPermissionDescriptor descriptor) {
  return PermissionStatus::createAndListen(resolver->getExecutionContext(),
                                           status, std::move(descriptor));
}

PermissionStatus* PermissionStatus::createAndListen(
    ExecutionContext* executionContext,
    MojoPermissionStatus status,
    MojoPermissionDescriptor descriptor) {
  PermissionStatus* permissionStatus =
      new PermissionStatus(executionContext, status, std::move(descriptor));
  permissionStatus->suspendIfNeeded();
  permissionStatus->startListening();
  return permissionStatus;
}

PermissionStatus::PermissionStatus(ExecutionContext* executionContext,
                                   MojoPermissionStatus status,
                                   MojoPermissionDescriptor descriptor)
    : ActiveScriptWrappable(this),
      ActiveDOMObject(executionContext),
      m_status(status),
      m_descriptor(std::move(descriptor)) {}

PermissionStatus::~PermissionStatus() {
  stopListening();
}

const AtomicString& PermissionStatus::interfaceName() const {
  return EventTargetNames::PermissionStatus;
}

ExecutionContext* PermissionStatus::getExecutionContext() const {
  return ActiveDOMObject::getExecutionContext();
}

void PermissionStatus::permissionChanged(MojoPermissionStatus status) {
  if (m_status == status)
    return;

  m_status = status;
  dispatchEvent(Event::create(EventTypeNames::change));

  m_service->GetNextPermissionChange(
      m_descriptor->Clone(), getExecutionContext()->getSecurityOrigin(),
      m_status,
      convertToBaseCallback(WTF::bind(&PermissionStatus::permissionChanged,
                                      wrapWeakPersistent(this))));
}

bool PermissionStatus::hasPendingActivity() const {
  return m_service;
}

void PermissionStatus::resume() {
  startListening();
}

void PermissionStatus::suspend() {
  stopListening();
}

void PermissionStatus::contextDestroyed() {
  stopListening();
}

void PermissionStatus::startListening() {
  DCHECK(!m_service);
  connectToPermissionService(getExecutionContext(), mojo::GetProxy(&m_service));
  m_service->GetNextPermissionChange(
      m_descriptor->Clone(), getExecutionContext()->getSecurityOrigin(),
      m_status,
      convertToBaseCallback(WTF::bind(&PermissionStatus::permissionChanged,
                                      wrapWeakPersistent(this))));
}

void PermissionStatus::stopListening() {
  m_service.reset();
}

String PermissionStatus::state() const {
  switch (m_status) {
    case MojoPermissionStatus::GRANTED:
      return "granted";
    case MojoPermissionStatus::DENIED:
      return "denied";
    case MojoPermissionStatus::ASK:
      return "prompt";
  }

  ASSERT_NOT_REACHED();
  return "denied";
}

DEFINE_TRACE(PermissionStatus) {
  EventTargetWithInlineData::trace(visitor);
  ActiveDOMObject::trace(visitor);
}

}  // namespace blink


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Lilloa 22: 201 (1951)

#### Original name
Melanoleuca margarita Murrill

### Remarks
null


text:
module EsHero
  class HomeController < ActionController::Base
    layout false

    protect_from_forgery with: :exception

    http_basic_authenticate_with name: ENV["ESHERO_USERNAME"], password: ENV["ESHERO_PASSWORD"] if ENV["ESHERO_PASSWORD"]

    def index
      @nodes = EsHero.nodes
      @indices = EsHero.indices
    end
  end
end


text:
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;

namespace DotNetTor.Tests
{
	// Make sure Tor is in your path and it's not running
	public class TorControlClientTests : IClassFixture<SharedFixture>
	{
		private SharedFixture SharedFixture { get; }

		public TorControlClientTests(SharedFixture fixture)
		{
			SharedFixture = fixture;
		}

		[Fact]
		private async Task IsCircuitEstablishedAsync()
		{
			var controlPortClient = new TorControlClient(SharedFixture.HostAddress, SharedFixture.ControlPort, SharedFixture.ControlPortPassword);
			var yes = await controlPortClient.IsCircuitEstablishedAsync();
			Assert.True(yes);
		}

		[Fact]
	    private async Task CanChangeCircuitMultipleTimesAsync()
	    {
		    var requestUri = "https://api.ipify.org/";

		    // 1. Get Tor IP
		    IPAddress currIp = await GetTorIpAsync(requestUri);

		    var controlPortClient = new TorControlClient(SharedFixture.HostAddress, SharedFixture.ControlPort, SharedFixture.ControlPortPassword);
		    for (int i = 0; i < 3; i++)
		    {
			    IPAddress prevIp = currIp;
			    // Change Tor IP

			    await controlPortClient.ChangeCircuitAsync();

			    // Get changed Tor IP
			    currIp = await GetTorIpAsync(requestUri);

			    Assert.NotEqual(prevIp, currIp);
		    }
	    }

	    private async Task<IPAddress> GetTorIpAsync(string requestUri)
	    {
			var handler = new TorSocks5Handler(SharedFixture.TorSock5EndPoint);

			IPAddress torIp;
		    using (var httpClient = new HttpClient(handler))
		    {
			    var content =
				    await (await httpClient.GetAsync(requestUri)).Content.ReadAsStringAsync();
			    var gotIp = IPAddress.TryParse(content.Replace("\n", ""), out torIp);
			    Assert.True(gotIp);
		    }
		    return torIp;
	    }

	    [Fact]
	    private async Task CanChangeCircuitAsync()
	    {
		    var requestUri = "https://api.ipify.org/";
		    IPAddress torIp;
		    IPAddress changedIp;

			// 1. Get Tor IP
			var handler = new TorSocks5Handler(SharedFixture.TorSock5EndPoint);
			using (var httpClient = new HttpClient(handler))
			{
				var content = await (await httpClient.GetAsync(requestUri)).Content.ReadAsStringAsync();
				var gotIp = IPAddress.TryParse(content.Replace("\n", ""), out torIp);
				Assert.True(gotIp);
			}

			// 2. Change Tor IP
			var controlPortClient = new TorControlClient(SharedFixture.HostAddress, SharedFixture.ControlPort, SharedFixture.ControlPortPassword);
			await controlPortClient.ChangeCircuitAsync();

			// 3. Get changed Tor IP
			var handler2 = new TorSocks5Handler(SharedFixture.TorSock5EndPoint);
			using (var httpClient = new HttpClient(handler2))
			{
				var content = await (await httpClient.GetAsync(requestUri)).Content.ReadAsStringAsync();
				var gotIp = IPAddress.TryParse(content.Replace("\n", ""), out changedIp);
				Assert.True(gotIp);
			}

		    Assert.NotEqual(changedIp, torIp);
	    }

		[Fact]
		private async Task CanSendCustomCommandAsync()
		{
			var controlPortClient = new TorControlClient(SharedFixture.HostAddress, SharedFixture.ControlPort, SharedFixture.ControlPortPassword);
			var res = await controlPortClient.SendCommandAsync("GETCONF SOCKSPORT");
			res = res.Replace('-', ' ');
			Assert.StartsWith("250 SocksPort", res);
		}

		[Fact]
		private async Task CanChangeCircuitWithinSameHttpClientAsync()
		{
			var requestUri = "https://api.ipify.org/";
			IPAddress torIp;
			IPAddress changedIp;

			// 1. Get Tor IP
			var handler = new TorSocks5Handler(SharedFixture.TorSock5EndPoint);
			using (var httpClient = new HttpClient(handler))
			{
				var content =
					await (await httpClient.GetAsync(requestUri)).Content.ReadAsStringAsync()
						;
				var gotIp = IPAddress.TryParse(content.Replace("\n", ""), out torIp);
				Assert.True(gotIp);

				// 2. Change Tor IP
				var controlPortClient = new TorControlClient(SharedFixture.HostAddress, SharedFixture.ControlPort, SharedFixture.ControlPortPassword);
				await controlPortClient.ChangeCircuitAsync();

				// 3. Get changed Tor IP
				content =
					await (await httpClient.GetAsync(requestUri)).Content.ReadAsStringAsync()
						;
				gotIp = IPAddress.TryParse(content.Replace("\n", ""), out changedIp);
				Assert.True(gotIp);
			}

			Assert.NotEqual(changedIp, torIp);
		}
	}
}


text:
FILE(REMOVE_RECURSE
  "CMakeFiles/pch_Generate_opencv_perf_cudaoptflow"
  "perf_precomp.hpp.gch/opencv_perf_cudaoptflow_Release.gch"
  "perf_precomp.hpp"
)

# Per-language clean rules from dependency scanning.
FOREACH(lang)
  INCLUDE(CMakeFiles/pch_Generate_opencv_perf_cudaoptflow.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)


text:
namespace TorneoPredicciones.Models
{
   public  class TournamentTeam
    {
        public int TournamentTeamId { get; set; }

        public int TournamentGroupId { get; set; }

        public int TeamId { get; set; }

        public int MatchesPlayed { get; set; }

        public int MatchesWon { get; set; }

        public int MatchesLost { get; set; }

        public int MatchesTied { get; set; }

        public int FavorGoals { get; set; }

        public int AgainstGoals { get; set; }

        public int Points { get; set; }

        public int Position { get; set; }

        public Team Team { get; set; }
        public int DifferenceGoals { get { return FavorGoals - AgainstGoals; } }
    }
}


text:
'use strict';var lang_1 = require('angular2/src/facade/lang');
var TextAst = (function () {
    function TextAst(value, ngContentIndex, sourceInfo) {
        this.value = value;
        this.ngContentIndex = ngContentIndex;
        this.sourceInfo = sourceInfo;
    }
    TextAst.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
    return TextAst;
})();
exports.TextAst = TextAst;
var BoundTextAst = (function () {
    function BoundTextAst(value, ngContentIndex, sourceInfo) {
        this.value = value;
        this.ngContentIndex = ngContentIndex;
        this.sourceInfo = sourceInfo;
    }
    BoundTextAst.prototype.visit = function (visitor, context) {
        return visitor.visitBoundText(this, context);
    };
    return BoundTextAst;
})();
exports.BoundTextAst = BoundTextAst;
var AttrAst = (function () {
    function AttrAst(name, value, sourceInfo) {
        this.name = name;
        this.value = value;
        this.sourceInfo = sourceInfo;
    }
    AttrAst.prototype.visit = function (visitor, context) { return visitor.visitAttr(this, context); };
    return AttrAst;
})();
exports.AttrAst = AttrAst;
var BoundElementPropertyAst = (function () {
    function BoundElementPropertyAst(name, type, value, unit, sourceInfo) {
        this.name = name;
        this.type = type;
        this.value = value;
        this.unit = unit;
        this.sourceInfo = sourceInfo;
    }
    BoundElementPropertyAst.prototype.visit = function (visitor, context) {
        return visitor.visitElementProperty(this, context);
    };
    return BoundElementPropertyAst;
})();
exports.BoundElementPropertyAst = BoundElementPropertyAst;
var BoundEventAst = (function () {
    function BoundEventAst(name, target, handler, sourceInfo) {
        this.name = name;
        this.target = target;
        this.handler = handler;
        this.sourceInfo = sourceInfo;
    }
    BoundEventAst.prototype.visit = function (visitor, context) {
        return visitor.visitEvent(this, context);
    };
    Object.defineProperty(BoundEventAst.prototype, "fullName", {
        get: function () {
            if (lang_1.isPresent(this.target)) {
                return this.target + ":" + this.name;
            }
            else {
                return this.name;
            }
        },
        enumerable: true,
        configurable: true
    });
    return BoundEventAst;
})();
exports.BoundEventAst = BoundEventAst;
var VariableAst = (function () {
    function VariableAst(name, value, sourceInfo) {
        this.name = name;
        this.value = value;
        this.sourceInfo = sourceInfo;
    }
    VariableAst.prototype.visit = function (visitor, context) {
        return visitor.visitVariable(this, context);
    };
    return VariableAst;
})();
exports.VariableAst = VariableAst;
var ElementAst = (function () {
    function ElementAst(name, attrs, inputs, outputs, exportAsVars, directives, children, ngContentIndex, sourceInfo) {
        this.name = name;
        this.attrs = attrs;
        this.inputs = inputs;
        this.outputs = outputs;
        this.exportAsVars = exportAsVars;
        this.directives = directives;
        this.children = children;
        this.ngContentIndex = ngContentIndex;
        this.sourceInfo = sourceInfo;
    }
    ElementAst.prototype.visit = function (visitor, context) {
        return visitor.visitElement(this, context);
    };
    ElementAst.prototype.isBound = function () {
        return (this.inputs.length > 0 || this.outputs.length > 0 || this.exportAsVars.length > 0 ||
            this.directives.length > 0);
    };
    ElementAst.prototype.getComponent = function () {
        return this.directives.length > 0 && this.directives[0].directive.isComponent ?
            this.directives[0].directive :
            null;
    };
    return ElementAst;
})();
exports.ElementAst = ElementAst;
var EmbeddedTemplateAst = (function () {
    function EmbeddedTemplateAst(attrs, outputs, vars, directives, children, ngContentIndex, sourceInfo) {
        this.attrs = attrs;
        this.outputs = outputs;
        this.vars = vars;
        this.directives = directives;
        this.children = children;
        this.ngContentIndex = ngContentIndex;
        this.sourceInfo = sourceInfo;
    }
    EmbeddedTemplateAst.prototype.visit = function (visitor, context) {
        return visitor.visitEmbeddedTemplate(this, context);
    };
    return EmbeddedTemplateAst;
})();
exports.EmbeddedTemplateAst = EmbeddedTemplateAst;
var BoundDirectivePropertyAst = (function () {
    function BoundDirectivePropertyAst(directiveName, templateName, value, sourceInfo) {
        this.directiveName = directiveName;
        this.templateName = templateName;
        this.value = value;
        this.sourceInfo = sourceInfo;
    }
    BoundDirectivePropertyAst.prototype.visit = function (visitor, context) {
        return visitor.visitDirectiveProperty(this, context);
    };
    return BoundDirectivePropertyAst;
})();
exports.BoundDirectivePropertyAst = BoundDirectivePropertyAst;
var DirectiveAst = (function () {
    function DirectiveAst(directive, inputs, hostProperties, hostEvents, exportAsVars, sourceInfo) {
        this.directive = directive;
        this.inputs = inputs;
        this.hostProperties = hostProperties;
        this.hostEvents = hostEvents;
        this.exportAsVars = exportAsVars;
        this.sourceInfo = sourceInfo;
    }
    DirectiveAst.prototype.visit = function (visitor, context) {
        return visitor.visitDirective(this, context);
    };
    return DirectiveAst;
})();
exports.DirectiveAst = DirectiveAst;
var NgContentAst = (function () {
    function NgContentAst(index, ngContentIndex, sourceInfo) {
        this.index = index;
        this.ngContentIndex = ngContentIndex;
        this.sourceInfo = sourceInfo;
    }
    NgContentAst.prototype.visit = function (visitor, context) {
        return visitor.visitNgContent(this, context);
    };
    return NgContentAst;
})();
exports.NgContentAst = NgContentAst;
(function (PropertyBindingType) {
    PropertyBindingType[PropertyBindingType["Property"] = 0] = "Property";
    PropertyBindingType[PropertyBindingType["Attribute"] = 1] = "Attribute";
    PropertyBindingType[PropertyBindingType["Class"] = 2] = "Class";
    PropertyBindingType[PropertyBindingType["Style"] = 3] = "Style";
})(exports.PropertyBindingType || (exports.PropertyBindingType = {}));
var PropertyBindingType = exports.PropertyBindingType;
function templateVisitAll(visitor, asts, context) {
    if (context === void 0) { context = null; }
    var result = [];
    asts.forEach(function (ast) {
        var astResult = ast.visit(visitor, context);
        if (lang_1.isPresent(astResult)) {
            result.push(astResult);
        }
    });
    return result;
}
exports.templateVisitAll = templateVisitAll;
//# sourceMappingURL=template_ast.js.map


text:
package org.oryxeditor.server.diagram.label;

import java.util.HashMap;
import java.util.Map;

import org.oryxeditor.server.diagram.Point;
import org.oryxeditor.server.diagram.label.Anchors.Anchor;
import org.oryxeditor.server.diagram.util.NumberUtil;

/**
 * Contains information on how to position a certain label and the label's style
 * There are several modes of positioning, each setting/reading a different subset of the data:
 *

 *
 absolute position (position)
 * 			the text is positioned at the coordinates given by {@link #getPosition()}
 *
 edge position (edge position)
 * 			the text is positioned at the relative position along an edge given by {@link #getEdgePos()}
 *
 reference point (position, orientation, distance, from, to)
 * 			the text is positioned at the point that satisfies the following criteria:
 *

 *
 its on a vector thats orthogonal to the edge segment defined by {@link #getFrom()} and {@link #getTo()}
 *
 the base point of that vector is at the coordinates given by {@link #getPosition()}
 *
 the length of that vector equals {@link #getDistance()}
 *
 the end point of the vector points to the corner of the text's bounding box as defined by {@link #getOrientation()}
 *

 *

 *
 * The rest of the data not mentioned above is applied independently of the positioning mode
 *
 * @author philipp.maschke
 *
 */
public class LabelSettings {

	private HorizontalAlign alignHorizontal;
	private VerticalAlign alignVertical;
	private Anchors anchors;
	private EdgePosition edgePos;
	private LabelOrientation orientation;
	private Point position;
	private Float distance;
	private String reference;
	private Integer from;
	private Integer to;
	private LabelStyle style;

	public LabelSettings(){

	}

	public LabelSettings(Map<String, String> labelMap){
		this();
		Double double1 = NumberUtil.createDouble(labelMap.get("x"));
		Double double2 = NumberUtil.createDouble(labelMap.get("y"));
		if (double1 != null && double2 != null)
			position = new Point(double1, double2);

		distance = NumberUtil.createFloat(labelMap.get("distance"));
		reference = labelMap.get("ref");
		from = NumberUtil.createInt(labelMap.get("from"));
		to = NumberUtil.createInt(labelMap.get("to"));
		if (labelMap.get("align") != null)
		alignHorizontal = HorizontalAlign.fromString(labelMap.get("align"));
		if (labelMap.get("valign") != null)
		alignVertical = VerticalAlign.fromString(labelMap.get("valign"));
		if (labelMap.get("edge") != null)
		edgePos = EdgePosition.fromString(labelMap.get("edge"));
		if (labelMap.get("orientation") != null)
		orientation = LabelOrientation.fromString(labelMap.get("orientation"));

		anchors = new Anchors();
		if (Boolean.getBoolean(labelMap.get("top")))
			anchors.addAnchor(Anchor.TOP);
		if (Boolean.getBoolean(labelMap.get("right")))
			anchors.addAnchor(Anchor.RIGHT);
		if (Boolean.getBoolean(labelMap.get("bottom")))
			anchors.addAnchor(Anchor.BOTTOM);
		if (Boolean.getBoolean(labelMap.get("left")))
			anchors.addAnchor(Anchor.LEFT);

		//TODO style
	}

	/**
	 * Horizontal alignment of the text, relative to its position
	 * @return
	 */
	public HorizontalAlign getAlignHorizontal() {
		return alignHorizontal;
	}
	/**
	 * Horizontal alignment of the text, relative to its position
	 * @param alignHorizontal
	 */
	public void setAlignHorizontal(HorizontalAlign alignHorizontal) {
		this.alignHorizontal = alignHorizontal;
	}

	/**
	 * Vertical alignment of the text, relative to its position
	 * @return
	 */
	public VerticalAlign getAlignVertical() {
		return alignVertical;
	}
	/**
	 * Vertical alignment of the text, relative to its position
	 * @param alignVertical
	 */
	public void setAlignVertical(VerticalAlign alignVertical) {
		this.alignVertical = alignVertical;
	}

	/**
	 * Layout anchors that determine to which side(s) of the parent shape the label will have a fixed distance
	 * @return
	 */
	public Anchors getAnchors() {
		return anchors;
	}
	/**
	 * Layout anchors that determine to which side(s) of the parent shape the label will have a fixed distance
	 * @param anchors
	 */
	public void setAnchors(Anchors anchors) {
		this.anchors = anchors;
	}

	/**
	 * General position along an edge that this label should have
	 * @return
	 */
	public EdgePosition getEdgePos() {
		return edgePos;
	}
	/**
	 * General position along an edge that this label should have
	 * @param edgePos
	 */
	public void setEdgePos(EdgePosition edgePos) {
		this.edgePos = edgePos;
	}

	/**
	 * Which corner of the label should be placed at the reference point
	 * @return
	 */
	public LabelOrientation getOrientation() {
		return orientation;
	}
	/**
	 * Which corner of the label should be placed at the reference point
	 * @param orientation
	 */
	public void setOrientation(LabelOrientation orientation) {
		this.orientation = orientation;
	}

	/**
	 * Depending on the mode of positioning this is either the final text position or
	 * the reference point along the edge that this label belongs to
	 * @return
	 */
	public Point getPosition() {
		return position;
	}
	/**
	 * Depending on the mode of positioning this is either the final text position or
	 * the reference point along the edge that this label belongs to
	 * @param position
	 */
	public void setPosition(Point position) {
		this.position = position;
	}

	/**
	 * Distance between the reference point and the actual text position
	 * @return
	 */
	public Float getDistance() {
		return distance;
	}
	/**
	 * Distance between the reference point and the actual text position
	 * @param distance
	 */
	public void setDistance(Float distance) {
		this.distance = distance;
	}

	/**
	 * Id of the label that should be repositioned
	 * @return
	 */
	public String getReference() {
		return reference;
	}
	/**
	 * Id of the label that should be repositioned
	 * @param reference
	 */
	public void setReference(String reference) {
		this.reference = reference;
	}

	/**
	 * Index of the edge docker, which marks the beginning of the segment where the reference point is situated
	 * @return
	 */
	public Integer getFrom() {
		return from;
	}
	/**
	 * Index of the edge docker, which marks the beginning of the segment where the reference point is situated
	 * @param from
	 */
	public void setFrom(Integer from) {
		this.from = from;
	}

	/**
	 * Index of the edge docker, which marks the end of the segment where the reference point is situated
	 * @return
	 */
	public Integer getTo() {
		return to;
	}
	/**
	 * Index of the edge docker, which marks the end of the segment where the reference point is situated
	 * @param to
	 */
	public void setTo(Integer to) {
		this.to = to;
	}

	/**
	 * Style settings for this label
	 * @param style
	 */
	public void setStyle(LabelStyle style) {
		this.style = style;
	}
	/**
	 * Style settings for this label
	 * @return
	 */
	public LabelStyle getStyle() {
		return style;
	}

	/**
	 * Whether there are any settings for positioning. Returns true if at least one of the following is not null:
	 *

	 *
 position
	 *
 orientation
	 *
 edge position
	 *
 distance
	 *
 from
	 *
 to
	 *

	 *
	 * @return
	 */
	public boolean hasPositioningInfo(){
		return getDistance() != null || getEdgePos() != null || getFrom() != null ||
			getOrientation() != null || getPosition() != null || getTo() != null;
	}

	public Map<String,String> getSettingsMap(){
		Map<String,String> map = new HashMap<String, String>();

		if (position != null){
			map.put("x", position.getX().toString());
			map.put("y", position.getY().toString());
		}
		if (distance != null)
			map.put("distance", distance.toString());

		if (reference != null)
		map.put("ref", reference);

		if (from != null)
		map.put("from", from.toString());

		if (to != null)
		map.put("to", to.toString());

		if (alignHorizontal != null)
		map.put("align", alignHorizontal.toString());

		if (alignVertical != null)
		map.put("valign", alignVertical.toString());

		if (edgePos != null)
		map.put("edge", edgePos.toString());

		if (orientation != null)
		map.put("orientation", orientation.toString());

		if (anchors != null)
		map.put("left", String.valueOf(anchors.contains(Anchor.LEFT)));
		map.put("top", String.valueOf(anchors.contains(Anchor.TOP)));
		map.put("right", String.valueOf(anchors.contains(Anchor.RIGHT)));
		map.put("bottom", String.valueOf(anchors.contains(Anchor.BOTTOM)));

		return map;
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace IDEIMusic
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IIDEIMusicService" in both code and config file together.
    [ServiceContract]
    public interface IIDEIMusicService
    {
        [OperationContract]
        void DoWork();
        [OperationContract]
        string Test();
        [OperationContract]
        string verifyAPI(string adminLojaID, string api_key);
        [OperationContract]
        string getAPI_KEY(string adminLojaID);
        [OperationContract]
        string getAllAbums(string api_key);
        [OperationContract]
        string RegisterSale(string inputJSON);
        [OperationContract]
        string updateAlbumStock(string api_key, int albumID, int quantity);
    }
}


text:
{%- assign _author = include.author -%}

    {%- if _author.url -%}
      <link itemprop="url" href="{{ _author.url }}">
    {%- endif -%}

    {%- include snippets/locale-to-string.html locale=site.data.locale.EMAIL_ME -%}
    {%- if _author.email -%}

    {%- endif -%}

    {%- include snippets/locale-to-string.html locale=site.data.locale.FOLLOW_ME -%}

    {%- if _author.weibo -%}

{%- include svg/icon/social/weibo.svg -%}

    {%- endif -%}

    {%- if _author.facebook -%}

{%- include svg/icon/social/facebook.svg -%}

    {%- endif -%}

    {%- if _author.twitter -%}

{%- include svg/icon/social/twitter.svg -%}

    {%- endif -%}

    {%- if _author.googleplus -%}

{%- include svg/icon/social/googleplus.svg -%}

    {%- endif -%}

    {%- if _author.github -%}

{%- include svg/icon/social/github.svg -%}

    {%- endif -%}

    {%- if _author.linkedin -%}

{%- include svg/icon/social/linkedin.svg -%}

    {%- endif -%}

    {%- if _author.douban -%}

{%- include svg/icon/social/douban.svg -%}

    {%- endif -%}

    {%- if _author.npm -%}

{%- include svg/icon/social/npm.svg -%}

    {%- endif -%}


text:
package com.lightbend.lagom.internal.persistence.cassandra

import java.net.InetSocketAddress
import java.net.URI

import scala.collection.immutable
import scala.concurrent.{ ExecutionContext, Future, Promise }
import scala.concurrent.duration._
import scala.util.control.NoStackTrace

import akka.actor.ActorSystem
import akka.persistence.cassandra.ConfigSessionProvider
import com.typesafe.config.Config
import play.api.Logger

/**
 * Internal API
 */
private[lagom] final class ServiceLocatorSessionProvider(system: ActorSystem, config: Config)
  extends ConfigSessionProvider(system, config) {

  private val log = Logger(getClass)

  override def lookupContactPoints(clusterId: String)(implicit ec: ExecutionContext): Future[immutable.Seq[InetSocketAddress]] = {
    ServiceLocatorHolder(system).serviceLocatorEventually flatMap { serviceLocator =>
      serviceLocator.locate(clusterId).map {
        case Some(uri) =>
          log.debug(s"Found Cassandra contact points: $uri")
          require(uri.getHost != null, s"missing host in $uri for Cassandra contact points $clusterId")
          require(uri.getPort != -1, s"missing port in $uri for Cassandra contact points $clusterId")
          List(new InetSocketAddress(uri.getHost, uri.getPort))
        case _ => throw new NoContactPointsException(s"No contact points for [$clusterId]")
      }
    }
  }
}

private[lagom] final class NoContactPointsException(msg: String) extends RuntimeException(msg) with NoStackTrace


text:
newproperty(:started) do
  include EasyType

  desc 'Specifies the initial operating state of a targeted messaging bridge instance.'
  newvalues(1, 0)

  to_translate_to_resource do | raw_resource|
    raw_resource['started']
  end
end


text:
define([
  'init',
  'authentication',
  'user',
  'person',
  'pedigree',
  'plumbing'
], function(init, authentication, user, person, pedigree, plumbing) {
  return {
    init: init.init,

    getAuthCode: authentication.getAuthCode,
    getAccessToken: authentication.getAccessToken,
    hasAccessToken: authentication.hasAccessToken,
    invalidateAccessToken: authentication.invalidateAccessToken,

    getCurrentUser: user.getCurrentUser,
    getCurrentUserPerson: user.getCurrentUserPerson,

    getPerson: person.getPerson,
    getPersonNotes: person.getPersonNotes,
    getMultiPerson: person.getMultiPerson,
    getPersonWithRelationships: person.getPersonWithRelationships,

    getAncestry: pedigree.getAncestry,
    getDescendancy: pedigree.getDescendancy,

    get: plumbing.get,
    post: plumbing.post,
    put: plumbing.put,
    del: plumbing.del,
    http: plumbing.http,
    getTotalProcessingTime: plumbing.getTotalProcessingTime,
    setTotalProcessingTime: plumbing.setTotalProcessingTime
  };
});


text:
<?php

namespace SellerWorks\Amazon\Reports;

use SellerWorks\Amazon\Common\RecordIterator;

/**
 * Implements the plumbing methods of ReportsInterface.
 */
trait ReportsTrait
{
    /**
     * @param  RequestReportRequest  $request
     * @return RequestReportResult
     */
    function RequestReport(Request\RequestReportRequest $request)
    {
        return $this->RequestReportAsync($request)->wait();
    }

    /**
     * @param  RequestReportRequest  $request
     * @return PromiseInterface
     */
    public function RequestReportAsync(Request\RequestReportRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportRequestListRequest  $request
     * @return GetReportRequestListResult
     */
    function GetReportRequestList(Request\GetReportRequestListRequest $request)
    {
        return $this->GetReportRequestListAsync($request)->wait();
    }

    /**
     * @param  GetReportRequestListRequest  $request
     * @return PromiseInterface
     */
    public function GetReportRequestListAsync(Request\GetReportRequestListRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportRequestListByNextTokenRequest  $request
     * @return GetReportRequestListResult
     */
    function GetReportRequestListByNextToken(Request\GetReportRequestListByNextTokenRequest $request)
    {
        return $this->GetReportRequestListByNextTokenAsync($request)->wait();
    }

    /**
     * @param  GetReportRequestListByNextTokenRequest  $request
     * @return PromiseInterface
     */
    public function GetReportRequestListByNextTokenAsync(Request\GetReportRequestListByNextTokenRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportRequestCountRequest  $request
     * @return GetReportRequestCountResult
     */
    function GetReportRequestCount(Request\GetReportRequestCountRequest $request)
    {
        return $this->GetReportRequestCountAsync($request)->wait();
    }

    /**
     * @param  GetReportRequestCountRequest  $request
     * @return PromiseInterface
     */
    public function GetReportRequestCountAsync(Request\GetReportRequestCountRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  CancelReportRequestsRequest  $request
     * @return CancelReportRequestsResult
     */
    function CancelReportRequests(Request\CancelReportRequestsRequest $request)
    {
        return $this->CancelReportRequestsAsync($request)->wait();
    }

    /**
     * @param  CancelReportRequestsRequest  $request
     * @return PromiseInterface
     */
    public function CancelReportRequestsAsync(Request\CancelReportRequestsRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportListRequest  $request
     * @return GetReportListResult
     */
    function GetReportList(Request\GetReportListRequest $request)
    {
        return $this->GetReportListAsync($request)->wait();
    }

    /**
     * @param  GetReportListRequest  $request
     * @return PromiseInterface
     */
    public function GetReportListAsync(Request\GetReportListRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportListByNextTokenRequest  $request
     * @return GetReportListByNextTokenResult
     */
    public function GetReportListByNextToken(Request\GetReportListByNextTokenRequest $request)
    {
        return $this->GetReportListByNextTokenAsync($request)->wait();
    }

    /**
     * @param  GetReportListByNextTokenRequest  $request
     * @return PromiseInterface
     */
    public function GetReportListByNextTokenAsync(Request\GetReportListByNextTokenRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportCountRequest  $request
     * @return GetReportCountResult
     */
    function GetReportCount(Request\GetReportCountRequest $request)
    {
        return $this->GetReportCountAsync($request)->wait();
    }

    /**
     * @param  GetReportCountRequest  $request
     * @return PromiseInterface
     */
    function GetReportCountAsync(Request\GetReportCountRequest $request)
    {
        return $this->send($request, 60);
    }

    /**
     * @param  GetReportRequest  $request
     * @return GetReportResult
     */
    function GetReport(Request\GetReportRequest $request)
    {
        return $this->GetReportAsync($request)->wait();
    }

    /**
     * @param  GetReportRequest  $request
     * @return PromiseInterface
     */
    function GetReportAsync(Request\GetReportRequest $request)
    {
        return $this->send($request, 60);
    }
}


text:
#region Using Directives

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

#endregion Using Directives

namespace ScintillaNET.Configuration
{
    public class MarginConfigList : List<MarginConfig>
    {
        #region Fields

        private Color _foldMarginColor;
        private Color _foldMarginHighlightColor;
        private bool? _inherit;
        private int? _left;
        private int? _right;

        #endregion Fields

        #region Properties

        public Color FoldMarginColor
        {
            get
            {
                return _foldMarginColor;
            }
            set
            {
                _foldMarginColor = value;
            }
        }

        public Color FoldMarginHighlightColor
        {
            get
            {
                return _foldMarginHighlightColor;
            }
            set
            {
                _foldMarginHighlightColor = value;
            }
        }

        public bool? Inherit
        {
            get
            {
                return _inherit;
            }
            set
            {
                _inherit = value;
            }
        }

        public int? Left
        {
            get
            {
                return _left;
            }
            set
            {
                _left = value;
            }
        }

        public int? Right
        {
            get
            {
                return _right;
            }
            set
            {
                _right = value;
            }
        }

        #endregion Properties
    }
}