text:
unless Kernel.respond_to?(:require_relative)
  module Kernel
    def require_relative(path)
      require File.join(File.dirname(caller[0]), path.to_str)
    end
  end
end
##

require 'minitest/spec'
require 'minitest/autorun'
require 'webmock/minitest'
require_relative '../lib/vcloud-rest/connection'

describe VCloudClient::Connection do
  before do
    @args = {:host => 'https://testhost.local',
            :username => 'testuser',
            :password => 'testpass',
            :org => 'testorg',
            :api_version => "5.1"}

    @connection = VCloudClient::Connection.new(@args[:host], @args[:username],
                                          @args[:password], @args[:org], @args[:api_version])
  end

  describe "correct initialization" do
    it "cannot be created with no arguments" do
      lambda {
        VCloudClient::Connection.new
      }.must_raise ArgumentError
    end

    it "must be created with at least 4 arguments" do
      VCloudClient::Connection.new(@args[:host], @args[:username], @args[:password],
                                  @args[:org], @args[:api_version]).must_be_instance_of VCloudClient::Connection
    end

    it "must construct the correct api url" do
      @connection.api_url.must_equal "https://testhost.local/api"
    end
  end

  describe "supported APIs" do
    [:login, :logout, :list_organizations, :show_organization,
     :show_vdc, :show_catalog, :show_catalog_item, :show_vapp,
     :delete_vapp, :poweroff_vapp, :poweron_vapp,
     :create_vapp_from_template].each do |method|
      it "must respond to #{method}" do
        @connection.must_respond_to method
      end
    end

    [:send_request, :convert_vapp_status].each do |method|
      it "must not respond to #{method}" do
        @connection.wont_respond_to method
      end
    end
  end

  describe "check status" do
    it "should return correct status for existing codes" do
      @connection.send(:convert_vapp_status, 8).must_equal "stopped"
    end

    it "should return a default for unexisting codes" do
      @connection.send(:convert_vapp_status, 999).must_equal "Unknown 999"
    end
  end

  describe "login" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/sessions" }

    it "should send the correct Accept header for API version 5.1 (default)" do
      stub_request(:post, @url).
        with(:headers => {'Accept'=>'application/*+xml;version=5.1'}).
        to_return(:status => 200, :body => "", :headers => {:x_vcloud_authorization => "test_auth_code"})

      @connection.login
    end

    it "should send the correct Accept header for API version 1.5" do
      stub_request(:post, @url).
        with(:headers => {'Accept'=>'application/*+xml;version=1.5'}).
        to_return(:status => 200, :body => "", :headers => {:x_vcloud_authorization => "test_auth_code"})

      connection = VCloudClient::Connection.new(@args[:host], @args[:username], @args[:password],
                                    @args[:org], "1.5")
      connection.login
    end

    it "should handle correctly a success response" do
      stub_request(:post, @url).
        to_return(:status => 200, :body => "", :headers => {:x_vcloud_authorization => "test_auth_code"})

      @connection.login
      @connection.auth_key.wont_be_nil
    end

    it "should handle correctly a success response with empty headers" do
      stub_request(:post, @url).
        to_return(:status => 200, :body => "", :headers => {})

      lambda {
        @connection.login
      }.must_raise RuntimeError
    end

    it "should raise an exception for unauthorized access" do
      stub_request(:post, @url).
        to_return(:status => 401, :body => "", :headers => {})

      lambda {
        @connection.login
      }.must_raise VCloudClient::UnauthorizedAccess
    end
  end

  describe "list organizations" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/org" }

    it "should return the correct no. of organizations - 0" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "",
         :headers => {})

      @connection.list_organizations.count.must_equal 0
    end

    it "should return the correct no. of organizations - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<OrgList><Org href='https://testhost.local/api/org/test-org-url' name='test-org'></Org></OrgList>",
         :headers => {})

      orgs = @connection.list_organizations
      orgs.count.must_equal 1
      orgs.must_be_kind_of Hash
      orgs.first.must_equal ['test-org', 'test-org-url']
    end
  end

  describe "show organization" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/org/test-org" }

    it "should return the correct no. of organizations - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<Link type='application/vnd.vmware.vcloud.catalog+xml' name='catalog_1' href='#{@connection.api_url}/catalog/catalog_1-url'></Link>",
         :headers => {})

      catalogs, vdcs, networks = @connection.show_organization("test-org")
      catalogs.count.must_equal 1
      catalogs.first.must_equal ["catalog_1", "catalog_1-url"]
    end

    it "should return the correct no. of vdcs - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<Link type='application/vnd.vmware.vcloud.vdc+xml' name='vdc_1' href='#{@connection.api_url}/vdc/vdc_1-url'></Link>",
         :headers => {})

      catalogs, vdcs, networks = @connection.show_organization("test-org")
      vdcs.count.must_equal 1
      vdcs.first.must_equal ["vdc_1", "vdc_1-url"]
    end

    it "should return the correct no. of networks - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<Link type='application/vnd.vmware.vcloud.orgNetwork+xml' name='network_1' href='#{@connection.api_url}/network/network_1-url'></Link>",
         :headers => {})

      catalogs, vdcs, networks = @connection.show_organization("test-org")
      networks.count.must_equal 1
      networks.first.must_equal ["network_1", "network_1-url"]
    end
  end

  describe "show catalog" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/catalog/test-catalog" }

    it "should return the correct no. of catalog items - 0" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "",
         :headers => {})

      description, items = @connection.show_catalog("test-catalog")
      items.count.must_equal 0
    end

    it "should return the correct no. of catalog items - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<CatalogItem type='application/vnd.vmware.vcloud.catalogItem+xml' name='catalog_item_1' href='#{@connection.api_url}/catalogItem/catalog_item_1-url'></CatalogItem>",
         :headers => {})

      description, items = @connection.show_catalog("test-catalog")
      items.first.must_equal ["catalog_item_1", "catalog_item_1-url"]
    end
  end

  describe "show vdc" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vdc/test-vdc" }

    it "should return the correct no. of vapps - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<ResourceEntity type='application/vnd.vmware.vcloud.vApp+xml' name='vapp_1' href='#{@connection.api_url}/vApp/vapp-vapp_1-url'></CatalogItem>",
         :headers => {})

      description, items = @connection.show_vdc("test-vdc")
      items.first.must_equal ["vapp_1", "vapp_1-url"]
    end
  end

  describe "show catalog item" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/catalogItem/test-cat-item" }

    it "should return the correct no. of vapp templates - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<Entity type='application/vnd.vmware.vcloud.vAppTemplate+xml' name='vapp_templ_1' href='#{@connection.api_url}/vAppTemplate/vappTemplate-vapp_templ_1-url'></CatalogItem>",
         :headers => {})

      description, vapp_templates = @connection.show_catalog_item("test-cat-item")
      vapp_templates.first.must_equal ["vapp_templ_1", "vapp_templ_1-url"]
    end
  end

  describe "show vapp" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vapp-test-vapp" }

    it "should return the correct status" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<VApp name='test-vapp' status='4'></VApp>",
         :headers => {})

      name, description, status, ip, vms_hash = @connection.show_vapp("test-vapp")
      name.must_equal "test-vapp"
    end

    it "should return the correct status" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<VApp name='test-vapp' status='4'></VApp>",
         :headers => {})

      name, description, status, ip, vms_hash = @connection.show_vapp("test-vapp")
      status.must_equal "running"
    end

    it "should return the correct IP" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<VApp name='test-vapp'><IpAddress>127.0.0.1</IpAddress></VApp>",
         :headers => {})

      name, description, status, ip, vms_hash = @connection.show_vapp("test-vapp")
      ip.must_equal "127.0.0.1"
    end

    it "should return the correct no. of VMs - 1" do
      stub_request(:get, @url).
        to_return(:status => 200,
         :body => "<?xml version=\"1.0\" ?><VApp xmlns=\"http://www.vmware.com/vcloud/v1.5\" xmlns:rasd=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\"><Children><Vm name='vm_1' status='4' href='#{@connection.api_url}/vApp/vm-vm_1'><rasd:Connection vcloud:ipAddress='127.0.0.1'></rasd:Connection></Vm></Children></VApp>",
         :headers => {})

      name, description, status, ip, vms_hash = @connection.show_vapp("test-vapp")
      vms_hash.count.must_equal 1
      vms_hash.first.must_equal ["vm_1", {:addresses=>["127.0.0.1"], :status=>"running", :id=>"vm_1"}]
    end
  end

  describe "delete vapp" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vapp-test-vapp" }

    it "should send the correct request" do
      stub_request(:delete, @url).
        to_return(:status => 200,
            :headers => {:location => "#{@connection.api_url}/task/test-deletion_task"})

      task_id = @connection.delete_vapp("test-vapp")
      task_id.must_equal "test-deletion_task"
    end
  end

  describe "poweroff vapp" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vapp-test-vapp/action/undeploy" }

    it "should send the correct content-type and payload" do
      stub_request(:post, @url).
        with(:body => "<?xml version=\"1.0\"?>\n<UndeployVAppParams xmlns=\"http://www.vmware.com/vcloud/v1.5\">\n  <UndeployPowerAction>powerOff</UndeployPowerAction>\n</UndeployVAppParams>\n",
             :headers => {'Content-Type'=>'application/vnd.vmware.vcloud.undeployVAppParams+xml'}).
        to_return(:status => 200,
             :headers => {:location => "#{@connection.api_url}/task/test-poweroff_task"})

      task_id = @connection.poweroff_vapp("test-vapp")
      task_id.must_equal "test-poweroff_task"
    end
  end

  describe "poweron vapp" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vapp-test-vapp/power/action/powerOn" }

    it "should send the correct request" do
      stub_request(:post, @url).
        to_return(:status => 200,
            :headers => {:location => "#{@connection.api_url}/task/test-startup_task"})

      task_id = @connection.poweron_vapp("test-vapp")
      task_id.must_equal "test-startup_task"
    end
  end

  describe "create vapp" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vdc/vdc_id/action/instantiateVAppTemplate" }

    it "should send the correct content-type and payload" do
      # TODO: this test seems to fail under 1.8.7
      stub_request(:post, @url).
        with(:body => "<?xml version=\"1.0\"?>\n<InstantiateVAppTemplateParams xmlns=\"http://www.vmware.com/vcloud/v1.5\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\" name=\"vapp_name\" deploy=\"true\" powerOn=\"false\">\n  <Description>vapp_desc</Description>\n  <Source href=\"https://testhost.local/api/vAppTemplate/templ_id\"/>\n</InstantiateVAppTemplateParams>\n",
             :headers => {'Content-Type'=>'application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml'}).
        to_return(:status => 200, :headers => {:location => "#{@connection.api_url}/vApp/vapp-vapp_created"},
          :body => "<VApp><Task operationName=\"vdcInstantiateVapp\" href=\"#{@connection.api_url}/task/test-task_id\"></VApp>")

      vapp_id, task_id = @connection.create_vapp_from_template("vdc_id", "vapp_name", "vapp_desc", "templ_id")
      vapp_id.must_equal "vapp_created"
      task_id.must_equal "test-task_id"
    end
  end

  describe "vapp network config" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vapp-test-vapp/networkConfigSection" }

    it "should send the correct content-type and payload" do
      stub_request(:put, @url).
        with(:body => "<?xml version=\"1.0\"?>\n<NetworkConfigSection xmlns=\"http://www.vmware.com/vcloud/v1.5\" xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\">\n  <ovf:Info>Network configuration</ovf:Info>\n  <NetworkConfig networkName=\"test-network\">\n    <Configuration>\n      <FenceMode>isolated</FenceMode>\n      <RetainNetInfoAcrossDeployments>true</RetainNetInfoAcrossDeployments>\n    </Configuration>\n  </NetworkConfig>\n</NetworkConfigSection>\n",
             :headers => {'Content-Type'=>'application/vnd.vmware.vcloud.networkConfigSection+xml'}).
        to_return(:status => 200,
             :headers => {:location => "#{@connection.api_url}/task/test-vapp_network_task"})

      task_id = @connection.set_vapp_network_config("test-vapp", "test-network")
      task_id.must_equal "test-vapp_network_task"
    end
  end

  describe "vm network config" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vm-test-vm/networkConnectionSection" }

    it "should send the correct content-type and payload" do
      stub_request(:put, @url).
      with(:body => "<?xml version=\"1.0\"?>\n<NetworkConnectionSection xmlns=\"http://www.vmware.com/vcloud/v1.5\" xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\">\n  <ovf:Info>VM Network configuration</ovf:Info>\n  <PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>\n  <NetworkConnection network=\"test-network\" needsCustomization=\"true\">\n    <NetworkConnectionIndex>0</NetworkConnectionIndex>\n    <IsConnected>true</IsConnected>\n  </NetworkConnection>\n</NetworkConnectionSection>\n",
             :headers => {'Content-Type'=>'application/vnd.vmware.vcloud.networkConnectionSection+xml'}).
        to_return(:status => 200,
             :headers => {:location => "#{@connection.api_url}/task/test-vm_network_task"})

      task_id = @connection.set_vm_network_config("test-vm", "test-network")
      task_id.must_equal "test-vm_network_task"
    end
  end

  describe "vm guest customization" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vm-test-vm/guestCustomizationSection" }

    it "should send the correct content-type and payload" do
      stub_request(:put, @url).
      with(:body => "<?xml version=\"1.0\"?>\n<GuestCustomizationSection xmlns=\"http://www.vmware.com/vcloud/v1.5\" xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\">\n  <ovf:Info>VM Guest Customization configuration</ovf:Info>\n  <ComputerName>test-name</ComputerName>\n</GuestCustomizationSection>\n",
             :headers => {'Content-Type'=>'application/vnd.vmware.vcloud.guestCustomizationSection+xml'}).
        to_return(:status => 200,
             :headers => {:location => "#{@connection.api_url}/task/test-vm_guest_task"})

      task_id = @connection.set_vm_guest_customization("test-vm", "test-name")
      task_id.must_equal "test-vm_guest_task"
    end
  end

  describe "show vm details" do
    before { @url = "https://testuser%40testorg:testpass@testhost.local/api/vApp/vm-test-vm" }

    it "should send the correct content-type and payload" do
      stub_request(:get, @url).
        to_return(:status => 200,
          :body => "<?xml version=\"1.0\"?>\n<VM xmlns=\"http://www.vmware.com/vcloud/v1.5\" xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\">\n<ovf:OperatingSystemSection><ovf:Description>Test OS</ovf:Description></ovf:OperatingSystemSection>\n<GuestCustomizationSection><Enabled>true</Enabled><AdminPasswordEnabled>false</AdminPasswordEnabled><AdminPasswordAuto>false</AdminPasswordAuto><AdminPassword>testpass</AdminPasswordEnabled><ResetPasswordRequired>false</ResetPasswordRequired><ComputerName>testcomputer</ComputerName></GuestCustomizationSection></VM>\n")

      os_desc, networks, guest_customizations = @connection.show_vm("test-vm")
      os_desc.must_equal "Test OS"
      guest_customizations.wont_be_nil
    end
  end
