text:
package com.google.j2cl.jre.java.lang;

import static com.google.j2cl.jre.testing.TestUtils.isWasm;

import com.google.gwt.junit.client.GWTTestCase;
import java.util.Arrays;

/**
 * Tests java.lang.System.
 */
public class SystemTest extends GWTTestCase {

  private static class Bar extends Foo {
    public Bar() {
    }
  }

  private enum EnumImpl implements Interfaz {
    FOO,
    BAR,
    BAZ
  }

  private static class Foo {
    public Foo() {
    }
  }

  private interface Interfaz {
  }

  private static class InterfazImpl implements Interfaz {

    private final String data;

    /**
     * @param data non-null string
     */
    InterfazImpl(String data) {
      this.data = data;
    }

    @Override
    public boolean equals(Object obj) {
      return (obj instanceof InterfazImpl) && ((InterfazImpl) obj).data.equals(
          data);
    }

    @Override
    public int hashCode() {
      return data.hashCode();
    }

    @Override
    public String toString() {
      return "InterfazImpl[data=" + data + "]";
    }
  }

  @Override
  public String getModuleName() {
    return "com.google.gwt.emultest.EmulSuite";
  }

  public void testArraycopyEnumToInterface() {
    EnumImpl[] src = new EnumImpl[]{ EnumImpl.FOO, null, EnumImpl.BAZ };
    Interfaz[] dest = new Interfaz[5];
    Arrays.fill(dest, null);  // undefined != null, weird.

    System.arraycopy(src, 0, dest, 1, 3);
    assertEquals(
        Arrays.asList(null, EnumImpl.FOO, null, EnumImpl.BAZ, null),
        Arrays.asList(dest));
  }

  public void testArraycopyEnumToObject() {
    EnumImpl[] src = new EnumImpl[]{ EnumImpl.FOO, null, EnumImpl.BAZ };
    Object[] dest = new Object[5];
    Arrays.fill(dest, null);  // undefined != null, weird.

    System.arraycopy(src, 0, dest, 1, 3);
    assertEquals(
        Arrays.asList(null, EnumImpl.FOO, null, EnumImpl.BAZ, null),
        Arrays.asList(dest));
  }

  public void testArraycopyFailures() {
    int[] src = new int[4];
    int[] dest = new int[] {1, 1, 1, 1};
    double[] destDouble = new double[4];
    String[] strings = new String[4];
    try {
      System.arraycopy(src, 5, dest, 0, 7);
      fail("Should have thrown IndexOutOfBoundsException: src past end");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
      System.arraycopy(src, 0, dest, 5, 7);
      fail("Should have thrown IndexOutOfBoundsException: dest past end");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
      System.arraycopy(src, -1, dest, 0, 4);
      fail("Should have thrown IndexOutOfBoundsException: src ofs negative");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
      System.arraycopy(src, 0, dest, -1, 4);
      fail("Should have thrown IndexOutOfBoundsException: dest ofs negative");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
      System.arraycopy(src, 0, dest, 0, -1);
      fail("Should have thrown IndexOutOfBoundsException: negative length");
    } catch (IndexOutOfBoundsException e) {
    }
    try {
      System.arraycopy("test", 0, dest, 0, 4);
      fail("Should have thrown ArrayStoreException: src not array");
    } catch (ArrayStoreException e) {
    }
    try {
      System.arraycopy(src, 0, "test", 0, 4);
      fail("Should have thrown ArrayStoreException: dest not array");
    } catch (ArrayStoreException e) {
    }
    try {
      System.arraycopy(src, 0, destDouble, 0, 4);
      fail("Should have thrown ArrayStoreException: different primitive types");
    } catch (ArrayStoreException e) {
    }
    try {
      System.arraycopy(strings, 0, dest, 0, 4);
      fail("Should have thrown ArrayStoreException: reference/primitive mismatch");
    } catch (ArrayStoreException e) {
    }
    try {
      System.arraycopy(src, 0, strings, 0, 4);
      fail("Should have thrown ArrayStoreException: primitive/reference mismatch");
    } catch (ArrayStoreException e) {
    }
  }

  public void testArraycopyInterfaceToObject() {
    Interfaz[] src = new Interfaz[]{
        new InterfazImpl("foo"), null, new InterfazImpl("bar") };
    Object[] dest = new Object[5];
    Arrays.fill(dest, null);  // undefined != null, weird.

    System.arraycopy(src, 0, dest, 1, 3);
    assertEquals(Arrays.asList(null, new InterfazImpl("foo"), null,
        new InterfazImpl("bar"), null), Arrays.asList(dest));
  }

  public static void testArraycopyMultidim() {
    Object[][] objArray = new Object[1][1];
    String[][] strArray = new String[1][1];
    strArray[0][0] = "Test";
    Integer[][] intArray = new Integer[1][1];
    intArray[0][0] = new Integer(1);
    System.arraycopy(strArray, 0, objArray, 0, 1);
    assertEquals("Test", objArray[0][0]);

    if (isWasm()) {
      // TODO(b/184675805): Re-enable when Array store checks added.
      return;
    }

    try {
      System.arraycopy(strArray, 0, intArray, 0, 1);
      fail("Should have thrown ArrayStoreException: incompatible multidimensional arrays");
    } catch (ArrayStoreException e) {
    }
    try {
      System.arraycopy(new String[] {"T2"}, 0, objArray, 0, 1);
      fail("Should have thrown ArrayStoreException: store string array in multi-dim Object array");
    } catch (ArrayStoreException e) {
    }
  }

  public void testArraycopyNulls() {
    int[] src = new int[4];
    int[] dest = new int[] {1, 1, 1, 1};
    try {
      System.arraycopy(null, 0, dest, 0, 4);
      fail("Should have thrown NullPointerException: src null");
    } catch (NullPointerException e) {
      // verify dest unchanged
      for (int i = 0; i < dest.length; ++i) {
        assertEquals(1, dest[i]);
      }
    }
    try {
      System.arraycopy(src, 0, null, 0, 4);
      fail("Should have thrown NullPointerException: dest null");
    } catch (NullPointerException e) {
    }
  }

  public static void testArraycopyObjects() {
    Foo[] fooArray = new Foo[4];
    Bar[] barArray = new Bar[4];
    Object[] src = new Object[] {new Bar(), new Bar(), new Foo(), new Bar()};
    System.arraycopy(src, 0, fooArray, 0, src.length);
    for (int i = 0; i < src.length; ++i) {
      assertEquals(src[i], fooArray[i]);
    }

    if (isWasm()) {
      // TODO(b/184675805): Re-enable when Array store checks added.
      return;
    }

    try {
      System.arraycopy(src, 0, barArray, 0, 4);
      fail("Should have thrown ArrayStoreException: foo into bar");
    } catch (ArrayStoreException e) {
      // verify we changed only up to the element causing the exception
      assertEquals(src[0], barArray[0]);
      assertEquals(src[1], barArray[1]);
      assertNull(barArray[2]);
      assertNull(barArray[3]);
    }
  }

