text:
namespace credential_provider {

namespace testing {

// Test the WinHttpUrlFetcher::BuildRequestAndFetchResultFromHttpService method
// used to make various HTTP requests.
// Parameters are:
// 1.  int - 0:  HTTP call succeeds.
//           1:  Fails due to invalid response from server.
//           2:  Fails due to a retryable HTTP error (like 503).
//           3:  Fails due to a non-retryable HTTP error (like 404).
// 2.  int - Number of retries allowed for a HTTP request.
class GcpWinHttpUrlFetcherTest
    : public GlsRunnerTestBase,
      public ::testing::WithParamInterface<std::tuple<int, int>> {};

TEST_P(GcpWinHttpUrlFetcherTest,
       BuildRequestAndFetchResultFromHttpServiceTest) {
  bool valid_response = std::get<0>(GetParam()) == 0;
  bool invalid_response = std::get<0>(GetParam()) == 1;
  bool retryable_error_response = std::get<0>(GetParam()) == 2;
  bool nonretryable_error_response = std::get<0>(GetParam()) == 3;
  int num_retries = std::get<1>(GetParam());

  const int timeout_in_millis = 12000;
  const std::string header1 = "test-header-1";
  const std::string header1_value = "test-value-1";
  const GURL test_url =
      GURL("https://test-service.googleapis.com/v1/testEndpoint");
  const std::string access_token = "test-access-token";

  base::Value request(base::Value::Type::DICTIONARY);
  request.SetStringKey("request-str-key", "request-str-value");
  request.SetIntKey("request-int-key", 1234);
  base::TimeDelta request_timeout =
      base::TimeDelta::FromMilliseconds(timeout_in_millis);
  base::Optional<base::Value> request_result;

  base::Value expected_result(base::Value::Type::DICTIONARY);
  expected_result.SetStringKey("response-str-key", "response-str-value");
  expected_result.SetIntKey("response-int-key", 4321);
  std::string expected_response;
  base::JSONWriter::Write(expected_result, &expected_response);

  std::string response;
  if (invalid_response) {
    response = "Invalid json response";
  } else if (retryable_error_response) {
    response =
        "{\n\"error\": {"
        "\"code\": 503,\n"
        "\"message\": \"Service unavailable\","
        "\"status\": \"UNAVAILABLE\"\n}\n}";
  } else if (nonretryable_error_response) {
    response =
        "{\n\"error\": {"
        "\"code\": 403,\n"
        "\"message\": \"The caller does not have permission\","
        "\"status\": \"PERMISSION_DENIED\"\n}\n}";
  } else {
    response = expected_response;
  }

  if (num_retries == 0) {
    fake_http_url_fetcher_factory()->SetFakeResponse(
        test_url, FakeWinHttpUrlFetcher::Headers(), response);
  } else {
    fake_http_url_fetcher_factory()->SetFakeResponseForSpecifiedNumRequests(
        test_url, FakeWinHttpUrlFetcher::Headers(), response, num_retries);
    fake_http_url_fetcher_factory()->SetFakeResponseForSpecifiedNumRequests(
        test_url, FakeWinHttpUrlFetcher::Headers(), expected_response, 1);
  }
  fake_http_url_fetcher_factory()->SetCollectRequestData(true);

  HRESULT hr = WinHttpUrlFetcher::BuildRequestAndFetchResultFromHttpService(
      test_url, access_token, {{header1, header1_value}}, request,
      request_timeout, num_retries, &request_result);

  if (num_retries == 0) {
    if (invalid_response || retryable_error_response ||
        nonretryable_error_response) {
      ASSERT_TRUE(FAILED(hr));
    } else {
      ASSERT_EQ(S_OK, hr);
      ASSERT_EQ(expected_result, request_result.value());
    }
  } else {
    if (nonretryable_error_response) {
      ASSERT_TRUE(FAILED(hr));
    } else {
      ASSERT_EQ(S_OK, hr);
      ASSERT_EQ(expected_result, request_result.value());
    }
  }

  if (valid_response || nonretryable_error_response) {
    ASSERT_EQ(1UL, fake_http_url_fetcher_factory()->requests_created());
  } else {
    ASSERT_EQ(num_retries + 1UL,
              fake_http_url_fetcher_factory()->requests_created());
  }

  for (size_t idx = 0;
       idx < fake_http_url_fetcher_factory()->requests_created(); ++idx) {
    FakeWinHttpUrlFetcherFactory::RequestData request_data =
        fake_http_url_fetcher_factory()->GetRequestData(idx);

    ASSERT_EQ(timeout_in_millis, request_data.timeout_in_millis);
    ASSERT_EQ(1u, request_data.headers.count("Authorization"));
    ASSERT_NE(std::string::npos,
              request_data.headers.at("Authorization").find(access_token));
    ASSERT_EQ(1u, request_data.headers.count(header1));
    ASSERT_EQ(header1_value, request_data.headers.at(header1));
    base::Optional<base::Value> body_value =
        base::JSONReader::Read(request_data.body);
    ASSERT_EQ(request, body_value.value());
  }
}

INSTANTIATE_TEST_SUITE_P(All,
                         GcpWinHttpUrlFetcherTest,
                         ::testing::Combine(::testing::Values(0, 1, 2, 3),
                                            ::testing::Values(0, 1, 3)));

}  // namespace testing
}  // namespace credential_provider


text:
<!DOCTYPE html>

	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>JQuery Validation Engine</title>
	<link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css"/>
	<link rel="stylesheet" href="../css/template.css" type="text/css"/>

		Evaluate form
		| Validate sport1 select
		| Close favorite sport 1 prompt
		| Close all prompts on form
		| Build a prompt on a div
		| Close div prompt
		| Back to index

		This demonstration shows how to use the global settings

This is a div element

	<form id="formID" class="formular" method="post" action="">
		<fieldset>
			<legend>

			</legend>

				Field is required :
				<input value="" class="validate[required] text-input" type="text" name="req" id="req" />

				Favorite sport 1:
				<select name="sport" id="sport" class="validate[required]">
					<option value="">Choose a sport</option>
					<option value="option1">Tennis</option>
					<option value="option2">Football</option>
					<option value="option3">Golf</option>
				</select>

				Favorite sport 2:
				<select name="sport2" id="sport2" multiple class="validate[required]">
					<option value="">Choose a sport</option>
					<option value="option1"><l i>Tennis
</option>
						<option value="option2">Football</option>
						<option value="option3">Golf</option>
					</select>

			</fieldset>

			<input class="submit" type="submit" value="Validate & Send the form!"/>

		</form>

redpajama_set_name: RedPajamaGithub


text:
@interface Monster : NSObject <ActionInterface>

@property (strong, nonatomic) id<StatusInterface> status;

- (NSInteger)attackDamage;
- (void)jump;
- (void)run;

@end


text:
#ifndef MITKEVENTSTATEMACHINE_H_
#define MITKEVENTSTATEMACHINE_H_

#include "itkObject.h"
#include "mitkCommon.h"
#include "mitkInteractionEventHandler.h"
#include "mitkMessage.h"

#include <MitkCoreExports.h>
#include <string>

/**
 * Macro that can be used to connect a StateMachineAction with a function.
 * It assumes that there is a typedef Classname Self in classes that use
 * this macro, as is provided by e.g. mitkClassMacro
 */
#define CONNECT_FUNCTION(a, f)                                                                                \
  ::mitk::EventStateMachine::AddActionFunction(                                                                        \
    a,                                                                                \
    ::mitk::MessageDelegate2<Self, ::mitk::StateMachineAction *, ::mitk::InteractionEvent *, void>(this, &Self::f));

#define CONNECT_CONDITION(a, f)                                                                                \
  ::mitk::EventStateMachine::AddConditionFunction(                                                                     \
    a, ::mitk::MessageDelegate1<Self, const ::mitk::InteractionEvent *, bool>(this, &Self::f));

namespace us
{
  class Module;
}

namespace mitk
{
  class StateMachineTransition;
  class StateMachineContainer;
  class StateMachineAction;
  class StateMachineCondition;
  class InteractionEvent;
  class StateMachineState;
  class DataNode;
  class UndoController;

  /**
   * \class TActionFunctor
   * \brief Base class of ActionFunctors, to provide an easy to connect actions with functions.
   *
   * \deprecatedSince{2013_03} Use mitk::Message classes instead.
   */
  class TActionFunctor
  {
  public:
    virtual bool DoAction(StateMachineAction *, InteractionEvent *) = 0;
    virtual ~TActionFunctor() {}
  };

  ///**
  // * \class TSpecificActionFunctor
  // * Specific implementation of ActionFunctor class, implements a reference to the function which is to be executed.
  // It
  // takes two arguments:
  // * StateMachineAction - the action by which the function call is invoked, InteractionEvent - the event that caused
  // the
  // transition.
  // */
  // template<class T>
  // class DEPRECATED() TSpecificActionFunctor : public TActionFunctor
  //{
  // public:

  //  TSpecificActionFunctor(T* object, bool (T::*memberFunctionPointer)(StateMachineAction*, InteractionEvent*)) :
  //      m_Object(object), m_MemberFunctionPointer(memberFunctionPointer)
  //  {
  //  }

  //  virtual ~TSpecificActionFunctor()
  //  {
  //  }
  //  virtual bool DoAction(StateMachineAction* action, InteractionEvent* event) override
  //  {
  //    return (*m_Object.*m_MemberFunctionPointer)(action, event);// executes member function
  //  }

  // private:
  //  T* m_Object;
  //  bool (T::*m_MemberFunctionPointer)(StateMachineAction*, InteractionEvent*);
  //};

  /**
   * \class EventStateMachine
   *
   * \brief Super-class that provides the functionality of a StateMachine to DataInteractors.
   *
   * A state machine is created by loading a state machine pattern. It consists of states, transitions and action.
   * The state represent the current status of the interaction, transitions are means to switch between states. Each
   * transition
   * is triggered by an event and it is associated with actions that are to be executed when the state change is
   * performed.
   *
   */
  class MITKCORE_EXPORT EventStateMachine : public mitk::InteractionEventHandler
  {
  public:
    mitkClassMacro(EventStateMachine, InteractionEventHandler)

      typedef std::map<std::string, TActionFunctor *> DEPRECATED(ActionFunctionsMapType);

    typedef itk::SmartPointer<StateMachineState> StateMachineStateType;

    /**
      * @brief Loads XML resource
      *
      * Loads a XML resource file from the given module.
      * Default is the Mitk module (core).
      * The files have to be placed in the Resources/Interaction folder of their respective module.
      **/
    bool LoadStateMachine(const std::string &filename, const us::Module *module = nullptr);
    /**
     * Receives Event from Dispatcher.
     * Event is mapped using the EventConfig Object to a variant, then it is checked if the StateMachine is listening
     * for
     * such an Event. If this is the case, the transition to the next state it performed and all actions associated with
     * the transition executed,
     * and true is returned to the caller.
     * If the StateMachine can't handle this event false is returned.
     * Attention:
     * If a transition is associated with multiple actions - "true" is returned if one action returns true,
     * and the event is treated as HANDLED even though some actions might not have been executed! So be sure that all
     * actions that occur within
     * one transitions have the same conditions.
     */
    bool HandleEvent(InteractionEvent *event, DataNode *dataNode);

    /**
    * @brief Enables or disabled Undo.
    **/
    void EnableUndo(bool enable) { m_UndoEnabled = enable; }
    /**
    * @brief Enables/disables the state machine. In un-enabled state it won't react to any events.
    **/
    void EnableInteraction(bool enable) { m_IsActive = enable; }
  protected:
    EventStateMachine();
    virtual ~EventStateMachine();

    typedef MessageAbstractDelegate2<StateMachineAction *, InteractionEvent *, void> ActionFunctionDelegate;
    typedef MessageAbstractDelegate1<const InteractionEvent *, bool> ConditionFunctionDelegate;

    /**
     * Connects action from StateMachine (String in XML file) with a function that is called when this action is to be
     * executed.
     */
    DEPRECATED(void AddActionFunction(const std::string &action, TActionFunctor *functor));

    void AddActionFunction(const std::string &action, const ActionFunctionDelegate &delegate);

    void AddConditionFunction(const std::string &condition, const ConditionFunctionDelegate &delegate);

