text:
module Azure::MachineLearningServices::Mgmt::V2018_11_19
  module Models
    #
    # Compute nodes information related to a Machine Learning compute. Might
    # differ for every type of compute.
    #
    class ComputeNodesInformation

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["AmlCompute"] = "AmlComputeNodesInformation"

      def initialize
        @computeType = "ComputeNodesInformation"
      end

      attr_accessor :computeType

      # @return [String] The continuation token.
      attr_accessor :next_link

      #
      # Mapper for ComputeNodesInformation class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ComputeNodesInformation',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'computeType',
            uber_parent: 'ComputeNodesInformation',
            class_name: 'ComputeNodesInformation',
            model_properties: {
              next_link: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'nextLink',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/delete_subject"
        android:layout_width="30dp"
        android:layout_height="90dp"
        android:gravity="center"
        android:layout_marginRight="15dp"
        android:src="@mipmap/delete_subject"/>
</LinearLayout>

redpajama_set_name: RedPajamaGithub


text:
The original data came from the ASA Section on Statistical Computing and Statistical Graphics.
The large data set shows many details on airline delay factors. This data shows a summarization
of that data.

Original data: [http://stat-computing.org/dataexpo/2009/the-data.html](http://stat-computing.org/dataexpo/2009/the-data.html)

### BGG Top 2000 Games.csv
This data was collected from [BoardGameGeek](http://boardgamegeek.com) via their API `XMLAPI2`
This is free for non-commercial use, as described in [http://boardgamegeek.com/wiki/page/XML_API_Terms_of_Use](http://boardgamegeek.com/wiki/page/XML_API_Terms_of_Use)

### cpi.csv
This data set is public domain data taken from the U.S. Bureau of Labor Statistics [http://www.bls.gov](http://www.bls.gov)

### minard
These data sets are taken from a public domain graphic by Joseph Minard
[https://en.wikipedia.org/wiki/Charles_Joseph_Minard](https://en.wikipedia.org/wiki/Charles_Joseph_Minard)
The graphic was hand-digitized by Leeland Wilkinson.

### mobydickcounts.csv
This frequency table was built by Dan Rope using Pyon Scikit text analysis tools, based on the Project Gutenberg
text for the book, which is in the public domain. [http://onlinebooks.library.upenn.edu/webbin/gutbook/lookup?num=2701](http://onlinebooks.library.upenn.edu/webbin/gutbook/lookup?num=2701)

### sierpinski.csv
This data set was built by Frank van Ham using well-known algorithms and is in the public domain.

### Unemployment.csv
This data set is public domain data taken from the U.S. Bureau of Labor Statistics [http://www.bls.gov](http://www.bls.gov)

### US States.csv
This data set was assembled by Graham Wills from a variety of public domain U.S. government sources including
the U.S. Census, the U.S. Bureau of Labor Statistics and The United States Social Security Administration.

### whiskey.csv
This data set was part of IBM's Many Eyes suite and is in the public domain.

## cars.csv
The cars data set was original a PRIM-9 dataset, but was massaged for the 1983 ASA Data Exposition. It is public domain
and available in original form at [statlib](http://lib.stat.cmu.edu/datasets/)


text:
template<typename _Object>
class	CStateBurerAttack : public CState<_Object> {
	typedef CState<_Object> inherited;
	typedef CState<_Object> *state_ptr;

	bool				m_force_gravi;
public:
						CStateBurerAttack		(_Object *obj);

	virtual	void		initialize				();

	virtual	void		reselect_state			();
	virtual void		setup_substates			();
	virtual void		check_force_state		();
};

#include "burer_state_attack_inline.h"


text:
`achambers/ember-cli-deploy`, `LevelBossMike/ember-deploy` and `tedconf/ember-cli-front-end-builds` are coming together to create the offical Ember CLI deployment tool, `ember-cli/ember-cli-deploy`.

Users upgrading from the `ember-cli-deploy` npm package `<= v0.0.6` to `>= v0.4.0` will need to follow the migration steps below as the core codebase of the package will be changing completely.

While we are trying our best to maintain backwards compatability for users of `<= v0.0.6`, this will only be temporary and users are strongly urged to migrate ASAP.

## Migrate config

Migrate your `<= v0.0.6` config from this:

```javascript
// config/deploy/staging.js

module.exports = {
  assets: {
    accessKeyId: process.env.AWS_ACCESS_KEY,
    secretAccessKey: process.env.AWS_SECRET,
    bucket: 'staging-bucket',
    region: 'eu-west-1'
  },

  index: {
    host: 'staging-redis.example.com',
    port: '1234'
  }
};
```

```javascript
// config/deploy/production.js

module.exports = {
  assets: {
    accessKeyId: process.env.AWS_ACCESS_KEY,
    secretAccessKey: process.env.AWS_SECRET,
    bucket: 'prod-bucket',
    region: 'eu-west-1'
  },

  index: {
    host: 'production-redis.example.com',
    port: '9876',
    password: process.env.REDIS_PASSWORD
  }
};
```

to this:

```javascript
// config/deploy.js

module.exports = {
  staging: {
    buildEnv: 'staging',
    store: {
      host: 'staging-redis.example.com',
      port: 1234
    },
    assets: {
      accessKeyId: process.env.AWS_ACCESS_KEY,
      secretAccessKey: process.env.AWS_SECRET,
      bucket: 'staging-bucket'
      region: 'eu-west-1'
    }
  },

   production: {
    store: {
      host: 'production-redis.example.com',
      port: 9876,
      password: process.env.REDIS_PASSWORD
    },
    assets: {
      accessKeyId: process.env.AWS_ACCESS_KEY,
      secretAccessKey: process.env.AWS_SECRET,
      bucket: 'prod-bucket'
      region: 'eu-west-1'
    }
  }
};
```

## Migrate adapters

Uninstall the now unsupported adapters:

```shell
$ npm uninstall ember-cli-deploy-redis-index-adapter --save-dev
```

And install the corresponding supported plugins:

```shell
$ npm install ember-deploy-redis --save-dev

$ npm install ember-deploy-s3 --save-dev
```

## Serving of index.html

Due to the way `v0.4.0` now stores the list of previous revisions, [achambers/fuzzy-wookie](https://github.com/achambers/fuzzy-wookie) is no longer compatible with ember-cli-deploy.

If you were using [achambers/fuzzy-wookie](https://github.com/achambers/fuzzy-wookie), please migrate to use [philipheinser/ember-lightning](https://github.com/philipheinser/ember-lightning) instead.

If you wrote your own server to serve the index.html, you will need to modify it in order for it to work with `v0.4.0`.  The breaking change is that instead of storing just `sha` in the list of previous revisions,ember-cli-deploy now stores `app-name:sha`.  Please make any changes necessary to your server to support this change.

## Unsupported commands

A number of commands became deprecated in `v0.4.0` and will become unsupported in future versions very soon.

- instead of `ember deploy:index` and `ember deploy:assets`, please use `ember deploy`
- instead of `ember activate`, please use `ember deploy:activate`
- instead of `ember deploy:versions`, please use `ember deploy:list`


text:
<script src="../home-assistant-js/dist/homeassistant.min.js"></script>

<script>
  (function() {
    var DOMAINS_WITH_CARD = ['thermostat', 'configurator', 'scene', 'media_player'];
    var DOMAINS_WITH_MORE_INFO = [
      'light', 'group', 'sun', 'configurator', 'thermostat', 'script', 'media_player', 'camera'
    ];

    var reactor = window.hass.reactor;
    var serviceGetters = window.hass.serviceGetters;
    var authActions = window.hass.authActions;
    var preferences = window.hass.localStoragePreferences;

    window.hass.uiActions = {
      validateAuth: function(authToken, rememberAuth) {
        authActions.validate(authToken, {
          rememberAuth: rememberAuth,
          useStreaming: preferences.useStreaming,
        });
      },
    };

    // UI specific util methods
    window.hass.uiUtil = {
      stateCardType: function(state) {
        if(DOMAINS_WITH_CARD.indexOf(state.domain) !== -1) {
          return state.domain;
        } else if(reactor.evaluate(serviceGetters.canToggle(state.entityId))) {
          return "toggle";
        } else {
          return "display";
        }
      },

      stateMoreInfoType: function(state) {
        if(DOMAINS_WITH_MORE_INFO.indexOf(state.domain) !== -1) {
          return state.domain;
        } else {
          return 'default';
        }
      },

      attributeClassNames: function(stateObj, attributes) {
        if (!stateObj) return '';
        return attributes.map(function(attribute) {
          return attribute in stateObj.attributes ? 'has-' + attribute : '';
        }).join(' ');
      },
    };
  })();
</script>

<link rel="import" href="./moment-js.html">


text:
<?php

namespace Volley\Bundle\FaceBundle\Entity;

use Doctrine\ORM\EntityRepository;

/**
 * RoundRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class RoundRepository extends EntityRepository
{
}


text:
package com.tarena.el.android.compass;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.util.AttributeSet;
import android.view.View;

public class SampleView extends View {
	private Paint mPaint = new Paint();
	private Path mPath = new Path();
	private float[] mValues;

	public SampleView(Context context,AttributeSet attrs) {
		super(context,attrs);
		mPath.moveTo(0, -50);
		mPath.lineTo(-20, 60);
		mPath.lineTo(0, 50);
		mPath.lineTo(20, 60);
		mPath.close();

	}

	public void setValues(float[] mValues) {
		this.mValues = mValues;
	}

	@Override
	protected void onDraw(Canvas canvas) {
		Paint paint = mPaint;
		paint.setColor(Color.WHITE);

		int w = canvas.getWidth();
		int h = canvas.getHeight();

		canvas.translate(w/ 2, h/ 2);

		if (mValues != null) {
			canvas.rotate(-mValues[0]);
		}
		canvas.drawPath(mPath, mPaint);
	}

}


text:
#ifndef TEST_H
#define TEST_H

/** Compare two signed integer numbers and log an failure if not equal. It should be
    called inside a test case.
    @param expected Expected value.
    @param value Actual value.
    @see DEFINE_TEST_CASE */
#define CHECK_EQUAL(expected, value) \
    TestCheckEqualSignedIntegers(expected, value, __FUNCTION__, __FILE__, __LINE__)
/** Compare two unsigned integer numbers and log an failure if not equal. It should be
    called inside a test case.
    @param expected Expected value.
    @param value Actual value.
    @see DEFINE_TEST_CASE */
#define CHECK_EQUAL_UNSIGNEDS(expected, value) \
    TestCheckEqualUnsignedIntegers(expected, value, __FUNCTION__, __FILE__, __LINE__)
/** Compare two strings (case sentitive) and log an failure if not equal. It should be
    called inside a test case.
    @param expected Expected value.
    @param value Actual value.
    @see DEFINE_TEST_CASE */
#define CHECK_EQUAL_STRINGS(expected, value) \
    TestCheckEqualStrings(expected, value, __FUNCTION__, __FILE__, __LINE__)

/** Define a test case function.
    @param testCaseName Name of the test case, it's used as part of the test case
    function name, so it should follow C language identifiers rules.
    @see CHECK_EQUAL, CHECK_EQUAL_UNSIGNEDS, CHECK_EQUAL_STRINGS */
#define DEFINE_TEST_CASE(testCaseName) \
    void testCaseName##TestCase()
/** This macro creates a test case instance to be used inside a test suite definition.
    @param testCaseName Name of the test case, it's used as part of the test case
    function name, so it should follow C language identifiers rules.
    @see DEFINE_TEST_SUITE */
#define TEST_CASE(testCaseName) \
    { \
        .name = #testCaseName, \
        .function = testCaseName##TestCase \
    }

/** Define a test suite & allocates the needed variables for the test suite & its
    test cases.
    @param testSuiteName Test suite name, it's used as part of the test case
    function name, so it should follow C language identifiers rules.
    @param ... Variable list of parameters containing the list of test cases instances
    of this test suite.
    @see TEST_CASE */
#define DEFINE_TEST_SUITE(testSuiteName, ...) \
    static TEST_CASE_INFO testSuiteName##TestCases[] = {__VA_ARGS__}; \
    static TEST_SUITE_INFO testSuiteName##TestSuite = \
    { \
        .name = #testSuiteName, \
        .testCases = testSuiteName##TestCases, \
        .testCasesCount = sizeof(testSuiteName##TestCases) / sizeof(TEST_CASE_INFO) \
    }
/** This macro references to a test suite variable. It's used to reference it & run it.
    @param testSuiteName Test suite name, it's used as part of the test case
    function name, so it should follow C language identifiers rules.
    @see RUN_TEST_SUITES */
#define TEST_SUITE(testSuiteName) \
    testSuiteName##TestSuite

/** Run test suites.
    @param ... Variable list of parameters containing the list of test suites instances.
    @see TEST_SUITE, ERRORS_COUNT */
#define RUN_TEST_SUITES(...) \
    TEST_SUITE_INFO testSuites[] = {__VA_ARGS__}; \
    RunTestSuites(testSuites, sizeof(testSuites) / sizeof(TEST_SUITE_INFO))
/** Returns the count of errors of the test cases inside the test suites after run them.
    Each test case can fail several times (one per failed check).
    @see RUN_TEST_SUITES */
#define ERRORS_COUNT GetTestErrorsCount()

/** Creates the XML report file.
    @param fileName File name for the report file. It could be also @c stdout or @c stderr.
    @see CLOSE_REPORT
    @note The use of this macro is optional, default XML report is stdout.
    @warning If you call this macro with a regular file name, be sure of calling the macro
    @c CLOSE_REPORT at the end of the suites run. */
#define CREATE_REPORT(fileName) CreateReportFile(fileName)
/** Close the XML report file.
    @see CREATE_REPORT
    @note The use of this macro is optional, default XML report is stdout. */
#define CLOSE_REPORT() CloseReportFile()

/***************************************************************
   INTERNAL STUFF, don't use directly, just just macros above.
 ***************************************************************/

/** Pointer to a test case function. */
typedef void (* TEST_CASE_FUNCTION)();
/** Test case information structure. */
typedef struct
{
    /** Test case name. */
    const char *name;
    /** Test case function. */
    const TEST_CASE_FUNCTION function;
} TEST_CASE_INFO;
/** Test suite information structure. */
typedef struct
{
    /** Test suite name. */
    const char *name;
    /** Array of test cases. */
    const TEST_CASE_INFO *testCases;
    /** Count of elements in the test cases array. */
    unsigned int testCasesCount;
} TEST_SUITE_INFO;

/** Compare two signed integer numbers and log an failure if not equal. It should be
    called inside a test case.
    @param expected Expected value.
    @param value Actual value.
    @param function Calling function name.
    @param fileName Calling file name.
    @param line Calling line of code.
    @see CHECK_EQUAL
    @warning Don't call this function, use macro instead. */
void TestCheckEqualSignedIntegers(int expected, int value, const char *function,
                                  const char *fileName, unsigned int line);
/** Compare two unsigned integer numbers and log an failure if not equal. It should be
    called inside a test case.
    @param expected Expected value.
    @param value Actual value.
    @param function Calling function name.
    @param fileName Calling file name.
    @param line Calling line of code.
    @see CHECK_EQUAL_UNSIGNEDS
    @warning Don't call this function, use macro instead. */
void TestCheckEqualUnsignedIntegers(unsigned int expected, unsigned int value, const char *function,
                                    const char *fileName, unsigned int line);
/** Compare two strings (case sentitive) and log an failure if not equal. It should be
    called inside a test case.
    @param expected Expected value.
    @param value Actual value.
    @param function Calling function name.
    @param fileName Calling file name.
    @param line Calling line of code.
    @see CHECK_EQUAL_STRINGS
    @warning Don't call this function, use macro instead. */
void TestCheckEqualStrings(const char *expected, const char *value, const char *function,
                           const char *fileName, unsigned int line);
/** Run test suites.
    @param testSuites Array of test suites instances to run.
    @param testSuitesCount Count of elements of the array of test suites.
    @see RUN_TEST_SUITES
    @warning Don't call this function, use macro instead. */
void RunTestSuites(const TEST_SUITE_INFO *testSuites, unsigned int testSuitesCount);
/** Returns the count of errors of the test cases inside the test suites after run them.
    Each test case can fail several times (one per failed check).
    @see ERRORS_COUNT
    @warning Don't call this function, use macro instead. */
unsigned int GetTestErrorsCount();

/** Set the XML report file.
    @param fileName File name for the report file. It could be also @c stdout or @c stderr. */
void CreateReportFile(const char *fileName);
/** Close the XML report file. */
void CloseReportFile();

#endif


text:
#ifndef FREERDP_LIB_CORE_NEGO_H
#define FREERDP_LIB_CORE_NEGO_H

#include "transport.h"

#include <freerdp/types.h>
#include <freerdp/settings.h>
#include <freerdp/log.h>
#include <freerdp/api.h>

#include <winpr/stream.h>

/* Protocol Security Negotiation Protocols
 * [MS-RDPBCGR] 2.2.1.1.1 RDP Negotiation Request (RDP_NEG_REQ)
 */
#define PROTOCOL_RDP       0x00000000
#define PROTOCOL_SSL       0x00000001
#define PROTOCOL_HYBRID    0x00000002
#define PROTOCOL_RDSTLS    0x00000004
#define PROTOCOL_HYBRID_EX 0x00000008

#define PROTOCOL_FAILED_NEGO	0x80000000 /* only used internally, not on the wire */

/* Protocol Security Negotiation Failure Codes */
enum RDP_NEG_FAILURE_FAILURECODES
{
	SSL_REQUIRED_BY_SERVER = 0x00000001,
	SSL_NOT_ALLOWED_BY_SERVER = 0x00000002,
	SSL_CERT_NOT_ON_SERVER = 0x00000003,
	INCONSISTENT_FLAGS = 0x00000004,
	HYBRID_REQUIRED_BY_SERVER = 0x00000005,
	SSL_WITH_USER_AUTH_REQUIRED_BY_SERVER = 0x00000006
};

/* Authorization Result */
#define AUTHZ_SUCCESS		0x00000000
#define AUTHZ_ACCESS_DENIED	0x0000052E

enum _NEGO_STATE
{
	NEGO_STATE_INITIAL,
	NEGO_STATE_EXT, /* Extended NLA (NLA + TLS implicit) */
	NEGO_STATE_NLA, /* Network Level Authentication (TLS implicit) */
	NEGO_STATE_TLS, /* TLS Encryption without NLA */
	NEGO_STATE_RDP, /* Standard Legacy RDP Encryption */
	NEGO_STATE_FAIL, /* Negotiation failure */
	NEGO_STATE_FINAL
};
typedef enum _NEGO_STATE NEGO_STATE;

/* RDP Negotiation Messages */
enum RDP_NEG_MSG
{
	/* X224_TPDU_CONNECTION_REQUEST */
	TYPE_RDP_NEG_REQ = 0x1,
	/* X224_TPDU_CONNECTION_CONFIRM */
	TYPE_RDP_NEG_RSP = 0x2,
	TYPE_RDP_NEG_FAILURE = 0x3
};

#define EXTENDED_CLIENT_DATA_SUPPORTED				0x01
#define DYNVC_GFX_PROTOCOL_SUPPORTED				0x02
#define RDP_NEGRSP_RESERVED					0x04
#define RESTRICTED_ADMIN_MODE_SUPPORTED				0x08

#define PRECONNECTION_PDU_V1_SIZE				16
#define PRECONNECTION_PDU_V2_MIN_SIZE				(PRECONNECTION_PDU_V1_SIZE + 2)

#define PRECONNECTION_PDU_V1					1
#define PRECONNECTION_PDU_V2					2

#define RESTRICTED_ADMIN_MODE_REQUIRED				0x01
#define REDIRECTED_AUTHENTICATION_MODE_REQUIRED		0x02
#define CORRELATION_INFO_PRESENT				0x08

typedef struct rdp_nego rdpNego;

FREERDP_LOCAL BOOL nego_connect(rdpNego* nego);
FREERDP_LOCAL BOOL nego_disconnect(rdpNego* nego);

FREERDP_LOCAL int nego_recv(rdpTransport* transport, wStream* s, void* extra);
FREERDP_LOCAL BOOL nego_read_request(rdpNego* nego, wStream* s);

FREERDP_LOCAL BOOL nego_send_negotiation_request(rdpNego* nego);
FREERDP_LOCAL BOOL nego_send_negotiation_response(rdpNego* nego);

FREERDP_LOCAL rdpNego* nego_new(rdpTransport* transport);
FREERDP_LOCAL void nego_free(rdpNego* nego);

FREERDP_LOCAL void nego_init(rdpNego* nego);
FREERDP_LOCAL BOOL nego_set_target(rdpNego* nego, const char* hostname, UINT16 port);
FREERDP_LOCAL void nego_set_negotiation_enabled(rdpNego* nego,
        BOOL NegotiateSecurityLayer);
FREERDP_LOCAL void nego_set_restricted_admin_mode_required(rdpNego* nego,
        BOOL RestrictedAdminModeRequired);
FREERDP_LOCAL void nego_set_gateway_enabled(rdpNego* nego, BOOL GatewayEnabled);
FREERDP_LOCAL void nego_set_gateway_bypass_local(rdpNego* nego,
        BOOL GatewayBypassLocal);
FREERDP_LOCAL void nego_enable_rdp(rdpNego* nego, BOOL enable_rdp);
FREERDP_LOCAL void nego_enable_tls(rdpNego* nego, BOOL enable_tls);
FREERDP_LOCAL void nego_enable_nla(rdpNego* nego, BOOL enable_nla);
FREERDP_LOCAL void nego_enable_ext(rdpNego* nego, BOOL enable_ext);
FREERDP_LOCAL BOOL nego_set_routing_token(rdpNego* nego, BYTE* RoutingToken,
        DWORD RoutingTokenLength);
FREERDP_LOCAL BOOL nego_set_cookie(rdpNego* nego, char* cookie);
FREERDP_LOCAL void nego_set_cookie_max_length(rdpNego* nego,
        UINT32 CookieMaxLength);
FREERDP_LOCAL void nego_set_send_preconnection_pdu(rdpNego* nego,
        BOOL SendPreconnectionPdu);
FREERDP_LOCAL void nego_set_preconnection_id(rdpNego* nego,
        UINT32 PreconnectionId);
FREERDP_LOCAL void nego_set_preconnection_blob(rdpNego* nego,
        char* PreconnectionBlob);

FREERDP_LOCAL UINT32 nego_get_selected_protocol(rdpNego* nego);
FREERDP_LOCAL BOOL nego_set_selected_protocol(rdpNego* nego, UINT32 SelectedProtocol);

FREERDP_LOCAL UINT32 nego_get_requested_protocols(rdpNego* nego);
FREERDP_LOCAL BOOL nego_set_requested_protocols(rdpNego* nego, UINT32 RequestedProtocols);

FREERDP_LOCAL BOOL nego_set_state(rdpNego* nego, NEGO_STATE state);
FREERDP_LOCAL NEGO_STATE nego_get_state(rdpNego* nego);

FREERDP_LOCAL SEC_WINNT_AUTH_IDENTITY* nego_get_identity(rdpNego* nego);

FREERDP_LOCAL void nego_free_nla(rdpNego* nego);

#endif /* FREERDP_LIB_CORE_NEGO_H */


text:
<?php

namespace SharePoint\PHP\Client;

class ChangeSite extends Change
{

}


text:
"""
Copyright (c) 2015, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file COPYING.txt, distributed with this software.
Created on Aug 24, 2015
"""
from atom.api import (
    Bool,
    Coerced,
    Enum,
    Event,
    ForwardInstance,
    Int,
    Property,
    Str,
    Typed,
    observe,
)
from enaml.core.declarative import d_
from enaml.icon import Icon
from enaml.layout.geometry import Size
from enaml.widgets.control import Control, ProxyControl

class ProxyAbstractWidgetItemGroup(ProxyControl):
    #: Reference to the declaration
    declaration = ForwardInstance(lambda: AbstractWidgetItemGroup)

    def set_selectable(self, selectable):
        pass

class ProxyAbstractWidgetItem(ProxyControl):
    #: Reference to the declaration
    declaration = ForwardInstance(lambda: AbstractWidgetItem)

    def set_row(self, row):
        pass

    def set_column(self, column):
        pass

    def set_text(self, text):
        pass

    def set_text_alignment(self, text_alignment):
        pass

    def set_icon(self, icon):
        pass

    def set_icon_size(self, size):
        pass

    def set_editable(self, editable):
        pass

    def set_checkable(self, checkable):
        pass

class AbstractWidgetItemGroup(Control):

    #: Triggered when clicked
    clicked = d_(Event(), writable=False)

    #: Triggered when double clicked
    double_clicked = d_(Event(), writable=False)

    #: Triggered when the row, column, or item is entered
    entered = d_(Event(), writable=False)

    #: Triggered when the row, column, or item is pressed
    pressed = d_(Event(), writable=False)

    #: Triggered when the row, column, or item's selection changes
    selection_changed = d_(Event(bool), writable=False)

    def _get_items(self):
        return [c for c in self.children if isinstance(c, AbstractWidgetItem)]

    #: Internal item reference
    _items = Property(lambda self: self._get_items(), cached=True)

    def child_added(self, child):
        """Reset the item cache when a child is added"""
        super(AbstractWidgetItemGroup, self).child_added(child)
        self.get_member("_items").reset(self)

    def child_removed(self, child):
        """Reset the item cache when a child is removed"""
        super(AbstractWidgetItemGroup, self).child_removed(child)
        self.get_member("_items").reset(self)

class AbstractWidgetItem(AbstractWidgetItemGroup):
    """Item to be shared between table views and tree views"""

    #: Model index or row within the view
    row = d_(Int(), writable=False)

    #: Column within the view
    column = d_(Int(), writable=False)

    #: Text to display within the cell
    text = d_(Str())

    #: Text alignment within the cell
    text_alignment = d_(
        Enum(
            *[
                (h, v)
                for h in ("left", "right", "center", "justify")
                for v in ("center", "top", "bottom")
            ]
        )
    )

    #: Icon to display in the cell
    icon = d_(Typed(Icon))

    #: The size to use for the icon. The default is an invalid size
    #: and indicates that an appropriate default should be used.
    icon_size = d_(Coerced(Size, (-1, -1)))

    #: Whether the item or group can be selected
    selectable = d_(Bool(True))

    #: Selection state of the item or group
    selected = d_(Bool())

    #: Whether the item or group can be checked
    checkable = d_(Bool())

    #: Checked state of the item or group
    checked = d_(Bool())

    #: Whether the item or group can be edited
    editable = d_(Bool())

    #: Triggered when the item's contents change
    changed = d_(Event(), writable=False)

    #: Triggered when the checkbox state changes
    toggled = d_(Event(bool), writable=False)

    @observe(
        "row",
        "column",
        "text",
        "text_alignment",
        "icon",
        "icon_size",
        "selectable",
        "selected",
        "checkable",
        "checked",
        "editable",
    )
    def _update_proxy(self, change):
        """An observer which sends state change to the proxy."""
        if change["name"] in ["row", "column"]:
            super(AbstractWidgetItem, self)._update_proxy(change)
        else:
            self.proxy.data_changed(change)


text:
<TITLE>Review for Moonraker (1979)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Moonraker (1979)

reviewed by
Steve Rhodes

                              MOONRAKER
                     A film review by Steve Rhodes
                      Copyright 1998 Steve Rhodes

RATING (0 TO ****):  ** 1/2

     "Houston calling, Houston calling," a frustrated NASA ground
controller says, trying reach James Bond and his female CIA companion
out in space.  Well, devotees of the series can guess their
compromising positions, so when the controller announces he is about to
initiate a live video feed directly into the White House and Buckingham
Palace, the audience knows that we are about to have some embarrassed
world leaders.  Bond, on the other hand, remains typically unfazed.
He's used to having his affairs being interrupted and observed.
Another hard day in the life of the planet's most famous secret agent.

     In the opening to 1979's MOONRAKER, the American space shuttle of
the same name is stolen from the top of the 747 on which it is being
carried to Britain.  In a spectacular action sequence, the shuttle
blasts away, turning the 747 into a fireball.

     The maker of the shuttle and several others like it is a wealthy
industrialist named Mr. Drax (Michel Lonsdale).  He lives in California
in an enormous French chateau, which he had brought over stone by stone
from France.  (He purchased the Eiffel Tower as well, but the
inhospitable French wouldn't give him an export permit.)

     When the British government enlists the aid of its best agent to
investigate the shuttle's disappearance, James starts his inquiries at
Mr. Drax's home and laboratories.  With complete lack of subtly, the
nefarious Mr. Drax sends his henchman, Chang, played without much
energy by Toshiro Suga, to see that Mr. Bond's visit isn't a pleasant
one.  "Take care of Mr. Bond," Drax instructs Chang.  "See that some
harm comes to him."

     In his fourth outing as James Bond and now firmly entrenched in
his role as the superspy, Roger Moore seems comfortable in his
perfectly tailored blue suit as he charms every female character.  One
of them, CIA agent Holly Goodhead, played by Lois Chiles from BROADCAST
NEWS, has a knockout body and her own little bag of spy gadgets that
rivals Bond's.

     From France set in California, James hops the globe to Venice in
pursuit of Dr. Goodhead -- she's in disguise as a member of Drax's
space institute.  And to the serenity of the peach colored stone walls
of the Venetian canals, Bond and those chasing him bring powerboats,
machine guns and gondolas that go on land as well as water.  There's
even a knife-wielding corpse who pops out of a gasket during a funeral
procession through the Venetian waterways.

     On the next stop in our spy adventure cum travelogue we take the
supersonic Concorde to Rio de Janeiro as Bond follows a lead on an
ultra-poisonous gas.  Like any tourist James relaxes a bit.  His
version of casual dress is to trade his blue suit in briefly for a
white one.  His informality doesn't last long.  Soon he's decked out in
a formal tuxedo, in which, as in everything he wears; he looks straight
out of a GQ fashion shoot.

     Jaws (Richard Kiel), the man with a mouth of metal from THE SPY
WHO LOVED ME, returns again to try to thwart our hero.  Although his
metal may make mincemeat of his victims, we do learn some of its
downsides, clearing security's metal detectors at airports being one.
Why Bond and Dr. Goodhead choose to engage a seven-foot giant like Jaws
in hand-to-hand combat rather than just plugging him is one of the
story's many mysteries.  But just as you're not supposed to question
the logic of cartoons, neither should you waste too much time pondering
the likelihood of Bond's predicaments and their resolutions.

     The bad guy's plan this time is suitably dastardly.  Our
megalomaniac plans on ending civilization on the earth, it's a complete
annihilation with repopulation by carefully selected humans.  With
shades of the ark, the space shuttles carry young couples who look like
the cast of STARSHIP TROOPERS.

     The space odyssey scenes, although fresh, slow down the pacing of
a story already having trouble keeping up its momentum.  And although
the fight with a big rubber snake, I mean a man-crushing python, isn't
much, the battle with the green-light laser weapons does have good
visuals even if it looks lifted straight out of STAR WARS.

     Besides, any movie where the lead wears a coat and a tie in a
centrifuge is clearly one that doesn't need to be taken too seriously.
Just kick back and enjoy it.

     MOONRAKER runs a little long at 2:06.  It is rated PG for comic
violence and sexual innuendo and would be fine for kids around 9 and
up.

     My son Jeffrey, almost 9, said he thought it was a good movie, and
he ended up liking Jaws, whom he hated in the last episode.  He
especially liked the scenes in space with all of the super-lasers
shooting at each other.  His favorite weapon was Bond's "flick of the
wrist gun."

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
"""
Test that fenced_code works as desired.
"""

from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler

def setup_module(module):
    module.environ = {'tiddlyweb.config': {'markdown.wiki_link_base': ''}}

def test_simple_fence():
    tiddler = Tiddler('Foo')

    tiddler.text = """
Crikey
======

There was a problem in the system so we decided to make
some changes to the config:

```
True = False
```

We did not get the desired results:

```
the cow    died
```
"""

    output = render(tiddler, environ)

    assert """config:

True = False

""" in output

    # see those 4 spaces
    assert """

the cow    died

""" in output


text:
<?php

namespace Acre\Core;

use TimberMenu;

class Menu extends TimberMenu
{
    public $MenuItemClass = 'Acre\Core\MenuItem';
    public $PostClass = 'Acre\PostTypes\Post';
}


text:
package com.telefonica.euro_iaas.paasmanager.manager;

import java.util.List;

import com.telefonica.euro_iaas.commons.dao.AlreadyExistsEntityException;
import com.telefonica.euro_iaas.commons.dao.EntityNotFoundException;
import com.telefonica.euro_iaas.commons.dao.InvalidEntityException;
import com.telefonica.euro_iaas.paasmanager.exception.InfrastructureException;
import com.telefonica.euro_iaas.paasmanager.model.Rule;

public interface RuleManager {

    /**
     * Create an rule.
     *
     * @param rule
     * @return the securityGroup.
     */
    Rule create(String region, String token, String vdc, Rule rule) throws InvalidEntityException,
            AlreadyExistsEntityException, InfrastructureException;

    /**
     * Destroy a previously creted rule.
     *
     * @param rule
     *            the candidate to rule
     */
    void destroy(String region, String token, String vdc, Rule rule) throws InvalidEntityException,
            InfrastructureException;

    /**
     * Find the rule using the given name.
     *
     * @param name
     *            the name
     * @return the rule
     * @throws EntityNotFoundException
     *             if the product instance does not exists
     */
    Rule load(String name) throws EntityNotFoundException;

    /**
     * Retrieve all Environment created in the system.
     *
     * @return the existent environments.
     */
    List<Rule> findAll();

}


text:
import Post from '../../../components/Post'

export default (store) => {
  return {
    path: 'post-list',
    component: Post
  }
}


text:
declare module Jsen {

    export interface JsenFormats {
        [key: string]: string | RegExp | Function;
    }

    export interface JsenSettings {
        missing$Ref?: boolean;
        greedy?: boolean;
        formats?: JsenFormats;
        schemas?: any;
    }

    export interface JsenBuildSettings {
        copy?: boolean;
        additionalProperties?: boolean;
    }

    export interface JsenValidator {
        (data?: any): boolean;
        build(initial?: any, options?: JsenBuildSettings): any;
        errors: JsenValidateError[];
    }

    export interface JsenValidateError {
        path: string;
        keyword: string;
        message?: string;
    }

    export interface JsenUnique {
        (array: any[]): boolean;
        findIndex(array: any[], value: any, comparator: (obj1: any, obj2: any) => boolean): number;
    }

    export interface JsenMain {
        (schema?: any, options?: JsenSettings): JsenValidator;
        clone(data: any): any;
        equal(a: any, b: any): boolean;
        unique: JsenUnique;
    }
}

declare module "jsen" {
    var _jsen: Jsen.JsenMain;
    export = _jsen;
}


text:
#ifndef __UTF16ENCODINGCONVERTERS_H__
#define __UTF16ENCODINGCONVERTERS_H__

#include "ZLEncodingConverter.h"
#include "ZLEncodingConverterProvider.h"

class Utf16EncodingConverterProvider : public ZLEncodingConverterProvider {

public:
	bool providesConverter(const std::string &encoding);
	shared_ptr<ZLEncodingConverter> createConverter(const std::string &encoding);
};

#endif /* __UTF16ENCODINGCONVERTERS_H__ */


text:
require 'test_helper'

module V1
  # Authenticate API
  class AuthControllerTest < ActionDispatch::IntegrationTest
    include ActiveJob::TestHelper
    setup do
      @client = clients(:one)
      @client_2 = clients(:two)
      @redirect_url = 'http://localhost'
    end

    def switch_email(client_1, client_2)
      email_1 = client_1.email
      email_2 = client_2.email
      client_1.update email: 'tempemail.address'
      assert client_2.update email: email_1
      assert client_1.update email: email_2
    end

    test 'client should login with email and password' do
      assert @client.confirm!
      params = { email: @client.email, password: 'password' }
      post v1_auth_login_url, params: params
      assert_response :success
      token = JSON.parse(@response.body)['data']['attributes']['token']
      assert Client.decode_jwt(token)
    end

    test 'client should signup with email name and password ' do
      params = { email: 'new@email.com', password: 'password', name: 'test' }
      post v1_auth_signup_url, params: params
      assert_response :success
      assert_match(/attributes/, @response.body)
      assert_match(/token/, @response.body)
    end

    test 'client should not signup without name' do
      params = { email: 'new@emmail.com', password: 'password' }
      post v1_auth_signup_url, params: params
      assert_response :unprocessable_entity
    end

    # request email confirmation with redirect uri for the confirm link
    test 'client should request confirmation email' do
      assert_enqueued_jobs 1 do
        params = { email: @client.email, redirect_to: @redirect_url }
        post v1_auth_request_confirm_url, params: params
      end
      assert_response :success
    end

    test 'client should confirm with token' do
      post v1_auth_confirm_url, params: { token: @client.jwt }
      assert_response :success
      token = JSON.parse(@response.body)['data']['attributes']['token']
      assert Client.decode_jwt(token)
    end

    test 'client should not confirm after two clients switching emails' do
      token = @client.jwt
      switch_email(@client, @client_2)
      post v1_auth_confirm_url, params: { token: token }
      assert_response :gone
      assert_no_match(/token/, @response.body)
      assert_not @client.confirmed?
      assert_not @client_2.confirmed?
    end

    test 'client should request password reset' do
      assert_enqueued_jobs 1 do
        params = { email: @client.email, redirect_to: @redirect_url }
        post v1_auth_request_reset_url, params: params
      end
      assert_response :success
    end

    test 'client should reset the password with token' do
      params = { reset_password_token: @client.jwt, password: 'ttt' }
      post v1_auth_reset_url, params: params
      assert_response :success
      token = JSON.parse(@response.body)['data']['attributes']['token']
      assert Client.decode_jwt(token)
      @client.reload
      assert @client.authenticate('ttt')
    end

    test 'client user account should signin client user account with token' do
      payload = { uid: 32, cid: @client.cid }
      params = { cid: @client.cid, token: @client.jwt(payload, @client.secret) }
      post v1_auth_signin_client_account_url, params: params
      assert_response :success
      token = JSON.parse(@response.body)['token']
      assert Account.decode_jwt(token)
    end
  end
end


text:
var Annotation = require('../lib/Annotation');
var assert = require('chai').assert;
var _ = require('lodash');
var recast = require('recast');

describe('Annotation', function() {

	describe('constructor', function() {

		it('is a function', function() {
			assert.equal(typeof Annotation, 'function', 'expected Annotation to be a function');
		});

		it('throws a SyntaxError when new keyword is not used', function() {
			assert.throws(function() {
				var a = Annotation({
					name: 'foo'
				});
			}, SyntaxError);

			assert.doesNotThrow(function() {
				var a = new Annotation({
					name: 'foo'
				});
			});
		});
	});

	describe('detection', function() {

		it('builds a regex containing the annotation name', function() {
			var a = new Annotation({
				name: 'foo'
			});
			assert(a.regex instanceof RegExp, 'expected .regex to be a regular expression');
			assert(a.regex.toString().indexOf('foo') >= 0, 'expected .regex to contain annotation name');
		});

		it('builds a regex containing all aliases', function() {
			var aliases = ['beep', 'boop', 'bop'];
			var a = new Annotation({
				name: 'foo',
				aliases: aliases
			});
			_.each(aliases, function(alias) {
				assert(a.regex.toString().indexOf(alias) >= 0, 'expected .regex to contain alias "' + alias + '"');
			});
		});

		it('detects existence of annotation JSDoc comments', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function'
			});
			var goodComments = [
				'/** @foo */',
				'/**\n * @foo\n */'
			];
			_.each(goodComments, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert(a.commentContainsAnnotation(val), 'expected annotation to detect existence of @foo in ' + comment);
			});
		});

		it('detects annotation aliases', function() {
			var a = new Annotation({
				name: 'foo',
				aliases: ['beep', 'boop', 'bop'],
				type: 'function'
			});
			var goodComments = [
				'/** @beep */',
				'/**\n * @beep\n */',
				'/** @boop */',
				'/**\n * @boop\n */',
				'/** @bop */',
				'/**\n * @bop\n */',
			];
			_.each(goodComments, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert(a.commentContainsAnnotation(val), 'expected annotation to detect existence of @foo in ' + comment);
			});
		});

		it('ignores non JSDoc comments', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function'
			});
			var badComments = [
				'// @foo',
				'/* @foo */',
				'/*** @foo */',
				'/*\n @foo\n */'
			];
			_.each(badComments, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert.isFalse(a.commentContainsAnnotation(val), 'expected annotation to ignore ' + comment);
			});
		});

		it('ignores other annotations', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function'
			});
			var badComments = [
				'/** @bar */',
				'/**\n * @foobar\n */'
			];
			_.each(badComments, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert.isFalse(a.commentContainsAnnotation(val), 'expected annotation to ignore ' + comment);
			});
		});

	});

	describe('value retrieval', function() {
		it('retrieves annotation value from comments', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function',
				defaultValue: 'baz'
			});
			var commentsWithValues = [
				'/**\n * @foo bar\n */',
				'/** @foo bar */'
			];
			_.each(commentsWithValues, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert.equal(a.getAnnotationValueFromComment(val), 'bar', 'expected annotation to retrieve "bar" from ' + comment);
			});
		});

		it('retrieves multiple values when annotation is repeated', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function',
				defaultValue: 'baz'
			});
			var comment = '/**\n * @foo beep\n * another comment\n * @foo {boop} bop\n */';
			var val = recast.parse(comment).program.comments[0].value;
			var annotationValues = a.getAnnotationValueFromComment(val);
			assert.equal(annotationValues.length, 2, 'expected to get two annotation values');
			assert.equal(annotationValues[0], 'beep', 'expected first annotation value to be "beep"');
			assert.equal(annotationValues[1], '{boop} bop', 'expected second annotation value to be "{boop} bop"');
		});

		it('returns default value if no value is found alongside annotation', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function',
				defaultValue: 'bar'
			});
			var commentsWithValues = [
				'/**\n * @foo\n */',
				'/** @foo */'
			];
			_.each(commentsWithValues, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert.equal(a.getAnnotationValueFromComment(val), 'bar', 'expected annotation to return default annotation value for ' + comment);
			});
		});

		it('trims whitespace around annotation values', function() {
			var a = new Annotation({
				name: 'foo',
				type: 'function',
				defaultValue: 'baz'
			});
			var commentsWithValues = [
				'/**\n * @foo      bar     \n */',
				'/** @foo 		bar		 */'
			];
			_.each(commentsWithValues, function(comment) {
				var val = recast.parse(comment).program.comments[0].value;
				assert.equal(a.getAnnotationValueFromComment(val), 'bar', 'expected annotation to retrieve "bar" from ' + comment);
			});
		});
	});

});


