text:
// See docs in ../ops/nn_ops.cc.

#define USE_EIGEN_TENSOR
#define EIGEN_USE_THREADS

#include "tensorflow/core/kernels/conv_grad_shape_utils.h"

#include <algorithm>
#include <vector>

#include "tensorflow/core/framework/common_shape_fns.h"
#include "tensorflow/core/framework/kernel_shape_util.h"
#include "tensorflow/core/framework/numeric_op.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/util/padding.h"
#include "tensorflow/core/util/tensor_format.h"

namespace tensorflow {

// Compute padding for the given spatial dimension.
int ConvBackpropDimensions::SpatialPadding(const Padding& padding,
                                           int dim) const {
  return (padding == VALID)
             ? 0
             : std::max<int>(
                   0, static_cast<int>((output_size(dim) - 1) * stride(dim) +
                                       (filter_size(dim) - 1) * dilation(dim) +
                                       1 - input_size(dim)));
}

namespace {

Status ConvBackpropExtractAndVerifyDimension(
    StringPiece label, const TensorShape& input_shape,
    const TensorShape& filter_shape, const TensorShape& output_shape,
    const gtl::ArraySlice<int32>& dilations, const std::vector<int32>& strides,
    Padding padding, int64 padding_before, int64 padding_after, int spatial_dim,
    int filter_spatial_dim, ConvBackpropSpatialDimension* dim) {
  dim->input_size = input_shape.dim_size(spatial_dim);
  dim->filter_size = filter_shape.dim_size(filter_spatial_dim);
  dim->output_size = output_shape.dim_size(spatial_dim);
  dim->stride = strides[spatial_dim];
  dim->dilation = dilations[spatial_dim];
  int64 out_size = 0;
  TF_RETURN_IF_ERROR(GetWindowedOutputSizeVerboseV2(
      dim->input_size, dim->filter_size, dim->dilation, dim->stride, padding,
      &out_size, &padding_before, &padding_after));
  if (dim->output_size != out_size) {
    return errors::InvalidArgument(
        label, ": Size of out_backprop doesn't match computed: ", "actual = ",
        dim->output_size, ", computed = ", out_size,
        " spatial_dim: ", spatial_dim, " input: ", dim->input_size,
        " filter: ", dim->filter_size, " output: ", dim->output_size,
        " stride: ", dim->stride, " dilation: ", dim->dilation);
  }

  int64 effective_filter_size = (dim->filter_size - 1) * dim->dilation + 1;
  dim->expanded_output_size = (dim->output_size - 1) * dim->stride + 1;
  const auto padded_out_size = dim->input_size + effective_filter_size - 1;
  dim->pad_before = effective_filter_size - 1 - padding_before;
  dim->pad_after =
      padded_out_size - dim->expanded_output_size - dim->pad_before;
  VLOG(2) << label << ": expanded_out = " << dim->expanded_output_size
          << ", effective_filter_size = " << effective_filter_size
          << ", padded_out = " << padded_out_size
          << ", pad_before = " << dim->pad_before
          << ", pad_after = " << dim->pad_after
          << ", dilation = " << dim->dilation << ", strides = " << dim->stride;
  return Status::OK();
}

}  // namespace

Status ConvBackpropComputeDimensionsV2(
    StringPiece label, int num_spatial_dims, const TensorShape& input_shape,
    const TensorShape& filter_shape, const TensorShape& out_backprop_shape,
    const gtl::ArraySlice<int32>& dilations, const std::vector<int32>& strides,
    Padding padding, absl::Span<const int64> explicit_paddings,
    TensorFormat data_format, ConvBackpropDimensions* dims) {
  // The + 2 in the following line is for the batch and feature dimensions.
  const int num_dims = num_spatial_dims + 2;
  if (input_shape.dims() != num_dims) {
    return errors::InvalidArgument(label, ": input must be ", num_dims,
                                   "-dimensional");
  }
  if (filter_shape.dims() != num_dims) {
    return errors::InvalidArgument(label, ": filter must be ", num_dims,
                                   "-dimensional");
  }
  if (out_backprop_shape.dims() != num_dims) {
    return errors::InvalidArgument(label, ": out_backprop must be ", num_dims,
                                   "-dimensional");
  }
  int batch_dim = GetTensorBatchDimIndex(num_dims, data_format);
  dims->batch_size = input_shape.dim_size(batch_dim);
  if (dims->batch_size != out_backprop_shape.dim_size(batch_dim)) {
    return errors::InvalidArgument(
        label, ": input and out_backprop must have the same batch size",
        "input batch: ", dims->batch_size,
        "outbackprop batch: ", out_backprop_shape.dim_size(batch_dim),
        " batch_dim: ", batch_dim);
  }

  int feature_dim = GetTensorFeatureDimIndex(num_dims, data_format);
  dims->in_depth = input_shape.dim_size(feature_dim);
  // The input and output feature dimensions are the second last and last
  // dimensions of the filter Tensor.
  VLOG(2) << "input vs filter_in depth " << dims->in_depth << " "
          << filter_shape.dim_size(num_dims - 2);
  if (dims->in_depth % filter_shape.dim_size(num_dims - 2)) {
    return errors::InvalidArgument(
        label, ": input depth must be evenly divisible by filter depth");
  }
  dims->out_depth = filter_shape.dim_size(num_dims - 1);
  if (dims->out_depth != out_backprop_shape.dim_size(feature_dim)) {
    return errors::InvalidArgument(
        label, ": filter and out_backprop must have the same out_depth");
  }
  dims->spatial_dims.resize(num_spatial_dims);
  for (int i = 0; i < num_spatial_dims; ++i) {
    int image_dim = GetTensorSpatialDimIndex(num_dims, data_format, i);
    int64 padding_before = -1, padding_after = -1;
    if (padding == EXPLICIT) {
      padding_before = explicit_paddings[2 * image_dim];
      padding_after = explicit_paddings[2 * image_dim + 1];
    }
    TF_RETURN_IF_ERROR(ConvBackpropExtractAndVerifyDimension(
        label, input_shape, filter_shape, out_backprop_shape, dilations,
        strides, padding, padding_before, padding_after, image_dim, i,
        &dims->spatial_dims[i]));
  }
  return Status::OK();
}

Status ConvBackpropComputeDimensions(StringPiece label, int num_spatial_dims,
                                     const TensorShape& input_shape,
                                     const TensorShape& filter_shape,
                                     const TensorShape& out_backprop_shape,
                                     const std::vector<int32>& strides,
                                     Padding padding, TensorFormat data_format,
                                     ConvBackpropDimensions* dims) {
  static constexpr std::array<int32, 5> one_dilations = {{1, 1, 1, 1, 1}};
  return ConvBackpropComputeDimensionsV2(
      label, num_spatial_dims, input_shape, filter_shape, out_backprop_shape,
      one_dilations, strides, padding, /*explicit_paddings=*/{}, data_format,
      dims);
}

Status Conv2DBackpropComputeInputShape(const Tensor& input_sizes,
                                       const TensorShape& filter_shape,
                                       const TensorShape& out_backprop_shape,
                                       const TensorFormat& data_format,
                                       TensorShape* input_shape) {
  if (!TensorShapeUtils::IsVector(input_sizes.shape())) {
    return errors::InvalidArgument(
        "Conv2DBackpropInput: input_sizes input must be 1-dim, not ",
        input_sizes.dims());
  }

  if (input_sizes.dim_size(0) == 4) {
    return TensorShapeUtils::MakeShape(input_sizes.vec<int32>(), input_shape);
  }

  if (input_sizes.dim_size(0) == 2) {
    const int batch_size = GetTensorDim(out_backprop_shape, data_format, 'N');
    const int output_height = input_sizes.vec<int32>()(0);
    const int output_width = input_sizes.vec<int32>()(1);
    const int output_depth = filter_shape.dim_size(2);
    *input_shape = ShapeFromFormat(data_format, batch_size, output_height,
                                   output_width, output_depth);
    return Status::OK();
  }

  return errors::InvalidArgument(
      "Conv2DBackpropInput requires input_sizes to "
      "contain 4 values or 2 values, but got: ",
      input_sizes.dim_size(0));
}

}  // namespace tensorflow


text:
require 'json'

PLATFORMS = %w[aws azure metal vmware gcp].freeze

# TFVarsFile represents a Terraform configuration file describing a Tectonic
# cluster configuration
class TFVarsFile
  attr_reader :path, :data
  def initialize(file_path)
    @path = file_path
    raise "file #{file_path} does not exist" unless file_exists?
    @data = JSON.parse(File.read(path))
  end

  def experimental?
    data['tectonic_experimental'] == 'true'
  end

  def calico?
    data['tectonic_calico_network_policy'] == 'true'
  end

  def node_count
    master_count + worker_count
  end

  # TODO: Randomize region on AWS
  def region
    data['tectonic_aws_region']
  end

  def prefix
    prefix = File.basename(path).split('.').first
    raise 'could not extract prefix from tfvars file name' if prefix == ''
    prefix
  end

  def platform
    PLATFORMS.each do |platform|
      return platform if data.keys.any? do |key|
        key.start_with?("tectonic_#{platform}")
      end
    end
  end

  private

  def method_missing(method_name, *arguments, &block)
    data.fetch(method_name.to_s)
  rescue KeyError
    return ENV["TF_VAR_#{method_name}"] if ENV.key?("TF_VAR_#{method_name}")
    super
  end

  def respond_to_missing?(method_name, include_private = false)
    data.keys.any? { |k| k == method_name.to_s } || super
  end

  def master_count
    data['tectonic_master_count'].to_i
  end

  def worker_count
    data['tectonic_worker_count'].to_i
  end

  def file_exists?
    File.exist? path
  end
end

redpajama_set_name: RedPajamaGithub


text:
from django.test import TestCase
from django.core.urlresolvers import reverse
from working_waterfronts.working_waterfronts_api.models import Image
from django.contrib.auth.models import User

