text:
package org.wso2.ei.dataservice.integration.test.services;

import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.AxisFault;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.test.utils.axis2client.AxisServiceClient;
import org.wso2.carbon.automation.test.utils.concurrency.test.ConcurrencyTest;
import org.wso2.carbon.automation.test.utils.concurrency.test.exception.ConcurrencyTestFailedError;
import org.wso2.ei.dataservice.integration.test.DSSIntegrationTest;

import javax.xml.namespace.QName;
import javax.xml.xpath.XPathExpressionException;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * This class performs tests, which related to Return Generated Keys.
 */
public class ReturnGeneratedKeysTestCase extends DSSIntegrationTest {
	private final OMFactory factory = OMAbstractFactory.getOMFactory();
	private final OMNamespace omNs =
			factory.createOMNamespace("http://ws.wso2.org/dataservice/samples/returnGeneratedKeysSample", "ns1");
	private final String serviceName = "H2ReturnGeneratedKeysTest";

	@BeforeClass(alwaysRun = true)
	public void serviceDeployment() throws Exception {
		super.init();
		List<File> sqlFileLis = new ArrayList<>();
		sqlFileLis.add(selectSqlFile("CreateTables.sql"));
		deployService(serviceName, createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator +
		                                          "rdbms" + File.separator + "h2" + File.separator +
		                                          "H2ReturnGeneratedKeysTest.dbs", sqlFileLis));
	}

	@AfterClass(alwaysRun = true)
	public void destroy() throws Exception {
		deleteService(serviceName);
		cleanup();
	}

	@Test(groups = "wso2.dss", description = "Invoking insert operation with Return Generated Keys" , dependsOnMethods = "performConcurrencyTest")
	public void performInsertWithReturnGeneratedKeysTest() throws AxisFault, XPathExpressionException {
		OMElement payload = factory.createOMElement("insertBalance", omNs);
		OMElement queryElement = factory.createOMElement("balance", omNs);
		queryElement.setText("22.184");
		payload.addChild(queryElement);
		OMElement result = new AxisServiceClient().sendReceive(payload, getServiceUrlHttp(serviceName), "insertBalance");
		/* id should be 26 because concurrency test has been performed before this method */
		boolean id = "26".equals(result.getFirstElement().getFirstChildWithName(
				new QName("http://ws.wso2.org/dataservice/samples/returnGeneratedKeysSample", "ID")).getText());
		Assert.assertTrue(id, "Insert operation with return generated keys is failed");
	}

	@Test(groups = "wso2.dss", description = "Concurrency Test for Return Generated Keys")
	public void performConcurrencyTest() throws ConcurrencyTestFailedError, InterruptedException,
	                                            XPathExpressionException {
		ConcurrencyTest concurrencyTest = new ConcurrencyTest(5, 5);
		OMElement payload = factory.createOMElement("insertBalance", omNs);
		OMElement queryElement = factory.createOMElement("balance", omNs);
		queryElement.setText("144.184");
		payload.addChild(queryElement);
		concurrencyTest.run(getServiceUrlHttp(serviceName), payload, "insertBalance");
	}

}


text:
<?php

namespace AppBundle\Factory\Item\Assignments;

use AppBundle\Entity\Assignments\MagazineCategoryAssignment;
use AppBundle\Factory\Item\Base\ItemFactory;

class MagazineCategoryAssignmentFactory extends ItemFactory {

	public function __construct() {
		parent::__construct(MagazineCategoryAssignment::class);
	}
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using GalaSoft.MvvmLight;

namespace PoliceSoft.Aquas.Model.Initializer.Models
{
	/// <summary>
	/// Represents Data Source in connection string
	/// </summary>
	public class Connection : TreeViewItemModel
	{
		public Connection(DbConnection dbConnection, DataSourcePriority priority)
		{
			DbConnection = dbConnection;
			Priority = priority;
			Databases = new ObservableCollection<Database>();
			DatabasesView = CollectionViewSource.GetDefaultView(Databases);
        }

		public DbConnection DbConnection { get; private set; }

		public DataSourcePriority Priority { get; private set; }

		public ObservableCollection<Database> Databases { get; private set; }

		public ICollectionView DatabasesView { get; private set; }
	}
}


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddPaymentColumns extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('users', function($table)
		{
		    $table->string('customer_id');
		    $table->string('recipient_id');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('users', function($table)
		{
		    $table->dropColumn( ['customer_id', 'recipient_id'] );
		});
	}

}


text:
app.registerInterface("Interface/AddonableInterface", {

    hasAddons: function() {},

    addAddon: function(addon) {},

    getAddons: function() {}

});


text:
/////////////////////////////////////////////////////////////////////////////////////////
//
// The MIT License (MIT)
//
// Copyright (c) 2014-2015 Keld Oelykke
//
// 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.
//
/////////////////////////////////////////////////////////////////////////////////////////

package starkcoder.failfast.unit.objects.doubles;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;

import starkcoder.failfast.FailFast;
import starkcoder.failfast.IFailFast;
import starkcoder.failfast.SFailFast;
import starkcoder.failfast.checks.Checker;
import starkcoder.failfast.checks.IChecker;
import starkcoder.failfast.contractors.CallContractor;
import starkcoder.failfast.contractors.ICallContractor;
import starkcoder.failfast.fails.FailFastException;
import starkcoder.failfast.fails.Failer;
import starkcoder.failfast.fails.IFailer;

/**
 * Fail-fast unit test of {link:IObjectDoubleNotEqualsAlmostCheck} and
 * {link:IObjectDoubleNotEqualsAlmostFail}.
 *
 * @author Keld Oelykke
 */
public class DoubleNotEqualsAlmostTest
{

  private IChecker checker;
  private IFailer failer;
  private String toString = null;

  @Override
  public String toString()
  {
    return this.toString;
  }

  @Rule
  public TestWatcher watcher = new TestWatcher()
  {
    protected void starting(Description description)
    {
      toString = description.getTestClass().getSimpleName() + "." + description.getMethodName();
    }
  };

  /**
   * Setup FailFast instances.
   */
  @Before
  public void setUp()
  {
    // this would be in you application startup section
    ICallContractor callContractor = new CallContractor();
    IFailFast failFastOrNull = new FailFast(new Checker(callContractor),
        new Failer(callContractor), callContractor);
    SFailFast.setFailFastOrNull(failFastOrNull);
    this.checker = SFailFast.getChecker();
    this.failer = SFailFast.getFailer();
  }

  /**
   * Clear FailFast instances.
   */
  @After
  public void tearDown()
  {
    // this would be in you application shutdown section
    SFailFast.setFailFastOrNull(null);
    this.checker = null;
    this.failer = null;
  }

  // 1st - caller checks

  @Test(expected = IllegalArgumentException.class)
  public void testDoubleNotEqualsAlmostCheckerCallerIsNull()
  {
    double valueA = 0.123f;
    double valueB = 0.1234f;
    if (checker.isDoubleNotEqualsAlmost(null, valueA, valueB))
    {
      failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
    }
  }

  @Test(expected = IllegalArgumentException.class)
  public void testDoubleNotEqualsAlmostFailerCallerIsNull()
  {
    double valueA = 0.123f;
    double valueB = 0.1241d;
    if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB))
    {
      failer.failDoubleNotEqualsAlmost(null, "valueA", "valueB");
    }
  }

  @Test(expected = IllegalStateException.class)
  public void testDoubleFailerCallerIsWrong()
  {
    double valueA = 0.123f;
    double valueB = 0.1241d;
    if (checker.isDoubleNotEqualsAlmost(new String("Foo"), valueA, valueB))
    {
      failer.failDoubleNotEqualsAlmost(new String("Bar"), "valueA", "valueB");
    }
  }

  // 2nd - mismatch calls

  @Test(expected = IllegalStateException.class)
  public void testDoubleNotEqualsAlmostMismatchCheckCheck()
  {
    double valueA = 0.123f;
    double valueB = 0.1241d;
    if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB))
    {
      checker.isDoubleNotEqualsAlmost(this, valueA, valueB);
    }
  }

  @Test(expected = IllegalStateException.class)
  public void testDoubleNotEqualsAlmostMismatchFail()
  {
    failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
  }

  @Test(expected = IllegalStateException.class)
  public void testDoubleNotEqualsAlmostMismatchWrongCheck()
  {
    double valueA = 0.123f;
    double valueB = 0.123f;
    if (checker.isDoubleEqualsAlmost(this, valueA, valueB)) // wrong call
    {
      failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
    }
  }

  @Test(expected = IllegalStateException.class)
  public void testDoubleNotEqualsAlmostMismatchWrongFail()
  {
    double valueA = 0.123f;
    double valueB = 0.1241d;
    if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB))
    {
      failer.failDoubleEqualsAlmost(this, "valueA", "valueB"); // wrong call
    }
  }

  // 3rd - normal cases

  @Test(expected = FailFastException.class)
  public void testDoubleNotEqualsAlmostFailNoMessage()
  {
    double valueA = 0.123f;
    double valueB = 0.1241d;
    try
    {
      if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB))
      {
        failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
      }
    }
    catch (FailFastException failFastException)
    {
      assertEquals("Expected registered exception in failer", failFastException,
          failer.getFailFastExceptionOrNull());
      System.out.println(failFastException.getMessage());
      throw failFastException;

    }
  }

  @Test(expected = FailFastException.class)
  public void testDoubleNotEqualsAlmostFailMessage()
  {
    double valueA = 0.1241d;
    double valueB = 0.123f;
    try
    {
      if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB))
      {
        failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB", "Extra info goes here");
      }
    }
    catch (FailFastException failFastException)
    {
      assertEquals("Expected registered exception in failer", failFastException,
          failer.getFailFastExceptionOrNull());
      System.out.println(failFastException.getMessage());
      throw failFastException;

    }
  }

  @Test
  public void testDoubleNotEqualsAlmostNoFail()
  {
    double valueA = 0.123001d;
    double valueB = 0.123f;
    if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB))
    {
      failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
    }
    assertTrue("Expected valueA & valueB to pass the equals check", true);
    assertNull("Expected no registered exception in failer", failer.getFailFastExceptionOrNull());
  }

  @Test
  public void testDoubleNotEqualsAlmostSameReferenceNoFail()
  {
    Double referenceA = 0.123001d;
    Double referenceB = referenceA;
    if (checker.isDoubleNotEqualsAlmost(this, referenceA, referenceB))
    {
      failer.failDoubleNotEqualsAlmost(this, "referenceA", "referenceB");
    }
    assertTrue("Expected referenceA & referenceB to pass the equals check", true);
    assertNull("Expected no registered exception in failer", failer.getFailFastExceptionOrNull());
  }

  // 4tf - method override cases

  @Test(expected = FailFastException.class)
  public void testDoubleNotEqualsAlmostOverrideFailNoMessage()
  {
    double valueA = 0.121d;
    double valueB = 0.12d;
    try
    {
      if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB, 0.0001d))
      {
        failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
      }
    }
    catch (FailFastException failFastException)
    {
      assertEquals("Expected registered exception in failer", failFastException,
          failer.getFailFastExceptionOrNull());
      System.out.println(failFastException.getMessage());
      throw failFastException;

    }
  }

  @Test(expected = FailFastException.class)
  public void testDoubleNotEqualsAlmostOverrideFailMessage()
  {
    double valueA = 0.111d;
    double valueB = 0.1d;
    try
    {
      if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB, 0.01d))
      {
        failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB", "Extra info goes here");
      }
    }
    catch (FailFastException failFastException)
    {
      assertEquals("Expected registered exception in failer", failFastException,
          failer.getFailFastExceptionOrNull());
      System.out.println(failFastException.getMessage());
      throw failFastException;

    }
  }

  @Test
  public void testDoubleNotEqualsAlmostOverrideNoFail()
  {
    double valueA = 0.1234f;
    double valueB = -0.123f;
    if (checker.isDoubleNotEqualsAlmost(this, valueA, valueB, 2d))
    {
      failer.failDoubleNotEqualsAlmost(this, "valueA", "valueB");
    }
    assertTrue("Expected valueA & valueB to pass the equals check", true);
    assertNull("Expected no registered exception in failer", failer.getFailFastExceptionOrNull());
  }

}


