text:
// Copyright 2009 Jeffrey Cameron
//
// 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.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Concordion.Api;
using System.Text.RegularExpressions;
using Concordion.Api.Listener;
using Concordion.Internal.Util;
using System.Collections;

namespace Concordion.Internal.Commands
{
    public class VerifyRowsCommand : ICommand
    {
        private List<IVerifyRowsListener> m_Listeners = new List<IVerifyRowsListener>();

        #region Methods

        public void AddVerifyRowsListener(IVerifyRowsListener listener)
        {
            m_Listeners.Add(listener);
        }

        public void RemoveVerifyRowsListener(IVerifyRowsListener listener)
        {
            m_Listeners.Remove(listener);
        }

        private void AnnounceExpressionEvaluated(Element element)
        {
            foreach (var listener in m_Listeners)
            {
                listener.ExpressionEvaluated(new ExpressionEvaluatedEvent(element));
            }
        }

        private void AnnounceMissingRow(Element element)
        {
            foreach (var listener in m_Listeners)
            {
                listener.MissingRow(new MissingRowEvent(element));
            }
        }

        private void AnnounceSurplusRow(Element element)
        {
            foreach (var listener in m_Listeners)
            {
                listener.SurplusRow(new SurplusRowEvent(element));
            }
        }

        #endregion

        #region ICommand Members

        public void Setup(CommandCall commandCall, IEvaluator evaluator, IResultRecorder resultRecorder)
        {
        }

        public void Execute(CommandCall commandCall, IEvaluator evaluator, IResultRecorder resultRecorder)
        {
        }

        public void Verify(CommandCall commandCall, IEvaluator evaluator, IResultRecorder resultRecorder)
        {
            var pattern = new Regex("(#.+?) *: *(.+)");
            var matcher = pattern.Match(commandCall.Expression);
            if (!matcher.Success)
            {
                throw new InvalidOperationException("The expression for a \"verifyRows\" should be of the form: #var : collectionExpr");
            }

            var loopVariableName = matcher.Groups[1].Value;
            var iterableExpression = matcher.Groups[2].Value;

            var obj = evaluator.Evaluate(iterableExpression);

            Check.NotNull(obj, "Expression returned null (should be an IEnumerable).");
            Check.IsTrue(obj is IEnumerable, obj.GetType() + " is not IEnumerable");
            Check.IsTrue(!(obj is IDictionary), obj.GetType() + " does not have a predictable iteration order");

            var iterable = (IEnumerable)obj;

            var tableSupport = new TableSupport(commandCall);
            var detailRows = tableSupport.GetDetailRows();

            AnnounceExpressionEvaluated(commandCall.Element);

            int index = 0;
            foreach (var loopVar in iterable)
            {
                evaluator.SetVariable(loopVariableName, loopVar);
                Row detailRow;
                if (detailRows.Count > index)
                {
                    detailRow = detailRows[index];
                }
                else
                {
                    detailRow = tableSupport.AddDetailRow();
                    AnnounceSurplusRow(detailRow.RowElement);
                }
                tableSupport.CopyCommandCallsTo(detailRow);
                commandCall.Children.Verify(evaluator, resultRecorder);
                index++;
            }

            for (; index < detailRows.Count; index++) {
                Row detailRow = detailRows[index];
                resultRecorder.Failure(string.Format("missing row {0}", detailRow), commandCall.Element.ToXml());
                AnnounceMissingRow(detailRow.RowElement);
            }
        }

        #endregion
    }
}


text:
'use strict'

const Test = require('blue-tape')
const Xstatic = require('xstatic-core')
const Lazy = Xstatic.lazy
const Change = Xstatic.changes

function update(file, doc) {
  file.load = Lazy.load(doc)
  doc.file = file
  return file
}

function setup(t, cb) {
  const project = new Xstatic('build')
  const files = project.glob('content/**/*')

  const Merge       = require('xstatic-merge')(project)
  const Template    = require('xstatic-handlebars')(project)
  const Markdown    = require('xstatic-markdown')(project)
  const Feed        = require('xstatic-atom')(project)
  const Sitemap     = require('xstatic-sitemap')(project)
  const Frontmatter = require('xstatic-frontmatter')(project)
  const Sort        = require('xstatic-sort')(project)
  const Glob = project.glob

  const posts  = Sort(Glob('content/posts/**/index.md'))
  const design = Glob('design/templates/*', { basedir: 'design/templates' })

  const postsHtml = Markdown(Frontmatter(posts))
  const postsFull = Template(postsHtml, {
    layouts: design,
    layout: 'post.html',
    // context: { posts: postsHtml }
  })

  const sitemap = Sitemap(postsHtml)
  const feed = Feed(postsHtml)

  const collection = Merge([ feed, sitemap, postsFull ])

  return cb(project, collection)
}

function sortedByPath(arr) {
  arr.sort(function(a, b){
    return a.path > b.path
  })
  return arr
}

function filesFromCollection(array) {
  return array.map(function(file){ return { lmod: file.lmod, path: file.path }})
}

function filesFromChanges(array) {
  return array.map(function(change){ return { lmod: change.lmod, path: change.path, type: change.type }})
}

function add(t) {
  return setup(t, function(project, collection) {
    return collection.update([

      update({
        type: Change.A,
        lmod: 1,
        path: 'content/posts/2014/slug1/index.md',
      }, {
        body: { data: '---\ntitle: t2014\n---\ncontent' }
      }),
      update({
        type: Change.A,
        lmod: 1,
        path: 'content/posts/2015/slug1/index.md',
      }, {
        body: { data: '---\ntitle: t2015\n---\ncontent' }
      }),
      update({
        type: Change.A,
        lmod: 1,
        path: 'design/templates/post.html',
      }, {
        body: { data: 'TEMPLATE {{position}}/{{length}} {{{content}}}' }
      }),

    ]).then(function(changes){

      t.deepEqual(sortedByPath(filesFromCollection(collection)), sortedByPath([
        { lmod: 1, path: 'content/posts/2014/slug1/index.html' },
        { lmod: 1, path: 'content/posts/2015/slug1/index.html' },
        { lmod: 1, path: 'feed.xml' },
        { lmod: 1, path: 'sitemap.xml' },
      ]))

      t.deepEqual(sortedByPath(filesFromChanges(changes)), sortedByPath([
        { type: Change.A, lmod: 1, path: 'content/posts/2014/slug1/index.html' },
        { type: Change.A, lmod: 1, path: 'content/posts/2015/slug1/index.html' },
        { type: Change.A, lmod: 1, path: 'feed.xml' },
        { type: Change.A, lmod: 1, path: 'sitemap.xml' },
      ]))

      return Promise.all([
        'content/posts/2014/slug1/index.html',
        'content/posts/2015/slug1/index.html',
      ].map(function(path) {
        const file = collection.get(path)
        t.ok(file, 'exists')
        return file.load
      })).then(function(docs) {
        docs.forEach(function(doc) {
          t.ok(doc.meta && doc.meta.title, 'post has title')
        })
      }).then(function() {
        return collection
      })

    })
  })
}

Test('setup works', function(t) {
  return add(t)
})

Test('updating a post updates the post page, feed and sitemap', function(t) {
  return add(t).then(function(collection){
    return collection.update([

      update({
        type: Change.M,
        lmod: 2,
        path: 'content/posts/2014/slug1/index.md',
      }, {
        body: { data: 'content' }
      }),

    ]).then(function(changes){

      t.deepEqual(sortedByPath(filesFromCollection(collection)), sortedByPath([
        { lmod: 2, path: 'content/posts/2014/slug1/index.html' },
        { lmod: 1, path: 'content/posts/2015/slug1/index.html' },
        { lmod: 2, path: 'feed.xml' },
        { lmod: 2, path: 'sitemap.xml' },
      ]), 'content')

      t.deepEqual(sortedByPath(filesFromChanges(changes)), sortedByPath([
        { type: Change.M, lmod: 2, path: 'content/posts/2014/slug1/index.html' },
        { type: Change.M, lmod: 2, path: 'feed.xml' },
        { type: Change.M, lmod: 2, path: 'sitemap.xml' },
      ]), 'changes')

    })
  })
})

Test('updating the post template updates all post pages (but not the sitemap or feed)', function(t) {
  return add(t).then(function(collection){
    return collection.update([

      update({
        type: Change.M,
        lmod: 2,
        path: 'design/templates/post.html',
      }, {
        body: { data: 'content' }
      }),

    ]).then(function(changes){

      t.deepEqual(sortedByPath(filesFromCollection(collection)), sortedByPath([
        { lmod: 2, path: 'content/posts/2014/slug1/index.html' },
        { lmod: 2, path: 'content/posts/2015/slug1/index.html' },
        { lmod: 1, path: 'feed.xml' },
        { lmod: 1, path: 'sitemap.xml' },
      ]), 'content')

      t.deepEqual(sortedByPath(filesFromChanges(changes)), sortedByPath([
        { type: Change.M, lmod: 2, path: 'content/posts/2014/slug1/index.html' },
        { type: Change.M, lmod: 2, path: 'content/posts/2015/slug1/index.html' },
      ]), 'changes')

    })
  })
})

Test('deleting a post deletes the post page and updates feed and sitemap', function(t) {
  return add(t).then(function(collection){
    return collection.update([

      update({
        type: Change.D,
        lmod: 2,
        path: 'content/posts/2014/slug1/index.md',
      }, {
        body: { data: 'content' }
      }),
      update({
        type: Change.D,
        lmod: 2,
        path: 'content/posts/2014/slug1/index.md',
      }, {
        body: { data: 'content' }
      }),

    ]).then(function(changes){

      t.deepEqual(sortedByPath(filesFromCollection(collection)), sortedByPath([
        { lmod: 1, path: 'content/posts/2015/slug1/index.html' },
        { lmod: 2, path: 'feed.xml' },
        { lmod: 2, path: 'sitemap.xml' },
      ]), 'content')

      t.deepEqual(sortedByPath(filesFromChanges(changes)), sortedByPath([
        { type: Change.D, lmod: 2, path: 'content/posts/2014/slug1/index.html' },
        { type: Change.M, lmod: 2, path: 'feed.xml' },
        { type: Change.M, lmod: 2, path: 'sitemap.xml' },
      ]), 'changes')

    })
  })
})

redpajama_set_name: RedPajamaGithub


text:
FROM phusion/baseimage:0.9.12
MAINTAINER Alan G. Graham "alan@productlab.com"

### PRIMARY PACKAGES

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list

RUN apt-get update -q && apt-get install -qy mongodb-org=2.6.1 mongodb-org-server=2.6.1 mongodb-org-shell=2.6.1 mongodb-org-mongos=2.6.1 mongodb-org-tools=2.6.1

<%= dfi :configure_basic_container %>

### CONTAINER STUFF

ADD bin /root/bin

<%= dfi :install_container_key %>

EXPOSE 27017

CMD ["/sbin/my_init"]

<%= dfi :install_image_services %>


text:
use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;

fn vpblendmd_1() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(XMM0)), operand2: Some(Direct(XMM6)), operand3: Some(Direct(XMM6)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: None }, &[98, 242, 77, 138, 100, 198], OperandSize::Dword)
}

fn vpblendmd_2() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(XMM1)), operand2: Some(Direct(XMM5)), operand3: Some(Indirect(ESI, Some(OperandSize::Xmmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: None }, &[98, 242, 85, 140, 100, 14], OperandSize::Dword)
}

