text:
<!DOCTYPE html>
<html lang="en">

  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="TODO">

    <title>Recommend - Discover new music like never before.</title>

    <link rel="stylesheet" href="components/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="components/font-awesome/css/font-awesome.min.css">
  </head>

  <body ng-app="app">
    <link rel="stylesheet" ng-href="{{$state.current.data.css}}">
    <base href="/">

    <div ui-view></div>

    <script src="components/jquery/dist/jquery.min.js"                          type="text/javascript"></script>
    <script src="components/angular/angular.min.js"                             type="text/javascript"></script>
    <script src="components/angular-cookies/angular-cookies.min.js"             type="text/javascript"></script>
    <script src="components/angular-ui-router/release/angular-ui-router.min.js" type="text/javascript"></script>
    <script src="components/bootstrap/dist/js/bootstrap.min.js"                 type="text/javascript"></script>

    <script src="js/app.js"                       type="text/javascript"></script>
    <script src="js/controllers.js"               type="text/javascript"></script>
    <script src="js/services.js"                  type="text/javascript"></script>
    <script src="js/directives.js"                type="text/javascript"></script>
  </body>

</html>


text:
using System;
using Microsoft.Xna.Framework;

namespace MonoCollisionFramework
{
    public interface IContact
    {
        bool ContactMade(ITriangleSelector selector, Triangle triangle, Vector3 iPoint, int edge);
    }
}

redpajama_set_name: RedPajamaGithub


text:
The original MapReduce framework was designed and developed by Google to support large-scale distributed computing on large amounts of closely-networked computers.  The main drive for the MapReduce framework stem from the intrinsic benefits of functional programming, more specifically the map() and reduce() functions.

There are 3 main steps in a MapReduce run.

 1. Map step: data received by the worker is tossed into a map() function that will emit key-value pairs based on each aliquot of data.

 2. Partition (or shuffle) step: The generated key-value pairs from map() are hashed by its key to a particular worked and sent off.  If a key ends up on a particular work at the end of the partition phase, it is required that all other key-value pairs with the same key also be on the same host in order for the reduce step to work properly.

 3. Reduce step: The collected key-value pairs are collected into a key, value_1, value_2, ..., value_n list and can do computation to reduce the expanded data down to a useful conclusion.

This computation can be performed on an arbitrary number of worker machines, making it scalable to nearly all sizes of computing clusters!  MapReduce frameworks often have a primary node delegating tasks to workers, organizing and distributing the initial data, and acting as a mediator in fault situations.

