text:
bool InitializeInterfaceDispatch();
void ReclaimUnusedInterfaceDispatchCaches();

// Interface dispatch caches contain an array of these entries. An instance of a cache is paired with a stub
// that implicitly knows how many entries are contained. These entries must be aligned to twice the alignment
// of a pointer due to the synchonization mechanism used to update them at runtime.
struct InterfaceDispatchCacheEntry
{
    EEType *    m_pInstanceType;    // Potential type of the object instance being dispatched on
    void *      m_pTargetCode;      // Method to dispatch to if the actual instance type matches the above
};

// The interface dispatch cache itself. As well as the entries we include the cache size (since logic such as
// cache miss processing needs to determine this value in a synchronized manner, so it can't be contained in
// the owning interface dispatch indirection cell) and a list entry used to link the caches in one of a couple
// of lists related to cache reclamation.
#pragma warning(push)
#pragma warning(disable:4200) // nonstandard extension used: zero-sized array in struct/union
struct InterfaceDispatchCell;
struct InterfaceDispatchCache
{
    InterfaceDispatchCacheHeader m_cacheHeader;
    union
    {
        InterfaceDispatchCache *    m_pNextFree;    // next in free list
#ifndef _AMD64_
        InterfaceDispatchCell  *    m_pCell;        // pointer back to interface dispatch cell - not used for AMD64
#endif
    };
    UInt32                      m_cEntries;
    InterfaceDispatchCacheEntry m_rgEntries[];
};
#pragma warning(pop)

#endif // FEATURE_CACHED_INTERFACE_DISPATCH


text:
import os, sys, subprocess, tempfile
from jar import Jar

# Script which searches an executable jar file and creates links for all of the
# dependencies defined in the classpath pointing to the jar files in the local
# Maven repository. If you pass in the '-r' flag, it will also look for a pom.xml
# file in the jar and download the dependencies defined in that file to the local
# Maven repository.
#
# Thus, to set up an executable jar to run, just run 'python getJars.py -r jar-file',
# and then just run it using 'java -jar jar-file'.

def getPom(jar):
  """Find the pom.xml file in the jar file"""
  poms = jar.findEntries('.*/pom.xml$')
  if len(poms) > 1:
    raise 'More than one pom file found'
  if len(poms) < 1:
    raise 'No pom.xml found'
  pom = jar.getEntry(poms[0])
  fd, name = tempfile.mkstemp()
  out = os.fdopen(fd, 'w')
  for line in pom.readlines():
    out.write(line)
  out.close()
  return name

def resolve(name):
  """Resolve the jar file dependencies using the passed-in pom file"""
  print 'Resolving jars from pom.xml'
  retcode = subprocess.Popen('mvn -f ' + name + ' dependency:resolve', shell=True,
      stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0]
  if retcode < 0:
    print >>sys.stderr, 'Error resolving maven dependencies'
  else:
    print 'Dependencies resolved successfully'
  os.remove(name)

def getJarList(jar):
  """Retrieve a list of the dependencies required on the classpath"""
  return jar.readManifest()['Class-Path']

def makeSymlinks(names):
  """Make the symbolic links pointing to the jar files needed"""
  names = [(name, os.path.basename(name)) for name in names.split(' ') if not os.path.exists(name)]
  for root, dirs, files in os.walk(os.path.join(os.environ['HOME'], '.m2', 'repository')):
    for name in names:
      if name[1] in files:
        dir = os.path.dirname(name[0])
        os.path.exists(dir) or os.mkdir(dir)
        os.symlink(os.path.join(root, name[1]), name[0])
        names.remove(name)
  if len(names) > 0:
    print >>sys.stderr, 'Could not find the following dependencies:'
    print >>sys.stderr, ', '.join([name[1] for name in names])

if len(sys.argv) < 2:
  print "usage: " + sys.argv[0] + " [-r] jar-file"
  print "    -r   Do maven resolution beforehand"
  sys.exit(-1)

do_resolve = False
if sys.argv[1] == '-r':
  do_resolve = True
  sys.argv.pop(1)
jar = Jar(sys.argv[1])
if do_resolve:
  resolve(getPom(jar))
makeSymlinks(getJarList(jar))

redpajama_set_name: RedPajamaGithub


text:
"""Fixtures for component testing."""
from unittest.mock import patch

import pytest

from tests.common import mock_coro

@pytest.fixture(autouse=True)
def prevent_io():
    """Fixture to prevent certain I/O from happening."""
    with patch(
        "homeassistant.components.http.ban.async_load_ip_bans_config",
        side_effect=lambda *args: mock_coro([]),
    ):
        yield


text:
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;

namespace TicTacToe
{
	partial class AboutViewController : UIViewController
	{
		public AboutViewController (IntPtr handle) : base (handle)
		{
		}

		partial void CloseAboutBtn_TouchUpInside (UIButton sender)
		{
			WillMoveToParentViewController(null);
			View.RemoveFromSuperview();
			RemoveFromParentViewController();
		}
	}
}


text:
        BIB
        Name
        Category
        Time

            {{splitTime.start_number}}

            {{all_participants_by_bib[splitTime.start_number].display_name}}

                    {{all_participants_by_bib[splitTime.start_number].category}}

      {{splitTime.time | splitTime:startTime}}


text:
package org.cloudfoundry.reactor.client.v2.stacks;

import org.cloudfoundry.client.v2.Metadata;
import org.cloudfoundry.client.v2.stacks.GetStackRequest;
import org.cloudfoundry.client.v2.stacks.GetStackResponse;
import org.cloudfoundry.client.v2.stacks.ListStacksRequest;
import org.cloudfoundry.client.v2.stacks.ListStacksResponse;
import org.cloudfoundry.client.v2.stacks.StackEntity;
import org.cloudfoundry.client.v2.stacks.StackResource;
import org.cloudfoundry.reactor.InteractionContext;
import org.cloudfoundry.reactor.TestRequest;
import org.cloudfoundry.reactor.TestResponse;
import org.cloudfoundry.reactor.client.AbstractClientApiTest;
import org.junit.Test;
import reactor.test.StepVerifier;

import java.time.Duration;

import static io.netty.handler.codec.http.HttpMethod.GET;
import static io.netty.handler.codec.http.HttpResponseStatus.OK;

public final class ReactorStacksTest extends AbstractClientApiTest {

    private final ReactorStacks stacks = new ReactorStacks(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER);

    @Test
    public void get() {
        mockRequest(InteractionContext.builder()
            .request(TestRequest.builder()
                .method(GET).path("/v2/stacks/test-stack-id")
                .build())
            .response(TestResponse.builder()
                .status(OK)
                .payload("fixtures/client/v2/stacks/GET_{id}_response.json")
                .build())
            .build());

        this.stacks
            .get(GetStackRequest.builder()
                .stackId("test-stack-id")
                .build())
            .as(StepVerifier::create)
            .expectNext(GetStackResponse.builder()
                .metadata(Metadata.builder()
                    .id("fe4999cf-a207-4d40-bb03-f4bbf697edac")
                    .url("/v2/stacks/fe4999cf-a207-4d40-bb03-f4bbf697edac")
                    .createdAt("2015-12-22T18:27:59Z")
                    .build())
                .entity(StackEntity.builder()
                    .name("cflinuxfs2")
                    .description("cflinuxfs2")
                    .build())
                .build())
            .expectComplete()
            .verify(Duration.ofSeconds(5));
    }

    @Test
    public void list() {
        mockRequest(InteractionContext.builder()
            .request(TestRequest.builder()
                .method(GET).path("/v2/stacks?q=name%20IN%20test-name&page=-1")
                .build())
            .response(TestResponse.builder()
                .status(OK)
                .payload("fixtures/client/v2/stacks/GET_response.json")
                .build())
            .build());

        this.stacks
            .list(ListStacksRequest.builder()
                .name("test-name")
                .page(-1)
                .build())
            .as(StepVerifier::create)
            .expectNext(ListStacksResponse.builder()
                .totalResults(3)
                .totalPages(1)
                .resource(StackResource.builder()
                    .metadata(Metadata.builder()
                        .id("fe4999cf-a207-4d40-bb03-f4bbf697edac")
                        .url("/v2/stacks/fe4999cf-a207-4d40-bb03-f4bbf697edac")
                        .createdAt("2015-12-22T18:27:59Z")
                        .build())
                    .entity(StackEntity.builder()
                        .name("cflinuxfs2")
                        .description("cflinuxfs2")
                        .build())
                    .build())
                .resource(StackResource.builder()
                    .metadata(Metadata.builder()
                        .id("ff0f87c9-9add-477a-8674-c11c012667a6")
                        .url("/v2/stacks/ff0f87c9-9add-477a-8674-c11c012667a6")
                        .createdAt("2015-12-22T18:27:59Z")
                        .build())
                    .entity(StackEntity.builder()
                        .name("default-stack-name")
                        .description("default-stack-description")
                        .build())
                    .build())
                .resource(StackResource.builder()
                    .metadata(Metadata.builder()
                        .id("01bd93b4-f252-4517-a4a5-191eb4c7fc7e")
                        .url("/v2/stacks/01bd93b4-f252-4517-a4a5-191eb4c7fc7e")
                        .createdAt("2015-12-22T18:27:59Z")
                        .build())
                    .entity(StackEntity.builder()
                        .name("cider")
                        .description("cider-description")
                        .build())
                    .build())
                .build())
            .expectComplete()
            .verify(Duration.ofSeconds(5));
    }

}


text:
{% extends "layout.html" %}
{% block scripts %}
  {{ super() }}

{% endblock %}
{% block styles %}
  {{ super() }}

{% endblock %}
{% block page %}

Editing survey questions for {{ survey['title'] }}

      {% if survey['description'] %}

      {% endif %}
      Link to take survey:
      <input class="form-control" id="take-link" disabled/>

        Edit survey settings

          <select class="form-control" id="question_type"></select>

            <button class="btn btn-default" id="add_question">Add question</button>

        <button class="btn btn-primary" id="save_survey">Save</button>
        {% if opened %}

            View

        {% endif %}

{% endblock %}


text:
namespace caffe {

template <typename Dtype>
void ConcatLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
      const vector<Blob<Dtype>*>& top) {
  const ConcatParameter& concat_param = this->layer_param_.concat_param();
  CHECK(!(concat_param.has_axis() && concat_param.has_concat_dim()))
      << "Either axis or concat_dim should be specified; not both.";
}

template <typename Dtype>
void ConcatLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
      const vector<Blob<Dtype>*>& top) {
  const int num_axes = bottom[0]->num_axes();
  const ConcatParameter& concat_param = this->layer_param_.concat_param();
  if (concat_param.has_concat_dim()) {
    concat_axis_ = static_cast<int>(concat_param.concat_dim());
    // Don't allow negative indexing for concat_dim, a uint32 -- almost
    // certainly unintended.
    CHECK_GE(concat_axis_, 0) << "casting concat_dim from uint32 to int32 "
        << "produced negative result; concat_dim must satisfy "
        << "0 <= concat_dim < " << kMaxBlobAxes;
    CHECK_LT(concat_axis_, num_axes) << "concat_dim out of range.";
  } else {
    concat_axis_ = bottom[0]->CanonicalAxisIndex(concat_param.axis());
  }
  // Initialize with the first blob.
  vector<int> top_shape = bottom[0]->shape();
  num_concats_ = bottom[0]->count(0, concat_axis_);
  concat_input_size_ = bottom[0]->count(concat_axis_ + 1);
  int bottom_count_sum = bottom[0]->count();
  for (int i = 1; i < bottom.size(); ++i) {
    CHECK_EQ(num_axes, bottom[i]->num_axes())
        << "All inputs must have the same #axes.";
    for (int j = 0; j < num_axes; ++j) {
      if (j == concat_axis_) { continue; }
      CHECK_EQ(top_shape[j], bottom[i]->shape(j))
          << "All inputs must have the same shape, except at concat_axis.";
    }
    bottom_count_sum += bottom[i]->count();
    top_shape[concat_axis_] += bottom[i]->shape(concat_axis_);
  }
  top[0]->Reshape(top_shape);
  CHECK_EQ(bottom_count_sum, top[0]->count());
  if (bottom.size() == 1) {
    top[0]->ShareData(*bottom[0]);
    top[0]->ShareDiff(*bottom[0]);
  }
}