end


text:
"""
Setuptools script
"""

from setuptools import setup

setup(name='mcn_icn_so',
      version='1.4',
      description='MCN ICN SO',
      author='Andre Gomes - University of Bern, Switzerland',
      author_email='gomes@inf.unibe.ch',
      url='http://www.iam.unibe.ch',
      license='Apache 2.0',
      packages=['wsgi', 'mcn_cc_sdk'],
)

redpajama_set_name: RedPajamaGithub


text:
from influence_module.Influencer import NetworkInfluencer
from influence_module.input_output_influence_function_mapping import *
from keras.models import Sequential
from keras.layers import Dense, Activation
from keras.layers import LSTM
from keras.optimizers import RMSprop
from keras import initializers

class LSTM_influencer(NetworkInfluencer):
    def __init__(self,conf):
        #required settings
        self.structure = conf.structure
        self.input_size = conf.input_size
        self.layers = conf.layer_count
        self.multilayer = self.layers > 1
        self.layer_types = conf.layer_types
        self.layer_sizes = conf.layer_sizes
        self.layer_activations = conf.layer_activations
        self.output_size = conf.output_size
        self.training_enabled = conf.training_enabled
        self.optimizer = conf.optimizer
        self.loss_func = conf.loss_func
        self.learning_rate = conf.learning_rate
        #class settings
        self.first_layer = True
        self.last_layer = False
        self.__get_input_output_size_based_function()
        #optional settings
        opt = conf.opt

    def __get_input_output_size_based_function(self):
        i,o = self.input_size - 1, self.output_size - 1
        print("getting function at " + str(i) + "," + str(o))
        self.influence_function = i2o_func_matrix[i][o]
        print(self.influence_function)

    def __set_base_network_structure(self):
        if self.structure == "sequential":
            self.network = Sequential()
        #elif self.structure == "recurrent":
        #    self.network = Reccurent()
        #elif self.structure == "convolutional":
        #    self.network = Convolutional()
        else:
            print("no structure, going for basic Sequential")
            self.network = Sequential()

    def __get_layer(self,layer_num):
        layer_size = self.layer_sizes[layer_num]
        layer = None
        lstm = self.layer_types[layer_num] == "lstm"

        if lstm:
            if self.first_layer:
                self.first_layer = False
                if self.multilayer:
                    layer = LSTM(layer_size,
                                 return_sequences = True,
                                 input_shape=(None, self.input_size),
                                 bias_initializer='ones',
                                 kernel_initializer=initializers.random_uniform(minval=-1.5, maxval=1.5))
                else:
                    layer = LSTM(layer_size, input_shape=(1,self.input_size),
                                 bias_initializer='ones',kernel_initializer=initializers.random_uniform(minval=-1.5, maxval=1.5))
            elif not self.last_layer:
                self.last_layer == (layer_num + 1) == self.layers
                layer = LSTM(layer_size, return_sequences = True,
                                 bias_initializer='ones',kernel_initializer=initializers.random_uniform(minval=-1.5, maxval=1.5))
        else:
            print("no layer match.")

        return layer

    def __get_layer_activation(self,layer_num):
        return Activation(self.layer_activations[layer_num])

    def __get_optimizer(self):
        if self.optimizer == "rmsprop":
            return RMSprop(lr=self.learning_rate)
        else:
            print("no optimizer match, RMSprop by default")
            return RMSprop(lr=self.learning_rate)

    def build(self,particle_count):
        self.particle_count = particle_count
        self.__set_base_network_structure()
        if self.multilayer:
            for l in range(self.layers):
                layer = self.__get_layer(l)
                self.network.add(layer)
                #activation = self.__get_layer_activation(l)
                #self.network.add(activation)
        else:
            layer = self.__get_layer(0)
            self.network.add(layer)
            activation = self.__get_layer_activation(0)
            self.network.add(activation)
        self.network.compile(loss=self.loss_func, optimizer=self.__get_optimizer())

    def shift_train(self,shift_func):
        self.train = shift_func

    def influence(self, visual_objects):
        ip, ic = visual_objects
        op,oc = self.influence_function(self.network,ip,ic)
        return op, oc

    def influencer_info(self):
        return "LSTM. {info}"


text:
// checking for pointer exception specification

struct S
{
    void foo () throw () { }
    void bar () const throw (int) { }
    void foobar () throw (int, double) { }
};

void foo () throw (char, long)
{
    // exception specification is not part of a function type (15.4, p12)
    // but must be observed when assigning the adress of a function to
    // a pointer to a function (15.4, p3)
    void (*p_foo)() throw (char, long)         = &foo;

    void (S::*p_mfoo)() throw ()               = &S::foo;
    void (S::*p_mbar)() const throw (int)      = &S::bar;
    void (S::*p_mfoobar)() throw (int, double) = &S::foobar;

    // prevent "unused" warnings
    (void)&p_foo;
    (void)&p_mfoo;
    (void)&p_mbar;
    (void)&p_mfoobar;
}


text:
using System;
using Palaso.WritingSystems;
using Palaso.WritingSystems.Migration.WritingSystemsLdmlV0To1Migration;

namespace Palaso.TestUtilities
{
	public class LdmlContentForTests
	{
		public static string Version0English()
		{
			return Version0("en", String.Empty, String.Empty, String.Empty);
		}

		public static string Version1English()
		{
			return Version1("en", String.Empty, String.Empty, String.Empty);
		}