class ListImageTestCase(TestCase):
    fixtures = ['thirtythree']

    def setUp(self):
        user = User.objects.create_user(
            'temporary', 'temporary@gmail.com', 'temporary')
        user.save()

        response = self.client.login(
            username='temporary', password='temporary')
        self.assertEqual(response, True)

    def test_not_logged_in(self):
        self.client.logout()

        response = self.client.get(
            reverse('entry-list-images'))
        self.assertRedirects(response, '/login?next=/entry/images')

    def test_url_endpoint(self):
        url = reverse('entry-list-images')
        self.assertEqual(url, '/entry/images')

    def test_list_items(self):
        """
        Tests to see if the list of images contains the proper
        images and proper image data
        """

        page_1 = self.client.get(reverse('entry-list-images')).context
        page_2 = self.client.get(
            '{}?page=2'.format(reverse('entry-list-images'))).context
        page_3 = self.client.get(
            '{}?page=3'.format(reverse('entry-list-images'))).context
        page_4 = self.client.get(
            '{}?page=4'.format(reverse('entry-list-images'))).context
        page_nan = self.client.get(
            '{}?page=NaN'.format(reverse('entry-list-images'))).context

        self.assertEqual(
            list(page_1['item_list']),
            list(Image.objects.order_by('name')[:15]))

        self.assertEqual(
            list(page_2['item_list']),
            list(Image.objects.order_by('name')[15:30]))

        self.assertEqual(
            list(page_3['item_list']),
            list(Image.objects.order_by('name')[30:33]))

        # Page 4 should be identical to Page 3, as these fixtures
        # have enough content for three pages (15 items per page, 33 items)

        self.assertEqual(
            list(page_3['item_list']),
            list(page_4['item_list']))

        # Page NaN should be identical to Page 1, as Django paginator returns
        # the first page if the page is not an int

        self.assertEqual(
            list(page_1['item_list']),
            list(page_nan['item_list']))


text:
(function () {
    'use strict';

    var module = angular.module('Timerial.Main');

    module.controller('MainController', ['$rootScope', '$state', 'states', '_', function ($rootScope, $state, states, _) {

        (function init(controller) {

            controller.loader = false;

        })(this);

        this.currentStateIs = function (state) {
            return $state.is(state);
        };

        this.displaySubHeader = function () {
            switch ($state.current.name) {
                case states.uploadAllocation:
                case states.allocation:
                case states.management:
                case states.pipeline:
                case states.addPipelineEntry:
                case states.editPipelineEntry:
                case states.reports:
                    return true;
                default:
                    return false;
            }
        };

        var controller = this;

        $rootScope.$on("$stateChangeStart",
            function (event, toState, toParams, fromState, fromParams) {
                controller.loader = true;
            });

        $rootScope.$on('$viewContentLoaded',
            function (event) {
                controller.loader = false;
            });

    }]);
})();


text:
class ReadWrite {
  constructor(fn) {
    this.fn = fn;
  }

  run(ctx) {
    return this.fn(ctx);
  }

  flatMap(fn) {
    return new ReadWrite(ctx => {
      const [cur, curErrs] = this.run(ctx);
      const [val, valErrs] = fn(cur).run(ctx);
      return [val, [...curErrs, ...valErrs]];
    });
  }
}

export function ask() {
  return new ReadWrite(ctx => [ctx, []]);
}

export function tell(log) {
  return new ReadWrite(() => [null, [log]]);
}

export function unit(val) {
  return new ReadWrite(() => [val, []]);
}

export function resolve(iter) {
  return function step(resume) {
    const {value, done} = iter.next(resume);
    const rw = (value instanceof ReadWrite) ?
      value : unit(value);
    return done ? rw : rw.flatMap(step);
  }();
}


text:
default['rubies']['list'] = ['ruby 2.3']
default['rubies']['ruby_install_path'] = '/opt/rubies'


text:
namespace ash {

namespace {

// Max alpha of the background.
const int kBackgroundAlpha = 128;

}

// The contents view of the Widget. This view contains LauncherView and
// sizes it to the width of the widget minus the size of the status area.
class Launcher::DelegateView : public views::WidgetDelegate,
                               public views::AccessiblePaneView{
 public:
  explicit DelegateView(Launcher* launcher);
  virtual ~DelegateView();

  void SetStatusWidth(int width);
  int status_width() const { return status_width_; }

  void set_focus_cycler(const internal::FocusCycler* focus_cycler) {
    focus_cycler_ = focus_cycler;
  }

  // views::View overrides
  virtual gfx::Size GetPreferredSize() OVERRIDE;
  virtual void Layout() OVERRIDE;

  // views::WidgetDelegateView overrides:
  virtual views::Widget* GetWidget() OVERRIDE {
    return View::GetWidget();
  }
  virtual const views::Widget* GetWidget() const OVERRIDE {
    return View::GetWidget();
  }
  virtual bool CanActivate() const OVERRIDE {
    // We don't want mouse clicks to activate us, but we need to allow
    // activation when the user is using the keyboard (FocusCycler).
    return focus_cycler_ && focus_cycler_->widget_activating() == GetWidget();
  }

 private:
  Launcher* launcher_;

  // Width of the status area.
  int status_width_;

  const internal::FocusCycler* focus_cycler_;

  DISALLOW_COPY_AND_ASSIGN(DelegateView);
};

Launcher::DelegateView::DelegateView(Launcher* launcher)
    : launcher_(launcher),
      status_width_(0),
      focus_cycler_(NULL) {
}

Launcher::DelegateView::~DelegateView() {
}

void Launcher::DelegateView::SetStatusWidth(int width) {
  if (status_width_ == width)
    return;

  status_width_ = width;
  Layout();
}

gfx::Size Launcher::DelegateView::GetPreferredSize() {
  return child_count() > 0 ? child_at(0)->GetPreferredSize() : gfx::Size();
}

void Launcher::DelegateView::Layout() {
  if (child_count() == 0)
    return;
  child_at(0)->SetBounds(0, 0, std::max(0, width() - status_width_), height());
}

// Launcher --------------------------------------------------------------------

Launcher::Launcher(aura::Window* window_container)
    : widget_(NULL),
      window_container_(window_container),
      delegate_view_(NULL),
      launcher_view_(NULL),
      ALLOW_THIS_IN_INITIALIZER_LIST(
          background_animator_(this, 0, kBackgroundAlpha)) {
  model_.reset(new LauncherModel);
  if (Shell::GetInstance()->delegate()) {
    delegate_.reset(
        Shell::GetInstance()->delegate()->CreateLauncherDelegate(model_.get()));
  }

  widget_.reset(new views::Widget);
  views::Widget::InitParams params(
      views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
  // The launcher only ever draws a solid color.
  params.layer_type = ui::LAYER_SOLID_COLOR;
  params.transparent = true;
  params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
  params.parent = Shell::GetInstance()->GetContainer(
      ash::internal::kShellWindowId_LauncherContainer);
  launcher_view_ = new internal::LauncherView(model_.get(), delegate_.get());
  launcher_view_->Init();
  delegate_view_ = new DelegateView(this);
  delegate_view_->AddChildView(launcher_view_);
  params.delegate = delegate_view_;
  widget_->Init(params);
  widget_->GetNativeWindow()->SetName("LauncherWindow");
  gfx::Size pref =
      static_cast<views::View*>(launcher_view_)->GetPreferredSize();
  widget_->SetBounds(gfx::Rect(0, 0, pref.width(), pref.height()));
  // The launcher should not take focus when it is initially shown.
  widget_->set_focus_on_creation(false);
  widget_->SetContentsView(delegate_view_);
  widget_->Show();
  widget_->GetNativeView()->SetName("LauncherView");
}

Launcher::~Launcher() {
}

void Launcher::SetFocusCycler(internal::FocusCycler* focus_cycler) {
  delegate_view_->set_focus_cycler(focus_cycler);
  focus_cycler->AddWidget(widget_.get());
}

void Launcher::SetPaintsBackground(
      bool value,
      internal::BackgroundAnimator::ChangeType change_type) {
  background_animator_.SetPaintsBackground(value, change_type);
}

void Launcher::SetStatusWidth(int width) {
  delegate_view_->SetStatusWidth(width);
}

int Launcher::GetStatusWidth() {
  return delegate_view_->status_width();
}

gfx::Rect Launcher::GetScreenBoundsOfItemIconForWindow(aura::Window* window) {
  if (!delegate_.get())
    return gfx::Rect();

  LauncherID id = delegate_->GetIDByWindow(window);
  gfx::Rect bounds(launcher_view_->GetIdealBoundsOfItemIcon(id));
  if (bounds.IsEmpty())
    return bounds;

  gfx::Point screen_origin;
  views::View::ConvertPointToScreen(launcher_view_, &screen_origin);
  return gfx::Rect(screen_origin.x() + bounds.x(),
                   screen_origin.y() + bounds.y(),
                   bounds.width(),
                   bounds.height());
}

internal::LauncherView* Launcher::GetLauncherViewForTest() {
  return static_cast<internal::LauncherView*>(
      widget_->GetContentsView()->child_at(0));
}

void Launcher::UpdateBackground(int alpha) {
  ui::Layer* layer = widget_->GetNativeView()->layer();
  layer->SetColor(SkColorSetARGB(alpha, 0, 0, 0));
}

}  // namespace ash


text:
node-dynconfig-kibana
=====================

Hosts [Kibana 3](https://github.com/elasticsearch/kibana/tree/kibana3) as a nodejs express application and provides both dynamic kibana configuration (config.js) and dynamic dashboard configuration (default.json).

Usage
=====
```
git clone
npm install
download & unpack kibana
node app.js
```

Configuration
=============

Either configure directly in app.js var config or through setting environment variables:

* `KIBANA_HOST`: Where this app should listen (default: localhost)
* `KIBANA_PORT`: At which port to listen (default: 3003)
* `ES_URL`: URL to elasticsearch (default: http://"+window.location.hostname+":9200)


text:
cask 'missive' do
  version :latest
  sha256 :no_check

  url 'https://download.missiveapp.com/download/osx'
  name 'missive'
  homepage 'https://missiveapp.com/'

  app 'Missive.app'
end


text:
<!doctype html>

  <meta charset="UTF-8">
  <title>Rebound2 Chat</title>
  <link id="pagestyle" rel="stylesheet" href="styles/compact.css">

Online Users:

PLACEHOLDER

      <input class="inputMessage" placeholder="Type here..."/>

Log in or join as a guest.

        <input class="usernameInput" type="text" maxlength="14" placeholder="username"/>

        <input class="usernameInput" id="pwdinput" type="password" placeholder="password"/>

Don't have an account? Click here.


text:
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-fullwidth2',
  templateUrl: './fullwidth2.component.html',
  styleUrls: ['./fullwidth2.component.scss']
})
export class Fullwidth2Component implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}


text:
layout: documentation
title: Message Node Evaluation
category: Testing
order: 4
---