fn vpblendmd_3() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(XMM0)), operand2: Some(Direct(XMM1)), operand3: Some(IndirectScaledIndexed(ESI, ESI, Eight, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: Some(BroadcastMode::Broadcast1To4) }, &[98, 242, 117, 159, 100, 4, 246], OperandSize::Dword)
}

fn vpblendmd_4() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(XMM29)), operand2: Some(Direct(XMM7)), operand3: Some(Direct(XMM15)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K3), broadcast: None }, &[98, 66, 69, 139, 100, 239], OperandSize::Qword)
}

fn vpblendmd_5() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(XMM2)), operand2: Some(Direct(XMM25)), operand3: Some(IndirectScaledDisplaced(RDI, Eight, 1483907111, Some(OperandSize::Xmmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: None }, &[98, 242, 53, 135, 100, 20, 253, 39, 160, 114, 88], OperandSize::Qword)
}

fn vpblendmd_6() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(XMM2)), operand2: Some(Direct(XMM3)), operand3: Some(IndirectDisplaced(RDX, 1437419980, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: Some(BroadcastMode::Broadcast1To4) }, &[98, 242, 101, 159, 100, 146, 204, 73, 173, 85], OperandSize::Qword)
}

fn vpblendmd_7() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(YMM4)), operand2: Some(Direct(YMM2)), operand3: Some(Direct(YMM4)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K3), broadcast: None }, &[98, 242, 109, 171, 100, 228], OperandSize::Dword)
}

fn vpblendmd_8() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(YMM3)), operand2: Some(Direct(YMM6)), operand3: Some(IndirectDisplaced(EDI, 630843225, Some(OperandSize::Ymmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: None }, &[98, 242, 77, 175, 100, 159, 89, 231, 153, 37], OperandSize::Dword)
}

fn vpblendmd_9() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(YMM7)), operand2: Some(Direct(YMM2)), operand3: Some(IndirectScaledIndexedDisplaced(ECX, EBX, Four, 1051952291, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K7), broadcast: Some(BroadcastMode::Broadcast1To8) }, &[98, 242, 109, 191, 100, 188, 153, 163, 132, 179, 62], OperandSize::Dword)
}

fn vpblendmd_10() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(YMM7)), operand2: Some(Direct(YMM18)), operand3: Some(Direct(YMM2)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K5), broadcast: None }, &[98, 242, 109, 165, 100, 250], OperandSize::Qword)
}

fn vpblendmd_11() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(YMM7)), operand2: Some(Direct(YMM29)), operand3: Some(Indirect(RSI, Some(OperandSize::Ymmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K1), broadcast: None }, &[98, 242, 21, 161, 100, 62], OperandSize::Qword)
}

fn vpblendmd_12() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(YMM13)), operand2: Some(Direct(YMM9)), operand3: Some(IndirectScaledIndexed(RSI, RDI, Two, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K6), broadcast: Some(BroadcastMode::Broadcast1To8) }, &[98, 114, 53, 190, 100, 44, 126], OperandSize::Qword)
}

fn vpblendmd_13() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(ZMM6)), operand2: Some(Direct(ZMM0)), operand3: Some(Direct(ZMM4)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K1), broadcast: None }, &[98, 242, 125, 201, 100, 244], OperandSize::Dword)
}

fn vpblendmd_14() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(ZMM2)), operand2: Some(Direct(ZMM0)), operand3: Some(Indirect(EDX, Some(OperandSize::Zmmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: None }, &[98, 242, 125, 202, 100, 18], OperandSize::Dword)
}

fn vpblendmd_15() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(ZMM0)), operand2: Some(Direct(ZMM0)), operand3: Some(IndirectScaledDisplaced(EAX, Two, 1818856206, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: Some(BroadcastMode::Broadcast1To16) }, &[98, 242, 125, 220, 100, 4, 69, 14, 139, 105, 108], OperandSize::Dword)
}

fn vpblendmd_16() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(ZMM31)), operand2: Some(Direct(ZMM13)), operand3: Some(Direct(ZMM24)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: None }, &[98, 2, 21, 202, 100, 248], OperandSize::Qword)
}

fn vpblendmd_17() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(ZMM4)), operand2: Some(Direct(ZMM28)), operand3: Some(IndirectScaledIndexedDisplaced(RDX, RDX, Eight, 39317517, Some(OperandSize::Zmmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K2), broadcast: None }, &[98, 242, 29, 194, 100, 164, 210, 13, 240, 87, 2], OperandSize::Qword)
}

fn vpblendmd_18() {
    run_test(&Instruction { mnemonic: Mnemonic::VPBLENDMD, operand1: Some(Direct(ZMM23)), operand2: Some(Direct(ZMM28)), operand3: Some(Indirect(RDI, Some(OperandSize::Dword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K6), broadcast: Some(BroadcastMode::Broadcast1To16) }, &[98, 226, 29, 214, 100, 63], OperandSize::Qword)
}


text:
'use strict';

const { Contract } = require('fabric-contract-api');

class FabCar extends Contract {

    async initLedger(ctx) {
        console.info('============= START : Initialize Ledger ===========');
        const cars = [
            {
                system_status: 'Running',
                cpu_usage: '100',
                memory_usage: '61',
                eventTime: '2021-07-20T02:18:30.800515+00:00',
                disk_usage: '60',
                disk_left: '39',
                in_traffic: '1771347',
                out_traffic: '464448',
                nsf_name: 'url_filtering',
            },
        ];

        for (let i = 0; i < cars.length; i++) {
            cars[i].docType = 'monitoring';
            await ctx.stub.putState('monitoring' + i, Buffer.from(JSON.stringify(cars[i])));
            console.info('Added <--> ', cars[i]);
        }
        console.info('============= END : Initialize Ledger ===========');
    }

    async queryCar(ctx, carNumber) {
        const carAsBytes = await ctx.stub.getState(carNumber); // get the car from chaincode state
        if (!carAsBytes || carAsBytes.length === 0) {
            throw new Error(`${carNumber} does not exist`);
        }
        console.log(carAsBytes.toString());
        return carAsBytes.toString();
    }

    async createCar(ctx, mNumber, system_status, eventTime, cpu_usage, memory_usage, disk_usage, disk_left, in_traffic, out_traffic, nsf_name) {
        console.info('============= START : Create Car ===========');

        const car = {
            system_status,
            docType: 'monitoring',
            eventTime,
            cpu_usage,
            memory_usage,
            disk_usage,
            disk_left,
            in_traffic,
            out_traffic,
            nsf_name,
        };

        await ctx.stub.putState(mNumber, Buffer.from(JSON.stringify(car)));
        console.info('============= END : Create Car ===========');
    }

    async queryAllCars(ctx) {
        const startKey = '';
        const endKey = '';
        const allResults = [];
        for await (const {key, value} of ctx.stub.getStateByRange(startKey, endKey)) {
            const strValue = Buffer.from(value).toString('utf8');
            let record;
            try {
                record = JSON.parse(strValue);
            } catch (err) {
                console.log(err);
                record = strValue;
            }
            allResults.push({ Key: key, Record: record });
        }
        console.info(allResults);
        return JSON.stringify(allResults);
    }

   async queryLastCar(ctx) {
        const startKey = '';
        const endKey = '';
        const allResults = [];
        for await (const {key, value} of ctx.stub.getStateByRange(startKey, endKey)) {
            const strValue = Buffer.from(value).toString('utf8');
            let record;
            try {
                record = JSON.parse(strValue);
            } catch (err) {
                console.log(err);
                record = strValue;
            }
            allResults.push({ Key: key, Record: record });
        }
        console.info(allResults);
        //lastResult.push({ Key: key, Record: record });
        return JSON.stringify(allResults);
        //return JSON.stringify(lastResult);
    }

    async changeCarOwner(ctx, carNumber, newOwner) {
        console.info('============= START : changeCarOwner ===========');

        const carAsBytes = await ctx.stub.getState(carNumber); // get the car from chaincode state
        if (!carAsBytes || carAsBytes.length === 0) {
            throw new Error(`${carNumber} does not exist`);
        }
        const car = JSON.parse(carAsBytes.toString());
        car.owner = newOwner;

        await ctx.stub.putState(carNumber, Buffer.from(JSON.stringify(car)));
        console.info('============= END : changeCarOwner ===========');
    }

}

module.exports = FabCar;


text:
<?php

final class PhrictionDocument extends PhrictionDAO
  implements
    PhabricatorPolicyInterface,
    PhabricatorSubscribableInterface,
    PhabricatorFlaggableInterface,
    PhabricatorTokenReceiverInterface,
    PhabricatorDestructibleInterface,
    PhabricatorFulltextInterface,
    PhabricatorProjectInterface,
    PhabricatorApplicationTransactionInterface {

  protected $slug;
  protected $depth;
  protected $contentID;
  protected $status;
  protected $mailKey;
  protected $viewPolicy;
  protected $editPolicy;

  private $contentObject = self::ATTACHABLE;
  private $ancestors = array();

  protected function getConfiguration() {
    return array(
      self::CONFIG_AUX_PHID   => true,
      self::CONFIG_TIMESTAMPS => false,
      self::CONFIG_COLUMN_SCHEMA => array(
        'slug' => 'sort128',
        'depth' => 'uint32',
        'contentID' => 'id?',
        'status' => 'uint32',
        'mailKey' => 'bytes20',
      ),
      self::CONFIG_KEY_SCHEMA => array(
        'key_phid' => null,
        'phid' => array(
          'columns' => array('phid'),
          'unique' => true,
        ),
        'slug' => array(
          'columns' => array('slug'),
          'unique' => true,
        ),
        'depth' => array(
          'columns' => array('depth', 'slug'),
          'unique' => true,
        ),
      ),
    ) + parent::getConfiguration();
  }

  public function generatePHID() {
    return PhabricatorPHID::generateNewPHID(
      PhrictionDocumentPHIDType::TYPECONST);
  }

  public static function initializeNewDocument(PhabricatorUser $actor, $slug) {
    $document = new PhrictionDocument();
    $document->setSlug($slug);

    $content  = new PhrictionContent();
    $content->setSlug($slug);

    $default_title = PhabricatorSlug::getDefaultTitle($slug);
    $content->setTitle($default_title);
    $document->attachContent($content);

    $parent_doc = null;
    $ancestral_slugs = PhabricatorSlug::getAncestry($slug);
    if ($ancestral_slugs) {
      $parent = end($ancestral_slugs);
      $parent_doc = id(new PhrictionDocumentQuery())
        ->setViewer($actor)
        ->withSlugs(array($parent))
        ->executeOne();
    }

    if ($parent_doc) {
      $document->setViewPolicy($parent_doc->getViewPolicy());
      $document->setEditPolicy($parent_doc->getEditPolicy());
    } else {
      $default_view_policy = PhabricatorPolicies::getMostOpenPolicy();
      $document->setViewPolicy($default_view_policy);
      $document->setEditPolicy(PhabricatorPolicies::POLICY_USER);
    }

    return $document;
  }

  public function save() {
    if (!$this->getMailKey()) {
      $this->setMailKey(Filesystem::readRandomCharacters(20));
    }
    return parent::save();
  }

  public static function getSlugURI($slug, $type = 'document') {
    static $types = array(
      'document'  => '/w/',
      'history'   => '/phriction/history/',
    );

    if (empty($types[$type])) {
      throw new Exception(pht("Unknown URI type '%s'!", $type));
    }

    $prefix = $types[$type];

    if ($slug == '/') {
      return $prefix;
    } else {
      // NOTE: The effect here is to escape non-latin characters, since modern
      // browsers deal with escaped UTF8 characters in a reasonable way (showing
      // the user a readable URI) but older programs may not.
      $slug = phutil_escape_uri($slug);
      return $prefix.$slug;
    }
  }

  public function setSlug($slug) {
    $this->slug   = PhabricatorSlug::normalize($slug);
    $this->depth  = PhabricatorSlug::getDepth($slug);
    return $this;
  }

  public function attachContent(PhrictionContent $content) {
    $this->contentObject = $content;
    return $this;
  }

  public function getContent() {
    return $this->assertAttached($this->contentObject);
  }

  public function getAncestors() {
    return $this->ancestors;
  }

  public function getAncestor($slug) {
    return $this->assertAttachedKey($this->ancestors, $slug);
  }

  public function attachAncestor($slug, $ancestor) {
    $this->ancestors[$slug] = $ancestor;
    return $this;
  }

/* -(  PhabricatorPolicyInterface  )----------------------------------------- */

  public function getCapabilities() {
    return array(
      PhabricatorPolicyCapability::CAN_VIEW,
      PhabricatorPolicyCapability::CAN_EDIT,
    );
  }

  public function getPolicy($capability) {
    switch ($capability) {
      case PhabricatorPolicyCapability::CAN_VIEW:
        return $this->getViewPolicy();
      case PhabricatorPolicyCapability::CAN_EDIT:
        return $this->getEditPolicy();
    }
  }

  public function hasAutomaticCapability($capability, PhabricatorUser $user) {
    return false;
  }

  public function describeAutomaticCapability($capability) {

    switch ($capability) {
      case PhabricatorPolicyCapability::CAN_VIEW:
        return pht(
          'To view a wiki document, you must also be able to view all '.
          'of its parents.');
      case PhabricatorPolicyCapability::CAN_EDIT:
        return pht(
          'To edit a wiki document, you must also be able to view all '.
          'of its parents.');
    }

    return null;
  }

/* -(  PhabricatorSubscribableInterface  )----------------------------------- */

  public function isAutomaticallySubscribed($phid) {
    return false;
  }

/* -(  PhabricatorApplicationTransactionInterface  )------------------------- */

  public function getApplicationTransactionEditor() {
    return new PhrictionTransactionEditor();
  }

  public function getApplicationTransactionObject() {
    return $this;
  }

  public function getApplicationTransactionTemplate() {
    return new PhrictionTransaction();
  }

  public function willRenderTimeline(
    PhabricatorApplicationTransactionView $timeline,
    AphrontRequest $request) {

    return $timeline;
  }

/* -(  PhabricatorTokenReceiverInterface  )---------------------------------- */

  public function getUsersToNotifyOfTokenGiven() {
    return PhabricatorSubscribersQuery::loadSubscribersForPHID($this->phid);
  }

/* -(  PhabricatorDestructibleInterface  )----------------------------------- */

  public function destroyObjectPermanently(
    PhabricatorDestructionEngine $engine) {

    $this->openTransaction();

      $this->delete();

      $contents = id(new PhrictionContent())->loadAllWhere(
        'documentID = %d',
        $this->getID());
      foreach ($contents as $content) {
        $content->delete();
      }

    $this->saveTransaction();
  }

/* -(  PhabricatorFulltextInterface  )--------------------------------------- */

  public function newFulltextEngine() {
    return new PhrictionDocumentFulltextEngine();
  }

}


text:
package blue.lapis.pore.impl.event.block;

import static com.google.common.base.Preconditions.checkNotNull;

import blue.lapis.pore.converter.type.material.MaterialConverter;
import blue.lapis.pore.impl.block.PoreBlock;

import org.apache.commons.lang3.NotImplementedException;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.event.block.BlockCanBuildEvent;
import org.spongepowered.api.event.block.BlockEvent;

public class PoreBlockCanBuildEvent extends BlockCanBuildEvent {

    private final BlockEvent handle; // TODO

    public PoreBlockCanBuildEvent(BlockEvent handle) {
        super(null, -1, false);
        this.handle = checkNotNull(handle, "handle");
    }

    public BlockEvent getHandle() {
        return handle;
    }

    @Override
    public Block getBlock() {
        return PoreBlock.of(getHandle().getLocation());
    }

    @Override
    public Material getMaterial() {
        return MaterialConverter.of(getHandle().getBlock().getType());
    }

    @Override
    public int getMaterialId() {
        return getMaterial().getId();
    }

    @Override
    public boolean isBuildable() {
        throw new NotImplementedException("TODO"); // TODO
    }

    @Override
    public void setBuildable(boolean cancel) {
        throw new NotImplementedException("TODO"); // TODO
    }

}


text:
.class public Landroid/net/wifi/WifiChannel;
.super Ljava/lang/Object;
.source "WifiChannel.java"

# interfaces
.implements Landroid/os/Parcelable;

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/net/wifi/WifiChannel$1;
    }
.end annotation

# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator",
            "<",
            "Landroid/net/wifi/WifiChannel;",
            ">;"
        }
    .end annotation