template <typename Dtype>
void ConcatLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
      const vector<Blob<Dtype>*>& top) {
  if (bottom.size() == 1) { return; }
  Dtype* top_data = top[0]->mutable_cpu_data();
  int offset_concat_axis = 0;
  const int top_concat_axis = top[0]->shape(concat_axis_);
  for (int i = 0; i < bottom.size(); ++i) {
    const Dtype* bottom_data = bottom[i]->cpu_data();
    const int bottom_concat_axis = bottom[i]->shape(concat_axis_);
    for (int n = 0; n < num_concats_; ++n) {
      caffe_copy(bottom_concat_axis * concat_input_size_,
          bottom_data + n * bottom_concat_axis * concat_input_size_,
          top_data + (n * top_concat_axis + offset_concat_axis)
              * concat_input_size_);
    }
    offset_concat_axis += bottom_concat_axis;
  }
}

template <typename Dtype>
void ConcatLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
      const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
  if (bottom.size() == 1) { return; }
  const Dtype* top_diff = top[0]->cpu_diff();
  int offset_concat_axis = 0;
  const int top_concat_axis = top[0]->shape(concat_axis_);
  for (int i = 0; i < bottom.size(); ++i) {
    const int bottom_concat_axis = bottom[i]->shape(concat_axis_);
    if (propagate_down[i]) {
      Dtype* bottom_diff = bottom[i]->mutable_cpu_diff();
      for (int n = 0; n < num_concats_; ++n) {
        caffe_copy(bottom_concat_axis * concat_input_size_, top_diff +
            (n * top_concat_axis + offset_concat_axis) * concat_input_size_,
            bottom_diff + n * bottom_concat_axis * concat_input_size_);
      }
    }
    offset_concat_axis += bottom_concat_axis;
  }
}

template <typename Dtype>
void ConcatLayer<Dtype>::Backward_relevance(const vector<Blob<Dtype>*>& top,
      const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom)
{
  //copy top to each bottom
    unsigned n = bottom[0]->count();
    for(unsigned i = 0, nbottom = bottom.size(); i < nbottom; i++) {
      Dtype *bottom_diff = bottom[i]->mutable_cpu_diff();
      caffe_copy(n, top[0]->cpu_diff(), bottom_diff);
    }

}

#ifdef CPU_ONLY
STUB_GPU(ConcatLayer);
#endif

INSTANTIATE_CLASS(ConcatLayer);
REGISTER_LAYER_CLASS(Concat);

}  // namespace caffe


text:
"""Local task-pull (single process).
"""
from __future__ import division, absolute_import

import sys
import json
import abc

# NOTE If parallel needs to be changed, do it here too.
from bcn.examples import figures as parallel

if __name__ == '__main__':

    class_ = sys.argv[1]
    kwargs = json.loads(sys.argv[2])

    taskpull = getattr(parallel, class_)(**kwargs)

    tasks = taskpull.create_tasks()
    taskpull.allocate()

    for task in tasks:
        result = taskpull.work(task)
        taskpull.store(result)

    taskpull.postprocessing()


text:
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.pulsar.transaction.coordinator;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/**
 * The implement of transaction metadata store state.
 */
public abstract class TransactionMetadataStoreState {

    /**
     * The state of the transactionMetadataStore {@link TransactionMetadataStore}.
     */
    public enum State {
        None,
        Initializing,
        Ready,
        Closing,
        Close
    }

    private static final AtomicReferenceFieldUpdater<TransactionMetadataStoreState, State> STATE_UPDATER =
            AtomicReferenceFieldUpdater.newUpdater(TransactionMetadataStoreState.class, State.class, "state");

    @SuppressWarnings("unused")
    private volatile State state = null;

    public TransactionMetadataStoreState(State state) {
        STATE_UPDATER.set(this, state);

    }

    protected boolean changeToReadyState() {
        return (STATE_UPDATER.compareAndSet(this, State.Initializing, State.Ready));
    }

    protected boolean changeToInitializingState() {
        return STATE_UPDATER.compareAndSet(this, State.None, State.Initializing);
    }

    protected boolean changeToClosingState() {
        return (STATE_UPDATER.compareAndSet(this, State.Ready, State.Closing)
                || STATE_UPDATER.compareAndSet(this, State.None, State.Closing)
                || STATE_UPDATER.compareAndSet(this, State.Initializing, State.Closing));
    }

    protected boolean changeToCloseState() {
        return STATE_UPDATER.compareAndSet(this, State.Closing, State.Close);
    }

    protected boolean checkIfReady() {
        return STATE_UPDATER.get(this) == State.Ready;
    }

    public State getState() {
        return STATE_UPDATER.get(this);
    }
}


text:
package org.opensingular.form.view.date;

import java.util.Date;
import java.util.List;

import org.opensingular.form.SInstance;
import org.opensingular.lib.commons.lambda.IFunction;

/**
 * This view will configure the Timer component.
 * For more information: http://bootstrap-datepicker.readthedocs.io/en/latest/
 */
public interface ISViewDate {

    IFunction<SInstance, List<Date>> getEnabledDatesFunction();

    /**
     * Function to retrieve the enabled dates that can be selected
     */
    SViewDate setEnabledDatesFunction(IFunction<SInstance, List<Date>> enabledDatesFunction);

    /**
     * Whether or not to close the datepicker immediately when a date is selected.
     *

     * Default: false
     */
    SViewDate setAutoclose(boolean autoclose);

    /**
     * If true, displays a "Clear" button at the bottom of the datepicker to clear the input value.
     * If "autoclose" is also set to true, this button will also close the datepicker.
     *

     * Default: false
     */
    SViewDate setClearBtn(boolean clearBtn);

    /**
     * Initial date that can be selected
     *

     * Default: null
     */
    SViewDate setStartDate(Date startDate);

    /**
     * Initial date that can be selected, this function will override the static value that had been set on setStartDate
     *

     * Default: null
     */
    SViewDate setStartDateFunction(IFunction<SInstance, Date> startDateFunction);

    /**
     * Shows a today button on calendar
     *

     * Default: false
     */
    SViewDate setTodayBtn(boolean todayBtn);

    /**
     * If true, highlights the current date.
     *

     * Default: false
     *
 if the Today button is enabled, the todayHighlight will be forced to true.
     */
    SViewDate setTodayHighlight(boolean todayHighlight);

    /**
     * If false, the datepicker will be prevented from showing when the input field associated with it receives focus.
     *

     * Default: true
     */
    SViewDate setShowOnFocus(boolean showOnFocus);

    /**
     * This method should be used for hide the modal of date picker.
     * @param hide True will hide the date picker.
     *             False will show the date.
     * @return this
     */
    SViewDate hideModalDatePicker(Boolean hide);

    boolean isAutoclose();

    boolean isClearBtn();

    Date getStartDate();

    boolean isTodayBtn();

    boolean isTodayHighlight();

    boolean isShowOnFocus();

    IFunction<SInstance, Date> getStartDateFunction();

    /**
     * This method should return the value of hide date picker.
     * @return True will hide the picker.
     */
    boolean isModalHide();
}


text:
class LensBase::SiteController < ApplicationController
  include LensBase::Actions::SiteActions
end


text:
namespace blink {

template <typename NativeFrameType>
FrameQueueTransferringOptimizer<NativeFrameType>::
    FrameQueueTransferringOptimizer(
        FrameQueueHost* host,
        scoped_refptr<base::SequencedTaskRunner> host_runner,
        wtf_size_t max_queue_size,
        ConnectHostCallback connect_host_callback,
        CrossThreadOnceClosure transferred_source_destroyed_callback)
    : host_(host),
      host_runner_(std::move(host_runner)),
      connect_host_callback_(std::move(connect_host_callback)),
      transferred_source_destroyed_callback_(
          std::move(transferred_source_destroyed_callback)),
      max_queue_size_(max_queue_size) {}

template <typename NativeFrameType>
UnderlyingSourceBase*
FrameQueueTransferringOptimizer<NativeFrameType>::PerformInProcessOptimization(
    ScriptState* script_state) {
  ExecutionContext* context = ExecutionContext::From(script_state);

  scoped_refptr<base::SingleThreadTaskRunner> current_runner =
      context->GetTaskRunner(TaskType::kInternalMediaRealTime);

  auto host = host_.Lock();
  if (!host)
    return nullptr;

  auto* source = MakeGarbageCollected<
      TransferredFrameQueueUnderlyingSource<NativeFrameType>>(
      script_state, host, host_runner_,
      std::move(transferred_source_destroyed_callback_));

  PostCrossThreadTask(
      *host_runner_, FROM_HERE,
      CrossThreadBindOnce(std::move(connect_host_callback_), current_runner,
                          WrapCrossThreadPersistent(source)));
  return source;
}

template class MODULES_TEMPLATE_EXPORT
    FrameQueueTransferringOptimizer<scoped_refptr<media::AudioBuffer>>;
template class MODULES_TEMPLATE_EXPORT
    FrameQueueTransferringOptimizer<scoped_refptr<media::VideoFrame>>;

}  // namespace blink


text:
namespace brightray {
class InspectableWebContents;
}

namespace mate {
class Dictionary;
}