text:
package org.teavm.jso.dom.events;

import org.teavm.jso.JSProperty;

public interface HashChangeEvent extends Event {
    @JSProperty
    String getOldURL();

    @JSProperty
    String getNewURL();
}


text:
using System;
using MasterExtensionKit.Core.Exceptions;
using MasterExtensionKit.Core.Objects.Validations;

namespace MasterExtensionKit.Core.Datetimes.Functions
{
	/// <summary>
	///     DateTime Extension Method
	/// </summary>
	public static class StartOfWeekExtensions
	{
		/// <summary>
		///     Get the start of the week for the given date
		/// </summary>
		/// <param name="source">The datetime source</param>
		/// <param name="startOfWeek">Optional: DayOfWeek to start the week</param>
		/// <returns>DateTime for the start of the week for the source datetime</returns>
		public static DateTime StartOfWeek(this DateTime source, DayOfWeek startOfWeek = DayOfWeek.Monday)
		{
			if (source.IsNull())
			{
				throw new SourceNullException(nameof(source));
			}

			var diff = source.DayOfWeek - startOfWeek;
			if (diff < 0)
			{
				diff += 7;
			}

			return source.AddDays(-1*diff).Date;
		}
	}
}


text:
package org.openhealthtools.openxds.webapp.control;

import java.util.ArrayList;
import org.apache.axiom.om.OMElement;

/**
 * This class builds GetSubmissionSets query.
 * @author Anil Kumar
 */

public class GetSubmissionSets extends Sq {
	ArrayList<String> ids = null;

	String query_details() {
		return "GetSubmissionSets " + ids;
	}

	OMElement build(ArrayList<String> ids) {
		this.ids = ids;
		ArrayList<OMElement> query = build_query_wrapper("urn:uuid:51224314-5390-4169-9b91-b1980040715a");

		add_slot(query, "$uuid", this.query_array_list(ids));
		return query.get(0);
	}

}


text: develop some web game use HTML5 & CSS3 & some other new modern web techniques.


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

<TITLE>
SyntacticOperand.Expr
</TITLE>

<META NAME="keywords" CONTENT="avrora.syntax.SyntacticOperand.Expr class">

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

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

avrora.syntax

Class SyntacticOperand.Expr

java.lang.Object
  avrora.syntax.ASTNode
      avrora.syntax.SyntacticOperand
          avrora.syntax.SyntacticOperand.Expr

All Implemented Interfaces:
Operand, Operand.Constant

Enclosing class:
SyntacticOperand

public static class SyntacticOperand.Expr
extends SyntacticOperand
implements Operand.Constant

The SyntacticOperand.Expr class represents a constant expression that was specified in the
 source assembly as an expression. This expression might be compound and need to be evaluated before its
 actual value is known.

Nested Class Summary

Nested classes inherited from class avrora.syntax.SyntacticOperand

SyntacticOperand.Expr, SyntacticOperand.Register

Nested classes inherited from class avrora.core.Operand

Operand.Constant, Operand.Register

Field Summary

 Expr
expr

Fields inherited from class avrora.syntax.SyntacticOperand

left, right

Constructor Summary

SyntacticOperand.Expr(Expr e,
                      boolean b)

Method Summary

 Operand.Constant
asConstant()

          The asConstant() method uses virtual dispatch to avoid a cast.

 int
getValue()

          The getvalue() method returns the integer value of this constant operand.

 int
getValueAsWord()

          The getValueAsWord() method returns the value of this constant operand as
 word-aligned; meaning, for addresses, it will divide by 2, but for immediate constants
 it will not.

 void
simplify(int nextByteAddress,
         Context c)

 java.lang.String
toString()

Methods inherited from class avrora.syntax.SyntacticOperand

asRegister, getLeftMostToken, getRightMostToken

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods inherited from interface avrora.core.Operand

asRegister

Field Detail

expr

public final Expr expr

Constructor Detail

SyntacticOperand.Expr

public SyntacticOperand.Expr(Expr e,
                             boolean b)

Method Detail

asConstant

public Operand.Constant asConstant()

Description copied from interface: Operand

The asConstant() method uses virtual dispatch to avoid a cast. If this operand is an
 instance of Operand.Constant it will return itself. Otherwise, it will return null.

Specified by:
asConstant in interface Operand
Overrides:
asConstant in class SyntacticOperand

getValue

public int getValue()

Description copied from interface: Operand.Constant

The getvalue() method returns the integer value of this constant operand.

Specified by:
getValue in interface Operand.Constant

Returns:
an integer representation of the value

getValueAsWord

public int getValueAsWord()

Description copied from interface: Operand.Constant

The getValueAsWord() method returns the value of this constant operand as
 word-aligned; meaning, for addresses, it will divide by 2, but for immediate constants
 it will not.

Specified by:
getValueAsWord in interface Operand.Constant

Returns:
an integer representation of the value, word-aligned if it is an address

simplify

public void simplify(int nextByteAddress,
                     Context c)

Specified by:
simplify in class SyntacticOperand

toString

public java.lang.String toString()

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
package org.python.core;

import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.lang.reflect.InvocationTargetException;
import java.lang.InstantiationException;

public class PyReflectedConstructor extends PyReflectedFunction
{
    public static PyClass __class__;

    public PyReflectedConstructor(String name) {
        super(name, __class__);
        __name__ = name;
        argslist = new ReflectedArgs[1];
        nargs = 0;
    }

    public PyReflectedConstructor(Constructor c) {
        this(c.getDeclaringClass().getName());
        addConstructor(c);
    }

    private ReflectedArgs makeArgs(Constructor m) {
        return new ReflectedArgs(m, m.getParameterTypes(),
                                 m.getDeclaringClass(), true);
    }

    public void addConstructor(Constructor m) {
        int mods = m.getModifiers();
        // Only add public methods unless we're overriding
        if (!Modifier.isPublic(mods) && !JavaAccessibility.accessIsMutable())
            return;
        addArgs(makeArgs(m));
    }

    public PyObject __call__(PyObject self, PyObject[] args,
                             String[] keywords)
    {
        ReflectedArgs[] argsl = argslist;

        if (self == null || !(self instanceof PyInstance)) {
            throw Py.TypeError("invalid self argument to constructor");
        }

        PyInstance iself = (PyInstance)self;
        Class javaClass = iself.__class__.proxyClass;
        //Class[] javaClasses = iself.__class__.proxyClasses;
        //int myIndex = -1;
        boolean proxyConstructor=false;
        Class declaringClass = argsl[0].declaringClass;

        // If this is the constructor for a proxy class or not...
        if (PyProxy.class.isAssignableFrom(declaringClass)) {
//             if (self instanceof PyJavaInstance) {
//                 throw Py.TypeError(
//                     "invalid self argument to proxy constructor");
//             }
        }
        else {
            if (!(iself instanceof PyJavaInstance)) {
                // Get proxy constructor and call it
                if (declaringClass.isAssignableFrom(javaClass)) {
                    proxyConstructor = true;
                } else {
                    throw Py.TypeError("invalid self argument");
                }

                PyJavaClass jc = PyJavaClass.lookup(javaClass);
                jc.initConstructors();
                return jc.__init__.__call__(iself, args, keywords);
            }
        }

        if (declaringClass.isAssignableFrom(javaClass)) {
            proxyConstructor = true;
        } else {
            throw Py.TypeError("self invalid - must implement: "+
                               declaringClass.getName());
        }

        if (iself.javaProxy != null) {
            Class sup = iself.__class__.proxyClass;
            if (PyProxy.class.isAssignableFrom(sup))
                sup = sup.getSuperclass();
            throw Py.TypeError("instance already instantiated for "+
                               sup.getName());
        }

        ReflectedCallData callData = new ReflectedCallData();
        Object method=null;

        // Remove keyword args
        int nkeywords = keywords.length;
        PyObject[] allArgs = args;
        if (nkeywords > 0) {
            args = new PyObject[allArgs.length-nkeywords];
            System.arraycopy(allArgs, 0, args, 0, args.length);
        }

        // Check for a matching constructor to call
        int n = nargs;
        for (int i=0; i<n; i++) {
            ReflectedArgs rargs = argsl[i];
            if (rargs.matches(null, args, Py.NoKeywords, callData)) {
                method = rargs.data;
                break;
            }
        }

        // Throw an error if no valid set of arguments
        if (method == null) {
            throwError(callData.errArg, args.length, self != null, false);
        }

        // Do the actual constructor call
        Object jself = null;
        ThreadState ts = Py.getThreadState();
        try {
            ts.pushInitializingProxy(iself);
            Constructor ctor = (Constructor)method;
            try {
                jself = ctor.newInstance(callData.getArgsArray());
            }
            catch (InvocationTargetException e) {
                if (e.getTargetException() instanceof InstantiationException){
                    Class sup = iself.__class__.proxyClass.getSuperclass();
                    String msg = "Constructor failed for Java superclass";
                    if (sup != null)
                        msg += " " + sup.getName();
                    throw Py.TypeError(msg);
                }
                else throw Py.JavaError(e);
            }
            catch (Throwable t) {
                throw Py.JavaError(t);
            }
        }
        finally {
            ts.popInitializingProxy();
        }

        iself.javaProxy = jself;

        // Do setattr's for keyword args
        int offset = args.length;
        for (int i=0; i<nkeywords; i++) {
            iself.__setattr__(keywords[i], allArgs[i+offset]);
        }
        return Py.None;
    }

    public PyObject __call__(PyObject[] args, String[] keywords) {
        if (args.length < 1) {
            throw Py.TypeError("constructor requires self argument");
        }
        PyObject[] newArgs = new PyObject[args.length-1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);

        return __call__(args[0], newArgs, keywords);
    }

    public String toString() {
        //printArgs();
        return "<java constructor "+__name__+" "+Py.idstr(this)+">";
    }
}