.end field

.field private static final MAX_CHANNEL_NUM:I = 0xc4

.field private static final MAX_FREQ_MHZ:I = 0x16c1

.field private static final MIN_CHANNEL_NUM:I = 0x1

.field private static final MIN_FREQ_MHZ:I = 0x96c

# instance fields
.field public channelNum:I

.field public freqMHz:I

.field public isDFS:Z

# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 72
    new-instance v0, Landroid/net/wifi/WifiChannel$1;

    invoke-direct {v0}, Landroid/net/wifi/WifiChannel$1;-><init>()V

    .line 71
    sput-object v0, Landroid/net/wifi/WifiChannel;->CREATOR:Landroid/os/Parcelable$Creator;

    .line 29
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 47
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public describeContents()I
    .locals 1

    .prologue
    .line 59
    const/4 v0, 0x0

    return v0
.end method

.method public isValid()Z
    .locals 4

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 51
    iget v0, p0, Landroid/net/wifi/WifiChannel;->freqMHz:I

    const/16 v1, 0x96c

    if-lt v0, v1, :cond_0

    iget v0, p0, Landroid/net/wifi/WifiChannel;->freqMHz:I

    const/16 v1, 0x16c1

    if-le v0, v1, :cond_1

    :cond_0
    return v2

    .line 52
    :cond_1
    iget v0, p0, Landroid/net/wifi/WifiChannel;->channelNum:I

    if-lt v0, v3, :cond_2

    iget v0, p0, Landroid/net/wifi/WifiChannel;->channelNum:I

    const/16 v1, 0xc4

    if-le v0, v1, :cond_3

    :cond_2
    return v2

    .line 53
    :cond_3
    return v3
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 1
    .param p1, "out"    # Landroid/os/Parcel;
    .param p2, "flags"    # I

    .prologue
    .line 65
    iget v0, p0, Landroid/net/wifi/WifiChannel;->freqMHz:I

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 66
    iget v0, p0, Landroid/net/wifi/WifiChannel;->channelNum:I

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 67
    iget-boolean v0, p0, Landroid/net/wifi/WifiChannel;->isDFS:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 64
    return-void

    .line 67
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


text:
package org.scalawebtest.core.configuration

import org.slf4j.{Logger, LoggerFactory}

trait WebDriverName {
  val webDriverName: String
}

trait SeleniumBrowserConfiguration {
  self: BaseConfiguration with WebDriverName =>

  private val logger: Logger = LoggerFactory.getLogger(getClass.getName)

  override def enableJavaScript(throwOnError: Boolean): Unit = logger.warn(s"JavaScript is always active with $webDriverName. This configuration is superfluous.")

  override def disableJavaScript(): Unit = unimplementedConfiguration(webDriverName)

  override def throwOnJavaScriptError(): Unit = unimplementedConfiguration(webDriverName)

  override def swallowJavaScriptErrors(): Unit = logger.warn(s"JavaScript errors will always get swallowed working with $webDriverName. This configuration is superfluous.")

  override def enableCss(): Unit = logger.warn(s"CSS interpretation is always active when working with $webDriverName. This configuration is superfluous.")

  override def disableCss(): Unit = unimplementedConfiguration(webDriverName)
}


text:
FJSS Generator

Submit Job List

<button class="btn btn-primary" onclick="$('#jobModal').modal()">Add Job</button>
<button class="btn btn-primary" onclick="loadExampleJobs()">Load Example Jobs</button>
<button class="btn btn-primary" onclick="generateFJSS()">Generate FJSS</button>

            Job
            Operations
            Actions

				<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Add Job

					ID
					<input id="jobId" type="number" min="0" step="1" class="form-control">

					Start Time
					<input id="jobStartTime" type="number" min="1" step="1" class="form-control">

					Due Date
					<input id="jobDueDate" type="number" min="1" step="1" class="form-control">

					Weighting
					<input id="jobWeighting" type="number" min="1" step="1" class="form-control">

				<button data-dismiss="modal" class="btn btn-default" type="button">Cancel</button>
				<button onclick="addJob()" data-dismiss="modal" class="btn btn-success" type="button">Add</button>

				<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Add Operation

					ID
					<input id="operationId" type="number" min="1" step="1" class="form-control">

					Requires

						<input id="req_3d" type="checkbox" value="http://dbpedia.org/resource/3D-printer"> 3D Printer

						<input id="req_assem" type="checkbox" value="http://dbpedia.org/resource/Assembler"> Assembler

						<input id="req_cbp" type="checkbox" value="http://dbpedia.org/resource/circuit_board_production"> Circuit Board Production

						<input id="req_fdm" type="checkbox" value="http://dbpedia.org/resource/Fused_deposition_modeling"> Fused Deposition Modeling

						<input id="req_mill" type="checkbox" value="http://dbpedia.org/resource/Milling_(machining)"> Milling

						<input id="req_pcbm" type="checkbox" value="http://dbpedia.org/resource/Category:Printed_circuit_board_manufacturing"> Printed Circuit Board Manufacturing

				<button data-dismiss="modal" class="btn btn-default" type="button">Cancel</button>
				<button onclick="addOperation()" data-dismiss="modal" class="btn btn-success" type="button">Add</button>


text:
package org.assertj.core.internal.strings;

import static org.assertj.core.error.ShouldContainCharSequence.shouldContainIgnoringCase;
import static org.assertj.core.test.ErrorMessages.charSequenceToLookForIsNull;
import static org.assertj.core.test.TestData.someInfo;
import static org.assertj.core.util.FailureMessages.actualIsNull;

import org.assertj.core.api.AssertionInfo;
import org.assertj.core.internal.Strings;
import org.assertj.core.internal.StringsBaseTest;
import org.junit.Test;

/**
 * Tests for <code>{@link Strings#assertContainsIgnoringCase(AssertionInfo, CharSequence, CharSequence)}</code>.
 *
 * @author Alex Ruiz
 * @author Joel Costigliola
 */
public class Strings_assertContainsIgnoringCase_Test extends StringsBaseTest {

  @Test
  public void should_fail_if_actual_does_not_contain_sequence() {
    thrown.expectAssertionError(shouldContainIgnoringCase("Yoda", "Luke"));
    strings.assertContainsIgnoringCase(someInfo(), "Yoda", "Luke");
  }