namespace atom {

class WebDialogHelper;

namespace api {

class WebContents : public mate::EventEmitter,
                    public content::BrowserPluginGuestDelegate,
                    public content::WebContentsDelegate,
                    public content::WebContentsObserver {
 public:
  // Create from an existing WebContents.
  static mate::Handle<WebContents> CreateFrom(
      v8::Isolate* isolate, content::WebContents* web_contents);

  // Create a new WebContents.
  static mate::Handle<WebContents> Create(
      v8::Isolate* isolate, const mate::Dictionary& options);

  void Destroy();
  bool IsAlive() const;
  void LoadURL(const GURL& url, const mate::Dictionary& options);
  GURL GetURL() const;
  base::string16 GetTitle() const;
  bool IsLoading() const;
  bool IsWaitingForResponse() const;
  void Stop();
  void Reload(const mate::Dictionary& options);
  void ReloadIgnoringCache(const mate::Dictionary& options);
  bool CanGoBack() const;
  bool CanGoForward() const;
  bool CanGoToOffset(int offset) const;
  void GoBack();
  void GoForward();
  void GoToIndex(int index);
  void GoToOffset(int offset);
  int GetRoutingID() const;
  int GetProcessID() const;
  bool IsCrashed() const;
  void SetUserAgent(const std::string& user_agent);
  void InsertCSS(const std::string& css);
  void ExecuteJavaScript(const base::string16& code);
  void OpenDevTools();
  void CloseDevTools();
  bool IsDevToolsOpened();

  // Editing commands.
  void Undo();
  void Redo();
  void Cut();
  void Copy();
  void Paste();
  void Delete();
  void SelectAll();
  void Unselect();
  void Replace(const base::string16& word);
  void ReplaceMisspelling(const base::string16& word);

  // Sending messages to browser.
  bool SendIPCMessage(const base::string16& channel,
                      const base::ListValue& args);

  // Toggles autosize mode for corresponding <webview>.
  void SetAutoSize(bool enabled,
                   const gfx::Size& min_size,
                   const gfx::Size& max_size);

  // Sets the transparency of the guest.
  void SetAllowTransparency(bool allow);

  // Returns whether this is a guest view.
  bool is_guest() const { return guest_instance_id_ != -1; }

  // Returns whether this guest has an associated embedder.
  bool attached() const { return !!embedder_web_contents_; }

  content::WebContents* web_contents() const {
    return content::WebContentsObserver::web_contents();
  }

 protected:
  explicit WebContents(content::WebContents* web_contents);
  explicit WebContents(const mate::Dictionary& options);
  ~WebContents();

  // mate::Wrappable:
  mate::ObjectTemplateBuilder GetObjectTemplateBuilder(
      v8::Isolate* isolate) override;

  // content::WebContentsDelegate:
  bool AddMessageToConsole(content::WebContents* source,
                           int32 level,
                           const base::string16& message,
                           int32 line_no,
                           const base::string16& source_id) override;
  bool ShouldCreateWebContents(
      content::WebContents* web_contents,
      int route_id,
      WindowContainerType window_container_type,
      const base::string16& frame_name,
      const GURL& target_url,
      const std::string& partition_id,
      content::SessionStorageNamespace* session_storage_namespace) override;
  void CloseContents(content::WebContents* source) override;
  content::WebContents* OpenURLFromTab(
      content::WebContents* source,
      const content::OpenURLParams& params) override;
  void RunFileChooser(content::WebContents* web_contents,
                      const content::FileChooserParams& params) override;
  void EnumerateDirectory(content::WebContents* web_contents,
                          int request_id,
                          const base::FilePath& path) override;
  bool CheckMediaAccessPermission(content::WebContents* web_contents,
                                  const GURL& security_origin,
                                  content::MediaStreamType type) override;
  void RequestMediaAccessPermission(
      content::WebContents*,
      const content::MediaStreamRequest&,
      const content::MediaResponseCallback&) override;
  void HandleKeyboardEvent(
      content::WebContents* source,
      const content::NativeWebKeyboardEvent& event) override;

  // content::WebContentsObserver:
  void RenderViewDeleted(content::RenderViewHost*) override;
  void RenderProcessGone(base::TerminationStatus status) override;
  void DidFinishLoad(content::RenderFrameHost* render_frame_host,
                     const GURL& validated_url) override;
  void DidFailLoad(content::RenderFrameHost* render_frame_host,
                   const GURL& validated_url,
                   int error_code,
                   const base::string16& error_description) override;
  void DidStartLoading(content::RenderViewHost* render_view_host) override;
  void DidStopLoading(content::RenderViewHost* render_view_host) override;
  void DidGetRedirectForResourceRequest(
      content::RenderViewHost* render_view_host,
      const content::ResourceRedirectDetails& details) override;
  void DidNavigateMainFrame(
      const content::LoadCommittedDetails& details,
      const content::FrameNavigateParams& params) override;
  bool OnMessageReceived(const IPC::Message& message) override;
  void RenderViewReady() override;
  void WebContentsDestroyed() override;

  // content::BrowserPluginGuestDelegate:
  void DidAttach(int guest_proxy_routing_id) final;
  void ElementSizeChanged(const gfx::Size& old_size,
                          const gfx::Size& new_size) final;
  void GuestSizeChanged(const gfx::Size& old_size,
                        const gfx::Size& new_size) final;
  void RegisterDestructionCallback(const DestructionCallback& callback) final;
  void WillAttach(content::WebContents* embedder_web_contents,
                  int browser_plugin_instance_id) final;

 private:
  // Called when received a message from renderer.
  void OnRendererMessage(const base::string16& channel,
                         const base::ListValue& args);

  // Called when received a synchronous message from renderer.
  void OnRendererMessageSync(const base::string16& channel,
                             const base::ListValue& args,
                             IPC::Message* message);

  void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size,
                                     const gfx::Size& new_size);

  scoped_ptr<WebDialogHelper> web_dialog_helper_;

  // Unique ID for a guest WebContents.
  int guest_instance_id_;

  // |element_instance_id_| is an identifer that's unique to a particular
  // element.
  int element_instance_id_;

  DestructionCallback destruction_callback_;

  // Stores whether the contents of the guest can be transparent.
  bool guest_opaque_;

  // Stores the WebContents that managed by this class.
  scoped_ptr<brightray::InspectableWebContents> storage_;

  // The WebContents that attaches this guest view.
  content::WebContents* embedder_web_contents_;

  // The size of the container element.
  gfx::Size element_size_;

  // The size of the guest content. Note: In autosize mode, the container
  // element may not match the size of the guest.
  gfx::Size guest_size_;

  // Indicates whether autosize mode is enabled or not.
  bool auto_size_enabled_;

  // The maximum size constraints of the container element in autosize mode.
  gfx::Size max_auto_size_;

  // The minimum size constraints of the container element in autosize mode.
  gfx::Size min_auto_size_;

  DISALLOW_COPY_AND_ASSIGN(WebContents);
};

}  // namespace api

}  // namespace atom

#endif  // ATOM_BROWSER_API_ATOM_API_WEB_CONTENTS_H_


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.DriverStationLCD;
/**
 *
 * @author team4097
 */
public class OverrideMode extends CommandBase {

    public OverrideMode() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        oi.overrideMode = !oi.overrideMode;
        if (oi.overrideMode){
        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser5, 2, "OVERRIDE MODE :P");
        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser6, 2, "Good Luck Team!");
        DriverStationLCD.getInstance().updateLCD();
        }
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return true;
    }

    // Called once after isFinished returns true
    protected void end() {
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}


text:
#import <CommunicationsSetupUI/CNFRegSignInController.h>

@class CNFRegSigninLearnMoreView;

@interface CNFRegSplashSignInController : CNFRegSignInController
{
    CNFRegSigninLearnMoreView *_signInView;
}

- (id)tableView:(id)arg1 viewForHeaderInSection:(long long)arg2;
- (double)tableView:(id)arg1 heightForHeaderInSection:(long long)arg2;
- (id)_existingLearnMoreViewForSection:(long long)arg1;
- (id)_existingLearnMoreViewForSpecifier:(id)arg1;
- (void)_setFieldsEnabled:(_Bool)arg1 animated:(_Bool)arg2;
- (_Bool)passwordIsEmpty;
- (void)setPasswordText:(id)arg1;
- (id)passwordTextField;
- (_Bool)usernameIsEmpty;
- (void)setUsernameText:(id)arg1;
- (id)usernameTextField;
- (void)_updateDescriptionText;
- (void)viewDidLoad;
- (id)specifierList;
- (void)viewWillAppear:(_Bool)arg1;

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 Wipro Ltd.  All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.opendaylight.odlparent</groupId>
		<artifactId>odlparent</artifactId>
		<version>1.7.0-SNAPSHOT</version>
		<relativePath />
	</parent>

	<groupId>org.opendaylight.atrium</groupId>
	<artifactId>routingconfig</artifactId>
	<packaging>pom</packaging>
	<version>0.0.1-SNAPSHOT</version>

	<modules>
		<module>api</module>
		<module>impl</module>
	</modules>
	<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate
		a build -->
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>


text:
//
//  LGcategories.h
//  ifaxian
//
//  Created by Apple_Lzzy27 on 16/11/17.
//  Copyright © 2016年 ming. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface LGCategories : NSObject
/**
 *  分类名称
 */
@property (nonatomic,copy) NSString *title;
/**
 *  分类路径
 */
@property (nonatomic,copy) NSString *slug;
/**
 *  分类id
 */
@property (nonatomic,copy) NSString *ID;
/**
 *  分类的描述
 */
@property(nonatomic, copy) NSString *describe;

@end


text:
module ApplicationHelper
  def title
    base_title = "DRLRL MSU"
    if @title.blank?
      base_title
    else
      "#{base_title} | #{@title}"
    end
  end

  def bootstrap_alert_type(type)
    case type
    when :alert, "alert"
      "danger"
    when :error, "error"
      "danger"
    when :notice, "notice"
      "warning"
    when :success, "success"
      "success"
    else
      type.to_s
    end
  end

  # For nested forms based on
  # http://railscasts.com/episodes/197-nested-model-form-part-2

  def link_to_remove_fields(name, f)
    f.hidden_field(:_destroy) + link_to(name, "#", :onclick => "remove_fields(this); return false;")
  end

  def link_to_add_fields(name, f, association, options = {})
    options[:object] ||= f.object.class.reflect_on_association(association).klass.new
    options[:partial] ||= association.to_s.singularize + "_fields"
    options[:form_builder_local] ||= :f
    options[:text_input_class] ||= nil
    fields = f.fields_for(association, options[:object], :child_index => "new_#{association}") do |builder|
      render(:partial => options[:partial],
             :locals => { options[:form_builder_local] => builder, :text_input_class => options[:text_input_class],
                          :label_column_class => options[:label_column_class] })
    end
    link_to(name, "#", :onclick => %(add_fields(this, "#{association}", "#{escape_javascript(fields)}"); return false;), :class => options[:class])
  end
end


text:
Contributing
------------

Feedback, bug reports, and pull requests are greatly appreciated :)

### Issues

The following are all great reasons to submit an issue:

1. You found a bug in the code.
2. Something is missing from the documentation or the existing documentation is unclear.
3. You have an idea for a new feature.

If you are thinking about submitting an issue please remember to:

1. Describe the issue in detail.
2. If applicable, describe the steps to reproduce the error, which probably should include some example code.
3. Mention details about your platform: OS, version of Go, etc.

### Pull Requests

Airtable-go uses semantic versioning. If you plan on submitting a pull request, you should:

1. Fork the repository.
2. Create a new "feature branch" off of **master** with a descriptive name (e.g. fix-database-error).
3. Make your changes in the feature branch.
4. Run the tests to make sure that they still pass. Updated the tests if needed.
5. Submit a pull request to merge your feature branch into the **master** branch.


text:
namespace AppKit.Core.Ioc
{
    public interface IIocConfigurator
    {
        void Configure(IIocContainer container);
    }
}


text:
macro(INCLUDE_IF_EXISTS _file)
    if (EXISTS ${_file})
        message(STATUS "Using platform-specific CMakeLists: ${_file}")
        include(${_file})
    else ()
        message(STATUS "Platform-specific CMakeLists not found: ${_file}")
    endif ()
endmacro()

# Append the given dependencies to the source file
macro(ADD_SOURCE_DEPENDENCIES _source _deps)
    set(_tmp)
    get_source_file_property(_tmp ${_source} OBJECT_DEPENDS)
    if (NOT _tmp)
        set(_tmp "")
    endif ()

    foreach (f ${_deps})
        list(APPEND _tmp "${f}")
    endforeach ()

    set_source_files_properties(${_source} PROPERTIES OBJECT_DEPENDS "${_tmp}")
endmacro()

# Helper macro which wraps generate-bindings.pl script.
#   _output_source is a list name which will contain generated sources.(eg. WebCore_SOURCES)
#   _input_files are IDL files to generate.
#   _base_dir is base directory where script is called.
#   _idl_includes is value of --include argument. (eg. --include=${WEBCORE_DIR}/bindings/js)
#   _features is a value of --defines argument.
#   _destination is a value of --outputDir argument.
#   _prefix is a prefix of output files. (eg. JS - it makes JSXXX.cpp JSXXX.h from XXX.idl)
#   _generator is a value of --generator argument.
#   _supplemental_dependency_file is a value of --supplementalDependencyFile. (optional)
macro(GENERATE_BINDINGS _output_source _input_files _base_dir _idl_includes _features _destination _prefix _generator _idl_attributes_file)
    set(BINDING_GENERATOR ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl)
    set(_args ${ARGN})
    list(LENGTH _args _argCount)
    if (_argCount EQUAL 5)
        list(GET _args 0 _supplemental_dependency_file)
        if (_supplemental_dependency_file)
            set(_supplemental_dependency --supplementalDependencyFile ${_supplemental_dependency_file})
        endif ()
        list(GET _args 1 _window_constructors_file)
        list(GET _args 2 _workerglobalscope_constructors_file)
        list(GET _args 3 _sharedworkerglobalscope_constructors_file)
        list(GET _args 4 _dedicatedworkerglobalscope_constructors_file)
    endif ()

    foreach (_file ${_input_files})
        get_filename_component(_name ${_file} NAME_WE)

        add_custom_command(
            OUTPUT ${_destination}/${_prefix}${_name}.cpp ${_destination}/${_prefix}${_name}.h
            MAIN_DEPENDENCY ${_file}
            DEPENDS ${BINDING_GENERATOR} ${SCRIPTS_BINDINGS} ${_supplemental_dependency_file} ${_idl_attributes_file} ${_window_constructors_file} ${_workerglobalscope_constructors_file} ${_sharedworkerglobalscope_constructors_file} ${_dedicatedworkerglobalscope_constructors_file}
            COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_GENERATOR} --defines "${_features}" --generator ${_generator} ${_idl_includes} --outputDir "${_destination}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --idlAttributesFile ${_idl_attributes_file} ${_supplemental_dependency} ${_file}
            WORKING_DIRECTORY ${_base_dir}
            VERBATIM)

        list(APPEND ${_output_source} ${_destination}/${_prefix}${_name}.cpp)
    endforeach ()