		static public string Version0(string language, string script, string region, string variant)
		{
			return String.Format(
				@"<?xml version='1.0' encoding='utf-8'?>
<ldml>
<identity>
	<version number='' />
	<generation date='0001-01-01T00:00:00' />
	<language type='{0}' />


text:
echo allume Powercontrol telescope
python C:\Users\DELL\worspace\prod\spectroDb\telescope\python\IPX800ctrl.py info 7=1
TIMEOUT /T 1

echo echo allume camera guidage
python C:\Users\DELL\worspace\prod\spectroDb\telescope\python\PowerBoxSet.py COM2 0=1

rem echo allume Electronique telescope Astrosib
rem python C:\Users\DELL\worspace\prod\spectroDb\telescope\python\PowerBoxSet.py COM2 3=1

echo allume monture
python C:\Users\DELL\worspace\prod\spectroDb\telescope\python\IPX800ctrl.py info 6=1

TIMEOUT /T 2
"C:\Program Files (x86)\PRiSM v10\prism.exe" &


text:
function status = test_interpolation_methods(modus)
%TEST_INTERPOLATION_METHODS demonstrates the difference between interpolation
%methods
%
%   Usage: status = test_interpolation_methods(modus)
%
%   Input parameters:
%       modus   - 0: numerical (not available)
%                 1: visual
%
%   Output parameters:
%       status  - true or false

%*****************************************************************************
% The MIT License (MIT)                                                      *
%                                                                            *
% Copyright (c) 2010-2019 SFS Toolbox Developers                             *
%                                                                            *
% Permission is hereby granted,  free of charge,  to any person  obtaining a *
% copy of this software and associated documentation files (the "Software"), *
% to deal in the Software without  restriction, including without limitation *
% the rights  to use, copy, modify, merge,  publish, distribute, sublicense, *
% and/or  sell copies of  the Software,  and to permit  persons to whom  the *
% Software is furnished to do so, subject to the following conditions:       *
%                                                                            *
% The above copyright notice and this permission notice shall be included in *
% all copies or substantial portions of the Software.                        *
%                                                                            *
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
% IMPLIED, INCLUDING BUT  NOT LIMITED TO THE  WARRANTIES OF MERCHANTABILITY, *
% FITNESS  FOR A PARTICULAR  PURPOSE AND  NONINFRINGEMENT. IN NO EVENT SHALL *
% THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
% LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT, TORT  OR OTHERWISE, ARISING *
% FROM,  OUT OF  OR IN  CONNECTION  WITH THE  SOFTWARE OR  THE USE  OR OTHER *
% DEALINGS IN THE SOFTWARE.                                                  *
%                                                                            *
% The SFS Toolbox  allows to simulate and  investigate sound field synthesis *
% methods like wave field synthesis or higher order ambisonics.              *
%                                                                            *
% https://sfs.readthedocs.io                            sfstoolbox@gmail.com *
%*****************************************************************************

status = false;

%% ===== Checking of input parameters ====================================
nargmin = 1;
nargmax = 1;
narginchk(nargmin,nargmax);
if ~modus
    warning('%s: numerical modus not available.',upper(mfilename));
    status = true;
    return;
end

%% ===== Settings ========================================================
conf = struct;
conf.ir.useinterpolation = true;

%% ===== Main ============================================================
% Check if HRTF data set with low frequency correction is available,
% download otherwise
basepath = get_sfs_path();
hrtf = 'KEMAR_HRTFs_lfcorr.sofa';
hrtf_file = [basepath '/data/HRTFs/' hrtf];
if ~exist(hrtf_file,'file')
    disp('Download');
    url = ['https://github.com/spatialaudio/lf-corrected-kemar-hrtfs/', ...
           'blob/master/' hrtf '?raw=true'];
    download_file(url,hrtf_file);
end
% Load HRTF data set
hrtf = SOFAload(hrtf_file);

%% ===== Interpolate shifted Dirac impulses ==============================
% interpolation points
x0 = [1 3; 0 0; 0 0]/180*pi;
% weights (for target point: xs = [2; 0; 0]/180*pi )
weights = [.5; .5];
N = 50; %length impulse responses

% 1. Interpolate between Dirac impulses with one sample in between
h1 = zeros(1,N);
h1(3) = 1;
h2 = zeros(1,N);
h2(5) = 1;

irs1(1,1,:) = h1;
irs1(2,1,:) = h2;
irs1(:,2,:) = irs1(:,1,:); %redundant second channel

conf.ir.interpolationmethod = 'simple';
h_int1_simple = interpolate_ir(irs1,weights,conf);
conf.ir.interpolationmethod = 'freqdomain';
h_int1_fd = interpolate_ir(irs1,weights,conf);
conf.ir.interpolationmethod = 'timedomain';
h_int1_td = interpolate_ir(irs1,weights,conf);

% 2. Interpolate between neighbouring Dirac impulses at impulse reponse start
h1 = zeros(1,N);
h1(3) = 1;
h3 = zeros(1,N);
h3(4) = 1;

irs2(1,1,:) = h1;
irs2(2,1,:) = h3;
irs2(:,2,:) = irs2(:,1,:); %redundant second channel

conf.ir.interpolationmethod = 'simple';
h_int2_simple = interpolate_ir(irs2,weights,conf);
conf.ir.interpolationmethod = 'freqdomain';
h_int2_fd = interpolate_ir(irs2,weights,conf);
conf.ir.interpolationmethod = 'timedomain';
h_int2_td = interpolate_ir(irs2,weights,conf);

% 3. Interpolate between neighbouring Dirac impulses in middle of impulse response
h4 = zeros(1,N);
h4(25) = 1;
h5 = zeros(1,N);
h5(26) = 1;

irs3(1,1,:) = h4;
irs3(2,1,:) = h5;
irs3(:,2,:) = irs3(:,1,:);

conf.ir.interpolationmethod = 'simple';
h_int3_simple = interpolate_ir(irs3,weights,conf);
conf.ir.interpolationmethod = 'freqdomain';
h_int3_fd = interpolate_ir(irs3,weights,conf);
conf.ir.interpolationmethod = 'timedomain';
h_int3_td = interpolate_ir(irs3,weights,conf);

% Plots
% impulse responses
ir_list = {
    irs1(1,1,:)         , irs2(1,1,:)          , irs3(1,1,:)
    irs1(2,1,:)         , irs2(2,1,:)          , irs3(2,1,:)
    h_int1_simple(1,1,:), h_int2_simple(1,1,:) , h_int3_simple(1,1,:)
    h_int1_fd(1,1,:)    , h_int2_fd(1,1,:)     , h_int3_fd(1,1,:)
    h_int1_td(1,1,:)    , h_int2_td(1,1,:)     , h_int3_td(1,1,:)
    };  % list of IRs

col = {'k' 'b' 'r' 'm' 'c'};

titlelabels = {
    'Interpolation between Dirac impulses with one sample in between'
    'Interpolation of neighbouring Dirac impulses at impulse response start'
    'Interpolation of neighbouring Dirac impulses in middle of impulse response'
    };

t = 0:N-1;  % time-axis in samples

for cdx=1:size(ir_list,2)
    figure
    for rdx=1:size(ir_list,1)
        plot(t,squeeze(ir_list{rdx, cdx}), col{rdx})
        hold on
    end
    hold off
    grid
    xlabel('samples')
    ylabel('amplitude')
    legend('h_1','h_2','simple interp','freqdomain interp','timedomain interp')
    title(titlelabels{cdx})
end

%% ===== Interpolate HRIRs ===============================================
% 1. Interpolate between close HRIRs
idx0 = 181; %index for 0° azimuth
idx1 = 182; %index for 1° azimuth
idx2 = 183; %index for 2° azimuth
x0_close = [hrtf.SourcePosition(idx0,:).' hrtf.SourcePosition(idx2,:).']/180*pi;
% weights (for target point: xs_close = hrtf.SourcePosition(idx1,:).'/180*pi )
weights_close = [.5; .5];
hrir_close = [hrtf.Data.IR(idx0,:,:); hrtf.Data.IR(idx2,:,:)];
hrir_close_ref = hrtf.Data.IR(idx1,:,:);

conf.ir.interpolationmethod = 'simple';
hrir_close_simple = interpolate_ir(hrir_close,weights_close,conf);
conf.ir.interpolationmethod = 'freqdomain';
hrir_close_fd = interpolate_ir(hrir_close,weights_close,conf);
conf.ir.interpolationmethod = 'timedomain';
hrir_close_td = interpolate_ir(hrir_close,weights_close,conf);

% 2. Interpolate between distant HRIRs
idx0 = 181; %index for 0° azimuth
idx30 = 211; %index for 30° azimuth
idx60 = 241; %index for 60° azimuth
x0_dist = [hrtf.SourcePosition(idx0,:).' hrtf.SourcePosition(idx60,:).']/180*pi;
% weights (for target point: xs_dist = hrtf.SourcePosition(idx30,:).'/180*pi )
weights_dist = [.5; .5];
hrir_dist = [hrtf.Data.IR(idx0,:,:); hrtf.Data.IR(idx60,:,:)];
hrir_dist_ref = hrtf.Data.IR(idx30,:,:);

conf.ir.interpolationmethod = 'simple';
hrir_dist_simple = interpolate_ir(hrir_dist,weights_dist,conf);
conf.ir.interpolationmethod = 'freqdomain';
hrir_dist_fd = interpolate_ir(hrir_dist,weights_dist,conf);
conf.ir.interpolationmethod = 'timedomain';
hrir_dist_td = interpolate_ir(hrir_dist,weights_dist,conf);

% Plots
hrir_list = {
    hrir_close(1,1,:)       , hrir_dist(1,1,:)
    hrir_close(2,1,:)       , hrir_dist(2,1,:)
    hrir_close_ref(1,1,:)   , hrir_dist_ref(1,1,:)
    hrir_close_simple(1,1,:), hrir_dist_simple(1,1,:)
    hrir_close_fd(1,1,:)    , hrir_dist_fd(1,1,:)
    hrir_close_td(1,1,:)    , hrir_dist_td(1,1,:)
    };  % list of HRIRs

col = {'k' 'b' 'g' 'r' 'm' 'c'};
titlelabels = {'close', 'distant'};
legendpos = {'northeast', 'southwest'};

t = 0:hrtf.API.N-1;  % time-axis in samples
f = (0:hrtf.API.N-1)/hrtf.API.N*hrtf.Data.SamplingRate;  % frequency axis

for pdx=1:2  % impulse responses or magnitude spectrum
    for cdx=1:size(hrir_list,2)
        figure
        for rdx=1:size(hrir_list,1)
            if pdx == 1
                % impulse responses
                plot(t,squeeze(hrir_list{rdx, cdx}),col{rdx})
            else
                % magnitude spectra
                mag_spectrum = db(abs(fft(squeeze(hrir_list{rdx, cdx}))));
                semilogx(f(2:end), mag_spectrum(2:end), col{rdx});
            end
            hold on
        end
        hold off

        if pdx == 1
            % impulse responses
            xlabel('samples')
            ylabel('amplitude')
            axis([0 160 -0.6 0.6])
        else
            % magnitude spectra
            xlabel('frequency in Hz')
            ylabel('amplitude in dB')
            axis([f(2) hrtf.Data.SamplingRate/2 -60 20])
        end
        legend('hrir_1','hrir_2','hrir_{ref}','simple interp', ...
            'freqdomain interp', 'timedomain interp','Location', legendpos{pdx})
        title(['Interpolation of ' titlelabels{cdx} ' HRIRs'])
    end
end

status = true;


text: source for the yrvote.click website


text:
layout:     post
title:      "A little about this site."
subtitle:   "The purpose and the technology."
date:       2015-02-05 12:00:00
author:     "Steven Young"
header-img: "img/post-bg-03.jpg"
---

# The Purpose
This site will serve as my professional website. I am going to keep it updated with my current research information.

# The Blog
The blog will not be updated frequently. It will be used to provide information about any news concerning me, any professional events I attend, etc.

# The Technology
The site is developed using Jekyll, is hosted using github pages, and uses [this template](https://github.com/IronSummitMedia/startbootstrap-clean-blog) as a starting point.


text:
/**General**/
@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Regular.woff") format('woff'),
		 url("../fonts/Roboto-Regular.ttf") format('ttf');
}
body{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;max-width:2000px;margin: 0 auto;}
.form-group{margin-bottom:11px;}
#page-content {
	padding-bottom:50px;
}
body{
    overflow-y: scroll;
}
.btn{margin: 2px 0;}
/*
#page-wrapper a[target=_blank]::after {
    content:"\f08e";
	position:relative;
	font:normal normal normal 10px/1 FontAwesome;
	top:-3px;
	left:3px;
	margin-right:5px;
}
*/
/* fixed brand icon */
@media (min-width: 768px){
	.navbar-brand{position:fixed}
}

/*mobile nav*/
@media (max-width: 768px){
	.navbar-toggle{position:fixed;right:0px;}
	#main-nav{position:fixed;right:-200px;}
}
.navbar-toggle .icon-bar {
  background-color:#4c4c4c !important;
  width: 22px;
  transition: all 0.2s;
}
.navbar-toggle .top-bar {
  transform: rotate(45deg);
  transform-origin: 10% 10%;
}
.navbar-toggle .middle-bar {
  opacity: 0;
}
.navbar-toggle .bottom-bar {
  transform: rotate(-45deg);
  transform-origin: 10% 90%;
}
.navbar-toggle.closed .top-bar {
  transform: rotate(0);
}
.navbar-toggle.closed .middle-bar {
  opacity: 1;
}
.navbar-toggle.closed .bottom-bar {
  transform: rotate(0);
}

/*editor changes*/
[id^=editor_container] h3{margin-top:10px;}
[id^=editor_container] .well{margin-bottom:9px;border:none;background-color:white;box-shadow:none;}
[id^=editor_container] label{padding-left:0px !important; padding-right:0px !important;}
.ltd{width:auto;text-align:left;white-space:nowrap;vertical-align:middle !important;padding:6px !important;}
.itd{width:100%;padding:6px !important;}
table.input-group{width:100%}
@media (max-width: 767px) {.ltd{white-space:normal;}}

/*icon spacing*/
.fa-fw{margin-right:5px;}

/*table*/
table.borderless td,table.borderless th{border: none !important;}
.borderless {margin-bottom:0px}
table label{margin:0}

/*Header*/
.navbar-brand{padding: 5px;padding-left:20px;height:60px;}
.sidebar{margin-top:62px;padding-top:20px;}
.dropdown{font-size:18px;}
@media (max-width: 767px) {.sidebar{margin-top:0px;padding-top:0px !important;}}
.page-header{margin-top:15px;}

/*Panels*/
.panel-heading{font-size:18px;}
.headcollapse{cursor:pointer;}
.headcollapse a:hover{text-decoration:none;}
.panel-default{
	background-color:#fff !important;
	border-color:#d0d0d0 !important;
}
.panel-default>.panel-heading{
	background-color:#f3f3f3 !important;
	border-color:#ddd !important;
}

/*remote page*/
@media (max-width: 500px) {.ssthead th:nth-child(1), .sstbody td:nth-child(1){display:none}}

/*Dashboard*/
.component-on{color:green;}
.component-off{color:grey;}
#dash_news hr{margin:10px 0}

/*Colorpicker 2x*/
.colorpicker-2x {z-index:99999}
.colorpicker-2x .colorpicker-saturation {width: 200px;height: 200px;}
.colorpicker-2x .colorpicker-hue,.colorpicker-2x .colorpicker-alpha {width: 30px;height: 200px;}
.colorpicker-2x .colorpicker-color,.colorpicker-2x .colorpicker-color div {height: 30px;}

/*Hint*/
.info-hint{
	background-color:rgb(236,236,236);
	border-radius:10px;
}
.intro-hint{
	padding:8px 8px 8px 14px;
	margin:0px 0px 15px 0px;
	border-left:8px solid #0088cc;
	border-top:1px solid #0088cc;
	box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25);
	font-size:97%;
}

/*Support page*/
.unlink,.unlink:hover{color:#333;text-decoration:none;}
.support-container ul{padding-left:0px;list-style-type: none;}
.support-container{text-align: center;margin-top:15px;color:#333;}
.support-container .fa{line-height:58px;font-size:40px;width:100px;height:100px;padding:20px;border-radius: 120px;border: 1px solid;transition: background-color 0.5s linear, color 0.5s linear;}
.support-container h4{margin-top:13px;}
.support-container:hover .bg-color-fb{background-color:#3b5998;color:white;}
.support-container:hover .bg-color-tw{background-color:#1da1f2; color:white;}
.support-container:hover .bg-color-g{background-color:#cc181e; color:white;}
.support-container:hover .bg-color-wf{background-color:#0088cc; color:white;}
.support-container:hover .bg-color-btc{background-color:#f7931a; color:white;}
.support-container:hover .bg-color-pp{background-color:#0070ba; color:white;}
.support-container:hover .bg-color-am{background-color:#ef9c00; color:white;}
.support-container:hover .bg-color-ig{background-color:#ab3392; color:white;}

/*Config introduction*/
.introd h4{padding-left:14px;border-left:5px solid #0088cc;}

/*backported bootstrap 4 forms-label alignment*/
.col-form-label {
    padding-top: .5rem;
    padding-bottom: .5rem;
    margin-bottom: 0;
}

/*wizard button*/
.btn-wizard {
    color: #fff;
    background-color: #993399;
    border-color: #732673;
}
.btn-wizard:hover{
    color: #fff;
    background-color: #732673;
    border-color: #602060;
}
.btn-wizard:focus{
    color: #fff;
    background-color: #732673;
    border-color: #602060;
}

/*led preview & led visualisation*/
#leds_canvas {background-color:#AAAAAA; position:absolute; margin:15px; background-image:url(/img/hyperion/hyperionlogo.png); background-repeat:no-repeat; background-position: center;}
.led { display:inline-block; border: 1px solid black; position:absolute; opacity:0.8; text-align:center; vertical-align:middle; padding:4px;  border-radius:2px;}
.led_num, .led_prev_num {display:none; position:relative; color:black; background-color: white; border-radius:2px; padding:1px; vertical-align:middle; text-align:center;  font-size:0.8em;}
.led_ex{height:15px;width:25px;border-radius:3px;display:inline-block;border:1px solid black}

/*checklists*/
.checklist{list-style-type:none;padding-left:0px}
.checklist li::before{content: "\f00c";font: normal normal normal 14px/1 FontAwesome;margin-right:5px;color:green;font-size:19px}

/*Modal icons*/
[class*="modal-icon"]{
	padding:30px;
	border-radius: 60px;
	color:white;
	font-size:50px !important;
}
.modal-icon-check{
	background-color:#71c341;
}
.modal-icon-warning{
	background-color:#f7c44a;
}
.modal-icon-error{
	background-color:#d1322e;
}

.overlay {
	background-image: url('/img/hyperion/hyperionwhitelogo.png');
	background-repeat: no-repeat;
	background-position: center center;
	background-color: rgba(1, 1, 1, 0.7);
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	top: 0;
	z-index:99999;
}

/*simple ripple effect for li a and btn*/
.btn, li a{
  position: relative;
  overflow: hidden;
}
.btn:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #000 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}
.btn:active:after {
  transform: scale(0, 0);
  opacity: .2;
  transition: 0s;
}

li a:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #000 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}
li a:active:after {
  transform: scale(0, 0);
  opacity: .2;
  transition: 0s;
}

/*Bootstrap callouts*/
.bs-callout {
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #eee;
    border-left-width: 5px;
    border-radius: 3px;
}
.bs-callout h4 {
    margin-top: 0;
    margin-bottom: 5px;
}
.bs-callout p:last-child {
    margin-bottom: 0;
}
.bs-callout code {
    border-radius: 3px;
}
.bs-callout+.bs-callout {
    margin-top: -5px;
}
.bs-callout-default {
    border-left-color: #777;
}
.bs-callout-default h4 {
    color: #777;
}
.bs-callout-primary {
    border-left-color: #428bca;
}
.bs-callout-primary h4 {
    color: #428bca;
}
.bs-callout-success {
    border-left-color: #5cb85c;
}
.bs-callout-success h4 {
    color: #5cb85c;
}
.bs-callout-danger {
    border-left-color: #d9534f;
}
.bs-callout-danger h4 {
    color: #d9534f;
}
.bs-callout-warning {
    border-left-color: #f0ad4e;
}
.bs-callout-warning h4 {
    color: #f0ad4e;
}
.bs-callout-info {
    border-left-color: #5bc0de;
}
.bs-callout-info h4 {
    color: #5bc0de;
}
.bs-callout-wizard {
    border-left-color: #993399;
}
.bs-callout-wizard h4 {
    color: #993399;
}

/**add a dditional width defintion for bootstrap**/
@media (min-width: 1500px) {
  .col-xxl-1, .col-xxl-2, .col-xxl-3, .col-xxl-4, .col-xxl-5, .col-xxl-6, .col-xxl-7, .col-xxl-8, .col-xxl-9, .col-xxl-10, .col-xxl-11, .col-xxl-12 {
    float: left;
	padding-left:15px;
	padding-right:15px;
  }
  .col-xxl-12 {
    width: 100%;
  }
  .col-xxl-11 {
    width: 91.66666667%;
  }
  .col-xxl-10 {
    width: 83.33333333%;
  }
  .col-xxl-9 {
    width: 75%;
  }
  .col-xxl-8 {
    width: 66.66666667%;
  }
  .col-xxl-7 {
    width: 58.33333333%;
  }
  .col-xxl-6 {
    width: 50%;
  }
  .col-xxl-5 {
    width: 41.66666667%;
  }
  .col-xxl-4 {
    width: 33.33333333%;
  }
  .col-xxl-3 {
    width: 25%;
  }
  .col-xxl-2 {
    width: 16.66666667%;
  }
  .col-xxl-1 {
    width: 8.33333333%;
  }
  .col-xxl-pull-12 {
    right: 100%;
  }
  .col-xxl-pull-11 {
    right: 91.66666667%;
  }
  .col-xxl-pull-10 {
    right: 83.33333333%;
  }
  .col-xxl-pull-9 {
    right: 75%;
  }
  .col-xxl-pull-8 {
    right: 66.66666667%;
  }
  .col-xxl-pull-7 {
    right: 58.33333333%;
  }
  .col-xxl-pull-6 {
    right: 50%;
  }
  .col-xxl-pull-5 {
    right: 41.66666667%;
  }
  .col-xxl-pull-4 {
    right: 33.33333333%;
  }
  .col-xxl-pull-3 {
    right: 25%;
  }
  .col-xxl-pull-2 {
    right: 16.66666667%;
  }
  .col-xxl-pull-1 {
    right: 8.33333333%;
  }
  .col-xxl-pull-0 {
    right: auto;
  }
  .col-xxl-push-12 {
    left: 100%;
  }
  .col-xxl-push-11 {
    left: 91.66666667%;
  }
  .col-xxl-push-10 {
    left: 83.33333333%;
  }
  .col-xxl-push-9 {
    left: 75%;
  }
  .col-xxl-push-8 {
    left: 66.66666667%;
  }
  .col-xxl-push-7 {
    left: 58.33333333%;
  }
  .col-xxl-push-6 {
    left: 50%;
  }
  .col-xxl-push-5 {
    left: 41.66666667%;
  }
  .col-xxl-push-4 {
    left: 33.33333333%;
  }
  .col-xxl-push-3 {
    left: 25%;
  }
  .col-xxl-push-2 {
    left: 16.66666667%;
  }
  .col-xxl-push-1 {
    left: 8.33333333%;
  }
  .col-xxl-push-0 {
    left: auto;
  }
  .col-xxl-offset-12 {
    margin-left: 100%;
  }
  .col-xxl-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-xxl-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-xxl-offset-9 {
    margin-left: 75%;
  }
  .col-xxl-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-xxl-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-xxl-offset-6 {
    margin-left: 50%;
  }
  .col-xxl-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-xxl-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-xxl-offset-3 {
    margin-left: 25%;
  }
  .col-xxl-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-xxl-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-xxl-offset-0 {
    margin-left: 0;
  }
}

/* drag and resizable modal http://gijgo.com/ */
.gj-button {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #000;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
}

.gj-unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.gj-margin-left-5 {
    margin-left: 5px;
}

.gj-margin-left-10 {
    margin-left: 10px;
}

.gj-width-full {
    width: 100%;
}

.gj-cursor-pointer {
    cursor: pointer;
}

.gj-text-align-center {
    text-align: center;
}

.gj-font-size-16 {
    font-size: 16px;
}

.gj-hidden {
    display: none;
}

.gj-mdl-icon-plus::after {
    content: "\E145";
}

.gj-mdl-icon-minus::after {
    content: "\E15B";
}

.gj-draggable {
    cursor: move;
}
.gj-resizable-handle {
    position: absolute;
    font-size: 0.1px;
    display: block;
    -ms-touch-action: none;
    touch-action: none;
    z-index: 90;
}

.gj-resizable-n {
    cursor: n-resize;
    height: 7px;
    width: 100%;
    top: -5px;
    left: 0;
}
.gj-resizable-e {
    cursor: e-resize;
    width: 7px;
    right: -5px;
    top: 0;
    height: 100%;
}
.gj-resizable-s {
    cursor: s-resize;
    height: 7px;
    width: 100%;
    bottom: -5px;
    left: 0;
}
.gj-resizable-w {
	cursor: w-resize;
	width: 7px;
	left: -5px;
	top: 0;
	height: 100%;
}
.gj-resizable-se {
	cursor: se-resize;
	width: 12px;
	height: 12px;
	right: 1px;
	bottom: 1px;
}
.gj-resizable-sw {
	cursor: sw-resize;
	width: 9px;
	height: 9px;
	left: -5px;
	bottom: -5px;
}
.gj-resizable-nw {
	cursor: nw-resize;
	width: 9px;
	height: 9px;
	left: -5px;
	top: -5px;
}
.gj-resizable-ne {
	cursor: ne-resize;
	width: 9px;
	height: 9px;
	right: -5px;
	top: -5px;
}

.gj-dialog-footer {
    position: absolute;
    bottom: 0px;
    width: 100%;
    margin-top: 0px;
}

.gj-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: none;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    outline: 0;
}

.gj-content {
    border: 1px solid #999;
    background-color: #fff;
    border-radius: 6px;
    outline: 0;
}

.gj-header {
    min-height: 16.43px;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.gj-footer {
    min-height: 16.43px;
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.gj-title {
    margin: 2px;
}

.gj-close {
    -webkit-appearance: none;
    padding: 0;
    cursor: pointer;
    background: 0 0;
    border: 0;
    float: right;
    font-size: 21px;
    color: #000;
}

.gj-body {
    position: relative;
    padding: 15px;
}

/*https://github.com/flatlogic/awesome-bootstrap-checkbox slighty edited for our purposes*/
.checkbox {
  height:34px;
  padding-left: 20px;
  padding-top:2px !important;
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}
.checkbox label {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  padding-left: 5px;
}
.checkbox label::before {
  content: "";
  display: inline-block;
  position: absolute;
  width: 25px;
  height: 25px;
  left: 0;
  margin-left: -20px;
  border: 1px solid #cccccc;
  border-radius: 3px;
  background-color: #fff;
  -webkit-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
  -o-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
  transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
}
.checkbox label::after {
  display: inline-block;
  position: absolute;
  width: 25px;
  height: 25px;
  left: 0;
  top: 0;
  margin-left: -20px;
  padding-left: 3px;
  padding-top: 1px;
  font-size: 18px;
  color: #555555;
}
.checkbox input[type="checkbox"],
.checkbox input[type="radio"] {
  opacity: 0;
  z-index: 1;
  width:25px !important;
  height:25px;
  margin-top:0px !important;
  cursor:pointer;
}
.checkbox input[type="checkbox"]:focus + label::before,
.checkbox input[type="radio"]:focus + label::before {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.checkbox input[type="checkbox"]:checked + label::after,
.checkbox input[type="radio"]:checked + label::after {
  font-family: "FontAwesome";
  content: "\f00c";
}
.checkbox input[type="checkbox"]:indeterminate + label::after,
.checkbox input[type="radio"]:indeterminate + label::after {
  display: block;
  content: "";
  width: 10px;
  height: 3px;
  background-color: #555555;
  border-radius: 2px;
  margin-left: -16.5px;
  margin-top: 7px;
}
.checkbox input[type="checkbox"]:disabled + label,
.checkbox input[type="radio"]:disabled + label {
  opacity: 0.65;
}
.checkbox input[type="checkbox"]:disabled + label::before,
.checkbox input[type="radio"]:disabled + label::before {
  background-color: #eeeeee;
  cursor: not-allowed;
}
.checkbox.checkbox-circle label::before {
  border-radius: 50%;
}
.checkbox.checkbox-inline {
  margin-top: 0;
}

.checkbox-primary input[type="checkbox"]:checked + label::before,
.checkbox-primary input[type="radio"]:checked + label::before {
  background-color: #337ab7;
  border-color: #337ab7;
}
.checkbox-primary input[type="checkbox"]:checked + label::after,
.checkbox-primary input[type="radio"]:checked + label::after {
  color: #fff;
}

.checkbox-danger input[type="checkbox"]:checked + label::before,
.checkbox-danger input[type="radio"]:checked + label::before {
  background-color: #d9534f;
  border-color: #d9534f;
}
.checkbox-danger input[type="checkbox"]:checked + label::after,
.checkbox-danger input[type="radio"]:checked + label::after {
  color: #fff;
}

.checkbox-info input[type="checkbox"]:checked + label::before,
.checkbox-info input[type="radio"]:checked + label::before {
  background-color: #5bc0de;
  border-color: #5bc0de;
}
.checkbox-info input[type="checkbox"]:checked + label::after,
.checkbox-info input[type="radio"]:checked + label::after {
  color: #fff;
}

.checkbox-warning input[type="checkbox"]:checked + label::before,
.checkbox-warning input[type="radio"]:checked + label::before {
  background-color: #f0ad4e;
  border-color: #f0ad4e;
}
.checkbox-warning input[type="checkbox"]:checked + label::after,
.checkbox-warning input[type="radio"]:checked + label::after {
  color: #fff;
}

.checkbox-success input[type="checkbox"]:checked + label::before,
.checkbox-success input[type="radio"]:checked + label::before {
  background-color: #5cb85c;
  border-color: #5cb85c;
}
.checkbox-success input[type="checkbox"]:checked + label::after,
.checkbox-success input[type="radio"]:checked + label::after {
  color: #fff;
}

.checkbox-primary input[type="checkbox"]:indeterminate + label::before,
.checkbox-primary input[type="radio"]:indeterminate + label::before {
  background-color: #337ab7;
  border-color: #337ab7;
}

.checkbox-primary input[type="checkbox"]:indeterminate + label::after,
.checkbox-primary input[type="radio"]:indeterminate + label::after {
  background-color: #fff;
}

.checkbox-danger input[type="checkbox"]:indeterminate + label::before,
.checkbox-danger input[type="radio"]:indeterminate + label::before {
  background-color: #d9534f;
  border-color: #d9534f;
}

.checkbox-danger input[type="checkbox"]:indeterminate + label::after,
.checkbox-danger input[type="radio"]:indeterminate + label::after {
  background-color: #fff;
}

.checkbox-info input[type="checkbox"]:indeterminate + label::before,
.checkbox-info input[type="radio"]:indeterminate + label::before {
  background-color: #5bc0de;
  border-color: #5bc0de;
}

.checkbox-info input[type="checkbox"]:indeterminate + label::after,
.checkbox-info input[type="radio"]:indeterminate + label::after {
  background-color: #fff;
}

.checkbox-warning input[type="checkbox"]:indeterminate + label::before,
.checkbox-warning input[type="radio"]:indeterminate + label::before {
  background-color: #f0ad4e;
  border-color: #f0ad4e;
}

.checkbox-warning input[type="checkbox"]:indeterminate + label::after,
.checkbox-warning input[type="radio"]:indeterminate + label::after {
  background-color: #fff;
}

.checkbox-success input[type="checkbox"]:indeterminate + label::before,
.checkbox-success input[type="radio"]:indeterminate + label::before {
  background-color: #5cb85c;
  border-color: #5cb85c;
}

.checkbox-success input[type="checkbox"]:indeterminate + label::after,
.checkbox-success input[type="radio"]:indeterminate + label::after {
  background-color: #fff;
}

.radio {
  padding-left: 20px;
}
.radio label {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  padding-left: 5px;
}
.radio label::before {
  content: "";
  display: inline-block;
  position: absolute;
  width: 17px;
  height: 17px;
  left: 0;
  margin-left: -20px;
  border: 1px solid #cccccc;
  border-radius: 50%;
  background-color: #fff;
  -webkit-transition: border 0.15s ease-in-out;
  -o-transition: border 0.15s ease-in-out;
  transition: border 0.15s ease-in-out;
}
.radio label::after {
  display: inline-block;
  position: absolute;
  content: " ";
  width: 11px;
  height: 11px;
  left: 3px;
  top: 3px;
  margin-left: -20px;
  border-radius: 50%;
  background-color: #555555;
  -webkit-transform: scale(0, 0);
  -ms-transform: scale(0, 0);
  -o-transform: scale(0, 0);
  transform: scale(0, 0);
  -webkit-transition: -webkit-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
  -moz-transition: -moz-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
  -o-transition: -o-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
  transition: transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
}
.radio input[type="radio"] {
  opacity: 0;
  z-index: 1;
}
.radio input[type="radio"]:focus + label::before {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.radio input[type="radio"]:checked + label::after {
  -webkit-transform: scale(1, 1);
  -ms-transform: scale(1, 1);
  -o-transform: scale(1, 1);
  transform: scale(1, 1);
}
.radio input[type="radio"]:disabled + label {
  opacity: 0.65;
}
.radio input[type="radio"]:disabled + label::before {
  cursor: not-allowed;
}
.radio.radio-inline {
  margin-top: 0;
}

.radio-primary input[type="radio"] + label::after {
  background-color: #337ab7;
}
.radio-primary input[type="radio"]:checked + label::before {
  border-color: #337ab7;
}
.radio-primary input[type="radio"]:checked + label::after {
  background-color: #337ab7;
}

.radio-danger input[type="radio"] + label::after {
  background-color: #d9534f;
}
.radio-danger input[type="radio"]:checked + label::before {
  border-color: #d9534f;
}
.radio-danger input[type="radio"]:checked + label::after {
  background-color: #d9534f;
}

.radio-info input[type="radio"] + label::after {
  background-color: #5bc0de;
}
.radio-info input[type="radio"]:checked + label::before {
  border-color: #5bc0de;
}
.radio-info input[type="radio"]:checked + label::after {
  background-color: #5bc0de;
}

.radio-warning input[type="radio"] + label::after {
  background-color: #f0ad4e;
}
.radio-warning input[type="radio"]:checked + label::before {
  border-color: #f0ad4e;
}
.radio-warning input[type="radio"]:checked + label::after {
  background-color: #f0ad4e;
}

.radio-success input[type="radio"] + label::after {
  background-color: #5cb85c;
}
.radio-success input[type="radio"]:checked + label::before {
  border-color: #5cb85c;
}
.radio-success input[type="radio"]:checked + label::after {
  background-color: #5cb85c;
}

input[type="checkbox"].styled:checked + label:after,
input[type="radio"].styled:checked + label:after {
  font-family: 'FontAwesome';
  content: "\f00c";
}
input[type="checkbox"] .styled:checked + label::before,
input[type="radio"] .styled:checked + label::before {
  color: #fff;
}
input[type="checkbox"] .styled:checked + label::after,
input[type="radio"] .styled:checked + label::after {
  color: #fff;
}


text:
package com.amazonaws.services.ec2.model;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * Container for the parameters to the {@link com.amazonaws.services.ec2.AmazonEC2#describeReservedInstances(DescribeReservedInstancesRequest) DescribeReservedInstances operation}.
 *

 * The DescribeReservedInstances operation describes Reserved Instances that were purchased for use with your account.
 *

 *
 * @see com.amazonaws.services.ec2.AmazonEC2#describeReservedInstances(DescribeReservedInstancesRequest)
 */
public class DescribeReservedInstancesRequest extends AmazonWebServiceRequest {

    /**
     * The optional list of Reserved Instance IDs to describe.
     */
    private java.util.List<String> reservedInstancesIds;

    /**
     * A list of filters used to match properties for ReservedInstances. For
     * a complete reference to the available filter keys for this operation,
     * see the Amazon
     * EC2 API reference.
     */
    private java.util.List<Filter> filters;

    /**
     * The Reserved Instance offering type.
     */
    private String offeringType;

    /**
     * The optional list of Reserved Instance IDs to describe.
     *
     * @return The optional list of Reserved Instance IDs to describe.
     */
    public java.util.List<String> getReservedInstancesIds() {

        if (reservedInstancesIds == null) {
            reservedInstancesIds = new java.util.ArrayList<String>();
        }
        return reservedInstancesIds;
    }

    /**
     * The optional list of Reserved Instance IDs to describe.
     *
     * @param reservedInstancesIds The optional list of Reserved Instance IDs to describe.
     */
    public void setReservedInstancesIds(java.util.Collection<String> reservedInstancesIds) {
        if (reservedInstancesIds == null) {
            this.reservedInstancesIds = null;
            return;
        }

        java.util.List<String> reservedInstancesIdsCopy = new java.util.ArrayList<String>(reservedInstancesIds.size());
        reservedInstancesIdsCopy.addAll(reservedInstancesIds);
        this.reservedInstancesIds = reservedInstancesIdsCopy;
    }

    /**
     * The optional list of Reserved Instance IDs to describe.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param reservedInstancesIds The optional list of Reserved Instance IDs to describe.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReservedInstancesRequest withReservedInstancesIds(String... reservedInstancesIds) {
        if (getReservedInstancesIds() == null) setReservedInstancesIds(new java.util.ArrayList<String>(reservedInstancesIds.length));
        for (String value : reservedInstancesIds) {
            getReservedInstancesIds().add(value);
        }
        return this;
    }

    /**
     * The optional list of Reserved Instance IDs to describe.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param reservedInstancesIds The optional list of Reserved Instance IDs to describe.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReservedInstancesRequest withReservedInstancesIds(java.util.Collection<String> reservedInstancesIds) {
        if (reservedInstancesIds == null) {
            this.reservedInstancesIds = null;
        } else {
            java.util.List<String> reservedInstancesIdsCopy = new java.util.ArrayList<String>(reservedInstancesIds.size());
            reservedInstancesIdsCopy.addAll(reservedInstancesIds);
            this.reservedInstancesIds = reservedInstancesIdsCopy;
        }

        return this;
    }

    /**
     * A list of filters used to match properties for ReservedInstances. For
     * a complete reference to the available filter keys for this operation,
     * see the Amazon
     * EC2 API reference.
     *
     * @return A list of filters used to match properties for ReservedInstances. For
     *         a complete reference to the available filter keys for this operation,
     *         see the Amazon
     *         EC2 API reference.
     */
    public java.util.List<Filter> getFilters() {

        if (filters == null) {
            filters = new java.util.ArrayList<Filter>();
        }
        return filters;
    }

    /**
     * A list of filters used to match properties for ReservedInstances. For
     * a complete reference to the available filter keys for this operation,
     * see the Amazon
     * EC2 API reference.
     *
     * @param filters A list of filters used to match properties for ReservedInstances. For
     *         a complete reference to the available filter keys for this operation,
     *         see the Amazon
     *         EC2 API reference.
     */
    public void setFilters(java.util.Collection<Filter> filters) {
        if (filters == null) {
            this.filters = null;
            return;
        }

        java.util.List<Filter> filtersCopy = new java.util.ArrayList<Filter>(filters.size());
        filtersCopy.addAll(filters);
        this.filters = filtersCopy;
    }

    /**
     * A list of filters used to match properties for ReservedInstances. For
     * a complete reference to the available filter keys for this operation,
     * see the Amazon
     * EC2 API reference.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param filters A list of filters used to match properties for ReservedInstances. For
     *         a complete reference to the available filter keys for this operation,
     *         see the Amazon
     *         EC2 API reference.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReservedInstancesRequest withFilters(Filter... filters) {
        if (getFilters() == null) setFilters(new java.util.ArrayList<Filter>(filters.length));
        for (Filter value : filters) {
            getFilters().add(value);
        }
        return this;
    }

    /**
     * A list of filters used to match properties for ReservedInstances. For
     * a complete reference to the available filter keys for this operation,
     * see the Amazon
     * EC2 API reference.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param filters A list of filters used to match properties for ReservedInstances. For
     *         a complete reference to the available filter keys for this operation,
     *         see the Amazon
     *         EC2 API reference.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReservedInstancesRequest withFilters(java.util.Collection<Filter> filters) {
        if (filters == null) {
            this.filters = null;
        } else {
            java.util.List<Filter> filtersCopy = new java.util.ArrayList<Filter>(filters.size());
            filtersCopy.addAll(filters);
            this.filters = filtersCopy;
        }

        return this;
    }

    /**
     * The Reserved Instance offering type.
     *
     * @return The Reserved Instance offering type.
     */
    public String getOfferingType() {
        return offeringType;
    }

    /**
     * The Reserved Instance offering type.
     *
     * @param offeringType The Reserved Instance offering type.
     */
    public void setOfferingType(String offeringType) {
        this.offeringType = offeringType;
    }

    /**
     * The Reserved Instance offering type.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param offeringType The Reserved Instance offering type.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReservedInstancesRequest withOfferingType(String offeringType) {
        this.offeringType = offeringType;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (reservedInstancesIds != null) sb.append("ReservedInstancesIds: " + reservedInstancesIds + ", ");
        if (filters != null) sb.append("Filters: " + filters + ", ");
        if (offeringType != null) sb.append("OfferingType: " + offeringType + ", ");
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getReservedInstancesIds() == null) ? 0 : getReservedInstancesIds().hashCode());
        hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
        hashCode = prime * hashCode + ((getOfferingType() == null) ? 0 : getOfferingType().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;

        if (obj instanceof DescribeReservedInstancesRequest == false) return false;
        DescribeReservedInstancesRequest other = (DescribeReservedInstancesRequest)obj;

        if (other.getReservedInstancesIds() == null ^ this.getReservedInstancesIds() == null) return false;
        if (other.getReservedInstancesIds() != null && other.getReservedInstancesIds().equals(this.getReservedInstancesIds()) == false) return false;
        if (other.getFilters() == null ^ this.getFilters() == null) return false;
        if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false) return false;
        if (other.getOfferingType() == null ^ this.getOfferingType() == null) return false;
        if (other.getOfferingType() != null && other.getOfferingType().equals(this.getOfferingType()) == false) return false;
        return true;
    }

}


text:
#ifndef _SUDOKU_FUNCTIONS
#define _SUDOKU_FUNCTIONS

#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;

void PlaceNumberInCell( int grid[3][3], int row, int column, int number );
bool CellIsTaken( int grid[3][3], int row, int column );
void ResetGrid( int grid[3][3] );
bool NumberAlreadyUsed( int grid[3][3], int number );
bool AllCellsTaken( int grid[3][3] );
int GetUserInput( int min, int max );
int GetRow();
int GetColumn();
int GetNumber();

/* PRE-WRITTEN FUNCTION **************************************/

void DisplayHeader();
void SetRandom( int grid[3][3], int randomCount );
void DisplayGrid( int grid[3][3] );

#endif


text:
def hi(name)
  message = "Hello " + name + "!"
  return message
end

puts hi("George")


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.datastore.v1.model;

/**
 * A filter that merges multiple other filters using the given operator.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Datastore API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class CompositeFilter extends com.google.api.client.json.GenericJson {

  /**
   * The list of filters to combine. Must contain at least one filter.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Filter> filters;

  /**
   * The operator for combining multiple filters.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String op;

  /**
   * The list of filters to combine. Must contain at least one filter.
   * @return value or {@code null} for none
   */
  public java.util.List<Filter> getFilters() {
    return filters;
  }

  /**
   * The list of filters to combine. Must contain at least one filter.
   * @param filters filters or {@code null} for none
   */
  public CompositeFilter setFilters(java.util.List<Filter> filters) {
    this.filters = filters;
    return this;
  }

  /**
   * The operator for combining multiple filters.
   * @return value or {@code null} for none
   */
  public java.lang.String getOp() {
    return op;
  }

  /**
   * The operator for combining multiple filters.
   * @param op op or {@code null} for none
   */
  public CompositeFilter setOp(java.lang.String op) {
    this.op = op;
    return this;
  }

  @Override
  public CompositeFilter set(String fieldName, Object value) {
    return (CompositeFilter) super.set(fieldName, value);
  }

  @Override
  public CompositeFilter clone() {
    return (CompositeFilter) super.clone();
  }

}


text:
package org.apache.hadoop.fs.aliyun.oss;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.contract.ContractTestUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;

import java.io.IOException;

import static org.apache.hadoop.fs.aliyun.oss.Constants.BUFFER_DIR_KEY;
import static org.apache.hadoop.fs.aliyun.oss.Constants.MULTIPART_UPLOAD_PART_SIZE_DEFAULT;
import static org.apache.hadoop.fs.aliyun.oss.Constants.MULTIPART_UPLOAD_PART_SIZE_KEY;
import static org.apache.hadoop.fs.contract.ContractTestUtils.IO_CHUNK_BUFFER_SIZE;
import static org.junit.Assert.assertEquals;

/**
 * Tests regular and multi-part upload functionality for
 * AliyunOSSBlockOutputStream.
 */
public class TestAliyunOSSBlockOutputStream {
  private FileSystem fs;
  private static final int PART_SIZE = 1024 * 1024;
  private static String testRootPath =
      AliyunOSSTestUtils.generateUniqueTestPath();

  @Rule
  public Timeout testTimeout = new Timeout(30 * 60 * 1000);

  @Before
  public void setUp() throws Exception {
    Configuration conf = new Configuration();
    conf.setInt(MULTIPART_UPLOAD_PART_SIZE_KEY, PART_SIZE);
    conf.setInt(IO_CHUNK_BUFFER_SIZE,
        conf.getInt(MULTIPART_UPLOAD_PART_SIZE_KEY, 0));
    conf.setInt(Constants.UPLOAD_ACTIVE_BLOCKS_KEY, 20);
    fs = AliyunOSSTestUtils.createTestFileSystem(conf);
  }

  @After
  public void tearDown() throws Exception {
    if (fs != null) {
      fs.delete(new Path(testRootPath), true);
    }
  }

  private Path getTestPath() {
    return new Path(testRootPath + "/test-aliyun-oss");
  }

  @Test
  public void testZeroByteUpload() throws IOException {
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), 0);
    bufferDirShouldEmpty();
  }

  @Test
  public void testRegularUpload() throws IOException {
    FileSystem.clearStatistics();
    long size = 1024 * 1024;
    FileSystem.Statistics statistics =
        FileSystem.getStatistics("oss", AliyunOSSFileSystem.class);
    // This test is a little complicated for statistics, lifecycle is
    // generateTestFile
    //   fs.create(getFileStatus)    read 1
    //   output stream write         write 1
    // path exists(fs.exists)        read 1
    // verifyReceivedData
    //   fs.open(getFileStatus)      read 1
    //   input stream read           read 2(part size is 512K)
    // fs.delete
    //   getFileStatus & delete & exists & create fake dir read 2, write 2
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size - 1);
    assertEquals(7, statistics.getReadOps());
    assertEquals(size - 1, statistics.getBytesRead());
    assertEquals(3, statistics.getWriteOps());
    assertEquals(size - 1, statistics.getBytesWritten());

    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size);
    assertEquals(14, statistics.getReadOps());
    assertEquals(2 * size - 1, statistics.getBytesRead());
    assertEquals(6, statistics.getWriteOps());
    assertEquals(2 * size - 1, statistics.getBytesWritten());

    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size + 1);

    assertEquals(22, statistics.getReadOps());
    assertEquals(3 * size, statistics.getBytesRead());
    assertEquals(10, statistics.getWriteOps());
    assertEquals(3 * size, statistics.getBytesWritten());
    bufferDirShouldEmpty();
  }

  @Test
  public void testMultiPartUpload() throws IOException {
    long size = 6 * 1024 * 1024;
    FileSystem.clearStatistics();
    FileSystem.Statistics statistics =
        FileSystem.getStatistics("oss", AliyunOSSFileSystem.class);
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size - 1);
    assertEquals(17, statistics.getReadOps());
    assertEquals(size - 1, statistics.getBytesRead());
    assertEquals(8, statistics.getWriteOps());
    assertEquals(size - 1, statistics.getBytesWritten());

    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size);
    assertEquals(34, statistics.getReadOps());
    assertEquals(2 * size - 1, statistics.getBytesRead());
    assertEquals(16, statistics.getWriteOps());
    assertEquals(2 * size - 1, statistics.getBytesWritten());

    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size + 1);
    assertEquals(52, statistics.getReadOps());
    assertEquals(3 * size, statistics.getBytesRead());
    assertEquals(25, statistics.getWriteOps());
    assertEquals(3 * size, statistics.getBytesWritten());
    bufferDirShouldEmpty();
  }

  @Test
  public void testMultiPartUploadConcurrent() throws IOException {
    FileSystem.clearStatistics();
    long size = 50 * 1024 * 1024 - 1;
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size);
    FileSystem.Statistics statistics =
        FileSystem.getStatistics("oss", AliyunOSSFileSystem.class);
    assertEquals(105, statistics.getReadOps());
    assertEquals(size, statistics.getBytesRead());
    assertEquals(52, statistics.getWriteOps());
    assertEquals(size, statistics.getBytesWritten());
    bufferDirShouldEmpty();
  }

  @Test
  public void testHugeUpload() throws IOException {
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), PART_SIZE - 1);
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), PART_SIZE);
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(),
        MULTIPART_UPLOAD_PART_SIZE_DEFAULT + 1);
    bufferDirShouldEmpty();
  }

  @Test
  public void testMultiPartUploadLimit() throws IOException {
    long partSize1 = AliyunOSSUtils.calculatePartSize(10 * 1024, 100 * 1024);
    assert(10 * 1024 / partSize1 < Constants.MULTIPART_UPLOAD_PART_NUM_LIMIT);

    long partSize2 = AliyunOSSUtils.calculatePartSize(200 * 1024, 100 * 1024);
    assert(200 * 1024 / partSize2 < Constants.MULTIPART_UPLOAD_PART_NUM_LIMIT);

    long partSize3 = AliyunOSSUtils.calculatePartSize(10000 * 100 * 1024,
        100 * 1024);
    assert(10000 * 100 * 1024 / partSize3
        < Constants.MULTIPART_UPLOAD_PART_NUM_LIMIT);

    long partSize4 = AliyunOSSUtils.calculatePartSize(10001 * 100 * 1024,
        100 * 1024);
    assert(10001 * 100 * 1024 / partSize4
        < Constants.MULTIPART_UPLOAD_PART_NUM_LIMIT);
  }

  @Test
  /**
   * This test is used to verify HADOOP-16306.
   * Test small file uploading so that oss fs will upload file directly
   * instead of multi part upload.
   */
  public void testSmallUpload() throws IOException {
    long size = fs.getConf().getInt(MULTIPART_UPLOAD_PART_SIZE_KEY, 1024);
    ContractTestUtils.createAndVerifyFile(fs, getTestPath(), size - 1);
    bufferDirShouldEmpty();
  }

  private void bufferDirShouldEmpty() throws IOException {
    Path bufferPath = new Path(fs.getConf().get(BUFFER_DIR_KEY));
    FileStatus[] files = bufferPath.getFileSystem(
        fs.getConf()).listStatus(bufferPath);
    // Temporary file should be deleted
    assertEquals(0, files.length);
  }
}


text:
"use strict";

S.newClass = require("es6like-class").newClass;
require("springbokjs-utils/string/html");
require("springbokjs-utils/string/normalize");

Object.assign(S, require("springbokjs-models"));
Object.assign(S, require("springbokjs-dom-components"));
Object.assign(S, require("./base"));

"t tC url connected user".split(" ").forEach(function (key) {
    S.Component.prototype[key] = S.View.prototype[key] = function () {
        return this.helper[key].apply(this.helper, arguments);
    };
});

S.newController = function (descriptor) {
    descriptor["static"] = descriptor["static"] || {};
    descriptor["static"].singleton = false;
    descriptor["extends"] = descriptor["extends"] || S.Controller;
    return S.newClass(descriptor);
};
//# sourceMappingURL=index.js.map


text:
namespace Microsoft.Azure.Management.Automation
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// AutomationAccountOperations operations.
    /// </summary>
    public partial interface IAutomationAccountOperations
    {
        /// <summary>
        /// Update an automation account.
        /// <see href="http://aka.ms/azureautomationsdk/automationaccountoperations" />
        /// </summary>
        /// <param name='resourceGroupName'>
        /// The resource group name.
        /// </param>
        /// <param name='automationAccountName'>
        /// Automation account name.
        /// </param>
        /// <param name='parameters'>
        /// Parameters supplied to the update automation account.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<AutomationAccount>> UpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, AutomationAccountUpdateParameters parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Create or update automation account.
        /// <see href="http://aka.ms/azureautomationsdk/automationaccountoperations" />
        /// </summary>
        /// <param name='resourceGroupName'>
        /// The resource group name.
        /// </param>
        /// <param name='automationAccountName'>
        /// Parameters supplied to the create or update automation account.
        /// </param>
        /// <param name='parameters'>
        /// Parameters supplied to the create or update automation account.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<AutomationAccount>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, AutomationAccountCreateOrUpdateParameters parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Delete an automation account.
        /// <see href="http://aka.ms/azureautomationsdk/automationaccountoperations" />
        /// </summary>
        /// <param name='resourceGroupName'>
        /// The resource group name.
        /// </param>
        /// <param name='automationAccountName'>
        /// Automation account name.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Get information about an Automation Account.
        /// <see href="http://aka.ms/azureautomationsdk/automationaccountoperations" />
        /// </summary>
        /// <param name='resourceGroupName'>
        /// The resource group name.
        /// </param>
        /// <param name='automationAccountName'>
        /// The automation account name.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<AutomationAccount>> GetWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Retrieve a list of accounts within a given resource group.
        /// <see href="http://aka.ms/azureautomationsdk/automationaccountoperations" />
        /// </summary>
        /// <param name='resourceGroupName'>
        /// The resource group name.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<IPage<AutomationAccount>>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Lists the Automation Accounts within an Azure subscription.
        /// </summary>
        /// <remarks>
        /// Retrieve a list of accounts within a given subscription.
        /// </remarks>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<IPage<AutomationAccount>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Retrieve a list of accounts within a given resource group.
        /// <see href="http://aka.ms/azureautomationsdk/automationaccountoperations" />
        /// </summary>
        /// <param name='nextPageLink'>
        /// The NextLink from the previous successful call to List operation.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<IPage<AutomationAccount>>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Lists the Automation Accounts within an Azure subscription.
        /// </summary>
        /// <remarks>
        /// Retrieve a list of accounts within a given subscription.
        /// </remarks>
        /// <param name='nextPageLink'>
        /// The NextLink from the previous successful call to List operation.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<IPage<AutomationAccount>>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
    }
}


text:
drop database Forum;
drop database SignalRMessaging;
drop database Archive;
drop database EncryptionSettings;
drop database AuditLog;
drop trigger safety_database on all server
drop trigger insert_encryption_trigger on all server

----------------------------------------------------------------------
-- Table Nuke
----------------------------------------------------------------------

----------------------------------------------------------------------
-- Procedure Nuke
----------------------------------------------------------------------


text:
package org.finos.waltz.service.report_grid;

import org.jooq.lambda.tuple.Tuple2;
import org.junit.jupiter.api.Test;

import java.util.List;

import static org.finos.waltz.service.report_grid.ReportGridUtilities.parseTableData;
import static org.junit.jupiter.api.Assertions.*;

public class ReportGridUtilitiesTest {

    private static final String HEADER_TEXT = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |";
    private static final String FILTER_INFO_TEXT = "| Filter Column | Filter Operator | Value/s |";

    private final String TEST_STRING = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |\n" +
            "| --- | --- | --- | --- |\n" +
            "| `Grid Name` | `{GRIDEXTID}` | `ORG_UNIT` | `1` |\n" +
            "\n" +
            "\n" +
            "| Filter Column | Filter Operator | Value/s |\n" +
            "| --- | --- |\n" +
            "| `Asset Kind/Application` | `CONTAINS_ANY_OPTION` | `PROVIDED` |\n" +
            "| `Developer` | `CONTAINS_ANY_OPTION` | `PROVIDED` |";

    private final String NO_SPACED_TABLES = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |\n" +
            "| --- | --- | --- | --- |\n" +
            "| `Grid Name` | `{GRIDEXTID}` | `ORG_UNIT` | `1` |\n" +
            "| Filter Column | Filter Operator | Value/s |\n" +
            "| --- | --- |\n" +
            "| `Asset Kind/Application` | `CONTAINS_ANY_OPTION` | `PROVIDED` |\n" +
            "| `Developer` | `CONTAINS_ANY_OPTION` | `PROVIDED` |";

    private final String TOO_MANY_HEADERS = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |\n" +
            "| --- | --- | --- | --- |\n" +
            "| `Grid Name` | `{GRIDEXTID}` | `ORG_UNIT` | `1` | `12` |\n" +
            "| Filter Column | Filter Operator | Value/s |\n" +
            "| --- | --- |\n" +
            "| `Asset Kind/Application` | `CONTAINS_ANY_OPTION` | `PROVIDED` |\n" +
            "| `Developer` | `CONTAINS_ANY_OPTION` | `PROVIDED` |";

    private final String NOT_ENOUGH_HEADERS = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |\n" +
            "| --- | --- | --- | --- |\n" +
            "| `Grid Name` | `{GRIDEXTID}` |\n" +
            "| Filter Column | Filter Operator | Value/s |\n" +
            "| --- | --- |\n" +
            "| `Asset Kind/Application` | `CONTAINS_ANY_OPTION` | `PROVIDED` |\n" +
            "| `Developer` | `CONTAINS_ANY_OPTION` | `PROVIDED` |";

    private final String TOO_MANY_FILTER_COLS = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |\n" +
            "| --- | --- | --- | --- |\n" +
            "| `Grid Name` | `{GRIDEXTID}` | `ORG_UNIT` | `1` |\n" +
            "| Filter Column | Filter Operator | Value/s |\n" +
            "| --- | --- |\n" +
            "| `Asset Kind/Application` | `CONTAINS_ANY_OPTION` | `PROVIDED` |\n" +
            "| `Developer` | `CONTAINS_ANY_OPTION` | `PROVIDED` | `PROVIDED`";

    private final String NOT_ENOUGH_FILTER_COLS = "| Grid Name | Grid Identifier | Vantage Point Kind | Vantage Point Id |\n" +
            "| --- | --- | --- | --- |\n" +
            "| `Grid Name` | `{GRIDEXTID}` | `ORG_UNIT` | `1` |\n" +
            "| Filter Column | Filter Operator | Value/s |\n" +
            "| --- | --- |\n" +
            "|` Asset Kind/Application` | `PROVIDED` |\n" +
            "| `Developer` |";

    private final String[] TEST_STRING_ARRAY = TEST_STRING.split("\\r?\\n");

    @Test
    public void emptyStringReturnsNull() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(""));
    }

    @Test
    public void nullStringReturnsNull() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(null));
    }