  public void testArraycopyOverlap() {
    int[] intArray = new int[] {0, 1, 2, 3};
    String[] strArray = new String[] {"0", "1", "2", "3"};

    System.arraycopy(intArray, 0, intArray, 1, intArray.length - 1);
    assertEquals(0, intArray[0]);
    for (int i = 1; i < intArray.length; ++i) {
      assertEquals("rev int copy index " + i, i - 1, intArray[i]);
    }
    System.arraycopy(intArray, 1, intArray, 0, intArray.length - 1);
    for (int i = 0; i < intArray.length - 1; ++i) {
      assertEquals("fwd int copy index " + i, i, intArray[i]);
    }
    assertEquals("fwd int copy index " + (intArray.length - 2),
        intArray.length - 2, intArray[intArray.length - 1]);
    System.arraycopy(strArray, 0, strArray, 1, strArray.length - 1);
    assertEquals(0, Integer.valueOf(strArray[0]).intValue());
    for (int i = 1; i < strArray.length; ++i) {
      assertEquals("rev str copy index " + i, i - 1, Integer.valueOf(
          strArray[i]).intValue());
    }
    System.arraycopy(strArray, 1, strArray, 0, strArray.length - 1);
    for (int i = 0; i < strArray.length - 1; ++i) {
      assertEquals("fwd str copy index " + i, i, Integer.valueOf(
          strArray[i]).intValue());
    }
    assertEquals("fwd str copy index " + (strArray.length - 2),
        strArray.length - 2,
        Integer.valueOf(strArray[strArray.length - 1]).intValue());
    /*
     * TODO(jat): how is it supposed to behave with overlapped copies if there
     * is a failure in the middle of the copy? We should figure that out and
     * test for it.
     */
  }

  public void testArraycopyPrimitives() {
    int[] src = new int[] {0, 1, 2, 3, 4, 5, 6, 7};
    int[] dest = new int[8];

    System.arraycopy(src, 0, dest, 0, src.length);
    for (int i = 0; i < src.length; ++i) {
      assertEquals(src[i], dest[i]);
    }
    System.arraycopy(src, 2, dest, 1, 5);
    assertEquals(0, dest[0]);
    for (int i = 1; i < 6; ++i) {
      assertEquals(src[i + 1], dest[i]);
    }
  }

  public void testArraycopyLargeArray() {
    char[] largeCharArrayValue = C.getLargeCharArrayValue();
    char[] charDest = new char[largeCharArrayValue.length];
    System.arraycopy(largeCharArrayValue, 0, charDest, 0, largeCharArrayValue.length);
    for (int i = 0; i < largeCharArrayValue.length; ++i) {
      assertEquals("index " + i, largeCharArrayValue[i], charDest[i]);
    }

    int offset = largeCharArrayValue.length / 2;
    char[] manyNulls = new char[offset / 2];
    System.arraycopy(manyNulls, 0, charDest, offset, manyNulls.length);
    assertEquals('f', charDest[offset - 1]);
    for (int i = offset; i < offset + manyNulls.length; ++i) {
      assertEquals("index " + i, '\0', charDest[i]);
    }
    assertEquals('a', charDest[offset + manyNulls.length]);
  }

  public void testIdentityHashCode() {
    String s = "str";
    assertEquals(System.identityHashCode(s), System.identityHashCode(s));

    Double d = 42d;
    assertEquals(System.identityHashCode(d), System.identityHashCode(d));

    Boolean b = true;
    assertEquals(System.identityHashCode(b), System.identityHashCode(b));

    Object o = new Object();
    assertEquals(System.identityHashCode(o), System.identityHashCode(o));
    assertNotSame(System.identityHashCode(o), System.identityHashCode(new Object()));
  }

  public void testNanoTime() {
    assertTrue(System.nanoTime() > 0);
  }

  public void testCurrentTimeMillis() {
    assertTrue(System.currentTimeMillis() > /* 1/1/2021 */ 1609488000000L);
  }
}


text:
#ifndef FSM11_THREADEDFUNCTIONSTATE_HPP
#define FSM11_THREADEDFUNCTIONSTATE_HPP

#include "statemachine_fwd.hpp"
#include "exitrequest.hpp"
#include "functionstate.hpp"

#ifdef FSM11_USE_WEOS
#include <weos/functional.hpp>
#include <weos/utility.hpp>
#include <weos/thread.hpp>
#else
#include <functional>
#include <utility>
#include <thread>
#endif // FSM11_USE_WEOS

namespace fsm11
{

struct invokeFunction_t {};
constexpr invokeFunction_t invokeFunction = invokeFunction_t();

template <typename TStateMachine>
class ThreadedFunctionState : public FunctionState<TStateMachine>
{
    using state_type = State<TStateMachine>;
    using base_type = FunctionState<TStateMachine>;
    using options = typename fsm11_detail::get_options<TStateMachine>::type;

public:
    using event_type = typename options::event_type;
    using function_type = std::function<void(event_type)>;
    using invoke_function_type = std::function<void(ExitRequest& exitRequest)>;
    using type = ThreadedFunctionState<TStateMachine>;

    explicit
    ThreadedFunctionState(const char* name, state_type* parent = nullptr)
        : base_type(name, parent)
    {
    }

    template <typename TEntry, typename TExit, typename TInvoke>
    ThreadedFunctionState(const char* name,
                          TEntry&& entryFn, TExit&& exitFn, TInvoke&& invokeFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    std::forward<TEntry>(entryFn),
                    std::forward<TEntry>(exitFn),
                    parent),
          m_invokeFunction(std::forward<TExit>(invokeFn))
    {
    }

    template <typename TEntry>
    ThreadedFunctionState(const char* name,
                          entryFunction_t, TEntry&& entryFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    std::forward<TEntry>(entryFn), nullptr,
                    parent)
    {
    }

    template <typename TExit>
    ThreadedFunctionState(const char* name,
                          exitFunction_t, TExit&& exitFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    nullptr, std::forward<TExit>(exitFn),
                    parent)
    {
    }

    template <typename TInvoke>
    ThreadedFunctionState(const char* name,
                          invokeFunction_t, TInvoke&& invokeFn,
                          state_type* parent = nullptr)
        : base_type(name, parent),
          m_invokeFunction(std::forward<TInvoke>(invokeFn))
    {
    }