    StateMachineState *GetCurrentState() const;

    /**
     * @brief ResetToStartState Reset state machine to it initial starting state.
     */

    void ResetToStartState();

    /**
     * Is called after loading a statemachine.
     * Overwrite this function in specific interactor implementations.
     * Connect actions and functions using the  CONNECT_FUNCTION macro within this function.
     */

    virtual void ConnectActionsAndFunctions();

    virtual bool CheckCondition(const StateMachineCondition &condition, const InteractionEvent *interactionEvent);

    /**
     * Looks up function that is associated with action and executes it.
     * To implement your own execution scheme overwrite this in your DataInteractor.
     */
    virtual void ExecuteAction(StateMachineAction *action, InteractionEvent *interactionEvent);

    /**
     * Implements filter scheme for events.
     * Standard implementation accepts events from 2d and 3d windows,
     * and rejects events if DataNode is not visible.
     * \return true if event is accepted, else false
     *
     * Overwrite this function to adapt for your own needs, for example to filter out events from
     * 3d windows like this:
     \code
      bool mitk::EventStateMachine::FilterEvents(InteractionEvent* interactionEvent, DataNode*dataNode)
      {
        return interactionEvent->GetSender()->GetMapperID() == BaseRenderer::Standard2D; // only 2D mappers
      }
     \endcode
     * or to enforce that the interactor only reacts when the corresponding DataNode is selected in the DataManager
     view..
     */
    virtual bool FilterEvents(InteractionEvent *interactionEvent, DataNode *dataNode);

    /** \brief Sets the specified mouse cursor.
     *
     * Use this in subclasses instead of using QmitkApplicationCursor directly.
     */
    void SetMouseCursor(const char *xpm[], int hotspotX, int hotspotY);

    /** \brief Resets the mouse cursor (if modified by the SlicesCoordinator)
     * to its original state.
     *
     * Should be used by subclasses and from external application instead
     * of using QmitkApplicationCursor directly to avoid conflicts. */
    void ResetMouseCursor();

    /**
    * \brief Returns the executable transition for the given event.
    *
    * This method takes a list of transitions that correspond to the given
    * event from the current state.
    *
    * This method iterates through all transitions and checks all
    * corresponding conditions. The results of each condition in stored in
    * map, as other transitions may need the same condition again.
    *
    * As soon as a transition is found for which all conditions are
    * fulfilled, this instance is returned.
    *
    * If a transition has no condition, it is automatically returned.
    * If no executable transition is found, NULL is returned.
    */
    StateMachineTransition *GetExecutableTransition(InteractionEvent *event);

    // Determines if state machine reacts to events
    bool m_IsActive;
    // Undo/Redo
    UndoController *m_UndoController;
    bool m_UndoEnabled;

  private:
    typedef std::map<std::string, ActionFunctionDelegate *> ActionDelegatesMapType;
    typedef std::map<std::string, ConditionFunctionDelegate *> ConditionDelegatesMapType;

    StateMachineContainer
      *m_StateMachineContainer; // storage of all states, action, transitions on which the statemachine operates.
    std::map<std::string, TActionFunctor *> m_ActionFunctionsMap; // stores association between action string
    ActionDelegatesMapType m_ActionDelegatesMap;
    ConditionDelegatesMapType m_ConditionDelegatesMap;
    StateMachineStateType m_CurrentState;

    bool m_MouseCursorSet;
  };

} /* namespace mitk */
#endif /* MITKEVENTSTATEMACHINE_H_ */


text:
@interface QRCopyToClipboardSubmissionService ()

@property (assign) BOOL completed;

@end

@implementation QRCopyToClipboardSubmissionService

+ (void)load
{
	[QRSubmissionService registerService:self];
}

+ (NSString *)identifier
{
	return @"QRCopyToClipboardSubmissionService.h";
}

+ (NSString *)name
{
	return @"Copy to Clipboard";
}

+ (NSString*)checkBoxString
{
	return @"Copy radar number to clipboard";
}

+ (BOOL)isAvailable
{
	return YES;
}

+ (BOOL)supportedOnMac;
{
	return YES;
}

+ (BOOL)supportedOniOS;
{
	return NO;
}

+ (NSString*)macSettingsViewControllerClassName;
{
	return nil;
}

+ (NSString*)iosSettingsViewControllerClassName;
{
	return nil;
}

+(NSSet *)hardDependencies
{
	return [NSSet setWithObject:QRRadarSubmissionServiceIdentifier];
}

+(NSSet *)softDependencies
{
	return nil;
}

- (CGFloat)progress
{
	return self.completed ? 1.0 : 0.0;
}

- (SubmissionStatus)submissionStatus
{
	return (self.completed) ? submissionStatusCompleted : submissionStatusNotStarted;
}

- (void)submitAsyncWithProgressBlock:(void (^)())progressBlock completionBlock:(void (^)(BOOL, NSError *))completionBlock
{
	NSString *radarNumString = [NSString stringWithFormat:@"%li", self.radar.radarNumber];

	[[NSPasteboard generalPasteboard] clearContents];
	[[NSPasteboard generalPasteboard] writeObjects:@[radarNumString]];

	self.completed = YES;

	completionBlock(YES, nil);
}

@end


text:
<?php
namespace Netsensia\Controller\Plugin\Widget;

class MultiTable extends Widget
{
    public function process()
    {
        $tableGateway = $this->serviceLocator->get(
            $this->widget->jointablemodel . 'TableGateway'
        );

        $parentKey = $this->parentModel->getPrimaryKey();

        /* Will throw exception if model is not populated */
        $parentId = $this->parentModel->getId();

        $tableGateway->delete($parentKey);

        $tableColumns = [];

        foreach ($this->widget->fields as $field) {
            if ($field->type == 'select') {
                $columnName = $field->name . 'id';
            } else {
                $columnName = $field->name;
            }
            $tableColumns[] = $columnName;
        }

        foreach ($this->widget->rowValues as $row) {

            $count = 0;
            foreach ($tableColumns as $column) {
                $updateArray[$column] = $row[$count];
                $count++;
            }

            $updateArray = array_merge(
                $this->parentModel->getPrimaryKey(),
                $updateArray
            );

            $model = $this->serviceLocator->get(
                $this->widget->jointablemodel . 'Model'
            );

            $model->init();

            $model->setData($updateArray);

            $model->create();
        }

    }
}


text:
var specificity = require('./specificity');

function specificitiesOverlap(selector1, selector2, cache) {
  var specificity1;
  var specificity2;
  var i, l;
  var j, m;

  for (i = 0, l = selector1.length; i < l; i++) {
    specificity1 = findSpecificity(selector1[i][1], cache);

    for (j = 0, m = selector2.length; j < m; j++) {
      specificity2 = findSpecificity(selector2[j][1], cache);

      if (specificity1[0] === specificity2[0] && specificity1[1] === specificity2[1] && specificity1[2] === specificity2[2]) {
        return true;
      }
    }
  }

  return false;
}

function findSpecificity(selector, cache) {
  var value;

  if (!(selector in cache)) {
    cache[selector] = value = specificity(selector);
  }

  return value || cache[selector];
}

module.exports = specificitiesOverlap;


text:
// -----------------------------------------------------------
//  Copyright (c) Microsoft Corporation.  All rights reserved.
//  Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------

namespace ChatWeb
{
    using System;
    using System.Collections.Generic;
    using System.Fabric;
    using System.Linq;
    using System.Threading;
    using System.Threading.Tasks;
    using ChatWeb.Domain;
    using Microsoft.ServiceFabric.Data;
    using Microsoft.ServiceFabric.Data.Collections;
    using Microsoft.ServiceFabric.Services.Communication.Runtime;
    using Microsoft.ServiceFabric.Services.Remoting.Runtime;
    using Microsoft.ServiceFabric.Services.Runtime;
    using Chat.Domain;
    public class ChatService : StatefulService, IChatService
    {
        private const int MessagesToKeep = 50;
        public ChatService(StatefulServiceContext context)
            : base(context)
        {
        }

        public async Task AddMessageAsync(Message message)
        {
            DateTime time = DateTime.Now.ToLocalTime();

            IReliableDictionary<DateTime, Message> messagesDictionary =
                await this.StateManager.GetOrAddAsync<IReliableDictionary<DateTime, Message>>("messages");
            //dictionary for the scores
            IReliableDictionary<string, int> scoresDictionary =
                await StateManager.GetOrAddAsync<IReliableDictionary<string, int>>("scores");
            var currentQuestion =
                await StateManager.GetOrAddAsync<IReliableQueue<KeyValuePair<string, string>>>("currentQuestion");

            using (ITransaction tx = StateManager.CreateTransaction())
            {
                var currentScoreConditional = await scoresDictionary.TryGetValueAsync(tx, message.Name);
                if (!currentScoreConditional.HasValue)
                    await scoresDictionary.GetOrAddAsync(tx, message.Name, 0);
                await tx.CommitAsync();
            }

            //checking for the right answer
            using (ITransaction tx = this.StateManager.CreateTransaction())
            {
                if (message.MessageText.ToLowerInvariant().Trim() == "try me")
                {
                    var q = TriviaDatabase.GetRandomQuestion();
                    await currentQuestion.TryDequeueAsync(tx);
                    await currentQuestion.EnqueueAsync(tx, q);
                    await tx.CommitAsync();
                }
                else
                {
                    var question = await currentQuestion.TryPeekAsync(tx);
                    if (question.Value.Value.ToLowerInvariant().Trim()
                        == message.MessageText.ToLowerInvariant().Trim())
                    {
                        await messagesDictionary.AddAsync(tx, time,
                               new Message { Name = message.Name, MessageText = message.MessageText });
                        await messagesDictionary.AddAsync(tx, time.AddTicks(1),
                            new Message { Name = "Admin", MessageText = "You are correct " + message.Name + "! You get one point for this" });
                        //get and update the score
                        var currentScoreConditional = await scoresDictionary.TryGetValueAsync(tx, message.Name);
                        var currentScore = currentScoreConditional.HasValue ? currentScoreConditional.Value + 1 : 0;
                        await scoresDictionary.AddOrUpdateAsync(tx, message.Name, currentScore, (x, y) => ++y);
                        await currentQuestion.TryDequeueAsync(tx);
                        await currentQuestion.EnqueueAsync(tx, TriviaDatabase.GetRandomQuestion());
                        await tx.CommitAsync();
                    }
                    else
                    {

                        await messagesDictionary.AddAsync(tx, time, message);
                        await tx.CommitAsync();
                    }
                }

            }
        }

        public async Task<string> GetCurrentQuestionAsync()
        {
            var currentQuestion =
                await StateManager.GetOrAddAsync<IReliableQueue<KeyValuePair<string, string>>>("currentQuestion");
            var currentQusetionString = string.Empty;
            using (ITransaction tx = this.StateManager.CreateTransaction())
            {
                var question = await currentQuestion.TryPeekAsync(tx);
                currentQusetionString = question.HasValue ? question.Value.Key : string.Empty;
            }
            return currentQusetionString;
        }

        public async Task<IEnumerable<KeyValuePair<string, int>>> GetScoresAsync()
        {
            IReliableDictionary<string, int> scoresDictionary =
                await StateManager.GetOrAddAsync<IReliableDictionary<string, int>>("scores");
            List<KeyValuePair<string, int>> returnList = new List<KeyValuePair<string, int>>();

            using (ITransaction tx = this.StateManager.CreateTransaction())
            {
                var scoresEnumerable = await scoresDictionary.CreateEnumerableAsync(tx, EnumerationMode.Ordered);

                using (IAsyncEnumerator<KeyValuePair<string, int>> enumerator = scoresEnumerable.GetAsyncEnumerator())
                {
                    while (await enumerator.MoveNextAsync(CancellationToken.None))
                    {
                        returnList.Add(enumerator.Current);
                    }
                }
            }
            return returnList;
        }

