text:
package org.opencds.vmr.v1_0.internal;

import org.opencds.vmr.v1_0.internal.datatypes.BL;
import org.opencds.vmr.v1_0.internal.datatypes.CD;
import org.opencds.vmr.v1_0.internal.datatypes.IVLPQ;

/**
 * Abstract base class for giving a material of a particular constitution to a person to enable a clinical effect.
 */

public abstract class SubstanceAdministrationBase extends ClinicalStatement {

    protected CD substanceAdministrationGeneralPurpose;
    protected AdministrableSubstance substance;
    protected CD deliveryMethod;
    protected IVLPQ doseQuantity;
    protected CD deliveryRoute;
    protected BodySite approachBodySite;
    protected BodySite targetBodySite;
    protected IVLPQ dosingPeriod;
    protected BL dosingPeriodIntervalIsImportant;
    protected IVLPQ deliveryRate;
    protected CD doseType;

    /**
     * Gets the value of the substanceAdministrationGeneralPurpose property.
     *
     * @return
     *     possible object is
     *     {@link CD }
     *
     */
    public CD getSubstanceAdministrationGeneralPurpose() {
        return substanceAdministrationGeneralPurpose;
    }

    /**
     * Sets the value of the substanceAdministrationGeneralPurpose property.
     *
     * @param value
     *     allowed object is
     *     {@link CD }
     *
     */
    public void setSubstanceAdministrationGeneralPurpose(CD value) {
        this.substanceAdministrationGeneralPurpose = value;
    }

    /**
     * Gets the value of the substance property.
     *
     * @return
     *     possible object is
     *     {@link AdministrableSubstance }
     *
     */
    public AdministrableSubstance getSubstance() {
        return substance;
    }

    /**
     * Sets the value of the substance property.
     *
     * @param value
     *     allowed object is
     *     {@link AdministrableSubstance }
     *
     */
    public void setSubstance(AdministrableSubstance value) {
        this.substance = value;
    }

    /**
     * Gets the value of the deliveryMethod property.
     *
     * @return
     *     possible object is
     *     {@link CD }
     *
     */
    public CD getDeliveryMethod() {
        return deliveryMethod;
    }

    /**
     * Sets the value of the deliveryMethod property.
     *
     * @param value
     *     allowed object is
     *     {@link CD }
     *
     */
    public void setDeliveryMethod(CD value) {
        this.deliveryMethod = value;
    }

    /**
     * Gets the value of the doseQuantity property.
     *
     * @return
     *     possible object is
     *     {@link IVLPQ }
     *
     */
    public IVLPQ getDoseQuantity() {
        return doseQuantity;
    }

    /**
     * Sets the value of the doseQuantity property.
     *
     * @param value
     *     allowed object is
     *     {@link IVLPQ }
     *
     */
    public void setDoseQuantity(IVLPQ value) {
        this.doseQuantity = value;
    }

    /**
     * Gets the value of the deliveryRoute property.
     *
     * @return
     *     possible object is
     *     {@link CD }
     *
     */
    public CD getDeliveryRoute() {
        return deliveryRoute;
    }

    /**
     * Sets the value of the deliveryRoute property.
     *
     * @param value
     *     allowed object is
     *     {@link CD }
     *
     */
    public void setDeliveryRoute(CD value) {
        this.deliveryRoute = value;
    }

    /**
     * Gets the value of the approachBodySite property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public BodySite getApproachBodySite() {
        return approachBodySite;
    }

    /**
     * Sets the value of the approachBodySite property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setApproachBodySite(BodySite value) {
        this.approachBodySite = value;
    }

    /**
     * Gets the value of the targetBodySite property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public BodySite getTargetBodySite() {
        return targetBodySite;
    }

    /**
     * Sets the value of the targetBodySite property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTargetBodySite(BodySite value) {
        this.targetBodySite = value;
    }

    /**
     * Gets the value of the dosingPeriod property.
     *
     * @return
     *     possible object is
     *     {@link IVLPQ }
     *
     */
    public IVLPQ getDosingPeriod() {
        return dosingPeriod;
    }

    /**
     * Sets the value of the dosingPeriod property.
     *
     * @param value
     *     allowed object is
     *     {@link IVLPQ }
     *
     */
    public void setDosingPeriod(IVLPQ value) {
        this.dosingPeriod = value;
    }

    /**
     * Gets the value of the dosingPeriodIntervalIsImportant property.
     *
     * @return
     *     possible object is
     *     {@link BL }
     *
     */
    public BL getDosingPeriodIntervalIsImportant() {
        return dosingPeriodIntervalIsImportant;
    }

    /**
     * Sets the value of the dosingPeriodIntervalIsImportant property.
     *
     * @param value
     *     allowed object is
     *     {@link BL }
     *
     */
    public void setDosingPeriodIntervalIsImportant(BL value) {
        this.dosingPeriodIntervalIsImportant = value;
    }

    /**
     * Gets the value of the deliveryRate property.
     *
     * @return
     *     possible object is
     *     {@link IVLPQ }
     *
     */
    public IVLPQ getDeliveryRate() {
        return deliveryRate;
    }

    /**
     * Sets the value of the deliveryRate property.
     *
     * @param value
     *     allowed object is
     *     {@link IVLPQ }
     *
     */
    public void setDeliveryRate(IVLPQ value) {
        this.deliveryRate = value;
    }

    /**
     * Gets the value of the doseType property.
     *
     * @return
     *     possible object is
     *     {@link CD }
     *
     */
    public CD getDoseType() {
        return doseType;
    }

    /**
     * Sets the value of the doseType property.
     *
     * @param value
     *     allowed object is
     *     {@link CD }
     *
     */
    public void setDoseType(CD value) {
        this.doseType = value;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime
				* result
				+ ((approachBodySite == null) ? 0 : approachBodySite.hashCode());
		result = prime * result
				+ ((deliveryMethod == null) ? 0 : deliveryMethod.hashCode());
		result = prime * result
				+ ((deliveryRate == null) ? 0 : deliveryRate.hashCode());
		result = prime * result
				+ ((deliveryRoute == null) ? 0 : deliveryRoute.hashCode());
		result = prime * result
				+ ((doseQuantity == null) ? 0 : doseQuantity.hashCode());
		result = prime * result
				+ ((dosingPeriod == null) ? 0 : dosingPeriod.hashCode());
		result = prime
				* result
				+ ((dosingPeriodIntervalIsImportant == null) ? 0
						: dosingPeriodIntervalIsImportant.hashCode());
		result = prime * result
				+ ((substance == null) ? 0 : substance.hashCode());
		result = prime
				* result
				+ ((substanceAdministrationGeneralPurpose == null) ? 0
						: substanceAdministrationGeneralPurpose.hashCode());
		result = prime * result
				+ ((targetBodySite == null) ? 0 : targetBodySite.hashCode());
		result = prime * result
				+ ((doseType == null) ? 0 : doseType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		SubstanceAdministrationBase other = (SubstanceAdministrationBase) obj;
		if (approachBodySite == null) {
			if (other.approachBodySite != null)
				return false;
		} else if (!approachBodySite.equals(other.approachBodySite))
			return false;
		if (deliveryMethod == null) {
			if (other.deliveryMethod != null)
				return false;
		} else if (!deliveryMethod.equals(other.deliveryMethod))
			return false;
		if (deliveryRate == null) {
			if (other.deliveryRate != null)
				return false;
		} else if (!deliveryRate.equals(other.deliveryRate))
			return false;
		if (deliveryRoute == null) {
			if (other.deliveryRoute != null)
				return false;
		} else if (!deliveryRoute.equals(other.deliveryRoute))
			return false;
		if (doseQuantity == null) {
			if (other.doseQuantity != null)
				return false;
		} else if (!doseQuantity.equals(other.doseQuantity))
			return false;
		if (dosingPeriod == null) {
			if (other.dosingPeriod != null)
				return false;
		} else if (!dosingPeriod.equals(other.dosingPeriod))
			return false;
		if (dosingPeriodIntervalIsImportant == null) {
			if (other.dosingPeriodIntervalIsImportant != null)
				return false;
		} else if (!dosingPeriodIntervalIsImportant
				.equals(other.dosingPeriodIntervalIsImportant))
			return false;
		if (substance == null) {
			if (other.substance != null)
				return false;
		} else if (!substance.equals(other.substance))
			return false;
		if (substanceAdministrationGeneralPurpose == null) {
			if (other.substanceAdministrationGeneralPurpose != null)
				return false;
		} else if (!substanceAdministrationGeneralPurpose
				.equals(other.substanceAdministrationGeneralPurpose))
			return false;
		if (targetBodySite == null) {
			if (other.targetBodySite != null)
				return false;
		} else if (!targetBodySite.equals(other.targetBodySite))
			return false;
		if (doseType == null) {
			if (other.doseType != null)
				return false;
		} else if (!doseType.equals(other.doseType))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return super.toString()
				+ ", SubstanceAdministrationBase [substanceAdministrationGeneralPurpose="
				+ substanceAdministrationGeneralPurpose
				+ ", substance="
				+ substance
				+ ", deliveryMethod="
				+ deliveryMethod
				+ ", doseQuantity="
				+ doseQuantity
				+ ", deliveryRoute="
				+ deliveryRoute
				+ ", approachBodySite="
				+ approachBodySite
				+ ", targetBodySite="
				+ targetBodySite
				+ ", dosingPeriod="
				+ dosingPeriod
				+ ", dosingPeriodIntervalIsImportant="
				+ dosingPeriodIntervalIsImportant
				+ ", deliveryRate="
				+ deliveryRate
				+ ", doseType="
				+ doseType
				+ "]";
	}

}


text:
#include <aws/network-firewall/model/ListRuleGroupsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

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

ListRuleGroupsRequest::ListRuleGroupsRequest() :
    m_nextTokenHasBeenSet(false),
    m_maxResults(0),
    m_maxResultsHasBeenSet(false)
{
}

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

  if(m_nextTokenHasBeenSet)
  {
   payload.WithString("NextToken", m_nextToken);

  }

  if(m_maxResultsHasBeenSet)
  {
   payload.WithInteger("MaxResults", m_maxResults);

  }

  return payload.View().WriteReadable();
}

Aws::Http::HeaderValueCollection ListRuleGroupsRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "NetworkFirewall_20201112.ListRuleGroups"));
  return headers;

}

redpajama_set_name: RedPajamaGithub


text:
package com.google.api.ads.dfp.jaxws.v201411;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for ComputedStatus.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="ComputedStatus">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="DELIVERY_EXTENDED"/>
 *     <enumeration value="DELIVERING"/>
 *     <enumeration value="READY"/>
 *     <enumeration value="PAUSED"/>
 *     <enumeration value="INACTIVE"/>
 *     <enumeration value="PAUSED_INVENTORY_RELEASED"/>
 *     <enumeration value="PENDING_APPROVAL"/>
 *     <enumeration value="COMPLETED"/>
 *     <enumeration value="DISAPPROVED"/>
 *     <enumeration value="DRAFT"/>
 *     <enumeration value="CANCELED"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "ComputedStatus")
