text:
'use strict';

define(['tree'], function(Tree){
    describe('Tree simple', function(){
        it('Tree add (no arguments)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');
            ids.b = tree.add('B');

            assert.deepEqual(tree.children(), [ids.a, ids.b]);
        });

        it('Tree add (append)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');
            ids.b = tree.add('B');

            ids.aa = tree.add('AA', ids.a);
            ids.ab = tree.add('AB', ids.a);
            ids.ac = tree.add('AC', ids.a);

            ids.ba = tree.add('BA', ids.b);

            assert.deepEqual(tree.children(), [ids.a, ids.b]);
            assert.deepEqual(tree.children(ids.a), [ids.aa, ids.ab, ids.ac]);
            assert.deepEqual(tree.children(ids.b), [ids.ba]);
        });

        it('Tree add (prepend)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A', Tree.ROOT_ID, Tree.MODE.PREPEND);
            ids.b = tree.add('B', Tree.ROOT_ID, Tree.MODE.PREPEND);

            ids.aa = tree.add('AA', ids.a, Tree.MODE.PREPEND);
            ids.ab = tree.add('AB', ids.a, Tree.MODE.PREPEND);
            ids.ac = tree.add('AC', ids.a, Tree.MODE.PREPEND);

            assert.deepEqual(tree.children(), [ids.b, ids.a]);
            assert.deepEqual(tree.children(ids.a), [ids.ac, ids.ab, ids.aa]);
        });

        it('Tree add (after)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A', Tree.ROOT_ID, Tree.MODE.PREPEND);
            ids.b = tree.add('B', ids.a, Tree.MODE.AFTER);
            ids.c = tree.add('C', ids.a, Tree.MODE.AFTER);

            assert.deepEqual(tree.children(), [ids.a, ids.c, ids.b]);
        });

        it('Tree add (before)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A', Tree.ROOT_ID);
            ids.b = tree.add('B', ids.a, Tree.MODE.BEFORE);
            ids.c = tree.add('C', ids.a, Tree.MODE.BEFORE);

            assert.deepEqual(tree.children(), [ids.b, ids.c, ids.a]);
        });

        it('Tree item', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');
            ids.b = tree.add('B');

            assert.strictEqual('A', tree.item(ids.a));
            assert.strictEqual('B', tree.item(ids.b));
        });

        it('Tree state (get)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');

            assert.strictEqual(tree.state(ids.a), Tree.STATES.DISABLED);
        });

        it('Tree state (set)', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');

            tree.state(ids.a, 1);
            assert.strictEqual(tree.state(ids.a), Tree.STATES.ENABLED);

            tree.state(ids.a, 0);
            assert.strictEqual(tree.state(ids.a), Tree.STATES.DISABLED);

            tree.state(ids.a, Tree.STATES.ENABLED);
            assert.strictEqual(tree.state(ids.a), Tree.STATES.ENABLED);

            tree.state(ids.a, Tree.STATES.DISABLED);
            assert.strictEqual(tree.state(ids.a), Tree.STATES.DISABLED);

            tree.state(ids.a, 2);
            assert.strictEqual(tree.state(ids.a), Tree.STATES.DISABLED);
        });

        it('Tree parent', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');
            ids.b = tree.add('B');

            ids.aa = tree.add('AA', ids.a);
            ids.aaa = tree.add('AAA', ids.aa);

            ids.bb = tree.add('BB', ids.b);
            ids.bbb = tree.add('BBB', ids.bb);

            assert.strictEqual('A', tree.item(ids.a));
            assert.strictEqual('AA', tree.item(ids.aa));
            assert.strictEqual('AAA', tree.item(ids.aaa));
            assert.strictEqual('B', tree.item(ids.b));
            assert.strictEqual('BB', tree.item(ids.bb));
            assert.strictEqual('BBB', tree.item(ids.bbb));

            assert.strictEqual(tree.parent(ids.aaa), ids.aa);
            assert.strictEqual(tree.parent(ids.aa), ids.a);

            assert.strictEqual(tree.parent(ids.bbb), ids.bb);
            assert.strictEqual(tree.parent(ids.bb), ids.b);

            assert.strictEqual(tree.parent(ids.a), Tree.ROOT_ID);
            assert.strictEqual(tree.parent(ids.b), Tree.ROOT_ID);
        });

        it('Tree update', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');
            ids.b = tree.add('B');

            tree.update(ids.a, 'A"');
            assert.strictEqual(tree.item(ids.a), 'A"');
            assert.strictEqual(tree.item(ids.b), 'B');

            tree.update(ids.b, 'B"');
            assert.strictEqual(tree.item(ids.a), 'A"');
            assert.strictEqual(tree.item(ids.b), 'B"');
        });

        it('Tree stringify / parse', function(){
            var ids = {};
            var tree = new Tree;

            ids.a = tree.add('A');
            ids.b = tree.add('B');

            ids.aa = tree.add('AA', ids.a);
            ids.ab = tree.add('AB', ids.a);
            ids.ac = tree.add('AC', ids.a);

            ids.ba = tree.add('BA', ids.b);

            var str = tree.stringify();

            tree = new Tree({
                src : str
            });

            assert.deepEqual(tree.children(), [ids.a, ids.b]);
            assert.deepEqual(tree.children(ids.a), [ids.aa, ids.ab, ids.ac]);
            assert.deepEqual(tree.children(ids.b), [ids.ba]);

        });

    });
});


text:
package net.swiftos.apiservice.api;

import net.swiftos.apiservice.model.UserInfo;
import net.swiftos.common.model.bean.BaseResponse;

import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by ganyao on 2017/3/9.
 */

public interface ICommonAPI {

    /**
     * 会话开始
     * @return String sessionId
     */
    @POST("/session_start")
    Observable<BaseResponse<String>> sessionStart();

}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Linq.Expressions;
using System.Net.Http;
using System.Threading.Tasks;
using Firestorm.Stems.Essentials;
using Firestorm.Stems.FunctionalTests.Models;
using Firestorm.Stems.FunctionalTests.Web;
using Firestorm.Stems.Roots.DataSource;
using Firestorm.Testing.Http;
using Newtonsoft.Json;
using Xunit;

namespace Firestorm.Stems.FunctionalTests.Basics
{
    public class IdentifierTests : IClassFixture<ExampleFixture<IdentifierTests>>
    {
        private HttpClient HttpClient { get; }

        public IdentifierTests(ExampleFixture<IdentifierTests> fixture)
        {
            HttpClient = fixture.HttpClient;
        }

        [DataSourceRoot]
        public class ArtistsStem : Stem<Artist>
        {
            [Identifier]
            [Get(Display.Nested)]
            public static Expression<Func<Artist, int>> ID
            {
                get { return a => a.ArtistID; }
            }