        public async Task<IEnumerable<KeyValuePair<DateTime, Message>>> GetMessagesAsync()
        {
            IReliableDictionary<DateTime, Message> messagesDictionary =
                await this.StateManager.GetOrAddAsync<IReliableDictionary<DateTime, Message>>("messages");
            List<KeyValuePair<DateTime, Message>> returnList = new List<KeyValuePair<DateTime, Message>>();

            using (ITransaction tx = this.StateManager.CreateTransaction())
            {
                var messagesEnumerable = await messagesDictionary.CreateEnumerableAsync(tx, EnumerationMode.Ordered);

                using (IAsyncEnumerator<KeyValuePair<DateTime, Message>> enumerator = messagesEnumerable.GetAsyncEnumerator())
                {
                    while (await enumerator.MoveNextAsync(CancellationToken.None))
                    {
                        returnList.Add(enumerator.Current);
                    }
                }
            }
            return returnList;
            //return messagesEnumerable.ToList();
        }

        public async Task ClearMessagesAsync()
        {
            IReliableDictionary<DateTime, Message> messagesDictionary =
                await this.StateManager.GetOrAddAsync<IReliableDictionary<DateTime, Message>>("messages");

            await messagesDictionary.ClearAsync();
        }

        protected override IEnumerable<ServiceReplicaListener> CreateServiceReplicaListeners()
        {
            return new List<ServiceReplicaListener> {
                new ServiceReplicaListener(initParams => this.CreateServiceRemotingListener<ChatService>(initParams))
            };
        }

        protected override async Task RunAsync(CancellationToken cancellationToken)
        {
            TimeSpan timeSpan = new TimeSpan(0, 0, 30);
            ServiceEventSource.Current.ServiceMessage(
                this,
                "Partition {0} started processing messages.",
                this.Context.PartitionId);

            IReliableDictionary<DateTime, Message> messagesDictionary =
                await this.StateManager.GetOrAddAsync<IReliableDictionary<DateTime, Message>>("messages");

            //Use this method to periodically clean up messages in the messagesDictionary
            while (!cancellationToken.IsCancellationRequested)
            {
                try
                {
                    IEnumerable<KeyValuePair<DateTime, Message>> messagesEnumerable = await GetMessagesAsync();

                    // Remove all the messages that are older than 30 seconds keeping the last 50 messages
                    IEnumerable<KeyValuePair<DateTime, Message>> oldMessages = from t in messagesEnumerable
                                                                               where t.Key < (DateTime.Now - timeSpan)
                                                                               orderby t.Key ascending
                                                                               select t;

                    using (ITransaction tx = this.StateManager.CreateTransaction())
                    {
                        int messagesCount = (int)await messagesDictionary.GetCountAsync(tx);

                        foreach (KeyValuePair<DateTime, Message> item in oldMessages.Take(messagesCount - MessagesToKeep))
                        {
                            await messagesDictionary.TryRemoveAsync(tx, item.Key);
                        }
                        await tx.CommitAsync();
                    }

                }
                catch (Exception e)
                {
                    if (!this.HandleException(e))
                    {
                        ServiceEventSource.Current.ServiceMessage(
                            this,
                            "Partition {0} stopped processing because of error {1}",
                            this.Context.PartitionId,
                            e);
                        break;
                    }
                }

                await Task.Delay(TimeSpan.FromSeconds(2), cancellationToken);
            }
        }

        private bool HandleException(Exception e)
        {
            {
                if ((e is FabricNotPrimaryException) || // replica is no longer writable
                    (e is FabricObjectClosedException) || // replica is closed
                    (e is FabricNotReadableException)) // replica is not readable
                {
                    return false;
                }
                if (e is TimeoutException)
                {
                    // Service Fabric uses timeouts on collection operations to prevent deadlocks.
                    // If this exception is thrown, it means that this transaction was waiting the default
                    // amount of time (4 seconds) but was unable to acquire the lock. In this case we simply
                    // retry after a random backoff interval. You can also control the timeout via a parameter
                    // on the collection operation.
                    return true;
                }

                return false;
            }
        }
    }
}


text:
@interface GeneralPane : PreferencesPane

@end


text:
module.exports = {
  post    : require('./post'),
  private : require('./private'),
  public  : require('./public'),
};


text:
/**
 * @module EaselJS
 */

// namespace:
this.createjs = this.createjs||{};