    @Test
    public void parseEmptyTextShouldReturnEmptyList() {
        List<List<String>> cellList = parseTableData(null, HEADER_TEXT);
        assertEquals(0, cellList.size());
    }

    @Test
    public void parseNullTextShouldReturnEmptyList() {
        List<List<String>> cellList = parseTableData(null, HEADER_TEXT);
        assertEquals(0, cellList.size());
    }

    @Test
    public void parseNoteTextForHeaderShouldReturnOnlyOneRow() {
        List<List<String>> cellList = parseTableData(TEST_STRING_ARRAY, HEADER_TEXT);
        assertEquals(1, cellList.size());
    }

    @Test
    public void parseNoteTextForFiltersShouldReturnTwoRows() {
        List<List<String>> cellList = parseTableData(TEST_STRING_ARRAY, FILTER_INFO_TEXT);
        assertEquals(2, cellList.size());
    }

    @Test
    public void parseNoteTextShouldHaveFourFieldsInGridInfoRow() {
        Tuple2<List<String>, List<List<String>>> noteText = ReportGridUtilities.parseGridFilterNoteText(TEST_STRING);
        assertEquals(4, noteText.v1.size(), "Should have four fields of grid info in header row");
    }

    @Test
    public void parseNoteTextShouldHaveTwoFieldsInGridInfoRow() {
        Tuple2<List<String>, List<List<String>>> noteText = ReportGridUtilities.parseGridFilterNoteText(TEST_STRING);
        assertEquals(3, noteText.v2.get(0).size(), "Should have two fields in each filter info row");
    }