            [Identifier]
            [Get]
            public static Expression<Func<Artist, string>> Name
            {
                get { return a => a.Name; }
            }

            [Identifier(Exactly = "me")] // TODO casing?
            public Artist GetExactArtist()
            {
                return new Artist { Name = "My artist" };
            }
        }

        [Fact]
        public async Task ArtistByIDWithoutSpecifiying_GetName_IsCorrect()
        {
            dynamic obj = await GetDynamicObject("/artists/3");
            Assert.Equal("Periphery", obj.name.ToString());
        }

        [Fact]
        public async Task ArtistByNameWithoutSpecifiying_GetName_IsCorrect()
        {
            dynamic obj = await GetDynamicObject("/artists/Periphery");
            Assert.Equal("Periphery", obj.name.ToString());
        }

        [Fact]
        public async Task ArtistByIDWithSpecifiying_GetName_IsCorrect()
        {
            dynamic obj = await GetDynamicObject("/artists/by_id/3");
            Assert.Equal("Periphery", obj.name.ToString());
        }

        [Fact]
        public async Task ArtistByNameWithSpecifiying_GetName_IsCorrect()
        {
            dynamic obj = await GetDynamicObject("/artists/by_name/Periphery");
            Assert.Equal("Periphery", obj.name.ToString());
        }

        [Fact]
        public async Task ArtistByExactString_GetName_IsCorrect()
        {
            dynamic obj = await GetDynamicObject("/artists/me");
            Assert.Equal("My artist", obj.name.ToString());
        }

        private async Task<dynamic> GetDynamicObject(string requestUri)
        {
            HttpResponseMessage response = await HttpClient.GetAsync(requestUri);
            string json = await response.Content.ReadAsStringAsync();

            ResponseAssert.Success(response);

            dynamic obj = JsonConvert.DeserializeObject(json);
            return obj;
        }
    }
}


text:
@interface HokutosaiApiRequest : NSMutableURLRequest

@end


text:
import { UserAuth } from './userAuth';
import { AuthService } from './auth.service';

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

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.css']
})
export class LoginComponent implements OnInit {
  private userAuth: UserAuth = new UserAuth();

  constructor(private authService: AuthService) { }

  ngOnInit() {
  }

  fazerLogin(){
    console.log(this.userAuth);
    this.authService.fazerLogin(this.userAuth);

  }

}


text:
package testing

import (
	"errors"
	"sync"
	"testing"
	"time"

	ttnlog "github.com/TheThingsNetwork/go-utils/log"
	ttnapex "github.com/TheThingsNetwork/go-utils/log/apex"
	apexlog "github.com/apex/log"
)

func GetLogger(t *testing.T, tag string) ttnlog.Interface {
	logger := &apexlog.Logger{
		Handler: NewLogHandler(t),
		Level:   apexlog.DebugLevel,
	}
	return ttnapex.Wrap(logger).WithField("tag", tag)
}

// WaitGroup is an extension of sync.WaitGroup with a WaitFor function for testing
type WaitGroup struct {
	sync.WaitGroup
}

// WaitFor waits for the specified duration
func (wg *WaitGroup) WaitFor(d time.Duration) error {
	waitChan := make(chan bool)
	go func() {
		wg.Wait()
		waitChan <- true
		close(waitChan)
	}()
	select {
	case <-waitChan:
		return nil
	case <-time.After(d):
		return errors.New("Wait timeout expired")
	}
}


text:
#ifndef THREADPOOL_POOL_CORE_HPP_INCLUDED
#define THREADPOOL_POOL_CORE_HPP_INCLUDED

#include "locking_ptr.hpp"
#include "worker_thread.hpp"

#include "../task_adaptors.hpp"

#include <boost/thread.hpp>
#include <boost/thread/exceptions.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include <boost/smart_ptr.hpp>
#include <boost/bind.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <boost/detail/atomic_count.hpp>

#include <vector>

/// The namespace threadpool contains a thread pool and related utility classes.
namespace boost { namespace threadpool { namespace detail
{

  /*! \brief Thread pool.
  *
  * Thread pools are a mechanism for asynchronous and parallel processing
  * within the same process. The pool class provides a convenient way
  * for dispatching asynchronous tasks as functions objects. The scheduling
  * of these tasks can be easily controlled by using customized schedulers.
  * A task must not throw an exception.
  *
  * A pool_impl is DefaultConstructible and NonCopyable.
  *
  * \param Task A function object which implements the operator 'void operator() (void) const'. The operator () is called by the pool to execute the task. Exceptions are ignored.
  * \param Scheduler A task container which determines how tasks are scheduled. It is guaranteed that this container is accessed only by one thread at a time. The scheduler shall not throw exceptions.
  *
  * \remarks The pool class is thread-safe.
  *
  * \see Tasks: task_func, prio_task_func
  * \see Scheduling policies: fifo_scheduler, lifo_scheduler, prio_scheduler
  */
  template <
    typename Task,

