text:
package cn.edu.cdu.structural.facade;

class CPU {
    public void freeze() {
        System.out.println("the CPU freeze");
    }

    public void jump(long position) {
        System.out.println("the CPU start jump to address " + position);
    }

    public void execute() {
        System.out.println("the CPU start execute");
    }
}


text:
By default, your store will use `DS.RESTAdapter` to load and save
records. The REST adapter assumes that the URLs and JSON associated with
each model are conventional; this means that, if you follow the rules,
you will not need to configure the adapter or write any code in order to
get started.

### URL Conventions

The REST adapter is smart enough to determine the URLs it communicates
with based on the name of the model. For example, if you ask for a
`Post` by ID:

```js
var post = App.Post.find(1);
```

The REST adapter will automatically send a `GET` request to `/posts/1`.

The actions you can take on a record map onto the following URLs in the
REST adapter:

Action	HTTP Verb	URL

Find	GET	/people/123

Find All	GET	/people

Update	PUT	/people/123

Create	POST	/people

Delete	DELETE	/people/123

#### Pluralization Customization

Irregular or uncountable pluralizations can be specified via `Ember.Inflector.inflector`:

```js
Ember.Inflector.inflector.irregular('formula', 'formulae');
Ember.Inflector.inflector.uncountable('advice');
```

This will tell the REST adapter that requests for `App.Formula` requests
should go to `/formulae/1` instead of `/formulas/1`.

#### Endpoint Path Customization

Endpoint paths can be prefixed with a namespace by setting the `namespace`
property on the adapter:

```js
DS.RESTAdapter.reopen({
  namespace: 'api/1'
});
```

Requests for `App.Person` would now target `/api/1/people/1`.

#### Host Customization

An adapter can target other hosts by setting the `host` property.

```js
DS.RESTAdapter.reopen({
  host: 'https://api.example.com'
});
```

Requests for `App.Person` would now target `https://api.example.com/people/1`.

### JSON Conventions

When requesting a record, the REST adapter expects your server to return
a JSON representation of the record that conforms to the following
conventions.

#### JSON Root

The primary record being returned should be in a named root. For
example, if you request a record from `/people/123`, the response should
be nested inside a property called `person`:

```js
{
  "person": {
    "first_name": "Jeff",
    "last_name": "Atwood"
  }
}
```

#### Underscored Attribute Names

Attribute names should be the underscored version of the attribute name
in your Ember Data models. For example, if you have a model like this:

```js
App.Person = DS.Model.extend({
  firstName: DS.attr('string'),
  lastName: DS.attr('string'),

  isPersonOfTheYear: DS.attr('boolean')
});
```

The JSON returned from your server should look like this:

```js
{
  "person": {
    "first_name": "Barack",
    "last_name": "Obama",
    "is_person_of_the_year": true
  }
}
```

Irregular keys can be mapped on the adapter. If the JSON
has a key of `lastNameOfPerson`, and the desired attribute
name is simply `lastName`, inform the adapter:

```js
App.Person = DS.Model.extend({
  lastName: DS.attr('string')
});
DS.RESTAdapter.map('App.Person', {
  lastName: { key: 'lastNameOfPerson' }
});
```

#### Relationships

References to other records should be done by ID. For example, if you
have a model with a `hasMany` relationship:

```js
App.Post = DS.Model.extend({
  comments: DS.hasMany('App.Comment')
});
```

The JSON should encode the relationship as an array of IDs:

```js
{
  "post": {
    "comment_ids": [1, 2, 3]
  }
}
```

`Comments` for a `post` can be loaded by `post.get('comments')`. The REST adapter
will send a `GET` request to `/comments?ids[]=1&ids[]=2&ids[]=3`.

Any `belongsTo` relationships in the JSON representation should be the
underscored version of the Ember Data model's name, with the string
`_id` appended. For example, if you have a model:

```js
App.Comment = DS.Model.extend({
  post: DS.belongsTo('App.Post')
});
```

The JSON should encode the relationship as an ID to another record:

```js
{
  "comment": {
    "post_id": 1
  }
}
```

#### Sideloaded Relationships

To reduce the number of HTTP requests necessary, you can sideload
additional records in your JSON response. Sideloaded records live
outside the JSON root, and are represented as an array of hashes:

```js
{
  "post": {
    "id": 1,
    "title": "Rails is omakase",
    "comment_ids": [1, 2, 3]
  },

  "comments": [{
    "id": 1,
    "body": "But is it _lightweight_ omakase?"
  },
  {
    "id": 2,
    "body": "I for one welcome our new omakase overlords"
  },
  {
    "id": 3,
    "body": "Put me on the fast track to a delicious dinner"
  }]
}
```

### Creating Custom Transformations

In some circumstances, the built in attribute types of `string`,
`number`, `boolean`, and `date` may be inadequate. For example, a
server may return a non-standard date format.

Ember Data can have new JSON transforms
registered for use as attributes:

```js
App.CoordinatePointTransform = DS.Transform.extend({
  serialize: function(value) {
    return [value.get('x'), value.get('y')];
  },
  deserialize: function(value) {
    return Ember.create({ x: value[0], y: value[1] });
  }
});
App.Cursor = DS.Model.extend({
  position: DS.attr('coordinatePoint')
});
```

When `coordinatePoint` is received from the API, it is
expected to be an array:

```js
{
  cursor: {
    position: [4,9]
  }
}
```

But once loaded on a model instance, it will behave as an object:

```js
var cursor = App.Cursor.find(1);
cursor.get('position.x'); //=> 4
cursor.get('position.y'); //=> 9
```

If `position` is modified and saved, it will pass through the
`serialize` function in the transform and again be presented as
an array in JSON.

redpajama_set_name: RedPajamaGithub


text:
use: "org.puremvc.js.multicore.core.Controller";
use: "org.puremvc.js.mulitcore.core.ControllerTestCommand";
use: "org.puremvc.js.mulitcore.core.ControllerTestVO";

TestCase
(
    'org.puremvc.js.multicore.core.ControllerTest'

,   {
        /**
         * Log a message to the console if supported.
         *
         * @param {String} message
         *  The message to log
         * @return {void}
         * @private
         */
        log: function (message)
        {
            if (window.console && console.log)
                console.log(message);
        }

        /**
         * Tests the Controller Multiton Factory Method
         */
    ,   testGetInstance: function ()
        {
            var controller= Controller.getInstance("ControllerTestKey1");

            assertTrue("Expecting instance not null", controller != null);
            assertTrue("Expecting instance implements IController", controller instanceof Controller);
        }

        /**
         * Tests Command registration and execution.
         *
         *

         * This test gets a Multiton Controller instance
         * and registers the ControllerTestCommand class
         * to handle 'ControllerTest' Notifications.

         *
         *

         * It then constructs such a Notification and tells the
         * Controller to execute the associated Command.
         * Success is determined by evaluating a property
         * on an object passed to the Command, which will
         * be modified when the Command executes.

         */
    ,   testRegisterAndExecuteCommand: function ()
        {
            var controller= Controller.getInstance("ControllerTestKey2");
            controller.registerCommand("ControllerTest", ControllerTestCommand);

            var vo= new ControllerTestVO(12);
            var note= new Notification("ControllerTest", vo);

            controller.executeCommand(note);

            assertTrue("Expected vo.result == 24", vo.result == 24);
        }

        /**
         * Tests Command registration and removal.
         *
         *

         * Tests that once a Command is registered and verified
         * working, it can be removed from the Controller.

         */
    ,   testRegisterAndRemoveCommand: function ()
        {
            var controller= Controller.getInstance("ControllerTestKey3");
            controller.registerCommand("ControllerRemoveTest", ControllerTestCommand);

            var vo= new ControllerTestVO(12);
            var note= new Notification("ControllerRemoveTest", vo);

            controller.executeCommand(note);

            assertTrue("Expected vo.result == 24", vo.result == 24);

            vo.result= 0;

            controller.removeCommand("ControllerRemoveTest");

            controller.executeCommand(note);

            assertTrue("Expecting vo.result == 0", vo.result == 0);
        }

        /**
         * Tests has command method
         */
    ,   testHasCommand: function ()
        {
            var controller= Controller.getInstance("ControllerTestKey4");
            controller.registerCommand("hasCommandTest", ControllerTestCommand);

            assertTrue("Expecting controller.hasCommand('hasCommandTest') == true", controller.hasCommand("hasCommandTest") == true);

            controller.removeCommand("hasCommandTest");

            assertTrue("Expecting controller.hasCommand('hasCommandTest') == false", controller.hasCommand("hasCommandTest") == false);
        }

        /**
         * Tests Removing and Reregistering a Command
         *
         *

         * Tests that when a Command is re-registered that it isn't fired twice.
         * This involves, minimally, registration with the controller but
         * notification via the View, rather than direct execution of
         * the Controller's executeCommand method as is done above in
         * testRegisterAndRemove. The bug under test was fixed in AS3 Standard
         * Version 2.0.2. If you run the unit tests with 2.0.1 this
         * test will fail.

         */
    ,   testReregisterAndExecuteCommand: function ()
        {
            var controller= Controller.getInstance("ControllerTestKey5");
            controller.registerCommand("ControllerTest2", ControllerTestCommand2);

            controller.removeCommand("ControllerTest2");

            controller.registerCommand("ControllerTest2", ControllerTestCommand2);

            var vo= new ControllerTestVO(12);
            var note= new Notification("ControllerTest2", vo);
            var view= View.getInstance("ControllerTestKey5");

            assertSame("Expecting vo.result == 0", 0, vo.result);
            assertSame("Expecting vo.input == 12", 12, vo.input);

            view.notifyObservers(note);

            assertSame("Expecting vo.result == 24", 24, vo.result);

            view.notifyObservers(note);

            assertSame("Expecting vo.result == 48", 48, vo.result);
        }

        /**
         * Ensures that #getInstance returns null if supplied a multitonKey
         * that is either null or undefined
         */
    ,	testNullMultitonKeyReturnsNull: function ()
    	{
    		assertNull('Multiton key was undefined, so #getInstance returned null', Controller.getInstance());
    		assertNull('Multiton key was null, so Controller#getInstance returned null', Controller.getInstance(null));
    	}
    }
);