    template <typename TEntry, typename TExit>
    ThreadedFunctionState(const char* name,
                          entryFunction_t, TEntry&& entryFn,
                          exitFunction_t, TExit&& exitFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    std::forward<TEntry>(entryFn),
                    std::forward<TEntry>(exitFn),
                    parent)
    {
    }

    template <typename TEntry, typename TInvoke>
    ThreadedFunctionState(const char* name,
                          entryFunction_t, TEntry&& entryFn,
                          invokeFunction_t, TInvoke&& invokeFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    std::forward<TEntry>(entryFn), nullptr,
                    parent),
          m_invokeFunction(std::forward<TInvoke>(invokeFn))
    {
    }

    template <typename TExit, typename TInvoke>
    ThreadedFunctionState(const char* name,
                          exitFunction_t, TExit&& exitFn,
                          invokeFunction_t, TInvoke&& invokeFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    nullptr, std::forward<TExit>(exitFn),
                    parent),
          m_invokeFunction(std::forward<TInvoke>(invokeFn))
    {
    }

    template <typename TEntry, typename TExit, typename TInvoke>
    ThreadedFunctionState(const char* name,
                          entryFunction_t, TEntry&& entryFn,
                          exitFunction_t, TExit&& exitFn,
                          invokeFunction_t, TInvoke&& invokeFn,
                          state_type* parent = nullptr)
        : base_type(name,
                    std::forward<TEntry>(entryFn),
                    std::forward<TEntry>(exitFn),
                    parent),
          m_invokeFunction(std::forward<TExit>(invokeFn))
    {
    }

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

    //! Returns the invoke function.
    const invoke_function_type& invokeFunction() const
    {
        return m_invokeFunction;
    }

    //! \brief Sets the invoke function.
    //!
    //! Sets the invoke function to \p fn.
    template <typename T>
    void setInvokeFunction(T&& fn)
    {
        m_invokeFunction = std::forward<T>(fn);
    }

    virtual
    void enterInvoke() override
    {
        m_exitRequest.m_mutex.lock();
        m_exitRequest.m_requested = false;
        m_exitRequest.m_mutex.unlock();

        m_exceptionPointer = nullptr;
#ifdef FSM11_USE_WEOS
        m_invokeThread = weos::thread(
                             m_invokeThreadAttributes,
                             &ThreadedFunctionState::invokeWrapper, this);
#else
        m_invokeThread = std::thread(
                             &ThreadedFunctionState::invokeWrapper, this);
#endif // FSM11_USE_WEOS
    }

    virtual
    std::exception_ptr exitInvoke() override
    {
        FSM11_ASSERT(m_invokeThread.joinable());

        m_exitRequest.m_mutex.lock();
        m_exitRequest.m_requested = true;
        m_exitRequest.m_mutex.unlock();
        m_exitRequest.m_cv.notify_one();

        m_invokeThread.join();
        return m_exceptionPointer;
    }

private:
#ifdef FSM11_USE_WEOS
    weos::thread_attributes m_invokeThreadAttributes;
    weos::thread m_invokeThread;
#else
    std::thread m_invokeThread;
#endif // FSM11_USE_WEOS

    std::exception_ptr m_exceptionPointer;
    ExitRequest m_exitRequest;

    invoke_function_type m_invokeFunction;

    void invokeWrapper()
    {
        try
        {
            if (m_invokeFunction)
                m_invokeFunction(m_exitRequest);
        }
        catch (...)
        {
            m_exceptionPointer = std::current_exception();
        }
    }
};

} // namespace fsm11

#endif // FSM11_THREADEDFUNCTIONSTATE_HPP

redpajama_set_name: RedPajamaGithub


text:
require 'spec_helper'

describe Question do
  describe 'user' do
    it { should_not have_valid(:user_id).when(nil, '') }
    it { should have_valid(:user_id).when(FactoryGirl.create(:user).id) }

    context 'with a private group' do
      before(:each) do
        @group = FactoryGirl.create(:group, :privacy => 'private')
      end

      it 'should be allowed to post' do
        user = FactoryGirl.create(:membership, :group => @group).user
        FactoryGirl.create(:question, :user => user, :group => @group).should be_valid
      end

      it 'should not be allowed to post' do
        user = FactoryGirl.create(:user)
        question = FactoryGirl.build(:question, :user => user, :group => @group)
        question.should_not be_valid
        question.errors[:user_id].should include('is not authorized')
      end
    end
  end

  describe 'subject' do
    it { should_not have_valid(:subject).when(nil, '') }
    it { should have_valid(:subject).when('hello world') }
  end

  describe 'group' do
    it { should_not have_valid(:group_id).when(nil, '') }
    it { should have_valid(:group_id).when(FactoryGirl.create(:group).id) }
  end

  describe 'url' do
    before(:each) do
      @question = FactoryGirl.create(:question, :subject => 'Am I wrong?')
    end

    it 'should be created from the name' do
      @question.url.should == 'am-i-wrong'
    end

    it 'should be unique (scoped to the group)' do
      question = FactoryGirl.create(:question, :subject => 'Am I wrong?', :group => @question.group)
      question.url.should == 'am-i-wrong-1'
    end

    it { should_not have_valid(:url).when(nil, '') }
    it { should_not have_valid(:url).when('am-i-wrong') }
  end

  describe 'solution' do
    it 'should return the correct answer' do
      question = FactoryGirl.create(:question)
      answer = FactoryGirl.create(:answer, :question => question)
      answer.update_attribute(:solution, true)
      question.solution.should == answer
    end

    it 'should not have a solution' do
      FactoryGirl.create(:question).solution.should be_nil
    end
  end

  describe 'participants' do
    before(:each) do
      @question = FactoryGirl.create(:question)
      @answer1 = FactoryGirl.create(:answer, :question => @question)
      @answer2 = FactoryGirl.create(:answer, :question => @question)
      @comment1 = FactoryGirl.create(:comment, :answer => @answer1)
      @comment2 = FactoryGirl.create(:comment, :answer => @answer2, :user => @question.user)
    end

    it 'should include the user who asked the question' do
      @question.participants.should include(@question.user)
    end

    it 'should include users who answered' do
      @question.participants.should include(@answer1.user)
      @question.participants.should include(@answer2.user)
    end

    it 'should include users who commented' do
      @question.participants.should include(@comment1.user)
      @question.participants.should include(@comment2.user)
    end

    it 'should not include duplicates' do
      @question.participants.should == @question.participants.uniq
    end
  end

  describe 'visibility' do
    before(:each) do
      @public_question = FactoryGirl.create(:question) # public
      @inaccessible_private_group = FactoryGirl.create(:private_group_with_questions, :questions_count => 1)
      @inaccessible_question = @inaccessible_private_group.questions.first
      @private_group = FactoryGirl.create(:private_group_with_questions, :questions_count => 1)
      @private_question = @private_group.questions.first
      @user = @private_question.user
    end

    it 'should show only questions in public groups' do
      questions = Question.public_questions
      questions.size.should == 1
      questions.should include(@public_question)
    end

    it 'should show only questions in private groups' do
      questions = Question.private_questions(@user)
      questions.size.should == 1
      questions.should include(@private_question)
    end

    it 'should show all questions visible to the user' do
      questions = Question.visible(@user)
      questions.size.should == 2
      questions.should include(@public_question)
      questions.should include(@private_question)
      questions.should_not include(@inaccessible_question)
    end

    it 'should allow scope chaining' do
      FactoryGirl.create(:answer, :question => @public_question)
      Question.visible(@user).answered.should include @public_question
    end
  end
