text:
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Fizzler.Systems.HtmlAgilityPack;
using HtmlAgilityPack;
using Shared;
using Shared.Models;
using TNRD.Helpers;

namespace AHASP.Controllers {

    [RoutePrefix( "Video" )]
    public class VideoController : ActionController {

        public HttpResponseMessage Comments() {
            if ( !request.Form.AllKeys.Contains( "ID" ) )
                return Request.CreateResponse( HttpStatusCode.BadRequest );

            string page = (request.Form.AllKeys.Contains( "Page" )) ? request.Form["Page"] : "1";

            string content = WebHelper.DownloadString( string.Format( "http://www.achievementhunter.com/archive/new/_more.php?id={0}&v=comments&page={1}", request.Form["ID"], request.Form["Page"] ) );

            var node = HtmlHelper.GetDocumentNode( content );
            var nComments = node.QuerySelectorAll( ".streamIndividual" );

            var comments = new List<Comment>();

            foreach ( var item in nComments ) {
                var nImage = item.QuerySelector( ".avatarA img" );
                string image = HtmlHelper.GetAttribute( nImage, "src" );

                var nCommentArea = item.QuerySelector( ".streamMessage" );

                var nUsername = nCommentArea.QuerySelector( ".light" );
                string username = HtmlHelper.GetInnerText( nUsername );

                var nSponsor = nCommentArea.QuerySelector( ".tip" );
                bool isSponsor = nSponsor != null;

                var nTimePosted = nCommentArea.QuerySelector( ".updateWhen" );
                string timePosted = HtmlHelper.GetAttribute( nTimePosted, "title" );

                var nComment = nCommentArea;
                nComment.RemoveChild( nComment.FirstChild );
                nComment.RemoveChild( nComment.LastChild );
                string comment = HtmlHelper.GetInnerText( nComment );
                string html = HtmlHelper.GetInnerHTML( nComment );

                comments.Add( new Comment( image, isSponsor, username, timePosted, comment, html ) );
            }

            return Request.CreateResponse( HttpStatusCode.OK, comments );
        }

        [HttpPost]
        [Route( "Latest" )]
        public HttpResponseMessage Latest() {
            string content = WebHelper.DownloadString( "http://www.achievementhunter.com" );
            var nodeBody = HtmlHelper.GetBodyNode( content );

            var nodeSideTitles = nodeBody.QuerySelectorAll( "#sidebar.sidebar .sideTitle" );
            HtmlNode selectedNode = null;
            foreach ( var node in nodeSideTitles ) {
                if ( node.InnerText.Trim().ToLower() == "latest video" ) {
                    selectedNode = node.ParentNode.ParentNode.SelectSingleNode( ".//tr[2]" );
                }
            }

            HtmlNode nodeInfo = selectedNode.SelectSingleNode( ".//a[1]" );
            string id = HtmlHelper.GetAttribute( nodeInfo, "href" );

            nodeInfo = selectedNode.SelectSingleNode( ".//img[1]" );
            string vidThumb = HtmlHelper.GetAttribute( nodeInfo, "src" );

            nodeInfo = selectedNode.QuerySelector( "img.avatar" );
            string seriesThumb = HtmlHelper.GetAttribute( nodeInfo, "src" );

            nodeInfo = selectedNode.SelectNodes( ".//b" )[0];
            string title = HtmlHelper.GetInnerText( nodeInfo );

            nodeInfo = selectedNode.SelectNodes( ".//b" )[1];
            string series = HtmlHelper.GetInnerText( nodeInfo );

            nodeInfo = selectedNode.SelectSingleNode( ".//span" );
            string description = HtmlHelper.GetInnerText( nodeInfo );

            var video = new LatestVideo( description, id, series, seriesThumb, vidThumb, title );

            return Request.CreateResponse( HttpStatusCode.OK, video );
        }

        [HttpPost]
        [Route( "Newest" )]
        public HttpResponseMessage Newest() {
            return Request.CreateResponse( HttpStatusCode.OK,
                Shared.VideoDownloader.Instance.Newest() );
        }

        [HttpPost]
        [Route( "Trending" )]
        public HttpResponseMessage Trending() {
            return Request.CreateResponse( HttpStatusCode.OK,
                Shared.VideoDownloader.Instance.Trending() );
        }

        [HttpPost]
        [Route( "More" )]
        public HttpResponseMessage More() {
            if ( !request.Form.AllKeys.Contains( "Query" ) )
                return Request.CreateResponse( HttpStatusCode.BadRequest );

            return Request.CreateResponse( HttpStatusCode.OK,
                Shared.VideoDownloader.Instance.More( request.Form["Query"], request.Form["Page"] ) );
        }

        [HttpPost]
        [Route( "Get" )]
        public HttpResponseMessage Get() {
            if ( !request.Form.AllKeys.Contains( "ID" ) )
                return Request.CreateResponse( HttpStatusCode.BadRequest );

            var video = Shared.VideoDownloader.Instance.Get( request.Form["ID"], request.Form["Cookies"] );
            if ( video == null ) {
                return Request.CreateResponse( HttpStatusCode.NotFound );
            } else {
                return Request.CreateResponse( HttpStatusCode.OK, video );
            }
        }
    }
}


text:
package gwt.material.design.client.ui;

import gwt.material.design.client.custom.CustomMain;

public class MaterialContainer extends CustomMain{

	public MaterialContainer() {

	}

}

redpajama_set_name: RedPajamaGithub


text:
<?php
namespace Kman\Megahal\Collection;

use Countable;
use Kman\Megahal\Quad;

interface QuadCollectionInterface extends Countable
{
    /**
     * Checks if collection has quad.
     *
     * @param Quad $quad
     * @return bool
     */
    public function hasQuad(Quad $quad);

    /**
     * Adds quad to collection
     *
     * @param \Kman\Megahal\Quad $quad
     */
    public function add(Quad $quad);

    /**
     * Gets a quad based on a signature.
     *
     * @param string $signature
     * @return Quad|null
     */
    public function getQuad($signature);

}


text:
<?php

namespace Org_Heigl\JUnitDiff\Command;

