text:
<?php

namespace spec\Sylius\Bundle\ApiBundle\Model;

use FOS\OAuthServerBundle\Entity\AuthCode;
use PhpSpec\ObjectBehavior;

class AuthCodeSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType('Sylius\Bundle\ApiBundle\Model\AuthCode');
    }

    function it_is_a_auth_code()
    {
        $this->shouldHaveType(AuthCode::class);
    }
}


text:
using System;
using System.Web.Http.Filters;

namespace WebApiMovieRest.Infrastructure.Tests.Builders
{
    public class HttpActionExecutedContextBuilder
    {
        private Exception _exception;

        public HttpActionExecutedContextBuilder WithException(Exception exception)
        {
            _exception = exception;
            return this;
        }

        public HttpActionExecutedContext Build()
        {
            return new HttpActionExecutedContext(new HttpActionContextBuilder(), _exception);
        }

        public static implicit operator HttpActionExecutedContext(HttpActionExecutedContextBuilder builder)
        {
            return builder.Build();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package info.fingo.urlopia;

import info.fingo.urlopia.team.ActiveDirectoryTeamSynchronizer;
import info.fingo.urlopia.user.ActiveDirectoryUserSynchronizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ActiveDirectorySynchronizationScheduler {
    private static final Logger LOGGER = LoggerFactory.getLogger(ActiveDirectorySynchronizationScheduler.class);

    private final ActiveDirectoryUserSynchronizer userSynchronizer;

    private final ActiveDirectoryTeamSynchronizer teamSynchronizer;

    @Autowired
    public ActiveDirectorySynchronizationScheduler(ActiveDirectoryUserSynchronizer userSynchronizer, ActiveDirectoryTeamSynchronizer teamSynchronizer) {
        this.userSynchronizer = userSynchronizer;
        this.teamSynchronizer = teamSynchronizer;
    }

    @Scheduled(cron = "0 0-59/15 * * * *")
    public void fullSynchronization() {
        LOGGER.info("*** FULL SYNCHRONIZATION START ***");
        userSynchronizer.addNewUsers();
        userSynchronizer.deactivateDeletedUsers();
        userSynchronizer.deactivateDisabledUsers();
        userSynchronizer.synchronizeFull();
        teamSynchronizer.addNewTeams();
        teamSynchronizer.synchronize();
        teamSynchronizer.assignUsersToTeams();
        teamSynchronizer.removeDeletedTeams();
        LOGGER.info("*** FULL SYNCHRONIZATION END ***");
    }

    @Bean
    public CommandLineRunner startupSynchronization() {
        return args -> this.fullSynchronization();
    }

}


text:
import { take, call, all, put, fork, race, } from 'redux-saga/effects';
import { LOCATION_CHANGE } from 'react-router-redux';
import { browserHistory } from 'react-router';

import {
	SENDING_REQUEST,
	LOGIN_REQUEST,
	REGISTER_REQUEST,
	SET_AUTH,
	LOGOUT,
	REQUEST_ERROR
} from './constants';

import auth from '../../services/auth';

function forwardTo(location) {
	browserHistory.push(location);
}

export function* loginFlow() {
	while (true) {
		const request = yield take(LOGIN_REQUEST);
		console.log('authSaga request', request)
		let {
			email,
			password
		} = request.data;
		try {
			let response = yield call(auth.login, email, password);
			console.log('authSaga response', response) // This returns undefined!
			yield put({ type: SET_AUTH, newAuthState: true });
			forwardTo('/wallet');
		} catch (e) {
			console.log('login error: ', e);
			return yield put({ type: REQUEST_ERROR, response: e.response });
		}

	}
}

export default function* sagas() {
	yield fork(loginFlow)
}

// export default [root];


text:
/**

\author Radu Bogdan Rusu

@b convert_pcd_ascii_binary converts PCD (Point Cloud Data) files from ascii to binary and viceversa.

 **/

#include <iostream>
#include <pcl/common/io.h>
#include <pcl/io/pcd_io.h>

using namespace std;

/* ---[ */
int
main (int argc, char** argv)
{
  if (argc < 4)
  {
    std::cerr << "Syntax is: " << argv[0] << " <file_in.pcd> <file_out.pcd> 0/1/2 (ascii/binary/binary_compressed) [precision (ASCII)]" << std::endl;
    return (-1);
  }

  pcl::PCLPointCloud2 cloud;
  Eigen::Vector4f origin; Eigen::Quaternionf orientation;

  if (pcl::io::loadPCDFile (string (argv[1]), cloud, origin, orientation) < 0)
  {
    std::cerr << "Unable to load " << argv[1] << std::endl;
    return (-1);
  }

  int type = atoi (argv[3]);

  std::cerr << "Loaded a point cloud with " << cloud.width * cloud.height <<
               " points (total size is " << cloud.data.size () <<
               ") and the following channels: " << pcl::getFieldsList (cloud) << std::endl;

  pcl::PCDWriter w;
  if (type == 0)
  {
    std::cerr << "Saving file " << argv[2] << " as ASCII." << std::endl;
    w.writeASCII (string (argv[2]), cloud, origin, orientation, (argc == 5) ? atoi (argv[4]) : 7);
  }
  else if (type == 1)
  {
    std::cerr << "Saving file " << argv[2] << " as binary." << std::endl;
    w.writeBinary (string (argv[2]), cloud, origin, orientation);
  }
  else if (type == 2)
  {
    std::cerr << "Saving file " << argv[2] << " as binary_compressed." << std::endl;
    w.writeBinaryCompressed (string (argv[2]), cloud, origin, orientation);
  }
}
/* ]--- */


text:
/*global define window*/
define(['Ti/_/declare', 'Ti/UI/View', 'Ti/_/dom', 'Ti/_/style', 'Ti/UI', 'Ti/_/browser'],
	function(declare, View, dom, style, UI, browser) {

	var setStyle = style.set,
		is = require.is,
		unitize = dom.unitize,
		on = require.on,
		once = on.once,
		global = window,

		transitionEvents = {
			webkit: 'webkitTransitionEnd',
			trident: 'msTransitionEnd',
			gecko: 'transitionend',
			presto: 'oTransitionEnd'
		},
		transitionEnd = transitionEvents[browser.runtime] || 'transitionEnd',

		useTouch = 'ontouchstart' in global,

		// Maximum time that a gesture can be considered a flick
		maxFlickTime = 200,

		// Minimum distance that must be traveled to register the flick
		flickThreshold = 10,

		minAnimationTime = 25,

		maxAnimationTime = 1000,

		flickAnimationScaleFactor = 0.5,

		dragAnimationScaleFactor = 2;

	return declare('Ti.UI.ScrollableView', View, {

		constructor: function(){

			// Create the content container
			var containerDomNode,
				self = this,
				offsetX = 0;
			self._add(self._contentContainer = UI.createView({
				left: 0,
				top: 0,
				width: UI.SIZE,
				height: '100%',
				layout: 'constrainingHorizontal'
			}));
			containerDomNode = self._contentContainer.domNode;

			// Create the paging control container
			self._add(self._pagingControlContainer = UI.createView({
				width: '100%',
				height: 20,
				bottom: 0,
				backgroundColor: 'black',
				opacity: 0,
				touchEnabled: false
			}));

			self._pagingControlContainer._add(self._pagingControlContentContainer = UI.createView({
				width: UI.SIZE,
				height: '100%',
				top: 0,
				touchEnabled: false,
				layout: 'constrainingHorizontal'
			}));

			// State variables
			self.properties.__values__.views = [];
			self._viewToRemoveAfterScroll = -1;

			on(self, 'postlayout', function() {
				self._animating || self._setTranslation(self.currentPage * -self._measuredWidth);
			});

			on(containerDomNode, useTouch ? 'touchstart' : 'mousedown', function(e) {
				var startX = e.touches ? e.touches[0].clientX : e.clientX,
					currentX = startX,
					startTime = Date.now(),
					width = self._measuredWidth,
					mouseMoveListener = function(e) {
						var currentPage = self.currentPage,
							offset = currentX - startX + offsetX;
						width = self._measuredWidth;
						e.preventDefault();
						currentX = e.touches ? e.touches[0].clientX : e.clientX;
						self._setTranslation((currentPage * -width) + offset);
						self.fireEvent('scroll', {
							currentPage: currentPage,
							currentPageAsFloat: currentPage - offset / width,
							view: self.views[currentPage]
						});
					},
					mouseUpListener = function(e) {
						var	now = Date.now(),
							isFlick = now - startTime < maxFlickTime,
							currentPage = self.currentPage,
							thresholdMet = Math.abs(startX - currentX) > (isFlick ? flickThreshold : width / 2),
							props = self.properties.__values__,
							duration = Math.abs(currentX - startX);
						global.removeEventListener(useTouch ? 'touchmove' : 'mousemove', mouseMoveListener);
						global.removeEventListener(useTouch ? 'touchend' : 'mouseup', mouseUpListener);
						width = self._measuredWidth;
						self._animating = 1;
						e.preventDefault();

						if (thresholdMet) {
							if (startX > currentX) {
								currentPage !== props.views.length - 1 && currentPage++;
							} else {
								currentPage !== 0 && currentPage--;
							}
							duration = width - duration;
						}
						self._showPagingControl(currentPage);
						offsetX = currentX - startX + offsetX;
						duration = Math.max(minAnimationTime, Math.min(maxAnimationTime,
							(isFlick ? flickAnimationScaleFactor : dragAnimationScaleFactor) * duration));
						setStyle(containerDomNode, 'transition', duration + 'ms ease-out');
						setTimeout(function(){
							once(containerDomNode, transitionEnd, function() {
								setStyle(containerDomNode, 'transition', '');
								self._animating = 0;
								props.currentPage = currentPage;
								self._updatePagingControl();
								self.fireEvent('scrollend',{
									currentPage: currentPage,
									view: self.views[currentPage]
								});
							});
							self._setTranslation(currentPage * -width);
						}, 1);
						self.fireEvent('dragend', {
							currentPage: currentPage,
							view: self.views[currentPage]
						});
					};
				self._showPagingControl(self.currentPage, 1);
				e.preventDefault();
				offsetX = self._animating ? offsetX || 0 : 0;
				setStyle(containerDomNode, 'transition', '');
				self._setTranslation((self.currentPage * -width) + offsetX);
				self._animating = 0;
				global.addEventListener(useTouch ? 'touchmove' : 'mousemove', mouseMoveListener);
				global.addEventListener(useTouch ? 'touchend' : 'mouseup', mouseUpListener);
				self.fireEvent('dragstart');
			});
		},

		_setTranslation: function(offset) {
			setStyle(this._contentContainer.domNode, 'transform', 'translatez(0) translatex(' + offset + 'px)');
		},

		_showPagingControl: function(newIndex, indefinite) {
			var self = this;
			if (!self.showPagingControl) {
				self._pagingControlContainer.opacity = 0;
				return;
			}
			self._pagingAnimation && self._pagingAnimation.cancel();
			self._pagingAnimation = self._pagingControlContainer.animate({
				duration: 250,
				opacity: 0.75
			});
			clearInterval(self._pagingTimeout);
			if (!indefinite && self.pagingControlTimeout > 0) {
				self._pagingTimeout = setTimeout(function() {
					self._pagingAnimation && self._pagingAnimation.cancel();
					self._pagingAnimation = self._pagingControlContainer.animate({
						duration: 750,
						opacity: 0
					}, function() {
						self._pagingAnimation = void 0;
					});
				}, self.pagingControlTimeout);
			}
		},

		_updatePagingControl: function() {
			var contentContainer = this._pagingControlContentContainer,
				numViews = this.views.length,
				diameter = this.pagingControlHeight / 2;
			if (numViews !== contentContainer._numViews || diameter !== contentContainer._diameter) {
				contentContainer._numViews = numViews;
				contentContainer._diameter = diameter;
				contentContainer._removeAllChildren();
				for (var i = 0; i < this.views.length; i++) {
					contentContainer._add(UI.createView({
						width: diameter,
						height: diameter,
						left: 5,
						right: 5,
						backgroundColor: '#aaa',
						borderRadius: unitize(diameter / 2)
					}));
				}
				contentContainer._highlightedPage = -1;
			}
			if (contentContainer._highlightedPage !== this.currentPage) {
				contentContainer._highlightedPage < 0 ||
					(contentContainer._children[contentContainer._highlightedPage].backgroundColor = '#aaa');
				contentContainer._children[this.currentPage].backgroundColor = '#fff';
				contentContainer._highlightedPage = this.currentPage;
			}
		},

		addView: function(view) {
			if (view) {
				view.width = '100%';
				view.height = '100%';
				this.views.push(view);
				this._contentContainer._add(view);
				if (this.views.length == 1) {
					this.properties.__values__.currentPage = 0;
				}
				this._updatePagingControl();
			}
		},

		removeView: function(view) {

			// Get and validate the location of the view
			var viewIndex = is(view,'Number') ? view : this.views.indexOf(view);
			if (viewIndex < 0 || viewIndex >= this.views.length) {
				return;
			}

			// Update the view if this view was currently visible
			if (viewIndex == this.currentPage && this.views.length !== 1) {
				this._viewToRemoveAfterScroll = viewIndex;
				this.scrollToView(viewIndex == this.views.length - 1 ? --viewIndex : ++viewIndex);
			} else {
				this._removeViewFromList(viewIndex);
			}
		},

		_removeViewFromList: function(viewIndex) {

			var contentContainer = this._contentContainer,
				self = this;

			// Update the current view if necessary once everything has been re-laid out.
			if (viewIndex < this.currentPage) {
				self.properties.__values__.currentPage--;
			}

			// Remove the view and update the paging control
			contentContainer._remove(self.views.splice(viewIndex,1)[0]);
			self.views.length || (self.properties.__values__.currentPage = -1);
			once(UI, 'postlayout', function() {
				setTimeout(function(){
					self._setTranslation(self.currentPage * -self._measuredWidth);
				}, 1);
			});
		},

		scrollToView: function(view, noAnimation) {
			var viewIndex = is(view,'Number') ? view : this.views.indexOf(view),
				self = this;

			// Sanity check
			if (viewIndex < 0 || viewIndex >= this.views.length || viewIndex == this.currentPage) {
				return;
			}

			function scroll(){

				// Calculate the views to be scrolled
				var contentContainer = self._contentContainer,
					containerDomNode = contentContainer.domNode,
					destination = -self.views[viewIndex]._measuredLeft,

					// Calculate a weighted duration so that larger views take longer to scroll.
					duration = Math.max(minAnimationTime, Math.min(maxAnimationTime,
						dragAnimationScaleFactor * contentContainer._measuredWidth));

				// Animate the views
				self._updatePagingControl();
				self._showPagingControl(viewIndex);

				if (noAnimation) {
					self._setTranslation(destination);
					self.properties.__values__.currentPage = viewIndex;
				} else {
					setStyle(containerDomNode, 'transition', duration + 'ms ease-out');
					setTimeout(function(){
						once(containerDomNode, transitionEnd, function() {
							setStyle(containerDomNode, 'transition', '');
							self._animating = 0;
							self.properties.__values__.currentPage = viewIndex;
							self._updatePagingControl();
							if (self._viewToRemoveAfterScroll !== -1) {
								destination += self.views[self._viewToRemoveAfterScroll]._measuredWidth;
								self._removeViewFromList(self._viewToRemoveAfterScroll);
								self._viewToRemoveAfterScroll = -1;
							}
							self.fireEvent('scrollend',{
								currentPage: viewIndex,
								view: self.views[viewIndex]
							});
						});
						self._setTranslation(destination);
					}, 1);
				}
			}

			// If the scrollableView hasn't been laid out yet, we must wait until it is
			if (self._contentContainer.domNode.offsetWidth) {
				scroll();
			} else {
				once(self, 'postlayout', scroll);
			}
		},

		_defaultWidth: UI.FILL,

		_defaultHeight: UI.FILL,

		properties: {
			currentPage: {
				set: function(value, oldValue) {
					if (value >= 0 && value < this.views.length) {
						this.scrollToView(value, 1);
						return value;
					}
					return oldValue;
				},
				value: -1
			},
			pagingControlColor: {
				set: function(value) {
					this._pagingControlContainer.backgroundColor = value;
					return value;
				},
				value: 'black'
			},
			pagingControlHeight: {
				set: function(value) {
					this._pagingControlContainer.height = value;
					return value;
				},
				value: 20
			},
			pagingControlTimeout: 3000,
			showPagingControl: false,
			views: {
				set: function(value) {

					// Value must be an array
					if (!is(value,'Array')) {
						return;
					}

					// Add the views to the content container
					var i = 0,
						len = value.length,
						contentContainer = this._contentContainer,
						view;
					contentContainer._removeAllChildren();
					for(; i < len; i++) {
						(view = value[i]).width = '100%';
						view.height = '100%';
						contentContainer._add(view);
					}
					this.properties.__values__.currentPage = len ? 0 : -1;

					return value;
				},
				post: '_updatePagingControl'
			}
		}

	});

});


text:
#pragma once
#include <aws/cloudfront/CloudFront_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace CloudFront
{
namespace Model
{

  /**
   *
A list of AWS accounts whose public keys CloudFront can use to verify the
   * signatures of signed URLs and signed cookies.

See Also:
   AWS
   * API Reference

   */
  class AWS_CLOUDFRONT_API TrustedSigners
  {
  public:
    TrustedSigners();
    TrustedSigners(const Aws::Utils::Xml::XmlNode& xmlNode);
    TrustedSigners& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;

    /**
     *
This field is true if any of the AWS accounts have public keys
     * that CloudFront can use to verify the signatures of signed URLs and signed
     * cookies. If not, this field is false.

     */
    inline bool GetEnabled() const{ return m_enabled; }

    /**
     *
This field is true if any of the AWS accounts have public keys
     * that CloudFront can use to verify the signatures of signed URLs and signed
     * cookies. If not, this field is false.

     */
    inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }

    /**
     *
This field is true if any of the AWS accounts have public keys
     * that CloudFront can use to verify the signatures of signed URLs and signed
     * cookies. If not, this field is false.

     */
    inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }

    /**
     *
This field is true if any of the AWS accounts have public keys
     * that CloudFront can use to verify the signatures of signed URLs and signed
     * cookies. If not, this field is false.

     */
    inline TrustedSigners& WithEnabled(bool value) { SetEnabled(value); return *this;}

    /**
     *
The number of AWS accounts in the list.

     */
    inline int GetQuantity() const{ return m_quantity; }

    /**
     *
The number of AWS accounts in the list.

     */
    inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }

    /**
     *
The number of AWS accounts in the list.

     */
    inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }

    /**
     *
The number of AWS accounts in the list.

     */
    inline TrustedSigners& WithQuantity(int value) { SetQuantity(value); return *this;}

    /**
     *
A list of AWS account identifiers.

     */
    inline const Aws::Vector<Aws::String>& GetItems() const{ return m_items; }

    /**
     *
A list of AWS account identifiers.

     */
    inline bool ItemsHasBeenSet() const { return m_itemsHasBeenSet; }

    /**
     *
A list of AWS account identifiers.

     */
    inline void SetItems(const Aws::Vector<Aws::String>& value) { m_itemsHasBeenSet = true; m_items = value; }

    /**
     *
A list of AWS account identifiers.

     */
    inline void SetItems(Aws::Vector<Aws::String>&& value) { m_itemsHasBeenSet = true; m_items = std::move(value); }

    /**
     *
A list of AWS account identifiers.

     */
    inline TrustedSigners& WithItems(const Aws::Vector<Aws::String>& value) { SetItems(value); return *this;}

    /**
     *
A list of AWS account identifiers.

     */
    inline TrustedSigners& WithItems(Aws::Vector<Aws::String>&& value) { SetItems(std::move(value)); return *this;}

    /**
     *
A list of AWS account identifiers.

     */
    inline TrustedSigners& AddItems(const Aws::String& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }

    /**
     *
A list of AWS account identifiers.

     */
    inline TrustedSigners& AddItems(Aws::String&& value) { m_itemsHasBeenSet = true; m_items.push_back(std::move(value)); return *this; }

    /**
     *
A list of AWS account identifiers.

     */
    inline TrustedSigners& AddItems(const char* value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }

  private:

    bool m_enabled;
    bool m_enabledHasBeenSet;

    int m_quantity;
    bool m_quantityHasBeenSet;

    Aws::Vector<Aws::String> m_items;
    bool m_itemsHasBeenSet;
  };

} // namespace Model
} // namespace CloudFront
} // namespace Aws


text:
declare namespace FancyLog {
    interface Logger {
        (...args: any[]): Logger;
        dir(...args: any[]): Logger;
        error(...args: any[]): Logger;
        info(...args: any[]): Logger;
        warn(...args: any[]): Logger;
    }
}

declare var logger: FancyLog.Logger;
export = logger;


text: Planning de Septembre 2016


text:
permalink: /:basename/
redirecturl: https://trumptracker.github.io/refuse-to-call-irans-leader-by-his-preferred-title/
---
<!-- This file was created by Rakefile at 2017-05-14 14:25:03 UTC to prevent users from getting 404 errors and to redirect them to the correct file. DO NOT DELETE THIS FILE! -->

<script>
if(document.location.href.indexOf("?reddit") !== -1) {
	document.location = "{{ page.redirecturl }}?reddit";
}
</script>

<meta http-equiv="refresh" content="0; url={{ page.redirecturl }}">
<link rel="canonical" href="{{ page.redirecturl }}" />