text:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity name="Busko\EntityBundle\Entity\EmployeePhones" table="employee_phones">

    <id name="phone" type="string" column="phone" length="10"/>
    <id name="id" type="integer" column="id" />
    <!--one-to-one field="id" target-entity="Employees">
      <join-columns>
        <join-column name="id" referenced-column-name="id"/>
      </join-columns>
    </one-to-one-->
  </entity>
</doctrine-mapping>

redpajama_set_name: RedPajamaGithub


text:
package br.com.crescer.aula4.entity.map;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * @author Carlos H. Nonnemacher
 */
@Entity
@Table(name = "PEDIDO")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pedido.findAll", query = "SELECT p FROM Pedido p"),
    @NamedQuery(name = "Pedido.findByIdpedido", query = "SELECT p FROM Pedido p WHERE p.idpedido = :idpedido"),
    @NamedQuery(name = "Pedido.findByDatapedido", query = "SELECT p FROM Pedido p WHERE p.datapedido = :datapedido"),
    @NamedQuery(name = "Pedido.findByDataentrega", query = "SELECT p FROM Pedido p WHERE p.dataentrega = :dataentrega"),
    @NamedQuery(name = "Pedido.findByValorpedido", query = "SELECT p FROM Pedido p WHERE p.valorpedido = :valorpedido"),
    @NamedQuery(name = "Pedido.findBySituacao", query = "SELECT p FROM Pedido p WHERE p.situacao = :situacao")})
public class Pedido implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "IDPEDIDO")
    private BigDecimal idpedido;
    @Basic(optional = false)
    @Column(name = "DATAPEDIDO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date datapedido;
    @Column(name = "DATAENTREGA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataentrega;
    @Basic(optional = false)
    @Column(name = "VALORPEDIDO")
    private BigDecimal valorpedido;
    @Basic(optional = false)
    @Column(name = "SITUACAO")
    private Character situacao;
    @JoinColumn(name = "IDCLIENTE", referencedColumnName = "IDCLIENTE")
    @ManyToOne(optional = false)
    private Cliente idcliente;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idpedido")
    private List<PedidoItem> pedidoItemList;

    public Pedido() {
    }

    public Pedido(BigDecimal idpedido) {
        this.idpedido = idpedido;
    }

    public Pedido(BigDecimal idpedido, Date datapedido, BigDecimal valorpedido, Character situacao) {
        this.idpedido = idpedido;
        this.datapedido = datapedido;
        this.valorpedido = valorpedido;
        this.situacao = situacao;
    }

    public BigDecimal getIdpedido() {
        return idpedido;
    }

    public void setIdpedido(BigDecimal idpedido) {
        this.idpedido = idpedido;
    }

    public Date getDatapedido() {
        return datapedido;
    }

    public void setDatapedido(Date datapedido) {
        this.datapedido = datapedido;
    }

    public Date getDataentrega() {
        return dataentrega;
    }

    public void setDataentrega(Date dataentrega) {
        this.dataentrega = dataentrega;
    }

    public BigDecimal getValorpedido() {
        return valorpedido;
    }

    public void setValorpedido(BigDecimal valorpedido) {
        this.valorpedido = valorpedido;
    }

    public Character getSituacao() {
        return situacao;
    }

    public void setSituacao(Character situacao) {
        this.situacao = situacao;
    }

    public Cliente getIdcliente() {
        return idcliente;
    }

    public void setIdcliente(Cliente idcliente) {
        this.idcliente = idcliente;
    }

    @XmlTransient
    public List<PedidoItem> getPedidoItemList() {
        return pedidoItemList;
    }

    public void setPedidoItemList(List<PedidoItem> pedidoItemList) {
        this.pedidoItemList = pedidoItemList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpedido != null ? idpedido.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pedido)) {
            return false;
        }
        Pedido other = (Pedido) object;
        if ((this.idpedido == null && other.idpedido != null) || (this.idpedido != null && !this.idpedido.equals(other.idpedido))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.crescer.aula4.entity.map.Pedido[ idpedido=" + idpedido + " ]";
    }

}


text:
<?php
namespace Payum\Paypal\ExpressCheckout\Nvp\Action;

use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Request\StatusRequestInterface;
use Payum\Paypal\ExpressCheckout\Nvp\Api;

class PaymentDetailsStatusAction implements ActionInterface
{
    /**
     * {@inheritdoc}
     */
    public function execute($request)
    {
        /** @var $request \Payum\Core\Request\StatusRequestInterface */
        if (false == $this->supports($request)) {
            throw RequestNotSupportedException::createActionNotSupported($this, $request);
        }

        $model = ArrayObject::ensureArrayObject($request->getModel());

        foreach (range(0, 9) as $index) {
            if (Api::L_ERRORCODE_PAYMENT_NOT_AUTHORIZED == $model['L_ERRORCODE'.$index]) {
                $request->markCanceled();

                return;
            }
        }

        foreach (range(0, 9) as $index) {
            if ($model['L_ERRORCODE'.$index]) {
                $request->markFailed();

                return;
            }
        }

        //treat this situation as canceled. In other case we can get into an endless cycle.
        if (
            false == $model['PAYERID'] &&
            Api::CHECKOUTSTATUS_PAYMENT_ACTION_NOT_INITIATED == $model['CHECKOUTSTATUS']
        ) {
            $request->markCanceled();

            return;
        }

        //it is possible to set zero amount for create agreement request.
        if (
            $model['PAYERID'] &&
            Api::CHECKOUTSTATUS_PAYMENT_ACTION_NOT_INITIATED == $model['CHECKOUTSTATUS'] &&
            $model['L_BILLINGTYPE0'] &&
            $model['PAYMENTREQUEST_0_AMT'] == 0
        ) {
            $request->markSuccess();

            return;
        }

        if (
            false == $model['CHECKOUTSTATUS'] ||
            Api::CHECKOUTSTATUS_PAYMENT_ACTION_NOT_INITIATED == $model['CHECKOUTSTATUS']
        ) {
            $request->markNew();

            return;
        }

        if (Api::CHECKOUTSTATUS_PAYMENT_ACTION_IN_PROGRESS == $model['CHECKOUTSTATUS']) {
            $request->markPending();

            return;
        }
        if (Api::CHECKOUTSTATUS_PAYMENT_ACTION_FAILED == $model['CHECKOUTSTATUS']) {
            $request->markFailed();

            return;
        }

        //todo check all payment statuses.
        if (
            Api::CHECKOUTSTATUS_PAYMENT_COMPLETED == $model['CHECKOUTSTATUS'] ||
            Api::CHECKOUTSTATUS_PAYMENT_ACTION_COMPLETED == $model['CHECKOUTSTATUS']
        ) {
            $successCounter = 0;
            $allCounter = 0;
            foreach (range(0, 9) as $index) {
                if (null === $paymentStatus = $model['PAYMENTREQUEST_'.$index.'_PAYMENTSTATUS']) {
                    continue;
                }

                $allCounter++;

                $inProgress = array(
                    Api::PAYMENTSTATUS_IN_PROGRESS,
                    Api::PAYMENTSTATUS_PENDING,
                );
                if (in_array($paymentStatus, $inProgress)) {
                    $request->markPending();

                    return;
                }

                $failedStatuses = array(
                    Api::PAYMENTSTATUS_FAILED,
                    Api::PAYMENTSTATUS_EXPIRED,
                    Api::PAYMENTSTATUS_DENIED,
                    Api::PAYMENTSTATUS_CANCELED_REVERSAL
                );
                if (in_array($paymentStatus, $failedStatuses)) {
                    $request->markFailed();

                    return;
                }

                $completedStatuses = array(
                    Api::PAYMENTSTATUS_COMPLETED,
                    Api::PAYMENTSTATUS_PROCESSED
                );
                if (in_array($paymentStatus, $completedStatuses)) {
                    $successCounter++;
                }
            }

            if ($successCounter === $allCounter) {
                $request->markSuccess();

                return;
            }
        }
    }

    /**
     * {@inheritdoc}
     */
    public function supports($request)
    {
        if (false == $request instanceof StatusRequestInterface) {
            return false;
        }

        $model = $request->getModel();
        if (false == $model instanceof \ArrayAccess) {
            return false;
        }

        return isset($model['PAYMENTREQUEST_0_AMT']) && null !== $model['PAYMENTREQUEST_0_AMT'];
    }
}


text:
What is a Singleton?

From Wikipedia:

In software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.

Instantiating a Singleton

Singletons can only have one instance in the whole application. This is achieved via a private constructor and a getInstance() method.

public class SampleSingleton {
    private static SampleSingleton instance = null;
    private SampleSingleton() {

    }
    public static SampleSingleton getInstance() {
    if(instance == null) instance = new SampleSingleton();
    return instance;
    }
    }

Problem with concurrency

Sometimes, when using a singleton we can find problems with concurrency. These occur when two threads simultaneously try to access the single instance returned by getInstance().

Both threads lock the resource, and they enter into deadlock. Programming languages often provide ways around this, with syntax to lock the resource before it is used, but it can be a problem for newer programmers.

A way to prevent these concurrency problems in Java is to synchronize the instantiation of the Singleton:

public class SampleSingleton {
    private static SampleSingleton instance = null;
    private SampleSingleton() {

    }
    public static SampleSingleton getInstance() {
    if(instance == null) {
    synchronized(SampleSingleton.class) {
    instance = new SampleSingleton();
    }
    }
    return instance;
    }
    }

Even this way of doing it isn’t perfectly safe, however. The only way to guarantee 100% that the class is thread-safe is to make the instance static, and instantiate it as a class variable:

public class SampleSingleton {
    private static final SampleSingleton INSTANCE = new SampleSingleton();
    private SampleSingleton() {

    }
    }

And then accessing the instance like so:

...
    SampleSingleton singleton = SampleSingleton.INSTANCE;
    ...

Subclassing a singleton

Subclassing a singleton may be interesting if there are properties we want to be be able to change, while the singleton still remains a globally accessible object.

For example, if we had a FileSystem singleton, we could subclass it to PS3FileSystem or XboxFileSystem, depending on which platform we are using.

FileSystem& FileSystem::instance()
    {
    #if PLATFORM == PLAYSTATION3
    static FileSystem *instance = new PS3FileSystem();
    #elif PLATFORM == WII
    static FileSystem *instance = new WiiFileSystem();
    #endif

    return *instance;
    }

Regretting the singleton

Many people are against singletons (and global variables as a whole). There are a few reasons for this1, such as:

Make code harder to understand, because calling SomeClass.getGlobalData() introduces a dependency on a function that should otherwise be self-contained.

They encourage coupling: calling your global AudioEngine singleton from a Physics class sounds like a terrible idea, but not if you don’t know any better.

The concurrency problems mentioned above.

What can we use instead?

class Bullet
    {
    public:
    int getX() const { return x_; }
    int getY() const { return y_; }

    void setX(int x) { x_ = x; }
    void setY(int y) { y_ = y; }

    private:
    int x_, y_;
    };

    class BulletManager
    {
    public:
    Bullet* create(int x, int y)
    {
    Bullet* bullet = new Bullet();
    bullet->setX(x);
    bullet->setY(y);

    return bullet;
    }

    bool isOnScreen(Bullet& bullet)
    {
    return bullet.getX() >= 0 &&
    bullet.getX() < SCREEN_WIDTH &&
    bullet.getY() >= 0 &&
    bullet.getY() < SCREEN_HEIGHT;
    }

    void move(Bullet& bullet)
    {
    bullet.setX(bullet.getX() + 5);
    }
    };

In the example above, someone was using a Bullet class to hold data about a bullet, like its x and y location. They were then using a BulletManager class to move the bullet. This is an extreme example, but nevertheless worth exploring.

An obvious solution below:

class Bullet
    {
    public:
    Bullet(int x, int y) : x_(x), y_(y) {}

    bool isOnScreen()
    {
    return x_ >= 0 && x_ < SCREEN_WIDTH &&
    y_ >= 0 && y_ < SCREEN_HEIGHT;
    }

    void move() { x_ += 5; }

    private:
    int x_, y_;
    };

There was no need for BulletManager in the first place!

Use something already global

Usually, games will have an unavoidable singleton, like Game, or World. Often it is better to have these singletons contain things like FileSystem, AudioEngine, Log, or others.

Pass it as a parameter!

It can be cumbersome, but it can also be a good solution. Android passes a Context class nearly everywhere. Are our games going to be that large and complex that passing a couple parameters here and there is too difficult?

In order to pass it as a parameter everywhere, the Google Testing Blog2 recommends using an ApplicationFactory class, which will instantiate the necessary classes. You will only create one instance of an ApplicationFactory class in the main() method.

http://gameprogrammingpatterns.com/singleton.html#why-we-regret-using-it ↩

http://googletesting.blogspot.co.uk/2008/08/where-have-all-singletons-gone.html ↩


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

namespace SlimCanvas.View
{
    /// <summary>
    /// View camera
    /// </summary>
    public class Camera
    {
        /// <summary>
        /// Width
        /// </summary>
        public double Width { get; set; }

        /// <summary>
        /// Height
        /// </summary>
        public double Height { get; set; }

        /// <summary>
        /// X can not less than 0 and greater than Canvas.Width - Camera.Width
        /// </summary>
        public double X
        {
            get { return _x; }
            set
            {
                var maxRight = Canvas.MyCanvas.Width - Width;
                if (value < 0)
                    _x = 0;
                else if (value > maxRight)
                    _x = maxRight;
                else
                    _x = value;
            }
        }

        /// <summary>
        /// Y can not less than 0 and greater than Canvas.Height - Camera.Height
        /// </summary>
        public double Y
        {
            get { return _y; }
            set
            {
                var maxBottom = Canvas.MyCanvas.Height - Height;
                if (value < 0)
                    _y = 0;
                else if (value > maxBottom)
                    _y = maxBottom;
                else
                    _y = value;
            }
        }

        double _x = 0;
        double _y = 0;
    }
}


text:
package io.druid.sql.calcite.rel;

import io.druid.java.util.common.StringUtils;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.core.AggregateCall;
import org.apache.calcite.rex.RexNode;

public class CannotBuildQueryException extends RuntimeException
{
  public CannotBuildQueryException(String message)
  {
    super(message);
  }

  public CannotBuildQueryException(RelNode relNode)
  {
    super(StringUtils.nonStrictFormat("Cannot process rel[%s]", relNode));
  }

  public CannotBuildQueryException(RelNode relNode, RexNode rexNode)
  {
    super(StringUtils.nonStrictFormat("Cannot translate reference[%s] from rel[%s]", rexNode, relNode));
  }

  public CannotBuildQueryException(RelNode relNode, AggregateCall aggregateCall)
  {
    super(StringUtils.nonStrictFormat("Cannot translate aggregator[%s] from rel[%s]", aggregateCall, relNode));
  }
}


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

namespace Nls.Base79.Assign {
    public sealed class InterpolateShare {
        #region Fields
        private readonly PairShare[] _pairs;
        private readonly Int32[] _subjectTags;
        //private readonly Bioparent _bioparent;
        #endregion
        #region Properties
        #endregion
        #region Constructor
        public InterpolateShare( PairShare[] pairs ) { //, Bioparent bioparent ) {
            if( pairs == null ) throw new ArgumentNullException("pairs");
            _pairs = pairs;
            //_bioparent = bioparent;
            _subjectTags = BuildTagList(pairs);
        }
        #endregion
        #region Public Instance Methods
        public Tristate Interpolate( Int32 subjectTag1, Int32 subjectTag2 ) {//, Func<Int32, Int32, float?> retrieve ) {
            Int32 pairIndex = Validate(subjectTag1, subjectTag2, true);

            Tristate oldR = RetrieveShare(subjectTag1, subjectTag2);
            if( oldR != Tristate.DoNotKnow ) throw new InvalidOperationException(string.Format("The relationship for {0} and {1} already has an R of {2}.", subjectTag1, subjectTag2, oldR));

            Tristate halfSibSalvage = SalvageHalfSibLoop(subjectTag1, subjectTag2, pairIndex);
            if( halfSibSalvage != Tristate.DoNotKnow )
                return halfSibSalvage;
            else
                return SalvageFullSibLoop(subjectTag1, subjectTag2, pairIndex);//This could be DoNotKnow still.
        }
        private Tristate SalvageFullSibLoop( Int32 subjectTag1, Int32 subjectTag2, Int32 pairIndex ) {//, Func<Int32, Int32, float?> retrieve ) {
            for( Int32 subjectIndex = 0; subjectIndex < _subjectTags.Length; subjectIndex++ ) {
                Int32 candidateTag = _subjectTags[subjectIndex];
                if( candidateTag != subjectTag1 && candidateTag != subjectTag2 ) {
                    Tristate anchorSharesWithSubject1 = RetrieveShare(candidateTag, subjectTag1);
                    Tristate anchorSharesWithSubject2 = RetrieveShare(candidateTag, subjectTag2);
                    Tristate interpolatedShare = SalvageFullSib(anchorSharesWithSubject1, anchorSharesWithSubject2);
                    if( interpolatedShare != Tristate.DoNotKnow ) {
                        _pairs[pairIndex].SetInterpolatedShare(interpolatedShare);
                        return interpolatedShare;
                    }
                }
            }
            return Tristate.DoNotKnow;
        }
        private Tristate SalvageHalfSibLoop( Int32 subjectTag1, Int32 subjectTag2, Int32 pairIndex ) {
            for( Int32 subjectIndex = 0; subjectIndex < _subjectTags.Length; subjectIndex++ ) {
                Int32 candidateTag = _subjectTags[subjectIndex];
                if( candidateTag != subjectTag1 && candidateTag != subjectTag2 ) {
                    Tristate anchorSharesWithSubject1 = RetrieveShare(candidateTag, subjectTag1);
                    Tristate anchorSharesWithSubject2 = RetrieveShare(candidateTag, subjectTag2);
                    Tristate interpolatedShare = SalvageHalfSib(anchorSharesWithSubject1, anchorSharesWithSubject2);
                    if( interpolatedShare != Tristate.DoNotKnow ) {
                        _pairs[pairIndex].SetInterpolatedShare(interpolatedShare);
                        return interpolatedShare;
                    }
                }
            }
            return Tristate.DoNotKnow;
        }
        public static Tristate SalvageFullSib( Tristate anchorSharesWithSubject1, Tristate anchorSharesWithSubject2 ) {
            if( (anchorSharesWithSubject1 == Tristate.DoNotKnow) || (anchorSharesWithSubject2 == Tristate.DoNotKnow) )
                return Tristate.DoNotKnow;
            else if( (anchorSharesWithSubject1 == Tristate.Yes) && (anchorSharesWithSubject2 == Tristate.Yes) )
                return Tristate.Yes;
            else
                return Tristate.DoNotKnow;
        }
        public static Tristate SalvageHalfSib( Tristate anchorSharesWithSubject1, Tristate anchorSharesWithSubject2 ) {
            if( (anchorSharesWithSubject1 == Tristate.DoNotKnow) || (anchorSharesWithSubject2 == Tristate.DoNotKnow) )
                return Tristate.DoNotKnow;
            else if( (anchorSharesWithSubject1 == Tristate.Yes && anchorSharesWithSubject2 == Tristate.No) || (anchorSharesWithSubject1 == Tristate.No && anchorSharesWithSubject2 == Tristate.Yes) )
                return Tristate.No;
            else
                return Tristate.DoNotKnow;
        }
        public Tristate RetrieveShare( Int32 subjectTagA, Int32 subjectTagB ) {
            Validate(subjectTagA, subjectTagB, false);

            for( Int32 i = 0; i < _pairs.Length; i++ ) {
                if( _pairs[i].SubjectTag1 == subjectTagA && _pairs[i].SubjectTag2 == subjectTagB ) return _pairs[i].Share;
                if( _pairs[i].SubjectTag2 == subjectTagA && _pairs[i].SubjectTag1 == subjectTagB ) return _pairs[i].Share;
            }
            throw new ArgumentException("A relationship for subjects " + subjectTagA + " and " + subjectTagB + " does not exist in the instance Pairs array.");
        }
        public bool SubjectTagExistsInPairs( Int32 subjectTag ) {
            for( Int32 i = 0; i < _pairs.Length; i++ ) {
                if( _pairs[i].SubjectTag1 == subjectTag ) return true;
                if( _pairs[i].SubjectTag2 == subjectTag ) return true;
            }
            return false;
        }
        public Int32 RelationshipIndexOfPairs( Int32 subjectTag1, Int32 subjectTag2 ) {
            for( Int32 i = 0; i < _pairs.Length; i++ ) {
                if( _pairs[i].SubjectTag1 == subjectTag1 && _pairs[i].SubjectTag2 == subjectTag2 ) return i;
                if( _pairs[i].SubjectTag2 == subjectTag1 && _pairs[i].SubjectTag1 == subjectTag2 ) return i;
            }
            return -1;
        }
        public static Int32[] BuildTagList( PairShare[] pairs ) {
            if( pairs == null ) throw new ArgumentNullException("pairs");
            List<Int32> list = new List<Int32>();
            for( Int32 i = 0; i < pairs.Length; i++ ) {
                list.Add(pairs[i].SubjectTag1);
                list.Add(pairs[i].SubjectTag2);
            }
            Int32[] array = list.Distinct().ToArray();
            Array.Sort(array);
            return array;
        }
        #endregion
        #region Private Methods
        private Int32 Validate( Int32 subjectTag1, Int32 subjectTag2, bool enforceIncreasingOrder ) {
            if( enforceIncreasingOrder && !(subjectTag1 < subjectTag2) ) throw new ArgumentException("The value of subjectTag1 must be less than subjectTag2; subjectTag1 is " + subjectTag1 + " and subjectTag2 is " + subjectTag2 + ".");
            if( !SubjectTagExistsInPairs(subjectTag1) ) throw new ArgumentOutOfRangeException("subjectTag1", subjectTag1, "The subject does not exist in the instance Pairs array.");
            if( !SubjectTagExistsInPairs(subjectTag2) ) throw new ArgumentOutOfRangeException("subjectTag2", subjectTag2, "The subject does not exist in the instance Pairs array.");
            Int32 index = RelationshipIndexOfPairs(subjectTag1, subjectTag2);
            if( index < 0 ) throw new ArgumentException("A relationship for subjects " + subjectTag1 + " and " + subjectTag2 + " does not exist in the instance Pairs array.");
            return index;
        }
        #endregion
    }
}