use Org_Heigl\JUnitDiff\JUnitParser;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class DiffCommand extends Command
{
    protected function configure()
    {
        $this->setName('diff')
             ->setDescription('Shows a diff between two JUnit log files')
             ->setDefinition([
                 new InputOption('input1', '1', InputOption::VALUE_REQUIRED, 'First input file'),
                 new InputOption('input2', '2', InputOption::VALUE_REQUIRED, 'Second input file')
             ])
             ->setHelp('');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln([
            $this->getApplication()->getLongVersion(),
            '',
        ]);

        $parser = new JUnitParser();

        try {
            $file1  = $input->getOption('input1');
            $array1 = $parser->parseFile($file1);
        } catch (\Exception $e) {
            $output->writeln('<bg=red;fg=white>  ' . $e->getMessage() . '  </>');
            return;
        }

        try {
            $file2  = $input->getOption('input2');
            $array2 = $parser->parseFile($file2);
        } catch (\Exception $e) {
            $output->writeln('<bg=red;fg=white> ' . $e->getMessage() . '  </>');
            return;
        }

        $array = $this->merge($array1, $array2);

        foreach ($array as $key => $value) {
            if (! isset($value['base'])) {
                $output->writeln('<bg=green;fg=black>+</> ' . $key);
                continue;
            }
            if (! isset($value['current'])) {
                $output->writeln('<bg=red;fg=yellow>-</> ' . $key);
                continue;
            }

            if ($value['base']['result'] != $value['current']['result']) {
                $output->writeln(sprintf(
                    '<bg=blue;fg=yellow>o</> %s changed from <fg=cyan>%s</> to <fg=magenta>%s</>',
                    $key,
                    $array1[$key]['result'],
                    $array2[$key]['result']
                ));
                continue;
            }
        }

        $output->writeln('');
        if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
            $output->writeln([
                sprintf(
                    '<bg=green;fg=black>+</>: This test was added in file %s',
                    $file2
                ),
                sprintf(
                    '<bg=red;fg=yellow>-</>: This test was removed in file %s',
                    $file2
                ),
                sprintf(
                    '<bg=blue;fg=yellow>o</>: The test-result changed between file %s and %s',
                    $file1,
                    $file2
                ),
                ''
            ]);
        }
        $output->writeln(sprintf(
            '<fg=yellow>Analyzed %s tests in total, %s tests in file %s and %s tests in file %s',
            count($array),
            count($array1),
            basename($file1),
            count($array2),
            basename($file2)
        ));
    }

    protected function merge(array $array1, array $array2)
    {
        $merged = [];
        foreach ($array1 as $key => $value) {
            $merged[$key]['base'] = $value;
        }

        foreach ($array2 as $key => $value) {
            $merged[$key]['current'] = $value;
        }

        ksort($merged);

        return $merged;
    }
}


text:
/**
 * UniquenessChecker JS plugin.
 *
 * @author José Nahuel Cuesta Luengo <nahuelcuestaluengo@gmail.com>
 *
 * @param target The target DOM element (either selector or jQuery object) to bind to.
 */
var UniquenessChecker = function(target) {
  var
    $target = $(target),
    url     = $target.data('url');

  if (typeof url === 'undefined' || null === url) {
    // Nothing to do here without an URL
    return;
  }

  // Create the messages
  var $successMessage = $('<div />', {
      'text': $target.data('successmessage') || 'Available',
      'class': 'uniqueness-alert alert-message success'
    }).hide();

  var $errorMessage = $('<div />', {
      'text': $target.data('errormessage') || 'Unavailable',
      'class': 'uniqueness-alert alert-message warning'
    }).hide();

  // Add them after the target element
  $target.after($successMessage, $errorMessage);

  // Checking function
  function check() {
    var value = jQuery.trim($target.val());

    if ('' === value) {
      return false;
    }

    $.post(
      url,
      { 'query': value, 'id': $target.data('id') },
      function(response) {
        if (response) {
          $errorMessage.hide();
          $successMessage.show();
        } else {
          $errorMessage.show();
          $successMessage.hide();
        }
      },
      'json'
    );
  }

  $target.on($target.data('event') || 'keyup', check);
};

// Automatically initialize any element which has a
// data-plugin attribute that contains "uniqueness-checker".
// Using a contains selector allows to have more than one plugin
// in the same DOM element.
jQuery(function($) {
  $('[data-plugin*="uniqueness-checker"]').each(function() {
    new UniquenessChecker(this);
  });
});


text: /home/pi/diddyborg/diddyJoyBall.py > /dev/null


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gallio.Framework.Assertions;
using MbUnit.Framework;

namespace MbUnit.Tests.Framework
{
    [TestsOn(typeof(Assert))]
    public class AssertTest_Exceptions : BaseAssertTest
    {
        [Test]
        public void Throws_throws_if_arguments_invalid()
        {
            Assert.Throws<ArgumentNullException>(() => Assert.Throws<Exception>(null));
            Assert.Throws<ArgumentNullException>(() => Assert.Throws<Exception>(null, ""));
            Assert.Throws<ArgumentNullException>(() => Assert.Throws(null, () => { }));
            Assert.Throws<ArgumentNullException>(() => Assert.Throws(null, () => { }, ""));
            Assert.Throws<ArgumentNullException>(() => Assert.Throws(typeof(Exception), null));
            Assert.Throws<ArgumentNullException>(() => Assert.Throws(typeof(Exception), null, ""));
        }