endmacro()

macro(GENERATE_FONT_NAMES _infile)
    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
    set(_arguments  --fonts ${_infile})
    set(_outputfiles ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.h)

    add_custom_command(
        OUTPUT  ${_outputfiles}
        MAIN_DEPENDENCY ${_infile}
        DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} ${_arguments}
        VERBATIM)
endmacro()

macro(GENERATE_EVENT_FACTORY _infile _outfile)
    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_event_factory.pl)

    add_custom_command(
        OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
        MAIN_DEPENDENCY ${_infile}
        DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
        VERBATIM)
endmacro()

macro(GENERATE_EXCEPTION_CODE_DESCRIPTION _infile _outfile)
    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_dom_exceptions.pl)

    add_custom_command(
        OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
        MAIN_DEPENDENCY ${_infile}
        DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
        VERBATIM)
endmacro()

macro(GENERATE_SETTINGS_MACROS _infile _outfile)
    set(NAMES_GENERATOR ${WEBCORE_DIR}/page/make_settings.pl)

    add_custom_command(
        OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile} ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.h ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl
        MAIN_DEPENDENCY ${_infile}
        DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
        VERBATIM)
endmacro()

macro(GENERATE_DOM_NAMES _namespace _attrs)
    set(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
    set(_arguments  --attrs ${_attrs})
    set(_outputfiles ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}Names.h)
    set(_extradef)
    set(_tags)

    foreach (f ${ARGN})
        if (_tags)
            set(_extradef "${_extradef} ${f}")
        else ()
            set(_tags ${f})
        endif ()
    endforeach ()

    if (_tags)
        set(_arguments "${_arguments}" --tags ${_tags} --factory --wrapperFactory)
        set(_outputfiles "${_outputfiles}" ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}ElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/${_namespace}ElementFactory.h ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_namespace}ElementWrapperFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_namespace}ElementWrapperFactory.h)
    endif ()

    if (_extradef)
        set(_additionArguments "${_additionArguments}" --extraDefines=${_extradef})
    endif ()

    add_custom_command(
        OUTPUT  ${_outputfiles}
        DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS} ${_attrs} ${_tags}
        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --preprocessor "${CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS}" --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} ${_arguments} ${_additionArguments}
        VERBATIM)
endmacro()

macro(GENERATE_GRAMMAR _prefix _input _output_header _output_source _features)
    # This is a workaround for winflexbison, which does not work corretly when
    # run in a different working directory than the installation directory.
    get_filename_component(_working_directory ${BISON_EXECUTABLE} PATH)

    add_custom_command(
        OUTPUT ${_output_header} ${_output_source}
        MAIN_DEPENDENCY ${_input}
        DEPENDS ${_input}
        COMMAND ${PERL_EXECUTABLE} -I ${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makegrammar.pl --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} --extraDefines "${_features}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --bison "${BISON_EXECUTABLE}" --symbolsPrefix ${_prefix} ${_input}
        WORKING_DIRECTORY ${_working_directory}
        VERBATIM)
endmacro()

macro(MAKE_HASH_TOOLS _source)
    get_filename_component(_name ${_source} NAME_WE)

    if (${_source} STREQUAL "DocTypeStrings")
        set(_hash_tools_h "${DERIVED_SOURCES_WEBCORE_DIR}/HashTools.h")
    else ()
        set(_hash_tools_h "")
    endif ()

    add_custom_command(
        OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}.cpp ${_hash_tools_h}
        MAIN_DEPENDENCY ${_source}.gperf
        COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/make-hash-tools.pl ${DERIVED_SOURCES_WEBCORE_DIR} ${_source}.gperf
        VERBATIM)

    unset(_name)
    unset(_hash_tools_h)
endmacro()

macro(WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS)
    if (PORT_FALLBACK)
        INCLUDE_IF_EXISTS(${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT_FALLBACK}.cmake)
    endif ()
    INCLUDE_IF_EXISTS(${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT}.cmake)
endmacro()

macro(WEBKIT_WRAP_SOURCELIST)
    foreach (_file ${ARGN})
        get_filename_component(_basename ${_file} NAME_WE)
        get_filename_component(_path ${_file} PATH)

        if (NOT _file MATCHES "${DERIVED_SOURCES_WEBCORE_DIR}")
            string(REGEX REPLACE "/" "\\\\\\\\" _sourcegroup "${_path}")
            source_group("${_sourcegroup}" FILES ${_file})
        endif ()

        if (WTF_PLATFORM_QT)
            set(_moc_filename ${DERIVED_SOURCES_WEBCORE_DIR}/${_basename}.moc)

            file(READ ${_file} _contents)

            string(REGEX MATCHALL "#include[ ]+\"${_basename}\\.moc\"" _match "${_contents}")
            if (_match)
                QT4_GENERATE_MOC(${_file} ${_moc_filename})
                ADD_SOURCE_DEPENDENCIES(${_file} ${_moc_filename})
            endif ()
        endif ()
    endforeach ()

    source_group("DerivedSources" REGULAR_EXPRESSION "${DERIVED_SOURCES_WEBCORE_DIR}")
endmacro()

macro(WEBKIT_CREATE_FORWARDING_HEADER _target_directory _file)
    get_filename_component(_absolute "${_file}" ABSOLUTE)
    get_filename_component(_name "${_file}" NAME)
    set(_content "#include \"${_absolute}\"\n")
    set(_filename "${_target_directory}/${_name}")

    if (EXISTS "${_filename}")
        file(READ "${_filename}" _old_content)
    endif ()

    if (NOT _old_content STREQUAL _content)
        file(WRITE "${_filename}" "${_content}")
    endif ()
endmacro()

macro(WEBKIT_CREATE_FORWARDING_HEADERS _framework)
    set(_processing_directories 0)
    set(_processing_files 0)
    set(_target_directory "${DERIVED_SOURCES_DIR}/ForwardingHeaders/${_framework}")

    file(GLOB _files "${_target_directory}/*.h")
    foreach (_file ${_files})
        file(READ "${_file}" _content)
        string(REGEX MATCH "^#include \"([^\"]*)\"" _matched ${_content})
        if (_matched AND NOT EXISTS "${CMAKE_MATCH_1}")
           file(REMOVE "${_file}")
        endif ()
    endforeach ()

    foreach (_currentArg ${ARGN})
        if ("${_currentArg}" STREQUAL "DIRECTORIES")
            set(_processing_directories 1)
            set(_processing_files 0)
        elseif ("${_currentArg}" STREQUAL "FILES")
            set(_processing_directories 0)
            set(_processing_files 1)
        elseif (_processing_directories)
            file(GLOB _files "${_currentArg}/*.h")
            foreach (_file ${_files})
                WEBKIT_CREATE_FORWARDING_HEADER(${_target_directory} ${_file})
            endforeach ()
        elseif (_processing_files)
            WEBKIT_CREATE_FORWARDING_HEADER(${_target_directory} ${_currentArg})
        endif ()
    endforeach ()
endmacro()


text:
package com.atlassian.pageobjects.elements;

import com.atlassian.pageobjects.elements.query.TimedQuery;

/**
 *

 * Encapsulates Javascript functionality of the {@link com.atlassian.pageobjects.elements.PageElement}.
 *
 *

 * {@link PageElement#isPresent()} of the corresponding page element must return true
 * before any of the methods of this interface are invoked, otherwise {@link org.openqa.selenium.NoSuchElementException}
 * will be raised.
 *
 * @since 2.1
 */
public interface PageElementJavascript
{

    /**
     * Access to mouse events for the associated page element.
     *
     * @return mouse events for the element
     */
    PageElementMouseJavascript mouse();

    /**
     * Access to form events for the associated page element.
     *
     * @return form events for the element
     */
    PageElementFormJavascript form();

    // TODO NOT including this. This is low-priority and tricky to implement
//    /**
//     * Access to keyboard events for the associated page element.
//     *
//     * @return keyboard events for the element
//     */
//    PageElementKeyboardJavascript keyboard();

    /**
     *

     * Executes custom script on this element.
     *
     *

     * The corresponding HTML element will be available in the executing script under <tt>arguments[0]</tt> entry.
     * The provided <tt>arguments</tt> will be available under subsequents entries in the 'arguments' magic variable, as
     * stated in {@link org.openqa.selenium.JavascriptExecutor#executeScript(String, Object...)}.
     *
     *

     * The arguments and return type are as in
     * {@link org.openqa.selenium.JavascriptExecutor#executeScript(String, Object...)} with addition of
     * {@link com.atlassian.pageobjects.elements.PageElement}s as valid argument type.
     *
     *

     * When a DOM element is returned from the script, a corresponding
     * {@link com.atlassian.pageobjects.elements.PageElement}
     * instance will be returned from this method
     *
     * @param script javascript to execute
     * @param arguments custom arguments to the script. a number, a boolean, a String,
     * a {@link com.atlassian.pageobjects.elements.PageElement}, a {@link org.openqa.selenium.WebElement} or a List of
     * any combination of the above
     * @return One of Boolean, Long, String, List or {@link com.atlassian.pageobjects.elements.PageElement},
     * or null.
     * @throws NullPointerException if <tt>script</tt> is null
     *
     * @see org.openqa.selenium.JavascriptExecutor#executeScript(String, Object...)
     */
    public Object execute(String script, Object... arguments);

    /**
     *

     * Provides the same functionality as {@link #execute(String, Object...)}, but lets the client specify the
     * expected result type. The expected result type must not be null and must match the actual
     * result from the executed script.
     *
     * @param resultType expected type of the result. One of Boolean, Long, String, List or
     * {@link com.atlassian.pageobjects.elements.PageElement} . Must not be null
     * @param script javascript to execute
     * @param arguments custom arguments to the script. a number, a boolean, a String,
     * a {@link com.atlassian.pageobjects.elements.PageElement}, a {@link org.openqa.selenium.WebElement} or a List of
     * any combination of the above
     * @return result of the script converted to the <tt>resultType</tt>
     * @throws NullPointerException if <tt>script</tt> or <tt>resultType</tt> is null
     * @throws IllegalArgumentException if <tt>resultType</tt> is not one of the expected types
     * @throws ClassCastException if the actual result type does not match <tt>resultType</tt>
     *
     * @see #execute(String, Object...)
     */
    public <T> T execute(Class<T> resultType, String script, Object... arguments);