text:
<title>Scroll timeline with Web Animation using the root scroller</title>
<link rel="help" href="https://drafts.csswg.org/scroll-animations/">
<meta name="assert" content="Web animation correctly updates values when using the root scroller as the source for the ScrollTimeline">
<link rel="match" href="animation-with-root-scroller-ref.html">

Covered Contents


text:
<?php

namespace utest\orm\unit\object\property;

use umi\orm\metadata\field\string\TextField;
use umi\orm\object\IObject;
use umi\orm\object\property\Property;
use utest\orm\ORMTestCase;

/**
 * Тесты для обычного свойства
 */
class PropertyTest extends ORMTestCase
{

    /**
     * @var Property $commonProperty
     */
    protected $commonProperty;

    /**
     * Заглушка для IObject::fullyLoad()
     * @return bool
     */
    public function mockFullyLoad()
    {
    }

    protected function setUpFixtures()
    {
        /**
         * @var IObject $object
         */
        $object = $this->getMock('umi\orm\object\Object', ['fullyLoad'], [], '', false);

        $object->expects($this->any())
            ->method('fullyLoad')
            ->will($this->returnCallback([$this, 'mockFullyLoad']));
        $this->resolveOptionalDependencies($object);

        $commonField = new TextField('login', ['accessor' => 'getLogin', 'mutator' => 'setLogin']);
        $this->commonProperty = new Property($object, $commonField);
    }

    public function testPropertyMethods()
    {

        $this->assertInstanceOf(
            'umi\orm\metadata\field\IField',
            $this->commonProperty->getField(),
            'Ожидается, что IProperty::getField() вернет IField'
        );
        $this->assertEquals(
            'login',
            $this->commonProperty->getFullName(),
            'Ожидается, что у не локализованного свойства полное имя не содержит имя локали'
        );
        $this->assertEquals(
            'getLogin',
            $this->commonProperty->getAccessor(),
            'Ожидается, что у свойства login есть прямой метод для получения значения'
        );
        $this->assertEquals(
            'setLogin',
            $this->commonProperty->getMutator(),
            'Ожидается, что у свойства login есть прямой метод для установки значения'
        );

    }

    public function testPropertyInitialState()
    {
        $this->assertFalse($this->commonProperty->getIsLoaded(), 'Ожидается, что свойство по умолчанию не загружено');
        $this->assertFalse($this->commonProperty->getIsModified(), 'Ожидается, что свойство по умолчанию не изменено');
        $this->assertFalse(
            $this->commonProperty->getIsValuePrepared(),
            'Ожидается, что свойство по умолчанию подготовлено'
        );

        $this->assertNull(
            $this->commonProperty->getValue(),
            'Ожидается, что свойство без значения по умолчанию не имеет никаких значений'
        );
        $this->assertNull(
            $this->commonProperty->getDbValue(),
            'Ожидается, что свойство без значения по умолчанию не имеет никаких значений'
        );
        $this->assertNull(
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что свойство без значения по умолчанию не имеет никаких значений'
        );
        $this->assertNull(
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что свойство без значения по умолчанию не имеет никаких значений'
        );
    }

    public function testPropertyAfterSetInitialValueState()
    {
        $this->commonProperty->setInitialValue('test_login');
        $this->assertTrue(
            $this->commonProperty->getIsLoaded(),
            'Ожидается, что после выставления начального значения свойство загружено'
        );
        $this->assertFalse(
            $this->commonProperty->getIsModified(),
            'Ожидается, что после выставления начального значения свойство не считается модифицированным'
        );
        $this->assertFalse(
            $this->commonProperty->getIsValuePrepared(),
            'Ожидается, что после выставления начального значения свойство не считается подготовленным'
        );

        $this->assertEquals(
            'test_login',
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что после выставления начального значения свойства test_login '
            . 'это значение также становится старым значением'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getValue(),
            'Ожидается, что что после выставления начального значения свойство имеет значение test_login'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getDbValue(),
            'Ожидается, что после выставления начального значения свойство имеет внутренне значение test_login'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что после выставления начального значения свойства test_login '
            . 'выставляется соответсвующее внутреннее старое значение'
        );
    }

    public function testPropertyAfterSetValueState()
    {

        $this->commonProperty->setInitialValue('test_login');
        $this->commonProperty->setValue('new_login');

        $this->assertTrue(
            $this->commonProperty->getIsLoaded(),
            'Ожидается, что установка значения вызывает событие на загрузку свойства'
        );
        $this->assertTrue(
            $this->commonProperty->getIsModified(),
            'Ожидается, что после выставления значения отличного от начального свойство считается модифицированным'
        );
        $this->assertTrue(
            $this->commonProperty->getIsValuePrepared(),
            'Ожидается, что после выставления значения свойство считается подготовленным'
        );

        $this->assertEquals(
            'new_login',
            $this->commonProperty->getValue(),
            'Ожидается, что что после выставления значения свойство имеет значение test_login'
        );
        $this->assertEquals(
            'new_login',
            $this->commonProperty->getDbValue(),
            'Ожидается, что после выставления значения свойство имеет внутренне значение test_login'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что после выставления значения свойства new_login старое значение равно test_login'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что после выставления значения свойства new_login внутренне старое значение равно test_login'
        );

        $this->commonProperty->setIsConsistent();
        $this->assertEquals(
            'new_login',
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что после сброса флага модифицированности старое значение свойства принимает текущее значение'
        );
        $this->assertEquals(
            'new_login',
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что после сброса флага модифицированности старое значение свойства принимает текущее значение'
        );

    }

    public function testNullInitialValue()
    {
        $this->commonProperty->setValue('new_login');
        $this->assertNull(
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что старое значение null, так как не было задано изначальное значение'
        );
        $this->assertNull(
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что старое значение null, так как не было задано изначальное значение'
        );
    }