@XmlEnum
public enum ComputedStatus {

    /**
     *
     *                 The {@link LineItem} has past its {@link LineItem#endDateTime} with an auto extension, but
     *                 hasn't met its goal.
     *
     *
     */
    DELIVERY_EXTENDED,

    /**
     *
     *                 The {@link LineItem} has begun serving.
     *
     *
     */
    DELIVERING,

    /**
     *
     *                 The {@link LineItem} has been activated and is ready to serve.
     *
     *
     */
    READY,

    /**
     *
     *                 The {@link LineItem} has been paused from serving.
     *
     *
     */
    PAUSED,

    /**
     *
     *                 The {@link LineItem} is inactive. It is either caused by missing creatives or
     *                 the network disabling auto-activation.
     *
     *
     */
    INACTIVE,

    /**
     *
     *                 The {@link LineItem} has been paused and its reserved inventory has been
     *                 released. The {@code LineItem} will not serve.
     *
     *
     */
    PAUSED_INVENTORY_RELEASED,

    /**
     *
     *                 The {@link LineItem} has been submitted for approval.
     *
     *
     */
    PENDING_APPROVAL,

    /**
     *
     *                 The {@link LineItem} has completed its run.
     *
     *
     */
    COMPLETED,

    /**
     *
     *                 The {@link LineItem} has been disapproved and is not eligible to serve.
     *
     *
     */
    DISAPPROVED,

    /**
     *
     *                 The {@link LineItem} is still being drafted.
     *
     *
     */
    DRAFT,

    /**
     *
     *                 The {@link LineItem} has been canceled and is no longer eligible to serve.
     *                 This is a legacy status imported from Google Ad Manager orders.
     *
     *
     */
    CANCELED;

    public String value() {
        return name();
    }

    public static ComputedStatus fromValue(String v) {
        return valueOf(v);
    }

}


text:
package org.springframework.security.authentication.jaas;

import org.springframework.security.core.Authentication;

import java.io.IOException;

import javax.security.auth.callback.Callback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;

/**
 * The most basic Callbacks to be handled when using a LoginContext from JAAS, are the
 * NameCallback and PasswordCallback. Spring Security provides the
 * JaasPasswordCallbackHandler specifically tailored to handling the PasswordCallback.

 *
 * @author Ray Krueger
 *
 * @see Callback
 * @see
 * PasswordCallback
 */
public class JaasPasswordCallbackHandler implements JaasAuthenticationCallbackHandler {
	// ~ Methods
	// ========================================================================================================

	/**
	 * If the callback passed to the 'handle' method is an instance of PasswordCallback,
	 * the JaasPasswordCallbackHandler will call,
	 * callback.setPassword(authentication.getCredentials().toString()).
	 *
	 * @param callback
	 * @param auth
	 *
	 * @throws IOException
	 * @throws UnsupportedCallbackException
	 */
	public void handle(Callback callback, Authentication auth) throws IOException,
			UnsupportedCallbackException {
		if (callback instanceof PasswordCallback) {
			PasswordCallback pc = (PasswordCallback) callback;
			pc.setPassword(auth.getCredentials().toString().toCharArray());
		}
	}
}


text:
package com.cloudbees.groovy.cps.impl;

import com.cloudbees.groovy.cps.Block;
import com.cloudbees.groovy.cps.Continuation;
import com.cloudbees.groovy.cps.Env;
import com.cloudbees.groovy.cps.Next;

/**
 * "continue" statement to repeat a loop.
 *
 * @author Kohsuke Kawaguchi
 */
public class ContinueBlock implements Block {
    private final String label;

    public ContinueBlock(String label) {
        this.label = label;
    }

    public Next eval(Env e, Continuation k) {
        return e.getContinueAddress(label).receive(null);
    }

    public static final ContinueBlock INSTANCE = new ContinueBlock(null);

    private static final long serialVersionUID = 1L;
}


text:
package com.mongodb;

import com.mongodb.util.JSON;
import org.bson.BasicBSONObject;
import org.bson.types.ObjectId;
import org.junit.Test;

import java.util.Date;

import static java.util.Arrays.asList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

public class BasicDBObjectTest {

    @Test
    public void testGetDate() {
        final Date date = new Date();
        BasicDBObject doc = new BasicDBObject("foo", date);
        assertTrue(doc.getDate("foo").equals(date));
    }

    @Test
    public void testGetDateWithDefault() {
        final Date date = new Date();
        BasicDBObject doc = new BasicDBObject("foo", date);
        assertTrue(doc.getDate("foo", new Date()).equals(date));
        assertTrue(doc.getDate("bar", date).equals(date));
    }

    @Test
    public void testGetObjectId() {
        final ObjectId objId = ObjectId.get();
        BasicDBObject doc = new BasicDBObject("foo", objId);
        assertTrue(doc.getObjectId("foo").equals(objId));
    }

    @Test
    public void testGetObjectIdWithDefault() {
        final ObjectId objId = ObjectId.get();
        BasicDBObject doc = new BasicDBObject("foo", objId);
        assertTrue(doc.getObjectId("foo", ObjectId.get()).equals(objId));
        assertTrue(doc.getObjectId("bar", objId).equals(objId));
    }

    @Test
    public void testGetLongWithDefault() {
        final long test = 100;
        BasicDBObject doc = new BasicDBObject("foo", test);
        assertTrue(doc.getLong("foo", 0L) == test);
        assertTrue(doc.getLong("bar", 0L) == 0L);
    }

    @Test
    public void testGetDoubleWithDefault() {
        BasicDBObject doc = new BasicDBObject("foo", Double.MAX_VALUE);
        assertTrue(doc.getDouble("foo", (double) 0) == Double.MAX_VALUE);
        assertTrue(doc.getDouble("bar", Double.MIN_VALUE) == Double.MIN_VALUE);
    }

    @Test
    public void testGetStringWithDefault() {
        BasicDBObject doc = new BasicDBObject("foo", "badmf");
        assertTrue(doc.getString("foo", "ID").equals("badmf"));
        assertTrue(doc.getString("bar", "DEFAULT").equals("DEFAULT"));
    }

    @Test
    public void testBuilderIsEmpty() {
        BasicDBObjectBuilder b = BasicDBObjectBuilder.start();
        assertTrue(b.isEmpty());
        b.append("a", 1);
        assertFalse(b.isEmpty());
        assertEquals(b.get(), new BasicDBObject("a", 1));
    }

    @Test
    public void testBuilderNested() {
        BasicDBObjectBuilder b = BasicDBObjectBuilder.start();
        b.add("a", 1);
        b.push("b").append("c", 2).pop();
        DBObject a = b.get();
        assertEquals(a, JSON.parse("{ 'a' : 1, 'b' : { 'c' : 2 } }"));
    }

    @Test
    public void testDown1() {
        BasicDBObjectBuilder b = BasicDBObjectBuilder.start();
        b.append("x", 1);
        b.push("y");
        b.append("a", 2);
        b.pop();
        b.push("z");
        b.append("b", 3);

        assertEquals(b.get(), JSON.parse("{ 'x' : 1 , 'y' : { 'a' : 2 } , 'z' : { 'b' : 3 } }"));
    }

    @Test
    public void testEqualsAndHashCode() {
        assertNotEquals(new BasicDBObject(), new Object());

        assertEquality(new BasicDBObject(), new BasicDBObject());

        assertEquality(new BasicDBObject("x", 1), new BasicDBObject("x", 1));

        assertEquality(new BasicBSONObject("x", 1), new BasicDBObject("x", 1));

        assertInequality(new BasicDBObject("x", 1), new BasicDBObject("x", 2));

        assertInequality(new BasicDBObject("x", 1), new BasicDBObject("y", 1));

        assertEquality(new BasicDBObject("x", asList(1, 2, 3)), new BasicDBObject("x", new int[]{1, 2, 3}));

        BasicDBList list = new BasicDBList();
        list.put(0, 1);
        list.put(1, 2);
        list.put(2, 3);

        assertEquality(new BasicDBObject("x", asList(1, 2, 3)), new BasicDBObject("x", list));

        assertEquality(new BasicDBObject("x", 1).append("y", 2), new BasicDBObject("y", 2).append("x", 1));

        assertEquality(new BasicDBObject("a", new BasicDBObject("y", 2).append("x", 1)),
                       new BasicDBObject("a", new BasicDBObject("x", 1).append("y", 2)));
    }

    void assertEquality(final BasicBSONObject x, final BasicBSONObject y) {
        assertEquals(x, y);
        assertEquals(y, x);
        assertEquals(x.hashCode(), y.hashCode());
    }

    void assertInequality(final BasicBSONObject x, final BasicBSONObject y) {
        assertNotEquals(x, y);
        assertNotEquals(y, x);
        assertNotEquals(x.hashCode(), y.hashCode());
    }
}


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE hyphenation-info SYSTEM "hyphenation.dtd">
<!--

Hyphenation patterns for the Irish language