    template <typename> class SchedulingPolicy,
    template <typename> class SizePolicy,
    template <typename> class SizePolicyController,
    template <typename> class ShutdownPolicy
  >
  class pool_core
  : public enable_shared_from_this< pool_core<Task, SchedulingPolicy, SizePolicy, SizePolicyController, ShutdownPolicy > >
  , private noncopyable
  {

  public: // Type definitions
    typedef Task task_type;                                 //!< Indicates the task's type.
    typedef SchedulingPolicy<task_type> scheduler_type;     //!< Indicates the scheduler's type.
    typedef pool_core<Task,
                      SchedulingPolicy,
                      SizePolicy,
                      SizePolicyController,
                      ShutdownPolicy > pool_type;           //!< Indicates the thread pool's type.
    typedef SizePolicy<pool_type> size_policy_type;         //!< Indicates the sizer's type.
    //typedef typename size_policy_type::size_controller size_controller_type;

    typedef SizePolicyController<pool_type> size_controller_type;

//    typedef SizePolicy<pool_type>::size_controller size_controller_type;
    typedef ShutdownPolicy<pool_type> shutdown_policy_type;//!< Indicates the shutdown policy's type.

    typedef worker_thread<pool_type> worker_type;

    // The task is required to be a nullary function.
    BOOST_STATIC_ASSERT(function_traits<task_type()>::arity == 0);

    // The task function's result type is required to be void.
    BOOST_STATIC_ASSERT(is_void<typename result_of<task_type()>::type >::value);

  private:  // Friends
    friend class worker_thread<pool_type>;

#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x580)  // Tested with CC: Sun C++ 5.8 Patch 121018-08 2006/12/06
   friend class SizePolicy;
   friend class ShutdownPolicy;
#else
   friend class SizePolicy<pool_type>;
   friend class ShutdownPolicy<pool_type>;
#endif

  private: // The following members may be accessed by _multiple_ threads at the same time:
    volatile size_t m_worker_count;
    volatile size_t m_target_worker_count;
    volatile size_t m_active_worker_count;

  private: // The following members are accessed only by _one_ thread at the same time:
    scheduler_type  m_scheduler;
    scoped_ptr<size_policy_type> m_size_policy; // is never null

    bool  m_terminate_all_workers;								// Indicates if termination of all workers was triggered.
    std::vector<shared_ptr<worker_type> > m_terminated_workers; // List of workers which are terminated but not fully destructed.

  private: // The following members are implemented thread-safe:
    mutable recursive_mutex  m_monitor;
    mutable condition m_worker_idle_or_terminated_event;	// A worker is idle or was terminated.
    mutable condition m_task_or_terminate_workers_event;  // Task is available OR total worker count should be reduced.

  public:
    /// Constructor.
    pool_core()
      : m_worker_count(0)
      , m_target_worker_count(0)
      , m_active_worker_count(0)
      , m_terminate_all_workers(false)
    {
      pool_type volatile & self_ref = *this;
      m_size_policy.reset(new size_policy_type(self_ref));

      m_scheduler.clear();
    }

    /// Destructor.
    ~pool_core()
    {
    }

    /*! Gets the size controller which manages the number of threads in the pool.
    * \return The size controller.
    * \see SizePolicy
    */
    size_controller_type size_controller()
    {
      return size_controller_type(*m_size_policy, this->shared_from_this());
    }

    /*! Gets the number of threads in the pool.
    * \return The number of threads.
    */
    size_t size()	const volatile
    {
      return m_worker_count;
    }

// TODO is only called once
    void shutdown()
    {
      ShutdownPolicy<pool_type>::shutdown(*this);
    }

    /*! Schedules a task for asynchronous execution. The task will be executed once only.
    * \param task The task function object. It should not throw execeptions.
    * \return true, if the task could be scheduled and false otherwise.
    */
    bool schedule(task_type const & task) volatile
    {
      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);

      if(lockedThis->m_scheduler.push(task))
      {
        lockedThis->m_task_or_terminate_workers_event.notify_one();
        return true;
      }
      else
      {
        return false;
      }
    }

    /*! Returns the number of tasks which are currently executed.
    * \return The number of active tasks.
    */
    size_t active() const volatile
    {
      return m_active_worker_count;
    }

    /*! Returns the number of tasks which are ready for execution.
    * \return The number of pending tasks.
    */
    size_t pending() const volatile
    {
      locking_ptr<const pool_type, recursive_mutex> lockedThis(*this, m_monitor);
      return lockedThis->m_scheduler.size();
    }

    /*! Removes all pending tasks from the pool's scheduler.
    */
    void clear() volatile
    {
      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
      lockedThis->m_scheduler.clear();
    }

    /*! Indicates that there are no tasks pending.
    * \return true if there are no tasks ready for execution.
    * \remarks This function is more efficient that the check 'pending() == 0'.
    */
    bool empty() const volatile
    {
      locking_ptr<const pool_type, recursive_mutex> lockedThis(*this, m_monitor);
      return lockedThis->m_scheduler.empty();
    }

    /*! The current thread of execution is blocked until the sum of all active
    *  and pending tasks is equal or less than a given threshold.
    * \param task_threshold The maximum number of tasks in pool and scheduler.
    */
    void wait(size_t const task_threshold = 0) const volatile
    {
      const pool_type* self = const_cast<const pool_type*>(this);
      recursive_mutex::scoped_lock lock(self->m_monitor);

      if(0 == task_threshold)
      {
        while(0 != self->m_active_worker_count || !self->m_scheduler.empty())
        {
          self->m_worker_idle_or_terminated_event.wait(lock);
        }
      }
      else
      {
        while(task_threshold < self->m_active_worker_count + self->m_scheduler.size())
        {
          self->m_worker_idle_or_terminated_event.wait(lock);
        }
      }
    }

    void wait(const boost::detail::atomic_count& finished_tasks, size_t overall_tasks) const volatile
    {
	const pool_type* self = const_cast<const pool_type*>(this);
	recursive_mutex::scoped_lock lock(self->m_monitor);

       while(finished_tasks < (int)overall_tasks)
	{
          self->m_worker_idle_or_terminated_event.wait(lock);
        }
    }

    /*! The current thread of execution is blocked until the timestamp is met
    * or the sum of all active and pending tasks is equal or less
    * than a given threshold.
    * \param timestamp The time when function returns at the latest.
    * \param task_threshold The maximum number of tasks in pool and scheduler.
    * \return true if the task sum is equal or less than the threshold, false otherwise.
    */
    bool wait(xtime const & timestamp, size_t const task_threshold = 0) const volatile
    {
      const pool_type* self = const_cast<const pool_type*>(this);
      recursive_mutex::scoped_lock lock(self->m_monitor);

      if(0 == task_threshold)
      {
        while(0 != self->m_active_worker_count || !self->m_scheduler.empty())
        {
          if(!self->m_worker_idle_or_terminated_event.timed_wait(lock, timestamp)) return false;
        }
      }
      else
      {
        while(task_threshold < self->m_active_worker_count + self->m_scheduler.size())
        {
          if(!self->m_worker_idle_or_terminated_event.timed_wait(lock, timestamp)) return false;
        }
      }

      return true;
    }

  private:

    void terminate_all_workers(bool const wait) volatile
    {
      pool_type* self = const_cast<pool_type*>(this);
      recursive_mutex::scoped_lock lock(self->m_monitor);

      self->m_terminate_all_workers = true;

      m_target_worker_count = 0;
      self->m_task_or_terminate_workers_event.notify_all();

      if(wait)
      {
        while(m_active_worker_count > 0)
        {
          self->m_worker_idle_or_terminated_event.wait(lock);
        }

        for(typename std::vector<shared_ptr<worker_type> >::iterator it = self->m_terminated_workers.begin();
          it != self->m_terminated_workers.end();
          ++it)
        {
          (*it)->join();
        }
        self->m_terminated_workers.clear();
      }
    }

    /*! Changes the number of worker threads in the pool. The resizing
    *  is handled by the SizePolicy.
    * \param threads The new number of worker threads.
    * \return true, if pool will be resized and false if not.
    */
    bool resize(size_t const worker_count) volatile
    {
      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);

      if(!m_terminate_all_workers)
      {
        m_target_worker_count = worker_count;
      }
      else
      {
        return false;
      }