## Message Node tests

This folder structure contains common conformance tests for the Message Nodes according to the [Message Specification](../../../messages/readme/) and some performance related tests.

### Quickstart

#### Initial Setup

For the initial setup you  have to clone the testbeds repo to your machine and execute inside the "specs/tests/msg-node" folder

```
npm install
```

The project has a dependency to the service-framework, because it uses the MessageFactory wherever possible.

Of course the machine that runs the tests must have access to the individual Messaging Nodes. In order to gain comparable results it is stronly advised to have them running on the same local machine that executes the tests. The registry related testcases also require the availability of a running instance of the domain-registry, which is accessible by each MN.

Instructions for the installation, configuration and operation of the message nodes can be found on the corresponding github repos.

#### Configure Stubs

The "src/stub" folder contains the latest version of the Stub-sources for each of the currently available message nodes.
For each stub there is a corresponding config file:

```
matrix.conf.js
vertx.conf.js
nodejs.conf.js
```
This file is used to configure the stub with the information it needs. This configuration holds the same data as the "configuration" section in the ProtoStub.json file of the local catalogue.
The only added attribute is the "domain", which is mandatory and MUST be present. It is used in the testcases to create several urls for the from- and to- fields of the messages.

> NOTE: The MatrixProtoStub.js is also compatibile with the new NoMatrix MN at https://github.com/reTHINK-project/dev-msg-node-nomatrix. It also uses the same configuration items.

#### Execute tests for an individual Message Node

After the configuration of the stubs and the execution of the Message nodes the tests can be started via special gulp-tasks:

To test the MatrixMN run:

```
gulp testmatrix
```

To test the VertxMN run:

```
gulp testvertx
```

To test the NodejsMN run:

```
gulp testnodejs
```

Each task starts the Karma tests with an individual configuration file named "matrix.karma.js", "vertx.karma.js" and "nodejs.karma.js".

> NOTE: These files can be edited to specify/limit an indivdual set of test cases for execution by commenting them in or out.

### Test descriptions

#### Conformance tests

These tests evaluate the conformance of the MNs with the specified message request/response patterns.

##### connect.spec.js