MIT License (https://opensource.org/licenses/MIT):

Copyright (c) 2004-2015 Kevin P. Scannell <kscanne at gmail dot com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

For detailed remarks on the method of construction,
see my web page:
   http://borel.slu.edu/fleiscin/index.html

The original TeX file `gahyph.tex' from which these patterns are taken
is available from CTAN:

http://www.ctan.org/tex-archive/language/hyphenation/

or directly from the author.
-->

<hyphenation-info>

<hyphen-char value="-"/>
<hyphen-min before="2" after="2"/>

<classes>
<!-- @!$%^&*()_-+=~`{[}]:;'|<,.>?/0123456789 -->
aA
bB
cC
dD
eE
fF
gG
hH
iI
jJ
kK
lL
mM
nN
oO
pP
qQ
rR
sS
tT
uU
vV
wW
xX
yY
zZ
áÁ
éÉ
íÍ
óÓ
úÚ
</classes>

<exceptions>
</exceptions>

<patterns>
</patterns>
</hyphenation-info>


text:
var fs = require('fs');

var walk = function(dir) {
  var results = [];
  var list = fs.readdirSync(dir);
  list.forEach(function(file) {
    file = dir + '/' + file;
    var stat = fs.statSync(file);
    if (stat && stat.isDirectory()) results = results.concat(walk(file));
    else results.push(file);
  });
  return results;
};

module.exports = walk;


text:
import React, { PropTypes as T } from 'react'
import { Row, Col } from 'reactstrap'

export default class ListWrapper extends React.Component {

  static propTypes = {
    containerClasses: T.string
  }

  static defaultProps = {
    containerClasses: 'my-3',
  }

  render () {
    const { children, containerClasses } = this.props

    return (
      <Row className={ containerClasses }>
        <Col xs={12}>
          { children }
        </Col>
      </Row>
    )
  }
}


text:
Ionic Contrib: Swoosh Cards
===================

This is an extension of ...

- [Tinder Cards](https://github.com/driftyco/ionic-ion-tinder-cards)
- [Swipe Cards](https://github.com/driftyco/ionic-ion-swipe-cards)
- [Tinder Cards 2](https://github.com/loringdodge/ionic-ion-tinder-cards-2)

...and is reminiscent of the cards found in the National Geographic app.
No partial swiping is permitted and cards swoosh away on discard (click).

[Demo](http://codepen.io/loringdodge/pen/ZGvMxE)

![Screenshot](screenshots/iphone.png)

## Install

1. Bower install instructions coming.
2. Include 'ionic.swoosh.cards.js' and 'ionic.swoosh.cards.css' in index.html.

## Usage

```html
<div ng-if="cards.active">
  <swoosh-cards spacing="30">
    <swoosh-card ng-repeat="card in cards.active" on-destroy="cardDestroyed($index)">
      <div ng-controller="CardCtrl">
        <div class="top">
          <img ng-src="{{ card.image }}" />
        </div>
        <div class="bottom">
          <h1>{{ card.country }}</h1>
          <p>{{ card.text }}</p>
          <div class="discard" ng-click="discard(card)">DISCARD</div>
        </div>
      </div>
    </swoosh-card>
  </swoosh-cards>
</div>
```

To add new cards dynamically, just add them to the cards array:

## Directive Attributes

| Name                   | Scope  | Options    | Action                                                        |
|------------------------|--------|------------|---------------------------------------------------------------|
| `spacing`              | @      | Number     | Number of pixels between each card                            |


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.cosmos.generated;

import com.azure.core.util.Context;
import com.azure.resourcemanager.cosmos.models.NotebookWorkspaceName;

/** Samples for NotebookWorkspaces Delete. */
public final class NotebookWorkspacesDeleteSamples {
    /*
     * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2022-08-15/examples/CosmosDBNotebookWorkspaceDelete.json
     */
    /**
     * Sample code: CosmosDBNotebookWorkspaceDelete.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void cosmosDBNotebookWorkspaceDelete(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .cosmosDBAccounts()
            .manager()
            .serviceClient()
            .getNotebookWorkspaces()
            .delete("rg1", "ddb1", NotebookWorkspaceName.DEFAULT, Context.NONE);
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Class Hierarchy
</TITLE>

<META NAME="date" CONTENT="2013-03-03">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
      Use
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Hierarchy For All Packages

Package Hierarchies:
ketai.camera, ketai.cv.facedetector, ketai.data, ketai.net, ketai.net.bluetooth, ketai.net.nfc, ketai.net.nfc.record, ketai.net.wifidirect, ketai.sensors, ketai.ui

Class Hierarchy

java.lang.Object

android.content.BroadcastReceiver

ketai.net.wifidirect.KetaiWiFiDirect (implements android.net.wifi.p2p.WifiP2pManager.ActionListener, android.net.wifi.p2p.WifiP2pManager.ChannelListener, android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener, android.net.wifi.p2p.WifiP2pManager.PeerListListener)

android.hardware.Camera.Face

ketai.camera.KetaiFace

ketai.ui.KetaiAlertDialog
ketai.net.bluetooth.KetaiBluetooth
ketai.cv.facedetector.KetaiFaceDetector
ketai.ui.KetaiGesture (implements android.view.GestureDetector.OnDoubleTapListener, android.view.GestureDetector.OnGestureListener)

ketai.ui.KetaiKeyboard
ketai.sensors.KetaiLocation (implements android.location.LocationListener)

ketai.net.KetaiNet
ketai.net.nfc.KetaiNFC (implements android.nfc.NfcAdapter.CreateNdefMessageCallback, android.nfc.NfcAdapter.OnNdefPushCompleteCallback)

ketai.sensors.KetaiSensor (implements android.hardware.SensorEventListener)

ketai.cv.facedetector.KetaiSimpleFace
ketai.data.KetaiSQLite
ketai.ui.KetaiVibrate
android.location.Location (implements android.os.Parcelable)

ketai.sensors.Location

ketai.net.nfc.NdefMessageParser
oscP5.OscPatcher

oscP5.OscPacket

oscP5.OscMessage

ketai.net.KetaiOSCMessage

processing.core.PImage (implements java.lang.Cloneable, processing.core.PConstants)

ketai.camera.KetaiCamera

ketai.net.SLIPFrame
ketai.net.nfc.record.SmartPoster (implements ketai.net.nfc.record.ParsedNdefRecord)

ketai.net.nfc.record.TextRecord (implements ketai.net.nfc.record.ParsedNdefRecord)

java.lang.Thread (implements java.lang.Runnable)

ketai.net.bluetooth.KBluetoothConnection
ketai.net.bluetooth.KBluetoothListener

ketai.net.nfc.record.UriRecord (implements ketai.net.nfc.record.ParsedNdefRecord)

android.view.View (implements android.view.accessibility.AccessibilityEventSource, android.graphics.drawable.Drawable.Callback, android.view.KeyEvent.Callback)

android.view.ViewGroup (implements android.view.ViewManager, android.view.ViewParent)

android.widget.AdapterView<T>

android.widget.AbsListView (implements android.widget.Filter.FilterListener, android.text.TextWatcher, android.view.ViewTreeObserver.OnGlobalLayoutListener, android.view.ViewTreeObserver.OnTouchModeChangeListener)

android.widget.ListView

ketai.ui.KetaiList

Interface Hierarchy

ketai.net.nfc.record.ParsedNdefRecord

      Overview
      Package
      Class
      Use
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
package richardludev.utilities.matrices;

import org.junit.Assert;
import org.junit.Test;

public class Vector2DTest {

    private static double x1 = 10, y1 = 20, x2 = 30, y2 = 40;

    @Test
    public void constructor_default() {
        Vector2D output = new Vector2D();

        Assert.assertEquals("Unexpected x value.", 0, output.getX(), 0);
        Assert.assertEquals("Unexpected y value.", 0, output.getY(), 0);
    }

    @Test
    public void constructor_validData() {
        Vector2D output = new Vector2D(x1, y1);

        Assert.assertEquals("Unexpected x value.", x1, output.getX(), 0);
        Assert.assertEquals("Unexpected y value.", y1, output.getY(), 0);
    }

    @Test
    public void equals_false(){
        Vector2D vector1 = new Vector2D(x1, y1);
        Vector2D vector2 = new Vector2D(x2, y2);

        Assert.assertFalse(vector1.equals(vector2));
    }

    @Test
    public void equals_true(){
        Vector2D vector1 = new Vector2D(x1, y1);
        Vector2D vector2 = new Vector2D(x1, y1);

        Assert.assertTrue(vector1.equals(vector2));
    }

    @Test
    public void add_twoVectors() {
        Vector2D vector1 = new Vector2D(x1, y1);
        Vector2D vector2 = new Vector2D(x2, y2);

        Vector2D output = vector1.add(vector2);

        Vector2D expected = new Vector2D(x1+x2, y1+y2);
        Assert.assertEquals(expected, output);
    }

    @Test
    public void subtract_largeBySmall() {
        Vector2D vector1 = new Vector2D(x1, y1);
        Vector2D vector2 = new Vector2D(x2, y2);

        Vector2D output = vector2.subtract(vector1);

        Vector2D expected = new Vector2D(x2-x1, y2-y1);
        Assert.assertEquals(expected, output);
    }

    @Test
    public void subtract_smallByLarge() {
        Vector2D vector1 = new Vector2D(x1, y1);
        Vector2D vector2 = new Vector2D(x2, y2);

        Vector2D output = vector1.subtract(vector2);

        Vector2D expected = new Vector2D(x1-x2, y1-y2);
        Assert.assertEquals(expected, output);
    }
}


text:
require 'puppet'
require 'spec_helper'
require 'puppet/provider/neutron_router_interface/neutron'

provider_class = Puppet::Type.type(:neutron_router_interface).
  provider(:neutron)

describe provider_class do

  let :interface_attrs do
    {
      :name            => 'router:subnet',
      :ensure          => 'present',
    }
  end

  describe 'when accessing attributes of an interface' do
    let :resource do
      Puppet::Type::Neutron_router_interface.new(interface_attrs)
    end

    let :provider do
      provider_class.new(resource)
    end

    it 'should return the correct router name' do
      provider.router_name.should eql('router')
    end

    it 'should return the correct subnet name' do
      provider.subnet_name.should eql('subnet')
    end

  end

end


text:
package ninja.egg82.bungeecord.messaging;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.util.List;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

import com.google.common.util.concurrent.ThreadFactoryBuilder;

import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.event.PluginMessageEvent;
import net.md_5.bungee.api.plugin.Plugin;
import ninja.egg82.analytics.exceptions.IExceptionHandler;
import ninja.egg82.bungeecord.core.BungeeMessageSender;
import ninja.egg82.bungeecord.enums.BungeeMessageHandlerType;
import ninja.egg82.concurrent.DynamicConcurrentDeque;
import ninja.egg82.concurrent.IConcurrentDeque;
import ninja.egg82.patterns.ServiceLocator;
import ninja.egg82.patterns.tuples.Unit;
import ninja.egg82.plugin.enums.MessageHandlerType;
import ninja.egg82.plugin.enums.SenderType;
import ninja.egg82.plugin.handlers.async.AsyncMessageHandler;
import ninja.egg82.plugin.messaging.IMessageHandler;
import ninja.egg82.plugin.utils.ChannelUtil;
import ninja.egg82.utils.CollectionUtil;
import ninja.egg82.utils.ReflectUtil;

public class EnhancedBungeeMessageHandler implements IMessageHandler {
    // vars

    // Channel names
    private IConcurrentDeque<String> channelNames = new DynamicConcurrentDeque<String>();
    // Actual server senders
    private IConcurrentDeque<BungeeMessageSender> servers = new DynamicConcurrentDeque<BungeeMessageSender>();
    // Map for storing handlers to run when a message is received
    private ConcurrentHashMap<Class<? extends AsyncMessageHandler>, Unit<AsyncMessageHandler>> handlers = new ConcurrentHashMap<Class<? extends AsyncMessageHandler>, Unit<AsyncMessageHandler>>();

    // Thread pool for message sending thread. The thread count for actually sending
    // messages should never exceed 1 for data consistency
    private ScheduledExecutorService threadPool = null;

    // The plugin using this code
    private Plugin plugin = ServiceLocator.getService(Plugin.class);
    // This server's sender ID, for replying directly to the server
    private volatile String senderId = null;
    // Name of the plugin for namespaced channels
    private String pluginName = null;

    // constructor
    public EnhancedBungeeMessageHandler(String pluginName, String senderId) {
        if (pluginName == null) {
            throw new IllegalArgumentException("pluginName cannot be null.");
        }
        if (senderId == null) {
            throw new IllegalArgumentException("senderId cannot be null.");
        }

        this.senderId = senderId;
        this.pluginName = pluginName.toLowerCase();

        threadPool = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder().setNameFormat(pluginName + "-EnhancedBungee-%d").build());
        threadPool.scheduleWithFixedDelay(onBacklogThread, 150L, 150L, TimeUnit.MILLISECONDS);

        if (plugin != null) {
            // Add all servers this Bungee knows about
            for (Entry<String, ServerInfo> kvp : plugin.getProxy().getServers().entrySet()) {
                for (BungeeMessageSender sender : servers) {
                    ServerInfo i = sender.getInfo();

                    if (kvp.getValue().getAddress().getAddress().getHostAddress().equals(i.getAddress().getAddress().getHostAddress())
                        && kvp.getValue().getAddress().getPort() == i.getAddress().getPort()) {
                        return;
                    }
                }

                servers.add(new BungeeMessageSender(kvp.getValue()));
            }
        }
    }

    // public
    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        if (senderId == null) {
            throw new IllegalArgumentException("senderId cannot be null.");
        }

        this.senderId = senderId;
    }

    public void createChannel(String channelName) {
        if (channelName == null) {
            throw new IllegalArgumentException("channelName cannot be null.");
        }

        if (channelNames.contains(channelName)) {
            // Channel already exists. No need to re-create it
            return;
        }

        try {
            // Register the channel
            plugin.getProxy().registerChannel(pluginName + ":" + channelName);
        } catch (Exception ex) {
            IExceptionHandler handler = ServiceLocator.getService(IExceptionHandler.class);
            if (handler != null) {
                handler.sendException(ex);
            }
            throw new RuntimeException("Cannot create channel.", ex);
        }

        channelNames.add(channelName);
    }

    public void destroyChannel(String channelName) {
        if (channelName == null) {
            throw new IllegalArgumentException("channelName cannot be null.");
        }

        if (!channelNames.remove(channelName)) {
            // Channel doesn't exist. No need to delete what isn't there
            return;
        }

        try {
            // Unregister the channel
            plugin.getProxy().unregisterChannel(pluginName + ":" + channelName);
        } catch (Exception ex) {
            IExceptionHandler handler = ServiceLocator.getService(IExceptionHandler.class);
            if (handler != null) {
                handler.sendException(ex);
            }
            throw new RuntimeException("Cannot destroy channel.", ex);
        }
    }

    public void sendToId(String senderId, String channelName, byte[] data) {
        if (channelName == null) {
            throw new IllegalArgumentException("channelName cannot be null.");
        }
        if (data == null) {
            throw new IllegalArgumentException("data cannot be null.");
        }

        if (!channelNames.contains(channelName)) {
            // Channel doesn't exist, throw an exception
            throw new RuntimeException("Channel \"" + channelName + "\" does not exist.");
        }

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(stream);

        try {
            out.writeByte(SenderType.PROXY.getType());
        } catch (Exception ex) {
            throw new RuntimeException("Could not write headers.");
        }
        if (!ChannelUtil.writeAll(out, senderId, senderId, data)) {
            throw new RuntimeException("Could not write headers.");
        }

        byte[] message = stream.toByteArray();

        for (BungeeMessageSender sender : servers) {
            sender.submit(pluginName + ":" + channelName, message);
        }

        // Submit a new send task
        threadPool.submit(onSendThread);
    }

    public void broadcastToProxies(String channelName, byte[] data) {
        if (channelName == null) {
            throw new IllegalArgumentException("channelName cannot be null.");
        }
        if (data == null) {
            throw new IllegalArgumentException("data cannot be null.");
        }

        if (!channelNames.contains(channelName)) {
            // Channel doesn't exist, throw an exception
            throw new RuntimeException("Channel \"" + channelName + "\" does not exist.");
        }

        Exception lastEx = null;
        // Iterate handlers and fire them
        for (Entry<Class<? extends AsyncMessageHandler>, Unit<AsyncMessageHandler>> kvp : handlers.entrySet()) {
            AsyncMessageHandler c = null;

            // Lazy initialize
            if (kvp.getValue().getType() == null) {
                c = createHandler(kvp.getKey());
                kvp.getValue().setType(c);
            } else {
                c = kvp.getValue().getType();
            }

            c.setSender(senderId);
            c.setSenderType(SenderType.PROXY);
            c.setChannelName(channelName);
            c.setData(data);

            try {
                c.start();
            } catch (Exception ex) {
                IExceptionHandler handler = ServiceLocator.getService(IExceptionHandler.class);
                if (handler != null) {
                    handler.sendException(ex);
                }
                lastEx = ex;
            }
        }
        if (lastEx != null) {
            throw new RuntimeException("Cannot run message handler.", lastEx);
        }
    }

    public void broadcastToServers(String channelName, byte[] data) {
        if (channelName == null) {
            throw new IllegalArgumentException("channelName cannot be null.");
        }
        if (data == null) {
            throw new IllegalArgumentException("data cannot be null.");
        }

        if (!channelNames.contains(channelName)) {
            // Channel doesn't exist, throw an exception
            throw new RuntimeException("Channel \"" + channelName + "\" does not exist.");
        }

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(stream);

        try {
            out.writeByte(SenderType.PROXY.getType());
        } catch (Exception ex) {
            throw new RuntimeException("Could not write headers.");
        }
        if (!ChannelUtil.writeAll(out, senderId, "bukkit", data)) {
            throw new RuntimeException("Could not write headers.");
        }

        byte[] message = stream.toByteArray();

        for (BungeeMessageSender sender : servers) {
            sender.submit(pluginName + ":" + channelName, message);
        }

        // Submit a new send task
        threadPool.submit(onSendThread);
    }

    public int addHandlersFromPackage(String packageName) {
        return addHandlersFromPackage(packageName, true);
    }

    public int addHandlersFromPackage(String packageName, boolean recursive) {
        if (packageName == null) {
            throw new IllegalArgumentException("packageName cannot be null.");
        }

        // Number of commands successfully added
        int numMessages = 0;

        // Reflect package (recursively, if specified) and get everything that extends
        // AsyncMessageHandler
        List<Class<AsyncMessageHandler>> enums = ReflectUtil.getClasses(AsyncMessageHandler.class, packageName, recursive, false, false);
        // Iterate collection and add the handlers
        for (Class<AsyncMessageHandler> c : enums) {
            if (addHandler(c)) {
                // Increment success counter
                numMessages++;
            }
        }

        return numMessages;
    }

    public boolean addHandler(Class<? extends AsyncMessageHandler> clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("clazz cannot be null.");
        }

        // Create a new unit. This allows us to lazy-initialize handlers and only use
        // memory we need
        Unit<AsyncMessageHandler> unit = new Unit<AsyncMessageHandler>(null);
        // Add the new handler. If it already existed in the collection then we return
        // false; otherwise we return true
        return (CollectionUtil.putIfAbsent(handlers, clazz, unit).hashCode() == unit.hashCode()) ? true : false;
    }

    public boolean removeHandler(Class<? extends AsyncMessageHandler> clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("clazz cannot be null.");
        }

        // Remove the old handler. If the collection was modified as a result of this
        // operation we return true; else false
        return (handlers.remove(clazz) != null) ? true : false;
    }

    public void clearHandlers() {
        // Pretty easy removal. No need for special rules or logic
        handlers.clear();
    }

    public void clearChannels() {
        // Iterate channel names and destroy each channel
        // Because of the nature of ObjectPool no ConcurrentModificationException will
        // be thrown and all channels at time of iteration will be removed
        for (String c : channelNames) {
            try {
                destroyChannel(c);
            } catch (Exception ex) {

            }
        }
    }

    public void close() {
        try {
            // Gracefully shut the thread pool down, waiting for 5 seconds if needed
            threadPool.shutdown();
            if (!threadPool.awaitTermination(5000L, TimeUnit.MILLISECONDS)) {
                // Less-than-gracefully kill the thread pool
                threadPool.shutdownNow();
            }
        } catch (Exception ex) {

        }

        // Clear the channels and handlers
        clearChannels();
        clearHandlers();

        // Close all the connections
        for (BungeeMessageSender sender : servers) {
            sender.close();
        }
        // Clear the connections
        servers.clear();
    }

    public void onPluginMessage(PluginMessageEvent e) {
        // Message sender
        String sender = "";
        // The sender type. Bukkit or Bungee?
        SenderType senderType = SenderType.UNKNOWN;
        // The tag - or who this message is meant to be for
        String tag = "proxy";
        // And finally the data
        byte[] data = e.getData();

        // Make sure we can read everything
        if (e.getData().length >= 5) {
            // Read headers
            ByteArrayInputStream stream = new ByteArrayInputStream(e.getData());
            DataInputStream in = new DataInputStream(stream);

            try {
                senderType = SenderType.fromType(in.readByte());
                sender = in.readUTF();
                tag = in.readUTF();
                data = new byte[in.available()];
                in.read(data);
            } catch (Exception ex) {

            }
        }

        String channelName = parseChannelName(e.getTag());

        if (tag.equals("proxy") || tag.equals(senderId)) {
            // Message is directed at us
            Exception lastEx = null;
            // Iterate handlers and fire them
            for (Entry<Class<? extends AsyncMessageHandler>, Unit<AsyncMessageHandler>> kvp : handlers.entrySet()) {
                AsyncMessageHandler c = null;

                // Lazy initialize
                if (kvp.getValue().getType() == null) {
                    c = createHandler(kvp.getKey());
                    kvp.getValue().setType(c);
                } else {
                    c = kvp.getValue().getType();
                }

                c.setSender(sender);
                c.setSenderType(senderType);
                c.setChannelName(channelName);
                c.setData(data);

                try {
                    c.start();
                } catch (Exception ex) {
                    IExceptionHandler handler = ServiceLocator.getService(IExceptionHandler.class);
                    if (handler != null) {
                        handler.sendException(ex);
                    }
                    lastEx = ex;
                }
            }
            if (lastEx != null) {
                throw new RuntimeException("Cannot run message handler.", lastEx);
            }
        } else {
            // Message isn't directed at us. "Bounce" it and forward the message to all
            // Bukkit servers
            for (BungeeMessageSender s : servers) {
                s.submit(e.getTag(), e.getData());
            }

            // Submit a new send task
            threadPool.submit(onSendThread);
        }
    }

    public MessageHandlerType getType() {
        return BungeeMessageHandlerType.ENHANCED_BUNGEE;
    }

    // private
    private Runnable onSendThread = new Runnable() {
        public void run() {
            // Iterate connections and flush their queues
            for (BungeeMessageSender s : servers) {
                s.sendAll();
            }
        }
    };
    private Runnable onBacklogThread = new Runnable() {
        public void run() {
            // Iterate connections and flush their queues
            for (BungeeMessageSender s : servers) {
                s.sendAll();
            }
        }
    };

    private AsyncMessageHandler createHandler(Class<? extends AsyncMessageHandler> c) {
        AsyncMessageHandler run = null;

        try {
            run = c.newInstance();
        } catch (Exception ex) {
            IExceptionHandler handler = ServiceLocator.getService(IExceptionHandler.class);
            if (handler != null) {
                handler.sendException(ex);
            }
            throw new RuntimeException("Cannot initialize message handler.", ex);
        }

        return run;
    }

    private String parseChannelName(String channelName) {
        int index = channelName.indexOf(':');
        if (index > -1) {
            channelName = channelName.substring(index + 1);
        }
        return channelName;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">Air Hockey</string>
</resources>


text:
<?xml version="1.0" encoding="utf-8"?>
<XnaContent>
  <Asset Type="RolePlayingGameData.Player">
    <Name>Kolatt</Name>
    <MapSprite>
      <TextureName>Characters\Warrior1IdleRight</TextureName>
      <FrameDimensions>65 90</FrameDimensions>
      <FramesPerRow>6</FramesPerRow>
      <SourceOffset>32 58</SourceOffset>
      <Animations />
    </MapSprite>
    <WalkingSprite>
      <TextureName>Characters\Warrior1WalkRight</TextureName>
      <FrameDimensions>65 90</FrameDimensions>
      <FramesPerRow>6</FramesPerRow>
      <SourceOffset>32 58</SourceOffset>
      <Animations />
    </WalkingSprite>
    <MapIdleAnimationInterval>180</MapIdleAnimationInterval>
    <CharacterClassContentName>Warrior</CharacterClassContentName>
    <CharacterLevel>2</CharacterLevel>
    <InitialEquipmentContentNames>
      <Item>Weapons\Dagger</Item>
      <Item>Armor\HideArmor</Item>
    </InitialEquipmentContentNames>
    <Inventory />
    <CombatSprite>
      <TextureName>Characters\Warrior1AttackRight</TextureName>
      <FrameDimensions>135 90</FrameDimensions>
      <FramesPerRow>6</FramesPerRow>
      <SourceOffset>63 63</SourceOffset>
      <Animations />
    </CombatSprite>
    <Gold>10</Gold>
    <IntroductionDialogue>Kolatt here.  Warrior extraordinaire, at your service.  May I join?</IntroductionDialogue>
    <JoinAcceptedDialogue>You won't be disappointed!</JoinAcceptedDialogue>
    <JoinRejectedDialogue>Let me know if you change your mind.  I'll be twiddling my thumbs over here in the meantime.</JoinRejectedDialogue>
    <ActivePortraitTextureName>Warrior1Active</ActivePortraitTextureName>
    <InactivePortraitTextureName>Warrior1InActive</InactivePortraitTextureName>
    <UnselectablePortraitTextureName>Warrior1Unselectable</UnselectablePortraitTextureName>
  </Asset>
</XnaContent>


text:
/* jshint strict: false, sub: true */
/* global */
'use strict';

// //////////////////////////////////////////////////////////////////////////////
// / DISCLAIMER
// /
// / Copyright 2016 ArangoDB GmbH, Cologne, Germany
// / Copyright 2014 triagens GmbH, Cologne, Germany
// /
// / 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.
// /
// / Copyright holder is ArangoDB GmbH, Cologne, Germany
// /
// / @author Max Neunhoeffer
// //////////////////////////////////////////////////////////////////////////////

const functionsDocumentation = {
  'agency': 'run agency tests'
};
const optionsDocumentation = [
];

const tu = require('@arangodb/test-utils');
const pu = require('@arangodb/process-utils');

// //////////////////////////////////////////////////////////////////////////////
// / @brief agency tests
// //////////////////////////////////////////////////////////////////////////////

function agency (options) {
  let testCases = tu.scanTestPath('js/client/tests/agency');

  let saveAgency = options.agency;
  let saveCluster = options.cluster;

  options.agency = true;
  options.cluster = false;

  let results = tu.performTests(options, testCases, 'agency', tu.runInArangosh);

  options.agency = saveAgency;
  options.cluster = saveCluster;

  return results;
}

function setup (testFns, defaultFns, opts, fnDocs, optionsDoc) {
  testFns['agency'] = agency;
  defaultFns.push('agency');
  for (var attrname in functionsDocumentation) { fnDocs[attrname] = functionsDocumentation[attrname]; }
  for (var i = 0; i < optionsDocumentation.length; i++) { optionsDoc.push(optionsDocumentation[i]); }
}

exports.setup = setup;


text:
require 'rails_helper'
describe User do
  subject { create(:user) }
  it { should be_a User }

  describe 'scopes' do
    before do
      create(:user)
      create(:admin)
    end
    describe 'non_admin' do
      subject { User.non_admin.count }
      it { is_expected.to eql 1 }
    end
    describe 'admin' do
      subject { User.admin.count }
      it { is_expected.to eql 1 }
    end
    describe 'inactive' do
      subject { User.inactive.count }
      it { is_expected.to eql 0 }
    end
  end
end


text:
/*	$NetBSD: yppush_err.c,v 1.6 2009/10/20 00:51:14 snj Exp $	*/

/*
 * Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
 * 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.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
 */

#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: yppush_err.c,v 1.6 2009/10/20 00:51:14 snj Exp $");
#endif

#include <sys/types.h>

#include <string.h>
#include <stdio.h>

#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp_prot.h>

#include "yppush.h"

const char *
yppush_err_string(int y)
{
	static char errstr[64];

	switch (y) {
	case YPPUSH_SUCC:
		return "Success";

	case YPPUSH_AGE:
		return "Master's version not newer";

	case YPPUSH_NOMAP:
		return "Can't find server for map";

	case YPPUSH_NODOM:
		return "Domain not supported";

	case YPPUSH_RSRC:
		return "Local resource alloc failure";

	case YPPUSH_RPC:
		return "RPC failure talking to server";

	case YPPUSH_MADDR:
		return "Can't get master address";

	case YPPUSH_YPERR:
		return "YP server/map db error";

	case YPPUSH_BADARGS:
		return "Request arguments bad";

	case YPPUSH_DBM:
		return "Local dbm operation failed";

	case YPPUSH_FILE:
		return "Local file I/O operation failed";

	case YPPUSH_SKEW:
		return "Map version skew during transfer";

	case YPPUSH_CLEAR:
		return "Can't send \"Clear\" req to local ypserv";

	case YPPUSH_FORCE:
		return "No local order number in map use -f flag.";

	case YPPUSH_XFRERR:
		return "ypxfr error";

	case YPPUSH_REFUSED:
		return "Transfer request refused by ypserv";

	default:
		memset(errstr, 0, sizeof(errstr));
		snprintf(errstr, sizeof(errstr), "unknown error code: %d", y);
		return errstr;
        }
};


text:
* Microsoft-Windows-Sysmon/Operational<br>

## Logic

```
SELECT b.Message
FROM apt29Host a
INNER JOIN (
    SELECT ProcessGuid, Message
    FROM apt29Host
    WHERE Channel = "Microsoft-Windows-Sysmon/Operational"
        AND EventID = 11
        AND LOWER(TargetFilename) LIKE '%monkey.png'
) b
ON a.ProcessGuid = b.ProcessGuid
WHERE a.Channel = "Microsoft-Windows-Sysmon/Operational"
  AND a.EventID = 1
  AND LOWER(a.Image) RLIKE '.*\\|â€||||â€|.*'

```

## Output

```
File created:
RuleName: -
UtcTime: 2020-05-02 02:57:00.933
ProcessGuid: {47ab858c-e13c-5eac-a903-000000000400}
ProcessId: 8524
Image: C:\ProgramData\victim\cod.3aka3.scr
TargetFilename: C:\Users\pbeesly\Downloads\monkey.png
CreationUtcTime: 2020-05-02 02:57:00.933
```


text:
typedef int QItype __attribute__ ((mode (QI)));
#endif


text:
id: 3
source: 1
name: metatags
description: ''
category: Algemeen
properties: 'a:0:{}'

-----

<base href="[[++site_url]]" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta charset="utf-8">
<meta name="description" content="[[*seo_omschrijving]]">

<!-- Facebook -->
<meta property="og:title" content="[[++site_name]] | [[*longtitle:default=`[[*pagetitle]]`]]" />
<meta property="og:url" content="[[~[[*id]]? &scheme=`full`]]" />
<meta property="og:site_name" content="[[++site_name]]"/>
<meta property="og:description" content="" />
<!-- Juiste Foto TV invoeren w=600&h=315-->
<meta property="og:image" content="[[++site_url]]" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="315" />


text:
angular.module('collegeScorecard.common', [
  'collegeScorecard.common.active-nav'
]);


text:
import { NgModule }      from '@angular/core';
import { CommonModule }  from '@angular/common';
import { LoginVComponent} from './login.component';
import { routing } from './loginv.routing';
import {AutheService} from './authservice';
import { NgaModule } from '../../theme/nga.module';
import { FormsModule } from '@angular/forms';
@NgModule({
  imports: [
    CommonModule,
    routing,
    NgaModule,
    FormsModule
  ],
  declarations: [
    LoginVComponent
  ],
  providers : [AutheService]
})
export class LoginVModule {}


text:
package com.lithium.flow.filer;

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

import java.io.Serializable;
import java.net.URI;
import java.util.Comparator;
import java.util.Objects;

import javax.annotation.Nonnull;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * Details for a single file from a {@link Filer}.
 *
 * @author Matt Ayres
 */
public class Record implements Serializable {
	private static final long serialVersionUID = -4759712231322406072L;

	public static final long NO_EXIST_SIZE = -1;

	private final URI uri;
	private final RecordPath path;
	private final long time;
	private final long size;
	private final boolean dir;

	public Record(@Nonnull URI uri, @Nonnull RecordPath path, long time, long size, boolean dir) {
		this.uri = checkNotNull(uri);
		this.path = checkNotNull(path);
		this.time = time;
		this.size = size;
		this.dir = dir;
	}

	@Nonnull
	public URI getUri() {
		return uri;
	}

	@Nonnull
	public String getFolder() {
		return path.getFolder();
	}

	@Nonnull
	public String getName() {
		return path.getName();
	}

	@Nonnull
	public String getPath() {
		return path.getPath();
	}

	public long getTime() {
		return time;
	}

	public long getSize() {
		return size;
	}

	public boolean exists() {
		return size != NO_EXIST_SIZE;
	}

	public boolean isDir() {
		return dir;
	}

	public boolean isFile() {
		return !dir;
	}

	@Nonnull
	public Record withPath(@Nonnull String path) {
		return new Record(uri, RecordPath.from(path), time, size, dir);
	}

	@Nonnull
	public Record withSize(long newSize) {
		return new Record(uri, path, time, newSize, dir);
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}

		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		Record record = (Record) o;
		return time == record.time
				&& size == record.size
				&& dir == record.dir
				&& Objects.equals(uri, record.uri)
				&& Objects.equals(path, record.path);
	}

	@Override
	public int hashCode() {
		return Objects.hash(uri, path, time, size, dir);
	}

	@Override
	@Nonnull
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

	@Nonnull
	public static Record noFile(@Nonnull URI uri, @Nonnull String path) {
		checkNotNull(uri);
		checkNotNull(path);
		return new Record(uri, RecordPath.from(path), 0, NO_EXIST_SIZE, false);
	}

	@Nonnull
	public static Comparator<Record> sizeAsc() {
		return Comparator.comparingLong(Record::getSize);
	}

	@Nonnull
	public static Comparator<Record> sizeDesc() {
		return Comparator.comparingLong(Record::getSize).reversed();
	}

	@Nonnull
	public static Comparator<Record> timeAsc() {
		return Comparator.comparingLong(Record::getTime);
	}

	@Nonnull
	public static Comparator<Record> timeDesc() {
		return Comparator.comparingLong(Record::getTime).reversed();
	}

	@Nonnull
	public static Comparator<Record> nameAsc() {
		return Comparator.comparing(Record::getName);
	}

	@Nonnull
	public static Comparator<Record> nameDesc() {
		return Comparator.comparing(Record::getName).reversed();
	}

	@Nonnull
	public static Comparator<Record> pathAsc() {
		return Comparator.comparing(Record::getPath);
	}

	@Nonnull
	public static Comparator<Record> pathDesc() {
		return Comparator.comparing(Record::getPath).reversed();
	}
}


text:
require 'spec_helper'

describe Perf do
  include Perf

  def new_mock_counter
    counter = double('fake counter')
    counter.stub(:start)
    counter.stub(:stop)
    counter.stub(:error)
    counter
  end

  context ':collect' do
    let(:counter) { new_mock_counter }

    it 'should call the code block' do
      called = false
      collect counter do
        called = true
      end
      called.should be_true
    end

    it 'should not fail without a code block' do
      expect { collect(counter) }.to_not raise_error
    end

    it 'should start a counter' do
      counter.should_receive(:start)

      collect(counter)
    end

    context 'without failure' do
      it 'should stop a counter' do
        counter.should_receive(:stop)
        collect(counter)
      end

      it 'should not receive error' do
        counter.should_not_receive(:error)
        collect(counter)
      end

      it 'should preserve the return value' do
        expected = Random.rand(0..99)
        actual = collect(counter) { expected }
        actual.should eql(expected)
      end
    end

    context 'with failure' do
      def with_failure
        collect(counter) { raise 'Test' }
      end

      it 'should preserve original exception' do
        expect{with_failure}.to raise_error('Test')
      end

      it 'should error counter' do
        counter.should_receive(:error)
        with_failure rescue nil
      end

      it 'should not stop counter' do
        counter.should_not_receive(:stop)
        with_failure rescue nil
      end
    end
  end

  context ':activity' do
    it 'should instantiate activity counter' do
      Perf::ActivityCounter.should_receive(:new)

      activity(:foo)
    end

    it 'should return an activity counter' do
      activity(:foo).should be_kind_of(Perf::ActivityCounter)
    end

    it 'should translate list of counters' do
      Perf::ActivityCounter.should_receive(:new).with({foo: 1, bar: 1}).and_call_original
      activity(:foo, :bar)
    end

    it 'should translate hash of counters' do
      Perf::ActivityCounter.should_receive(:new).with({foo: 5, bar: 10}).and_call_original
      activity(foo: 5, bar: 10)
    end

    it 'should translate mixed counters' do
      Perf::ActivityCounter.should_receive(:new).with({i1: 1, i2: 1, h1: 10, h2: 20})
      activity(:i1, :i2, h1: 10, h2:20)
    end
  end

  context 'totals' do
    it 'should instantiate a totals counter' do
      totals(:foo).should be_kind_of(Perf::TotalsCounter)
    end

    it 'should pass correct arguments to the totals counter' do
      Perf::TotalsCounter.should_receive(:new).with({foo: 1, bar: 10}).and_call_original
      totals(:foo, bar: 10)
    end
  end

  context 'hits' do
    it 'should instantiate a hita counter' do
      hits(:foo).should be_kind_of(Perf::HitsCounter)
    end

    it 'should pass correct arguments to the hits counter' do
      Perf::HitsCounter.should_receive(:new).with(foo: 1, bar: 10).and_call_original
      hits(:foo, bar: 10)
    end
  end

  context 'failures' do
    it 'should instantiate a failures counter' do
      failures(:foo).should be_kind_of(Perf::FailuresCounter)
    end

    it 'should pass correct arguments to the failures counter' do
      Perf::FailuresCounter.should_receive(:new).with({foo: 1, bar: 10}).and_call_original
      failures(:foo, bar: 10)
    end
  end

  context 'duration' do
    it 'should instantiate a duration counter' do
      Perf::DurationCounter.should_receive(:new).with(:foo).and_call_original
      duration(:foo)
    end

    it 'should return duration counter' do
      duration(:foo).should be_kind_of(Perf::DurationCounter)
    end
  end

  context 'throughput' do
    it 'should instantiate a throughput counter' do
      Perf::ThroughputCounter.should_receive(:new).with(foo: 123, bar: 456).and_call_original
      throughput(foo: 123, bar: 456)
    end

    it 'should return a throughput counter' do
      throughput(foo: 123).should be_a(Perf::ThroughputCounter)
    end
  end
end


text:
import React from 'react';

const InputText = (props) => {
  const styles = {
    fontWeight: 'bold'
  };

  return (

      {props.label}{' '}
      <input
        type="text"
        name={props.name}
        value={props.value}
        onChange={props.onChange}
      />

  );
};

export { InputText };


text:
(function() {

    var strings = [
      'Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea.',
      'Ut labores minimum atomorum pro. Laudem tibique ut has.',
      'Fugit adolescens vis et, ei graeci forensibus sed.',
      'Convenire definiebas scriptorem eu cum. Sit dolor dicunt consectetuer no.',
      'Ea duis bonorum nec, falli paulo aliquid ei eum.',
      'Usu eu novum principes, vel quodsi aliquip ea.',
      'Has at minim mucius aliquam, est id tempor laoreet.',
      'Pro saepe pertinax ei, ad pri animal labores suscipiantur.',
      'Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam.',
      'Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior.',
      'Id nam odio natum malorum, tibique copiosae expetenda mel ea.',
      'Cu mei vide viris gloriatur, at populo eripuit sit.',
      'Modus commodo minimum eum te, vero utinam assueverit per eu.',
      'No nam ipsum lorem aliquip, accumsan quaerendum ei usu.'
    ];

    function randomString() {
      return strings[Math.floor(Math.random() * strings.length)];
    }

    function randomLetter() {
      return String.fromCharCode(65 + Math.floor(Math.random() * 26));
    }

    Polymer('sample-content', {

      size: 0,

      sizeChanged: function() {
        this.innerHTML = '';
        for (var i = 0; i < this.size; i++) {
          this.innerHTML +=
            '
' +
            '
'+ randomLetter() + '
' +
            '
' + randomString() + '
' +
            '
' + randomString() + '
' +
            '
' + randomString() + '
' +
            '
' + randomString() + '
' +
            '
';
        }
      }

    });
  })();


text:
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';

import { hasPermission } from '../../../authorization';
import { LivechatTrigger } from '../../../models';

Meteor.methods({
	'livechat:removeTrigger'(triggerId) {
		if (!Meteor.userId() || !hasPermission(Meteor.userId(), 'view-livechat-manager')) {
			throw new Meteor.Error('error-not-allowed', 'Not allowed', { method: 'livechat:removeTrigger' });
		}

		check(triggerId, String);

		return LivechatTrigger.removeById(triggerId);
	},
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2016. Sunghyouk Bae <sunghyouk.bae@gmail.com>
  ~ 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.
  ~
  -->

<configuration>

  <include resource="org/springframework/boot/logging/logback/base.xml"/>

  <logger name="debop4k.data-orm" level="TRACE"/>

  <root level="INFO">
    <appender-ref ref="CONSOLE"/>
  </root>

</configuration>


text:
from time import gmtime, mktime
from timeit import default_timer

def clock():
    '''UTC time since epoch'''
    return default_timer()
    return mktime(gmtime())


text:
<?php
/**
 * RocketPHP (http://rocketphp.io)
 *
 * @package   RocketPHP
 * @link      https://github.com/rocketphp/html
 * @license   http://opensource.org/licenses/MIT MIT
 */

namespace RocketPHPTest\HTML;

use RocketPHP\HTML\Node_Abstract;

use RocketPHP\HTML\ParentNodeTrait;

class ParentNodeMock
extends Node_Abstract
{
    use ParentNodeTrait;
}


text:
{% extends 'base.html' %}

{% block titulo %} Perfil {% endblock %}

{% block encabezado %}

Perfil de Usuario

{% endblock %}

{% block contenido %}

Bienvenido {{usuario.username|upper}},
		la última vez que te vimos por aquí fue el {{usuario.last_login}}.

Eres miembro desde el {{usuario.date_joined}}

		Cerrar sesión
{% endblock %}


text:
module MediaWiktory::Wikipedia
  module Modules
    # Enumerate recent changes.
    #
    # The "submodule" (MediaWiki API term) is included in action after setting some param, providing
    # additional tweaking for this param. Example (for {MediaWiktory::Wikipedia::Actions::Query} and
    # its submodules):
    #
    # ```ruby
    # api.query             # returns Actions::Query
    #    .prop(:revisions)  # adds prop=revisions to action URL, and includes Modules::Revisions into action
    #    .limit(10)         # method of Modules::Revisions, adds rvlimit=10 to URL
    # ```
    #
    # All submodule's parameters are documented as its public methods, see below.
    #
    module Recentchanges

      # The timestamp to start enumerating from.
      #
      # @param value [Time]
      # @return [self]
      def start(value)
        merge(rcstart: value.iso8601)
      end

      # The timestamp to end enumerating.
      #
      # @param value [Time]
      # @return [self]
      def end(value)
        merge(rcend: value.iso8601)
      end

      # In which direction to enumerate:
      #
      # @param value [String] One of "newer" (List oldest first. Note: rcstart has to be before rcend), "older" (List newest first (default). Note: rcstart has to be later than rcend).
      # @return [self]
      def dir(value)
        _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}"
      end

      # @private
      def _dir(value)
        defined?(super) && super || ["newer", "older"].include?(value.to_s) && merge(rcdir: value.to_s)
      end

      # Filter changes to only these namespaces.
      #
      # @param values [Array<String>] Allowed values: "-2", "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "446", "447", "710", "711", "828", "829", "2300", "2301", "2302", "2303".
      # @return [self]
      def namespace(*values)
        values.inject(self) { |res, val| res._namespace(val) or fail ArgumentError, "Unknown value for namespace: #{val}" }
      end

      # @private
      def _namespace(value)
        defined?(super) && super || ["-2", "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "446", "447", "710", "711", "828", "829", "2300", "2301", "2302", "2303"].include?(value.to_s) && merge(rcnamespace: value.to_s, replace: false)
      end

      # Only list changes by this user.
      #
      # @param value [String]
      # @return [self]
      def user(value)
        merge(rcuser: value.to_s)
      end

      # Don't list changes by this user.
      #
      # @param value [String]
      # @return [self]
      def excludeuser(value)
        merge(rcexcludeuser: value.to_s)
      end

      # Only list changes tagged with this tag.
      #
      # @param value [String]
      # @return [self]
      def tag(value)
        merge(rctag: value.to_s)
      end

      # Include additional pieces of information:
      #
      # @param values [Array<String>] Allowed values: "user" (Adds the user responsible for the edit and tags if they are an IP), "userid" (Adds the user ID responsible for the edit), "comment" (Adds the comment for the edit), "parsedcomment" (Adds the parsed comment for the edit), "flags" (Adds flags for the edit), "timestamp" (Adds timestamp of the edit), "title" (Adds the page title of the edit), "ids" (Adds the page ID, recent changes ID and the new and old revision ID), "sizes" (Adds the new and old page length in bytes), "redirect" (Tags edit if page is a redirect), "patrolled" (Tags patrollable edits as being patrolled or unpatrolled), "loginfo" (Adds log information (log ID, log type, etc) to log entries), "tags" (Lists tags for the entry), "sha1" (Adds the content checksum for entries associated with a revision).
      # @return [self]
      def prop(*values)
        values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" }
      end

      # @private
      def _prop(value)
        defined?(super) && super || ["user", "userid", "comment", "parsedcomment", "flags", "timestamp", "title", "ids", "sizes", "redirect", "patrolled", "loginfo", "tags", "sha1"].include?(value.to_s) && merge(rcprop: value.to_s, replace: false)
      end

      # Use action=query&meta=tokens instead.
      #
      # @param values [Array<String>] Allowed values: "patrol".
      # @return [self]
      def token(*values)
        values.inject(self) { |res, val| res._token(val) or fail ArgumentError, "Unknown value for token: #{val}" }
      end

      # @private
      def _token(value)
        defined?(super) && super || ["patrol"].include?(value.to_s) && merge(rctoken: value.to_s, replace: false)
      end

      # Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set rcshow=minor|!anon.
      #
      # @param values [Array<String>] Allowed values: "minor", "!minor", "bot", "!bot", "anon", "!anon", "redirect", "!redirect", "patrolled", "!patrolled", "unpatrolled".
      # @return [self]
      def show(*values)
        values.inject(self) { |res, val| res._show(val) or fail ArgumentError, "Unknown value for show: #{val}" }
      end

      # @private
      def _show(value)
        defined?(super) && super || ["minor", "!minor", "bot", "!bot", "anon", "!anon", "redirect", "!redirect", "patrolled", "!patrolled", "unpatrolled"].include?(value.to_s) && merge(rcshow: value.to_s, replace: false)
      end

      # How many total changes to return.
      #
      # @param value [Integer, "max"]
      # @return [self]
      def limit(value)
        merge(rclimit: value.to_s)
      end

      # Which types of changes to show.
      #
      # @param values [Array<String>] Allowed values: "edit", "new", "log", "external", "categorize".
      # @return [self]
      def type(*values)
        values.inject(self) { |res, val| res._type(val) or fail ArgumentError, "Unknown value for type: #{val}" }
      end

      # @private
      def _type(value)
        defined?(super) && super || ["edit", "new", "log", "external", "categorize"].include?(value.to_s) && merge(rctype: value.to_s, replace: false)
      end

      # Only list changes which are the latest revision.
      #
      # @return [self]
      def toponly()
        merge(rctoponly: 'true')
      end

      # When more results are available, use this to continue.
      #
      # @param value [String]
      # @return [self]
      def continue(value)
        merge(rccontinue: value.to_s)
      end

      # When being used as a generator, generate revision IDs rather than titles. Recent change entries without associated revision IDs (e.g. most log entries) will generate nothing.
      #
      # @return [self]
      def generaterevisions()
        merge(rcgeneraterevisions: 'true')
      end
    end
  end
end


text:
package org.testcontainers.containers;

import org.testcontainers.containers.wait.strategy.HttpWaitStrategy;
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
import org.testcontainers.containers.wait.strategy.WaitAllStrategy;
import org.testcontainers.containers.wait.strategy.WaitStrategy;
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.LicenseAcceptance;
import org.testcontainers.utility.MountableFile;

import java.time.Duration;
import java.util.Set;
import java.util.stream.Stream;

import static java.net.HttpURLConnection.HTTP_OK;
import static java.util.stream.Collectors.toSet;

/**
 * Testcontainer for Neo4j.
 *
 * @param <S> "SELF" to be used in the withXXX methods.
 * @author Michael J. Simons
 */
public class Neo4jContainer<S extends Neo4jContainer<S>> extends GenericContainer<S> {

    /**
     * The image defaults to the official Neo4j image: Neo4j.
     */
    private static final String DEFAULT_IMAGE_NAME = "neo4j";

    /**
     * The default tag (version) to use.
     */
    private static final String DEFAULT_TAG = "3.5.0";

    private static final String DOCKER_IMAGE_NAME = DEFAULT_IMAGE_NAME + ":" + DEFAULT_TAG;

    /**
     * Default port for the binary Bolt protocol.
     */
    private static final int DEFAULT_BOLT_PORT = 7687;

    /**
     * The port of the transactional HTTPS endpoint: Neo4j REST API.
     */
    private static final int DEFAULT_HTTPS_PORT = 7473;

    /**
     * The port of the transactional HTTP endpoint: Neo4j REST API.
     */
    private static final int DEFAULT_HTTP_PORT = 7474;

    /**
     * The official image requires a change of password by default from "neo4j" to something else. This defaults to "password".
     */
    private static final String DEFAULT_ADMIN_PASSWORD = "password";

    private static final String AUTH_FORMAT = "neo4j/%s";

    private String adminPassword = DEFAULT_ADMIN_PASSWORD;

    private boolean standardImage = false;

    /**
     * Creates a Testcontainer using the official Neo4j docker image.
     * @deprecated use {@link Neo4jContainer(DockerImageName)} instead
     */
    @Deprecated
    public Neo4jContainer() {
        this(DOCKER_IMAGE_NAME);
    }

    /**
     * Creates a Testcontainer using a specific docker image.
     *
     * @param dockerImageName The docker image to use.
     * @deprecated use {@link Neo4jContainer(DockerImageName)} instead
     */
    @Deprecated
    public Neo4jContainer(String dockerImageName) {
        this(DockerImageName.parse(dockerImageName));
    }

    public Neo4jContainer(final DockerImageName dockerImageName) {
        super(dockerImageName);

        WaitStrategy waitForBolt = new LogMessageWaitStrategy()
            .withRegEx(String.format(".*Bolt enabled on 0\\.0\\.0\\.0:%d\\.\n", DEFAULT_BOLT_PORT));
        WaitStrategy waitForHttp = new HttpWaitStrategy()
            .forPort(DEFAULT_HTTP_PORT)
            .forStatusCodeMatching(response -> response == HTTP_OK);

        this.waitStrategy = new WaitAllStrategy()
            .withStrategy(waitForBolt)
            .withStrategy(waitForHttp)
            .withStartupTimeout(Duration.ofMinutes(2));

        addExposedPorts(DEFAULT_BOLT_PORT, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT);

        if (dockerImageName.getUnversionedPart().equals(DEFAULT_IMAGE_NAME)) {
            this.standardImage = true;
        }
    }

    @Override
    public Set<Integer> getLivenessCheckPortNumbers() {

        return Stream.of(DEFAULT_BOLT_PORT, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT)
            .map(this::getMappedPort)
            .collect(toSet());
    }

    @Override
    protected void configure() {

        boolean emptyAdminPassword = this.adminPassword == null || this.adminPassword.isEmpty();
        String neo4jAuth = emptyAdminPassword ? "none" : String.format(AUTH_FORMAT, this.adminPassword);
        addEnv("NEO4J_AUTH", neo4jAuth);
    }

    /**
     * @return Bolt URL for use with Neo4j's Java-Driver.
     */
    public String getBoltUrl() {
        return String.format("bolt://" + getHost() + ":" + getMappedPort(DEFAULT_BOLT_PORT));
    }

    /**
     * @return URL of the transactional HTTP endpoint.
     */
    public String getHttpUrl() {
        return String.format("http://" + getHost() + ":" + getMappedPort(DEFAULT_HTTP_PORT));
    }

    /**
     * @return URL of the transactional HTTPS endpoint.
     */
    public String getHttpsUrl() {
        return String.format("https://" + getHost() + ":" + getMappedPort(DEFAULT_HTTPS_PORT));
    }

    /**
     * Configures the container to use the enterprise edition of the default docker image.
     *

     * Please have a look at the Neo4j Licensing page. While the Neo4j
     * Community Edition can be used for free in your projects under the GPL v3 license, Neo4j Enterprise edition
     * needs either a commercial, education or evaluation license.
     *
     * @return This container.
     */
    public S withEnterpriseEdition() {

        if (!standardImage) {
            throw new IllegalStateException(
                String.format("Cannot use enterprise version with alternative image %s.", getDockerImageName()));
        }

        setDockerImageName(DOCKER_IMAGE_NAME + "-enterprise");
        LicenseAcceptance.assertLicenseAccepted(getDockerImageName());

        addEnv("NEO4J_ACCEPT_LICENSE_AGREEMENT", "yes");

        return self();
    }

    /**
     * Sets the admin password for the default account (which is
neo4j
). A null value or an empty string
     * disables authentication.
     *
     * @param adminPassword The admin password for the default database account.
     * @return This container.
     */
    public S withAdminPassword(final String adminPassword) {

        this.adminPassword = adminPassword;
        return self();
    }

    /**
     * Disables authentication.
     *
     * @return This container.
     */
    public S withoutAuthentication() {
        return withAdminPassword(null);
    }

    /**
     * Copies an existing {@code graph.db} folder into the container. This can either be a classpath resource or a
     * host resource. Please have a look at the factory methods in {@link MountableFile}.
     *

     * If you want to map your database into the container instead of copying them, please use {@code #withClasspathResourceMapping},
     * but this will only work when your test does not run in a container itself.
     *

     * Mapping would work like this:
     *

     *      @Container
     *      private static final Neo4jContainer databaseServer = new Neo4jContainer<>()
     *          .withClasspathResourceMapping("/test-graph.db", "/data/databases/graph.db", BindMode.READ_WRITE);
     *

     *
     * @param graphDb The graph.db folder to copy into the container
     * @return This container.
     */
    public S withDatabase(MountableFile graphDb) {
        return withCopyFileToContainer(graphDb, "/data/databases/graph.db");
    }

    /**
     * Adds plugins to the given directory to the container. If {@code plugins} denotes a directory, than all of that
     * directory is mapped to Neo4j's plugins. Otherwise, single resources are copied over.
     *

     * If you want to map your plugins into the container instead of copying them, please use {@code #withClasspathResourceMapping},
     * but this will only work when your test does not run in a container itself.
     *
     * @param plugins
     * @return This container.
     */
    public S withPlugins(MountableFile plugins) {
        return withCopyFileToContainer(plugins, "/var/lib/neo4j/plugins/");
    }

    /**
     * Adds Neo4j configuration properties to the container. The properties can be added as in the official Neo4j
     * configuration, the method automatically translate them into the format required by the Neo4j container.
     *
     * @param key   The key to configure, i.e. {@code dbms.security.procedures.unrestricted}
     * @param value The value to set
     * @return This container.
     */
    public S withNeo4jConfig(String key, String value) {

        addEnv(formatConfigurationKey(key), value);
        return self();
    }

    /**
     * @return The admin password for the neo4j account or literal null if auth is disabled.
     */
    public String getAdminPassword() {
        return adminPassword;
    }

    private static String formatConfigurationKey(String plainConfigKey) {
        final String prefix = "NEO4J_";

        return String.format("%s%s", prefix, plainConfigKey
            .replaceAll("_", "__")
            .replaceAll("\\.", "_"));
    }
}


text:
package ansi

import (
	"syscall"
	"unsafe"
)

var (
	modkernel32 = syscall.MustLoadDLL("kernel32.dll")
	procGetConsoleMode = modkernel32.MustFindProc("GetConsoleMode")
)

func isTTY(fd uintptr) bool {
	var mode uint32
	ret, _, err := procGetConsoleMode.Call(fd, uintptr(unsafe.Pointer(&mode)))
	return ret != 0 && err != nil
}


text:
namespace ppapi {
namespace proxy {

Dispatcher::Dispatcher(base::ProcessHandle remote_process_handle,
                       GetInterfaceFunc local_get_interface)
    : ProxyChannel(remote_process_handle),
      disallow_trusted_interfaces_(false),  // TODO(brettw) make this settable.
      local_get_interface_(local_get_interface) {
}

Dispatcher::~Dispatcher() {
}

InterfaceProxy* Dispatcher::GetInterfaceProxy(ApiID id) {
  InterfaceProxy* proxy = proxies_[id].get();
  if (!proxy) {
    // Handle the first time for a given API by creating the proxy for it.
    InterfaceProxy::Factory factory =
        InterfaceList::GetInstance()->GetFactoryForID(id);
    if (!factory) {
      NOTREACHED();
      return NULL;
    }
    proxy = factory(this);
    DCHECK(proxy);
    proxies_[id].reset(proxy);
  }
  return proxy;
}

base::MessageLoopProxy* Dispatcher::GetIPCMessageLoop() {
  return delegate()->GetIPCMessageLoop();
}

void Dispatcher::AddIOThreadMessageFilter(
    IPC::ChannelProxy::MessageFilter* filter) {
  channel()->AddFilter(filter);
}

bool Dispatcher::OnMessageReceived(const IPC::Message& msg) {
  if (msg.routing_id() <= 0 || msg.routing_id() >= API_ID_COUNT) {
    OnInvalidMessageReceived();
    return true;
  }

  InterfaceProxy* proxy = GetInterfaceProxy(
      static_cast<ApiID>(msg.routing_id()));
  if (!proxy) {
    NOTREACHED();
    return true;
  }
  return proxy->OnMessageReceived(msg);
}

void Dispatcher::SetSerializationRules(
    VarSerializationRules* var_serialization_rules) {
  serialization_rules_.reset(var_serialization_rules);
}

void Dispatcher::OnInvalidMessageReceived() {
}

}  // namespace proxy
}  // namespace ppapi


text:
declare namespace javax {
  namespace sound {
    namespace midi {
      namespace spi {

        abstract class SoundbankReader {
          public constructor()
          public abstract getSoundbank(arg0: java.net.URL): javax.sound.midi.Soundbank
          public abstract getSoundbank(arg0: java.io.InputStream): javax.sound.midi.Soundbank
          public abstract getSoundbank(arg0: java.io.File): javax.sound.midi.Soundbank
        }

      }
    }
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<holidays xmlns="https://kayaposoft.com/enrico/xsd/1.0" country="usa">

	<metadata>
		<reference>http://www.sos.arkansas.gov/aboutOffice/Pages/stateHolidayCalendar.aspx</reference>
	</metadata>

	<holiday validFrom="2011-01-01">
		<date>
			<fixedDate day="1" month="1" />
		</date>
		<name lang="en">New Year's Day</name>
		<observanceRule dayOfWeek="6" addDays="-1" additionalHoliday="false" />
		<observanceRule dayOfWeek="7" addDays="1" additionalHoliday="false" />
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<nthWeekdayRuleDate dayOfWeek="1" month="1" nth="3" />
		</date>
		<name lang="en">Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays</name>
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<nthWeekdayRuleDate dayOfWeek="1" month="2" nth="3" />
		</date>
		<name lang="en">George Washington's Birthday and Daisy Gatson Bates Day</name>
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<nthWeekdayRuleDate dayOfWeek="1" month="5" nth="last" />
		</date>
		<name lang="en">Memorial Day</name>
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<fixedDate day="4" month="7" />
		</date>
		<name lang="en">Independence Day</name>
		<observanceRule dayOfWeek="6" addDays="-1" additionalHoliday="false" />
		<observanceRule dayOfWeek="7" addDays="1" additionalHoliday="false" />
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<nthWeekdayRuleDate dayOfWeek="1" month="9" nth="1" />
		</date>
		<name lang="en">Labor Day</name>
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<fixedDate day="11" month="11" />
		</date>
		<name lang="en">Veterans Day</name>
		<observanceRule dayOfWeek="6" addDays="-1" additionalHoliday="false" />
		<observanceRule dayOfWeek="7" addDays="1" additionalHoliday="false" />
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<nthWeekdayRuleDate dayOfWeek="4" month="11" nth="4" />
		</date>
		<name lang="en">Thanksgiving Day</name>
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<fixedDate day="24" month="12" />
		</date>
		<name lang="en">Christmas Eve</name>
		<observanceRule dayOfWeek="5" addDays="-1" additionalHoliday="false" />
		<observanceRule dayOfWeek="6" addDays="-1" additionalHoliday="false" />
		<observanceRule dayOfWeek="7" addDays="1" additionalHoliday="false" />
	</holiday>

	<holiday validFrom="2011-01-01">
		<date>
			<fixedDate day="25" month="12" />
		</date>
		<name lang="en">Christmas Day</name>
		<observanceRule dayOfWeek="6" addDays="-1" additionalHoliday="false" />
		<observanceRule dayOfWeek="1" addDays="1" additionalHoliday="false" />
		<observanceRule dayOfWeek="7" addDays="1" additionalHoliday="false" />
	</holiday>

</holidays>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Linq;

#nullable disable

namespace Azure.Core
{
    /// <summary>
    /// An implementation for manipulating headers on <see cref="Request"/>.
    /// </summary>
    internal class DictionaryHeaders
    {
        private readonly Dictionary<string, object> _headers = new(StringComparer.OrdinalIgnoreCase);

        /// <summary>
        /// Initializes an instance of <see cref="DictionaryHeaders"/>
        /// </summary>
        public DictionaryHeaders()
        { }

        /// <summary>
        /// Adds a header value to the header collection.
        /// </summary>
        /// <param name="name">The header name.</param>
        /// <param name="value">The header value.</param>
        public void AddHeader(string name, string value)
        {
            if (!_headers.TryGetValue(name, out object objValue))
            {
                _headers[name] = value;
            }
            else
            {
                if (objValue is List<string> values)
                {
                    values.Add(value);
                }
                else
                {
                    // upgrade to a List
                    _headers[name] = new List<string> { objValue as string, value };
                }
            }
        }

        /// <summary>
        /// Returns header value if the header is stored in the collection. If the header has multiple values they are going to be joined with a comma.
        /// </summary>
        /// <param name="name">The header name.</param>
        /// <param name="value">The reference to populate with value.</param>
        /// <returns><c>true</c> if the specified header is stored in the collection, otherwise <c>false</c>.</returns>
        public bool TryGetHeader(string name, out string value)
        {
            if (_headers.TryGetValue(name, out object objValue))
            {
                if (objValue is List<string> values)
                {
                    value = JoinHeaderValue(values);
                }
                else
                {
                    value = objValue as string;
                }
                return true;
            }

            value = null;
            return false;
        }

        /// <summary>
        /// Returns header values if the header is stored in the collection.
        /// </summary>
        /// <param name="name">The header name.</param>
        /// <param name="values">The reference to populate with values.</param>
        /// <returns><c>true</c> if the specified header is stored in the collection, otherwise <c>false</c>.</returns>
        public bool TryGetHeaderValues(string name, out IEnumerable<string> values)
        {
            if (_headers.TryGetValue(name, out object objValue))
            {
                if (objValue is List<string> valuesList)
                {
                    values = valuesList;
                }
                else
                {
                    values = new List<string> { objValue as string };
                }

                return true;
            }

            values = null;
            return false;
        }

        /// <summary>
        /// Returns <c>true</c> if the header is stored in the collection.
        /// </summary>
        /// <param name="name">The header name.</param>
        /// <returns><c>true</c> if the specified header is stored in the collection, otherwise <c>false</c>.</returns>
        public bool ContainsHeader(string name)
        {
            return _headers.ContainsKey(name);
        }

        /// <summary>
        /// Sets a header value the header collection.
        /// </summary>
        /// <param name="name">The header name.</param>
        /// <param name="value">The header value.</param>
        public void SetHeader(string name, string value)
        {
            _headers[name] = value;
        }

        /// <summary>
        /// Removes the header from the collection.
        /// </summary>
        /// <param name="name">The header name.</param>
        public bool RemoveHeader(string name)
        {
            return _headers.Remove(name);
        }

        /// <summary>
        /// Returns an iterator enumerating <see cref="HttpHeader"/> in the request.
        /// </summary>
        /// <returns>The <see cref="IEnumerable{T}"/> enumerating <see cref="HttpHeader"/> in the response.</returns>
        public IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, (h.Value is List<string> values) ? JoinHeaderValue(values) : h.Value as string));

        private static string JoinHeaderValue(IEnumerable<string> values)
        {
            return string.Join(",", values);
        }
    }
}


text:
/**
* Notification.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs        :: http://sailsjs.org/#!documentation/models
*/

module.exports = {

    attributes: {
        user: { model: 'User', required: true },
        type: { type: 'string' },
        title: { type: 'string' },
        message: { type: 'text' }
    }
};