        [Test]
        public void Throws_passes_and_returns_exception_when_expected_exception_occurs()
        {
            InvalidOperationException ex = Assert.Throws<InvalidOperationException>(() => { throw new InvalidOperationException("Exception"); });
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_with_message_passes_and_returns_exception_when_expected_exception_occurs()
        {
            InvalidOperationException ex = Assert.Throws<InvalidOperationException>(() => { throw new InvalidOperationException("Exception"); }, "Foo");
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_passes_and_returns_exception_when_subtype_of_expected_exception_occurs()
        {
            Exception ex = Assert.Throws<Exception>(() => { throw new InvalidOperationException("Exception"); });
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_with_message_passes_and_returns_exception_when_subtype_of_expected_exception_occurs()
        {
            Exception ex = Assert.Throws<Exception>(() => { throw new InvalidOperationException("Exception"); }, "Foo");
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_with_type_passes_and_returns_exception_when_expected_exception_occurs()
        {
            Exception ex = Assert.Throws(typeof(InvalidOperationException), () => { throw new InvalidOperationException("Exception"); });
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_with_type_with_message_passes_and_returns_exception_when_expected_exception_occurs()
        {
            Exception ex = Assert.Throws(typeof(InvalidOperationException), () => { throw new InvalidOperationException("Exception"); }, "Foo");
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_with_type_passes_and_returns_exception_when_subtype_of_expected_exception_occurs()
        {
            Exception ex = Assert.Throws(typeof(Exception), () => { throw new InvalidOperationException("Exception"); });
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_with_type_with_message_passes_and_returns_exception_when_subtype_of_expected_exception_occurs()
        {
            Exception ex = Assert.Throws(typeof(Exception), () => { throw new InvalidOperationException("Exception"); }, "Foo");
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_fails_if_no_exception_was_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.Throws<InvalidOperationException>(() => { }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("Expected the block to throw an exception.", failures[0].Description);
            Assert.Count(0, failures[0].Exceptions);
        }

        [Test]
        public void Throws_with_message_fails_if_no_exception_was_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.Throws<InvalidOperationException>(() => { }, "Hello {0}", "World"));
            Assert.Count(1, failures);
            Assert.AreEqual("Hello World", failures[0].Message);
            Assert.AreEqual("Expected the block to throw an exception.", failures[0].Description);
            Assert.Count(0, failures[0].Exceptions);
        }

        [Test]
        public void Throws_with_type_fails_if_no_exception_was_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.Throws(typeof(InvalidOperationException), () => { }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("Expected the block to throw an exception.", failures[0].Description);
            Assert.Count(0, failures[0].Exceptions);
        }

        [Test]
        public void Throws_with_type_with_message_fails_if_no_exception_was_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.Throws(typeof(InvalidOperationException), () => { }, "Hello {0}", "World"));
            Assert.Count(1, failures);
            Assert.AreEqual("Hello World", failures[0].Message);
            Assert.AreEqual("Expected the block to throw an exception.", failures[0].Description);
            Assert.Count(0, failures[0].Exceptions);
        }

        [Test]
        public void Throws_fails_if_supertype_of_expected_exception_was_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.Throws<InvalidOperationException>(() => { throw new Exception("Wrong exception type."); }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("The block threw an exception of a different type than was expected.", failures[0].Description);
            Assert.Count(1, failures[0].Exceptions);
            Assert.AreEqual("Wrong exception type.", failures[0].Exceptions[0].Message);
        }

        [Test]
        public void Throws_fails_if_unrelated_expected_exception_was_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.Throws<InvalidOperationException>(() => { throw new NotSupportedException("Wrong exception type."); }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("The block threw an exception of a different type than was expected.", failures[0].Description);
            Assert.Count(1, failures[0].Exceptions);
            Assert.AreEqual("Wrong exception type.", failures[0].Exceptions[0].Message);
        }

        [Test]
        public void DoesNotThrow_throws_if_arguments_invalid()
        {
            Assert.Throws<ArgumentNullException>(() => Assert.DoesNotThrow(null));
            Assert.Throws<ArgumentNullException>(() => Assert.DoesNotThrow(null, ""));
        }

        [Test]
        public void DoesNotThrow_passes_if_no_exception_thrown()
        {
            Assert.DoesNotThrow(() => { });
        }

        [Test]
        public void DoesNotThrow_with_message_passes_if_no_exception_thrown()
        {
            Assert.DoesNotThrow(() => { }, "Foo");
        }

        [Test]
        public void DoesNotThrow_fails_if_exception_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.DoesNotThrow(() => { throw new NotSupportedException("Boom."); }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("The block threw an exception but none was expected.", failures[0].Description);
            Assert.Count(1, failures[0].Exceptions);
            Assert.AreEqual("Boom.", failures[0].Exceptions[0].Message);
        }

        [Test]
        public void DoesNotThrow_with_message_fails_if_exception_thrown()
        {
            AssertionFailure[] failures = Capture(()
                => Assert.DoesNotThrow(() => { throw new NotSupportedException("Boom."); }, "Hello {0}", "World"));
            Assert.Count(1, failures);
            Assert.AreEqual("Hello World", failures[0].Message);
            Assert.AreEqual("The block threw an exception but none was expected.", failures[0].Description);
            Assert.AreEqual("Boom.", failures[0].Exceptions[0].Message);
        }

        [Test]
        public void Throws_passes_and_returns_exception_when_expected_exception_and_inner_exception_occur()
        {
            InvalidOperationException ex = Assert.Throws<InvalidOperationException, ArgumentException>(() =>
                {
                    throw new InvalidOperationException("Exception", new ArgumentException());
                });
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_passes_and_returns_exception_when_expected_exception_and_derived_inner_exception_occur()
        {
            InvalidOperationException ex = Assert.Throws<InvalidOperationException, ArgumentException>(() =>
            {
                throw new InvalidOperationException("Exception", new ArgumentOutOfRangeException());
            });
            Assert.IsNotNull(ex);
            Assert.AreEqual("Exception", ex.Message);
        }

        [Test]
        public void Throws_fails_if_no_inner_exception()
        {
            AssertionFailure[] failures = Capture(() =>
                Assert.Throws<InvalidOperationException, ArgumentException>(() =>
                {
                    throw new InvalidOperationException("Exception");
                }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("The block threw an exception of the expected type, but having no inner expection.", failures[0].Description);
        }

        [Test]
        public void Throws_fails_if_inner_exception_does_not_match()
        {
            AssertionFailure[] failures = Capture(() =>
                Assert.Throws<InvalidOperationException, ArgumentException>(() =>
                {
                    throw new InvalidOperationException("Exception", new NotSupportedException());
                }));
            Assert.Count(1, failures);
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("The block threw an exception of the expected type, but having an unexpected inner expection.", failures[0].Description);
        }

        [Test] // Issue 769 (http://code.google.com/p/mb-unit/issues/detail?id=769)
        public void DoesNotThrow_should_not_fail_because_of_an_inner_assertion_failure()
        {
            AssertionFailure[] failures = Capture(() => Assert.DoesNotThrow(() => Assert.Fail()));
            Assert.Count(1, failures); // Only Assert.Fail should cause a failure.
            Assert.IsNull(failures[0].Message);
            Assert.AreEqual("An assertion failed.", failures[0].Description);
        }
    }
}


text:
var JSX = require('node-jsx').install();
var React = require('react');
var App = React.createFactory(require('../../shared/components/App'));
var renderToString = require('react-dom/server').renderToString;

module.exports = {

  render: function(req, res) {

    var markup = renderToString(
      App({})
    );

    res.render('app', {
      markup: markup//,
      //state: initialState
    });
  }

};


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>logout</title>

Thanks for your attention. login again


text:
class CORE_API DllObj : public NonCopyable
{
public:
	virtual ~DllObj() = default;

	virtual void * GetProcAddress(const String & name) const = 0;
};

#endif


text:
<?php

namespace G4\AREBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class G4AREBundle extends Bundle
{
}


text:
namespace Task14IntegerCalculator
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Numerics;
    using System.Text;
    using System.Threading.Tasks;

   public class InategerCalculator
    {
       public static void Main(string[] args)
        {
            MinimalInt(1, 2, 3, 4, 5, 6, 7, 8, 9, 55);
            MaximalInt(1, 2, 3, 4, 5, 6, 7, 8, 9, 55);
            AverageInt(1, 2, 3, 4, 5, 6, 7, 8, 9, 55);
            SummOfInts(1, 2, 3, 4, 5, 6, 7, 8, 9, 55);
            ProductInt(1, 2, 3, 4, 5, 6, 7, 8, 9, 55);
        }

       private static void ProductInt(params int[] elements)
       {
           BigInteger product = 1;

           for (int i = 0; i < elements.Length; i++)
           {
               product = product * elements[i];
           }

           Console.WriteLine("The product is: {0}", product);
       }

       private static void MinimalInt(params int[] elements)
       {
           int min = int.MaxValue;

           for (int i = 0; i < elements.Length; i++)
           {
               if (elements[i] < min)
               {
                   min = elements[i];
               }
           }

           Console.WriteLine("The smallest is: {0}", min);
       }

       private static void MaximalInt(params int[] elements)
       {
           int max = 0;

           for (int i = 0; i < elements.Length; i++)
           {
               if (elements[i] > max)
               {
                   max = elements[i];
               }
           }

           Console.WriteLine("The biggest is: {0}", max);
       }

       private static void AverageInt(params int[] elements)
       {
           decimal averageNum = 0;

           foreach (var item in elements)
           {
               averageNum += item;
           }

           averageNum = averageNum / elements.Length;

           Console.WriteLine("The average is: {0}", averageNum);
       }

       private static void SummOfInts(params int[] elements)
       {
           int sum = 0;
           foreach (var item in elements)
           {
               sum += item;
           }

           Console.WriteLine("The sum is: {0}", sum);
       }
    }
}


text:
#include <aws/ssm/model/DescribeAssociationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

DescribeAssociationRequest::DescribeAssociationRequest() :
    m_nameHasBeenSet(false),
    m_instanceIdHasBeenSet(false),
    m_associationIdHasBeenSet(false)
{
}

Aws::String DescribeAssociationRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_nameHasBeenSet)
  {
   payload.WithString("Name", m_name);

  }

  if(m_instanceIdHasBeenSet)
  {
   payload.WithString("InstanceId", m_instanceId);

  }

  if(m_associationIdHasBeenSet)
  {
   payload.WithString("AssociationId", m_associationId);

  }

  return payload.WriteReadable();
}

Aws::Http::HeaderValueCollection DescribeAssociationRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DescribeAssociation"));
  return headers;

}


text:
<?php
require_once("classes/Skill.php");
require_once("classes/ScalingStaticBuff.php");
require_once("classes/ScalingPercentBuff.php");

//$prowess = Skill::add("data/skills/melee_prowess.skill");
$prowess = Skill::add("melee_prowess");
$percent = Skill::add("percent_scale");

/*  This is the working format that Merc should return from its Snapshot property  */
$snap = (object) [
                  "hp"        => 120,
                  "skill"     => 100,
                  "strength"  => 100,
                  "endurance" => 100,
                  "level"     => 2,
                  "traits" => ["traits", "go" , "here"],
                  "skills" => [
                                "melee_prowess" => 10,
                                "percent_scale" => 5
                              ]
                 ];
/**/

//process with __invoke here...
$buff = ABuff::get($prowess->Buffs["melee_finesse"]);
$buff["melee_finesse"]($snap);

$buff = ABuff::get($prowess->Buffs["scale_percent_buff"]);
$buff["scale_percent_buff"]($snap);

print_r($snap);

?>


text:
"""Testing service API implementations in Python."""

import io

import grpc
import tink
from tink import aead
from tink import cleartext_keyset_handle
from tink import daead
from tink import hybrid
from tink import jwt
from tink import mac
from tink import prf
from tink import signature
from tink import streaming_aead
from tink.proto import tink_pb2
from tink.testing import bytes_io
from proto import testing_api_pb2
from proto import testing_api_pb2_grpc

# All KeyTemplate (as Protobuf) defined in the Python API.
_KEY_TEMPLATE = {
    'AES128_EAX':
        aead.aead_key_templates.AES128_EAX,
    'AES128_EAX_RAW':
        aead.aead_key_templates.AES128_EAX_RAW,
    'AES256_EAX':
        aead.aead_key_templates.AES256_EAX,
    'AES256_EAX_RAW':
        aead.aead_key_templates.AES256_EAX_RAW,
    'AES128_GCM':
        aead.aead_key_templates.AES128_GCM,
    'AES128_GCM_RAW':
        aead.aead_key_templates.AES128_GCM_RAW,
    'AES256_GCM':
        aead.aead_key_templates.AES256_GCM,
    'AES256_GCM_RAW':
        aead.aead_key_templates.AES256_GCM_RAW,
    'AES128_GCM_SIV':
        aead.aead_key_templates.AES128_GCM_SIV,
    'AES128_GCM_SIV_RAW':
        aead.aead_key_templates.AES128_GCM_SIV_RAW,
    'AES256_GCM_SIV':
        aead.aead_key_templates.AES256_GCM_SIV,
    'AES256_GCM_SIV_RAW':
        aead.aead_key_templates.AES256_GCM_SIV_RAW,
    'AES128_CTR_HMAC_SHA256':
        aead.aead_key_templates.AES128_CTR_HMAC_SHA256,
    'AES128_CTR_HMAC_SHA256_RAW':
        aead.aead_key_templates.AES128_CTR_HMAC_SHA256_RAW,
    'AES256_CTR_HMAC_SHA256':
        aead.aead_key_templates.AES256_CTR_HMAC_SHA256,
    'AES256_CTR_HMAC_SHA256_RAW':
        aead.aead_key_templates.AES256_CTR_HMAC_SHA256_RAW,
    'XCHACHA20_POLY1305':
        aead.aead_key_templates.XCHACHA20_POLY1305,
    'XCHACHA20_POLY1305_RAW':
        aead.aead_key_templates.XCHACHA20_POLY1305_RAW,
    'AES256_SIV':
        daead.deterministic_aead_key_templates.AES256_SIV,
    'AES128_CTR_HMAC_SHA256_4KB':
        streaming_aead.streaming_aead_key_templates.AES128_CTR_HMAC_SHA256_4KB,
    'AES128_CTR_HMAC_SHA256_1MB':
        streaming_aead.streaming_aead_key_templates.AES128_CTR_HMAC_SHA256_1MB,
    'AES256_CTR_HMAC_SHA256_4KB':
        streaming_aead.streaming_aead_key_templates.AES256_CTR_HMAC_SHA256_4KB,
    'AES256_CTR_HMAC_SHA256_1MB':
        streaming_aead.streaming_aead_key_templates.AES256_CTR_HMAC_SHA256_1MB,
    'AES128_GCM_HKDF_4KB':
        streaming_aead.streaming_aead_key_templates.AES128_GCM_HKDF_4KB,
    'AES128_GCM_HKDF_1MB':
        streaming_aead.streaming_aead_key_templates.AES128_GCM_HKDF_1MB,
    'AES256_GCM_HKDF_4KB':
        streaming_aead.streaming_aead_key_templates.AES256_GCM_HKDF_4KB,
    'AES256_GCM_HKDF_1MB':
        streaming_aead.streaming_aead_key_templates.AES256_GCM_HKDF_1MB,
    'ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM':
        hybrid.hybrid_key_templates.ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM,
    'ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_GCM':
        hybrid.hybrid_key_templates
        .ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_GCM,
    'ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256':
        hybrid.hybrid_key_templates
        .ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256,
    'ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256':
        hybrid.hybrid_key_templates
        .ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256,
    'DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_128_GCM':
        hybrid.hybrid_key_templates
        .DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_128_GCM,
    'DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_128_GCM_RAW':
        hybrid.hybrid_key_templates
        .DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_128_GCM_RAW,
    'DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_256_GCM':
        hybrid.hybrid_key_templates
        .DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_256_GCM,
    'DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_256_GCM_RAW':
        hybrid.hybrid_key_templates
        .DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_256_GCM_RAW,
    'DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305':
        hybrid.hybrid_key_templates
        .DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305,
    'DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305_RAW':
        hybrid.hybrid_key_templates
        .DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305_RAW,
    'AES_CMAC':
        mac.mac_key_templates.AES_CMAC,
    'HMAC_SHA256_128BITTAG':
        mac.mac_key_templates.HMAC_SHA256_128BITTAG,
    'HMAC_SHA256_256BITTAG':
        mac.mac_key_templates.HMAC_SHA256_256BITTAG,
    'HMAC_SHA512_256BITTAG':
        mac.mac_key_templates.HMAC_SHA512_256BITTAG,
    'HMAC_SHA512_512BITTAG':
        mac.mac_key_templates.HMAC_SHA512_512BITTAG,
    'ECDSA_P256':
        signature.signature_key_templates.ECDSA_P256,
    'ECDSA_P256_RAW':
        signature.signature_key_templates.ECDSA_P256_RAW,
    'ECDSA_P384':
        signature.signature_key_templates.ECDSA_P384,
    'ECDSA_P384_SHA384':
        signature.signature_key_templates.ECDSA_P384_SHA384,
    'ECDSA_P384_SHA512':
        signature.signature_key_templates.ECDSA_P384_SHA512,
    'ECDSA_P521':
        signature.signature_key_templates.ECDSA_P521,
    'ECDSA_P256_IEEE_P1363':
        signature.signature_key_templates.ECDSA_P256_IEEE_P1363,
    'ECDSA_P384_IEEE_P1363':
        signature.signature_key_templates.ECDSA_P384_IEEE_P1363,
    'ECDSA_P384_SHA384_IEEE_P1363':
        signature.signature_key_templates.ECDSA_P384_SHA384_IEEE_P1363,
    'ECDSA_P521_IEEE_P1363':
        signature.signature_key_templates.ECDSA_P521_IEEE_P1363,
    'ED25519':
        signature.signature_key_templates.ED25519,
    'RSA_SSA_PKCS1_3072_SHA256_F4':
        signature.signature_key_templates.RSA_SSA_PKCS1_3072_SHA256_F4,
    'RSA_SSA_PKCS1_4096_SHA512_F4':
        signature.signature_key_templates.RSA_SSA_PKCS1_4096_SHA512_F4,
    'RSA_SSA_PSS_3072_SHA256_SHA256_32_F4':
        signature.signature_key_templates.RSA_SSA_PSS_3072_SHA256_SHA256_32_F4,
    'RSA_SSA_PSS_4096_SHA512_SHA512_64_F4':
        signature.signature_key_templates.RSA_SSA_PSS_4096_SHA512_SHA512_64_F4,
    'AES_CMAC_PRF':
        prf.prf_key_templates.AES_CMAC,
    'HMAC_SHA256_PRF':
        prf.prf_key_templates.HMAC_SHA256,
    'HMAC_SHA512_PRF':
        prf.prf_key_templates.HMAC_SHA512,
    'HKDF_SHA256':
        prf.prf_key_templates.HKDF_SHA256,
    'JWT_HS256':
        jwt.jwt_hs256_template(),
    'JWT_HS256_RAW':
        jwt.raw_jwt_hs256_template(),
    'JWT_HS384':
        jwt.jwt_hs384_template(),
    'JWT_HS384_RAW':
        jwt.raw_jwt_hs384_template(),
    'JWT_HS512':
        jwt.jwt_hs512_template(),
    'JWT_HS512_RAW':
        jwt.raw_jwt_hs512_template(),
    'JWT_ES256':
        jwt.jwt_es256_template(),
    'JWT_ES256_RAW':
        jwt.raw_jwt_es256_template(),
    'JWT_ES384':
        jwt.jwt_es384_template(),
    'JWT_ES384_RAW':
        jwt.raw_jwt_es384_template(),
    'JWT_ES512':
        jwt.jwt_es512_template(),
    'JWT_ES512_RAW':
        jwt.raw_jwt_es512_template(),
    'JWT_RS256_2048_F4':
        jwt.jwt_rs256_2048_f4_template(),
    'JWT_RS256_2048_F4_RAW':
        jwt.raw_jwt_rs256_2048_f4_template(),
    'JWT_RS256_3072_F4':
        jwt.jwt_rs256_3072_f4_template(),
    'JWT_RS256_3072_F4_RAW':
        jwt.raw_jwt_rs256_3072_f4_template(),
    'JWT_RS384_3072_F4':
        jwt.jwt_rs384_3072_f4_template(),
    'JWT_RS384_3072_F4_RAW':
        jwt.raw_jwt_rs384_3072_f4_template(),
    'JWT_RS512_4096_F4':
        jwt.jwt_rs512_4096_f4_template(),
    'JWT_RS512_4096_F4_RAW':
        jwt.raw_jwt_rs512_4096_f4_template(),
    'JWT_PS256_2048_F4':
        jwt.jwt_ps256_2048_f4_template(),
    'JWT_PS256_2048_F4_RAW':
        jwt.raw_jwt_ps256_2048_f4_template(),
    'JWT_PS256_3072_F4':
        jwt.jwt_ps256_3072_f4_template(),
    'JWT_PS256_3072_F4_RAW':
        jwt.raw_jwt_ps256_3072_f4_template(),
    'JWT_PS384_3072_F4':
        jwt.jwt_ps384_3072_f4_template(),
    'JWT_PS384_3072_F4_RAW':
        jwt.raw_jwt_ps384_3072_f4_template(),
    'JWT_PS512_4096_F4':
        jwt.jwt_ps512_4096_f4_template(),
    'JWT_PS512_4096_F4_RAW':
        jwt.raw_jwt_ps512_4096_f4_template(),
}

class MetadataServicer(testing_api_pb2_grpc.MetadataServicer):
  """A service with metadata about the server."""

  def GetServerInfo(
      self, request: testing_api_pb2.ServerInfoRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.ServerInfoResponse:
    """Returns information about the server."""
    return testing_api_pb2.ServerInfoResponse(language='python')

class KeysetServicer(testing_api_pb2_grpc.KeysetServicer):
  """A service for testing Keyset operations."""

  def GetTemplate(
      self, request: testing_api_pb2.KeysetTemplateRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.KeysetTemplateResponse:
    """Returns the key template for the given template name."""
    if request.template_name not in _KEY_TEMPLATE:
      return testing_api_pb2.KeysetTemplateResponse(
          err='template %s not found' % request.template_name)
    return  testing_api_pb2.KeysetTemplateResponse(
        key_template=_KEY_TEMPLATE[request.template_name].SerializeToString())

  def Generate(
      self, request: testing_api_pb2.KeysetGenerateRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.KeysetGenerateResponse:
    """Generates a keyset."""
    try:
      template = tink_pb2.KeyTemplate()
      template.ParseFromString(request.template)
      keyset_handle = tink.new_keyset_handle(template)
      keyset = io.BytesIO()
      cleartext_keyset_handle.write(
          tink.BinaryKeysetWriter(keyset), keyset_handle)
      return testing_api_pb2.KeysetGenerateResponse(keyset=keyset.getvalue())
    except tink.TinkError as e:
      return testing_api_pb2.KeysetGenerateResponse(err=str(e))

  def Public(
      self, request: testing_api_pb2.KeysetPublicRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.KeysetPublicResponse:
    """Generates a public-key keyset from a private-key keyset."""
    try:
      private_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.private_keyset))
      public_keyset_handle = private_keyset_handle.public_keyset_handle()
      public_keyset = io.BytesIO()
      cleartext_keyset_handle.write(
          tink.BinaryKeysetWriter(public_keyset), public_keyset_handle)
      return testing_api_pb2.KeysetPublicResponse(
          public_keyset=public_keyset.getvalue())
    except tink.TinkError as e:
      return testing_api_pb2.KeysetPublicResponse(err=str(e))

  def ToJson(
      self, request: testing_api_pb2.KeysetToJsonRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.KeysetToJsonResponse:
    """Converts a keyset from binary to JSON format."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.keyset))
      json_keyset = io.StringIO()
      cleartext_keyset_handle.write(
          tink.JsonKeysetWriter(json_keyset), keyset_handle)
      return testing_api_pb2.KeysetToJsonResponse(
          json_keyset=json_keyset.getvalue())
    except tink.TinkError as e:
      return testing_api_pb2.KeysetToJsonResponse(err=str(e))

  def FromJson(
      self, request: testing_api_pb2.KeysetFromJsonRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.KeysetFromJsonResponse:
    """Converts a keyset from JSON to binary format."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.JsonKeysetReader(request.json_keyset))
      keyset = io.BytesIO()
      cleartext_keyset_handle.write(
          tink.BinaryKeysetWriter(keyset), keyset_handle)
      return testing_api_pb2.KeysetFromJsonResponse(keyset=keyset.getvalue())
    except tink.TinkError as e:
      return testing_api_pb2.KeysetFromJsonResponse(err=str(e))

  def ReadEncrypted(
      self, request: testing_api_pb2.KeysetReadEncryptedRequest,
      context: grpc.ServicerContext
  ) -> testing_api_pb2.KeysetReadEncryptedResponse:
    """Reads an encrypted keyset."""
    try:
      master_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.master_keyset))
      master_aead = master_keyset_handle.primitive(aead.Aead)

      if request.keyset_reader_type == testing_api_pb2.KEYSET_READER_BINARY:
        reader = tink.BinaryKeysetReader(request.encrypted_keyset)
      elif request.keyset_reader_type == testing_api_pb2.KEYSET_READER_JSON:
        reader = tink.JsonKeysetReader(request.encrypted_keyset.decode('utf8'))
      else:
        raise ValueError('unknown keyset reader type')
      if request.HasField('associated_data'):
        keyset_handle = tink.read_keyset_handle_with_associated_data(
            reader, master_aead, request.associated_data.value)
      else:
        keyset_handle = tink.read_keyset_handle(reader, master_aead)

      keyset = io.BytesIO()
      cleartext_keyset_handle.write(
          tink.BinaryKeysetWriter(keyset), keyset_handle)
      return testing_api_pb2.KeysetReadEncryptedResponse(
          keyset=keyset.getvalue())
    except tink.TinkError as e:
      return testing_api_pb2.KeysetReadEncryptedResponse(err=str(e))

  def WriteEncrypted(
      self, request: testing_api_pb2.KeysetWriteEncryptedRequest,
      context: grpc.ServicerContext
  ) -> testing_api_pb2.KeysetWriteEncryptedResponse:
    """Writes an encrypted keyset."""
    try:
      master_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.master_keyset))
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.keyset))
      master_aead = master_keyset_handle.primitive(aead.Aead)

      if request.keyset_writer_type == testing_api_pb2.KEYSET_WRITER_BINARY:
        encrypted_keyset = io.BytesIO()
        writer = tink.BinaryKeysetWriter(encrypted_keyset)
        if request.HasField('associated_data'):
          keyset_handle.write_with_associated_data(
              writer, master_aead, request.associated_data.value)
        else:
          keyset_handle.write(writer, master_aead)
        return testing_api_pb2.KeysetWriteEncryptedResponse(
            encrypted_keyset=encrypted_keyset.getvalue())
      elif request.keyset_writer_type == testing_api_pb2.KEYSET_WRITER_JSON:
        encrypted_keyset = io.StringIO()
        writer = tink.JsonKeysetWriter(encrypted_keyset)
        if request.HasField('associated_data'):
          keyset_handle.write_with_associated_data(
              writer, master_aead, request.associated_data.value)
        else:
          keyset_handle.write(writer, master_aead)
        return testing_api_pb2.KeysetWriteEncryptedResponse(
            encrypted_keyset=encrypted_keyset.getvalue().encode('utf8'))
      else:
        raise ValueError('unknown keyset writer type')
    except tink.TinkError as e:
      return testing_api_pb2.KeysetWriteEncryptedResponse(err=str(e))