The purpose of this test is to ensure that the Stub exposes the "status" events as specified in [ProtoStub Deployment Specification](https://github.com/reTHINK-project/dev-service-framework/blob/master/docs/specs/dynamic-view/basics/deploy-protostub.md)

It instantiats a stub and performs a connection and then a disconnection of the stub to the corresponding MN.

```
Specification issue:

The factual implementation in the Vertx stub introduced "connected" and "disconnected" events instead of the "LIVE" event as specified. This implementation has been taken over by the other stubs and is now de-facto standard.
```

##### hyperty-allocation.spec.js

The purpose of this test is to ensure the Conformance of the MN operations with the [Address Allocation Messages Specification](https://github.com/reTHINK-project/dev-service-framework/blob/master/docs/specs/messages/address-allocation-messages.md)

It checks the allocation and de-allocation of hyperty addresses by the MNs.
It includes following sub-tests:

- allocation of a single address
- check that a potentially given "scheme" is ignored for hyperty address allocations
- de-allocation of a single address
- allocation of an address block
- de-allocation of an address block
- allocation of an address block with an allocationKey
- de-allocation of an address block with an allocationKey

```
MessageFactory issue:

The MessageFactory does not support the "body.scheme" attribute. Therefore some allocation messages are created manually.
```

##### object-allocation.spec.js

The purpose of this test is to ensure the Conformance of the MN operations with the  [Address Allocation Messages Specification](https://github.com/reTHINK-project/dev-service-framework/blob/master/docs/specs/messages/address-allocation-messages.md)

It checks the allocation and de-allocation of object addresses by the MNs.
It includes following sub-tests:

- allocation of a single address incl. check that a given "scheme" is used for the object address allocations
- de-allocation of a single address
- allocation of an address block
- de-allocation of an address block
- allocation of an address block with an allocationKey
- de-allocation of an address block with an allocationKey

```
MessageFactory issue:

The MessageFactory does not support the "body.scheme" attribute. Therefore some allocation messages are created manually.
```

##### subscription.spec.js

The purpose of this test is to ensure the Conformance of the MN operations with the [Data Synchronization Message Specification](https://github.com/reTHINK-project/dev-service-framework/blob/master/docs/specs/messages/data-sync-messages.md)

It checks the subscription and un-susubscription for given object addresses at the MN as well as the correct publication of object update events to the subscribers.
It includes following sub-tests:

- subscription for an object address with a given body.source attribute
- subscription for an object address without a body.source attribute
- update of the subscribed object by the reporter and expect update events on both subscribers
- unsubscription of both subscribers
- another update of the subscribed object and ensure that no events are received by the (now unsubscribed) subscribers

##### registration.spec.js

The purpose of this test is to ensure the Conformance of the MN operations with the   [Registration Messages Specification](https://github.com/reTHINK-project/dev-service-framework/blob/master/docs/specs/messages/registration-messages.md)

It includes following sub-tests:

- registration of an allocated hyperty address for a given userid
- retrieval of a hyperty address by given userid
- retrieval of a hyperty address by given type and userid
- retrieval of a hyperty address by given object scheme and userid
- keep-alive message for an active registration
- unregistration of a hyperty address

#### Performance tests
These tests evaluate the performance and robustness of the MNs in forced situations of increased load. Therefore requests are sent in loops of increasing iteration counts and with differing message sizes. For each of these tests, the duration is measured and used as metric for the evaluation.

##### performance-alloc-hyperties.spec.js

These tests create and send an increasing number of allocation and de-allocation messages for Hyperty addresses to the MNs and expect a correct 200 OK response. The sizes of these messages are defined by the specification therefore they are not varied.

Following measurements are performed :

- Hyperty address allocation requests for 1 address each for 100, 1000 and 10000 iterations
- Hyperty address allocation requests for a block of 3 address each (without an allocation key) for 100, 1000 and 10000 iterations
- Hyperty address allocation requests for a block of 3 address each with an allocation key for 100, 1000 and 10000 iterations

##### performance-alloc-objects.spec.js

These tests create and send an increasing number of allocation and de-allocation messages for DataObject addresses to the MNs and expect a correct 200 OK response. The sizes of these messages are defined by the specification therefore they are not varied.

Following measurements are performed :

- Object address allocation requests for 1 address each for 100, 1000 and 10000 iterations
- Object address allocation requests for a block of 3 address each (without an allocation key) for 100, 1000 and 10000 iterations
- Objects address allocation requests for a block of 3 address each with an allocation key for 100, 1000 and 10000 iterations

##### performance-hyp-messages.spec.js
These tests send an increasing number of messages from one allocated Hyperty to a second allocated Hyperty, which is connected via a different stub. During the tests also the payload sizes are increased from 100B over 1kB to 10kB.
The measured time span starts when sending the first message from Hyperty 1 via Stub 1 and stops when receiving the last message by Hyperty 2 via Stub 2.

Following measurements are performed:
- Message with payload of 100B for 100, 1000 and 10000 iterations
- Message with payload of 1kB for 100, 1000 and 10000 iterations
- Message with payload of 10kB for 100, 1000 and 10000 iterations


text:
{% if site.github %}{% capture github_link %}
  {% assign github_edit_text = site.github_edit_text | default: "Edit page on GitHub" %}
  {% if page.source %}
    {% if page.source contains '/wiki/' %}
      {% assign wiki = '/_edit'%}
    {% endif %}
    {{ github_edit_text }}
  {% else %}
    {{
        github_edit_text
      }}
  {% endif %}
{% endcapture %}{{ github_link | strip_new_lines | lstrip | rstrip }}{% endif %}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Crocynia minuta B. de Lesd.

### Remarks
null


text:
<?php namespace Morrislaptop\LaravelQueueClear\Contracts;

use Illuminate\Contracts\Queue\Factory as FactoryContract;

interface Clearer
{
	/**
	 * @param FactoryContract $manager
	 */
	function __construct(FactoryContract $manager);

	/**
	 * Deletes all the jobs in the queue for connection. Returns
	 * how many jobs were deleted
	 *
	 * @param $connection
	 * @param $queue
	 * @return int
	 */
	public function clear($connection, $queue);
}


text:
<!-- public/templates/home.html -->

This is the home page.


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    <link type="text/css" rel="stylesheet" href="../../../../build/cssgrids/cssgrids.css">
    <link type="text/css" rel="stylesheet" href="../../../../build/widget-base/assets/skins/sam/widget-base.css">
    <link type="text/css" rel="stylesheet" href="../../../../build/dial/assets/skins/sam/dial.css">
    <title>Loader Automated Tests</title>


text:
package org.jhotdraw.draw.event;

import org.jhotdraw.draw.*;
import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;
import org.jhotdraw.undo.CompositeEdit;

/**
 * A {@link CompositeEdit} which invokes {@code figure.willChange}
 * and {@code figure.changed} when undoing or redoing a change.
 *
 * @author Werner Randelshofer
 * @version $Id: CompositeFigureEdit.java 717 2010-11-21 12:30:57Z rawcoder $
 */
public class CompositeFigureEdit extends CompositeEdit {

    private Figure figure;

    /**
     * Creates a new {@code CompositeFigureEdit} which uses
     * CompoundEdit.getPresentatioName and is significant.
     *
     * @see javax.swing.undo.CompoundEdit#getPresentationName()
     */
    public CompositeFigureEdit(Figure figure) {
        this.figure = figure;
    }

    /**
     * Creates new CompositeFigureEdit which uses the specified significance.
     *
     * @see javax.swing.undo.CompoundEdit#getPresentationName()
     */
    public CompositeFigureEdit(Figure figure, boolean isSignificant) {
        super(isSignificant);
        this.figure = figure;
    }

    /**
     * Creates new CompositeFigureEdit which uses the specified presentation name.
     *
     * @see javax.swing.undo.CompoundEdit#getPresentationName()
     */
    public CompositeFigureEdit(Figure figure, String presentationName) {
        super(presentationName);
        this.figure = figure;
    }

    /**
     * Creates new CompositeEdit.
     * Which uses the given presentation name.
     * If the presentation name is null, then CompoundEdit.getPresentatioName
     * is used.
     * @see javax.swing.undo.CompoundEdit#getPresentationName()
     */
    public CompositeFigureEdit(Figure figure, String presentationName, boolean isSignificant) {
        super(presentationName, isSignificant);
        this.figure = figure;
    }

    @Override
    public void undo() {
        if (!canUndo()) {
            throw new CannotUndoException();
        }
        figure.willChange();
        super.undo();
        figure.changed();
    }
    @Override
    public void redo() {
        if (!canRedo()) {
            throw new CannotRedoException();
        }
        figure.willChange();
        super.redo();
        figure.changed();
    }
}


text:
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */

#include <sstream>
#include <limits>
#include <map>
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/IFC4/include/IfcDerivedMeasureValue.h"
#include "ifcpp/IFC4/include/IfcThermalConductivityMeasure.h"

// TYPE IfcThermalConductivityMeasure = REAL;
IfcThermalConductivityMeasure::IfcThermalConductivityMeasure( double value ) { m_value = value; }
shared_ptr<BuildingObject> IfcThermalConductivityMeasure::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcThermalConductivityMeasure> copy_self( new IfcThermalConductivityMeasure() );
	copy_self->m_value = m_value;
	return copy_self;
}
void IfcThermalConductivityMeasure::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCTHERMALCONDUCTIVITYMEASURE("; }
	appendRealWithoutTrailingZeros( stream, m_value );
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcThermalConductivityMeasure::toString() const
{
	std::wstringstream strs;
	strs << m_value;
	return strs.str();
}
shared_ptr<IfcThermalConductivityMeasure> IfcThermalConductivityMeasure::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcThermalConductivityMeasure>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcThermalConductivityMeasure>(); }
	shared_ptr<IfcThermalConductivityMeasure> type_object( new IfcThermalConductivityMeasure() );
	readReal( arg, type_object->m_value );
	return type_object;
}


text:
---
id: 587d824b367417b2b2512c49
title: Testar a veracidade
challengeType: 2
forumTopicId: 301596
dashedName: test-for-truthiness
---

# --description--

Lembrando que este projeto está sendo construído a partir do [Replit](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), ou pose ser clonado no [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).

`isTrue()` testará o valor booleano `true` e `isNotTrue()` passará quando receber qualquer coisa menos o valor booleano de `true`.

```js
assert.isTrue(true, 'This will pass with the boolean value true');
assert.isTrue('true', 'This will NOT pass with the string value "true"');
assert.isTrue(1, 'This will NOT pass with the number value 1');
```

`isFalse()` e `isNotFalse()` também existem e se comportam da mesma forma que seus correspondentes true, exceto porque buscam o valor booleano `false`.

# --instructions--

Em `tests/1_unit-tests.js`, no teste classificado como `#4` e na suíte `Basic Assertions`, modifique cada `assert` para `assert.isTrue` ou para `assert.isNotTrue`, de maneira que cada teste passe (seja avaliado como `true`). Não altere os argumentos passados às afirmações.

# --hints--

Todos os testes devem passar.

```js
(getUserInput) =>
  $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(
    (data) => {
      assert.equal(data.state, 'passed');
    },
    (xhr) => {
      throw new Error(xhr.responseText);
    }
  );
```

Você deve escolher o método correto para a primeira afirmação - `isTrue` ou `isNotTrue`.

```js
(getUserInput) =>
  $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(
    (data) => {
      assert.equal(data.assertions[0].method, 'isTrue', 'True is true');
    },
    (xhr) => {
      throw new Error(xhr.responseText);
    }
  );
```

Você deve escolher o método correto para a segunda afirmação - `isTrue` ou `isNotTrue`.

```js
(getUserInput) =>
  $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(
    (data) => {
      assert.equal(
        data.assertions[1].method,
        'isTrue',
        'Double negation of a truthy value is true'
      );
    },
    (xhr) => {
      throw new Error(xhr.responseText);
    }
  );
```

Você deve escolher o método correto para a terceira afirmação - `isTrue` ou `isNotTrue`.

```js
(getUserInput) =>
  $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(
    (data) => {
      assert.equal(
        data.assertions[2].method,
        'isNotTrue',
        'A truthy object is not true - neither is a false one'
      );
    },
    (xhr) => {
      throw new Error(xhr.responseText);
    }
  );
```

# --solutions--

```js
/**
  Backend challenges don't need solutions,
  because they would need to be tested against a full working project.
  Please check our contributing guidelines to learn more.
*/
```


text:
package org.apache.tester;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 * Negative test for ServletResponse.setBufferSize().
 *
 * @author Craig R. McClanahan
 * @version $Revision: 1.3 $ $Date: 2001/01/13 22:30:30 $
 */

public class SetBufferSize01 extends GenericServlet {

    // --------------------------------------------------------- Public Methods

    /**
     * Process a servlet request and create the corresponding response.
     *
     * @param request The request we are processing
     * @param response The response we are creating
     *
     * @exception IOException if an input/output error occurs
     * @exception ServletException if a servlet error occurs
     */
    public void service(ServletRequest request, ServletResponse response)
        throws IOException, ServletException {

        response.setContentType("text/plain");
        PrintWriter writer = response.getWriter();
        try {
            writer.print("SetBufferSize01 ");
            response.flushBuffer();
            response.setBufferSize(100);
            writer.println("FAILED - Did not throw IllegalStateException");
        } catch (IllegalStateException e) {
            writer.println("PASSED");
        } catch (IOException e) {
            writer.println("FAILED - flushBuffer() threw IOException");
            throw e;
        }
        while (true) {
            String message = StaticLogger.read();
            if (message == null)
                break;
            writer.println(message);
        }
        StaticLogger.reset();

    }

}


text:
<form name="contractorForm">

             Contractor Details:

                        Contractor Name

                            <input class="form-control" style="width: 50%;" ng-model="$ctrl.contractor.contractorName" name="contractorName" value=""
                                size="35" data-error="Required" required="" type="text">
                            Contractor name is required.
                            Contractor with contractor name Already Exist!

                        Contractor Type

                            <select style="width: 50%;" name="contractorType" ng-model="$ctrl.contractor.contractorType" class="form-control" required
                                ng-options="item for item in $ctrl.dropDownValues.Types">
                                <option value="">Select</option>
                            </select>
                            Contractor Type is required.

                        Address

                            <input class="form-control address" style="width: 50%;" ng-model="$ctrl.contractor.contractorAddress" size="64" name="contractorAddress"
                                value="" data-error="Required" required="" type="text">
                            Contractor address is required.

                        City

                            <input class="form-control city" style="width: 50%;" ng-model="$ctrl.contractor.contractorCity" size="32" name="contractorCity"
                                value="" data-error="Required" required="" type="text">
                            Contractor City is required.

                        State

                            <select name="contractorState" style="width: 50%;" ng-model="$ctrl.contractor.contractorState" class="form-control"
                                required ng-options="item for item in $ctrl.dropDownValues.States | orderBy">
                                <option value="">Select</option>
                            </select>
                            Contractor State is required.

                        Pin Code

                            <input class="form-control zip" style="width: 50%;" ng-model="$ctrl.contractor.contractorPinCode" size="5" name="contractorPinCode"
                                value="" type="text" required ng-pattern="/^[0-9]{6}$/ " maxlength="6">
                            Please enter 6 digit pincode

                        Operational Status

                            <select style="width: 50%;" name="contractorOperationalStatus" ng-model="$ctrl.contractor.contractorOperationalStatus" class="form-control"
                                required ng-options="item for item in $ctrl.dropDownValues.ContractorStatus">
                                <option value="">Select</option>
                            </select>
                            Status is required.

                            <button class="submit hoverMsg" style="width: 130px;" type="submit" ng-click="$ctrl.update()" ng-disabled="contractorForm.$invalid">

                                Update
                            </button>

                            Please fill all fields

                        <button class="cancel" type="button" ng-click="$ctrl.cancel()">

                            Cancel
                        </button>

</form>


text:
// Debugging hash_multimap implementation -*- C++ -*-

// Copyright (C) 2003, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING.  If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.

// As a special exception, you may use this file as part of a free software
// library without restriction.  Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License.  This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

/** @file debug/hash_multimap.h
 *  This file is a GNU debug extension to the Standard C++ Library.
 */

#ifndef _GLIBCXX_DEBUG_HASH_MULTIMAP_H
#define _GLIBCXX_DEBUG_HASH_MULTIMAP_H 1

#include <debug/safe_sequence.h>
#include <debug/safe_iterator.h>

namespace __gnu_cxx
{
namespace __debug
{
  template<typename _Value, typename _Tp,
	   typename _HashFcn  = __gnu_cxx::hash<_Value>,
	   typename _EqualKey = std::equal_to<_Value>,
	   typename _Alloc =  std::allocator<_Value> >
    class hash_multimap
    : public _GLIBCXX_EXT::hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>,
      public __gnu_debug::_Safe_sequence<hash_multimap<_Value, _Tp, _HashFcn,
						       _EqualKey, _Alloc> >
    {
      typedef _GLIBCXX_EXT::hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>
							_Base;
      typedef __gnu_debug::_Safe_sequence<hash_multimap> _Safe_base;

  public:
      typedef typename _Base::key_type			key_type;
      typedef typename _Base::data_type			data_type;
      typedef typename _Base::mapped_type		mapped_type;
      typedef typename _Base::value_type		value_type;
      typedef typename _Base::hasher			hasher;
      typedef typename _Base::key_equal			key_equal;
      typedef typename _Base::size_type			size_type;
      typedef typename _Base::difference_type		difference_type;
      typedef typename _Base::pointer			pointer;
      typedef typename _Base::const_pointer		const_pointer;
      typedef typename _Base::reference			reference;
      typedef typename _Base::const_reference		const_reference;

      typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
					  hash_multimap> iterator;
      typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
					  hash_multimap> const_iterator;

      typedef typename _Base::allocator_type              allocator_type;

      using _Base::hash_funct;
      using _Base::key_eq;
      using _Base::get_allocator;

      hash_multimap() { }

      explicit hash_multimap(size_type __n) : _Base(__n) { }

      hash_multimap(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }

      hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
		    const allocator_type& __a = allocator_type())
      : _Base(__n, __hf, __eql, __a) { }

      template<typename _InputIterator>
        hash_multimap(_InputIterator __f, _InputIterator __l)
	: _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }

      template<typename _InputIterator>
        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
        : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }

      template<typename _InputIterator>
        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
		      const hasher& __hf)
	: _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }

      template<typename _InputIterator>
        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
		      const hasher& __hf, const key_equal& __eql,
		      const allocator_type& __a = allocator_type())
	: _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
		__eql, __a) { }

      using _Base::size;
      using _Base::max_size;
      using _Base::empty;

      void
      swap(hash_multimap& __x)
      {
	_Base::swap(__x);
	this->_M_swap(__x);
      }

      iterator
      begin() { return iterator(_Base::begin(), this); }

      iterator
      end()   { return iterator(_Base::end(),   this); }

      const_iterator
      begin() const
      { return const_iterator(_Base::begin(), this); }

      const_iterator
      end() const
      { return const_iterator(_Base::end(),   this); }

      iterator
      insert(const value_type& __obj)
      { return iterator(_Base::insert(__obj), this); }

      template <typename _InputIterator>
        void
        insert(_InputIterator __first, _InputIterator __last)
        {
	  __glibcxx_check_valid_range(__first, __last);
	  _Base::insert(__first.base(), __last.base());
	}

      iterator
      insert_noresize(const value_type& __obj)
      { return iterator(_Base::insert_noresize(__obj), this); }

      iterator
      find(const key_type& __key)
      { return iterator(_Base::find(__key), this); }

      const_iterator
      find(const key_type& __key) const
      { return const_iterator(_Base::find(__key), this); }

      using _Base::count;

      std::pair<iterator, iterator>
      equal_range(const key_type& __key)
      {
	typedef typename _Base::iterator _Base_iterator;
	std::pair<_Base_iterator, _Base_iterator> __res =
	                                             _Base::equal_range(__key);
	return std::make_pair(iterator(__res.first, this),
			      iterator(__res.second, this));
      }

      std::pair<const_iterator, const_iterator>
      equal_range(const key_type& __key) const
      {
	typedef typename _Base::const_iterator _Base_iterator;
	std::pair<_Base_iterator, _Base_iterator> __res =
        _Base::equal_range(__key);
	return std::make_pair(const_iterator(__res.first, this),
			      const_iterator(__res.second, this));
      }

      size_type
      erase(const key_type& __key)
      {
	std::pair<iterator, iterator> __victims = this->equal_range(__key);
	std::size_t __num_victims = 0;
	while (__victims.first != __victims.second)
	{
	  this->erase(__victims.first++);
	  ++__num_victims;
	}
	return __num_victims;
      }

      void
      erase(iterator __it)
      {
	__glibcxx_check_erase(__it);
	__it._M_invalidate();
	_Base::erase(__it.base());
      }

      void
      erase(iterator __first, iterator __last)
      {
	__glibcxx_check_erase_range(__first, __last);
	for (iterator __tmp = __first; __tmp != __last;)
	{
	  iterator __victim = __tmp++;
	  __victim._M_invalidate();
	}
	_Base::erase(__first.base(), __last.base());
      }

      void
      clear()
      {
	_Base::clear();
	this->_M_invalidate_all();
      }

      using _Base::resize;
      using _Base::bucket_count;
      using _Base::max_bucket_count;
      using _Base::elems_in_bucket;

      _Base&
      _M_base()       { return *this; }

      const _Base&
      _M_base() const { return *this; }

    private:
      void
      _M_invalidate_all()
      {
	typedef typename _Base::const_iterator _Base_const_iterator;
	typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
	this->_M_invalidate_if(_Not_equal(_M_base().end()));
      }
    };

  template<typename _Value, typename _Tp, typename _HashFcn,
	   typename _EqualKey, typename _Alloc>
    inline bool
    operator==(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
	       const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
    { return __x._M_base() == __y._M_base(); }

  template<typename _Value, typename _Tp, typename _HashFcn,
	   typename _EqualKey, typename _Alloc>
    inline bool
    operator!=(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
	       const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
    { return __x._M_base() != __y._M_base(); }

  template<typename _Value, typename _Tp, typename _HashFcn,
	   typename _EqualKey, typename _Alloc>
    inline void
    swap(hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
	 hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
    { __x.swap(__y); }
} // namespace __debug
} // namespace __gnu_cxx

#endif


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link rel="stylesheet" href="{{ STATIC_URL }}css/base_rtl.css"/>
    <link rel="stylesheet" href="{{ STATIC_URL }}projects/{{ object.slug }}/css/main.css"/>
    <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico" />
    <title>{% block metatitle %}{{ page.title }} | {{ site.name }}{% endblock metatitle %}</title>

    {% block project_main %}{% endblock %}

        {% include 'partials/nav-panel.html' %}

        {% include 'accounts/partials/account_tools.html' %}

    {% block overlays %}

        {% include 'accounts/partials/account_login.html' %}
        {% include 'accounts/partials/account_register.html' %}
        {% include 'accounts/partials/account_password_reset.html' %}

        {% if user.is_authenticated %}
            {% include 'accounts/partials/account_password_change.html' %}
        {% endif %}

    {% endblock overlays %}


text:
using System;
using System.Collections.Generic;

namespace Sce.Atf.Applications
{
    ///
    /// Interface for providers of context menu commands
    public interface IContextMenuCommandProvider
    {
        ///
        /// Gets tags for context menu (right click) commands
        /// <param name="context">Context containing target object</param>
        /// <param name="target">Right clicked object, or null if none</param>
        /// <returns>Enumeration of command tags in context menu</returns>
        IEnumerable<object> GetCommands(object context, object target);
    }

    ///
    /// Extension methods
    public static class ContextMenuCommandProvider
    {
        ///
        /// Gets command tags for context menu by querying all IContextMenuCommandProviders with
        /// the given target
        /// <param name="providers">Context menu item providers</param>
        /// <param name="context">Context of target item</param>
        /// <param name="target">Target item that was right clicked, or null</param>
        /// <returns>Command tags for context menu</returns>
        public static IEnumerable<object> GetCommands(
            this IEnumerable<IContextMenuCommandProvider> providers, object context, object target)
        {
            foreach (IContextMenuCommandProvider provider in providers)
                foreach (object commandTag in provider.GetCommands(context, target))
                    yield return commandTag;
        }

        ///
        /// Gets command tags for context menu by querying all IContextMenuCommandProviders with
        /// the given target
        /// <param name="providers">Context menu item providers</param>
        /// <param name="context">Context of target item</param>
        /// <param name="target">Target item that was right clicked, or null</param>
        /// <returns>Command tags for context menu</returns>
        public static IEnumerable<object> GetCommands(
            this IEnumerable<Lazy<IContextMenuCommandProvider>> providers, object context, object target)
        {
            return GetCommands(providers.GetValues(), context, target);
        }
    }
}


text:
`sudo yum install sqlite-devel`

### Step 2: Restore the packages
`dotnet restore`

### Step 3: Run the program
`dotnet run`

### Step 4: Open the web page in your browser
http://localhost:5000

## In Docker
(Coming Soon)


text:
"use strict"

var config = require("config")
var utils = require("../lib/utils.js")
var errorLib = require("../lib/error.js")
var db = require("../lib/db.js")
var clc = require('cli-color')
var async = require("async")
var sanitizeHtml = require('sanitize-html')
require("string_score")

exports.prepareAgents = function(cb){
	db.prepareAgents(function(){
		if (cb) cb()
	})
}

//turns on a process to keep the agent queue populated from the database
exports.populateShadowcatAgentsBuildQueue = function(cb){

	exports.shadowCatAgentsQueue = []
	var queueTimer = null
	var resumeOn = false

	console.log("Connecting to shadowcat...")

	db.returnCollectionShadowcat("bib",function(err,shadowcatBib){

		console.log("Starting Cursor...")

		// _id: 16547127
		var cursor = shadowcatBib.find({ }, { 'sc:agents' : 1, 'sc:research' : 1 }).batchSize(100)

		queueTimer = setInterval(function(){

			if (exports.shadowCatAgentsQueue.length<5000){
				if (!resumeOn){
					cursor.resume()
					resumeOn = true
				}
			}else{
				if (resumeOn){
					cursor.pause()
					resumeOn = false
				}
				//the first run?
				if (cb){
					cb()
					cb = null
				}
			}
			//wtf, hack.
			if (exports.shadowCatAgentsQueue.length>10000){
				cursor.pause()
				resumeOn = false
			}
		},1000)

		cursor.on('data', function(doc) {
			if (doc['sc:research']){
				exports.shadowCatAgentsQueue.push({bnumber: doc._id, agents: doc['sc:agents']})
			}
		})

		cursor.once('end', function() {
			setTimeout(function(){

				clearTimeout(queueTimer)
				exports.shadowCatAgentsQueue.push(null)

				//console.log("populateShadowcatAgentsViaf - Done!")
				//cb(++agentId)
				//agentsDatabase.close()
			},5000)
		})

	})

}

//we creating an agent it needs to merge the source information (scAgent) with any VIAF data we have on had and a existing registry agent if it exists
exports.mergeScAgentViafRegistryAgent = function(scAgent, viaf, registryAgent,source){

	//if it has no registryAgent yet that means we are creating a new one
	if (scAgent && !registryAgent){

		var newAgent = {
			viaf: false,
			viafAll: [],
			registry: "temp" + Date.now() + Math.floor(Math.random() * (1000000 - 1)) + 1,
			nameControlled: false,
			wikidata: false,
			lcId: false,
			gettyId: false,
			dbpedia: false,
			birth: false,
			death: false,
			type: false,
			source: false,
			useCount: 0,
			altForms: [],
			nameNormalized: []
		}

		//if it has a VIAF then we need to incorporate that info
		if (viaf){

			newAgent.viaf = viaf._id
			newAgent.viafAll = [viaf._id]

			//we have the VIAF data lets fill that in
			if (viaf.lcTerm){
				newAgent.nameControlled = viaf.lcTerm
			}else if (viaf.viafTerm){
				newAgent.nameControlled = viaf.viafTerm
			}else{
				newAgent.nameControlled = scAgent.nameLocal
			}
			//lets collapse these too
			newAgent.nameControlled = newAgent.nameControlled.replace(/\s\(Spirit\)/gi,'')

			if (viaf.type) newAgent.type = viaf.type.toLowerCase()

			if (viaf.wikidataId) newAgent.wikidata = viaf.wikidataId
			if (viaf.lcId) newAgent.lcId = viaf.lcId
			if (viaf.gettyId) newAgent.gettyId = parseInt(viaf.gettyId)
			if (viaf.dbpedia) newAgent.dbpedia = viaf.dbpedia
			if (viaf.birth) newAgent.birth = viaf.birth
			if (viaf.death) newAgent.death = viaf.death

			if (viaf.lcTerm){
				var normal = utils.normalizeAndDiacritics(viaf.lcTerm).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== ''){
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: viaf.lcTerm, type: "viaf.lcTerm", source: "catalog", id: source})
				}
			}
			if (viaf.viafTerm){
				var normal = utils.normalizeAndDiacritics(viaf.viafTerm).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== ''){
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: viaf.viafTerm, type: "viaf.viafTerm", source: "catalog", id: source})

				}
			}
			if (scAgent.nameLocal){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLocal).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== ''){
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: viaf.nameLocal, type: "viaf.nameLocal", source: "catalog", id: source})
				}
			}

			return newAgent

		}else if (!viaf && scAgent.viaf){

			//this is a potential problem, there is a VIAF id, but we did not find it in our lookup table, record an error
			errorLib.error("Agent Serialization - Catalog - No VIAF found in lookup table", JSON.stringify(scAgent))

			//we have no VIAF info and no existing registry agent, populate the registry agent based on what we have from the scagent
			if (scAgent.nameLc){
				newAgent.nameControlled = scAgent.nameLc
			}else if (scAgent.nameViaf){
				newAgent.nameControlled = scAgent.nameViaf
			}else{
				newAgent.nameControlled = scAgent.nameLocal
			}

			if (scAgent.type) newAgent.type = scAgent.type.toLowerCase()
			//we do not trust the VIAF number
			//newAgent.viaf = scAgent.viaf

			if (scAgent.nameLc){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLc).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: scAgent.nameLc, type: "scAgent.nameLc", source: "catalog", id: source})
				}
			}
			if (scAgent.nameViaf){
				var normal = utils.normalizeAndDiacritics(scAgent.nameViaf).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: scAgent.nameViaf, type: "scAgent.nameViaf",source: "catalog", id: source})
				}
			}
			if (scAgent.nameLocal){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLocal).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: scAgent.nameLocal, type: "scAgent.nameLocal",source: "catalog", id: source})
				}
			}

			return newAgent

		}else{

			//there is no agent and also we don't have any VIAF info, so populate what we can

			if (scAgent.nameLc){
				newAgent.nameControlled = scAgent.nameLc
			}else if (scAgent.nameViaf){
				newAgent.nameControlled = scAgent.nameViaf
			}else{
				newAgent.nameControlled = scAgent.nameLocal
			}
			newAgent.type = scAgent.type.toLowerCase()

			if (scAgent.nameLc){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLc).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== ''){
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: scAgent.nameLc, type: "scAgent.nameLc", source: "catalog", id: source})
				}
			}
			if (scAgent.nameViaf){
				var normal = utils.normalizeAndDiacritics(scAgent.nameViaf).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== ''){
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: scAgent.nameViaf, type: "scAgent.nameViaf",source: "catalog", id: source})
				}
			}
			if (scAgent.nameLocal){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLocal).trim()
				if (newAgent.nameNormalized.indexOf(normal) === -1 && normal !== ''){
					newAgent.nameNormalized.push(normal)
					newAgent.altForms.push({name: scAgent.nameLocal, type: "scAgent.nameLocal",source: "catalog", id: source})
				}
			}

			return newAgent

		}

	}else if (scAgent && registryAgent){

		//we have the registry agent if it already has a VIAF id then that means it was properly setup eariler so we just need to populate possibly new normalized values

		if (!registryAgent.viaf && viaf){

			//the existing registry agent does not have VIAF data yet, we can populate what we know
			if (viaf.type) registryAgent.type = viaf.type.toLowerCase()
			registryAgent.viaf = viaf._id

			newAgent.viafAll = [viaf._id]

			if (viaf.wikidataId) registryAgent.wikidata = viaf.wikidataId
			if (viaf.lcId) registryAgent.lcId = viaf.lcId
			if (viaf.gettyId) registryAgent.gettyId = parseInt(viaf.gettyId)
			if (viaf.dbpedia) registryAgent.dbpedia = viaf.dbpedia
			if (viaf.birth) registryAgent.birth = viaf.birth
			if (viaf.death) registryAgent.death = viaf.death

			if (viaf.lcTerm){
				var normal = utils.normalizeAndDiacritics(viaf.lcTerm).trim()
				if (registryAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					registryAgent.nameNormalized.push(normal)
					registryAgent.altForms.push({name: viaf.lcTerm, type: "viaf.lcTerm",source: "catalog", id: source})
				}
			}
			if (viaf.viafTerm){
				var normal = utils.normalizeAndDiacritics(viaf.viafTerm).trim()
				if (registryAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					registryAgent.nameNormalized.push(normal)
					registryAgent.altForms.push({name: viaf.viafTerm, type: "viaf.viafTerm",source: "catalog", id: source})
				}
			}
			if (scAgent.nameLocal){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLocal).trim()
				if (registryAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					registryAgent.nameNormalized.push(normal)
					registryAgent.altForms.push({name: viaf.nameLocal, type: "viaf.nameLocal",source: "catalog", id: source})
				}
			}

			return registryAgent

		}else if (registryAgent.viaf){

			//it already has VIAF information just populate any new normalized names
			if (scAgent.nameLocal){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLocal).trim()
				if (registryAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					registryAgent.nameNormalized.push(normal)
					registryAgent.altForms.push({name: scAgent.nameLocal, type: "scAgent.nameLocal",source: "catalog", id: source})
				}
			}

			return registryAgent

		}else if (!registryAgent.viaf && !viaf){

			//This is jsut a locally matched name, add in any new local normalized names
			//it already has VIAF information just populate any new normalized names
			if (scAgent.nameLocal){
				var normal = utils.normalizeAndDiacritics(scAgent.nameLocal).trim()
				if (registryAgent.nameNormalized.indexOf(normal) === -1 && normal !== '') {
					registryAgent.nameNormalized.push(normal)
					registryAgent.altForms.push({name: scAgent.nameLocal, type: "scAgent.nameLocal",source: "catalog", id: source})

				}
			}

			return registryAgent

		}

	}

	//if it got here we have problems
	errorLib.error("Agent Serialization - Catalog - Could not serialize this agent!", JSON.stringify({"scAgent" : scAgent, "viaf" : viaf, "registryAgent" : registryAgent }))

	return false

}