      if(m_worker_count <= m_target_worker_count)
      { // increase worker count
        while(m_worker_count < m_target_worker_count)
        {
          try
          {
            worker_thread<pool_type>::create_and_attach(lockedThis->shared_from_this());
            m_worker_count++;
            m_active_worker_count++;
          }
          catch(thread_resource_error)
          {
            return false;
          }
        }
      }
      else
      { // decrease worker count
        lockedThis->m_task_or_terminate_workers_event.notify_all();   // TODO: Optimize number of notified workers
      }

      return true;
    }

    // worker died with unhandled exception
    void worker_died_unexpectedly(shared_ptr<worker_type> worker) volatile
    {
      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);

      m_worker_count--;
      m_active_worker_count--;
      lockedThis->m_worker_idle_or_terminated_event.notify_all();

      if(m_terminate_all_workers)
      {
        lockedThis->m_terminated_workers.push_back(worker);
      }
      else
      {
        lockedThis->m_size_policy->worker_died_unexpectedly(m_worker_count);
      }
    }

    void worker_destructed(shared_ptr<worker_type> worker) volatile
    {
      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
      m_worker_count--;
      m_active_worker_count--;
      lockedThis->m_worker_idle_or_terminated_event.notify_all();

      if(m_terminate_all_workers)
      {
        lockedThis->m_terminated_workers.push_back(worker);
      }
    }

    bool execute_task() volatile
    {
      function0<void> task;

      { // fetch task
        pool_type* lockedThis = const_cast<pool_type*>(this);
        recursive_mutex::scoped_lock lock(lockedThis->m_monitor);

        // decrease number of threads if necessary
        if(m_worker_count > m_target_worker_count)
        {
          return false;	// terminate worker
        }

        // wait for tasks
        while(lockedThis->m_scheduler.empty())
        {
          // decrease number of workers if necessary
          if(m_worker_count > m_target_worker_count)
          {
            return false;	// terminate worker
          }
          else
          {
            m_active_worker_count--;
            lockedThis->m_worker_idle_or_terminated_event.notify_all();
            lockedThis->m_task_or_terminate_workers_event.wait(lock);
            m_active_worker_count++;
          }
        }

        task = lockedThis->m_scheduler.top();
        lockedThis->m_scheduler.pop();
      }

      // call task function
      if(task)
      {
        task();
      }

      //guard->disable();
      return true;
    }
  };

} } } // namespace boost::threadpool::detail

#endif // THREADPOOL_POOL_CORE_HPP_INCLUDED


text:
package hu.sztaki.ilab.longneck.bootstrap;

import hu.sztaki.ilab.longneck.process.FileType;
import hu.sztaki.ilab.longneck.process.SplitId;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 *
 * @author Péter Molnár <molnar.peter@sztaki.mta.hu>
 */
public class RepositoryUtils {

    public static Set<PathToDirPair> getPackageNames(List<RefToDirPair> references, String repositorypath) throws IOException {
        Set<PathToDirPair> retval = new HashSet<PathToDirPair>();
        for (RefToDirPair reftodir : references) {
            retval.add(new PathToDirPair((new SplitId(reftodir.getRef().getId())).pkg,
                    reftodir.getDefaultdirectory(),FileType.forReference(reftodir.getRef()))
                    .normalizePath(repositorypath));
        }
        return retval;
    }
}


text:
// PlanetMap Generator; (c) Coal Games (Lukáš Cezner) in Apache-2.0
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Text;
using System.Collections.Generic;

namespace PlanetMapGen
{
	class MainClass
	{
		static int InputX, InputY;
		static int OutputX, OutputY;

		static string InputFile = "input.png", OutputFile = "output.png";

		public static void Main (string[] args)
		{
			Console.OutputEncoding = Encoding.UTF8;
			Console.InputEncoding = Encoding.UTF8;

			Console.WriteLine ("PlanetMap Generator; (c) Coal Games (Lukáš Cezner) in Apache-2.0");
			Console.WriteLine ("================================================================");
			if (args.Length == 2)
			{
				InputFile = args[0];
				OutputFile = args[1];
			}
			else
			{
				Console.Write ("Input file: ");
				InputFile = Console.ReadLine ();
				Console.Write ("Output file: ");
				OutputFile = Console.ReadLine ();
			}

			if (!File.Exists (InputFile))
			{
				Console.ForegroundColor = ConsoleColor.Red;
				Console.WriteLine ("Input file not found (" + InputFile + ").");
				Console.ResetColor ();
				return;
			}

			Bitmap Input = new Bitmap (InputFile);
			InputX = Input.Width;
			OutputX = InputX;
			InputY = Input.Height;
			OutputY = InputY / 2;

			Console.WriteLine ("Input: " + InputFile + " (" + InputX + ", " + InputY + ")");
			Console.WriteLine ("Output: " + OutputFile + " (" + OutputX + ", " + OutputY + ")\n");
			Console.ForegroundColor = ConsoleColor.Red;
			DateTime StartTime = DateTime.Now;

			Bitmap Output = new Bitmap (OutputX, OutputY, PixelFormat.Format32bppArgb);

			Barvy[,] NoveBarvy = new Barvy[OutputX, OutputY];

			for (int y = 0; y < InputY; y++)
			{
				int NovaY = y - InputY / 2;
				NovaY = (int) ((OutputY + Math.Sin (NovaY * Math.PI / InputY) * OutputY) / 2);

				for (int x = 0; x < InputX; x++)
				{
					NoveBarvy[x, NovaY].Add (Input.GetPixel (x, y));
				}
			}

			for (int y = 0; y < OutputY; y++)
			{
				for (int x = 0; x < OutputX; x++)
				{
					Output.SetPixel (x, y, NoveBarvy[x, y].Prumer ());
				}
			}

			TimeSpan Time = DateTime.Now - StartTime;
			Console.ForegroundColor = ConsoleColor.Green;
			Console.WriteLine ("Done! " + Time.TotalMilliseconds + " ms; " + (float) ((InputX * InputY) / Time.TotalSeconds) + " px/s");
			Output.Save (OutputFile, ImageFormat.Png);
			Console.ResetColor ();
		}

		struct Barvy
		{
			public List<Color> VsechnyBarvy;

			public void Add (Color JednaBarva)
			{
				if (VsechnyBarvy == null)
					VsechnyBarvy = new List<Color> ();
				VsechnyBarvy.Add (JednaBarva);
			}

			public Color Prumer ()
			{
				int PocetBarev = VsechnyBarvy.Count;

				if (PocetBarev < 1)
					return Color.FromArgb (0, 0, 0, 0);

				int R = 0, G = 0, B = 0;
				foreach (Color JednaBarva in VsechnyBarvy)
				{
					R += JednaBarva.R;
					G += JednaBarva.G;
					B += JednaBarva.B;
				}

				return Color.FromArgb (255, R / PocetBarev, G / PocetBarev, B / PocetBarev);
			}
		}
	}
}


