text:
The following methods are available to member resources:

|Resource Method|HTTP Request|Description|Module|RBAC|
|---|---|---|---|---|
|[status](Member.md#status)|GET /member/{id}/status|Returns a code based on the status of the user account specified by `id`|core|--|
|[create](Member.md#create)|POST /member|Create a new Member|core|--|
|[createPassword](Member.md#createPassword)|POST /member/{id}/password|Create a new temporary password for a member and email the account.|core|--|
|[get](Member.md#get)|GET /member/{id}|Get details about a given member. To get information about the current authenticated user, leave the [id] blank.|core|--|
|[update](Member.md#update)|PUT /member/{id}|Update details about a given member.|core|api.put.member|
|[updatePassword](Member.md#updatePassword)|PUT /member/{id}/password|Update the password for a member.|core|api.put.member.password|
|[deadlines](Member.md#deadlines)|GET /member/{id}/deadlines|Get deadlines for a given member.|core|--|
|[announcements](Member.md#announcements)|GET /member/{id}/announcements|Get a list of announcements for a given member.|core|-|
|[staff](Staff.md#member)|GET /member/{id}/staff_membership|Get the list of staff positions the member fills, leave the `id` out specify the logged in Member|[staff](Staff.md)|api.get.staff|

## Common Objects

A member object resource is returned.

```
{
    "id": {integer},
    "firstName": {string},
    "LastName": {string},
    "email": {string},
    "type": "member",
    "links": [{HATEOAS link}]
}
```

Member object resources have a number of available properties. These include:

|Object Property|Value|Description|
|---|---|---|
|type|string|Always `member`|
|id|integer|ID of the member|
|firstName|string|Members preferred first name|
|lastName|string|Members preferred last name|
|email|string|Members primary email|
|legalFirstName|string|Members legal first name.|
|legalLastName|string|Members legal last name.|
|middleName|string|Member's middle name.|
|suffix|string|Suffix for members name.|
|email2|string|Member's second email.|
|email3|string|Member's third email|
|phone1|string|Member's primary phone|
|phone2|string|Member's secondary phone|
|addressLine1|string|Member's address line 1|
|addressLine2|string|Member's address line 2|
|city|string|Member's address city.|
|state|string|Member's address state|
|zipCode|string|Member's Address Zip code.|
|zipPlus4|string|Member's Address Zip code suffix|
|countryName|string|Member's Address country.|
|province|string|Member's Address province.|
|preferredFirstName|string|Member's Preferred First Name.|
|preferredLastName|string|Member's Preferred Last Name.|
|Deceased|Boolean|Is member deceased.|
|DoNotContact|Boolean|Do not contact member.|
|EmailOptOut|Boolean|Do not mass email member.|
|Birthdate|Date|Member's birth date.|
|Gender|string|Member's preferred gender string.|
|conComDisplayPhone|Boolean|If Staff display phone on list.|
|links[]|list| List of HATEOAS links for this member|

If a property is unset on the object then it will not be returned.

The following HATEOAS methods are available as well:

|HATEOAS Method|Request|Description|
|---|---|---|
|deadlines|GET|Get a list of deadlines for the member.|
|update|PUT|Update the member data.|
|updatePassword|PUT|Update the member's temporary password.|

## status

Returns a code based on the status of a user account.

*Note*: Authentication is not required to use this entry point.

### status Request

```GET /member/{id}/status```

### status Parameters

The following find parameters are available:

|Parameter|Meaning|Notes|
|---|---|---|
|id|Member for which data is being retrieved.||

### status Request Body
Do not supply a request body.

### status Response
A status object is returned.

```
{
    "type": "member_status",
    "status": {integer},
}
```

Status object have a number of available properties. These include:

|Object Property|Value|Description|
|---|---|---|
|type|string|Always `member_status`|
|status|integer|status code of the member.|

* status 0x0 is account is valid
* status 0x1 is no such account
* status 0x2 is password expired
* status 0x3 is account locked
* status 0x10 is added if the account has multiple entries

### status Code Samples
Request Sample

```
curl -X GET -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' http://localhost/api/member/1002/status?pretty=true
```
Response Sample

```
{
    "type": "member_status",
    "status": 0
}
```

## create

Create a member in the system and generates a temporary password for the member and e-mails the password to the email for the newly created member.

*Note*: Authentication is not required to use this entry point.

### create Request

```POST /member```

### create Parameters

There are no parameters available.

### create Request Body

|Parameter|Meaning|Notes|
|---|---|---|
|email1|Primary E-Mail address and login username|Required|
|firstName|Members legal first name.|Required|
|lastName|Members legal last name.|Required|
|middleName|Member's middle name.|Optional|
|suffix|Suffix for members name.|Optional|
|email2|Member's second email.|Optional|
|email3|Member's third email|Optional|
|phone1|Member's primary phone|Optional|
|phone2|Member's secondary phone|Optional|
|addressLine1|Member's address line 1|Optional|
|addressLine2|Member's address line 2|Optional|
|city|Member's address city.|Optional|
|state|Member's address state|Optional|
|zipCode|Member's Address Zip code.|Optional|
|zipPlus4|Member's Address Zip code suffix|Optional|
|countryName|Member's Address country.|Optional|
|province|Member's Address province.|Optional|
|preferredFirstName|Member's Preferred First Name.|Optional|
|preferredLastName|Member's Preferred Last Name.|Optional|
|Deceased|Boolean: Is member deceased.|Optional|
|DoNotContact|Boolean: Do not contact member.|Optional|
|EmailOptOut|Boolean: Do not mass email member.|Optional|
|Birthdate|Date: Member's birth date.|Optional|
|Gender|Member's preferred gender string.|Optional|
|conComDisplayPhone|Boolean: If Staff display phone on list.|Optional|

### create Response
A member object resource is returned.

###create Code Samples
Request Sample

```
curl -X POST -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' http://localhost/api/member?pretty=true \
-d { 'email1' : 'koaWebgou@email.net', \
	 'firstName' : 'koaWebgou', \
	 'lastName' : 'Zuimenmohnun'}
```
Response Sample

```
{
    "id": "1002",
    "firstName": "koaWebgou",
    "lastName": "Zuimenmohnun",
    "email": "koaWebgou@email.net",
    "type": "member",
    "links": [
        {
            "method": "self",
            "href": "http:\/\/localhost:8080\/api\/member\/1002",
            "request": "GET"
        }
    ]
}
```

## createPassword

Generate a new temporary password for a member.

*Note*: Authentication is not required to use this entry point.

### createPassword Request

```POST /member/{id}/password```

### createPassword Parameters

The following parameters are available:

|Parameter|Meaning|Notes|
|---|---|---|
|id|Member for which data is being retrieved.||

### createPassword Request Body

Do not supply a request body.

### createPassword Response

Empty if successful

### createPassword Code Samples
Request Sample

```
curl -X POST -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' http://localhost/api/member/1002/password?pretty=true \
```
Response Sample

```
{ }
```

## get

Get information about a member in the system.

### get Request

```GET /member/[{id}]```

### get Parameters

The following find parameters are available:

|Parameter|Meaning|Notes|
|---|---|---|
|id|Member for which data is being retrieved. To get information about the current authenticated member, leave blank.||

### get Request Body
Do not supply a request body.

### get Response
A member object resource is returned.

### get Code Samples
Request Sample

```
curl -X GET -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' http://localhost/api/member1002?pretty=true
```
Response Sample

```
{
    "id": "1002",
    "firstName": "koaWebgou",
    "lastName": "Zuimenmohnun",
    "email": "koaWebgou@email.net",
    "type": "member",
    "links": [
        {
            "method": "self",
            "href": "http:\/\/localhost:8080\/api\/member\/1002",
            "request": "GET"
        }
    ]
}
```

## update

Update a member information on the system.

### update Request

```PUT /member/{id}```

### update Parameters

There are no parameters available.

### update Request Body

|Parameter|Meaning|Notes|
|---|---|---|
|firstName|Members first name.|Optional|
|lastName|Members last name.|Optional|
|middleName|Member's middle name.|Optional|
|suffix|Suffix for members name.|Optional|
|email2|Member's second email.|Optional|
|email3|Member's third email|Optional|
|phone1|Member's primary phone|Optional|
|phone2|Member's secondary phone|Optional|
|addressLine1|Member's address line 1|Optional|
|addressLine2|Member's address line 2|Optional|
|city|Member's address city.|Optional|
|state|Member's address state|Optional|
|zipCode|Member's Address Zip code.|Optional|
|zipPlus4|Member's Address Zip code suffix|Optional|
|countryName|Member's Address country.|Optional|
|province|Member's Address province.|Optional|
|preferredFirstName|Member's Preferred First Name.|Optional|
|preferredLastName|Member's Preferred Last Name.|Optional|
|Deceased|Boolean: Is member deceased.|Optional|
|DoNotContact|Boolean: Do not contact member.|Optional|
|EmailOptOut|Boolean: Do not mass email member.|Optional|
|Birthdate|Date: Member's birth date.|Optional|
|Gender|Member's preffered gender string.|Optional|
|conComDisplayPhone|Boolean: If Staff display phone on list.|Optional|
...

### update Response
A member object resource is returned.

###update Code Samples
Request Sample

```
curl -X POST -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' http://localhost/api/member?pretty=true \
-d { 'email1' : 'koaWebgou@email.net', \
	 'firstName' : 'koaWebgou', \
	 'lastName' : 'Zuimenmohnun'}
```
Response Sample

```
{
    "id": "1002",
    "firstName": "koaWebgou",
    "lastName": "Zuimenmohnun",
    "email": "koaWebgou@email.net",
    "type": "member",
    "links": [
        {
            "method": "self",
            "href": "http:\/\/localhost:8080\/api\/member\/1002",
            "request": "GET"
        }
    ]
}
```

## updatePassword

Save a new temporary or primary password for a member. Unless the `api.put.member.password` RBAC is set a member can only update their own password.

### updatePassword Request

```PUT /member/{id}/password```

### updatePassword Parameters

The following parameters are available:

|Parameter|Meaning|Notes|
|---|---|---|
|id|Member for which the password is being updated.||

### updatePassword Request Body

|Parameter|Meaning|Notes|
|---|---|---|
|NewPassword|The new password being set|*Required*|
|OldPassword|The existing password|Required unless the `api.put.member.password` RBAC is set|
|Temporary|Set the temporary password|Boolean, default `False`|

### updatePassword Response

Empty if successful

### updatePassword Code Samples
Request Sample

```
curl -X PUT -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' http://localhost/api/member/1002/password?pretty=true \
-d {'OldPassword' : 'fishy', 'NewPassword' : 'sticks'}
```
Response Sample

```
{ }
```

## deadlines
Get a list of deadlines for a member.

### deadlines Request

```GET /member/{identifier}/deadlines```

### deadlines Parameters

The following deadlines parameters are available:

|Parameter|Meaning|Notes|
|---|---|---|
|identifier|Name or Id of the member||
|page|Page token for the list.|Defaults to first page.|
|maxResults|Maximum results in the list|Defaults to 100. The token "all" specifies the full remaining list.|

### deadlines Request Body

Do not supply a request body.

### deadlines Response
A [deadline_list](Deadline.md#common_objects) object resource.

### deadlines Code Samples
Request Sample

```
curl -X GET -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' \
    http://localhost/api/member/1001/deadlines?pretty=true
```
Response Sample

```
{
    "type": "deadline_list",
    "data": {
        {
            "type": "deadline_entry",
            "id": "5",
            "departmentID": "7",
            "deadline": "2020-11-11",
            "get": "http:\/\/localhost:8080\/api\/deadline\/5"
        },
        {
            "type": "deadline_entry",
            "id": "1",
            "departmentID": "7",
            "deadline": "2019-12-27",
            "get": "http:\/\/localhost:8080\/api\/deadline\/1"
        }
    ]
}
```

## announcements
Get a list of announcements for a member.

### announcements Request

```GET /member/{identifier}/announcements```

### announcements Parameters

The following announcements parameters are available:

|Parameter|Meaning|Notes|
|---|---|---|
|identifier|Name or Id of the member||
|page|Page token for the list.|Defaults to first page.|
|maxResults|Maximum results in the list|Defaults to 100. The token "all" specifies the full remaining list.|

### announcements Request Body

Do not supply a request body.

### announcements Response
A [announcement_list](Announcement.md#common_objects) object resource.

### announcements Code Samples
Request Sample

```
curl -X GET -H 'Authorization: Bearer e0438d90599b1c4762d12fd03db6311c9ca46729' \
    http://localhost/api/member/1001/announcements?pretty=true
```
Response Sample

```
{
    "type": "announcement_list",
    "data": {
        {
            "type": "announcement_entry",
            "id": "5",
            "departmentID": "7",
            "postedOn": "2020-11-11",
            "postedBy": 1000,
            "scope": 0,
            "text": "This is an important announcement",
            "get": "http:\/\/localhost:8080\/api\/deadline\/5"
        },
        {
            "type": "deadline_entry",
            "id": "1",
            "departmentID": "7",
            "postedOn": "2020-11-11",
            "postedBy": 1000,
            "scope": 0,
            "text": "This is another very important announcement",
            "get": "http:\/\/localhost:8080\/api\/deadline\/1"
        }
    ]
}
```

---
##### [Return to Top](README.md)           [Return to Resource List](README.md#resources)


text:
require 'spec_helper'

describe Coppertone::DomainSpec do
  it 'raises no exception for a normal string' do
    expect(Coppertone::DomainSpec.new('gmail.com')).not_to be_nil
  end

  it 'raises no exception for a macro with allowed terms' do
    expect(Coppertone::DomainSpec.new('%{s}%{l}%{o}%{d}%{i}%{v}'))
      .not_to be_nil
    expect(Coppertone::DomainSpec.new('%{S}%{L}%{O}%{D}%{I}%{V}'))
      .not_to be_nil
  end

  it 'raises no exception for a macro with reverse' do
    expect(Coppertone::DomainSpec.new('%{sr}%{lr}%{or}%{dr}%{ir}%{vr}'))
      .not_to be_nil
    expect(Coppertone::DomainSpec.new('%{Sr}%{Lr}%{Or}%{Dr}%{Ir}%{Vr}'))
      .not_to be_nil
  end

  it 'raises an error when the macro string is malformed' do
    expect do
      Coppertone::DomainSpec.new('%&')
    end.to raise_error(Coppertone::DomainSpecParsingError)
  end

  it 'raises an error when the macro string contains forbidden macros' do
    %w[c r t].each do |m|
      expect do
        Coppertone::DomainSpec.new("%{#{m}}")
      end.to raise_error(Coppertone::DomainSpecParsingError)
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
import usePageTitle from '../usePageTitle';
import useAuthorizationRequired from '../Authentication/useAuthorizationRequired';

function OAuthApplications(): JSX.Element {
  const authorizationWarning = useAuthorizationRequired('can_manage_oauth_applications');

  // cop-out?  maybe.

  usePageTitle('OAuth2 applications');

  if (authorizationWarning) return authorizationWarning;

  return (
    <iframe
      className="border rounded-lg w-100"
      style={{ height: '90vh' }}
      title="Doorkeeper applications admin"
      src="/oauth/applications"
    />
  );
}

export default OAuthApplications;


text:
KityMinder.registerUI('menu/save/save', function(minder) {
    return minder.getUI('menu/menu').createSubMenu('save');
});


text:
package org.activiti.web.simple.webapp.model;

@SuppressWarnings("serial")
public class Group implements org.activiti.engine.identity.Group {

	private String id;
	private String name;
	private String type;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}


text:
package org.everit.persistence.jdbc.dsf.ecm.tests;

import javax.sql.DataSource;

import org.everit.osgi.dev.testrunner.TestRunnerConstants;
import org.everit.osgi.ecm.annotation.Component;
import org.everit.osgi.ecm.annotation.Service;
import org.everit.osgi.ecm.annotation.ServiceRef;
import org.everit.osgi.ecm.annotation.attribute.StringAttribute;
import org.everit.osgi.ecm.annotation.attribute.StringAttributes;
import org.everit.osgi.ecm.extender.ECMExtenderConstants;
import org.junit.Assert;
import org.junit.Test;

import aQute.bnd.annotation.headers.ProvideCapability;

/**
 * Test for Auto SQLTemplates Component.
 */
@Component(componentId = "DataSourceComponentTest")
@ProvideCapability(ns = ECMExtenderConstants.CAPABILITY_NS_COMPONENT,
    value = ECMExtenderConstants.CAPABILITY_ATTR_CLASS + "=${@class}")
@StringAttributes({
    @StringAttribute(attributeId = TestRunnerConstants.SERVICE_PROPERTY_TESTRUNNER_ENGINE_TYPE,
        defaultValue = "junit4"),
    @StringAttribute(attributeId = TestRunnerConstants.SERVICE_PROPERTY_TEST_ID,
        defaultValue = "dataSourceComponentTest") })
@Service(DataSourceComponentTest.class)
public class DataSourceComponentTest {

  private DataSource dataSource;

  @ServiceRef(defaultValue = "")
  public void setDataSource(final DataSource dataSource) {
    this.dataSource = dataSource;
  }

  @Test
  public void testThatComponentIsAlive() {
    Assert.assertNotNull("DataSource is not binded.", dataSource);
  }
}


text:
package com.opengamma.analytics.financial.model.volatility.discrete;

import java.io.Serializable;
import java.util.List;

import com.opengamma.analytics.math.function.VectorFunctionProvider;
import com.opengamma.util.ArgumentChecker;
import com.opengamma.util.tuple.DoublesPair;

/**
 * Abstraction for anything that provides a {@link DiscreteVolatilityFunction} for a set of expiry-strike points
 */
public abstract class DiscreteVolatilityFunctionProvider implements VectorFunctionProvider<DoublesPair>, Serializable {

  /**
   * Make a {@link DiscreteVolatilityFunction} for the given expiry-strike points; this will map from some model
   * parameters to volatilities at the  expiry-strike points
   * @param expiryStrikePoints List of expiry-strike points that the returned {@link DiscreteVolatilityFunction}
   * must give volatilities for
   * @return a {@link DiscreteVolatilityFunction}
   */
  @Override
  public DiscreteVolatilityFunction from(final List<DoublesPair> expiryStrikePoints) {
    ArgumentChecker.notNull(expiryStrikePoints, "expiryStrikePoints");
    return from(expiryStrikePoints.toArray(new DoublesPair[0]));
  }

  /**
   * Make a {@link DiscreteVolatilityFunction} for the given expiry-strike points; this will map from some model
   * parameters to volatilities at the  expiry-strike points
   * @param expiryStrikePoints Arrays of expiry-strike points that the returned {@link DiscreteVolatilityFunction}
   * must give volatilities for
   * @return a {@link DiscreteVolatilityFunction}
   */
  @Override
  public abstract DiscreteVolatilityFunction from(final DoublesPair[] expiryStrikePoints);
}


text:
<?php
/* Prototype  : public DateTime DateTime::setISODate  ( int $year  , int $week  [, int $day  ] )
 * Description: Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
 * Source code: ext/date/php_date.c
 * Alias to functions: date_isodate_set
 */

echo "*** Testing DateTime::setISODate() : basic functionality ***\n";

//Set the default time zone
date_default_timezone_set("Europe/London");

// Create a deate object
$datetime = new DateTime("2009-01-30 17:57:32");

// Which month is week 40 ?
$datetime->setISODate(2008, 40);
echo "Week 40 of 2009 is in \"" . $datetime->format("F") . "\"\n";

// What date is week  week 30 day 3 ?
$datetime->setISODate(2009, 30, 3);
echo "Week 30 day 3 of 2009 is \"" . $datetime->format("D M j") . "\"\n";

// What date was is last year  ?
$datetime->setISODate(2008, 30, 3);
echo "..same day last year was \"" . $datetime->format("D M j") . "\"\n";

?>
===DONE===


text:
package br.gov.siscomex.portalunico.talpco.model;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "DadosProrrogacaoLpco", propOrder =
    { "situacao", "novaDataFimVigencia", "dataInicioVigencia", "dataFimVigencia", "dataCadastroSolicitacao", "dataUltimaAlteracao", "justificativa"
})

@XmlRootElement(name="DadosProrrogacaoLpco")
/**
  * Dados de uma solicitação de prorrogação
 **/
@ApiModel(description="Dados de uma solicitação de prorrogação")
public class DadosProrrogacaoLpco  {

  @XmlElement(name="situacao")
  @ApiModelProperty(value = "")
  @Valid
  private IdDescricao situacao = null;

  @XmlElement(name="novaDataFimVigencia")
  @ApiModelProperty(example = "2019-10-01", value = "Nova data solicitada para fim de vigência
Formato: yyyy-MM-dd")
 /**
   * Nova data solicitada para fim de vigência
Formato: yyyy-MM-dd
  **/
  private String novaDataFimVigencia = null;

  @XmlElement(name="dataInicioVigencia", required = true)
  @ApiModelProperty(example = "2019-10-01", required = true, value = "Início de vigência do LPCO
Formato: yyyy-MM-dd")
 /**
   * Início de vigência do LPCO
Formato: yyyy-MM-dd
  **/
  private String dataInicioVigencia = null;

  @XmlElement(name="dataFimVigencia", required = true)
  @ApiModelProperty(example = "2019-10-01", required = true, value = "Data atual de fim de vigência do LPCO
Formato: yyyy-MM-dd")
 /**
   * Data atual de fim de vigência do LPCO
Formato: yyyy-MM-dd
  **/
  private String dataFimVigencia = null;

  @XmlElement(name="dataCadastroSolicitacao", required = true)
  @ApiModelProperty(example = "2019-10-01", required = true, value = "Data em que a solicitação de prorrogação foi cadastrada
Formato: yyyy-MM-dd")
 /**
   * Data em que a solicitação de prorrogação foi cadastrada
Formato: yyyy-MM-dd
  **/
  private String dataCadastroSolicitacao = null;

  @XmlElement(name="dataUltimaAlteracao")
  @ApiModelProperty(example = "2019-10-01", value = "Data da última alteração da solicitação de prorrogação
Formato: yyyy-MM-dd")
 /**
   * Data da última alteração da solicitação de prorrogação
Formato: yyyy-MM-dd
  **/
  private String dataUltimaAlteracao = null;

  @XmlElement(name="justificativa")
  @ApiModelProperty(example = "<texto livre>", value = "Justificativa da solicitação de prorrogação.
Tamanho mínimo: 0
Tamanho máximo: 400")
 /**
   * Justificativa da solicitação de prorrogação.
Tamanho mínimo: 0
Tamanho máximo: 400
  **/
  private String justificativa = null;
 /**
   * Get situacao
   * @return situacao
  **/
  @JsonProperty("situacao")
  public IdDescricao getSituacao() {
    return situacao;
  }

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

  public DadosProrrogacaoLpco situacao(IdDescricao situacao) {
    this.situacao = situacao;
    return this;
  }

 /**
   * Nova data solicitada para fim de vigência<br>Formato: yyyy-MM-dd
   * @return novaDataFimVigencia
  **/
  @JsonProperty("novaDataFimVigencia")
  public String getNovaDataFimVigencia() {
    return novaDataFimVigencia;
  }

  public void setNovaDataFimVigencia(String novaDataFimVigencia) {
    this.novaDataFimVigencia = novaDataFimVigencia;
  }

  public DadosProrrogacaoLpco novaDataFimVigencia(String novaDataFimVigencia) {
    this.novaDataFimVigencia = novaDataFimVigencia;
    return this;
  }

 /**
   * Início de vigência do LPCO<br>Formato: yyyy-MM-dd
   * @return dataInicioVigencia
  **/
  @JsonProperty("dataInicioVigencia")
  @NotNull
  public String getDataInicioVigencia() {
    return dataInicioVigencia;
  }

  public void setDataInicioVigencia(String dataInicioVigencia) {
    this.dataInicioVigencia = dataInicioVigencia;
  }

  public DadosProrrogacaoLpco dataInicioVigencia(String dataInicioVigencia) {
    this.dataInicioVigencia = dataInicioVigencia;
    return this;
  }

 /**
   * Data atual de fim de vigência do LPCO<br>Formato: yyyy-MM-dd
   * @return dataFimVigencia
  **/
  @JsonProperty("dataFimVigencia")
  @NotNull
  public String getDataFimVigencia() {
    return dataFimVigencia;
  }

  public void setDataFimVigencia(String dataFimVigencia) {
    this.dataFimVigencia = dataFimVigencia;
  }

  public DadosProrrogacaoLpco dataFimVigencia(String dataFimVigencia) {
    this.dataFimVigencia = dataFimVigencia;
    return this;
  }

 /**
   * Data em que a solicitação de prorrogação foi cadastrada<br>Formato: yyyy-MM-dd
   * @return dataCadastroSolicitacao
  **/
  @JsonProperty("dataCadastroSolicitacao")
  @NotNull
  public String getDataCadastroSolicitacao() {
    return dataCadastroSolicitacao;
  }

  public void setDataCadastroSolicitacao(String dataCadastroSolicitacao) {
    this.dataCadastroSolicitacao = dataCadastroSolicitacao;
  }

  public DadosProrrogacaoLpco dataCadastroSolicitacao(String dataCadastroSolicitacao) {
    this.dataCadastroSolicitacao = dataCadastroSolicitacao;
    return this;
  }

 /**
   * Data da última alteração da solicitação de prorrogação<br>Formato: yyyy-MM-dd
   * @return dataUltimaAlteracao
  **/
  @JsonProperty("dataUltimaAlteracao")
  public String getDataUltimaAlteracao() {
    return dataUltimaAlteracao;
  }

  public void setDataUltimaAlteracao(String dataUltimaAlteracao) {
    this.dataUltimaAlteracao = dataUltimaAlteracao;
  }

  public DadosProrrogacaoLpco dataUltimaAlteracao(String dataUltimaAlteracao) {
    this.dataUltimaAlteracao = dataUltimaAlteracao;
    return this;
  }

 /**
   * Justificativa da solicitação de prorrogação.<br>Tamanho mínimo: 0<br>Tamanho máximo: 400
   * @return justificativa
  **/
  @JsonProperty("justificativa")
  public String getJustificativa() {
    return justificativa;
  }

  public void setJustificativa(String justificativa) {
    this.justificativa = justificativa;
  }

  public DadosProrrogacaoLpco justificativa(String justificativa) {
    this.justificativa = justificativa;
    return this;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DadosProrrogacaoLpco {\n");

    sb.append("    situacao: ").append(toIndentedString(situacao)).append("\n");
    sb.append("    novaDataFimVigencia: ").append(toIndentedString(novaDataFimVigencia)).append("\n");
    sb.append("    dataInicioVigencia: ").append(toIndentedString(dataInicioVigencia)).append("\n");
    sb.append("    dataFimVigencia: ").append(toIndentedString(dataFimVigencia)).append("\n");
    sb.append("    dataCadastroSolicitacao: ").append(toIndentedString(dataCadastroSolicitacao)).append("\n");
    sb.append("    dataUltimaAlteracao: ").append(toIndentedString(dataUltimaAlteracao)).append("\n");
    sb.append("    justificativa: ").append(toIndentedString(justificativa)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private static String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}


text:
package feihua.generator.gen;

/**
 * Created by feihua on 2015/7/9.
 */
public class ControllerGenerator extends DefaultGenerator {

}


text:
// Generated by CoffeeScript 1.9.3
(function() {
  var $, $$, Delegator, PaneContainerView, PaneView, Q, TextEditor, View, Workspace, WorkspaceView, _, deprecate, fs, ipc, logDeprecationWarnings, path, ref, ref1,
    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  ipc = require('ipc');

  path = require('path');

  Q = require('q');

  _ = require('underscore-plus');

  Delegator = require('delegato');

  ref = require('grim'), deprecate = ref.deprecate, logDeprecationWarnings = ref.logDeprecationWarnings;

  ref1 = require('./space-pen-extensions'), $ = ref1.$, $$ = ref1.$$, View = ref1.View;

  fs = require('fs-plus');

  Workspace = require('./workspace');

  PaneView = require('./pane-view');

  PaneContainerView = require('./pane-container-view');

  TextEditor = require('./text-editor');

  module.exports = WorkspaceView = (function(superClass) {
    extend(WorkspaceView, superClass);

    Delegator.includeInto(WorkspaceView);

    WorkspaceView.delegatesProperty('fullScreen', 'destroyedItemURIs', {
      toProperty: 'model'
    });

    WorkspaceView.delegatesMethods('open', 'openSync', 'saveActivePaneItem', 'saveActivePaneItemAs', 'saveAll', 'destroyActivePaneItem', 'destroyActivePane', 'increaseFontSize', 'decreaseFontSize', {
      toProperty: 'model'
    });

    function WorkspaceView(element1) {
      this.element = element1;
      if (this.element == null) {
        return atom.views.getView(atom.workspace).__spacePenView;
      }
      WorkspaceView.__super__.constructor.apply(this, arguments);
      this.deprecateViewEvents();
      this.attachedEditorViews = new WeakSet;
    }

    WorkspaceView.prototype.setModel = function(model) {
      this.model = model;
      this.horizontal = this.find('atom-workspace-axis.horizontal');
      this.vertical = this.find('atom-workspace-axis.vertical');
      this.panes = this.find('atom-pane-container').view();
      return this.subscribe(this.model.onDidOpen((function(_this) {
        return function() {
          return _this.trigger('uri-opened');
        };
      })(this)));
    };

    WorkspaceView.prototype.beforeRemove = function() {
      var ref2;
      return (ref2 = this.model) != null ? ref2.destroy() : void 0;
    };

    /*
    Section: Accessing the Workspace Model
     */

    WorkspaceView.prototype.getModel = function() {
      return this.model;
    };

    /*
    Section: Accessing Views
     */

    WorkspaceView.prototype.eachEditorView = function(callback) {
      var attachedCallback, editorView, i, len, ref2;
      ref2 = this.getEditorViews();
      for (i = 0, len = ref2.length; i < len; i++) {
        editorView = ref2[i];
        this.attachedEditorViews.add(editorView);
        callback(editorView);
      }
      attachedCallback = (function(_this) {
        return function(e, editorView) {
          if (!_this.attachedEditorViews.has(editorView)) {
            _this.attachedEditorViews.add(editorView);
            if (!editorView.mini) {
              return callback(editorView);
            }
          }
        };
      })(this);
      this.on('editor:attached', attachedCallback);
      return {
        off: (function(_this) {
          return function() {
            return _this.off('editor:attached', attachedCallback);
          };
        })(this)
      };
    };

    WorkspaceView.prototype.eachPaneView = function(callback) {
      return this.panes.eachPaneView(callback);
    };

    WorkspaceView.prototype.getPaneViews = function() {
      return this.panes.getPaneViews();
    };

    WorkspaceView.prototype.getActivePaneView = function() {
      return this.panes.getActivePaneView();
    };

    WorkspaceView.prototype.getActiveView = function() {
      return this.panes.getActiveView();
    };

    /*
    Section: Adding elements to the workspace
     */

    WorkspaceView.prototype.prependToTop = function(element) {
      deprecate('Please use Workspace::addTopPanel() instead');
      return this.vertical.prepend(element);
    };

    WorkspaceView.prototype.appendToTop = function(element) {
      deprecate('Please use Workspace::addTopPanel() instead');
      return this.panes.before(element);
    };

    WorkspaceView.prototype.prependToBottom = function(element) {
      deprecate('Please use Workspace::addBottomPanel() instead');
      return this.panes.after(element);
    };

    WorkspaceView.prototype.appendToBottom = function(element) {
      deprecate('Please use Workspace::addBottomPanel() instead');
      return this.vertical.append(element);
    };

    WorkspaceView.prototype.prependToLeft = function(element) {
      deprecate('Please use Workspace::addLeftPanel() instead');
      return this.horizontal.prepend(element);
    };

    WorkspaceView.prototype.appendToLeft = function(element) {
      deprecate('Please use Workspace::addLeftPanel() instead');
      return this.vertical.before(element);
    };

    WorkspaceView.prototype.prependToRight = function(element) {
      deprecate('Please use Workspace::addRightPanel() instead');
      return this.vertical.after(element);
    };

    WorkspaceView.prototype.appendToRight = function(element) {
      deprecate('Please use Workspace::addRightPanel() instead');
      return this.horizontal.append(element);
    };

    /*
    Section: Focusing pane views
     */

    WorkspaceView.prototype.focusPreviousPaneView = function() {
      return this.model.activatePreviousPane();
    };

    WorkspaceView.prototype.focusNextPaneView = function() {
      return this.model.activateNextPane();
    };

    WorkspaceView.prototype.focusPaneViewAbove = function() {
      return this.panes.focusPaneViewAbove();
    };

    WorkspaceView.prototype.focusPaneViewBelow = function() {
      return this.panes.focusPaneViewBelow();
    };

    WorkspaceView.prototype.focusPaneViewOnLeft = function() {
      return this.panes.focusPaneViewOnLeft();
    };

    WorkspaceView.prototype.focusPaneViewOnRight = function() {
      return this.panes.focusPaneViewOnRight();
    };

    /*
    Section: Private
     */

    WorkspaceView.prototype.confirmClose = function() {
      return this.model.confirmClose();
    };

    WorkspaceView.prototype.getEditorViews = function() {
      var editorElement, i, len, ref2, results;
      ref2 = this.panes.element.querySelectorAll('atom-pane > .item-views > atom-text-editor');
      results = [];
      for (i = 0, len = ref2.length; i < len; i++) {
        editorElement = ref2[i];
        results.push($(editorElement).view());
      }
      return results;
    };

    /*
    Section: Deprecated
     */

    WorkspaceView.prototype.deprecateViewEvents = function() {
      var TextEditorView, originalEditorViewOn, originalPaneViewOn, originalWorkspaceViewOn;
      originalWorkspaceViewOn = this.on;
      this.on = (function(_this) {
        return function(eventName) {
          switch (eventName) {
            case 'beep':
              deprecate('Use Atom::onDidBeep instead');
              break;
            case 'cursor:moved':
              deprecate('Use TextEditor::onDidChangeCursorPosition instead');
              break;
            case 'editor:attached':
              deprecate('Use Workspace::onDidAddTextEditor instead');
              break;
            case 'editor:detached':
              deprecate('Use TextEditor::onDidDestroy instead');
              break;
            case 'editor:will-be-removed':
              deprecate('Use TextEditor::onDidDestroy instead');
              break;
            case 'pane:active-item-changed':
              deprecate('Use Pane::onDidChangeActiveItem instead');
              break;
            case 'pane:active-item-modified-status-changed':
              deprecate('Use Pane::onDidChangeActiveItem and call onDidChangeModified on the active item instead');
              break;
            case 'pane:active-item-title-changed':
              deprecate('Use Pane::onDidChangeActiveItem and call onDidChangeTitle on the active item instead');
              break;
            case 'pane:attached':
              deprecate('Use Workspace::onDidAddPane instead');
              break;
            case 'pane:became-active':
              deprecate('Use Pane::onDidActivate instead');
              break;
            case 'pane:became-inactive':
              deprecate('Use Pane::onDidChangeActive instead');
              break;
            case 'pane:item-added':
              deprecate('Use Pane::onDidAddItem instead');
              break;
            case 'pane:item-moved':
              deprecate('Use Pane::onDidMoveItem instead');
              break;
            case 'pane:item-removed':
              deprecate('Use Pane::onDidRemoveItem instead');
              break;
            case 'pane:removed':
              deprecate('Use Pane::onDidDestroy instead');
              break;
            case 'pane-container:active-pane-item-changed':
              deprecate('Use Workspace::onDidChangeActivePaneItem instead');
              break;
            case 'selection:changed':
              deprecate('Use TextEditor::onDidChangeSelectionRange instead');
              break;
            case 'uri-opened':
              deprecate('Use Workspace::onDidOpen instead');
          }
          return originalWorkspaceViewOn.apply(_this, arguments);
        };
      })(this);
      TextEditorView = require('./text-editor-view');
      originalEditorViewOn = TextEditorView.prototype.on;
      TextEditorView.prototype.on = function(eventName) {
        switch (eventName) {
          case 'cursor:moved':
            deprecate('Use TextEditor::onDidChangeCursorPosition instead');
            break;
          case 'editor:attached':
            deprecate('Use TextEditor::onDidAddTextEditor instead');
            break;
          case 'editor:detached':
            deprecate('Use TextEditor::onDidDestroy instead');
            break;
          case 'editor:will-be-removed':
            deprecate('Use TextEditor::onDidDestroy instead');
            break;
          case 'selection:changed':
            deprecate('Use TextEditor::onDidChangeSelectionRange instead');
        }
        return originalEditorViewOn.apply(this, arguments);
      };
      originalPaneViewOn = PaneView.prototype.on;
      return PaneView.prototype.on = function(eventName) {
        switch (eventName) {
          case 'cursor:moved':
            deprecate('Use TextEditor::onDidChangeCursorPosition instead');
            break;
          case 'editor:attached':
            deprecate('Use TextEditor::onDidAddTextEditor instead');
            break;
          case 'editor:detached':
            deprecate('Use TextEditor::onDidDestroy instead');
            break;
          case 'editor:will-be-removed':
            deprecate('Use TextEditor::onDidDestroy instead');
            break;
          case 'pane:active-item-changed':
            deprecate('Use Pane::onDidChangeActiveItem instead');
            break;
          case 'pane:active-item-modified-status-changed':
            deprecate('Use Pane::onDidChangeActiveItem and call onDidChangeModified on the active item instead');
            break;
          case 'pane:active-item-title-changed':
            deprecate('Use Pane::onDidChangeActiveItem and call onDidChangeTitle on the active item instead');
            break;
          case 'pane:attached':
            deprecate('Use Workspace::onDidAddPane instead');
            break;
          case 'pane:became-active':
            deprecate('Use Pane::onDidActivate instead');
            break;
          case 'pane:became-inactive':
            deprecate('Use Pane::onDidChangeActive instead');
            break;
          case 'pane:item-added':
            deprecate('Use Pane::onDidAddItem instead');
            break;
          case 'pane:item-moved':
            deprecate('Use Pane::onDidMoveItem instead');
            break;
          case 'pane:item-removed':
            deprecate('Use Pane::onDidRemoveItem instead');
            break;
          case 'pane:removed':
            deprecate('Use Pane::onDidDestroy instead');
            break;
          case 'selection:changed':
            deprecate('Use TextEditor::onDidChangeSelectionRange instead');
        }
        return originalPaneViewOn.apply(this, arguments);
      };
    };

    WorkspaceView.prototype.eachPane = function(callback) {
      deprecate("Use WorkspaceView::eachPaneView instead");
      return this.eachPaneView(callback);
    };

    WorkspaceView.prototype.getPanes = function() {
      deprecate("Use WorkspaceView::getPaneViews instead");
      return this.getPaneViews();
    };

    WorkspaceView.prototype.getActivePane = function() {
      deprecate("Use WorkspaceView::getActivePaneView instead");
      return this.getActivePaneView();
    };

    WorkspaceView.prototype.getActivePaneItem = function() {
      deprecate("Use Workspace::getActivePaneItem instead");
      return this.model.getActivePaneItem();
    };

    return WorkspaceView;

  })(View);

}).call(this);


text:
import {Document, Model, Schema, Types, model} from 'mongoose'
import {IUser} from './User'

const ObjectId = Schema.Types.ObjectId

const BBSProfileSchema = new Schema({
  // 用户
  user: {type: ObjectId, ref: 'User', required: true},
  // uid
  uid: {type: String, required: true},
  // 用户名
  username: {type: String, required: true},
  // 头像
  avatar: {type: String},
  // 注册时间
  joinAt: {type: Date}
}, {
  timestamps: true
})

export interface IBBSProfile extends Document {
  user: Types.ObjectId | IUser,
  uid: String,
  username: String,
  avatar: String,
  joinAt: Date
}

export interface IBBSProfileModel extends Model<IBBSProfile> {}

export default  model<IBBSProfile, IBBSProfileModel>('BBSProfile', BBSProfileSchema)


text:
package org.drip.product.calib;

/*
 * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 */

/*!
 * Copyright (C) 2017 Lakshmi Krishnamurthy
 * Copyright (C) 2016 Lakshmi Krishnamurthy
 * Copyright (C) 2015 Lakshmi Krishnamurthy
 * Copyright (C) 2014 Lakshmi Krishnamurthy
 *
 *  This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
 *  	libraries targeting analysts and developers
 *  	https://lakshmidrip.github.io/DRIP/
 *
 *  DRIP is composed of four main libraries:
 *
 *  - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
 *  - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
 *  - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
 *  - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
 *
 *  - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
 *  	Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
 *  	Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
 *  	Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
 *  	Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
 *
 *  - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy
 *  	Incorporator, Holdings Constraint, and Transaction Costs.
 *
 *  - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
 *
 *  - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
 *
 *  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.
 */

/**
 * DepositComponentQuoteSet extends the ProductQuoteSet by implementing the Calibration Parameters for the
 * 	Deposit Component. Currently it exposes the PV and the Rate Quote Fields.
 *
 * @author Lakshmi Krishnamurthy
 */

public class DepositComponentQuoteSet extends org.drip.product.calib.ProductQuoteSet {

	/**
	 * DepositComponentQuoteSet Constructor
	 *
	 * @param aLSS Array of Latent State Specification
	 *
	 * @throws java.lang.Exception Thrown if Inputs are invalid
	 */

	public DepositComponentQuoteSet (
		final org.drip.state.representation.LatentStateSpecification[] aLSS)
		throws java.lang.Exception
	{
		super (aLSS);
	}

	/**
	 * Set the PV
	 *
	 * @param dblPV The PV
	 *
	 * @return TRUE - PV successfully set
	 */

	public boolean setPV (
		final double dblPV)
	{
		return set ("PV", dblPV);
	}

	/**
	 * Indicate if the PV Field exists
	 *
	 * @return TRUE - PV Field Exists
	 */

	public boolean containsPV()
	{
		return contains ("PV");
	}

	/**
	 * Retrieve the PV
	 *
	 * @return The PV
	 *
	 * @throws java.lang.Exception Thrown if the PV Field does not exist
	 */

	public double pv()
		throws java.lang.Exception
	{
		return get ("PV");
	}

	/**
	 * Set the Forward Rate
	 *
	 * @param dblForwardRate The Forward Rate
	 *
	 * @return TRUE - The Forward Rate successfully set
	 */

	public boolean setForwardRate (
		final double dblForwardRate)
	{
		return set ("ForwardRate", dblForwardRate);
	}

	/**
	 * Indicate if the Forward Rate Field exists
	 *
	 * @return TRUE - Forward Rate Field Exists
	 */

	public boolean containsForwardRate()
	{
		return contains ("ForwardRate");
	}

	/**
	 * Retrieve the Forward Rate
	 *
	 * @return The Forward Rate
	 *
	 * @throws java.lang.Exception Thrown if the Forward Rate Field does not exist
	 */

	public double forwardRate()
		throws java.lang.Exception
	{
		return get ("ForwardRate");
	}

	/**
	 * Set the Rate
	 *
	 * @param dblRate The Rate
	 *
	 * @return TRUE - The Rate successfully set
	 */

	public boolean setRate (
		final double dblRate)
	{
		return set ("Rate", dblRate);
	}

	/**
	 * Indicate if the Rate Field exists
	 *
	 * @return TRUE - Rate Field Exists
	 */

	public boolean containsRate()
	{
		return contains ("Rate");
	}

	/**
	 * Retrieve the Rate
	 *
	 * @return The Rate
	 *
	 * @throws java.lang.Exception Thrown if the Rate Field does not exist
	 */

	public double rate()
		throws java.lang.Exception
	{
		return get ("Rate");
	}
}


text: 本例子参考:http://www.zhangxinxu.com/wordpress/2017/08/css-percent-padding-image-layout/


text:
package com.cc3002.auxiliar.design.pattern.observer.example02;

public interface IWeatherDataSetter {
  void measurementsChanged();

  void setTemperature(double value);

  void setHumidity(double value);

  void setPressure(double value);
}


text:
package org.lastaflute.di.core.exception;

import org.lastaflute.di.exception.SRuntimeException;

/**
 * @author modified by jflute (originated in Seasar)
 */
public class IllegalAutoBindingPropertyRuntimeException extends SRuntimeException {

    private static final long serialVersionUID = -8464366695114050369L;
    private Class<?> componentClass;
    private String propertyName;

    public IllegalAutoBindingPropertyRuntimeException(Class<?> componentClass, String propertyName) {
        super("ESSR0080", new Object[] { componentClass.getName(), propertyName });
        this.componentClass = componentClass;
        this.propertyName = propertyName;
    }

    public Class<?> getComponentClass() {
        return componentClass;
    }

    public String getPropertyName() {
        return propertyName;
    }
}


text:
<?php

class Model_T_Activity_Detail extends \Orm\Model_Soft
{
	protected static $_properties = array(
		'id',
		't_activity_id',
		'task_id',
		'cost',
		'created_at',
		'updated_at',
		'deleted_at',
	);

	protected static $_observers = array(
		'Orm\Observer_CreatedAt' => array(
			'events' => array('before_insert'),
			'mysql_timestamp' => true,
		),
		'Orm\Observer_UpdatedAt' => array(
			'events' => array('before_update'),
			'mysql_timestamp' => true,
		),
	);

	protected static $_belongs_to = array(
		't_activity' => array(
		     'model_to' => 'Model_T_Activity',
		     'key_from' => 't_activity_id',
		     'key_to' => 'id',
		     'cascade_save' => true,
		     'cascade_delete' => false,
		),
		'm_task' => array(
		     'model_to' => 'Model_M_Task',
		     'key_from' => 'task_id',
		     'key_to' => 'id',
		     'cascade_save' => true,
		     'cascade_delete' => false,
		),
	);

	protected static $_soft_delete = array(
		'mysql_timestamp' => true,
	);
	protected static $_table_name = 't_activity_detail';

}


text:
var FID=-1;
/**
 * Description
 * @class FlyerSwarm
 * @constructor
 * @param {} gameEngine
 * @param {} config
 * @param {} callback
 * @return ThisExpression
 */
var FlyerSwarm = function(gameEngine, config, callback){

	var count = 1;
	var geometry = new THREE.Geometry();
	var bezier;
	var splinePoints;
	var targetHitTime = null;
	var numPoints = 400;
	var sourcePosition;

	var material = new THREE.LineBasicMaterial({
	    color: config.source.player.color.hex(),
	    transparent: true,
	    opacity: gameEngine.config.flyerTrackLine.opacity
	});
	var line ;
	FID = FID+1;
	this.id = FID;
	this.target = config.target;
	this.source = config.source;
	this.particleGeometry = new THREE.Geometry();
	this.flyer = [];
	this.clock = new THREE.Clock();
	var attackTimer =  10;
	var distance  ;

	/**
	 * Description
	 * @method speed
	 * @return
	 */
	var speed = function() {
		// body...
	};

	/**
	 * Description
	 * @method flyerPosition
	 * @param {} timeOffset
	 * @param {} index
	 * @param {} source
	 * @param {} target
	 * @param {} drawline
	 * @return NewExpression
	 */
	this.flyerPosition = function(timeOffset, index, source, target, drawline){

		//var t = target.position(gameEngine.timeMachine());

		if (!this.targetPosition) {
			distance = source.distance(target, timeOffset);//point;
		 	targetHitTime = (timeOffset)+ (distance / attackTimer);
			var s = source.position(gameEngine.timeMachine()*0.025);

			this.targetPosition = target.position((gameEngine.timeMachine() + attackTimer) * 0.025);

		 	sourcePosition = s;
			spline = new THREE.SplineCurve3([
			   new THREE.Vector3(sourcePosition.x,sourcePosition.y,sourcePosition.z),
			   new THREE.Vector3(sourcePosition.x+40,sourcePosition.y-20,sourcePosition.z+40),
			   new THREE.Vector3(this.targetPosition.x,this.targetPosition.y,this.targetPosition.z)
			]);
			splinePoints = spline.getPoints(distance);
			flowI = 0;
			var i;
			for(i = 0; i < splinePoints.length; i++){
			    geometry.vertices.push(splinePoints[i]);
			}
			if (drawline) {
				for(i = 0; i < splinePoints.length; i++){
				    geometry.vertices.push(splinePoints[i]);
				}
	 	 		line = new THREE.Line(geometry, material);
				gameEngine.scene.add(line);
			}

		}
	 //document.title = xx;

		// smooth my curve over this many points
	 	var xx = (distance / attackTimer) * this.clock.getElapsedTime();
		var point = Math.floor(xx);
		//document.title = xx;
		var vPoint = splinePoints[point+(index)];
		var x;//+ ((index*2) + index%2)*Math.sin(uniforms.time.value);
		var y;//+ (index/2)/t0*0.025;
		var z;//+ vPoint.y%2+index/2.5;
		if (vPoint){
			x = vPoint.x ;//+ ((index*2) + index%2)*Math.sin(uniforms.time.value);
			y = vPoint.y ;//+ (index/2)/t0*0.025;
			z = vPoint.z ;//+ vPoint.y%2+index/2.5;
		} else {
		}

		//		document.title = targetHitTime +","+ gameEngine.timeMachine()*0.025 + (gameEngine.timeMachine()*0.025>targetHitTime);
		return new THREE.Vector3(x,y,z);
	};

	for (var i = 0; i < count; i++) this.flyer.push(new Flyer(gameEngine, this, config));

		// TODO: change flyer color to custom players color
	// var att = jQuery.extend({}, gameEngine.attributes);
 // 	var playerColor = config.source.player.color;
 // 	var flyerColor = att.customColor.value[0];
	// flyerColor.r = playerColor.r;
	// flyerColor.g = playerColor.g;
	// flyerColor.b = playerColor.b;

	var shaderMaterial = new THREE.ShaderMaterial({
		uniforms: 		gameEngine.uniforms,
		attributes:     gameEngine.attributes,
		vertexShader:   document.getElementById( 'vertexshader' ).textContent,
		fragmentShader: document.getElementById( 'fragmentshader' ).textContent,
		transparent: true
	});

	var particleCube = new THREE.ParticleSystem( this.particleGeometry, shaderMaterial );
	//particleCube.position.set(config.coords.x,config.coords.y,config.coords.z);
	particleCube.dynamic = true;
	particleCube.sortParticles = true;
	particleCube.userData.sourcePlanet = this.target;
	particleCube.userData.targetPlanet = this.target;
	gameEngine.scene.add( particleCube );

	/**
	 * Description
	 * @method move
	 * @param {} drawline
	 * @return
	 */
	this.move = function(drawline){
		for( var v = 0; v < this.particleGeometry.vertices.length; v++ ) {
			var timeOffset = gameEngine.uniforms.time.value + gameEngine.attributes.customOffset.value[ v ];

			var pos = this.flyerPosition(timeOffset, v, this.source, this.target, drawline);
			if (pos.x){
				this.particleGeometry.vertices[v] = pos;
			} else {
				if (v===this.particleGeometry.vertices.length-1){
					var p = particleCube.userData.targetPlanet;

					if (p.player.color.equal(this.source.player.color)){
						p.units++;
					} else {
						p.units--;
						if (p.units <= 0){
							gameEngine.sound.sample["smallexplosion1"].play();
							p.conquer(this.source.player);
							gameEngine.alert({
								type: "success",
								seconds: 3,
								msg:"A planet was conquered by the " + this.source.player.name + "!",
								color: this.source.player.color
							});
						}
					}
					p.setText();
					gameEngine.scene.remove( particleCube );
					gameEngine.scene.remove( line );
					this.particleGeometry.vertices = [];
					for (var i = 0; i < gameEngine.swarms.length; i++) {
						if (!p.defenseAlertDone){
							p.defenseAlertDone = true;
							//gameEngine.sound.samples("autodefense_ep").play(0.5);
							gameEngine.sound.sample["autodefense_ep"].play();
						}

						var s = gameEngine.swarms[i];
						if (s.id === this.id) gameEngine.swarms.remove(i);
						// gameEngine.refreshGameStatistics(); performance :(
						break;
					}
				}

			}
		}
	};

	gameEngine.swarms.push(this);
	return this;
};


text:
package LBJ2.IR;

import java.util.Iterator;
import java.util.LinkedList;

import LBJ2.Pass;
import LBJ2.parse.FoldParser;

/**
  * This class represents expressions that specify classifiers that learn.
  *
  * @author Nick Rizzolo
 **/
public class LearningClassifierExpression extends ClassifierExpression
{
  /**
    * If no learning algorithm is specified to learn a discrete classifier,
    * this learner is used.
   **/
  public static final InstanceCreationExpression defaultDiscreteLearner =
    new InstanceCreationExpression(
        new Name("SparseNetworkLearner"),
        new ExpressionList(
          new InstanceCreationExpression(
            new Name("SparseWinnow"),
            new ExpressionList(
              new Constant("1.35"),
              new ExpressionList(
                new Constant("0.8"),
                new ExpressionList(
                  new Constant("4"),
                  new ExpressionList(new Constant("1"))))),
            -1, -1)),
        -1, -1);

  /**
    * If no learning algorithm is specified to learn a real classifier, this
    * learner is used.
   **/
  public static final InstanceCreationExpression defaultRealLearner =
    new InstanceCreationExpression(
        new Name("StochasticGradientDescent"), -1, -1);

  /**
    * If no alpha clause appears during cross validation, this
    * constant is used.
   **/
  public static final double defaultAlpha = 0.05;

  /**
    * If no preExtract clause appears in the sources, this
    * constant is used.
   **/
  public static final String defaultPreExtract = "\"diskZip\"";

  /** The revision status of the LCE's features node. */
  public Integer featuresStatus;
  /** The revision status of the LCE's prune node. */
  public Integer pruneStatus;
  /** The revision status of the LCE's learning node. */
  public Integer learningStatus;
  /**
    * This flag is set true iff the changes to the learner's LBJ
    * specification require its Java translation to be regenerated and nothing
    * more.
   **/
  public boolean onlyCodeGeneration;

  /**
    * (ø) The classifier this learning classifier gets its labels from.
   **/
  public ClassifierExpression labeler;

  /**
    * (¬ø) The classifier that does feature extraction for this
    * classifier; argument to using.
   **/
  public ClassifierExpression extractor;
  /** Counts the number of using clauses for error detection. */
  public int usingClauses;

  /**
    * (ø) The encoding that the generated classifier will use when
    * storing string data in features.
   **/
  public Constant featureEncoding;
  /**
    * Counts the number of encoding clauses for error detection.
   **/
  public int encodingClauses;

  /**
    * (ø) Tells this learning classifier how to get its training data;
    * argument to from.
   **/
  public InstanceCreationExpression parser;
  /** Counts the number of from clauses for error detection. */
  public int fromClauses;

  /**
    * (ø) Represents the integer number of training repetitions;
    * augments the from clause.
   **/
  public Expression rounds;
  /** Training starts from this round number. */
  public int startingRound = 1;

  /** (ø) Whether to use "global" or "perClass" feature pruning. */
  public Constant pruneCountType;
  /**
    * (ø) Whether to use "count" or "percent" counting for feature
    * pruning.
   **/
  public Constant pruneThresholdType;
  /** (ø) The feature pruning threshold. */
  public Constant pruneThreshold;
  /**
    * (ø) The contents of {@link #pruneCountType} on the previous run
    * of the compiler, if any.
   **/
  public Constant previousPruneCountType;

  /**
    * (ø) Tells this learning classifier how to construct its learning
    * algorithm; argument to with.  This variable should not
    * contain a non-null value if {@link #learnerName} and
    * {@link #learnerParameterBlock} contain non-null values.
   **/
  public InstanceCreationExpression learnerConstructor;
  /**
    * (ø) The name of the learner for this classifier; first argument
    * to with.  If this variable contains a non-null
    * value, {@link #learnerParameterBlock} must also be
    * non-null, and {@link #learnerConstructor} must be
    * null.
   **/
  public Name learnerName;
  /**
    * (ø) A block of statements that set parameters of the learner for
    * this classifier; second argument to with.  If this variable
    * contains a non-null value, {@link #learnerName} must also
    * be non-null, and {@link #learnerConstructor} must be
    * null.
   **/
  public Block learnerParameterBlock;
  /** Counts the number of with clauses for error detection. */
  public int withClauses;

  /**
    * (ø) Tells this learning classifier how to get its testing data;
    * argument to testFrom.
   **/
  public InstanceCreationExpression testParser;
  /**
    * Counts the number of testFrom clauses for error detection.
   **/
  public int testFromClauses;

  /**
    * (ø) Tells this learning classifier how to produce a prediction
    * during evaluation; argument to evaluate.
   **/
  public Expression evaluation;
  /**
    * Counts the number of evaluate clauses for error detection.
   **/
  public int evaluateClauses;

  /**
    * A list of the {@link ParameterSet} objects that appear in
    * the argument list.
   **/
  public LinkedList parameterSets;

  /**
    * (ø) Represents the integer number of subsets to be used in k-fold
    * cross validation; first argument to cval.
   **/
  public Constant K;
  /**
    * (ø) Dictates how the training data will be split into subsets for
    * use by cross validation; second argument to cval.
   **/
  public FoldParser.SplitPolicy splitPolicy;
  /** Counts the number of cval clauses for error detection. */
  public int cvalClauses;

  /**
    * (ø) Determines how the user wishes cross-validation to test its
    * performance; argument to testingMetric.
   **/
  public InstanceCreationExpression testingMetric;
  /**
    * Counts the number of testingMetric clauses, for error
    * detection.
   **/
  public int testingMetricClauses;

  /**
    * (¬ø) The desired confidence level for cross validation's
    * confidence interval output; argument to alpha, which can
    * only be specified when cval is also specified.
   **/
  public Constant alpha;
  /** Counts the number of alpha clauses, for error detection. */
  public int alphaClauses;

  /**
    * (¬ø) A Boolean or string value indicating how feature vectors
    * are to be pre-extracted; argument to preExtract.  Possible
    * values are false, true, "false",
    * "true", "none", "memory",
    * "disk", and "diskZip".
   **/
  public Constant preExtract;
  /**
    * Counts the number of preExtract clauses for error
    * detection.
   **/
  public int preExtractClauses;

  /**
    * (ø) Integer specifying how often (in examples) to give the user a
    * progress update during training; argument to
    * progressOutput.
   **/
  public Constant progressOutput;
  /**
    * Counts the number of progressOutput clauses, for error
    * detection.
   **/
  public int progressOutputClauses;

  /**
    * The {@link LBJ2.SemanticAnalysis} pass will let this
    * LearningClassifierExpression know if the features it
    * generates need to be checked for appropriateness in the context of the
    * enclosing {@link ClassifierAssignment} by setting this flag.
   **/
  public boolean checkDiscreteValues;

  /**
    * A string representation of the return type information for each feature.
    * This information is crucial in the construction of WEKA classifiers.
    *
    *
 Its format follows this convention:
    * "<type>_<name>[_<value-list>]:<type>_<name>[_<value-list>:[...]]"
    *
    *
 <type> can be either "num", "str", or "nom", representing
    * numerical, string, and nominal attributes respectively.
    *
    *
 Numerical and string attribute encodings do not need a value-list,
    * while Nominal attribute encodings are required to contain a value list.
    *
    * Examples:
    *

    *

    *     Just a numerical attribute named Dan: "num_Dan:"
    *

    *     A numerical attribute named Dan and a string attribute named Nick:
    *     "num_Dan:str_Nick:"
    *

    *     A numerical attribute named Dan, a string attribute named Nick, and
    *     a nominal attribute named Arindam which can take the values "Cool",
    *     "Uncool", or "Kinda Cool":
    *     "num_Dan:str_Nick:nom_Arindam_\"Cool\",\"Uncool\",\"Kinda Cool\":"
    *

    *
   **/
  public StringBuffer attributeString = new StringBuffer();

  /**
    * Full constructor.  The line and byte offset are set to -1.
    *
    * @param l    The expression representing the labeler classifier.
    * @param ext  Representation of the extractor classifier.
    * @param p    The expression representing the parser applied to data.
    * @param r    The constant representing the number of training
    *             repetitions.
    * @param a    A learning algorithm instance creation expression.
    * @param ln   The name of a learning algorithm.
    * @param pb   A block of statements used to set learning algorithm
    *             parameters.
    * @param enc  The expression representing the feature encoding used in
    *             this learner's lexicon.
    * @param tp   The expression representing the test parser.
    * @param e    The expression used to compute a prediction.
    * @param k    The number of folds for cross validation.
    * @param prms The sets of parameter values used in tuning.
    * @param s    The method used to split the data for cross validation.
    * @param t    Determines how the user wishes cross-validation to test its
    *             performance.
    * @param al   The cross validation confidence interval width.
    * @param pre  A Boolean indicating whether example vectors will be
    *             pre-extracted.
    * @param pro  An integer indicating how often progress updates will be
    *             output.
    * @param pct  The prune type ("global" or "perClass").
    * @param ptt  The prune count type ("count" or "percent").
    * @param pt   The prune count threshold.
    * @param ls   The "learning status" node, set by RevisionAnalysis.
    * @param fs   The "features status" node, set by RevisionAnalysis.
    * @param ps   The "prune status" node, set by RevisionAnalysis.
    * @param at   The WEKA attribute string.
    * @param cdv  Value for {@link #checkDiscreteValues}.
   **/
  public LearningClassifierExpression(ClassifierExpression l,
                                      ClassifierExpression ext,
                                      InstanceCreationExpression p,
                                      Expression r,
                                      InstanceCreationExpression a, Name ln,
                                      Block pb, Constant enc,
                                      InstanceCreationExpression tp,
                                      Expression e, Constant k,
                                      LinkedList prms,
                                      FoldParser.SplitPolicy s,
                                      InstanceCreationExpression t,
                                      Constant al, Constant pre, Constant pro,
                                      Constant pct, Constant ptt, Constant pt,
                                      Integer ls, Integer fs, Integer ps,
                                      StringBuffer at, boolean cdv) {
    super(-1, -1);
    labeler = l;
    extractor = ext;
    usingClauses = extractor == null ? 0 : 1;
    parser = p;
    fromClauses = parser == null ? 0 : 1;
    rounds = r;
    learnerConstructor = a;
    learnerName = ln;
    learnerParameterBlock = pb;
    featureEncoding = enc;
    withClauses = learnerConstructor == null && learnerName == null ? 0 : 1;
    testParser = tp;
    testFromClauses = testParser == null ? 0 : 1;
    evaluation = e;
    evaluateClauses = evaluation == null ? 0 : 1;
    K = k;
    parameterSets = prms;
    splitPolicy = s;
    cvalClauses = K == null ? 0 : 1;
    testingMetric = t;
    testingMetricClauses = testingMetric == null ? 0 : 1;
    alpha = al;
    alphaClauses = al == null ? 0 : 1;
    if (alpha == null) alpha = new Constant("" + defaultAlpha);
    preExtract = pre;
    preExtractClauses = preExtract == null ? 0 : 1;
    if (preExtract == null)
      preExtract = new Constant(parser == null ? "false" : defaultPreExtract);
    progressOutput = pro;
    progressOutputClauses = progressOutput == null ? 0 : 1;
    pruneCountType = pct;
    pruneThresholdType = ptt;
    pruneThreshold = pt;
    learningStatus = ls;
    featuresStatus = fs;
    pruneStatus = ps;
    attributeString = at;
    checkDiscreteValues = cdv;
  }

  /**
    * Parser's unsupervised learning constructor.
    *
    * @param cl         A list of clauses.
    * @param line       The line on which the source code represented by this
    *                   node is found.
    * @param byteOffset The byte offset from the beginning of the source file
    *                   at which the source code represented by this node is
    *                   found.
   **/
  public LearningClassifierExpression(LinkedList cl, int line, int byteOffset)
  {
    this(null, cl, line, byteOffset);
  }

  /**
    * Parser's supervised learning constructor.
    *
    * @param l          The expression representing the labeler classifier.
    * @param cl         A list of clauses.
    * @param line       The line on which the source code represented by this
    *                   node is found.
    * @param byteOffset The byte offset from the beginning of the source file
    *                   at which the source code represented by this node is
    *                   found.
   **/
  public LearningClassifierExpression(ClassifierExpression l, LinkedList cl,
                                      int line, int byteOffset) {
    super(line, byteOffset);

    labeler = l;
    extractor = null;
    parser = null;
    learnerConstructor = null;
    checkDiscreteValues = false;
    alpha = new Constant("" + defaultAlpha);
    parameterSets = new LinkedList();

    for (Iterator I = cl.iterator(); I.hasNext(); ) {
      Clause c = (Clause) I.next();

      if (c.type == Clause.USING) {
        extractor = (ClassifierExpression) c.argument;
        ++usingClauses;
      }
      else if (c.type == Clause.FROM) {
        parser = (InstanceCreationExpression) c.argument;
        rounds = c.rounds;
        ++fromClauses;
      }
      else if (c.type == Clause.WITH) {
        if (c.learnerParameterBlock == null)
          learnerConstructor = (InstanceCreationExpression) c.argument;
        else {
          learnerName = (Name) c.argument;
          learnerParameterBlock = c.learnerParameterBlock;
        }

        ++withClauses;
      }
      else if (c.type == Clause.ENCODING) {
        featureEncoding = (Constant) c.argument;
        ++encodingClauses;
      }
      else if (c.type == Clause.TESTFROM) {
        testParser = (InstanceCreationExpression) c.argument;
        ++testFromClauses;
      }
      else if (c.type == Clause.EVALUATE) {
        evaluation = (Expression) c.argument;
        ++evaluateClauses;
      }
      else if (c.type == Clause.CVAL) {
        if (c.argument != null)
          K = (Constant) c.argument;
        else
          // if there was a cval clause, but k was not given, set it to -1 so
          // cross validation gets invoked anyway, this occurs legally in the
          // case of manual separation
          K = new Constant("-1");

        // handle default action
        if (c.splitPolicy != null) splitPolicy = c.splitPolicy;
        else splitPolicy = FoldParser.SplitPolicy.sequential;

        ++cvalClauses;
      }
      else if (c.type == Clause.TESTINGMETRIC) {
        testingMetric = (InstanceCreationExpression) c.argument;
        ++testingMetricClauses;
      }
      else if (c.type == Clause.ALPHA) {
        alpha = (Constant) c.argument;
        ++alphaClauses;
      }
      else if (c.type == Clause.PREEXTRACT) {
        preExtract = (Constant) c.argument;
        ++preExtractClauses;
      }
      else if (c.type == Clause.PROGRESSOUTPUT) {
        progressOutput = (Constant) c.argument;
        ++progressOutputClauses;
      }
      else if (c.type == Clause.PRUNE) {
        pruneCountType = (Constant) c.pruneCountType;
        pruneThresholdType = (Constant) c.pruneThresholdType;
        pruneThreshold = (Constant) c.pruneThreshold;
      }
    }

    if (preExtract == null)
      preExtract = new Constant(parser == null ? "false" : defaultPreExtract);
  }

  /**
    * Returns a hash code value for java hash structures.
    *
    * @return A hash code for this object.
   **/
  public int hashCode() {
    int result = labeler == null ? 0 : labeler.hashCode();
    result += extractor.hashCode();
    if (parser != null) result += parser.hashCode();
    if (rounds != null) result += rounds.hashCode();
    if (learnerConstructor != null) result += learnerConstructor.hashCode();
    if (learnerName != null) result += learnerName.hashCode();
    if (learnerParameterBlock != null)
      result += learnerParameterBlock.hashCode();
    if (featureEncoding != null) result += featureEncoding.hashCode();
    if (testParser != null) result += testParser.hashCode();
    if (evaluation != null) result += evaluation.hashCode();
    if (K != null) result += K.hashCode();
    if (splitPolicy != null) result += splitPolicy.hashCode();
    if (testingMetric != null) result += testingMetric.hashCode();
    result += alpha.hashCode();
    result += preExtract.hashCode();
    if (progressOutput != null) result += progressOutput.hashCode();
    return result;
  }

  /**
    * Indicates whether some other object is "equal to" this one.
    *
    * @return true iff this object is the same as the argument.
   **/
  public boolean equals(Object o) {
    if (!(o instanceof LearningClassifierExpression)) return false;
    LearningClassifierExpression c = (LearningClassifierExpression) o;
    return (labeler == null ? c.labeler == null : labeler.equals(c.labeler))
           && extractor.equals(c.extractor)
           && (parser == null ? c.parser == null : parser.equals(c.parser))
           && (rounds == null ? c.rounds == null : rounds.equals(c.rounds))
           && (learnerConstructor == null
                 ? c.learnerConstructor == null
                 : learnerConstructor.equals(c.learnerConstructor))
           && (learnerName == null ? c.learnerName == null
                                   : learnerName.equals(c.learnerName))
           && (learnerParameterBlock == null
                 ? c.learnerParameterBlock == null
                 : learnerParameterBlock.equals(c.learnerParameterBlock))
           && (featureEncoding == null
                 ? c.featureEncoding == null
                 : featureEncoding.equals(c.featureEncoding))
           && (testParser == null ? c.testParser == null
                                  : testParser.equals(c.testParser))
           && (evaluation == null ? c.evaluation == null
                                  : evaluation.equals(c.evaluation))
           && (K == null ? c.K == null : K.equals(c.K))
           && (splitPolicy == null ? c.splitPolicy == null
                                   : splitPolicy.equals(c.splitPolicy))
           && (testingMetric == null ? c.testingMetric == null
                                     : testingMetric.equals(c.testingMetric))
           && alpha.equals(c.alpha)
           && preExtract.equals(c.preExtract)
           && (progressOutput == null
                 ? c.progressOutput == null
                 : progressOutput.equals(c.progressOutput))
           && (pruneCountType == null
                 ? c.pruneCountType == null
                 : pruneCountType.equals(c.pruneCountType))
           && (pruneThresholdType == null
                 ? c.pruneThresholdType == null
                 : pruneThresholdType.equals(c.pruneThresholdType))
           && (pruneThreshold == null
                 ? c.pruneThreshold == null
                 : pruneThreshold.equals(c.pruneThreshold));
  }

  /**
    * Returns an iterator used to successively access the children of this
    * node.
    *
    * @return An iterator used to successively access the children of this
    *         node.
   **/
  public ASTNodeIterator iterator() {
    LinkedList children = new LinkedList();

    if (labeler != null) children.add(labeler);
    children.add(extractor);
    if (parser != null) children.add(parser);
    if (rounds != null) children.add(rounds);
    if (learnerConstructor != null) children.add(learnerConstructor);
    if (learnerName != null) children.add(learnerName);
    if (learnerParameterBlock != null) children.add(learnerParameterBlock);
    if (featureEncoding != null) children.add(featureEncoding);
    if (testParser != null) children.add(testParser);
    if (evaluation != null) children.add(evaluation);
    if (K != null) children.add(K);
    if (testingMetric != null) children.add(testingMetric);
    children.add(alpha);
    children.add(preExtract);
    if (progressOutput != null) children.add(progressOutput);
    if (pruneCountType != null) children.add(pruneCountType);
    if (pruneThresholdType != null) children.add(pruneThresholdType);
    if (pruneThreshold != null) children.add(pruneThreshold);

    ASTNodeIterator I = new ASTNodeIterator();
    I.children = (ASTNode[]) children.toArray(new ASTNode[children.size()]);
    return I;
  }

  /**
    * Creates a new object with the same primitive data, and recursively
    * creates new member data objects as well.
    *
    * @return The clone node.
   **/
  public Object clone() {
    ClassifierExpression l =
      labeler == null ? null : (ClassifierExpression) labeler.clone();
    ClassifierExpression ext = (ClassifierExpression) extractor.clone();
    InstanceCreationExpression p =
      parser == null ? null : (InstanceCreationExpression) parser.clone();
    Expression r = rounds == null ? null : (Expression) rounds.clone();
    InstanceCreationExpression a =
      learnerConstructor == null
        ? null
        : (InstanceCreationExpression) learnerConstructor.clone();
    Name ln = learnerName == null ? null : (Name) name.clone();
    Block pb =
      learnerParameterBlock == null ? null
                                    : (Block) learnerParameterBlock.clone();
    Constant enc =
      featureEncoding == null ? null : (Constant) featureEncoding.clone();
    InstanceCreationExpression tp =
      testParser == null ? null
                         : (InstanceCreationExpression) testParser.clone();
    Expression e =
      evaluation == null ? null : (Expression) evaluation.clone();
    Constant k = K == null ? null : (Constant) K.clone();
    LinkedList prms = null;
    if (parameterSets != null) {
      prms = new LinkedList();
      for (Iterator I = parameterSets.iterator(); I.hasNext(); )
        prms.add(((ParameterSet) I.next()).clone());
    }
    FoldParser.SplitPolicy s = splitPolicy;
    InstanceCreationExpression t =
      testingMetric == null
      ? null : (InstanceCreationExpression) testingMetric.clone();
    Constant al = (Constant) alpha.clone();
    Constant pre = (Constant) preExtract.clone();
    Constant pro =
      progressOutput == null ? null : (Constant) progressOutput.clone();
    Constant pct =
      pruneCountType == null ? null : (Constant) pruneCountType.clone();
    Constant ptt =
      pruneThresholdType == null ? null
                                 : (Constant) pruneThresholdType.clone();
    Constant pt =
      pruneThreshold == null ? null
                             : (Constant) pruneThreshold.clone();

    return
      new LearningClassifierExpression(
        l, ext, p, r, a, ln, pb, enc, tp, e, k, prms, s, t, al, pre, pro, pct,
        ptt, pt, learningStatus, featuresStatus, pruneStatus,
        new StringBuffer(attributeString.toString()), checkDiscreteValues);
  }

  /**
    * Ensures that the correct run() method is called for this
    * type of node.
    *
    * @param pass The pass whose run() method should be called.
   **/
  public void runPass(Pass pass) { pass.run(this); }

  /**
    * Writes a string representation of this ASTNode to the
    * specified buffer.  The representation written is parsable by the LBJ2
    * compiler, but not very readable.
    *
    * @param buffer The buffer to write to.
   **/
  public void write(StringBuffer buffer) {
    if (parenthesized) buffer.append("(");
    buffer.append("learn");

    if (labeler != null) {
      buffer.append(" ");
      labeler.write(buffer);
    }

    buffer.append(" using ");
    extractor.write(buffer);

    if (parser != null) {
      buffer.append(" from ");
      parser.write(buffer);

      if (rounds != null) {
        buffer.append(" ");
        rounds.write(buffer);
        buffer.append(" rounds");
      }
    }

    if (learnerConstructor != null) {
      buffer.append(" with ");
      learnerConstructor.write(buffer);
    }
    else if (learnerName != null) {
      buffer.append(" with ");
      learnerName.write(buffer);
      learnerParameterBlock.write(buffer);
    }

    if (featureEncoding != null) {
      buffer.append(" encoding ");
      featureEncoding.write(buffer);
    }

    if (evaluation != null) {
      buffer.append(" evaluate ");
      evaluation.write(buffer);
    }

    if (pruneCountType != null) {
      buffer.append(" prune ");
      pruneCountType.write(buffer);
      buffer.append(" ");
      pruneThresholdType.write(buffer);
      buffer.append(" ");
      pruneThreshold.write(buffer);
    }

    if (K != null) {
      buffer.append(" cval ");

      if (splitPolicy != FoldParser.SplitPolicy.manual) {
        K.write(buffer);
        buffer.append(" ");
      }

      buffer.append("\"" + splitPolicy + "\"");

      buffer.append(" alpha ");
      alpha.write(buffer);
    }

    if (testingMetric != null) {
      buffer.append(" testingMetric ");
      testingMetric.write(buffer);
    }

    if (testParser != null) {
      buffer.append(" testFrom ");
      testParser.write(buffer);
    }

    buffer.append(" preExtract ");
    preExtract.write(buffer);

    if (progressOutput != null) {
      buffer.append(" progressOutput ");
      progressOutput.write(buffer);
    }

    buffer.append(" end");
    if (parenthesized) buffer.append(")");
  }

  /**
    * Creates a StringBuffer containing a shallow representation
    * of this ASTNode.
    *
    * @return A StringBuffer containing a shallow text
    *         representation of the given node.
   **/
  public StringBuffer shallow() {
    StringBuffer buffer = new StringBuffer();
    if (comment != null) {
      buffer.append(comment);
      buffer.append(" ");
    }

    returnType.write(buffer);
    buffer.append(" ");
    name.write(buffer);
    buffer.append("(");
    argument.write(buffer);
    buffer.append(") ");

    if (singleExampleCache) buffer.append("cached ");

    if (cacheIn != null) {
      buffer.append("cachedin");

      if (cacheIn.toString().equals(ClassifierAssignment.mapCache))
        buffer.append("map");
      else {
        buffer.append(" ");
        cacheIn.write(buffer);
      }

      buffer.append(' ');
    }

    buffer.append("<- learn");

    if (labeler != null) buffer.append(" " + labeler.name);
    buffer.append(" using " + extractor.name);

    if (parser != null) {
      buffer.append(" from ");
      parser.write(buffer);

      if (rounds != null) {
        buffer.append(" ");
        rounds.write(buffer);
        buffer.append(" rounds");
      }
    }

    if (learnerConstructor != null) {
      buffer.append(" with ");
      learnerConstructor.write(buffer);
    }
    else if (learnerName != null) {
      buffer.append(" with ");
      learnerName.write(buffer);
      learnerParameterBlock.write(buffer);
    }

    if (featureEncoding != null) {
      buffer.append(" encoding ");
      featureEncoding.write(buffer);
    }

    if (evaluation != null) {
      buffer.append(" evaluate ");
      evaluation.write(buffer);
    }

    if (pruneCountType != null) {
      buffer.append(" prune ");
      pruneCountType.write(buffer);
      buffer.append(" ");
      pruneThresholdType.write(buffer);
      buffer.append(" ");
      pruneThreshold.write(buffer);
    }

    if (K != null) {
      buffer.append(" cval ");

      if (splitPolicy != FoldParser.SplitPolicy.manual) {
        K.write(buffer);
        buffer.append(" ");
      }

      buffer.append("\"" + splitPolicy + "\"");

      buffer.append(" alpha ");
      alpha.write(buffer);
    }

    if (testingMetric != null) {
      buffer.append(" testingMetric ");
      testingMetric.write(buffer);
    }

    if (testParser != null) {
      buffer.append(" testFrom ");
      testParser.write(buffer);
    }

    buffer.append(" preExtract ");
    preExtract.write(buffer);

    if (progressOutput != null) {
      buffer.append(" progressOutput ");
      progressOutput.write(buffer);
    }

    buffer.append(" end");
    return buffer;
  }

  /**
    * This class represents a clause in a
    * {@link LearningClassifierExpression}.  Note that this class is not an
    * {@link ASTNode} since it is only an intermediary used during parsing.
    *
    * @author Nick Rizzolo
  **/
  public static class Clause
  {
    /** Value of the type variable. */
    public static final int USING = 0;
    /** Value of the type variable. */
    public static final int FROM = 1;
    /** Value of the type variable. */
    public static final int WITH = 2;
    /** Value of the type variable. */
    public static final int TESTFROM = 3;
    /** Value of the type variable. */
    public static final int EVALUATE = 4;
    /** Value of the type variable. */
    public static final int CVAL = 5;
    /** Value of the type variable */
    public static final int PREEXTRACT = 6;
    /** Value of the type variable */
    public static final int PROGRESSOUTPUT = 7;
    /** Value of the type variable */
    public static final int TESTINGMETRIC = 8;
    /** Value of the type variable */
    public static final int ALPHA = 9;
    /** Value of the type variable */
    public static final int PRUNE = 10;
    /** Value of the type variable */
    public static final int ENCODING = 11;
    /** String representations of the type names. */
    public static final String[] typeNames =
      {
        "using", "from", "with", "testFrom", "evaluate", "cval", "preExtract",
        "progressOutput", "testingMetric", "alpha", "prune", "encoding"
      };

    /** The type of the clause. */
    public int type;
    /** The argument of the clause. */
    public ASTNode argument;
    /**
      * Represents the number training repetitions; used only by the
      * from clause.
     **/
    public Expression rounds;
    /**
      * A block of statements intended to be used to set learner parameters;
      * used only by the with clause.
     **/
    public Block learnerParameterBlock;
    /**
      * Dictates how cross-validation divides the training data; used only by
      * the cval clause.
     **/
    public Constant K;
    /** Whether to use "global" or "perClass" feature pruning. */
    public Constant pruneCountType;
    /** Whether to use "count" or "percent" counting for feature pruning. */
    public Constant pruneThresholdType;
    /** The feature pruning threshold. */
    public Constant pruneThreshold;
    /**
      * Dictates how the training data will be split into subsets for use by
      * cross validation.
     **/
    public FoldParser.SplitPolicy splitPolicy;
    /**
      * Determines the parameter with which the confidence interval is
      * calculated.  Takes the value .05 if the user does not specify
      * otherwise.
     **/
    public Constant alpha;
    /**
      * Determines how often to give the user status output during training.
     **/
    public Constant progressOutput;

    /**
      * Initializing constructor.
      *
      * @param t  The type.
      * @param a  The argument node.
    **/
    public Clause(int t, ASTNode a) { this(t, a, (Constant) null); }

    /**
      * Full constructor.
      *
      * @param t  The type.
      * @param a  The argument node.
      * @param r  Could represent the number of training repetitions or the
      *           split policy.
    **/
    public Clause(int t, ASTNode a, Expression r) {
      type = t;

      if (t == CVAL) {
        argument = a;

        if (r == null) splitPolicy = FoldParser.SplitPolicy.sequential;
        else {
          if (r instanceof Constant) {
            String s = ((Constant) r).value;
            if (s.startsWith("\"") && s.endsWith("\"") && s.length() >= 2)
              s = s.substring(1, s.length() - 1);

            if (s.equals("random"))
              splitPolicy = FoldParser.SplitPolicy.random;
            else if (s.equals("sequential"))
              splitPolicy = FoldParser.SplitPolicy.sequential;
            else if (s.equals("kth"))
              splitPolicy = FoldParser.SplitPolicy.kth;
            else if (s.equals("manual"))
              splitPolicy = FoldParser.SplitPolicy.manual;
            else {
              System.err.println("Error: '" + s + "' is not a split policy.");
              System.exit(1);
            }
          }
        }
      }
      else {
        argument = a;
        rounds = r;
      }
    }

    /**
      * A constructor with 3 Constant parameters, used for the
      * prune clause.
      *
      * @param t  The type.
      * @param x  The first parameter.
      * @param y  The second parameter.
      * @param z  The third parameter.
    **/
    public Clause(int t, Constant x, Constant y, Constant z) {
      type = t;

      if (t == PRUNE) {
        pruneCountType = x;
        pruneThresholdType = y;
        pruneThreshold = z;
      }
    }

    /**
      * A constructor for a with clause with a parameter setting block.
      *
      * @param t  The type.
      * @param n  The name of the learner used by this learning classifier.
      * @param b  The parameter setting block.
     **/
    public Clause(int t, Name n, Block b) {
      type = t;
      argument = n;
      learnerParameterBlock = b;
    }

    /**
      * This constructor is only called by {@link #clone()}.
      *
      * @param t    The type of the clause.
      * @param a    The argument of the clause.
      * @param r    Represents the number of training repetitions.
      * @param b    A block of statements that set parameters of a learning
      *             algorithm.
      * @param k    The number of folds for cross validation.
      * @param s    The data splitting policy for cross validation.
      * @param al   The width of the confidence interval for cross validation
      *             output.
      * @param p    The frequency in examples of progress updates.
      * @param pct  The type of pruning.
      * @param ptt  The type of feature counting for pruning.
      * @param pt   The pruning threshold.
     **/
    protected Clause(int t, ASTNode a, Expression r, Block b, Constant k,
                     FoldParser.SplitPolicy s, Constant al, Constant p,
                     Constant pct, Constant ptt, Constant pt) {
      type = t;
      argument = a;
      rounds = r;
      learnerParameterBlock = b;
      K = k;
      splitPolicy = s;
      alpha = al;
      progressOutput = p;
      pruneCountType = pct;
      pruneThresholdType = ptt;
      pruneThreshold = pt;
    }

    /**
      * Creates a new object with the same primitive data, and recursively
      * creates new member data objects as well.
      *
      * @return The clone node.
    **/
    public Object clone() {
      ASTNode a = argument == null ? null : (ASTNode) argument.clone();
      Expression r = rounds == null ? null : (Expression) rounds.clone();
      Block b =
        learnerParameterBlock == null ? null
                                      : (Block) learnerParameterBlock.clone();
      Constant k = K == null ? null : (Constant) K.clone();
      Constant al = alpha == null ? null : (Constant) alpha.clone();
      Constant p =
        progressOutput == null ? null : (Constant) progressOutput.clone();
      Constant pct =
        pruneCountType == null ? null : (Constant) pruneCountType.clone();
      Constant ptt =
        pruneThresholdType == null ? null
                                   : (Constant) pruneThresholdType.clone();
      Constant pt =
        pruneThreshold == null ? null : (Constant) pruneThreshold.clone();
      return new Clause(type, a, r, b, k, splitPolicy, al, p, pct, ptt, pt);
    }

    /**
      * Debugging utility method.
      *
      * @return A textual representation of this expression.
    **/
    public String toString() { return typeNames[type] + " " + argument; }
  }
}


text:
Framework "4.6.1"

#required parameters:
#$major_ver
#$minor_ver
#$build_counter
#$build_vcs_number

properties {
    $project = "TeamCityApi"

    $companyName = "Computer Workware Inc."
    $productName = "VITAL Objects"
    $date = [DateTime]::Now
    $global:config = "release"

    #version
    $buildVer = [string]::Format("{0}{1:00}{2:00}",$date.Year-$initial_year,$date.Month,$date.Day)
    $revisionVer = if ($build_counter) { $build_counter  } else { "0" }
    $voVersion = "$major_ver.$minor_ver.0.0"
    $fileVersion = "$major_ver.$minor_ver.$buildVer.$revisionVer"
    $assemblyVersion = $voVersion
    $visualStudioVersion = "15.0"

    #general dirs
    $base_dir = resolve-path .
    $build_dir = "$base_dir\build"
    $source_dir = "$base_dir\src"
    $tools_dir = "$base_dir\tools"
    $test_dir = "$build_dir\test"
    $result_dir = "$build_dir\results"
    $pubsites_dir = "$build_dir\_PublishedWebsites"
    $webapp_dir = "$pubsites_dir\$project"
}

task default -depends compile, dist
task local -depends compile, test
task full -depends local, dist
task ci -depends clean, release, commonAssemblyInfo, local

task clean {
	delete_directory "$build_dir"
}

task restore_packages {
    exec { nuget restore $source_dir\$project.sln }
}

task release {
    $global:config = "release"
}

task compile -depends clean, restore_packages {
    exec { msbuild /t:Clean /t:Build /tv:$visualStudioVersion /p:VisualStudioVersion=$visualStudioVersion /p:Configuration=$config /p:OutDir=$build_dir /p:TeamCityApiPath="$build_dir\" $source_dir\$project.sln }
    if ( -not (Test-Path "$source_dir\TeamCityApi\bin\Debug\"))
    {
        New-Item -ItemType directory -Path "$source_dir\TeamCityApi\bin\Debug\"
    }
    cp "$build_dir\TeamCityApi.dll" "$source_dir\TeamCityApi\bin\Debug\TeamCityApi.dll"
}

task commonAssemblyInfo {
    create-assemblyInfo $fileVersion $assemblyVersion "$source_dir\CommonAssemblyInfo.cs"
}

task test {
    create_directory "$build_dir\results"

    @(get-childitem $build_dir -recurse -include *tests.dll) | `
    Foreach-Object{
        Write-Host $tools_dir\xunit\xunit.console.clr4.exe $_.FullName /teamcity
        exec { & $tools_dir\xunit\xunit.console.clr4.exe $_.FullName /teamcity }
    }
}

# -------------------------------------------------------------------------------------------------------------
# generalized functions
# --------------------------------------------------------------------------------------------------------------
function global:delete_directory($directory_name)
{
  rd $directory_name -recurse -force  -ErrorAction SilentlyContinue | out-null
}

function global:create_directory($directory_name)
{
  mkdir $directory_name  -ErrorAction SilentlyContinue  | out-null
}

function global:create-assemblyInfo($fver, $aver, $filename)
{
"using System;
using System.Reflection;
using System.Runtime.InteropServices;

// **** IMPORTANT ****
// During the build process on the CI Server, this file will be regenerated.
// The information in the file is still valid for local builds as the file will not be regenerated locally.

[assembly: AssemblyConfiguration("""")]
[assembly: AssemblyCompany(""Computer Workware Inc."")]
[assembly: AssemblyCopyright(""Copyright Computer Workware Inc. "+[DateTime]::Now.Year+""")]
[assembly: AssemblyTrademark("""")]
[assembly: AssemblyCulture("""")]
[assembly: AssemblyVersion(""$aver"")]
[assembly: AssemblyTitle(""Vcs: $build_vcs_number"")]
[assembly: AssemblyInformationalVersion(""$fver"")]
[assembly: AssemblyFileVersion(""$fver"")]"  | out-file $filename -encoding "ASCII"

}