end


text:
:+1: :tada: :sparkling_heart: Thanks for your interest! :sparkling_heart: :tada:
:+1:

## Tests

- Write a test for each use case.
- Try to stick to one assertion per use case.
- Too thorough is better than not thorough enough.


text:
package org.apache.ambari.server.state.theme;

import org.apache.ambari.server.state.ValueAttributesInfo;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import java.util.List;

@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ConfigCondition {
  @JsonProperty("configs")
  private List<String> configs;
  @JsonProperty("if")
  private String ifLabel;
  @JsonProperty("then")
  private ConfigConditionResult then;
  @JsonProperty("else")
  private ConfigConditionResult elseLabel;

  public List<String> getConfigs() {
    return configs;
  }

  public void setConfigs(List<String> configs) {
    this.configs = configs;
  }

  public String getIfLabel() {
    return ifLabel;
  }

  public void setIfLabel(String ifLabel) {
    this.ifLabel = ifLabel;
  }

  public ConfigConditionResult getThen() {
    return then;
  }

  public void setThen(ConfigConditionResult then) {
    this.then = then;
  }

  public ConfigConditionResult getElseLabel() {
    return elseLabel;
  }

  public void setElseLabel(ConfigConditionResult elseLabel) {
    this.elseLabel = elseLabel;
  }

  @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
  @JsonIgnoreProperties(ignoreUnknown = true)
  public class ConfigConditionResult {
    @JsonProperty("property_value_attributes")
    private ValueAttributesInfo propertyValueAttributes;

    public ValueAttributesInfo getPropertyValueAttributes() {
      return propertyValueAttributes;
    }

    public void setPropertyValueAttributes(ValueAttributesInfo propertyValueAttributes) {
      this.propertyValueAttributes = propertyValueAttributes;
    }
  }

}


text:
/**
 * Created by Liuxz on 2017/8/14.
 */
public class Leet326PowerOfThree {
    public static void main(String[] args){
        Leet326PowerOfThree xx = new Leet326PowerOfThree();
        xx.isPowerOfThree(3);
    }

    public boolean isPowerOfThree(int n) {
        return n > 0 && 1162261467 % n == 0;
    }
}


text:
{% extends "global/prototypes_base.html" %}

{% block page_title %}
  Signing the transfer | Create transfer
{% endblock %}

{% block head %}
  <link href="{{ prototypes_asset_path }}stylesheets/transfer.css" media="screen" rel="stylesheet" type="text/css">
{% endblock %}

{% block content %}

    {% include "includes/prototypes_banner.html" %}

Transfer deed

Please check all the details carefully before signing.

      {% include "transfer/partials/_transfer-summary-dynamic-v1.5.html" %}

The transferors agree to transfer ownership of the property to the transferees.

Transferors

            {% for seller in data.property.sellers %}

                  {{ seller }} has signed

            {% endfor %}

Transferees

            {% for buyer in data.buyers  %}

{{ buyer.name }} {% if role == "citizen" and buyer.isuser %}You{% endif %}

            {% endfor %}

      {% if role == "citizen" %}
      <form action="{{ next_page }}" method="get" class="form">

            <input id="check-1" type="checkbox" name="agree-execution">
            I have read and understood the information above

          <button type="submit" class="button">Sign this agreement</button>

      </form>
      {% else %}
      back to case list
      {% endif %}

{% endblock %}


text:
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>

#include <aws/sagemaker-runtime/SageMakerRuntimeClient.h>
#include <aws/sagemaker-runtime/SageMakerRuntimeEndpoint.h>
#include <aws/sagemaker-runtime/SageMakerRuntimeErrorMarshaller.h>
#include <aws/sagemaker-runtime/model/InvokeEndpointRequest.h>

using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::SageMakerRuntime;
using namespace Aws::SageMakerRuntime::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;

static const char* SERVICE_NAME = "sagemaker";
static const char* ALLOCATION_TAG = "SageMakerRuntimeClient";

SageMakerRuntimeClient::SageMakerRuntimeClient(const Client::ClientConfiguration& clientConfiguration) :
  BASECLASS(clientConfiguration,
    Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
        SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
    Aws::MakeShared<SageMakerRuntimeErrorMarshaller>(ALLOCATION_TAG)),
    m_executor(clientConfiguration.executor)
{
  init(clientConfiguration);
}

SageMakerRuntimeClient::SageMakerRuntimeClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
  BASECLASS(clientConfiguration,
    Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
         SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
    Aws::MakeShared<SageMakerRuntimeErrorMarshaller>(ALLOCATION_TAG)),
    m_executor(clientConfiguration.executor)
{
  init(clientConfiguration);
}

SageMakerRuntimeClient::SageMakerRuntimeClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
  const Client::ClientConfiguration& clientConfiguration) :
  BASECLASS(clientConfiguration,
    Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
         SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
    Aws::MakeShared<SageMakerRuntimeErrorMarshaller>(ALLOCATION_TAG)),
    m_executor(clientConfiguration.executor)
{
  init(clientConfiguration);
}

SageMakerRuntimeClient::~SageMakerRuntimeClient()
{
}

void SageMakerRuntimeClient::init(const ClientConfiguration& config)
{
  SetServiceClientName("SageMaker Runtime");
  m_configScheme = SchemeMapper::ToString(config.scheme);
  if (config.endpointOverride.empty())
  {
      m_uri = m_configScheme + "://" + SageMakerRuntimeEndpoint::ForRegion(config.region, config.useDualStack);
  }
  else
  {
      OverrideEndpoint(config.endpointOverride);
  }
}

void SageMakerRuntimeClient::OverrideEndpoint(const Aws::String& endpoint)
{
  if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
  {
      m_uri = endpoint;
  }
  else
  {
      m_uri = m_configScheme + "://" + endpoint;
  }
}