class AeadServicer(testing_api_pb2_grpc.AeadServicer):
  """A service for testing AEAD encryption."""

  def Create(self, request: testing_api_pb2.CreationRequest,
             context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates an AEAD without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(aead.Aead)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def Encrypt(
      self, request: testing_api_pb2.AeadEncryptRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.AeadEncryptResponse:
    """Encrypts a message."""
    keyset_handle = cleartext_keyset_handle.read(
        tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
    p = keyset_handle.primitive(aead.Aead)
    try:
      ciphertext = p.encrypt(request.plaintext, request.associated_data)
      return testing_api_pb2.AeadEncryptResponse(ciphertext=ciphertext)
    except tink.TinkError as e:
      return testing_api_pb2.AeadEncryptResponse(err=str(e))

  def Decrypt(
      self, request: testing_api_pb2.AeadDecryptRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.AeadDecryptResponse:
    """Decrypts a message."""
    keyset_handle = cleartext_keyset_handle.read(
        tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
    p = keyset_handle.primitive(aead.Aead)
    try:
      plaintext = p.decrypt(request.ciphertext, request.associated_data)
      return testing_api_pb2.AeadDecryptResponse(plaintext=plaintext)
    except tink.TinkError as e:
      return testing_api_pb2.AeadDecryptResponse(err=str(e))

class StreamingAeadServicer(testing_api_pb2_grpc.StreamingAeadServicer):
  """A service for testing StreamingAEAD encryption."""

  def Create(self, request: testing_api_pb2.CreationRequest,
             context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a Streaming Aead without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(streaming_aead.StreamingAead)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def Encrypt(
      self, request: testing_api_pb2.StreamingAeadEncryptRequest,
      context: grpc.ServicerContext
  ) -> testing_api_pb2.StreamingAeadEncryptResponse:
    """Encrypts a message."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      p = keyset_handle.primitive(streaming_aead.StreamingAead)
      ciphertext_destination = bytes_io.BytesIOWithValueAfterClose()
      with p.new_encrypting_stream(ciphertext_destination,
                                   request.associated_data) as plaintext_stream:
        plaintext_stream.write(request.plaintext)
      return testing_api_pb2.StreamingAeadEncryptResponse(
          ciphertext=ciphertext_destination.value_after_close())
    except tink.TinkError as e:
      return testing_api_pb2.StreamingAeadEncryptResponse(err=str(e))

  def Decrypt(
      self, request: testing_api_pb2.StreamingAeadDecryptRequest,
      context: grpc.ServicerContext
  ) -> testing_api_pb2.StreamingAeadDecryptResponse:
    """Decrypts a message."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      p = keyset_handle.primitive(streaming_aead.StreamingAead)
      stream = io.BytesIO(request.ciphertext)
      with p.new_decrypting_stream(stream, request.associated_data) as s:
        plaintext = s.read()
      return testing_api_pb2.StreamingAeadDecryptResponse(plaintext=plaintext)
    except tink.TinkError as e:
      return testing_api_pb2.StreamingAeadDecryptResponse(err=str(e))

class DeterministicAeadServicer(testing_api_pb2_grpc.DeterministicAeadServicer):
  """A service for testing Deterministic AEAD encryption."""

  def Create(self, request: testing_api_pb2.CreationRequest,
             context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a Deterministic AEAD without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(daead.DeterministicAead)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def EncryptDeterministically(
      self, request: testing_api_pb2.DeterministicAeadEncryptRequest,
      context: grpc.ServicerContext
  ) -> testing_api_pb2.DeterministicAeadEncryptResponse:
    """Encrypts a message."""
    keyset_handle = cleartext_keyset_handle.read(
        tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
    p = keyset_handle.primitive(daead.DeterministicAead)
    try:
      ciphertext = p.encrypt_deterministically(request.plaintext,
                                               request.associated_data)
      return testing_api_pb2.DeterministicAeadEncryptResponse(
          ciphertext=ciphertext)
    except tink.TinkError as e:
      return testing_api_pb2.DeterministicAeadEncryptResponse(err=str(e))

  def DecryptDeterministically(
      self, request: testing_api_pb2.DeterministicAeadDecryptRequest,
      context: grpc.ServicerContext
  ) -> testing_api_pb2.DeterministicAeadDecryptResponse:
    """Decrypts a message."""
    keyset_handle = cleartext_keyset_handle.read(
        tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
    p = keyset_handle.primitive(daead.DeterministicAead)
    try:
      plaintext = p.decrypt_deterministically(request.ciphertext,
                                              request.associated_data)
      return testing_api_pb2.DeterministicAeadDecryptResponse(
          plaintext=plaintext)
    except tink.TinkError as e:
      return testing_api_pb2.DeterministicAeadDecryptResponse(err=str(e))

class MacServicer(testing_api_pb2_grpc.MacServicer):
  """A service for testing MACs."""

  def Create(self, request: testing_api_pb2.CreationRequest,
             context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a MAC without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(mac.Mac)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def ComputeMac(
      self, request: testing_api_pb2.ComputeMacRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.ComputeMacResponse:
    """Computes a MAC."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      p = keyset_handle.primitive(mac.Mac)
      mac_value = p.compute_mac(request.data)
      return testing_api_pb2.ComputeMacResponse(mac_value=mac_value)
    except tink.TinkError as e:
      return testing_api_pb2.ComputeMacResponse(err=str(e))

  def VerifyMac(
      self, request: testing_api_pb2.VerifyMacRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.VerifyMacResponse:
    """Verifies a MAC value."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      p = keyset_handle.primitive(mac.Mac)
      p.verify_mac(request.mac_value, request.data)
      return testing_api_pb2.VerifyMacResponse()
    except tink.TinkError as e:
      return testing_api_pb2.VerifyMacResponse(err=str(e))

class HybridServicer(testing_api_pb2_grpc.HybridServicer):
  """A service for testing hybrid encryption and decryption."""

  def CreateHybridEncrypt(
      self, request: testing_api_pb2.CreationRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a HybridEncrypt without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(hybrid.HybridEncrypt)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def CreateHybridDecrypt(
      self, request: testing_api_pb2.CreationRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a HybridDecrypt without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(hybrid.HybridDecrypt)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def Encrypt(
      self, request: testing_api_pb2.HybridEncryptRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.HybridEncryptResponse:
    """Encrypts a message."""
    try:
      public_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(
              request.public_annotated_keyset.serialized_keyset))
      p = public_keyset_handle.primitive(hybrid.HybridEncrypt)
      ciphertext = p.encrypt(request.plaintext, request.context_info)
      return testing_api_pb2.HybridEncryptResponse(ciphertext=ciphertext)
    except tink.TinkError as e:
      return testing_api_pb2.HybridEncryptResponse(err=str(e))

  def Decrypt(
      self, request: testing_api_pb2.HybridDecryptRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.HybridDecryptResponse:
    """Decrypts a message."""
    try:
      private_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(
              request.private_annotated_keyset.serialized_keyset))
      p = private_keyset_handle.primitive(hybrid.HybridDecrypt)
      plaintext = p.decrypt(request.ciphertext, request.context_info)
      return testing_api_pb2.HybridDecryptResponse(plaintext=plaintext)
    except tink.TinkError as e:
      return testing_api_pb2.HybridDecryptResponse(err=str(e))

class SignatureServicer(testing_api_pb2_grpc.SignatureServicer):
  """A service for testing signatures."""

  def CreatePublicKeySign(
      self, request: testing_api_pb2.CreationRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a PublicKeySign without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(signature.PublicKeySign)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def CreatePublicKeyVerify(
      self, request: testing_api_pb2.CreationRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a PublicKeyVerify without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(signature.PublicKeyVerify)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def Sign(
      self, request: testing_api_pb2.SignatureSignRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.SignatureSignResponse:
    """Signs a message."""
    try:
      private_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(
              request.private_annotated_keyset.serialized_keyset))
      p = private_keyset_handle.primitive(signature.PublicKeySign)
      signature_value = p.sign(request.data)
      return testing_api_pb2.SignatureSignResponse(signature=signature_value)
    except tink.TinkError as e:
      return testing_api_pb2.SignatureSignResponse(err=str(e))

  def Verify(
      self, request: testing_api_pb2.SignatureVerifyRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.SignatureVerifyResponse:
    """Verifies a signature."""
    try:
      public_keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(
              request.public_annotated_keyset.serialized_keyset))
      p = public_keyset_handle.primitive(signature.PublicKeyVerify)
      p.verify(request.signature, request.data)
      return testing_api_pb2.SignatureVerifyResponse()
    except tink.TinkError as e:
      return testing_api_pb2.SignatureVerifyResponse(err=str(e))

class PrfSetServicer(testing_api_pb2_grpc.PrfSetServicer):
  """A service for testing PrfSet."""

  def Create(self, request: testing_api_pb2.CreationRequest,
             context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
    """Creates a PrfSet without using it."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      keyset_handle.primitive(prf.PrfSet)
      return testing_api_pb2.CreationResponse()
    except tink.TinkError as e:
      return testing_api_pb2.CreationResponse(err=str(e))

  def KeyIds(
      self, request: testing_api_pb2.PrfSetKeyIdsRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.PrfSetKeyIdsResponse:
    """Returns all key IDs and the primary key ID."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      p = keyset_handle.primitive(prf.PrfSet)
      prfs = p.all()
      response = testing_api_pb2.PrfSetKeyIdsResponse()
      response.output.primary_key_id = p.primary_id()
      response.output.key_id.extend(prfs.keys())
      return response
    except tink.TinkError as e:
      return testing_api_pb2.PrfSetKeyIdsResponse(err=str(e))

  def Compute(
      self, request: testing_api_pb2.PrfSetComputeRequest,
      context: grpc.ServicerContext) -> testing_api_pb2.PrfSetComputeResponse:
    """Computes the output of one PRF."""
    try:
      keyset_handle = cleartext_keyset_handle.read(
          tink.BinaryKeysetReader(request.annotated_keyset.serialized_keyset))
      f = keyset_handle.primitive(prf.PrfSet).all()[request.key_id]
      return testing_api_pb2.PrfSetComputeResponse(
          output=f.compute(request.input_data, request.output_length))
    except tink.TinkError as e:
      return testing_api_pb2.PrfSetComputeResponse(err=str(e))


text:
@charset "utf-8";

.not-found{
	border-bottom:1px solid #DDD;
	padding:50px 0;
	text-align:center
}
.not-found .title{
	margin-top:10px;
	font-size:16px;
}
.not-found .go-back{
	margin-top:5px;
}
.not-found .go-back a:link,
.not-found .go-back a:active,
.not-found .go-back a:visited{ color:#06C; text-decoration:none }
.not-found .go-back a:hover{ color:#06C; text-decoration:underline }


text:
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.20" xml:lang="en-US">
  <compounddef id="structlibecpint_1_1aux_1_1seq" kind="struct" language="C++" prot="public">
    <compoundname>libecpint::aux::seq</compoundname>
    <includes refid="multiarr_8hpp" local="no">multiarr.hpp</includes>
    <templateparamlist>
      <param>
        <type>std::size_t...</type>
      </param>
    </templateparamlist>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <location file="/Users/robertshaw/devfiles/libecpint/include/libecpint/multiarr.hpp" line="48" column="10" bodyfile="/Users/robertshaw/devfiles/libecpint/include/libecpint/multiarr.hpp" bodystart="48" bodyend="48"/>
    <listofallmembers>
    </listofallmembers>
  </compounddef>
</doxygen>


text:
class EnronAPI

  def initialize(opts = {})
    @url_encode = opts[:url_encode]

    # Write to Riak Directly via POST
    @base_uri = ApiServer.setting(:riak_base_url)

    @connection = Faraday.new url: @base_uri do |builder|
      builder.use Faraday::Request::UrlEncoded if @url_encode
      builder.adapter :net_http
    end
  end

  def get(path, params={})
    results = @connection.get(path, params)
    JSON.parse(results.body)
  end

  def put(path, data={})
    data = data.to_json unless @url_encode
    response = @connection.put(path, data) do |request|
      # set this or the precommit indexer won't know what to do
      request.headers['Content-Type'] = 'application/json'
    end
    return response
  end

  def post(path, data={})
    data = data.to_json unless @url_encode
    response = @connection.post(path, data)
    return response
  end

  def delete(path)
    response = @connection.delete(path)
  end

  def read_and_fire(file_list, person, mailbox)
    payload = file_list.map do |file|
      mail = Mail.read(file)
      mail.person = person
      mail.mailbox = mailbox
      mail
    end

    if payload.length == 1
      payload = payload[0]
      key = "#{person}_#{payload.date}"
    else
      key = "#{person}_#{payload.first.date}"
    end

    WorkerLogger.info "Reading and posting: #{person}/#{mailbox}/#{key}"

    json = payload.to_json.force_encoding("UTF-8")

    # write_to_file(json)

    post_json(key, json)
  end

  def post_json(key, value)
    begin
      response = put("/buckets/email/keys/#{key}", value)
      if response.status != 204
        WorkerLogger.error "Post Response: - #{response.status}"
        # https://github.com/rack/rack/issues/337
        # https://github.com/rack/rack/commit/decaa23a175d2fc65b4bc103e7fff0027e3eb21c
      end
    rescue Exception => e
      WorkerLogger.error "Problem with key: #{key} - #{e.inspect}"
    end
    (response.nil?) ? nil : response.status
  end

  def write_to_file(json)
    File.write('out.json', json)
  end

end