    /**
     *

     * Executes custom script on this element in a periodic manner, allowing the client to wait for a particular
     * expected result to occur (via the returned {@link TimedQuery}).
     *
     *

     * All rules (in particular with regards to the result type) of {@link #execute(String, Object...)} apply to this
     * method.
     *
     *

     * The caller must provide the expected return type as <tt>resultType</tt>. It must be one of the valid result types
     * or an exception will be raised.
     *
     * @param resultType expected type of the result. One of Boolean, Long, String or List. Must not be null
     * @param script javascript to execute
     * @param arguments custom arguments to the script. a number, a boolean, a String,
     * a {@link com.atlassian.pageobjects.elements.PageElement}, a {@link org.openqa.selenium.WebElement} or a List of
     * any combination of the above
     * @return {@link com.atlassian.pageobjects.elements.query.TimedQuery} to query for the expected result
     * @throws NullPointerException if <tt>script</tt> or <tt>resultType</tt> is null
     * @throws IllegalArgumentException if <tt>resultType</tt> is not one of the expected types
     * @throws ClassCastException if the actual result type does not match <tt>resultType</tt>
     *
     * @see org.openqa.selenium.JavascriptExecutor#executeScript(String, Object...)
     * @see #execute(String, Object...)
     *
     */
    public <T> TimedQuery<T> executeTimed(Class<T> resultType, String script, Object... arguments);

    /**
     *

     * Executes custom script on this element asynchronously.
     *
     *

     * All rules and conditions of {@link #execute(String, Object...)} apply, except the last argument in the
     * 'arguments' magic variable in the script is a callback that has to be invoked and given result of the script
     * so that this method returns. See {@link org.openqa.selenium.JavascriptExecutor#executeAsyncScript(String, Object...)}
     * for details.
     *
     *

     * Consider using {@link #executeTimed(Class, String, Object...)} instead.
     *
     * @param script javascript to execute
     * @param  arguments custom arguments to the script. a number, a boolean, a String,
     * a {@link com.atlassian.pageobjects.elements.PageElement}, a {@link org.openqa.selenium.WebElement} or a List of
     * any combination of the above
     * @return One of Boolean, Long, String, List or {@link com.atlassian.pageobjects.elements.PageElement}. Or null.
     * @throws NullPointerException if <tt>script</tt> is null
     *
     * @see org.openqa.selenium.JavascriptExecutor#executeAsyncScript(String, Object...) (String, Object...)
     * @see #execute(String, Object...)
     */
    public Object executeAsync(String script, Object... arguments);

    /**
     *

     * Provides the same functionality as {@link #executeAsync(Class, String, Object...)}, but lets the client specify
     * the expected result type. The expected result type must not be null and must match the actual
     * result from the executed script.
     *
     *

     * Consider using {@link #executeTimed(Class, String, Object...)} instead.
     *
     * @param resultType expected type of the result. One of Boolean, Long, String, List or
     * {@link com.atlassian.pageobjects.elements.PageElement} . Must not be null
     * @param script javascript to execute
     * @param arguments custom arguments to the script. a number, a boolean, a String,
     * a {@link com.atlassian.pageobjects.elements.PageElement}, a {@link org.openqa.selenium.WebElement} or a List of
     * any combination of the above
     * @return result of the script converted to the <tt>resultType</tt>
     * @throws NullPointerException if <tt>script</tt> or <tt>resultType</tt> is null
     * @throws IllegalArgumentException if <tt>resultType</tt> is not one of the expected types
     * @throws ClassCastException if the actual result type does not match <tt>resultType</tt>
     *
     * @see #executeAsync(String, Object...) (String, Object...)
     */
    public <T> T executeAsync(Class<T> resultType, String script, Object... arguments);
}


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

<rootTag>
  <Award>
    <AwardTitle>Model-Driven Engineering Languages and Systems Conference Participant Funding</AwardTitle>
    <AwardEffectiveDate>05/01/2012</AwardEffectiveDate>
    <AwardExpirationDate>04/30/2013</AwardExpirationDate>
    <AwardAmount>15000</AwardAmount>
    <AwardInstrument>
      <Value>Standard Grant</Value>
    </AwardInstrument>
    <Organization>
      05010000
      <Directorate>
        <LongName>Direct For Computer & Info Scie & Enginr</LongName>
      </Directorate>
      <Division>
        <LongName>Division of Computing and Communication Foundations</LongName>
      </Division>
    </Organization>
    <ProgramOfficer>
      <SignBlockName>Sol J. Greenspan</SignBlockName>
    </ProgramOfficer>
    <AbstractNarration>This grant provides travel support for doctoral students at the 2012 Model-Driven Engineering Languages and Systems Conference (MODELS). The students will attend a doctoral symposium, where they will get feedback from a panel of leaders in the field on their research. They will also participate as scribes in workshops related to their research area. The broader impacts of this grant is the education and training of the students as well as the building of the next generation of researchers in this area. In this important area of Software Engineering field, the US is seriously underrepresented, and this grant will help increase participation from US students.</AbstractNarration>
    <MinAmdLetterDate>05/08/2012</MinAmdLetterDate>
    <MaxAmdLetterDate>05/08/2012</MaxAmdLetterDate>
    <ARRAAmount/>
    <AwardID>1237945</AwardID>
    <Investigator>
      <FirstName>Robert</FirstName>
      <LastName>France</LastName>
      <EmailAddress>france@cs.colostate.edu</EmailAddress>
      <StartDate>05/08/2012</StartDate>
      <EndDate/>
      <RoleCode>Co-Principal Investigator</RoleCode>
    </Investigator>
    <Investigator>
      <FirstName>Jeffrey</FirstName>
      <LastName>Gray</LastName>
      <EmailAddress>gray@cs.ua.edu</EmailAddress>
      <StartDate>05/08/2012</StartDate>
      <EndDate/>
      <RoleCode>Co-Principal Investigator</RoleCode>
    </Investigator>
    <Investigator>
      <FirstName>Geri</FirstName>
      <LastName>Georg</LastName>
      <EmailAddress>georg@cs.colostate.edu</EmailAddress>
      <StartDate>05/08/2012</StartDate>
      <EndDate/>
      <RoleCode>Principal Investigator</RoleCode>
    </Investigator>
    <Institution>
      <Name>Colorado State University</Name>
      <CityName>Fort Collins</CityName>
      <ZipCode>805232002</ZipCode>
      <PhoneNumber>9704916355</PhoneNumber>
      <StreetAddress>601 S Howes St</StreetAddress>
      <CountryName>United States</CountryName>
      <StateName>Colorado</StateName>
      <StateCode>CO</StateCode>
    </Institution>
    <ProgramElement>
      7798
      <Text>SOFTWARE & HARDWARE FOUNDATION</Text>
    </ProgramElement>
    <ProgramReference>
      7944
      <Text>SOFTWARE ENG & FORMAL METHODS</Text>
    </ProgramReference>
  </Award>
</rootTag>


text:
(function(global) {

	var support = {},
			ua = navigator.userAgent;

	function toCameCase(name) {
		return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
			return m1 + m2.toUpperCase();
		}).replace(/^-/, '');
	}

	//Test d'une propriété css
	function testCSS(prop) {
		if (prop.indexOf('-') != -1) {
			prop = toCameCase(prop);
		}
		var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
				prefixes = 'Moz O ms Webkit',
				prefixesArr = prefixes.split(' '),
				props = (prop + ' ' + prefixesArr.join(ucProp + ' ') + ucProp).split(' ');

		var el = document.createElement('a');
		var propsLength = props.length,
				i,
				p;

		for (i = 0; i < propsLength; i++) {
			p = props[i];
			if (el.style[p] !== undefined) {
				return p;
			}
		}
		return false;
	}

	// //Support history
	// function test_history() {
	// 	if((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
	// 			ua.indexOf('Mobile Safari') !== -1 &&
	// 			ua.indexOf('Chrome') === -1 &&
	// 			ua.indexOf('Windows Phone') === -1) {
	// 		return false;
	// 	}
	// 	if(ua.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)) {
	// 		return false;
	// 	}
	// 	return (window.history && 'pushState' in window.history && 'replaceState' in window.history);
	// }
	// support.history = test_history();

	// //Support vidéo et savoir le format supporté
	// function support_video() {
	// 	var elem = document.createElement('video');
	// 	var bool = false;
	//
	// 	try {
	// 		if (bool = !!elem.canPlayType) {
	// 			bool = new Boolean(bool);
	// 			bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, '');
	// 			bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, '');
	// 			bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, '');
	// 			bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, '');
	// 			bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, '');
	// 		}
	// 	} catch (e) {}
	// 	return bool;
	// }
	// support.video = support_video();

	// //Event animation/transition end
	// function transitionEndEventName() {
	// 	var i,
	// 			el = document.createElement('div'),
	// 			transitions = {
	// 					'transition':'transitionend',
	// 					'OTransition':'otransitionend',  // oTransitionEnd in very old Opera
	// 					'MozTransition':'transitionend',
	// 					'WebkitTransition':'webkitTransitionEnd'
	// 			};
	// 	for (i in transitions) {
	// 		if (transitions.hasOwnProperty(i) && el.style[i] !== undefined) {
	// 			return transitions[i];
	// 		}
	// 	}
	// 	return false;
	// }
	// support.transitionend = transitionEndEventName();
	//
	// function animationEndEventName() {
	// 	var i,
	// 			el = document.createElement('div'),
	// 			animations = {
	// 				'animation':'animationend',
	// 				'OAnimation':'oanimationend',  // oAnimationEnd in very old Opera
	// 				'MozAnimation':'animationend',
	// 				'WebkitAnimation':'webkitAnimationEnd'
	// 			};
	// 	for (i in animations) {
	// 		if (animations.hasOwnProperty(i) && el.style[i] !== undefined) {
	// 			return animations[i];
	// 		}
	// 	}
	// 	return false;
	// }
	// support.animationend = animationEndEventName();

	support.objectFit = testCSS("object-fit");
	support.objectPosition = testCSS("object-position");

  global.support = support;
	global.testCSS = testCSS;

})(this);

// Avoid `console` errors in browsers that lack a console.
// (function() {
//     var method;
//     var noop = function () {};
//     var methods = [
//         'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
//         'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
//         'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
//         'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
//     ];
//     var length = methods.length;
//     var console = (window.console = window.console || {});
//
//     while (length--) {
//         method = methods[length];
//
//         // Only stub undefined methods.
//         if (!console[method]) {
//             console[method] = noop;
//         }
//     }
// }());

//Closest & matches
(function (ELEMENT) {
	ELEMENT.matches = ELEMENT.matches || ELEMENT.mozMatchesSelector || ELEMENT.msMatchesSelector || ELEMENT.oMatchesSelector || ELEMENT.webkitMatchesSelector || function matches(selector) {
		var element = this,
		elements = (element.document || element.ownerDocument).querySelectorAll(selector),
		index = 0;
		while (elements[index] && elements[index] !== element) {
			++index;
		}
		return elements[index] ? true : false;
	};

	ELEMENT.closest = ELEMENT.closest || function closest(selector) {
		var element = this;
		while (element) {
			if (element.matches(selector)) {
				break;
			}
			element = element.parentElement;
		}
		return element;
	};
}(Element.prototype));

//Remove
(function (ELEMENT) {
	ELEMENT.remove = ELEMENT.remove || function remove() {
		if (this.parentNode) {
            this.parentNode.removeChild(this);
        }
	};
}(Element.prototype));

// //RequestAnimationFrame
// //https://gist.github.com/paulirish/1579671
// (function() {
//     var lastTime = 0;
//     var vendors = ['ms', 'moz', 'webkit', 'o'];
//     for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
//         window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
//         window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
//     }
//
//     if (!window.requestAnimationFrame)
//         window.requestAnimationFrame = function(callback, element) {
//             var currTime = new Date().getTime();
//             var timeToCall = Math.max(0, 16 - (currTime - lastTime));
//             var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
//             lastTime = currTime + timeToCall;
//             return id;
//         };
//
//     if (!window.cancelAnimationFrame)
//         window.cancelAnimationFrame = function(id) {
//             clearTimeout(id);
//         };
// }());