text:
<!DOCTYPE html>
<title>flexbox | align-items: baseline</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#propdef-align-items">
<link rel="match" href="flexbox_align-items-baseline-ref.html">

	one
	two
	three


text:
import React from 'react';
import {bindActionCreators, bindActionCreator} from 'redux';
import {reduxForm} from 'redux-form';
import validator from 'validator';
import {setTitle, reduxAwait} from '../../../utils/index';
import {authLogin} from '../../actions/AuthAction';
import Login from '../../../components/pages/member/Login';

class LoginContainer extends React.Component {
    onSubmit(...args) {
        this.props.authLogin(...args);
    }
    componentDidMount(){
        setTitle('Login');
    }
    render() {
        return (
            <Login {...this.props} onSubmit={this.onSubmit.bind(this)}/>
        )
    }
}

const fields = ['email', 'password'];

const validate = (values) => {
    const {email, password} = values;
    const errors = {};

    if (!email) errors.email = 'Required';
    else if (!validator.isEmail(email)) errors.email = 'Not valid email';

    if (!password) errors.password = 'Required';

    return errors;
}

const mapStateToProps = (state)=> {
    return {
        guest: state.auth.authenticated.guest
    }
}

const mapDispatchToProps = (dispatch)=> {
    return bindActionCreators({authLogin}, dispatch)
}

let LoginForm = reduxForm({
    form: 'Login',
    fields,
    validate
})(LoginContainer);

export default reduxAwait.connect(mapStateToProps, mapDispatchToProps)(LoginForm);


text:
package term

import "syscall"

const ioctlReadTermios = syscall.TIOCGETA

type Termios syscall.Termios


text:
namespace djinni_generated {

class OtherRecord final {
public:
    using CppType = ::OtherRecord;
    using JniType = jobject;

    using Boxed = OtherRecord;

    ~OtherRecord();

    static CppType toCpp(JNIEnv* jniEnv, JniType j);
    static ::djinni::LocalRef<JniType> fromCpp(JNIEnv* jniEnv, const CppType& c);

private:
    OtherRecord();
    friend ::djinni::JniClass<OtherRecord>;

    const ::djinni::GlobalRef<jclass> clazz { ::djinni::jniFindClass("djinni/it/OtherRecord") };
    const jmethodID jconstructor { ::djinni::jniGetMethodID(clazz.get(), "<init>", "(Ldjinni/it/CustomDatatype;)V") };
    const jfieldID field_customDatatypeData { ::djinni::jniGetFieldID(clazz.get(), "customDatatypeData", "Ldjinni/it/CustomDatatype;") };
};

}  // namespace djinni_generated


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="AF">Африкаанс</string>
    <string name="AR">Арабский</string>
    <string name="AZ">Азербайджанский</string>
    <string name="BE">Белорусский</string>
    <string name="BG">Болгарский</string>
    <string name="BN">Бенгальский</string>
    <string name="BO">Тибетский</string>
    <string name="BR">Бретонский</string>
    <string name="BS">Боснийский</string>
    <string name="CA">Каталанский</string>
    <string name="CI">Валлийский</string>
    <string name="cmn">Мандарин</string>
    <string name="CS">Чешский</string>
    <string name="DA">Датский</string>
    <string name="DE">Немецкий</string>
    <string name="EL">Греческий</string>
    <string name="EN">Английский</string>
    <string name="EO">Эсперанто</string>
    <string name="ES">Испанский</string>
    <string name="ET">Эстонский</string>
    <string name="EU">Баскский</string>
    <string name="FA">Персидский</string>
    <string name="FI">Финский</string>
    <string name="FO">Фарерский</string>
    <string name="FR">Французский</string>
    <string name="GA">Ирландский</string>
    <string name="GD">Гэльский</string>
    <string name="GL">Галисийский</string>
    <string name="grc">Древнегреческий</string>
    <string name="GV">Мэнский</string>
    <string name="haw">Гавайский</string>
    <string name="HE">Иврит</string>
    <string name="HI">Хинди</string>
    <string name="HR">Хорватский</string>
    <string name="HT">Гаитянский креольский</string>
    <string name="HU">Венгерский</string>
    <string name="HY">Армянский</string>
    <string name="ID">Индонезийский</string>
    <string name="IS">Исландский</string>
    <string name="IT">Итальянский</string>
    <string name="JA">Японский</string>
    <string name="KA">Грузинский</string>
    <string name="KO">Корейский</string>
    <string name="KU">Курдский</string>
    <string name="LA">Латинский</string>
    <string name="LB">Люксембургский</string>
    <string name="LO">Лаосский</string>
    <string name="LT">Литовский</string>
    <string name="LV">Латышский</string>
    <string name="MI">Маори</string>
    <string name="MK">Македонский</string>
    <string name="ML">Малаялам</string>
    <string name="MN">Монгольский</string>
    <string name="MR">Маратхи</string>
    <string name="MS">Малайский</string>
    <string name="MY">Бирманский</string>
    <string name="NE">Непальский</string>
    <string name="NL">Голландский</string>
    <string name="NO">Норвежский</string>
    <string name="PA">Панджаби</string>
    <string name="PL">Польский</string>
    <string name="PT">Португальский</string>
    <string name="RO">Румынский</string>
    <string name="RU">Русский</string>
    <string name="SA">Санскрит</string>
    <string name="SD">Синдхи</string>
    <string name="SH">Сербохорватский</string>
    <string name="SK">Словацкий</string>
    <string name="SL">Словенский</string>
    <string name="SO">Сомалийский</string>
    <string name="SQ">Албанский</string>
    <string name="SR">Сербский</string>
    <string name="SV">Шведский</string>
    <string name="SW">Суахили</string>
    <string name="TA">Тамильский</string>
    <string name="TG">Таджикский</string>
    <string name="TH">Тайский</string>
    <string name="TL">Тагальский</string>
    <string name="TR">Турецкий</string>
    <string name="UK">Украинский</string>
    <string name="UR">Урду</string>
    <string name="VI">Вьетнамский</string>
    <string name="YI">Идиш</string>
    <string name="yue">Кантонский</string>
    <string name="ZH">Китайский</string>
    <string name="ZU">Зулусский</string>

</resources>


text:
var exec = require('cordova/exec');

var success = function (msg) {
    //console.log("success:" + msg);
};

var error = function (msg) {
    //console.log("error:" + msg);
};

var callbacks = {};

var ApkAutoUpdater = {
    updateFromUrl: function (strUrl, success, error) {
        exec(function (id) {
            if (typeof success !== "undefined")
                success(id);
        }, function (err) {
            if (typeof err !== "undefined")
                error(err)
        }, "ApkAutoUpdatePlugin", "updateFromUrl", [strUrl]);
    }
};

module.exports = ApkAutoUpdater;


text:
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

"use strict";

const formatLocation = require("../formatLocation");
const UnsupportedWebAssemblyFeatureError = require("./UnsupportedWebAssemblyFeatureError");

/** @typedef {import("../Compiler")} Compiler */

class WasmFinalizeExportsPlugin {
	/**
	 * Apply the plugin
	 * @param {Compiler} compiler the compiler instance
	 * @returns {void}
	 */
	apply(compiler) {
		compiler.hooks.compilation.tap("WasmFinalizeExportsPlugin", compilation => {
			compilation.hooks.finishModules.tap(
				"WasmFinalizeExportsPlugin",
				modules => {
					for (const module of modules) {
						// 1. if a WebAssembly module
						if (module.type.startsWith("webassembly") === true) {
							const jsIncompatibleExports =
								module.buildMeta.jsIncompatibleExports;

							if (jsIncompatibleExports === undefined) {
								continue;
							}

							for (const connection of compilation.moduleGraph.getIncomingConnections(
								module
							)) {
								// 2. is active and referenced by a non-WebAssembly module
								if (
									connection.isTargetActive(undefined) &&
									connection.originModule.type.startsWith("webassembly") ===
										false
								) {
									const referencedExports =
										compilation.getDependencyReferencedExports(
											connection.dependency,
											undefined
										);

									for (const info of referencedExports) {
										const names = Array.isArray(info) ? info : info.name;
										if (names.length === 0) continue;
										const name = names[0];
										if (typeof name === "object") continue;
										// 3. and uses a func with an incompatible JS signature
										if (
											Object.prototype.hasOwnProperty.call(
												jsIncompatibleExports,
												name
											)
										) {
											// 4. error
											const error = new UnsupportedWebAssemblyFeatureError(
												`Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies\n` +
													`It's used from ${connection.originModule.readableIdentifier(
														compilation.requestShortener
													)} at ${formatLocation(connection.dependency.loc)}.`
											);
											error.module = module;
											compilation.errors.push(error);
										}
									}
								}
							}
						}
					}
				}
			);
		});
	}
}

module.exports = WasmFinalizeExportsPlugin;


text:
#if NO_COROUTINES
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LionFire.Behaviors
{

    public interface IHasPollingProvider
    {
        IPollingProvider PollingProvider { get; }
    }
}
#endif


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

    <style name="translucent_no_title" parent="@android:style/Theme.Dialog">
        <item name="android:background">#00000000</item> <!-- 设置自定义布局的背景透明 -->
        <item name="android:windowBackground">@android:color/transparent</item>  <!-- 设置window背景透明,也就是去边框 -->
        <item name="android:windowFrame">@null</item><!--边框-->
        <item name="android:windowIsFloating">true</item><!--是否浮现在activity之上-->
        <item name="android:windowIsTranslucent">false</item><!--半透明-->
        <item name="android:windowNoTitle">true</item><!--无标题-->
        <item name="android:backgroundDimEnabled">false</item><!--模糊-->
    </style>
</resources>


text:
A Pendulum on Cart
------------------

A pendulum is fixed on a cart, which can move in the horizontal direction.
The cart has a mass :math:`M`.
The friction between the cart and the surface causes a frictional force :math:`F_R = D \cdot \dot{s}`, in opposite direction to the movement of the cart.
The pendulum has a mass :math:`m`, a moment of intertia :math:`J`, a length :math:`l` and an angle of deflection :math:`\varphi`.
The friction in the joint where the pendulum is mounted on the cart causes a frictional torque :math:`M_R = d \cdot \dot{\varphi}`,
in opposite direction to the rotational speed of the pendululm.
The system is illustrated in :numref:`fig-rodpend`.

The task is to control the position :math:`s` of the cart
and to stabilize the pendulum in its downside position.
The possibility of stabilizing the pendulum in its upside position is not implemented in this tutorial.
Actuating variable is the force :math:`F`.

.. _fig-rodpend:
.. figure:: pictures/rodPendulum.png
    :align: center
    :width: 90%
    :alt: Image of the Pendulum on a Cart System

    The pendulum on an cart system

With the state vector

.. math::

    \boldsymbol{x}
    =
    \begin{pmatrix}
        x_1 \\
        x_2 \\
        x_3 \\
        x_4
    \end{pmatrix}
    =
    \begin{pmatrix}
        s \\
        \varphi \\
        \dot{s} \\
        \dot{\varphi}
    \end{pmatrix} ,