text:
module Waitress

  # The Handler class is responsible for handling incoming HTTP requests for a
  # given URL Path. This default class works by matching a regular expression to
  # the request path, however subclasses may choose to use their own matching
  # methods (see +Waitress::DirHandler+).
  #
  # Each Handler acts off of a priority system, where if multiple handlers
  # can respond to the request, the one with the highest priority will be chosen.
  class Handler

    attr_accessor :priority

    # Create a new Regex-Based Handler
    # Params:
    # +regex+:: The regex pattern to match against the request path
    # +priority+:: Priority of the handler. Default: 50
    # +action+:: The block to call when a match is reached. Should take args
    # request, response, client and vhost.
    def initialize regex=nil, priority=50, &action
      @regex = regex
      @action = action
      @priority = priority
    end

    # Returns true if this handler is valid for the given request
    def respond? request, vhost
      (request.path =~ @regex) != nil
    end

    # Don't touch this -- this adds Kernel bindings
    def serve! request, response, client, vhost
      kernel_prepare
      serve request, response, client, vhost
    end

    # If we can respond to the request, this method is called to
    # serve a response based on this handler. Do your response logic here.
    # Params:
    # +request+:: The +Waitress::Request+ object
    # +response+:: The +Waitress::Response+ object
    # +client+:: The client socket
    # +vhost+:: The Virtual Host responsible for the connection
    def serve request, response, client, vhost
      @action.call(request, response, client, vhost) unless @action.nil?
    end

  end

  # The ErrorHandler has the lowest priority, as it shouldn't be triggered
  # unless there is an error (i.e. 404, 500)
  class ErrorHandler < Handler
    def initialize
      @priority = -65536
    end
  end
end


text:
@implementation Checker {
    ChessBoard *_board;
    NSMutableArray *lastTeamMoves;
    NSMutableArray *defendMoves;
    NSMutableArray *wayForCheck;
    NSMutableArray *wayForCheckCanCut;
    BaseChess *_offense;
    BaseChess *checker;
    BaseChess *upperKing;
    BaseChess *belowKing;
}
- (id)initWithBoard:(ChessBoard *)board {
    self = [super init];
    if (self) {
        _board = board;
        _validKingMovesOnChecked = [NSMutableSet set];
        _validAllyMovesOnChecked = [NSMutableSet set];
    }
    return self;
}

- (void)setLastEnemyMoved:(BaseChess *)chess {
    NSLog(@"Attacker: %@ move to (%d, %d)", [chess toString], chess.location.x, chess.location.y);
    _offense = chess;
    [self getLastTeamMoves:false];
}

- (bool)isCheck {
    return [self isCheckAtLocation:[self getDefendKingLocation]];
}

- (bool)isCheckAtLocation:(Location *)location {
    bool ret = [lastTeamMoves containsObject:location];
    return ret;
}

//save king location when moved
- (void)setKing:(BaseChess *)king {
    if (king.team == UPPER_TEAM) {
        upperKing = king;
    } else {
        belowKing = king;
    }
}

- (bool)isCheckmate {
    //No more move
    int allyMoves = [self getValidAllyMovesOnChecked].count;
    int kingMoves = [self getValidKingMovesOnChecked].count;
    return kingMoves == 0 && allyMoves == 0;
}

- (NSMutableSet *)getValidAllyMovesOnChecked {
    [_validAllyMovesOnChecked removeAllObjects];
    wayForCheckCanCut = [self wayForCheckCanCut:checker king:[self getDefendKingLocation]];
    [self getDefendTeamMoves];
    for (Location *move in defendMoves) {
        if ([wayForCheckCanCut containsObject:move]) {
            NSLog(@"Ally can move to (%d, %d)", move.x, move.y);
            [_validAllyMovesOnChecked addObject:move];
        }
    }
    NSLog(@"Total ally move: %d", _validAllyMovesOnChecked.count);
    return _validAllyMovesOnChecked;
}

- (NSMutableSet *)getValidKingMovesOnChecked {
    [_validKingMovesOnChecked removeAllObjects];
    NSMutableArray *kingMoves = [[self getDefendKing] getValidLocations];
    [self getLastTeamMoves:true];
    [lastTeamMoves addObjectsFromArray:wayForCheck];
    for (Location *move in kingMoves) {
        if (![lastTeamMoves containsObject:move]) {
            if (![self isCheckAtLocation:move]) {
                NSLog(@"King can move to (%d, %d)", move.x, move.y);
                [_validKingMovesOnChecked addObject:move];
            }
        }
    }
    NSLog(@"Total King move: %d", _validKingMovesOnChecked.count);
    return _validKingMovesOnChecked;
}

- (BaseChess *)getDefendKing {
    return _offense.team == UPPER_TEAM ? belowKing : upperKing;
}

- (Location *)getDefendKingLocation {
    return _offense.team == UPPER_TEAM ? belowKing.location : upperKing.location;
}

- (void)getLastTeamMoves:(bool)overlapAlly {
    lastTeamMoves = [[NSMutableArray alloc] init];
    int enemy = _offense.team;
    NSMutableArray *listChessNoBlank = [[NSMutableArray alloc] initWithArray:_board.chessList];
    [listChessNoBlank removeObject:[NSNull null]];
    for (BaseChess *enemyChess in listChessNoBlank) {
        if (enemyChess.team == enemy && ![enemyChess isKindOfClass:[King class]]) {
            if ([enemyChess isKindOfClass:[Pawn class]]) {
                NSMutableArray *moves = [((Pawn *) enemyChess) getDiagonalLocationsWithOverlapAlly:true];
                [lastTeamMoves addObjectsFromArray:moves];
            } else {
                NSMutableArray *moves = overlapAlly ? [enemyChess getValidLocationsOverlapAlly] : [enemyChess getValidLocations];
                if ([moves containsObject:[self getDefendKingLocation]]) {
                    checker = enemyChess;
                    [self wayForCheck:checker king:[self getDefendKingLocation]];
                }
                [lastTeamMoves addObjectsFromArray:moves];
            }
        }
    }
}

- (void)getDefendTeamMoves {
    defendMoves = [[NSMutableArray alloc] init];
    int enemy = _offense.team;
    NSMutableArray *listChessNoBlank = [[NSMutableArray alloc] initWithArray:_board.chessList];
    [listChessNoBlank removeObject:[NSNull null]];
    for (BaseChess *enemyChess in listChessNoBlank) {
        if (enemyChess.team != enemy && ![enemyChess isKindOfClass:[King class]]) {
            [defendMoves addObjectsFromArray:[enemyChess getValidLocations]];
        }
    }
}