//ClassList (IE9-, opera mini)
(function () {

	if (typeof window.Element === "undefined" || "classList" in document.documentElement) return;

	var prototype = Array.prototype,
	    push = prototype.push,
	    splice = prototype.splice,
	    join = prototype.join;

	function DOMTokenList(el) {
	  this.el = el;
	  // The className needs to be trimmed and split on whitespace
	  // to retrieve a list of classes.
	  var classes = el.className.replace(/^\s+|\s+$/g,'').split(/\s+/);
	  for (var i = 0; i < classes.length; i++) {
	    push.call(this, classes[i]);
	  }
	};

	DOMTokenList.prototype = {
	  add: function(token) {
	    if(this.contains(token)) return;
	    push.call(this, token);
	    this.el.className = this.toString();
	  },
	  contains: function(token) {
	    return this.el.className.indexOf(token) != -1;
	  },
	  item: function(index) {
	    return this[index] || null;
	  },
	  remove: function(token) {
	    if (!this.contains(token)) return;
	    for (var i = 0; i < this.length; i++) {
	      if (this[i] == token) break;
	    }
	    splice.call(this, i, 1);
	    this.el.className = this.toString();
	  },
	  toString: function() {
	    return join.call(this, ' ');
	  },
	  toggle: function(token) {
	    if (!this.contains(token)) {
	      this.add(token);
	    } else {
	      this.remove(token);
	    }

	    return this.contains(token);
	  }
	};

	window.DOMTokenList = DOMTokenList;

	function defineElementGetter (obj, prop, getter) {
    if (Object.defineProperty) {
      Object.defineProperty(obj, prop,{
        get : getter
      });
    } else {
      obj.__defineGetter__(prop, getter);
    }
	}

	defineElementGetter(Element.prototype, 'classList', function () {
	  return new DOMTokenList(this);
	});

})();

(function (global) {

  'use strict';

  function forEach(elements, fn) {
    if(!elements || Array.isArray(elements) && !elements.length) return;
    else if(!elements.length) fn(elements, i);
    else for (var i = 0; i < elements.length; i++) fn(elements[i], i);
  }

  var hasClass = function( el, c ) {
    return el.classList.contains( c );
  };
  var addClass = function( el, c ) {
    forEach(el, function(elem, i){
      elem.classList.add( c );
    });
  };
  var removeClass = function( el, c ) {
    forEach(el, function(elem, i){
      elem.classList.remove( c );
    });
  };

  function toggleClass( el, c ) {
    forEach(el, function(elem, i){
      var fn = hasClass( elem, c ) ? removeClass : addClass;
      fn( elem, c );
    });
  }

  var ffclass = {
    has: hasClass,
    add: addClass,
    remove: removeClass,
    toggle: toggleClass
  };

  // Exports in global environment
  global.ffclass = ffclass;

})(this);

(function(global) {
  //NodeList to array
  function toArray(list) {
    return list ? Array.prototype.slice.call(list) : [];
  }

  //Select only the first node (or #id)
  function $(selector, container) {
    if (!container && selector.indexOf('#') === 0) return document.getElementById(selector.substr(1, selector.length));
    return (container || document).querySelector(selector);
  };

  //Select all the node and convert to array
  function $$(selector, container) {
    return toArray( (container || document).querySelectorAll(selector) );
  }

  global.$ = $;
  global.$$ = $$;
  global.ff = {
    "toArray": toArray
  };

})(this);


text:
********
DumpText
********

Similar to the DumpText demo SA plugin.

Example usage
=============

.. code-block:: none

    loadplugin      pad.plugins.dump_text.DumpText

Usage
=====

Sample plugin used for testing.

Options
=======

None

EVAL rules
==========

.. automethod:: pad.plugins.dump_text.DumpText.dump_text
    :noindex:
.. automethod:: pad.plugins.dump_text.DumpText.dump_raw_text
    :noindex:
.. automethod:: pad.plugins.dump_text.DumpText.dump_meta_data
    :noindex:

Tags
====

None


text:
class Profile;

namespace extensions {
class ExtensionCacheFake;
class ExtensionService;
class ExtensionSet;
class ProcessManager;

// Base class for extension browser tests. Provides utilities for loading,
// unloading, and installing extensions.
class ExtensionBrowserTest : virtual public InProcessBrowserTest {
 public:
  // Different types of extension's lazy background contexts used in some tests.
  enum class ContextType {
    // TODO(crbug.com:/1241220): Get rid of this value when we can use
    // absl::optional in the LoadOptions struct.
    // No specific context type.
    kNone,
    // A non-persistent background page/JS based extension.
    kEventPage,
    // A Service Worker based extension.
    kServiceWorker,
    // An extension with a persistent background page.
    kPersistentBackground,
    // Use the value from the manifest. This is used when the test
    // has been parameterized but the particular extension should
    // be loaded without using the parameterized type. Typically,
    // this is used when a test loads another extension that is
    // not parameterized.
    kFromManifest,
  };

  ExtensionBrowserTest(const ExtensionBrowserTest&) = delete;
  ExtensionBrowserTest& operator=(const ExtensionBrowserTest&) = delete;

 protected:
  struct LoadOptions {
    // Allows the extension to run in incognito mode.
    bool allow_in_incognito = false;

    // Allows file access for the extension.
    bool allow_file_access = false;

    // Doesn't fail when the loaded manifest has warnings (should only be used
    // when testing deprecated features).
    bool ignore_manifest_warnings = false;

    // Waits for extension renderers to fully load.
    bool wait_for_renderers = true;

    // An optional install param.
    const char* install_param = nullptr;

    // If this is a Service Worker-based extension, wait for the
    // Service Worker's registration to be stored before returning.
    bool wait_for_registration_stored = false;

    // Loads the extension with location COMPONENT.
    bool load_as_component = false;

    // Changes the "manifest_version" manifest key to 3. Note as of now, this
    // doesn't make any other changes to convert the extension to MV3 other than
    // changing the integer value in the manifest.
    bool load_as_manifest_version_3 = false;

    // Used to force loading the extension with a particular background type.
    // Currently this only support loading an extension as using a service
    // worker.
    ContextType context_type = ContextType::kNone;
  };

  explicit ExtensionBrowserTest(ContextType context_type = ContextType::kNone);
  ~ExtensionBrowserTest() override;

  // Useful accessors.
  ExtensionService* extension_service() {
    return ExtensionSystem::Get(profile())->extension_service();
  }

  ExtensionRegistry* extension_registry() {
    return ExtensionRegistry::Get(profile());
  }

  const std::string& last_loaded_extension_id() {
    return observer_->last_loaded_extension_id();
  }

  // Get the profile to use.
  virtual Profile* profile();

  // Extensions used in tests are typically not from the web store and will have
  // missing content verification hashes. The default implementation disables
  // content verification; this should be overridden by derived tests which care
  // about content verification.
  virtual bool ShouldEnableContentVerification();

  // Extensions used in tests are typically not from the web store and will fail
  // install verification. The default implementation disables install
  // verification; this should be overridden by derived tests which care
  // about install verification.
  virtual bool ShouldEnableInstallVerification();

  // Returns the path of the directory from which to serve resources when they
  // are prefixed with "_test_resources/".
  // The default is chrome/test/data/extensions/.
  virtual base::FilePath GetTestResourcesParentDir();

  static const Extension* GetExtensionByPath(const ExtensionSet& extensions,
                                             const base::FilePath& path);

  // InProcessBrowserTest
  void SetUp() override;
  void SetUpCommandLine(base::CommandLine* command_line) override;
  void SetUpOnMainThread() override;
  void TearDownOnMainThread() override;

  const Extension* LoadExtension(const base::FilePath& path);

  const Extension* LoadExtension(const base::FilePath& path,
                                 const LoadOptions& options);

  // Loads unpacked extension from |path| with manifest |manifest_relative_path|
  // and imitates that it is a component extension.
  // |manifest_relative_path| is relative to |path|.
  const Extension* LoadExtensionAsComponentWithManifest(
      const base::FilePath& path,
      const base::FilePath::CharType* manifest_relative_path);

  // Loads unpacked extension from |path| and imitates that it is a component
  // extension. Equivalent to
  // LoadExtensionAsComponentWithManifest(path, kManifestFilename).
  const Extension* LoadExtensionAsComponent(const base::FilePath& path);

  // Loads and launches the app from |path|, and returns it.
  const Extension* LoadAndLaunchApp(const base::FilePath& path);

  // Launches |extension| as a window and returns the browser.
  Browser* LaunchAppBrowser(const Extension* extension);

  // Pack the extension in |dir_path| into a crx file and return its path.
  // Return an empty FilePath if there were errors.
  base::FilePath PackExtension(
      const base::FilePath& dir_path,
      int extra_run_flags = ExtensionCreator::kNoRunFlags);

  // Pack the extension in |dir_path| into a crx file at |crx_path|, using the
  // key |pem_path|. If |pem_path| does not exist, create a new key at
  // |pem_out_path|.
  // Return the path to the crx file, or an empty FilePath if there were errors.
  base::FilePath PackExtensionWithOptions(
      const base::FilePath& dir_path,
      const base::FilePath& crx_path,
      const base::FilePath& pem_path,
      const base::FilePath& pem_out_path,
      int extra_run_flags = ExtensionCreator::kNoRunFlags);

  // |expected_change| indicates how many extensions should be installed (or
  // disabled, if negative).
  // 1 means you expect a new install, 0 means you expect an upgrade, -1 means
  // you expect a failed upgrade.
  const Extension* InstallExtension(const base::FilePath& path,
                                    int expected_change) {
    return InstallOrUpdateExtension(
        std::string(), path, INSTALL_UI_TYPE_NONE, expected_change);
  }

  // Same as above, but an install source other than
  // mojom::ManifestLocation::kInternal can be specified.
  const Extension* InstallExtension(const base::FilePath& path,
                                    int expected_change,
                                    mojom::ManifestLocation install_source) {
    return InstallOrUpdateExtension(std::string(),
                                    path,
                                    INSTALL_UI_TYPE_NONE,
                                    expected_change,
                                    install_source);
  }

  // Installs an extension and grants it the permissions it requests.
  // TODO(devlin): It seems like this is probably the desired outcome most of
  // the time - otherwise the extension installs in a disabled state.
  const Extension* InstallExtensionWithPermissionsGranted(
      const base::FilePath& file_path,
      int expected_change) {
    return InstallOrUpdateExtension(
        std::string(), file_path, INSTALL_UI_TYPE_NONE, expected_change,
        mojom::ManifestLocation::kInternal, browser(), Extension::NO_FLAGS,
        false, true);
  }

  // Installs extension as if it came from the Chrome Webstore.
  const Extension* InstallExtensionFromWebstore(const base::FilePath& path,
                                                int expected_change);

  // Same as above but passes an id to CrxInstaller and does not allow a
  // privilege increase.
  const Extension* UpdateExtension(const std::string& id,
                                   const base::FilePath& path,
                                   int expected_change) {
    return InstallOrUpdateExtension(id, path, INSTALL_UI_TYPE_NONE,
                                    expected_change);
  }

  // Same as UpdateExtension but waits for the extension to be idle first.
  const Extension* UpdateExtensionWaitForIdle(const std::string& id,
                                              const base::FilePath& path,
                                              int expected_change);

  const Extension* InstallExtensionWithUIAutoConfirm(const base::FilePath& path,
                                                     int expected_change,
                                                     Browser* browser) {
    return InstallOrUpdateExtension(
        std::string(), path, INSTALL_UI_TYPE_AUTO_CONFIRM, expected_change,
        browser, Extension::NO_FLAGS);
  }

  const Extension* InstallExtensionWithSourceAndFlags(
      const base::FilePath& path,
      int expected_change,
      mojom::ManifestLocation install_source,
      Extension::InitFromValueFlags creation_flags) {
    return InstallOrUpdateExtension(std::string(), path, INSTALL_UI_TYPE_NONE,
                                    expected_change, install_source, browser(),
                                    creation_flags, false, false);
  }

