text:
namespace Hxj.Tools.EntityDesign.DbSelect
{
    partial class DBOracle
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DBOracle));
            this.button3 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.txtPassword = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.button1 = new System.Windows.Forms.Button();
            this.cbbServer = new System.Windows.Forms.ComboBox();
            this.txtUserName = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.chbConnectString = new System.Windows.Forms.CheckBox();
            this.txtConnectString = new System.Windows.Forms.TextBox();
            this.panelServer = new System.Windows.Forms.Panel();
            this.panelServer.SuspendLayout();
            this.SuspendLayout();
            //
            // button3
            //
            this.button3.Location = new System.Drawing.Point(304, 289);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(75, 23);
            this.button3.TabIndex = 8;
            this.button3.Text = "取消";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(185, 289);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 7;
            this.button2.Text = "确定";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            //
            // txtPassword
            //
            this.txtPassword.Location = new System.Drawing.Point(79, 116);
            this.txtPassword.Name = "txtPassword";
            this.txtPassword.Size = new System.Drawing.Size(214, 21);
            this.txtPassword.TabIndex = 3;
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(11, 119);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(47, 12);
            this.label5.TabIndex = 24;
            this.label5.Text = "口  令:";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(11, 71);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(47, 12);
            this.label4.TabIndex = 23;
            this.label4.Text = "用户名:";
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(34, 289);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(104, 23);
            this.button1.TabIndex = 6;
            this.button1.Text = "连接/连接测试";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // cbbServer
            //
            this.cbbServer.FormattingEnabled = true;
            this.cbbServer.Location = new System.Drawing.Point(79, 23);
            this.cbbServer.Name = "cbbServer";
            this.cbbServer.Size = new System.Drawing.Size(214, 20);
            this.cbbServer.TabIndex = 1;
            //
            // txtUserName
            //
            this.txtUserName.Location = new System.Drawing.Point(79, 68);
            this.txtUserName.Name = "txtUserName";
            this.txtUserName.Size = new System.Drawing.Size(214, 21);
            this.txtUserName.TabIndex = 2;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(11, 26);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(47, 12);
            this.label1.TabIndex = 15;
            this.label1.Text = "服  务:";
            //
            // chbConnectString
            //
            this.chbConnectString.AutoSize = true;
            this.chbConnectString.Location = new System.Drawing.Point(73, 199);
            this.chbConnectString.Name = "chbConnectString";
            this.chbConnectString.Size = new System.Drawing.Size(84, 16);
            this.chbConnectString.TabIndex = 4;
            this.chbConnectString.Text = "连接字符串";
            this.chbConnectString.UseVisualStyleBackColor = true;
            this.chbConnectString.CheckedChanged += new System.EventHandler(this.chbConnectString_CheckedChanged);
            //
            // txtConnectString
            //
            this.txtConnectString.Enabled = false;
            this.txtConnectString.Location = new System.Drawing.Point(73, 232);
            this.txtConnectString.Name = "txtConnectString";
            this.txtConnectString.Size = new System.Drawing.Size(280, 21);
            this.txtConnectString.TabIndex = 5;
            //
            // panelServer
            //
            this.panelServer.Controls.Add(this.cbbServer);
            this.panelServer.Controls.Add(this.txtUserName);
            this.panelServer.Controls.Add(this.txtPassword);
            this.panelServer.Controls.Add(this.label1);
            this.panelServer.Controls.Add(this.label5);
            this.panelServer.Controls.Add(this.label4);
            this.panelServer.ForeColor = System.Drawing.SystemColors.ControlText;
            this.panelServer.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.panelServer.Location = new System.Drawing.Point(60, 12);
            this.panelServer.Name = "panelServer";
            this.panelServer.Size = new System.Drawing.Size(319, 158);
            this.panelServer.TabIndex = 32;
            //
            // DBOracle
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(417, 346);
            this.Controls.Add(this.txtConnectString);
            this.Controls.Add(this.chbConnectString);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.panelServer);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "DBOracle";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "连接到服务器";
            this.panelServer.ResumeLayout(false);
            this.panelServer.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button button3;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.TextBox txtPassword;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.ComboBox cbbServer;
        private System.Windows.Forms.TextBox txtUserName;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.CheckBox chbConnectString;
        private System.Windows.Forms.TextBox txtConnectString;
        private System.Windows.Forms.Panel panelServer;
    }
}


text:
namespace Azure.ResourceManager.AppContainers.Models
{
    /// <summary> The convention used to determine the url of the request made. </summary>
    public enum ForwardProxyConvention
    {
        /// <summary> NoProxy. </summary>
        NoProxy,
        /// <summary> Standard. </summary>
        Standard,
        /// <summary> Custom. </summary>
        Custom
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace WellCommerce\Bundle\OrderBundle\Calculator;

use Doctrine\Common\Collections\Collection;
use WellCommerce\Bundle\AppBundle\Service\Currency\Helper\CurrencyHelperInterface;
use WellCommerce\Bundle\OrderBundle\Entity\ShippingMethod;
use WellCommerce\Bundle\OrderBundle\Entity\ShippingMethodCost;

/**
 * Class PriceTableCalculator
 *
 * @author  Adam Piotrowski <adam@wellcommerce.org>
 */
final class PriceTableCalculator implements ShippingCalculatorInterface
{
    /**
     * @var CurrencyHelperInterface
     */
    private $currencyHelper;

    public function __construct(CurrencyHelperInterface $currencyHelper)
    {
        $this->currencyHelper = $currencyHelper;
    }

    public function calculate(ShippingMethod $shippingMethod, ShippingSubjectInterface $subject): Collection
    {
        $ranges         = $shippingMethod->getCosts();
        $baseCurrency   = $subject->getCurrency();
        $targetCurrency = $shippingMethod->getCurrency()->getCode();
        $grossAmount    = $this->currencyHelper->convert($subject->getGrossPrice(), $baseCurrency, $targetCurrency);

        return $ranges->filter(function (ShippingMethodCost $cost) use ($grossAmount) {
            return ($cost->getRangeFrom() <= $grossAmount && $cost->getRangeTo() >= $grossAmount);
        });
    }

    public function getAlias(): string
    {
        return 'price_table';
    }
}


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

namespace EasyRedisMQ.Resolvers
{
    public class QueueNameResolver : IQueueNameResolver
    {
        public string GetQueueName(string exchangeName, string subscriberId)
        {
            return string.Format("{0}.Queue.{1}", exchangeName, subscriberId);
        }
    }
}


text:
package qub;

/**
 * A mutex/lock that can be used to synchronize access to shared resources between multiple threads.
 * This lock uses an atomic variable to synchronize access to shared resources, and as such doesn't
 * require OS interaction.
 */
public class SpinMutex implements Mutex
{
    private final LongValue acquiredByThreadId;
    private final Clock clock;

    private SpinMutex(Clock clock)
    {
        this.acquiredByThreadId = LongValue.create(-1);
        this.clock = clock;
    }

    public static SpinMutex create()
    {
        return new SpinMutex(null);
    }

    public static SpinMutex create(Clock clock)
    {
        PreCondition.assertNotNull(clock, "clock");

        return new SpinMutex(clock);
    }

    @Override
    public boolean isAcquired()
    {
        return this.acquiredByThreadId.get() != -1;
    }

    @Override
    public boolean isAcquiredByCurrentThread()
    {
        return this.acquiredByThreadId.get() == Thread.currentThread().getId();
    }

    @Override
    public Result<Void> acquire()
    {
        return Result.create(() ->
        {
            final long threadId = Thread.currentThread().getId();
            while (!this.acquiredByThreadId.compareAndSet(-1, threadId))
            {
                while (this.isAcquired())
                {
                }
            }
        });
    }

    @Override
    public Result<Void> acquire(Duration durationTimeout)
    {
        PreCondition.assertNotNull(durationTimeout, "durationTimeout");
        PreCondition.assertGreaterThan(durationTimeout, Duration.zero, "durationTimeout");
        PreCondition.assertNotNull(this.clock, "this.clock");

        return this.acquire(this.clock.getCurrentDateTime().plus(durationTimeout));
    }

    @Override
    public Result<Void> acquire(DateTime dateTimeTimeout)
    {
        PreCondition.assertNotNull(dateTimeTimeout, "dateTimeTimeout");
        PreCondition.assertNotNull(this.clock, "this.clock");

        return Result.create(() ->
        {
            while (true)
            {
                if (this.clock.getCurrentDateTime().greaterThanOrEqualTo(dateTimeTimeout))
                {
                    throw new TimeoutException();
                }
                else if (this.tryAcquire().await())
                {
                    break;
                }
            }
        });
    }

    @Override
    public Result<Boolean> tryAcquire()
    {
        return Result.create(() ->
        {
            final long threadId = Thread.currentThread().getId();
            return this.acquiredByThreadId.compareAndSet(-1, threadId);
        });
    }

    @Override
    public Result<Void> release()
    {
        PreCondition.assertTrue(this.isAcquiredByCurrentThread(), "this.isAcquiredByCurrentThread()");

        return Result.create(() ->
        {
            this.acquiredByThreadId.set(-1);
        });
    }

    @Override
    public SpinMutexCondition createCondition()
    {
        return SpinMutexCondition.create(this, this.clock);
    }

    @Override
    public SpinMutexCondition createCondition(Function0<Boolean> condition)
    {
        PreCondition.assertNotNull(condition, "condition");

        return SpinMutexCondition.create(this, this.clock, condition);
    }
}


text:
<if expr="chromeos_ash">
<link rel="import" href="../shared_vars_chromeos_css.html">
</if>
<link rel="import" href="../../../ui/webui/resources/html/polymer.html">

<link rel="import" href="chrome://resources/polymer/v1_0/paper-behaviors/paper-ripple-behavior.html">
<link rel="import" href="../shared_vars_css.html">
<link rel="import" href="foo.html">
<if expr="chromeos_ash">
<link rel="import" href="bar.html">
</if>

<dom-module id="cr-test-foo">
  <template>

Hello world

  </template>

</dom-module>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, minimal-ui">
    <title>TimeScale</title>
    <link rel="stylesheet" href="jquery.timescale.css">

Base Demo

Callback


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.globallogic.calabashdemologin"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="4"
        android:targetSdkVersion="18" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.globallogic.calabashdemologin.activities.LoginActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.globallogic.calabashdemologin.activities.HomeActivity"></activity>
    </application>

</manifest>


text:
package org.wso2.carbon.esb.rest.test.security;

import junit.framework.Assert;
import org.testng.annotations.BeforeTest;
import org.wso2.carbon.automation.engine.context.AutomationContext;
import org.wso2.carbon.automation.engine.context.TestUserMode;
import org.wso2.carbon.automation.engine.context.beans.User;
import org.wso2.carbon.integration.common.admin.client.UserManagementClient;
import org.wso2.carbon.integration.common.utils.LoginLogoutClient;
import org.wso2.esb.integration.common.clients.registry.ResourceAdminServiceClient;

/**
 * This test case is supposed to add a user who is not belongs to admin user group. Then this user
 * will be used in other test cases which needs non admin user and user group
 */
public class NonAdminUserCreationTestCase {
    protected static User nonAdminUser = null;
    protected final String ROLE_NAME = "nonadmin";

    @BeforeTest(alwaysRun = true)
    public void addNonAdminUser() throws Exception {
        AutomationContext esbContext = new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN);
        String sessionCookie = new LoginLogoutClient(esbContext).login();
        ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient(esbContext.getContextUrls().getBackEndUrl(), sessionCookie);
        UserManagementClient userManagementClient = new UserManagementClient(esbContext.getContextUrls().getBackEndUrl(), sessionCookie);