(function() {
	"use strict";

/**
 * A stage is the root level {{#crossLink "Container"}}{{/crossLink}} for a display list. Each time its {{#crossLink "Stage/tick"}}{{/crossLink}}
 * method is called, it will render its display list to its target canvas.
 *
 *
Example

 * This example creates a stage, adds a child to it, then uses {{#crossLink "Ticker"}}{{/crossLink}} to update the child
 * and redraw the stage using {{#crossLink "Stage/update"}}{{/crossLink}}.
 *
 *      var stage = new createjs.Stage("canvasElementId");
 *      var image = new createjs.Bitmap("imagePath.png");
 *      stage.addChild(image);
 *      createjs.Ticker.addEventListener("tick", handleTick);
 *      function handleTick(event) {
 *          image.x += 10;
 *          stage.update();
 *      }
 *
 * @class Stage
 * @extends Container
 * @constructor
 * @param {HTMLCanvasElement | String | Object} canvas A canvas object that the Stage will render to, or the string id
 * of a canvas object in the current document.
 **/
var Stage = function(canvas) {
  this.initialize(canvas);
};
var p = Stage.prototype = new createjs.Container();

// events:

	/**
	 * Dispatched when the user moves the mouse over the canvas.
	 * See the {{#crossLink "MouseEvent"}}{{/crossLink}} class for a listing of event properties.
	 * @event stagemousemove
	 * @since 0.6.0
	 */

	/**
	 * Dispatched when the user presses their left mouse button on the canvas. See the {{#crossLink "MouseEvent"}}{{/crossLink}}
	 * class for a listing of event properties.
	 * @event stagemousedown
	 * @since 0.6.0
	 */

	/**
	 * Dispatched when the user the user releases the mouse button anywhere that the page can detect it (this varies slightly between browsers).
	 * See the {{#crossLink "MouseEvent"}}{{/crossLink}} class for a listing of event properties.
	 * @event stagemouseup
	 * @since 0.6.0
	 */

	/**
	 * Dispatched when the mouse moves from within the canvas area (mouseInBounds == true) to outside it (mouseInBounds == false).
	 * This is currently only dispatched for mouse input (not touch). See the {{#crossLink "MouseEvent"}}{{/crossLink}}
	 * class for a listing of event properties.
	 * @event mouseleave
	 * @since 0.7.0
	 */

	/**
	 * Dispatched when the mouse moves into the canvas area (mouseInBounds == false) from outside it (mouseInBounds == true).
	 * This is currently only dispatched for mouse input (not touch). See the {{#crossLink "MouseEvent"}}{{/crossLink}}
	 * class for a listing of event properties.
	 * @event mouseenter
	 * @since 0.7.0
	 */

	/**
	 * Dispatched each update immediately before the tick event is propagated through the display list. Does not fire if
	 * tickOnUpdate is false.
	 * @event tickstart
	 * @since 0.7.0
	 */

	/**
	 * Dispatched each update immediately after the tick event is propagated through the display list. Does not fire if
	 * tickOnUpdate is false. Precedes the "drawstart" event.
	 * @event tickend
	 * @since 0.7.0
	 */

	/**
	 * Dispatched each update immediately before the canvas is cleared and the display list is drawn to it.
	 * @event drawstart
	 * @since 0.7.0
	 */

	/**
	 * Dispatched each update immediately after the display list is drawn to the canvas and the canvas context is restored.
	 * @event drawend
	 * @since 0.7.0
	 */

// public properties:
	/**
	 * Indicates whether the stage should automatically clear the canvas before each render. You can set this to false
	 * to manually control clearing (for generative art, or when pointing multiple stages at the same canvas for
	 * example).
	 *
	 *
Example

	 *
	 *      var stage = new createjs.Stage("canvasId");
	 *      stage.autoClear = false;
	 *
	 * @property autoClear
	 * @type Boolean
	 * @default true
	 **/
	p.autoClear = true;

	/**
	 * The canvas the stage will render to. Multiple stages can share a single canvas, but you must disable autoClear for all but the
	 * first stage that will be ticked (or they will clear each other's render).
	 *
	 * When changing the canvas property you must disable the events on the old canvas, and enable events on the
	 * new canvas or mouse events will not work as expected. For example:
	 *
	 *      myStage.enableDOMEvents(false);
	 *      myStage.canvas = anotherCanvas;
	 *      myStage.enableDOMEvents(true);
	 *
	 * @property canvas
	 * @type HTMLCanvasElement | Object
	 **/
	p.canvas = null;

	/**
	 * The current mouse X position on the canvas. If the mouse leaves the canvas, this will indicate the most recent
	 * position over the canvas, and mouseInBounds will be set to false.
	 * @property mouseX
	 * @type Number
	 * @readonly
	 **/
	p.mouseX = 0;

	/**
	 * The current mouse Y position on the canvas. If the mouse leaves the canvas, this will indicate the most recent
	 * position over the canvas, and mouseInBounds will be set to false.
	 * @property mouseY
	 * @type Number
	 * @readonly
	 **/
	p.mouseY = 0;

	// TODO: deprecated.
	/**
	 * REMOVED. Use {{#crossLink "EventDispatcher/addEventListener"}}{{/crossLink}} and the "{{#crossLink "Stage/stagemousemove:event"}}{{/crossLink}}
	 * event.
	 * @property onMouseMove
	 * @type Function
	 * @deprecated Use addEventListener and the "stagemousemove" event.
	 */
	/**
	 * REMOVED. Use {{#crossLink "EventDispatcher/addEventListener"}}{{/crossLink}} and the {{#crossLink "Stage/stagemouseup:event"}}{{/crossLink}}
	 * event.
	 * @property onMouseUp
	 * @type Function
	 * @deprecated Use addEventListener and the "stagemouseup" event.
	 */
	/**
	 * REMOVED. Use {{#crossLink "EventDispatcher/addEventListener"}}{{/crossLink}} and the {{#crossLink "Stage/stagemousedown:event"}}{{/crossLink}}
	 * event.
	 * @property onMouseDown
	 * @type Function
	 * @deprecated Use addEventListener and the "stagemousedown" event.
	 */

	/**
	 * Indicates whether display objects should be rendered on whole pixels. You can set the
	 * {{#crossLink "DisplayObject/snapToPixel"}}{{/crossLink}} property of
	 * display objects to false to enable/disable this behaviour on a per instance basis.
	 * @property snapToPixelEnabled
	 * @type Boolean
	 * @default false
	 **/
	p.snapToPixelEnabled = false;

	/**
	 * Indicates whether the mouse is currently within the bounds of the canvas.
	 * @property mouseInBounds
	 * @type Boolean
	 * @default false
	 **/
	p.mouseInBounds = false;

	/**
	 * If true, tick callbacks will be called on all display objects on the stage prior to rendering to the canvas.
	 * @property tickOnUpdate
	 * @type Boolean
	 * @default true
	 **/
	p.tickOnUpdate = true;

	/**
	 * If true, mouse move events will continue to be called when the mouse leaves the target canvas. See
	 * {{#crossLink "Stage/mouseInBounds:property"}}{{/crossLink}}, and {{#crossLink "MouseEvent"}}{{/crossLink}}
	 * x/y/rawX/rawY.
	 * @property mouseMoveOutside
	 * @type Boolean
	 * @default false
	 **/
	p.mouseMoveOutside = false;

	// TODO: deprecated.
	/**
	 * Replaced by {{#crossLink "Stage/relayEventsTo"}}{{/crossLink}}.
	 * @property nextStage
	 * @type Stage
	 * @deprecated Use relayEventsTo instead.
	 **/

	/**
	 * The hitArea property is not supported for Stage.
	 * @property hitArea
	 * @type {DisplayObject}
	 * @default null
	 */

// getter / setters:
	/**
	 * Specifies a target stage that will have mouse / touch interactions relayed to it after this stage handles them.
	 * This can be useful in cases where you have multiple layered canvases and want user interactions
	 * events to pass through. For example, this would relay mouse events from topStage to bottomStage:
	 *
	 *      topStage.nextStage = bottomStage;
	 *
	 * To disable relaying, set nextStage to null.
	 *
	 * MouseOver, MouseOut, RollOver, and RollOut interactions are also passed through using the mouse over settings
	 * of the top-most stage, but are only processed if the target stage has mouse over interactions enabled.
	 * Considerations when using roll over in relay targets:

	 *
 The top-most (first) stage must have mouse over interactions enabled (via enableMouseOver)

	 *
 All stages that wish to participate in mouse over interaction must enable them via enableMouseOver

	 *
 All relay targets will share the frequency value of the top-most stage

	 *

	 * To illustrate, in this example the targetStage would process mouse over interactions at 10hz (despite passing
	 * 30 as it's desired frequency):
	 * 	topStage.nextStage = targetStage;
	 * 	topStage.enableMouseOver(10);
	 * 	targetStage.enableMouseOver(30);
	 *
	 * If the target stage's canvas is completely covered by this stage's canvas, you may also want to disable its
	 * DOM events using:
	 *
	 *	targetStage.enableDOMEvents(false);
	 *
	 * @property nextStage
	 * @param {Stage} targetStage The stage to relay mouse interactions to.
	 **/
	p._get_nextStage = function() {
		return this._nextStage;
	};

	/**
	 * Returns the y position of the mouse in the local coordinate system of the current target (ie. the dispatcher).
	 * @property localY
	 * @type {Number}
	 * @readonly
	 */
	p._set_nextStage = function(value) {
		if (this._nextStage) { this._nextStage._prevStage = null; }
		if (value) { value._prevStage = this; }
		this._nextStage = value;
	};

	try {
		Object.defineProperties(p, {
			nextStage: { get: p._get_nextStage, set: p._set_nextStage }
		});
	} catch (e) {} // TODO: use Log

// private properties:

	/**
	 * Holds objects with data for each active pointer id. Each object has the following properties:
	 * x, y, event, target, overTarget, overX, overY, inBounds, posEvtObj (native event that last updated position)
	 * @property _pointerData
	 * @type {Object}
	 * @private
	 */
	p._pointerData = null;

	/**
	 * Number of active pointers.
	 * @property _pointerCount
	 * @type {Object}
	 * @private
	 */
	p._pointerCount = 0;

	/**
	 * The ID of the primary pointer.
	 * @property _primaryPointerID
	 * @type {Object}
	 * @private
	 */
	p._primaryPointerID = null;

	/**
	 * @property _mouseOverIntervalID
	 * @protected
	 * @type Number
	 **/
	p._mouseOverIntervalID = null;

	/**
	 * @property _nextStage
	 * @protected
	 * @type Stage
	 **/
	p._nextStage = null;

	/**
	 * @property _prevStage
	 * @protected
	 * @type Stage
	 **/
	p._prevStage = null;

// constructor:
	/**
	 * @property DisplayObject_initialize
	 * @type Function
	 * @private
	 **/
	p.Container_initialize = p.initialize;

	/**
	 * Initialization method.
	 * @method initialize
	 * @param {HTMLCanvasElement | String | Object} canvas A canvas object, or the string id of a canvas object in the current document.
	 * @protected
	 **/
	p.initialize = function(canvas) {
		this.Container_initialize();
		this.canvas = (typeof canvas == "string") ? document.getElementById(canvas) : canvas;
		this._pointerData = {};
		this.enableDOMEvents(true);
	};

// public methods:

	/**
	 * Each time the update method is called, the stage will tick all descendants (see: {{#crossLink "DisplayObject/tick"}}{{/crossLink}})
	 * and then render the display list to the canvas. Any parameters passed to `update()` will be passed on to any
	 * {{#crossLink "DisplayObject/tick:event"}}{{/crossLink}} event handlers.
	 *
	 * Some time-based features in EaselJS (for example {{#crossLink "Sprite/framerate"}}{{/crossLink}} require that
	 * a tick event object (or equivalent) be passed as the first parameter to update(). For example:
	 *
	 *      Ticker.addEventListener("tick", handleTick);
	 * 	    function handleTick(evtObj) {
	 * 	     	// do some work here, then update the stage, passing through the event object:
	 * 	    	myStage.update(evtObj);
	 * 	    }
	 *
	 * @method update
	 * @param {*} [params]* Params to include when ticking descendants. The first param should usually be a tick event.
	 **/
	p.update = function(params) {
		if (!this.canvas) { return; }
		if (this.tickOnUpdate) {
			this.dispatchEvent("tickstart");  // TODO: make cancellable?
			this.tickEnabled&&this._tick((arguments.length ? arguments : null));
			this.dispatchEvent("tickend");
		}
		this.dispatchEvent("drawstart"); // TODO: make cancellable?
		createjs.DisplayObject._snapToPixelEnabled = this.snapToPixelEnabled;
		if (this.autoClear) { this.clear(); }
		var ctx = this.canvas.getContext("2d");
		ctx.save();
		this.updateContext(ctx);
		this.draw(ctx, false);
		ctx.restore();
		this.dispatchEvent("drawend");
	};

	/**
	 * Default event handler that calls the Stage {{#crossLink "Stage/update"}}{{/crossLink}} method when a {{#crossLink "DisplayObject/tick:event"}}{{/crossLink}}
	 * event is received. This allows you to register a Stage instance as a event listener on {{#crossLink "Ticker"}}{{/crossLink}}
	 * directly, using:
	 *
	 *      Ticker.addEventListener("tick", myStage");
	 *
	 * Note that if you subscribe to ticks using this pattern, then the tick event object will be passed through to
	 * display object tick handlers, instead of delta and paused parameters.
	 * @property handleEvent
	 * @type Function
	 **/
	p.handleEvent = function(evt) {
		if (evt.type == "tick") { this.update(evt); }
	};

	/**
	 * Clears the target canvas. Useful if {{#crossLink "Stage/autoClear:property"}}{{/crossLink}} is set to `false`.
	 * @method clear
	 **/
	p.clear = function() {
		if (!this.canvas) { return; }
		var ctx = this.canvas.getContext("2d");
		ctx.setTransform(1, 0, 0, 1, 0, 0);
		ctx.clearRect(0, 0, this.canvas.width+1, this.canvas.height+1);
	};

	/**
	 * Returns a data url that contains a Base64-encoded image of the contents of the stage. The returned data url can
	 * be specified as the src value of an image element.
	 * @method toDataURL
	 * @param {String} backgroundColor The background color to be used for the generated image. The value can be any value HTML color
	 * value, including HEX colors, rgb and rgba. The default value is a transparent background.
	 * @param {String} mimeType The MIME type of the image format to be create. The default is "image/png". If an unknown MIME type
	 * is passed in, or if the browser does not support the specified MIME type, the default value will be used.
	 * @return {String} a Base64 encoded image.
	 **/
	p.toDataURL = function(backgroundColor, mimeType) {
		if(!mimeType) {
			mimeType = "image/png";
		}

		var ctx = this.canvas.getContext('2d');
		var w = this.canvas.width;
		var h = this.canvas.height;

		var data;

		if(backgroundColor) {

			//get the current ImageData for the canvas.
			data = ctx.getImageData(0, 0, w, h);

			//store the current globalCompositeOperation
			var compositeOperation = ctx.globalCompositeOperation;

			//set to draw behind current content
			ctx.globalCompositeOperation = "destination-over";

			//set background color
			ctx.fillStyle = backgroundColor;

			//draw background on entire canvas
			ctx.fillRect(0, 0, w, h);
		}

		//get the image data from the canvas
		var dataURL = this.canvas.toDataURL(mimeType);

		if(backgroundColor) {
			//clear the canvas
			ctx.clearRect (0, 0, w+1, h+1);

			//restore it with original settings
			ctx.putImageData(data, 0, 0);

			//reset the globalCompositeOperation to what it was
			ctx.globalCompositeOperation = compositeOperation;
		}

		return dataURL;
	};

	/**
	 * Enables or disables (by passing a frequency of 0) mouse over ({{#crossLink "DisplayObject/mouseover:event"}}{{/crossLink}}
	 * and {{#crossLink "DisplayObject/mouseout:event"}}{{/crossLink}}) and roll over events ({{#crossLink "DisplayObject/rollover:event"}}{{/crossLink}}
	 * and {{#crossLink "DisplayObject/rollout:event"}}{{/crossLink}}) for this stage's display list. These events can
	 * be expensive to generate, so they are disabled by default. The frequency of the events can be controlled
	 * independently of mouse move events via the optional `frequency` parameter.
	 *
	 *
Example

	 *      var stage = new createjs.Stage("canvasId");
	 *      stage.enableMouseOver(10); // 10 updates per second
	 *
	 * @method enableMouseOver
	 * @param {Number} [frequency=20] Optional param specifying the maximum number of times per second to broadcast
	 * mouse over/out events. Set to 0 to disable mouse over events completely. Maximum is 50. A lower frequency is less
	 * responsive, but uses less CPU.
	 **/
	p.enableMouseOver = function(frequency) {
		if (this._mouseOverIntervalID) {
			clearInterval(this._mouseOverIntervalID);
			this._mouseOverIntervalID = null;
			if (frequency == 0) {
				this._testMouseOver(true);
			}
		}
		if (frequency == null) { frequency = 20; }
		else if (frequency <= 0) { return; }
		var o = this;
		this._mouseOverIntervalID = setInterval(function(){ o._testMouseOver(); }, 1000/Math.min(50,frequency));
	};

	/**
	 * Enables or disables the event listeners that stage adds to DOM elements (window, document and canvas). It is good
	 * practice to disable events when disposing of a Stage instance, otherwise the stage will continue to receive
	 * events from the page.
	 *
	 * When changing the canvas property you must disable the events on the old canvas, and enable events on the
	 * new canvas or mouse events will not work as expected. For example:
	 *
	 *      myStage.enableDOMEvents(false);
	 *      myStage.canvas = anotherCanvas;
	 *      myStage.enableDOMEvents(true);
	 *
	 * @method enableDOMEvents
	 * @param {Boolean} [enable=true] Indicates whether to enable or disable the events. Default is true.
	 **/
	p.enableDOMEvents = function(enable) {
		if (enable == null) { enable = true; }
		var n, o, ls = this._eventListeners;
		if (!enable && ls) {
			for (n in ls) {
				o = ls[n];
				o.t.removeEventListener(n, o.f, false);
			}
			this._eventListeners = null;
		} else if (enable && !ls && this.canvas) {
			var t = window.addEventListener ? window : document;
			var _this = this;
			ls = this._eventListeners = {};
			ls["mouseup"] = {t:t, f:function(e) { _this._handleMouseUp(e)} };
			ls["mousemove"] = {t:t, f:function(e) { _this._handleMouseMove(e)} };
			ls["dblclick"] = {t:this.canvas, f:function(e) { _this._handleDoubleClick(e)} };
			ls["mousedown"] = {t:this.canvas, f:function(e) { _this._handleMouseDown(e)} };

			for (n in ls) {
				o = ls[n];
				o.t.addEventListener(n, o.f, false);
			}
		}
	};

	/**
	 * Returns a clone of this Stage.
	 * @method clone
	 * @return {Stage} A clone of the current Container instance.
	 **/
	p.clone = function() {
		var o = new Stage(null);
		this.cloneProps(o);
		return o;
	};

	/**
	 * Returns a string representation of this object.
	 * @method toString
	 * @return {String} a string representation of the instance.
	 **/
	p.toString = function() {
		return "[Stage (name="+  this.name +")]";
	};

	// private methods:

	/**
	 * @method _getElementRect
	 * @protected
	 * @param {HTMLElement} e
	 **/
	p._getElementRect = function(e) {
		var bounds;
		try { bounds = e.getBoundingClientRect(); } // this can fail on disconnected DOM elements in IE9
		catch (err) { bounds = {top: e.offsetTop, left: e.offsetLeft, width:e.offsetWidth, height:e.offsetHeight}; }

		var offX = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0);
		var offY = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop  || document.body.clientTop  || 0);

		var styles = window.getComputedStyle ? getComputedStyle(e) : e.currentStyle; // IE <9 compatibility.
		var padL = parseInt(styles.paddingLeft)+parseInt(styles.borderLeftWidth);
		var padT = parseInt(styles.paddingTop)+parseInt(styles.borderTopWidth);
		var padR = parseInt(styles.paddingRight)+parseInt(styles.borderRightWidth);
		var padB = parseInt(styles.paddingBottom)+parseInt(styles.borderBottomWidth);

		// note: in some browsers bounds properties are read only.
		return {
			left: bounds.left+offX+padL,
			right: bounds.right+offX-padR,
			top: bounds.top+offY+padT,
			bottom: bounds.bottom+offY-padB
		}
	};

	/**
	 * @method _getPointerData
	 * @protected
	 * @param {Number} id
	 **/
	p._getPointerData = function(id) {
		var data = this._pointerData[id];
		if (!data) {
			data = this._pointerData[id] = {x:0,y:0};
			// if it's the first new touch, then make it the primary pointer id:
			if (this._primaryPointerID == null) { this._primaryPointerID = id; }
			// if it's the mouse (id == -1) or the first new touch, then make it the primary pointer id:
		    if (this._primaryPointerID == null || this._primaryPointerID == -1) { this._primaryPointerID = id; }
		}
		return data;
	};

	/**
	 * @method _handleMouseMove
	 * @protected
	 * @param {MouseEvent} e
	 **/
	p._handleMouseMove = function(e) {
		if(!e){ e = window.event; }
		this._handlePointerMove(-1, e, e.pageX, e.pageY);
	};

	/**
	 * @method _handlePointerMove
	 * @protected
	 * @param {Number} id
	 * @param {Event} e
	 * @param {Number} pageX
	 * @param {Number} pageY
	 * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.
	 **/
	p._handlePointerMove = function(id, e, pageX, pageY, owner) {
		if (this._prevStage && owner === undefined) { return; } // redundant listener.
		if (!this.canvas) { return; }
		var nextStage=this._nextStage, o=this._getPointerData(id);

		var inBounds = o.inBounds;
		this._updatePointerPosition(id, e, pageX, pageY);
		if (inBounds || o.inBounds || this.mouseMoveOutside) {
			if (id == -1 && o.inBounds == !inBounds) {
				this._dispatchMouseEvent(this, (inBounds ? "mouseleave" : "mouseenter"), false, id, o, e);
			}

			this._dispatchMouseEvent(this, "stagemousemove", false, id, o, e);
			this._dispatchMouseEvent(o.target, "pressmove", true, id, o, e);
		}

		nextStage&&nextStage._handlePointerMove(id, e, pageX, pageY, null);
	};

	/**
	 * @method _updatePointerPosition
	 * @protected
	 * @param {Number} id
	 * @param {Event} e
	 * @param {Number} pageX
	 * @param {Number} pageY
	 **/
	p._updatePointerPosition = function(id, e, pageX, pageY) {
		var rect = this._getElementRect(this.canvas);
		pageX -= rect.left;
		pageY -= rect.top;

		var w = this.canvas.width;
		var h = this.canvas.height;
		pageX /= (rect.right-rect.left)/w;
		pageY /= (rect.bottom-rect.top)/h;
		var o = this._getPointerData(id);
		if (o.inBounds = (pageX >= 0 && pageY >= 0 && pageX <= w-1 && pageY <= h-1)) {
			o.x = pageX;
			o.y = pageY;
		} else if (this.mouseMoveOutside) {
			o.x = pageX < 0 ? 0 : (pageX > w-1 ? w-1 : pageX);
			o.y = pageY < 0 ? 0 : (pageY > h-1 ? h-1 : pageY);
		}

		o.posEvtObj = e;
		o.rawX = pageX;
		o.rawY = pageY;

		if (id == this._primaryPointerID) {
			this.mouseX = o.x;
			this.mouseY = o.y;
			this.mouseInBounds = o.inBounds;
		}
	};

	/**
	 * @method _handleMouseUp
	 * @protected
	 * @param {MouseEvent} e
	 **/
	p._handleMouseUp = function(e) {
		this._handlePointerUp(-1, e, false);
	};

	/**
	 * @method _handlePointerUp
	 * @protected
	 * @param {Number} id
	 * @param {Event} e
	 * @param {Boolean} clear
	 * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.
	 **/
	p._handlePointerUp = function(id, e, clear, owner) {
		var nextStage = this._nextStage, o = this._getPointerData(id);
		if (this._prevStage && owner === undefined) { return; } // redundant listener.

		this._dispatchMouseEvent(this, "stagemouseup", false, id, o, e);

		var target=null, oTarget = o.target;
		if (!owner && (oTarget || nextStage)) { target = this._getObjectsUnderPoint(o.x, o.y, null, true); }
		if (target == oTarget) { this._dispatchMouseEvent(oTarget, "click", true, id, o, e); }
		this._dispatchMouseEvent(oTarget, "pressup", true, id, o, e);

		if (clear) {
			if (id==this._primaryPointerID) { this._primaryPointerID = null; }
			delete(this._pointerData[id]);
		} else { o.target = null; }

		nextStage&&nextStage._handlePointerUp(id, e, clear, owner || target && this);
	};

	/**
	 * @method _handleMouseDown
	 * @protected
	 * @param {MouseEvent} e
	 **/
	p._handleMouseDown = function(e) {
		this._handlePointerDown(-1, e, e.pageX, e.pageY);
	};

	/**
	 * @method _handlePointerDown
	 * @protected
	 * @param {Number} id
	 * @param {Event} e
	 * @param {Number} pageX
	 * @param {Number} pageY
	 * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.
	 **/
	p._handlePointerDown = function(id, e, pageX, pageY, owner) {
		if (pageY != null) { this._updatePointerPosition(id, e, pageX, pageY); }
		var target = null, nextStage = this._nextStage, o = this._getPointerData(id);

		if (o.inBounds) { this._dispatchMouseEvent(this, "stagemousedown", false, id, o, e); }

		if (!owner) {
			target = o.target = this._getObjectsUnderPoint(o.x, o.y, null, true);
			this._dispatchMouseEvent(o.target, "mousedown", true, id, o, e);
		}

		nextStage&&nextStage._handlePointerDown(id, e, pageX, pageY, owner || target && this);
	};

	/**
	 * @method _testMouseOver
	 * @param {Boolean} clear If true, clears the mouseover / rollover (ie. no target)
	 * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.
	 * @param {Stage} eventTarget The stage that the cursor is actively over.
	 * @protected
	 **/
	p._testMouseOver = function(clear, owner, eventTarget) {
		if (this._prevStage && owner === undefined) { return; } // redundant listener.

		var nextStage = this._nextStage;
		if (!this._mouseOverIntervalID) {
			// not enabled for mouseover, but should still relay the event.
			nextStage&&nextStage._testMouseOver(clear, owner, eventTarget);
			return;
		}

		// only update if the mouse position has changed. This provides a lot of optimization, but has some trade-offs.
		if (this._primaryPointerID != -1 || (!clear && this.mouseX == this._mouseOverX && this.mouseY == this._mouseOverY && this.mouseInBounds)) { return; }

		var o = this._getPointerData(-1), e = o.posEvtObj;
		var isEventTarget = eventTarget || e&&(e.target == this.canvas);
		var target=null, common = -1, cursor="", t, i, l;

		if (!owner && (clear || this.mouseInBounds && isEventTarget)) {
			target = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, true);
			this._mouseOverX = this.mouseX;
			this._mouseOverY = this.mouseY;
		}

		var oldList = this._mouseOverTarget||[];
		var oldTarget = oldList[oldList.length-1];
		var list = this._mouseOverTarget = [];

		// generate ancestor list and check for cursor:
		t = target;
		while (t) {
			list.unshift(t);
			if (t.cursor != null) { cursor = t.cursor; }
			t = t.parent;
		}
		this.canvas.style.cursor = cursor;
		if (!owner && eventTarget) { eventTarget.canvas.style.cursor = cursor; }

		// find common ancestor:
		for (i=0,l=list.length; i<l; i++) {
			if (list[i] != oldList[i]) { break; }
			common = i;
		}

		if (oldTarget != target) {
			this._dispatchMouseEvent(oldTarget, "mouseout", true, -1, o, e);
		}

		for (i=oldList.length-1; i>common; i--) {
			this._dispatchMouseEvent(oldList[i], "rollout", false, -1, o, e);
		}

		for (i=list.length-1; i>common; i--) {
			this._dispatchMouseEvent(list[i], "rollover", false, -1, o, e);
		}

		if (oldTarget != target) {
			this._dispatchMouseEvent(target, "mouseover", true, -1, o, e);
		}

		nextStage&&nextStage._testMouseOver(clear, owner || target && this, eventTarget || isEventTarget && this);
	};

	/**
	 * @method _handleDoubleClick
	 * @protected
	 * @param {MouseEvent} e
	 * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.
	 **/
	p._handleDoubleClick = function(e, owner) {
		var target=null, nextStage=this._nextStage, o=this._getPointerData(-1);
		if (!owner) {
			target = this._getObjectsUnderPoint(o.x, o.y, null, true);
			this._dispatchMouseEvent(target, "dblclick", true, -1, o, e);
		}
		nextStage&&nextStage._handleDoubleClick(e, owner || target && this);
	};

	/**
	 * @method _dispatchMouseEvent
	 * @protected
	 * @param {DisplayObject} target
	 * @param {String} type
	 * @param {Boolean} bubbles
	 * @param {Number} pointerId
	 * @param {Object} o
	 * @param {MouseEvent} [nativeEvent]
	 **/
	p._dispatchMouseEvent = function(target, type, bubbles, pointerId, o, nativeEvent) {
		// TODO: might be worth either reusing MouseEvent instances, or adding a willTrigger method to avoid GC.
		if (!target || (!bubbles && !target.hasEventListener(type))) { return; }
		/*
		// TODO: account for stage transformations:
		this._mtx = this.getConcatenatedMatrix(this._mtx).invert();
		var pt = this._mtx.transformPoint(o.x, o.y);
		var evt = new createjs.MouseEvent(type, bubbles, false, pt.x, pt.y, nativeEvent, pointerId, pointerId==this._primaryPointerID, o.rawX, o.rawY);
		*/
		var evt = new createjs.MouseEvent(type, bubbles, false, o.x, o.y, nativeEvent, pointerId, pointerId==this._primaryPointerID, o.rawX, o.rawY);
		target.dispatchEvent(evt);
	};