text:
@interface NBPhoneMetadataVC : NBPhoneMetaData
{
}

- (id)init;

@end


text:
---
license: 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.
---

# BlackBerry Plugins

This guide shows how to develop an Echo plugin on BlackBerry.  The
Plugin Development Guide provides a broad overview with which you
should already be familiar, and this guide picks up where it leaves
off.  In addition, download the [Cordova BlackBerry
repository](https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git).

The `Cordova-BlackBerry` project allows you to deploy to BlackBerry
devices such as the Torch, Bold, and Playbook. The Playbook uses a
different code base than other BlackBerry handheld devices, for which
you need to duplicate your development efforts.  This guide focuses on
the handheld devices rather than tablets. (In the future, this guide
should cover both platforms.)

The Echo plugin essentially returns whatever message a user provides
to the `window.echo` function:

    window.echo = function(str, callback) {
        cordova.exec(callback, function(err) {
            callback('Nothing to echo.');
        }, "Echo", "echo", [str]);
    };

## Modifying plugins.xml

Your project's `www/plugins.xml` directory contains all of the
necessary references to your Cordova project's plugins. Add an
additional reference so that when `cordova.exec` is called, Cordova
knows how to map the `Echo` argument of `cordova.exec` to the `Echo`
class that we want to write natively:

    <feature name="Echo">
        <param name="blackberry-package" value="org.apache.cordova.echo.Echo" />
    </feature>