        //done this change due to a bug in UM - please refer to carbon dev mail
        // "G-Reg integration test failures due to user mgt issue."
        String[] permissions = {"/permission/admin/configure/",
                                "/permission/admin/login",
                                "/permission/admin/manage/",
                                "/permission/admin/monitor",
                                "/permission/protected"};

        if (!userManagementClient.roleNameExists(ROLE_NAME)) {
            userManagementClient.addRole(ROLE_NAME, null, permissions);
            resourceAdmin.addResourcePermission("/", ROLE_NAME, "3", "1");
            resourceAdmin.addResourcePermission("/", ROLE_NAME, "2", "1");
            resourceAdmin.addResourcePermission("/", ROLE_NAME, "4", "1");
            resourceAdmin.addResourcePermission("/", ROLE_NAME, "5", "1");
        }

        userManagementClient.addUser("nonadminuser", "password", new String[]{ROLE_NAME}, null);
        //check user creation
        nonAdminUser = new User();
        nonAdminUser.setUserName("nonadminuser");
        nonAdminUser.setPassword("password");

    }

    protected static User getUser(){
        Assert.assertNotNull( "User is not created. Please create the user first", nonAdminUser);
        return nonAdminUser;
    }

}


text:
package org.apache.beam.runners.dataflow.worker;

import static org.apache.beam.sdk.util.WindowedValue.valueInGlobalWindow;
import static org.hamcrest.Matchers.contains;
import static org.junit.Assert.assertThat;

import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.List;
import org.apache.beam.runners.dataflow.util.CloudObject;
import org.apache.beam.runners.dataflow.util.PropertyNames;
import org.apache.beam.runners.dataflow.worker.util.common.worker.ParDoFn;
import org.apache.beam.sdk.values.KV;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/** Tests for {@link ValuesDoFnFactory}. */
@RunWith(JUnit4.class)
public class ValuesDoFnFactoryTest {

  @Test
  public void testConversionOfRecord() throws Exception {
    ParDoFn parDoFn =
        new ValuesDoFnFactory()
            .create(
                null /* pipeline options */,
                CloudObject.fromSpec(ImmutableMap.of(PropertyNames.OBJECT_TYPE_NAME, "ValuesDoFn")),
                null /* side input infos */,
                null /* main output tag */,
                null /* output tag to receiver index */,
                null /* exection context */,
                null /* operation context */);

    List<Object> outputReceiver = new ArrayList<>();
    parDoFn.startBundle(outputReceiver::add);
    parDoFn.processElement(valueInGlobalWindow(KV.of(42, 43)));
    assertThat(outputReceiver, contains(valueInGlobalWindow(43)));
  }
}


text:
<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'yii\\swiftmailer\\' => array($vendorDir . '/yiisoft/yii2-swiftmailer'),
    'yii\\jui\\' => array($vendorDir . '/yiisoft/yii2-jui'),
    'yii\\gii\\' => array($vendorDir . '/yiisoft/yii2-gii'),
    'yii\\faker\\' => array($vendorDir . '/yiisoft/yii2-faker'),
    'yii\\debug\\' => array($vendorDir . '/yiisoft/yii2-debug'),
    'yii\\composer\\' => array($vendorDir . '/yiisoft/yii2-composer'),
    'yii\\codeception\\' => array($vendorDir . '/yiisoft/yii2-codeception'),
    'yii\\bootstrap\\' => array($vendorDir . '/yiisoft/yii2-bootstrap'),
    'yii\\' => array($vendorDir . '/yiisoft/yii2'),
    'yii2fullcalendar\\' => array($vendorDir . '/philippfrenzel/yii2fullcalendar'),
    'kartik\\plugins\\dateformatter\\' => array($vendorDir . '/kartik-v/php-date-formatter'),
    'kartik\\password\\' => array($vendorDir . '/kartik-v/yii2-password'),
    'kartik\\datecontrol\\' => array($vendorDir . '/kartik-v/yii2-datecontrol'),
    'kartik\\date\\' => array($vendorDir . '/kartik-v/yii2-widget-datepicker'),
    'kartik\\base\\' => array($vendorDir . '/kartik-v/yii2-krajee-base'),
    'kartik\\' => array($vendorDir . '/kartik-v/strength-meter'),
    'cebe\\markdown\\' => array($vendorDir . '/cebe/markdown'),
    'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'),
);


text:
package pe.org.reclamos.entidad;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * The persistent class for the persona database table.
 *
 */
@Entity
@Table(name="persona")
public class Persona implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int idPersona;

	private String nombres;

	@Column(name="ape_materno")
	private String apeMaterno;

	@Column(name="ape_paterno")
	private String apePaterno;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="created_at")
	private Date createdAt;

	private String direccion;

	private String email;

	private int estado;

	@Column(name="numero_documento")
	private String numeroDocumento;

	private String telefono1;

	private String telefono2;

	private String ubigeo;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="updated_at")
	private Date updatedAt;

    @Transient
	private Set<Cliente> clientes;

    @Transient
    private Cliente cliente;

    public Persona() {
    }

	public int getIdPersona() {
		return this.idPersona;
	}

	public void setIdPersona(int idPersona) {
		this.idPersona = idPersona;
	}

	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public String getDireccion() {
		return this.direccion;
	}

	public void setDireccion(String direccion) {
		this.direccion = direccion;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getEstado() {
		return this.estado;
	}

	public void setEstado(int estado) {
		this.estado = estado;
	}

	public String getNumeroDocumento() {
		return this.numeroDocumento;
	}

	public void setNumeroDocumento(String numeroDocumento) {
		this.numeroDocumento = numeroDocumento;
	}

	public String getTelefono1() {
		return this.telefono1;
	}

	public void setTelefono1(String telefono1) {
		this.telefono1 = telefono1;
	}

	public String getTelefono2() {
		return this.telefono2;
	}

	public void setTelefono2(String telefono2) {
		this.telefono2 = telefono2;
	}

	public String getUbigeo() {
		return this.ubigeo;
	}

	public void setUbigeo(String ubigeo) {
		this.ubigeo = ubigeo;
	}

	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public Set<Cliente> getClientes() {
		return this.clientes;
	}

	public void setClientes(Set<Cliente> clientes) {
		this.clientes = clientes;
	}

	/*public Set<Usuario> getUsuarios() {
		return this.usuarios;
	}

	public void setUsuarios(Set<Usuario> usuarios) {
		this.usuarios = usuarios;
	}*/

	 public String getApeMaterno() {
		return apeMaterno;
	}

	public void setApeMaterno(String apeMaterno) {
		this.apeMaterno = apeMaterno;
	}

	public String getApePaterno() {
		return apePaterno;
	}

	public void setApePaterno(String apePaterno) {
		this.apePaterno = apePaterno;
	}

	public String getNombres() {
		return nombres;
	}

	public void setNombres(String nombres) {
		this.nombres = nombres;
	}

	public Cliente getCliente() {
		return cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

	@Override
	public String toString() {
		return "Persona [idPersona=" + idPersona + ", nombres=" + nombres + ", apeMaterno=" + apeMaterno
				+ ", apePaterno=" + apePaterno + ", createdAt=" + createdAt + ", direccion=" + direccion + ", email="
				+ email + ", estado=" + estado + ", numeroDocumento=" + numeroDocumento + ", telefono1=" + telefono1
				+ ", telefono2=" + telefono2 + ", ubigeo=" + ubigeo + "]";
	}

}


text:
namespace net {
class URLRequestContext;
}  // namespace net

namespace fileapi {
class FileSystemContext;
}

// An implementation of WebFileWriter for use in test_shell and DRT.
class BrowserFileWriter : public fileapi::WebFileWriterBase,
                          public base::SupportsWeakPtr<BrowserFileWriter> {
 public:
  BrowserFileWriter(
      const GURL& path,
      WebKit::WebFileWriterClient* client,
      fileapi::FileSystemContext* file_system_context);
  virtual ~BrowserFileWriter();

  // Called by CefProcessIOThread when the context is created and destroyed.
  static void InitializeOnIOThread(net::URLRequestContext* request_context) {
    request_context_ = request_context;
  }
  static void CleanupOnIOThread() {
    request_context_ = NULL;
  }

 protected:
  // WebFileWriterBase overrides
  virtual void DoTruncate(const GURL& path, int64 offset) OVERRIDE;
  virtual void DoWrite(const GURL& path, const GURL& blob_url,
                       int64 offset) OVERRIDE;
  virtual void DoCancel() OVERRIDE;

 private:
  class IOThreadProxy;
  scoped_refptr<fileapi::FileSystemContext> file_system_context_;
  scoped_refptr<IOThreadProxy> io_thread_proxy_;
  static net::URLRequestContext* request_context_;
};

#endif  // CEF_LIBCEF_BROWSER_FILE_WRITER_H_


text:
@implementation NSString (LGDate)

- (NSDate *)lg_dateFromStringFormatter:(NSString *)formatter {
    NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:formatter];
    return [dateFormatter dateFromString:self];
}

@end


text:
package org.osmdroid.api;

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

import android.graphics.Color;

public class Polyline {

	public Polyline() {
		points = new ArrayList<IGeoPoint>();
	}

	/**
	 * The color of the polyline. Defaults to black.
	 */
	public int color = Color.BLACK;

	/**
	 * The color of the polyline. Defaults to black.
	 * This method returns the polyline for convenient method chaining.
	 */
	public Polyline color(final int aColor) {
		color = aColor;
		return this;
	}

	/**
	 * The width of the polyline. Defaults to 2.
	 */
	public float width = 2.0f;

	/**
	 * The width of the polyline. Defaults to 2.
	 * This method returns the polyline for convenient method chaining.
	 */
	public Polyline width(final float aWidth) {
		width = aWidth;
		return this;
	}

	/**
	 * The points of the polyline.
	 */
	public List<IGeoPoint> points;

	/**
	 * The points of the polyline.
	 * This method returns the polyline for convenient method chaining.
	 */
	public Polyline points(final List<IGeoPoint> aPoints) {
		points = aPoints;
		return this;
	}

	/**
	 * The points of the polyline.
	 * This method returns the polyline for convenient method chaining.
	 */
	public Polyline points(final IGeoPoint... aPoints) {
		return points(Arrays.asList(aPoints));
	}
}


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\KdsProfilSearch */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
    ]); ?>

    <?= $form->field($model, '_id') ?>

    <?= $form->field($model, 'nama') ?>

    <?= $form->field($model, 'nama_samaran') ?>

    <?= $form->field($model, 'no_kad_pengenalan') ?>

    <?= $form->field($model, 'no_kad_pengenalan_lama') ?>

    <?php // echo $form->field($model, 'tarikh_lahir') ?>

    <?php // echo $form->field($model, 'alamat') ?>

    <?php // echo $form->field($model, 'poskod') ?>

    <?php // echo $form->field($model, 'jantina') ?>

    <?php // echo $form->field($model, 'bangsa') ?>

    <?php // echo $form->field($model, 'agama') ?>

    <?php // echo $form->field($model, 'status_perkahwinan') ?>

    <?php // echo $form->field($model, 'kewarganegaraan') ?>

    <?php // echo $form->field($model, 'no_telefon') ?>

    <?php // echo $form->field($model, 'no_telefon_rumah') ?>

    <?php // echo $form->field($model, 'email') ?>

    <?php // echo $form->field($model, 'bilangan_anak') ?>

    <?php // echo $form->field($model, 'adakah_anda_tergolong_dalam_orang_kurang_upaya') ?>

    <?php // echo $form->field($model, 'pekerjaan') ?>

    <?php // echo $form->field($model, 'pendapatan') ?>

    <?php // echo $form->field($model, 'perbelanjaan') ?>

    <?php // echo $form->field($model, 'maklumat_pasangan') ?>

    <?php // echo $form->field($model, 'maklumat_tanggungan') ?>

    <?php // echo $form->field($model, 'maklumat_tambahan') ?>

    <?php // echo $form->field($model, 'maklumat_tanggungan_oku') ?>

    <?php // echo $form->field($model, 'state_id') ?>

    <?php // echo $form->field($model, 'district_id') ?>

    <?php // echo $form->field($model, 'bahagian_id') ?>

    <?php // echo $form->field($model, 'sub_base_id') ?>

    <?php // echo $form->field($model, 'cluster_id') ?>

    <?php // echo $form->field($model, 'kampung_id') ?>

    <?php // echo $form->field($model, 'date_enter') ?>

    <?php // echo $form->field($model, 'enter_by') ?>

    <?php // echo $form->field($model, 'date_update') ?>

    <?php // echo $form->field($model, 'update_by') ?>

        <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>

    <?php ActiveForm::end(); ?>