text:
namespace {

// Pointer to currently active tester, which is assumed to be a singleton.
NotificationDisplayServiceTester* g_tester = nullptr;

class NotificationDisplayServiceShutdownNotifierFactory
    : public BrowserContextKeyedServiceShutdownNotifierFactory {
 public:
  NotificationDisplayServiceShutdownNotifierFactory(
      const NotificationDisplayServiceShutdownNotifierFactory&) = delete;
  NotificationDisplayServiceShutdownNotifierFactory& operator=(
      const NotificationDisplayServiceShutdownNotifierFactory&) = delete;
  static NotificationDisplayServiceShutdownNotifierFactory* GetInstance() {
    return base::Singleton<
        NotificationDisplayServiceShutdownNotifierFactory>::get();
  }

 private:
  friend struct base::DefaultSingletonTraits<
      NotificationDisplayServiceShutdownNotifierFactory>;

  NotificationDisplayServiceShutdownNotifierFactory()
      : BrowserContextKeyedServiceShutdownNotifierFactory(
            "NotificationDisplayService") {
    DependsOn(NotificationDisplayServiceFactory::GetInstance());
  }
  ~NotificationDisplayServiceShutdownNotifierFactory() override {}
};

}  // namespace

NotificationDisplayServiceTester::NotificationDisplayServiceTester(
    Profile* profile)
    : profile_(profile) {
  // TODO(peter): Remove the StubNotificationDisplayService in favor of having
  // a fully functional MockNotificationPlatformBridge.
  if (profile_) {
    display_service_ = static_cast<StubNotificationDisplayService*>(
        NotificationDisplayServiceFactory::GetInstance()
            ->SetTestingFactoryAndUse(
                profile_,
                base::BindRepeating(
                    &StubNotificationDisplayService::FactoryForTests)));

    profile_shutdown_subscription_ =
        NotificationDisplayServiceShutdownNotifierFactory::GetInstance()
            ->Get(profile)
            ->Subscribe(base::BindRepeating(
                &NotificationDisplayServiceTester::OnProfileShutdown,
                base::Unretained(this)));
  } else {
    auto system_display_service =
        std::make_unique<StubNotificationDisplayService>(nullptr);
    display_service_ = system_display_service.get();
    SystemNotificationHelper::GetInstance()->SetSystemServiceForTesting(
        std::move(system_display_service));
  }

  g_tester = this;
}