## Adding Echo.java

If you notice the structure of the value attribute, you'll see a
defined path that leads to the Echo plugin. In the root directory of the
Cordova BlackBerry WebWorks repo, look for a directory called `framework`.
This directory contains all of the source code that runs natively on the
BlackBerry. Navigate to `framework/ext/src/org/apache/cordova`. At
this point, you'll see all of the plugin directorys, inside of which is
the source code. So add the directory echo to
`framework/ext/src/org/apache/cordova/echo` and create a file called
`Echo.java` at `framework/ext/src/org/apache/cordova/echo/Echo.java`.

## Writing Echo.java

The basic idea behind writing a plugin is to create a class that
extends the Plugin class and have a method called `execute` to return
a `PluginResult` class. Any call to `cordova.exec` passes in the
action to execute within the class, as well as the arguments. In this
case, "echo" is the action we want to execute within the class "Echo"
and [str] are the arguments we are passing in.

    package org.apache.cordova.echo;

    import org.apache.cordova.api.Plugin;
    import org.apache.cordova.api.PluginResult;
    import org.apache.cordova.json4j.JSONArray;
    import org.apache.cordova.json4j.JSONException;
    import org.apache.cordova.json4j.JSONObject;
    /**
     * A simple plugin to demonstrate how to build a plugin for BlackBerry
     * Basically echos back the msg that a user calls to this plugin
     */
    public final class Echo extends Plugin {

        public static final String echo = "echo";

        public PluginResult execute(String action, JSONArray args, String callbackId) {
            PluginResult result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Echo: Invalid action:" + action);
            if(action.equals(echo)){
                try {
                    String theMsg = args.getString(0);
                    if(theMsg!= null || theMsg.length()>0){
                        result = new PluginResult(PluginResult.Status.OK, theMsg);
                    }else{
                        result = new PluginResult(PluginResult.Status.ERROR, "Nothing to echo.");
                    }
                } catch (JSONException e) {
                    result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
                }
            }

            return result;
        }

    }