text:
#include <bcm_cfg.h>
#include <typedefs.h>
#include <bcmutils.h>
#include <bcmdefs.h>
#include <osl.h>
#include <siutils.h>
#include <hndsoc.h>
#include <sbchipc.h>

#include "pcie_core.h"

/* local prototypes */

/* local variables */

/* function definitions */

#ifdef BCMDRIVER

void pcie_watchdog_reset(osl_t *osh, si_t *sih, sbpcieregs_t *sbpcieregs)
{
	uint32 val, i, lsc;
	uint16 cfg_offset[] = {PCIECFGREG_STATUS_CMD, PCIECFGREG_PM_CSR,
		PCIECFGREG_MSI_CAP, PCIECFGREG_MSI_ADDR_L,
		PCIECFGREG_MSI_ADDR_H, PCIECFGREG_MSI_DATA,
		PCIECFGREG_LINK_STATUS_CTRL2, PCIECFGREG_RBAR_CTRL,
		PCIECFGREG_PML1_SUB_CTRL1, PCIECFGREG_REG_BAR2_CONFIG,
		PCIECFGREG_REG_BAR3_CONFIG};
	sbpcieregs_t *pcie = NULL;
	uint32 origidx = si_coreidx(sih);

	/* Switch to PCIE2 core */
	pcie = (sbpcieregs_t *)si_setcore(sih, PCIE2_CORE_ID, 0);
	BCM_REFERENCE(pcie);
	ASSERT(pcie != NULL);

	/* Disable/restore ASPM Control to protect the watchdog reset */
	W_REG(osh, &sbpcieregs->configaddr, PCIECFGREG_LINK_STATUS_CTRL);
	lsc = R_REG(osh, &sbpcieregs->configdata);
	val = lsc & (~PCIE_ASPM_ENAB);
	W_REG(osh, &sbpcieregs->configdata, val);

	si_corereg(sih, SI_CC_IDX, OFFSETOF(chipcregs_t, watchdog), ~0, 4);
	OSL_DELAY(100000);

	W_REG(osh, &sbpcieregs->configaddr, PCIECFGREG_LINK_STATUS_CTRL);
	W_REG(osh, &sbpcieregs->configdata, lsc);

	/* Write configuration registers back to the shadow registers
	 * cause shadow registers are cleared out after watchdog reset.
	 */
	for (i = 0; i < ARRAYSIZE(cfg_offset); i++) {
		W_REG(osh, &sbpcieregs->configaddr, cfg_offset[i]);
		val = R_REG(osh, &sbpcieregs->configdata);
		W_REG(osh, &sbpcieregs->configdata, val);
	}
	si_setcoreidx(sih, origidx);
}

#endif /* BCMDRIVER */


text:
"""
Created on Mon Sep 27 14:02:45 2017

@author: ch
"""
import collections
import tensorflow as tf
slim = tf.contrib.slim

class Block(collections.namedtuple('Block', ['scope', 'unit_fn', 'args'])):
	'A named tuple describing a ResNet block.'

	def subsample(inputs, factor, scope=None):
		if factor == 1:
			return inputs
		else:
			return slim.max_pool2d(inputs, [1,1], stride=factor, scope=scope)

	def conv2d_same(inputs, num_outputs, kernel_size, stride, scope=None):
		if stride == 1:
			return slim.conv2d(inputs, num_outputs, kernel_size, stride=1,
				padding='SAME', scope=scope)
		else:
			pad_total = kernel_size - 1
			#取整数部分
			pad_beg = pad_total // 2
			pad_end = pad_total - pad_beg
			inputs = tf.pad(inputs, [[0,0],[pad_beg, pad_end],[pad_beg, pad_end], [0,0]])
			return slim.conv2d(inputs, num_outputs, kernel_size, stride=stride, padding='VALID', scope=scope)

@slim.add_arg_scope
def stack_blocks_dense(net, blocks, outputs_collections=None):
	for block in blocks:
		with tf.variable_scope(block.scope, 'block', [net]) as sc:
			for i, unit in enumerate(block.args):
				with tf.variable_scope('unit_%d' % (i + 1), values=[net]):
					unit_depth, unit_depth_bottleneck, unit_stride = unit
					net = block.unit_fn(net,
										depth=unit_depth,
										depth_bottleneck=unit_depth_bottleneck,
										stride=unit_stride
										)
			net = slim.utils.collect_named_outputs(outputs_collections, sc.name, net)
	return net

def resnet_arg_scope(is_training=True, weight_decay=0.0001, batch_norm_decay=0.997, batch_norm_epsilon=1e-5, batch_norm_scale=True):
	batch_norm_params = {
		'is_training': is_training,
		'decay': batch_norm_decay,
		'epsilon': batch_norm_epsilon,
		'scale': batch_norm_scale,
		'updates_collections': tf.GraphKeys.UPDATE_OPS,
	}
	with slim.arg_scope(
		[slim.conv2d],
		weights_regularizer=slim.l2_regularizer(weight_decay),
		weights_regularizer=slim.variance_scaling_initializer(),
		activation_fn=tf.nn.relu,
		normalizer_fn=slim.batch_norm,
		normalizer_params=batch_norm_params):
		with slim.arg_scope([slim.batch_norm], **batch_norm_params):
			with slim.arg_scope([slim.max_pool2d], padding='SAME') as arg_sc:
				return arg_sc

@slim.add_arg_scope
def bottleneck(inputs, depth, depth_bottleneck, stride, outputs_collections=None, scope):
	with tf.variable_scope(scope, 'bottleneck_v2', [inputs]) as sc:
		depth_in = slim.utils.last_dimension(inputs.get_shape(), min_rank=4)
		preact = slim.batch_norm(inputs, activation_fn=tf.nn.relu, scope='preact')
		if depth == depth_in:
			shortcut = subsample(inputs, stride, 'shortcut')
		else:
			shortcut = slim.conv2d(preact, depth, [1,1], stride=stride, normalizer_fn=None, activation_fn=None, scope='shortcut')

		residual = slim.conv2d(preact, depth_bottleneck, [1,1], stride=1, scope='conv1')
		residual = conv2d_same(residual, depth_bottleneck, 3, stride, scope='conv2')
		residual = slim.conv2d(residual, depth, [1,1], stride=1, normalizer_fn=None, activation_fn=None, scope='conv3')

		output = shortcut + residual

		return slim.utils.collect_named_outputs(outputs_collections, sc.name, output)

#下面定义生成ResNet V2的主函数
def resnet_v2(inputs, blocks, num_classes=None, global_pool=True, include_root_block=True, reuse=None, scope=None):

	with tf.variable_scope(scope, 'resnet_v2', [inputs], reuse=reuse) as sc:
		end_points_collection = sc.original_name_scope + '_end_points'
		with slim.arg_scope([slim.conv2d, bottleneck, stack_blocks_dense], outputs_collections=end_points_collection):
			net = inputs
			if include_root_block:
				with slim.arg_scope([slim.conv2d], activation_fn=None, normalizer_fn=None):
					net = conv2d_same(net, 64, 7, stride=2, scope='conv1')
				net = slim.max_pool2d(net, [3,3], stride=2, scope='pool1')
			net = stack_blocks_dense(net, blocks)
			net = slim.batch_norm(net, activation_fn=tf.nn.relu, scope='postnorm')
			if global_pool:
				net = tf.reduce_mean(net, [1,2], name='pool5', keep_dims=True)
			if num_classes is not None:
				net = slim.conv2d(net, num_classes, [1,1], activation_fn=None, normalizer_fn=None, scope='logits')
			end_points = slim.utils.convert_collection_to_dict(end_points_collection)
			if num_classes is not None:
				end_points['predictions'] = slim.softmax(net, scope='predictions')
			return net, end_points

#根据不同的ResNet网络配置,设计层数分别是50、101、152、200的ResNet
#以下为50层的ResNet
def resnet_v2_50(inputs, num_classes=None, global_pool=True, reuse=None, scope='resnet_v2_50'):
	blocks = [
		Block('block1', bottleneck, [(256,64,1)] * 2 + [(256, 64, 2)]),
		Block('block2', bottleneck, [(512,128,1)] * 3 + [(512, 128, 2)]),
		Block('block3', bottleneck, [(1024,256,1)] * 5 + [(1024, 256, 2)]),
		Block('block4', bottleneck, [(2048,512,1)] * 3)]
	return resnet_v2(inputs, blocks, num_classes, global_pool, include_root_block=True, reuse=reuse, scope=scope)


text:
package cloudapi

// EndpointMap Endpoint Data
var EndpointMap map[string]string

// EndpointType regional or central
var EndpointType = "regional"

// GetEndpointMap Get Endpoint Data Map
func GetEndpointMap() map[string]string {
	if EndpointMap == nil {
		EndpointMap = map[string]string{
			"cn-shenzhen":           "apigateway.cn-shenzhen.aliyuncs.com",
			"cn-beijing":            "apigateway.cn-beijing.aliyuncs.com",
			"ap-south-1":            "apigateway.ap-south-1.aliyuncs.com",
			"eu-west-1":             "apigateway.eu-west-1.aliyuncs.com",
			"ap-northeast-1":        "apigateway.ap-northeast-1.aliyuncs.com",
			"cn-shenzhen-finance-1": "apigateway.aliyuncs.com",
			"me-east-1":             "apigateway.me-east-1.aliyuncs.com",
			"cn-chengdu":            "apigateway.cn-chengdu.aliyuncs.com",
			"cn-north-2-gov-1":      "apigateway.cn-north-2-gov-1.aliyuncs.com",
			"cn-qingdao":            "apigateway.cn-qingdao.aliyuncs.com",
			"cn-shanghai":           "apigateway.cn-shanghai.aliyuncs.com",
			"cn-shanghai-finance-1": "apigateway.aliyuncs.com",
			"cn-hongkong":           "apigateway.cn-hongkong.aliyuncs.com",
			"cn-hangzhou-finance":   "apigateway.aliyuncs.com",
			"ap-southeast-1":        "apigateway.ap-southeast-1.aliyuncs.com",
			"ap-southeast-2":        "apigateway.ap-southeast-2.aliyuncs.com",
			"ap-southeast-3":        "apigateway.ap-southeast-3.aliyuncs.com",
			"eu-central-1":          "apigateway.eu-central-1.aliyuncs.com",
			"cn-huhehaote":          "apigateway.cn-huhehaote.aliyuncs.com",
			"ap-southeast-5":        "apigateway.ap-southeast-5.aliyuncs.com",
			"us-east-1":             "apigateway.us-east-1.aliyuncs.com",
			"cn-zhangjiakou":        "apigateway.cn-zhangjiakou.aliyuncs.com",
			"us-west-1":             "apigateway.us-west-1.aliyuncs.com",
			"cn-hangzhou":           "apigateway.cn-hangzhou.aliyuncs.com",
		}
	}
	return EndpointMap
}

// GetEndpointType Get Endpoint Type Value
func GetEndpointType() string {
	return EndpointType
}


text:
package patient.servlet;

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

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import patient.modal.DashBoard;
import patient.modal.Patient;
import utils.DashUtils;
import database.DatabaseHelper;
import modal.Appointment;