  @Test
  public void should_throw_error_if_sequence_is_null() {
    thrown.expectNullPointerException(charSequenceToLookForIsNull());
    strings.assertContainsIgnoringCase(someInfo(), "Yoda", null);
  }

  @Test
  public void should_fail_if_actual_is_null() {
    thrown.expectAssertionError(actualIsNull());
    strings.assertContainsIgnoringCase(someInfo(), null, "Yoda");
  }

  @Test
  public void should_pass_if_actual_contains_sequence() {
    strings.assertContainsIgnoringCase(someInfo(), "Yoda", "Yo");
  }

  @Test
  public void should_pass_if_actual_contains_sequence_in_different_case() {
    strings.assertContainsIgnoringCase(someInfo(), "Yoda", "yo");
  }

  @Test
  public void should_fail_if_actual_does_not_contain_sequence_whatever_custom_comparison_strategy_is() {
    thrown.expectAssertionError(shouldContainIgnoringCase("Yoda", "Luke"));
    stringsWithCaseInsensitiveComparisonStrategy.assertContainsIgnoringCase(someInfo(), "Yoda", "Luke");
  }

  @Test
  public void should_throw_error_if_sequence_is_null_whatever_custom_comparison_strategy_is() {
    thrown.expectNullPointerException(charSequenceToLookForIsNull());
    stringsWithCaseInsensitiveComparisonStrategy.assertContainsIgnoringCase(someInfo(), "Yoda", null);
  }

  @Test
  public void should_fail_if_actual_is_null_whatever_custom_comparison_strategy_is() {
    thrown.expectAssertionError(actualIsNull());
    stringsWithCaseInsensitiveComparisonStrategy.assertContainsIgnoringCase(someInfo(), null, "Yoda");
  }

  @Test
  public void should_pass_if_actual_contains_sequence_whatever_custom_comparison_strategy_is() {
    stringsWithCaseInsensitiveComparisonStrategy.assertContainsIgnoringCase(someInfo(), "Yoda", "Yo");
  }

  @Test
  public void should_pass_if_actual_contains_sequence_in_different_case_whatever_custom_comparison_strategy_is() {
    stringsWithCaseInsensitiveComparisonStrategy.assertContainsIgnoringCase(someInfo(), "Yoda", "yo");
  }
}


text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require('../Subscriber');
var tryCatch_1 = require('../util/tryCatch');
var errorObject_1 = require('../util/errorObject');
function skipWhile(predicate) {
    return this.lift(new SkipWhileOperator(predicate));
}
exports.skipWhile = skipWhile;
var SkipWhileOperator = (function () {
    function SkipWhileOperator(predicate) {
        this.predicate = predicate;
    }
    SkipWhileOperator.prototype.call = function (subscriber) {
        return new SkipWhileSubscriber(subscriber, this.predicate);
    };
    return SkipWhileOperator;
})();
var SkipWhileSubscriber = (function (_super) {
    __extends(SkipWhileSubscriber, _super);
    function SkipWhileSubscriber(destination, predicate) {
        _super.call(this, destination);
        this.predicate = predicate;
        this.skipping = true;
        this.index = 0;
    }
    SkipWhileSubscriber.prototype._next = function (value) {
        var destination = this.destination;
        if (this.skipping === true) {
            var index = this.index++;
            var result = tryCatch_1.tryCatch(this.predicate)(value, index);
            if (result === errorObject_1.errorObject) {
                destination.error(result.e);
            }
            else {
                this.skipping = Boolean(result);
            }
        }
        if (this.skipping === false) {
            destination.next(value);
        }
    };
    return SkipWhileSubscriber;
})(Subscriber_1.Subscriber);
//# sourceMappingURL=skipWhile.js.map


text:
package org.gradle.internal.build;

import org.gradle.api.artifacts.component.BuildIdentifier;
import org.gradle.api.artifacts.component.ProjectComponentIdentifier;
import org.gradle.api.internal.SettingsInternal;
import org.gradle.initialization.IncludedBuildSpec;
import org.gradle.initialization.NestedBuildFactory;
import org.gradle.util.Path;

/**
 * Encapsulates the identity and state of a particular build in a build tree.
 *
 * Implementations are not yet entirely thread-safe, but should be.
 */
public interface BuildState {
    /**
     * Returns the identifier for this build. The identifier is fixed for the lifetime of the build.
     */
    BuildIdentifier getBuildIdentifier();

    /**
     * Returns an identifying path for this build. This path is fixed for the lifetime of the build.
     */
    Path getIdentityPath();

    /**
     * Is this an implicit build? An implicit build is one that is managed by Gradle and which is not addressable by user build logic.
     */
    boolean isImplicitBuild();

    /**
     * The configured settings object for this build, if available.
     *
     * This should not be exposed directly, but should be behind some method that coordinates access from multiple threads.
     *
     * @throws IllegalStateException When the settings are not available for this build.
     */
    SettingsInternal getLoadedSettings() throws IllegalStateException;

    /**
     * Returns the factory to use to create children of this build.
     */
    NestedBuildFactory getNestedBuildFactory();

    /**
     * Note: may change value over the lifetime of this build, as this is often a function of the name of the root project in the build and this is not known until the settings have been configured. A temporary value will be returned when child builds need to create projects for some reason.
     */
    Path getCurrentPrefixForProjectsInChildBuilds();

    /**
     * Calculates the identity path for a project in this build.
     */
    Path getIdentityPathForProject(Path projectPath) throws IllegalStateException;

    /**
     * Calculates the identifier for a project in this build.
     */
    ProjectComponentIdentifier getIdentifierForProject(Path projectPath) throws IllegalStateException;

    /**
     * Asserts that the given build can be included by this build.
     */
    void assertCanAdd(IncludedBuildSpec includedBuildSpec);
}


text:
'use strict';

var spawn = require('child_process').spawn;

require('dotenv').config({silent: true});