More detail on the use of MapReduce is available from [Google's 2004 OSDI paper](http://research.google.com/archive/mapreduce-osdi04.pdf) or an open-source implementation of MapReduce in Java: [Hadoop](http://hadoop.apache.org/core/).

-----
**These assignments are a work-in-progress, please e-mail our developer list for more information! **

## Stage 1: A simple implementation of MapReduce

To start out, students will make the base framework of a MapReduce application: a primary node that delegates a task to its workers (also called peers), and a single peer that takes the data given to it by the primary, performs a map pass and a reduce pass on the data, and eventually passes that data back to the primary for post-processing.  This assignment will require the need to implement a simple message-passing protocol, and abstract the functionality of the map() and reduce() methods.

Sample Assignment: [wiki:EducationalAssignments/SimpleMapReduce Simple MapReduce Assignment]

## Stage 2: Adding partitioning and support for multiple worker nodes

In the second stage of the project, students will work to increase the number of peers their system supports and will implement the partitioning algorithm to enable map data-passing between the MapReduce peers during the shuffle phase. By implementing the partitioning method, the primary invariant of MapReduce must be maintained at all times: all keys, no matter what their origin node, must be sent to the same reducer during the reducing stage. By adding the partition algorithm to the peers simple parallelism is achieved in this assignment.

## Stage 3: Adding fault tolerance

In large distributed systems failures are common and recovering from failures is a basic necessity. In the final stage of the project students will add fault-tolerance to their systems. The primary node will implement a scoreboard to track all system state by using a regular heartbeat mechanism to query each peer and will perform an action whenever it detects that a job is failing to complete or that connectivity between peers is lost. An action by the primary might be to allocate a new peer to an existing job, or to perform a restart of a job that failed beyond recovery. To accomplish this, students must implement a control protocol that the primary can use to communicate changes to the MapReduce job to the peers whenever failures occur. Additionally, students will implement a distributed failure detector in which the peers will communicate with each other to detect node failures and report these failures to the primary.

[[Image(stage3.PNG)]]

**Figure 1:** Example MapReduce implementation on Repy, showing both control and data flow.


text:
package doormen

import (
	"encoding/json"
	"math/big"
	"testing"

	client "github.com/didiercrunch/doorman/shared"
	"github.com/didiercrunch/doormanserver/shared"
	"gopkg.in/mgo.v2/bson"
)

var zero = big.NewRat(0, 1)

const epsilon float64 = 0.0001

func TestNewDoormanDefinition(t *testing.T) {
	dmd := NewDoormanDefinition("some_name")
	if dmd.Id == "" {
		t.Error("need id at all time")
	}
	if dmd.Name != "some_name" {
		t.Error("bad name")
	}
}

func TestValidate(t *testing.T) {
	dmd := &DoormanDefinition{Name: ""}
	if err := dmd.Validate("bob"); err.Error() != "name cannot be empty" {
		t.Error(err)
	}
	dmd = &DoormanDefinition{Name: "foo"}
	if err := dmd.Validate("bob"); err.Error() != "need at least 2 values" {
		t.Error(err)
	}
	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{nil}}
	if err := dmd.Validate("bob"); err.Error() != "need at least 2 values" {
		t.Error(err)
	}

	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", zero}, &DoormanValue{"foo", zero}}}
	if err := dmd.Validate("bob"); err.Error() != "doorman value names must be unique within a doorman" {
		t.Error(err)
	}

	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", zero}, &DoormanValue{"", zero}}}
	if err := dmd.Validate("bob"); err.Error() != "doorman value cannot be empty" {
		t.Error(err)
	}

	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", big.NewRat(-1, 4)}, &DoormanValue{"bar", big.NewRat(1, 2)}}}
	if err := dmd.Validate("bob"); err.Error() != "doorman value -1/4 is out of range" {
		t.Error(err)
	}

	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", big.NewRat(5, 2)}, &DoormanValue{"bar", big.NewRat(1, 2)}}}
	if err := dmd.Validate("bob"); err.Error() != "doorman value 5/2 is out of range" {
		t.Error(err)
	}

	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", big.NewRat(3, 4)}, &DoormanValue{"bar", big.NewRat(1, 2)}}}
	if err := dmd.Validate("bob"); err.Error() != "the sum of the probability must be 1" {
		t.Error(err)
	}

	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", big.NewRat(1, 5)}, &DoormanValue{"bar", big.NewRat(1, 5)}}}
	if err := dmd.Validate("bob"); err.Error() != "the sum of the probability must be 1" {
		t.Error(err)
	}
	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", big.NewRat(4, 5)}, &DoormanValue{"bar", big.NewRat(1, 5)}}}
	if err := dmd.Validate("bob"); err.Error() != "A doorman needs at least one owner specify as 'email'." {
		t.Error(err)
	}
	dmd = &DoormanDefinition{Name: "foo", Values: []*DoormanValue{&DoormanValue{"foo", big.NewRat(4, 5)}, &DoormanValue{"bar", big.NewRat(1, 5)}}, OwnerEmails: []string{"alice"}}
	if err := dmd.Validate("bob"); err.Error() != "'bob' is not allow to edit this doorman." {
		t.Error(err)
	}
}

func TestAsJson(t *testing.T) {
	id := &DoormanId{}
	if `{}` != id.AsJson() {
		t.Fail()
	}
	id.Name = "bob"
	if `{}` != id.AsJson() {
		t.Fail()
	}

	id.Id = bson.ObjectIdHex("54af464af6fb5e20c4000003")
	if `{"54af464af6fb5e20c4000003":"bob"}` != id.AsJson() {
		t.Error(id.AsJson())
	}
}

func TestAsDoormanUpdatePayload(t *testing.T) {
	wd := &DoormanDefinition{}
	wd.Id = bson.NewObjectId()
	wd.Values = []*DoormanValue{&DoormanValue{"C", big.NewRat(1, 4)}, &DoormanValue{"T1", big.NewRat(3, 4)}}
	data, err := wd.AsDoormanUpdatePayload()
	if err != nil {
		t.Error(err)
		return
	}
	wu := &client.DoormanUpdater{}
	if err := json.Unmarshal(data, wu); err != nil {
		t.Error(err)
	}
	if shared.ObjectIdToPublicId(wd.Id) != wu.Id {
		t.Error("bad id", wu.Id)
	}
	if len(wu.Probabilities) != 2 {
		t.Error("bad probability length")
	} else if wu.Probabilities[0].Cmp(big.NewRat(1, 4)) != 0 {
		t.Error("bad first probability")
	} else if wu.Probabilities[1].Cmp(big.NewRat(3, 4)) != 0 {
		t.Error("bad second probability")
	} else if wu.Timestamp == 0 {
		t.Error("no time specify")
	} else if wu.Timestamp < 1421537442 {
		t.Error("timestamp looks weird")
	}
}