the model equations are given by

.. math::

    \boldsymbol{\dot{x}}
    =
    \begin{pmatrix}
        \dot{x_1} \\
        \dot{x_2} \\
        \dot{x_3} \\
        \dot{x_4}
    \end{pmatrix}
    =
    \begin{pmatrix}
        x_3 \\
        x_4 \\
        \frac{JF - JDx_3 - mlJ{x_4}^2 \sin(x_2) + m^2 l^2 g \sin(x_2)\cos(x_2) - mldx_4\cos(x_2)}
            {(M+m)J - (ml\cos(x_2))^2} \\
        \frac{ml\cos(x_2)F - mlDx_3\cos(x_2) - (mlx_4)^2 \sin(x_2)\cos(x_2) + (M+m)mlg\sin(x_2) - (M+m)dx_4}
            {(M+m)J - (ml\cos(x_2))^2}
    \end{pmatrix} .

The cart's position

.. math::

    y = x_1 = s

is chosen as output of the system.
With this model given, the next step is to implement a class containing these equations.


text:
BM_ROOT=$(shell pwd)
PATH := $(BM_ROOT)/node_modules/.bin:$(PATH)

all: setup

setup:
	npm install

run: setup
	forever -w server.js

start: setup
	forever start -l $(BM_ROOT)/log/log \
		-o $(BM_ROOT)/log/out -e $(BM_ROOT)/log/err server.js

stop: setup
	forever stop server.js

restart: stop start


text:
package kr.ac.kaist.pororo.uncontactable;

import android.app.Notification;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;

/**
 * Service to block outgoing calls by holding broadcasting receiver.
 */
public class BlockService extends Service {
  private BroadcastReceiver outgoingCallReceiver;

  public BlockService() {
  }

  @Override
  public void onCreate() {
    super.onCreate();
    outgoingCallReceiver = new OutgoingCallReceiver();
    IntentFilter intentFilter = new IntentFilter(Intent.ACTION_NEW_OUTGOING_CALL);
    intentFilter.setPriority(0);
    registerReceiver(outgoingCallReceiver, intentFilter);
  }

  @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
    startForeground(1, new Notification());
    return START_STICKY;
  }

  @Override
  public void onDestroy() {
    super.onDestroy();
    unregisterReceiver(outgoingCallReceiver);
  }

  @Override
  public IBinder onBind(Intent intent) {
    return null;
  }
}


text:
<?php

namespace Category\Model\Mapper;

use Tiddr\Mapper\Base;
/**
 * Description of Category
 *
 * @author wangting
 */
class Category extends Base
{
    protected $tableName = 'category';
}

?>


text:
#ifndef VICE_CBM2MEMSNAPSHOT_H
#define VICE_CBM2MEMSNAPSHOT_H

struct snapshot_s;

extern int cbm2_snapshot_write_module(struct snapshot_s *s, int save_roms);
extern int cbm2_snapshot_read_module(struct snapshot_s *s);

#endif


text:
	= Seattle Clearinghouse XML-RPC Client Library =

The Seattle Clearinghouse XML-RPC Client Library is a Python XMLRPC client for communicating with the Seattle Clearinghouse XML-RPC Interface.

You can download the the client from here: [source:seattle/trunk/seattlegeni/xmlrpc_clients/seattleclearinghouse_xmlrpc.py Seattle Clearinghouse Python XMLRPC Client]. Look for the link to "original format" at the bottom of that page to download the file.

### Usage
  1. Download the client code linked to above (it is a Python module).
  1. In your Python script, import seattleclearinghouse_xmlrpc.

  1. Create an instance (or multiple instances, if desired) of the class seattleclearinghouse_xmlrpc.SeattleClearinghouseClient.

     The following parameters can be passed to the constructor:
     * ''username'': Your username. (Required)
     * ''private_key_string'': Your private key. (Either this or the api_key is required)
     * ''api_key'': Your api_key.
     * ''xmlrpc_url'': The url where the Seattle Clearinghouse XMLRPC server is located. (Defaults is our main Seattle Clearinghouse testbed's xmlrpc url.)
     * ''allow_ssl_insecure'': True/False, if set to True, allows SSL to operate in an INSECURE manner. **Do not use allow_ssl_insecure=True in production code.** (Default is False)
     * ''ca_certs_file'': The location of a file containing your trusted CA certificates. (Default is a file named `cacert.pem` in the same directory that you place `seattleclearinghouse_xmlrpc.py` in.)
  1. Once a client object has been created, simply invoke the object's methods.

### Using Secure SSL
In order to perform secure SSL communication with Seattle Clearinghouse:
  * You must have M2Crypto installed.
  * You must set the value of CA_CERTIFICATES_FILE to the location of a PEM
    file containing CA certificates that you trust. If you don't know where
    this is on your own system, you can download this file from a site you
    trust. One such place to download this file from is: http://curl.haxx.se/ca/cacert.pem

If you can't fulfill the above requirements, you can still use this client with
XMLRPC servers that use https but you will be vulnerable to a man-in-the-middle
attack. To enable this insecure mode, include the argument `allow_ssl_insecure=True`
when creating a SeattleClearinghouseClient instance.

### SeattleClearinghouseClient Methods
Please note, these methods are not the same as the XML-RPC API calls.
The clientlib methods are simply convenient wrappers for those calls.
As such, most methods here have identical return values as the actual XMLRPC calls. Refer to the [wiki:SeattleGeniApi Seattle Clearinghouse XMLRPC API spec] for more info about what these functions return.

Available methods on SeattleClearinghouseClient objects:
  The acquire methods all return a list of acquired resources, following the Seattle Clearinghouse XMLRPC API spec.
  * ''acquire_lan_resources(num)'':  Acquires ''num'' LAN VMs.
  * ''acquire_wan_resources(num)'':  Acquires ''num'' WAN VMs.
  * ''acquire_nat_resources(num)'':  Acquires ''num'' NAT VMs.
  * ''acquire_random_resources(num)'':  Acquires ''num'' random VMs.

  * ''release_resources(handlelist)'':  Release all VMs referenced by handles given in ''handlelist''.

  * ''renew_resources(handlelist)'':  Renew all VMs referenced by handles given in ''handlelist'' (that is, extend their expiration dates to 7 days from the current time).

  * ''get_resource_info()'':  Get a list of dictionaries describing all VMs currently acquired by the account. Each dictionary is of the form {'node_ip':node_ip, 'node_port':node_port, 'vessel_id':vessel_id, 'node_id':node_id, 'handle':handle, 'expires_in_seconds':seconds}

  * ''get_account_info()'':  Get account information. This is a dictionary containing the keys{'user_port', 'user_name', 'max_vessels', 'user_affiliation'}

  * ''get_public_key()'':  Get user's public key.

### Exceptions
The following exceptions can be raised by SeattleClearinghouseClient methods:

  * SeattleClearinghouseError -- Base class for all exceptions raised by the SeattleClearinghouseClient.
  * CommunicationError -- Indicates that XMLRPC communication failed.
  * InternalError -- Indicates an unexpected error occurred, probably either a bug in this
    client or a bug in Seattle Clearinghouse.
  * AuthenticationError -- Indicates an authentication failure (invalid username and/or API key).
  * InvalidRequestError -- Indicates that the request is invalid.
  * NotEnoughCreditsError -- Indicates that the requested operation requires more VM credits to
    be available then the account currently has.
  * UnableToAcquireResourcesError -- Indicates that the requested operation failed because Seattle Clearinghouse was unable
    to acquire the requested resources.

See the comments in the seattleclearinghouse_xmlrpc.py file for details on when each exception is raised.

### Example
Here is an example of how to use the Seattle Clearinghouse XML-RPC Client. This could be a python script which you run.

```python
"""
Example of using the seattleclearinghouse_xmlrpc module's SeattleClearinghouseClient.

This script tries to acquire, renew, and release some VMs and prints out
various information along the way.
"""

# This module must be in your python path (for example, in the same directory
# as the current script is in).
import seattleclearinghouse_xmlrpc

USERNAME = "your_username"

# Only one of either the API key or the private key is needed. If providing
# your API key, be sure to pass the API key to the SeattleClearinghouseClient
# constructor below.
#API_KEY = "your_api_key"
PRIVATE_KEY_STRING = open("your_username.privatekey").read()

# Allowing SSL to be insecure means it will be susceptible to MITM attacks.
# See the instructions in seattleclearinghouse_xmlrpc.py for using SSL securely.
ALLOW_SSL_INSECURE = False

def do_example_acquire_renew_release():
  client = seattleclearinghouse_xmlrpc.SeattleClearinghouseClient(username=USERNAME,
                                                private_key_string=PRIVATE_KEY_STRING,
                                                allow_ssl_insecure=ALLOW_SSL_INSECURE)

  # Obtain general information about the account corresponding to the username
  # and API key.
  account_info = client.get_account_info()
  print("Account info: " + str(account_info))

  # Obtain information on VMs already acquired by this account.
  # The value returned is a list of dictionaries where each dictionary
  # describes a VM.
  already_acquired_vessels = client.get_resource_info()
  print("Vessels already acquired: " + str(already_acquired_vessels))

  print("Number of vessels this account has available to acquire: " +
        str(account_info['max_vessels'] - len(already_acquired_vessels)))

  # Attempt to acquire two VMs on WAN nodes.
  try:
    # This is a list of dictionaries just like the one above.
    newly_acquired_vessels = client.acquire_wan_resources(2)
  except seattleclearinghouse_xmlrpc.NotEnoughCreditsError, err:
    print("Couldn't acquire resources because we don't have enough vessel " +
          "credits: " + str(err))
    return
  except seattleclearinghouse_xmlrpc.UnableToAcquireResourcesError, err:
    print("Couldn't acquire vessels because Seattle Clearinghouse doesn't have enough " +
          "of what we asked for: " + str(err))
    return
  print("Acquired WAN vessel: " + str(newly_acquired_vessels))

  acquired_handle_list = []
  for infodict in newly_acquired_vessels:
    acquired_handle_list.append(infodict['handle'])

  # Attempt to renew the two VMs we just acquired.
  try:
    client.renew_resources(acquired_handle_list)
  except seattleclearinghouse_xmlrpc.NotEnoughCreditsError, err:
    # This is probably not going to happen immediately after acquiring vessels.
    print("Couldn't renew vessels because we are over our vessel credit " +
          "limit: " + str(err))
    return
  print("Renewed the vessel we just acquired.")

  print("Summary of all of our acquired vessels:")
  all_vessels_list = client.get_resource_info()
  for vesselinfo in all_vessels_list:
    print("Vessel " + str(vesselinfo["vessel_id"]) +
          " on nodemanager accessible at " + str(vesselinfo["node_ip"]) + ":" +
          str(vesselinfo["node_port"]) + " expires in " +
          str(vesselinfo["expires_in_seconds"]) + " seconds.")

  # Release the two VMs we just acquired.
  client.release_resources(acquired_handle_list)
  print("Released the vessel we just acquired.")

def main():
  try:
    do_example_acquire_renew_release()
  except seattleclearinghouse_xmlrpc.Seattle ClearinghouseError:
    # In a real script, you'd want to handle this. Could be an authentication
    # error, communication error, etc. You can use the fine-grained exceptions
    # rather than the base exception of Seattle ClearinghouseError to do different
    # things based on what the actual problem was.
    raise

if __name__ == "__main__":
  main()
```


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.igniterealtime</groupId>
	<artifactId>tinder</artifactId>
	<name>Tinder XMPP library</name>
	<version>1.3.0-SNAPSHOT</version>
	<organization>
		<name>Ignite Realtime</name>
		<url>http://www.igniterealtime.org</url>
	</organization>
	<description>Tinder is a Java based XMPP library, providing an implementation for XMPP stanzas and components. Tinders origins lie in code that's shared between Jive Software's Openfire and Whack implementations. The implementation that's provided in Tinder hasn't been written again from scratch. Instead, code has been moved from the original projects into Tinder, preserving al of the existing features and functionality. Most of the code that's now in Tinder is based on the org.xmpp package implementation that previously existed in Openfire and Whack. This is the code that defines classes such as Packet, JID, IQ, Component and their extensions. Additionally, some multi-purpose code (such as the DataForm and Result Set Management implementations have been moved to Tinder as well.</description>
	<url>http://www.igniterealtime.org/projects/tinder/</url>
	<inceptionYear>2009</inceptionYear>
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>5</version>
	</parent>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<issueManagement>
		<system>jira</system>
		<url>http://www.igniterealtime.org/issues/browse/TINDER</url>
	</issueManagement>
	<developers>
		<developer>
			<name>Guus der Kinderen</name>
			<roles>
				<role>Lead Developer</role>
			</roles>
			<email>guus.der.kinderen@gmail.com</email>
			<timezone>+1</timezone>
			<organization>Ignite Realtime</organization>
			<organizationUrl>http://www.igniterealtime.org</organizationUrl>
		</developer>
	</developers>
	<contributors>
		<contributor>
			<name>Matt Tucker</name>
			<roles>
				<role>Original author</role>
				<role>Developer</role>
			</roles>
			<email>matt@jivesoftware.com</email>
			<organization>Jive Software</organization>
			<organizationUrl>http://www.jivesoftware.com</organizationUrl>
			<timezone>-8</timezone>
		</contributor>
		<contributor>
			<name>Gaston Dombiak</name>
			<roles>
				<role>Developer</role>
			</roles>
			<email>gaston@jivesoftware.com</email>
			<organization>Jive Software</organization>
			<organizationUrl>http://www.jivesoftware.com</organizationUrl>
			<timezone>-8</timezone>
		</contributor>
		<contributor>
			<name>Guenther Niess</name>
			<roles>
				<role>Developer</role>
			</roles>
			<email>guenther.niess@web.de</email>
			<timezone>+1</timezone>
		</contributor>
	</contributors>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptorRefs>
						<descriptorRef>bin</descriptorRef>
						<descriptorRef>src</descriptorRef>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>dom4j</groupId>
			<artifactId>dom4j</artifactId>
			<version>1.6.1</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.6</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit-addons</groupId>
			<artifactId>junit-addons</artifactId>
			<version>1.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.jcip</groupId>
			<artifactId>jcip-annotations</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.5.8</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.5.8</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.gnu.inet</groupId>
			<artifactId>libidn</artifactId>
			<version>1.15</version>
		</dependency>
		<dependency>
			<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
			<artifactId>concurrentlinkedhashmap-lru</artifactId>
			<version>1.0_jdk5</version>
		</dependency>
	</dependencies>

</project>


text:
require File.expand_path('test_helper', __dir__)

describe ValidateWebsite::Core do
  describe 'invalid options' do
    it 'raise ArgumentError on wrong validation_type' do
      _(proc { ValidateWebsite::Core.new({ color: false }, :fail) })
        .must_raise ArgumentError
    end
  end
end


text:
#ifndef SPINE_BONEDATA_H_
#define SPINE_BONEDATA_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct spBoneData spBoneData;
struct spBoneData {
	const int index;
	const char* const name;
	spBoneData* const parent;
	float length;
	float x, y, rotation, scaleX, scaleY, shearX, shearY;
	int/*bool*/inheritRotation, inheritScale;

#ifdef __cplusplus
	spBoneData() :
		index(0),
		name(0),
		parent(0),
		length(0),
		x(0), y(0),
		rotation(0),
		scaleX(0), scaleY(0),
		shearX(0), shearY(0),
		inheritRotation(0), inheritScale(0) {
	}
#endif
};

spBoneData* spBoneData_create (int index, const char* name, spBoneData* parent);
void spBoneData_dispose (spBoneData* self);

#ifdef SPINE_SHORT_NAMES
typedef spBoneData BoneData;
#define BoneData_create(...) spBoneData_create(__VA_ARGS__)
#define BoneData_dispose(...) spBoneData_dispose(__VA_ARGS__)
#endif

#ifdef __cplusplus
}
#endif