text:
"""Create a genomeless panel report.
"""

import argparse
import json
import os
import requests
from requests.auth import HTTPBasicAuth
import sys

#Load environment variables for request authentication parameters
if "FABRIC_API_PASSWORD" not in os.environ:
    sys.exit("FABRIC_API_PASSWORD environment variable missing")

if "FABRIC_API_LOGIN" not in os.environ:
    sys.exit("FABRIC_API_LOGIN environment variable missing")

FABRIC_API_LOGIN = os.environ['FABRIC_API_LOGIN']
FABRIC_API_PASSWORD = os.environ['FABRIC_API_PASSWORD']
FABRIC_API_URL = os.environ.get('FABRIC_API_URL', 'https://api.fabricgenomics.com')
auth = HTTPBasicAuth(FABRIC_API_LOGIN, FABRIC_API_PASSWORD)

def launch_panel_report(filter_id, panel_id, accession_id, project_id):
    """Launch a genomeless panel report given filter id, and panel id
    parameters. Return the JSON response.
    """
    # Construct url and request
    url = "{}/reports/".format(FABRIC_API_URL)
    url_payload = {'report_type': "panel",
                   'genome_id': None,
                   'filter_id': filter_id,
                   'panel_id': panel_id,
                   'project_id': project_id,
                   'accession_id': accession_id}

    sys.stdout.write("Launching report...")
    sys.stdout.write("\n\n")
    sys.stdout.flush()
    result = requests.post(url, auth=auth, data=json.dumps(url_payload))
    return result.json()

def main():
    """Main function, creates a panel report.
    """
    parser = argparse.ArgumentParser(description='Launch a panel report with no genome.')
    parser.add_argument('p', metavar='panel_id', type=int)
    parser.add_argument('a', metavar='accession_id', type=str)
    parser.add_argument('--project_id', metavar='project_id', type=int)
    parser.add_argument('--f', metavar='filter_id', type=int)
    args = parser.parse_args()

    filter_id = args.f
    panel_id = args.p
    accession_id = args.a
    project_id = args.project_id

    json_response = launch_panel_report(filter_id,
                                        panel_id,
                                        accession_id,
                                        project_id)
    if "clinical_report" not in json_response.keys():
        print json_response
        sys.exit("Failed to launch. Check report parameters for correctness.")
    clinical_report = json_response['clinical_report']

    # Print out the object's fields. This represents a confirmation of the
    # information for the launched report.
    sys.stdout.write('Launched Clinical Report:\n'
                     'id: {}\n'
                     'test_type: {}\n'
                     'accession_id: {}\n'
                     'created_on: {}\n'
                     'created_by: {}\n'
                     'status: {}\n'
                     'filter_id: {}\n'
                     'panel_id: {}\n'
                     'workspace_id: {}\n'
                     'sample_collected_date: {}\n'
                     'sample_received_date: {}\n'
                     'include_cosmic: {}\n'
                     .format(clinical_report.get('id', 'Missing'),
                             clinical_report.get('test_type', 'Missing'),
                             clinical_report.get('accession_id', 'Missing'),
                             clinical_report.get('created_on', 'Missing'),
                             clinical_report.get('created_by', 'Missing'),
                             clinical_report.get('status', 'Missing'),
                             clinical_report.get('filter_id', 'Missing'),
                             clinical_report.get('panel_id', 'Missing'),
                             clinical_report.get('workspace_id', 'Missing'),
                             clinical_report.get('sample_collected_date', 'Missing'),
                             clinical_report.get('sample_received_date', 'Missing'),
                             clinical_report.get('include_cosmic', 'Missing')))

if __name__ == "__main__":
    main()


text:
import highland from "highland";
import HsmFsCtrl from "../../../../source/iml/hsm/hsm-fs-controller";
import broadcaster from "../../../../source/iml/broadcaster.js";
import angular from "../../../angular-mock-setup.js";

describe("HSM fs controller", () => {
  let ctrl, $scope, $state, $stateParams, fsStream, qsStream, qs$, fsStreamB, locksStream;

  beforeEach(() => {
    jest.useFakeTimers();
  });

  afterEach(() => {
    jest.clearAllTimers();
    jest.useRealTimers();
  });

  beforeEach(
    angular.mock.inject(($rootScope, propagateChange) => {
      $scope = $rootScope.$new();

      $state = {
        go: jest.fn(),
        router: {
          globals: {
            params: {
              fsId: "1"
            }
          }
        }
      };

      $stateParams = {
        param: "val"
      };

      fsStream = highland();
      jest.spyOn(fsStream, "destroy");

      qs$ = highland();
      jest.spyOn(qs$, "destroy");
      qsStream = jest.fn(() => qs$);
      qs$.write({
        qs: ""
      });
      jest.runAllTimers();

      fsStreamB = broadcaster(fsStream);

      locksStream = highland();

      ctrl = {};
      HsmFsCtrl.bind(ctrl)($scope, $state, $stateParams, qsStream, fsStreamB, locksStream, propagateChange);
    })
  );

  it("should setup ctrl as expected", () => {
    const instance = Object.assign({}, HsmFsCtrl, {
      onUpdate: expect.any(Function)
    });

    expect(ctrl).toEqual(instance);
  });

  describe("onUpdate", () => {
    it("should go to the new path without id", () => {
      ctrl.selectedFs = null;

      ctrl.onUpdate();

      expect($state.go).toHaveBeenCalledOnceWith("app.hsmFs.hsm", {
        fsId: "",
        resetState: false
      });
    });

    it("should go to the new path with id", () => {
      ctrl.selectedFs = {
        id: "1"
      };

      ctrl.onUpdate();

      expect($state.go).toHaveBeenCalledOnceWith("app.hsmFs.hsm", {
        fsId: "1",
        resetState: false
      });
    });
  });

  it("should set fileSystems data", () => {
    fsStream.write([{ id: 1 }, { id: 2 }]);
    jest.runAllTimers();

    expect(ctrl.fileSystems).toEqual([{ id: 1 }, { id: 2 }]);
  });

  it("should set lock data", () => {
    locksStream.write({ "89:1": { key: "val" } });
    expect(ctrl.locks).toEqual({ "89:1": { key: "val" } });
  });

  it("should set fs to the fsId", () => {
    fsStream.write([
      {
        id: 1,
        label: "foo"
      },
      {
        id: 2,
        label: "bar"
      }
    ]);
    jest.runAllTimers();

    expect(ctrl.fs).toEqual({
      id: 1,
      label: "foo"
    });
  });

  it("should filter out if fsId does not exist", () => {
    $state.router.globals.params.fsId = "";

    fsStream.write([{ id: 1 }]);

    qs$.write({
      qs: ""
    });
    jest.runAllTimers();

    expect(ctrl.fs).toBe(null);
  });

  it("should alter fs id on change", () => {
    $state.router.globals.params.fsId = "3";

    fsStream.write([{ id: 1 }, { id: 3 }]);

    qs$.write({
      qs: ""
    });
    jest.runAllTimers();

    expect(ctrl.fs).toEqual({ id: 3 });
  });

  it("should call qsStream", () => {
    expect(qsStream).toHaveBeenCalledOnceWith($stateParams, {
      to: expect.any(Function)
    });
  });

  describe("destroy", () => {
    beforeEach(() => {
      $scope.$destroy();
    });

    it("should destroy the fsStream", () => {
      expect(fsStream.destroy).toHaveBeenCalled();
    });

    it("should destroy the qsStream", () => {
      expect(qs$.destroy).toHaveBeenCalled();
    });
  });
});