func TestQuickNewDoormanDefinition(t *testing.T) {
	dmd := QuickNewDoormanDefinition("foo", "0.75", "0.25")
	if dmd.Name != "foo" {
		t.Error()
	}

	if len(dmd.Values) != 2 {
		t.Error()
	}

	if dmd.Values[0].Name != "T0" || dmd.Values[0].Probability.Cmp(big.NewRat(3, 4)) != 0 {
		t.Error()
	}

	if dmd.Values[1].Name != "T1" || dmd.Values[1].Probability.Cmp(big.NewRat(1, 4)) != 0 {
		t.Error()
	}
	if len(dmd.OwnerEmails) != 1 && dmd.OwnerEmails[0] != "natasha@bigtits.com" {
		t.Error()
	}
}

func TestAsWriteAccess(t *testing.T) {
	dmd := &DoormanDefinition{OwnerEmails: []string{"natasha@bigtits.com"}}
	testCases := map[string]bool{
		"natasha@bigtits.com": true,
		"natasha@bigtis.net":  false,
	}
	for email, hasAccess := range testCases {
		if hasAccess != dmd.AsWriteAccess(email) {
			t.Error(email)
		}
	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://www.knime.org/2008/09/XMLConfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.knime.org/2008/09/XMLConfig http://www.knime.org/XMLConfig_2008_09.xsd" key="settings.xml">
<entry key="node_file" type="xstring" value="settings.xml"/>
<config key="flow_stack"/>
<config key="internal_node_subsettings">
<entry key="memory_policy" type="xstring" value="CacheSmallInMemory"/>
</config>
<config key="model">
<config key="columnConfig_G-rich loop rotation">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Back pocket">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Chain">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_RMSD2">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_RMSD1">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Quality score">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-II-in">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Missing residues">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Ligand">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Kinase ID">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-II-A-in">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-V">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Gate area">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-IV">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Pocket sequence">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_PDB">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-II-B">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_G-rich loop angle">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Allosteric ligand">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Species">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Alternate model">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-I-A">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-I-B">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_G-rich loop distance">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-II-B-in">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_FP-I">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-II-out">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_DFG conformation">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Front pocket">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_αC-helix conformation">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Missing atoms">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Kinase">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_BP-III">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_FP-II">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Structure ID">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<config key="columnConfig_Resolution">
<entry key="checkerFactory" type="xstring" value="org.knime.testing.internal.diffcheckers.EqualityChecker$Factory"/>
<config key="internals">
<config key="ignoreColumnProperties_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreColumnProperties" type="xboolean" value="false"/>
<config key="ignoreDomain_Internals">
<entry key="SettingsModelID" type="xstring" value="SMID_boolean"/>
<entry key="EnabledStatus" type="xboolean" value="true"/>
</config>
<entry key="ignoreDomain" type="xboolean" value="true"/>
</config>
</config>
<entry key="ignoreRowIds" type="xboolean" value="false"/>
</config>
<entry key="customDescription" type="xstring" isnull="true" value=""/>
<entry key="state" type="xstring" value="IDLE"/>
<entry key="factory" type="xstring" value="org.knime.testing.internal.nodes.differ.DifferenceCheckerNodeFactory"/>
<entry key="node-name" type="xstring" value="Table Difference Checker"/>
<entry key="node-bundle-name" type="xstring" value="Test-Node extension for KNIME Workbench"/>
<entry key="node-bundle-symbolic-name" type="xstring" value="org.knime.testing"/>
<entry key="node-bundle-vendor" type="xstring" value="KNIME AG, Zurich, Switzerland"/>
<entry key="node-bundle-version" type="xstring" value="3.7.0.v201811021340"/>
<entry key="node-feature-name" type="xstring" value="KNIME Testing Framework"/>
<entry key="node-feature-symbolic-name" type="xstring" value="org.knime.features.testingapplication.feature.group"/>
<entry key="node-feature-vendor" type="xstring" value="KNIME AG, Zurich, Switzerland"/>
<entry key="node-feature-version" type="xstring" value="3.7.0.v201811021340"/>
<config key="factory_settings"/>
<entry key="name" type="xstring" value="Table Difference Checker"/>
<entry key="hasContent" type="xboolean" value="false"/>
<entry key="isInactive" type="xboolean" value="false"/>
<config key="ports"/>
<config key="filestores">
<entry key="file_store_location" type="xstring" isnull="true" value=""/>
<entry key="file_store_id" type="xstring" isnull="true" value=""/>
</config>
</config>


text:
<?php

namespace casamunoz\empresaBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Servicio
 *
 * @ORM\Table(name="servicio")
 * @ORM\Entity
 */
class Servicio
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="SEQUENCE")
     * @ORM\SequenceGenerator(sequenceName="servicio_id_seq", allocationSize=1, initialValue=1)
     */
    private $id;

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

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

    /**
     * @var string
     *
     * @ORM\Column(name="costo_servicio", type="decimal", precision=8, scale=2, nullable=false)
     */
    private $costoServicio;

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

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

    /**
     * Set nombreServicio
     *
     * @param string $nombreServicio
     * @return Servicio
     */
    public function setNombreServicio($nombreServicio)
    {
        $this->nombreServicio = $nombreServicio;

        return $this;
    }

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

    /**
     * Set tiempoServicio
     *
     * @param string $tiempoServicio
     * @return Servicio
     */
    public function setTiempoServicio($tiempoServicio)
    {
        $this->tiempoServicio = $tiempoServicio;

        return $this;
    }

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

    /**
     * Set costoServicio
     *
     * @param string $costoServicio
     * @return Servicio
     */
    public function setCostoServicio($costoServicio)
    {
        $this->costoServicio = $costoServicio;

        return $this;
    }

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

    /**
     * Set descripcionServicio
     *
     * @param string $descripcionServicio
     * @return Servicio
     */
    public function setDescripcionServicio($descripcionServicio)
    {
        $this->descripcionServicio = $descripcionServicio;

        return $this;
    }

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


text:
from core.himesis import Himesis
import uuid

class HFather2Man(Himesis):
    def __init__(self):

        """
        Creates the himesis graph representing the DSLTrans rule Father2Man.
        """
        # Flag this instance as compiled now
        self.is_compiled = True

        super(HFather2Man, self).__init__(name='HFather2Man', num_nodes=0, edges=[])

        # Set the graph attributes
        self["mm__"] = ['HimesisMM']

        self["name"] = """Father2Man"""
        self["GUID__"] = uuid.uuid3(uuid.NAMESPACE_DNS,'Father2Man')

        # match model. We only support one match model
        self.add_node()
        self.vs[0]["mm__"] = """MatchModel"""

        # apply model node
        self.add_node()
        self.vs[1]["mm__"] = """ApplyModel"""

        # paired with relation between match and apply models
        self.add_node()
        self.vs[2]["mm__"] = """paired_with"""

        # match class Parent() node
        self.add_node()

        self.vs[3]["mm__"] = """Parent"""
        self.vs[3]["attr1"] = """+"""
        # match_contains node for class Parent()
        self.add_node()
        self.vs[4]["mm__"] = """match_contains"""
        # match class Family() node
        self.add_node()

        self.vs[5]["mm__"] = """Family"""
        self.vs[5]["attr1"] = """1"""
        # match_contains node for class Family()
        self.add_node()
        self.vs[6]["mm__"] = """match_contains"""

        # apply class Man() node
        self.add_node()

        self.vs[7]["mm__"] = """Man"""
        self.vs[7]["attr1"] = """1"""
        # apply_contains node for class Man()
        self.add_node()
        self.vs[8]["mm__"] = """apply_contains"""

        # match association Parent--family-->Family node
        self.add_node()
        self.vs[9]["attr1"] = """family"""
        self.vs[9]["mm__"] = """directLink_S"""
        # match association Family--fathers-->Parent node
        self.add_node()
        self.vs[10]["attr1"] = """fathers"""
        self.vs[10]["mm__"] = """directLink_S"""

        # Add the edges
        self.add_edges([
                (0,4), # matchmodel -> match_contains
                (4,3), # match_contains -> match_class Parent()
                (0,6), # matchmodel -> match_contains
                (6,5), # match_contains -> match_class Family()
                (1,8), # applymodel -> apply_contains
                (8,7), # apply_contains -> apply_class Man()
                (3,9), # match_class Parent() -> association family
                (9,5), # association family  -> match_class Family()
                (5,10), # match_class Family() -> association fathers
                (10,3), # association fathers  -> match_class Parent()
                (0,2), # matchmodel -> pairedwith
                (2,1) # pairedwith -> applyModel
		])

        # Add the attribute equations
        self["equations"] = [((7,'fullName'),('concat',((3,'firstName'),(5,'lastName')))), ((7,'ApplyAttribute'),('constant','solveRef')), ]


text:
package org.simpleflatmapper.reflect.impl;

import org.simpleflatmapper.reflect.BiInstantiator;
import org.simpleflatmapper.reflect.InstantiatorDefinition;
import org.simpleflatmapper.reflect.Parameter;
import org.simpleflatmapper.reflect.instantiator.ExecutableInstantiatorDefinition;
import org.simpleflatmapper.util.BiFunction;
import org.simpleflatmapper.util.ErrorHelper;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;

public final class InjectConstructorBiInstantiator<S1, S2, T> implements BiInstantiator<S1, S2, T> {

	private final Constructor<? extends T> constructor;
	private final BiArgumentBuilder<S1, S2> argBuilder;
	private final InstantiatorDefinition instantiatorDefinition;

	@SuppressWarnings("unchecked")
	public InjectConstructorBiInstantiator(ExecutableInstantiatorDefinition instantiatorDefinition, Map<Parameter, BiFunction<? super S1, ? super S2, ?>> injections) {
		this.argBuilder = new BiArgumentBuilder<S1, S2>(instantiatorDefinition, injections);
		this.constructor = (Constructor<? extends T>) instantiatorDefinition.getExecutable();
		this.instantiatorDefinition = instantiatorDefinition;
	}

	@Override
	public T newInstance(S1 s1, S2 s2) throws Exception {
		try {
			Object[] args = argBuilder.build(s1, s2);
			return constructor.newInstance(args);
		} catch(InvocationTargetException e) {
			return ErrorHelper.rethrow(e.getCause());
		}
	}

    @Override
    public String toString() {
        return "InjectConstructorBiInstantiator{" +
                "instantiatorDefinition=" + instantiatorDefinition +
                '}';
    }
}


text:
package org.apache.flink.quickstart

/**
 * Created by nirmalya on 13/12/15.
 */
case class IncomingDataUnit (
                              sensorUUID: String, radiationLevel: Int,photoSensor: Float,
                              humidity: Float,timeStamp: Long, ambientTemperature: Float)
  extends Serializable {

  /*SCHEMA (found here: https://www.pubnub.com/developers/data-streams/sensor-network)
  { "timestamp": 1447852019,"ambient_temperature": 19.46,"photosensor": 778.44,"radiation_level": 202,"sensor_uuid": "probe-ab73311f","humidity": 80.0990}
  */
}


text:
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { identity } from '../util/identity';
import { SchedulerAction, SchedulerLike } from '../types';
import { isScheduler } from '../util/isScheduler';

export type ConditionFunc<S> = (state: S) => boolean;
export type IterateFunc<S> = (state: S) => S;
export type ResultFunc<S, T> = (state: S) => T;

interface SchedulerState<T, S> {
  needIterate?: boolean;
  state: S;
  subscriber: Subscriber<T>;
  condition?: ConditionFunc<S>;
  iterate: IterateFunc<S>;
  resultSelector: ResultFunc<S, T>;
}

export interface GenerateBaseOptions<S> {
  /**
   * Initial state.
   */
  initialState: S;
  /**
   * Condition function that accepts state and returns boolean.
   * When it returns false, the generator stops.
   * If not specified, a generator never stops.
   */
  condition?: ConditionFunc<S>;
  /**
   * Iterate function that accepts state and returns new state.
   */
  iterate: IterateFunc<S>;
  /**
   * SchedulerLike to use for generation process.
   * By default, a generator starts immediately.
   */
  scheduler?: SchedulerLike;
}

export interface GenerateOptions<T, S> extends GenerateBaseOptions<S> {
  /**
   * Result selection function that accepts state and returns a value to emit.
   */
  resultSelector: ResultFunc<S, T>;
}

/**
 * Generates an observable sequence by running a state-driven loop
 * producing the sequence's elements, using the specified scheduler
 * to send out observer messages.
 *
 *
 *
 * @example
Produces sequence of 0, 1, 2, ... 9, then completes.

 * var res = Rx.Observable.generate(0, x => x < 10, x => x + 1, x => x);
 *
 * @example
Using asap scheduler, produces sequence of 2, 3, 5, then completes.

 * var res = Rx.Observable.generate(1, x => x < 5, x =>  * 2, x => x + 1, Rx.Scheduler.asap);
 *
 * @see {@link from}
 * @see {@link create}
 *
 * @param {S} initialState Initial state.
 * @param {function (state: S): boolean} condition Condition to terminate generation (upon returning false).
 * @param {function (state: S): S} iterate Iteration step function.
 * @param {function (state: S): T} resultSelector Selector function for results produced in the sequence.
 * @param {Scheduler} [scheduler] A {@link SchedulerLike} on which to run the generator loop. If not provided, defaults to emit immediately.
 * @returns {Observable<T>} The generated sequence.
 */
  export function generate<T, S>(initialState: S,
                                 condition: ConditionFunc<S>,
                                 iterate: IterateFunc<S>,
                                 resultSelector: ResultFunc<S, T>,
                                 scheduler?: SchedulerLike): Observable<T>;

/**
 * Generates an observable sequence by running a state-driven loop
 * producing the sequence's elements, using the specified scheduler
 * to send out observer messages.
 * The overload uses state as an emitted value.
 *
 *
 *
 * @example
Produces sequence of 0, 1, 2, ... 9, then completes.

 * var res = Rx.Observable.generate(0, x => x < 10, x => x + 1);
 *
 * @example
Using asap scheduler, produces sequence of 1, 2, 4, then completes.

 * var res = Rx.Observable.generate(1, x => x < 5, x => x  * 2, Rx.Scheduler.asap);
 *
 * @see {@link from}
 * @see {@link create}
 *
 * @param {S} initialState Initial state.
 * @param {function (state: S): boolean} condition Condition to terminate generation (upon returning false).
 * @param {function (state: S): S} iterate Iteration step function.
 * @param {Scheduler} [scheduler] A {@link SchedulerLike} on which to run the generator loop. If not provided, defaults to emit immediately.
 * @returns {Observable<S>} The generated sequence.
 */
export function generate<S>(initialState: S,
                            condition: ConditionFunc<S>,
                            iterate: IterateFunc<S>,
                            scheduler?: SchedulerLike): Observable<S>;

/**
 * Generates an observable sequence by running a state-driven loop
 * producing the sequence's elements, using the specified scheduler
 * to send out observer messages.
 * The overload accepts options object that might contain initial state, iterate,
 * condition and scheduler.
 *
 *
 *
 * @example
Produces sequence of 0, 1, 2, ... 9, then completes.

 * var res = Rx.Observable.generate({
 *   initialState: 0,
 *   condition: x => x < 10,
 *   iterate: x => x + 1
 * });
 *
 * @see {@link from}
 * @see {@link create}
 *
 * @param {GenerateBaseOptions<S>} options Object that must contain initialState, iterate and might contain condition and scheduler.
 * @returns {Observable<S>} The generated sequence.
 */
export function generate<S>(options: GenerateBaseOptions<S>): Observable<S>;

/**
 * Generates an observable sequence by running a state-driven loop
 * producing the sequence's elements, using the specified scheduler
 * to send out observer messages.
 * The overload accepts options object that might contain initial state, iterate,
 * condition, result selector and scheduler.
 *
 *
 *
 * @example
Produces sequence of 0, 1, 2, ... 9, then completes.

 * var res = Rx.Observable.generate({
 *   initialState: 0,
 *   condition: x => x < 10,
 *   iterate: x => x + 1,
 *   resultSelector: x => x
 * });
 *
 * @see {@link from}
 * @see {@link create}
 *
 * @param {GenerateOptions<T, S>} options Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler.
 * @returns {Observable<T>} The generated sequence.
 */
export function generate<T, S>(options: GenerateOptions<T, S>): Observable<T>;

export function generate<T, S>(initialStateOrOptions: S | GenerateOptions<T, S>,
                               condition?: ConditionFunc<S>,
                               iterate?: IterateFunc<S>,
                               resultSelectorOrObservable?: (ResultFunc<S, T>) | SchedulerLike,
                               scheduler?: SchedulerLike): Observable<T> {

  let resultSelector: ResultFunc<S, T>;
  let initialState: S;

  if (arguments.length == 1) {
    const options = initialStateOrOptions as GenerateOptions<T, S>;
    initialState = options.initialState;
    condition = options.condition;
    iterate = options.iterate;
    resultSelector = options.resultSelector || identity as ResultFunc<S, T>;
    scheduler = options.scheduler;
  } else if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {
    initialState = initialStateOrOptions as S;
    resultSelector = identity as ResultFunc<S, T>;
    scheduler = resultSelectorOrObservable as SchedulerLike;
  } else {
    initialState = initialStateOrOptions as S;
    resultSelector = resultSelectorOrObservable as ResultFunc<S, T>;
  }

  return new Observable<T>(subscriber => {
    let state = initialState;
    if (scheduler) {
      return scheduler.schedule<SchedulerState<T, S>>(dispatch, 0, {
        subscriber,
        iterate,
        condition,
        resultSelector,
        state
      });
    }

    do {
      if (condition) {
        let conditionResult: boolean;
        try {
          conditionResult = condition(state);
        } catch (err) {
          subscriber.error(err);
          return undefined;
        }
        if (!conditionResult) {
          subscriber.complete();
          break;
        }
      }
      let value: T;
      try {
        value = resultSelector(state);
      } catch (err) {
        subscriber.error(err);
        return undefined;
      }
      subscriber.next(value);
      if (subscriber.closed) {
        break;
      }
      try {
        state = iterate(state);
      } catch (err) {
        subscriber.error(err);
        return undefined;
      }
    } while (true);

    return undefined;
  });
}

function dispatch<T, S>(this: SchedulerAction<SchedulerState<T, S>>, state: SchedulerState<T, S>) {
  const { subscriber, condition } = state;
  if (subscriber.closed) {
    return undefined;
  }
  if (state.needIterate) {
    try {
      state.state = state.iterate(state.state);
    } catch (err) {
      subscriber.error(err);
      return undefined;
    }
  } else {
    state.needIterate = true;
  }
  if (condition) {
    let conditionResult: boolean;
    try {
      conditionResult = condition(state.state);
    } catch (err) {
      subscriber.error(err);
      return undefined;
    }
    if (!conditionResult) {
      subscriber.complete();
      return undefined;
    }
    if (subscriber.closed) {
      return undefined;
    }
  }
  let value: T;
  try {
    value = state.resultSelector(state.state);
  } catch (err) {
    subscriber.error(err);
    return undefined;
  }
  if (subscriber.closed) {
    return undefined;
  }
  subscriber.next(value);
  if (subscriber.closed) {
    return undefined;
  }
  return this.schedule(state);
}


text:
<Type Name="InputView" FullName="Xamarin.Forms.InputView">
  <TypeSignature Language="C#" Value="public class InputView : Xamarin.Forms.View" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit InputView extends Xamarin.Forms.View" />
  <AssemblyInfo>
    <AssemblyName>Xamarin.Forms.Core</AssemblyName>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <AssemblyVersion>1.1.0.0</AssemblyVersion>
    <AssemblyVersion>1.2.0.0</AssemblyVersion>
    <AssemblyVersion>1.3.0.0</AssemblyVersion>
    <AssemblyVersion>1.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Xamarin.Forms.View</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    The base class of a view which can take keyboard input.
    <remarks>The constructor of this class is internal. Forms does not provide any renderer for InputView base class.</remarks>
  </Docs>
  <Members>
    <Member MemberName="Keyboard">
      <MemberSignature Language="C#" Value="public Xamarin.Forms.Keyboard Keyboard { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance class Xamarin.Forms.Keyboard Keyboard" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.1.0.0</AssemblyVersion>
        <AssemblyVersion>1.2.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Xamarin.Forms.Keyboard</ReturnType>
      </ReturnValue>
      <Docs>
        Gets or sets the Keyboard for the InputView. This is a bindable property.
        <value>The <see cref="T:Xamarin.Forms.Keyboard" /> to use for the InputView.</value>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="KeyboardProperty">
      <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty KeyboardProperty;" />
      <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty KeyboardProperty" />
      <MemberType>Field</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.1.0.0</AssemblyVersion>
        <AssemblyVersion>1.2.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
      </ReturnValue>
      <Docs>
        Identifies the Keyboard bindable property.
        <remarks>
        </remarks>
      </Docs>
    </Member>
  </Members>
</Type>


text:
"""
    relshell.batch_to_from_file
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :synopsis: Provides abstract BatchToFromFile class
"""
from abc import ABCMeta, abstractmethod
from os import remove
from tempfile import mkstemp

class BatchToFromFile(object):
    """(Abstract) batch <=> process (input|output) translator"""
    __metaclass__ = ABCMeta

    def __init__(self, file_type):
        """Constructor

        :param file_type: one of ('TMPFILE', 'STDIN', 'STDOUT')
        """
        self._type = file_type
        if self._type == 'TMPFILE':
            self._tmpfile = mkstemp(prefix='relshell-', suffix='.batch')  # [todo] - Use memory file system for performance

    def is_tmpfile(self):
        return self._type == 'TMPFILE'

    def tmpfile_path(self):
        assert self._type == 'TMPFILE'
        (fd, path) = self._tmpfile
        return path

    def _rm_tmpfile(self):
        assert(self._type == 'TMPFILE')
        (fd, path) = self._tmpfile
        remove(path)

    @abstractmethod
    def finish(self):  # pragma: no cover
        pass


text:
using namespace QtJsonSerializer;
using namespace QtJsonSerializer::TypeConverters;

class LocaleConverterTest : public TypeConverterTestBase
{
	Q_OBJECT

protected:
	TypeConverter *converter() override;
	void addConverterData() override;
	void addMetaData() override;
	void addCommonSerData() override;
	void addDeserData() override;

private:
	LocaleConverter _converter;
};

TypeConverter *LocaleConverterTest::converter()
{
	return &_converter;
}

void LocaleConverterTest::addConverterData()
{
	QTest::newRow("locale") << static_cast<int>(TypeConverter::Standard);
}

void LocaleConverterTest::addMetaData()
{
	QTest::newRow("locale.iso") << static_cast<int>(QMetaType::QLocale)
								<< static_cast<QCborTag>(CborSerializer::LocaleISO)
								<< QCborValue::String
								<< true
								<< TypeConverter::DeserializationCapabilityResult::Positive;
	QTest::newRow("locale.bcp47") << static_cast<int>(QMetaType::QLocale)
								  << static_cast<QCborTag>(CborSerializer::LocaleBCP47)
								  << QCborValue::String
								  << true
								  << TypeConverter::DeserializationCapabilityResult::Positive;
	QTest::newRow("guessed.iso") << static_cast<int>(QMetaType::UnknownType)
								 << static_cast<QCborTag>(CborSerializer::LocaleISO)
								 << QCborValue::String
								 << false
								 << TypeConverter::DeserializationCapabilityResult::Guessed;
	QTest::newRow("guessed.bcp47") << static_cast<int>(QMetaType::UnknownType)
								   << static_cast<QCborTag>(CborSerializer::LocaleBCP47)
								   << QCborValue::String
								   << false
								   << TypeConverter::DeserializationCapabilityResult::Guessed;
	QTest::newRow("invalid.type") << static_cast<int>(QMetaType::QString)
								  << static_cast<QCborTag>(CborSerializer::LocaleISO)
								  << QCborValue::String
								  << false
								  << TypeConverter::DeserializationCapabilityResult::Negative;
	QTest::newRow("invalid.data") << static_cast<int>(QMetaType::QLocale)
								  << static_cast<QCborTag>(CborSerializer::LocaleISO)
								  << QCborValue::ByteArray
								  << true
								  << TypeConverter::DeserializationCapabilityResult::Negative;
	QTest::newRow("invalid.tag") << static_cast<int>(QMetaType::QLocale)
								 << static_cast<QCborTag>(CborSerializer::Font)
								 << QCborValue::String
								 << true
								 << TypeConverter::DeserializationCapabilityResult::WrongTag;
}

void LocaleConverterTest::addCommonSerData()
{
	QTest::newRow("normal") << QVariantHash{}
							<< TestQ{}
							<< static_cast<QObject*>(nullptr)
							<< static_cast<int>(QMetaType::QLocale)
							<< QVariant{QLocale{QLocale::German, QLocale::Germany}}
							<< QCborValue{static_cast<QCborTag>(CborSerializer::LocaleISO), QStringLiteral("de_DE")}
							<< QJsonValue{QStringLiteral("de_DE")};
	QTest::newRow("c") << QVariantHash{}
					   << TestQ{}
					   << static_cast<QObject*>(nullptr)
					   << static_cast<int>(QMetaType::QLocale)
					   << QVariant{QLocale::c()}
					   << QCborValue{static_cast<QCborTag>(CborSerializer::LocaleISO), QStringLiteral("C")}
					   << QJsonValue{QStringLiteral("C")};
	QTest::newRow("bcp47.default") << QVariantHash{{QStringLiteral("useBcp47Locale"), true}}
								   << TestQ{}
								   << static_cast<QObject*>(nullptr)
								   << static_cast<int>(QMetaType::QLocale)
								   << QVariant{QLocale{QLocale::German, QLocale::Germany}}
								   << QCborValue{static_cast<QCborTag>(CborSerializer::LocaleBCP47), QStringLiteral("de")}
								   << QJsonValue{QStringLiteral("de")};
	QTest::newRow("bcp47.special") << QVariantHash{{QStringLiteral("useBcp47Locale"), true}}
								   << TestQ{}
								   << static_cast<QObject*>(nullptr)
								   << static_cast<int>(QMetaType::QLocale)
								   << QVariant{QLocale{QLocale::German, QLocale::Austria}}
								   << QCborValue{static_cast<QCborTag>(CborSerializer::LocaleBCP47), QStringLiteral("de-AT")}
								   << QJsonValue{QStringLiteral("de-AT")};
}

void LocaleConverterTest::addDeserData()
{
	QTest::newRow("empty") << QVariantHash{}
						   << TestQ{}
						   << static_cast<QObject*>(nullptr)
						   << static_cast<int>(QMetaType::QLocale)
						   << QVariant{QLocale::c()}
						   << QCborValue{static_cast<QCborTag>(CborSerializer::LocaleISO), QString{}}
						   << QJsonValue{QString{}};
	QTest::newRow("invalid") << QVariantHash{}
							 << TestQ{}
							 << static_cast<QObject*>(nullptr)
							 << static_cast<int>(QMetaType::QLocale)
							 << QVariant{}
							 << QCborValue{static_cast<QCborTag>(CborSerializer::LocaleISO), QStringLiteral("some random text")}
							 << QJsonValue{QStringLiteral("some random text")};
}

QTEST_MAIN(LocaleConverterTest)

#include "tst_localeconverter.moc"