#endif /* SPINE_BONEDATA_H_ */


text:
<?php
/**
 * @author  Ishwor Khadka <ishworkh@gmail.com>
 * @created 2016-12-09
 */

declare(strict_types = 1);

namespace ArrayIterator;

use ArrayIterator\ArrayElement\ArrayElementInterface;
use Generator;

/**
 * @author Ishwor Khadka <ishworkh@gmail.com>
 * @see \Test\ArrayIteratorFacadeTest
 */
class ArrayIteratorFacade
{
    /**
     * @param array $array
     *
     * @return ArrayElementInterface[]|Generator
     */
    public static function iterate(array $array):Generator
    {
        $Locator = ArrayIteratorLocator::getInstance();
        $ArrayIterator = $Locator->getArrayIteratorFactory()->createIterator($array);

        yield from $ArrayIterator->getElements();
    }

}


text:
dyngwplainlib=`uci show olsrd |grep dyn_gw_plain |awk {' FS="."; print $1"."$2 '}`
if [ -n "$dyngwplainlib" ]; then
	if [ ! "$(uci -q get $dyngwplainlib.ignore)" == 0 ]; then
		exit 1
	fi
else
	echo "dyngw_plain not found in olsrd config, exit"
	exit 1
fi

# check if we have a defaultroute with metric=0 in one of these tables: main table and gw-check table.
# If not exit here.
defroutemain="$(ip r s |grep default |grep -v metric)"
defroutegw-check="$(ip r s t gw-check |grep default |grep -v metric)"
if [ -z "$defroutegw-check" -a -z "$defroutemain" ]; then
	exit 1
fi

# get and shuffle list of testservers
testserver="$(uci -q get freifunk-gwcheck.hosts.host)"
[ -z "$testserver" ] && echo "No testservers found, exit" && exit

testserver="$(for t in $testserver; do echo $t; done | awk 'BEGIN {
	srand();
}
{
	l[NR] = $0;
}

END {
	for (i = 1; i <= NR; i++) {
		n = int(rand() * (NR - i + 1)) + i;
		print l[n];
		l[n] = l[i];
	}
}')"