    public function testModifyProperty()
    {

        $this->commonProperty->setInitialValue('test_login');
        $this->commonProperty->setValue('test_login');

        $this->assertTrue(
            $this->commonProperty->getIsLoaded(),
            'Ожидается, что установка значения вызывает событие на загрузку свойства'
        );
        $this->assertTrue(
            $this->commonProperty->getIsValuePrepared(),
            'Ожидается, что после выставления значения равного начальному свойство считается подготовленным'
        );
        $this->assertFalse(
            $this->commonProperty->getIsModified(),
            'Ожидается, что после выставления значения равного начальному свойство считается не модифицированным'
        );

        $this->commonProperty->setValue('new_test_login');
        $this->commonProperty->setValue('new_new_test_login');

        $this->assertEquals(
            'test_login',
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что при повторном изменении значения свойства старое значение равно начальному значению'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что при повторном изменении значения свойства '
            . 'старое внутреннее значение равно начальному значению'
        );

        $this->commonProperty->setInitialValue('test_login1');

        $this->assertTrue(
            $this->commonProperty->getIsLoaded(),
            'Ожидается, что после выставления начального значения свойство загружено'
        );
        $this->assertFalse(
            $this->commonProperty->getIsModified(),
            'Ожидается, что после выставления начального значения свойство не считается модифицированным'
        );
        $this->assertFalse(
            $this->commonProperty->getIsValuePrepared(),
            'Ожидается, что после выставления начального значения свойство не считается подготовленным'
        );

        $this->assertEquals(
            'test_login1',
            $this->commonProperty->getValue(),
            'Ожидается, что после выставления начального значения свойство имеет значение test_login1'
        );
        $this->assertEquals(
            'test_login1',
            $this->commonProperty->getDbValue(),
            'Ожидается, что после выставления начального значения свойство имеет внутренне значение test_login1'
        );
        $this->assertEquals(
            'test_login1',
            $this->commonProperty->getPreviousValue(),
            'Ожидается, что после выставления начального значения свойства test_login1 '
            . 'это значение также становится старым значением'
        );
        $this->assertEquals(
            'test_login1',
            $this->commonProperty->getPreviousDbValue(),
            'Ожидается, что после выставления начального значения свойства test_login1 '
            . 'выставляется соответсвующее внутреннее старое значение'
        );
    }

    public function testRollback()
    {
        $this->commonProperty->setInitialValue('test_login');
        $this->commonProperty->setValue('new_test_login');

        $this->commonProperty->rollback();
        $this->assertFalse(
            $this->commonProperty->getIsModified(),
            'Ожидается, что после отката свойство не считается модифицированным'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getValue(),
            'Ожидается, что после отката свойство имеет значение test_login'
        );
        $this->assertEquals(
            'test_login',
            $this->commonProperty->getDbValue(),
            'Ожидается, что после отката свойство имеет внутренне значение test_login'
        );
    }

    public function testImpossibleSetValue()
    {
        $this->commonProperty->setInitialValue('login');
        $e = null;
        try {
            $this->commonProperty->setValue(['login']);
        } catch (\Exception $e) {
        }
        $this->assertInstanceOf(
            'umi\orm\exception\InvalidArgumentException',
            $e,
            'Ожидается исключение при попытке выставить для свойства значение, не соответвующее типу свойства'
        );
    }
}


text:
using System.Collections.Generic;
using Azure;
using Azure.Core;
using Azure.ResourceManager.BotService.Models;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.BotService
{
    /// <summary> A class representing the Bot data model. </summary>
    public partial class BotData : TrackedResourceData
    {
        /// <summary> Initializes a new instance of BotData. </summary>
        /// <param name="location"> The location. </param>
        public BotData(AzureLocation location) : base(location)
        {
            Zones = new ChangeTrackingList<string>();
        }

        /// <summary> Initializes a new instance of BotData. </summary>
        /// <param name="id"> The id. </param>
        /// <param name="name"> The name. </param>
        /// <param name="resourceType"> The resourceType. </param>
        /// <param name="systemData"> The systemData. </param>
        /// <param name="tags"> The tags. </param>
        /// <param name="location"> The location. </param>
        /// <param name="properties"> The set of properties specific to bot resource. </param>
        /// <param name="sku"> Gets or sets the SKU of the resource. </param>
        /// <param name="kind"> Required. Gets or sets the Kind of the resource. </param>
        /// <param name="etag"> Entity Tag. </param>
        /// <param name="zones"> Entity zones. </param>
        internal BotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, BotProperties properties, BotServiceSku sku, BotServiceKind? kind, ETag? etag, IReadOnlyList<string> zones) : base(id, name, resourceType, systemData, tags, location)
        {
            Properties = properties;
            Sku = sku;
            Kind = kind;
            ETag = etag;
            Zones = zones;
        }

        /// <summary> The set of properties specific to bot resource. </summary>
        public BotProperties Properties { get; set; }
        /// <summary> Gets or sets the SKU of the resource. </summary>
        public BotServiceSku Sku { get; set; }
        /// <summary> Required. Gets or sets the Kind of the resource. </summary>
        public BotServiceKind? Kind { get; set; }
        /// <summary> Entity Tag. </summary>
        public ETag? ETag { get; set; }
        /// <summary> Entity zones. </summary>
        public IReadOnlyList<string> Zones { get; }
    }
}


text:
			Alias
			1-10
			A-H
			Data da avaliação

			{{resultado.alias}}
			{{resultado.body}}
			{{resultado.beauty}}
			{{resultado.created | date:'medium'}}

Nenhuma avaliação por enquanto.
 porque você não adiciona uma?


text:
<?php

namespace humhub\modules\translation\tests\codeception\unit;

use humhub\modules\translation\commands\BuildArchive;
use humhub\modules\translation\models\Archive;
use translation\TranslationTest;

class BuildArchiveTest extends TranslationTest
{
    const TEST_MESSAGE = 'Test building an archive file';

    public $initialTranslationSate = [
        'de' => [
            self::TEST_MESSAGE => 'Teste die Bildung eines Archivefiles',
        ]
    ];

    public function _before()
    {
        parent::_before();

        $archive = Archive::load('de');
        unset($archive['Test building an archive file']);
        Archive::update('de', $archive);
    }