if (process.env.GOOGLE_ANALYTICS) {
  process.env.GOOGLE_ANALYTICS = process.env.GOOGLE_ANALYTICS.replace(/\"/g, '');
}
if (process.env.API_KEY) {
  process.env.API_KEY = process.env.API_KEY.replace(/\"/g, '');
}

var server = require('./app');
var port = process.env.PORT || process.env.VCAP_APP_PORT || 3000;

var toclose = server.listen(port, function() {
  console.log('Server running on port: %d', port);
  setTimeout(runTests, 10000);
});

var runTests = function() {
  var casper = spawn('npm', ['run', 'test-integration']);
  casper.stdout.pipe(process.stdout);

  casper.on('error', function (error)  {
    console.log('ERROR: ' + error);
    toclose.close(function() {
      process.exit(1);
    });
  });

  casper.on('close', function (code) {
    toclose.close(function() {
      // eslint-disable-next-line no-process-exit
      process.exit(code);
    });
  });
};


text:
        <meta charset="utf-8">
        <title>Lobbyradar Popup</title>

        <link href="../../lib/css/font/roboto-slab.css" rel="stylesheet" type="text/css">

        <link href="../../lib/css/bootstrap.min.css" rel="stylesheet" type="text/css">
        <link href="../../lib/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
        <link href="../../lib/css/lobbyradar.css" rel="stylesheet" type="text/css">
        <link href="../../lib/css/popup.css" rel="stylesheet" type="text/css">

                        Lobbyradar

                 Treffer auf dieser Seite.

deaktivieren

                Keine Zusatzinformationen auf dieser Seite.

                Auf dieser Seite nicht möglich.

Einstellungen


text:
Deface::Override.new(:virtual_path  => "spree/admin/products/new",
                     :insert_after  => "[data-hook='new_product_attrs']",
                     :partial       => "shared/expires_at_admin_field",
                     :name          => "expires_at_admin_field_new")

Deface::Override.new(:virtual_path  => "spree/admin/products/_form",
                     :insert_after  => "[data-hook='admin_product_form_right']",
                     :partial       => "shared/expires_at_admin_field",
                     :name          => "expires_at_admin_field_edit")


text:
"""advent of code day 1.

http://adventofcode.com/2016/day/1
--- Part Two ---

Then, you notice the instructions continue on the back of the Recruiting
Document. Easter Bunny HQ is actually at the first location you visit twice.

For example, if your instructions are R8, R4, R4, R8, the first location you
visit twice is 4 blocks away, due East.

How many blocks away is the first location you visit twice?
"""

import sys
import string

def face(direction, compass, facing):
    """Keep track of facing direction."""
    try:
        lr = direction[0]
        if lr == "R":
            facing += 1
        elif lr == "L":
            facing -= 1
        # If facing tracker is > compass length, circle back to beginning of
        #   list
        if facing >= len(compass):
            facing = facing - len(compass)
        # Always set facing to the positive-valued index of the list
        #   this prevents issues regarding facing being < -len(compass)
        facing = compass.index(compass[facing])
        return facing
    except Exception, exc:
        print exc

def move(direction, compass, facing, last_point):
    """Move around and return new last_point position."""
    try:
        spaces = int(direction[1:])
        # Track total longitude and latitude from start point
        if compass[facing] == "n":
            last_point[1] += spaces
        elif compass[facing] == "s":
            last_point[1] -= spaces
        elif compass[facing] == "e":
            last_point[0] += spaces
        elif compass[facing] == "w":
            last_point[0] -= spaces
        return last_point
    except Exception, exc:
        print exc

def crosscheck(lat, check_line, past_lines):
    """Check if current line crosses past_lines."""
    try:
        sort_check_line = sorted(check_line)
        # print "check line:", sort_check_line
        if lat:
            # line is horizontal
            # check current line against all past lines, except most-recent
            # past line.
            for past_line in past_lines[:-1]:
                sort_past_line = sorted(past_line)
                # print "past line:", sort_past_line
                in_lat = (sort_check_line[0][0] <= sort_past_line[0][0]
                          and sort_check_line[1][0] >= sort_past_line[1][0])
                in_lon = (sort_check_line[0][1] >= sort_past_line[0][1]
                          and sort_check_line[1][1] <= sort_past_line[1][1])
                if in_lat and in_lon:
                    printout(sort_past_line[0][0], sort_check_line[0][1])
        else:
            # line is vertical
            # check current line against all past lines, except most-recent
            # past line.
            for past_line in past_lines[:-1]:
                sort_past_line = sorted(past_line)
                # print "past line:", sort_past_line
                in_lat = (sort_check_line[0][0] >= sort_past_line[0][0]
                          and sort_check_line[1][0] <= sort_past_line[1][0])
                in_lon = (sort_check_line[0][1] <= sort_past_line[0][1]
                          and sort_check_line[1][1] >= sort_past_line[1][1])
                if in_lat and in_lon:
                    printout(sort_check_line[0][0], sort_past_line[0][1])

    except Exception, exc:
        print exc

def printout(lat, lon):
    """Print distance from 0,0 and exit."""
    total = abs(lat) + abs(lon)
    print total
    sys.exit()

if __name__ == "__main__":
    indir = []
    with open(sys.argv[1]) as f:
        indir = string.split(f.read(),", ")

    compass = ["n", "e", "s", "w"]
    facing = 0
    lat = 0
    lon = 0
    # lat is +E -W
    # lon is +N  -S
    visited_coords = [[0, 0]]
    vert_lines = []
    hor_lines = []

    for direction in indir:
        direction = direction.strip()
        facing = face(direction, compass, facing)
        [lat, lon] = visited_coords[-1]
        new_point = move(direction, compass, facing, [lat, lon])
        if compass[facing] == "n" or compass[facing] == "s":
            crosscheck(False, [visited_coords[-1], new_point], hor_lines)
            vert_lines.append([visited_coords[-1], new_point])
        else:
            crosscheck(True, [visited_coords[-1], new_point], vert_lines)
            hor_lines.append([visited_coords[-1], new_point])
        visited_coords.append(new_point)

    printout(visited_coords[-1][0], visited_coords[-1][1])


text:
// Copyright (C) 2010, 2011 and 2012 Marcin Arkadiusz Skrobiranda.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
// 3. Neither the name of the project nor the names of its contributors
//    may be used to endorse or promote products derived from this software
//    without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.

#ifndef GAMESERVER_LAND_ILANDRECORD_HPP
#define GAMESERVER_LAND_ILANDRECORD_HPP

#include <boost/shared_ptr.hpp>
#include <map>
#include <string>

namespace GameServer
{
namespace Land
{

/**
 * @brief The interface of the record of the land.
 */
class ILandRecord
{
public:
    virtual ~ILandRecord(){}

    /**
     * @brief Gets the login of the user.
     *
     * @return The login of the user.
     */
    virtual std::string getLogin() const = 0;

    /**
     * @brief Gets the name of the world.
     *
     * @return The name of the world.
     */
    virtual std::string getWorldName() const = 0;

    /**
     * @brief Gets the name of the land.
     *
     * @return The name of the land.
     */
    virtual std::string getLandName() const = 0;

    /**
     * @brief Gets the age of the land expressed in the number of turns.
     *
     * @return The age of the land expressed in the number of turns.
     */
    virtual int getTurns() const = 0;

    /**
     * @brief Gets the state of the "granted" value of the land.
     *
     * @return The state of the "granted" value of the land.
     */
    virtual bool getGranted() const = 0;
};

//@{
/**
 * @brief A useful typedef.
 */
typedef boost::shared_ptr<ILandRecord> ILandRecordShrPtr;
typedef std::pair<std::string, ILandRecordShrPtr> ILandRecordPair;
typedef std::map<std::string, ILandRecordShrPtr> ILandRecordMap;
//}@

} // namespace Land
} // namespace GameServer

#endif // GAMESERVER_LAND_ILANDRECORD_HPP


text:
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Switch, Route } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
import store, { history } from './store';

import App from './components/App';
import HomePage from './components/HomePage';
import ProfilePage from './components/ProfilePage';
import LoginPage from './components/LoginPage';
import CompetitionPage from './components/CompetitionPage';
import NotFound from './components/NotFound';

const router = (
    <Provider store={store}>
        <ConnectedRouter history={history}>
            <App>
                <Switch>
                    <Route exact path="/" component={HomePage} />
                    <Route path="/login" component={LoginPage} />
                    <Route path="/profile" component={ProfilePage} />
                    <Route path="/competition/:leagueSlug/:roundSlug" component={CompetitionPage} />
                    <Route component={NotFound} />
                </Switch>
            </App>
        </ConnectedRouter>
    </Provider>
);

render(router, document.getElementById('root'));


text:
import * as utils from 'src/utils';
import {registerBidder} from 'src/adapters/bidderFactory';
import * as bidfactory from '../src/bidfactory';
var CONSTANTS = require('src/constants.json');
const BIDDER_CODE = 'tim';

function parseBidRequest(bidRequest) {
  let params = bidRequest.url.split('?')[1];
  var obj = {};
  var pairs = params.split('&');
  try {
    for (var i in pairs) {
      var split = pairs[i].split('=');
      obj[decodeURIComponent(split[0])] = decodeURIComponent(split[1]);
    }
  } catch (e) {
    utils.logError(e);
  }

  return JSON.parse(obj.br);
}

function formatAdMarkup(bid) {
  var adm = bid.adm;
  if ('nurl' in bid) {
    adm += createTrackPixelHtml(bid.nurl);
  }
  return `<!DOCTYPE html><html><head><title></title><body style='margin:0px;padding:0px;'>${adm}</body></head>`;
}

function createTrackPixelHtml(url) {
  if (!url) {
    return '';
  }
  let img = '
';
  img += '
';
  return img;
}

export const spec = {
  code: BIDDER_CODE,
  aliases: ['timmedia'],

  isBidRequestValid: function(bid) {
    if (bid.params && bid.params.publisherid && bid.params.placementCode) {
      return true;
    } if (!bid.params) {
      utils.logError('bid not valid: params were not provided');
    } else if (!bid.params.publisherid) {
      utils.logError('bid not valid: publisherid was not provided');
    } else if (!bid.params.placementCode) {
      utils.logError('bid not valid: placementCode was not provided');
    } return false;
  },

  buildRequests: function(validBidRequests, bidderRequest) {
    var requests = [];
    for (var i = 0; i < validBidRequests.length; i++) {
      requests.push(this.createRTBRequestURL(validBidRequests[i]));
    }
    return requests;
  },

  createRTBRequestURL: function(bidReq) {
    // build bid request object
    var domain = window.location.host;
    var page = window.location.href;
    var publisherid = bidReq.params.publisherid;
    var bidFloor = bidReq.params.bidfloor;
    var placementCode = bidReq.params.placementCode;

    var adW = bidReq.mediaTypes.banner.sizes[0][0];
    var adH = bidReq.mediaTypes.banner.sizes[0][1];

    // build bid request with impressions
    var bidRequest = {
      id: utils.getUniqueIdentifierStr(),
      imp: [{
        id: bidReq.bidId,
        banner: {
          w: adW,
          h: adH
        },
        tagid: placementCode,
        bidfloor: bidFloor
      }],
      site: {
        domain: domain,
        page: page,
        publisher: {
          id: publisherid
        }
      },
      device: {
        'language': this.getLanguage(),
        'w': adW,
        'h': adH,
        'js': 1,
        'ua': navigator.userAgent
      }
    };
    if (!bidFloor) {
      delete bidRequest.imp['bidfloor'];
    }

    bidRequest.bidId = bidReq.bidId;
    var url = '//hb.timmedia-hb.com/api/v2/services/prebid/' + publisherid + '/' + placementCode + '?' + 'br=' + encodeURIComponent(JSON.stringify(bidRequest));
    return {
      method: 'GET',
      url: url,
      data: '',
      options: {withCredentials: false}
    };
  },

  interpretResponse: function(serverResponse, bidRequest) {
    bidRequest = parseBidRequest(bidRequest);
    var bidResp = serverResponse.body;
    const bidResponses = [];
    if ((!bidResp || !bidResp.id) ||
      (!bidResp.seatbid || bidResp.seatbid.length === 0 || !bidResp.seatbid[0].bid || bidResp.seatbid[0].bid.length === 0)) {
      return [];
    }
    bidResp.seatbid[0].bid.forEach(function (bidderBid) {
      var responseCPM;
      var placementCode = '';
      if (bidRequest) {
        var bidResponse = bidfactory.createBid(1);
        placementCode = bidRequest.placementCode;
        bidRequest.status = CONSTANTS.STATUS.GOOD;
        responseCPM = parseFloat(bidderBid.price);
        if (responseCPM === 0) {
          var bid = bidfactory.createBid(2);
          bid.bidderCode = BIDDER_CODE;
          bidResponses.push(bid);
          return bidResponses;
        }
        bidResponse.placementCode = placementCode;
        bidResponse.size = bidRequest.sizes;
        bidResponse.creativeId = bidderBid.id;
        bidResponse.bidderCode = BIDDER_CODE;
        bidResponse.cpm = responseCPM;
        bidResponse.ad = formatAdMarkup(bidderBid);
        bidResponse.width = parseInt(bidderBid.w);
        bidResponse.height = parseInt(bidderBid.h);
        bidResponse.currency = bidResp.cur;
        bidResponse.netRevenue = true;
        bidResponse.requestId = bidRequest.bidId;
        bidResponse.ttl = 180;
        bidResponses.push(bidResponse);
      }
    });
    return bidResponses;
  },
  getLanguage: function() {
    const language = navigator.language ? 'language' : 'userLanguage';
    return navigator[language].split('-')[0];
  },

  getUserSyncs: function(syncOptions, serverResponses) {
    const syncs = []
    return syncs;
  },

  onTimeout: function(data) {
    // Bidder specifc code
  },

  onBidWon: function(bid) {
    // Bidder specific code
  },

  onSetTargeting: function(bid) {
    // Bidder specific code
  },
}
registerBidder(spec);


text:
package com.lympid.core.behaviorstatemachines.validation;

import com.lympid.core.behaviorstatemachines.PseudoStateKind;
import com.lympid.core.behaviorstatemachines.State;
import com.lympid.core.behaviorstatemachines.TransitionKind;
import com.lympid.core.behaviorstatemachines.impl.MutablePseudoState;
import com.lympid.core.behaviorstatemachines.impl.MutableRegion;
import com.lympid.core.behaviorstatemachines.impl.MutableState;
import com.lympid.core.behaviorstatemachines.impl.MutableStateMachine;
import org.junit.Test;

import java.util.Arrays;
import java.util.Collections;

import static com.lympid.core.common.TestUtils.randomPseudoState;
import static com.lympid.core.common.TestUtils.randomPseudoStateBut;
import static org.junit.Assert.*;

/**
 *
 * @author Fabien Renaud
 */
public class TransitionKindConstraintsTest {

  /**
   * [1] A transition with kind local must have a composite state or an entry
   * point as its source.
   */
  @Test
  public void constraint1_success_composite() {
    MutableState state = new MutableState();
    state.setRegions(Collections.singletonList(
      new MutableRegion()
    ));
    assertTrue(state.isComposite());
    assertFalse(state.isOrthogonal());
    StandardValidator.validate(TransitionKind.LOCAL, state, null);
  }

  /**
   * [1] A transition with kind local must have a composite state or an entry
   * point as its source.
   */
  @Test
  public void constraint1_success_orthogonal() {
    MutableState state = new MutableState();
    state.setRegions(Arrays.asList(
      new MutableRegion(),
      new MutableRegion()
    ));
    assertTrue(state.isComposite());
    assertTrue(state.isOrthogonal());
    StandardValidator.validate(TransitionKind.LOCAL, state, null);
  }

  /**
   * [1] A transition with kind local must have a composite state or an entry
   * point as its source.
   */
  @Test
  public void constraint1_success_entryPoint() {
    MutablePseudoState pseudo = new MutablePseudoState(PseudoStateKind.ENTRY_POINT);
    StandardValidator.validate(TransitionKind.LOCAL, pseudo, null);
  }

  /**
   * [1] A transition with kind local must have a composite state or an entry
   * point as its source.
   */
  @Test(expected = TransitionKindConstraintException.class)
  public void constraint1_fail_simple() {
    MutableState state = new MutableState();
    assertTrue(state.isSimple());
    assertFalse(state.isComposite());

    try {
      StandardValidator.validate(TransitionKind.LOCAL, state, null);
    } catch (TransitionKindConstraintException ex) {
      assertEquals(TransitionKind.LOCAL, ex.getKind());
      assertEquals(state, ex.getSource());
      assertNull(ex.getTarget());
      throw ex;
    }
  }

  /**
   * [1] A transition with kind local must have a composite state or an entry
   * point as its source.
   */
  @Test(expected = TransitionKindConstraintException.class)
  public void constraint1_fail_exitPoint() {
    MutablePseudoState pseudo = randomPseudoStateBut(PseudoStateKind.ENTRY_POINT);

    try {
      StandardValidator.validate(TransitionKind.LOCAL, pseudo, null);
    } catch (TransitionKindConstraintException ex) {
      assertEquals(TransitionKind.LOCAL, ex.getKind());
      assertEquals(pseudo, ex.getSource());
      assertNull(ex.getTarget());
      throw ex;
    }
  }

  /**
   * [1] A transition with kind local must have a composite state or an entry
   * point as its source.
   */
  @Test(expected = TransitionKindConstraintException.class)
  public void constraint1_fail_null() {
    try {
      StandardValidator.validate(TransitionKind.LOCAL, null, null);
    } catch (TransitionKindConstraintException ex) {
      assertEquals(TransitionKind.LOCAL, ex.getKind());
      assertNull(ex.getSource());
      assertNull(ex.getTarget());
      throw ex;
    }
  }

  /**
   * [2] A transition with kind external can source any vertex except entry
   * points.
   */
  @Test
  public void constraint2_success() {
    StandardValidator.validate(TransitionKind.EXTERNAL, simpleState(), null);
    StandardValidator.validate(TransitionKind.EXTERNAL, compositeState(), null);
    StandardValidator.validate(TransitionKind.EXTERNAL, orthogonalState(), null);
    StandardValidator.validate(TransitionKind.EXTERNAL, regularSubMachineState(), null);
    StandardValidator.validate(TransitionKind.EXTERNAL, specialSubMachineState(), null);
    StandardValidator.validate(TransitionKind.EXTERNAL, randomPseudoStateBut(PseudoStateKind.ENTRY_POINT), null);
  }

  /**
   * [2] A transition with kind external can source any vertex except entry
   * points.
   */
  @Test(expected = TransitionKindConstraintException.class)
  public void constraint2_fail() {
    MutablePseudoState pseudo = new MutablePseudoState(PseudoStateKind.ENTRY_POINT);
    try {
      StandardValidator.validate(TransitionKind.EXTERNAL, pseudo, null);
    } catch (TransitionKindConstraintException ex) {
      assertEquals(TransitionKind.EXTERNAL, ex.getKind());
      assertEquals(pseudo, ex.getSource());
      assertNull(ex.getTarget());
      throw ex;
    }
  }

  /**
   * [3] A transition with kind internal must have a state as its source, and
   * its source and target must be equal.
   */
  @Test
  public void constraint3_success() {
    State source = simpleState();
    StandardValidator.validate(TransitionKind.INTERNAL, source, source);

    source = compositeState();
    StandardValidator.validate(TransitionKind.INTERNAL, source, source);

    source = orthogonalState();
    StandardValidator.validate(TransitionKind.INTERNAL, source, source);

    source = regularSubMachineState();
    StandardValidator.validate(TransitionKind.INTERNAL, source, source);

    source = specialSubMachineState();
    StandardValidator.validate(TransitionKind.INTERNAL, source, source);
  }

  @Test(expected = TransitionKindConstraintException.class)
  public void constraint3_fail_targetNull() {
    StandardValidator.validate(TransitionKind.INTERNAL, simpleState(), null);
  }

  @Test(expected = TransitionKindConstraintException.class)
  public void constraint3_fail_sourceNull() {
    StandardValidator.validate(TransitionKind.INTERNAL, null, simpleState());
  }

  @Test(expected = TransitionKindConstraintException.class)
  public void constraint3_fail_pseudoTarget() {
    StandardValidator.validate(TransitionKind.INTERNAL, simpleState(), randomPseudoState());
  }

  @Test(expected = TransitionKindConstraintException.class)
  public void constraint3_fail_pseudoSource() {
    StandardValidator.validate(TransitionKind.INTERNAL, randomPseudoState(), simpleState());
  }

  private MutableState simpleState() {
    MutableState state = new MutableState();
    return state;
  }

  private MutableState compositeState() {
    MutableState state = new MutableState();
    state.setRegions(Collections.singletonList(new MutableRegion()));
    return state;
  }

  private MutableState orthogonalState() {
    MutableState state = new MutableState();
    state.setRegions(Arrays.asList(new MutableRegion(), new MutableRegion()));
    return state;
  }

  private MutableState regularSubMachineState() {
    MutableStateMachine subMachine = new MutableStateMachine();
    MutableRegion region1 = new MutableRegion();
    MutableRegion region2 = new MutableRegion();
    subMachine.setRegions(Arrays.asList(region1, region2));

    MutableState subMachineState = new MutableState();
    subMachineState.setSubStateMachine(subMachine);

    assertTrue(subMachineState.isSimple());
    assertFalse(subMachineState.isComposite());
    assertFalse(subMachineState.isOrthogonal());
    assertTrue(subMachineState.isSubMachineState());

    return subMachineState;
  }

  private MutableState specialSubMachineState() {
    MutableStateMachine subMachine = new MutableStateMachine();
    MutableRegion region1 = new MutableRegion();
    MutableRegion region2 = new MutableRegion();
    subMachine.setRegions(Arrays.asList(region1, region2));

    MutableState subMachineState = new MutableState();
    subMachineState.setSubStateMachine(subMachine);
    subMachineState.setRegions(Arrays.asList(region1, region2));

    assertFalse(subMachineState.isSimple());
    assertTrue(subMachineState.isComposite());
    assertTrue(subMachineState.isOrthogonal());
    assertTrue(subMachineState.isSubMachineState());

    return subMachineState;
  }
}


text:
package edu.uno.csci.drward3.remotedatalist;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by danielward on 10/6/15.
 */
public class Api {
    public static List<Post> getPosts() throws IOException {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
                .url("http://jsonplaceholder.typicode.com/posts")
                .build();

        Response response = client.newCall(request).execute();

        String json = response.body().string();

        GsonBuilder gsonBuilder = new GsonBuilder();
        Gson gson = gsonBuilder.create();
        List<Post> posts = new ArrayList<Post>();
        posts = Arrays.asList(gson.fromJson(json, Post[].class));

        return posts;
    }
}


text:
const htmlAttributesTest = (

            <link crossorigin="test" href="#" hreflang="en" charset="utf-8" />

            <meta charset="utf-8" http-equiv="test" />


text:
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>Join 100 Women Who Care || Memphis</title>

  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
  <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>

          Logo

Home

About Us

Join Us

Nominate

For Non-Profits

Home

About Us

Join Us

Nominate

For Non-Profits

          menu

Non-Profit Guidelines

What We're Looking For...

Nominate nonprofits in our community you are passionate about, today!

Only members in good standing can nominate a nonprofit.
                Each member can nominate one non-profit per quarter.
                Every quarter we will randomly draw 3 nonprofits to present at our giving circle meeting.

            Before you nominate please check our currently nominated nonprofits to makesure your favorite
            organization has not already been nominated. If you know a great organization that could use our
            support please submit an Nomination Form below.

            Each organization will send a representative to speak for 5 minutes at the meeting about why they
            deserve our vote. We will vote and choose the recipient of our contributions for that meeting.

To be considered a potential recipient of 100 Women Who Care Memphis donations, an organization must meet all of the following criteria:

                    Recognized by the Internal Revenue Service as a 501(c)(3) nonprofit organization

                    Located in West Tennessee, North Mississippi, or West Memphis Arkansas

                    In operation for at least three years as of the date of the nomination

                    Here are a few additional requirements:

                    Nominations from national nonprofit organizations will not be accepted. However, local branches of these organizations are eligible for consideration.

                    The organization must be willing to send a representative to our meetings to share how our donations will support their mission.

Nominate Now!


text:
from units.compat import unittest

from oneview_module_loader import EthernetNetworkInfoModule
from hpe_test_utils import FactsParamsTestCase

ERROR_MSG = 'Fake message error'

PARAMS_GET_ALL = dict(
    config='config.json',
    name=None
)

PARAMS_GET_BY_NAME = dict(
    config='config.json',
    name="Test Ethernet Network",
    options=[]
)

PARAMS_GET_BY_NAME_WITH_OPTIONS = dict(
    config='config.json',
    name="Test Ethernet Network",
    options=['associatedProfiles', 'associatedUplinkGroups']
)

PRESENT_ENETS = [{
    "name": "Test Ethernet Network",
    "uri": "/rest/ethernet-networks/d34dcf5e-0d8e-441c-b00d-e1dd6a067188"
}]

ENET_ASSOCIATED_UPLINK_GROUP_URIS = [
    "/rest/uplink-sets/c6bf9af9-48e7-4236-b08a-77684dc258a5",
    "/rest/uplink-sets/e2f0031b-52bd-4223-9ac1-d91cb519d548"
]

ENET_ASSOCIATED_PROFILE_URIS = [
    "/rest/server-profiles/83e2e117-59dc-4e33-9f24-462af951cbbe",
    "/rest/server-profiles/57d3af2a-b6d2-4446-8645-f38dd808ea4d"
]

ENET_ASSOCIATED_UPLINK_GROUPS = [dict(uri=ENET_ASSOCIATED_UPLINK_GROUP_URIS[0], name='Uplink Set 1'),
                                 dict(uri=ENET_ASSOCIATED_UPLINK_GROUP_URIS[1], name='Uplink Set 2')]

ENET_ASSOCIATED_PROFILES = [dict(uri=ENET_ASSOCIATED_PROFILE_URIS[0], name='Server Profile 1'),
                            dict(uri=ENET_ASSOCIATED_PROFILE_URIS[1], name='Server Profile 2')]

class EthernetNetworkInfoSpec(unittest.TestCase,
                              FactsParamsTestCase
                              ):
    def setUp(self):
        self.configure_mocks(self, EthernetNetworkInfoModule)
        self.ethernet_networks = self.mock_ov_client.ethernet_networks
        FactsParamsTestCase.configure_client_mock(self, self.ethernet_networks)

    def test_should_get_all_enets(self):
        self.ethernet_networks.get_all.return_value = PRESENT_ENETS
        self.mock_ansible_module.params = PARAMS_GET_ALL

        EthernetNetworkInfoModule().run()

        self.mock_ansible_module.exit_json.assert_called_once_with(
            changed=False,
            ethernet_networks=(PRESENT_ENETS)
        )

    def test_should_get_enet_by_name(self):
        self.ethernet_networks.get_by.return_value = PRESENT_ENETS
        self.mock_ansible_module.params = PARAMS_GET_BY_NAME

        EthernetNetworkInfoModule().run()

        self.mock_ansible_module.exit_json.assert_called_once_with(
            changed=False,
            ethernet_networks=(PRESENT_ENETS)
        )

    def test_should_get_enet_by_name_with_options(self):
        self.ethernet_networks.get_by.return_value = PRESENT_ENETS
        self.ethernet_networks.get_associated_profiles.return_value = ENET_ASSOCIATED_PROFILE_URIS
        self.ethernet_networks.get_associated_uplink_groups.return_value = ENET_ASSOCIATED_UPLINK_GROUP_URIS
        self.mock_ov_client.server_profiles.get.side_effect = ENET_ASSOCIATED_PROFILES
        self.mock_ov_client.uplink_sets.get.side_effect = ENET_ASSOCIATED_UPLINK_GROUPS

        self.mock_ansible_module.params = PARAMS_GET_BY_NAME_WITH_OPTIONS

        EthernetNetworkInfoModule().run()

        self.mock_ansible_module.exit_json.assert_called_once_with(
            changed=False,
            ethernet_networks=PRESENT_ENETS,
            enet_associated_profiles=ENET_ASSOCIATED_PROFILES,
            enet_associated_uplink_groups=ENET_ASSOCIATED_UPLINK_GROUPS
        )

if __name__ == '__main__':
    unittest.main()


text:
title: Readme
---

### Some other file


text:
{% extends auth_base|default:"base.html" %}

{% load ng_utils %}

{% block content %}
{{ block.super }}

        <form role="form" method="POST">
            {% csrf_token %}

{{ title }}

                    {% for field in form %}

                        {{ field.label_tag }}
                        {{ field|add_class:"form-control" }}
                        {% for error in field.errors %}{{ error }}{% endfor %}

                    {% endfor %}

                        {% block cancel %}{% endblock %}
                        <button class="btn btn-md btn-primary" action="submit">Submit</button>

        </form>

{% endblock %}


text:
package org.apache.hedwig.jms.message;

import com.google.protobuf.ByteString;
import org.apache.hedwig.jms.SessionImpl;
import org.apache.hedwig.protocol.PubSubProtocol;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageNotWriteableException;
import javax.jms.ObjectMessage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Map;

/**
 * read/write serializable java object ...
 *
 */
public class ObjectMessageImpl extends MessageImpl implements ObjectMessage {
    private Serializable payload;
    private boolean readMode;

    public ObjectMessageImpl(SessionImpl session, Serializable payload) {
        super(session);
        this.payload = payload;
        this.readMode = false;
    }

    public ObjectMessageImpl(SessionImpl session, ObjectMessageImpl message, String sourceTopicName,
                             String subscriberId) throws JMSException {
        super(session, (MessageImpl) message, sourceTopicName, subscriberId);

        this.payload = copySerializable(message.getObject());
        this.readMode = message.readMode;
    }

    private Serializable copySerializable(Serializable object) throws JMSException {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream(128);
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(object);
            oos.flush();
            oos.close();
            baos.flush();
            baos.close();

            ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
            return (Serializable) ois.readObject();
        } catch (IOException e){
            JMSException jmsEx = new javax.jms.IllegalStateException("Unexpected exception");
            jmsEx.setLinkedException(e);
            throw jmsEx;
        } catch (ClassNotFoundException e) {
            JMSException jmsEx = new javax.jms.IllegalStateException("Unexpected exception");
            jmsEx.setLinkedException(e);
            throw jmsEx;
        }
    }

    // To clone a message from a ObjectMessage which is NOT ObjectMessageImpl
    // Changing order of parameter to NOT accidentally clash with the constructor above.
    // This is midly confusing, but helps a lot in preventing accidental bugs !
    public ObjectMessageImpl(ObjectMessage message, SessionImpl session) throws JMSException {
        super((Message) message, session);

        if (message instanceof ObjectMessageImpl) {
            throw new JMSException("Coding bug - should use this constructor ONLY for non ObjectMessageImpl messages");
        }

        this.payload = message.getObject();
        this.readMode = false;
    }

    public ObjectMessageImpl(SessionImpl session, PubSubProtocol.Message message, Map<String, Object> properties,
                             String sourceTopicName, String subscriberId, Runnable ackRunnable) throws JMSException {
        super(session, message, properties, sourceTopicName, subscriberId, ackRunnable);

        try {
            this.payload = hasBodyFromProperties() ?
                (Serializable) MessageUtil.bytesToObject(message.getBody().toByteArray()) : null;
        } catch (IOException e) {
            JMSException ex = new JMSException("Unable to read message data .. " + e);
            ex.setLinkedException(e);
            throw ex;
        }
        this.readMode = true;
    }

    @Override
    protected MessageUtil.SupportedMessageTypes getJmsMessageType() {
        return MessageUtil.SupportedMessageTypes.OBJECT;
    }

    @Override
    public PubSubProtocol.Message generateHedwigMessage() throws JMSException {
        PubSubProtocol.Message.Builder builder = PubSubProtocol.Message.newBuilder();
        super.populateBuilderWithHeaders(builder);

        // Now set body and type.
        try {
            if (! isBodyEmpty()) builder.setBody(ByteString.copyFrom(MessageUtil.objectToBytes(this.payload)));
        } catch (IOException e) {
            JMSException ex = new JMSException("Unable to read message data .. " + e);
            ex.setLinkedException(e);
            throw ex;
        }

        return builder.build();
    }

    protected boolean isBodyEmpty(){
        return null == this.payload;
    }

    @Override
    public void setObject(Serializable payload) throws JMSException {
        if (readMode) throw new MessageNotWriteableException("Message not writable");
        this.payload = payload;
    }

    @Override
    public Serializable getObject() throws JMSException {
        return payload;
    }

    @Override
    public void clearBody() throws JMSException {
        super.clearBody();
        // allow read and write.
        this.payload = null;
        this.readMode = false;
    }

    @Override
    public void reset() throws JMSException {
        if (this.readMode) return ;
        this.readMode = true;
    }

    @Override
    ObjectMessageImpl createClone(SessionImpl session, String sourceTopicName, String subscriberId)
        throws JMSException {

        return new ObjectMessageImpl(session, this, sourceTopicName, subscriberId);
    }
}


text:
require_relative "test-helper"

class TestUrlEncoding < Test::Unit::TestCase
  def setup
    @normal = "10.1371/journal.pone.0033693"
    @needs_encoding = "10.1002/1096-9861(20010212)430:3<283::aid-cne1031>3.0.co;2-v"
    @many_dois = ["10.1007/12080.1874-1746", "10.1007/10452.1573-5125", @needs_encoding]
  end

  def test_url_encoding
    VCR.use_cassette("test_url_encoding") do
      res = Serrano.works(ids: @needs_encoding)
      assert_equal(1, res.length)
      assert_equal(Array, res.class)
      assert_equal(Hash, res[0].class)
      assert_equal(@needs_encoding, res[0]["message"]["DOI"])
    end
  end

  def test_url_encoding_many
    VCR.use_cassette("test_url_encoding_many") do
      res = Serrano.works(ids: @many_dois)
      assert_equal(3, res.length)
      assert_equal(Array, res.class)
      assert_equal(Hash, res[2].class)
      assert_equal(@many_dois[0], res[0]["message"]["DOI"])
      assert_equal(@many_dois[1], res[1]["message"]["DOI"])
      assert_equal(@many_dois[2], res[2]["message"]["DOI"])
    end
  end

  def test_url_encoding_content_negotiation
    VCR.use_cassette("test_url_encoding_content_negotiation") do
      res = Serrano.content_negotiation(ids: @many_dois)
      assert_equal(3, res.length)
      assert_equal(Array, res.class)
      assert_equal(String, res[2].class)
      assert_match(@many_dois[2], res[2])
    end
  end
end


text:
@class IDEIndexCollection;
@protocol IDEIndexPropertySymbol;

@protocol IDEIndexCallableSymbol <IDEIndexSymbol>
@property(nonatomic, readonly) id <IDEIndexPropertySymbol> property;
@property(nonatomic, readonly) IDEIndexCollection *overriddenSymbols;
@end


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W30598_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans726.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

Skunk C k 1'8-17 16H, Sku k c k 1—8—17—16 Skunk ciggk 1a8—17—15H, Skunnk C§§§k 1—8—1745
Cross Sections
E
' \—13 Grade I
H3 H3

E

Confidentiality Notice: The information contained on this plat is 1 city privileged and confidential Information intended only for e use at recipients. If you are not the intended
recipients. you are hereby notified that any use. dissemination. distribution or copying at this information in atrial" prohibited.
rown 3 uwoy -' Approv E ' do n ' no
B.C. J.D. J.K. Q. Obriewitsch 1 = 100 4 24 2014
ed :- Material e so reject 0. 3711552 row/mg No. ow—248 1/16/2015
Jun 16. 2015 - 3:33 PM - P:\0il\Wthn0\37t4554 1\CADD\37145548ASOZ.M OKU 2015


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <corners android:radius="8dp" />
    <solid android:color="@color/color_login_out_normal" />
</shape>


text:
package it.infn.security.saml.aa;

import it.infn.security.saml.configuration.AuthorityConfiguration;
import it.infn.security.saml.configuration.AuthorityConfigurationFactory;
import it.infn.security.saml.configuration.ContactInfo;
import it.infn.security.saml.configuration.OrganizationInfo;
import it.infn.security.saml.datasource.DataSource;
import it.infn.security.saml.datasource.DataSourceFactory;
import it.infn.security.saml.schema.AttributeNameInterface;
import it.infn.security.saml.schema.SchemaManager;
import it.infn.security.saml.schema.SchemaManagerFactory;
import it.infn.security.saml.utils.SAML2ObjectBuilder;
import it.infn.security.saml.utils.SignUtils;
import it.infn.security.scim.protocol.SCIMConstants;
import it.infn.security.scim.protocol.SCIMProtocolCodec;

import java.io.StringWriter;
import java.security.cert.X509Certificate;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.joda.time.DateTime;
import org.opensaml.saml2.core.Attribute;
import org.opensaml.saml2.metadata.AttributeAuthorityDescriptor;
import org.opensaml.saml2.metadata.AttributeProfile;
import org.opensaml.saml2.metadata.AttributeService;
import org.opensaml.saml2.metadata.EntityDescriptor;
import org.opensaml.saml2.metadata.KeyDescriptor;
import org.opensaml.saml2.metadata.NameIDFormat;
import org.opensaml.xml.io.Marshaller;
import org.w3c.dom.Document;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSOutput;
import org.w3c.dom.ls.LSSerializer;

@Path("/service_metadata")
public class MetadataManager {

    private static final Logger logger = Logger.getLogger(MetadataManager.class.getName());

    @GET
    @Produces(SCIMConstants.TEXT_XML)
    public Response getAttributeNames() {

        Response result = null;

        try {

            AuthorityConfiguration configuration = AuthorityConfigurationFactory.getConfiguration();
            SchemaManager schemaManager = SchemaManagerFactory.getManager();
            DataSource dataSource = DataSourceFactory.getDataSource();

            X509Certificate srvCert = configuration.getServiceCertificate();

            EntityDescriptor entDescr = SAML2ObjectBuilder.buildEntityDescriptor();
            entDescr.setID(UUID.randomUUID().toString());
            entDescr.setEntityID(configuration.getAuthorityID());
            long dtime = configuration.getMetadataDuration();
            if (dtime > 0) {
                DateTime expDate = new DateTime(System.currentTimeMillis() + (dtime * 1000));
                entDescr.setValidUntil(expDate);
            }

            for (ContactInfo contact : configuration.getContacts()) {
                entDescr.getContactPersons().add(contact.buildContactPerson());
            }

            OrganizationInfo orgInfo = configuration.getOrganization();
            if (orgInfo != null) {
                entDescr.setOrganization(orgInfo.buildOrganization());
            }

            AttributeAuthorityDescriptor aaDescr = SAML2ObjectBuilder.buildAttributeAuthorityDescriptor();
            for (String proto : schemaManager.getSupportedProtocols()) {
                aaDescr.addSupportedProtocol(proto);
            }
            entDescr.getRoleDescriptors().add(aaDescr);

            AttributeService attrService = SAML2ObjectBuilder.buildAttributeService();
            attrService.setBinding("urn:oasis:names:tc:SAML:2.0:bindings:SOAP");
            attrService.setLocation(configuration.getAuthorityURL() + "/query");
            aaDescr.getAttributeServices().add(attrService);

            for (String nIdFormat : schemaManager.getSupportedNameIDFormats()) {
                NameIDFormat nidFormat = SAML2ObjectBuilder.buildNameIDFormat();
                nidFormat.setFormat(nIdFormat);
                aaDescr.getNameIDFormats().add(nidFormat);
            }

            for (String prof : schemaManager.getSupportedAttributeProfiles()) {
                AttributeProfile attrProfile = SAML2ObjectBuilder.buildAttributeProfile();
                attrProfile.setProfileURI(prof);
                aaDescr.getAttributeProfiles().add(attrProfile);
            }

            for (AttributeNameInterface name : dataSource.getAttributeNames()) {
                Attribute nameAttr = SAML2ObjectBuilder.buildAttribute();
                nameAttr.setName(name.getNameId());
                nameAttr.setNameFormat(name.getNameFormat());
                nameAttr.setFriendlyName(name.getFriendlyName());
                aaDescr.getAttributes().add(nameAttr);
            }

            KeyDescriptor keyDescr = SAML2ObjectBuilder.buildKeyDescriptor();
            keyDescr.setKeyInfo(SignUtils.buildKeyInfo(srvCert));
            aaDescr.getKeyDescriptors().add(keyDescr);
            /*
             * TODO missing encryptionMethods and use
             */

            SignUtils.signObject(entDescr);

            DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            Document rootElement = docBuilder.newDocument();
            Marshaller marshaller = SAML2ObjectBuilder.getMarshaller(entDescr);
            marshaller.marshall(entDescr, rootElement);
            DOMImplementationLS lsImpl = (DOMImplementationLS) rootElement.getImplementation();
            LSSerializer domSerializer = lsImpl.createLSSerializer();
            LSOutput lsOutput = lsImpl.createLSOutput();
            lsOutput.setEncoding("UTF-8");
            StringWriter xmlWriter = new StringWriter();
            lsOutput.setCharacterStream(xmlWriter);
            domSerializer.write(rootElement, lsOutput);
            String payload = xmlWriter.toString();

            Map<String, String> httpHeaders = new HashMap<String, String>();
            httpHeaders.put(SCIMConstants.CONTENT_TYPE_HEADER, SCIMConstants.TEXT_XML);
            result = SCIMProtocolCodec.buildResponse(SCIMConstants.CODE_OK, httpHeaders, payload);

        } catch (Exception ex) {
            /*
             * TODO verify output format change error message in response
             */
            logger.log(Level.SEVERE, ex.getMessage(), ex);
            result = SCIMProtocolCodec.buildResponse(SCIMConstants.CODE_INTERNAL_SERVER_ERROR, null, null);
        }

        return result;
    }
}


text:
class WelcomeController < ApplicationController
  before_action :authenticate_admin!, only: [:catan]
  def index
  end

  def catan
  end
end


text:
@import UIKit;

@interface TDViewController : TDBaseViewController
- (IBAction)changeView:(id)sender;
- (IBAction)showPickerDate:(id)sender;

@end


text:
Below contains a summary of notable changes and deploy date for each release.
####v2.6.1 (July 31, 2020)
- Addition of status and notes columns, with tooltips, for greater transparency

####v2.6 (June 10, 2020)
- rather significant release, making the entire reference data area as accessible as possible by not requiring a login

####v2.5.1 (July 2, 2019)
- several bug fixes related to biochemistry visualization and search

####v2.5 (June 6, 2019)
- Major upgrade to biochemistry data and visualization

####v2.4 (Nov 12, 2018)
- Fixed visualization of gapfilling results, they now can be seen in the Model reactions table

####v2.3 (Sep 23, 2018)
- Fixed and restyled media choices when building a microbial model from file

####v2.2 (Aug 15, 2018)
- Revamped Biochemistry tables including aliases and synonyms to search
- Improved "Reconstruct Model" behaviour for plant models
- Stylistic modifications and visual/search bugfixes for FBA and Gene tables

####v2.1 (Jan 2, 2018)
- Minor stylistic modifications for major release
- Moved "Build Model" to main toolbar
- Improved media selection for Model Construction

####v2.0 (Nov 3, 2017)
- Major refactor of ModelSEED.org interface and functionality

####vBeta-1.5.0 (Aug 4, 2016)
- Plants: tFBA, annotation, genome view, etc.

####vBeta-1.3.3 (July 15, 2016)
- Enable plants portion of app (pending service updates).
- Enable plant upload (pending service updates).

####vBeta-1.3.1 (March 3, 2016)
- Add permalink compound and reaction pages.
e.g.,
cpd00001 and
rxn00001
- Add Fusions project
- Stylistic fixes

####vBeta-1.3 (Feb 2, 2016)
- Beta (early preview) version announced via email

####vAlpha-1.2.1 (Nov 30, 2015)
- Allow reconstruction from previously annotated genomes

####vAlpha-1.2.0 (Oct 26, 2015)
- Start public portion of site (researchers, publications, etc)
- Force login

####vAlpha-1.1.4 (Oct 8, 2015)
- URLs no longer require hashes

####vAlpha-1.1.3
- Temp fix for queries with spaces against public genome table
- Change columns in public genome table

####vAlpha-1.1.2
- Don't allow table for old model objects to avoid confusion in comparison of gapfilled data
- Fix |flux| button (default for heatmap)

####vAlpha-1.1.1
- Update model list after reconstruct
- Add gapfill data to model

####vAlpha-1.1.0
- Add media editor
- Add 'create new media' option
- Add delete, rename, 'can not overwrite' error message on media section
- Add ability to select custom media for reconstruct/fba/gapfilling
- Preserve last selected tab state on main pages
- Add gapfill page

####vAlpha-1.0.0 (September 1, 2015)
- Add comparison tools
- Remove sidebar
- Add hover-over main toolbar dropdown menus
- Add "About ModelSEED" page


text:
using System.IO;
using GaDotNet.Common.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Web;
using GaDotNet.Common.Data;

namespace GaDotNet.Tests
{

    ///
    ///This is a test class for RequestFactoryTest and is intended
    ///to contain all RequestFactoryTest Unit Tests
    ///
	[TestClass()]
	public class RequestFactoryTest
	{

		private TestContext testContextInstance;

		///
		///Gets or sets the test context which provides
		///information about and functionality for the current test run.
		///
		public TestContext TestContext
		{
			get
			{
				return testContextInstance;
			}
			set
			{
				testContextInstance = value;
			}
		}

		#region Additional test attributes
		//
		//You can use the following additional attributes as you write your tests:
		//
		//Use ClassInitialize to run code before running the first test in the class
		//[ClassInitialize()]
		//public static void MyClassInitialize(TestContext testContext)
		//{
		//}
		//
		//Use ClassCleanup to run code after all tests in a class have run
		//[ClassCleanup()]
		//public static void MyClassCleanup()
		//{
		//}
		//
		//Use TestInitialize to run code before running each test
		//[TestInitialize()]
		//public void MyTestInitialize()
		//{
		//}
		//
		//Use TestCleanup to run code after each test has run
		//[TestCleanup()]
		//public void MyTestCleanup()
		//{
		//}
		//
		#endregion

		///
		/// A test for BuildRequest from a web context
		///
		[TestMethod()]
		public void BuildRequest_From_HttpContext()
		{

			//build fake context with fake request
			string queryString = "pagetitle=My%20Page%20Title&domain=mydomain.com&url=/test.aspx";
			HttpRequest request = new HttpRequest("/tracker.asmx", "http://localhost/tracker.asmx", queryString);
			StringWriter sw = new StringWriter();
			HttpResponse response = new HttpResponse(sw);
			HttpContext context = new HttpContext(request, response);

			TrackingRequest actual = new RequestFactory().BuildRequest(context);

			Assert.AreEqual(actual.PageDomain, "mydomain.com");
			Assert.AreEqual(actual.PageUrl, "/test.aspx");
			Assert.AreEqual(actual.PageTitle, "My Page Title");
		}

		///
		///A test for BuildRequest
		///
		[TestMethod()]
		public void BuildRequest_From_Google_Transaction()
		{
			GoogleTransaction googleTransaction = new GoogleTransaction();
			googleTransaction.Affiliation = "Affiliation";

			TrackingRequest actual = new RequestFactory().BuildRequest(googleTransaction);

			Assert.AreEqual(actual.TrackingTransaction, googleTransaction);
		}

		///
		///A test for BuildRequest from a Google PageView
		///
		[TestMethod()]
		public void BuildRequest_From_Google_PageView()
		{
			GooglePageView pageView = new GooglePageView("My Page Title","mydomain.com","/test.aspx");
			TrackingRequest actual = new RequestFactory().BuildRequest(pageView);

			Assert.AreEqual(actual.PageDomain, "mydomain.com");
			Assert.AreEqual(actual.PageUrl, "/test.aspx");
			Assert.AreEqual(actual.PageTitle, "My Page Title");
		}

		///
		///A test for BuildRequest
		///
		[TestMethod()]
		public void BuildRequest_From_Google_Event()
		{
			GoogleEvent googleEvent = new GoogleEvent("mydomain.com","My Category","My Action", "My Label", 100);
			TrackingRequest actual = new RequestFactory().BuildRequest(googleEvent);

			Assert.AreEqual(actual.TrackingEvent, googleEvent);
		}
	}
}


text:
import StringInput from './string-input';

export default class extends StringInput {
  type = 'tel';
}


text:
:: Setup PATH environment variable for use in chocolety installs
:: PATH being saved in windows temp folder between provisioners
<nul set /p ".=;C:\Chocolatey\bin" >> C:\Windows\Temp\PATH
set /p PATH=<C:\Windows\Temp\PATH
setx PATH "%PATH%" /m

:: Setup environment variables needed for pacakge install
setx ChocolateyInstall "%SYSTEMDRIVE%\Chocolatey" /m
set ChocolateyInstall=%SYSTEMDRIVE%\Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Environment]::SetEnvironmentVariable('ChocolateyInstall', '%SYSTEMDRIVE%\Chocolatey', [System.EnvironmentVariableTarget]::User)"

