text:
import csv
from django.core.management.base import BaseCommand
from ...models import Key

class Command(BaseCommand):
    help = 'Export API user information.'

    def add_arguments(self, parser):
        parser.add_argument('--since', dest='since', default=False,
                            help='only dump users since a given date')

    def handle(self, *args, **options):
        fields = ('key', 'status', 'tier', 'email', 'name', 'organization', 'usage', 'website',
                  'created_at', 'updated_at')

        dw = csv.DictWriter(self.stdout, fields)
        dw.writeheader()

        qs = Key.objects.all()

        if options['since']:
            qs = qs.filter(created_at__gte=options['since'])

        for key in qs.order_by('created_at'):
            dw.writerow({f: getattr(key, f) for f in fields})


text:
The best jQuery plugin ever.

## Getting Started
Download the [production version][min] or the [development version][max].

[min]: https://raw.github.com/dholloway/myFirstGrunt/master/dist/myFirstGrunt.min.js
[max]: https://raw.github.com/dholloway/myFirstGrunt/master/dist/myFirstGrunt.js

In your web page:

```html
<script src="jquery.js"></script>
<script src="dist/myFirstGrunt.min.js"></script>
<script>
jQuery(function($) {
  $.awesome(); // "awesome"
});
</script>
```

## Documentation
_(Coming soon)_

## Examples
_(Coming soon)_

## Release History
_(Nothing yet)_

redpajama_set_name: RedPajamaGithub


text:
layout: page
#
# Content
#
header: no
subheadline: "Sakura-Con 2016 Announcement"
title: "Sakura-Con 2016 Plans"
teaser: "Cosplay plans for MobileSuitGuy @ Sakura-Con 2016 have been released!"
categories:
  - Announcements
tags:
  - Announcements
  - Sakura-Con 2016
  - Cosplay
  - Kirito
  - Kazuto Kirigaya
  - Kousei Arima
  - Shirou Emiya
  - Aniplex
  - ACParadise
  - Sword Art Online
  - Your Lie in April
  - Fate Stay Night
  - Unlimited Blade Works
  - Conventions

#
# Styling
#
image:
  header: no
  thumb: "Sakuracon2016Thumb.jpg"
  homepage: "Home1.png"
  caption: "Sakura-Con 2016"
  url: "http://sakuracon.org"
---

Kicking off the week with some cosplay plans!

I'll be cosplaying for Aniplex USA through American Cosplay Paradise this year as Kousei, Kirito, and Shirou at Sakura-Con 2016! Come check us out at the Aniplex booth or at our various events at the convention.

Be sure to line up for the Sword Art Online movie event as there will be exclusive giveaways while supplies last.


text:
using IocPerformance.Interception;
using IocPerformance.Interception.Cauldron;
using System.Diagnostics;

namespace IocPerformance.Classes.Standard
{
    public interface ICalculator1
    {
        int Add(int first, int second);
    }

    public interface ICalculator2
    {
        int Add(int first, int second);
    }

    public interface ICalculator3
    {
        int Add(int first, int second);
    }

    [UnityInterceptionLogger]
    public class Calculator1 : ICalculator1
    {
        private static int counter;

        public Calculator1()
        {
            System.Threading.Interlocked.Increment(ref counter);
        }

        public static int Instances
        {
            get { return counter; }
            set { counter = value; }
        }

        public virtual int Add(int first, int second) => first + second;
    }

    [UnityInterceptionLogger]
    public class Calculator2 : ICalculator2
    {
        private static int counter;

        public Calculator2()
        {
            System.Threading.Interlocked.Increment(ref counter);
        }

        public static int Instances
        {
            get { return counter; }
            set { counter = value; }
        }

        public virtual int Add(int first, int second) => first + second;
    }

    [UnityInterceptionLogger]
    public class Calculator3 : ICalculator3
    {
        private static int counter;

        public Calculator3()
        {
            System.Threading.Interlocked.Increment(ref counter);
        }

        public static int Instances
        {
            get { return counter; }
            set { counter = value; }
        }

        public virtual int Add(int first, int second) => first + second;
    }

    #region No Interceptor

    public class NoCalculator1 : Calculator1
    {
        private static int counter;

        public NoCalculator1()
        {
            System.Threading.Interlocked.Increment(ref counter);
        }

        public static int Instances
        {
            get { return counter; }
            set { counter = value; }
        }

        public override int Add(int first, int second)
        {
            var args = string.Join(", ", new string[] { first.ToString(), second.ToString() });
            Debug.WriteLine(string.Format("No: {0}({1})", nameof(Add), args));
            return base.Add(first, second);
        }
    }

    public class NoCalculator2 : Calculator2
    {
        private static int counter;

        public NoCalculator2()
        {
            System.Threading.Interlocked.Increment(ref counter);
        }

        public static int Instances
        {
            get { return counter; }
            set { counter = value; }
        }

        public override int Add(int first, int second)
        {
            var args = string.Join(", ", new string[] { first.ToString(), second.ToString() });
            Debug.WriteLine(string.Format("No: {0}({1})", nameof(Add), args));
            return base.Add(first, second);
        }
    }

    public class NoCalculator3 : Calculator3
    {
        private static int counter;

        public NoCalculator3()
        {
            System.Threading.Interlocked.Increment(ref counter);
        }

        public static int Instances
        {
            get { return counter; }
            set { counter = value; }
        }

        public override int Add(int first, int second)
        {
            var args = string.Join(", ", new string[] { first.ToString(), second.ToString() });
            Debug.WriteLine(string.Format("No: {0}({1})", nameof(Add), args));
            return base.Add(first, second);
        }
    }

    #endregion No Interceptor
}


text:
// Guids.cs
// MUST match guids.h
using System;

namespace BackwardsCompatibleAsyncPackage
{
    static class GuidList
    {
        public const string guidBackwardsCompatibleAsyncPkgString = "1279aa9a-dc90-4c06-86d0-8e4924b0be3d";
    };
}


text:
#include "sleep.h"

#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <unistd.h>     // For usleep()
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include "msvc/targetver.h"
#include <windows.h>    // For Sleep(), SwitchToThread()
#elif defined(__linux__) || defined(__GNUC__)
#include <unistd.h>     // For usleep()
#include <sched.h>      // For sched_yield()
#endif  /* __MINGW32__ */

#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include "msvc/targetver.h"
#include <windows.h>    // For Sleep(), SwitchToThread()
#endif  /* _MSC_VER */

#if defined(__MINGW32__) || defined(__CYGWIN__)

void jimi_sleep(unsigned int millisec)
{
    usleep(millisec * 1000);
}

void jimi_usleep(unsigned int usec)
{
    usleep(usec);
}

void jimi_wsleep(unsigned int millisec)
{
    Sleep(millisec);
}

int jimi_yield()
{
    /* On success, SwitchToThread() returns 1.  On error, 0 is returned. */
    return (int)SwitchToThread();
}

#elif defined(__linux__) || defined(__GNUC__)

void jimi_sleep(unsigned int millisec)
{
    usleep(millisec * 1000);
}

void jimi_wsleep(unsigned int millisec)
{
#if 0
    if (millisec != 0)
        jimi_sleep(millisec);
    else
        usleep(1);
#else
    if (millisec == 0)
        sched_yield();
    else
        usleep(1);
#endif
}

///
/// int sched_yield(void);
/// See: http://man7.org/linux/man-pages/man2/sched_yield.2.html
///
/// sched_yield()函数 高级进程管理
/// See: http://blog.csdn.net/magod/article/details/7265555
///
int jimi_yield()
{
    /* On success, sched_yield() returns 0.  On error, -1 is returned. */
    return (sched_yield() ? 0 : 1);
}

#elif defined(_MSC_VER) || defined(__INTEL_COMPILER)

void jimi_sleep(unsigned int millisec)
{
    Sleep(millisec);
}

void jimi_usleep(unsigned int usec)
{
    Sleep((usec + 999) / 1000);
}

void jimi_wsleep(unsigned int millisec)
{
    Sleep(millisec);
}

///
/// MSDN: SwitchToThread
/// See: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686352%28v=vs.85%29.aspx
///
int jimi_yield()
{
    /* On success, SwitchToThread() returns 1.  On error, 0 is returned. */
    return (int)SwitchToThread();
}

#else  /* other unknown os */

void jimi_sleep(unsigned int millisec)
{
    // Do nothing !!
    volatile unsigned int sum = 0;
    unsigned int i, j;
    for (i = 0; i < millisec; ++i) {
        sum += i;
        for (j = 5; j >= 0; --j) {
            sum -= j;
        }
    }
}

void jimi_usleep(unsigned int usec)
{
    // Not implemented
    volatile unsigned int sum = 0;
    unsigned int i, j;
    for (i = 0; i < millisec; ++i) {
        sum += i;
        for (j = 1; j >= 0; --j) {
            sum -= j;
        }
    }
}

void jimi_wsleep(unsigned int millisec)
{
    jimi_sleep(millisec);
}

int jimi_yield()
{
    // Not implemented
    return 1;
}

#endif  /* __linux__ */


text:
<?php
/**
 * Auto generated from model.proto at 2015-07-04 02:41:45
 */

/**
 * OrderInfo message
 */
class OrderInfo extends \ProtobufMessage
{
    /* Field index constants */
    const ID = 1;
    const USER_ID = 2;
    const TIMESTAMP = 3;
    const DESCRIPTION = 11;
    const PERFORM_COST = 51;

    /* @var array Field descriptors */
    protected static $fields = array(
        self::ID => array(
            'name' => 'id',
            'required' => true,
            'type' => 7,
        ),
        self::USER_ID => array(
            'name' => 'user_id',
            'required' => true,
            'type' => 7,
        ),
        self::TIMESTAMP => array(
            'name' => 'timestamp',
            'required' => true,
            'type' => 5,
        ),
        self::DESCRIPTION => array(
            'name' => 'description',
            'required' => false,
            'type' => 7,
        ),
        self::PERFORM_COST => array(
            'name' => 'perform_cost',
            'required' => false,
            'type' => 1,
        ),
    );

    /**
     * Constructs new message container and clears its internal state
     *
     * @return null
     */
    public function __construct()
    {
        $this->reset();
    }

    /**
     * Clears message values and sets default ones
     *
     * @return null
     */
    public function reset()
    {
        $this->values[self::ID] = null;
        $this->values[self::USER_ID] = null;
        $this->values[self::TIMESTAMP] = null;
        $this->values[self::DESCRIPTION] = null;
        $this->values[self::PERFORM_COST] = null;
    }

    /**
     * Returns field descriptors
     *
     * @return array
     */
    public function fields()
    {
        return self::$fields;
    }

    /**
     * Sets value of 'id' property
     *
     * @param string $value Property value
     *
     * @return null
     */
    public function setId($value)
    {
        return $this->set(self::ID, $value);
    }