So if we look at the code above, we can see that within the execute
method, we are first looking for what actions are coming in. The Echo
plugin has only one action, `echo`, so we will be only checking for
that. If our plugin had more actions, it's simply a matter of adding
more conditional tests to check for those actions.

We are then going to grab the message coming in from the arguments
which is supplied by the args parameter.  We can grab the first
argument by simply doing `String theMsg = args.getString(0);`.

We will do some error checking and if the message looks okay, we will
instantiate a new PluginResult with an ok status:
`PluginResult.Status.OK` and return the message: `theMsg`. After this,
we return the result which to be passed back to JavaScript to be fired
in the success callback. If something fails, we can return various
status exceptions like `PluginResult.Status.ERROR`,
`PluginResult.Status.JSON_EXCEPTION`, or
`PluginResult.Status.INVALID_ACTION`. When passed back, these types of
results fire the fail callback in JavaScript.

## Updating the .jar in your project's www directory

The added `Echo.java` needs to be updated in your project.  To build
the `.jar` file, Navigate to the BlackBerry WebWorks repo's root
directory and run the `ant` command:

    ant update -Dproject.path="~/path_to_my_project"

This builds a new `.jar` file in the `build/ext` directory. Copy the
`build/ext/cordova.jar` file into your `project/www/ext` directory.