InvokeEndpointOutcome SageMakerRuntimeClient::InvokeEndpoint(const InvokeEndpointRequest& request) const
{
  if (!request.EndpointNameHasBeenSet())
  {
    AWS_LOGSTREAM_ERROR("InvokeEndpoint", "Required field: EndpointName, is not set");
    return InvokeEndpointOutcome(Aws::Client::AWSError<SageMakerRuntimeErrors>(SageMakerRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointName]", false));
  }
  Aws::Http::URI uri = m_uri;
  Aws::StringStream ss;
  ss << "/endpoints/";
  ss << request.GetEndpointName();
  ss << "/invocations";
  uri.SetPath(uri.GetPath() + ss.str());
  return InvokeEndpointOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_POST));
}

InvokeEndpointOutcomeCallable SageMakerRuntimeClient::InvokeEndpointCallable(const InvokeEndpointRequest& request) const
{
  auto task = Aws::MakeShared< std::packaged_task< InvokeEndpointOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->InvokeEndpoint(request); } );
  auto packagedFunction = [task]() { (*task)(); };
  m_executor->Submit(packagedFunction);
  return task->get_future();
}

void SageMakerRuntimeClient::InvokeEndpointAsync(const InvokeEndpointRequest& request, const InvokeEndpointResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
  m_executor->Submit( [this, request, handler, context](){ this->InvokeEndpointAsyncHelper( request, handler, context ); } );
}

void SageMakerRuntimeClient::InvokeEndpointAsyncHelper(const InvokeEndpointRequest& request, const InvokeEndpointResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
  handler(this, request, InvokeEndpoint(request), context);
}


text:
package com.downforce.teamcowboy.rest.response;

public class TeamColorSwatches {
    public ColorSwatch home;
    public ColorSwatch away;
    public ColorSwatch alternate;

    TeamColorSwatches() {}
}


text:
using System;
using Arch.CFX.AppInternals;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Arch.CFX.AppInternals.Components;
using Arch.CFX.Ioc;
using Arch.CFX.AppInternals.Manager.Components.Impl;
using System.Collections.Generic;
using Arch.CFX.AppInternals.Attributes;
using Arch.CFX.AppInternals.Utility;
using Arch.CFX.AppInternals.PayLoad;
using Arch.CFX.AppInternals.Handler;
using Arch.CFX.AppInternals.Service;
using Arch.CFX.AppInternals.Serialization;
using Arch.CFX.AppInternals.Permission;

namespace Arch.CFX.Test.Vi.Config
{
    [TestClass]
    public class ConfigBeanTest
    {
        [TestMethod]
        public void ConfigBeanHtmlTest()
        {
            bool success = false;
            try
            {
                IPayLoad pay = new ConfigBeanTestPayLoad();
                IHandler facade = VenusContainerLoader.Container.TryLookup(typeof(IHandler), pay.Controller) as IHandler;
                string result = facade.Process(pay);
                if (!string.IsNullOrEmpty(result))
                {
                    success = true;
                }
                else
                {
                    success = false;
                }
            }
            catch
            {
                success = false;
            }
            Assert.IsTrue(success);
        }

        [TestMethod]
        public void ConfigBeanXmlTest()
        {
            bool success = false;
            try
            {
                IPayLoad pay = new ConfigBeanXmlTestPayLoad();
                IHandler facade = VenusContainerLoader.Container.TryLookup(typeof(IHandler), pay.Controller) as IHandler;
                string result = facade.Process(pay);
                if (!string.IsNullOrEmpty(result))
                {
                    success = true;
                }
                else
                {
                    success = false;
                }
            }
            catch
            {
                success = false;
            }
            Assert.IsTrue(success);
        }

        [TestMethod]
        public void ConfigBeanJsonTest()
        {
            bool success = false;
            try
            {
                IPayLoad pay = new ConfigBeanJsonTestPayLoad();
                IHandler facade = VenusContainerLoader.Container.TryLookup(typeof(IHandler), pay.Controller) as IHandler;
                string result = facade.Process(pay);
                if (!string.IsNullOrEmpty(result))
                {
                    success = true;
                }
                else
                {
                    success = false;
                }
            }
            catch
            {
                success = false;
            }
            Assert.IsTrue(success);
        }
    }

    public class ConfigBeanTestPayLoad : ConfigurationPayLoad
    {
        public override string Controller { get { return "configuration"; } }

        public override string ID { get { return "fx-centralconfigbean"; } }

        public override string Query { get { return ""; } }

        public override string HostUrl { get { return ""; } }

        public override RenderType Type { get { return RenderType.Html; } }

        public override string AppPath { get { return "D:\\projects\\CFX\\Sample\\UrlTraceSample\\"; } }

        public override string TargetIP { get { return "127.0.0.1"; } }

        public override string UrlHost { get { return "localhost"; } }

        public override Uri RequestUrl { get { return null; } }

        public override string Action { get { return ""; } }

        public override string RawUrl { get { return "/vi"; } }

        public override string AbsoluteUri { get { return "/vi"; } }

        public override Dictionary<string, string> KeyValuePair
        {
            get
            {
                Dictionary<string, string> keys = new Dictionary<string, string>();
                keys["cmessaging_consumer_topiccount"] = "30000";
                return keys;
            }
        }

        public override string SearceKeys
        {
            get
            {
                return "";
            }
        }
    }

    public class ConfigBeanXmlTestPayLoad : ConfigBeanTestPayLoad
    {
        public override RenderType Type { get { return RenderType.Xml; } }
    }

    public class ConfigBeanJsonTestPayLoad : ConfigBeanTestPayLoad
    {
        public override RenderType Type { get { return RenderType.Json; } }
    }

}


text:
while read linea; do
curl --data $linea http://localhost:8080/usuarios
echo "Haciendo petición POST a http://localhost:8080/usuarios"
done < $1


text:
// Copyright (c) 2009-2021 The Regents of the University of Michigan
// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.

// Maintainer: joaander

#include "GlobalArray.h"
#include "HOOMDMath.h"

#include "Compute.h"
#include "Index1D.h"

#include <hoomd/extern/nano-signal-slot/nano_signal_slot.hpp>
#include <memory>

/*! \file CellList.h
    \brief Declares the CellList class
*/

#ifdef __HIPCC__
#error This header cannot be compiled by nvcc
#endif

#include <pybind11/pybind11.h>

#ifndef __CELLLIST_H__
#define __CELLLIST_H__