createjs.Stage = Stage;
}());


text:
package cpe

import (
	"strconv"

	"github.com/scylladb/go-set/strset"
)

// fieldCandidate represents a single "guess" for a specific field in a future CPE (vendor, product, target SW, etc).
// When generating these candidates depending on the field the value was sourced from there may be only a subset of
// transforms that should be applied (downstream of extraction). Expressing candidates in this struct allows for this
// flexibility such that downstream transforms can be elected into or skipped over.
type fieldCandidate struct {
	value                       string
	disallowSubSelections       bool
	disallowDelimiterVariations bool
}

type fieldCandidateSet map[fieldCandidate]struct{}

func newFieldCandidateSetFromSets(sets ...fieldCandidateSet) fieldCandidateSet {
	s := newFieldCandidateSet()
	for _, set := range sets {
		s.add(set.list()...)
	}
	return s
}

func newFieldCandidateSet(values ...string) fieldCandidateSet {
	s := make(fieldCandidateSet)
	s.addValue(values...)
	return s
}

func (s fieldCandidateSet) addValue(values ...string) {
	for _, value := range values {
		// default candidate as an allow-all
		candidate := fieldCandidate{
			value: cleanCandidateField(value),
		}
		s[candidate] = struct{}{}
	}
}

func (s fieldCandidateSet) add(candidates ...fieldCandidate) {
	for _, candidate := range candidates {
		candidate.value = cleanCandidateField(candidate.value)
		s[candidate] = struct{}{}
	}
}

func (s fieldCandidateSet) removeByValue(values ...string) {
	for _, value := range values {
		s.removeWhere(valueEquals(value))
	}
}

// removeWhere removes all entries from the fieldCandidateSet for which the condition function returns true.
func (s fieldCandidateSet) removeWhere(condition fieldCandidateCondition) {
	for candidate := range s {
		if condition(candidate) {
			delete(s, candidate)
		}
	}
}

func (s fieldCandidateSet) clear() {
	for k := range s {
		delete(s, k)
	}
}

func (s fieldCandidateSet) union(others ...fieldCandidateSet) {
	for _, other := range others {
		s.add(other.list()...)
	}
}

func (s fieldCandidateSet) list() (results []fieldCandidate) {
	for c := range s {
		results = append(results, c)
	}

	return results
}

func (s fieldCandidateSet) values() (results []string) {
	for _, c := range s.list() {
		results = append(results, c.value)
	}

	return results
}

func (s fieldCandidateSet) uniqueValues() []string {
	return strset.New(s.values()...).List()
}