If all goes well, that allows you to use the Echo plugin in
BlackBerry.


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Writing More Spells — Hex 0.1 documentation</title>

    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="top" title="Hex 0.1 documentation" href="index.html" />
    <link rel="next" title="Spellbook" href="spellbook.html" />
    <link rel="prev" title="Hex Client" href="hex_client.html" />

Navigation

          index

          modules |

          next |

          previous |

Hex 0.1 documentation »

Writing More Spells¶

When you want to start writing your own spells, you’ll probably want to write a
program in python.

Spell structure¶

A spell is a dictionary with two possible keys: setup and loop. If setup is
defined, it will be run once at the beginning of the spell. If loop is defined,
it will run over and over until your time limit is reached. You may define both
setup and loop, but at least one must be defined for a spell to be valid.
Setup and loop should each be a list of frames:

spell = {
    'setup': [], # A list of frames...
    'loop': [] # Another list of frames...
}

Frames¶

Any animation consists of frames–still pictures–which change rapidly. The Hex
tries to show 24 frames per second, but sometimes lags a bit slower.

Each frame is a list containing color layers. Each color layer is a list of
two lists–the first defines a color and the second lists which bulbs
should be set to that color. By using several color layers in a frame, you can
create a frame which sets each bulb to the color you want.

Many times you don’t need to change a bulb’s color from one frame to the next.
If you don’t change a bulb’s color in a frame, it stays the same color. Here’s an
example frame which sets bulb 0 to be red, bulb 1 to be green, and bulb 2 to be blue:

frame = [
    [ [15, 0, 0, 255], [0] ],
    [ [0, 15, 0, 255], [1] ],
    [ [0, 0, 15, 255], [2] ]
]

Colors¶

Every time you define a color layer, you need to specify a color. A color is a list
of four integers. The first three specify how much red, green, and blue you want,
from 0 to 15. The fourth number specifies how bright you want the light to be, from 0
to 255. Here are a few colors:

red     = [15, 0, 0, 255]
green   = [0, 15, 0, 255]
blue    = [0, 0, 15, 255]
yellow  = [15, 15, 0, 255]
magenta = [15, 0, 15, 255]
cyan    = [0, 15, 15, 255]
white   = [15, 15, 15, 255]

Lights¶

The second part of each color layer is a list of lights. Each light in the hex has a
number:

       / \ / \ / \ / \
      | 3 | 2 | 1 | 0 |
     / \ / \ / \ / \ / \
    | 4 | 20| 19| 18| 17|
   / \ / \ / \ / \ / \ / \
  | 5 | 21| 31| 30| 29| 16|
 / \ / \ / \ / \ / \ / \ / \
| 6 | 22| 32| 36| 35| 28| 15|
 \ / \ / \ / \ / \ / \ / \ /
  | 7 | 23| 33| 34| 27| 14|
   \ / \ / \ / \ / \ / \ /
    | 8 | 24| 25| 26| 13|
     \ / \ / \ / \ / \ /
      | 9 | 10| 11| 12|
       \ / \ / \ / \ /

However, you’ll quickly get tired of writing out lists by hand. The
Spellbook module has some handy functions like <tt class="code docutils literal">all_lights</tt> and
<tt class="code docutils literal">lights_in_ring</tt> which will return a list of lights for you. And you
can always use the built-in <tt class="code docutils literal">range</tt> function to get a list. Check out
the documentation on range
–it’s really powerful. <tt class="code docutils literal">range(0, 18, 3)</tt> returns a list from 0 to 18,
counting by 3.

Putting it all together¶

Here’s an example program that casts a rather annoying spell: The whole Hex will
flash cyan, yellow, and magenta in turn:

from hex_connection import HexConnection
from spellbook import all_lights

connection = HexConnection()

cyanFrame    = [[[0, 15, 15, 255], all_lights() ]]
yellowFrame  = [[[15, 15, 0, 255], all_lights() ]]
magentaFrame = [[[15, 0, 15, 255], all_lights() ]]

spell = {
    'setup': None,
    'loop': [cyanFrame, yellowFrame, magentaFrame]
}

# Let's assume we already have a user called gertrude,
# whose spirit animal is goose.
connection.create_spell('gertrude', 'goose', spell)

Table Of Contents

Writing More Spells

Spell structure

Frames

Colors

Lights

Putting it all together

Previous topic

Hex Client

Next topic

Spellbook

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          modules |

          next |

          previous |

Hex 0.1 documentation »

        © Copyright 2013, Chris Proctor.
      Created using Sphinx 1.2.


text:
/*
 * Manages the current page.
 *
 * Callers can set or get the current page by getting/setting the
 * currentPage attribute.
 *
 * Callers can also delay any operations until there's a valid page with
 * a ready DOM by wrapping their logic in a call to PageManager.ready().
 */