check_internet() {
	for t in $testserver; do
		local test
		test=$(wget -q http://$t/conntest.html -O -| grep "Internet_works")
		if [ "$test" == "Internet_works" ]; then
			echo 0
			break
		else
			logger -t gw-check "Could not get test file from http://$t/conntest.html"
		fi
	done
}

iw=$(check_internet)

if [ "$iw" == 0 ]; then
	# check if we have a seperate routing table for our tests.
	# If yes, move defaultroute to normal table and delete table gw-check
	if [ -n "$defroutegw-check" ]; then
		ip r a $defroutegw-check
		ip r d $defroutegw-check t gw-check
		ip ru del fwmark 0x2 lookup gw-check
		for host in $testserver; do
			iptables -t mangle -D OUTPUT -d $host -p tcp --dport 80 -j MARK --set-mark 0x2
		done
		logger -t gw-check "Internet is available again, restoring default route ( $defroutegw-check)"
	fi

else
	# Check failed. If we have a defaultroute with metric=0 and it is already in table gw-check then do nothing.
	# If there is a defaultroute with metric=0 then remove it from the main routing table and add to table gw-check.
	if [ -z "$(ip ru s | grep gw-check)" -a -n "$defroutemain" ]; then
		ip rule add fwmark 0x2 lookup gw-check
		for host in $testserver; do
			iptables -t mangle -I OUTPUT -d $host -p tcp --dport 80 -j MARK --set-mark 0x2
		done
		ip r a $defroutemain table gw-check
		ip r d $defroutemain
		logger -t gw-check "Internet is not available, deactivating the default route ( $defroutemain)"
	fi
fi


text:
package org.springframework.boot.autoconfigure.h2;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Tests for {@link H2ConsoleAutoConfiguration}
 *
 * @author Andy Wilkinson
 * @author Marten Deinum
 * @author Stephane Nicoll
 */
public class H2ConsoleAutoConfigurationTests {

	private AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();

	@Rule
	public ExpectedException thrown = ExpectedException.none();

	@Before
	public void setupContext() {
		this.context.setServletContext(new MockServletContext());
	}

	@After
	public void close() {
		if (this.context != null) {
			this.context.close();
		}
	}

	@Test
	public void consoleIsDisabledByDefault() {
		this.context.register(H2ConsoleAutoConfiguration.class);
		this.context.refresh();
		assertThat(this.context.getBeansOfType(ServletRegistrationBean.class)).isEmpty();
	}

	@Test
	public void propertyCanEnableConsole() {
		this.context.register(H2ConsoleAutoConfiguration.class);
		TestPropertyValues.of("spring.h2.console.enabled:true").applyTo(this.context);
		this.context.refresh();
		assertThat(this.context.getBeansOfType(ServletRegistrationBean.class)).hasSize(1);
		ServletRegistrationBean<?> registrationBean = this.context
				.getBean(ServletRegistrationBean.class);
		assertThat(registrationBean.getUrlMappings()).contains("/h2-console/*");
		assertThat(registrationBean.getInitParameters()).doesNotContainKey("trace");
		assertThat(registrationBean.getInitParameters())
				.doesNotContainKey("webAllowOthers");
	}

	@Test
	public void customPathMustBeginWithASlash() {
		this.thrown.expect(BeanCreationException.class);
		this.thrown.expectMessage("Failed to bind properties under 'spring.h2.console'");
		this.context.register(H2ConsoleAutoConfiguration.class);
		TestPropertyValues
				.of("spring.h2.console.enabled:true", "spring.h2.console.path:custom")
				.applyTo(this.context);
		this.context.refresh();
	}

	@Test
	public void customPathWithTrailingSlash() {
		this.context.register(H2ConsoleAutoConfiguration.class);
		TestPropertyValues
				.of("spring.h2.console.enabled:true", "spring.h2.console.path:/custom/")
				.applyTo(this.context);
		this.context.refresh();
		assertThat(this.context.getBeansOfType(ServletRegistrationBean.class)).hasSize(1);
		ServletRegistrationBean<?> servletRegistrationBean = this.context
				.getBean(ServletRegistrationBean.class);
		assertThat(servletRegistrationBean.getUrlMappings()).contains("/custom/*");
	}

	@Test
	public void customPath() {
		this.context.register(H2ConsoleAutoConfiguration.class);
		TestPropertyValues
				.of("spring.h2.console.enabled:true", "spring.h2.console.path:/custom")
				.applyTo(this.context);
		this.context.refresh();
		assertThat(this.context.getBeansOfType(ServletRegistrationBean.class)).hasSize(1);
		ServletRegistrationBean<?> servletRegistrationBean = this.context
				.getBean(ServletRegistrationBean.class);
		assertThat(servletRegistrationBean.getUrlMappings()).contains("/custom/*");
	}

	@Test
	public void customInitParameters() {
		this.context.register(H2ConsoleAutoConfiguration.class);
		TestPropertyValues
				.of("spring.h2.console.enabled:true",
						"spring.h2.console.settings.trace=true",
						"spring.h2.console.settings.webAllowOthers=true")
				.applyTo(this.context);
		this.context.refresh();
		assertThat(this.context.getBeansOfType(ServletRegistrationBean.class)).hasSize(1);
		ServletRegistrationBean<?> registrationBean = this.context
				.getBean(ServletRegistrationBean.class);
		assertThat(registrationBean.getUrlMappings()).contains("/h2-console/*");
		assertThat(registrationBean.getInitParameters()).containsEntry("trace", "");
		assertThat(registrationBean.getInitParameters()).containsEntry("webAllowOthers",
				"");
	}

}


text:
extern "C" {
  #include "LIBRARY/src/bid_feraiseexcept.c"
}

#  pragma GCC diagnostic pop

#endif


text:
At a field to the stage at a specific index or append it to the list. The `addField` action take 2 arguments, the fieldData in js format and optionally an insertion index.

## Usage
```javascript
  var fbEditor = document.getElementById('build-wrap');
  var formBuilder = $(fbEditor).formBuilder();

  var buttons = document.getElementsByClassName('addFieldBtn');
  for (var i = 0; i < buttons.length; i++) {
    buttons[i].onclick = function() {
      var field = {
          type: 'text',
          class: 'form-control',
          label: this.dataset.label + ' added at: ' + new Date().getTime()
        };
        var index = this.dataset.index ? Number(this.dataset.index) : undefined;

      formBuilder.actions.addField(field, index);
    };
  }
```
## See it in Action


text:
'use strict';

var colorScaleAttrs = require('../../components/colorscale/attributes');
var hovertemplateAttrs = require('../../plots/template_attributes').hovertemplateAttrs;
var mesh3dAttrs = require('../mesh3d/attributes');
var baseAttrs = require('../../plots/attributes');

var extendFlat = require('../../lib/extend').extendFlat;

var attrs = {
    x: {
        valType: 'data_array',
        role: 'info',
        editType: 'calc+clearAxisTypes',
        description: 'Sets the x coordinates of the vector field.'
    },
    y: {
        valType: 'data_array',
        role: 'info',
        editType: 'calc+clearAxisTypes',
        description: 'Sets the y coordinates of the vector field.'
    },
    z: {
        valType: 'data_array',
        role: 'info',
        editType: 'calc+clearAxisTypes',
        description: 'Sets the z coordinates of the vector field.'
    },

    u: {
        valType: 'data_array',
        editType: 'calc',
        description: 'Sets the x components of the vector field.'
    },
    v: {
        valType: 'data_array',
        editType: 'calc',
        description: 'Sets the y components of the vector field.'
    },
    w: {
        valType: 'data_array',
        editType: 'calc',
        description: 'Sets the z components of the vector field.'
    },

    starts: {
        x: {
            valType: 'data_array',
            editType: 'calc',
            description: [
                'Sets the x components of the starting position of the streamtubes',
            ].join(' ')
        },
        y: {
            valType: 'data_array',
            editType: 'calc',
            description: [
                'Sets the y components of the starting position of the streamtubes',
            ].join(' ')
        },
        z: {
            valType: 'data_array',
            editType: 'calc',
            description: [
                'Sets the z components of the starting position of the streamtubes',
            ].join(' ')
        },
        editType: 'calc'
    },

    maxdisplayed: {
        valType: 'integer',
        min: 0,
        dflt: 1000,
        role: 'info',
        editType: 'calc',
        description: [
            'The maximum number of displayed segments in a streamtube.'
        ].join(' ')
    },

    // TODO
    //
    // Should add 'absolute' (like cone traces have), but currently gl-streamtube3d's
    // `absoluteTubeSize` doesn't behave well enough for our needs.
    //
    // 'fixed' would be a nice addition to plot stream 'lines', see
    // https://github.com/plotly/plotly.js/commit/812be20750e21e0a1831975001c248d365850f73#r29129877
    //
    // sizemode: {
    //     valType: 'enumerated',
    //     values: ['scaled', 'absolute', 'fixed'],
    //     dflt: 'scaled',
    //     role: 'info',
    //     editType: 'calc',
    //     description: [
    //         'Sets the mode by which the streamtubes are sized.'
    //     ].join(' ')
    // },

    sizeref: {
        valType: 'number',
        role: 'info',
        editType: 'calc',
        min: 0,
        dflt: 1,
        description: [
            'The scaling factor for the streamtubes.',
            'The default is 1, which avoids two max divergence tubes from touching',
            'at adjacent starting positions.'
        ].join(' ')
    },

    text: {
        valType: 'string',
        role: 'info',
        dflt: '',
        editType: 'calc',
        description: [
            'Sets a text element associated with this trace.',
            'If trace `hoverinfo` contains a *text* flag,',
            'this text element will be seen in all hover labels.',
            'Note that streamtube traces do not support array `text` values.'
        ].join(' ')
    },
    hovertext: {
        valType: 'string',
        role: 'info',
        dflt: '',
        editType: 'calc',
        description: 'Same as `text`.'
    },
    hovertemplate: hovertemplateAttrs({editType: 'calc'}, {
        keys: [
            'tubex', 'tubey', 'tubez',
            'tubeu', 'tubev', 'tubew',
            'norm', 'divergence'
        ]
    }),
    showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
};

extendFlat(attrs, colorScaleAttrs('', {
    colorAttr: 'u/v/w norm',
    showScaleDflt: true,
    editTypeOverride: 'calc'
}));

var fromMesh3d = ['opacity', 'lightposition', 'lighting'];
fromMesh3d.forEach(function(k) {
    attrs[k] = mesh3dAttrs[k];
});

attrs.hoverinfo = extendFlat({}, baseAttrs.hoverinfo, {
    editType: 'calc',
    flags: ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'],
    dflt: 'x+y+z+norm+text+name'
});

attrs.transforms = undefined;

module.exports = attrs;


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Thrombium cladoniae Stein

### Remarks
null


text:
<?php

namespace Ossec\ModelBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Agent
 *
 * @ORM\Table(name="agent")
 * @ORM\Entity
 */
class Agent
{
    /**
     * @var integer
     *
     * @ORM\Column(name="last_contact", type="integer", nullable=false)
     */
    private $lastContact;

    /**
     * @var integer
     *
     * @ORM\Column(name="ip_address", type="integer", nullable=false)
     */
    private $ip;

    /**
     * @var string
     *
     * @ORM\Column(name="version", type="string", length=32, nullable=false)
     */
    private $version;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=64, nullable=false)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="information", type="string", length=128, nullable=false)
     */
    private $information;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="smallint")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="NONE")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="server_id", type="smallint")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="NONE")
     */
    private $server;

    /**
     * Set lastContact
     *
     * @param integer $lastContact
     * @return Agent
     */
    public function setLastContact($lastContact)
    {
        $this->lastContact = $lastContact;

        return $this;
    }

    /**
     * Get lastContact
     *
     * @return integer
     */
    public function getLastContact()
    {
        return $this->lastContact;
    }

    /**
     * Set ip
     *
     * @param integer $ip
     * @return Agent
     */
    public function setIp($ip)
    {
        $this->ip = $ip;

        return $this;
    }

    /**
     * Get ip
     *
     * @return integer
     */
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * Set version
     *
     * @param string $version
     * @return Agent
     */
    public function setVersion($version)
    {
        $this->version = $version;

        return $this;
    }

    /**
     * Get version
     *
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Agent
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set information
     *
     * @param string $information
     * @return Agent
     */
    public function setInformation($information)
    {
        $this->information = $information;

        return $this;
    }

    /**
     * Get information
     *
     * @return string
     */
    public function getInformation()
    {
        return $this->information;
    }

    /**
     * Set id
     *
     * @param integer $id
     * @return Agent
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set server
     *
     * @param integer $server
     * @return Agent
     */
    public function setServer($server)
    {
        $this->server = $server;

        return $this;
    }

    /**
     * Get server
     *
     * @return integer
     */
    public function getServer()
    {
        return $this->server;
    }
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/spanner/v1/spanner.proto

package com.google.spanner.v1;