- (NSMutableArray *)wayForCheckCanCut:(BaseChess *)attacker king:(Location *)kingLocation {
    wayForCheckCanCut = [[NSMutableArray alloc] init];
    int upDown = kingLocation.y - attacker.location.y;
    int leftRight = kingLocation.x - attacker.location.x;
    int incrementX = leftRight == 0 ? 0 : leftRight / abs(leftRight);
    int incrementY = upDown == 0 ? 0 : upDown / abs(upDown);
    [self addLocation:attacker.location to:kingLocation incrementX:incrementX incrementY:incrementY intoList:wayForCheckCanCut];
    return wayForCheckCanCut;
}

- (NSMutableArray *)wayForCheck:(BaseChess *)attacker king:(Location *)kingLocation {
    wayForCheck = [[NSMutableArray alloc] init];
    int upDown = kingLocation.y - attacker.location.y;
    int leftRight = kingLocation.x - attacker.location.x;
    int incrementX = leftRight == 0 ? 0 : leftRight / abs(leftRight);
    int incrementY = upDown == 0 ? 0 : upDown / abs(upDown);
    [self addCheckWay:attacker.location incrementX:incrementX incrementY:incrementY intoList:wayForCheck];
    return wayForCheck;
}

- (void)addLocation:(Location *)from to:(Location *)king incrementX:(int)incrementX incrementY:(int)incrementY intoList:(NSMutableArray *)arr {
    [arr addObject:from];
    Location *newLocation = LOCATION(from.x + incrementX, from.y + incrementY);
    if (![newLocation isValid] || [newLocation isEqual:king]) return;
    [self addLocation:newLocation to:king incrementX:incrementX incrementY:incrementY intoList:arr];
}

- (void)addCheckWay:(Location *)from incrementX:(int)incrementX incrementY:(int)incrementY intoList:(NSMutableArray *)arr {
    if (![from isValid]) return;
    [arr addObject:from];
    Location *newLocation = LOCATION(from.x + incrementX, from.y + incrementY);
    [self addCheckWay:newLocation incrementX:incrementX incrementY:incrementY intoList:arr];
}

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.7.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
    http://pear.php.net/dtd/tasks-1.0.xsd
    http://pear.php.net/dtd/package-2.0
    http://pear.php.net/dtd/package-2.0.xsd">
 <name>sfDoctrineNestedSetManagerPlugin</name>
 <channel>pear.symfony-project.com</channel>
 <summary>Symfony Doctrine Nested Set Manager Plugin</summary>
 <description>Helper to plugin interfaces for managing a nested set tree in Doctrine.</description>
 <lead>
  <name>Jonathan H. Wage</name>
  <user>jwage</user>
  <email>jwage@centresource.com</email>
  <active>yes</active>
 </lead>
  <developer>
  <name>Stephen Ostrow</name>
  <user>Stephen.Ostrow</user>
  <email>sostrow@sowebdesigns.com</email>
  <active>yes</active>
 </developer>
 <date>2008-11-19</date>
 <time>15:33:35</time>
 <version>
  <release>1.2.1</release>
  <api>0.0.1</api>
 </version>
 <stability>
  <release>stable</release>
  <api>stable</api>
 </stability>
 <license uri="http://svn.symfony-project.com/plugins/sfDoctrineNestedSetManagerPlugin/trunk/LICENSE">MIT</license>
 <notes>This is the initial plugin</notes>
 <contents>
  <dir baseinstalldir="/" name="/">
   <file baseinstalldir="/" md5sum="f57624ae822ccd78ed4f9142faf74011" name="lib/helper/NestedSetManagerHelper.php" role="php" />
   <file baseinstalldir="/" md5sum="bd9dd2c27c64b53cc112b7ebe17450bd" name="modules/sfNestedSetManager/actions/actions.class.php" role="php" />
   <file baseinstalldir="/" md5sum="82b85068b5c5ce32fd013505306533eb" name="modules/sfNestedSetManager/actions/components.class.php" role="php" />
   <file baseinstalldir="/" md5sum="20873f365b2d8d4efbf64a175144e113" name="modules/sfNestedSetManager/templates/add_childSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="20873f365b2d8d4efbf64a175144e113" name="modules/sfNestedSetManager/templates/add_rootSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="20873f365b2d8d4efbf64a175144e113" name="modules/sfNestedSetManager/templates/deleteSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="20873f365b2d8d4efbf64a175144e113" name="modules/sfNestedSetManager/templates/do_move_toSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="d41d8cd98f00b204e9800998ecf8427e" name="modules/sfNestedSetManager/templates/indexSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="20873f365b2d8d4efbf64a175144e113" name="modules/sfNestedSetManager/templates/moveSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="5c34580bed581a7bfb738437a34dde96" name="modules/sfNestedSetManager/templates/move_toSuccess.php" role="php" />
   <file baseinstalldir="/" md5sum="b1d296609e67bbb917595710f0bacebb" name="modules/sfNestedSetManager/templates/_edit_field.php" role="php" />
   <file baseinstalldir="/" md5sum="c032915f26a2bdf360ff521cf20e6f8a" name="modules/sfNestedSetManager/templates/_manager.php" role="php" />
   <file baseinstalldir="/" md5sum="fc7d8b3a773503d79abcb3e3e6efd9b2" name="modules/sfNestedSetManager/templates/_nested_set_list.php" role="php" />
   <file baseinstalldir="/" md5sum="21f1a855321e2106781366b38373ce30" name="web/css/manager.css" role="data" />
   <file baseinstalldir="/" md5sum="9178889c0e94f1295a7f192a169918e4" name="LICENSE" role="doc" />
   <file baseinstalldir="/" md5sum="5fe4e23bc765a2cdb354ca253d8da08d" name="README" role="doc" />
  </dir>
 </contents>
 <dependencies>
  <required>
   <php>
    <min>5.1.0</min>
   </php>
   <pearinstaller>
    <min>1.4.0a12</min>
   </pearinstaller>
   <package>
    <name>symfony</name>
    <channel>pear.symfony-project.com</channel>
    <min>1.2.0</min>
    <max>1.3.0</max>
    <exclude>1.3.0</exclude>
   </package>
   <package>
    <name>sfDoctrinePlugin</name>
    <channel>pear.symfony-project.com</channel>
    <min>1.0</min>
    <max>2.0</max>
    <exclude>2.0</exclude>
   </package>
  </required>
 </dependencies>
 <phprelease />
 <changelog>
  <release>
   <version>
    <release>0.0.0</release>
    <api>0.0.0</api>
   </version>
   <stability>
    <release>alpha</release>
    <api>alpha</api>
   </stability>
   <date>2007-02-20</date>
   <license uri="http://svn.symfony-project.com/plugins/sfDoctrineNestedSetManagerPlugin/branches/1.0/LICENSE">MIT</license>
   <notes>This is the initial plugin</notes>
  </release>
  <release>
   <version>
    <release>0.0.1</release>
    <api>0.0.1</api>
   </version>
   <stability>
    <release>alpha</release>
    <api>alpha</api>
   </stability>
   <date>2007-02-20</date>
   <license uri="http://svn.symfony-project.com/plugins/sfDoctrineNestedSetManagerPlugin/branches/1.0/LICENSE">MIT</license>
   <notes>Adding Stephen.Ostrow as a developer</notes>
  </release>
  <release>
   <version>
    <release>1.2.1</release>
    <api>0.0.1</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2008-11-18</date>
   <license uri="http://svn.symfony-project.com/plugins/sfDoctrineNestedSetManagerPlugin/trunk/LICENSE">MIT</license>
   <notes> * Added a helpful note about using this as a helper
 * Updated it to work with symfony 1.2
 * Fixing the dependency</notes>
  </release>
 </changelog>