    public function testUpdateArchive()
    {
        $archive = Archive::load('de');
        $this->assertFalse(isset($archive[self::TEST_MESSAGE]));

        BuildArchive::run('de', 'translation');

        $updatedArchive = Archive::load('de');
        $this->assertTrue(isset($updatedArchive[self::TEST_MESSAGE]));
        $this->assertCount(1, $updatedArchive[self::TEST_MESSAGE]);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2012 The Kuali Foundation

 Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php

 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.
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:dd="http://rice.kuali.org/dd" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://rice.kuali.org/dd http://rice.kuali.org/dd/dd.xsd">

  <bean id="AssetYearEndDepreciationDetail" parent="AssetYearEndDepreciationDetail-parentBean"/>

  <bean id="AssetYearEndDepreciationDetail-parentBean" abstract="true" parent="BusinessObjectEntry">
    <property name="businessObjectClass" value="org.kuali.kfs.module.cam.businessobject.AssetYearEndDepreciationDetail"/>
    <property name="inquiryDefinition">
      <ref bean="AssetYearEndDepreciationDetail-inquiryDefinition"/>
    </property>
    <property name="lookupDefinition">
      <ref bean="AssetYearEndDepreciationDetail-lookupDefinition"/>
    </property>
    <property name="objectLabel" value="Asset Year End Depreciation Detail"/>
    <property name="attributes">
      <list>
        <ref bean="AssetYearEndDepreciationDetail-capitalAssetNumber"/>
        <ref bean="AssetYearEndDepreciationDetail-universityFiscalYear"/>
        <ref bean="AssetYearEndDepreciationDetail-active"/>
        <ref bean="AssetYearEndDepreciationDetail-processed"/>
        <ref bean="AssetYearEndDepreciationDetail-newCollectionRecord"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.organizationOwnerChartOfAccountsCode"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.organizationOwnerAccountNumber"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.organizationOwnerAccount.organizationCode"/>
        <ref bean="AssetYearEndDepreciationDetail-asset.agencyNumber"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.acquisitionTypeCode"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.inventoryStatusCode"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.conditionCode"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.capitalAssetDescription"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.capitalAssetTypeCode"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.vendorName"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.manufacturerName"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.manufacturerModelNumber"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.serialNumber"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.campusTagNumber"/>
        <ref bean="AssetYearEndDepreciationDetail-asset.oldTagNumber"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.governmentTagNumber"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.nationalStockNumber"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.lastInventoryDate"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.createDate"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.financialDocumentPostingYear"/>
        <ref bean="AssetYearEndDepreciationDetail-asset.financialDocumentPostingPeriodCode"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.capitalAssetInServiceDate"/>-->
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.depreciationDate"/>-->
        <ref bean="AssetYearEndDepreciationDetail-asset.totalCostAmount"/>
        <ref bean="AssetYearEndDepreciationDetail-asset.federalContribution"/>
        <ref bean="AssetYearEndDepreciationDetail-asset.accumulatedDepreciation"/>
        <ref bean="AssetYearEndDepreciationDetail-asset.bookValue"/>
        <!--<ref bean="AssetYearEndDepreciationDetail-asset.assetOrganization.organizationText"/>-->
      </list>
    </property>
  </bean>

<!-- Attribute Definitions -->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.assetOrganization.organizationText" parent="AssetYearEndDepreciationDetail-asset.assetOrganization.organizationText-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.assetOrganization.organizationText-parentBean" abstract="true" parent="AssetOrganization-organizationText">-->
    <!--<property name="name" value="asset.assetOrganization.organizationText"/>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-capitalAssetNumber" parent="AssetYearEndDepreciationDetail-capitalAssetNumber-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-capitalAssetNumber-parentBean" abstract="true" parent="Asset-capitalAssetNumber">

      <!--<property name="label" value="matt asset num label"/>-->
      <!--<property name="shortLabel" value="matt asset num short label"/>-->

  </bean>

    <bean id="AssetYearEndDepreciationDetail-universityFiscalYear" parent="AssetYearEndDepreciationDetail-universityFiscalYear-parentBean"/>
    <bean id="AssetYearEndDepreciationDetail-universityFiscalYear-parentBean" abstract="true" parent="GenericAttributes-genericFiscalYear">
        <property name="forceUppercase" value="true"/>
        <property name="name" value="universityFiscalYear"/>
        <property name="required" value="true"/>
    </bean>

    <bean id="AssetYearEndDepreciationDetail-active" parent="AssetYearEndDepreciationDetail-active-parentBean"/>
    <bean id="AssetYearEndDepreciationDetail-active-parentBean" abstract="true" parent="GenericAttributes-activeIndicator">
        <property name="name" value="active"/>
    </bean>

    <bean id="AssetYearEndDepreciationDetail-processed" parent="AssetYearEndDepreciationDetail-processed-parentBean"/>
    <bean id="AssetYearEndDepreciationDetail-processed-parentBean" abstract="true" parent="AttributeDefinition">
        <property name="name" value="processed"/>
        <property name="forceUppercase" value="false"/>
        <property name="label" value="Depreciation Processed"/>
        <property name="shortLabel" value="Depreciation Processed"/>
        <property name="maxLength" value="1"/>
        <property name="control">
            <bean parent="CheckboxControlDefinition"/>
        </property>
    </bean>

  <bean id="AssetYearEndDepreciationDetail-newCollectionRecord" parent="AssetYearEndDepreciationDetail-newCollectionRecord-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-newCollectionRecord-parentBean" abstract="true" parent="GenericAttributes-newCollectionRecord">
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.organizationOwnerChartOfAccountsCode" parent="AssetYearEndDepreciationDetail-asset.organizationOwnerChartOfAccountsCode-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.organizationOwnerChartOfAccountsCode-parentBean" abstract="true" parent="Asset-organizationOwnerChartOfAccountsCode">-->
    <!--<property name="name" value="asset.organizationOwnerChartOfAccountsCode"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
            <!--<property name="readOnly" value="false"/>-->
        <!--</bean>-->
    <!--</property>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.organizationOwnerAccountNumber" parent="AssetYearEndDepreciationDetail-asset.organizationOwnerAccountNumber-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.organizationOwnerAccountNumber-parentBean" abstract="true" parent="Asset-organizationOwnerAccountNumber">-->
    <!--<property name="name" value="asset.organizationOwnerAccountNumber"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
            <!--<property name="readOnly" value="false"/>-->
        <!--</bean>-->
    <!--</property>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.organizationOwnerAccount.organizationCode" parent="AssetYearEndDepreciationDetail-asset.organizationOwnerAccount.organizationCode-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.organizationOwnerAccount.organizationCode-parentBean" abstract="true" parent="Asset-organizationOwnerAccount.organizationCode">
    <property name="name" value="asset.organizationOwnerAccount.organizationCode"/>
  </bean>

  <bean id="AssetYearEndDepreciationDetail-asset.agencyNumber" parent="AssetYearEndDepreciationDetail-asset.agencyNumber-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.agencyNumber-parentBean" abstract="true" parent="Asset-agencyNumber">
    <property name="name" value="asset.agencyNumber"/>
    <property name="attributeSecurity">
        <bean parent="AttributeSecurity">
           <property name="readOnly" value="false"/>
       </bean>
    </property>
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.acquisitionTypeCode" parent="AssetYearEndDepreciationDetail-asset.acquisitionTypeCode-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.acquisitionTypeCode-parentBean" abstract="true" parent="Asset-acquisitionTypeCode">-->
    <!--<property name="name" value="asset.acquisitionTypeCode"/>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.inventoryStatusCode" parent="AssetYearEndDepreciationDetail-asset.inventoryStatusCode-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.inventoryStatusCode-parentBean" abstract="true" parent="Asset-inventoryStatusCode">-->
    <!--<property name="name" value="asset.inventoryStatusCode"/>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.conditionCode" parent="AssetYearEndDepreciationDetail-asset.conditionCode-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.conditionCode-parentBean" abstract="true" parent="Asset-conditionCode">-->
    <!--<property name="name" value="asset.conditionCode"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
           <!--<property name="hide" value="false"/>-->
       <!--</bean>-->
    <!--</property>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.capitalAssetDescription" parent="AssetYearEndDepreciationDetail-asset.capitalAssetDescription-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.capitalAssetDescription-parentBean" abstract="true" parent="Asset-capitalAssetDescription">
    <property name="name" value="asset.capitalAssetDescription"/>
    <property name="attributeSecurity">
        <bean parent="AttributeSecurity">
           <property name="readOnly" value="false"/>
       </bean>
	</property>
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.capitalAssetTypeCode" parent="AssetYearEndDepreciationDetail-asset.capitalAssetTypeCode-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.capitalAssetTypeCode-parentBean" abstract="true" parent="Asset-capitalAssetTypeCode">-->
    <!--<property name="name" value="asset.capitalAssetTypeCode"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
           <!--<property name="readOnly" value="false"/>-->
       <!--</bean>-->
	<!--</property>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.vendorName" parent="AssetYearEndDepreciationDetail-asset.vendorName-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.vendorName-parentBean" abstract="true" parent="Asset-vendorName">-->
    <!--<property name="name" value="asset.vendorName"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
           <!--<property name="readOnly" value="false"/>-->
       <!--</bean>-->
    <!--</property>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.manufacturerName" parent="AssetYearEndDepreciationDetail-asset.manufacturerName-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.manufacturerName-parentBean" abstract="true" parent="Asset-manufacturerName">
    <property name="name" value="asset.manufacturerName"/>
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.manufacturerModelNumber" parent="AssetYearEndDepreciationDetail-asset.manufacturerModelNumber-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.manufacturerModelNumber-parentBean" abstract="true" parent="Asset-manufacturerModelNumber">-->
    <!--<property name="name" value="asset.manufacturerModelNumber"/>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.serialNumber" parent="AssetYearEndDepreciationDetail-asset.serialNumber-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.serialNumber-parentBean" abstract="true" parent="Asset-serialNumber">-->
    <!--<property name="name" value="asset.serialNumber"/>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.campusTagNumber" parent="AssetYearEndDepreciationDetail-asset.campusTagNumber-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.campusTagNumber-parentBean" abstract="true" parent="Asset-campusTagNumber">
    <property name="name" value="asset.campusTagNumber"/>
    <property name="attributeSecurity">
        <bean parent="AttributeSecurity">
           <property name="readOnly" value="false"/>
       </bean>
	</property>
  </bean>

  <bean id="AssetYearEndDepreciationDetail-asset.oldTagNumber" parent="AssetYearEndDepreciationDetail-asset.oldTagNumber-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.oldTagNumber-parentBean" abstract="true" parent="Asset-oldTagNumber">
    <property name="name" value="asset.oldTagNumber"/>
    <property name="attributeSecurity">
        <bean parent="AttributeSecurity">
            <property name="readOnly" value="false"/>
            <property name="hide" value="false"/>
        </bean>
    </property>
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.governmentTagNumber" parent="AssetYearEndDepreciationDetail-asset.governmentTagNumber-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.governmentTagNumber-parentBean" abstract="true" parent="Asset-governmentTagNumber">-->
    <!--<property name="name" value="asset.governmentTagNumber"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
           <!--<property name="readOnly" value="false"/>-->
       <!--</bean>-->
    <!--</property>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.nationalStockNumber" parent="AssetYearEndDepreciationDetail-asset.nationalStockNumber-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.nationalStockNumber-parentBean" abstract="true" parent="Asset-nationalStockNumber">
    <property name="name" value="asset.nationalStockNumber"/>
    <property name="attributeSecurity">
        <bean parent="AttributeSecurity">
           <property name="readOnly" value="false"/>
       </bean>
    </property>
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.lastInventoryDate" parent="AssetYearEndDepreciationDetail-asset.lastInventoryDate-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.lastInventoryDate-parentBean" abstract="true" parent="Asset-lastInventoryDate">-->
    <!--<property name="name" value="asset.lastInventoryDate"/>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.createDate" parent="AssetYearEndDepreciationDetail-asset.createDate-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.createDate-parentBean" abstract="true" parent="Asset-createDate">-->
    <!--<property name="name" value="asset.createDate"/>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.financialDocumentPostingYear" parent="AssetYearEndDepreciationDetail-asset.financialDocumentPostingYear-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.financialDocumentPostingYear-parentBean" abstract="true" parent="Asset-financialDocumentPostingYear">
    <property name="name" value="asset.financialDocumentPostingYear"/>
  </bean>

  <bean id="AssetYearEndDepreciationDetail-asset.financialDocumentPostingPeriodCode" parent="AssetYearEndDepreciationDetail-asset.financialDocumentPostingPeriodCode-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.financialDocumentPostingPeriodCode-parentBean" abstract="true" parent="Asset-financialDocumentPostingPeriodCode">
    <property name="name" value="asset.financialDocumentPostingPeriodCode"/>
  </bean>

  <!--<bean id="AssetYearEndDepreciationDetail-asset.capitalAssetInServiceDate" parent="AssetYearEndDepreciationDetail-asset.capitalAssetInServiceDate-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.capitalAssetInServiceDate-parentBean" abstract="true" parent="Asset-capitalAssetInServiceDate">-->
    <!--<property name="name" value="asset.capitalAssetInServiceDate"/>-->
    <!--<property name="attributeSecurity">-->
        <!--<bean parent="AttributeSecurity">-->
           <!--<property name="readOnly" value="false"/>-->
       <!--</bean>-->
    <!--</property>-->
  <!--</bean>-->

  <!--<bean id="AssetYearEndDepreciationDetail-asset.depreciationDate" parent="AssetYearEndDepreciationDetail-asset.depreciationDate-parentBean"/>-->
  <!--<bean id="AssetYearEndDepreciationDetail-asset.depreciationDate-parentBean" abstract="true" parent="Asset-depreciationDate">-->
    <!--<property name="name" value="asset.depreciationDate"/>-->
  <!--</bean>-->

  <bean id="AssetYearEndDepreciationDetail-asset.totalCostAmount" parent="AssetYearEndDepreciationDetail-asset.totalCostAmount-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.totalCostAmount-parentBean" abstract="true" parent="Asset-totalCostAmount">
    <property name="name" value="asset.totalCostAmount"/>
  </bean>

  <bean id="AssetYearEndDepreciationDetail-asset.federalContribution" parent="AssetYearEndDepreciationDetail-asset.federalContribution-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.federalContribution-parentBean" abstract="true" parent="Asset-federalContribution">
    <property name="name" value="asset.federalContribution"/>
  </bean>

  <bean id="AssetYearEndDepreciationDetail-asset.accumulatedDepreciation" parent="AssetYearEndDepreciationDetail-asset.accumulatedDepreciation-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.accumulatedDepreciation-parentBean" abstract="true" parent="Asset-accumulatedDepreciation">
    <property name="name" value="asset.accumulatedDepreciation"/>
  </bean>

  <bean id="AssetYearEndDepreciationDetail-asset.bookValue" parent="AssetYearEndDepreciationDetail-asset.bookValue-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-asset.bookValue-parentBean" abstract="true" parent="Asset-bookValue">
    <property name="name" value="asset.bookValue"/>
  </bean>

<!-- Business Object Inquiry Definition -->

  <bean id="AssetYearEndDepreciationDetail-inquiryDefinition" parent="AssetYearEndDepreciationDetail-inquiryDefinition-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-inquiryDefinition-parentBean" abstract="true" parent="InquiryDefinition">
    <property name="title" value="Asset Year End Depreciation Detail Inquiry"/>
    <property name="inquirySections">
      <list>
        <bean parent="InquirySectionDefinition">
          <property name="title" value=""/>
          <property name="numberOfColumns" value="1"/>
          <property name="inquiryFields">
            <list>
              <bean parent="FieldDefinition" p:attributeName="capitalAssetNumber"/>
              <bean parent="FieldDefinition" p:attributeName="universityFiscalYear"/>
              <bean parent="FieldDefinition" p:attributeName="asset.capitalAssetDescription" p:noInquiry="true"/>
              <!--<bean parent="FieldDefinition" p:attributeName="asset.vendorName" p:noInquiry="true"/>-->
              <!--<bean parent="FieldDefinition" p:attributeName="asset.manufacturerModelNumber" p:noInquiry="true"/>-->
              <!--<bean parent="FieldDefinition" p:attributeName="asset.serialNumber" p:noInquiry="true"/>-->
              <bean parent="FieldDefinition" p:attributeName="asset.campusTagNumber" p:noInquiry="true"/>
              <!--<bean parent="FieldDefinition" p:attributeName="asset.governmentTagNumber" p:noInquiry="true"/>-->
              <!--<bean parent="FieldDefinition" p:attributeName="asset.lastInventoryDate" p:noInquiry="true"/>-->
              <!--<bean parent="FieldDefinition" p:attributeName="asset.createDate" p:noInquiry="true"/>-->
              <!--<bean parent="FieldDefinition" p:attributeName="asset.capitalAssetInServiceDate" p:noInquiry="true"/>-->
              <!--<bean parent="FieldDefinition" p:attributeName="asset.depreciationDate" p:noInquiry="true"/>-->
              <bean parent="FieldDefinition" p:attributeName="asset.totalCostAmount" p:noInquiry="true"/>
              <bean parent="FieldDefinition" p:attributeName="asset.accumulatedDepreciation" p:noInquiry="true"/>
              <bean parent="FieldDefinition" p:attributeName="asset.bookValue" p:noInquiry="true"/>
              <bean parent="FieldDefinition" p:attributeName="asset.federalContribution" p:noInquiry="true"/>
              <!--<bean parent="FieldDefinition" p:attributeName="asset.assetOrganization.organizationText" p:noInquiry="true"/>-->
            </list>
          </property>
        </bean>
      </list>
    </property>
  </bean>

<!-- Business Object Lookup Definition -->

  <bean id="AssetYearEndDepreciationDetail-lookupDefinition" parent="AssetYearEndDepreciationDetail-lookupDefinition-parentBean"/>
  <bean id="AssetYearEndDepreciationDetail-lookupDefinition-parentBean" abstract="true" parent="LookupDefinition">
    <property name="title" value="Asset Year End Depreciation Detail Lookup"/>

    <property name="defaultSort">
      <bean parent="SortDefinition">
      </bean>
    </property>
    <property name="lookupFields">
      <list>
        <bean parent="FieldDefinition" p:attributeName="capitalAssetNumber"/>
        <bean parent="FieldDefinition" p:attributeName="universityFiscalYear"/>
        <bean parent="FieldDefinition" p:attributeName="active"/>
        <bean parent="FieldDefinition" p:attributeName="processed"/>
      </list>
    </property>
    <property name="resultFields">
      <list>
        <bean parent="FieldDefinition" p:attributeName="capitalAssetNumber"/>
        <bean parent="FieldDefinition" p:attributeName="universityFiscalYear"/>
        <bean parent="FieldDefinition" p:attributeName="active"/>
        <bean parent="FieldDefinition" p:attributeName="processed"/>
      </list>
    </property>
  </bean>
</beans>


text:
# Scaladoc

Scaladoc  is the documentation tool for
[Scala 3](https://github.com/lampepfl/dotty).
It uses the TastyInspector to access definitions,
which is an officially supported way to access Scala 3's perspective of a
codebase.

We're aiming to support all the features Scaladoc did, plus new and exciting ones such as:

- Markdown syntax!
- displaying project and API documentation together on one site!
- and more!

**Yes, this page was generated using scaladoc**

## Running the project

Use the following commands to generate documentation for this project and for Dotty, respectively:

```
sbt scaladoc/generateSelfDocumentation
sbt scaladoc/generateScalaDocumentation
```

To actually view the documentation, the easiest way is to run the following in the project root:

```
cd scaladoc/output
python3 -m http.server 8080
```

And afterwards point your browser to <http://localhost:8080/self> or
<http://localhost:8080/scala3> for this project and for Dotty documentation
respectively.

It's not strictly necessary to go through an HTTP server, but because of CORS
the documentation won't work completely if you don't.

## CLI and SBT Documentation

The preferred way to use scaladoc is calling it from sbt `Compile/doc` task or to use CLI interface provided inside `dotty/bin/scaladoc` bash script.
More information about specific scaladoc flags you can find inside [Usage docs](https://dotty.epfl.ch/docs/usage/scaladoc/settings.html)

## Developing

At least two of our contributors use [Metals](https://scalameta.org/metals/) to
work on the project.

For every PR named with prefix `scaladoc/`, we build documentation for scaladoc and Dotty. For example, for
PR `scaladoc/update-docs` you can find them at:

- <https://scala3doc.virtuslab.com/pr-update-docs/self/main/index.html>
- <https://scala3doc.virtuslab.com/pr-update-docs/scala3/main/index.html>
- <https://scala3doc.virtuslab.com/pr-update-docs/testcases/main/index.html>

Note that these correspond to the contents of `output` directory - that's
precisely what they are.

You can also find the result of building the same sites for latest `master` at:

- <https://scala3doc.virtuslab.com/master/self/main/index.html>
- <https://scala3doc.virtuslab.com/master/scala3/main/index.html>
- <https://scala3doc.virtuslab.com/master/testcases/main/index.html>

### Testing

Most tests rely on comparing signatures (of classes, methods, objects etc.) extracted from the generated documentation
to signatures found in source files. Such tests are defined using [SignatureTest](test/dotty/tools/scaladoc/signatures/SignatureTest.scala) class
and its subtypes (such as [TranslatableSignaturesTestCases](test/dotty/tools/scaladoc/signatures/TranslatableSignaturesTestCases.scala))

WARNING: As the classes mentioned above are likely to evolve, the description below might easily get out of date.
In case of any discrepancies rely on the source files instead.

`SignatureTest` requires that you specify the names of the files used to extract signatures,
the names of directories containing corresponding TASTY files
and the kinds of signatures from source files (corresponding to keywords used to declare them like `def`, `class`, `object` etc.)
whose presence in the generated documentation will be checked (other signatures, when missing, will be ignored).
The mentioned source files should be located directly inside [](../scaladoc-testcases/src/tests) directory
but the file names passed as parameters should contain neither this path prefix nor `.scala` suffix.

By default it's expected that all signatures from the source files will be present in the documentation
but not vice versa (because the documentation can contain also inherited signatures).
To validate that a signature present in the source does not exist in the documentation
(because they should be hidden from users) add `//unexpected` comment after the signature in the same line.
This will cause an error if a signature with the same name appears in the documentation
(even if some elements of the signature are slightly different - to avoid accidentally passing tests).
If the signature in the documentation is expected to slightly differ from how it's defined in the source code
you can add a `//expected: ` comment (also in the same line and followed by a space) followed by the expected signature.
Alternatively you can use `/*<-*/` and `/*->*/` as opening and closing parentheses for parts of a signature present in the source but undesired in the documentation (at least at the current stage of development), e.g.

```
def foo/*<-*/()/*->*/: Int
```

will make the expected signature be

```
def foo: Int
```

instead of

```
def foo(): Int
```

Because of the way how signatures in source are parsed, they're expected to span until the end of a line (including comments except those special ones mentioned above, which change the behaviour of tests) so if a definition contains an implementation, it should be placed in a separate line, e.g.

```
def foo: Int
   = 1

class Bar
{
   //...
}
```

Otherwise the implementation would be treated as a part of the signature.

## Contributing

We're happy that you'd like to help us!

We have two issue labels you should take a look at: `good first issue` and
`self-contained`. First is easy pickings: you'll be able to contribute without
needing to dive too deep into the project. Second is reverse: it's an issue
that's you may find interesting, complex and self-contained enough that you can
continue chipping away at it without needing to worry too much about merge
conflicts.

To contribute to the project with your code, fork this repo and create a pull request from a fresh branch from there.
To keep the history of commits clean, make sure your commits are squashed into one
and all your changes are applied on top of the latest master branch (if not - rebase on it instead of merging it).
Make sure all the tests pass (simply run `sbt test` to verify that).

## FAQ

### Why use TASTy?

A documentation tool needs to access compiler information about the project - it
needs to list all definitions, resolve them by name, and query their members.
Tasty Reflect is the dedicated way in Scala 3 of accessing this information.

## Credits

- [Flatart](https://www.iconfinder.com/Flatart) - Gitter icon


text:
namespace Microsoft.Azure.Search.Models
{
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;
    using System.Runtime;
    using System.Runtime.Serialization;

    /// <summary>
    /// Defines values for VisualFeature.
    /// </summary>
    [JsonConverter(typeof(StringEnumConverter))]
    public enum VisualFeature
    {
        [EnumMember(Value = "categories")]
        Categories,
        [EnumMember(Value = "tags")]
        Tags,
        [EnumMember(Value = "description")]
        Description,
        [EnumMember(Value = "faces")]
        Faces,
        [EnumMember(Value = "imageType")]
        ImageType,
        [EnumMember(Value = "color")]
        Color
    }
    internal static class VisualFeatureEnumExtension
    {
        internal static string ToSerializedValue(this VisualFeature? value)
        {
            return value == null ? null : ((VisualFeature)value).ToSerializedValue();
        }

        internal static string ToSerializedValue(this VisualFeature value)
        {
            switch( value )
            {
                case VisualFeature.Categories:
                    return "categories";
                case VisualFeature.Tags:
                    return "tags";
                case VisualFeature.Description:
                    return "description";
                case VisualFeature.Faces:
                    return "faces";
                case VisualFeature.ImageType:
                    return "imageType";
                case VisualFeature.Color:
                    return "color";
            }
            return null;
        }

        internal static VisualFeature? ParseVisualFeature(this string value)
        {
            switch( value )
            {
                case "categories":
                    return VisualFeature.Categories;
                case "tags":
                    return VisualFeature.Tags;
                case "description":
                    return VisualFeature.Description;
                case "faces":
                    return VisualFeature.Faces;
                case "imageType":
                    return VisualFeature.ImageType;
                case "color":
                    return VisualFeature.Color;
            }
            return null;
        }
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mém. Soc. Émul. Montbéliard, Sér. 2 5: 70 (1872)

#### Original name
Agaricus rhacodes Vittad., 1835

### Remarks
null


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.clover_studio.spikachatmodule" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:largeHeap="true"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyAHZijPeIKSPju0qAtUdWMkD3cTsIqKSqk" />

        <activity
            android:name=".ChatActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:windowSoftInputMode="adjustResize"
            android:label="@string/app_name">
        </activity>
        <activity
            android:name=".UsersInChatActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".CameraPhotoPreviewActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".RecordVideoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".RecordAudioActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".LocationActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>

    </application>

</manifest>


text:
require 'spec_helper'

describe PagesController do
  before do
    @account = Factory(:account)
    controller.stub!(:current_subdomain).and_return(@account.name)

    @current_user = Factory(:user)
    @current_user.has_role('staff', @account)
    @current_user.has_role('manager', @account)
    controller.stub!(:current_user).and_return(@current_user)
  end

  describe "GET to index" do
    before do
      @pages = (1..3).collect{ Factory(:page, :account => @account) }
      child_pages = (1..3).collect{ Factory(:page, :parent => @pages.first, :account => @account) }
      get :index
    end

    it { should respond_with(:success) }
    it { should assign_to(:pages).with(@pages) }
  end

  describe "GET to new" do
    describe "for a new main page" do
      before do
        get :new
      end

      it { should respond_with(:success) }
      it "should initialize a new main page" do
        should assign_to(:page).with_kind_of(Page)
        assigns(:page).parent.should be_blank
      end
    end

    describe "for a new child page" do
      before do
        @parent = Factory(:page, :account => @account)
        get :new, :parent_id => @parent.id
      end

      it { should respond_with(:success) }
      it "should initialize a new main page" do
        should assign_to(:page).with_kind_of(Page)
        assigns(:page).parent.should eql(@parent)
      end
    end
  end

  describe "POST to create" do
    before do
     post :create, :page => Factory.attributes_for(:page)
    end

    it { should respond_with(:redirect) }
    it "should create a page" do
      should assign_to(:page).with_kind_of(Page)
      assigns(:page).should_not be_new_record
    end
  end

  describe "GET to edit" do
    before do
      @page = Factory(:page, :account => @account)
      get :edit, :id => @page.id
    end
    it { should respond_with(:success) }
    it { should assign_to(:page).with(@page) }
  end

  describe "PUT to update" do
    context "with valid attributes" do
      before do
        @page = Factory(:page, :account => @account)
        @new_parent = Factory(:page, :account => @account)
        put :update, :id => @page.id, :page => { :name => "new-page-name", :parent_id => @new_parent.id }
      end

      it { should respond_with(:redirect) }
      it "should update the page" do
        should assign_to(:page).with(@page)
        assigns(:page).name.should eql("new-page-name")
        assigns(:page).parent.should eql(@new_parent)
      end
    end

    context "with invalid attributes" do
      before do
        @page = Factory(:page, :account => @account)
        @new_parent = Factory(:page, :account => @account)
        put :update, :id => @page.id, :page => { :name => "bad page name", :parent_id => @new_parent.id }
      end

      it { should respond_with(:success) }
      it "should not update the page" do
        should assign_to(:page).with(@page)
        assigns(:page).reload.name.should_not eql("new-page-name")
        assigns(:page).reload.parent.should_not eql(@new_parent)
      end
    end
  end

  describe "DELETE to destroy" do
    before do
      @page = Factory(:page, :account => @account)
      delete :destroy, :id => @page.id
    end

    it { should respond_with(:redirect) }
    it "should delete the page" do
      lambda{ Page.find(@page.id)}.should raise_error(ActiveRecord::RecordNotFound)
    end
  end
end


text:
using Moq;
using NUnit.Framework;
using ReMi.CommandHandlers.Configuration;
using ReMi.Commands.Configuration;
using ReMi.Contracts.Cqrs.Events;
using ReMi.DataAccess.BusinessEntityGateways.Products;
using ReMi.Events.Configuration;
using ReMi.TestUtils.UnitTests;
using System;
using System.Threading.Tasks;

namespace ReMi.CommandHandlers.Tests.Configuration
{
    public class RemoveBusinessUnitCommandHandlerTests : TestClassFor<RemoveBusinessUnitCommandHandler>
    {
        private Mock<IBusinessUnitsGateway> _businessUnitsGatewayMock;
        private Mock<IPublishEvent> _eventPublisherMock;

        protected override RemoveBusinessUnitCommandHandler ConstructSystemUnderTest()
        {
            return new RemoveBusinessUnitCommandHandler
            {
                BusinessUnitsGatewayFactory = () => _businessUnitsGatewayMock.Object,
                EventPublisher = _eventPublisherMock.Object
            };
        }

        protected override void TestInitialize()
        {
            _businessUnitsGatewayMock = new Mock<IBusinessUnitsGateway>(MockBehavior.Strict);
            _eventPublisherMock = new Mock<IPublishEvent>(MockBehavior.Strict);

            base.TestInitialize();
        }

        [Test]
        public void Handle_ShouldCallGatewayToAddProductAndPublishEvent_WhenCalled()
        {
            var command = new RemoveBusinessUnitCommand
            {
                ExternalId = Guid.NewGuid(),
            };

            _businessUnitsGatewayMock.Setup(x => x.RemoveBusinessUnit(command.ExternalId));
            _eventPublisherMock.Setup(x => x.Publish(It.IsAny<BusinessUnitsChangedEvent>()))
                .Returns((Task[])null);
            _businessUnitsGatewayMock.Setup(x => x.Dispose());

            Sut.Handle(command);

            _businessUnitsGatewayMock.Verify(x => x.RemoveBusinessUnit(It.IsAny<Guid>()), Times.Once);
            _eventPublisherMock.Verify(p => p.Publish(It.IsAny<IEvent>()), Times.Once);
        }
    }
}


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

<!--
  ~ Copyright 2012 Red Hat, Inc. and/or its affiliates.
  ~
  ~ 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.
  -->

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
             xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
             xmlns:bt="urn:import:org.gwtbootstrap3.extras.typeahead.client.ui">
    <ui:with field="i18n" type="org.kie.workbench.common.screens.social.hp.client.resources.i18n.Constants"/>

    <b:FieldSet>
        <b:Legend>
            <small><ui:text from="{i18n.SearchUsers}"/></small>
        </b:Legend>
        <bt:Typeahead ui:field="typeaheadUsers" highlight="true" hint="false"/>
    </b:FieldSet>
</ui:UiBinder>


text:
Title: Alkohols un Pasākumi
Date: 2007-09-11 12:15
Category: Sākums
Tags: 2007
Lang: lv

Biju uz ATB, bet par to vēlāk. Mani kopš tā pasākuma nomāc viens jautājums. Es saprotu, ka sabiedriskās vietās ir aizliegts dzert alkoholu un publiskos pasākumos nelaiž iekšā ar visādām pudelītēm, bet kāds ir pamatojums tam, ka visos tajos publiskajos pasākumos ir atļauts lietot alkoholu? Varbūt nav atļauts? Bet kāpēc tad ir aļauts tirgot? Es saprotu, ka valstij ienākumi, utt, bet vai tad tādi pasākumi neskaitas sabiedriska vieta? Pasākumu ar 1000+ apmeklētājiem var nosaukt par privātu? Kāds nezin kam jāsūta epasts par šito jautājumu?

p.s. Un vēl raksta avīzēs: "Vai latviešu tauta nodzeras?"


text:
namespace Kvasir {
//MTB data watchpoint and trace
    namespace MtbdwtCtrl{    ///<MTB DWT Control Register
        using Addr = Register::Address<0xf0001000,0x00000000,0x00000000,unsigned>;
        ///DWT configuration controls
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(27,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> dwtcfgctrl{};
        ///Number of comparators
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,28),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> numcmp{};
    }
    namespace MtbdwtFct0{    ///<MTB_DWT Comparator Function Register 0
        using Addr = Register::Address<0xf0001028,0xfeff02f0,0x00000000,unsigned>;
        ///Function
        enum class FunctionVal {
            v0000=0x00000000,     ///<Disabled.
            v0100=0x00000004,     ///<Instruction fetch.
            v0101=0x00000005,     ///<Data operand read.
            v0110=0x00000006,     ///<Data operand write.
            v0111=0x00000007,     ///<Data operand (read + write).
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,FunctionVal> function{};
        namespace FunctionValC{
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0000> v0000{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0100> v0100{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0101> v0101{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0110> v0110{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0111> v0111{};
        }
        ///Data Value Match
        enum class DatavmatchVal {
            v0=0x00000000,     ///<Perform address comparison.
            v1=0x00000001,     ///<Perform data value comparison.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,DatavmatchVal> datavmatch{};
        namespace DatavmatchValC{
            constexpr Register::FieldValue<decltype(datavmatch)::Type,DatavmatchVal::v0> v0{};
            constexpr Register::FieldValue<decltype(datavmatch)::Type,DatavmatchVal::v1> v1{};
        }
        ///Data Value Size
        enum class DatavsizeVal {
            v00=0x00000000,     ///<Byte.
            v01=0x00000001,     ///<Halfword.
            v10=0x00000002,     ///<Word.
            v11=0x00000003,     ///<Reserved. Any attempts to use this value results in UNPREDICTABLE behavior.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,10),Register::ReadWriteAccess,DatavsizeVal> datavsize{};
        namespace DatavsizeValC{
            constexpr Register::FieldValue<decltype(datavsize)::Type,DatavsizeVal::v00> v00{};
            constexpr Register::FieldValue<decltype(datavsize)::Type,DatavsizeVal::v01> v01{};
            constexpr Register::FieldValue<decltype(datavsize)::Type,DatavsizeVal::v10> v10{};
            constexpr Register::FieldValue<decltype(datavsize)::Type,DatavsizeVal::v11> v11{};
        }
        ///Data Value Address 0
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,12),Register::ReadWriteAccess,unsigned> datavaddr0{};
        ///Comparator match
        enum class MatchedVal {
            v0=0x00000000,     ///<No match.
            v1=0x00000001,     ///<Match occurred.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(24,24),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,MatchedVal> matched{};
        namespace MatchedValC{
            constexpr Register::FieldValue<decltype(matched)::Type,MatchedVal::v0> v0{};
            constexpr Register::FieldValue<decltype(matched)::Type,MatchedVal::v1> v1{};
        }
    }
    namespace MtbdwtFct1{    ///<MTB_DWT Comparator Function Register 1
        using Addr = Register::Address<0xf0001038,0xfefffff0,0x00000000,unsigned>;
        ///Function
        enum class FunctionVal {
            v0000=0x00000000,     ///<Disabled.
            v0100=0x00000004,     ///<Instruction fetch.
            v0101=0x00000005,     ///<Data operand read.
            v0110=0x00000006,     ///<Data operand write.
            v0111=0x00000007,     ///<Data operand (read + write).
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,FunctionVal> function{};
        namespace FunctionValC{
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0000> v0000{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0100> v0100{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0101> v0101{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0110> v0110{};
            constexpr Register::FieldValue<decltype(function)::Type,FunctionVal::v0111> v0111{};
        }
        ///Comparator match
        enum class MatchedVal {
            v0=0x00000000,     ///<No match.
            v1=0x00000001,     ///<Match occurred.
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(24,24),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,MatchedVal> matched{};
        namespace MatchedValC{
            constexpr Register::FieldValue<decltype(matched)::Type,MatchedVal::v0> v0{};
            constexpr Register::FieldValue<decltype(matched)::Type,MatchedVal::v1> v1{};
        }
    }
    namespace MtbdwtTbctrl{    ///<MTB_DWT Trace Buffer Control Register
        using Addr = Register::Address<0xf0001200,0x0ffffffc,0x00000000,unsigned>;
        ///Action based on Comparator 0 match
        enum class Acomp0Val {
            v0=0x00000000,     ///<Trigger TSTOP based on the assertion of MTBDWT_FCT0[MATCHED].
            v1=0x00000001,     ///<Trigger TSTART based on the assertion of MTBDWT_FCT0[MATCHED].
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,Acomp0Val> acomp0{};
        namespace Acomp0ValC{
            constexpr Register::FieldValue<decltype(acomp0)::Type,Acomp0Val::v0> v0{};
            constexpr Register::FieldValue<decltype(acomp0)::Type,Acomp0Val::v1> v1{};
        }
        ///Action based on Comparator 1 match
        enum class Acomp1Val {
            v0=0x00000000,     ///<Trigger TSTOP based on the assertion of MTBDWT_FCT1[MATCHED].
            v1=0x00000001,     ///<Trigger TSTART based on the assertion of MTBDWT_FCT1[MATCHED].
        };
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,Acomp1Val> acomp1{};
        namespace Acomp1ValC{
            constexpr Register::FieldValue<decltype(acomp1)::Type,Acomp1Val::v0> v0{};
            constexpr Register::FieldValue<decltype(acomp1)::Type,Acomp1Val::v1> v1{};
        }
        ///Number of Comparators
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,28),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> numcomp{};
    }
    namespace MtbdwtDevicecfg{    ///<Device Configuration Register
        using Addr = Register::Address<0xf0001fc8,0x00000000,0x00000000,unsigned>;
        ///DEVICECFG
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> devicecfg{};
    }
    namespace MtbdwtDevicetypid{    ///<Device Type Identifier Register
        using Addr = Register::Address<0xf0001fcc,0x00000000,0x00000000,unsigned>;
        ///DEVICETYPID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> devicetypid{};
    }
    namespace MtbdwtComp0{    ///<MTB_DWT Comparator Register
        using Addr = Register::Address<0xf0001020,0x00000000,0x00000000,unsigned>;
        ///Reference value for comparison
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> comp{};
    }
    namespace MtbdwtComp1{    ///<MTB_DWT Comparator Register
        using Addr = Register::Address<0xf0001030,0x00000000,0x00000000,unsigned>;
        ///Reference value for comparison
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> comp{};
    }
    namespace MtbdwtMask0{    ///<MTB_DWT Comparator Mask Register
        using Addr = Register::Address<0xf0001024,0xffffffe0,0x00000000,unsigned>;
        ///MASK
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,0),Register::ReadWriteAccess,unsigned> mask{};
    }
    namespace MtbdwtMask1{    ///<MTB_DWT Comparator Mask Register
        using Addr = Register::Address<0xf0001034,0xffffffe0,0x00000000,unsigned>;
        ///MASK
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,0),Register::ReadWriteAccess,unsigned> mask{};
    }
    namespace MtbdwtPeriphid4{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fd0,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid5{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fd4,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid6{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fd8,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid7{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fdc,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid0{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fe0,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid1{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fe4,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid2{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fe8,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtPeriphid3{    ///<Peripheral ID Register
        using Addr = Register::Address<0xf0001fec,0x00000000,0x00000000,unsigned>;
        ///PERIPHID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> periphid{};
    }
    namespace MtbdwtCompid0{    ///<Component ID Register
        using Addr = Register::Address<0xf0001ff0,0x00000000,0x00000000,unsigned>;
        ///Component ID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> compid{};
    }
    namespace MtbdwtCompid1{    ///<Component ID Register
        using Addr = Register::Address<0xf0001ff4,0x00000000,0x00000000,unsigned>;
        ///Component ID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> compid{};
    }
    namespace MtbdwtCompid2{    ///<Component ID Register
        using Addr = Register::Address<0xf0001ff8,0x00000000,0x00000000,unsigned>;
        ///Component ID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> compid{};
    }
    namespace MtbdwtCompid3{    ///<Component ID Register
        using Addr = Register::Address<0xf0001ffc,0x00000000,0x00000000,unsigned>;
        ///Component ID
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> compid{};
    }
}