text:
'use strict';

import urlUtils, {getFormattedPathName, isUrlType, equalUrlsIgnoringSubpath, equalUrlsWithSubpath} from 'common/utils/url';

jest.mock('common/tabs/TabView', () => ({
    getServerView: (srv, tab) => {
        return {
            name: `${srv.name}_${tab.name}`,
            url: `${srv.url}${srv.url.toString().endsWith('/') ? '' : '/'}${tab.name.split('-')[1] || ''}`,
        };
    },
}));

describe('common/utils/url', () => {
    describe('isValidURL', () => {
        it('should be true for a valid web url', () => {
            const testURL = 'https://developers.mattermost.com/';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a valid, non-https web url', () => {
            const testURL = 'http://developers.mattermost.com/';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for an invalid, self-defined, top-level domain', () => {
            const testURL = 'https://www.example.x';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a file download url', () => {
            const testURL = 'https://community.mattermost.com/api/v4/files/ka3xbfmb3ffnmgdmww8otkidfw?download=1';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a permalink url', () => {
            const testURL = 'https://community.mattermost.com/test-channel/pl/pdqowkij47rmbyk78m5hwc7r6r';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a valid, internal domain', () => {
            const testURL = 'https://mattermost.company-internal';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a second, valid internal domain', () => {
            const testURL = 'https://serverXY/mattermost';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a valid, non-https internal domain', () => {
            const testURL = 'http://mattermost.local';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
        it('should be true for a valid, non-https, ip address with port number', () => {
            const testURL = 'http://localhost:8065';
            expect(urlUtils.isValidURL(testURL)).toBe(true);
        });
    });
    describe('isValidURI', () => {
        it('should be true for a deeplink url', () => {
            const testURL = 'mattermost://community-release.mattermost.com/core/channels/developers';
            expect(urlUtils.isValidURI(testURL)).toBe(true);
        });
        it('should be false for a malicious url', () => {
            const testURL = String.raw`mattermost:///" --data-dir "\\deans-mbp\mattermost`;
            expect(urlUtils.isValidURI(testURL)).toBe(false);
        });
    });

    describe('getHost', () => {
        it('should return the origin of a well formed url', () => {
            const myurl = 'https://mattermost.com/download';
            expect(urlUtils.getHost(myurl)).toBe('https://mattermost.com');
        });

        it('shoud raise an error on malformed urls', () => {
            const myurl = 'http://example.com:-80/';
            expect(() => {
                urlUtils.getHost(myurl);
            }).toThrow(SyntaxError);
        });
    });

    describe('parseURL', () => {
        it('should return the URL if it is already a URL', () => {
            const url = new URL('http://mattermost.com');
            expect(urlUtils.parseURL(url)).toBe(url);
        });

        it('should return undefined when a bad url is passed', () => {
            const badURL = 'not-a-real-url-at-all';
            expect(urlUtils.parseURL(badURL)).toBe(undefined);
        });

        it('should remove duplicate slashes in a URL when parsing', () => {
            const urlWithExtraSlashes = 'https://mattermost.com//sub//path//example';
            const parsedURL = urlUtils.parseURL(urlWithExtraSlashes);

            expect(parsedURL.toString()).toBe('https://mattermost.com/sub/path/example');
        });
    });

    describe('isInternalURL', () => {
        it('should return false on different hosts', () => {
            const baseURL = new URL('http://mattermost.com');
            const externalURL = new URL('http://google.com');

            expect(urlUtils.isInternalURL(externalURL, baseURL)).toBe(false);
        });

        it('should return false on different ports', () => {
            const baseURL = new URL('http://mattermost.com:8080');
            const externalURL = new URL('http://mattermost.com:9001');

            expect(urlUtils.isInternalURL(externalURL, baseURL)).toBe(false);
        });

        it('should return false on different subpaths', () => {
            const baseURL = new URL('http://mattermost.com/sub/path/');
            const externalURL = new URL('http://mattermost.com/different/sub/path');

            expect(urlUtils.isInternalURL(externalURL, baseURL)).toBe(false);
        });

        it('should return true if matching', () => {
            const baseURL = new URL('http://mattermost.com/');
            const externalURL = new URL('http://mattermost.com');

            expect(urlUtils.isInternalURL(externalURL, baseURL)).toBe(true);
        });

        it('should return true if matching with subpath', () => {
            const baseURL = new URL('http://mattermost.com/sub/path/');
            const externalURL = new URL('http://mattermost.com/sub/path');

            expect(urlUtils.isInternalURL(externalURL, baseURL)).toBe(true);
        });

        it('should return true if subpath of', () => {
            const baseURL = new URL('http://mattermost.com/');
            const externalURL = new URL('http://mattermost.com/sub/path');

            expect(urlUtils.isInternalURL(externalURL, baseURL)).toBe(true);
        });
    });

    describe('getFormattedPathName', () => {
        it('should format all to lower case', () => {
            const unformattedPathName = '/aAbBbB/cC/DdeR/';
            expect(getFormattedPathName(unformattedPathName)).toBe('/aabbbb/cc/dder/');
        });

        it('should add trailing slash', () => {
            const unformattedPathName = '/aAbBbB/cC/DdeR';
            expect(getFormattedPathName(unformattedPathName)).toBe('/aabbbb/cc/dder/');
        });
    });

    describe('isUrlType', () => {
        const serverURL = new URL('http://mattermost.com');
        const urlType = 'url-type';

        it('should identify base url', () => {
            const adminURL = new URL(`http://mattermost.com/${urlType}`);
            expect(isUrlType('url-type', serverURL, adminURL)).toBe(true);
        });

        it('should identify url of correct type', () => {
            const adminURL = new URL(`http://mattermost.com/${urlType}/some/path`);
            expect(isUrlType('url-type', serverURL, adminURL)).toBe(true);
        });

        it('should not identify other url', () => {
            const adminURL = new URL('http://mattermost.com/some/other/path');
            expect(isUrlType('url-type', serverURL, adminURL)).toBe(false);
        });
    });

    describe('getView', () => {
        const servers = [
            {
                name: 'server-1',
                url: 'http://server-1.com',
                tabs: [
                    {
                        name: 'tab',
                    },
                    {
                        name: 'tab-type1',
                    },
                    {
                        name: 'tab-type2',
                    },
                ],
            },
            {
                name: 'server-2',
                url: 'http://server-2.com/subpath',
                tabs: [
                    {
                        name: 'tab-type1',
                    },
                    {
                        name: 'tab-type2',
                    },
                    {
                        name: 'tab',
                    },
                ],
            },
        ];

        it('should match the correct server - base URL', () => {
            const inputURL = new URL('http://server-1.com');
            expect(urlUtils.getView(inputURL, servers)).toStrictEqual({name: 'server-1_tab', url: 'http://server-1.com/'});
        });

        it('should match the correct server - base tab', () => {
            const inputURL = new URL('http://server-1.com/team');
            expect(urlUtils.getView(inputURL, servers)).toStrictEqual({name: 'server-1_tab', url: 'http://server-1.com/'});
        });

        it('should match the correct server - different tab', () => {
            const inputURL = new URL('http://server-1.com/type1/app');
            expect(urlUtils.getView(inputURL, servers)).toStrictEqual({name: 'server-1_tab-type1', url: 'http://server-1.com/type1'});
        });

        it('should return undefined for server with subpath and URL without', () => {
            const inputURL = new URL('http://server-2.com');
            expect(urlUtils.getView(inputURL, servers)).toBe(undefined);
        });

        it('should return undefined for server with subpath and URL with wrong subpath', () => {
            const inputURL = new URL('http://server-2.com/different/subpath');
            expect(urlUtils.getView(inputURL, servers)).toBe(undefined);
        });

        it('should match the correct server with a subpath - base URL', () => {
            const inputURL = new URL('http://server-2.com/subpath');
            expect(urlUtils.getView(inputURL, servers)).toStrictEqual({name: 'server-2_tab', url: 'http://server-2.com/subpath/'});
        });

        it('should match the correct server with a subpath - base tab', () => {
            const inputURL = new URL('http://server-2.com/subpath/team');
            expect(urlUtils.getView(inputURL, servers)).toStrictEqual({name: 'server-2_tab', url: 'http://server-2.com/subpath/'});
        });

        it('should match the correct server with a subpath - different tab', () => {
            const inputURL = new URL('http://server-2.com/subpath/type2/team');
            expect(urlUtils.getView(inputURL, servers)).toStrictEqual({name: 'server-2_tab-type2', url: 'http://server-2.com/subpath/type2'});
        });

        it('should return undefined for wrong server', () => {
            const inputURL = new URL('http://server-3.com');
            expect(urlUtils.getView(inputURL, servers)).toBe(undefined);
        });
    });

    describe('equalUrls', () => {
        it('base urls', () => {
            const url1 = new URL('http://server-1.com');
            const url2 = new URL('http://server-1.com');
            expect(equalUrlsIgnoringSubpath(url1, url2)).toBe(true);
            expect(equalUrlsWithSubpath(url1, url2)).toBe(true);
        });

        it('different urls', () => {
            const url1 = new URL('http://server-1.com');
            const url2 = new URL('http://server-2.com');
            expect(equalUrlsIgnoringSubpath(url1, url2)).toBe(false);
            expect(equalUrlsWithSubpath(url1, url2)).toBe(false);
        });

        it('same host, different subpath', () => {
            const url1 = new URL('http://server-1.com/subpath');
            const url2 = new URL('http://server-1.com');
            expect(equalUrlsIgnoringSubpath(url1, url2)).toBe(true);
            expect(equalUrlsWithSubpath(url1, url2)).toBe(false);
        });

        it('same host and subpath', () => {
            const url1 = new URL('http://server-1.com/subpath');
            const url2 = new URL('http://server-1.com/subpath');
            expect(equalUrlsIgnoringSubpath(url1, url2)).toBe(true);
            expect(equalUrlsWithSubpath(url1, url2)).toBe(true);
        });

        it('same host, different URL scheme', () => {
            const url1 = new URL('http://server-1.com');
            const url2 = new URL('mattermost://server-1.com');
            expect(equalUrlsIgnoringSubpath(url1, url2)).toBe(false);
            expect(equalUrlsWithSubpath(url1, url2)).toBe(false);
        });

        it('same host, different URL scheme, with ignore scheme', () => {
            const url1 = new URL('http://server-1.com');
            const url2 = new URL('mattermost://server-1.com');
            expect(equalUrlsIgnoringSubpath(url1, url2, true)).toBe(true);
            expect(equalUrlsWithSubpath(url1, url2, true)).toBe(true);
        });

        it('same host, different ports', () => {
            const url1 = new URL('http://server-1.com:8080');
            const url2 = new URL('http://server-1.com');
            expect(equalUrlsIgnoringSubpath(url1, url2, true)).toBe(false);
            expect(equalUrlsWithSubpath(url1, url2, true)).toBe(false);
        });
    });

    describe('cleanPathName', () => {
        it('should not clean path name if it occurs other than the beginning', () => {
            expect(urlUtils.cleanPathName('/mattermost', '/home/channels/mattermost/test')).toBe('/home/channels/mattermost/test');
        });

        it('should clean path name if it occurs at the beginning', () => {
            expect(urlUtils.cleanPathName('/mattermost', '/mattermost/channels/home/test')).toBe('/channels/home/test');
        });

        it('should do nothing if it doesnt occur', () => {
            expect(urlUtils.cleanPathName('/mattermost', '/channels/home/test')).toBe('/channels/home/test');
        });
    });

    describe('isCustomLoginURL', () => {
        it('should match correct URL', () => {
            expect(urlUtils.isCustomLoginURL(
                'http://server.com/oauth/authorize',
                {
                    url: 'http://server.com',
                },
                [
                    {
                        name: 'a',
                        url: 'http://server.com',
                        tabs: [
                            {
                                name: 'tab',
                            },
                        ],
                    },
                ])).toBe(true);
        });
        it('should not match incorrect URL', () => {
            expect(urlUtils.isCustomLoginURL(
                'http://server.com/oauth/notauthorize',
                {
                    url: 'http://server.com',
                },
                [
                    {
                        name: 'a',
                        url: 'http://server.com',
                        tabs: [
                            {
                                name: 'tab',
                            },
                        ],
                    },
                ])).toBe(false);
        });
        it('should not match base URL', () => {
            expect(urlUtils.isCustomLoginURL(
                'http://server.com/',
                {
                    url: 'http://server.com',
                },
                [
                    {
                        name: 'a',
                        url: 'http://server.com',
                        tabs: [
                            {
                                name: 'tab',
                            },
                        ],
                    },
                ])).toBe(false);
        });
        it('should match with subpath', () => {
            expect(urlUtils.isCustomLoginURL(
                'http://server.com/subpath/oauth/authorize',
                {
                    url: 'http://server.com/subpath',
                },
                [
                    {
                        name: 'a',
                        url: 'http://server.com/subpath',
                        tabs: [
                            {
                                name: 'tab',
                            },
                        ],
                    },
                ])).toBe(true);
        });
        it('should not match with different subpath', () => {
            expect(urlUtils.isCustomLoginURL(
                'http://server.com/subpath/oauth/authorize',
                {
                    url: 'http://server.com/different/subpath',
                },
                [
                    {
                        name: 'a',
                        url: 'http://server.com/different/subpath',
                        tabs: [
                            {
                                name: 'tab',
                            },
                        ],
                    },
                ])).toBe(false);
        });
        it('should not match with oauth subpath', () => {
            expect(urlUtils.isCustomLoginURL(
                'http://server.com/oauth/authorize',
                {
                    url: 'http://server.com/oauth/authorize',
                },
                [
                    {
                        name: 'a',
                        url: 'http://server.com/oauth/authorize',
                        tabs: [
                            {
                                name: 'tab',
                            },
                        ],
                    },
                ])).toBe(false);
        });
    });
});


text:
TabPy client is the Python package for managing the published Python functions on TabPy server.

## Installation

The client comes in the form of a pip package that can be installed from the project folder directly. Installing the package using `setup.sh` or `setup.bat` in TabPy folder or doing `pip install` of taby-server will automatically install TabPy Client.

If you prefer manual install, Tableau recommends that you install it within a Python environment. You can create such an environment with conda or virtualenv, To activate the environment run the following command:

On Linux/MacOS:

```bash

/Anaconda/bin/source activate Tableau-Python-Server

```

On Windows:

```Batchfile

\Anaconda\scripts\activate Tableau-Python-Server

```

In order to install the client package, run this command:

```bash

pip install tabpy-client

```

## Connecting to TabPy

The client library uses the notion of connecting to a service, to avoid having to specify the service location for all subsequent operations:

```python

import tabpy_client

client = tabpy_client.Client('http://localhost:9004/')

```

The URL and port are where the Tableau-Python-Server process has been started - more info can be found in the [server section](server.md) of the documentation.

## Deploying a Function

A persisted endpoint is backed by a Python method. For example:

```python

def add(x,y):
    import numpy as np
    return np.add(x, y).tolist()

client.deploy('add', add, 'Adds two numbers x and y')

```

The next example is more complex, using scikit-learn's clustering API:

```python

def clustering(x, y):
    import numpy as np
    from sklearn.cluster import DBSCAN
    from sklearn.preprocessing import StandardScaler
    X = np.column_stack([x, y])
    X = StandardScaler().fit_transform(X)
    db = DBSCAN(eps=1, min_samples=3).fit(X)
    return db.labels_.tolist()

client.deploy('clustering',
                clustering,
                'Returns cluster Ids for each data point specified by the pairs in x and y')

```

In this example the function `clustering` expects a set of two-dimensional data points, represented by the list of all x-coordinates and the list of all y-coordinates. It will return a set of numerical labels corresponding to the clusters each datapoint is assigned to. We deploy this function as an endpoint named `clustering`. It is now reachable as a [REST API](server.md#httppost-queryendpoint), as well as through the TabPy client- for details see the next section.

You can re-deploy a function (for example, after you modified its code) by setting the `override` parameter to `True`:

```python

client.deploy('add', add, 'Adds two numbers x and y', override=True)

```

Each re-deployment of an endpoint will increment its version number, which is also returned as part of the query result.

When deploying endpoints that rely on supervised learning models, you may want to load a saved model instead of training on-the-fly for performance reasons.

Below is an excerpt from the training stage of a hypothetical model that predicts whether or not a loan will default:

```python

from sklearn.ensemble import GradientBoostingClassifier

predictors = [x for x in train.columns if x not in [target, RowID]]
gbm = GradientBoostingClassifier(learning_rate=0.01, n_estimators=600,max_depth=9,
min_samples_split=1200, min_samples_leaf=60, subsample=0.85, random_state=10)
modelfit(gbm, train, test, predictors)

```

When the trained model (named `gbm` in this case) is used in a function being deployed (as in `gbm.predict(...)` below), Tableau will automatically save its definition using `cloudpickle` along with the definition of the function. The model will also be kept in memory on the server to achieve fast response times. If you persist your model manually to disk and read as part of your scoring function code however, you will notice that response times are noticeably longer as every time a client hits an endpoint, the code (including model loading) will get executed. In order to get the best performance, we recommended following the methodology outlined in this example.

```python

def LoanDefaultClassifier(Loan_Amount, Loan_Tenure, Monthly_Income, Age):
    import pandas as pd
    data=pd.concat([Loan_Amount,Loan_Tenure,Monthly_Income,Age],axis=1)
    return gbm.predict(data)

client.deploy('WillItDefault',
              LoanDefaultClassifier,
              'Returns whether a loan application is likely to default.')

```
You can find a detailed working example with a downloadable sample Tableau workbook and an accompanying Jupyter workbook that walks through model fitting, evaluation and publishing steps on [our blog](https://www.tableau.com/about/blog/2017/1/building-advanced-analytics-applications-tabpy-64916).

The endpoints that are no longer needed can be removed the following way:

```python

client.remove('WillItDefault')

```

## Providing Schema Metadata

As soon as you share your deployed functions, you also need to share metadata about the function. The consumer of an endpoint needs to know the details of how to use the endpoint, such as:

  - The general purpose of the endpoint
  - Input parameter names, data types, and their meaning
  - Return data type and description

This data goes beyond the single string that we used above when deploying the function `add`. You can use an optional parameter to `deploy` to provide such a structured description, which can then be retrieved by other users connected to the same server. The schema is interpreted as a [Json Schema](<http://json-schema.org/documentation.html>) object, which you can either manually create or generate using a utility method provided in this client package:

```python

from tabpy_client.schema import generate_schema

schema = generate_schema(
  input={'x': 3, 'y': 2},
  output=5,
  input_description={'x': 'first value',
                     'y': 'second value'},
  output_description='the sum of x and y')

  client.deploy('add', add, 'Adds two numbers x and y', schema=schema)

```

To describe more complex input, like arrays, you would use the following syntax:

```python

from tabpy_client.schema import generate_schema

schema = generate_schema(
  input={'x': [6.35, 6.40, 6.65, 8.60],
         'y': [1.95, 1.95, 2.05, 3.05]},
  output=[0, 0, 0, 1],
  input_description={'x': 'list of x values',
                     'y': 'list of y values'},
  output_description='cluster Ids for each point x, y')

  client.deploy('clustering',
      clustering,
      'Returns cluster Ids for each data point specified by the pairs in x and y',
      schema=schema)

```

A schema described as such can be retrieved through the [REST Endpoints API](server.md#httpget-endpoints) or through the `get_endpoints` client API as follows:

```python

client.get_endpoints()['add']['schema']

```

## Querying an Endpoint

Once a Python function has been deployed to the server process, you can use the client's `query` method to query it (assumes you're already connected to the service):

```python

x = [6.35, 6.40, 6.65, 8.60, 8.90, 9.00, 9.10]
y = [1.95, 1.95, 2.05, 3.05, 3.05, 3.10, 3.15]

client.query('clustering', x, y)

```

Response:

```

{u'model': u'clustering',
 u'response': [0, 0, 0, 1, 1, 1, 1],
 u'uuid': u'1ca01e46-733c-4a77-b3da-3ded84dff4cd',
 u'version': 2}

```

## Evaluating Arbitrary Python Scripts

The other core functionality besides deploying and querying methods as endpoints is the ad-hoc execution of Python code, called `evaluate`. Evaluate does not have a Python API in `tabpy-client`, only a raw [REST interface](server.md#httppost-evaluate) that other client bindings can easily implement. Tableau connects to TabPy using REST `Evaluate`.

`Evaluate` allows calling a deployed endpoint from within the Python code block. The convention for this is to use a provided function call `tabpy.query` in the code, which behaves like the `query` method in `tabpy-client`. See the [REST API documentation](server.md#rest-interfaces) for an example.

redpajama_set_name: RedPajamaGithub


text:
package org.avaje.metric.eclipse.enhancer.ui;

import java.util.Iterator;

import org.avaje.metric.eclipse.enhancer.EnhancerConstants;
import org.avaje.metric.eclipse.enhancer.EnhancerPlugin;
import org.avaje.metric.eclipse.enhancer.builder.EnhanceNature;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.handlers.HandlerUtil;

public class ToggleNatureHandler extends AbstractHandler
{
    @Override public Object execute(ExecutionEvent event) throws ExecutionException
    {
        try
        {
            IProject project = getProject(HandlerUtil.getCurrentSelection(event));
            if ((project != null) && project.isAccessible())
            {
                EnhanceNature.toggleNature(project, project.hasNature(EnhancerConstants.NATURE_ID) ? false : true);
            }
        }
        catch (CoreException e)
        {
            throw new ExecutionException("unable to toggle enhancer nature", e);
        }

        return null;
    }

    static IProject getProject(ISelection selection)
    {
        if ((selection != null) && (selection instanceof IStructuredSelection))
        {
            for (Iterator<Object> iterator = ((IStructuredSelection) selection).iterator(); iterator.hasNext();)
            {
                Object object = iterator.next();
                if (object instanceof IAdaptable)
                {
                    return (IProject) ((IAdaptable) object).getAdapter(IProject.class);
                }
            }
        }

        /*
         * it looks like there can be cases where the project can become 'unselected' before this hander
         * actually fires. a popup alert would be better, but for now...
         *
         * TODO: use popup alert to have user retry
         */
        EnhancerPlugin.logError("command execution failed, please try again", null);

        return null;
    }
}


text:
{% extends "base.html" %}
	{% block content %}

          Officers

                {% for officer in officers %}

                            {{ officer.name }}
                            {{ convert_position(officer.position) }}
                            {{ officer.major }}
                            {{ officer.year }}

                {% endfor %}

            {% for officer in officers %}
                <div id={{officer.id}} class="modal fade" role="dialog"<>

                                <button type="button" class="close" data-dismiss="modal">×</button>

{{officer.name}}

{{officer.quote}}

{{officer.description}}

            {% endfor %}

    {% endblock %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:mybatis="http://mybatis.org/schema/mybatis-spring"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://mybatis.org/schema/mybatis-spring
       http://mybatis.org/schema/mybatis-spring.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">

    <mybatis:scan base-package="org.itevents.dao.mybatis.mapper"/>
    <context:component-scan base-package="org.itevents.service"/>
    <context:property-placeholder location="classpath*:local.properties"/>

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="${database.driver}"/>
        <property name="url" value="${database.url}"/>
        <property name="username" value="${database.username}"/>
        <property name="password" value="${database.password}"/>
    </bean>

    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
    </bean>

    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource" />
    </bean>
</beans>


text:
package com.mongodb;

import java.util.concurrent.TimeUnit;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.bson.util.Assertions.isTrue;

class ConnectionPoolSettings {
    private final int maxSize;
    private final int minSize;
    private final int maxWaitQueueSize;
    private final long maxWaitTimeMS;
    private final long maxConnectionLifeTimeMS;
    private final long maxConnectionIdleTimeMS;
    private final long maintenanceInitialDelayMS;
    private final long maintenanceFrequencyMS;

    public static Builder builder() {
        return new Builder();
    }

    static class Builder {
        private int maxSize;
        private int minSize;
        private int maxWaitQueueSize;
        private long maxWaitTimeMS;
        private long maxConnectionLifeTimeMS;
        private long maxConnectionIdleTimeMS;
        private long maintenanceInitialDelayMS;
        private long maintenanceFrequencyMS = MILLISECONDS.convert(60, SECONDS);

        // CHECKSTYLE:OFF
        public Builder maxSize(final int maxSize) {
            this.maxSize = maxSize;
            return this;
        }

        public Builder minSize(final int minSize) {
            this.minSize = minSize;
            return this;
        }

        public Builder maxWaitQueueSize(final int maxWaitQueueSize) {
            this.maxWaitQueueSize = maxWaitQueueSize;
            return this;
        }

        public Builder maxWaitTime(final long maxWaitTime, final TimeUnit timeUnit) {
            this.maxWaitTimeMS = MILLISECONDS.convert(maxWaitTime, timeUnit);
            return this;
        }

        public Builder maxConnectionLifeTime(final long maxConnectionLifeTime, final TimeUnit timeUnit) {
            this.maxConnectionLifeTimeMS = MILLISECONDS.convert(maxConnectionLifeTime, timeUnit);
            return this;
        }

        public Builder maxConnectionIdleTime(final long maxConnectionIdleTime, final TimeUnit timeUnit) {
            this.maxConnectionIdleTimeMS = MILLISECONDS.convert(maxConnectionIdleTime, timeUnit);
            return this;
        }

        public Builder maintenanceInitialDelay(final long maintenanceInitialDelay, final TimeUnit timeUnit) {
            this.maintenanceInitialDelayMS = MILLISECONDS.convert(maintenanceInitialDelay, timeUnit);
            return this;
        }

        public Builder maintenanceFrequency(final long maintenanceFrequency, final TimeUnit timeUnit) {
            this.maintenanceFrequencyMS = MILLISECONDS.convert(maintenanceFrequency, timeUnit);
            return this;
        }
        // CHECKSTYLE:ON

        public ConnectionPoolSettings build() {
            return new ConnectionPoolSettings(this);
        }
    }

    public int getMaxSize() {
        return maxSize;
    }

    public int getMinSize() {
        return minSize;
    }

    public int getMaxWaitQueueSize() {
        return maxWaitQueueSize;
    }

    public long getMaxWaitTime(final TimeUnit timeUnit) {
        return timeUnit.convert(maxWaitTimeMS, MILLISECONDS);
    }

    public long getMaxConnectionLifeTime(final TimeUnit timeUnit) {
        return timeUnit.convert(maxConnectionLifeTimeMS, MILLISECONDS);
    }

    public long getMaxConnectionIdleTime(final TimeUnit timeUnit) {
        return timeUnit.convert(maxConnectionIdleTimeMS, MILLISECONDS);
    }

    public long getMaintenanceInitialDelay(final TimeUnit timeUnit) {
        return timeUnit.convert(maintenanceInitialDelayMS, MILLISECONDS);
    }

    public long getMaintenanceFrequency(final TimeUnit timeUnit) {
        return timeUnit.convert(maintenanceFrequencyMS, MILLISECONDS);
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ConnectionPoolSettings that = (ConnectionPoolSettings) o;

        if (maxConnectionIdleTimeMS != that.maxConnectionIdleTimeMS) {
            return false;
        }
        if (maxConnectionLifeTimeMS != that.maxConnectionLifeTimeMS) {
            return false;
        }
        if (maxSize != that.maxSize) {
            return false;
        }
        if (minSize != that.minSize) {
            return false;
        }
        if (maintenanceInitialDelayMS != that.maintenanceInitialDelayMS) {
            return false;
        }
        if (maintenanceFrequencyMS != that.maintenanceFrequencyMS) {
            return false;
        }
        if (maxWaitQueueSize != that.maxWaitQueueSize) {
            return false;
        }
        if (maxWaitTimeMS != that.maxWaitTimeMS) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = maxSize;
        result = 31 * result + minSize;
        result = 31 * result + maxWaitQueueSize;
        result = 31 * result + (int) (maxWaitTimeMS ^ (maxWaitTimeMS >>> 32));
        result = 31 * result + (int) (maxConnectionLifeTimeMS ^ (maxConnectionLifeTimeMS >>> 32));
        result = 31 * result + (int) (maxConnectionIdleTimeMS ^ (maxConnectionIdleTimeMS >>> 32));
        result = 31 * result + (int) (maintenanceInitialDelayMS ^ (maintenanceInitialDelayMS >>> 32));
        result = 31 * result + (int) (maintenanceFrequencyMS ^ (maintenanceFrequencyMS >>> 32));
        return result;
    }

    @Override
    public String toString() {
        return "ConnectionPoolSettings{"
               + "maxSize=" + maxSize
               + ", minSize=" + minSize
               + ", maxWaitQueueSize=" + maxWaitQueueSize
               + ", maxWaitTimeMS=" + maxWaitTimeMS
               + ", maxConnectionLifeTimeMS=" + maxConnectionLifeTimeMS
               + ", maxConnectionIdleTimeMS=" + maxConnectionIdleTimeMS
               + ", maintenanceInitialDelayMS=" + maintenanceInitialDelayMS
               + ", maintenanceFrequencyMS=" + maintenanceFrequencyMS
               + '}';
    }

    ConnectionPoolSettings(final Builder builder) {
        isTrue("maxSize > 0", builder.maxSize > 0);
        isTrue("minSize >= 0", builder.minSize >= 0);
        isTrue("maxWaitQueueSize >= 0", builder.maxWaitQueueSize >= 0);
        isTrue("maxConnectionLifeTime >= 0", builder.maxConnectionLifeTimeMS >= 0);
        isTrue("maxConnectionIdleTime >= 0", builder.maxConnectionIdleTimeMS >= 0);
        isTrue("sizeMaintenanceFrequency >= 0", builder.maintenanceFrequencyMS >= 0);
        isTrue("maxSize >= minSize", builder.maxSize >= builder.minSize);

        maxSize = builder.maxSize;
        minSize = builder.minSize;
        maxWaitQueueSize = builder.maxWaitQueueSize;
        maxWaitTimeMS = builder.maxWaitTimeMS;
        maxConnectionLifeTimeMS = builder.maxConnectionLifeTimeMS;
        maxConnectionIdleTimeMS = builder.maxConnectionIdleTimeMS;
        maintenanceInitialDelayMS = builder.maintenanceInitialDelayMS;
        maintenanceFrequencyMS = builder.maintenanceFrequencyMS;
    }
}


text:
import * as React from 'react';

export interface ResponsiveProps {
  [key: string]: any;

  /** An element type to render as (string or function). */
  as?: any;

  /** Primary content. */
  children?: React.ReactNode;

  /** Fires callbacks immediately after mount. */
  fireOnMount?: boolean;

  /** The maximum width at which content will be displayed. */
  maxWidth?: number | string;

  /** The minimum width at which content will be displayed. */
  minWidth?: number | string;

  /**
   * Called on update.
   *
   * @param {SyntheticEvent} event - The React SyntheticEvent object
   * @param {object} data - All props and the event value.
   */
  onUpdate?: (event: React.SyntheticEvent<HTMLElement>, data: ResponsiveOnUpdateData) => void;
}

export interface ResponsiveOnUpdateData extends ResponsiveProps {
  width: string;
}

export interface ResponsiveWidthShorthand {
  minWidth: number;
  maxWidth?: number;
}

declare class Responsive extends React.Component<ResponsiveProps, {}> {
  static onlyMobile: ResponsiveWidthShorthand;
  static onlyTablet: ResponsiveWidthShorthand;
  static onlyComputer: ResponsiveWidthShorthand;
  static onlyLargeScreen: ResponsiveWidthShorthand;
  static onlyWidescreen: ResponsiveWidthShorthand;
}

export default Responsive;


text:
package storage

import (
	"context"
	"io"
	"log"

	"github.com/SeerUK/foldup/pkg/storage/gcs"
)

// GCSGateway implements the Gateway interface for interacting with Google Cloud Storage.
type GCSGateway struct {
	bucket string
	client gcs.Client
}

// NewGCSGateway creates a new Gateway instance, using GCSGateway.
func NewGCSGateway(client gcs.Client, bucket string) Gateway {
	return &GCSGateway{
		bucket: bucket,
		client: client,
	}
}

// Store attempts to write a file via the Gateway.
func (g *GCSGateway) Store(ctx context.Context, filename string, reader io.Reader) error {
	log.Printf("Started uploading archive '%s'...", filename)

	writer := g.client.Bucket(g.bucket).Object(filename).NewWriteCloser(ctx)
	_, err := io.Copy(writer, reader)

	cerr := writer.Close()
	if cerr != nil {
		return cerr
	}

	log.Printf("Finished uploading archive '%s'...", filename)

	return err
}


text:
import ark

def on_clicked(audio_player: ark.AudioPlayer):
    ark.logd('on_red_clicked')
    audio_player.play('s003.ogg')

def main(app: ark.ApplicationFacade):
    resource_loader = app.create_resource_loader('main.xml')
    audio_player = resource_loader.load(ark.AudioPlayer, 'pre:audio_player')
    app.arena = resource_loader.load(ark.Arena, 'main', on_red_clicked=lambda: on_clicked(audio_player))

if __name__ == '__main__':
    main(_application)


text:
// The MIT License (MIT)
//
// Copyright (c) 2015-2016 Rasmus Mikkelsen
// Copyright (c) 2015-2016 eBay Software Foundation
// https://github.com/rasmus/EventFlow
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using EventFlow.Aggregates;
using EventFlow.Commands;
using EventFlow.Configuration;
using EventFlow.Core;
using EventFlow.Core.Caching;
using EventFlow.Exceptions;
using EventFlow.Extensions;
using EventFlow.Logging;

namespace EventFlow
{
    public class CommandBus : ICommandBus
    {
        private readonly ILog _log;
        private readonly IResolver _resolver;
        private readonly IAggregateStore _aggregateStore;
        private readonly IMemoryCache _memoryCache;

        public CommandBus(
            ILog log,
            IResolver resolver,
            IAggregateStore aggregateStore,
            IMemoryCache memoryCache)
        {
            _log = log;
            _resolver = resolver;
            _aggregateStore = aggregateStore;
            _memoryCache = memoryCache;
        }

        public async Task<ISourceId> PublishAsync<TAggregate, TIdentity, TSourceIdentity>(
            ICommand<TAggregate, TIdentity, TSourceIdentity> command,
            CancellationToken cancellationToken)
            where TAggregate : IAggregateRoot<TIdentity>
            where TIdentity : IIdentity
            where TSourceIdentity : ISourceId
        {
            if (command == null) throw new ArgumentNullException(nameof(command));

            _log.Trace(() => $"Executing command '{command.GetType().PrettyPrint()}' with ID '{command.SourceId}' on aggregate '{typeof(TAggregate).PrettyPrint()}'");

            IReadOnlyCollection<IDomainEvent> domainEvents;
            try
            {
                domainEvents = await ExecuteCommandAsync(command, cancellationToken).ConfigureAwait(false);
            }
            catch (Exception exception)
            {
                _log.DebugException(
                    "Excution of command '{0}' with ID '{1}' on aggregate '{2}' failed due to exception '{3}' with message: {4}",
                    exception,
                    command.GetType().PrettyPrint(),
                    command.SourceId,
                    typeof(TAggregate),
                    exception.GetType().PrettyPrint(),
                    exception.Message);
                throw;
            }

            _log.Trace(() => domainEvents.Any()
                ? string.Format(
                    "Execution command '{0}' with ID '{1}' on aggregate '{2}' did NOT result in any domain events",
                    command.GetType().PrettyPrint(),
                    command.SourceId,
                    typeof(TAggregate).PrettyPrint())
                : string.Format(
                    "Execution command '{0}' with ID '{1}' on aggregate '{2}' resulted in these events: {3}",
                    command.GetType().PrettyPrint(),
                    command.SourceId,
                    typeof(TAggregate),
                    string.Join(", ", domainEvents.Select(d => d.EventType.PrettyPrint()))));

            return command.SourceId;
        }

        private async Task<IReadOnlyCollection<IDomainEvent>> ExecuteCommandAsync<TAggregate, TIdentity, TSourceIdentity>(
            ICommand<TAggregate, TIdentity, TSourceIdentity> command,
            CancellationToken cancellationToken)
            where TAggregate : IAggregateRoot<TIdentity>
            where TIdentity : IIdentity
            where TSourceIdentity : ISourceId
        {
            var commandType = command.GetType();
            var commandExecutionDetails = await GetCommandExecutionDetailsAsync(commandType, cancellationToken).ConfigureAwait(false);

            var commandHandlers = _resolver.ResolveAll(commandExecutionDetails.CommandHandlerType)
                .Cast<ICommandHandler>()
                .ToList();
            if (!commandHandlers.Any())
            {
                throw new NoCommandHandlersException(string.Format(
                    "No command handlers registered for the command '{0}' on aggregate '{1}'",
                    commandType.PrettyPrint(),
                    typeof(TAggregate).PrettyPrint()));
            }
            if (commandHandlers.Count > 1)
            {
                throw new InvalidOperationException(string.Format(
                    "Too many command handlers the command '{0}' on aggregate '{1}'. These were found: {2}",
                    commandType.PrettyPrint(),
                    typeof(TAggregate).PrettyPrint(),
                    string.Join(", ", commandHandlers.Select(h => h.GetType().PrettyPrint()))));
            }

            var commandHandler = commandHandlers.Single();

            return await _aggregateStore.UpdateAsync<TAggregate, TIdentity>(
                command.AggregateId,
                command.SourceId,
                (a, c) => commandExecutionDetails.Invoker(commandHandler, a, command, c),
                cancellationToken)
                .ConfigureAwait(false);
        }

        private class CommandExecutionDetails
        {
            public Type CommandHandlerType { get; set; }
            public Func<ICommandHandler, IAggregateRoot, ICommand, CancellationToken, Task> Invoker { get; set; }
        }

        private Task<CommandExecutionDetails> GetCommandExecutionDetailsAsync(Type commandType, CancellationToken cancellationToken)
        {
            return _memoryCache.GetOrAddAsync(
                CacheKey.With(GetType(), commandType.GetCacheKey()),
                TimeSpan.FromDays(1),
                _ =>
                    {
                        var commandInterfaceType = commandType
                            .GetInterfaces()
                            .Single(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof (ICommand<,,>));
                        var commandTypes = commandInterfaceType.GetGenericArguments();

                        var commandHandlerType = typeof(ICommandHandler<,,,>)
                            .MakeGenericType(commandTypes[0], commandTypes[1], commandTypes[2], commandType);

                        var invokeExecuteAsync = ReflectionHelper.CompileMethodInvocation<Func<ICommandHandler, IAggregateRoot, ICommand, CancellationToken, Task>>(
                            commandHandlerType, "ExecuteAsync");

                        return Task.FromResult(new CommandExecutionDetails
                            {
                                CommandHandlerType = commandHandlerType,
                                Invoker = invokeExecuteAsync
                            });
                    },
                cancellationToken);
        }
    }
}


text:
package com.github.yftx.AndroidHacks.sectionAnimation;

import android.app.Activity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.TextSwitcher;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewSwitcher;
import com.github.yftx.AndroidHacks.R;

import java.util.logging.Handler;

/**
 * User: Liuzl
 * Date: 13-11-26
 */
public class TextAndImageAnimation extends Activity {
    private TextSwitcher mTextSwitcher;
    private int mPostTimes;
    private Runnable mTextChangeRunnable;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.text_image_animation);
        initTextSwitcher();
    }

    private void initTextSwitcher() {
        mTextSwitcher = (TextSwitcher) findViewById(R.id.tv_switcher);
        Animation in = AnimationUtils.loadAnimation(this, android.R.anim.fade_in);
        Animation out = AnimationUtils.loadAnimation(this,android.R.anim.fade_out);
        mTextSwitcher.setFactory(new ViewSwitcher.ViewFactory() {
            @Override
            public View makeView() {
                TextView tv = new TextView(TextAndImageAnimation.this);
                tv.setGravity(Gravity.CENTER);
                return tv;
            }
        });
        mTextSwitcher.setInAnimation(in);
        mTextSwitcher.setOutAnimation(out);
        mTextChangeRunnable = new ChangeTextRunnable();
    }

    public void onClickStartChange(View v){
        mTextSwitcher.post(mTextChangeRunnable);
        Toast.makeText(this,"start change text view",Toast.LENGTH_SHORT).show();
    }

     class ChangeTextRunnable implements Runnable {
        @Override
        public void run() {
            mTextSwitcher.setText("postimes " + mPostTimes);
            mPostTimes++;
            mTextSwitcher.postDelayed(mTextChangeRunnable,500);

        }
    }

}


text:
import functools

from nova import safe_utils
from nova import test

def get_closure():
    x = 1

    def wrapper(self, instance, red=None, blue=None):
        return x

    return wrapper

class WrappedCodeTestCase(test.NoDBTestCase):
    """Test the get_wrapped_function utility method."""

    def _wrapper(self, function):
        @functools.wraps(function)
        def decorated_function(self, *args, **kwargs):
            function(self, *args, **kwargs)
        return decorated_function

    def test_single_wrapped(self):
        @self._wrapper
        def wrapped(self, instance, red=None, blue=None):
            pass

        func = safe_utils.get_wrapped_function(wrapped)
        func_code = func.__code__
        self.assertEqual(4, len(func_code.co_varnames))
        self.assertIn('self', func_code.co_varnames)
        self.assertIn('instance', func_code.co_varnames)
        self.assertIn('red', func_code.co_varnames)
        self.assertIn('blue', func_code.co_varnames)

    def test_double_wrapped(self):
        @self._wrapper
        @self._wrapper
        def wrapped(self, instance, red=None, blue=None):
            pass

        func = safe_utils.get_wrapped_function(wrapped)
        func_code = func.__code__
        self.assertEqual(4, len(func_code.co_varnames))
        self.assertIn('self', func_code.co_varnames)
        self.assertIn('instance', func_code.co_varnames)
        self.assertIn('red', func_code.co_varnames)
        self.assertIn('blue', func_code.co_varnames)

    def test_triple_wrapped(self):
        @self._wrapper
        @self._wrapper
        @self._wrapper
        def wrapped(self, instance, red=None, blue=None):
            pass

        func = safe_utils.get_wrapped_function(wrapped)
        func_code = func.__code__
        self.assertEqual(4, len(func_code.co_varnames))
        self.assertIn('self', func_code.co_varnames)
        self.assertIn('instance', func_code.co_varnames)
        self.assertIn('red', func_code.co_varnames)
        self.assertIn('blue', func_code.co_varnames)

    def test_closure(self):
        closure = get_closure()
        func = safe_utils.get_wrapped_function(closure)
        func_code = func.__code__
        self.assertEqual(4, len(func_code.co_varnames))
        self.assertIn('self', func_code.co_varnames)
        self.assertIn('instance', func_code.co_varnames)
        self.assertIn('red', func_code.co_varnames)
        self.assertIn('blue', func_code.co_varnames)


text:
// Originally submitted to OSEHRA 2/21/2017 by DSS, Inc.
// Authored by DSS, Inc. 2014-2017

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

namespace VA.Gov.Artemis.UI.Data.Models.Account
{
    public class User
    {
        public string Duz { get; set; }
        public string UserName { get; set; }
    }
}


text:
$(document).ready(function() {

	// CV Skills Tab
	$(".skillstab .skill_tab").click(function() {
		if ( $(this).hasClass('skill_dev') || $(this).hasClass('m_skill_dev') ) {
			$(this).siblings().removeClass("skill_active");

            if ( $(this).hasClass('skill_dev') ) {
                $(this).addClass("skill_active");
                $(this).siblings(".m_skill_dev").addClass("skill_active");
            } else {
                $(this).addClass("skill_active");
                $(this).siblings(".skill_dev").addClass("skill_active");
            }

			$(".outer_barContainer").fadeOut("fast");
			$(".outer_pieContainer").delay(200).fadeIn("fast");
		} else {
			$(this).siblings().removeClass("skill_active");

            if ( $(this).hasClass('skill_des') ) {
                $(this).addClass("skill_active");
                $(this).siblings(".m_skill_des").addClass("skill_active");
            } else {
                $(this).addClass("skill_active");
                $(this).siblings(".skill_des").addClass("skill_active");
            }

			$(".outer_pieContainer").fadeOut("fast");
			$(".outer_barContainer").delay(200).fadeIn("fast");
		}
	});

});


text: select instr('aaa', 'a', '') from db_root order by 1;


text:
package cost.healthcare.core.model.v1.license;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import cost.healthcare.core.annotation.DataTransferObject;

@JsonIgnoreProperties({"_id"})
@DataTransferObject("ProviderInfo")
public class ProviderInfo
{
    private Double averageMedicareAllowedAmount;
    private Double averageMedicarePaymentAmount;
    private Double averageSubmittedChrgAmount;
    private Integer numberOfDistinctMedicareBeneficiaryPerDayServices;
    private Integer numberOfMedicareBeneficiaries;
    private String healthcareCommonProcedureCodingSystemCode;
    private String healthcareCommonProcedureCodingSystemDescription;
    private String healthcareCommonProcedureCodingSystemDrugIndicator;
    private Double numberOfServices;
    private String medicareParticipationIndicator;
    private String nationalProviderIdentifier;
    private String providerCredentials;
    private String entityType;
    private String providerCity;
    private String providerCountry;
    private String providerFirstName;
    private String providerGender;
    private String providerLastName;
    private String providerMiddleInitial;
    private String providerState;
    private String providerStreetAddress1;
    private String providerStreetAddress2;
    private String providerZip;
    private String placeOfService;
    private String providerType;
    private Double standardDeviationMedicareAllowedAmount;
    private Double standardDeviationMedicarePaymentAmount;
    private Double standardDeviationSubmittedChrgAmount;
    private Double averageMedicareStandardizedAmount;
    private String dataYear;

    public Double getAverageMedicareAllowedAmount()
    {
        return averageMedicareAllowedAmount;
    }

    public void setAverageMedicareAllowedAmount(Double averageMedicareAllowedAmount)
    {
        this.averageMedicareAllowedAmount = averageMedicareAllowedAmount;
    }

    public Double getAverageMedicarePaymentAmount()
    {
        return averageMedicarePaymentAmount;
    }

    public void setAverageMedicarePaymentAmount(Double averageMedicarePaymentAmount)
    {
        this.averageMedicarePaymentAmount = averageMedicarePaymentAmount;
    }

    public Double getAverageSubmittedChrgAmount()
    {
        return averageSubmittedChrgAmount;
    }

    public void setAverageSubmittedChrgAmount(Double averageSubmittedChrgAmount)
    {
        this.averageSubmittedChrgAmount = averageSubmittedChrgAmount;
    }

    public Integer getNumberOfDistinctMedicareBeneficiaryPerDayServices()
    {
        return numberOfDistinctMedicareBeneficiaryPerDayServices;
    }

    public void setNumberOfDistinctMedicareBeneficiaryPerDayServices(Integer numberOfDistinctMedicareBeneficiaryPerDayServices)
    {
        this.numberOfDistinctMedicareBeneficiaryPerDayServices = numberOfDistinctMedicareBeneficiaryPerDayServices;
    }

    public Integer getNumberOfMedicareBeneficiaries()
    {
        return numberOfMedicareBeneficiaries;
    }

    public void setNumberOfMedicareBeneficiaries(Integer numberOfMedicareBeneficiaries)
    {
        this.numberOfMedicareBeneficiaries = numberOfMedicareBeneficiaries;
    }

    public String getHealthcareCommonProcedureCodingSystemCode()
    {
        return healthcareCommonProcedureCodingSystemCode;
    }

    public void setHealthcareCommonProcedureCodingSystemCode(String healthcareCommonProcedureCodingSystemCode)
    {
        this.healthcareCommonProcedureCodingSystemCode = healthcareCommonProcedureCodingSystemCode;
    }

    public String getHealthcareCommonProcedureCodingSystemDescription()
    {
        return healthcareCommonProcedureCodingSystemDescription;
    }

    public void setHealthcareCommonProcedureCodingSystemDescription(String healthcareCommonProcedureCodingSystemDescription)
    {
        this.healthcareCommonProcedureCodingSystemDescription = healthcareCommonProcedureCodingSystemDescription;
    }

    public String getHealthcareCommonProcedureCodingSystemDrugIndicator()
    {
        return healthcareCommonProcedureCodingSystemDrugIndicator;
    }

    public void setHealthcareCommonProcedureCodingSystemDrugIndicator(String healthcareCommonProcedureCodingSystemDrugIndicator)
    {
        this.healthcareCommonProcedureCodingSystemDrugIndicator = healthcareCommonProcedureCodingSystemDrugIndicator;
    }

    public Double getNumberOfServices()
    {
        return numberOfServices;
    }

    public void setNumberOfServices(Double numberOfServices)
    {
        this.numberOfServices = numberOfServices;
    }

    public String getMedicareParticipationIndicator()
    {
        return medicareParticipationIndicator;
    }

    public void setMedicareParticipationIndicator(String medicareParticipationIndicator)
    {
        this.medicareParticipationIndicator = medicareParticipationIndicator;
    }

    public String getNationalProviderIdentifier()
    {
        return nationalProviderIdentifier;
    }

    public void setNationalProviderIdentifier(String nationalProviderIdentifier)
    {
        this.nationalProviderIdentifier = nationalProviderIdentifier;
    }

    public String getProviderCredentials()
    {
        return providerCredentials;
    }

    public void setProviderCredentials(String providerCredentials)
    {
        this.providerCredentials = providerCredentials;
    }

    public String getEntityType()
    {
        return entityType;
    }

    public void setEntityType(String entityType)
    {
        this.entityType = entityType;
    }

    public String getProviderCity()
    {
        return providerCity;
    }

    public void setProviderCity(String providerCity)
    {
        this.providerCity = providerCity;
    }

    public String getProviderCountry()
    {
        return providerCountry;
    }

    public void setProviderCountry(String providerCountry)
    {
        this.providerCountry = providerCountry;
    }

    public String getProviderFirstName()
    {
        return providerFirstName;
    }

    public void setProviderFirstName(String providerFirstName)
    {
        this.providerFirstName = providerFirstName;
    }

    public String getProviderGender()
    {
        return providerGender;
    }

    public void setProviderGender(String providerGender)
    {
        this.providerGender = providerGender;
    }

    public String getProviderLastName()
    {
        return providerLastName;
    }

    public void setProviderLastName(String providerLastName)
    {
        this.providerLastName = providerLastName;
    }

    public String getProviderMiddleInitial()
    {
        return providerMiddleInitial;
    }

    public void setProviderMiddleInitial(String providerMiddleInitial)
    {
        this.providerMiddleInitial = providerMiddleInitial;
    }

    public String getProviderState()
    {
        return providerState;
    }

    public void setProviderState(String providerState)
    {
        this.providerState = providerState;
    }

    public String getProviderStreetAddress1()
    {
        return providerStreetAddress1;
    }

    public void setProviderStreetAddress1(String providerStreetAddress1)
    {
        this.providerStreetAddress1 = providerStreetAddress1;
    }

    public String getProviderStreetAddress2()
    {
        return providerStreetAddress2;
    }

    public void setProviderStreetAddress2(String providerStreetAddress2)
    {
        this.providerStreetAddress2 = providerStreetAddress2;
    }

    public String getProviderZip()
    {
        return providerZip;
    }

    public void setProviderZip(String providerZip)
    {
        this.providerZip = providerZip;
    }

    public String getPlaceOfService()
    {
        return placeOfService;
    }

    public void setPlaceOfService(String placeOfService)
    {
        this.placeOfService = placeOfService;
    }

    public String getProviderType()
    {
        return providerType;
    }

    public void setProviderType(String providerType)
    {
        this.providerType = providerType;
    }

    public Double getStandardDeviationMedicareAllowedAmount()
    {
        return standardDeviationMedicareAllowedAmount;
    }

    public void setStandardDeviationMedicareAllowedAmount(Double standardDeviationMedicareAllowedAmount)
    {
        this.standardDeviationMedicareAllowedAmount = standardDeviationMedicareAllowedAmount;
    }

    public Double getStandardDeviationMedicarePaymentAmount()
    {
        return standardDeviationMedicarePaymentAmount;
    }

    public void setStandardDeviationMedicarePaymentAmount(Double standardDeviationMedicarePaymentAmount)
    {
        this.standardDeviationMedicarePaymentAmount = standardDeviationMedicarePaymentAmount;
    }

    public Double getStandardDeviationSubmittedChrgAmount()
    {
        return standardDeviationSubmittedChrgAmount;
    }

    public void setStandardDeviationSubmittedChrgAmount(Double standardDeviationSubmittedChrgAmount)
    {
        this.standardDeviationSubmittedChrgAmount = standardDeviationSubmittedChrgAmount;
    }

    public Double getAverageMedicareStandardizedAmount()
    {
        return averageMedicareStandardizedAmount;
    }

    public void setAverageMedicareStandardizedAmount(Double averageMedicareStandardizedAmount)
    {
        this.averageMedicareStandardizedAmount = averageMedicareStandardizedAmount;
    }

    public String getDataYear()
    {
        return dataYear;
    }

    public void setDataYear(String dataYear)
    {
        this.dataYear = dataYear;
    }
}


text: export { ShoppingCartModule } from './shopping-cart.module';


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
	<properties>
		<author email="martin.eisengardt@googlemail.com">
			Martin Eisengardt
		</author>

		<title>The archetypes</title>
		<meta name="keyword" content="apache, maven, php" />
	</properties>

Here you will find the archetypes we currently maintain. There may be additional archetypes provided by the community. We will list them here.
However if you maintain you own archetype let us know. We will list it here.

groupId	artifactId	Maintainer	Versions	Description

    org.phpmaven
    php5-lib-archetype
    php-maven.org
    Served by official repository

    Nexus search
    A small library project with 1 class file and 1 unit test.

    org.phpmaven
    php5-web-archetype
    php-maven.org
    Served by official repository

    Nexus search
    A small library project with 1 class file and 1 unit test, as well as a htdocs folder with 1 index.php.

    org.phpmaven
    php5-zend-archetype
    php-maven.org
    Served by official repository

    Nexus search
    A small zend framework application.

    org.phpmaven
    php5-doctrine-archetype
    php-maven.org
    Served by official repository

    Nexus search
    A small doctrine project.

</document>


text:
// ReSharper disable InconsistentNaming

using Xunit;

namespace EasyNetQ.Hosepipe.Tests
{
    public class ArgParserTests
    {
        private readonly ArgParser argParser;

        public ArgParserTests()
        {
            argParser = new ArgParser();
        }

        [Fact]
        public void Should_be_able_to_retrieve_args_by_position()
        {
            var args = new[]
            {
                "one",
                "two",
                "three"
            };

            var arguments = argParser.Parse(args);

            var one = "";
            var two = "";
            var three = "";
            var threeFailed = false;

            arguments.At(0, a => one = a.Value).FailWith(() => Assert.True(false, "should succeed"));
            arguments.At(1, a => two = a.Value).FailWith(() => Assert.True(false, "should succeed"));
            arguments.At(2, a => three = a.Value).FailWith(() => Assert.True(false, "should succeed"));
            arguments.At(3, a => Assert.True(false, "Should not be an arg at 3")).FailWith(() => threeFailed = true);

            one.ShouldEqual(args[0]);
            two.ShouldEqual(args[1]);
            three.ShouldEqual(args[2]);
            threeFailed.ShouldBeTrue();
        }

        [Fact]
        public void Should_be_able_to_retrieve_args_by_key()
        {
            var args = new string[]
            {
                "x:one",
                "y:two",
                "z:three",
                "f"
            };

            var arguments = argParser.Parse(args);
            var fNotFound = false;

            arguments.WithKey("z", a => a.Value.ShouldEqual("three")).FailWith(() => Assert.True(false, "should succeed"));
            arguments.WithKey("x", a => a.Value.ShouldEqual("one")).FailWith(() => Assert.True(false, "should succeed"));
            arguments.WithKey("y", a => a.Value.ShouldEqual("two")).FailWith(() => Assert.True(false, "should succeed"));
            arguments.WithKey("f", a => Assert.True(false)).FailWith(() => fNotFound = true);

            fNotFound.ShouldBeTrue();
        }

        [Fact]
        public void Should_be_able_to_retrieve_args_by_position_and_key()
        {
            var args = new string[]
            {
                "command",
                "abc"
            };

            var arguments = argParser.Parse(args);
            var commandDetected = false;
            var abcDetected = false;

            arguments.At(0, "command", () => commandDetected = true).FailWith(() => Assert.True(false, "should succeed"));
            arguments.At(0, "notCommand", () => Assert.True(false, "should not succeed"));
            arguments.At(1, "command", () => Assert.True(false, "should not succeed"));
            arguments.At(1, "abc", () => abcDetected = true).FailWith(() => Assert.True(false, "should succeed"));

            commandDetected.ShouldBeTrue();
            abcDetected.ShouldBeTrue();
        }
    }
}

// ReSharper restore InconsistentNaming


text:
using DynamicData;
using ReactiveUI;
using Sakuno.ING.Game.Models;
using System.Collections.Generic;
using System.Reactive.Linq;

namespace Sakuno.ING.ViewModels.Homeport
{
    public sealed class AirForceGroupViewModel : ReactiveObject
    {
        public IReadOnlyCollection<AirForceSquadronViewModel> Squadrons { get; }

        private readonly ObservableAsPropertyHelper<int> _combatRadius;
        public int CombatRadius => _combatRadius.Value;

        public AirForceGroupViewModel(AirForceGroup airForceGroup)
        {
            Squadrons = airForceGroup.Squadrons.DefaultViewSource.Transform(r => new AirForceSquadronViewModel(r)).Bind();

            _combatRadius = airForceGroup.WhenAnyValue(r => r.BaseCombatRadius, r => r.BonusCombatRadius, (x, y) => x + y)
                .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(CombatRadius));
        }
    }
}


text:
NS_ASSUME_NONNULL_BEGIN

@interface WPSPGeoLocation : NSObject
@property (nonatomic, assign, readonly) double lat;
@property (nonatomic, assign, readonly) double lon;

- (instancetype) initWithLat:(double)lat lon:(double)lon;
@end

NS_ASSUME_NONNULL_END


text:
package org.apache.avro.hadoop.file;

import org.apache.avro.file.CodecFactory;
import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class TestHadoopCodecFactory {

  @Test
  public void testHadoopCodecFactoryDeflate() {
    CodecFactory hadoopDeflateCodec = HadoopCodecFactory.fromHadoopString("org.apache.hadoop.io.compress.DeflateCodec");
    CodecFactory avroDeflateCodec = CodecFactory.fromString("deflate");
    assertTrue(hadoopDeflateCodec.getClass().equals(avroDeflateCodec.getClass()));
  }

  @Test
  public void testHadoopCodecFactorySnappy() {
    CodecFactory hadoopSnappyCodec = HadoopCodecFactory.fromHadoopString("org.apache.hadoop.io.compress.SnappyCodec");
    CodecFactory avroSnappyCodec = CodecFactory.fromString("snappy");
    assertTrue(hadoopSnappyCodec.getClass().equals(avroSnappyCodec.getClass()));
  }

  @Test
  public void testHadoopCodecFactoryBZip2() {
    CodecFactory hadoopSnappyCodec = HadoopCodecFactory.fromHadoopString("org.apache.hadoop.io.compress.BZip2Codec");
    CodecFactory avroSnappyCodec = CodecFactory.fromString("bzip2");
    assertTrue(hadoopSnappyCodec.getClass().equals(avroSnappyCodec.getClass()));
  }

  @Test
  public void testHadoopCodecFactoryGZip() {
    CodecFactory hadoopSnappyCodec = HadoopCodecFactory.fromHadoopString("org.apache.hadoop.io.compress.GZipCodec");
    CodecFactory avroSnappyCodec = CodecFactory.fromString("deflate");
    assertTrue(hadoopSnappyCodec.getClass().equals(avroSnappyCodec.getClass()));
  }

  @Test
  public void testHadoopCodecFactoryFail() {
    CodecFactory hadoopSnappyCodec = HadoopCodecFactory.fromHadoopString("org.apache.hadoop.io.compress.FooCodec");
    assertTrue(hadoopSnappyCodec == null);
  }
}


text:
    #define PYZMQ_DRAFT_API 1
#else
    #define PYZMQ_DRAFT_API 0
#endif

#define _PYZMQ_UNDEFINED (-9999)
#ifndef ZMQ_VERSION
    #define ZMQ_VERSION (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VERSION_MAJOR
    #define ZMQ_VERSION_MAJOR (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VERSION_MINOR
    #define ZMQ_VERSION_MINOR (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VERSION_PATCH
    #define ZMQ_VERSION_PATCH (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_NOBLOCK
    #define ZMQ_NOBLOCK (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_DONTWAIT
    #define ZMQ_DONTWAIT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_POLLIN
    #define ZMQ_POLLIN (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_POLLOUT
    #define ZMQ_POLLOUT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_POLLERR
    #define ZMQ_POLLERR (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_POLLPRI
    #define ZMQ_POLLPRI (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SNDMORE
    #define ZMQ_SNDMORE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_STREAMER
    #define ZMQ_STREAMER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_FORWARDER
    #define ZMQ_FORWARDER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_QUEUE
    #define ZMQ_QUEUE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IO_THREADS_DFLT
    #define ZMQ_IO_THREADS_DFLT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MAX_SOCKETS_DFLT
    #define ZMQ_MAX_SOCKETS_DFLT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_POLLITEMS_DFLT
    #define ZMQ_POLLITEMS_DFLT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_PRIORITY_DFLT
    #define ZMQ_THREAD_PRIORITY_DFLT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_SCHED_POLICY_DFLT
    #define ZMQ_THREAD_SCHED_POLICY_DFLT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PAIR
    #define ZMQ_PAIR (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PUB
    #define ZMQ_PUB (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SUB
    #define ZMQ_SUB (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_REQ
    #define ZMQ_REQ (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_REP
    #define ZMQ_REP (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_DEALER
    #define ZMQ_DEALER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTER
    #define ZMQ_ROUTER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XREQ
    #define ZMQ_XREQ (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XREP
    #define ZMQ_XREP (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PULL
    #define ZMQ_PULL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PUSH
    #define ZMQ_PUSH (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XPUB
    #define ZMQ_XPUB (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XSUB
    #define ZMQ_XSUB (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_UPSTREAM
    #define ZMQ_UPSTREAM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_DOWNSTREAM
    #define ZMQ_DOWNSTREAM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_STREAM
    #define ZMQ_STREAM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SERVER
    #define ZMQ_SERVER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CLIENT
    #define ZMQ_CLIENT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RADIO
    #define ZMQ_RADIO (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_DISH
    #define ZMQ_DISH (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GATHER
    #define ZMQ_GATHER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SCATTER
    #define ZMQ_SCATTER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_DGRAM
    #define ZMQ_DGRAM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_CONNECTED
    #define ZMQ_EVENT_CONNECTED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_CONNECT_DELAYED
    #define ZMQ_EVENT_CONNECT_DELAYED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_CONNECT_RETRIED
    #define ZMQ_EVENT_CONNECT_RETRIED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_LISTENING
    #define ZMQ_EVENT_LISTENING (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_BIND_FAILED
    #define ZMQ_EVENT_BIND_FAILED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_ACCEPTED
    #define ZMQ_EVENT_ACCEPTED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_ACCEPT_FAILED
    #define ZMQ_EVENT_ACCEPT_FAILED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_CLOSED
    #define ZMQ_EVENT_CLOSED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_CLOSE_FAILED
    #define ZMQ_EVENT_CLOSE_FAILED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_DISCONNECTED
    #define ZMQ_EVENT_DISCONNECTED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_ALL
    #define ZMQ_EVENT_ALL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_MONITOR_STOPPED
    #define ZMQ_EVENT_MONITOR_STOPPED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL
    #define ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_HANDSHAKE_SUCCEEDED
    #define ZMQ_EVENT_HANDSHAKE_SUCCEEDED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL
    #define ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENT_HANDSHAKE_FAILED_AUTH
    #define ZMQ_EVENT_HANDSHAKE_FAILED_AUTH (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED
    #define ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND
    #define ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE
    #define ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE
    #define ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA
    #define ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC
    #define ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH
    #define ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED
    #define ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY
    #define ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID
    #define ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZAP_BAD_VERSION
    #define ZMQ_PROTOCOL_ERROR_ZAP_BAD_VERSION (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE
    #define ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA
    #define ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_NOTIFY_CONNECT
    #define ZMQ_NOTIFY_CONNECT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_NOTIFY_DISCONNECT
    #define ZMQ_NOTIFY_DISCONNECT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_NULL
    #define ZMQ_NULL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PLAIN
    #define ZMQ_PLAIN (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CURVE
    #define ZMQ_CURVE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI
    #define ZMQ_GSSAPI (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_NT_HOSTBASED
    #define ZMQ_GSSAPI_NT_HOSTBASED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_NT_USER_NAME
    #define ZMQ_GSSAPI_NT_USER_NAME (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_NT_KRB5_PRINCIPAL
    #define ZMQ_GSSAPI_NT_KRB5_PRINCIPAL (_PYZMQ_UNDEFINED)
#endif

#ifndef EAGAIN
    #define EAGAIN (_PYZMQ_UNDEFINED)
#endif

#ifndef EINVAL
    #define EINVAL (_PYZMQ_UNDEFINED)
#endif

#ifndef EFAULT
    #define EFAULT (_PYZMQ_UNDEFINED)
#endif

#ifndef ENOMEM
    #define ENOMEM (_PYZMQ_UNDEFINED)
#endif

#ifndef ENODEV
    #define ENODEV (_PYZMQ_UNDEFINED)
#endif

#ifndef EMSGSIZE
    #define EMSGSIZE (_PYZMQ_UNDEFINED)
#endif

#ifndef EAFNOSUPPORT
    #define EAFNOSUPPORT (_PYZMQ_UNDEFINED)
#endif

#ifndef ENETUNREACH
    #define ENETUNREACH (_PYZMQ_UNDEFINED)
#endif

#ifndef ECONNABORTED
    #define ECONNABORTED (_PYZMQ_UNDEFINED)
#endif

#ifndef ECONNRESET
    #define ECONNRESET (_PYZMQ_UNDEFINED)
#endif

#ifndef ENOTCONN
    #define ENOTCONN (_PYZMQ_UNDEFINED)
#endif

#ifndef ETIMEDOUT
    #define ETIMEDOUT (_PYZMQ_UNDEFINED)
#endif

#ifndef EHOSTUNREACH
    #define EHOSTUNREACH (_PYZMQ_UNDEFINED)
#endif

#ifndef ENETRESET
    #define ENETRESET (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_HAUSNUMERO
    #define ZMQ_HAUSNUMERO (_PYZMQ_UNDEFINED)
#endif

#ifndef ENOTSUP
    #define ENOTSUP (_PYZMQ_UNDEFINED)
#endif

#ifndef EPROTONOSUPPORT
    #define EPROTONOSUPPORT (_PYZMQ_UNDEFINED)
#endif

#ifndef ENOBUFS
    #define ENOBUFS (_PYZMQ_UNDEFINED)
#endif

#ifndef ENETDOWN
    #define ENETDOWN (_PYZMQ_UNDEFINED)
#endif

#ifndef EADDRINUSE
    #define EADDRINUSE (_PYZMQ_UNDEFINED)
#endif

#ifndef EADDRNOTAVAIL
    #define EADDRNOTAVAIL (_PYZMQ_UNDEFINED)
#endif

#ifndef ECONNREFUSED
    #define ECONNREFUSED (_PYZMQ_UNDEFINED)
#endif

#ifndef EINPROGRESS
    #define EINPROGRESS (_PYZMQ_UNDEFINED)
#endif

#ifndef ENOTSOCK
    #define ENOTSOCK (_PYZMQ_UNDEFINED)
#endif

#ifndef EFSM
    #define EFSM (_PYZMQ_UNDEFINED)
#endif

#ifndef ENOCOMPATPROTO
    #define ENOCOMPATPROTO (_PYZMQ_UNDEFINED)
#endif

#ifndef ETERM
    #define ETERM (_PYZMQ_UNDEFINED)
#endif

#ifndef EMTHREAD
    #define EMTHREAD (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IO_THREADS
    #define ZMQ_IO_THREADS (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MAX_SOCKETS
    #define ZMQ_MAX_SOCKETS (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SOCKET_LIMIT
    #define ZMQ_SOCKET_LIMIT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_PRIORITY
    #define ZMQ_THREAD_PRIORITY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_SCHED_POLICY
    #define ZMQ_THREAD_SCHED_POLICY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_BLOCKY
    #define ZMQ_BLOCKY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MSG_T_SIZE
    #define ZMQ_MSG_T_SIZE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_AFFINITY_CPU_ADD
    #define ZMQ_THREAD_AFFINITY_CPU_ADD (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_AFFINITY_CPU_REMOVE
    #define ZMQ_THREAD_AFFINITY_CPU_REMOVE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_NAME_PREFIX
    #define ZMQ_THREAD_NAME_PREFIX (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IDENTITY
    #define ZMQ_IDENTITY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SUBSCRIBE
    #define ZMQ_SUBSCRIBE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_UNSUBSCRIBE
    #define ZMQ_UNSUBSCRIBE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_LAST_ENDPOINT
    #define ZMQ_LAST_ENDPOINT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TCP_ACCEPT_FILTER
    #define ZMQ_TCP_ACCEPT_FILTER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PLAIN_USERNAME
    #define ZMQ_PLAIN_USERNAME (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PLAIN_PASSWORD
    #define ZMQ_PLAIN_PASSWORD (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CURVE_PUBLICKEY
    #define ZMQ_CURVE_PUBLICKEY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CURVE_SECRETKEY
    #define ZMQ_CURVE_SECRETKEY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CURVE_SERVERKEY
    #define ZMQ_CURVE_SERVERKEY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ZAP_DOMAIN
    #define ZMQ_ZAP_DOMAIN (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CONNECT_RID
    #define ZMQ_CONNECT_RID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_PRINCIPAL
    #define ZMQ_GSSAPI_PRINCIPAL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_SERVICE_PRINCIPAL
    #define ZMQ_GSSAPI_SERVICE_PRINCIPAL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SOCKS_PROXY
    #define ZMQ_SOCKS_PROXY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XPUB_WELCOME_MSG
    #define ZMQ_XPUB_WELCOME_MSG (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTING_ID
    #define ZMQ_ROUTING_ID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CONNECT_ROUTING_ID
    #define ZMQ_CONNECT_ROUTING_ID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_BINDTODEVICE
    #define ZMQ_BINDTODEVICE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_FD
    #define ZMQ_FD (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RECONNECT_IVL_MAX
    #define ZMQ_RECONNECT_IVL_MAX (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SNDTIMEO
    #define ZMQ_SNDTIMEO (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RCVTIMEO
    #define ZMQ_RCVTIMEO (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SNDHWM
    #define ZMQ_SNDHWM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RCVHWM
    #define ZMQ_RCVHWM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MULTICAST_HOPS
    #define ZMQ_MULTICAST_HOPS (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IPV4ONLY
    #define ZMQ_IPV4ONLY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTER_BEHAVIOR
    #define ZMQ_ROUTER_BEHAVIOR (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TCP_KEEPALIVE
    #define ZMQ_TCP_KEEPALIVE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TCP_KEEPALIVE_CNT
    #define ZMQ_TCP_KEEPALIVE_CNT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TCP_KEEPALIVE_IDLE
    #define ZMQ_TCP_KEEPALIVE_IDLE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TCP_KEEPALIVE_INTVL
    #define ZMQ_TCP_KEEPALIVE_INTVL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_DELAY_ATTACH_ON_CONNECT
    #define ZMQ_DELAY_ATTACH_ON_CONNECT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XPUB_VERBOSE
    #define ZMQ_XPUB_VERBOSE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_EVENTS
    #define ZMQ_EVENTS (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TYPE
    #define ZMQ_TYPE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_LINGER
    #define ZMQ_LINGER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RECONNECT_IVL
    #define ZMQ_RECONNECT_IVL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_BACKLOG
    #define ZMQ_BACKLOG (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTER_MANDATORY
    #define ZMQ_ROUTER_MANDATORY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_FAIL_UNROUTABLE
    #define ZMQ_FAIL_UNROUTABLE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTER_RAW
    #define ZMQ_ROUTER_RAW (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IMMEDIATE
    #define ZMQ_IMMEDIATE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IPV6
    #define ZMQ_IPV6 (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MECHANISM
    #define ZMQ_MECHANISM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PLAIN_SERVER
    #define ZMQ_PLAIN_SERVER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CURVE_SERVER
    #define ZMQ_CURVE_SERVER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_PROBE_ROUTER
    #define ZMQ_PROBE_ROUTER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_REQ_RELAXED
    #define ZMQ_REQ_RELAXED (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_REQ_CORRELATE
    #define ZMQ_REQ_CORRELATE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CONFLATE
    #define ZMQ_CONFLATE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTER_HANDOVER
    #define ZMQ_ROUTER_HANDOVER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TOS
    #define ZMQ_TOS (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IPC_FILTER_PID
    #define ZMQ_IPC_FILTER_PID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IPC_FILTER_UID
    #define ZMQ_IPC_FILTER_UID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_IPC_FILTER_GID
    #define ZMQ_IPC_FILTER_GID (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_SERVER
    #define ZMQ_GSSAPI_SERVER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_PLAINTEXT
    #define ZMQ_GSSAPI_PLAINTEXT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_HANDSHAKE_IVL
    #define ZMQ_HANDSHAKE_IVL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XPUB_NODROP
    #define ZMQ_XPUB_NODROP (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XPUB_MANUAL
    #define ZMQ_XPUB_MANUAL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_STREAM_NOTIFY
    #define ZMQ_STREAM_NOTIFY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_INVERT_MATCHING
    #define ZMQ_INVERT_MATCHING (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_XPUB_VERBOSER
    #define ZMQ_XPUB_VERBOSER (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_HEARTBEAT_IVL
    #define ZMQ_HEARTBEAT_IVL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_HEARTBEAT_TTL
    #define ZMQ_HEARTBEAT_TTL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_HEARTBEAT_TIMEOUT
    #define ZMQ_HEARTBEAT_TIMEOUT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_CONNECT_TIMEOUT
    #define ZMQ_CONNECT_TIMEOUT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_TCP_MAXRT
    #define ZMQ_TCP_MAXRT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_THREAD_SAFE
    #define ZMQ_THREAD_SAFE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MULTICAST_MAXTPDU
    #define ZMQ_MULTICAST_MAXTPDU (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VMCI_CONNECT_TIMEOUT
    #define ZMQ_VMCI_CONNECT_TIMEOUT (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_USE_FD
    #define ZMQ_USE_FD (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_PRINCIPAL_NAMETYPE
    #define ZMQ_GSSAPI_PRINCIPAL_NAMETYPE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE
    #define ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MULTICAST_LOOP
    #define ZMQ_MULTICAST_LOOP (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ROUTER_NOTIFY
    #define ZMQ_ROUTER_NOTIFY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_ZAP_ENFORCE_DOMAIN
    #define ZMQ_ZAP_ENFORCE_DOMAIN (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_AFFINITY
    #define ZMQ_AFFINITY (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MAXMSGSIZE
    #define ZMQ_MAXMSGSIZE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_HWM
    #define ZMQ_HWM (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SWAP
    #define ZMQ_SWAP (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MCAST_LOOP
    #define ZMQ_MCAST_LOOP (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RECOVERY_IVL_MSEC
    #define ZMQ_RECOVERY_IVL_MSEC (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VMCI_BUFFER_SIZE
    #define ZMQ_VMCI_BUFFER_SIZE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VMCI_BUFFER_MIN_SIZE
    #define ZMQ_VMCI_BUFFER_MIN_SIZE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_VMCI_BUFFER_MAX_SIZE
    #define ZMQ_VMCI_BUFFER_MAX_SIZE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RATE
    #define ZMQ_RATE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RECOVERY_IVL
    #define ZMQ_RECOVERY_IVL (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SNDBUF
    #define ZMQ_SNDBUF (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RCVBUF
    #define ZMQ_RCVBUF (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_RCVMORE
    #define ZMQ_RCVMORE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_MORE
    #define ZMQ_MORE (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SRCFD
    #define ZMQ_SRCFD (_PYZMQ_UNDEFINED)
#endif

#ifndef ZMQ_SHARED
    #define ZMQ_SHARED (_PYZMQ_UNDEFINED)
#endif

#endif // ifndef _PYZMQ_CONSTANT_DEFS


text:
require 'set'

DependencyDetection.defer do
  @name = :merb_controller

  depends_on do
    defined?(Merb) && defined?(Merb::Controller)
  end

  executes do
    ::NewRelic::Agent.logger.info 'Installing Merb Controller instrumentation'
  end

  executes do
    require 'merb-core/controller/merb_controller'

    Merb::Controller.class_eval do
      include NewRelic::Agent::Instrumentation::ControllerInstrumentation

      # determine the path that is used in the metric name for
      # the called controller action
      def newrelic_metric_path
        "#{controller_name}/#{action_name}"
      end

      protected

      def _dispatch_with_newrelic_trace(*args)
        options = {}
        options[:params] = params
        perform_action_with_newrelic_trace(options) do
          _dispatch_without_newrelic_trace(*args)
        end
      end

      alias_method :_dispatch_without_newrelic_trace, :_dispatch
      alias_method :_dispatch, :_dispatch_with_newrelic_trace
    end
  end
end


text:
package com.xti.jenkins.plugin.awslambda.publish;

import com.amazonaws.services.lambda.AWSLambdaClient;
import com.amazonaws.services.lambda.model.*;
import com.xti.jenkins.plugin.awslambda.invoke.LambdaInvokeBuildStepTest;
import com.xti.jenkins.plugin.awslambda.util.LambdaClientConfig;
import hudson.EnvVars;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Result;
import hudson.util.LogTaskListener;
import hudson.util.Secret;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.jvnet.hudson.test.JenkinsRule;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;

import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
import static org.mockito.Matchers.any;

/**
 * Created by Magnus Sulland on 4/08/2016.
 */

@RunWith(MockitoJUnitRunner.class)
public class LambdaPublishBuildStepTest {

    @Rule
    public JenkinsRule j = new JenkinsRule();

    @Mock
    private LambdaPublishBuildStepVariables original;

    @Mock
    private LambdaClientConfig clientConfig;

    @Mock
    private AWSLambdaClient lambdaClient;

    @Test
    public void testPerform() throws IOException, ExecutionException, InterruptedException {
        LambdaPublishBuildStepVariables clone = new LambdaPublishBuildStepVariables(false, "${ENV_ID}", Secret.fromString("$ENV_SECRET}}"), "${ENV_REGION}", "${ENV_ARN}", "${ENV_ALIAS}", "description ${ENV_VERSIONDESCRIPTION}");
        LambdaPublishBuildStepVariables spy = Mockito.spy(clone);

        when(original.getClone()).thenReturn(spy);
        when(spy.getLambdaClientConfig()).thenReturn(clientConfig);
        when(clientConfig.getClient()).thenReturn(lambdaClient);

        PublishVersionResult publishResult = new PublishVersionResult()
                .withFunctionArn("ARN")
                .withDescription("DESCRIPTION")
                .withVersion("VERSION");

        when(lambdaClient.publishVersion(any(PublishVersionRequest.class)))
                .thenReturn(publishResult);

        UpdateAliasResult aliasResult = new UpdateAliasResult()
                .withDescription("DESCRIPTION")
                .withFunctionVersion("VERSION")
                .withName("ALIAS");

        when(lambdaClient.updateAlias(any(UpdateAliasRequest.class)))
                .thenReturn(aliasResult);

        GetAliasResult aliasFindResult = new GetAliasResult();

        when(lambdaClient.getAlias(any(GetAliasRequest.class)))
                .thenReturn(aliasFindResult);

        FreeStyleProject p = j.createFreeStyleProject();
        p.getBuildersList().add(new LambdaPublishBuildStep(original));

        FreeStyleBuild build = p.scheduleBuild2(0).get();
        assertEquals(Result.SUCCESS, build.getResult());
    }

    @Test
    public void testPerformFailure() throws IOException, ExecutionException, InterruptedException {
        LambdaPublishBuildStepVariables clone = new LambdaPublishBuildStepVariables(false, "${ENV_ID}", Secret.fromString("$ENV_SECRET}}"), "${ENV_REGION}", "${ENV_ARN}", "${ENV_ALIAS}", "description ${ENV_VERSIONDESCRIPTION}");
        LambdaPublishBuildStepVariables spy = Mockito.spy(clone);

        when(original.getClone()).thenReturn(spy);
        when(spy.getLambdaClientConfig()).thenReturn(clientConfig);
        when(clientConfig.getClient()).thenReturn(lambdaClient);

        PublishVersionResult publishResult = new PublishVersionResult()
                .withFunctionArn("ARN")
                .withDescription("DESCRIPTION")
                .withVersion("VERSION");

        when(lambdaClient.publishVersion(any(PublishVersionRequest.class)))
                .thenReturn(publishResult);

        UpdateAliasResult aliasResult = new UpdateAliasResult()
                .withDescription("DESCRIPTION")
                .withFunctionVersion("VERSION")
                .withName("ALIAS");

        when(lambdaClient.updateAlias(any(UpdateAliasRequest.class)))
                .thenReturn(aliasResult);

        GetAliasResult aliasFindResult = new GetAliasResult();

        when(lambdaClient.getAlias(any(GetAliasRequest.class)))
                .thenThrow(new ResourceNotFoundException(""));

        FreeStyleProject p = j.createFreeStyleProject();
        p.getBuildersList().add(new LambdaPublishBuildStep(original));

        FreeStyleBuild build = p.scheduleBuild2(0).get();
        assertEquals(Result.FAILURE, build.getResult());
    }
}


text:
package org.apache.carbondata.integration.spark.testsuite.complexType

import java.io.{File, FileOutputStream, PrintStream}

import scala.collection.mutable

import org.apache.spark.sql.Row
import org.apache.spark.sql.test.util.QueryTest
import org.scalatest.BeforeAndAfterAll

class TestComplexTypeWithBigArray extends QueryTest with BeforeAndAfterAll {

  val filePath = "./list.csv"
  val file = new File(filePath)

  override def beforeAll: Unit = {
    // write a CSV containing 32000 row, each row has an array with 10 elements
    val out = new PrintStream(new FileOutputStream(file))
    (1 to 33000).foreach(i=>out.println(s"$i,$i\0011"))
    out.close()
  }

  test("test with big string array") {
    sql("DROP TABLE IF EXISTS big_array")
    sql(
      """
        | CREATE TABLE big_array(
        |  value BIGINT,
        |  list ARRAY<STRING>
        |  )
        | STORED AS carbondata
      """.stripMargin)
    sql(
      s"""
         | LOAD DATA LOCAL INPATH '${file.getAbsolutePath}'
         | INTO TABLE big_array
         | OPTIONS ('header'='false')
      """.stripMargin)
    checkAnswer(
      sql("select count(*) from big_array"),
      Row(33000)
    )
    checkAnswer(
      sql("select * from big_array limit 1"),
      Row(1, mutable.WrappedArray.make[String](Array("1", "1")))
    )
    checkAnswer(
      sql("select list[1] from big_array limit 1"),
      Row("1")
    )
    checkAnswer(
      sql("select count(*) from big_array where list[0] = '1'"),
      Row(1)
    )
    checkAnswer(
      sql("select count(*) from big_array where array_contains(list, '1') "),
      Row(33000)
    )
    if (sqlContext.sparkContext.version.startsWith("2.")) {
      // explode UDF is supported start from spark 2.0
      checkAnswer(
        sql("select count(x) from (select explode(list) as x from big_array)"),
        Row(66000)
      )
    }
    checkAnswer(
      sql("select * from big_array where value = 15000"),
      Row(15000, mutable.WrappedArray.make[String](Array("15000", "1")))
    )
    checkAnswer(
      sql("select * from big_array where value = 32500"),
      Row(32500, mutable.WrappedArray.make[String](Array("32500", "1")))
    )
    checkAnswer(
      sql("select count(list) from big_array"),
      Row(33000)
    )
    sql("DROP TABLE big_array")
  }

  test("test with big int array") {
    sql("DROP TABLE IF EXISTS big_array")
    sql(
      """
        | CREATE TABLE big_array(
        |  value BIGINT,
        |  list ARRAY<INT>
        |  )
        | STORED AS carbondata
      """.stripMargin)
    sql(
      s"""
         | LOAD DATA LOCAL INPATH '${file.getAbsolutePath}'
         | INTO TABLE big_array
         | OPTIONS ('header'='false')
      """.stripMargin)
    checkAnswer(
      sql("select count(*) from big_array"),
      Row(33000)
    )
    checkAnswer(
      sql("select * from big_array limit 1"),
      Row(1, mutable.WrappedArray.make[String](Array(1, 1)))
    )
    checkAnswer(
      sql("select list[1] from big_array limit 1"),
      Row(1)
    )
    checkAnswer(
      sql("select count(*) from big_array where list[0] = 1"),
      Row(1)
    )
    checkAnswer(
      sql("select count(*) from big_array where array_contains(list, 1) "),
      Row(33000)
    )
    if (sqlContext.sparkContext.version.startsWith("2.")) {
      // explode UDF is supported start from spark 2.0
      checkAnswer(
        sql("select count(x) from (select explode(list) as x from big_array)"),
        Row(66000)
      )
    }
    checkAnswer(
      sql("select * from big_array where value = 15000"),
      Row(15000, mutable.WrappedArray.make[Int](Array(15000, 1)))
    )
    checkAnswer(
      sql("select * from big_array where value = 32500"),
      Row(32500, mutable.WrappedArray.make[Int](Array(32500, 1)))
    )
    checkAnswer(
      sql("select count(list) from big_array"),
      Row(33000)
    )
    sql("DROP TABLE big_array")
  }

  override def afterAll: Unit = {
    file.delete()
  }

}