//! Computes a cell list from the particles in the system
/*! \b Overview:
    Cell lists are useful data structures when working with locality queries on particles. The most
   notable usage of cell lists in HOOMD is as an auxiliary data structure used when building the
   neighbor list. The data layout design decisions for CellList were made to optimize the
   performance of the neighbor list build as determined by microbenchmarking. However, CellList is
   written as generally as possible so that it can be used throughout the code in other locations
   where a cell list is needed.

    A cell list defines a set of cuboid cells that completely covers the simulation box. A single
   nominal width is given which is then rounded up to fit an integral number of cells across each
   dimension. A given particle belongs in one and only one cell, the one that contains the
   particle's x,y,z position.

    Data storage:

    All data is stored in GlobalArrays for access on the host and device, and concurrent access
   between GPUs.

     - The \c cell_size array lists the number of members in each cell.
     - The \c xyzf array contains Scalar4 elements each of which holds the x,y,z coordinates of the
   particle and a flag. That flag can optionally be the particle index, its charge, or its type.
     - The \c tdb array contains Scalar4 elements each of which holds the type, diameter, and body
   of the particle. It is only computed is requested to reduce the computation time when it is not
   needed.
     - The \c orientation array contains Scalar4 elements listing the orientation of each particle.
       It is only computed is requested to reduce the computation time when it is not needed.
     - The \c idx array contains unsigned int elements listing the index of each particle. It is
   useful when xyzf is set to hold type. It is only computed is requested to reduce the computation
   time when it is not needed.
     - The cell_adj array lists indices of adjacent cells. A specified radius (3,5,7,...) of cells
   is included in the list.

    A given cell cuboid with x,y,z indices of i,j,k has a unique cell index. This index can be
   obtained from the Index3D object returned by getCellIndexer() \code Index3D cell_indexer =
   cl->getCellIndexer(); cidx = cell_indexer(i,j,k); \endcode

    The other arrays are 2D (or 4D if you include i,j,k) in nature. They can be indexed with the
   appropriate Index2D from getCellListIndexer() or getCellAdjIndexer(). \code Index2D
   cell_list_indexer = cl->getCellListIndexer(); Index2D cell_adj_indexer = cl->getCellAdjIndexer();
    \endcode

     - cell_size[cidx] is the number of particles in the cell with index \c cidx
     - \c xyzf is Ncells x Nmax and xyzf[cell_list_indexer(offset,cidx)] is the data
   stored for particle \c offset in cell \c cidx (\c offset can vary from 0 to
   cell_size[cidx]-1)
     - \c tbd, idx, and orientation is structured identically to \c xyzf
     - cell_adj[cell_adj_indexer(offset,cidx)] is the cell index for neighboring cell
   \c offset to \c cidx. \c offset can vary from 0 to (radius*2+1)^3-1 (typically 26 with radius 1)

    Parameters:
     - \c width - minimum width of a cell in any x,y,z direction
     - \c radius - integer radius of cells to generate in \c cell_adj (1,2,3,4,...)
     - \c multiple - Round down to the nearest multiple number of cells in each direction (only
   applied to cells inside the domain, not the ghost cells).

    After a set call is made to adjust a parameter, changes do not take effect until the next call
   to compute().

    Overflow and error flag handling:
    For easy support of derived GPU classes to implement overflow detection and error handling, all
   error flags are stored in the GlobalArray \a d_conditions.
     - 0: Maximum cell size (implementations are free to write to this element only in overflow
   conditions if they choose.)
     - 1: Set to non-zero if any particle has nan coordinates
     - 2: Set to non-zero if any particle is outside of the addressable bins

    Condition flags are to be set during the computeCellList() call and will be checked by compute()
   which will then take the appropriate action. If possible, flags 1 and 2 should be set to the
   index of the particle causing the flag plus 1.
*/
class PYBIND11_EXPORT CellList : public Compute
    {
    public:
    //! Construct a cell list
    CellList(std::shared_ptr<SystemDefinition> sysdef);

    virtual ~CellList();

    //! \name Set parameters
    // @{

    //! Set the minimum cell width in any dimension
    void setNominalWidth(Scalar width)
        {
        m_nominal_width = width;
        m_params_changed = true;
        }

    //! Set the radius of cells to include in the adjacency list
    void setRadius(unsigned int radius)
        {
        m_radius = radius;
        m_params_changed = true;
        }

    //! Specify if the TDB cell list is to be computed
    void setComputeXYZF(bool compute_xyzf)
        {
        m_compute_xyzf = compute_xyzf;
        m_params_changed = true;
        }

    //! Specify if the TDB cell list is to be computed
    void setComputeTDB(bool compute_tdb)
        {
        m_compute_tdb = compute_tdb;
        m_params_changed = true;
        }

    //! Specify if the orientation cell list is to be computed
    void setComputeOrientation(bool compute_orientation)
        {
        m_compute_orientation = compute_orientation;
        m_params_changed = true;
        }

    //! Specify if the index cell list is to be computed
    void setComputeIdx(bool compute_idx)
        {
        m_compute_idx = compute_idx;
        m_params_changed = true;
        }

    //! Specify that the flag is to be filled with the particle charge
    void setFlagCharge()
        {
        m_flag_charge = true;
        m_flag_type = false;
        m_params_changed = true;
        }

    //! Specify that the flag is to be filled with the particle type
    void setFlagType()
        {
        m_flag_charge = false;
        m_flag_type = true;
        m_params_changed = true;
        }

    //! Specify that the flag is to be the particle index (encoded as an integer in the Scalar
    //! variable)
    void setFlagIndex()
        {
        m_flag_charge = false;
        m_flag_type = false;
        m_params_changed = true;
        }

    //! Notification of a particle resort
    void slotParticlesSorted()
        {
        m_particles_sorted = true;
        }

    //! Notification of a box size change
    void slotBoxChanged()
        {
        m_box_changed = true;
        }

    //! Set the multiple value
    void setMultiple(unsigned int multiple)
        {
        if (multiple != 0)
            m_multiple = multiple;
        else
            m_multiple = 1;
        }

    //! Set the sort flag
    void setSortCellList(bool sort)
        {
        m_sort_cell_list = sort;
        m_params_changed = true;
        }

    /// Get whether the cell list is sorted
    bool getSortCellList()
        {
        return m_sort_cell_list;
        }

    //! Set the flag to compute the cell adjacency list
    void setComputeAdjList(bool compute_adj_list)
        {
        m_compute_adj_list = compute_adj_list;
        m_params_changed = true;
        }

    //! Request a multi-GPU cell list
    virtual void setPerDevice(bool per_device)
        {
        // base class does nothing
        }

    //! Return true if we maintain a cell list per device
    virtual bool getPerDevice() const
        {
        // base class doesn't support GPU
        return false;
        }

    // @}
    //! \name Get properties
    // @{

    //! Get the nominal width of the cells
    Scalar getNominalWidth() const
        {
        return m_nominal_width;
        }

    //! Get the dimensions of the cell list
    const uint3& getDim() const
        {
        return m_dim;
        }

    //! Get an indexer to identify cell indices
    const Index3D& getCellIndexer() const
        {
        return m_cell_indexer;
        }

    //! Get an indexer to index into the cell lists
    const Index2D& getCellListIndexer() const
        {
        return m_cell_list_indexer;
        }

    //! Get an indexer to index into the adjacency list
    const Index2D& getCellAdjIndexer() const
        {
        return m_cell_adj_indexer;
        }

    //! Get number of memory slots allocated for each cell
    const unsigned int getNmax() const
        {
        return m_Nmax;
        }

    //! Get width of ghost cells
    const Scalar3 getGhostWidth() const
        {
        return m_ghost_width;
        }

    //! Get the actual cell width that was computed (includes ghost layer)
    const Scalar3 getCellWidth() const
        {
        return m_actual_width;
        }

    // @}
    //! \name Get data
    // @{

    //! Get the array of cell sizes
    const GlobalArray<unsigned int>& getCellSizeArray() const
        {
        return m_cell_size;
        }

    //! Get the array of cell sizes (per device)
    virtual const GlobalArray<unsigned int>& getCellSizeArrayPerDevice() const
        {
        throw std::runtime_error("Per-device cell size array not available in base class.\n");
        }

    //! Get the adjacency list
    const GlobalArray<unsigned int>& getCellAdjArray() const
        {
        if (!m_compute_adj_list)
            {
            m_exec_conf->msg->error() << "Cell adjacency list is not computed!" << std::endl;
            m_exec_conf->msg->error()
                << "Use setComputeAdjList(true) to calculate it on the next compute()" << std::endl;
            throw std::runtime_error("Cell adjacency list not available");
            }
        return m_cell_adj;
        }

    //! Get the cell list containing x,y,z,flag
    const GlobalArray<Scalar4>& getXYZFArray() const
        {
        return m_xyzf;
        }

    //! Get the cell list containing t,d,b
    const GlobalArray<Scalar4>& getTDBArray() const
        {
        return m_tdb;
        }

    //! Get the cell list containing orientation
    const GlobalArray<Scalar4>& getOrientationArray() const
        {
        return m_orientation;
        }

    //! Get the cell list containing index
    const GlobalArray<unsigned int>& getIndexArray() const
        {
        return m_idx;
        }

    //! Get the cell list containing index (per device)
    virtual const GlobalArray<unsigned int>& getIndexArrayPerDevice() const
        {
        // base class returns an empty array
        throw std::runtime_error("Per-device cell index array not available in base class.\n");
        }

    //! Compute the cell list given the current particle positions
    void compute(uint64_t timestep);

    //! Benchmark the computation
    double benchmark(unsigned int num_iters);

    // @}

    /*! \param func Function to call when the cell width changes
        \return Connection to manage the signal/slot connection
        Calls are performed by using nano_signal_slot. The function passed in
        \a func will be called every time the CellList is notified of a change in the cell width
        \note If the caller class is destroyed, it needs to disconnect the signal connection
        via \b con.disconnect where \b con is the return value of this function.
    */
    Nano::Signal<void()>& getCellWidthChangeSignal()
        {
        return m_width_change;
        }

    protected:
    // user specified parameters
    Scalar m_nominal_width;     //!< Minimum width of cell in any direction
    unsigned int m_radius;      //!< Radius of adjacency bins to list
    bool m_compute_xyzf;        //!< true if the xyzf list should be computed
    bool m_compute_tdb;         //!< true if the tdb list should be computed
    bool m_compute_orientation; //!< true if the orientation list should be computed
    bool m_compute_idx;         //!< true if the idx list should be computed
    bool m_flag_charge;      //!< true if the flag should be set to the charge, it will be index (or
                             //!< type) otherwise
    bool m_flag_type;        //!< true if the flag should be set to type, it will be index otherwise
    bool m_params_changed;   //!< Set to true when parameters are changed
    bool m_particles_sorted; //!< Set to true when the particles have been sorted
    bool m_box_changed;      //!< Set to true when the box size has changed
    unsigned int m_multiple; //!< Round cell dimensions down to a multiple of this value

    // parameters determined by initialize
    uint3 m_dim;                 //!< Current dimensions
    Index3D m_cell_indexer;      //!< Indexes cells from i,j,k
    Index2D m_cell_list_indexer; //!< Indexes elements in the cell list
    Index2D m_cell_adj_indexer;  //!< Indexes elements in the cell adjacency list
    unsigned int m_Nmax;         //!< Numer of spaces reserved for particles in each cell
    Scalar3 m_actual_width;      //!< Actual width of a cell in each direction
    Scalar3 m_ghost_width;       //!< Width of ghost layer sized for (on one side only)

    // values computed by compute()
    GlobalArray<unsigned int> m_cell_size; //!< Number of members in each cell
    GlobalArray<unsigned int> m_cell_adj;  //!< Cell adjacency list
    GlobalArray<Scalar4> m_xyzf;           //!< Cell list with position and flags
    GlobalArray<Scalar4> m_tdb;            //!< Cell list with type,diameter,body
    GlobalArray<Scalar4> m_orientation;    //!< Cell list with orientation
    GlobalArray<unsigned int> m_idx;       //!< Cell list with index
    GlobalArray<uint3> m_conditions; //!< Condition flags set during the computeCellList() call

    bool m_sort_cell_list;   //!< If true, sort cell list
    bool m_compute_adj_list; //!< If true, compute the cell adjacency lists

    //! Computes what the dimensions should me
    uint3 computeDimensions();

    //! Initialize width and indexers, allocates memory
    void initializeAll();

    //! Initialize width
    void initializeWidth();

    //! Initialize indexers and allocate memory
    virtual void initializeMemory();

    //! Initializes values in the cell_adj array
    void initializeCellAdj();

    //! Compute the cell list
    virtual void computeCellList();

    //! Check the status of the conditions
    bool checkConditions();

    //! Reads back the conditions
    virtual uint3 readConditions();

    //! Resets the condition status
    virtual void resetConditions();

    Nano::Signal<void()> m_width_change; //!< Signal that is triggered when the cell width changes
    };