  // Begins install process but simulates a user cancel.
  const Extension* StartInstallButCancel(const base::FilePath& path) {
    return InstallOrUpdateExtension(
        std::string(), path, INSTALL_UI_TYPE_CANCEL, 0);
  }

  void ReloadExtension(const std::string& extension_id);

  void UnloadExtension(const std::string& extension_id);

  void UninstallExtension(const std::string& extension_id);

  void DisableExtension(const std::string& extension_id);

  void EnableExtension(const std::string& extension_id);

  // Wait for the number of visible page actions to change to |count|.
  bool WaitForPageActionVisibilityChangeTo(int count) {
    return observer_->WaitForPageActionVisibilityChangeTo(count);
  }

  // Wait for the crx installer to be done. Returns true if it has finished
  // successfully.
  bool WaitForCrxInstallerDone() {
    return observer_->WaitForCrxInstallerDone();
  }

  // Wait for all extension views to load.
  bool WaitForExtensionViewsToLoad() {
    return observer_->WaitForExtensionViewsToLoad();
  }

  // Wait for the extension to be idle.
  bool WaitForExtensionIdle(const std::string& extension_id) {
    return observer_->WaitForExtensionIdle(extension_id);
  }

  // Wait for the extension to not be idle.
  bool WaitForExtensionNotIdle(const std::string& extension_id) {
    return observer_->WaitForExtensionNotIdle(extension_id);
  }

  // Simulates a page calling window.open on an URL and waits for the
  // navigation.
  // |should_succeed| indicates whether the navigation should succeed, in which
  // case the last committed url should match the passed url and the page should
  // not be an error or interstitial page.
  void OpenWindow(content::WebContents* contents,
                  const GURL& url,
                  bool newtab_process_should_equal_opener,
                  bool should_succeed,
                  content::WebContents** newtab_result);

  // Simulates a page navigating itself to an URL and waits for the
  // navigation. Returns true if the navigation succeeds.
  [[nodiscard]] bool NavigateInRenderer(content::WebContents* contents,
                                        const GURL& url);

  // Looks for an ExtensionHost whose URL has the given path component
  // (including leading slash).  Also verifies that the expected number of hosts
  // are loaded.
  ExtensionHost* FindHostWithPath(ProcessManager* manager,
                                  const std::string& path,
                                  int expected_hosts);

  // Returns
  // browsertest_util::ExecuteScriptInBackgroundPage(profile(),
  // extension_id, script).
  std::string ExecuteScriptInBackgroundPage(
      const std::string& extension_id,
      const std::string& script,
      extensions::browsertest_util::ScriptUserActivation
          script_user_activation =
              extensions::browsertest_util::ScriptUserActivation::kActivate);

  // Returns
  // browsertest_util::ExecuteScriptInBackgroundPageNoWait(
  // profile(), extension_id, script).
  bool ExecuteScriptInBackgroundPageNoWait(const std::string& extension_id,
                                           const std::string& script);

#if BUILDFLAG(IS_CHROMEOS_ASH)
  // True if the command line should be tweaked as if ChromeOS user is
  // already logged in.
  bool set_chromeos_user_;
#endif

  // Set to "chrome/test/data/extensions". Derived classes may override.
  // TODO(michaelpg): Don't override protected data members.
  base::FilePath test_data_dir_;

  std::unique_ptr<ChromeExtensionTestNotificationObserver> observer_;

  const ContextType context_type_;

 private:
  // Modifies extension at `input_path` as dictated by `options`. On success,
  // returns true and populates `out_path`. On failure, false is returned.
  bool ModifyExtensionIfNeeded(const LoadOptions& options,
                               const base::FilePath& input_path,
                               base::FilePath* out_path);

  // Temporary directory for testing.
  base::ScopedTempDir temp_dir_;

  // Specifies the type of UI (if any) to show during installation and what
  // user action to simulate.
  enum InstallUIType {
    INSTALL_UI_TYPE_NONE,
    INSTALL_UI_TYPE_CANCEL,
    INSTALL_UI_TYPE_NORMAL,
    INSTALL_UI_TYPE_AUTO_CONFIRM,
  };

  const Extension* InstallOrUpdateExtension(const std::string& id,
                                            const base::FilePath& path,
                                            InstallUIType ui_type,
                                            int expected_change);
  const Extension* InstallOrUpdateExtension(
      const std::string& id,
      const base::FilePath& path,
      InstallUIType ui_type,
      int expected_change,
      Browser* browser,
      Extension::InitFromValueFlags creation_flags);
  const Extension* InstallOrUpdateExtension(
      const std::string& id,
      const base::FilePath& path,
      InstallUIType ui_type,
      int expected_change,
      mojom::ManifestLocation install_source);
  const Extension* InstallOrUpdateExtension(
      const std::string& id,
      const base::FilePath& path,
      InstallUIType ui_type,
      int expected_change,
      mojom::ManifestLocation install_source,
      Browser* browser,
      Extension::InitFromValueFlags creation_flags,
      bool wait_for_idle,
      bool grant_permissions);

  // Make the current channel "dev" for the duration of the test.
  ScopedCurrentChannel current_channel_;

  // Disable external install UI.
  FeatureSwitch::ScopedOverride override_prompt_for_external_extensions_;

#if BUILDFLAG(IS_WIN)
  // Use mock shortcut directories to ensure app shortcuts are cleaned up.
  base::ScopedPathOverride user_desktop_override_;
  base::ScopedPathOverride common_desktop_override_;
  base::ScopedPathOverride user_quick_launch_override_;
  base::ScopedPathOverride start_menu_override_;
  base::ScopedPathOverride common_start_menu_override_;
#endif

  // The default profile to be used.
  raw_ptr<Profile> profile_;

  // Cache cache implementation.
  std::unique_ptr<ExtensionCacheFake> test_extension_cache_;

  // An override so that chrome-extensions://<extension_id>/_test_resources/foo
  // maps to chrome/test/data/extensions/foo.
  ExtensionProtocolTestHandler test_protocol_handler_;

  // Conditionally disable content verification.
  std::unique_ptr<ScopedIgnoreContentVerifierForTest>
      ignore_content_verification_;

  // Conditionally disable install verification.
  std::unique_ptr<ScopedInstallVerifierBypassForTest>
      ignore_install_verification_;

  // Used to disable CRX publisher signature checking.
  SandboxedUnpacker::ScopedVerifierFormatOverrideForTest
      verifier_format_override_;

  ExtensionUpdater::ScopedSkipScheduledCheckForTest skip_scheduled_check_;
};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_


text:
package graphdriver

import (
	"errors"
	"fmt"
	"io"
	"path/filepath"

	"github.com/docker/docker/pkg/archive"
	"github.com/docker/docker/pkg/idtools"
	"github.com/docker/docker/pkg/plugingetter"
)

type graphDriverProxy struct {
	name string
	p    plugingetter.CompatPlugin
}

type graphDriverRequest struct {
	ID         string            `json:",omitempty"`
	Parent     string            `json:",omitempty"`
	MountLabel string            `json:",omitempty"`
	StorageOpt map[string]string `json:",omitempty"`
}

type graphDriverResponse struct {
	Err      string            `json:",omitempty"`
	Dir      string            `json:",omitempty"`
	Exists   bool              `json:",omitempty"`
	Status   [][2]string       `json:",omitempty"`
	Changes  []archive.Change  `json:",omitempty"`
	Size     int64             `json:",omitempty"`
	Metadata map[string]string `json:",omitempty"`
}

type graphDriverInitRequest struct {
	Home    string
	Opts    []string        `json:"Opts"`
	UIDMaps []idtools.IDMap `json:"UIDMaps"`
	GIDMaps []idtools.IDMap `json:"GIDMaps"`
}

func (d *graphDriverProxy) Init(home string, opts []string, uidMaps, gidMaps []idtools.IDMap) error {
	if !d.p.IsV1() {
		if cp, ok := d.p.(plugingetter.CountedPlugin); ok {
			// always acquire here, it will be cleaned up on daemon shutdown
			cp.Acquire()
		}
	}
	args := &graphDriverInitRequest{
		Home:    home,
		Opts:    opts,
		UIDMaps: uidMaps,
		GIDMaps: gidMaps,
	}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Init", args, &ret); err != nil {
		return err
	}
	if ret.Err != "" {
		return errors.New(ret.Err)
	}
	return nil
}

func (d *graphDriverProxy) String() string {
	return d.name
}

func (d *graphDriverProxy) CreateReadWrite(id, parent string, opts *CreateOpts) error {
	args := &graphDriverRequest{
		ID:     id,
		Parent: parent,
	}
	if opts != nil {
		args.MountLabel = opts.MountLabel
		args.StorageOpt = opts.StorageOpt
	}

	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.CreateReadWrite", args, &ret); err != nil {
		return err
	}
	if ret.Err != "" {
		return errors.New(ret.Err)
	}
	return nil
}

func (d *graphDriverProxy) Create(id, parent string, opts *CreateOpts) error {
	args := &graphDriverRequest{
		ID:     id,
		Parent: parent,
	}
	if opts != nil {
		args.MountLabel = opts.MountLabel
		args.StorageOpt = opts.StorageOpt
	}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Create", args, &ret); err != nil {
		return err
	}
	if ret.Err != "" {
		return errors.New(ret.Err)
	}
	return nil
}

func (d *graphDriverProxy) Remove(id string) error {
	args := &graphDriverRequest{ID: id}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Remove", args, &ret); err != nil {
		return err
	}
	if ret.Err != "" {
		return errors.New(ret.Err)
	}
	return nil
}

func (d *graphDriverProxy) Get(id, mountLabel string) (string, error) {
	args := &graphDriverRequest{
		ID:         id,
		MountLabel: mountLabel,
	}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Get", args, &ret); err != nil {
		return "", err
	}
	var err error
	if ret.Err != "" {
		err = errors.New(ret.Err)
	}
	return filepath.Join(d.p.BasePath(), ret.Dir), err
}

func (d *graphDriverProxy) Put(id string) error {
	args := &graphDriverRequest{ID: id}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Put", args, &ret); err != nil {
		return err
	}
	if ret.Err != "" {
		return errors.New(ret.Err)
	}
	return nil
}

func (d *graphDriverProxy) Exists(id string) bool {
	args := &graphDriverRequest{ID: id}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Exists", args, &ret); err != nil {
		return false
	}
	return ret.Exists
}

func (d *graphDriverProxy) Status() [][2]string {
	args := &graphDriverRequest{}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Status", args, &ret); err != nil {
		return nil
	}
	return ret.Status
}

func (d *graphDriverProxy) GetMetadata(id string) (map[string]string, error) {
	args := &graphDriverRequest{
		ID: id,
	}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.GetMetadata", args, &ret); err != nil {
		return nil, err
	}
	if ret.Err != "" {
		return nil, errors.New(ret.Err)
	}
	return ret.Metadata, nil
}

func (d *graphDriverProxy) Cleanup() error {
	if !d.p.IsV1() {
		if cp, ok := d.p.(plugingetter.CountedPlugin); ok {
			// always release
			defer cp.Release()
		}
	}

	args := &graphDriverRequest{}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Cleanup", args, &ret); err != nil {
		return nil
	}
	if ret.Err != "" {
		return errors.New(ret.Err)
	}
	return nil
}

func (d *graphDriverProxy) Diff(id, parent string) (io.ReadCloser, error) {
	args := &graphDriverRequest{
		ID:     id,
		Parent: parent,
	}
	body, err := d.p.Client().Stream("GraphDriver.Diff", args)
	if err != nil {
		return nil, err
	}
	return body, nil
}

func (d *graphDriverProxy) Changes(id, parent string) ([]archive.Change, error) {
	args := &graphDriverRequest{
		ID:     id,
		Parent: parent,
	}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.Changes", args, &ret); err != nil {
		return nil, err
	}
	if ret.Err != "" {
		return nil, errors.New(ret.Err)
	}

	return ret.Changes, nil
}