/**
 * Servlet implementation class Patient
 */
@WebServlet("/patient")
public class PatientServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	HttpSession session;
	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public PatientServlet() {
		super();

	}

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		try {
			session = request.getSession();
			if (session.isNew()){
				redirectToLogin(request, response);
				 }
			else{

			int personId = (int) session.getAttribute("UserID");
			// get patient details
			DatabaseHelper databaseHelper = new DatabaseHelper();
			Patient patient = databaseHelper.getPatient(personId);
			DashBoard dashBoard = new DashBoard(databaseHelper.getAppointmentCount(personId,"patientId"),
					DashUtils.getBMI(patient.getHeight(), patient.getWeight()),DashUtils.getMedicineCount(personId),DashUtils.getProfileRating(personId, 1));
			ArrayList<ArrayList<Appointment>> appointments = databaseHelper.getAppointments(personId, "patientId");
			if (patient == null || appointments == null || dashBoard == null) {
				// redirect to login
				redirectToLogin(request, response);
				return;
			}
			// redirect to person dashboard
			RequestDispatcher rs = request.getRequestDispatcher("patient.jsp");
			request.setAttribute("patient", patient);
			request.setAttribute("appointments", appointments);
			request.setAttribute("dashBoard", dashBoard);
			rs.forward(request, response);
			return;
			}
		} catch (Exception e) {
			// redirect to login
			redirectToLogin(request, response);
		}
		}

	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doGet(request,response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */

	private void redirectToLogin(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		RequestDispatcher rs = request.getRequestDispatcher("login.jsp");
		request.setAttribute("error", "Please login again");
		rs.forward(request, response);
	}

}


text:
<!--
Copyright 2016 Google Inc. All rights reserved.
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.
-->

<link rel="import" href="../bower_components/polymer/polymer.html">

<link rel="import" href="io-schedule-subnav.html">

<!-- Main app shell and components -->
<link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html">
<link rel="import" href="io-icons.html">

<link rel="import" href="../bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="../bower_components/paper-item/paper-item.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tabs.html">

<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../bower_components/paper-menu-button/paper-menu-button.html">

<link rel="import" href="../bower_components/paper-fab/paper-fab.html">

<link rel="import" href="../bower_components/app-layout/app-scroll-effects/effects/fade-background.html">
<link rel="import" href="../bower_components/app-layout/app-scroll-effects/effects/waterfall.html">
<link rel="import" href="../bower_components/app-layout/app-drawer/app-drawer.html">
<link rel="import" href="../bower_components/app-layout/app-toolbar/app-toolbar.html">
<link rel="import" href="../bower_components/app-layout/app-header/app-header.html">

<link rel="import" href="../bower_components/iron-media-query/iron-media-query.html">
<link rel="import" href="../bower_components/iron-selector/iron-selector.html">

<link rel="import" href="google-signin.html">
<link rel="import" href="io-toast.html">

<!-- Pages -->
<link rel="import" href="lazy-pages.html">
<link rel="import" href="io-home-page.html">
<link rel="import" href="io-attend-page.html">
<link rel="import" href="io-extended-page.html">
<!-- <link rel="import" href="io-extended-form-page.html"> -->
<link rel="import" href="io-schedule-page.html">
<link rel="import" href="io-faq-page.html">
<!-- <link rel="import" href="io-widget-page.html"> -->
<link rel="import" href="io-notification-widget.html">


text:
// Compiled by ClojureScript 1.10.238 {}
goog.provide('clojure.core.matrix.impl.double_array');
goog.require('cljs.core');
goog.require('clojure.core.matrix.protocols');
goog.require('clojure.core.matrix.implementations');
goog.require('clojure.core.matrix.impl.wrappers');
goog.require('clojure.core.matrix.impl.common');
goog.require('clojure.core.matrix.utils');
/**
 * Creates a new zero-filled nested double array of the given shape
 */
clojure.core.matrix.impl.double_array.new_double_array = (function clojure$core$matrix$impl$double_array$new_double_array(shape){
var dims = cljs.core.count.call(null,shape);
if(((0) === dims)){
return 0.0;
} else {
if(((1) === dims)){
return cljs.core.double_array.call(null,(cljs.core.first.call(null,shape) | (0)));
} else {
var ns = cljs.core.next.call(null,shape);
var rn = cljs.core.long$.call(null,cljs.core.first.call(null,shape));
var r0 = clojure.core.matrix.impl.double_array.new_double_array.call(null,ns);
return cljs.core.into_array.call(null,cljs.core.cons.call(null,r0,(function (){var iter__4292__auto__ = ((function (ns,rn,r0,dims){
return (function clojure$core$matrix$impl$double_array$new_double_array_$_iter__29839(s__29840){
return (new cljs.core.LazySeq(null,((function (ns,rn,r0,dims){
return (function (){
var s__29840__$1 = s__29840;
while(true){
var temp__5457__auto__ = cljs.core.seq.call(null,s__29840__$1);
if(temp__5457__auto__){
var s__29840__$2 = temp__5457__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__29840__$2)){
var c__4290__auto__ = cljs.core.chunk_first.call(null,s__29840__$2);
var size__4291__auto__ = cljs.core.count.call(null,c__4290__auto__);
var b__29842 = cljs.core.chunk_buffer.call(null,size__4291__auto__);
if((function (){var i__29841 = (0);
while(true){
if((i__29841 < size__4291__auto__)){
var i = cljs.core._nth.call(null,c__4290__auto__,i__29841);
cljs.core.chunk_append.call(null,b__29842,clojure.core.matrix.impl.double_array.new_double_array.call(null,ns));

var G__29843 = (i__29841 + (1));
i__29841 = G__29843;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__29842),clojure$core$matrix$impl$double_array$new_double_array_$_iter__29839.call(null,cljs.core.chunk_rest.call(null,s__29840__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__29842),null);
}
} else {
var i = cljs.core.first.call(null,s__29840__$2);
return cljs.core.cons.call(null,clojure.core.matrix.impl.double_array.new_double_array.call(null,ns),clojure$core$matrix$impl$double_array$new_double_array_$_iter__29839.call(null,cljs.core.rest.call(null,s__29840__$2)));
}
} else {
return null;
}
break;
}
});})(ns,rn,r0,dims))
,null,null));
});})(ns,rn,r0,dims))
;
return iter__4292__auto__.call(null,cljs.core.range.call(null,(rn - (1))));
})()));

}
}
});
clojure.core.matrix.impl.double_array.construct_double_array = (function clojure$core$matrix$impl$double_array$construct_double_array(data){
var dims = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,data));
if((dims === (1))){
var n = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimension_count.call(null,data,(0)));
var r = cljs.core.double_array.call(null,n);
var n__4376__auto___29844 = n;
var i_29845 = (0);
while(true){
if((i_29845 < n__4376__auto___29844)){
(r[i_29845] = clojure.core.matrix.protocols.get_1d.call(null,data,i_29845));

var G__29846 = (i_29845 + (1));
i_29845 = G__29846;
continue;
} else {
}
break;
}

return r;
} else {
if((dims === (0))){
return clojure.core.matrix.protocols.get_0d.call(null,data);
} else {
return null;

}
}
});
goog.object.set(clojure.core.matrix.protocols.PImmutableAssignment,"array",true);

goog.object.set(clojure.core.matrix.protocols.assign,"array",(function (m,source){
return null;
}));
goog.object.set(clojure.core.matrix.protocols.PAssignment,"array",true);

goog.object.set(clojure.core.matrix.protocols.assign_BANG_,"array",(function (m,source){
var n__4376__auto___29847 = cljs.core.count.call(null,source);
var i_29848 = (0);
while(true){
if((i_29848 < n__4376__auto___29847)){
clojure.core.matrix.protocols.set_1d_BANG_.call(null,m,i_29848,cljs.core.nth.call(null,source,i_29848));

var G__29849 = (i_29848 + (1));
i_29848 = G__29849;
continue;
} else {
}
break;
}

return m;
}));

goog.object.set(clojure.core.matrix.protocols.assign_array_BANG_,"array",(function (m,arr,start,length){
var length_29850__$1 = cljs.core.long$.call(null,length);
var start_29851__$1 = cljs.core.long$.call(null,start);
var n__4376__auto___29852 = length_29850__$1;
var i_29853 = (0);
while(true){
if((i_29853 < n__4376__auto___29852)){
clojure.core.matrix.protocols.set_1d_BANG_.call(null,m,i_29853,cljs.core.nth.call(null,arr,(start_29851__$1 + i_29853)));

var G__29854 = (i_29853 + (1));
i_29853 = G__29854;
continue;
} else {
}
break;
}

return m;
}));
goog.object.set(clojure.core.matrix.protocols.PImplementation,"array",true);

goog.object.set(clojure.core.matrix.protocols.implementation_key,"array",(function (m){
return new cljs.core.Keyword(null,"number-array","number-array",-676376237);
}));

goog.object.set(clojure.core.matrix.protocols.meta_info,"array",(function (m){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"doc","doc",1913296891),"Clojure.core.matrix implementation for JS arrays"], null);
}));

goog.object.set(clojure.core.matrix.protocols.new_vector,"array",(function (m,length){
return cljs.core.double_array.call(null,(length | (0)));
}));

goog.object.set(clojure.core.matrix.protocols.new_matrix,"array",(function (m,rows,columns){
return clojure.core.matrix.impl.double_array.new_double_array.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [rows,columns], null));
}));

goog.object.set(clojure.core.matrix.protocols.new_matrix_nd,"array",(function (m,shape){
return clojure.core.matrix.impl.double_array.new_double_array.call(null,shape);
}));

goog.object.set(clojure.core.matrix.protocols.construct_matrix,"array",(function (m,data){
var dims = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,data));
if((dims === (2))){
throw cljs.core.ex_info.call(null,["Double arrays in cljs only support a single dimension currently - submit a patch!"].join(''),cljs.core.PersistentArrayMap.EMPTY);
} else {
if((dims === (1))){
var n = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimension_count.call(null,data,(0)));
var arr = cljs.core.double_array.call(null,n);
var n__4376__auto___29855 = n;
var i_29856 = (0);
while(true){
if((i_29856 < n__4376__auto___29855)){
(arr[i_29856] = clojure.core.matrix.protocols.get_1d.call(null,data,i_29856));

var G__29857 = (i_29856 + (1));
i_29856 = G__29857;
continue;
} else {
}
break;
}

return arr;
} else {
if((dims === (0))){
return clojure.core.matrix.protocols.get_0d.call(null,data);
} else {
return null;

}
}
}
}));

goog.object.set(clojure.core.matrix.protocols.supports_dimensionality_QMARK_,"array",(function (m,dims){
var dims__$1 = cljs.core.long$.call(null,dims);
return (((dims__$1 === (1))) || ((dims__$1 === (2))));
}));
goog.object.set(clojure.core.matrix.protocols.PDimensionInfo,"array",true);

goog.object.set(clojure.core.matrix.protocols.dimensionality,"array",(function (m){
return (1);
}));

goog.object.set(clojure.core.matrix.protocols.is_vector_QMARK_,"array",(function (m){
return true;
}));

goog.object.set(clojure.core.matrix.protocols.is_scalar_QMARK_,"array",(function (m){
return false;
}));

goog.object.set(clojure.core.matrix.protocols.get_shape,"array",(function (m){
return (new cljs.core.List(null,cljs.core.count.call(null,m),null,(1),null));
}));