func (s fieldCandidateSet) copy() fieldCandidateSet {
	newSet := newFieldCandidateSet()
	newSet.add(s.list()...)

	return newSet
}

func cleanCandidateField(field string) string {
	cleanedValue, err := strconv.Unquote(field)
	if err != nil {
		return field
	}
	return cleanedValue
}


text:
package de.bund.bva.isyfact.serviceapi.core.httpinvoker;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.HttpURLConnection;

import org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration;
import org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor;
import org.springframework.remoting.support.RemoteInvocationResult;

import de.bund.bva.isyfact.logging.IsyLogger;
import de.bund.bva.isyfact.logging.IsyLoggerFactory;
import de.bund.bva.isyfact.logging.LogKategorie;
import de.bund.bva.isyfact.serviceapi.common.konstanten.EreignisSchluessel;

/**
 * Erweiterung des {@link SimpleHttpInvokerRequestExecutor} von Spring. Diese Erweiterung erlaubt es den
 * Timeout und eine Aufrufwiederholung zu konfigurieren.
 *
 *
 */
public class TimeoutWiederholungHttpInvokerRequestExecutor extends SimpleHttpInvokerRequestExecutor {

    /** Isy-Logger. */
    private static final IsyLogger LOG = IsyLoggerFactory
        .getLogger(TimeoutWiederholungHttpInvokerRequestExecutor.class);

    /** Timeout für Request. */
    private int timeout;

    /** Anzahl Wiederholungen bei Timeouts. */
    private int anzahlWiederholungen;

    /** Pause zwischen Wiederholungen. */
    private int wiederholungenAbstand;