//! Export the CellList class to python
#ifndef __HIPCC__
void export_CellList(pybind11::module& m);
#endif

#endif


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0 , maximum-scale=1.0, user-scalable=0">
    <meta name="format-detection" content="telephone=no">
    <title>Demo</title>
    <link rel="stylesheet" href="../dest/datetime.min.css">


text:
/**** DAILY VIEW ****/

div.slot_column {
  top:0px;
  left:0px;
  border:1px solid black;
  border-right:none;
}

div.slot {
  position:absolute;
  left:0px;
  border-bottom:1px dotted grey;
}

div.occ_column {
  position:absolute;
  border:1px solid black;
  top:0px;
}

div.occ {
  position:absolute;
  border:1px solid red;
  background-color:#eee;
  cursor:pointer;
  overflow:hidden;
}

div.occ a:hover {
    background-color:gray;
}

div.occ_column div.cancelled {
  background-color:#FFF;
  border:1px solid black;
  color:gray;
}

div.occ_column div.cancelled .actions {
  display:none;
}

td.daynumber div.daycell .cancelled {
  background-color:inherit;
  color:gray;
}

td.daynumber div.daycell .eventcell0 {
  border-right:none;
  margin-right:-1px;
}

td.daynumber div.daycell .eventcell1 {
}