text:
<?xml version="1.0"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you 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.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <groupId>org.jboss.soa.bpel</groupId>
    <artifactId>riftsaw-bpel-runtime</artifactId>
    <name>ODE :: Runtime Engine</name>
    <packaging>jar</packaging>
    <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.jboss.soa.bpel</groupId>
    <artifactId>ode</artifactId>
    <version>3.2.3.Final</version>
  </parent>

  <dependencies>
     <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <scope>test</scope>
     </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-bpel-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-bpel-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-bpel-dao</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-bpel-schemas</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-bpel-store</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-jacob</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-bpel-epr</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-scheduler-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-dao-jpa</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.soa.bpel</groupId>
      <artifactId>riftsaw-dao-jpa-hibernate</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <exclusions>
        <!-- These need to be excluded, we are on JDK5 -->
        <exclusion>
          <artifactId>xerces</artifactId>
          <groupId>xerces</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
      </exclusions>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jmock</groupId>
      <artifactId>jmock</artifactId>
      <scope>test</scope>
    </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-agents</artifactId>
        </dependency>
        <dependency>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
          <groupId>jaxen</groupId>
          <artifactId>jaxen</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.jbossts.xts</groupId>
            <artifactId>jbossxts</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-httpclient</groupId>
                    <artifactId>commons-httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>emma</groupId>
                    <artifactId>emma</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>emma</groupId>
                    <artifactId>emma_ant</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jacorb</groupId>
                    <artifactId>jacorb</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jacorb</groupId>
                    <artifactId>idl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.integration</groupId>
                    <artifactId>jboss-corba-ots-spi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.javaee</groupId>
                    <artifactId>jboss-transaction-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-server-manager</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-processor</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-spi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-generator</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.remoting</groupId>
                    <artifactId>jboss-remoting</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>tanukisoft</groupId>
                    <artifactId>wrapper</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.jboss.jbossts.xts</groupId>
            <artifactId>jbossxts</artifactId>
	    <classifier>api</classifier>
            <exclusions>
                <exclusion>
                    <groupId>commons-httpclient</groupId>
                    <artifactId>commons-httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>emma</groupId>
                    <artifactId>emma</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>emma</groupId>
                    <artifactId>emma_ant</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jacorb</groupId>
                    <artifactId>idl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jacorb</groupId>
                    <artifactId>jacorb</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.integration</groupId>
                    <artifactId>jboss-corba-ots-spi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-server-manager</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-processor</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-spi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-generator</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.javaee</groupId>
                    <artifactId>jboss-transaction-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.remoting</groupId>
                    <artifactId>jboss-remoting</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>tanukisoft</groupId>
                    <artifactId>wrapper</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

   </dependencies>

	<build>
     <plugins>
      	<plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/ActivityRecoveryTest.java</exclude>
	    <exclude>**/ProcessManagementTest.java</exclude>
          </excludes>
        </configuration>
    	</plugin>
    </plugins>
   </build>
</project>


text:
typedef NS_ENUM(NSInteger, YUUIDatePickerMode) {
    UIYUDatePickerModeTime,           // Displays hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. 6 | 53 | PM)

    UIYUDatePickerModeDate,           // Displays month, day, and year depending on the locale setting (e.g. November | 15 | 2007)

    UIYUDatePickerModeDateAndTime,    // Displays date, hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. Wed Nov 15 | 6 | 53 | PM)
    UIYUDatePickerModeCountDownTimer, // Displays hour and minute (e.g. 1 | 53)

    UIYUDatePickerModeDateYYYYMMDDHHmm,    // (e.g.  2015年 | 05月 | 01日 | 11时 | 59分)
};

NS_CLASS_AVAILABLE_IOS(6_0)@interface YUDatePicker : UIControl

@property (nonatomic) YUUIDatePickerMode datePickerMode; // default is UIXYDatePickerModeDateAndTime

@property (nonatomic, retain) NSLocale   *locale;   // default is [NSLocale currentLocale]. setting nil returns to default

@property (nonatomic, copy)   NSCalendar *calendar; // default is [NSCalendar currentCalendar]. setting nil returns to default

@property (nonatomic, retain) NSTimeZone *timeZone; // default is nil. use current time zone or time zone from calendar

@property (nonatomic, retain) NSDate *date;        // default is current date when picker created. Ignored in countdown timer mode. for that mode, picker starts at 0:00
@property (nonatomic, readonly) NSString *dateStr;//return current date Formatter yyyy-MM-dd HH:mm:ss

@property (nonatomic, retain) NSDate *minimumDate; // specify min/max date range. default is nil. When min > max, the values are ignored. Ignored in countdown timer mode
@property (nonatomic, retain) NSDate *maximumDate; // default is nil

@property (nonatomic) NSTimeInterval countDownDuration; // for UIDatePickerModeCountDownTimer, ignored otherwise. default is 0.0. limit is 23:59 (86,399 seconds). value being set is div 60 (drops remaining seconds).
@property (nonatomic) NSInteger      minuteInterval;    // display minutes wheel with interval. interval must be evenly divided into 60. default is 1. min is 1, max is 30
- (void)setDate:(NSDate *)date animated:(BOOL)animated; // if animated is YES, animate the wheels of time to display the new date

@property (nonatomic, assign) BOOL showToolbar;

@end

typedef void (^dateBlock)(YUDatePicker *date);

@interface YUDatePicker(YU)

-(void)showInView:(UIView *)view block:(dateBlock)dateBlock;

-(void)hidden;

@end


text:
from tempest.api.orchestration import base
from tempest.openstack.common import log as logging
from tempest.test import attr
import os
import re

LOG = logging.getLogger(__name__)