</package>


text:
function BlockageStack(name, capacity) {

    this.name = name;
    this.delim = '@@DELIM@@';
    this.capacity = typeof capacity !== 'undefined' ? capacity : 1; //1 item is default capacity
    //this.clear();

}

BlockageStack.prototype.read = function () {
    var stack = typeof $.cookie(this.name) !== 'undefined' ? $.cookie(this.name) : [];
    if (stack.length > 0) {
        stack = stack.split(this.delim);
    } else {
        stack = Array();
    }
    return stack;
};

BlockageStack.prototype.put = function (value) {
    value = String(value);
    var result = false;
    var stack = this.read();
    if (this.capacity == 1) { //if capacity is 1, clear stack and put it
        //console.log(this);
        this.clear();
        stack = this.read();
        $(".plank-point-deactivated").removeClass("plank-point-deactivated").addClass('plank-point');
        stack.push(value);
        result = true;
    } else {
        if ($.inArray(value, stack) == "-1") {
            stack.push(value);
            result = true;
        }
        //check length of stack, cut it off if more
        if (stack.length > this.capacity) {
            stack = stack.slice(stack.length - this.capacity);
        }
    }

    stack = stack.join(this.delim);
    $.cookie(this.name, stack);
    return result;
};

BlockageStack.prototype.exist = function(value) {
    value = String(value);

    var stack = this.read();

    var index = $.inArray(value, stack);

    if (index > -1)
        return true;
    else
        return false;

}


text:
const assert = require('assert');
const async = require('async');

const { s3middleware } = require('arsenal');
const withV4 = require('../../support/withV4');
const BucketUtility = require('../../../lib/utility/bucket-util');
const { describeSkipIfNotMultipleOrCeph, uniqName, getAzureClient,
    getAzureContainerName, convertMD5, azureLocation } = require('../utils');
const azureMpuUtils = s3middleware.azureHelper.mpuUtils;
const maxSubPartSize = azureMpuUtils.maxSubPartSize;

const keyObject = 'abortazure';
const azureClient = getAzureClient();
const azureContainerName = getAzureContainerName(azureLocation);
const expectedMD5 = 'a63c90cc3684ad8b0a2176a6a8fe9005';

let bucketUtil;
let s3;

function azureCheck(container, key, expected, cb) {
    azureClient.getBlobProperties(container, key, (err, res) => {
        if (expected.error) {
            assert.strictEqual(err.statusCode, 404);
            assert.strictEqual(err.code, 'NotFound');
        } else {
            const convertedMD5 = convertMD5(res.contentSettings.contentMD5);
            assert.strictEqual(convertedMD5, expectedMD5);
        }
        return cb();
    });
}

describeSkipIfNotMultipleOrCeph('Abort MPU on Azure data backend', function
describeF() {
    this.timeout(50000);
    withV4(sigCfg => {
        beforeEach(function beforeFn() {
            this.currentTest.key = uniqName(keyObject);
            bucketUtil = new BucketUtility('default', sigCfg);
            s3 = bucketUtil.s3;
        });
        describe('with bucket location header', () => {
            beforeEach(function beforeEachFn(done) {
                async.waterfall([
                    next => s3.createBucket({ Bucket: azureContainerName },
                        err => next(err)),
                    next => s3.createMultipartUpload({
                        Bucket: azureContainerName,
                        Key: this.currentTest.key,
                        Metadata: { 'scal-location-constraint': azureLocation },
                    }, (err, res) => {
                        if (err) {
                            return next(err);
                        }
                        this.currentTest.uploadId = res.UploadId;
                        return next();
                    }),
                ], done);
            });

            afterEach(done => s3.deleteBucket({ Bucket: azureContainerName },
                done));

            it('should abort an MPU with one empty part ', function itFn(done) {
                const expected = { error: true };
                const params = {
                    Bucket: azureContainerName,
                    Key: this.test.key,
                    UploadId: this.test.uploadId,
                };
                async.waterfall([
                    next => {
                        const partParams = Object.assign({ PartNumber: 1 },
                            params);
                        s3.uploadPart(partParams, err => {
                            assert.strictEqual(err, null, 'Expected success, ' +
                            `got error: ${err}`);
                            return next();
                        });
                    },
                    next => s3.abortMultipartUpload(params, err => next(err)),
                    next => azureCheck(azureContainerName, this.test.key,
                    expected, next),
                ], done);
            });

            it('should abort MPU with one part bigger than max subpart',
            function itFn(done) {
                const expected = { error: true };
                const params = {
                    Bucket: azureContainerName,
                    Key: this.test.key,
                    UploadId: this.test.uploadId,
                };
                async.waterfall([
                    next => {
                        const body = Buffer.alloc(maxSubPartSize + 10);
                        const partParams = Object.assign(
                            { PartNumber: 1, Body: body }, params);
                        s3.uploadPart(partParams, err => {
                            assert.strictEqual(err, null, 'Expected ' +
                            `success, got error: ${err}`);
                            return next();
                        });
                    },
                    next => s3.abortMultipartUpload(params, err => next(err)),
                    next => azureCheck(azureContainerName, this.test.key,
                    expected, next),
                ], done);
            });
        });

        describe('with previously existing object with same key', () => {
            beforeEach(function beforeEachFn(done) {
                async.waterfall([
                    next => s3.createBucket({ Bucket: azureContainerName },
                        err => next(err)),
                    next => {
                        const body = Buffer.alloc(10);
                        s3.putObject({
                            Bucket: azureContainerName,
                            Key: this.currentTest.key,
                            Metadata: { 'scal-location-constraint':
                                azureLocation },
                            Body: body,
                        }, err => {
                            assert.equal(err, null, 'Err putting object to ' +
                            `azure: ${err}`);
                            return next();
                        });
                    },
                    next => s3.createMultipartUpload({
                        Bucket: azureContainerName,
                        Key: this.currentTest.key,
                        Metadata: { 'scal-location-constraint': azureLocation },
                    }, (err, res) => {
                        if (err) {
                            return next(err);
                        }
                        this.currentTest.uploadId = res.UploadId;
                        return next();
                    }),
                ], done);
            });

            afterEach(() => {
                process.stdout.write('Emptying bucket\n');
                return bucketUtil.empty(azureContainerName)
                .then(() => {
                    process.stdout.write('Deleting bucket\n');
                    return bucketUtil.deleteOne(azureContainerName);
                })
                .catch(err => {
                    process.stdout.write('Error emptying/deleting bucket: ' +
                    `${err}\n`);
                    throw err;
                });
            });

            it('should abort MPU without deleting existing object',
            function itFn(done) {
                const expected = { error: false };
                const params = {
                    Bucket: azureContainerName,
                    Key: this.test.key,
                    UploadId: this.test.uploadId,
                };
                async.waterfall([
                    next => {
                        const body = Buffer.alloc(10);
                        const partParams = Object.assign(
                            { PartNumber: 1, Body: body }, params);
                        s3.uploadPart(partParams, err => {
                            assert.strictEqual(err, null, 'Expected ' +
                            `success, got error: ${err}`);
                            return next();
                        });
                    },
                    next => s3.abortMultipartUpload(params, err => next(err)),
                    next => azureCheck(azureContainerName, this.test.key,
                    expected, next),
                ], done);
            });
        });
    });
});