td.daynumber div.daycell .eventcell2 {
  border-right:none;
  margin-right:-1px;
  border-left:none;
  margin-left:-1px;
}

td.daynumber div.daycell .eventcell3 {
  border-left:none;
  margin-left:-1px;
}

div.type0 {
  border-bottom:4px dotted gray;
}

div.type3 {
  border-top:4px dotted gray;
}

div.type2 {
  border-top:4px dotted gray;
  border-bottom:4px dotted gray;
}

/**** EVENT DETAIL DIALOG ****/

div.detail tr {vertical-align:top;}

div.detail td.left {font-weight:bold;}

div.event_options div.title {
  float:left;
}

div.event_options div.buttons {
  float:right;
}

div.occ span.actions {display:block;float:right;padding-right:3px;}
div.occ span.actions span.edit {padding-right:3px;}

/**** MONTH TABLE ****/

table.calendar {
	border-collapse: separate;
	border-spacing: 2px;
  border:2px solid #f0f0f0;
}

.dateheader {
	height: 30px;
	text-align: center
}

.daysofweek {
	height: 20px;
	text-align: center
}

table.calendar td {
  text-align:left;
	margin: 2px;
	padding: 1px;
}

table.calendar td.daynumber {
	font-size: 8pt;
	vertical-align: top
}

table.calendar td.noday {
	background-color: #eef
}

table.calendar td.free {
	background-color: #c5dbff
}

table.calendar td.busy {
	background-color: #ffcece
}

table.calendar td.small {
	width: 28px;
	height: 20px;
	text-align: center
}

td.daynumber { height:50px;}

td.daynumber div.header {
  margin-bottom:2px;
  padding-bottom:1px;
  padding-top:1px;
  text-align:right;
}

td.daynumber div.header a {
  padding:1px 5px 1px 90px;
}

td.small div.header a {
    padding:0;
}

td.daynumber div.eventcell {
    background:#f0f0f0;
    border:1px dotted grey;
    clear:both;
    cursor:pointer;
    margin:0 1px 3px 1px;
    overflow:auto;
}

td.daynumber div.starttime {
    float:left;
    width:40px;
}

td.daynumber div.eventdesc {
    float:left;
    height:1em;
    overflow:hidden;
    width:75px;
}

/**** WEEK VIEW ****/

div#week {
  margin-top:10px;
  overflow:auto;
  position:relative;
  text-align:left;
  width:1140px;

}

div#week div.weekdayheader {
  background:#D0D0D0 none repeat scroll 0 0;
  border:1px solid black;
  display:block;
  display:block;
  font-size:1em;
  font-weight:bold;
  padding-left:5px;
}
div#week div.weekdayheader a {
  color:inherit;
}
div#week div.weekdaytable {position:relative;}

div#week div.weekday {
  float:left;
  width:150px;
}

div#week div.weekday1 {
  width:230px;
}

div#week div.slot {
  font-size:1em;
}

div#week div.slot a.createEvent {
  display:inline-block;
  width:16px;
  background:url(../img/add.png) no-repeat scroll 50% 50%;
  text-indent: -999em;
}

div.weekday span.time {
  display:none;
}

div.weekday1 span.time {
  display:inline;
}

#week div.occ span.title {font-size:12px;}

/**** FORMS AND WIDGETS ****/

div.time-picker {
    position: absolute;
    height: 200px;
    width:80px; /* needed for IE */
    overflow: auto;
    background: #fff;
    border: 1px solid #000;
    z-index: 99;
}

div.time-picker-12hours {
    width:6em; /* needed for IE */
}

div.time-picker ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

div.time-picker li {
    padding: 1px;
    cursor: pointer;
}

div.time-picker li.selected {
    background: #316AC5;
    color: #fff;
}

#id_start_0, #id_end_0, #id_start_1, #id_end_1, #id_end_recurring_period { width:80px; }

/**** GENERAL SETTINGS ****/

#demo {
  border-color:#e0e0e0;
  border-style:solid;
  border-width: 0 3px 3px 0;
  float:left;
  padding-right:5px;
}

/*body, td {font-family:sans-serif;}*/

.error {
  border:1px solid red;
}

#messages {
  position:absolute;
  top:50px;
}

div.calendarname {
  border-color:#e0e0e0;
  border-style:solid;
  border-width: 0 0px 3px 3px;
  font-weight:bold;
  padding-left:5px;
  position:absolute;
  right:10px;
  top:10px;
}

div.navigation {
  float:left;
  width: 100px;
  text-align:center;
  margin:0;
}

div.navigation a {
  padding:0 20px;
}

div.tablewrapper {
    text-align:center;
    width: 700px;
    position:relative;
    float:left;
}

/* .pretty */
.pretty { clear:none; }
table.pretty thead {
  background: #ddd;
  font-size: 1.2em;
}
table.pretty tfoot {
  background: #ddd;
  font-size: 0.8em;
}

#scheduleNav{
  width: 170px;
  float: left;
}
#scheduleNav .pretty{
  margin: 0;
  width: auto;
}

a:hover { border: 0 none; } /* override base.css */


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

namespace Light.DependencyInjection.DataStructures
{
    public interface IConcurrentDictionary<TKey, TValue> : ICollection<KeyValuePair<TKey, TValue>>
    {
        TValue this[TKey key] { get; set; }

        TValue AddOrUpdate(TKey key, TValue value);
        bool ContainsKey(TKey key);
        TValue GetOrAdd(TKey key, TValue value);
        TValue GetOrAdd(TKey key, Func<TKey, TValue> valueFactory);
        bool TryAdd(TKey key, TValue value);
        bool TryGetValue(TKey key, out TValue value);
    }
}