class StacksTestJSON(base.BaseOrchestrationTest):
    _interface = 'json'

    fail_flag = 0

    empty_template = "HeatTemplateFormatVersion: '2013-05-23'\n"

    @classmethod
    def setUpClass(cls):
        super(StacksTestJSON, cls).setUpClass()
        cls.client = cls.orchestration_client

    def test_devstack_realDeployment(self):
        self._test_stack("devstack")

    def test_dotnetnuke_realDeployment(self):
        self._test_stack("dotnetnuke")

    def test_mongodb_realDeployment(self):
        self._test_stack("mongodb")

    def test_mysql_realDeployment(self):
        self._test_stack("mysql")

    def test_php_app_realDeployment(self):
        self._test_stack("php-app")

    def test_rcbops_realDeployment(self):
        self._test_stack("rcbops_allinone_inone")

    def test_redis_realDeployment(self):
        self._test_stack("redis")

    def test_repose_realDeployment(self):
        self._test_stack("repose")

    def test_ruby_on_rails_realDeployment(self):
        self._test_stack("ruby-on-rails")

    def test_wordpress_multi_realDeployment(self):
        self._test_stack("wordpress-multi")

    def test_wordpress_multi_windows_realDeployment(self):
        self._test_stack("wordpress-multinode-windows")

    def test_wordpress_single_winserver_realDeployment(self):
        self._test_stack("wordpress-single-winserver")

    def test_wordpress_winserver_clouddb_realDeployment(self):
        self._test_stack("wordpress-winserver-clouddb")

    def test_wp_resource_realDeployment(self):
        self._test_stack("wp-resource")

    def test_wp_single_linux_realDeployment(self):
        self._test_stack("wp-single-linux-cdb")

    def test_rackconnect_realDeployment(self):
        self._test_stack("php-app")

    @attr(type='smoke')
    def _test_stack(self, template):
        print os.environ.get('TEMPEST_CONFIG')
        env = self.config.orchestration['env']
        usertype = self.config.identity['username']
        print "User is: %s" % usertype
        print "Environment is %s" % env

        #using urllib2
        # req = urllib2.urlopen("https://github.rackspace.com/Heat/cookbook-heat/raw/master/files/default/policy.json")
        # policy_details = yaml.load(req)
        # print policy_details

        #print "request is: %s" % req
        #html = req.read()
        #print "html is %s" % html
        #print type(html)
        #policy_details = yaml.load(html.content)

        #using requests
        # policy_file = "https://github.rackspace.com/Heat/cookbook-heat/raw/master/files/default/policy.json"
        # headers = {'Authorization': '64b66eca6f1b3f6871196d2c335dd174ce7da99d'}
        # policy = requests.post(policy_file, headers=headers, timeout=10)
        # if policy.status_code != requests.codes.ok:
        #     print "This file does not exist: %s" % policy_file
        #     self.fail("The policy file does not exist.")
        # else:
        #     policy_details = yaml.safe_load(policy.content)
        #     print policy_details

        #when I have access to github.rackspace.com
        #super_user = policy_details['allow_management_api_user'].split(":")[2]

        super_user = "heatdev"
        if usertype == super_user:
            print "%s is a super user." % (usertype)
        else:
            print "%s is a normal user." % (usertype)

        regionsConfig = self.config.orchestration['regions']
        regions = regionsConfig.split(",")[0]
        #for region in regions:
        print "\nRegion is: %s" % regions

        #stack-list
        apiname = "stack list"
        slresp, stacklist = self.orchestration_client.list_stacks(regions)
        numstacks = 0
        for stack in stacklist:
            numstacks = numstacks+1

        apiname = "stack list mgmt api"
        slrespm, stacklistm = self.orchestration_client.list_stacks_mgmt_api(regions)
        numstacksmgmt = 0
        for stack in stacklistm:
            numstacksmgmt = numstacksmgmt+1

        if usertype == super_user:
            if slrespm['status'] == '200':
                if (numstacksmgmt >= numstacks):
                    print "Management api is working! Stack list gives back %s stacks and the management api gives back %s stacks." % (numstacks, numstacksmgmt)
                else:
                    print "Management api is not working. Stack list gives back %s stacks and the management api gives back %s stacks." % (numstacks, numstacksmgmt)
                    self.fail("Management api is not working.")
            elif slrespm['status'] == '403':
                print "%s does not have access. Error: %s" % (usertype, stacklistm)
        else:
            if slrespm['status'] == '403':
                print "%s is not a superuser and does not have access." % (usertype)
            else:
                print "%s is not a superuser and has access." % (usertype)
                self.fail("Something is wrong! A normal user has superuser access.")

            # if (numstacksmgmt == numstacks):
            #     print "The user %s is not a super user. Stack list gives back %s stacks and the management api gives back %s stacks." %(usertype, numstacks, numstacksmgmt)
            # else:
            #     print "Something is wrong. The user %s is not a super user. Stack list gives back %s stacks and the management api gives back %s stacks." %(usertype, numstacks, numstacksmgmt)
            #     self.fail("Management api is not working.")

    def _get_stacks(self, typestack, body):
        for stackname in body:
            match = re.search(typestack + '_*', stackname['stack_name'])
            if match:
                return stackname['stack_name'], stackname['id']
        return 0, 0

    def _get_event_id(self, body):
        for stackname in body:
            return stackname['id']


text:
"use strict";

const path = require("path");
const fs = require("graceful-fs");

async function extendTypes() {
  const typesPath = path.resolve(__dirname, "../types/lib/Server.d.ts");
  const content = await fs.promises.readFile(typesPath, "utf-8");
  const newContent = `${content}
// DO NOT REMOVE THIS!
type DevServerConfiguration = Configuration;
declare module "webpack" {
  interface Configuration {
    /**
     * Can be used to configure the behaviour of webpack-dev-server when
     * the webpack config is passed to webpack-dev-server CLI.
     */
    devServer?: DevServerConfiguration | undefined;
  }
}
`;

  await fs.promises.writeFile(typesPath, newContent);
}

extendTypes();


text:
class HelperPoint
  include MongoMapper::Document
  key :user_id, ObjectId
  key :log_time, Time
  key :point, Integer
  key :message, String, required: true

  belongs_to :user, class_name: "User"
  before_create :generate_time

  def initialize(point, message, log_time = generate_time())
    self.point = point
    self.message = message
    self.log_time = log_time
  end

  def self.points
    @app_usage_points.merge actionable_points
  end

  def self.actionable_points
    @actionable_points
  end

  @actionable_points ={
    "share_on_twitter" => 50,
    "share_on_facebook" => 50,
    "watch_video" => 50,
    "test_call" => 50
  }

  @app_usage_points ={
    "signup" => 50,
    "answer_push_message" => 5,
    "answer_push_message_technical_error" => 10,
    "finish_helping_request" => 30,
    "finish_10_helping_request_in_a_week" => 30,
    "finish_5_high_fives_in_a_week" => 30
  }

  class << self

    def point_type_exists? point_name
      HelperPoint.points.has_key? point_name
    end

    def method_missing(meth, *args, &block)
      method_as_string = meth.to_s
      if HelperPoint.points.has_key? method_as_string
        return HelperPoint.new(HelperPoint.points[method_as_string], method_as_string)
      else
        super # You *must* call super if you don't handle the
        # method, otherwise you'll mess up Ruby's method lookup.
      end

    end # class << self

    def respond_to?(meth, include_private = false)
      method_as_string = meth.to_s
      HelperPoint.points.has_key? (method_as_string) || super(meth, include_private)
    end
  end

  def to_json()
    return { "point" => self.point, "log_time" => self.log_time.utc.iso8601 }.to_json
  end

  private

  def generate_time()
    self.log_time = Time.now
  end
end


text:
package org.jenkinsci.plugins.SemanticVersioning.parsing;

import hudson.Extension;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.model.Descriptor;
import hudson.remoting.VirtualChannel;

import org.jenkinsci.plugins.SemanticVersioning.AppVersion;
import org.jenkinsci.plugins.SemanticVersioning.InvalidBuildFileFormatException;
import org.jenkinsci.plugins.SemanticVersioning.Messages;
import org.jenkinsci.remoting.RoleChecker;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.*;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;

@Extension
public class PomParser extends AbstractBuildDefinitionParser {

    private static final String BUILD_FILE = "pom.xml";

    public PomParser() {
	}

	public AppVersion extractAppVersion(FilePath workspace, PrintStream logger)
			throws IOException, InvalidBuildFileFormatException {
		String version = null;

		Document document = getPom(workspace);
		XPath xPath = XPathFactory.newInstance().newXPath();
		XPathExpression expression;
		try {
			expression = xPath.compile("/project/version");
			version = expression.evaluate(document);

		} catch (XPathExpressionException e) {
			throw new InvalidBuildFileFormatException(document.getBaseURI()
					+ " is not a valid POM file.");
		}

		if (version == null || version.length() == 0) {
			throw new InvalidBuildFileFormatException(
					"No version information found in " + document.getBaseURI());
		}
		return AppVersion.parse(version);
	}

	private Document getPom(FilePath workspace)
			throws InvalidBuildFileFormatException, IOException {

		FilePath pom;

		pom = new FilePath(workspace, BUILD_FILE);

		Document pomDocument;
		try {
			pomDocument = pom.act(new FileCallable<Document>() {
				private static final long serialVersionUID = 1L;

				public Document invoke(File pom, VirtualChannel channel)
						throws IOException, InterruptedException {

					try {
						DocumentBuilder documentBuilder;
						documentBuilder = DocumentBuilderFactory.newInstance()
								.newDocumentBuilder();
						return documentBuilder.parse(pom);

					} catch (SAXException e) {
						throw new InterruptedException(pom
								.getAbsolutePath()
								+ " is not a valid POM file.");
					} catch (ParserConfigurationException e) {
						throw new InterruptedException(pom
								.getAbsolutePath()
								+ " is not a valid POM file.");
					}
				}

				public void checkRoles(RoleChecker arg0) throws SecurityException {
				}

			});
		} catch (InterruptedException e) {
			throw new InvalidBuildFileFormatException(e.getMessage());
		}

		return pomDocument;
	}

	@SuppressWarnings("unchecked")
	public Descriptor<BuildDefinitionParser> getDescriptor() {
		return new AbstractSemanticParserDescription() {

			@Override
			public String getDisplayName() {

				return Messages.Parsers.MAVEN_POM_PARSER;
			}
		};
	}
}


text:
using RippleSharp.Rippled.Constants;
using RippleSharp.Rippled.Models.Requests.Server;

namespace RippleSharp.Rippled.Client.RpcJson.Requests.Server
{
    public class FeeRequest : RpcJsonRequest<FeeRequestParams>
    {
        public override string Method => ApiMethod.Fee;
    }
}