    /**
     * Returns value of 'id' property
     *
     * @return string
     */
    public function getId()
    {
        return $this->get(self::ID);
    }

    /**
     * Sets value of 'user_id' property
     *
     * @param string $value Property value
     *
     * @return null
     */
    public function setUserId($value)
    {
        return $this->set(self::USER_ID, $value);
    }

    /**
     * Returns value of 'user_id' property
     *
     * @return string
     */
    public function getUserId()
    {
        return $this->get(self::USER_ID);
    }

    /**
     * Sets value of 'timestamp' property
     *
     * @param int $value Property value
     *
     * @return null
     */
    public function setTimestamp($value)
    {
        return $this->set(self::TIMESTAMP, $value);
    }

    /**
     * Returns value of 'timestamp' property
     *
     * @return int
     */
    public function getTimestamp()
    {
        return $this->get(self::TIMESTAMP);
    }

    /**
     * Sets value of 'description' property
     *
     * @param string $value Property value
     *
     * @return null
     */
    public function setDescription($value)
    {
        return $this->set(self::DESCRIPTION, $value);
    }

    /**
     * Returns value of 'description' property
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->get(self::DESCRIPTION);
    }

    /**
     * Sets value of 'perform_cost' property
     *
     * @param float $value Property value
     *
     * @return null
     */
    public function setPerformCost($value)
    {
        return $this->set(self::PERFORM_COST, $value);
    }

    /**
     * Returns value of 'perform_cost' property
     *
     * @return float
     */
    public function getPerformCost()
    {
        return $this->get(self::PERFORM_COST);
    }
}

/**
 * OrderPerformInfo message
 */
class OrderPerformInfo extends \ProtobufMessage
{
    /* Field index constants */
    const USER_ID = 2;
    const TIMESTAMP = 3;
    const PERFORM_PROFIT = 51;

    /* @var array Field descriptors */
    protected static $fields = array(
        self::USER_ID => array(
            'name' => 'user_id',
            'required' => true,
            'type' => 7,
        ),
        self::TIMESTAMP => array(
            'name' => 'timestamp',
            'required' => true,
            'type' => 5,
        ),
        self::PERFORM_PROFIT => array(
            'name' => 'perform_profit',
            'required' => false,
            'type' => 1,
        ),
    );

    /**
     * Constructs new message container and clears its internal state
     *
     * @return null
     */
    public function __construct()
    {
        $this->reset();
    }

    /**
     * Clears message values and sets default ones
     *
     * @return null
     */
    public function reset()
    {
        $this->values[self::USER_ID] = null;
        $this->values[self::TIMESTAMP] = null;
        $this->values[self::PERFORM_PROFIT] = null;
    }

    /**
     * Returns field descriptors
     *
     * @return array
     */
    public function fields()
    {
        return self::$fields;
    }

    /**
     * Sets value of 'user_id' property
     *
     * @param string $value Property value
     *
     * @return null
     */
    public function setUserId($value)
    {
        return $this->set(self::USER_ID, $value);
    }

    /**
     * Returns value of 'user_id' property
     *
     * @return string
     */
    public function getUserId()
    {
        return $this->get(self::USER_ID);
    }

    /**
     * Sets value of 'timestamp' property
     *
     * @param int $value Property value
     *
     * @return null
     */
    public function setTimestamp($value)
    {
        return $this->set(self::TIMESTAMP, $value);
    }

    /**
     * Returns value of 'timestamp' property
     *
     * @return int
     */
    public function getTimestamp()
    {
        return $this->get(self::TIMESTAMP);
    }

    /**
     * Sets value of 'perform_profit' property
     *
     * @param float $value Property value
     *
     * @return null
     */
    public function setPerformProfit($value)
    {
        return $this->set(self::PERFORM_PROFIT, $value);
    }

    /**
     * Returns value of 'perform_profit' property
     *
     * @return float
     */
    public function getPerformProfit()
    {
        return $this->get(self::PERFORM_PROFIT);
    }
}

/**
 * UserWalletInfo message
 */
class UserWalletInfo extends \ProtobufMessage
{
    /* Field index constants */
    const PERFORM_ORDER = 1;
    const QUANTITY_OF_MONEY = 11;

    /* @var array Field descriptors */
    protected static $fields = array(
        self::PERFORM_ORDER => array(
            'name' => 'perform_order',
            'required' => false,
            'type' => 5,
        ),
        self::QUANTITY_OF_MONEY => array(
            'name' => 'quantity_of_money',
            'required' => false,
            'type' => 1,
        ),
    );

    /**
     * Constructs new message container and clears its internal state
     *
     * @return null
     */
    public function __construct()
    {
        $this->reset();
    }

    /**
     * Clears message values and sets default ones
     *
     * @return null
     */
    public function reset()
    {
        $this->values[self::PERFORM_ORDER] = null;
        $this->values[self::QUANTITY_OF_MONEY] = null;
    }

    /**
     * Returns field descriptors
     *
     * @return array
     */
    public function fields()
    {
        return self::$fields;
    }

    /**
     * Sets value of 'perform_order' property
     *
     * @param int $value Property value
     *
     * @return null
     */
    public function setPerformOrder($value)
    {
        return $this->set(self::PERFORM_ORDER, $value);
    }

    /**
     * Returns value of 'perform_order' property
     *
     * @return int
     */
    public function getPerformOrder()
    {
        return $this->get(self::PERFORM_ORDER);
    }

    /**
     * Sets value of 'quantity_of_money' property
     *
     * @param float $value Property value
     *
     * @return null
     */
    public function setQuantityOfMoney($value)
    {
        return $this->set(self::QUANTITY_OF_MONEY, $value);
    }

    /**
     * Returns value of 'quantity_of_money' property
     *
     * @return float
     */
    public function getQuantityOfMoney()
    {
        return $this->get(self::QUANTITY_OF_MONEY);
    }
}


text: var odl = angular.module('odl', []);


text:
var getReviewers = require('../src/get-reviewers');
var Config = require('../src/models/config');

var driver = require('./driver');
var config = driver.config;

var DEFAULT_FILES = [
  {
    filename: 'MOST_CHANGES',
    status: 'modified',
    additions: 20,
    deletions: 30,
    changes: 50
  },
  {
    filename: 'LEAST_CHANGES',
    status: 'modified',
    changes: 10,
    additions: 5,
    deletions: 5
  },
  {
    filename: 'JUST_ADDED',
    status: 'added',
    changes: 10,
    additions: 10,
    deletions: 0
  },
  {
    filename: 'JUST_DELETED',
    status: 'deleted',
    changes: 20,
    additions: 0,
    deletions: 20
  }
];