NotificationDisplayServiceTester::~NotificationDisplayServiceTester() {
  g_tester = nullptr;
  if (profile_) {
    NotificationDisplayServiceFactory::GetInstance()->SetTestingFactory(
        profile_, BrowserContextKeyedServiceFactory::TestingFactory());
  }
}

// static
NotificationDisplayServiceTester* NotificationDisplayServiceTester::Get() {
  return g_tester;
}

void NotificationDisplayServiceTester::SetNotificationAddedClosure(
    base::RepeatingClosure closure) {
  display_service_->SetNotificationAddedClosure(std::move(closure));
}

void NotificationDisplayServiceTester::SetNotificationClosedClosure(
    base::RepeatingClosure closure) {
  display_service_->SetNotificationClosedClosure(std::move(closure));
}

std::vector<message_center::Notification>
NotificationDisplayServiceTester::GetDisplayedNotificationsForType(
    NotificationHandler::Type type) {
  return display_service_->GetDisplayedNotificationsForType(type);
}

absl::optional<message_center::Notification>
NotificationDisplayServiceTester::GetNotification(
    const std::string& notification_id) const {
  return display_service_->GetNotification(notification_id);
}

const NotificationCommon::Metadata*
NotificationDisplayServiceTester::GetMetadataForNotification(
    const message_center::Notification& notification) {
  return display_service_->GetMetadataForNotification(notification);
}

void NotificationDisplayServiceTester::SimulateClick(
    NotificationHandler::Type notification_type,
    const std::string& notification_id,
    absl::optional<int> action_index,
    absl::optional<std::u16string> reply) {
  display_service_->SimulateClick(notification_type, notification_id,
                                  std::move(action_index), std::move(reply));
}

void NotificationDisplayServiceTester::SimulateSettingsClick(
    NotificationHandler::Type notification_type,
    const std::string& notification_id) {
  display_service_->SimulateSettingsClick(notification_type, notification_id);
}