text:
#pragma once
#include <aws/cognito-idp/CognitoIdentityProvider_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/cognito-idp/model/EmailSendingAccountType.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace CognitoIdentityProvider
{
namespace Model
{

  /**
   *
The email configuration type.

Amazon Cognito has specific
   * regions for use with Amazon SES. For more information on the supported regions,
   * see Email
   * Settings for Amazon Cognito User Pools.

See Also:

   * AWS
   * API Reference

   */
  class AWS_COGNITOIDENTITYPROVIDER_API EmailConfigurationType
  {
  public:
    EmailConfigurationType();
    EmailConfigurationType(Aws::Utils::Json::JsonView jsonValue);
    EmailConfigurationType& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline const Aws::String& GetSourceArn() const{ return m_sourceArn; }

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline bool SourceArnHasBeenSet() const { return m_sourceArnHasBeenSet; }

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline void SetSourceArn(const Aws::String& value) { m_sourceArnHasBeenSet = true; m_sourceArn = value; }

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline void SetSourceArn(Aws::String&& value) { m_sourceArnHasBeenSet = true; m_sourceArn = std::move(value); }

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline void SetSourceArn(const char* value) { m_sourceArnHasBeenSet = true; m_sourceArn.assign(value); }

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline EmailConfigurationType& WithSourceArn(const Aws::String& value) { SetSourceArn(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline EmailConfigurationType& WithSourceArn(Aws::String&& value) { SetSourceArn(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of a verified email address in Amazon SES.
     * This email address is used in one of the following ways, depending on the value
     * that you specify for the EmailSendingAccount parameter:

     *

If you specify COGNITO_DEFAULT, Amazon Cognito uses this
     * address as the custom FROM address when it emails your users by using its
     * built-in email account.

If you specify DEVELOPER,
     * Amazon Cognito emails your users with this address by calling Amazon SES on your
     * behalf.

     */
    inline EmailConfigurationType& WithSourceArn(const char* value) { SetSourceArn(value); return *this;}

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline const Aws::String& GetReplyToEmailAddress() const{ return m_replyToEmailAddress; }

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline bool ReplyToEmailAddressHasBeenSet() const { return m_replyToEmailAddressHasBeenSet; }

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline void SetReplyToEmailAddress(const Aws::String& value) { m_replyToEmailAddressHasBeenSet = true; m_replyToEmailAddress = value; }

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline void SetReplyToEmailAddress(Aws::String&& value) { m_replyToEmailAddressHasBeenSet = true; m_replyToEmailAddress = std::move(value); }

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline void SetReplyToEmailAddress(const char* value) { m_replyToEmailAddressHasBeenSet = true; m_replyToEmailAddress.assign(value); }

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline EmailConfigurationType& WithReplyToEmailAddress(const Aws::String& value) { SetReplyToEmailAddress(value); return *this;}

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline EmailConfigurationType& WithReplyToEmailAddress(Aws::String&& value) { SetReplyToEmailAddress(std::move(value)); return *this;}

    /**
     *
The destination to which the receiver of the email should reply to.

     */
    inline EmailConfigurationType& WithReplyToEmailAddress(const char* value) { SetReplyToEmailAddress(value); return *this;}

    /**
     *
Specifies whether Amazon Cognito emails your users by using its built-in
     * email functionality or your Amazon SES email configuration. Specify one of the
     * following values:

COGNITO_DEFAULT

When Amazon Cognito
     * emails your users, it uses its built-in email functionality. When you use the
     * default option, Amazon Cognito allows only a limited number of emails each day
     * for your user pool. For typical production environments, the default email limit
     * is below the required delivery volume. To achieve a higher delivery volume,
     * specify DEVELOPER to use your Amazon SES email configuration.

To look up
     * the email delivery limit for the default option, see Limits
     * in Amazon Cognito in the Amazon Cognito Developer Guide.

The
     * default FROM address is no-reply@verificationemail.com. To customize the FROM
     * address, provide the ARN of an Amazon SES verified email address for the
     * SourceArn parameter.

 If EmailSendingAccount is
     * COGNITO_DEFAULT, the following parameters aren't allowed:

     *
EmailVerificationMessage

EmailVerificationSubject

     *

InviteMessageTemplate.EmailMessage

     *
InviteMessageTemplate.EmailSubject

     *
VerificationMessageTemplate.EmailMessage

     *
VerificationMessageTemplate.EmailMessageByLink

     *
VerificationMessageTemplate.EmailSubject,

     *
VerificationMessageTemplate.EmailSubjectByLink

     *
DEVELOPER EmailSendingAccount is required.

     *
DEVELOPER

When Amazon Cognito emails your users, it uses your
     * Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send
     * email from your verified email address. When you use this option, the email
     * delivery limits are the same limits that apply to your Amazon SES verified email
     * address in your AWS account.

If you use this option, you must provide the
     * ARN of an Amazon SES verified email address for the SourceArn
     * parameter.

Before Amazon Cognito can email your users, it requires
     * additional permissions to call Amazon SES on your behalf. When you update your
     * user pool with this option, Amazon Cognito creates a service-linked role,
     * which is a type of IAM role, in your AWS account. This role contains the
     * permissions that allow Amazon Cognito to access Amazon SES and send email
     * messages with your address. For more information about the service-linked role
     * that Amazon Cognito creates, see Using
     * Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer
     * Guide.

     */
    inline const EmailSendingAccountType& GetEmailSendingAccount() const{ return m_emailSendingAccount; }

    /**
     *
Specifies whether Amazon Cognito emails your users by using its built-in
     * email functionality or your Amazon SES email configuration. Specify one of the
     * following values:

COGNITO_DEFAULT

When Amazon Cognito
     * emails your users, it uses its built-in email functionality. When you use the
     * default option, Amazon Cognito allows only a limited number of emails each day
     * for your user pool. For typical production environments, the default email limit
     * is below the required delivery volume. To achieve a higher delivery volume,
     * specify DEVELOPER to use your Amazon SES email configuration.

To look up
     * the email delivery limit for the default option, see Limits
     * in Amazon Cognito in the Amazon Cognito Developer Guide.

The
     * default FROM address is no-reply@verificationemail.com. To customize the FROM
     * address, provide the ARN of an Amazon SES verified email address for the
     * SourceArn parameter.

 If EmailSendingAccount is
     * COGNITO_DEFAULT, the following parameters aren't allowed:

     *
EmailVerificationMessage

EmailVerificationSubject

     *

InviteMessageTemplate.EmailMessage

     *
InviteMessageTemplate.EmailSubject

     *
VerificationMessageTemplate.EmailMessage

     *
VerificationMessageTemplate.EmailMessageByLink

     *
VerificationMessageTemplate.EmailSubject,

     *
VerificationMessageTemplate.EmailSubjectByLink

     *
DEVELOPER EmailSendingAccount is required.

     *
DEVELOPER

When Amazon Cognito emails your users, it uses your
     * Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send
     * email from your verified email address. When you use this option, the email
     * delivery limits are the same limits that apply to your Amazon SES verified email
     * address in your AWS account.

If you use this option, you must provide the
     * ARN of an Amazon SES verified email address for the SourceArn
     * parameter.

Before Amazon Cognito can email your users, it requires
     * additional permissions to call Amazon SES on your behalf. When you update your
     * user pool with this option, Amazon Cognito creates a service-linked role,
     * which is a type of IAM role, in your AWS account. This role contains the
     * permissions that allow Amazon Cognito to access Amazon SES and send email
     * messages with your address. For more information about the service-linked role
     * that Amazon Cognito creates, see Using
     * Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer
     * Guide.

     */
    inline bool EmailSendingAccountHasBeenSet() const { return m_emailSendingAccountHasBeenSet; }

    /**
     *
Specifies whether Amazon Cognito emails your users by using its built-in
     * email functionality or your Amazon SES email configuration. Specify one of the
     * following values:

COGNITO_DEFAULT

When Amazon Cognito
     * emails your users, it uses its built-in email functionality. When you use the
     * default option, Amazon Cognito allows only a limited number of emails each day
     * for your user pool. For typical production environments, the default email limit
     * is below the required delivery volume. To achieve a higher delivery volume,
     * specify DEVELOPER to use your Amazon SES email configuration.

To look up
     * the email delivery limit for the default option, see Limits
     * in Amazon Cognito in the Amazon Cognito Developer Guide.

The
     * default FROM address is no-reply@verificationemail.com. To customize the FROM
     * address, provide the ARN of an Amazon SES verified email address for the
     * SourceArn parameter.

 If EmailSendingAccount is
     * COGNITO_DEFAULT, the following parameters aren't allowed:

     *
EmailVerificationMessage

EmailVerificationSubject

     *

InviteMessageTemplate.EmailMessage

     *
InviteMessageTemplate.EmailSubject

     *
VerificationMessageTemplate.EmailMessage

     *
VerificationMessageTemplate.EmailMessageByLink

     *
VerificationMessageTemplate.EmailSubject,

     *
VerificationMessageTemplate.EmailSubjectByLink

     *
DEVELOPER EmailSendingAccount is required.

     *
DEVELOPER

When Amazon Cognito emails your users, it uses your
     * Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send
     * email from your verified email address. When you use this option, the email
     * delivery limits are the same limits that apply to your Amazon SES verified email
     * address in your AWS account.

If you use this option, you must provide the
     * ARN of an Amazon SES verified email address for the SourceArn
     * parameter.

Before Amazon Cognito can email your users, it requires
     * additional permissions to call Amazon SES on your behalf. When you update your
     * user pool with this option, Amazon Cognito creates a service-linked role,
     * which is a type of IAM role, in your AWS account. This role contains the
     * permissions that allow Amazon Cognito to access Amazon SES and send email
     * messages with your address. For more information about the service-linked role
     * that Amazon Cognito creates, see Using
     * Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer
     * Guide.

     */
    inline void SetEmailSendingAccount(const EmailSendingAccountType& value) { m_emailSendingAccountHasBeenSet = true; m_emailSendingAccount = value; }

    /**
     *
Specifies whether Amazon Cognito emails your users by using its built-in
     * email functionality or your Amazon SES email configuration. Specify one of the
     * following values:

COGNITO_DEFAULT

When Amazon Cognito
     * emails your users, it uses its built-in email functionality. When you use the
     * default option, Amazon Cognito allows only a limited number of emails each day
     * for your user pool. For typical production environments, the default email limit
     * is below the required delivery volume. To achieve a higher delivery volume,
     * specify DEVELOPER to use your Amazon SES email configuration.

To look up
     * the email delivery limit for the default option, see Limits
     * in Amazon Cognito in the Amazon Cognito Developer Guide.

The
     * default FROM address is no-reply@verificationemail.com. To customize the FROM
     * address, provide the ARN of an Amazon SES verified email address for the
     * SourceArn parameter.

 If EmailSendingAccount is
     * COGNITO_DEFAULT, the following parameters aren't allowed:

     *
EmailVerificationMessage

EmailVerificationSubject

     *

InviteMessageTemplate.EmailMessage

     *
InviteMessageTemplate.EmailSubject

     *
VerificationMessageTemplate.EmailMessage

     *
VerificationMessageTemplate.EmailMessageByLink

     *
VerificationMessageTemplate.EmailSubject,

     *
VerificationMessageTemplate.EmailSubjectByLink

     *
DEVELOPER EmailSendingAccount is required.

     *
DEVELOPER

When Amazon Cognito emails your users, it uses your
     * Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send
     * email from your verified email address. When you use this option, the email
     * delivery limits are the same limits that apply to your Amazon SES verified email
     * address in your AWS account.

If you use this option, you must provide the
     * ARN of an Amazon SES verified email address for the SourceArn
     * parameter.

Before Amazon Cognito can email your users, it requires
     * additional permissions to call Amazon SES on your behalf. When you update your
     * user pool with this option, Amazon Cognito creates a service-linked role,
     * which is a type of IAM role, in your AWS account. This role contains the
     * permissions that allow Amazon Cognito to access Amazon SES and send email
     * messages with your address. For more information about the service-linked role
     * that Amazon Cognito creates, see Using
     * Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer
     * Guide.

     */
    inline void SetEmailSendingAccount(EmailSendingAccountType&& value) { m_emailSendingAccountHasBeenSet = true; m_emailSendingAccount = std::move(value); }

    /**
     *
Specifies whether Amazon Cognito emails your users by using its built-in
     * email functionality or your Amazon SES email configuration. Specify one of the
     * following values:

COGNITO_DEFAULT

When Amazon Cognito
     * emails your users, it uses its built-in email functionality. When you use the
     * default option, Amazon Cognito allows only a limited number of emails each day
     * for your user pool. For typical production environments, the default email limit
     * is below the required delivery volume. To achieve a higher delivery volume,
     * specify DEVELOPER to use your Amazon SES email configuration.

To look up
     * the email delivery limit for the default option, see Limits
     * in Amazon Cognito in the Amazon Cognito Developer Guide.

The
     * default FROM address is no-reply@verificationemail.com. To customize the FROM
     * address, provide the ARN of an Amazon SES verified email address for the
     * SourceArn parameter.

 If EmailSendingAccount is
     * COGNITO_DEFAULT, the following parameters aren't allowed:

     *
EmailVerificationMessage

EmailVerificationSubject

     *

InviteMessageTemplate.EmailMessage

     *
InviteMessageTemplate.EmailSubject

     *
VerificationMessageTemplate.EmailMessage

     *
VerificationMessageTemplate.EmailMessageByLink

     *
VerificationMessageTemplate.EmailSubject,

     *
VerificationMessageTemplate.EmailSubjectByLink

     *
DEVELOPER EmailSendingAccount is required.

     *
DEVELOPER

When Amazon Cognito emails your users, it uses your
     * Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send
     * email from your verified email address. When you use this option, the email
     * delivery limits are the same limits that apply to your Amazon SES verified email
     * address in your AWS account.

If you use this option, you must provide the
     * ARN of an Amazon SES verified email address for the SourceArn
     * parameter.

Before Amazon Cognito can email your users, it requires
     * additional permissions to call Amazon SES on your behalf. When you update your
     * user pool with this option, Amazon Cognito creates a service-linked role,
     * which is a type of IAM role, in your AWS account. This role contains the
     * permissions that allow Amazon Cognito to access Amazon SES and send email
     * messages with your address. For more information about the service-linked role
     * that Amazon Cognito creates, see Using
     * Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer
     * Guide.

     */
    inline EmailConfigurationType& WithEmailSendingAccount(const EmailSendingAccountType& value) { SetEmailSendingAccount(value); return *this;}

    /**
     *
Specifies whether Amazon Cognito emails your users by using its built-in
     * email functionality or your Amazon SES email configuration. Specify one of the
     * following values:

COGNITO_DEFAULT

When Amazon Cognito
     * emails your users, it uses its built-in email functionality. When you use the
     * default option, Amazon Cognito allows only a limited number of emails each day
     * for your user pool. For typical production environments, the default email limit
     * is below the required delivery volume. To achieve a higher delivery volume,
     * specify DEVELOPER to use your Amazon SES email configuration.

To look up
     * the email delivery limit for the default option, see Limits
     * in Amazon Cognito in the Amazon Cognito Developer Guide.

The
     * default FROM address is no-reply@verificationemail.com. To customize the FROM
     * address, provide the ARN of an Amazon SES verified email address for the
     * SourceArn parameter.

 If EmailSendingAccount is
     * COGNITO_DEFAULT, the following parameters aren't allowed:

     *
EmailVerificationMessage

EmailVerificationSubject

     *

InviteMessageTemplate.EmailMessage

     *
InviteMessageTemplate.EmailSubject

     *
VerificationMessageTemplate.EmailMessage

     *
VerificationMessageTemplate.EmailMessageByLink

     *
VerificationMessageTemplate.EmailSubject,

     *
VerificationMessageTemplate.EmailSubjectByLink

     *
DEVELOPER EmailSendingAccount is required.

     *
DEVELOPER

When Amazon Cognito emails your users, it uses your
     * Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send
     * email from your verified email address. When you use this option, the email
     * delivery limits are the same limits that apply to your Amazon SES verified email
     * address in your AWS account.

If you use this option, you must provide the
     * ARN of an Amazon SES verified email address for the SourceArn
     * parameter.

Before Amazon Cognito can email your users, it requires
     * additional permissions to call Amazon SES on your behalf. When you update your
     * user pool with this option, Amazon Cognito creates a service-linked role,
     * which is a type of IAM role, in your AWS account. This role contains the
     * permissions that allow Amazon Cognito to access Amazon SES and send email
     * messages with your address. For more information about the service-linked role
     * that Amazon Cognito creates, see Using
     * Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer
     * Guide.

     */
    inline EmailConfigurationType& WithEmailSendingAccount(EmailSendingAccountType&& value) { SetEmailSendingAccount(std::move(value)); return *this;}

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline const Aws::String& GetFrom() const{ return m_from; }

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline bool FromHasBeenSet() const { return m_fromHasBeenSet; }

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline void SetFrom(const Aws::String& value) { m_fromHasBeenSet = true; m_from = value; }

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline void SetFrom(Aws::String&& value) { m_fromHasBeenSet = true; m_from = std::move(value); }

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline void SetFrom(const char* value) { m_fromHasBeenSet = true; m_from.assign(value); }

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline EmailConfigurationType& WithFrom(const Aws::String& value) { SetFrom(value); return *this;}

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline EmailConfigurationType& WithFrom(Aws::String&& value) { SetFrom(std::move(value)); return *this;}

    /**
     *
Identifies either the sender's email address or the sender's name with their
     * email address. For example, testuser@example.com or Test User
     * <testuser@example.com>. This address will appear before the body of
     * the email.

     */
    inline EmailConfigurationType& WithFrom(const char* value) { SetFrom(value); return *this;}

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline const Aws::String& GetConfigurationSet() const{ return m_configurationSet; }

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline bool ConfigurationSetHasBeenSet() const { return m_configurationSetHasBeenSet; }

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline void SetConfigurationSet(const Aws::String& value) { m_configurationSetHasBeenSet = true; m_configurationSet = value; }

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline void SetConfigurationSet(Aws::String&& value) { m_configurationSetHasBeenSet = true; m_configurationSet = std::move(value); }

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline void SetConfigurationSet(const char* value) { m_configurationSetHasBeenSet = true; m_configurationSet.assign(value); }

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline EmailConfigurationType& WithConfigurationSet(const Aws::String& value) { SetConfigurationSet(value); return *this;}

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline EmailConfigurationType& WithConfigurationSet(Aws::String&& value) { SetConfigurationSet(std::move(value)); return *this;}

    /**
     *
The set of configuration rules that can be applied to emails sent using
     * Amazon SES. A configuration set is applied to an email by including a reference
     * to the configuration set in the headers of the email. Once applied, all of the
     * rules in that configuration set are applied to the email. Configuration sets can
     * be used to apply the following types of rules to emails:

Event
     * publishing – Amazon SES can track the number of send, delivery, open, click,
     * bounce, and complaint events for each email sent. Use event publishing to send
     * information about these events to other AWS services such as SNS and
     * CloudWatch.

IP pool management – When leasing dedicated IP
     * addresses with Amazon SES, you can create groups of IP addresses, called
     * dedicated IP pools. You can then associate the dedicated IP pools with
     * configuration sets.

     */
    inline EmailConfigurationType& WithConfigurationSet(const char* value) { SetConfigurationSet(value); return *this;}

  private:

    Aws::String m_sourceArn;
    bool m_sourceArnHasBeenSet;

    Aws::String m_replyToEmailAddress;
    bool m_replyToEmailAddressHasBeenSet;

    EmailSendingAccountType m_emailSendingAccount;
    bool m_emailSendingAccountHasBeenSet;

    Aws::String m_from;
    bool m_fromHasBeenSet;

    Aws::String m_configurationSet;
    bool m_configurationSetHasBeenSet;
  };

} // namespace Model
} // namespace CognitoIdentityProvider
} // namespace Aws


text:
/*
 * Coloring vertices of a graph so that no two adjacent vertices have same color
 * Author: Progyan Bhattacharya <progyanb@acm.org>
 * Repo: Design-And-Analysis-of-Algorithm [MIT LICENSE]
 */

#ifndef __Color_h
#define __Color_h

#ifndef __stdio_h
#include <stdio.h>
#endif
#ifndef __stdlib_h
#include <stdlib.h>
#endif

/**
 * Proto type for Color function
 */
void Color(int n, int Graph[n][n], int Vertex[n]);

#endif


text:
package io.smesh.cluster;

public class HazelcastClusterConfigBuilder extends AbstractClusterConfigBuilder<HazelcastClusterConfig, HazelcastClusterConfigBuilder> {

    @Override
    public HazelcastClusterConfig build() {
        return new HazelcastClusterConfig(properties);
    }
}


text:
#include <metis.h>

/*************************************************************************
* This function uses simple counting sort to return a permutation array
* corresponding to the sorted order. The keys are assumed to start from
* 0 and they are positive.  This sorting is used during matching.
**************************************************************************/
void BucketSortKeysInc(int n, int max, idxtype *keys, idxtype *tperm, idxtype *perm)
{
  int i, ii;
  idxtype *counts;

  counts = idxsmalloc(max+2, 0, "BucketSortKeysInc: counts");

  for (i=0; i<n; i++)
    counts[keys[i]]++;
  MAKECSR(i, max+1, counts);

  for (ii=0; ii<n; ii++) {
    i = tperm[ii];
    perm[counts[keys[i]]++] = i;
  }

  free(counts);
}


text:
using LNF.DataAccess;
using LNF.Scheduler;

namespace LNF.Impl.Repository.Scheduler
{
    public class ProcessInfoLine : IDataItem, IProcessInfoLine
    {
        public virtual int ProcessInfoLineID { get; set; }
        public virtual int ProcessInfoID { get; set; }
        public virtual string Param { get; set; }
        public virtual double MinValue { get; set; }
        public virtual double MaxValue { get; set; }
        public virtual int ProcessInfoLineParamID { get; set; }
        public virtual bool Deleted { get; set; }
    }
}


text:
package edu.purdue.safewalk.bitmaps;

import java.lang.Math;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import android.support.v4.util.LruCache;
import android.util.Log;
import android.widget.ImageView;

/**
 * This class was created to help fix the crashes caused by bitmaps being loaded
 * and overflowing the memory. It contains helper methods for dealing with
 * bitmaps.
 *
 * @author David Tschida (dtschida)
 * @date Sep 8, 2013 7:29:10 PM
 *
 */
public final class BitmapHelper
{

	private static String TAG = "BitmapHelper";
	private static LruCache<String, Bitmap> mMemoryCache;

	/**
	 * This method is used to create a sample size for a bitmap given the
	 * required size and the Options class for the bitmap.
	 *
	 * Run this method after first running
	 *
	 *

	 *
	 * final BitmapFactory.Options foo = new BitmapFactory.Options();
	 * foo.inJustDecodeBounds = true;
	 * BitmapFactory.decodeResource(Resources, int, foo);
	 *
	 *

	 *
	 * Then set the output to foo.inSampleSize and then decode the
	 * image.
	 *
	 * (If using the same BitmapFactory, remember to change
	 * inJustDecodeBounds back to false.)
	 *
	 * This method was taken from the Developer tutorial on the android website
	 * (licensed under Creative Commons) The original source can be found here:
	 * {@link http
	 * ://developer.android.com/training/displaying-bitmaps/load-bitmap.html}
	 *
	 * @param options
	 *            A bitmap options class created with
	 * @param reqWidth
	 *            The preferred width of the image.
	 * @param reqHeight
	 *            The preferred height of the image.
	 * @return The sample size (to be used set to options.inSampleSize)
	 */
	public static int calculateInSampleSize(BitmapFactory.Options options,
			float reqWidth, float reqHeight)
	{
		// Raw height and width of image
		final int height = options.outHeight;
		final int width = options.outWidth;
		int inSampleSize = 1;

		if (height > reqHeight || width > reqWidth)
		{
			// Calculate ratios of height and width to requested height and
			// width
			final int heightRatio = Math.round(height
					/ reqHeight);
			final int widthRatio = Math.round(width / reqWidth);

			// Choose the smallest ratio as inSampleSize value, this will
			// guarantee
			// a final image with both dimensions larger than or equal to the
			// requested height and width.
			inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
		}
		Log.v(TAG, "inSampleSize = " + inSampleSize);
		return inSampleSize;
	}

	/**
	 * Allows decoding of a bitmap with a specified height and width.
	 *
	 * Modified from the Android developer tutorial. Original source can be
	 * found at {@link http
	 * ://developer.android.com/training/displaying-bitmaps/load-bitmap.html}
	 *
	 * @param filename
	 *            The filename of the file to be decoded.
	 * @param reqWidth
	 *            The preferred width of the output bitmap.
	 * @param reqHeight
	 *            The preferred height of the output bitmap.
	 * @return the decoded bitmap, or null
	 */
	public static Bitmap decodeSampledBitmapFromFile(String filename,
			float reqWidth, float reqHeight)
	{
		Log.v(TAG, "Recieved " + filename + " with (w,h): (" + reqWidth + ", "
				+ reqHeight + ").");
		// First decode with inJustDecodeBounds=true to check dimensions
		final BitmapFactory.Options options = new BitmapFactory.Options();
		options.inJustDecodeBounds = true;
		BitmapFactory.decodeFile(filename, options);

		// Calculate inSampleSize
		options.inSampleSize = calculateInSampleSize(options, reqWidth,
				reqHeight);

		// Decode bitmap with inSampleSize set
		options.inJustDecodeBounds = false;
		Bitmap decodedBitmap = BitmapFactory.decodeFile(filename, options);
		Log.v(TAG, "The Bitmap is " + decodedBitmap.toString());
		return decodedBitmap;
	}

	public static void loadBitmapAsAsyncTask(String filepath,
			ImageView imageView, float width, float height)
	{
		final Bitmap bitmap = getBitmapFromMemCache(filepath);

		if(bitmap != null)
		{
			imageView.setImageBitmap(bitmap);
		}
		else if (cancelPotentialWork(filepath, imageView))
		{
			BitmapWorkerTask task = new BitmapWorkerTask(imageView, height,
					width);
			AsyncDrawable downloadedDrawable = new AsyncDrawable(task);
			imageView.setImageDrawable(downloadedDrawable);
			task.execute(filepath/* , cookie */);
		}

	}

	private static boolean cancelPotentialWork(String filepath,
			ImageView imageView)
	{
		BitmapWorkerTask bitmapLoaderTask = getBitmapWorkerTask(imageView);

		if (bitmapLoaderTask != null)
		{
			String bitmapPath = bitmapLoaderTask.filename;
			if ((bitmapPath == null) || (!bitmapPath.equals(filepath)))
			{
				bitmapLoaderTask.cancel(true);
			} else
			{
				// The same URL is already being downloaded.
				return false;
			}
		}
		return true;
	}

	public static BitmapWorkerTask getBitmapWorkerTask(ImageView imageView)
	{
		if (imageView != null)
		{
			Drawable drawable = imageView.getDrawable();
			if (drawable instanceof AsyncDrawable)
			{
				AsyncDrawable downloadedDrawable = (AsyncDrawable) drawable;
				return downloadedDrawable.getBitmapWorkerTask();
			}
		}
		return null;
	}

	public void initMemoryCache()
	{
		final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);

	    // Use 1/8th of the available memory for this memory cache.
	    final int cacheSize = maxMemory / 15;

		mMemoryCache = new LruCache<String, Bitmap>(cacheSize) {
	        @Override
	        protected int sizeOf(String key, Bitmap bitmap) {
	            // The cache size will be measured in kilobytes rather than
	            // number of items.
	            return (bitmap.getRowBytes() * bitmap.getHeight()) / 1024;
	        }
	    };
	}

	public static void clearCache()
	{
		mMemoryCache.evictAll();
	}

	public static void addBitmapToMemoryCache(String key, Bitmap bitmap) {
	    assert(mMemoryCache != null);
		if (getBitmapFromMemCache(key) == null) {
	        mMemoryCache.put(key, bitmap);
	    }
	}

	public static Bitmap getBitmapFromMemCache(String key) {
		assert(mMemoryCache != null);
		return mMemoryCache.get(key);
	}

}


text:
extern const struct LjsGooglePlaceAttributes {
	__unsafe_unretained NSString *dateAdded;
	__unsafe_unretained NSString *dateModified;
	__unsafe_unretained NSString *formattedAddress;
	__unsafe_unretained NSString *formattedPhone;
	__unsafe_unretained NSString *iconUrl;
	__unsafe_unretained NSString *internationalPhone;
	__unsafe_unretained NSString *location;
	__unsafe_unretained NSString *mapUrl;
	__unsafe_unretained NSString *name;
	__unsafe_unretained NSString *orderValue;
	__unsafe_unretained NSString *rating;
	__unsafe_unretained NSString *referenceId;
	__unsafe_unretained NSString *stableId;
	__unsafe_unretained NSString *vicinity;
	__unsafe_unretained NSString *website;
} LjsGooglePlaceAttributes;

extern const struct LjsGooglePlaceRelationships {
	__unsafe_unretained NSString *addressComponents;
	__unsafe_unretained NSString *attributions;
	__unsafe_unretained NSString *types;
} LjsGooglePlaceRelationships;

extern const struct LjsGooglePlaceFetchedProperties {
} LjsGooglePlaceFetchedProperties;

@class LjsGoogleAddressComponentPlace;
@class LjsGoogleAttribution;
@class LjsGooglePlaceType;

@class NSObject;

@interface LjsGooglePlaceID : NSManagedObjectID {}
@end

@interface _LjsGooglePlace : NSManagedObject {}
+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_;
+ (NSString*)entityName;
+ (NSEntityDescription*)entityInManagedObjectContext:(NSManagedObjectContext*)moc_;
- (LjsGooglePlaceID*)objectID;

@property (nonatomic, strong) NSDate *dateAdded;

//- (BOOL)validateDateAdded:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSDate *dateModified;

//- (BOOL)validateDateModified:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *formattedAddress;

//- (BOOL)validateFormattedAddress:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *formattedPhone;

//- (BOOL)validateFormattedPhone:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *iconUrl;

//- (BOOL)validateIconUrl:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *internationalPhone;

//- (BOOL)validateInternationalPhone:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) id location;

//- (BOOL)validateLocation:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *mapUrl;

//- (BOOL)validateMapUrl:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *name;

//- (BOOL)validateName:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSDecimalNumber *orderValue;

//- (BOOL)validateOrderValue:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSDecimalNumber *rating;

//- (BOOL)validateRating:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *referenceId;

//- (BOOL)validateReferenceId:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *stableId;

//- (BOOL)validateStableId:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *vicinity;

//- (BOOL)validateVicinity:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSString *website;

//- (BOOL)validateWebsite:(id*)value_ error:(NSError**)error_;

@property (nonatomic, strong) NSSet* addressComponents;

- (NSMutableSet*)addressComponentsSet;

@property (nonatomic, strong) NSSet* attributions;

- (NSMutableSet*)attributionsSet;

@property (nonatomic, strong) NSSet* types;

- (NSMutableSet*)typesSet;

@end

@interface _LjsGooglePlace (CoreDataGeneratedAccessors)

- (void)addAddressComponents:(NSSet*)value_;
- (void)removeAddressComponents:(NSSet*)value_;
- (void)addAddressComponentsObject:(LjsGoogleAddressComponentPlace*)value_;
- (void)removeAddressComponentsObject:(LjsGoogleAddressComponentPlace*)value_;

- (void)addAttributions:(NSSet*)value_;
- (void)removeAttributions:(NSSet*)value_;
- (void)addAttributionsObject:(LjsGoogleAttribution*)value_;
- (void)removeAttributionsObject:(LjsGoogleAttribution*)value_;

- (void)addTypes:(NSSet*)value_;
- (void)removeTypes:(NSSet*)value_;
- (void)addTypesObject:(LjsGooglePlaceType*)value_;
- (void)removeTypesObject:(LjsGooglePlaceType*)value_;

@end

@interface _LjsGooglePlace (CoreDataGeneratedPrimitiveAccessors)

- (NSDate *)primitiveDateAdded;
- (void)setPrimitiveDateAdded:(NSDate *)value;

- (NSDate *)primitiveDateModified;
- (void)setPrimitiveDateModified:(NSDate *)value;

- (NSString *)primitiveFormattedAddress;
- (void)setPrimitiveFormattedAddress:(NSString *)value;

- (NSString *)primitiveFormattedPhone;
- (void)setPrimitiveFormattedPhone:(NSString *)value;

- (NSString *)primitiveIconUrl;
- (void)setPrimitiveIconUrl:(NSString *)value;

- (NSString *)primitiveInternationalPhone;
- (void)setPrimitiveInternationalPhone:(NSString *)value;

- (id)primitiveLocation;
- (void)setPrimitiveLocation:(id)value;

- (NSString *)primitiveMapUrl;
- (void)setPrimitiveMapUrl:(NSString *)value;

- (NSString *)primitiveName;
- (void)setPrimitiveName:(NSString *)value;

- (NSDecimalNumber *)primitiveOrderValue;
- (void)setPrimitiveOrderValue:(NSDecimalNumber *)value;

- (NSDecimalNumber *)primitiveRating;
- (void)setPrimitiveRating:(NSDecimalNumber *)value;

- (NSString *)primitiveReferenceId;
- (void)setPrimitiveReferenceId:(NSString *)value;

- (NSString *)primitiveStableId;
- (void)setPrimitiveStableId:(NSString *)value;

- (NSString *)primitiveVicinity;
- (void)setPrimitiveVicinity:(NSString *)value;

- (NSString *)primitiveWebsite;
- (void)setPrimitiveWebsite:(NSString *)value;

- (NSMutableSet*)primitiveAddressComponents;
- (void)setPrimitiveAddressComponents:(NSMutableSet*)value;

- (NSMutableSet*)primitiveAttributions;
- (void)setPrimitiveAttributions:(NSMutableSet*)value;

- (NSMutableSet*)primitiveTypes;
- (void)setPrimitiveTypes:(NSMutableSet*)value;

@end