describe('#getReviewers', function() {
  afterEach(function() {
    process.env.PUBLIC_MODE = '';
  });

  it('fails without required parameters', function() {
    (function() {
      getReviewers();
    }.should.throw(
      Error,
      'No function provided for retrieving blame for a file'
    ));

    (function() {
      getReviewers({getBlameForFile: function() {}});
    }.should.throw());
  });

  it('fails with too many assignees', function() {
    (function() {
      getReviewers({
        config: Config({version: 1}),
        authorLogin: 'mockuser',
        getBlameForFile: function() {},
        assignees: [1, 2, 3, 4, 5, 6, 7, 8, 9]
      });
    }.should.throw(Error, 'Pull request has maximum reviewers assigned'));
  });

  it('does not assign reviewers if minimum is met by assignees', function() {
    (function() {
      getReviewers({
        config: Config({version: 1}),
        authorLogin: 'mockuser',
        getBlameForFile: function() {},
        assignees: [1]
      });
    }.should.throw(Error, 'Pull request has minimum reviewers assigned. Try "review ... again".'));
  });

  it('fails with bad file data', function() {
    (function() {
      getReviewers({
        config: Config({version: 1}),
        authorLogin: 'mockuser',
        getBlameForFile: function() {},
        files: [1, 2, 3]
      });
    }.should.throw(Error, 'Missing file data'));
  });

  it('fails with bad blame data', function() {
    return getReviewers({
      config: Config({version: 1}),
      authorLogin: 'mockuser',
      files: [
        {
          filename: 'test',
          status: 'modified',
          changes: 1
        }
      ],
      getBlameForFile: function() {
        return [
          {
            login: 'mockuser'
          }
        ];
      }
    }).should.eventually.be.rejectedWith(Error, 'Missing blame range data');
  });

  it('filters out unreachable authors', function() {
    return getReviewers({
      config: Config({
        version: 1,
        reviewers: {
          testuser: {}
        }
      }),
      authorLogin: 'foo',
      files: [
        {
          filename: 'test',
          status: 'modified',
          changes: 2
        }
      ],
      getBlameForFile: function() {
        return [
          {
            login: 'mockuser',
            count: 5,
            age: 1
          },
          {
            login: 'testuser',
            count: 1,
            age: 1
          }
        ];
      }
    }).then(function(reviewers) {
      reviewers = reviewers.map(function(r) {
        return r.login;
      });
      reviewers.should.not.include('mockuser');
      reviewers.should.include('testuser');
    });
  });

  it('filters out all commit authors', function() {
    return getReviewers({
      config: Config({
        version: 1,
        reviewers: {
          bob: {},
          charlie: {}
        }
      }),
      authorLogin: 'alice',
      files: [
        {
          filename: 'test',
          status: 'modified',
          changes: 10
        }
      ],
      commits: [
        {
          author: {
            login: 'charlie'
          }
        },
        {},
        {
          author: {}
        }
      ],
      getBlameForFile: function() {
        return [
          {
            login: 'charlie',
            count: 9,
            age: 1
          },
          {
            login: 'bob',
            count: 1,
            age: 10
          }
        ];
      }
    }).then(function(reviewers) {
      reviewers = reviewers.map(function(r) {
        return r.login;
      });
      reviewers.should.not.include('charlie');
      reviewers.should.include('bob');
    });
  });

  it('assigns reviewers with most ownership', function() {
    return getReviewers({
      config: Config({
        version: 1,
        reviewers: {
          alice: {},
          bob: {},
          charlie: {}
        }
      }),
      authorLogin: 'alice',
      files: [
        {
          filename: 'foo',
          status: 'modified',
          changes: 100
        },
        {
          filename: 'bar',
          status: 'modified',
          changes: 100
        }
      ],
      getBlameForFile: function(file) {
        if (file.filename === 'foo') {
          return [
            {
              login: 'bob',
              count: 70,
              age: 1
            },
            {
              login: 'charlie',
              count: 1,
              age: 1
            }
          ];
        } else if (file.filename === 'bar') {
          return [
            {
              login: 'charlie',
              count: 100,
              age: 1
            },
            {
              login: 'bob',
              count: 29,
              age: 1
            }
          ];
        }
      }
    }).then(function(reviewers) {
      reviewers.should.have.lengthOf(2);
      reviewers[0].login.should.equal('bob');
      reviewers[1].login.should.equal('charlie');
      reviewers[0].ownership.should.be.above(reviewers[1].ownership);
    });
  });

  it('assigns minimum reviewers randomly', function() {
    return getReviewers({
      config: Config({
        version: 1,
        reviewers: {
          alice: {},
          bob: {},
          charlie: {}
        }
      }),
      authorLogin: 'alice',
      files: [],
      getBlameForFile: function() {
        return [];
      }
    }).then(function(reviewers) {
      reviewers = reviewers.map(function(r) {
        return r.login;
      });
      reviewers.should.have.lengthOf(1);
      reviewers.should.not.include('alice');
    });
  });

  it('uses fallback paths when assigning minimum reviewers randomly', function() {
    return getReviewers({
      config: Config(config),
      authorLogin: 'alice',
      files: [
        {
          filename: 'app/web/index.js',
          status: 'modified',
          changes: 1
        },
        {
          filename: 'app/api/index.js',
          status: 'modified',
          changes: 1
        }
      ],
      getBlameForFile: function() {
        return [];
      }
    }).then(function(reviewers) {
      reviewers.should.have.lengthOf(1);
      reviewers[0].source.should.equal('fallback');
    });
  });

  it('uses assigned paths when assigning initial reviewers', function() {
    return getReviewers({
      config: Config(config),
      authorLogin: 'alice',
      files: [
        {
          filename: 'app/server.py',
          status: 'modified',
          changes: 1
        },
        {
          filename: 'app/api/index.js',
          status: 'modified',
          changes: 1
        }
      ],
      getBlameForFile: function() {
        return [
          {
            login: 'dee',
            count: 1000,
            age: 1
          }
        ];
      }
    }).then(function(reviewers) {
      reviewers.should.have.lengthOf(2);
      reviewers[0].login.should.equal('bob');
      reviewers[0].source.should.equal('assignment');
      reviewers[1].login.should.equal('dee');
    });
  });

  it('filters out blacklisted files', function() {
    return getReviewers({
      config: Config(config),
      authorLogin: 'alice',
      files: [
        {
          filename: 'app/ignored_file.txt',
          status: 'modified',
          changes: 1
        }
      ],
      getBlameForFile: function() {
        return [
          {
            login: 'dee',
            count: 1000,
            age: 1
          }
        ];
      }
    }).then(function(reviewers) {
      reviewers.should.have.lengthOf(1);
      reviewers[0].source.should.not.equal('blame');
      reviewers[0].count.should.equal(0);
    });
  });

  it('ignores existing reviewers when retrying review', function() {
    return getReviewers({
      config: Config({
        version: 1,
        reviewers: {
          alice: {},
          bob: {},
          charlie: {},
          dee: {}
        }
      }),
      authorLogin: 'alice',
      assignees: ['bob', 'charlie'],
      getBlameForFile: function() {
        return [];
      },
      retryReview: true
    }).then(function(reviewers) {
      reviewers.should.have.lengthOf(1);
      reviewers[0].login.should.equal('dee');
      reviewers[0].source.should.equal('random');
    });
  });

  describe('using label filter', function() {
    it('works with a whitelist when a required label is missing', function() {
      (function() {
        getReviewers({
          config: Config({
            version: 1,
            reviewers: {
              alice: {}
            },
            label_whitelist: ['review']
          }),
          labels: [{name: '?'}],
          authorLogin: 'bob',
          getBlameForFile: function() {
            return [];
          }
        });
      }.should.throw(Error, 'Label ? is not allowed'));
    });

    it('works with a whitelist when a required label is present', function() {
      (function() {
        getReviewers({
          config: Config({
            version: 1,
            reviewers: {
              alice: {}
            },
            label_whitelist: ['?']
          }),
          labels: [{name: '?'}],
          authorLogin: 'bob',
          getBlameForFile: function() {
            return [];
          }
        });
      }.should.not.throw(Error, 'Label ? is not allowed'));
    });

    it('works with a blacklist when a forbidden label is present', function() {
      (function() {
        getReviewers({
          config: Config({
            version: 1,
            reviewers: {
              alice: {}
            },
            label_blacklist: ['?']
          }),
          labels: [{name: '?'}],
          authorLogin: 'bob',
          getBlameForFile: function() {
            return [];
          }
        });
      }.should.throw(Error, 'Label ? is not allowed'));
    });

    it('works with a blacklist when a forbidden label is missing', function() {
      (function() {
        getReviewers({
          config: Config({
            version: 1,
            reviewers: {
              alice: {}
            },
            label_blacklist: ['review']
          }),
          labels: [{name: '?'}],
          authorLogin: 'bob',
          getBlameForFile: function() {
            return [];
          }
        });
      }.should.not.throw(Error, 'Label ? is not allowed'));
    });
  });

  describe('using max files per reviewer', function() {
    var options = {
      config: Config(config),
      authorLogin: 'charlie',
      getBlameForFile: function() {
        return [];
      }
    };

    it('assigns a minimum amount of reviewers', function() {
      options.files = [
        {
          filename: 'one_file',
          status: 'modified',
          changes: 1
        }
      ];

      return getReviewers(options).then(function(reviewers) {
        reviewers.should.have.lengthOf(1);
      });
    });

    it('assigns up to a minimum amount of reviewers', function() {
      var files = [];

      for (var i = 0; i < 100; i++) {
        files.push({
          filename: 'one_file',
          status: 'modified',
          changes: 1
        });
      }

      options.files = files;

      return getReviewers(options).then(function(reviewers) {
        reviewers.should.have.lengthOf(1);
      });
    });

    it('works with max files defined', function() {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {},
            dee: {}
          },
          max_files_per_reviewer: 1
        }),
        files: DEFAULT_FILES,
        authorLogin: 'wally',
        getBlameForFile: function() {
          return [];
        }
      }).then(function(reviewers) {
        reviewers.should.have.lengthOf(2);
      });
    });
  });

  describe('using max lines per reviewer', function() {
    var options = {
      config: Config({
        version: 1,
        reviewers: {
          alice: {},
          bob: {},
          charlie: {},
          dee: {}
        },
        max_lines_per_reviewer: 0
      }),
      files: DEFAULT_FILES,
      authorLogin: 'wally',
      getBlameForFile: function() {
        return [];
      }
    };

    it('assigns a minimum of reviewers', function() {
      return getReviewers(options).then(function(reviewers) {
        reviewers.should.have.lengthOf(1);
      });
    });

    it('assigns a maximum of reviewers', function() {
      options.config = Config({
        version: 1,
        reviewers: {
          alice: {},
          bob: {},
          charlie: {},
          dee: {}
        },
        max_lines_per_reviewer: 4
      });
      return getReviewers(options).then(function(reviewers) {
        reviewers.should.have.lengthOf(2);
      });
    });
  });

  describe('using both max files and max lines per reviewer', function() {
    var options = {
      config: Config({
        version: 1,
        reviewers: {
          alice: {},
          bob: {},
          charlie: {},
          dee: {}
        },
        max_lines_per_reviewer: 4,
        max_files_per_reviewer: 4
      }),
      files: DEFAULT_FILES,
      authorLogin: 'wally',
      getBlameForFile: function() {
        return [];
      }
    };

    it('assigns the minimum of the two', function() {
      return getReviewers(options).then(function(reviewers) {
        reviewers.should.have.lengthOf(1);
      });
    });

    //todo: improve this test, it passes with any value of max lines per reviewer
    it('does not assign a number below the minimum of reviewers', function() {
      options.config.max_lines_per_reviewer = 1000;
      return getReviewers(options).then(function(reviewers) {
        reviewers.should.have.lengthOf(1);
      });
    });
  });

  describe('using minimum authors of changed files', function() {
    it('assigns an additional reviewer if the minimum of distinct authors is not met', function() {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {}
          },
          min_authors_of_changed_files: 2
        }),
        files: [
          {
            filename: 'TEST',
            status: 'modified',
            changes: 100,
            additions: 100,
            deletions: 0
          }
        ],
        authorLogin: 'alice',
        getBlameForFile: function() {
          return [
            {
              login: 'bob',
              count: 100,
              age: 1
            }
          ];
        }
      }).then(function(reviewers) {
        var reviewerLogins = reviewers.map(function(r) {
          return r.login;
        });
        reviewerLogins.should.include('bob');
        reviewerLogins.should.include('charlie');
        reviewers.should.have.lengthOf(2);
        reviewers[0].source.should.equal('blame');
        reviewers[1].source.should.equal('random');
      });
    });

    it('unassigns an existing reviewer if there are already max reviewers', function() {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {},
            dee: {}
          },
          min_authors_of_changed_files: 3,
          max_lines_per_reviewer: 1,
          max_reviewers: 2
        }),
        files: [
          {
            filename: 'TEST',
            status: 'modified',
            changes: 100,
            additions: 100,
            deletions: 0
          }
        ],
        authorLogin: 'alice',
        getBlameForFile: function() {
          return [
            {
              login: 'bob',
              count: 100,
              age: 1
            },
            {
              login: 'charlie',
              count: 100,
              age: 1
            }
          ];
        }
      }).then(function(reviewers) {
        var reviewerLogins = reviewers.map(function(r) {
          return r.login;
        });
        reviewerLogins.should.include('bob');
        reviewerLogins.should.not.include('charlie');
        reviewerLogins.should.include('dee');
      });
    });

    it('does not assign an extra reviewer if the changed lines min is not met', function() {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {},
            dee: {}
          },
          min_authors_of_changed_files: 2,
          min_lines_changed_for_extra_reviewer: 101
        }),
        files: [
          {
            filename: 'TEST',
            status: 'modified',
            changes: 100,
            additions: 100,
            deletions: 0
          }
        ],
        authorLogin: 'alice',
        getBlameForFile: function() {
          return [
            {
              login: 'bob',
              count: 100,
              age: 1
            }
          ];
        }
      }).then(function(reviewers) {
        reviewers.should.have.lengthOf(1);
        reviewers[0].login.should.equal('bob');
      });
    });
  });

  describe('using min percent authorship', function () {
    it('assigns an extra reviewer by blame if one is available', function () {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {}
          },
          max_files_per_reviewer: 2,
          min_authors_of_changed_files: 2,
          min_percent_authorship_for_extra_reviewer: 60
        }),
        files: [
          {
            filename: 'TEST',
            status: 'modified',
            changes: 5,
          }
        ],
        authorLogin: 'alice',
        getBlameForFile: function () {
          return [
            {
              login: 'bob',
              count: 7,
              age: 1
            },
            {
              login: 'charlie',
              count: 2,
              age: 1
            }
          ]
        }
      }).then(function (reviewers) {
        reviewers.should.have.lengthOf(2);
        reviewers[0].login.should.equal('bob');
        reviewers[0].source.should.equal('blame');
        reviewers[1].login.should.equal('charlie');
        reviewers[1].source.should.equal('blame');
      });
    });

    it('assigns an extra reviewer randomly correctly', function () {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {}
          },
          max_files_per_reviewer: 2,
          min_authors_of_changed_files: 2,
          min_percent_authorship_for_extra_reviewer: 60
        }),
        files: [
          {
            filename: 'TEST',
            status: 'modified',
            changes: 5
          }
        ],
        authorLogin: 'alice',
        getBlameForFile: function () {
          return [
            {
              login: 'bob',
              count: 7,
              age: 1
            }
          ]
        }
      }).then(function (reviewers) {
        reviewers.should.have.lengthOf(2);
        reviewers[0].login.should.equal('bob');
        reviewers[0].source.should.equal('blame');
        reviewers[1].login.should.equal('charlie');
        reviewers[1].source.should.equal('random');
      });
    });

    it('assigns an extra reviewer correctly if there are no reviewers by blame', function () {
      return getReviewers({
        config: Config({
          version: 1,
          reviewers: {
            alice: {},
            bob: {},
            charlie: {}
          },
          max_files_per_reviewer: 2,
          min_authors_of_changed_files: 2,
          min_percent_authorship_for_extra_reviewer: 60
        }),
        files: [
          {
            filename: 'TEST',
            status: 'modified',
            changes: 5
          }
        ],
        authorLogin: 'alice',
        getBlameForFile: function () {
          return []
        }
      }).then(function (reviewers) {
        reviewers.should.have.lengthOf(1);
        reviewers[0].source.should.equal('random');
      });
    });
  });

  describe('in public mode', function() {
    it('works', function() {
      process.env.PUBLIC_MODE = 'true';
      return getReviewers({
        config: Config(config),
        files: [],
        authorLogin: 'alice',
        getBlameForFile: function() {}
      });
    });
  });

  it(
    'works even if there are not enough reviewers to meet min reviewers specified'
  );
});