RB.PageManager = Backbone.Model.extend({
    defaults: {
        page: null,
        rendered: false
    },

    /*
     * Initializes the PageManager.
     *
     * This will listen for when a page is set, and will handle rendering
     * the page, once the DOM is ready. Listeners will be notified before
     * and after render.
     */
    initialize: function() {
        this.once('change:page', function() {
            this.trigger('beforeRender');

            $(document).ready(_.bind(this._renderPage, this));
        }, this);
    },

    /*
     * Adds a callback to be called before rendering the page.
     *
     * If the page has been set, but isn't yet rendered, this will call
     * the callback immediately.
     *
     * If the page is not set, the callback will be called once set and
     * before rendering.
     *
     * If the page is set and rendered, this will assert.
     */
    beforeRender: function(cb, context) {
        var page = this.get('page');

        console.assert(!this.get('rendered'),
                       'beforeRender called after page was rendered');

        if (page) {
            cb.call(context, page);
        } else {
            this.once('beforeRender', function() {
                cb.call(context, this.get('page'));
            }, this);
        }
    },

    /*
     * Adds a callback to be called after the page is rendered and ready.
     *
     * If the page has been set and is rendered, this will call the callback
     * immediately.
     *
     * If the page is not set or not yet rendered, the callback will be
     * called once set and rendered.
     */
    ready: function(cb, context) {
        var page = this.get('page');

        if (page && this.get('rendered')) {
            cb.call(context, page);
        } else {
            this.once('change:rendered', function() {
                cb.call(context, this.get('page'));
            }, this);
        }
    },

    /*
     * Renders the page and sets the rendered state.
     */
    _renderPage: function() {
        this.get('page').render();
        this.set('rendered', true);
    }
}, {
    instance: null,

    /*
     * Calls beforeRender on the PageManager instance.
     */
    beforeRender: function(cb, context) {
        this.instance.beforeRender(cb, context);
    },

    /*
     * Calls ready on the PageManager instance.
     */
    ready: function(cb, context) {
        this.instance.ready(cb, context);
    },

    /*
     * Sets the page on the PageManager instance.
     */
    setPage: function(page) {
        this.instance.set('page', page);
    },

    /*
     * Returns the page set on the PageManager instance.
     */
    getPage: function() {
        return this.instance.get('page');
    }
});

RB.PageManager.instance = new RB.PageManager();


text:
<?php
# MetInfo Enterprise Content Management System
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.
$depth='../';
require_once $depth.'../login/login_check.php';
if($action=='editor'){
	$link_list=$db->get_one("select * from $met_link where id='$id'");
	if(!$link_list){
		metsave('-1',$lang_dataerror,$depth);
	}
	$link_type[$link_list[link_type]]="checked";
	$link_lang[$link_list[link_lang]]="checked";
	$show_ok1=$link_list[show_ok]?"checked":"";
	$com_ok1=$link_list[com_ok]?"checked":"";
}else{
	$link_list[weburl]="http://";
	$show_ok1="checked";
	$com_ok1="checked";
}
$css_url=$depth."../templates/".$met_skin."/css";
$img_url=$depth."../templates/".$met_skin."/images";
include template('seo/link/link_content');
footer();
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
?>


text:
.class public Landroid/support/v7/widget/AppCompatImageHelper;
.super Ljava/lang/Object;
.source "AppCompatImageHelper.java"

# instance fields
.field private final mDrawableManager:Landroid/support/v7/widget/AppCompatDrawableManager;

.field private final mView:Landroid/widget/ImageView;

# direct methods
.method public constructor <init>(Landroid/widget/ImageView;Landroid/support/v7/widget/AppCompatDrawableManager;)V
    .locals 0
    .param p1, "view"    # Landroid/widget/ImageView;
    .param p2, "drawableManager"    # Landroid/support/v7/widget/AppCompatDrawableManager;

    .prologue
    .line 33
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 34
    iput-object p1, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    .line 35
    iput-object p2, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mDrawableManager:Landroid/support/v7/widget/AppCompatDrawableManager;

    .line 36
    return-void
.end method

# virtual methods
.method public loadFromAttributes(Landroid/util/AttributeSet;I)V
    .locals 8
    .param p1, "attrs"    # Landroid/util/AttributeSet;
    .param p2, "defStyleAttr"    # I

    .prologue
    const/4 v7, -0x1

    .line 39
    iget-object v4, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v4}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;

    move-result-object v4

    sget-object v5, Landroid/support/v7/appcompat/R$styleable;->AppCompatImageView:[I

    const/4 v6, 0x0

    invoke-static {v4, p1, v5, p2, v6}, Landroid/support/v7/widget/TintTypedArray;->obtainStyledAttributes(Landroid/content/Context;Landroid/util/AttributeSet;[III)Landroid/support/v7/widget/TintTypedArray;

    move-result-object v0

    .line 42
    .local v0, "a":Landroid/support/v7/widget/TintTypedArray;
    :try_start_0
    sget v4, Landroid/support/v7/appcompat/R$styleable;->AppCompatImageView_android_src:I

    invoke-virtual {v0, v4}, Landroid/support/v7/widget/TintTypedArray;->getDrawableIfKnown(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 43
    .local v1, "d":Landroid/graphics/drawable/Drawable;
    if-eqz v1, :cond_0

    .line 44
    iget-object v4, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v4, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 47
    :cond_0
    sget v4, Landroid/support/v7/appcompat/R$styleable;->AppCompatImageView_srcCompat:I

    const/4 v5, -0x1

    invoke-virtual {v0, v4, v5}, Landroid/support/v7/widget/TintTypedArray;->getResourceId(II)I

    move-result v3

    .line 48
    .local v3, "id":I
    if-eq v3, v7, :cond_1

    .line 49
    iget-object v4, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mDrawableManager:Landroid/support/v7/widget/AppCompatDrawableManager;

    iget-object v5, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v5}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v4, v5, v3}, Landroid/support/v7/widget/AppCompatDrawableManager;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 50
    if-eqz v1, :cond_1

    .line 51
    iget-object v4, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v4, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 55
    :cond_1
    iget-object v4, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v4}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 56
    .local v2, "drawable":Landroid/graphics/drawable/Drawable;
    if-eqz v2, :cond_2

    .line 57
    invoke-static {v2}, Landroid/support/v7/widget/DrawableUtils;->fixDrawable(Landroid/graphics/drawable/Drawable;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 60
    :cond_2
    invoke-virtual {v0}, Landroid/support/v7/widget/TintTypedArray;->recycle()V

    .line 62
    return-void

    .line 60
    .end local v1    # "d":Landroid/graphics/drawable/Drawable;
    .end local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    .end local v3    # "id":I
    :catchall_0
    move-exception v4

    invoke-virtual {v0}, Landroid/support/v7/widget/TintTypedArray;->recycle()V

    throw v4
.end method

.method public setImageResource(I)V
    .locals 3
    .param p1, "resId"    # I

    .prologue
    .line 65
    if-eqz p1, :cond_2

    .line 66
    iget-object v1, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mDrawableManager:Landroid/support/v7/widget/AppCompatDrawableManager;

    if-eqz v1, :cond_1

    iget-object v1, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mDrawableManager:Landroid/support/v7/widget/AppCompatDrawableManager;

    iget-object v2, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v2}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v1, v2, p1}, Landroid/support/v7/widget/AppCompatDrawableManager;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 69
    .local v0, "d":Landroid/graphics/drawable/Drawable;
    :goto_0
    if-eqz v0, :cond_0

    .line 70
    invoke-static {v0}, Landroid/support/v7/widget/DrawableUtils;->fixDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 72
    :cond_0
    iget-object v1, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 76
    .end local v0    # "d":Landroid/graphics/drawable/Drawable;
    :goto_1
    return-void

    .line 66
    :cond_1
    iget-object v1, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1, p1}, Landroid/support/v4/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    goto :goto_0

    .line 74
    :cond_2
    iget-object v1, p0, Landroid/support/v7/widget/AppCompatImageHelper;->mView:Landroid/widget/ImageView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1
.end method


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}

module Data.Aeson.Versions.MigrationsSpec where

import Data.Aeson
import Data.Aeson.Versions
import Data.Aeson.Versions.Migrations

import Data.Tagged

import Test.Hspec
import Test.Hspec.QuickCheck

import Test.ShouldNotTypecheck

data Thing = Thing Int deriving (Show, Eq)

instance ToJSON (Tagged V1 Thing) where
  toJSON (Tagged (Thing i)) = object ["i" .= i]

instance ToJSON (Tagged V2 Thing) where
  toJSON (Tagged (Thing i)) = object ["i" .= i, "extra" .= ("I'm V2" :: String)]

instance SerializedVersion Thing where
  type SerializerVersions Thing = '[V1, V2]

instance Migratable Int Thing where
  regression (Thing i) = i

m :: Migration (UsingAeson Int) Thing
m = Migration (Thing 3)

data SimplePerson = SimplePerson { sName :: String
                                 , sAge :: Int
                                 }

instance ToJSON (Tagged V1 SimplePerson) where
  toJSON (Tagged (SimplePerson name age)) = object [ "name" .= name
                                                   , "age" .= age
                                                   ]

instance ToJSON (Tagged V2 SimplePerson) where
  toJSON (Tagged (SimplePerson name age)) = object [ "name" .= name
                                                   , "age" .= age
                                                   , "extra" .= ("V2" :: String)
                                                   ]

instance SerializedVersion SimplePerson where
  type SerializerVersions SimplePerson = [V1, V2]

data ComplexPerson = ComplexPerson { cName :: String
                                   , cAge :: Int
                                   , cFollowers :: Int
                                   }

instance ToJSON (Tagged V1 ComplexPerson) where
  toJSON (Tagged (ComplexPerson name age followers)) = object [ "name" .= name
                                                              , "age" .= age
                                                              , "followers" .= followers
                                                              ]

instance ToJSON (Tagged V2 ComplexPerson) where
  toJSON (Tagged (ComplexPerson name age followers)) = object [ "name" .= name
                                                              , "age" .= age
                                                              , "followers" .= followers
                                                              , "extra" .= ("V2" :: String)
                                                              ]

instance ToJSON (Tagged V3 ComplexPerson) where
  toJSON (Tagged (ComplexPerson name age followers)) = object [ "name" .= name
                                                              , "age" .= age
                                                              , "followers" .= followers
                                                              , "extra" .= ("V3" :: String)
                                                              ]

instance SerializedVersion ComplexPerson where
  type SerializerVersions ComplexPerson = [V1, V2, V3]

instance Migratable SimplePerson ComplexPerson where
  regression (ComplexPerson name age _) = SimplePerson name age

m2 :: Migration SimplePerson ComplexPerson
m2 = Migration (ComplexPerson "ben" 25 0)

spec :: Spec
spec = do
  describe "migrations" $ do
    it "migrates from a simple type to a complex type" $ do
      let Right encodedV1 = serialize' v1 m
          Right encodedV2 = serialize' v2 m
      encodedV1 `shouldBe` toJSON (3 :: Int)
      encodedV2 `shouldBe` object [ "i" .= (3 :: Int)
                                  , "extra" .= ("I'm V2" :: String)
                                  ]
    it "migrates from a complex type to a complex type" $ do
      let Right encodedV1 = serialize' v1 m2
          Right encodedV2 = serialize' v2 m2
          Right encodedV3 = serialize' v3 m2
      encodedV1 `shouldBe` object [ "name" .= ("ben" :: String)
                                  , "age" .= (25 :: Int)
                                  ]
      encodedV2 `shouldBe` object [ "name" .= ("ben" :: String)
                                  , "age" .= (25 :: Int)
                                  , "extra" .= ("V2" :: String)
                                  ]
      encodedV3 `shouldBe` object [ "name" .= ("ben" :: String)
                                  , "age" .= (25 :: Int)
                                  , "followers" .= (0 :: Int)
                                  , "extra" .= ("V3" :: String)
                                  ]

    it "prevents you from using bad versions" $ do
      shouldNotTypecheck $ mToJSON (Tagged m :: Tagged V3 (Migration (UsingAeson Int) Thing))
      shouldNotTypecheck $ mToJSON (Tagged m2 :: Tagged V4 (Migration SimplePerson ComplexPerson))