text:
pcheor chodar oleees chepy Shol ShcKhey otol Shey cheor cheokeey
tShor olSheod qodaiin qokeeor sy or aiin ykeeol ocTheody cThchy
doiin Shody cFheos qocKhy chol ol s als sol yteey or cheeytey
kos Sheor chocKhor qekeody cheody sy s olcheey cThey qoky
dcheey keey keeey cThey yty okeeody sy olcheey She qokeas
ShcTheo ror Sheolol kaiin

kSheodal Sheody qocheoty Shokol qokeShs yteody etodaIThey
daiin okeeey cheo qotecheor cThodaim s cheol chol okeam
Sheor ol qokeeoky okeeol okeeodaiin ytol s or ariin aiin
ykeeor cheos qkhey cheos oteol okechod oeey keeos aiiin
deeocThey keeeol Sheol stSheol daiin


text:
using System;
using System.Collections;
using UnityEngine;

public delegate void OnConsoleLog(string line);

namespace Wenzil.Console
{
    /// <summary>
    /// Use Console.Log() anywhere in your code. The Console prefab will display the output.
    /// </summary>
    public static class Console
    {
        public static OnConsoleLog OnConsoleLog;

        public static void Log(string line)
        {
            Debug.Log(line);
            if (OnConsoleLog != null)
                OnConsoleLog(line);
        }

        public static string ExecuteCommand(string command, params string[] args)
        {
            return ConsoleCommandsDatabase.ExecuteCommand(command, args);
        }
    }

    public static class MBExtensions {
        #region Typesafe Invoke
        public static void Invoke(this MonoBehaviour mb, Action action, float delay) {
            if(delay == 0f)
                action();
            else
                mb.StartCoroutine(DelayedInvoke(action, delay));
        }

        public static void Invoke<T>(this MonoBehaviour mb, Action<T> action, T arg, float delay) {
            if(delay == 0f)
                action(arg);
            else
                mb.StartCoroutine(DelayedInvoke(action, arg, delay));
        }

        public static void Invoke<T1, T2>(this MonoBehaviour mb, Action<T1, T2> action, T1 arg1, T2 arg2, float delay) {
            if(delay == 0f)
                action(arg1, arg2);
            else
                mb.StartCoroutine(DelayedInvoke(action, arg1, arg2, delay));
        }

        public static void Invoke<T1, T2, T3>(this MonoBehaviour mb, Action<T1, T2, T3> action, T1 arg1, T2 arg2, T3 arg3, float delay) {
            if(delay == 0f)
                action(arg1, arg2, arg3);
            else
                mb.StartCoroutine(DelayedInvoke(action, arg1, arg2, arg3, delay));
        }

        public static void Invoke<T1, T2, T3, T4>(this MonoBehaviour mb, Action<T1, T2, T3, T4> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, float delay) {
            if(delay == 0f)
                action(arg1, arg2, arg3, arg4);
            else
                mb.StartCoroutine(DelayedInvoke(action, arg1, arg2, arg3, arg4, delay));
        }

        private static IEnumerator DelayedInvoke(Action action, float delay) {
            yield return new WaitForSeconds(delay);
            action();
        }

        private static IEnumerator DelayedInvoke<T>(Action<T> action, T arg, float delay) {
            yield return new WaitForSeconds(delay);
            action(arg);
        }

        private static IEnumerator DelayedInvoke<T1, T2>(Action<T1, T2> action, T1 arg1, T2 arg2, float delay) {
            yield return new WaitForSeconds(delay);
            action(arg1, arg2);
        }

        private static IEnumerator DelayedInvoke<T1, T2, T3>(Action<T1, T2, T3> action, T1 arg1, T2 arg2, T3 arg3, float delay) {
            yield return new WaitForSeconds(delay);
            action(arg1, arg2, arg3);
        }

        private static IEnumerator DelayedInvoke<T1, T2, T3, T4>(Action<T1, T2, T3, T4> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, float delay) {
            yield return new WaitForSeconds(delay);
            action(arg1, arg2, arg3, arg4);
        }
        #endregion
    }
}


text:
import keycode from 'keycode'
import React from 'react'
import styled from 'styled-components'
import Icon from '../../icons/material/check_circle-24px.svg'
import Card from '../../material/card'
import { background700 } from '../../styles/colors'
import ActivityBar from '../activity-bar'
import { ActivityButton } from '../activity-button'

const ALT_1 = { keyCode: keycode('1'), altKey: true }
const ALT_2 = { keyCode: keycode('2'), altKey: true }
const ALT_3 = { keyCode: keycode('3'), altKey: true }
const ALT_4 = { keyCode: keycode('4'), altKey: true }
const ALT_5 = { keyCode: keycode('5'), altKey: true }

const Container = styled.div`
  display: flex;
  justify-content: center;
  height: auto !important;
  padding: 16px !important;
`

const StyledCard = styled(Card)`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 640px;
  margin-left: 16px;
  background-color: ${background700};
`

export default class ActivityButtonsTest extends React.Component {
  override render() {
    return (
      <Container>

      </Container>
    )
  }
}