text:
<?php
    use yii\helpers\Html;
    use yii\helpers\ArrayHelper;
?>

	<?= Html::a('Nuevo',['informacion-documentos/create'], ['class'=>'btn btn-primary', 'style'=> 'margin-bottom:20px'])?>

            No.
            Nombre del Solicitante
            Dirección del Solicitante
            Telefono del Solicitante
						Correo del Solicitante
            Acciones

        <?php $i=1; foreach ($informacionDocumentos as $infoDocumento) {?>

            <?= $i++;?>
            <?= $infoDocumento->nombreSolicitante ?>
            <?= $infoDocumento->direccionSolicitante ?>
            <?= $infoDocumento->telefonoSolicitante ?>
            <?= $infoDocumento->correoSolicitante?>

            <?= Html::a('',['informacion-documentos/view','id'=>$infoDocumento->id],['class'=>'btn btn-default btn-sm'])?>
            <?= Html::a('',['informacion-documentos/update','id'=>$infoDocumento->id],['class'=>'btn btn-default btn-sm'])?>
						<?= Html::a('',['informacion-documentos/imprimir','id'=>$infoDocumento->id], ['class' => 'btn btn-default btn-sm', "target" => "_blank"]) ?>

        <?php }?>


text:
@implementation RecommentCollectionReusableView

- (void)awakeFromNib {
    // Initialization code
}

@end