text:
set -e

mvn clean package -pl wire-compiler -am -Dmaven.test.skip

cd wire-runtime
PROTOS=`find src/test/proto -name '*.proto' | sed 's|^src/test/proto/||'`

java -jar ../wire-compiler/target/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar \
  --proto_path=../wire-runtime/src/test/proto \
  --java_out=../wire-runtime/src/test/proto-java \
  --enum_options=squareup.protos.custom_options.enum_value_option,squareup.protos.custom_options.complex_enum_value_option,squareup.protos.foreign.foreign_enum_value_option \
  ${PROTOS}

# GSON

cp src/test/proto-java/com/squareup/wire/protos/alltypes/* ../wire-gson-support/src/test/java/com/squareup/wire/protos/alltypes/

# NO OPTIONS

java -jar ../wire-compiler/target/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar \
  --proto_path=../wire-runtime/src/test/proto \
  --java_out=../wire-runtime/src/test/proto-java.noOptions \
  --no_options \
  --enum_options=squareup.protos.custom_options.enum_value_option \
  ${PROTOS}

cp src/test/proto-java.noOptions/com/squareup/wire/protos/custom_options/Ext_custom_options.java \
   src/test/proto-java/com/squareup/wire/protos/custom_options/Ext_custom_options.java.noOptions
cp src/test/proto-java.noOptions/com/squareup/wire/protos/custom_options/FooBar.java \
   src/test/proto-java/com/squareup/wire/protos/custom_options/FooBar.java.noOptions
cp src/test/proto-java.noOptions/com/squareup/wire/protos/custom_options/MessageWithOptions.java \
   src/test/proto-java/com/squareup/wire/protos/custom_options/MessageWithOptions.java.noOptions

rm -r src/test/proto-java.noOptions

# REGISTRY

java -jar ../wire-compiler/target/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar \
  --proto_path=../wire-runtime/src/test/proto \
  --java_out=../wire-runtime/src/test/proto-java \
  --registry_class=com.squareup.wire.protos.person.EmptyRegistry \
  person.proto

java -jar ../wire-compiler/target/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar \
  --proto_path=../wire-runtime/src/test/proto \
  --java_out=../wire-runtime/src/test/proto-java \
  --registry_class=com.squareup.wire.protos.ProtoRegistry \
  simple_message.proto external_message.proto foreign.proto

java -jar ../wire-compiler/target/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar \
  --proto_path=../wire-runtime/src/test/proto \
  --java_out=../wire-runtime/src/test/proto-java \
  --registry_class=com.squareup.wire.protos.one_extension.OneExtensionRegistry \
  one_extension.proto

# ANDROID

java -jar ../wire-compiler/target/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar \
  --proto_path=../wire-runtime/src/test/proto \
  --java_out=../wire-runtime/src/test/proto-java.android \
  --android \
  person.proto

cp src/test/proto-java.android/com/squareup/wire/protos/person/Person.java \
   src/test/proto-java/com/squareup/wire/protos/person/Person.java.android

rm -r src/test/proto-java.android


text:
<resources>
    <string name="app_name">Busby Movies</string>
    <string name="add_favourite_movies">Add to favourite movies</string>
    <string name="undo">UNDO</string>
    <string name="initialize_vote">0.0</string>
    <string name="play_trailer_icon">Play trailer icon</string>
    <string name="enter_name_of_movie">Name of movie</string>
    <string name="year_of_movie_optional">Year of movie (optional)</string>
    <string name="search">Search</string>
    <string name="clear">Clear</string>
    <string name="movie_search">Movie Search</string>
    <string name="similar_movies">Similar Movies</string>

</resources>


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

namespace MiniTrello.Api.Models
{
    public class AccountForgotPasswordModel
    {
        public string Email;
        public string NewPassword;
        public string ConfirmNewPassword;
    }
}


text:
namespace java.sql
{
	[global::MonoJavaBridge.JavaClass()]
	public partial class Date : java.util.Date
	{
		internal new static global::MonoJavaBridge.JniGlobalHandle staticClass;
		protected Date(global::MonoJavaBridge.JNIEnv @__env) : base(@__env)
		{
		}
		private static global::MonoJavaBridge.MethodId _m0;
		public override global::java.lang.String toString()
		{
			return global::MonoJavaBridge.JavaBridge.CallSealedClassObjectMethod<java.lang.String>(this, global::java.sql.Date.staticClass, "toString", "()Ljava/lang/String;", ref global::java.sql.Date._m0) as java.lang.String;
		}
		private static global::MonoJavaBridge.MethodId _m1;
		public static global::java.sql.Date valueOf(java.lang.String arg0)
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			if (global::java.sql.Date._m1.native == global::System.IntPtr.Zero)
				global::java.sql.Date._m1 = @__env.GetStaticMethodIDNoThrow(global::java.sql.Date.staticClass, "valueOf", "(Ljava/lang/String;)Ljava/sql/Date;");
			return global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallStaticObjectMethod(java.sql.Date.staticClass, global::java.sql.Date._m1, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as java.sql.Date;
		}
		public new long Time
		{
			set
			{
				setTime(value);
			}
		}
		private static global::MonoJavaBridge.MethodId _m2;
		public override void setTime(long arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::java.sql.Date.staticClass, "setTime", "(J)V", ref global::java.sql.Date._m2, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		public new int Hours
		{
			get
			{
				return getHours();
			}
			set
			{
				setHours(value);
			}
		}
		private static global::MonoJavaBridge.MethodId _m3;
		public override int getHours()
		{
			return global::MonoJavaBridge.JavaBridge.CallIntMethod(this, global::java.sql.Date.staticClass, "getHours", "()I", ref global::java.sql.Date._m3);
		}
		public new int Minutes
		{
			get
			{
				return getMinutes();
			}
			set
			{
				setMinutes(value);
			}
		}
		private static global::MonoJavaBridge.MethodId _m4;
		public override int getMinutes()
		{
			return global::MonoJavaBridge.JavaBridge.CallIntMethod(this, global::java.sql.Date.staticClass, "getMinutes", "()I", ref global::java.sql.Date._m4);
		}
		public new int Seconds
		{
			get
			{
				return getSeconds();
			}
			set
			{
				setSeconds(value);
			}
		}
		private static global::MonoJavaBridge.MethodId _m5;
		public override int getSeconds()
		{
			return global::MonoJavaBridge.JavaBridge.CallIntMethod(this, global::java.sql.Date.staticClass, "getSeconds", "()I", ref global::java.sql.Date._m5);
		}
		private static global::MonoJavaBridge.MethodId _m6;
		public override void setHours(int arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::java.sql.Date.staticClass, "setHours", "(I)V", ref global::java.sql.Date._m6, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		private static global::MonoJavaBridge.MethodId _m7;
		public override void setMinutes(int arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::java.sql.Date.staticClass, "setMinutes", "(I)V", ref global::java.sql.Date._m7, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		private static global::MonoJavaBridge.MethodId _m8;
		public override void setSeconds(int arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::java.sql.Date.staticClass, "setSeconds", "(I)V", ref global::java.sql.Date._m8, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		private static global::MonoJavaBridge.MethodId _m9;
		public Date(int arg0, int arg1, int arg2) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			if (global::java.sql.Date._m9.native == global::System.IntPtr.Zero)
				global::java.sql.Date._m9 = @__env.GetMethodIDNoThrow(global::java.sql.Date.staticClass, "<init>", "(III)V");
			global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.sql.Date.staticClass, global::java.sql.Date._m9, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
			Init(@__env, handle);
		}
		private static global::MonoJavaBridge.MethodId _m10;
		public Date(long arg0) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			if (global::java.sql.Date._m10.native == global::System.IntPtr.Zero)
				global::java.sql.Date._m10 = @__env.GetMethodIDNoThrow(global::java.sql.Date.staticClass, "<init>", "(J)V");
			global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.sql.Date.staticClass, global::java.sql.Date._m10, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
			Init(@__env, handle);
		}
		static Date()
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			global::java.sql.Date.staticClass = @__env.NewGlobalRef(@__env.FindClass("java/sql/Date"));
		}
	}
}


text:
<?php

namespace Eros\ExtranetBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
 * This is the class that validates and merges configuration from your app/config files
 *
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
 */
class Configuration implements ConfigurationInterface
{
    /**
     * Generates the configuration tree.
     *
     * @return TreeBuilder
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('fos_user');

        $supportedDrivers = array('orm', 'mongodb', 'couchdb', 'propel', 'custom');

        //$this->addProfileSection($rootNode);
        return $treeBuilder;
    }

      private function addProfileSection(ArrayNodeDefinition $node)
    {
        $node
            ->children()
                ->arrayNode('profile')
                    ->addDefaultsIfNotSet()
                    ->canBeUnset()
                    ->children()
                        ->arrayNode('form')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('type')->defaultValue('extranet_profile')->end()
                                ->scalarNode('handler')->defaultValue('extranet.profile.form.handler.default')->end()
                                ->scalarNode('name')->defaultValue('extranet.profile.form')->cannotBeEmpty()->end()
                                ->arrayNode('validation_groups')
                                    ->prototype('scalar')->end()
                                    ->defaultValue(array('Profile', 'Default'))
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end();
    }
}


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.templates.commands.CommandBase;
import edu.wpi.first.wpilibj.templates.commands.*;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends IterativeRobot {

    Command autonomousCommand;
    Command driveCommand;
    Command shootCommand;
    Command eccentricCommand;
    Command potCommand;

    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    public void robotInit() {
        // instantiate the command used for the autonomous period
        autonomousCommand = new ExampleCommand();
        driveCommand = new Drive();
        shootCommand = new RunShooter();
        eccentricCommand = new EccentricWheel();
        potCommand = new Potentiometer();

        // Initialize all subsystems
        CommandBase.init();
    }

    public void autonomousInit() {
        // schedule the autonomous command (example)
        autonomousCommand.start();
    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {
        Scheduler.getInstance().run();
    }

    public void teleopInit() {
	// This makes sure that the autonomous stops running when
        // teleop starts running. If you want the autonomous to
        // continue until interrupted by another command, remove
        // this line or combvment it out.
        autonomousCommand.cancel();
        driveCommand.start();
        shootCommand.start();
        eccentricCommand.start();
        potCommand.start();

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
        Scheduler.getInstance().run();
    }

    /**
     * This function is called periodically during test mode
     */
    public void testPeriodic() {
        LiveWindow.run();
    }
}