public interface ExecuteBatchDmlRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.spanner.v1.ExecuteBatchDmlRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. The session in which the DML statements should be performed.
   *

   *
   * string session = 1;
   */
  java.lang.String getSession();
  /**
   *
   *
   *

   * Required. The session in which the DML statements should be performed.
   *

   *
   * string session = 1;
   */
  com.google.protobuf.ByteString getSessionBytes();

  /**
   *
   *
   *

   * The transaction to use. A ReadWrite transaction is required. Single-use
   * transactions are not supported (to avoid replay).  The caller must either
   * supply an existing transaction ID or begin a new transaction.
   *

   *
   * .google.spanner.v1.TransactionSelector transaction = 2;
   */
  boolean hasTransaction();
  /**
   *
   *
   *

   * The transaction to use. A ReadWrite transaction is required. Single-use
   * transactions are not supported (to avoid replay).  The caller must either
   * supply an existing transaction ID or begin a new transaction.
   *

   *
   * .google.spanner.v1.TransactionSelector transaction = 2;
   */
  com.google.spanner.v1.TransactionSelector getTransaction();
  /**
   *
   *
   *

   * The transaction to use. A ReadWrite transaction is required. Single-use
   * transactions are not supported (to avoid replay).  The caller must either
   * supply an existing transaction ID or begin a new transaction.
   *

   *
   * .google.spanner.v1.TransactionSelector transaction = 2;
   */
  com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilder();

  /**
   *
   *
   *

   * The list of statements to execute in this batch. Statements are executed
   * serially, such that the effects of statement i are visible to statement
   * i+1. Each statement must be a DML statement. Execution will stop at the
   * first failed statement; the remaining statements will not run.
   * REQUIRES: statements_size() > 0.
   *

   *
   * repeated .google.spanner.v1.ExecuteBatchDmlRequest.Statement statements = 3;
   */
  java.util.List<com.google.spanner.v1.ExecuteBatchDmlRequest.Statement> getStatementsList();
  /**
   *
   *
   *

   * The list of statements to execute in this batch. Statements are executed
   * serially, such that the effects of statement i are visible to statement
   * i+1. Each statement must be a DML statement. Execution will stop at the
   * first failed statement; the remaining statements will not run.
   * REQUIRES: statements_size() > 0.
   *

   *
   * repeated .google.spanner.v1.ExecuteBatchDmlRequest.Statement statements = 3;
   */
  com.google.spanner.v1.ExecuteBatchDmlRequest.Statement getStatements(int index);
  /**
   *
   *
   *

   * The list of statements to execute in this batch. Statements are executed
   * serially, such that the effects of statement i are visible to statement
   * i+1. Each statement must be a DML statement. Execution will stop at the
   * first failed statement; the remaining statements will not run.
   * REQUIRES: statements_size() > 0.
   *

   *
   * repeated .google.spanner.v1.ExecuteBatchDmlRequest.Statement statements = 3;
   */
  int getStatementsCount();
  /**
   *
   *
   *

   * The list of statements to execute in this batch. Statements are executed
   * serially, such that the effects of statement i are visible to statement
   * i+1. Each statement must be a DML statement. Execution will stop at the
   * first failed statement; the remaining statements will not run.
   * REQUIRES: statements_size() > 0.
   *

   *
   * repeated .google.spanner.v1.ExecuteBatchDmlRequest.Statement statements = 3;
   */
  java.util.List<? extends com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder>
      getStatementsOrBuilderList();
  /**
   *
   *
   *

   * The list of statements to execute in this batch. Statements are executed
   * serially, such that the effects of statement i are visible to statement
   * i+1. Each statement must be a DML statement. Execution will stop at the
   * first failed statement; the remaining statements will not run.
   * REQUIRES: statements_size() > 0.
   *

   *
   * repeated .google.spanner.v1.ExecuteBatchDmlRequest.Statement statements = 3;
   */
  com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder getStatementsOrBuilder(int index);

  /**
   *
   *
   *

   * A per-transaction sequence number used to identify this request. This is
   * used in the same space as the seqno in
   * [ExecuteSqlRequest][Spanner.ExecuteSqlRequest]. See more details
   * in [ExecuteSqlRequest][Spanner.ExecuteSqlRequest].
   *

   *
   * int64 seqno = 4;
   */
  long getSeqno();
}


text:
!
!  Copyright 2017 SALMON developers
!
!  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.
!
subroutine conv_core_exc_cor
  use salmon_parallel, only: nproc_group_h
  use salmon_communication, only: comm_summation
  use scf_data
  use new_world_sub
  use allocate_mat_sub
  implicit none
  integer :: ix,iy,iz
  character(20) :: xc_tmp
  integer :: jspin
  real(8) :: cval_t
  real(8) :: tot_exc

  xc_tmp='pz'
  jspin=0
  cval_t=0.d0

  do iz=1,ng_num(3)
  do iy=1,ng_num(2)
  do ix=1,ng_num(1)
    rho_tmp(ix,iy,iz)=rho(ng_sta(1)+ix-1,ng_sta(2)+iy-1,ng_sta(3)+iz-1)
  end do
  end do
  end do

  call core_exc_cor(xc_tmp, jspin, cval_t, ng_num(1), ng_num(2), ng_num(3), Hvol,  &
                    rho_tmp, exc_dummy2, exc_dummy, exc_dummy3, exc_dummy3, &
                    exc_dummy, exc_dummy, vxc_tmp, exc_dummy2, exc_dummy2, tot_exc)

  do iz=1,ng_num(3)
  do iy=1,ng_num(2)
  do ix=1,ng_num(1)
    vxc(ng_sta(1)+ix-1,ng_sta(2)+iy-1,ng_sta(3)+iz-1)=vxc_tmp(ix,iy,iz)
  end do
  end do
  end do

  call comm_summation(tot_exc,Exc,nproc_group_h)

  return
end subroutine conv_core_exc_cor


text:
package types

import (
	"time"

	"github.com/gravitational/trace"
	log "github.com/sirupsen/logrus"
	"golang.org/x/crypto/ssh"

	"github.com/gravitational/teleport/api/defaults"
	"github.com/gravitational/teleport/api/utils"
)

const githubURL = "https://github.com"

// GithubConnector defines an interface for a Github OAuth2 connector
type GithubConnector interface {
	// ResourceWithSecrets is a common interface for all resources
	ResourceWithSecrets
	ResourceWithOrigin
	// SetMetadata sets object metadata
	SetMetadata(meta Metadata)
	// GetClientID returns the connector client ID
	GetClientID() string
	// SetClientID sets the connector client ID
	SetClientID(string)
	// GetClientSecret returns the connector client secret
	GetClientSecret() string
	// SetClientSecret sets the connector client secret
	SetClientSecret(string)
	// GetRedirectURL returns the connector redirect URL
	GetRedirectURL() string
	// SetRedirectURL sets the connector redirect URL
	SetRedirectURL(string)
	// GetTeamsToLogins returns the mapping of Github teams to allowed logins
	GetTeamsToLogins() []TeamMapping
	// SetTeamsToLogins sets the mapping of Github teams to allowed logins
	SetTeamsToLogins([]TeamMapping)
	// GetTeamsToRoles returns the mapping of Github teams to allowed roles
	GetTeamsToRoles() []TeamRolesMapping
	// SetTeamsToRoles sets the mapping of Github teams to allowed roles
	SetTeamsToRoles([]TeamRolesMapping)
	// MapClaims returns the list of allows logins based on the retrieved claims
	// returns list of logins and kubernetes groups
	MapClaims(GithubClaims) (roles []string, kubeGroups []string, kubeUsers []string)
	// GetDisplay returns the connector display name
	GetDisplay() string
	// SetDisplay sets the connector display name
	SetDisplay(string)
	// GetEndpointURL returns the endpoint URL
	GetEndpointURL() string
}

// NewGithubConnector creates a new Github connector from name and spec
func NewGithubConnector(name string, spec GithubConnectorSpecV3) (GithubConnector, error) {
	c := &GithubConnectorV3{
		Metadata: Metadata{
			Name: name,
		},
		Spec: spec,
	}
	if err := c.CheckAndSetDefaults(); err != nil {
		return nil, trace.Wrap(err)
	}
	return c, nil
}

// GetVersion returns resource version
func (c *GithubConnectorV3) GetVersion() string {
	return c.Version
}

// GetKind returns resource kind
func (c *GithubConnectorV3) GetKind() string {
	return c.Kind
}

// GetSubKind returns resource sub kind
func (c *GithubConnectorV3) GetSubKind() string {
	return c.SubKind
}

// SetSubKind sets resource subkind
func (c *GithubConnectorV3) SetSubKind(s string) {
	c.SubKind = s
}

// GetResourceID returns resource ID
func (c *GithubConnectorV3) GetResourceID() int64 {
	return c.Metadata.ID
}

// SetResourceID sets resource ID
func (c *GithubConnectorV3) SetResourceID(id int64) {
	c.Metadata.ID = id
}

// GetName returns the name of the connector
func (c *GithubConnectorV3) GetName() string {
	return c.Metadata.GetName()
}

// SetName sets the connector name
func (c *GithubConnectorV3) SetName(name string) {
	c.Metadata.SetName(name)
}

// Expiry returns the connector expiration time
func (c *GithubConnectorV3) Expiry() time.Time {
	return c.Metadata.Expiry()
}

// SetExpiry sets the connector expiration time
func (c *GithubConnectorV3) SetExpiry(expires time.Time) {
	c.Metadata.SetExpiry(expires)
}

// SetMetadata sets connector metadata
func (c *GithubConnectorV3) SetMetadata(meta Metadata) {
	c.Metadata = meta
}

// GetMetadata returns the connector metadata
func (c *GithubConnectorV3) GetMetadata() Metadata {
	return c.Metadata
}

// Origin returns the origin value of the resource.
func (c *GithubConnectorV3) Origin() string {
	return c.Metadata.Origin()
}

// SetOrigin sets the origin value of the resource.
func (c *GithubConnectorV3) SetOrigin(origin string) {
	c.Metadata.SetOrigin(origin)
}

// WithoutSecrets returns an instance of resource without secrets.
func (c *GithubConnectorV3) WithoutSecrets() Resource {
	if c.GetClientSecret() == "" {
		return c
	}
	c2 := *c
	c2.SetClientSecret("")
	return &c2
}

// setStaticFields sets static resource header and metadata fields.
func (c *GithubConnectorV3) setStaticFields() {
	c.Kind = KindGithubConnector
	c.Version = V3
}

// CheckAndSetDefaults verifies the connector is valid and sets some defaults
func (c *GithubConnectorV3) CheckAndSetDefaults() error {
	c.setStaticFields()
	if err := c.Metadata.CheckAndSetDefaults(); err != nil {
		return trace.Wrap(err)
	}

	// DELETE IN 11.0.0
	if len(c.Spec.TeamsToLogins) > 0 {
		log.Warn("GitHub connector field teams_to_logins is deprecated and will be removed in the next version. Please use teams_to_roles instead.")
	}

	// make sure claim mappings have either roles or a role template
	for i, v := range c.Spec.TeamsToLogins {
		if v.Team == "" {
			return trace.BadParameter("team_to_logins mapping #%v is invalid, team is empty.", i+1)
		}
	}
	for i, v := range c.Spec.TeamsToRoles {
		if v.Team == "" {
			return trace.BadParameter("team_to_roles mapping #%v is invalid, team is empty.", i+1)
		}
	}

	if len(c.Spec.TeamsToLogins)+len(c.Spec.TeamsToRoles) == 0 {
		return trace.BadParameter("team_to_logins or team_to_roles mapping is invalid, no mappings defined.")
	}

	return nil
}

// GetClientID returns the connector client ID
func (c *GithubConnectorV3) GetClientID() string {
	return c.Spec.ClientID
}

// SetClientID sets the connector client ID
func (c *GithubConnectorV3) SetClientID(id string) {
	c.Spec.ClientID = id
}

// GetClientSecret returns the connector client secret
func (c *GithubConnectorV3) GetClientSecret() string {
	return c.Spec.ClientSecret
}

// SetClientSecret sets the connector client secret
func (c *GithubConnectorV3) SetClientSecret(secret string) {
	c.Spec.ClientSecret = secret
}

// GetRedirectURL returns the connector redirect URL
func (c *GithubConnectorV3) GetRedirectURL() string {
	return c.Spec.RedirectURL
}

// SetRedirectURL sets the connector redirect URL
func (c *GithubConnectorV3) SetRedirectURL(redirectURL string) {
	c.Spec.RedirectURL = redirectURL
}

// GetTeamsToLogins returns the connector team membership mappings
//
// DEPRECATED: use GetTeamsToRoles instead
func (c *GithubConnectorV3) GetTeamsToLogins() []TeamMapping {
	return c.Spec.TeamsToLogins
}

// SetTeamsToLogins sets the connector team membership mappings
//
// DEPRECATED: use SetTeamsToRoles instead
func (c *GithubConnectorV3) SetTeamsToLogins(teamsToLogins []TeamMapping) {
	c.Spec.TeamsToLogins = teamsToLogins
}