text:
"""Flow - Algorithmic HF trader

   Copyright 2016, Yazan Obeidi

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""

from learning import Learning
from indicators import Indicators
from order import Order, BUY, SELL, OPEN, ACTIONS

__author__ = 'yazan/matthew'

class Scope(object):
    """
    A scope is a resolution in time of quotes and has a collection of agents.
    """
    def __init__(self, scope, q, alpha, reward, discount, limit, quotes,
                                                                 bankroll, log):
        self.scope = scope
        self.q = q
        self.alpha = alpha
        self.reward = reward
        self.discount = discount
        self.bankroll = bankroll
        self.logger = log
        self.quotes = quotes
        self.limit = limit
        self.agents = [Agent(self.scope, q, alpha, reward, discount, quotes,
                                                         bankroll, self.logger)]

    def add_agent(self):
        self.logger.info('Adding agent to {}'.format(self.scope))
        self.agents.append(Agent(self.scope, self.q, self.alpha, self.reward,
                        self.discount, self.quotes, self.bankroll, self.logger))

    def get_agents(self):
        return self.agents

    def update(self, quote):
        for agent in self.agents:
            agent.update(quote)

    def trade(self):
        for agent in self.agents:
            agent.trade()

    def refresh(self, new_quote):
        """
        Performs actions to update scope state on a new hop:
            Update quotes: Agent.update(new_quote)
            Fire agents with poor performance: Agent.remove()
            Spawn new agent if none are idle: self.add_agent
        """
        none_are_idle = True
        #self.agents[:] = [agent for agent in self.agents if agent.performance < 1]
        # the above line should work but to avoid iterating through self.agents
        # twice I would like to try doing the following:
        for agent in self.agents[:]:
            agent.update(new_quote)
            if agent.status['status'] is 'idle':
                none_are_idle = False
            elif agent.performance < 1:
                self.agents.remove(agent)
        if none_are_idle and len(self.agents) < self.limit:
            self.add_agent()
            self.logger.info('{} agents active'.format(len(self.agents)))

    def free_agents(self):
        """
        Returns true iff at least one agent has no open positions.
        """
        for agent in self.agents:
            if agent.status['status'] is 'idle':
                return True
        return False

class Agent(Learning, Indicators, Order):
    """
    An agent's primarily role is to place good trades and learn from the
        consequences of its actions. A good trade is one that profits, and good
        trades raise the agent's performance. A higher performance results in a
        greater trade volume for the agent. An agent holds at most a single
        position at once.
    """
    def __init__(self, scope, q, alpha, reward, discount, quotes, bankroll,
                                                                      log=None):
        self.logger = log
        self.scope = scope
        self.actions = ACTIONS
        Indicators.__init__(self, log)
        Order.__init__(self, scope, bankroll, log)
        Learning.__init__(self, q, alpha, reward, discount, self.state, \
                                                                   self.actions)
        self.num_trades = 0
        self.performance = 1
        self.volume = max(self.performance, 1)
        self.logger = log
        self.status = {'status':'idle','action':''}
        self.quotes = quotes
        self.states = None

    def learn(self):
        self.logger.debug('{agent} in {scope} is learning'.format(
                                                  agent=self, scope=self.scope))
        self.prev_states = self.states
        self.states = self.get_states(self.quotes)
        if self.prev_states is not None:
            return self.get_action(self.states)
        return None

    def trade(self):
        response = self.learn()
        self.logger.debug('{agent} response is {response}'.format(agent=self,
                                                            response=response))
        if response is 1:
            if self.status['status'] is not OPEN:
                self.open_position(order=BUY)
            elif self.status['action'] is SELL:
                self.close_position()
        elif response is -1:
            if self.status['status'] is not OPEN:
                self.open_position(order=SELL)
            elif self.status['action'] is BUY:
                self.close_position()

    def open_position(self, order):
        self.open_order(order, self.quotes[-1], self.volume)
        self.status['status'] = OPEN
        self.status['action'] = order
        self.num_trades += 1

    def close_position(self):
        self.close_order(self.status['action'], self.quotes[-1])
        profit = self.get_profit()
        self.learnQ(self.states, self.status['action'], self.prev_states, profit)
        self.update_performance(profit)
        self.status['status'] = 'idle'

    def update_performance(self, profit):
        self.performance += profit * self.volume * self.num_trades
        self.logger.info('{p} - {agent} performance:'.format(agent=self,
                                                            p=self.performance))

    def update(self, quote):
        self.quotes.append(quote)


text:
import { TPromise } from 'vs/base/common/winjs.base';
import { IAction, IActionRunner, ActionRunner } from 'vs/base/common/actions';
import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
import { Component } from 'vs/workbench/common/component';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IComposite, ICompositeControl } from 'vs/workbench/common/composite';
import { Event, Emitter } from 'vs/base/common/event';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { trackFocus, Dimension } from 'vs/base/browser/dom';

/**
 * Composites are layed out in the sidebar and panel part of the workbench. At a time only one composite
 * can be open in the sidebar, and only one composite can be open in the panel.
 * Each composite has a minimized representation that is good enough to provide some
 * information about the state of the composite data.
 * The workbench will keep a composite alive after it has been created and show/hide it based on
 * user interaction. The lifecycle of a composite goes in the order create(), setVisible(true|false),
 * layout(), focus(), dispose(). During use of the workbench, a composite will often receive a setVisible,
 * layout and focus call, but only one create and dispose call.
 */
export abstract class Composite extends Component implements IComposite {

	private readonly _onTitleAreaUpdate: Emitter<void> = this._register(new Emitter<void>());
	get onTitleAreaUpdate(): Event<void> { return this._onTitleAreaUpdate.event; }

	private _onDidFocus: Emitter<void>;
	get onDidFocus(): Event<void> {
		if (!this._onDidFocus) {
			this._onDidFocus = this._register(new Emitter<void>());

			const focusTracker = this._register(trackFocus(this.getContainer()));
			this._register(focusTracker.onDidFocus(() => this._onDidFocus.fire()));
		}

		return this._onDidFocus.event;
	}

	protected actionRunner: IActionRunner;

	private visible: boolean;
	private parent: HTMLElement;

	/**
	 * Create a new composite with the given ID and context.
	 */
	constructor(
		id: string,
		private _telemetryService: ITelemetryService,
		themeService: IThemeService
	) {
		super(id, themeService);

		this.visible = false;
	}

	getTitle(): string {
		return null;
	}

	protected get telemetryService(): ITelemetryService {
		return this._telemetryService;
	}

	/**
	 * Note: Clients should not call this method, the workbench calls this
	 * method. Calling it otherwise may result in unexpected behavior.
	 *
	 * Called to create this composite on the provided builder. This method is only
	 * called once during the lifetime of the workbench.
	 * Note that DOM-dependent calculations should be performed from the setVisible()
	 * call. Only then the composite will be part of the DOM.
	 */
	create(parent: HTMLElement): TPromise<void> {
		this.parent = parent;

		return TPromise.as(null);
	}

	updateStyles(): void {
		super.updateStyles();
	}

	/**
	 * Returns the container this composite is being build in.
	 */
	getContainer(): HTMLElement {
		return this.parent;
	}

	/**
	 * Note: Clients should not call this method, the workbench calls this
	 * method. Calling it otherwise may result in unexpected behavior.
	 *
	 * Called to indicate that the composite has become visible or hidden. This method
	 * is called more than once during workbench lifecycle depending on the user interaction.
	 * The composite will be on-DOM if visible is set to true and off-DOM otherwise.
	 *
	 * The returned promise is complete when the composite is visible. As such it is valid
	 * to do a long running operation from this call. Typically this operation should be
	 * fast though because setVisible might be called many times during a session.
	 */
	setVisible(visible: boolean): TPromise<void> {
		this.visible = visible;

		return TPromise.as(null);
	}

	/**
	 * Called when this composite should receive keyboard focus.
	 */
	focus(): void {
		// Subclasses can implement
	}

	/**
	 * Layout the contents of this composite using the provided dimensions.
	 */
	abstract layout(dimension: Dimension): void;

	/**
	 * Returns an array of actions to show in the action bar of the composite.
	 */
	getActions(): IAction[] {
		return [];
	}

	/**
	 * Returns an array of actions to show in the action bar of the composite
	 * in a less prominent way then action from getActions.
	 */
	getSecondaryActions(): IAction[] {
		return [];
	}

	/**
	 * Returns an array of actions to show in the context menu of the composite
	 */
	getContextMenuActions(): IAction[] {
		return [];
	}

	/**
	 * For any of the actions returned by this composite, provide an IActionItem in
	 * cases where the implementor of the composite wants to override the presentation
	 * of an action. Returns null to indicate that the action is not rendered through
	 * an action item.
	 */
	getActionItem(action: IAction): IActionItem {
		return null;
	}

	/**
	 * Returns the instance of IActionRunner to use with this composite for the
	 * composite tool bar.
	 */
	getActionRunner(): IActionRunner {
		if (!this.actionRunner) {
			this.actionRunner = new ActionRunner();
		}

		return this.actionRunner;
	}

	/**
	 * Method for composite implementors to indicate to the composite container that the title or the actions
	 * of the composite have changed. Calling this method will cause the container to ask for title (getTitle())
	 * and actions (getActions(), getSecondaryActions()) if the composite is visible or the next time the composite
	 * gets visible.
	 */
	protected updateTitleArea(): void {
		this._onTitleAreaUpdate.fire();
	}

	/**
	 * Returns true if this composite is currently visible and false otherwise.
	 */
	isVisible(): boolean {
		return this.visible;
	}

	/**
	 * Returns the underlying composite control or null if it is not accessible.
	 */
	getControl(): ICompositeControl {
		return null;
	}
}

/**
 * A composite descriptor is a leightweight descriptor of a composite in the workbench.
 */
export abstract class CompositeDescriptor<T extends Composite> {
	id: string;
	name: string;
	cssClass: string;
	order: number;
	keybindingId: string;
	enabled: boolean;

	private ctor: IConstructorSignature0<T>;

	constructor(ctor: IConstructorSignature0<T>, id: string, name: string, cssClass?: string, order?: number, keybindingId?: string, ) {
		this.ctor = ctor;
		this.id = id;
		this.name = name;
		this.cssClass = cssClass;
		this.order = order;
		this.enabled = true;
		this.keybindingId = keybindingId;
	}

	instantiate(instantiationService: IInstantiationService): T {
		return instantiationService.createInstance(this.ctor);
	}
}

export abstract class CompositeRegistry<T extends Composite> {

	private readonly _onDidRegister: Emitter<CompositeDescriptor<T>> = new Emitter<CompositeDescriptor<T>>();
	get onDidRegister(): Event<CompositeDescriptor<T>> { return this._onDidRegister.event; }

	private composites: CompositeDescriptor<T>[] = [];

	protected registerComposite(descriptor: CompositeDescriptor<T>): void {
		if (this.compositeById(descriptor.id) !== null) {
			return;
		}

		this.composites.push(descriptor);
		this._onDidRegister.fire(descriptor);
	}

	getComposite(id: string): CompositeDescriptor<T> {
		return this.compositeById(id);
	}

	protected getComposites(): CompositeDescriptor<T>[] {
		return this.composites.slice(0);
	}

	private compositeById(id: string): CompositeDescriptor<T> {
		for (let i = 0; i < this.composites.length; i++) {
			if (this.composites[i].id === id) {
				return this.composites[i];
			}
		}

		return null;
	}
}


text:
@interface THEMessage : NSObject <NSCopying, NSCoding>
// Implement in a subclass.
+ (NSDictionary *)the_properties;  // NSDictionary<NSString, type>.
- (NSDictionary *)the_properties;

- (BOOL)isEqual:(id)other;
- (BOOL)isEqualToMessage:(THEMessage *)other;
- (NSUInteger)hash;
@end


text:
namespace device {

class DEVICE_GAMEPAD_EXPORT GamepadConsumer {
 public:
  GamepadConsumer();
  virtual ~GamepadConsumer();

  virtual void OnGamepadConnected(uint32_t index, const Gamepad& gamepad) = 0;
  virtual void OnGamepadDisconnected(uint32_t index,
                                     const Gamepad& gamepad) = 0;
  virtual void OnGamepadChanged(const mojom::GamepadChanges& change);
};

}  // namespace device

#endif  // DEVICE_GAMEPAD_GAMEPAD_CONSUMER_H_


text:
package com.yfiton.notifiers.pushbullet;

import com.github.sheigutn.pushbullet.Pushbullet;
import com.github.sheigutn.pushbullet.items.file.UploadFile;
import com.github.sheigutn.pushbullet.items.push.sendable.defaults.SendableFilePush;
import com.github.sheigutn.pushbullet.items.push.sendable.defaults.SendableLinkPush;
import com.github.sheigutn.pushbullet.items.push.sendable.defaults.SendableNotePush;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.yfiton.api.annotation.Parameter;
import com.yfiton.api.exceptions.NotificationException;
import com.yfiton.api.parameter.Parameters;
import com.yfiton.oauth.AccessTokenData;
import com.yfiton.oauth.AuthorizationData;
import com.yfiton.oauth.OAuthNotifier;
import com.yfiton.oauth.receiver.graphical.YfitonWebEngineListener;
import com.yfiton.oauth.receiver.PromptReceiver;
import org.apache.commons.configuration.HierarchicalINIConfiguration;
import org.apache.http.client.fluent.Form;
import org.apache.http.client.fluent.Request;

import java.io.File;
import java.io.IOException;
import java.util.Optional;

/**
 * @author lpellegr
 */
public class PushbulletNotifier extends OAuthNotifier {

    private static final String CLIENT_ID = "hjT07gVHUYnzN1iVlWIFU7K1Sxype0bf";

    @Parameter(description = "Access token allowing Pushbullet to know who you are")
    private String accessToken;

    @Parameter(description = "The note's title")
    private String title = "Yfiton";

    @Parameter(description = "A message associated with the push notification", required = true)
    private String body;

    @Parameter(description = "The url to open when link type is used")
    private String url;

    @Parameter
    private String file;

    public PushbulletNotifier() {
        super(CLIENT_ID, null);
    }

    @Override
    protected Check checkParameters(Parameters parameters) {
        return Check.succeeded();
    }

    @Override
    protected void notify(Parameters parameters) throws NotificationException {
        Pushbullet pushbullet = new Pushbullet(getAccessToken());

        try {
            if (file != null) {
                pushFile(pushbullet);
            } else if (url != null) {
                pushLink(pushbullet);
            } else {
                pushNote(pushbullet);
            }
        } catch (Exception e) {
            throw new NotificationException("Calling Pushbullet API has failed: " + e.getMessage(), e);
        }
    }

    private String getAccessToken() throws NotificationException {
        HierarchicalINIConfiguration configuration = getConfiguration();

        if (accessToken != null) {
            return accessToken;
        }

        return configuration.getString(KEY_ACCESS_TOKEN);
    }

    private void checkNotNull(Object obj, String name) throws NotificationException {
        if (obj == null) {
            throw new NotificationException("Missing " + name + " option required.");
        }
    }

    private void pushFile(Pushbullet pushbullet) throws NotificationException {
        UploadFile uploadFile = pushbullet.uploadFile(new File(file));
        pushbullet.push(new SendableFilePush(body, uploadFile));
    }

    private void pushLink(Pushbullet pushbullet) throws NotificationException {
        checkNotNull(title, "title");
        pushbullet.push(new SendableLinkPush(title, body, url));
    }

    private void pushNote(Pushbullet pushbullet) throws NotificationException {
        checkNotNull(title, "title");
        pushbullet.push(new SendableNotePush(title, body));
    }

    @Override
    protected Optional<String> getAccessTokenUrl(String authorizationCode) {
        return Optional.of("https://api.pushbullet.com/oauth2/token");
    }

    @Override
    protected String getAuthorizationUrl(String stateParameterValue) {
        return "https://www.pushbullet.com/authorize?client_id=" + super.getClientId()
                + "&redirect_uri=" + YFITON_OAUTH_CALLBACK_URL + "&response_type=code";
    }

    @Override
    public String getKey() {
        return "pushbullet";
    }

    @Override
    public String getName() {
        return "Pushbullet";
    }

    @Override
    public Optional<String> getDescription() {
        return Optional.of("Send notification on your devices using Pushbullet.");
    }

    @Override
    public Optional<String> getUrl() {
        return Optional.of("https://www.pushbullet.com");
    }

    @Override
    protected Optional<String> getStateRequestParameterName() {
        return Optional.empty();
    }

    @Override
    protected AccessTokenData requestAccessTokenData(AuthorizationData authorizationData) throws NotificationException {
        try {
            String authorizationCode = authorizationData.getAuthorizationCode();

            String response =
                    Request.Post(getAccessTokenUrl(authorizationCode).get()).bodyForm(
                            Form.form()
                                    .add("client_id", getClientId())
                                    .add("client_secret", getClientSecret())
                                    .add("code", authorizationCode)
                                    .add("grant_type", "authorization_code").build())
                            .execute().returnContent().asString();

            JsonObject json = new JsonParser().parse(response).getAsJsonObject();

            String accessToken = json.get("access_token").getAsString();
            String tokenType = json.get("token_type").getAsString();

            return new AccessTokenData(accessToken, ImmutableMap.of("tokenType", tokenType));
        } catch (IOException e) {
            throw new NotificationException(e);
        }
    }

}


text:
<bill session="115" type="h" number="1343" updated="2017-09-28T15:45:11Z">
  <state datetime="2017-04-04T16:58:21-04:00">PASS_OVER:HOUSE</state>
  <status>
    <unknown datetime="2017-04-04T16:58:21-04:00"/>
  </status>
  <introduced datetime="2017-03-02"/>
  <titles>
    <title type="short" as="introduced">Encouraging Employee Ownership Act of 2017</title>
    <title type="short" as="introduced">Encouraging Employee Ownership Act of 2017</title>
    <title type="short" as="reported to house">Encouraging Employee Ownership Act of 2017</title>
    <title type="short" as="reported to house">Encouraging Employee Ownership Act of 2017</title>
    <title type="short" as="passed house">Encouraging Employee Ownership Act of 2017</title>
    <title type="short" as="passed house">Encouraging Employee Ownership Act of 2017</title>
    <title type="official" as="introduced">To direct the Securities and Exchange Commission to revise its rules so as to increase the threshold amount for requiring issuers to provide certain disclosures relating to compensatory benefit plans.</title>
    <title type="display">Encouraging Employee Ownership Act of 2017</title>
  </titles>
  <sponsor bioguide_id="H001059"/>
  <cosponsors>
    <cosponsor bioguide_id="D000620" joined="2017-03-02"/>
    <cosponsor bioguide_id="G000583" joined="2017-03-10"/>
    <cosponsor bioguide_id="H001038" joined="2017-03-02"/>
    <cosponsor bioguide_id="M001193" joined="2017-03-02"/>
    <cosponsor bioguide_id="S001191" joined="2017-03-02"/>
    <cosponsor bioguide_id="S001187" joined="2017-03-02"/>
    <cosponsor bioguide_id="T000475" joined="2017-03-10"/>
  </cosponsors>
  <actions>
    <action datetime="2017-03-02">
      <text>Introduced in House</text>
    </action>
    <action datetime="2017-03-02" state="REFERRED">
      <text>Referred to the House Committee on Financial Services.</text>
    </action>
    <action datetime="2017-03-09">
      <text>Committee Consideration and Mark-up Session Held.</text>
    </action>
    <calendar datetime="2017-03-09" state="REPORTED">
      <text>Ordered to be Reported by the Yeas and Nays: 48 - 11.</text>
    </calendar>
    <action datetime="2017-03-29">
      <text>Reported by the Committee on Financial Services. H. Rept. 115-71.</text>
    </action>
    <calendar datetime="2017-03-29" calendar="Union" number="42">
      <text>Placed on the Union Calendar, Calendar No. 42.</text>
    </calendar>
    <action datetime="2017-04-03T18:41:20-04:00">
      <text>Rules Committee Resolution H. Res. 240 Reported to House. Rule provides for consideration of H.R. 1343 with 1 hour of general debate. Motion to recommit with or without instructions allowed.</text>
    </action>
    <action datetime="2017-04-04T14:31:31-04:00">
      <text>Rule H. Res. 240 passed House.</text>
    </action>
    <action datetime="2017-04-04T15:07:10-04:00">
      <text>Considered under the provisions of rule H. Res. 240.</text>
      <reference ref="CR H2667-2678" label="consideration"/>
    </action>
    <action datetime="2017-04-04T15:07:15-04:00">
      <text>Rule provides for consideration of H.R. 1343 with 1 hour of general debate. Motion to recommit with or without instructions allowed.</text>
    </action>
    <action datetime="2017-04-04T15:09:55-04:00">
      <text>DEBATE - The House proceeded with one hour of debate on H.R. 1343.</text>
    </action>
    <action datetime="2017-04-04T16:10:18-04:00">
      <text>DEBATE - Pursuant to the provisions of H.Res. 240, the House proceeded with 10 minutes of debate on the Polis amendment.</text>
    </action>
    <action datetime="2017-04-04T16:13:23-04:00">
      <text>Mr. Swalwell (CA) moved to recommit with instructions to the Committee on Financial Services.</text>
      <reference ref="CR H2675" label="text"/>
    </action>
    <action datetime="2017-04-04T16:14:11-04:00">
      <text>DEBATE - The House proceeded with 10 minutes of debate on the motion to recommit with instructions. The instructions contained in the motion seek to require the bill to be reported back to the House with an amendment to add a section to prohibit any exemption to an issuer if the issuer or affiliate of the issuer has withheld information from Congress relevant to its investigation of any collusion between persons associated with the Russian Government and persons associated with a presidential campaign.</text>
    </action>
    <action datetime="2017-04-04T16:20:49-04:00">
      <text>The previous question on the motion to recommit with instructions was ordered without objection.</text>
    </action>
    <action datetime="2017-04-04T16:45:31-04:00">
      <text>On motion to recommit with instructions Failed by the Yeas and Nays: 185 - 228 (Roll no. 215).</text>
    </action>
    <vote how="roll" type="vote" roll="216" datetime="2017-04-04T16:58:21-04:00" where="h" result="pass" state="PASS_OVER:HOUSE">
      <text>On passage Passed by the Yeas and Nays: 331 - 87 (Roll no. 216).</text>
      <reference ref="CR H2667" label="text of amendment in the nature of a substitute"/>
    </vote>
    <action datetime="2017-04-04T16:58:22-04:00">
      <text>Motion to reconsider laid on the table Agreed to without objection.</text>
    </action>
    <action datetime="2017-04-05">
      <text>Received in the Senate and Read twice and referred to the Committee on Banking, Housing, and Urban Affairs.</text>
    </action>
  </actions>
  <committees>
    <committee subcommittee="" code="SSBK" name="Senate Banking, Housing, and Urban Affairs" activity="Referral"/>
    <committee subcommittee="" code="HSBA" name="House Financial Services" activity="Reporting, Markup, Referral"/>
  </committees>
  <relatedbills>
    <bill type="h" session="115" relation="unknown" number="3280"/>
    <bill type="h" session="115" relation="unknown" number="10"/>
    <bill type="h" session="115" relation="unknown" number="3354"/>
    <bill type="s" session="115" relation="unknown" number="488"/>
    <bill type="hr" session="115" relation="procedurally-related" number="240"/>
  </relatedbills>
  <subjects>
    <term name="Finance and financial sector"/>
    <term name="Administrative law and regulatory procedures"/>
    <term name="Employee benefits and pensions"/>
    <term name="Financial services and investments"/>
    <term name="Securities"/>
    <term name="Securities and Exchange Commission (SEC)"/>
  </subjects>
  <amendments>
    <amendment number="h107"/>
    <amendment number="h106"/>
  </amendments>
  <summary date="2017-04-04T14:32:16Z" status="Passed House amended">Encouraging Employee Ownership Act of 2017

(Sec. 2) This bill  requires the Securities and Exchange Commission to increase, from $5 million to $10 million, the 12-month sales threshold beyond which an issuer is required to provide investors with additional disclosures related to compensatory benefit plans.</summary>
  <committee-reports>
    <report>H. Rept. 115-71</report>
  </committee-reports>
</bill>


text:
#pragma once
#include <aws/chime/Chime_EXPORTS.h>
#include <aws/chime/model/SipRule.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace Chime
{
namespace Model
{
  class AWS_CHIME_API GetSipRuleResult
  {
  public:
    GetSipRuleResult();
    GetSipRuleResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    GetSipRuleResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
The SIP rule details.

     */
    inline const SipRule& GetSipRule() const{ return m_sipRule; }

    /**
     *
The SIP rule details.

     */
    inline void SetSipRule(const SipRule& value) { m_sipRule = value; }

    /**
     *
The SIP rule details.

     */
    inline void SetSipRule(SipRule&& value) { m_sipRule = std::move(value); }

    /**
     *
The SIP rule details.

     */
    inline GetSipRuleResult& WithSipRule(const SipRule& value) { SetSipRule(value); return *this;}

    /**
     *
The SIP rule details.

     */
    inline GetSipRuleResult& WithSipRule(SipRule&& value) { SetSipRule(std::move(value)); return *this;}

  private:

    SipRule m_sipRule;
  };

} // namespace Model
} // namespace Chime
} // namespace Aws


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/forecast_list" android:layout_width="53dp"
	android:layout_height="wrap_content" android:orientation="vertical"
	android:background="@color/current">

	<include layout="@layout/widget_forecast_icon" />
	<include layout="@layout/widget_forecast_temp" />
	<include layout="@layout/widget_forecast_time" />
</LinearLayout>


text:
// -----------------------------------------------------------------------
// <copyright file="NoteNotification.cs" company="Nodine Legal, LLC">
// Licensed to Nodine Legal, LLC under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  Nodine Legal, LLC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
// </copyright>
// -----------------------------------------------------------------------

namespace OpenLawOffice.Common.Models.Notes
{
    using System;

    public class NoteNotification : Core
    {
        public Guid? Id { get; set; }

        public Note Note { get; set; }

        public Contacts.Contact Contact { get; set; }

        public DateTime? Cleared { get; set; }
    }
}


text:
set(ASAN_LIB_NAMES
asan
libasan.so.0
libasan.so.1
libasan.so.2
libasan.so.3
)
set(UBSAN_LIB_NAMES
ubsan
libubsan.so.0
)
set(TSAN_LIB_NAMES
tsan
libtsan.so.0
)

option(SANITIZE_ADDRESS "Enable Address Sanitizer" OFF)
option(SANITIZE_UNDEFINED "Enable Undefined Behavior Sanitizer" OFF)
option(SANITIZE_THREAD "Enable Thread Sanitizer" OFF)

if ( SANITIZE_ADDRESS )
  if (SANITIZE_ADDRESS AND SANITIZE_THREAD)
      message(FATAL_ERROR "AddressSanitizer is not compatible with "
          "ThreadSanitizer or MemorySanitizer.")
  endif ()

  find_library(__libasan NAMES ${ASAN_LIB_NAMES} PATHS /usr/lib /usr/lib/x86_64-linux-gnu)
  if (NOT __libasan)
    message(STATUS "Enabling Address Sanitizer - Failed")
    message(STATUS "Missing libasan.so")
    unset(SANITIZE_ADDRESS CACHE)
  else ()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
    execute_process (COMMAND bash -c "ls /usr/bin/llvm-symbolizer-*" OUTPUT_VARIABLE llvm_sym)
    set(ASAN_SYMBOLIZER_PATH "${llvm_sym}")
    set(ASAN_OPTIONS "symbolize=1")
    message(STATUS "Enabling Address Sanitizer - Success")
    message("")
    message("### For a better understanding of Asan output, execute:")
    message("")
    message("###   export ASAN_SYMBOLIZER_PATH=${ASAN_SYMBOLIZER_PATH}")
    message("###   export ASAN_OPTIONS=${ASAN_OPTIONS}")
    message("")
  endif ()
endif()

if ( SANITIZE_UNDEFINED )
  find_library(__libubsan NAMES ${UBSAN_LIB_NAMES} PATHS /usr/lib /usr/lib/x86_64-linux-gnu)
  if (NOT __libubsan)
    message(STATUS "Enabling Undefined Behavior Sanitizer - Failed")
    message(STATUS "Missing libubsan.so")
    unset(SANITIZE_UNDEFINED CACHE)
  else ()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
    message(STATUS "Enabling Undefined Behavior Sanitizer - Success")
  endif ()
endif()

if ( SANITIZE_THREAD )
  find_library(__libtsan NAMES ${TSAN_LIB_NAMES} PATHS /usr/lib /usr/lib/x86_64-linux-gnu)
  if (NOT __libtsan)
    message(STATUS "Enabling Thread Sanitizer - Failed")
    message(STATUS "Missing libtsan.so")
    unset(SANITIZE_THREAD CACHE)
  else ()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
    message(STATUS "Enabling Thread Sanitizer - Success")
  endif ()
endif()


text:
!-----------------------------------------------------------------------------
!
!  Copyright(C) 1997-2005 Krzysztof M. Gorski, Eric Hivon,
!                          Benjamin D. Wandelt, Anthony J. Banday,
!                          Matthias Bartelmann, Hans K. Eriksen,
!                          Frode K. Hansen, Martin Reinecke
!
!
!  This file is part of HEALPix.
!
!  HEALPix is free software; you can redistribute it and/or modify
!  it under the terms of the GNU General Public License as published by
!  the Free Software Foundation; either version 2 of the License, or
!  (at your option) any later version.
!
!  HEALPix is distributed in the hope that it will be useful,
!  but WITHOUT ANY WARRANTY; without even the implied warranty of
!  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!  GNU General Public License for more details.
!
!  You should have received a copy of the GNU General Public License
!  along with HEALPix; if not, write to the Free Software
!  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
!
!  For more information about HEALPix see http://healpix.jpl.nasa.gov
!
!-----------------------------------------------------------------------------
Module healpix_types
    ! This module sets the types used in the Fortran 90 modules
    ! of the HEALPIX distribution and follows the example of Numerical Recipes
    !
    ! Benjamin D. Wandelt October 1997
    ! Eric Hivon June 1998
    ! Eric Hivon Oct  2001, edited to be compatible with 'F' compiler
    ! Eric Hivon July 2002, addition of i8b, i2b, i1b
    !                       addition of max_i8b, max_i2b and max_i1b
    !            Jan 2005, explicit form of max_i1b because of ifc 8.1.021
    !            June 2005, redefine i8b as 16 digit integer because of Nec f90 compiler

    Integer, Parameter, Public :: i8b = Selected_int_kind(16)
    Integer, Parameter, Public :: i4b = Selected_int_kind(9)
    Integer, Parameter, Public :: i2b = Selected_int_kind(4)
    Integer, Parameter, Public :: i1b = Selected_int_kind(2)
    Integer, Parameter, Public :: sp = Selected_real_kind(5, 30)
    Integer, Parameter, Public :: dp = Selected_real_kind(12, 200)
    Integer, Parameter, Public :: lgt = Kind(.True.)
    Integer, Parameter, Public :: spc = Kind((1.0_sp, 1.0_sp))
    Integer, Parameter, Public :: dpc = Kind((1.0_dp, 1.0_dp))
    !
    Integer(i8b), Parameter, Public :: max_i8b = Huge(1_i8b)
    Integer, Parameter, Public :: max_i4b = Huge(1_i4b)
    Integer, Parameter, Public :: max_i2b = Huge(1_i2b)
    Integer, Parameter, Public :: max_i1b = 127
    Real(Kind=sp), Parameter, Public :: max_sp = Huge(1.0_sp)
    Real(Kind=dp), Parameter, Public :: max_dp = Huge(1.0_dp)

    ! Numerical Constant(Double precision)
    Real(Kind=dp), Parameter, Public :: QUARTPI = 0.785398163397448309615660845819875721049_dp
    Real(Kind=dp), Parameter, Public :: HALFPI = 1.570796326794896619231321691639751442099_dp
    Real(Kind=dp), Parameter, Public :: PI = 3.141592653589793238462643383279502884197_dp
    Real(Kind=dp), Parameter, Public :: TWOPI = 6.283185307179586476925286766559005768394_dp
    Real(Kind=dp), Parameter, Public :: FOURPI = 12.56637061435917295385057353311801153679_dp
    Real(Kind=dp), Parameter, Public :: SQRT2 = 1.41421356237309504880168872420969807856967_dp
    Real(Kind=dp), Parameter, Public :: SQRT2_INV = 0.707106781186547524400844362105_dp
    Real(Kind=dp), Parameter, Public :: EULER = 0.5772156649015328606065120900824024310422_dp
    Real(Kind=dp), Parameter, Public :: SQ4PI_INV = 0.2820947917738781434740397257803862929220_dp
    Real(Kind=dp), Parameter, Public :: TWOTHIRD = 0.6666666666666666666666666666666666666666_dp

    Real(Kind=dp), Parameter, Public :: RAD2DEG = 180.0_dp / PI
    Real(Kind=dp), Parameter, Public :: DEG2RAD = PI / 180.0_dp
    Real(Kind=sp), Parameter, Public :: hpx_sbadval = - 1.6375e30_sp
    Real(Kind=dp), Parameter, Public :: hpx_dbadval = - 1.6375e30_dp

    ! Maximum length of filenames
    Integer, Parameter :: filenamelen = 1024

    ! ---- Normalisation and convention ----
    ! normalisation of spin weighted functions
    Real(Kind=dp), Parameter, Public :: KvS = 1.0_dp ! 1.0 : CMBFAST(Healpix 1.2)
    ! sign of Q
    Real(Kind=dp), Parameter, Public :: sgQ = - 1.0_dp ! -1 : CMBFAST(Healpix 1.2)
    ! sign of spin weighted function !
    Real(Kind=dp), Parameter, Public :: SW1 = - 1.0_dp ! -1 : Healpix 1.2, bug correction

    !  ! normalisation of spin weighted functions
    !  real(kind=dp), parameter, public ::  KvS = 2.0_dp ! 2.0 : KKS  (Healpix 1.1)
    !  ! sign of Q
    !  real(kind=dp), parameter, public :: sgQ = +1.0_dp ! +1 : KKS(Healpix 1.1)
    !  ! sign of spin weighted function !
    !  real(kind=dp), parameter, public :: SW1 = +1.0_dp ! +1 : Healpix 1.1

    Real(Kind=dp), Parameter, Public :: iKvS = 1.0_dp / KvS ! inverse of KvS

End Module healpix_types

! the following lines are added to suppress the compiler warning: 'healpix_types.o is empty'
subroutine JustForTest
    implicit none
    real:: x = 3.1415926535
    write(*,*) 'sin(',x,') = ', sin(x)
end subroutine JustForTest


text:
package org.gradle.test.performance.mediummonolithicjavaproject.p487;

import org.junit.Test;
import static org.junit.Assert.*;

public class Test9759 {
    Production9759 objectUnderTest = new Production9759();

    @Test
    public void testProperty0() {
        Production9756 value = new Production9756();
        objectUnderTest.setProperty0(value);
        assertEquals(value, objectUnderTest.getProperty0());
    }

    @Test
    public void testProperty1() {
        Production9757 value = new Production9757();
        objectUnderTest.setProperty1(value);
        assertEquals(value, objectUnderTest.getProperty1());
    }

    @Test
    public void testProperty2() {
        Production9758 value = new Production9758();
        objectUnderTest.setProperty2(value);
        assertEquals(value, objectUnderTest.getProperty2());
    }

    @Test
    public void testProperty3() {
        String value = "value";
        objectUnderTest.setProperty3(value);
        assertEquals(value, objectUnderTest.getProperty3());
    }

    @Test
    public void testProperty4() {
        String value = "value";
        objectUnderTest.setProperty4(value);
        assertEquals(value, objectUnderTest.getProperty4());
    }

    @Test
    public void testProperty5() {
        String value = "value";
        objectUnderTest.setProperty5(value);
        assertEquals(value, objectUnderTest.getProperty5());
    }

    @Test
    public void testProperty6() {
        String value = "value";
        objectUnderTest.setProperty6(value);
        assertEquals(value, objectUnderTest.getProperty6());
    }

    @Test
    public void testProperty7() {
        String value = "value";
        objectUnderTest.setProperty7(value);
        assertEquals(value, objectUnderTest.getProperty7());
    }

    @Test
    public void testProperty8() {
        String value = "value";
        objectUnderTest.setProperty8(value);
        assertEquals(value, objectUnderTest.getProperty8());
    }

    @Test
    public void testProperty9() {
        String value = "value";
        objectUnderTest.setProperty9(value);
        assertEquals(value, objectUnderTest.getProperty9());
    }

}


text:
package org.apache.derby.impl.sql.execute;

import org.apache.derby.iapi.services.sanity.SanityManager;
import org.apache.derby.iapi.sql.execute.ExecAggregator;
import org.apache.derby.iapi.types.DataValueDescriptor;
import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.services.io.Formatable;

import java.io.ObjectOutput;
import java.io.ObjectInput;
import java.io.IOException;

/**
 * Abstract aggregator for Orderable aggregates (max/min).
 *
 */
abstract class OrderableAggregator extends SystemAggregator
{
	protected DataValueDescriptor value;

	/**
	 */
	public void setup(String aggregateName)
	{
	}

	/**
	 * @see ExecAggregator#merge
	 *
	 * @exception StandardException on error
	 */
	public void merge(ExecAggregator addend)
		throws StandardException
	{
		if (SanityManager.DEBUG)
		{
			SanityManager.ASSERT(addend instanceof OrderableAggregator,
				"addend is supposed to be the same type of aggregator for the merge operator");
		}

		// Don't bother merging if the other has never been used.
		DataValueDescriptor bv = ((OrderableAggregator)addend).value;
		if (bv != null)
			this.accumulate(bv);
	}

	/**
	 * Return the result of the operations that we
	 * have been performing.  Returns a DataValueDescriptor.
	 *
	 * @return the result as a DataValueDescriptor
	 */
	public DataValueDescriptor getResult() throws StandardException
	{
		return value;
	}

	/////////////////////////////////////////////////////////////
	//
	// EXTERNALIZABLE INTERFACE
	//
	/////////////////////////////////////////////////////////////
	/**
	 * Although we are not expected to be persistent per se,
	 * we may be written out by the sorter temporarily.  So
	 * we need to be able to write ourselves out and read
	 * ourselves back in.  We rely on formatable to handle
	 * situations where value is null.
	 *

	 * Why would we be called to write ourselves out if we
	 * are null?  For scalar aggregates, we don't bother
	 * setting up the aggregator since we only need a single
	 * row.  So for a scalar aggregate that needs to go to
	 * disk, the aggregator might be null.
	 *
	 * @exception IOException on error
	 *
	 * @see java.io.Externalizable#writeExternal
	 */
	public void writeExternal(ObjectOutput out) throws IOException
	{
		super.writeExternal(out);
		out.writeObject(value);
	}

	/**
	 * @see java.io.Externalizable#readExternal
	 *
	 * @exception IOException on error
	 * @exception ClassNotFoundException on error
	 */
	public void readExternal(ObjectInput in)
		throws IOException, ClassNotFoundException
	{
		super.readExternal(in);
		value = (DataValueDescriptor) in.readObject();
	}
}


text:
/* Example tokeninput style #1: Token vertical list*/
ul.token-input-list {
    overflow: hidden;
    height: auto !important;
    height: 1%;
    width: 400px;
    border: 1px solid #999;
    cursor: text;
    font-size: 12px;
    font-family: Verdana, sans-serif;
    z-index: 999;
    margin: 0;
    padding: 0;
    background-color: #fff;
    list-style-type: none;
    clear: left;
}

ul.token-input-list li {
    list-style-type: none;
}

ul.token-input-list li input {
    border: 0;
    width: 350px;
    padding: 3px 8px;
    background-color: white;
    -webkit-appearance: caret;
}

ul.token-input-disabled,
ul.token-input-disabled li input {
  background-color: #E8E8E8;
}

ul.token-input-disabled li.token-input-token {
  background-color: #D9E3CA;
  color: #7D7D7D
}

ul.token-input-disabled li.token-input-token span {
  color: #CFCFCF;
  cursor: default;
}

li.token-input-token {
    overflow: hidden;
    height: auto !important;
    height: 1%;
    margin: 3px;
    padding: 3px 5px;
    background-color: #d0efa0;
    color: #000;
    font-weight: bold;
    cursor: default;
    display: block;
}

li.token-input-token p {
    float: left;
    padding: 0;
    margin: 0;
}

li.token-input-token span {
    float: right;
    color: #777;
    cursor: pointer;
}

li.token-input-selected-token {
    background-color: #08844e;
    color: #fff;
}

li.token-input-selected-token span {
    color: #bbb;
}

div.token-input-dropdown {
    position: absolute;
    width: 400px;
    background-color: #fff;
    overflow: hidden;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    cursor: default;
    font-size: 12px;
    font-family: Verdana, sans-serif;
    z-index: 1;
}

div.token-input-dropdown p {
    margin: 0;
    padding: 5px;
    font-weight: bold;
    color: #777;
}

div.token-input-dropdown ul {
    margin: 0;
    padding: 0;
}

div.token-input-dropdown ul li {
    background-color: #fff;
    padding: 3px;
    list-style-type: none;
}

div.token-input-dropdown ul li.token-input-dropdown-item {
    background-color: #fafafa;
}

div.token-input-dropdown ul li.token-input-dropdown-item2 {
    background-color: #fff;
}

div.token-input-dropdown ul li em {
    font-weight: bold;
    font-style: normal;
}

div.token-input-dropdown ul li.token-input-selected-dropdown-item {
    background-color: #d0efa0;
}


text:
package ui

import (
	"html/template"
)

var (
	TplLayout = template.Must(template.New("layout.html").ParseFiles("ui/templates/layout.html"))

	TplBalancerList     = template.Must(template.Must(TplLayout.Clone()).ParseFiles("ui/templates/balancerList.html"))
	TplBalancerNewForm  = template.Must(template.Must(TplLayout.Clone()).ParseFiles("ui/templates/balancerNewForm.html"))
	TplBalancerView     = template.Must(template.Must(TplLayout.Clone()).ParseFiles("ui/templates/balancerView.html"))
	TplBalancerEditForm = template.Must(template.Must(TplLayout.Clone()).ParseFiles("ui/templates/balancerEditForm.html"))

	TplServerNewForm  = template.Must(template.Must(TplLayout.Clone()).ParseFiles("ui/templates/serverNewForm.html"))
	TplServerEditForm = template.Must(template.Must(TplLayout.Clone()).ParseFiles("ui/templates/serverEditForm.html"))
)


text:
Ext.define('KitchenSink.view.grid.RowExpander', {
    extend: 'Ext.grid.Panel',

    xtype: 'row-expander-grid',
    store: 'Companies',

    columns: [
        {text: "Company", flex: 1, dataIndex: 'company'},
        {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        {text: "Change", dataIndex: 'change'},
        {text: "% Change", dataIndex: 'pctChange'},
        {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
    ],
    width: 600,
    height: 300,
    plugins: [{
        ptype: 'rowexpander',
        rowBodyTpl : new Ext.XTemplate(
            '
Company: {company}
',
            '
Change: {change:this.formatChange}

',
            '
Summary: {desc}
',
        {
            formatChange: function(v){
                var color = v >= 0 ? 'green' : 'red';
                return '' + Ext.util.Format.usMoney(v) + '';
            }
        })
    }],
    collapsible: true,
    animCollapse: false,
    title: 'Expander Rows in a Collapsible Grid',
    iconCls: 'icon-grid'
});


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>edu.uba.filters</groupId>
  <artifactId>filters</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>filters</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
      <dependency>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
          <version>18.0</version>
      </dependency>
      <dependency>
          <groupId>commons-io</groupId>
          <artifactId>commons-io</artifactId>
          <version>2.4</version>
      </dependency>
      <dependency>
          <groupId>com.univocity</groupId>
          <artifactId>univocity-parsers</artifactId>
          <version>1.5.6</version>
          <type>jar</type>
      </dependency>
      <dependency>
          <groupId>com.opencsv</groupId>
          <artifactId>opencsv</artifactId>
          <version>3.4</version>
      </dependency>
      <dependency>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-math3</artifactId>
          <version>3.2</version>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


text:
try:
    import pkg_resources
    import setuptools
except ImportError:
    # Import setuptools if it's not already installed
    import distribute_setup
    distribute_setup.use_setuptools()

import os
import sys
from setuptools import setup
from setuptools import find_packages

opt_requires = []
# argparse is built-in in py2.7+ and py3.2+
if (sys.version_info[:2][0] < 3 and sys.version_info[:2][1] < 7) or (sys.version_info[:2][0] >= 3 and sys.version_info[:2][1] < 2):
    opt_requires.append('argparse')

setup(
        name = "traductor",
        version = "0.0.1",
        author = "Chris Fordham, Shaun Smekel, Toby Harris",
        author_email = "foo@bar.suf",
        description = "docker compose to system service file",
        url = "https://github.com/the0rem/traductor",
        entry_points = {
            'console_scripts': [
                'traductor = traductor.traductor:Cli',
            ]
        },
        packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
        package_data = {'': ['templates/*.service', 'examples/*.yaml']},
        include_package_data = True,
        install_requires = ['PyYAML', 'Jinja2', 'six'] + opt_requires,
        test_suite = 'tests',
        # tests_require = [],
        )


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
    <servlet>
        <servlet-name>jsonTest</servlet-name>
        <servlet-class>org.kickjs.test.JSONTest</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>jsonTest</servlet-name>
        <url-pattern>/test/jsonTest</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>LoginInfo</servlet-name>
        <servlet-class>org.kickjs.shared.LoginInfo</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>LoginInfo</servlet-name>
        <url-pattern>/LoginInfo</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>Logout</servlet-name>
        <servlet-class>org.kickjs.shared.Logout</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Logout</servlet-name>
        <url-pattern>/Logout</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>RedirectShaderEditor</servlet-name>
        <servlet-class>org.kickjs.shadereditor.Redirect</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>RedirectShaderEditor</servlet-name>
        <url-pattern>/example/shader_editor/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>RedirectShaderEditor</servlet-name>
        <url-pattern>/example/shader_editor</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>UpdateShader</servlet-name>
        <servlet-class>org.kickjs.shadereditor.UpdateShader</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>UpdateShader</servlet-name>
        <url-pattern>/tool/shader_editor/UpdateShader</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>GetShader</servlet-name>
        <servlet-class>org.kickjs.shadereditor.GetShader</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>GetShader</servlet-name>
        <url-pattern>/tool/shader_editor/GetShader</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>ImageProxy</servlet-name>
        <servlet-class>org.kickjs.shared.ImageProxy</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>ImageProxy</servlet-name>
        <url-pattern>/images/imageProxy</url-pattern>
    </servlet-mapping>

<!--
    <servlet>
        <servlet-name>sign</servlet-name>
        <servlet-class>guestbook.SignGuestbookServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>sign</servlet-name>
        <url-pattern>/sign</url-pattern>
    </servlet-mapping>
    -->

    <mime-mapping>
        <extension>dae</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>


text:
I. Connection & Login to CMS
============================

1. Go to the url 'http://edupi.fondationorange.org:8021/custom/' and jump into a login page.
(the port number is configured in nginx)

2. When authenticated with admin username and password, jump into the CMS home page.

II. Configuration of Directories
================================

1. Create root directories.

    In the home page, click `Create Directory` to create a `root directory`.
    We can see the result instantly.

2. Create sub directories.

    Click a root directory to enter into it, then click `Create Directory` to create a sub-directory
    under the current directory.

3. Change a directory's name.

    Click `Edit` on a directory row to enter a new name.

4. Delete a directory.

    Click `Delete` on a directory row to delete a directory.
    this action will also delete recursively all its sub directories.
    However, its documents will not be deleted.
    Danger: there is no `undo` for this action.

5. Move a sub-directory to root.

    Click `Unlink` on a directory row to move a sub-directory to the root.

6. Move a root directory to current directory.

    Suppose we are in a directory, we click the button `link a directory` to link a root directory to the current
    directory. The root directory then becomes a sub-directory of the current directory.

7. Navigation between the documents

    When entered into a directory, click the names on the navigation bar to go back to previous directories.

III. Upload & Configure Documents
=================================

1. Upload documents.

    When inside a directory, click `Upload` button to enter into the upload page.
    Then use drag-and-drop to upload documents.

    When uploading, the `finish` button is blocked.
    When upload finished, click the `finish` button go back to the directory.

2. Modify documents' META data.

    Click `Edit glyphicon` on a document to modify its `name`, `description`, etc.

3. Link a document.

    Click `Link documents` button under a directory to add existed documents from the server.

4. Unlink a document.

    Click `Unlink glyphicon` to unlink a document from the current directory.
    The unlinked document is not deleted from the server and may be linked by other directories.

5. Delete a document.

    Click `Delete glyphicon` to delete a document from the server.
    When a document is deleted, it's deleted from all the referenced directories.
    Danger: there is no `undo` for this action.

6. View a document online.

    Click the document's name to view the document with the browser.

7. Download a document.

    Click the `Download glyphicon` to download a document from the server.


text:
package org.cometd.common;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class HashMapMessageTest
{
    @Test
    public void testSerialization() throws Exception
    {
        HashMapMessage message = new HashMapMessage();
        message.setChannel("/channel");
        message.setClientId("clientId");
        message.setId("id");
        message.setSuccessful(true);
        message.getDataAsMap(true).put("data1", "dataValue1");
        message.getExt(true).put("ext1", "extValue1");

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(message);
        oos.close();

        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
        HashMapMessage deserialized = (HashMapMessage)ois.readObject();

        assertEquals(message, deserialized);
    }
}