:: Install chocolatey packages
cmd /c chocolatey install 7zip -Version 9.22.01.20130618
cmd /c chocolatey install mingw-get -Version 1.0.2
cmd /c chocolatey install chef-client -Version 11.12.4.1
cmd /c chocolatey install ruby1.9 -Version 1.9.3.54500
cmd /c chocolatey install ruby.devkit -Version 4.5.2.20111231
cmd /c chocolatey install nodejs.install -Version 0.10.28
cmd /c chocolatey install git.install -Version 1.9.0.20140303
cmd /c chocolatey install UrlRewrite -Version 2.0.2
cmd /c chocolatey install VisualStudio2012Professional -Version 11.0.1
cmd /c chocolatey install VisualStudio2013Professional -Version 12.0.21005.20140406 -InstallArguments "/Features:'WebTools SQL' /ProductKey:BBJ4B-WBV7Q-DFHJG-G97DD-GXXKR"

:: Install rsync via mingw-get
cmd /c %SYSTEMDRIVE%\MinGW\bin\mingw-get.exe install msys-rsync

:: Create npm module folder for vagrant user
mkdir %USERPROFILE%\AppData\Roaming\npm

:: Ensure PATH
powershell -NoProfile -ExecutionPolicy Bypass -File "A:\ensure-path.ps1"