func (d *graphDriverProxy) ApplyDiff(id, parent string, diff io.Reader) (int64, error) {
	var ret graphDriverResponse
	if err := d.p.Client().SendFile(fmt.Sprintf("GraphDriver.ApplyDiff?id=%s&parent=%s", id, parent), diff, &ret); err != nil {
		return -1, err
	}
	if ret.Err != "" {
		return -1, errors.New(ret.Err)
	}
	return ret.Size, nil
}

func (d *graphDriverProxy) DiffSize(id, parent string) (int64, error) {
	args := &graphDriverRequest{
		ID:     id,
		Parent: parent,
	}
	var ret graphDriverResponse
	if err := d.p.Client().Call("GraphDriver.DiffSize", args, &ret); err != nil {
		return -1, err
	}
	if ret.Err != "" {
		return -1, errors.New(ret.Err)
	}
	return ret.Size, nil
}


text:
title:  "iOS-骚操作-UIDebuggingInformationOverlay"
date:   2017-05-27 22:48:45
categories: iOS
---

UIDebuggingInformationOverlay是一个私有的UIWindow的子类。它的作用就是用来帮助iOS的开发人员和设计人员用来调试自己的APP。值得一提的是这个功能(Window)是个私有类。是前几天才被Ryan Peterson在浏览UIKit的私有头文件的时候发现并公布给大家。这是他的英文原文博客[UIDebuggingInformationOverlay](http://ryanipete.com/blog/ios/swift/objective-c/uidebugginginformationoverlay/).

## UIDebuggingInformationOverlay能帮我们干什么

正如之前所说,UIDebuggingInformationOverlay能帮我们在APP运行时调试UI的各种问题。
大致如下:
* View Hierarchy
* VC Hierarchy
* Ivar Explorer
* Measure
* Spec Compare
* System Color Audit(暂时没发现有什么用)

![img](https://github.com/Khala-wan/Khala-wan.github.io/raw/master/resource/UIDebuggingInformationOverlay/1.jpg)

## View Hierarchy (查看视图层级)

View Hierarchy可以帮我们查看当前控制器视图的层级关系,之前这些工作是Reval和Xcode的Debug View Hierarchy(断点调试)来帮我们完成的。Reval确实很好用,但它毕竟是一个第三方应用。相对来说,我更愿意使用Apple自己的工具。(摊手)
如图:

点击Change Current Window可以切换当前Debug的主Window(如果你有多个window的话)。

下面的图以某个UIImageView为例:
点击单个View层右侧的按钮可以详细查看这个View的类型、不透明度(可调节)、变量、状态等等。一般我们比较关注的是某个View的Frame。

查看View的变量可以找到这个类对应的属性值和我们所关心的数值进行比对。

查看状态信息可以看到这个View的类型和一些纯视图的属性如Transform等。不过每种类型的View其State Info中的Value的类型、数量也不同。

## VC Hierarchy (查看控制器层级)

这个功能可以帮助你定位当前Winow的控制器关系,同时他也可以看出你Present之后的控制器层级关系。

同样的,点击某一个你想要关注的VC就可以看到它对应的一些信息。也可以继续点击它的UIView来查看这个控制器所对应UIView的信息。

## Ivar Explorer (变量浏览)

这个功能有点吊,它可以让你浏览UIApplication的各种变量,更重要的是,还可以探索其他对象的变量。
比如我在UIApplicationDelegate中定义了一个变量,用来判断APP开启后是否需要跳转到消息中心。
``` swift
//是否跳转消息中心
var needToMessage:Bool = false
```
然后我们现在来想办法找到它,看看能不能看到它的值。首先进入Ivar Explorer。
然后找到UIApplication的delegate对象。

点击去看一下,第二个就是我们要找的变量。当前它的值是NO,看来我们不需要跳转到消息中心了。

至于你还想在你的APP中看到哪个对象的哪个变量就看你自己的咯~

## Measure (测量工具)

呃。。。讲真的这个功能绝对是我们和UI撕逼的双刃剑。有了它,你不用再因为那么0.5px的问题争论半天。但是如果UI会用它了,那么你可能还要多几个0.5px的问题😂

点击Vertical并长按你想测量的地方就可以显示出垂直方向上对应的间距,还可以按住不动拖动手指测量别的地方。

如果想测量水平方向,你懂得,点Horizontal。

细心的你会发现还有个叫View Mode的Switch。如果你打开了它,你的测量就会基于每一个View进行测量,效果如下:

## Spec Compare (UI对比工具)
这个功能可以让我们在对比UI图和实际开发出来的界面时不用两个页面看来看去。只需要从相册选择你这个页面的UI截图。然后向下滑动就可以增加透明度以比对细节。效果如下(UI图我找不到了。先用系统的凑合下):

>⚠注意因为要弹出UIImagePickerController所以在iOS9以上别忘了在Info.plist中加入相册使用的key:NSPhotoLibraryUsageDescription。否侧会闪退。

## 使用UIDebuggingInformationOverlay

说了那么多,那么要怎么使用它呢。

OC:
```objective-c
Class overlayClass = NSClassFromString(@"UIDebuggingInformationOverlay");

[overlayClass performSelector:NSSelectorFromString(@"prepareDebuggingOverlay")];

id obj = [overlayClass performSelector:NSSelectorFromString(@"overlay")];

//呼出UIDebuggingInformationOverlay窗口
[obj performSelector:NSSelectorFromString(@"toggleVisibility")];

```
Swift:
``` swift
let overlayClass = NSClassFromString("UIDebuggingInformationOverlay") as? UIWindow.Type
_ = overlayClass?.perform(NSSelectorFromString("prepareDebuggingOverlay"))
let overlay = overlayClass?.perform(NSSelectorFromString("overlay")).takeUnretainedValue() as? UIWindow
//呼出UIDebuggingInformationOverlay窗口
_ = overlay?.perform(NSSelectorFromString("toggleVisibility"))
```
在你想呼出UIDebuggingInformationOverlay窗口的地方只需要调用toggleVisibility()方法即可。或者更方便的方法是双击两下status bar。

## 总结

UIDebuggingInformationOverlay从各个方面来看都是很有用的,我也不知道Apple为什么不把它公布出来。但是至少现在我们还是可以用它的。**记得在提交AppStore的时候把它去掉,不然会被拒的。**
如果你还发现了其他酷炫的用法,请一定告诉我。3q~


text:
package uk.ac.ebi.embl.api.validation.check.feature;

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

import java.util.Collection;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import uk.ac.ebi.embl.api.entry.feature.Feature;
import uk.ac.ebi.embl.api.entry.feature.FeatureFactory;
import uk.ac.ebi.embl.api.storage.DataRow;
import uk.ac.ebi.embl.api.validation.*;

public class QualifierValueNotQualifierPatternCheckTest {

	private Feature feature;
	private QualifierValueNotQualifierPatternCheck check;

	@Before
	public void setUp() {
        ValidationMessageManager.addBundle(ValidationMessageManager.STANDARD_VALIDATION_BUNDLE);
		FeatureFactory featureFactory = new FeatureFactory();
		feature = featureFactory.createFeature("feature");

		DataRow dataRow = new DataRow("organism", ".+\\s(var.)\\s", "(null)", "cultivar");
        GlobalDataSets.addTestDataSet(GlobalDataSetFile.QUALIFIER_VALUE_NOT_QUALIFIER_PATTERN, dataRow);
		check = new QualifierValueNotQualifierPatternCheck();
	}

	@After
	public void tearDown() {
		GlobalDataSets.resetTestDataSets();
	}

	@Test
	public void testCheck_NoFeature() {
		assertTrue(check.check(null).isValid());
	}

	@Test
	public void testCheck_NoQualifiers() {
		assertTrue(check.check(feature).isValid());
	}

	@Test
	public void testCheck_NoCultivar() {
		feature.setSingleQualifierValue("organism", "X var. zebrafish");
		assertTrue(check.check(feature).isValid());
	}

	@Test
	public void testCheck_NoOrganism() {
		feature.setSingleQualifierValue("cultivar", "zebrafish");
		assertTrue(check.check(feature).isValid());
	}

	@Test
	public void testCheck_NoOrganismValue() {
		feature.setSingleQualifierValue("cultivar", "zebrafish");
		feature.setSingleQualifier("organism");
		assertTrue(check.check(feature).isValid());
	}

	@Test
	public void testCheck_NotPattern() {
		feature.setSingleQualifierValue("cultivar", "X var. zebrafish X");
		feature.setSingleQualifier("organism");
		assertTrue(check.check(feature).isValid());
	}

	@Test
	public void testCheck() {
		feature.setSingleQualifierValue("cultivar", "zebrafish");
		feature.setSingleQualifierValue("organism", "X var. zebrafish");

		ValidationResult result = check.check(feature);
		assertEquals(1, result.count("QualifierValueNotQualifierPatternCheck", Severity.ERROR));
	}

	@Test
	public void testCheck_Message() {
		feature.setSingleQualifierValue("cultivar", "zebrafish");
		feature.setSingleQualifierValue("organism", "X var. zebrafish");

		ValidationResult result = check.check(feature);
		Collection<ValidationMessage<Origin>> messages = result.getMessages(
                "QualifierValueNotQualifierPatternCheck", Severity.ERROR);
		assertEquals(
				"Qualifier organism must not have value which matches the pattern .+\\s(var.)\\s + <value> +  where <value> is a value of qualifier cultivar.",
				messages.iterator().next().getMessage());
	}

}


text:
<?php

defined('WEKIT_VERSION') || exit('Forbidden');

class PwSpaceProfile extends PwBaseHookService
{
    public function __construct()
    {
        parent::__construct();
    }

    public function displayHtml($spaceBo)
    {
        $this->runDo('createHtml', $spaceBo);
    }

    protected function _getInterfaceName()
    {
        return 'PwSpaceProfileDoInterface';
    }
}


text:
void GeoShape::SetOrientation(double angX,double angY, double angZ){
  orientation_[0]=angX;
  orientation_[1]=angY;
  orientation_[2]=angZ;
}

void GeoShape::SetCenter(double cenX,double cenY,double cenZ){
  center_[0]=cenX;
  center_[1]=cenY;
  center_[2]=cenZ;
}

vector<double> GeoShape::GetOrientation() const {
  return orientation_;
}

vector<double> GeoShape::GetCenter() const {
  return center_;
}

Point3D GeoShape::GetCenterP() const {
  Point3D p(center_[0],center_[1],center_[2]);
  return p;
}


text:
NSString *kRDErrorMessage = @"message";

#pragma mark -

@implementation RDError

#pragma mark -
#pragma mark Properties

@synthesize _message;

#pragma mark -
#pragma mark Initialization

- (id)initWithDictionary:(NSDictionary *)aDictionary
{
    if (!(self = [super init])) { return nil; }

    id aMessage = [aDictionary objectForKey:@"message"];
    if ([aMessage isKindOfClass:[NSString class]])
    {
        _message = [(NSString *)aMessage retain];
    }

    return self;
}

#pragma mark -
#pragma mark Deallocation

- (void)dealloc
{
    [_message release];
    _message = nil;

    [super dealloc];
}

#pragma mark -
#pragma mark NSCoding Protocol

- (void)encodeWithCoder:(NSCoder *)encoder
{
    [encoder encodeObject:_message forKey:kRDErrorMessage];
}

- (id)initWithCoder:(NSCoder *)decoder
{
    if (!(self = [self init])) { return nil; }

    _message = [decoder decodeObjectForKey:kRDErrorMessage];

    return self;
}

#pragma mark -
#pragma mark NSCopying Protocol

- (id)copyWithZone:(NSZone *)zone
{
    RDError *object = [[[self class] allocWithZone:zone] init];

    object->_message = nil;
    [object setMessage:[self message]];

    return object;
}

#pragma mark -
#pragma mark NSObject Protocol

- (NSString *)description
{
    return [self message];
}

@end