// GetTeamsToRoles returns the mapping of Github teams to allowed roles
func (c *GithubConnectorV3) GetTeamsToRoles() []TeamRolesMapping {
	return c.Spec.TeamsToRoles
}

// SetTeamsToRoles sets the mapping of Github teams to allowed roles
func (c *GithubConnectorV3) SetTeamsToRoles(m []TeamRolesMapping) {
	c.Spec.TeamsToRoles = m
}

// GetDisplay returns the connector display name
func (c *GithubConnectorV3) GetDisplay() string {
	return c.Spec.Display
}

// SetDisplay sets the connector display name
func (c *GithubConnectorV3) SetDisplay(display string) {
	c.Spec.Display = display
}

// GetEndpointURL returns the endpoint URL
func (c *GithubConnectorV3) GetEndpointURL() string {
	return githubURL
}

// MapClaims returns a list of logins based on the provided claims,
// returns a list of logins and list of kubernetes groups
func (c *GithubConnectorV3) MapClaims(claims GithubClaims) ([]string, []string, []string) {
	var roles, kubeGroups, kubeUsers []string
	for _, mapping := range c.GetTeamsToLogins() {
		teams, ok := claims.OrganizationToTeams[mapping.Organization]
		if !ok {
			// the user does not belong to this organization
			continue
		}
		for _, team := range teams {
			// see if the user belongs to this team
			if team == mapping.Team {
				roles = append(roles, mapping.Logins...)
				kubeGroups = append(kubeGroups, mapping.KubeGroups...)
				kubeUsers = append(kubeUsers, mapping.KubeUsers...)
			}
		}
	}
	for _, mapping := range c.GetTeamsToRoles() {
		teams, ok := claims.OrganizationToTeams[mapping.Organization]
		if !ok {
			// the user does not belong to this organization
			continue
		}
		for _, team := range teams {
			// see if the user belongs to this team
			if team == mapping.Team {
				roles = append(roles, mapping.Roles...)
			}
		}
	}
	return utils.Deduplicate(roles), utils.Deduplicate(kubeGroups), utils.Deduplicate(kubeUsers)
}

// SetExpiry sets expiry time for the object
func (r *GithubAuthRequest) SetExpiry(expires time.Time) {
	r.Expires = &expires
}

// Expiry returns object expiry setting.
func (r *GithubAuthRequest) Expiry() time.Time {
	if r.Expires == nil {
		return time.Time{}
	}
	return *r.Expires
}

// Check makes sure the request is valid
func (r *GithubAuthRequest) Check() error {
	if r.ConnectorID == "" {
		return trace.BadParameter("missing ConnectorID")
	}
	if r.StateToken == "" {
		return trace.BadParameter("missing StateToken")
	}
	if len(r.PublicKey) != 0 {
		_, _, _, _, err := ssh.ParseAuthorizedKey(r.PublicKey)
		if err != nil {
			return trace.BadParameter("bad PublicKey: %v", err)
		}
		if (r.CertTTL > defaults.MaxCertDuration) || (r.CertTTL < defaults.MinCertDuration) {
			return trace.BadParameter("wrong CertTTL")
		}
	}

	// we could collapse these two checks into one, but the error message would become ambiguous.
	if r.SSOTestFlow && r.ConnectorSpec == nil {
		return trace.BadParameter("ConnectorSpec cannot be nil when SSOTestFlow is true")
	}

	if !r.SSOTestFlow && r.ConnectorSpec != nil {
		return trace.BadParameter("ConnectorSpec must be nil when SSOTestFlow is false")
	}

	return nil
}


text:
@implementation CPTTestApp_iPadAppDelegate

@synthesize window;
@synthesize viewController;

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
        self.window.rootViewController = self.viewController;
    }
    else {
        [self.window addSubview:self.viewController.view];
    }
    [self.window makeKeyAndVisible];

    return YES;
}

@end


text:
<?php
/**
 * User: Alex Gusev <alex@flancer64.com>
 */

namespace Praxigento\Bonus\GlobalSales\Lib\Repo;

interface IModule
{

    /**
     * Get compressed tree with qualification data (GV, rank).
     *
     * @param $calcId
     *
     * @return array [[Compress/customerId+parentId, Qualification/gv+rank_id], ...]
     */
    public function getCompressedTreeWithQualifications($calcId);

    /**
     * Get configuration parameters ordered by rank asc
     * @return array [$rankId => [Cfg\Param/*], ...]
     */
    public function getConfigParams();

    /**
     * Decorator for \Praxigento\BonusLoyalty\Repo\Def\Module::getQualificationData
     *
     * @param string $dsFrom 'YYYYMMDD'
     * @param string $dsTo 'YYYYMMDD'
     *
     * @return array [$custId => $pvSummary, ...]
     */
    function getQualificationData($dsFrom, $dsTo);

    /**
     * Get summary PV for all orders for period.
     *
     * @param string $dsFrom 'YYYYMMDD'
     * @param string $dsTo 'YYYYMMDD'
     *
     * @return decimal
     */
    function getSalesOrdersPvForPeriod($dsFrom, $dsTo);

    /**
     * Save relations between transactions and ranks into log.
     *
     * @param array $logs
     */
    public function saveLogRanks($logs);

    /**
     * @param $updates array [[Qualification/*], ...]
     *
     */
    public function saveQualificationParams($updates);

}


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

                «

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">WELL SUMMARY

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">OPERATOR:
LEASE:

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LOCATION:

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">ELEVATION:

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">SPUD DATE:
CEASE DRILLING:
TOTAL DEPTH:

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">CONTRACTOR:

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Rig: Toolpusher:

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Drillers:
Surface: Curve:
Mud company: Mud engineer: Mud up depth: Mud type:
Directional company: Directional drillers: MWD Company: MWD supervisors:
Mudlogging company: Mudlogger:
Services:

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Cole Huntsman, David Bishop, Roy Kreigh, Juan Martinez
9 5/8" set at 2042' MD 7" set at 10,500' MD
Anchor Drilling Fluids USA Matthew Oakcs
2,042
Invert
Path Finder James Zieglar, Greg Rudolph Path Finder Doug Rusco, Anthony Bayard
Neset Consulting Service, Inc. Jonathan Stoltman, Tom Abar, Anthony
Samoski Pason

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">CASING RECORD:

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">MUD RECORD:

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">DIRECTIONAL DRILLING PROGRAM:

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">MUDLOGGING PROGRAM:

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Whiting Oil and Gas Corp.
Kaldahl 24-1211

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Field: Location: Legal: Bottom hole: Legal: County:

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Kelly Bushing: Ground Level:
October 26, 2014 December 24, 2014
Sidetrack

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Unit 120 Kirk Tonks, Orland Porter

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Ray
630' FSL & 880' FWL
Section 12 T156N R97W 261.23' FNL &1,945.42' FWL Section 1 T156N R97W Williams County, North Dakota

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">2,264' 2,238'

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">20,440' MI) 10,113_13' TVD 10.261.57' vs


text:
const Core = require('./core');
const MinecraftVanilla = require('./minecraftvanilla');
const MinecraftBedrock = require('./minecraftbedrock');
const Gamespy3 = require('./gamespy3');
const Results = require('../lib/Results');

/*
Vanilla servers respond to minecraftvanilla only
Some modded vanilla servers respond to minecraftvanilla and gamespy3, or gamespy3 only
Some bedrock servers respond to gamespy3 only
Some bedrock servers respond to minecraftbedrock only
Unsure if any bedrock servers respond to gamespy3 and minecraftbedrock
 */

class Minecraft extends Core {
    constructor() {
        super();
        this.srvRecord = "_minecraft._tcp";
    }
    async run(state) {
        /** @type {Promise<Results>[]} */
        const promises = [];

        const vanillaResolver = new MinecraftVanilla();
        vanillaResolver.options = this.options;
        vanillaResolver.udpSocket = this.udpSocket;
        promises.push((async () => {
            try { return await vanillaResolver.runOnceSafe(); } catch(e) {}
        })());

        const gamespyResolver = new Gamespy3();
        gamespyResolver.options = {
            ...this.options,
            encoding: 'utf8',
        };
        gamespyResolver.udpSocket = this.udpSocket;
        promises.push((async () => {
            try { return await gamespyResolver.runOnceSafe(); } catch(e) {}
        })());

        const bedrockResolver = new MinecraftBedrock();
        bedrockResolver.options = this.options;
        bedrockResolver.udpSocket = this.udpSocket;
        promises.push((async () => {
            try { return await bedrockResolver.runOnceSafe(); } catch(e) {}
        })());

        const [ vanillaState, gamespyState, bedrockState ] = await Promise.all(promises);

        state.raw.vanilla = vanillaState;
        state.raw.gamespy = gamespyState;
        state.raw.bedrock = bedrockState;

        if (!vanillaState && !gamespyState && !bedrockState) {
            throw new Error('No protocols succeeded');
        }

        // Ordered from least worth to most worth (player names / etc)
        if (bedrockState) {
            if (bedrockState.name) state.name = bedrockState.name;
            if (bedrockState.maxplayers) state.maxplayers = bedrockState.maxplayers;
            if (bedrockState.players.length) state.players = bedrockState.players;
            if (bedrockState.map) state.map = bedrockState.map;
            if (bedrockState.ping) state.ping = bedrockState.ping;
        }
        if (vanillaState) {
            try {
                let name = '';
                const description = vanillaState.raw.description;
                if (typeof description === 'string') {
                    name = description;
                }
                if (!name && typeof description === 'object' && description.text) {
                    name = description.text;
                }
                if (!name && typeof description === 'object' && description.extra) {
                    name = description.extra.map(part => part.text).join('');
                }
                state.name = name;
            } catch(e) {}
            if (vanillaState.maxplayers) state.maxplayers = vanillaState.maxplayers;
            if (vanillaState.players.length) state.players = vanillaState.players;
            if (vanillaState.ping) state.ping = vanillaState.ping;
        }
        if (gamespyState) {
            if (gamespyState.name) state.name = gamespyState.name;
            if (gamespyState.maxplayers) state.maxplayers = gamespyState.maxplayers;
            if (gamespyState.players.length) state.players = gamespyState.players;
            else if (gamespyState.raw.numplayers) state.players.setNum(parseInt(gamespyState.raw.numplayers));
            if (gamespyState.ping) state.ping = gamespyState.ping;
        }
        // remove dupe spaces from name
        state.name = state.name.replace(/\s+/g, ' ');
        // remove color codes from name
        state.name = state.name.replace(/\u00A7./g, '');
    }
}

module.exports = Minecraft;


text:
parsex [![Build](https://img.shields.io/appveyor/ci/zahasoft/parsex/master.svg?style=flat-square)](https://ci.appveyor.com/project/zahasoft/parsex)
[![License](https://img.shields.io/badge/license-mit-orange.svg?style=flat-square)](https://opensource.org/licenses/mit-license)
==================================

Testing tool for parse.com.

![parsex screenshot](screenshots/parsex.png)