    /**
     * {@inheritDoc}
     */
    @Override
    protected RemoteInvocationResult doExecuteRequest(HttpInvokerClientConfiguration config,
        ByteArrayOutputStream baos) throws IOException, ClassNotFoundException {
        int versuch = 0;
        while (true) {
            try {
                return super.doExecuteRequest(config, baos);
            } catch (InterruptedIOException requestException) {
                LOG.info(LogKategorie.PROFILING, EreignisSchluessel.TIMEOUT,
                    "Beim Aufrufen des Services [{}] ist ein Timeout aufgetreten.", config.getServiceUrl());
                versuch++;
                if (versuch == this.anzahlWiederholungen) {
                    LOG.info(LogKategorie.PROFILING, EreignisSchluessel.TIMEOUT_ABBRUCH,
                        "Aufruf nach Timeout abgebrochen.");
                    throw requestException;
                }
                try {
                    if (this.wiederholungenAbstand > 0) {
                        LOG.info(LogKategorie.PROFILING, EreignisSchluessel.TIMEOUT_WARTEZEIT,
                            "Warte {}ms bis zur Wiederholung des Aufrufs.", this.wiederholungenAbstand);
                        Thread.sleep(this.wiederholungenAbstand);
                    }
                } catch (InterruptedException ex) {
                    LOG.info(LogKategorie.PROFILING, EreignisSchluessel.TIMEOUT_WARTEZEIT_ABBRUCH,
                        "Warten auf Aufrufwiederholung abgebrochen", ex);
                    throw requestException;
                }
                LOG.info(LogKategorie.PROFILING, EreignisSchluessel.TIMEOUT_WIEDERHOLUNG,
                    "Wiederhole Aufruf...");
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void prepareConnection(HttpURLConnection con, int contentLength) throws IOException {
        super.prepareConnection(con, contentLength);
        con.setReadTimeout(this.timeout);
        con.setConnectTimeout(this.timeout);
    }

    /**
     * Setzt den Timeout in Millisekunden. Der Timeout wird beim Aufbau und beim Lesen über die
     * HTTP-Connection verwendet.
     * @see HttpURLConnection#setConnectTimeout(int)
     * @see HttpURLConnection#setReadTimeout(int)
     * @param timeout
     *            Timeout in Millisekunden.
     */
    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    /**
     * Hierüber wird festgelegt, wie oft der Aufruf bei einem Timeout wiederholt werden soll. Default ist 0.
     * @param anzahlWiederholungen
     *            Anzahl Wiederholungen bei Timeouts.
     */
    public void setAnzahlWiederholungen(int anzahlWiederholungen) {
        this.anzahlWiederholungen = anzahlWiederholungen;
    }

    /**
     * Hierüber wird festgelegt, wie lange zwischen zwei Aufrufwiederholungen gewartet werden soll. Default
     * ist 0.
     * @see #setAnzahlWiederholungen(int)
     * @param wiederholungenAbstand
     *            Pause zwischen den Wiederholungen in Millisekunden.
     */
    public void setWiederholungenAbstand(int wiederholungenAbstand) {
        this.wiederholungenAbstand = wiederholungenAbstand;
    }
}


text:
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices

' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.

' Review the values of the assembly attributes

<Assembly: AssemblyTitle("ExactOnline.Client.Models")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Exact Online Client SDK")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>

'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("7c0090a0-5ac0-4699-bec6-10f6167471f5")>

' Version information for an assembly consists of the following four values:
'
'      Major Version
'      Minor Version
'      Build Number
'      Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")>


text:
When(/^I navigate to sign in page$/) do
  login_page = LoginPage.new(@driver).go_to
  login_page.is_current_page?.should == true
end

Then(/^I should logged in successfully$/) do
  FlightFinderPage.new(@driver).is_current_page?.should == true
end

And(/^I login using login page with credentials (.*) and password (.*)$/) do |username, password|
  LoginPage.new(@driver).login_with_existing_credentials(username, password)
end

And(/^I login using login page with wrong credentials (.*) and password (.*)$/) do|username, password|
  LoginPage.new(@driver).login_with_existing_credentials(username, password)
end

Then(/^I should stay on the login page$/) do
  LoginPage.new(@driver).is_current_page?.should == true
end

And(/^I (sign off) from mercury tour$/) do |element|
  LoginPage.new(@driver).select_an_element(element)
end


text:
namespace Subtext.Framework.Text
{
    public interface ITextExpression
    {
        string Eval(object o);
    }
}


text:
using GitHub, GitHub.name
using Base.Test

# The below tests are network-dependent, and actually make calls to GitHub's
# API. They're all read-only, meaning none of them require authentication.

testuser = Owner("julia-github-test-bot")
julweb = Owner("JuliaWeb", true)
ghjl = Repo("JuliaWeb/GitHub.jl")
testcommit = Commit("3a90e7d64d6184b877f800570155c502b1119c15")
testuser_pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVDBxFza4BmQTCTFeTyK"*
    "3xT+T98dmiMWXC2lM/esw3MCRHg7cynLWr/jUgjs72DO2nqlCTKI88yd2gcbW5/pBP6NVumc"*
    "pM7eJzZJ3TKKwdGUD49nahncg5imHZUQbCqtQbAYEj+uFfqa9QNm6NkZdAdPdB6dJG2+QEuk"*
    "rIGWKsmihP7vGzRLdebGwng2aNUfdAyVwq5Af4g5qfyRT9MtOXXM/7tDAVfC/g4QjkQ52giG"*
    "3FRqehMHOfl4iw9cYggJ3owr+T/RhwBHhE9G+sIaq4cEjRxogf65xzJfRtxxM2RBYDM9GMyX"*
    "6s2dFghew6MMc2x7OJM30W+OedhtZuk3Xp"

hasghobj(obj, items) = any(x -> name(x) == name(obj), items)

# This token has public, read-only access, and is required so that our
# tests don't get rate-limited. The only way a malicious party could do harm
# with this token is if they used it to abuse the rate limit associated with
# the token (not too big of a deal). The token is hard-coded in an obsfucated
# manner in an attempt to thwart token-stealing crawlers.
auth = authenticate(string(circshift(["bcc", "3fc", "03a", "33e",
                                      "c09", "363", "5f1", "bd3",
                                      "fc6", "77b", '5', "9cf",
                                      "868", "033"], 3)...))

@test rate_limit(; auth = auth)["rate"]["limit"] == 5000

##########
# Owners #
##########

# test GitHub.owner
@test name(owner(testuser; auth = auth)) == name(testuser)
@test name(owner(julweb; auth = auth)) == name(julweb)

# test GitHub.orgs
@test hasghobj("JuliaWeb", first(orgs("jrevels"; auth = auth)))

# test GitHub.followers, GitHub.following
@test hasghobj("jrevels", first(followers(testuser; auth = auth)))
@test hasghobj("jrevels", first(following(testuser; auth = auth)))

# test GitHub.repos
@test hasghobj(ghjl, first(repos(julweb; auth = auth)))

# test pubkey retrieval
@test first(values(GitHub.pubkeys(testuser; auth = auth)[1])) == testuser_pubkey

# test membership queries
@test GitHub.check_membership(julweb, testuser; auth = auth)
@test !GitHub.check_membership("JuliaLang", testuser; auth = auth, public_only=true)

################
# Repositories #
################

# test GitHub.repo
@test name(repo(ghjl; auth = auth)) == name(ghjl)

# test GitHub.forks
@test length(first(forks(ghjl; auth = auth))) > 0

# test GitHub.contributors
@test hasghobj("jrevels", map(x->x["contributor"], first(contributors(ghjl; auth = auth))))

# test GitHub.stats
@test stats(ghjl, "contributors"; auth = auth).status < 300

# test GitHub.branch, GitHub.branches
@test name(branch(ghjl, "master"; auth = auth)) == "master"
@test hasghobj("master", first(branches(ghjl; auth = auth)))

# test GitHub.commit, GitHub.commits
@test name(commit(ghjl, testcommit; auth = auth)) == name(testcommit)
@test hasghobj(testcommit, first(commits(ghjl; auth = auth)))

# test GitHub.file, GitHub.directory, GitHub.readme, GitHub.permalink
readme_file = file(ghjl, "README.md"; auth = auth)
src_dir = first(directory(ghjl, "src"; auth = auth))
owners_dir = src_dir[findfirst(c -> get(c.path) == "src/owners", src_dir)]
test_sha = "eab14e1ab7b4de848ef6390101b6d40b489d5d08"
readme_permalink = string(permalink(readme_file, test_sha))
owners_permalink = string(permalink(owners_dir, test_sha))
@test readme_permalink == "https://github.com/JuliaWeb/GitHub.jl/blob/$(test_sha)/README.md"
@test owners_permalink == "https://github.com/JuliaWeb/GitHub.jl/tree/$(test_sha)/src/owners"
@test readme_file == readme(ghjl; auth = auth)
@test hasghobj("src/GitHub.jl", src_dir)

# test GitHub.status, GitHub.statuses
@test get(status(ghjl, testcommit; auth = auth).sha) == name(testcommit)
@test !(isempty(first(statuses(ghjl, testcommit; auth = auth))))

# test GitHub.comment, GitHub.comments
@test name(comment(ghjl, 154431956; auth = auth)) == 154431956
@test !(isempty(first(comments(ghjl, 40; auth = auth))))

# These require `auth` to have push-access (it's currently a read-only token)
# @test hasghobj("jrevels", first(collaborators(ghjl; auth = auth)))
# @test iscollaborator(ghjl, "jrevels"; auth = auth)

##########
# Issues #
##########

state_param = Dict("state" => "all")

# test GitHub.pull_request, GitHub.pull_requests
@test get(pull_request(ghjl, 37; auth = auth).title) == "Fix dep warnings"
@test hasghobj(37, first(pull_requests(ghjl; auth = auth, params = state_param)))

# test GitHub.issue, GitHub.issues
@test get(issue(ghjl, 40; auth = auth).title) == "Needs test"
@test hasghobj(40, first(issues(ghjl; auth = auth, params = state_param)))

############
# Activity #
############

# test GitHub.stargazers, GitHub.starred
@test length(first(stargazers(ghjl; auth = auth))) > 10 # every package should fail tests if it's not popular enough :p
@test hasghobj(ghjl, first(starred(testuser; auth = auth)))

# test GitHub.watched, GitHub.watched
@test hasghobj(testuser, first(watchers(ghjl; auth = auth)))
@test hasghobj(ghjl, first(watched(testuser; auth = auth)))


text:
<?php
class ControllerSaleContact extends Controller {
	private $error = array();

	public function index() {
		$this->load->language('sale/contact');

		$this->document->title = $this->language->get('heading_title');

		$this->load->model('sale/customer');

		if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {
			$this->load->model('setting/store');

			$store_info = $this->model_setting_store->getStore($this->request->post['store_id']);

			if ($store_info) {
				$store_name = $store_info['name'];
			} else {
				$store_name = $this->config->get('config_name');
			}

			$emails = array();

			// All customers by group
			if (isset($this->request->post['group'])) {
				switch ($this->request->post['group']) {
					case 'newsletter':
						$results = $this->model_sale_customer->getCustomersByNewsletter();

						foreach ($results as $result) {
							$emails[$result['customer_id']] = $result['email'];
						}
						break;
					case 'customer':
						$results = $this->model_sale_customer->getCustomers();

						foreach ($results as $result) {
							$emails[$result['customer_id']] = $result['email'];
						}
						break;
				}
			}

			// All customers by name/email
			if (isset($this->request->post['to']) && $this->request->post['to']) {
				foreach ($this->request->post['to'] as $customer_id) {
					$customer_info = $this->model_sale_customer->getCustomer($customer_id);

					if ($customer_info) {
						$emails[] = $customer_info['email'];
					}
				}
			}

			// All customers by product
			if (isset($this->request->post['product'])) {
				foreach ($this->request->post['product'] as $product_id) {
					$results = $this->model_sale_customer->getCustomersByProduct($product_id);

					foreach ($results as $result) {
						$emails[] = $result['email'];
					}
				}
			}

			// Prevent Duplicates
			$emails = array_unique($emails);

			if ($emails) {
				$message  = '' . "\n";
				$message .= '' . "\n";
				$message .= '<title>' . $this->request->post['subject'] . '</title>' . "\n";
				$message .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' . "\n";
				$message .= '' . "\n";
				$message .= '' . html_entity_decode($this->request->post['message'], ENT_QUOTES, 'UTF-8') . '' . "\n";
				$message .= '' . "\n";

				$attachments = array();

				if (preg_match_all('#(src="([^"]*)")#mis', $message, $matches)) {
					foreach ($matches[2] as $key => $value) {
						$filename = md5($value) . strrchr($value, '.');
						$path = rtrim($this->request->server['DOCUMENT_ROOT'], '/') . parse_url($value, PHP_URL_PATH);

						$attachments[] = array(
							'filename' => $filename,
							'path'     => $path
						);

						$message = str_replace($value, 'cid:' . basename($filename), $message);
					}
				}

				foreach ($emails as $email) {
					$mail = new Mail();
					$mail->protocol = $this->config->get('config_mail_protocol');
					$mail->parameter = $this->config->get('config_mail_parameter');
					$mail->hostname = $this->config->get('config_smtp_host');
					$mail->username = $this->config->get('config_smtp_username');
					$mail->password = $this->config->get('config_smtp_password');
					$mail->port = $this->config->get('config_smtp_port');
					$mail->timeout = $this->config->get('config_smtp_timeout');
					$mail->setTo($email);
					$mail->setFrom($this->config->get('config_email'));
					$mail->setSender($store_name);
					$mail->setSubject($this->request->post['subject']);

					foreach ($attachments as $attachment) {
						$mail->addAttachment($attachment['path'], $attachment['filename']);
					}

					$mail->setHtml($message);
					$mail->send();
				}
			}

			$this->session->data['success'] = $this->language->get('text_success');
		}

		$this->data['heading_title'] = $this->language->get('heading_title');

		$this->data['text_newsletter'] = $this->language->get('text_newsletter');
		$this->data['text_customer'] = $this->language->get('text_customer');
		$this->data['text_search'] = $this->language->get('text_search');
		$this->data['text_default'] = $this->language->get('text_default');

		$this->data['entry_store'] = $this->language->get('entry_store');
		$this->data['entry_to'] = $this->language->get('entry_to');
		$this->data['entry_product'] = $this->language->get('entry_product');
		$this->data['entry_subject'] = $this->language->get('entry_subject');
		$this->data['entry_message'] = $this->language->get('entry_message');

		$this->data['button_send'] = $this->language->get('button_send');
		$this->data['button_cancel'] = $this->language->get('button_cancel');

		$this->data['tab_general'] = $this->language->get('tab_general');

		$this->data['token'] = $this->session->data['token'];

 		if (isset($this->error['warning'])) {
			$this->data['error_warning'] = $this->error['warning'];
		} else {
			$this->data['error_warning'] = '';
		}

 		if (isset($this->error['subject'])) {
			$this->data['error_subject'] = $this->error['subject'];
		} else {
			$this->data['error_subject'] = '';
		}

		if (isset($this->error['message'])) {
			$this->data['error_message'] = $this->error['message'];
		} else {
			$this->data['error_message'] = '';
		}

  		$this->document->breadcrumbs = array();

   		$this->document->breadcrumbs[] = array(
       		'href'      => HTTPS_SERVER . 'index.php?route=common/home&token=' . $this->session->data['token'],
       		'text'      => $this->language->get('text_home'),
      		'separator' => FALSE
   		);

   		$this->document->breadcrumbs[] = array(
       		'href'      => HTTPS_SERVER . 'index.php?route=sale/contact&token=' . $this->session->data['token'],
       		'text'      => $this->language->get('heading_title'),
      		'separator' => ' :: '
   		);

		if (isset($this->session->data['success'])) {
			$this->data['success'] = $this->session->data['success'];

			unset($this->session->data['success']);
		} else {
			$this->data['success'] = '';
		}

		$this->data['action'] = HTTPS_SERVER . 'index.php?route=sale/contact&token=' . $this->session->data['token'];
    	$this->data['cancel'] = HTTPS_SERVER . 'index.php?route=sale/contact&token=' . $this->session->data['token'];

		if (isset($this->request->post['store_id'])) {
			$this->data['store_id'] = $this->request->post['store_id'];
		} else {
			$this->data['store_id'] = '';
		}

		$this->load->model('setting/store');

		$this->data['stores'] = $this->model_setting_store->getStores();

		$this->data['customers'] = array();

		if (isset($this->request->post['to']) && $this->request->post['to']) {
			foreach ($this->request->post['to'] as $customer_id) {
				$customer_info = $this->model_sale_customer->getCustomer($customer_id);

				if ($customer_info) {
					$this->data['customers'][] = array(
						'customer_id' => $customer_info['customer_id'],
						'name'        => $customer_info['firstname'] . ' ' . $customer_info['lastname'] . ' (' . $customer_info['email'] . ')'
					);
				}
			}
		}

		$this->load->model('catalog/product');

		$this->data['products'] = $this->model_catalog_product->getProducts();

		if (isset($this->request->post['product'])) {
			$this->data['product'] = $this->request->post['product'];
		} else {
			$this->data['product'] = '';
		}

		if (isset($this->request->post['group'])) {
			$this->data['group'] = $this->request->post['group'];
		} else {
			$this->data['group'] = '';
		}

		if (isset($this->request->post['subject'])) {
			$this->data['subject'] = $this->request->post['subject'];
		} else {
			$this->data['subject'] = '';
		}

		if (isset($this->request->post['message'])) {
			$this->data['message'] = $this->request->post['message'];
		} else {
			$this->data['message'] = '';
		}

		$this->load->model('catalog/category');

		$this->data['categories'] = $this->model_catalog_category->getCategories(0);

		$this->template = 'sale/contact.tpl';
		$this->children = array(
			'common/header',
			'common/footer'
		);

		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
	}

	public function customers() {
		$this->load->model('sale/customer');

		$customer_data = array();

		if (isset($this->request->get['keyword']) && $this->request->get['keyword']) {
			$results = $this->model_sale_customer->getCustomersByKeyword($this->request->get['keyword']);

			foreach ($results as $result) {
				$customer_data[] = array(
					'customer_id' => $result['customer_id'],
					'name'        => $result['firstname'] . ' ' . $result['lastname'] . ' (' . $result['email'] . ')'
				);
			}
		}

		$this->load->library('json');

		$this->response->setOutput(Json::encode($customer_data));
	}

	private function validate() {
		if (!$this->user->hasPermission('modify', 'sale/contact')) {
			$this->error['warning'] = $this->language->get('error_permission');
		}

		if (!$this->request->post['subject']) {
			$this->error['subject'] = $this->language->get('error_subject');
		}

		if (!$this->request->post['message']) {
			$this->error['message'] = $this->language->get('error_message');
		}

		if (!$this->error) {
			return TRUE;
		} else {
			return FALSE;
		}
	}

	public function category() {
		$this->load->model('catalog/product');

		if (isset($this->request->get['category_id'])) {
			$category_id = $this->request->get['category_id'];
		} else {
			$category_id = 0;
		}

		$product_data = array();

		$results = $this->model_catalog_product->getProductsByCategoryId($category_id);

		foreach ($results as $result) {
			$product_data[] = array(
				'product_id' => $result['product_id'],
				'name'       => $result['name'],
				'model'      => $result['model']
			);
		}

		$this->load->library('json');

		$this->response->setOutput(Json::encode($product_data));
	}
}
?>


text:
package org.apache.flink.runtime.instance;

import java.io.IOException;

import org.apache.flink.core.io.IOReadableWritable;
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;

/**
 * A hardware description describes the resources available to a task manager.
 */
public final class HardwareDescription implements IOReadableWritable, java.io.Serializable {

	private static final long serialVersionUID = 3380016608300325361L;

	/** The number of CPU cores available to the JVM on the compute node. */
	private int numberOfCPUCores;

	/** The size of physical memory in bytes available on the compute node. */
	private long sizeOfPhysicalMemory;

	/** The size of the JVM heap memory */
	private long sizeOfJvmHeap;

	/** The size of the memory managed by the system for caching, hashing, sorting, ... */
	private long sizeOfManagedMemory;

	/**
	 * Public default constructor used for serialization process.
	 */
	public HardwareDescription() {}

	/**
	 * Constructs a new hardware description object.
	 *
	 * @param numberOfCPUCores The number of CPU cores available to the JVM on the compute node.
	 * @param sizeOfPhysicalMemory The size of physical memory in bytes available on the compute node.
	 * @param sizeOfJvmHeap The size of the JVM heap memory.
	 * @param sizeOfManagedMemory The size of the memory managed by the system for caching, hashing, sorting, ...
	 */
	public HardwareDescription(int numberOfCPUCores, long sizeOfPhysicalMemory, long sizeOfJvmHeap, long sizeOfManagedMemory) {
		this.numberOfCPUCores = numberOfCPUCores;
		this.sizeOfPhysicalMemory = sizeOfPhysicalMemory;
		this.sizeOfJvmHeap = sizeOfJvmHeap;
		this.sizeOfManagedMemory = sizeOfManagedMemory;
	}

	/**
	 * Returns the number of CPU cores available to the JVM on the compute node.
	 *
	 * @return the number of CPU cores available to the JVM on the compute node
	 */
	public int getNumberOfCPUCores() {
		return this.numberOfCPUCores;
	}

	/**
	 * Returns the size of physical memory in bytes available on the compute node.
	 *
	 * @return the size of physical memory in bytes available on the compute node
	 */
	public long getSizeOfPhysicalMemory() {
		return this.sizeOfPhysicalMemory;
	}

	/**
	 * Returns the size of the JVM heap memory
	 *
	 * @return The size of the JVM heap memory
	 */
	public long getSizeOfJvmHeap() {
		return this.sizeOfJvmHeap;
	}

	/**
	 * Returns the size of the memory managed by the system for caching, hashing, sorting, ...
	 *
	 * @return The size of the memory managed by the system.
	 */
	public long getSizeOfManagedMemory() {
		return this.sizeOfManagedMemory;
	}

	// --------------------------------------------------------------------------------------------
	// Serialization
	// --------------------------------------------------------------------------------------------

	@Override
	public void write(DataOutputView out) throws IOException {
		out.writeInt(this.numberOfCPUCores);
		out.writeLong(this.sizeOfPhysicalMemory);
		out.writeLong(this.sizeOfJvmHeap);
		out.writeLong(this.sizeOfManagedMemory);
	}

	@Override
	public void read(DataInputView in) throws IOException {
		this.numberOfCPUCores = in.readInt();
		this.sizeOfPhysicalMemory = in.readLong();
		this.sizeOfJvmHeap = in.readLong();
		this.sizeOfManagedMemory = in.readLong();
	}

	// --------------------------------------------------------------------------------------------
	// Utils
	// --------------------------------------------------------------------------------------------

	@Override
	public String toString() {
		return String.format("cores=%d, physMem=%d, heap=%d, managed=%d",
				numberOfCPUCores, sizeOfPhysicalMemory, sizeOfJvmHeap, sizeOfManagedMemory);
	}

	// --------------------------------------------------------------------------------------------
	// Factory
	// --------------------------------------------------------------------------------------------

	public static HardwareDescription extractFromSystem(long managedMemory) {
		final int numberOfCPUCores = Hardware.getNumberCPUCores();
		final long sizeOfJvmHeap = Runtime.getRuntime().maxMemory();
		final long sizeOfPhysicalMemory = Hardware.getSizeOfPhysicalMemory();

		return new HardwareDescription(numberOfCPUCores, sizeOfPhysicalMemory, sizeOfJvmHeap, managedMemory);
	}
}


text:
package com.awplab.core.scheduler.admin;

import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.Version;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;

/**
 * Created by andyphillips404 on 8/31/16.
 */
public abstract class AbstractSchedulerBean {

    public abstract String getScheduler();

    public abstract JobDetail getJobDetail();

    public String getJobKeyName() {
        return getJobDetail().getKey().getName();
    }

    public String getJobKeyGroup() {
        return getJobDetail().getKey().getGroup();
    }

    public String getJobClass() {
        return getJobDetail().getJobClass().getName();
    }

    public String getBundleName() {
        Bundle bundle = FrameworkUtil.getBundle(getJobDetail().getJobClass());
        return bundle.getSymbolicName();
    }

    public Version getBundleVersion() {
        Bundle bundle = FrameworkUtil.getBundle(getJobDetail().getJobClass());
        return bundle.getVersion();
    }

    public JobDataMap getJobDataMap() {
        return getJobDetail().getJobDataMap();
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/mergefile_list_item_height"
    android:background="@color/stand_bg"
    android:foreground="?attr/selectableItemBackground"
    android:gravity="center_vertical"
    android:orientation="horizontal">

    <View
        android:id="@+id/icon"
        android:layout_width="@dimen/mergefile_list_item_icon_width"
        android:layout_height="@dimen/mergefile_list_item_icon_width"
        android:layout_marginLeft="@dimen/padding_15"
        android:background="@color/font_3" />

    <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/padding_15"
        android:layout_weight="1"
        android:lines="1"
        android:maxLines="1"
        android:singleLine="true"
        android:text="touch.java"
        android:textColor="@color/font_1"
        android:textSize="14sp" />

    <TextView
        android:id="@+id/insertion"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/padding_15"
        android:text="+1"
        android:textColor="#FFA1CF64" />

    <TextView
        android:id="@+id/deletion"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/padding_15"
        android:layout_marginRight="@dimen/padding_15"
        android:text="-1"
        android:textColor="#FFF56061" />

</LinearLayout>


text:
=========================
PHPMD - PHP Mess Detector
=========================

This is the project site of *PHPMD*. It is a spin-off project of
`PHP Depend`__ and aims to be a PHP equivalent of the well known
Java tool `PMD`__. PHPMD can be seen as an user friendly and easy
to configure frontend for the raw metrics measured by PHP Depend.

__ http://pdepend.org
__ http://pmd.sourceforge.net

What PHPMD does is: It takes a given PHP source code base and look
for several potential problems within that source. These problems
can be things like:

- Possible bugs
- Suboptimal code
- Overcomplicated expressions
- Unused parameters, methods, properties

PHPMD is a young project and so it only provides a limited set of
pre defined rules, compared with it's brother PMD, that detect code
smells and possible errors within the analyzed source code. Checkout
the `rules section`__ to learn more about all implemented rules.

__ /rules/index.html

Recent Releases
===============

- 2012/12/14 - From now on we will use GitHub's `issue tracker`__ as our main
  ticket solution. The old PivotalTracker will not be used anymore.
- 2012/12/14 - PHPMD 1.4.1: This `release`__ integrates some pull requests from
  GitHub. Additionally it closes some long pending bugs.
- 2012/09/08 - PHPMD 1.4.0: This `release`__ integrates several longer pending
  pull requests and smaller bugfixes. One major addition is support for Composer
  as distribution channel.

- 2012/02/25 - PHPMD 1.3.2; This `release`__ closes a minor issue in PHPMD
  related to the Suhosin patch and ``memory_limit``.

- 2012/02/04 - PHPMD 1.3.0: This `release`__ depends on the latest PHP_Depend
  version 1.0.0.

- 2012/01/27 - PHPMD 1.2.1: New bugfix `release`__ of PHPMD that fixes several
  minor issues in PHPMD. Additionally we have updated to a more recent
  PHP_Depend version.

__ https://github.com/phpmd/phpmd/issues
__ /download/release/1.4.1/changelog.html
__ /download/release/1.4.0/changelog.html
__ /download/release/1.3.2/changelog.html
__ /download/release/1.3.0/changelog.html
__ /download/release/1.2.1/changelog.html


text:
START_ATF_NAMESPACE
    typedef _BIDI_DATA *LPBIDI_DATA;
END_ATF_NAMESPACE


text:
package org.netbeans.modules.multilangsourcefilepalette.java;

import javax.swing.text.BadLocationException;
import javax.swing.text.JTextComponent;
import org.netbeans.modules.multilangsourcefilepalette.PaletteUtilities;
import org.netbeans.modules.multilangsourcefilepalette.Customizer.*;
import org.openide.text.ActiveEditorDrop;

public class DoWhile implements ActiveEditorDrop {
    private Customizer c;
    private BooleanPanel bPanel;
    private String comment = "";
    private String booleanExpression = "";

    private String createBody() {
        String body = "";
        if(!comment.isEmpty()) body += String.format("// %s\n", comment);
        if (booleanExpression.isEmpty()) return "";
        body += String.format("do{\n\t//TODO\n}while(%s);", booleanExpression);
        return body;
    }

    @Override
    public boolean handleTransfer(JTextComponent targetComponent) {
        c = new Customizer(targetComponent);
        bPanel = new BooleanPanel(targetComponent);
        c.setDescriptionText("This is a do-while loop. The statement in the "
                + "Do body will execute at least once. If the\nwhile statement "
                + "is true, the statements in the Do body will repeat.");
        c.setExampleText("do {"
                + "\n    //statements execute at least once"
                + "\n} while (boolean expression);");
        c.addPanel(bPanel);
        bPanel.setLabelName("while");
        boolean accept = c.showDialog();
        if (accept) {
            comment = c.getComment();
            booleanExpression = bPanel.getjTextArea1Text();
            String body = createBody();
            try {
                PaletteUtilities.insert(body, targetComponent);
            } catch (BadLocationException ble) {
                accept = false;
            }
        }
        return accept;
    }

}


text:
FROM alpine:latest
ENV EDGE_REPOSITORY=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk update --repository $EDGE_REPOSITORY \
	&& apk add py-pip ca-certificates \
	&& apk add ffmpeg --repository $EDGE_REPOSITORY \
	&& rm -rf /var/cache/apk/*
RUN pip install youtube-dl
WORKDIR /tmp
ENTRYPOINT ["youtube-dl"]


text:
:: Copyright (c) 2016-2017 Heim László
:: Compile and link Solitaire demo application

:: Step #0: Turn echo off and create directories for objects and binaries
::          Copy dynamic link libraries to binary output

@echo off

echo Checking pre-requisities...

if not exist obj mkdir obj
if not exist obj\graphics mkdir obj\graphics
if not exist obj\tests mkdir obj\tests
if not exist obj\demo mkdir obj\demo

if not exist game mkdir game

if not exist game\io.dll copy third-party\io.dll game\io.dll
if not exist game\mio.dll copy third-party\mio.dll game\mio.dll
if not exist game\util.dll copy third-party\util.dll game\util.dll
if not exist game\gfx.dll copy third-party\gfx.dll game\gfx.dll

:: Step #1: Compile components
:: nasm MUST be added to path variable!
echo Compiling sources...

nasm -f win32 src/graphics/sprite.asm -o obj/graphics/sprite.obj
nasm -f win32 src/graphics/render.asm -o obj/graphics/render.obj
nasm -f win32 src/graphics/fonts.asm -o obj/graphics/fonts.obj
nasm -f win32 src/userutil.asm -o obj/userutil.obj
nasm -f win32 src/demo/snake_map.asm -o obj/demo/snake_map.obj
nasm -f win32 src/demo/score.asm -o obj/demo/score.obj

nasm -f win32 src/demo/snake.asm -o obj/snake.obj

::nasm -f win32 src/demo/cards.asm -o obj/demo/cards.obj

::nasm -f win32 src/demo/solitaire.asm -o obj/solitaire.obj

:: Step #2: Link tests
:: nlink MUST be added to path variable!
echo Linking game...

::nlink obj/solitaire.obj^
::      obj/graphics/fonts.obj^
::      obj/userutil.obj^
::      obj/graphics/sprite.obj^
::      obj/graphics/render.obj^
::      obj/demo/cards.obj^
::      -lthird-party/mio -lthird-party/io -lthird-party/util -lthird-party/gfx^
::      -o game/solitaire.exe

nlink obj/snake.obj^
      obj/graphics/fonts.obj^
      obj/userutil.obj^
      obj/graphics/sprite.obj^
      obj/graphics/render.obj^
      obj/demo/snake_map.obj^
      obj/demo/score.obj^
      -lthird-party/mio -lthird-party/io -lthird-party/util -lthird-party/gfx^
      -o game/snake.exe


text:
#include <QDebug>
#include <QUndoCommand>
#include <gui/GraphicsScene.h>
#include <gui/TableItem.h>
#include <gui/ItemGroup.h>
#include <gui/behaviour/DeleteItemCommand.h>

/*!
 * Ctor
 */
DeleteItemCommand::DeleteItemCommand(GraphicsScene &ipScene, QList<QGraphicsItem *> ipTableList, QUndoCommand *ipParent)
: QUndoCommand(ipParent)
, mScene(ipScene)
, mTableList(ipTableList)
{
    setText(QObject::tr("Delete table"));
}

/*!
 * Dtor
 */
DeleteItemCommand::~DeleteItemCommand()
{
}

/*!
 * \brief Undo add node
 */
void
DeleteItemCommand::undo()
{
    mScene.addItems(mTableList);
}

/*!
 * \brief Redo add node
 */
void
DeleteItemCommand::redo()
{
    mScene.deleteItems(mTableList);
}


text:
#ifndef _ANALYZESTAR_H
#define _ANALYZESTAR_H

#include "TObject.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TVector3.h"
#include "TTree.h"
#include "TFile.h"
#include "TBrowser.h"
#include "Event.h"
#include "Array.h"
#include "TBranch.h"
#include <vector>
#include <map>
#include "TChain.h"

class AnalyzeStar : public TObject{
 private:
  TList *fCanvasList;
  TList *fHisto1;
  TList *fHistTitle;
  TList *fHistAxis;
  TCanvas* fCanvas;
  TFile* fFile;
  TTree * fTree;
  TChain* fChain;
  Event* fEvent;
  TBranch* fBranch;
  Array* fArray;
  Array* fCoreArray;
  HitStation* fHitStation;
  vector<HitStation> fStList;

 public:
  AnalyzeStar();
  ~AnalyzeStar();
  void CompareProfiles();
  void ComputeNbotDistr(int energy, int tta);
  void DoLadybot();
  void DoLadybotToT();
  void DoLTP(char *energy);
  void DrawSaturatedTrace(int ipm );
  void DrawSaturatedTrace();
  void GetStation(Int_t sta);
  void GetStation(Int_t sta,Int_t gain);
  void LateralProfile();
  void PlotNbotDistr();
  void PrintS1000(char *energy);
  void PrintTree();
  void ReadFilesCDF(char * Energy,char * tta);
  void ReadFilesLTP();
  void ReadFile(char * file ,int opt);

   /*

  void DrawEvent();
  void Help();
  */
 private:

  ClassDef(AnalyzeStar,1)
    };
#endif


text:
var express = require('express');
var router = express.Router();
var configJson = require('../../config.json');
/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'ONF-POC3 Test Automation Framework', mediatorData : JSON.stringify(configJson.topology) } );
});

module.exports = router;