goog.object.set(clojure.core.matrix.protocols.dimension_count,"array",(function (m,x){
if((cljs.core.long$.call(null,x) === (0))){
return cljs.core.count.call(null,m);
} else {
throw cljs.core.ex_info.call(null,["Double array does not have dimension: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(x)].join(''),cljs.core.PersistentArrayMap.EMPTY);
}
}));
goog.object.set(clojure.core.matrix.protocols.PReshaping,"array",true);

goog.object.set(clojure.core.matrix.protocols.reshape,"array",(function (m,shape){
if(cljs.core._EQ_.call(null,clojure.core.matrix.protocols.get_shape.call(null,m),shape)){
return m;
} else {
var gv = clojure.core.matrix.protocols.generic_value.call(null,m);
var es = cljs.core.concat.call(null,clojure.core.matrix.protocols.element_seq.call(null,m),cljs.core.repeat.call(null,gv));
var partition_shape = ((function (gv,es){
return (function clojure$core$matrix$impl$double_array$partition_shape(es__$1,shape__$1){
var temp__5455__auto__ = cljs.core.seq.call(null,shape__$1);
if(temp__5455__auto__){
var s = temp__5455__auto__;
var ns = cljs.core.next.call(null,s);
var plen = cljs.core.reduce.call(null,cljs.core._STAR_,(1),ns);
return cljs.core.map.call(null,((function (ns,plen,s,temp__5455__auto__,gv,es){
return (function (p1__29858_SHARP_){
return clojure$core$matrix$impl$double_array$partition_shape.call(null,p1__29858_SHARP_,ns);
});})(ns,plen,s,temp__5455__auto__,gv,es))
,cljs.core.partition.call(null,plen,es__$1));
} else {
return cljs.core.first.call(null,es__$1);
}
});})(gv,es))
;
var temp__5455__auto__ = cljs.core.seq.call(null,shape);
if(temp__5455__auto__){
var shape__$1 = temp__5455__auto__;
var fs = cljs.core.long$.call(null,cljs.core.first.call(null,shape__$1));
var parts = partition_shape.call(null,es,shape__$1);
var or__3922__auto__ = clojure.core.matrix.protocols.construct_matrix.call(null,m,cljs.core.take.call(null,fs,parts));
if(cljs.core.truth_(or__3922__auto__)){
return or__3922__auto__;
} else {
return clojure.core.matrix.protocols.construct_matrix.call(null,cljs.core.PersistentVector.EMPTY,cljs.core.take.call(null,fs,parts));
}
} else {
return cljs.core.first.call(null,es);
}
}
}));
goog.object.set(clojure.core.matrix.protocols.PTypeInfo,"array",true);

goog.object.set(clojure.core.matrix.protocols.element_type,"array",(function (m){
return Number;
}));
goog.object.set(clojure.core.matrix.protocols.PIndexedAccess,"array",true);

goog.object.set(clojure.core.matrix.protocols.get_1d,"array",(function (m,x){
return (m[(x | (0))]);
}));

goog.object.set(clojure.core.matrix.protocols.get_2d,"array",(function (m,row,column){
throw cljs.core.ex_info.call(null,["Can't do get-2D from 1D double array"].join(''),cljs.core.PersistentArrayMap.EMPTY);
}));

goog.object.set(clojure.core.matrix.protocols.get_nd,"array",(function (m,indexes){
if(((1) === cljs.core.count.call(null,indexes))){
return (m[(cljs.core.first.call(null,indexes) | (0))]);
} else {
throw cljs.core.ex_info.call(null,["Can't get from double array with dimensionality: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.count.call(null,indexes))].join(''),cljs.core.PersistentArrayMap.EMPTY);
}
}));
goog.object.set(clojure.core.matrix.protocols.PIndexedSetting,"array",true);

goog.object.set(clojure.core.matrix.protocols.set_1d,"array",(function (m,x,v){
var arr = m.slice();
(arr[(x | (0))] = v);

return arr;
}));

goog.object.set(clojure.core.matrix.protocols.set_2d,"array",(function (m,x,y,v){
throw cljs.core.ex_info.call(null,["Can't do 2D set on double array"].join(''),cljs.core.PersistentArrayMap.EMPTY);
}));

goog.object.set(clojure.core.matrix.protocols.set_nd,"array",(function (m,indexes,v){
if(((1) === cljs.core.count.call(null,indexes))){
var arr = m.slice();
var x = (cljs.core.first.call(null,indexes) | (0));
(arr[(x | (0))] = v);

return arr;
} else {
throw cljs.core.ex_info.call(null,["Can't set on double array with dimensionality: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.count.call(null,indexes))].join(''),cljs.core.PersistentArrayMap.EMPTY);
}
}));

goog.object.set(clojure.core.matrix.protocols.is_mutable_QMARK_,"array",(function (m){
return true;
}));
goog.object.set(clojure.core.matrix.protocols.PIndexedSettingMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.set_1d_BANG_,"array",(function (m,x,v){
(m[(x | (0))] = v);

return m;
}));

goog.object.set(clojure.core.matrix.protocols.set_2d_BANG_,"array",(function (m,x,y,v){
throw cljs.core.ex_info.call(null,["Can't do 2D set on double array"].join(''),cljs.core.PersistentArrayMap.EMPTY);
}));

goog.object.set(clojure.core.matrix.protocols.set_nd_BANG_,"array",(function (m,indexes,v){
if(((1) === cljs.core.count.call(null,indexes))){
(m[(cljs.core.first.call(null,indexes) | (0))] = v);

return m;
} else {
throw cljs.core.ex_info.call(null,["Can't set on double array with dimensionality: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.count.call(null,indexes))].join(''),cljs.core.PersistentArrayMap.EMPTY);
}
}));
goog.object.set(clojure.core.matrix.protocols.PMutableMatrixConstruction,"array",true);

goog.object.set(clojure.core.matrix.protocols.mutable_matrix,"array",(function (m){
return m.slice();
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixScaling,"array",true);

goog.object.set(clojure.core.matrix.protocols.scale,"array",(function (m,a){
var m__$1 = m;
var len = m__$1.length;
var arr = cljs.core.double_array.call(null,len);
var a__$1 = a;
var n__4376__auto___29859 = len;
var i_29860 = (0);
while(true){
if((i_29860 < n__4376__auto___29859)){
(arr[i_29860] = (a__$1 * (m__$1[i_29860])));

var G__29861 = (i_29860 + (1));
i_29860 = G__29861;
continue;
} else {
}
break;
}

return arr;
}));

goog.object.set(clojure.core.matrix.protocols.pre_scale,"array",(function (m,a){
var m__$1 = m;
var len = m__$1.length;
var arr = cljs.core.double_array.call(null,len);
var a__$1 = a;
var n__4376__auto___29862 = len;
var i_29863 = (0);
while(true){
if((i_29863 < n__4376__auto___29862)){
(arr[i_29863] = (a__$1 * (m__$1[i_29863])));

var G__29864 = (i_29863 + (1));
i_29863 = G__29864;
continue;
} else {
}
break;
}

return arr;
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixMutableScaling,"array",true);

goog.object.set(clojure.core.matrix.protocols.scale_BANG_,"array",(function (m,a){
var m__$1 = m;
var a__$1 = a;
var n__4376__auto__ = m__$1.length;
var i = (0);
while(true){
if((i < n__4376__auto__)){
(m__$1[i] = (a__$1 * (m__$1[i])));

var G__29865 = (i + (1));
i = G__29865;
continue;
} else {
return null;
}
break;
}
}));

goog.object.set(clojure.core.matrix.protocols.pre_scale_BANG_,"array",(function (m,a){
var m__$1 = m;
var a__$1 = a;
var n__4376__auto__ = m__$1.length;
var i = (0);
while(true){
if((i < n__4376__auto__)){
(m__$1[i] = (a__$1 * (m__$1[i])));

var G__29866 = (i + (1));
i = G__29866;
continue;
} else {
return null;
}
break;
}
}));
goog.object.set(clojure.core.matrix.protocols.PConversion,"array",true);

goog.object.set(clojure.core.matrix.protocols.convert_to_nested_vectors,"array",(function (m){
return cljs.core.vec.call(null,m);
}));
goog.object.set(clojure.core.matrix.protocols.PFunctionalOperations,"array",true);

goog.object.set(clojure.core.matrix.protocols.element_seq,"array",(function (m){
return m;
}));

goog.object.set(clojure.core.matrix.protocols.element_map,"array",(function() {
var G__29868 = null;
var G__29868__2 = (function (m,f){
var cnt = m.length;
var r = cljs.core.double_array.call(null,cnt);
var n__4376__auto___29869 = cnt;
var i_29870 = (0);
while(true){
if((i_29870 < n__4376__auto___29869)){
(r[i_29870] = f.call(null,(m[i_29870])));

var G__29871 = (i_29870 + (1));
i_29870 = G__29871;
continue;
} else {
}
break;
}

return r;
});
var G__29868__3 = (function (m,f,a){
var r = cljs.core.double_array.call(null,m);
var a__$1 = clojure.core.matrix.protocols.broadcast_coerce.call(null,r,a);
var n__4376__auto___29872 = m.length;
var i_29873 = (0);
while(true){
if((i_29873 < n__4376__auto___29872)){
(r[i_29873] = f.call(null,(m[i_29873]),(a__$1[i_29873])));

var G__29874 = (i_29873 + (1));
i_29873 = G__29874;
continue;
} else {
}
break;
}

return r;
});
var G__29868__4 = (function (m,f,a,more){
var r = cljs.core.double_array.call(null,m);
var a__$1 = clojure.core.matrix.protocols.broadcast_coerce.call(null,m,a);
var more__$1 = cljs.core.mapv.call(null,((function (r,a__$1){
return (function (p1__29867_SHARP_){
return clojure.core.matrix.protocols.broadcast_coerce.call(null,m,p1__29867_SHARP_);
});})(r,a__$1))
,more);
var more_count = cljs.core.long$.call(null,cljs.core.count.call(null,more__$1));
var vs = cljs.core.double_array.call(null,more_count);
var n__4376__auto___29875 = m.length;
var i_29876 = (0);
while(true){
if((i_29876 < n__4376__auto___29875)){
var n__4376__auto___29877__$1 = more_count;
var j_29878 = (0);
while(true){
if((j_29878 < n__4376__auto___29877__$1)){
(vs[j_29878] = (more__$1.call(null,j_29878)[i_29876]));

var G__29879 = (j_29878 + (1));
j_29878 = G__29879;
continue;
} else {
}
break;
}

(r[i_29876] = cljs.core.apply.call(null,f,(m[i_29876]),(a__$1[i_29876]),vs));

var G__29880 = (i_29876 + (1));
i_29876 = G__29880;
continue;
} else {
}
break;
}

return r;
});
G__29868 = function(m,f,a,more){
switch(arguments.length){
case 2:
return G__29868__2.call(this,m,f);
case 3:
return G__29868__3.call(this,m,f,a);
case 4:
return G__29868__4.call(this,m,f,a,more);
}
throw(new Error('Invalid arity: ' + (arguments.length - 1)));
};
G__29868.cljs$core$IFn$_invoke$arity$2 = G__29868__2;
G__29868.cljs$core$IFn$_invoke$arity$3 = G__29868__3;
G__29868.cljs$core$IFn$_invoke$arity$4 = G__29868__4;
return G__29868;
})()
);

goog.object.set(clojure.core.matrix.protocols.element_map_BANG_,"array",(function() {
var G__29881 = null;
var G__29881__2 = (function (m,f){
return clojure.core.matrix.protocols.assign_BANG_.call(null,m,clojure.core.matrix.protocols.element_map.call(null,m,f));
});
var G__29881__3 = (function (m,f,a){
return clojure.core.matrix.protocols.assign_BANG_.call(null,m,clojure.core.matrix.protocols.element_map.call(null,m,f,a));
});
var G__29881__4 = (function (m,f,a,more){
return clojure.core.matrix.protocols.assign_BANG_.call(null,m,clojure.core.matrix.protocols.element_map.call(null,m,f,a,more));
});
G__29881 = function(m,f,a,more){
switch(arguments.length){
case 2:
return G__29881__2.call(this,m,f);
case 3:
return G__29881__3.call(this,m,f,a);
case 4:
return G__29881__4.call(this,m,f,a,more);
}
throw(new Error('Invalid arity: ' + (arguments.length - 1)));
};
G__29881.cljs$core$IFn$_invoke$arity$2 = G__29881__2;
G__29881.cljs$core$IFn$_invoke$arity$3 = G__29881__3;
G__29881.cljs$core$IFn$_invoke$arity$4 = G__29881__4;
return G__29881;
})()
);

goog.object.set(clojure.core.matrix.protocols.element_reduce,"array",(function() {
var G__29882 = null;
var G__29882__2 = (function (m,f){
var m__$1 = m;
return cljs.core.reduce.call(null,f,m__$1);
});
var G__29882__3 = (function (m,f,init){
var m__$1 = m;
return cljs.core.reduce.call(null,f,init,m__$1);
});
G__29882 = function(m,f,init){
switch(arguments.length){
case 2:
return G__29882__2.call(this,m,f);
case 3:
return G__29882__3.call(this,m,f,init);
}
throw(new Error('Invalid arity: ' + (arguments.length - 1)));
};
G__29882.cljs$core$IFn$_invoke$arity$2 = G__29882__2;
G__29882.cljs$core$IFn$_invoke$arity$3 = G__29882__3;
return G__29882;
})()
);
goog.object.set(clojure.core.matrix.protocols.PIndexImplementation,"array",true);

goog.object.set(clojure.core.matrix.protocols.index_QMARK_,"array",(function (m){
return true;
}));

goog.object.set(clojure.core.matrix.protocols.index_to_longs,"array",(function (m){
return m;
}));

goog.object.set(clojure.core.matrix.protocols.index_to_ints,"array",(function (m){
return m;
}));

goog.object.set(clojure.core.matrix.protocols.index_from_longs,"array",(function (m,xs){
return cljs.core.long_array.call(null,xs);
}));

goog.object.set(clojure.core.matrix.protocols.index_from_ints,"array",(function (m,xs){
return cljs.core.int_array.call(null,xs);
}));

goog.object.set(clojure.core.matrix.protocols.index_coerce,"array",(function (m,a){
return m;
}));
goog.object.set(clojure.core.matrix.protocols.PBroadcast,"array",true);

goog.object.set(clojure.core.matrix.protocols.broadcast,"array",(function (m,new_shape){
var nshape = new_shape;
var mshape = clojure.core.matrix.protocols.get_shape.call(null,m);
var mdims = cljs.core.count.call(null,mshape);
var ndims = cljs.core.count.call(null,nshape);
if(cljs.core.truth_((function (){var and__3911__auto__ = (mdims === ndims);
if(and__3911__auto__){
return clojure.core.matrix.utils.same_shape_object_QMARK_.call(null,nshape,mshape);
} else {
return and__3911__auto__;
}
})())){
return m;
} else {
return clojure.core.matrix.impl.wrappers.wrap_broadcast.call(null,m,new_shape);

}
}));
goog.object.set(clojure.core.matrix.protocols.PNumerical,"array",true);

goog.object.set(clojure.core.matrix.protocols.numerical_QMARK_,"array",(function (m){
return true;
}));
goog.object.set(clojure.core.matrix.protocols.PSubVector,"array",true);

goog.object.set(clojure.core.matrix.protocols.subvector,"array",(function (m,start,length){
return clojure.core.matrix.protocols.subvector.call(null,clojure.core.matrix.impl.wrappers.wrap_nd.call(null,m),start,length);
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixEquality,"array",true);

goog.object.set(clojure.core.matrix.protocols.matrix_equals,"array",(function (a,b){
if((a === b)){
return true;
} else {
if(cljs.core.truth_(clojure.core.matrix.protocols.same_shape_QMARK_.call(null,a,b))){
if(((0) === cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,a)))){
return (clojure.core.matrix.protocols.get_0d.call(null,a) === (function (){var x__21930__auto__ = b;
if(typeof x__21930__auto__ === 'number'){
return x__21930__auto__;
} else {
return clojure.core.matrix.protocols.get_0d.call(null,x__21930__auto__);

}
})());
} else {
return cljs.core.not_any_QMARK_.call(null,cljs.core.false_QMARK_,cljs.core.map.call(null,cljs.core._EQ__EQ_,clojure.core.matrix.protocols.element_seq.call(null,a),clojure.core.matrix.protocols.element_seq.call(null,b)));
}
} else {
return false;

}
}
}));
goog.object.set(clojure.core.matrix.protocols.PSameShape,"array",true);

goog.object.set(clojure.core.matrix.protocols.same_shape_QMARK_,"array",(function (a,b){
return clojure.core.matrix.utils.same_shape_object_QMARK_.call(null,clojure.core.matrix.protocols.get_shape.call(null,a),clojure.core.matrix.protocols.get_shape.call(null,b));
}));
goog.object.set(clojure.core.matrix.protocols.PSelect,"array",true);

goog.object.set(clojure.core.matrix.protocols.select,"array",(function (a,area){
var or__3922__auto__ = clojure.core.matrix.protocols.select_view.call(null,a,area);
if(cljs.core.truth_(or__3922__auto__)){
return or__3922__auto__;
} else {
return clojure.core.matrix.impl.wrappers.wrap_selection.call(null,a,area);
}
}));
goog.object.set(clojure.core.matrix.protocols.PLogistic,"array",true);

goog.object.set(clojure.core.matrix.protocols.logistic,"array",(function (m){
return clojure.core.matrix.protocols.element_map.call(null,m,clojure.core.matrix.impl.common.logistic_fn);
}));
goog.object.set(clojure.core.matrix.protocols.PLogisticMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.logistic_BANG_,"array",(function (m){
return clojure.core.matrix.protocols.element_map_BANG_.call(null,m,clojure.core.matrix.impl.common.logistic_fn);
}));
goog.object.set(clojure.core.matrix.protocols.PSoftplus,"array",true);

goog.object.set(clojure.core.matrix.protocols.softplus,"array",(function (m){
return clojure.core.matrix.protocols.element_map.call(null,m,clojure.core.matrix.impl.common.softplus_fn);
}));
goog.object.set(clojure.core.matrix.protocols.PSoftmax,"array",true);

goog.object.set(clojure.core.matrix.protocols.softmax,"array",(function (m){
var em = clojure.core.matrix.protocols.exp.call(null,m);
return clojure.core.matrix.protocols.element_divide.call(null,em,clojure.core.matrix.protocols.element_sum.call(null,em));
}));
goog.object.set(clojure.core.matrix.protocols.PSoftmaxMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.softmax_BANG_,"array",(function (m){
clojure.core.matrix.protocols.exp_BANG_.call(null,m);

clojure.core.matrix.protocols.element_divide_BANG_.call(null,m,clojure.core.matrix.protocols.element_sum.call(null,m));

return m;
}));
goog.object.set(clojure.core.matrix.protocols.PSoftplusMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.softplus_BANG_,"array",(function (m){
return clojure.core.matrix.protocols.element_map_BANG_.call(null,m,clojure.core.matrix.impl.common.softplus_fn);
}));
goog.object.set(clojure.core.matrix.protocols.PReLU,"array",true);

goog.object.set(clojure.core.matrix.protocols.relu,"array",(function (m){
return clojure.core.matrix.protocols.element_map.call(null,m,clojure.core.matrix.impl.common.relu_fn);
}));
goog.object.set(clojure.core.matrix.protocols.PReLUMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.relu_BANG_,"array",(function (m){
return clojure.core.matrix.protocols.element_map_BANG_.call(null,m,clojure.core.matrix.impl.common.relu_fn);
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixPredicates,"array",true);

goog.object.set(clojure.core.matrix.protocols.identity_matrix_QMARK_,"array",(function (m){
var rc = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimension_count.call(null,m,(0)));
var cc = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimension_count.call(null,m,(1)));
if((((cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,m)) === (2))) && ((rc === cc)))){
var i = cljs.core.long$.call(null,(0));
while(true){
if((i < rc)){
if((function (){var j = cljs.core.long$.call(null,(0));
while(true){
if((j < cc)){
var elem = clojure.core.matrix.protocols.get_2d.call(null,m,i,j);
if(typeof elem === 'number'){
if((i === j)){
if((elem === 1.0)){
var G__29885 = (j + (1));
j = G__29885;
continue;
} else {
return false;
}
} else {
if((elem === (0))){
var G__29886 = (j + (1));
j = G__29886;
continue;
} else {
return false;
}
}
} else {
return false;
}
} else {
return true;
}
break;
}
})()){
var G__29887 = (i + (1));
i = G__29887;
continue;
} else {
return false;
}
} else {
return true;
}
break;
}
} else {
return false;
}
}));

goog.object.set(clojure.core.matrix.protocols.zero_matrix_QMARK_,"array",(function (m){
return cljs.core.every_QMARK_.call(null,(function (p1__29883_SHARP_){
return ((typeof p1__29883_SHARP_ === 'number') && ((p1__29883_SHARP_ === (0))));
}),clojure.core.matrix.protocols.element_seq.call(null,m));
}));

goog.object.set(clojure.core.matrix.protocols.symmetric_QMARK_,"array",(function (m){
var G__29884 = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,m));
switch (G__29884) {
case (0):
return true;

break;
case (1):
return true;

break;
case (2):
var and__3911__auto__ = clojure.core.matrix.impl.common.square_QMARK_.call(null,m);
if(cljs.core.truth_(and__3911__auto__)){
return clojure.core.matrix.impl.common.symmetric_matrix_entries_QMARK_.call(null,m);
} else {
return and__3911__auto__;
}

break;
default:
return cljs.core._EQ_.call(null,m,clojure.core.matrix.protocols.transpose.call(null,m));

}
}));

goog.object.set(clojure.core.matrix.protocols.PMatrixPredicates,"number",true);

goog.object.set(clojure.core.matrix.protocols.identity_matrix_QMARK_,"number",(function (m){
return cljs.core._EQ_.call(null,(1),m);
}));

goog.object.set(clojure.core.matrix.protocols.zero_matrix_QMARK_,"number",(function (m){
return (m === (0));
}));

goog.object.set(clojure.core.matrix.protocols.symmetric_QMARK_,"number",(function (m){
return true;
}));
goog.object.set(clojure.core.matrix.protocols.PSummable,"array",true);

goog.object.set(clojure.core.matrix.protocols.element_sum,"array",(function (a){
return clojure.core.matrix.protocols.element_reduce.call(null,a,(cljs.core.truth_(clojure.core.matrix.protocols.numerical_QMARK_.call(null,a))?cljs.core._PLUS_:clojure.core.matrix.protocols.matrix_add));
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixMultiply,"array",true);

goog.object.set(clojure.core.matrix.protocols.matrix_multiply,"array",(function (m,a){
var mdims = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,m));
var adims = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,a));
if((adims === (0))){
return clojure.core.matrix.protocols.scale.call(null,m,a);
} else {
if((((mdims === (1))) && ((adims === (1))))){
return clojure.core.matrix.protocols.vector_dot.call(null,m,a);
} else {
if((((mdims === (1))) && ((adims === (2))))){
var vec__29889 = clojure.core.matrix.protocols.get_shape.call(null,a);
var arows = cljs.core.nth.call(null,vec__29889,(0),null);
var acols = cljs.core.nth.call(null,vec__29889,(1),null);
return clojure.core.matrix.protocols.reshape.call(null,clojure.core.matrix.protocols.matrix_multiply.call(null,clojure.core.matrix.protocols.reshape.call(null,m,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(1),arows], null)),a),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [acols], null));
} else {
if((((mdims === (2))) && ((adims === (1))))){
var vec__29892 = clojure.core.matrix.protocols.get_shape.call(null,m);
var mrows = cljs.core.nth.call(null,vec__29892,(0),null);
var mcols = cljs.core.nth.call(null,vec__29892,(1),null);
return clojure.core.matrix.protocols.reshape.call(null,clojure.core.matrix.protocols.matrix_multiply.call(null,m,clojure.core.matrix.protocols.reshape.call(null,a,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [mcols,(1)], null))),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [mcols], null));
} else {
if((((mdims === (2))) && ((adims === (2))))){
var mutable = clojure.core.matrix.protocols.is_mutable_QMARK_.call(null,m);
var vec__29895 = clojure.core.matrix.protocols.get_shape.call(null,m);
var mrows = cljs.core.nth.call(null,vec__29895,(0),null);
var mcols = cljs.core.nth.call(null,vec__29895,(1),null);
var vec__29898 = clojure.core.matrix.protocols.get_shape.call(null,a);
var arows = cljs.core.nth.call(null,vec__29898,(0),null);
var acols = cljs.core.nth.call(null,vec__29898,(1),null);
var new_m_type = (cljs.core.truth_(mutable)?m:clojure.core.matrix.implementations.get_canonical_object.call(null,new cljs.core.Keyword(null,"ndarray","ndarray",1659822393)));
var new_m = clojure.core.matrix.protocols.new_matrix.call(null,new_m_type,mrows,acols);
var i_29904 = cljs.core.long$.call(null,(0));
while(true){
if((i_29904 < mrows)){
var j_29905 = cljs.core.long$.call(null,(0));
while(true){
if((j_29905 < acols)){
clojure.core.matrix.protocols.set_2d_BANG_.call(null,new_m,i_29904,j_29905,(0));

var G__29906 = (j_29905 + (1));
j_29905 = G__29906;
continue;
} else {
}
break;
}

var G__29907 = (i_29904 + (1));
i_29904 = G__29907;
continue;
} else {
}
break;
}

var i_29908 = cljs.core.long$.call(null,(0));
while(true){
if((i_29908 < mrows)){
var j_29909 = cljs.core.long$.call(null,(0));
while(true){
if((j_29909 < acols)){
var k_29910 = cljs.core.long$.call(null,(0));
while(true){
if((k_29910 < mcols)){
clojure.core.matrix.protocols.set_2d_BANG_.call(null,new_m,i_29908,j_29909,(clojure.core.matrix.protocols.get_2d.call(null,new_m,i_29908,j_29909) + (clojure.core.matrix.protocols.get_2d.call(null,m,i_29908,k_29910) * clojure.core.matrix.protocols.get_2d.call(null,a,k_29910,j_29909))));

var G__29911 = (k_29910 + (1));
k_29910 = G__29911;
continue;
} else {
}
break;
}

var G__29912 = (j_29909 + (1));
j_29909 = G__29912;
continue;
} else {
}
break;
}

var G__29913 = (i_29908 + (1));
i_29908 = G__29913;
continue;
} else {
}
break;
}

return new_m;
} else {
return null;
}
}
}
}
}
}));

goog.object.set(clojure.core.matrix.protocols.element_multiply,"array",(function (m,a){
if(typeof a === 'number'){
return clojure.core.matrix.protocols.scale.call(null,m,a);
} else {
var vec__29901 = clojure.core.matrix.protocols.broadcast_compatible.call(null,m,a);
var m__$1 = cljs.core.nth.call(null,vec__29901,(0),null);
var a__$1 = cljs.core.nth.call(null,vec__29901,(1),null);
return clojure.core.matrix.protocols.element_map.call(null,m__$1,cljs.core._STAR_,a__$1);
}
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixMultiplyMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.element_multiply_BANG_,"array",(function (m,a){
return clojure.core.matrix.protocols.assign_BANG_.call(null,m,clojure.core.matrix.protocols.element_multiply.call(null,m,a));
}));

goog.object.set(clojure.core.matrix.protocols.matrix_multiply_BANG_,"array",(function (m,a){
return clojure.core.matrix.protocols.assign_BANG_.call(null,m,clojure.core.matrix.protocols.matrix_multiply.call(null,m,a));
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixDivide,"array",true);

goog.object.set(clojure.core.matrix.protocols.element_divide,"array",(function() {
var G__29914 = null;
var G__29914__1 = (function (m){
if(cljs.core.truth_(clojure.core.matrix.protocols.get_shape.call(null,m))){
return clojure.core.matrix.protocols.element_map.call(null,m,clojure.core.matrix.protocols.element_divide);
} else {
throw cljs.core.ex_info.call(null,["Don't know how to take reciprocal of ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.type.call(null,m))].join(''),cljs.core.PersistentArrayMap.EMPTY);
}
});
var G__29914__2 = (function (m,a){
return clojure.core.matrix.protocols.element_multiply.call(null,m,clojure.core.matrix.protocols.element_divide.call(null,a));
});
G__29914 = function(m,a){
switch(arguments.length){
case 1:
return G__29914__1.call(this,m);
case 2:
return G__29914__2.call(this,m,a);
}
throw(new Error('Invalid arity: ' + (arguments.length - 1)));
};
G__29914.cljs$core$IFn$_invoke$arity$1 = G__29914__1;
G__29914.cljs$core$IFn$_invoke$arity$2 = G__29914__2;
return G__29914;
})()
);
goog.object.set(clojure.core.matrix.protocols.PMatrixDivideMutable,"array",true);

goog.object.set(clojure.core.matrix.protocols.element_divide_BANG_,"array",(function() {
var G__29918 = null;
var G__29918__1 = (function (m){
return clojure.core.matrix.protocols.element_map_BANG_.call(null,m,cljs.core._SLASH_);
});
var G__29918__2 = (function (m,a){
var vec__29915 = clojure.core.matrix.protocols.broadcast_compatible.call(null,m,a);
var m__$1 = cljs.core.nth.call(null,vec__29915,(0),null);
var a__$1 = cljs.core.nth.call(null,vec__29915,(1),null);
return clojure.core.matrix.protocols.element_map_BANG_.call(null,m__$1,cljs.core._SLASH_,a__$1);
});
G__29918 = function(m,a){
switch(arguments.length){
case 1:
return G__29918__1.call(this,m);
case 2:
return G__29918__2.call(this,m,a);
}
throw(new Error('Invalid arity: ' + (arguments.length - 1)));
};
G__29918.cljs$core$IFn$_invoke$arity$1 = G__29918__1;
G__29918.cljs$core$IFn$_invoke$arity$2 = G__29918__2;
return G__29918;
})()
);
goog.object.set(clojure.core.matrix.protocols.PBroadcastCoerce,"array",true);

goog.object.set(clojure.core.matrix.protocols.broadcast_coerce,"array",(function (m,a){
return clojure.core.matrix.protocols.coerce_param.call(null,m,clojure.core.matrix.protocols.broadcast_like.call(null,m,a));
}));
goog.object.set(clojure.core.matrix.protocols.PCoercion,"array",true);

goog.object.set(clojure.core.matrix.protocols.coerce_param,"array",(function (m,param){
var param__$1 = (((param instanceof cljs.core.ISeq))?clojure.core.matrix.protocols.convert_to_nested_vectors.call(null,param):param);
var or__3922__auto__ = clojure.core.matrix.protocols.construct_matrix.call(null,m,param__$1);
if(cljs.core.truth_(or__3922__auto__)){
return or__3922__auto__;
} else {
return param__$1;
}
}));
goog.object.set(clojure.core.matrix.protocols.PBroadcastLike,"array",true);

goog.object.set(clojure.core.matrix.protocols.broadcast_like,"array",(function (m,a){
var sm = clojure.core.matrix.protocols.get_shape.call(null,m);
var sa = clojure.core.matrix.protocols.get_shape.call(null,a);
if(cljs.core.truth_(clojure.core.matrix.utils.same_shape_object_QMARK_.call(null,sm,sa))){
return a;
} else {
return clojure.core.matrix.protocols.broadcast.call(null,a,sm);
}
}));
goog.object.set(clojure.core.matrix.protocols.PMatrixOps,"array",true);

goog.object.set(clojure.core.matrix.protocols.trace,"array",(function (m){
if(((2) === cljs.core.long$.call(null,clojure.core.matrix.protocols.dimensionality.call(null,m)))){
} else {
throw cljs.core.ex_info.call(null,["Trace requires a 2D matrix"].join(''),cljs.core.PersistentArrayMap.EMPTY);
}

var rc = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimension_count.call(null,m,(0)));
var cc = cljs.core.long$.call(null,clojure.core.matrix.protocols.dimension_count.call(null,m,(1)));
var dims = Math.min(rc,cc);
var i = (0);
var res = 0.0;
while(true){
if((i >= dims)){
return res;
} else {
var G__29919 = (i + (1));
var G__29920 = (res + clojure.core.matrix.protocols.get_2d.call(null,m,i,i));
i = G__29919;
res = G__29920;
continue;
}
break;
}
}));

goog.object.set(clojure.core.matrix.protocols.determinant,"array",(function (m){
return null;
}));

goog.object.set(clojure.core.matrix.protocols.inverse,"array",(function (m){
return null;
}));

//# sourceMappingURL=double_array.js.map?rel=1526826987625


text:
    <meta name="viewport" content="width=device-width initial-scale=1" charset="UTF-8">
    <title>Longest Substring</title>


text:
<?php

namespace Risk\CoreBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class ArmyController extends Controller
{
    public function indexAction()
    {
        $armyManager = $this->get('risk_core.army_manager');
        $armies = $armyManager->getRepository()->findAll();

        $parameters = array();
        $parameters['armies'] = $armies;
        return $this->render('RiskCoreBundle:Army:army_list.html.twig', $parameters);
    }

}


text:
curvefit
========

Curve fitting for a specific set of data


text:
OC.L10N.register(
    "files_external",
    {
    "Step 1 failed. Exception: %s" : "Paso 1 falló. Excepción: %s",
    "Step 2 failed. Exception: %s" : "Paso 2 falló. Excepción: %s",
    "External storage" : "Almacenamiento externo",
    "Google Drive App Configuration" : "Configuración de la Aplicación Google Drive",
    "Personal" : "Personal",
    "System" : "Sistema",
    "Grant access" : "Conceder acceso",
    "Error configuring OAuth1" : "Error al configurar OAuth1",
    "Please provide a valid app key and secret." : "Por favor escriba una llave y secreto válidos para la aplicación.",
    "Generate keys" : "Generar claves",
    "Error generating key pair" : "Error al generar clave de emparejamiento",
    "All users. Type to select user or group." : "Todos los usuarios. Escribe para seleccionar un usuario o grupo.",
    "(group)" : "(grupo)",
    "Admin defined" : "Definido por administrador",
    "Saved" : "Guardado",
    "Empty response from the server" : "Respuesta vacía del servidor",
    "Couldn't access. Please logout and login to activate this mount point" : "No se pudo acceder. Por favor cerrar sesión y entrar nuevamente para activar este punto de montaje",
    "Couldn't get the information from the ownCloud server: {code} {type}" : "No se puedo obtener la información desde el servidor ownCloud: {code} {type}",
    "Couldn't get the list of external mount points: {type}" : "No se pudo obtener la lista de puntos de montaje externos: {type}",
    "There was an error with message: " : "Hubo un error con mensaje:",
    "External mount error" : "Error en montaje externo",
    "Couldn't get the list of Windows network drive mount points: empty response from the server" : "No se pudo obtener la lista de puntos de montaje de unidades de red de Windows: respuesta vacía del servidor",
    "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Algunos de los puntos configurados de montaje externos no están conectados. Por favor haga clic en la(s) fila(s) roja(s) para más información",
    "Please enter the credentials for the {mount} mount" : "Por favor ingrese las credenciales para el montaje {mount}",
    "Username" : "Nombre de usuario",
    "Password" : "Contraseña",
    "Credentials saved" : "Credenciales guardadas",
    "Credentials saving failed" : "No se pudo guardar las credenciales",
    "Credentials required" : "Credenciales requeridas",
    "Save" : "Guardar",
    "Storage with id \"%i\" not found" : "Almacenamiento con el id \"%i\" no encontrado",
    "Invalid backend or authentication mechanism class" : "Backend o mecanismo de autenticación inválidos",
    "Invalid mount point" : "Punto de montaje inválido",
    "Not permitted to use authentication mechanism \"%s\"" : "No se permite usar el mecanismo de autenticación \"%s\"",
    "Unsatisfied authentication mechanism parameters" : "Parámetros del mecanismo de autenticación no cumplidos",
    "Insufficient data: %s" : "Datos insuficientes: %s",
    "%s" : "%s",
    "OAuth1" : "OAuth1",
    "App key" : "Clave de aplicación",
    "App secret" : "Clave secreta de aplicación",
    "OAuth2" : "OAuth2",
    "Client ID" : "ID de Usuario",
    "Client secret" : "Clave secreta del cliente",
    "API key" : "clave API",
    "RSA public key" : "Clave pública RSA",
    "Public key" : "Clave pública",
    "WebDAV" : "WebDAV",
    "URL" : "URL",
    "Remote subfolder" : "Subcarpeta remota",
    "Google Drive" : "Google Drive",
    "Local" : "Local",
    "Location" : "Ubicación",
    "ownCloud" : "ownCloud",
    "SFTP" : "SFTP",
    "Host" : "Servidor",
    "Root" : "Raíz",
    "SFTP with secret key login" : "SFTP con inicio de sesión con clave secreta",
    "SMB / CIFS" : "SMB / CIFS",
    "Share" : "Compartir",
    "Domain" : "Dominio",
    "SMB / CIFS using OC login" : "SMB / CIFS con inicio de sesión OC",
    "Name" : "Nombre",
    "Storage type" : "Tipo de almacenamiento",
    "Scope" : "Alcance",
    "Enable encryption" : "Habilitar cifrado",
    "Enable previews" : "Habilitar vistas previas",
    "Enable sharing" : "Habilitar compartir",
    "Check for changes" : "Revisar por cambios",
    "Never" : "Nunca",
    "Once every direct access" : "Una vez cada acceso directo",
    "External Storage" : "Almacenamiento externo",
    "Folder name" : "Nombre de la carpeta",
    "Authentication" : "Autenticación",
    "Configuration" : "Configuración",
    "Available for" : "Disponible para",
    "Add storage" : "Agregar almacenamiento",
    "Advanced settings" : "Configuración avanzada",
    "Delete" : "Eliminar",
    "Allow users to mount external storage" : "Permitir a los usuarios que monten un almacenamiento externo",
    "Allow users to mount the following external storage" : "Permitir a los usuarios que monten el siguiente almacenamiento externo"
},
"nplurals=2; plural=(n != 1);");


text:
<?php

namespace AC\Transcoding\Tests;
use \AC\Transcoding\File;
use \AC\Transcoding\Preset;
use \AC\Transcoding\FileHandlerDefinition;

class PresetTest extends \PHPUnit_Framework_TestCase
{
    public function testInstatiateDynamic1()
    {
        $p = new Preset('name', 'adapter');
        $this->assertNotNull($p);
        $this->assertTrue($p instanceof Preset);
    }

    public function testInstatiateDynamic2()
    {
        $this->setExpectedException('AC\Transcoding\Exception\InvalidPresetException');
        $p = new Preset();
    }

    public function testInstatiateDynamic3()
    {
        $this->setExpectedException('AC\Transcoding\Exception\InvalidPresetException');
        $p = new Preset('foo');
    }

    public function testInstantiateExtended1()
    {
        $this->setExpectedException('AC\Transcoding\Exception\InvalidPresetException');
        $p = new Mock\InvalidDummyPreset;
    }

    public function testInstantiateExtended2()
    {
        $p = new Mock\DummyPreset;
        $this->assertNotNull($p);
        $this->assertTrue($p instanceof Preset);
    }

    public function testSetGetHasRemoveOption()
    {
        $p = new Preset('name', 'adapter');
        $this->assertFalse($p->has('foo'));
        $this->assertSame('bar', $p->get('foo','bar'));
        $p->set('foo', 'baz');
        $this->assertTrue($p->has('foo'));
        $this->assertSame('baz', $p->get('foo', 'bar'));
        $p->remove('foo');
        $this->assertFalse($p->has('foo'));
        $this->assertSame('bar', $p->get('foo','bar'));
    }

    public function testSetGetHasRemoveOptionAsArray()
    {
        $p = new Preset('foo', 'bar');
        $this->assertFalse(isset($p['foo']));
        $this->assertNull($p['foo']);
        $p['foo'] = 'bar';
        $this->assertTrue(isset($p['foo']));
        $this->assertSame('bar', $p['foo']);
        unset($p['foo']);
        $this->assertFalse(isset($p['foo']));
        $this->assertNull($p['foo']);
    }

    public function testSetGetHasRemoveWhenLocked()
    {
        $p = new Preset('name', 'adapter');
        $p->set('foo', 'bar')->lock();
        $this->assertTrue($p->has('foo'));
        $this->assertSame('bar', $p->get('foo', 'baz'));
        $p->remove('foo');
        $this->assertTrue($p->has('foo'));
        $this->assertSame('bar', $p->get('foo', 'baz'));
        $p->set('foo', 'bazzz');
        $this->assertTrue($p->has('foo'));
        $this->assertSame('bar', $p->get('foo', 'baz'));
    }

    public function testSetOptions()
    {
        $p = new Preset('name', 'adapter');
        $p->setOptions(array(
            'foo' => 'bar',
            'baz' => false,
        ));

        $this->assertSame('bar', $p['foo']);
        $this->assertFalse($p->get('baz', true));
    }

    public function testGetNameAdapterAndDescription()
    {
        $p = new Preset('name','adapter');
        $this->assertSame('name', $p->getKey());
        $this->assertSame('adapter', $p->getRequiredAdapter());
        $this->assertSame("No description provided.", $p->getDescription());
    }

    public function testGetInputDefinition()
    {
        $p = new Preset('name', 'adapter');
        $d = $p->getInputDefinition();
        $this->assertNotNull($d);
        $this->assertTrue($d instanceof FileHandlerDefinition);
    }

    public function testGetOutputDefinition()
    {
        $p = new Preset('name', 'adapter');
        $d = $p->getOutputDefinition();
        $this->assertNotNull($d);
        $this->assertTrue($d instanceof FileHandlerDefinition);
    }

    public function testAcceptsInputFile1()
    {
        $p = new Mock\DummyPreset;
        $this->assertTrue($p->acceptsInputFile(new File(__FILE__)));
    }

    public function testAcceptsInputFile2()
    {
        $p = new Mock\DummyPreset;
        $this->assertTrue($p->acceptsInputFile(new File(__DIR__)));
    }

    public function testAcceptsOutputFile1()
    {
        $p = new Mock\DummyPreset;
        $this->assertTrue($p->acceptsOutputFile(new File(__FILE__)));
    }

    public function testAcceptsOutputFile2()
    {
        $p = new Mock\DummyPreset;
        $this->assertTrue($p->acceptsOutputFile(new File(__DIR__)));
    }

    public function testGenerateOutputPathFile1()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $expectedPath = substr($f->getRealPath(), 0, -4).".".$p->getKey().".php";
        $this->assertSame($expectedPath, $p->generateOutputPath($f));
    }

    public function testGenerateOutputPathFile1_1()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $outputPath = dirname($f->getRealPath());
        $expectedPath = substr($f->getRealPath(), 0, -4).".".$p->getKey().".php";
        $this->assertSame($expectedPath, $p->generateOutputPath($f, $outputPath));
    }

    public function testGenerateOutputPathFile2()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $expectedPath = '/tmp/test.php';
        $this->assertSame($expectedPath, $p->generateOutputPath($f, $expectedPath));
    }

    public function testGenerateOutputPathFile3()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $outputPath = __DIR__;
        $expectedPath = substr($f->getRealPath(), 0, -4).".".$p->getKey().".php";
        $this->assertSame($expectedPath, $p->generateOutputPath($f, $outputPath));
    }

    public function testGenerateOutputPathFile4()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredExtension('mp3');
        $outputPath = '/foo/stuff.mp4';
        $this->setExpectedException("AC\Transcoding\Exception\InvalidInputException");
        $p->generateOutputPath($f, $outputPath);
    }

    public function testGenerateOutputPathFile5()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredExtension('mp3');
        $outputPath = '/foo/';
        $expected = '/foo/'.substr($f->getFilename(), 0, -4).".".$p->getKey().".mp3";
        $this->assertSame($expected, $p->generateOutputPath($f, $outputPath));
    }

    public function testGenerateOutputPathFile6()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredExtension('mp3');
        $outputPath = '/foo';
        $expected = '/foo/'.substr($f->getFilename(), 0, -4).".".$p->getKey().".mp3";
        $this->assertSame($expected, $p->generateOutputPath($f, $outputPath));
    }

    public function testGenerateOutputPathFile7()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredExtension('mp3');
        $outputPath = '/foo/../';
        $expected = '/foo/../'.substr($f->getFilename(), 0, -4).".".$p->getKey().".mp3";
        $this->assertSame($expected, $p->generateOutputPath($f, $outputPath));
    }

    public function testGenerateOutputPathFile8()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset2;
        $outputPath = __DIR__;
        $this->setExpectedException("AC\Transcoding\Exception\InvalidPresetException");
        $p->generateOutputPath($f, $outputPath);
    }

    public function testGenerateOutputPathDirectory1()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredType('directory');
        $expected = dirname($f->getRealPath())."/".$p->getKey();
        $this->assertSame($expected, $p->generateOutputPath($f));
    }

    public function testGenerateOutputPathDirectory2()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredType('directory');
        $outputPath = '/foo/somedir';
        $expected = $outputPath;
        $this->assertSame($expected, $p->generateOutputPath($f, $outputPath));
    }

    public function testGenerateOutputPathDirectory3()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredType('directory');

        $outputPath = '/foo.mp3';
        $this->setExpectedException("AC\Transcoding\Exception\InvalidInputException");
        $p->generateOutputPath($f, $outputPath);
    }

    public function testGenerateOutputPathDirectory4()
    {
        $f = new File(__FILE__);
        $p = new Mock\DummyPreset;
        $p->getOutputDefinition()->setRequiredType('directory');

        $outputPath = '../../stuff';
        $expected = $outputPath;
        $this->assertSame($expected, $p->generateOutputPath($f, $outputPath));
    }
}


text:
/**
 *
 */
package com.github.gwtd3.demo.client.test.ui;

/**
 * @author Anthony Schiochet
 *
 */
public class TestResult {

	private final TestPhase endingPhase;

	private final TestResultType type;

	private final Throwable throwable;

	protected TestResult(final TestPhase endingPhase, final TestResultType type, final Throwable throwable) {
		super();
		this.endingPhase = endingPhase;
		this.type = type;
		this.throwable = throwable;
	}

	public static TestResult createSuccess() {
		return new TestResult(TestPhase.FINISHED, TestResultType.SUCCESS, null);
	}

	public static TestResult createFailure(final AssertionError failure) {
		return new TestResult(TestPhase.RUNNING, TestResultType.FAILURE, failure);
	}

	public static TestResult createError(final Throwable error, final TestPhase phase) {
		return new TestResult(phase, TestResultType.ERROR, error);
	}

	public TestPhase getEndingPhase() {
		return endingPhase;
	}

	public TestResultType getType() {
		return type;
	}

	public Throwable getThrowable() {
		return throwable;
	}

}