    @Test
    public void parseNoteTextShouldThrowErrorIfTablesNotCorrectlySpaced() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(NO_SPACED_TABLES),
                "Should ensure tables are correctly spaced");
    }

    @Test
    public void parseNoteTextShouldThrowErrorIfTooManyHeaderColumns() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(TOO_MANY_HEADERS),
                "Should be 4 header columns");
    }

    @Test
    public void parseNoteTextShouldThrowErrorIfNotEnoughHeaderColumns() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(NOT_ENOUGH_HEADERS),
                "Should be 4 header columns");
    }

    @Test
    public void parseNoteTextShouldThrowErrorIfTooManyFilterOptionColumns() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(TOO_MANY_FILTER_COLS),
                "Should be 4 filter columns");
    }

    @Test
    public void parseNoteTextShouldThrowErrorIfNotEnoughFilterOptionColumns() {
        assertThrows(
                IllegalStateException.class,
                () -> ReportGridUtilities.parseGridFilterNoteText(NOT_ENOUGH_FILTER_COLS),
                "Should be 4 filter columns");
    }
}


text:
package homepage.core.events;

public class DeletedEvent {
	protected boolean entityFound = true;

	public boolean isEntityFound() {
		return entityFound;
	}
}


text:
Sorry, the service is unavailable

The submit an employment intermediary report service has closed.

Contact us if you need to speak to someone about the service and your reports.

Telephone:

      03000 555 995

Opening times:

      Monday to Friday: 8:30am to 4:30pm