void NotificationDisplayServiceTester::RemoveNotification(
    NotificationHandler::Type type,
    const std::string& notification_id,
    bool by_user,
    bool silent) {
  display_service_->RemoveNotification(type, notification_id, by_user, silent);
}

void NotificationDisplayServiceTester::RemoveAllNotifications(
    NotificationHandler::Type type,
    bool by_user) {
  display_service_->RemoveAllNotifications(type, by_user);
}

void NotificationDisplayServiceTester::SetProcessNotificationOperationDelegate(
    const StubNotificationDisplayService::ProcessNotificationOperationCallback&
        delegate) {
  display_service_->SetProcessNotificationOperationDelegate(delegate);
}

void NotificationDisplayServiceTester::OnProfileShutdown() {
  profile_ = nullptr;
  profile_shutdown_subscription_ = {};
}


text:
int player2_score (register const char *str, register unsigned int len);
#endif


text:
VERSION=$(shell git describe --tags --abbrev=0)

test:
	go test -v -p 1 -race -timeout 5m ./... -check.v

rebuild:
	go clean -i
	go build

all:
	go install github.com/mailgun/kafka-pixy
	go build -v -ldflags "-X main.Version=$(VERSION)" -o $(GOPATH)/bin/kafka-pixy-cli \
		github.com/mailgun/kafka-pixy/cmd/kafka-pixy-cli
	go install github.com/mailgun/kafka-pixy/cmd/testproducer
	go install github.com/mailgun/kafka-pixy/cmd/testconsumer

vet:
	go vet `go list ./... | grep -v '/vendor/'`

grpc:
	protoc -I . kafkapixy.proto --go_out=plugins=grpc:gen/golang --python_out=grpc:gen/python

errcheck: install_errcheck
	errcheck github.com/mailgun/kafka-pixy

fmt:
	$(eval $@_GOFILES_NO_VENDOR := $(shell find . -type f -name '*.go' -not -path "./vendor/*"))
	@if [ -n "$$(gofmt -l $($@_GOFILES_NO_VENDOR))" ]; then echo 'Please run go fmt on your code.' && exit 1; fi

install_errcheck:
	go get github.com/kisielk/errcheck


text:
package com.mukunda.moneyshit;

import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Properties;

/******************************************************************************
 * Holds information, primarily a balance, associated with a UUID.
 *
 * @author mukunda
 *
 ******************************************************************************/
public class Account {

	public double balance;
	public final HashMap<String,String> fields = new HashMap<String,String>();

	//---------------------------------------------------------------------------------------------
	public Properties toProperties() {
		Properties props = new Properties();
		props.setProperty( "balance", Double.toString(balance) );

		for( Entry<String,String> entry : fields.entrySet() ) {
			props.setProperty( entry.getKey(), entry.getValue() );
		}

		return props;
	}

	//---------------------------------------------------------------------------------------------
	public enum ReadPropertiesResult {
		OKAY,NOBALANCE;
	}

	//---------------------------------------------------------------------------------------------
	public boolean readProperties( Properties props ) {
		boolean hasBalance = true;
		String strBalance = props.getProperty( "balance" );

		if( strBalance == null ) {
			hasBalance = false;
			balance = 0.0;
		} else {
			try {
				balance = Double.parseDouble( strBalance );
			} catch (NumberFormatException e ) {
				balance = 0.0;
				hasBalance = false;
			}
		}

		props.remove( "balance" );

		for( Entry<Object, Object> entry : props.entrySet() ) {
			fields.put( (String)entry.getKey(), (String)entry.getValue() );
		}

		return hasBalance;
	}

}


text:
<!DOCTYPE html>

		<title>UIActivityIndicatorView</title>

		<meta charset="utf-8"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge"/>

		<meta name="description" content=""/>
		<meta name="viewport" content="width=device-width, initial-scale=1"/>

		<link rel="stylesheet" type="text/css" href="../css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../css/main.css"/>

				<UIActivityIndicatorView class="col-4 activity1"></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity2"></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity3"></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity4"></UIActivityIndicatorView>

				<UIActivityIndicatorView class="col-4 activity1" is-large></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity2" is-large></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity3" is-large></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity4" is-large></UIActivityIndicatorView>

				<UIActivityIndicatorView class="col-4 activity1" is-animating></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity2" is-animating></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity3" is-animating></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity4" is-animating></UIActivityIndicatorView>

				<UIActivityIndicatorView class="col-4 activity1" is-large is-animating></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity2" is-large is-animating></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity3" is-large is-animating></UIActivityIndicatorView>
				<UIActivityIndicatorView class="col-4 activity4" is-large is-animating></UIActivityIndicatorView>