text:
const Tom = require('test-runner').Tom
const walkBack = require('walk-back')
const a = require('assert').strict

const tom = module.exports = new Tom()

tom.test('basic', function (t) {
  const filename = walkBack(__dirname + '/fixture/subdir', 'file.txt')
  a.ok(filename.search('walk-back/test/fixture/subdir/file.txt') > 0)
})

tom.test('basic2', function (t) {
  const filename = walkBack(__dirname + '/fixture', 'file.txt')
  a.ok(filename.search('walk-back/test/fixture/file.txt') > 0)
})

tom.test('not found', function (t) {
  const filename = walkBack(__dirname + '/fixture', 'adskjfhladfn')
  a.equal(filename, null)
})

tom.test('relative path', function (t) {
  const filename = walkBack('.', 'test/fixture/subdir/file.txt')
  a.ok(filename && filename.search('walk-back/test/fixture/subdir/file.txt') > 0)
})

tom.test('relative path 2', function (t) {
  const filename = walkBack('./test/fixture/subdir', 'file.txt')
  a.ok(filename && filename.search('walk-back/test/fixture/subdir/file.txt') > 0)
})

tom.test('startPath doesn\'t exist', function (t) {
  a.throws(function () {
    walkBack('slfnavnkln', 'file.txt')
  })
})


text:
//
//  HandleView.m
//  Quartz2D
//
//  Created by fangjs on 16/5/4.
//  Copyright © 2016年 fangjs. All rights reserved.
//

#import "HandleView.h"
#import "UIImage+ImageClip.h"

@interface HandleView() <UIGestureRecognizerDelegate>

@property (strong , nonatomic) UIImageView *imageView;

@end

@implementation HandleView

- (instancetype) initWithFrame:(CGRect)frame {
    if (self == [super initWithFrame:frame]) {
        self.imageView = [[UIImageView alloc] initWithFrame:self.bounds];
        self.imageView.userInteractionEnabled = YES;
        [self addSubview:self.imageView];

        [self addGesture];
    }
    return self;
}

//设置图片
- (void) setImage:(UIImage *)image {
    _image = image;
    self.imageView.image = image;
}

//添加手势
- (void) addGesture {
    UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)];
    [self.imageView addGestureRecognizer:pan];

    UIPinchGestureRecognizer *pin = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinAction:)];
    pin.delegate = self;
    [self.imageView addGestureRecognizer:pin];

    UIRotationGestureRecognizer *rotation = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotationAction:)];
    rotation.delegate = self;
    [self.imageView addGestureRecognizer:rotation];

    UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressAction:)];
    [self.imageView addGestureRecognizer:longPress];
}

//滑动手势响应
- (void) panAction:(UIPanGestureRecognizer *) pan {
    //获取偏移量
    CGPoint currentP = [pan translationInView:self.imageView];
    self.imageView.transform = CGAffineTransformTranslate(self.imageView.transform, currentP.x, currentP.y);

    //复位
    [pan setTranslation:CGPointZero inView:self.imageView];
}

//缩放手势响应
- (void) pinAction:(UIPinchGestureRecognizer *) pin {
    self.imageView.transform = CGAffineTransformScale(self.imageView.transform, pin.scale, pin.scale);

    //复位
    pin.scale = 1;
}

//旋转手势响应
- (void) rotationAction:(UIRotationGestureRecognizer *) rotation {
    self.imageView.transform = CGAffineTransformRotate(self.imageView.transform, rotation.rotation);

    //复位
    rotation.rotation = 0;
}

//长安手势响应
- (void) longPressAction:(UILongPressGestureRecognizer *) longPress {
    if (longPress.state == UIGestureRecognizerStateBegan) {
        [UIView animateWithDuration:0.25 animations:^{
            self.imageView.alpha = 0.5;
            [UIView animateWithDuration:0.25 animations:^{
                self.imageView.alpha = 1.0;
            } completion:^(BOOL finished) {
                UIImage *image = [UIImage imageWithCaputureView:self];
                if (self.callBack) {
                    self.callBack(image);
                }
                //移除
                [self removeFromSuperview];
            }];
        }];
    }
}

//是否允许其它手势同时响应
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return YES;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end


text:
package net.dryuf.concurrent.executor;

import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;

/**
 * Executor serializing the results.
 */
public class ResultSerializingExecutor implements CloseableExecutor
{
	public ResultSerializingExecutor(Executor defaultExecutor)
	{
		this.defaultExecutor = defaultExecutor;
	}

	public ResultSerializingExecutor()
	{
		this(CommonPoolExecutor.getInstance());
	}

	@Override
	public void execute(Runnable runnable)
	{
		this.defaultExecutor.execute(runnable);
	}

	@Override
	public <T> CompletableFuture<T> submit(Callable<T> callable)
	{
		ExecutionFuture<T> future = new ExecutionFuture<>();

		try {
			orderedTasks.put(future);
			future.execute(callable, defaultExecutor);
		}
		catch (InterruptedException e) {
			throw new RuntimeException(e);
		}
		return future.wrapping;
	}

	public <T> CompletableFuture<T> submit(Callable<T> callable, Executor executor)
	{
		ExecutionFuture<T> future = new ExecutionFuture<>();

		try {
			orderedTasks.put(future);
			future.execute(callable, executor);
		}
		catch (InterruptedException e) {
			throw new RuntimeException(e);
		}
		return future.wrapping;
	}

	@Override
	public void close()
	{
		boolean interrupted = false;
		synchronized (isEmpty) {
			for (;;) {
				try {
					if (!orderedTasks.isEmpty())
						isEmpty.wait();
					break;
				}
				catch (InterruptedException ex) {
					interrupted = true;
				}
			}
		}
		if (interrupted)
			Thread.currentThread().interrupt();
	}

	@SuppressWarnings("unchecked")
	private void processPending(ExecutionFuture<?> future)
	{
		if (orderedTasks.peek() != future)
			return;
		for (;;) {
			if (!PROCESSING_PENDING_UPDATER.compareAndSet(this, 0, 1))
				return;

			for (;;) {
				ExecutionFuture<Object> item = (ExecutionFuture<Object>)orderedTasks.peek();
				if (item == null || !item.isDone()) {
					PROCESSING_PENDING_UPDATER.set(this, 0);
					item = (ExecutionFuture<Object>)orderedTasks.peek();
					if (item != null && item.isDone()) {
						break;
					}
					if (item == null) {
						synchronized (isEmpty) {
							isEmpty.notify();
						}
					}
					return;
				}
				item = (ExecutionFuture<Object>)orderedTasks.remove();
				try {
					item.wrapping.complete(item.get());
				}
				catch (ExecutionException e) {
					item.wrapping.completeExceptionally(e.getCause());
				}
				catch (InterruptedException e) {
					item.wrapping.completeExceptionally(e);
				}
			}
		}
	}

	private class ExecutionFuture<T> extends CompletableFuture<T>
	{
		private CompletableFuture<Void> underlying;

		private final CompletableFuture<T> wrapping = new CompletableFuture<T>() {
			@Override
			public boolean cancel(boolean interrupt)
			{
				return underlying.cancel(interrupt);
			}
		};

		public void execute(Callable<T> callable)
		{
			underlying = CompletableFuture.runAsync(() -> {
				try {
					complete(callable.call());
				}
				catch (Throwable e) {
					completeExceptionally(e);
				}
				finally {
					processPending(ExecutionFuture.this);
				}
			});
		}

		public void execute(Callable<T> callable, Executor executor)
		{
			underlying = CompletableFuture.runAsync(() -> {
				try {
					complete(callable.call());
				}
				catch (Throwable e) {
					completeExceptionally(e);
				}
				finally {
					processPending(ExecutionFuture.this);
				}
			}, executor);
		}
	}

	private final Executor defaultExecutor;

	private final LinkedBlockingDeque<ExecutionFuture<?>> orderedTasks = new LinkedBlockingDeque<>();

	private volatile int processingPending = 0;

	private final Object isEmpty = new Object();

	private static final AtomicIntegerFieldUpdater<ResultSerializingExecutor>  PROCESSING_PENDING_UPDATER =
		AtomicIntegerFieldUpdater.newUpdater(ResultSerializingExecutor.class, "processingPending");
}


text:
package org.opentele.server.provider.integration.cpr.stamdatalookup.generated;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for NamePersonQueryType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="NamePersonQueryType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/}PersonGivenName"/>
 *         <element ref="{http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/}PersonMiddleName" minOccurs="0"/>
 *         <element ref="{http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/}PersonSurnameName"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NamePersonQueryType", namespace = "http://nsi.dk/2011/09/23/StamdataCpr/", propOrder = {
    "personGivenName",
    "personMiddleName",
    "personSurnameName"
})
public class NamePersonQueryType {

    @XmlElement(name = "PersonGivenName", namespace = "http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/", required = true)
    protected String personGivenName;
    @XmlElement(name = "PersonMiddleName", namespace = "http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/")
    protected String personMiddleName;
    @XmlElement(name = "PersonSurnameName", namespace = "http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/", required = true)
    protected String personSurnameName;

    /**
     * Gets the value of the personGivenName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPersonGivenName() {
        return personGivenName;
    }

    /**
     * Sets the value of the personGivenName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPersonGivenName(String value) {
        this.personGivenName = value;
    }

    /**
     * Gets the value of the personMiddleName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPersonMiddleName() {
        return personMiddleName;
    }

    /**
     * Sets the value of the personMiddleName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPersonMiddleName(String value) {
        this.personMiddleName = value;
    }

    /**
     * Gets the value of the personSurnameName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPersonSurnameName() {
        return personSurnameName;
    }

    /**
     * Sets the value of the personSurnameName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPersonSurnameName(String value) {
        this.personSurnameName = value;
    }

}


text:
package org.apache.syncope.sra.security.cas;

import org.apache.commons.lang3.StringUtils;
import org.jasig.cas.client.validation.Assertion;
import org.springframework.security.authentication.AbstractAuthenticationToken;

public class CASAuthenticationToken extends AbstractAuthenticationToken {

    private static final long serialVersionUID = 6333776590644298469L;

    private final Assertion assertion;

    public CASAuthenticationToken(final Assertion assertion) {
        super(null);
        this.assertion = assertion;
        this.setAuthenticated(true);
    }

    @Override
    public Object getCredentials() {
        return StringUtils.EMPTY;
    }

    @Override
    public Assertion getPrincipal() {
        return assertion;
    }
}