text:
namespace Microsoft.Azure.Management.Migrate.ResourceMover.Models
{
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// Security Rule data model for Network Security Groups.
    /// </summary>
    public partial class NsgSecurityRule
    {
        /// <summary>
        /// Initializes a new instance of the NsgSecurityRule class.
        /// </summary>
        public NsgSecurityRule()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the NsgSecurityRule class.
        /// </summary>
        /// <param name="name">Gets or sets the Security rule name.</param>
        /// <param name="access">Gets or sets whether network traffic is
        /// allowed or denied.
        /// Possible values are "Allow" and "Deny".</param>
        /// <param name="description">Gets or sets a description for this rule.
        /// Restricted to 140 chars.</param>
        /// <param name="destinationAddressPrefix">Gets or sets destination
        /// address prefix. CIDR or source IP range.
        /// A "*" can also be used to match all source IPs. Default tags such
        /// as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be
        /// used.</param>
        /// <param name="destinationPortRange">Gets or sets Destination Port or
        /// Range. Integer or range between
        /// 0 and 65535. A "*" can also be used to match all ports.</param>
        /// <param name="direction">Gets or sets the direction of the
        /// rule.InBound or Outbound. The
        /// direction specifies if rule will be evaluated on incoming or
        /// outgoing traffic.</param>
        /// <param name="priority">Gets or sets the priority of the rule. The
        /// value can be between
        /// 100 and 4096. The priority number must be unique for each rule in
        /// the collection.
        /// The lower the priority number, the higher the priority of the
        /// rule.</param>
        /// <param name="protocol">Gets or sets Network protocol this rule
        /// applies to. Can be Tcp, Udp or All(*).</param>
        /// <param name="sourceAddressPrefix">Gets or sets source address
        /// prefix. CIDR or source IP range. A
        /// "*" can also be used to match all source IPs.  Default tags such as
        /// 'VirtualNetwork',
        /// 'AzureLoadBalancer' and 'Internet' can also be used. If this is an
        /// ingress
        /// rule, specifies where network traffic originates from.</param>
        /// <param name="sourcePortRange">Gets or sets Source Port or Range.
        /// Integer or range between 0 and
        /// 65535. A "*" can also be used to match all ports.</param>
        public NsgSecurityRule(string name = default(string), string access = default(string), string description = default(string), string destinationAddressPrefix = default(string), string destinationPortRange = default(string), string direction = default(string), int? priority = default(int?), string protocol = default(string), string sourceAddressPrefix = default(string), string sourcePortRange = default(string))
        {
            Name = name;
            Access = access;
            Description = description;
            DestinationAddressPrefix = destinationAddressPrefix;
            DestinationPortRange = destinationPortRange;
            Direction = direction;
            Priority = priority;
            Protocol = protocol;
            SourceAddressPrefix = sourceAddressPrefix;
            SourcePortRange = sourcePortRange;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets the Security rule name.
        /// </summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets whether network traffic is allowed or denied.
        /// Possible values are "Allow" and "Deny".
        /// </summary>
        [JsonProperty(PropertyName = "access")]
        public string Access { get; set; }

        /// <summary>
        /// Gets or sets a description for this rule. Restricted to 140 chars.
        /// </summary>
        [JsonProperty(PropertyName = "description")]
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets destination address prefix. CIDR or source IP range.
        /// A "*" can also be used to match all source IPs. Default tags such
        /// as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be
        /// used.
        /// </summary>
        [JsonProperty(PropertyName = "destinationAddressPrefix")]
        public string DestinationAddressPrefix { get; set; }

        /// <summary>
        /// Gets or sets Destination Port or Range. Integer or range between
        /// 0 and 65535. A "*" can also be used to match all ports.
        /// </summary>
        [JsonProperty(PropertyName = "destinationPortRange")]
        public string DestinationPortRange { get; set; }

        /// <summary>
        /// Gets or sets the direction of the rule.InBound or Outbound. The
        /// direction specifies if rule will be evaluated on incoming or
        /// outgoing traffic.
        /// </summary>
        [JsonProperty(PropertyName = "direction")]
        public string Direction { get; set; }

        /// <summary>
        /// Gets or sets the priority of the rule. The value can be between
        /// 100 and 4096. The priority number must be unique for each rule in
        /// the collection.
        /// The lower the priority number, the higher the priority of the rule.
        /// </summary>
        [JsonProperty(PropertyName = "priority")]
        public int? Priority { get; set; }

        /// <summary>
        /// Gets or sets Network protocol this rule applies to. Can be Tcp, Udp
        /// or All(*).
        /// </summary>
        [JsonProperty(PropertyName = "protocol")]
        public string Protocol { get; set; }

        /// <summary>
        /// Gets or sets source address prefix. CIDR or source IP range. A
        /// "*" can also be used to match all source IPs.  Default tags such as
        /// 'VirtualNetwork',
        /// 'AzureLoadBalancer' and 'Internet' can also be used. If this is an
        /// ingress
        /// rule, specifies where network traffic originates from.
        /// </summary>
        [JsonProperty(PropertyName = "sourceAddressPrefix")]
        public string SourceAddressPrefix { get; set; }

        /// <summary>
        /// Gets or sets Source Port or Range. Integer or range between 0 and
        /// 65535. A "*" can also be used to match all ports.
        /// </summary>
        [JsonProperty(PropertyName = "sourcePortRange")]
        public string SourcePortRange { get; set; }

    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;

namespace Confuser.Core {
	/// <summary>
	///     Discovers available protection plugins.
	/// </summary>
	public class PluginDiscovery {
		/// <summary>
		///     The default plugin discovery service.
		/// </summary>
		internal static readonly PluginDiscovery Instance = new PluginDiscovery();

		/// <summary>
		///     Initializes a new instance of the <see cref="PluginDiscovery" /> class.
		/// </summary>
		protected PluginDiscovery() { }

		/// <summary>
		///     Retrieves the available protection plugins.
		/// </summary>
		/// <param name="context">The working context.</param>
		/// <param name="protections">A list of resolved protections.</param>
		/// <param name="packers">A list of resolved packers.</param>
		/// <param name="components">A list of resolved components.</param>
		public void GetPlugins(ConfuserContext context, out IList<Protection> protections, out IList<Packer> packers, out IList<ConfuserComponent> components) {
			protections = new List<Protection>();
			packers = new List<Packer>();
			components = new List<ConfuserComponent>();
			GetPluginsInternal(context, protections, packers, components);
		}

		/// <summary>
		///     Determines whether the specified type has an accessible default constructor.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <returns><c>true</c> if the specified type has an accessible default constructor; otherwise, <c>false</c>.</returns>
		public static bool HasAccessibleDefConstructor(Type type) {
			ConstructorInfo ctor = type.GetConstructor(Type.EmptyTypes);
			if (ctor == null) return false;
			return ctor.IsPublic;
		}

		/// <summary>
		///     Adds plugins in the assembly to the protection list.
		/// </summary>
		/// <param name="context">The working context.</param>
		/// <param name="protections">The working list of protections.</param>
		/// <param name="packers">The working list of packers.</param>
		/// <param name="components">The working list of components.</param>
		/// <param name="asm">The assembly.</param>
		protected static void AddPlugins(
			ConfuserContext context, IList<Protection> protections, IList<Packer> packers,
			IList<ConfuserComponent> components, Assembly asm) {
			foreach(var module in asm.GetLoadedModules())
				foreach (var i in module.GetTypes()) {
					if (i.IsAbstract || !HasAccessibleDefConstructor(i))
						continue;

					if (typeof(Protection).IsAssignableFrom(i)) {
						try {
							protections.Add((Protection)Activator.CreateInstance(i));
						}
						catch (Exception ex) {
							context.Logger.ErrorException("Failed to instantiate protection '" + i.Name + "'.", ex);
						}
					}
					else if (typeof(Packer).IsAssignableFrom(i)) {
						try {
							packers.Add((Packer)Activator.CreateInstance(i));
						}
						catch (Exception ex) {
							context.Logger.ErrorException("Failed to instantiate packer '" + i.Name + "'.", ex);
						}
					}
					else if (typeof(ConfuserComponent).IsAssignableFrom(i)) {
						try {
							components.Add((ConfuserComponent)Activator.CreateInstance(i));
						}
						catch (Exception ex) {
							context.Logger.ErrorException("Failed to instantiate component '" + i.Name + "'.", ex);
						}
					}
				}
			context.CheckCancellation();
		}

		/// <summary>
		///     Retrieves the available protection plugins.
		/// </summary>
		/// <param name="context">The working context.</param>
		/// <param name="protections">The working list of protections.</param>
		/// <param name="packers">The working list of packers.</param>
		/// <param name="components">The working list of components.</param>
		protected virtual void GetPluginsInternal(
			ConfuserContext context, IList<Protection> protections,
			IList<Packer> packers, IList<ConfuserComponent> components) {
			try {
				Assembly protAsm = Assembly.Load("Confuser.Protections");
				AddPlugins(context, protections, packers, components, protAsm);
			}
			catch (Exception ex) {
				context.Logger.WarnException("Failed to load built-in protections.", ex);
			}

			try {
				Assembly renameAsm = Assembly.Load("Confuser.Renamer");
				AddPlugins(context, protections, packers, components, renameAsm);
			}
			catch (Exception ex) {
				context.Logger.WarnException("Failed to load renamer.", ex);
			}

			try {
				Assembly renameAsm = Assembly.Load("Confuser.DynCipher");
				AddPlugins(context, protections, packers, components, renameAsm);
			}
			catch (Exception ex) {
				context.Logger.WarnException("Failed to load dynamic cipher library.", ex);
			}

			foreach (string pluginPath in context.Project.PluginPaths) {
				string realPath = Path.Combine(context.BaseDirectory, pluginPath);
				try {
					Assembly plugin = Assembly.LoadFile(realPath);
					AddPlugins(context, protections, packers, components, plugin);
				}
				catch (Exception ex) {
					context.Logger.WarnException("Failed to load plugin '" + pluginPath + "'.", ex);
				}
			}
		}
	}
}


text:
class LocalStorage implements Storage {
  [index: number]: string;
  [key: string]: any;
}


text:
package de.germanspacebuild.plugins.fasttravel.Listener;

import de.germanspacebuild.plugins.fasttravel.FastTravel;
import de.germanspacebuild.plugins.fasttravel.data.FastTravelDB;
import de.germanspacebuild.plugins.fasttravel.data.FastTravelSign;
import de.germanspacebuild.plugins.fasttravel.events.FastTravelFoundEvent;
import de.germanspacebuild.plugins.fasttravel.util.BlockUtil;
import de.germanspacebuild.plugins.fasttravel.util.FastTravelUtil;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Sign;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;

import java.util.Arrays;

/**
 * Created by oneill011990 on 04.03.2016
 * for FastTravelReborn
 *
 * @author oneill011990
 */
public class FTPlayerListener implements Listener {

    private FastTravel plugin;

    public FTPlayerListener(FastTravel plugin) {
        this.plugin = plugin;
    }

    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onPlayerInteractEvent(PlayerInteractEvent event) {
        if (!Arrays.asList(BlockUtil.signBlocks).contains(event.getClickedBlock().getType())) {
            return;
        } else if (!event.getPlayer().hasPermission(FastTravel.PERMS_BASE + "use")) {
            plugin.getIOManger().sendTranslation(event.getPlayer(), "Perms.Not");
            return;
        } else if (event.getAction() != Action.RIGHT_CLICK_AIR || event.getAction() != Action.RIGHT_CLICK_BLOCK) {
            return;
        } else if (!FastTravelUtil.isFTSign(event.getClickedBlock())) {
            return;
        }

        Sign sign = (Sign) event.getClickedBlock().getState();

        if (FastTravelDB.getSignsFor(event.getPlayer().getUniqueId()).contains(FastTravelDB.getSign(sign.getLine(1)))) {
            plugin.getIOManger().sendTranslation(event.getPlayer(), "Sign.Found.Already".replaceAll("%sign",
                    sign.getLine(1)));
        } else {
            plugin.getServer().getPluginManager().callEvent(new FastTravelFoundEvent(event.getPlayer(),
                    FastTravelDB.getSign(sign.getLine(1))));
        }

    }

    @EventHandler(ignoreCancelled = true)
    public void onPlayerInteractWand(PlayerInteractEvent event) {
        if (!Arrays.asList(BlockUtil.signBlocks).contains(event.getClickedBlock().getType())) {
        } else if (event.getItem() == null) {
        } else if (event.getItem().getType() != Material.BONE) {
        } else if (!FastTravelUtil.isMoveWand(event.getItem())) {
        } else {
            if (!(event.getClickedBlock().getState() instanceof Sign)) {
                return;
            }
            Sign signBlock = ((Sign) event.getClickedBlock().getState());
            for (String line : signBlock.getLines()) {
                if (!line.isEmpty()) {
                    plugin.getIOManger().sendTranslation(event.getPlayer(), "Command.Move.SignNotEmpty");
                    return;
                }
            }
            String signName = event.getItem().getItemMeta().getLore().get(0).replace("Sign: " + ChatColor.GOLD, "");
            FastTravelSign sign = FastTravelDB.getSign(signName);
            if (sign == null) {
                plugin.getIOManger().send(event.getPlayer(), plugin.getIOManger().translate("Sign.Exists.Not").
                        replaceAll("%sign", signName));
                return;
            }
            FastTravelUtil.formatSign(signBlock, sign.getName());
            Location loc = sign.getSignLocation();
            loc.getBlock().setType(Material.AIR);
            if (sign.getSignLocation() == sign.getTPLocation()) {
                sign.setTPLocation(signBlock.getLocation());
            }
            sign.setSignLocation(signBlock.getLocation());
            event.getPlayer().getInventory().remove(event.getItem());
            plugin.getIOManger().send(event.getPlayer(), plugin.getIOManger().translate("Command.Move.Success")
                    .replace("%sign", sign.getName()));
        }
    }

    @EventHandler(priority = EventPriority.NORMAL)
    public void onPlayerJoinEvent(PlayerJoinEvent event) {
        if (event.getPlayer().hasPermission(FastTravel.PERMS_BASE + "update") && FastTravel.getInstance().needUpdate) {
            plugin.getIOManger().send(event.getPlayer(), plugin.getIOManger().translate(
                    "Plugin.Update.Player").replace("%old", plugin.getDescription().getVersion())
                    .replaceAll("%new", plugin.getUpdateChecker().getVersion()).replaceAll("%link",
                            plugin.getUpdateChecker().getLink()));
        }
    }

    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onPlayerItemDropEvent(PlayerDropItemEvent event) {
        if (event.getItemDrop().getItemStack().getType() != Material.BONE) {
            return;
        }
        if (FastTravelUtil.isMoveWand(event.getItemDrop().getItemStack())) {
            event.setCancelled(true);
        }
    }

}


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Denkschriften Kgl. Bayer. Bot. Ges. , Abteilung 2 4: 246 (1861)

#### Original name
Verrucaria conoidea

### Remarks
null


text:
'use strict';

import * as assert from 'assert';
import { Action, IAction, isAction } from 'vs/base/common/actions';

suite('Actions', () => {
	test('isAction', function() {
		assert(isAction(new Action('id', 'label', 'style', true, function() { return null; })));
		assert(isAction(<IAction> {
			id: 'id',
			label: 'label',
			class: 'style',
			checked: true,
			enabled: true,
			run: function() { return null; }
		}));

		assert(!isAction({
	//		id: 'id',
			label: 'label',
			class: 'style',
			checked: true,
			enabled: true,
			run: function() { return null; }
		}));
		assert(!isAction({
			id: 1234,
			label: 'label',
			class: 'style',
			checked: true,
			enabled: true,
			run: function() { return null; }
		}));
		assert(!isAction({
			id: 'id',
			label: 'label',
			class: 'style',
			checked: 1,
			enabled: 1,
			run: function() { return null; }
		}));
		assert(!isAction(null));
		assert(!isAction({
			id: 'id',
			label: 'label',
	//		class: 'style',
			checked: true,
			enabled: true,
	//		run: function() { return null; }
		}));
	});
});