text:
Ext.provide('Phlexible.elements.DiffVersionComboTemplate');
Ext.provide('Phlexible.elements.tab.Data');

Ext.require('Phlexible.elements.ElementAccordion');
Ext.require('Phlexible.elements.ElementContentPanel');
Ext.require('Phlexible.elements.accordion.QuickInfo');
Ext.require('Phlexible.elements.PublishSlaveWindow');

/*Phlexible.elements.xElementDataTabs = Ext.extend(Ext.TabPanel, {
 // private
 xadjustBodyWidth : function(w){
 if(this.header){
 this.header.setWidth(w);
 }
 if(this.footer){
 this.footer.setWidth(w);
 }
 return w;
 }
 });*/

Phlexible.elements.DiffVersionComboTemplate = new Ext.XTemplate(
    '<tpl for=".">',
    '
',
    '<tpl if="values.is_published"></tpl>',
    '<tpl if="values.was_published"></tpl>',
    '{version} [{create_date}]',
    '<tpl if="values.was_published"></tpl>',
    '<tpl if="values.is_published"></tpl>',
    '
',
    '</tpl>'
);

Phlexible.elements.tab.Data = Ext.extend(Ext.Panel, {
    strings: Phlexible.elements.Strings,
    title: Phlexible.elements.Strings.data,
    iconCls: 'p-element-tab_data-icon',
    cls: 'p-elements-data-panel',
    autoScroll: false,
    autoWidth: false,
    bodyStyle: 'padding-top: 5px',
    layout: 'border',
    hideMode: 'offsets',

    currentETID: null,
    currentActive: null,

    accordionCollapsed: false,

    initComponent: function () {

        this.addEvents(
            'save'
        );

        this.element.on({
            load: this.onLoadElement,
            getlock: this.onGetLock,
            islocked: this.onIsLocked,
            removelock: this.onRemoveLock,
            internalSave: this.onInternalSave,
            scope: this
        });

        this.compareElement = new Phlexible.elements.Element({
            siteroot_id: this.element.siteroot_id,
            language: this.element.language
        });

        this.items = [
            {
                xtype: 'form',
                region: 'center',
                layout: 'fit',
                hideMode: 'offsets',
                items: {
                    xtype: 'elements-elementcontentpanel',
                    element: this.element,
                    listeners: {
                        tabchange: function (tabPanel, panel) {
                            var index = tabPanel.items.items.indexOf(panel);
                            var targetPanel = this.getComponent(1).getComponent(1).getComponent(index);
                            if (targetPanel) {
                                this.getComponent(1).getComponent(1).setActiveTab(targetPanel);
                            }
                        },
                        scope: this
                    }
                }
            },
            {
                border: true,
                region: 'east',
                layout: 'card',
                split: true,
                collapsible: true,
                collapseMode: 'mini',
                collapsed: this.accordionCollapsed,
                activeItem: 0,
                listeners: {
                    expand: function () {
                        if (this.isDiffMode) {
                            this.getComponent(1).setWidth(this.getInnerWidth() / 2);
                            this.getComponent(1).ownerCt.doLayout();
                        }
                    },
                    scope: this
                },
                items: [
                    {
                        border: false,
                        width: 220,
                        minWidth: 220,
                        title: this.strings.properties,
                        autoScroll: true,
                        items: [
                            {
                                xtype: 'elements-accordion-quickinfo',
                                region: 'north',
                                //height: 300
                                autoHeight: true
                            },
                            {
                                xtype: 'elements-elementaccordion',
                                region: 'center',
                                border: false,
                                element: this.element
                            }
                        ]
                    },
                    {
                        xtype: 'elements-elementcontentpanel',
                        element: this.compareElement,
                        listeners: {
                            tabchange: function (tabPanel, panel) {
                                var index = tabPanel.items.items.indexOf(panel);
                                this.getContentPanel().setActiveTab(this.getContentPanel().getComponent(index));
                            },
                            scope: this
                        }
                    }
                ]
            }
        ];

        this.tbar = [
            {
                // 0
                text: '',
                disabled: true,
                hidden: true
            },
            {
                // 1
                xtype: 'checkbox',
                hideLabel: true,
                hidden: true,
                boxLabel: this.strings.minor_update
            },
            {
                // 2
                text: this.strings.reset,
                iconCls: 'p-element-reload-icon',
                disabled: true,
                hidden: true,
                handler: this.onReset,
                scope: this
            },
            {
                // 3
                text: this.strings.publish_element,
                iconCls: 'p-element-publish-icon',
                disabled: true,
                hidden: true,
                handler: this.onPublish,
                scope: this
            },
            '->',
            {
                // 5
                xtype: 'tbtext',
                text: this.strings.diff.show,
                hidden: true
            },
            ' ',
            {
                // 7
                xtype: 'iconcombo',
                hidden: true,
                width: 140,
                value: this.element.language,
                emptyText: this.strings.diff.language,
                store: new Ext.data.JsonStore({
                    fields: ['langKey', 'text', 'iconCls'],
                    data: this.element.languages
                }),
                valueField: 'langKey',
                displayField: 'text',
                iconClsField: 'iconCls',
                mode: 'local',
                forceSelection: true,
                typeAhead: false,
                editable: false,
                triggerAction: 'all',
                selectOnFocus: true
            },
            ' ',
            {
                // 9
                xtype: 'combo',
                hidden: true,
                width: 80,
                listWidth: 200,
                emptyText: this.strings.diff.from_version,
                tpl: Phlexible.elements.DiffVersionComboTemplate,
                //value: (parseInt(this.element.version, 10) - 1),
                store: new Ext.data.JsonStore({
                    fields: [
                        {name: 'version'},
                        {name: 'format'},
                        {name: 'create_date'},
                        {name: 'was_published', type: 'boolean'},
                        {name: 'is_published', type: 'boolean'}
                    ],
                    id: 0,
                    data: []
                }),
                displayField: 'version',
                mode: 'local',
                forceSelection: true,
                typeAhead: false,
                editable: false,
                triggerAction: 'all',
                selectOnFocus: true
            },
            {
                // 10
                text: this.strings.diff.compare_to,
                enableToggle: true,
                hidden: true,
                toggleHandler: function (btn, state) {
                    this.getTopToolbar().items.items[this.btnIndex.version_to].setDisabled(!state);
                },
                scope: this
            },
            {
                // 11
                xtype: 'combo',
                width: 80,
                hidden: true,
                disabled: true,
                listWidth: 200,
                emptyText: this.strings.diff.to_version,
                tpl: Phlexible.elements.DiffVersionComboTemplate,
                //value: (parseInt(this.element.version, 10) - 1),
                store: new Ext.data.JsonStore({
                    fields: [
                        {name: 'version'},
                        {name: 'format'},
                        {name: 'create_date'},
                        {name: 'was_published', type: 'boolean'},
                        {name: 'is_published', type: 'boolean'}
                    ],
                    id: 0,
                    data: []
                }),
                displayField: 'version',
                mode: 'local',
                forceSelection: true,
                typeAhead: false,
                editable: false,
                triggerAction: 'all',
                selectOnFocus: true
            },
            ' ',
            {
                // 13
                text: this.strings.diff.load,
                hidden: true,
                handler: this.loadDiff,
                scope: this
            },
            '-',
            {
                // 15
                text: this.strings.diff.compare,
                iconCls: 'p-element-diff-icon',
                enableToggle: true,
                toggleHandler: function (btn, state) {
                    if (state) {
                        this.showDiff();
                    } else {
                        this.hideDiff();

                        if (this.element.data.diff && this.element.data.diff.enabled) {
                            this.element.reload();
                        }
                    }
                },
                scope: this,
                listeners: {
                    render: function () {
                        var tb = this.getTopToolbar();
                        tb.items.items[this.btnIndex.show].hide();
                        tb.items.items[this.btnIndex.sep].hide();
                    },
                    scope: this
                }
            }
        ];

        this.btnIndex = {
            save: 0,
            minor: 1,
            reset: 2,
            show: 5,
            language: 7,
            version_from: 9,
            compare_to: 10,
            version_to: 11,
            load: 13,
            sep: 14,
            compare: 15
        };

        this.keys = [
            {
                key: 's',
                alt: true,
                stopEvent: true,
                fn: this.onInternalSave,
                scope: this
            }
        ];

        /*
         this.getContentPanel().on({
         render: {
         fn: function(c) {
         c.body.on({
         scroll: {
         fn: function(e) {
         Phlexible.console.log(e);

         this.getComponent(1).getComponent(1).el.scrollTo('top', 100, false);
         },
         scope: this
         }
         });
         },
         scope: this
         }
         })
         */

        this.diffParams = (this.element.startParams && this.element.startParams.diff)
            ? this.element.startParams.diff
            : {};

        Phlexible.elements.tab.Data.superclass.initComponent.call(this);
    },

    getFormPanel: function () {
        return this.getComponent(0);
    },

    getContentPanel: function () {
        return this.getFormPanel().getComponent(0);
    },

    getCardPanel: function () {
        return this.getComponent(1);
    },

    getSidebarPanel: function () {
        return this.getCardPanel().getComponent(0);
    },

    getQuickInfoPanel: function () {
        return this.getSidebarPanel().getComponent(0);
    },

    getAccordionPanel: function () {
        return this.getSidebarPanel().getComponent(1);
    },

    onLoadElement: function (element) {
        this.getQuickInfoPanel().load(element);

        // load diff data
        var tb = this.getTopToolbar();
        var v = [];
        for (var i = 0; i < element.data.versions.length; i++) {
            if (element.data.versions[i]['format'] > 1) {
                v.push(element.data.versions[i]);
            }
        }

        var toVersion;
        if (this.diffParams.version) {
            toVersion = this.diffParams.version;
        }
        else {
            toVersion = element.version > 1 ? element.version - 1 : element.version;
        }

        tb.items.items[this.btnIndex.version_from].store.loadData(v);
        tb.items.items[this.btnIndex.version_to].store.loadData(v);
        tb.items.items[this.btnIndex.version_from].setValue(toVersion);
        tb.items.items[this.btnIndex.version_to].setValue(element.version);

        if (this.diffParams.enabled) {
            tb.items.items[this.btnIndex.compare_to].toggle(true);
            tb.items.items[this.btnIndex.compare].toggle(true);
        }

        if (tb.items.items[this.btnIndex.compare].pressed) {
            this.loadDiff();
        }

        this.diffParams = {};
    },

    loadDiff: function () {
        var tb = this.getTopToolbar();

        var lang = tb.items.items[this.btnIndex.language];
        var langValue = lang.getValue();

        var from = tb.items.items[this.btnIndex.version_from];
        var fromValue = from.getValue();

        if (!fromValue) {
            from.markInvalid();
            return;
        }

        var toValue;
        if (tb.items.items[this.btnIndex.compare_to].pressed) {
            var to = tb.items.items[this.btnIndex.version_to];
            toValue = to.getValue();

            if (!toValue) {
                to.markInvalid();
                return;
            }
        } else {
            toValue = null;//this.element.version;
        }

        //var versionValue = toValue > fromValue ? toValue : fromValue;

        this.compareElement.reload({
            id: this.element.tid,
            teaser_id: this.element.data.properties.teaser_id || null,
            version: this.element.version,
            language: langValue,
            lock: 0,
            diff: 1,
            diff_language: langValue,
            diff_version_from: fromValue,
            diff_version_to: toValue
        });
    },

    toggleDiff: function (diff) {
        var tb = this.getTopToolbar();

        if (diff.enabled) {
            tb.items.items[this.btnIndex.compare].toggle(true, true);
            tb.items.items[this.btnIndex.language].setValue(diff.language);
            tb.items.items[this.btnIndex.version_from].setValue(diff.version_from);
            tb.items.items[this.btnIndex.version_to].setValue(diff.version_to);

            this.showDiff();
        } else {
            tb.items.items[this.btnIndex.compare].toggle(false, true);
            this.hideDiff();
        }
    },

    showDiff: function () {
        this.isDiffMode = true;
        var tb = this.getTopToolbar();

        tb.items.items[this.btnIndex.compare].toggle(true);

        tb.items.items[this.btnIndex.show].show();
        tb.items.items[this.btnIndex.language].show();
        tb.items.items[this.btnIndex.version_from].show();
        tb.items.items[this.btnIndex.compare_to].show();
        tb.items.items[this.btnIndex.version_to].show();
        tb.items.items[this.btnIndex.sep].show();
        tb.items.items[this.btnIndex.load].show();

        this.getComponent(1).layout.setActiveItem(1);

        if (this.accordionCollapsed) {
            this.getComponent(1).expand();
        } else {
            this.getComponent(1).setWidth(this.getInnerWidth() / 2);
            this.getComponent(1).ownerCt.doLayout();
        }
    },

    hideDiff: function () {
        this.isDiffMode = false;
        var tb = this.getTopToolbar();

        tb.items.items[this.btnIndex.compare].toggle(false);

        tb.items.items[this.btnIndex.show].hide();
        tb.items.items[this.btnIndex.language].hide();
        tb.items.items[this.btnIndex.version_from].hide();
        tb.items.items[this.btnIndex.compare_to].hide();
        tb.items.items[this.btnIndex.version_to].hide();
        tb.items.items[this.btnIndex.sep].hide();
        tb.items.items[this.btnIndex.load].hide();

        this.getComponent(1).layout.setActiveItem(0);
        this.getComponent(1).setWidth(220);
        if (this.accordionCollapsed) {
            this.getComponent(1).collapse();
        }
        this.getComponent(1).ownerCt.doLayout();
    },

    onReset: function () {
        this.element.reload();
    },

    onInternalSave: function (parameters, errors) {
        if (!this.getAccordionPanel().isValid()) {
            errors.push('Required fields inside the marked accordions are missing.');
            return;
        }

        if (!this.getContentPanel().isValid()) {
            errors.push('Required fields are missing.');
            return;
        }

        if (this.element.fireEvent('beforeSave', this.element) === false) {
            errors.push('Save cancelled.');
            return;
        }

        this.getContentPanel().syncData(this.getContentPanel());
        this.getAccordionPanel().saveData();

        var minor = this.getTopToolbar().items.items[1].getValue() ? 1 : 0;
        var values = this.getFormPanel().getForm().getValues();
        var accordions = this.getAccordionPanel().getData();

        for (key in accordions) {
            if (!accordions.hasOwnProperty(key)) {
                continue;
            }
            parameters[key] = typeof accordions[key] === 'object' ? Ext.encode(accordions[key]) : accordions[key];
        }

        parameters.minor = minor;
        parameters.values = Ext.encode(values);

        return;

        this.getTopToolbar().items.items[1].setValue(false);
    },

    onGetLock: function () {
        //Phlexible.console.debug('ElementDataPanel: GET LOCK');

        var tb = this.getTopToolbar();

        /*
         var x = function() {
         this.getTopToolbar().items.items[this.btnIndex.save].enable();
         };
         x.defer(5000, this);

         tb.items.items[this.btnIndex.save].disable();
         tb.items.items[this.btnIndex.minor].enable();
         tb.items.items[this.btnIndex.reset].enable();
         */
        tb.items.items[this.btnIndex.compare].enable();
    },

    onIsLocked: function () {
        //Phlexible.console.debug('ElementDataPanel: IS LOCKED');

        var tb = this.getTopToolbar();

        /*
         tb.items.items[this.btnIndex.save].disable();
         tb.items.items[this.btnIndex.minor].disable();
         tb.items.items[this.btnIndex.reset].disable();
         */
        tb.items.items[this.btnIndex.compare].disable();
        this.hideDiff();
    },

    onRemoveLock: function () {
        //Phlexible.console.debug('ElementDataPanel: DROP LOCK');

        var tb = this.getTopToolbar();

        /*
         tb.items.items[this.btnIndex.save].disable();
         tb.items.items[this.btnIndex.minor].disable();
         tb.items.items[this.btnIndex.reset].disable();
         */
        tb.items.items[this.btnIndex.compare].disable();
        this.hideDiff();
    }
});

Ext.reg('elements-tab-data', Phlexible.elements.tab.Data);


text:
package org.citydb.core.query.filter.selection.expression;

import org.citydb.core.database.schema.mapping.SimpleType;
import org.citydb.sqlbuilder.expression.PlaceHolder;

public abstract class AbstractLiteral<T> implements Expression {
	protected T value;

	public AbstractLiteral(T value) {
		this.value = value;
	}

	public abstract LiteralType getLiteralType();
	public abstract boolean evaluatesToSchemaType(SimpleType schemaType);
	public abstract PlaceHolder<?> convertToSQLPlaceHolder();

	public T getValue() {
		return value;
	}

	@Override
	public ExpressionName getExpressionName() {
		return ExpressionName.LITERAL;
	}

}

redpajama_set_name: RedPajamaGithub


text:
copper-engine
=============

COPPER - the high performance Java workflow engine.

COPPER is an open-source, powerful, light-weight, and easily configurable **workflow engine**. The power of COPPER is that it uses **Java** as a description language for workflows. The project artifacts can be found at [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.copper-engine/copper-coreengine/badge.svg)](http://maven-badges.herokuapp.com/maven-central/org.copper-engine/copper-coreengine). See [copper-engine.org](http://www.copper-engine.org) for more information.

How to build
------------

COPPER is built using [Gradle](http://www.gradle.org). However, you don't need to install Gradle, because COPPER is using the [Gradle wrapper](http://www.gradle.org/docs/current/userguide/gradle_wrapper.html).

To build all COPPER projects, just execute the following in the projects root directory:

    ./gradlew assemble

If you want to build all and run all tests, just execute:

    ./gradlew build

To generate Eclipse project files, run:

    ./gradlew eclipse

once in the projects root directory and open the corresponding projects with the eclipse IDE. (You must perform this step every time the project dependencies change).

How to contribute
-----------------

1. Create an issue on GitHub.
2. Create a fork  on GitHub.
3. Configure your IDE (Eclipse, IntelliJ IDEA) as described [below](#how-to-configure-your-ide).
4. Run `./gradlew assemble` once if you haven't done so in step 3. This will generate some WSDL stubs needed for some tests.
5. Commit your changes incl. [WHATSNEW.txt](WHATSNEW.txt)
   * Ensure, that your sources are UTF-8 encoded!
   * Ensure, that your sources start with our [Apache License header](common/apache-license-file.txt). (The build will fail if they don't.)
6. Build all and run tests:
       ./gradlew build
7. Push your changes to your fork.
8. Create a pull request on GtHub.

**Have fun!**

How to configure your IDE
-------------------------

### Eclipse

Run `./gradlew eclipse` once. This will create Eclipse project files which you can import. This also creates proper code style settings. Before committing you should always reformat the code. You can configure Eclipse to do this automatically on each save.

Every time a dependency changes in `build.gradle` you must run `./gradlew eclipse` again. You don't need to restart Eclipse for this, simply press F5 on the projects.

### IntelliJ IDEA

Before you open the project in IntelliJ for the first time, run `./gradlew assemble` once. This also creates proper code style settings, which IntelliJ automatically picks up. After that open `build.gradle`  with "File->Open" and follow the instructions, accept the defaults.

Before committing you should always reformat the code. You can configure IntelliJ to do this automatically on each commit.

<hr>
Copyright 2002-2014 Copper Engine Development Team


text:
package v1alpha3

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Order is a type to represent an Order with an ACME server
// +k8s:openapi-gen=true
type Order struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec   OrderSpec   `json:"spec,omitempty"`
	Status OrderStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// OrderList is a list of Orders
type OrderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Order `json:"items"`
}

type OrderSpec struct {
	// Certificate signing request bytes in DER encoding.
	// This will be used when finalizing the order.
	// This field must be set on the order.
	CSR []byte `json:"csr"`

	// IssuerRef references a properly configured ACME-type Issuer which should
	// be used to create this Order.
	// If the Issuer does not exist, processing will be retried.
	// If the Issuer is not an 'ACME' Issuer, an error will be returned and the
	// Order will be marked as failed.
	IssuerRef cmmeta.ObjectReference `json:"issuerRef"`

	// CommonName is the common name as specified on the DER encoded CSR.
	// If specified, this value must also be present in `dnsNames` or `ipAddresses`.
	// This field must match the corresponding field on the DER encoded CSR.
	// +optional
	CommonName string `json:"commonName,omitempty"`

	// DNSNames is a list of DNS names that should be included as part of the Order
	// validation process.
	// This field must match the corresponding field on the DER encoded CSR.
	//+optional
	DNSNames []string `json:"dnsNames,omitempty"`

	// IPAddresses is a list of IP addresses that should be included as part of the Order
	// validation process.
	// This field must match the corresponding field on the DER encoded CSR.
	// +optional
	IPAddresses []string `json:"ipAddresses,omitempty"`

	// Duration is the duration for the not after date for the requested certificate.
	// this is set on order creation as pe the ACME spec.
	// +optional
	Duration *metav1.Duration `json:"duration,omitempty"`
}

type OrderStatus struct {
	// URL of the Order.
	// This will initially be empty when the resource is first created.
	// The Order controller will populate this field when the Order is first processed.
	// This field will be immutable after it is initially set.
	// +optional
	URL string `json:"url,omitempty"`

	// FinalizeURL of the Order.
	// This is used to obtain certificates for this order once it has been completed.
	// +optional
	FinalizeURL string `json:"finalizeURL,omitempty"`

	// Authorizations contains data returned from the ACME server on what
	// authorizations must be completed in order to validate the DNS names
	// specified on the Order.
	// +optional
	Authorizations []ACMEAuthorization `json:"authorizations,omitempty"`

	// Certificate is a copy of the PEM encoded certificate for this Order.
	// This field will be populated after the order has been successfully
	// finalized with the ACME server, and the order has transitioned to the
	// 'valid' state.
	// +optional
	Certificate []byte `json:"certificate,omitempty"`

	// State contains the current state of this Order resource.
	// States 'success' and 'expired' are 'final'
	// +optional
	State State `json:"state,omitempty"`

	// Reason optionally provides more information about a why the order is in
	// the current state.
	// +optional
	Reason string `json:"reason,omitempty"`

	// FailureTime stores the time that this order failed.
	// This is used to influence garbage collection and back-off.
	// +optional
	FailureTime *metav1.Time `json:"failureTime,omitempty"`
}

// ACMEAuthorization contains data returned from the ACME server on an
// authorization that must be completed in order validate a DNS name on an ACME
// Order resource.
type ACMEAuthorization struct {
	// URL is the URL of the Authorization that must be completed
	URL string `json:"url"`

	// Identifier is the DNS name to be validated as part of this authorization
	// +optional
	Identifier string `json:"identifier,omitempty"`

	// Wildcard will be true if this authorization is for a wildcard DNS name.
	// If this is true, the identifier will be the *non-wildcard* version of
	// the DNS name.
	// For example, if '*.example.com' is the DNS name being validated, this
	// field will be 'true' and the 'identifier' field will be 'example.com'.
	// +optional
	Wildcard *bool `json:"wildcard,omitempty"`

	// InitialState is the initial state of the ACME authorization when first
	// fetched from the ACME server.
	// If an Authorization is already 'valid', the Order controller will not
	// create a Challenge resource for the authorization. This will occur when
	// working with an ACME server that enables 'authz reuse' (such as Let's
	// Encrypt's production endpoint).
	// If not set and 'identifier' is set, the state is assumed to be pending
	// and a Challenge will be created.
	// +optional
	InitialState State `json:"initialState,omitempty"`

	// Challenges specifies the challenge types offered by the ACME server.
	// One of these challenge types will be selected when validating the DNS
	// name and an appropriate Challenge resource will be created to perform
	// the ACME challenge process.
	// +optional
	Challenges []ACMEChallenge `json:"challenges,omitempty"`
}

// Challenge specifies a challenge offered by the ACME server for an Order.
// An appropriate Challenge resource can be created to perform the ACME
// challenge process.
type ACMEChallenge struct {
	// URL is the URL of this challenge. It can be used to retrieve additional
	// metadata about the Challenge from the ACME server.
	URL string `json:"url"`

	// Token is the token that must be presented for this challenge.
	// This is used to compute the 'key' that must also be presented.
	Token string `json:"token"`

	// Type is the type of challenge being offered, e.g. 'http-01', 'dns-01',
	// 'tls-sni-01', etc.
	// This is the raw value retrieved from the ACME server.
	// Only 'http-01' and 'dns-01' are supported by cert-manager, other values
	// will be ignored.
	Type string `json:"type"`
}

// State represents the state of an ACME resource, such as an Order.
// The possible options here map to the corresponding values in the
// ACME specification.
// Full details of these values can be found here: https://tools.ietf.org/html/draft-ietf-acme-acme-15#section-7.1.6
// Clients utilising this type must also gracefully handle unknown
// values, as the contents of this enumeration may be added to over time.
// +kubebuilder:validation:Enum=valid;ready;pending;processing;invalid;expired;errored
type State string

const (
	// Unknown is not a real state as part of the ACME spec.
	// It is used to represent an unrecognised value.
	Unknown State = ""

	// Valid signifies that an ACME resource is in a valid state.
	// If an order is 'valid', it has been finalized with the ACME server and
	// the certificate can be retrieved from the ACME server using the
	// certificate URL stored in the Order's status subresource.
	// This is a final state.
	Valid State = "valid"

	// Ready signifies that an ACME resource is in a ready state.
	// If an order is 'ready', all of its challenges have been completed
	// successfully and the order is ready to be finalized.
	// Once finalized, it will transition to the Valid state.
	// This is a transient state.
	Ready State = "ready"

	// Pending signifies that an ACME resource is still pending and is not yet ready.
	// If an Order is marked 'Pending', the validations for that Order are still in progress.
	// This is a transient state.
	Pending State = "pending"

	// Processing signifies that an ACME resource is being processed by the server.
	// If an Order is marked 'Processing', the validations for that Order are currently being processed.
	// This is a transient state.
	Processing State = "processing"

	// Invalid signifies that an ACME resource is invalid for some reason.
	// If an Order is marked 'invalid', one of its validations be have invalid for some reason.
	// This is a final state.
	Invalid State = "invalid"

	// Expired signifies that an ACME resource has expired.
	// If an Order is marked 'Expired', one of its validations may have expired or the Order itself.
	// This is a final state.
	Expired State = "expired"

	// Errored signifies that the ACME resource has errored for some reason.
	// This is a catch-all state, and is used for marking internal cert-manager
	// errors such as validation failures.
	// This is a final state.
	Errored State = "errored"
)


text:
<?php

namespace Concise\Core;

use Colors\Color;

class ValueRendererTest extends TestCase
{
    /** @var ValueRenderer */
    protected $renderer;

    public function setUp()
    {
        parent::setUp();
        $this->renderer = new ValueRenderer();
    }

    public function testIntegerValueRendersWithoutModification()
    {
        $this->assert($this->renderer->render(123))->equals(123);
    }

    public function testFloatingPointValueRendersWithoutModification()
    {
        $this->assert($this->renderer->render(1.23))->equals('1.23');
    }

    public function testStringValueRendersWithDoubleQuotes()
    {
        $this->assert($this->renderer->render("abc"))->equals('"abc"');
    }

    public function testArrayValueRendersAsJson()
    {
        $this->assert($this->renderer->render(array(123, "abc")))
            ->equals("[\n  123,\n  \"abc\"\n]");
    }

    public function testObjectValueRendersAsJson()
    {
        $obj = new \stdClass();
        $obj->a = 123;
        $this->assert($this->renderer->render($obj))
            ->equals("stdClass:{\n  \"a\":123\n}");
    }

    public function testTrueValueRendersAsTrue()
    {
        $this->assert($this->renderer->render(true))->equals('true');
    }

    public function testFalseValueRendersAsFalse()
    {
        $this->assert($this->renderer->render(false))->equals('false');
    }

    public function testNullRendersAsNull()
    {
        $this->assert($this->renderer->render(null))->equals('null');
    }

    public function testResourceValueRendersAsResource()
    {
        $renderer = new ValueRenderer();
        $this->assertString($renderer->render(fopen('.', 'r')))
            ->startsWith("Resource id #");
    }

    public function testFunctionRendersAsString()
    {
        $this->assert(
            $this->renderer->render(
                function () {
                }
            )
        )->equals('function');
    }

    public function testRenderAllMethodWithZeroElements()
    {
        $this->assertString($this->renderer->renderAll(array()))->isEmpty;
    }

    public function testRenderAllMethodWithOneElement()
    {
        $this->assert($this->renderer->renderAll(array(1)))->equals('1');
    }

    public function testRenderAllMethodWithTwoElements()
    {
        $this->assert($this->renderer->renderAll(array(1, 2)))->equals('1, 2');
    }

    public function testRenderAllWithStrings()
    {
        $this->assert($this->renderer->renderAll(array('foo')))
            ->equals('"foo"');
    }

    protected function getThemeForValue(array $colors)
    {
        return $this->mock('Concise\Console\Theme\DefaultTheme')->stub(
            array('getTheme' => $colors)
        )->get();
    }

    public function testIntegersWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.integer' => 'magenta'));
        $this->renderer->setTheme($theme);
        $c = new Color();
        $this->assert($this->renderer->render(123))
            ->equals((string)$c(123)->magenta);
    }

    public function testFloatingPointsWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.float' => 'red'));
        $this->renderer->setTheme($theme);
        $c = new Color();
        $this->assert($this->renderer->render(12.3))
            ->equals((string)$c(12.3)->red);
    }

    public function testStringsWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.string' => 'green'));
        $this->renderer->setTheme($theme);
        $c = new Color();
        $this->assert($this->renderer->render("12.3"))
            ->equals((string)$c("\"12.3\"")->green);
    }

    public function testClosureWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.closure' => 'blue'));
        $this->renderer->setTheme($theme);
        $c = new Color();
        $this->assert(
            $this->renderer->render(
                function () {
                }
            )
        )->equals((string)$c("function")->blue);
    }

    public function testObjectKeysWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(
            array('value.string' => 'green', 'value.integer' => 'yellow')
        );
        $this->renderer->setTheme($theme);
        $c = new Color();

        $obj = new \stdClass();
        $obj->a = 123;
        $this->assertString($this->renderer->render($obj))
            ->contains((string)$c('"a"')->green);
    }

    public function testObjectValuesWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(
            array('value.string' => 'yellow', 'value.integer' => 'green')
        );
        $this->renderer->setTheme($theme);
        $c = new Color();

        $obj = new \stdClass();
        $obj->a = 123;
        $this->assertString($this->renderer->render($obj))
            ->contains((string)$c(123)->green);
    }

    public function testArrayKeysWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.string' => 'green'));
        $this->renderer->setTheme($theme);
        $c = new Color();

        $this->assertString($this->renderer->render(array('bar')))
            ->contains((string)$c('"bar"')->green);
    }

    public function testMultipleObjectValuesRendersAsJson()
    {
        $obj = new \stdClass();
        $obj->a = 123;
        $obj->b = 456;
        $this->assert($this->renderer->render($obj))->equals(
            "stdClass:{\n  \"a\":123,\n  \"b\":456\n}"
        );
    }

    public function testMultipleArrayValuesRendersAsJson()
    {
        $this->assert($this->renderer->render(array(1, 2)))
            ->equals("[\n  1,\n  2\n]");
    }

    public function testAssociativeArrayRendersAsJson()
    {
        $this->assert($this->renderer->render(array('foo' => 'bar')))
            ->equals("{\n  \"foo\":\"bar\"\n}");
    }

    public function testNumericArrayKeysAlwaysRenderAsStrings()
    {
        $this->assert($this->renderer->render(array(123 => 'bar')))
            ->equals("{\n  \"123\":\"bar\"\n}");
    }

    public function testNestedObjectsHideTypeHint()
    {
        $obj = new \stdClass();
        $obj->a = new \stdClass();
        $obj->a->b = 456;
        $this->assert($this->renderer->render($obj))
            ->equals("stdClass:{\n  \"a\":{\n    \"b\":456\n  }\n}");
    }

    public function testNullWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.null' => 'green'));
        $this->renderer->setTheme($theme);
        $c = new Color();

        $this->assertString($this->renderer->render(null))
            ->contains((string)$c('null')->green);
    }

    public function testBooleanWillBeColoredWhenAThemeIsSpecified()
    {
        $theme = $this->getThemeForValue(array('value.boolean' => 'red'));
        $this->renderer->setTheme($theme);
        $c = new Color();

        $this->assertString($this->renderer->render(true))
            ->contains((string)$c('true')->red);
    }

    public function testDefaultMaximumDepthIsTen()
    {
        $this->assert($this->renderer->getMaximumDepth())->equals(10);
    }

    public function testMaximumDepthStopsRendererFromConsumingTooMuchMemory()
    {
        $renderer = $this->niceMock('Concise\Core\ValueRenderer')->stub(
            array('getMaximumDepth' => 2)
        )->get();
        $obj = json_decode('{"a":{"a":{"a":"b"}}}');
        $this->assert($renderer->render($obj))
            ->equals("stdClass:{\n  \"a\":{\n    \"a\":...\n  }\n}");
    }

    public function testMaximumDepthStopsRendererFromConsumingTooMuchMemoryForArrays(
    )
    {
        $renderer = $this->niceMock('Concise\Core\ValueRenderer')->stub(
            array('getMaximumDepth' => 2)
        )->get();
        $obj = json_decode('{"a":{"a":{"a":"b"}}}', true);
        $this->assert($renderer->render($obj))
            ->equals("{\n  \"a\":{\n    \"a\":...\n  }\n}");
    }

    public function testRenderAnythingConstant()
    {
        $this->assert($this->renderer->render(self::ANYTHING))
            ->equals('<ANYTHING>');
    }
}


text:
"""
A small utility module to prevent code duplication.

For licensing information, please see the LICENSE file.
"""

import subprocess
import sys

def warn(*string):
    """
    Prints a warning to stderr.

    Args:
        *string: the (optional) message to print.
    """
    print(*string, file=sys.stderr)

def die(*string):
    """
    Prints a warning to stderr and exits with an exit code of 1.

    Args:
        *string: the (optional) message to print.
    """
    warn(*string)
    sys.exit(1)

def call_asynchronous(*args):
    """
    Spawns a new process (asynchronous) using subprocess.Popen, see:
    https://docs.python.org/3/library/subprocess.html#subprocess.Popen.

    Args:
        *args: a list containing the executable to spawn, optionally with arguments to feed it.
               See the linked documentation for examples.
    Returns:
        True iff the process was spawned succesfully. Otherwise, False is returned with the
        exception message printed to stderr.
    """
    try:
        subprocess.Popen(*args)
        return True
    except OSError as err:
        warn("{}".format(err))
        return False

def call_synchronous(*args):
    """
    Spawns a new process (synchronous), using Python's subprocess module.

    Args:
        *args: a list containing the executable to spawn, optionally with arguments to feed it.
               See the subprocess documentation for examples.
    """
    try:
        subprocess.call(*args)
    except OSError as err:
        warn("{}".format(err))

def check_output(*args, shell=False):
    """
    A wrapper around subprocess.check_output, to prevent code duplication. See
    https://docs.python.org/3/library/subprocess.html#subprocess.check_output

    Args:
        *args: a list containing the executable whose output to check, optionally with arguments to
               feed it. See the subprocess documentation for examples.
        shell: if True, the process will be spawned through the shell. See the subprocess
               documentation for a more thorough explanation on the use-cases. Note that shell=True
               is generally unsafe!
    Returns:
        The output of the spawned process on success. Otherwise, None is returned with the
        exception message printed to stderr.
    """
    try:
        return subprocess.check_output(*args, shell=shell)
    except (OSError, subprocess.CalledProcessError) as err:
        warn("{}".format(err))
    return None


text:
// Gruntfile.js

// our wrapper function (required by grunt and its plugins)
// all configuration goes inside this function
module.exports = function(grunt) {
   'use strict';

   var BUILD_JS_DIR  = 'dist/'

   // ===========================================================================
   // CONFIGURE GRUNT ===========================================================
   // ===========================================================================
   grunt.initConfig({

      // get the configuration info from package.json ----------------------------
      // this way we can use things like name and version (pkg.name)
      pkg: grunt.file.readJSON('package.json'),
      banner: '\n',
      // all of our configuration will go here
      less: {
         build: {
            files: {
               'dist/videojs.markers.css': 'src/videojs.markers.less'
            }
         },
      },
      // configure cssmin to minify css files ------------------------------------
      cssmin: {
         options: {
            banner: '<%= banner %>'
         },
         build: {
            files: {
               'dist/videojs.markers.min.css': 'dist/videojs.markers.css'
            }
         }
      },
      concat: {
         options: {
            banner: '<%= banner %>',
            stripBanners: true
         },
         dist: {
            src: 'src/*.js',
            dest: 'dist/<%= pkg.name %>.js'
         }
      },
      uglify: {
         options: {
            banner: '<%= banner %>'
         },
         dist: {
            src: '<%= concat.dist.dest %>',
            dest: 'dist/<%= pkg.name %>.min.js'
         }
      }
   });

   // ===========================================================================
   // LOAD GRUNT PLUGINS ========================================================
   // ===========================================================================
   // we can only load these if they are in our package.json
   // make sure you have run npm install so our app can find these
   grunt.loadNpmTasks('grunt-contrib-less');
   grunt.loadNpmTasks('grunt-contrib-clean');
   grunt.loadNpmTasks('grunt-contrib-cssmin');
   grunt.loadNpmTasks('grunt-contrib-watch');
   grunt.loadNpmTasks('grunt-contrib-uglify');
   grunt.loadNpmTasks('grunt-contrib-concat');

   // ===========================================================================
   // CREATE TASKS ==============================================================
   // ===========================================================================
   grunt.registerTask('css', ['less', 'cssmin']);

   grunt.registerTask('compile', ['css','concat','uglify'])

};


text:
"""
QoSPath.py v2---------------------------------------------------------------------------------------------------
Developed By: Ryan Wallner (ryan.wallner1@marist.edu)
Add QoS to a specific path in the network. Utilized circuit pusher developed by KC Wang
[Note]
    *the circuitpusher.py is needed in the same directory for this application to run
     succesfully! This circuitpusher instance is used WITHOUT pushing statis flows.
     the static flows are commented out, circuitpusher is only used to get route.

    [author] - rjwallner
-----------------------------------------------------------------------------------------------------------------------
"""
import sys
import os
import re
import time
import json as simplejson #used to process policies and encode/decode requests
import subprocess #spawning subprocesses
import argparse

def main():
    parser = argparse.ArgumentParser(description="QoS Rate Limiter")
    parser.add_argument('-p','--port',
                    required=False,
                    default="8080",
                    type=str,
                    dest='p',
                    metavar="P")
    parser.add_argument('-c','--controller',
                    required=False,
                    default="127.0.0.1",
                    dest="c",
                    type=str,
                    metavar="C")
    parser.add_argument("-a","--add",
            required=False,
            dest="action_op",
            action="store_const",
            const="add",
            metavar="add")
    parser.add_argument("-d","--delete",
            required=False,
            dest="action_op",
            action="store_const",
            const="delete",
            metavar="delete")
    parser.add_argument("-j","--json",
            required=True,
            dest="obj")
    args = parser.parse_args()

    #initialize arguments
    c = args.c
    p = args.p
    action = args.action_op
    json = args.obj

    # Add/ Delete
    if action == "add":
        print "add"
        if json != None:
            add(json,c,p)
            exit()
        else:
            print "Missing arguments, check json"
            exit(1)
    elif action == "delete":
        print "delete"
        delete(json,c,p)
        exit()
    else:
        print "action not unrecognized"
        exit(1)

#Add a Quality of Service Path
# @NAME  -Name of the Path
# @SRC   -Source IP
# @DEST  -Destination IP
# @JSON  -Json object of the policy
# @C, @P -Controller / Port
#
# Author- Ryan Wallner
def add(json,c,p):
    qos_pusher = "qosmanager.py"
    pwd = os.getcwd()
    print pwd
    try:
        if (os.path.exists("%s/%s" % (pwd,qos_pusher))):
            print "Necessary tools confirmed.. %s" % (qos_pusher)
        else:
            print "%s/%s does not exist" %(pwd,qos_pusher)
    except ValueError as e:
        print "Problem finding tools... %s" % (qos_pusher)
        print e
        exit(1)

    cmd = "./qosmanager.py --add --json '%s' -c %s -p %s" % (json,c,p)
    res = subprocess.Popen(cmd, shell=True).wait()

def polErr():
    print """Your policy is not defined right, check to
make sure you have a service OR a queue defined"""

#Delete a Quality of Service Path
# @NAME  -Name of the Path
# @C, @P -Controller / Port
#
# Author- Ryan Wallner
def delete(json,c,p):
    qos_pusher = "qosmanager.py"
    pwd = os.getcwd()
    print pwd
    try:
        if (os.path.exists("%s/%s" % (pwd,qos_pusher))):
            print "Necessary tools confirmed.. %s" % (qos_pusher)
        else:
            print "%s/%s does not exist" %(pwd,qos_pusher)
    except ValueError as e:
        print "Problem finding tools... %s" % (qos_pusher)
        print e
        exit(1)
    cmd = "./qosmanager.py --delete --json '%s' -c %s -p %s " % (json,c,p)
    print cmd
    subprocess.Popen(cmd,shell=True).wait()

#Call main :)
if  __name__ == "__main__" :
    main()


text:
angular.module("starter").controller("ordersCtrl", function ($scope, ordersAPI) {

	var _getOrders = function () {
		ordersAPI.getOrders().success(function (data) {
		$scope.orders = data._embedded.orders;
	});};

	$scope.doRefresh = function () {
		_getOrders();
		$scope.$broadcast('scroll.refreshComplete');

	};

	_getOrders();

	$scope.onOrderDelete = function (id) {
		ordersAPI.deleteOrder(id).success(function () {
			_getOrders();
		});
	};
});


text:
1. Introduction
===============

_libAuthentication_ is a PHP implementation of the FOAF+SSL protocol.
Further details of FOAF+SSL can be obtained at <http://esw.w3.org/topic/foaf+ssl>

If you would like to learn how to get going quickly without diving to much into
technical details, then read section 2. and 3.

The core classes of _libAuthentication_ are tackled in section 4. and 5.

--------------------------------------------------------------------------------

2. How to set up Foaf+SSL authentication in a few lines of code
================================================================================

There are a few flavours of Foaf+SSL authentication. The following very simple
example shows how to setup a Foaf+SSL authentication relying on an identity
provider such as foaf-ssl.org.

Prerequisites:

  *   Publicly available internet site
  *   Apache 2.2 and PHP 5.2.x or higher

Checkout and create a script that will be the entry point for your application:

    git clone git://github.com/melvincarvalho/libAuthentication.git

    cat > index.php
    <?php

    require_once('libAuthentication/lib/Authentication.php');
    $auth = new Authentication_FoafSSLDelegate();

    if (!$auth->isAuthenticated())
    {
      echo $auth->authnDiagnostic;
      echo 'Click here to Login';
    }
    else
    {
      echo 'Your have succesfully logged in.
';
      print_r($auth);
    }

Make sure the _"authreqissuer"_ points to YOUR site and...
... YOU ARE DONE!

You just set up you first Foaf+SSL powered site. Behind the scenes,
_libAuthentication_ has a copy of foaf-ssl.org's certificate which is used
in the authentication process.

Note that if you wish to use another delegated identity verification
service (for instance 'auth.my-profile.eu'), you maye need to change line 4 as :

    $auth = new Authentication_FoafSSLDelegate(TRUE, NULL, Authentication_URL::parse('https://auth.my-profile.eu'));

Then you'd change the login link to :

    echo 'Click here to Login';

This will ensure that you wish to verify the server's response
signature according to the proper certificate already present in Authentication_X509CertRepo.php

--------------------------------------------------------------------------------

3. A more complex setup
================================================================================

If you run your own database that contains Foaf profiles, you can use the
Authentication class that handles all supported authentication methods automatically.

_Note:_
config.php must be configured with the details of the db you have created for ARC2.
Further details of ARC2 are at <http://arc.semsol.org/>

_Note:_
The current RDF library has a dependency on mysql, so it will only work if you
have mysql installed.

You can find the code in examples/authenticationlogin.php

Calling `new Authentication()` tests if the user has presented a SSL Client Certificate
that matches to public key as expressed in a FOAF file. Authentication can work with
SSL Client Certificates presented to your server or with the FOAF+SSL login
delegation server. To use the delegated FOAF+SSL version ask the user to click on
something like the following:

    https://foafssl.org/srv/idp?authreqissuer=http://foaf.me/index.php

In this case <http://foaf.me/index.php> executes `new Authentication($config)`.
Alternatively configured your server to request Client Certificates on the https
page the user tries to access. The page needs to execute
`new Authentication($config)`.

Authentication stores the result of the user login process in a session so
subsequent calls to Authentication's constructor do not preform any further
remote checks on FOAF files. To re-perform the FOAF fetch you need to execute

    $auth->logout()

**WARNING**

Authentication will try to create a session variable therefore it is very
important to execute `new Authentication()` before any html is sent to the client.
Further details [here](http://uk3.php.net/manual/en/book.session.php)

--------------------------------------------------------------------------------

4. Brief overview of _libAuthentication_'s core classes
================================================================================

_libAuthentication_ provides the following core classes:

*   Authentication_AgentARC
    Parse a Foaf file identified by a Webid (e.g. <http://foaf.me/tl73> )

*   Authentication
    Authenticate user by trying all supported authentication methods in a fixed
    and reasonable sequence

*   Authentication_FoafSSLDelegate
    Authenticate via the delegated Foaf+SSL method using a 3rd party FoafSSL
    identity provider (foafssl.org by default)

*   Authentication_FoafSSLARC
    Authenticate via "native" Foaf+SSL  by relying on a database that stores Foaf
    files. (currently the ARC RDF store is used as storage backend)

*   Authentication_Session
    Create a session cookie after successful authentication to speed up
    subsequent authentication attempts

A detailed description of the core classes an their usage follows.

--------------------------------------------------------------------------------

5. Detailed description of _libAuthentication_'s core classes
================================================================================

class Authentication\_AgentARC (implements Authentication\_AgentAbstract)
--------------------------------------------------------------------------------

This is basically a parser for a Foaf file identified by a URI, like
<http://foaf.me/tl73>.

It relies on [ARC RDF Store](http://arc.semsol.org/download).

Assuming you pass it a valid URI and appropriate store configuration, it loads
the corresponding foaf document.

    $config =  array ('db_name'  => 'your_db_name',        // db name
                      'db_user'    => 'your_db_username',  // db username
                      'db_pwd'    => 'your_password',     // db password
                'store_name'    => 'arc_tests',           // tmp table name
    $webid = 'http://foaf.me/tl73';
    $foafDoc = new Authentication_AgentARC($config, $webid);

`$foafDoc->agentURI` contains the URI passed in.

On Success:

`$foafDoc->agentId` contains the value of the _primaryTopic_ property if defined,
otherwise it falls back to `$this->agentURI`.

You can get the parsed foaf file properties as an associative map.

    $foafProperties = $foafDoc->getAgent()

These properties are currently (only those appear that are found in the foaf file):
name, mbox, homepage, nick, weblog, img, RSAKey (with mod and exp) and more.
The semantics of these properties are defined in <http://xmlns.com/foaf/spec/>.

On Error:

You can retrieve error message by inspecting the content of

    $foafDoc->errors

(an array).

_Note_:
If the ARC store doesn't exists (first run), it will be created and setup
automatically. However, the parsing will obviously fail, since the store is empty.

class Authentication
--------------------------------------------------------------------------------
This class provides easy access to all supported authentication mechanisms.
On instantiation, it performs the following operations:

1.  Checks if an authentication session cookie is present
2.  If 1. fails, it tries to authenticate via delegated Foaf+SSL (see _Authentication\_FoafSSLDelegate_)
3.  If 2. fails, it tries to authenticate via native Foaf+SSL (see _Authentication\_FoafSSLARC_)
4.  If authentication is successful, it loads the corresponding foaf file

        $auth = new Authentication($config) // $config is optional,
                                            // only necessary if ARC is used

On Success:

-   `$auth->isAuthenticated()` returns true
-   `$auth->webid` contains the authenticated webid
-   `$auth->getAgent()` returns the parsed foaf profile that is tied to the
    authenticated webid (as in _Authentication\_AgentARC_)

On Error:

If an error occurs, an explanation can be retrieved by inspecting
`$auth->$authnDiagnostic`.
If you want to terminate the authenticated session, it is a good idea to call
`$auth->logout`.

class Authentication_Session
--------------------------------------------------------------------------------

This class usually won't be instantiated directly. If a given authentication
method succeeds, it can optionally persist that information by instantiating
_Authentication\_Session_. It stores the authenticated webid and the parsed foaf
file in `$_SESSION`. This results in a significant speed up in successive
authentication attempts. If you want to create it manually, you can do that as follows:

    $authSession = new Authentication_Session( 1, $agent, $webid)

where 1 indicates the fact of successful authentication,
`$agent` is an associative array representation of the Foaf file that is associated
with `$webid`, which is a URI string.

class Authentication_FoafSSLDelegate
--------------------------------------------------------------------------------

Using the delegated Foaf+SSL method is probably the easiest way to get you start
quickly leveraging this powerful authentication method. It is also the easiest
to set up. Refer to Section 2. for an example and make sure you set up the example
using a public domain name or a public IP address. I you want find out more details
how the identity provider works, see <https://foafssl.org/srv/idp>.

You need to instantiate _Authentication\_FoafSSLDelegate_ at a common entry point
to your site (e.g. index.php):

    $auth = new Authentication_FoafSSLDelegate();

Most of the input is automatically retrieved from the global php context variables
(`$_REQUEST`, `$_SERVER` etc.), so using the default constructor parameters is fine.

On Success:

-   `$auth->isAuthenticated()` returns true
-   `$auth->webid` contains the authenticated webid

If not explicitly disabled, on successful authentication an instance of
_Authentication\_Session_ will also be created, to speed up further authentication
attempts. If that something you don't want to happend, you need to call the constructor
as follows:

    $auth = new Authentication_FoafSSLDelegate( false );

On Error:

If an error occurs, an explanation can be retrieved by inspecting `$auth->$authnDiagnostic`.
If you want to terminate the authenticated session, it is a good idea to call `$auth->logout`.

class Authentication\_FoafSSLARC (implements Authentication\_FoafSSLAbstract)
--------------------------------------------------------------------------------

This implements the "native" Foaf+SSL authentication. The current implementation
relies on the ARC RDF store. The public key tied to the webid is extracted via
Sparql query, as are other properties of the corresponding foaf file.
To perform the authentication, you only need

    $auth = new Authentication_FoafSSLARC($config)

where $config is the same configuration you used for _Authentication\_AgentARC_.
The rest of the constructor parameters are better left at their default value.

On Success:

-   `$auth->isAuthenticated()`	returns true
-   `$auth->webid`			    contains the authenticated webid
-   `$auth->certModulus`		modulus of the associated public key
-   `$auth->certExponent`		exponent of the associated public key
-   `$auth->certSubjectAltName`	subjectAltName from the x509 extension section

_FoafSSLARC_ (_FoafSSLAbstract_) also instantiates a _Authentication\_Session_.
You can disable that by passing "false" as 3rd parameter.

    $auth = new Authentication_FoafSSLARC($config, NULL, false);

On Error:

If an error occurs, an explanation can be retrieved by inspecting `$auth->$authnDiagnostic`.
If you want to terminate the authenticated session, it is a good idea to call `$auth->logout`.

Reference
================================================================================

For detailed information on _libAuthentication_ classes please refer to the API
documentation.


text:
import torch
import torch.nn as nn
from torch.nn.functional import softplus

# Takes pixel intensities of the attention window to parameters (mean,
# standard deviation) of the distribution over the latent code,
# z_what.
class Encoder(nn.Module):
    def __init__(self, x_size, h_sizes, z_size, non_linear_layer):
        super().__init__()
        self.z_size = z_size
        output_size = 2 * z_size
        self.mlp = MLP(x_size, h_sizes + [output_size], non_linear_layer)

    def forward(self, x):
        a = self.mlp(x)
        return a[:, 0 : self.z_size], softplus(a[:, self.z_size :])

# Takes a latent code, z_what, to pixel intensities.
class Decoder(nn.Module):
    def __init__(self, x_size, h_sizes, z_size, bias, use_sigmoid, non_linear_layer):
        super().__init__()
        self.bias = bias
        self.use_sigmoid = use_sigmoid
        self.mlp = MLP(z_size, h_sizes + [x_size], non_linear_layer)

    def forward(self, z):
        a = self.mlp(z)
        if self.bias is not None:
            a = a + self.bias
        return torch.sigmoid(a) if self.use_sigmoid else a

# A general purpose module to construct networks that look like:
# [Linear (256 -> 1)]
# [Linear (256 -> 256), ReLU (), Linear (256 -> 1)]
# [Linear (256 -> 256), ReLU (), Linear (256 -> 1), ReLU ()]
# etc.
class MLP(nn.Module):
    def __init__(
        self, in_size, out_sizes, non_linear_layer, output_non_linearity=False
    ):
        super().__init__()
        assert len(out_sizes) >= 1
        layers = []
        in_sizes = [in_size] + out_sizes[0:-1]
        sizes = list(zip(in_sizes, out_sizes))
        for (i, o) in sizes[0:-1]:
            layers.append(nn.Linear(i, o))
            layers.append(non_linear_layer())
        layers.append(nn.Linear(sizes[-1][0], sizes[-1][1]))
        if output_non_linearity:
            layers.append(non_linear_layer())
        self.seq = nn.Sequential(*layers)

    def forward(self, x):
        return self.seq(x)

# Takes the guide RNN hidden state to parameters of the guide
# distributions over z_where and z_pres.
class Predict(nn.Module):
    def __init__(
        self, input_size, h_sizes, z_pres_size, z_where_size, non_linear_layer
    ):
        super().__init__()
        self.z_pres_size = z_pres_size
        self.z_where_size = z_where_size
        output_size = z_pres_size + 2 * z_where_size
        self.mlp = MLP(input_size, h_sizes + [output_size], non_linear_layer)

    def forward(self, h):
        out = self.mlp(h)
        z_pres_p = torch.sigmoid(out[:, 0 : self.z_pres_size])
        z_where_loc = out[:, self.z_pres_size : self.z_pres_size + self.z_where_size]
        z_where_scale = softplus(out[:, (self.z_pres_size + self.z_where_size) :])
        return z_pres_p, z_where_loc, z_where_scale

class Identity(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x):
        return x


text:
import Vue from 'vue'
import Router from 'vue-router'
import App from './App'
import Service from './Service'
import Home from './Home'
// import Wechat from './Wechat'
// import Icon from './app/Icon'
// import Switch from './app/Switch'
// import Radio from './app/Radio'
// import Input from './app/Input'
// import Number from './app/Number'
// import Checklist from './app/Checklist'
// import Selector from './app/Selector'
// import Tip from './app/Tip'
// import Button from './app/Button'
// import Textarea from './app/Textarea'
// import Flexbox from './app/Flexbox'
// import Tab from './app/Tab'
// import Swiper from './app/Swiper'
// import Sticky from './app/Sticky'
// import Picker from './app/Picker'
// import Datetime from './app/Datetime'
// import Popup from './app/Popup'
// import Range from './app/Range'
// import Actionsheet from './app/Actionsheet'
// import Clocker from './app/Clocker'
// import Rater from './app/Rater'
// import PopupPicker from './app/Popup-picker'
// import Address from './app/Address'
// import Toast from './app/Toast'
// import Loading from './app/Loading'
// import Alert from './app/Alert'
// import Confirm from './app/Confirm'
// import Progress from './app/Progress'
// import XImg from './app/XImg'
// import Onepx from './app/1px'
// import Orientation from './app/Orientation'
// import Shake from './app/Shake'
// import Cell from './app/Cell'
// import Demo from './app/Demo'
// import Emotion from './app/Wechat-emotion'
// import Search from './app/Search'
// import Donate from './app/Donate'
// import Thanks from './app/Thanks'
// import Spinner from './app/Spinner'
// import Calendar from './app/Calendar'
// import Milestone from './app/Milestone'
// import Circle from './app/Circle'
// import Countup from './app/Countup'
// import ColorPicker from './app/Color-picker'
// import Blur from './app/Blur'
// import Scroller from './app/Scroller'

Vue.use(Router)

var router = new Router({
  history: true, // use history=false when testing
  saveScrollPosition: true
})

router.map({
  '/service': {
    component: Service
  },
  // '/component/icon': {
  //   component: Icon
  // },
  // '/component/switch': {
  //   component: Switch
  // },
  // '/component/radio': {
  //   component: Radio
  // },
  // '/component/input': {
  //   component: Input
  // },
  // '/component/number': {
  //   component: Number
  // },
  // '/component/checklist': {
  //   component: Checklist
  // },
  // '/component/selector': {
  //   component: Selector
  // },
  // '/component/tip': {
  //   component: Tip
  // },
  // '/component/button': {
  //   component: Button
  // },
  // '/component/textarea': {
  //   component: Textarea
  // },
  // '/component/flexbox': {
  //   component: Flexbox
  // },
  // '/component/tab': {
  //   component: Tab
  // },
  // '/component/swiper': {
  //   component: Swiper
  // },
  // '/component/sticky': {
  //   component: Sticky
  // },
  // '/component/picker': {
  //   component: Picker
  // },
  // '/component/datetime': {
  //   component: Datetime
  // },
  // '/component/popup': {
  //   component: Popup
  // },
  // '/component/range': {
  //   component: Range
  // },
  // '/component/actionsheet': {
  //   component: Actionsheet
  // },
  // '/component/clocker': {
  //   component: Clocker
  // },
  // '/component/rater': {
  //   component: Rater
  // },
  // '/component/popup-picker': {
  //   component: PopupPicker
  // },
  // '/component/address': {
  //   component: Address
  // },
  // '/component/toast': {
  //   component: Toast
  // },
  // '/component/loading': {
  //   component: Loading
  // },
  // '/component/alert': {
  //   component: Alert
  // },
  // '/component/confirm': {
  //   component: Confirm
  // },
  // '/component/progress': {
  //   component: Progress
  // },
  // '/component/x-img': {
  //   component: XImg
  // },
  // '/component/1px': {
  //   component: Onepx
  // },
  // '/component/orientation': {
  //   component: Orientation
  // },
  // '/component/shake': {
  //   component: Shake
  // },
  // '/component/cell': {
  //   component: Cell
  // },
  // '/demo': {
  //   component: Demo
  // },
  // '/component/emotion': {
  //   component: Emotion
  // },
  // '/component/search': {
  //   component: Search
  // },
  // '/project/donate': {
  //   component: Donate
  // },
  // '/project/thanks': {
  //   component: Thanks
  // },
  // '/project/milestone': {
  //   component: Milestone
  // },
  // '/component/spinner': {
  //   component: Spinner
  // },
  // '/component/calendar': {
  //   component: Calendar
  // },
  // '/component/circle': {
  //   component: Circle
  // },
  // '/component/countup': {
  //   component: Countup
  // },
  // '/component/color-picker': {
  //   component: ColorPicker
  // },
  // '/component/blur': {
  //   component: Blur
  // },
  // '/component/scroller': {
  //   component: Scroller
  // },
  '/': {
    component: Home
  }
})

router.beforeEach(function (transition) {
  if (/\/http/.test(transition.to.path)) {
    let url = transition.to.path.split('http')[1]
    location.href = `http${url}`
  } else {
    transition.next()
  }
})

router.afterEach(function (transition) {
  if (transition.to.fullPath !== '/demo') {
    window.scrollTo(0, 0)
  }
})

router.start(App, '#app')


text:
  Verneuil-l'Étang est
      une commune localisée dans le département de Seine-et-Marne en Île-de-France. Elle comptait 3 069 habitants en 2008.

À Verneuil-l'Étang le salaire moyen par mois par habitant se situe à environ 2 163 €  net. C'est au dessus de la moyenne du pays.

Le parc de logements, à Verneuil-l'Étang, se décomposait en 2011 en 297 appartements et 854 maisons soit
 un marché relativement équilibré.

À coté de Verneuil-l'Étang sont localisées les villes de
Argentières située à 2 km, 355 habitants,
Chaumes-en-Brie localisée à 2 km, 2 958 habitants,
Beauvoir située à 2 km, 198 habitants,
Andrezel à 3 km, 317 habitants,
Ozouer-le-Voulgis située à 4 km, 1 644 habitants,
Aubepierre-Ozouer-le-Repos à 4 km, 891 habitants,
 entre autres. De plus, Verneuil-l'Étang est située à seulement 29 km de Saint-Maur-des-Fossés.

À Verneuil-l'Étang, la valeur moyenne à la vente d'un appartement se situe à 2 688 € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 2 373 € du m². À la location la valeur moyenne se situe à 12,33 € du m² par mois.

La commune compte quelques  équipements, elle propose entre autres un terrain de tennis, un terrain de sport et une salle de combat.

La ville est équipée s'agissant de l'enseignement aux enfants de un collège.
S'agissant les plus petits d'entre nous, la localité dispose de une maternelle et une école primaire.
Verneuil-l'Étang est équipée des  équipements permettant une éducation de proximité.
Lors d'un projet de transaction immobilière à Verneuil-l'Étang, il est important évaluer la notoriété des équipements éducatifs


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Figuration - Scrollspy</title>

<link type="text/css" rel="stylesheet" href="../../dist/css/figuration.css">

          Scrollspy

        <button class="navbar-toggle btn btn-sm" type="button" data-cfw="collapse" data-cfw-collapse-target="#navbarResponsive" aria-label="Toggle navigation">
          Menu
        </button>

Navbar

List

nested: list

nested: dropdown

Scrollspy

Examples

Navbar

        Navbar

Alpha

Beta

                Dropdown

one

two

three

Alpha

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Beta

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

one

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

two

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

three

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.

List

                Alpha
                Beta
                One
                Two
                Three

Alpha

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Beta

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

one

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

two

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

three

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.

nested: false

        Navbar

          Item 1

            Item 1-1
            Item 1-2

          Item 2
          Item 3

            Item 3-1
            Item 3-2

Item 1

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Item 1-1

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

Item 1-2

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

Item 2

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

Item 3

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

Item 3-1

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Item 3-2

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.

nested: 'dropdown'

        Navbar

          Main Title

            Alpha
            Beta

            Dropdown

one

two

three

Main Title

Alpha

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Beta

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

one

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

two

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

three

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.


text:
Demo of the Teradata Python module: a process which implements a pivot function by generating SQL which does a pivot (rows to columns)

This version is supporting the RESTful API TD access. Using ODBC might require small changes.

Feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud?label=TeradataDev

## Install
clone the repository or
download and unzip the zip file

## Configuration
The main configuration is done via three ini files:

* udaexec.ini - contains the main udaexec ini information
* dwl/XXX.dwl - contains the database logon information
* appini/YYYini - contains the specific pivot transformation information

### database logon information - dwl/demo.dwl
The database logoninformation requires the following parameter:

* production=True/False
* password=myPassword
* user=myUser
* system=mySystem
* host=myRestServer
* port=myRestServerPort - Standard 1080

### pivot configuration parameter
* DB 					= Databasename of the source table/view
* objectName 			= source table/view
* groupbyVarList  		= ',' separated list of group by columns
* whereCondition  		= where condition for the pivot select. Typically constrains on period or subgroups etc. - free SQL text which can contain addition parameters which can be defined below

* t0 					= optional, reference date for the period condition. Example: current_date-extract(day from current_date)
* numberOfPeriodsBack	= optional, numeric. Number of periods (days, weeks, months, years back. Need to make the whereCondition syntactically correct - see as an example demo.ini

* rangeQuery 			= SQL which will return the range which should be considered for the privot transformation - this doesn't need to be real ranges. It can also be names, product list etc.

* rangeType 			= type of the rangeQuery result (Numeric or Char)
* rangeVar 				= varable which contains the range values

* denormVarInList 			= ',' separated list which contains the column names which should be denormalized
* denormVarOutList			= ',' separated list which contains the denormalized column names - the orig source column name is stored in the title info
* denormAggFunctionList 	= ',' separated list which contains the aggregatation functions used for the pivot transformation - most common are MAX, MIN, SUM, AVG. rangeType Char should use MAX or MIN
* replaceNullValueList		= ',' separated list which contains the Null replace values - Null is a valid value. Right now the solution can not handle different values in case denormVarInList contains a list of vars.

* materializeFlag 			= True/False, indicates that the transformed data should be stored into a table. In case of False the generated SQL will just printed to STDOUT. The following parameter are only relevant in case this one is True
* createTableFlag 			= True/False, indicates that a table should be created (True) or the target tables exists and the data is added to the table via Insert / Select (False)
* replaceExistingTableFlag 	= True/False, indicates that the table should be replaced in case it already exists
* materializeDB 			= target DB for the materialized table
* materializeTable 			= table name for the materialized table
* materializeComment 		= Comment String for the materialized table
* materializePI 			= full primary index statement for the materialized table. Example: Primary Index (${groupbyVarList})

### demo parameter settings
The application comes with 3 demo parameter settings:

* appini/demo1.1.ini & appini/demo1.1.ini
contains the parameter to denormalize the day_of_week, day_of_calendar  columns of the sys_calendar.calendar table for the last 12 full months.
The result is stored in a table.

* appini/demo2.ini
will denormalize the day_of_week column for the last 12 full months. The result columns will contain the number how often this weekday exists in the specific month. E.g. the demoralization contains an aggregation.
The result is again stored in a table.

* appini/demo3.1.ini & appini/demo3.2.ini
will denormalize the columntype of the dbc.columns table. Again the columns contain the column count per columntype value.
demo3.1.ini will create a new table
demo3.2.ini will add new data to the existing table.

### program call
example programm calls

python PivotGenerator.py -h

result:

usage: PivotGenerator.py [-h] [-l LOGONFILE] [-c CONFIGFILE]

Teradata Pivot SQL generator

optional arguments:
  -h, --help            show this help message and exit
  -l LOGONFILE, --logonfile LOGONFILE
                        logon file for the pivot operation
  -c CONFIGFILE, --configfile CONFIGFILE
                        config file for the pivot generation

python PivotGenerator.py -l dwl/demo.dwl  -c appini/demo1.ini


text:
<?php

declare(strict_types=1); // @codeCoverageIgnore

namespace Recoil\Exception;

use Eloquent\Phony\Phpunit\Phony;
use PHPUnit\Framework\TestCase;
use Throwable;

class CompositeExceptionTest extends TestCase
{
    private $exception1;
    private $exception2;
    private $exceptions;
    private $subject;

    public function setUp(): void {
        $this->exception1 = Phony::mock(Throwable::class)->get();
        $this->exception2 = Phony::mock(Throwable::class)->get();
        $this->exceptions = [
            1 => $this->exception1,
            0 => $this->exception2,
        ];

        $this->subject = CompositeException::create($this->exceptions);
    }

    public function testMessage() {
        $this->assertEquals(
            '2 operation(s) failed.',
            $this->subject->getMessage(),
        );
    }

    public function testKeysAndOrderArePreserved() {
        $exceptions = $this->subject->exceptions();
        $this->assertSame($this->exceptions, $exceptions);
    }
}


text:
postcard
========

HTML Form As Postal Postcard


text:
package backtype.storm.contrib.hbase.utils;

import java.io.IOException;
import java.io.Serializable;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.log4j.Logger;

import backtype.storm.generated.Bolt;

/**
 * HTable connector for Storm {@link Bolt}
 * <p>
 * The HBase configuration is picked up from the first <tt>hbase-site.xml</tt> encountered in the
 * classpath
 */
@SuppressWarnings("serial")
public class HTableConnector implements Serializable {
  private static final Logger LOG = Logger.getLogger(HTableConnector.class);

  private Configuration conf;
  protected HTable table;
  private String tableName;

  /**
   * Initialize HTable connection
   * @param conf The {@link TupleTableConfig}
   * @throws IOException
   */
  public HTableConnector(final TupleTableConfig conf) throws IOException {
    this.tableName = conf.getTableName();
    this.conf = HBaseConfiguration.create();

    LOG.info(String.format("Initializing connection to HBase table %s at %s", tableName,
      this.conf.get("hbase.rootdir")));

    try {
      this.table = new HTable(this.conf, this.tableName);
      this.table.getTableDescriptor().setDurability(conf.getDurability());
    } catch (IOException ex) {
      throw new IOException("Unable to establish connection to HBase table " + this.tableName, ex);
    }

    if (conf.isBatch()) {
      // Enable client-side write buffer
      this.table.setAutoFlush(false, true);
      LOG.info("Enabled client-side write buffer");
    }

    // If set, override write buffer size
    if (conf.getWriteBufferSize() > 0) {
      try {
        this.table.setWriteBufferSize(conf.getWriteBufferSize());

        LOG.info("Setting client-side write buffer to " + conf.getWriteBufferSize());
      } catch (IOException ex) {
        LOG.error("Unable to set client-side write buffer size for HBase table " + this.tableName,
          ex);
      }
    }

    // Check the configured column families exist
    for (String cf : conf.getColumnFamilies()) {
      if (!columnFamilyExists(cf)) {
        throw new RuntimeException(String.format(
          "HBase table '%s' does not have column family '%s'", conf.getTableName(), cf));
      }
    }
  }

  /**
   * Checks to see if table contains the given column family
   * @param columnFamily The column family name
   * @return boolean
   * @throws IOException
   */
  private boolean columnFamilyExists(final String columnFamily) throws IOException {
    return this.table.getTableDescriptor().hasFamily(Bytes.toBytes(columnFamily));
  }

  /**
   * @return the table
   */
  public HTable getTable() {
    return table;
  }

  /**
   * Close the table
   */
  public void close() {
    try {
      this.table.close();
    } catch (IOException ex) {
      LOG.error("Unable to close connection to HBase table " + tableName, ex);
    }
  }
}


text:
import forEach from 'lodash.foreach';
import has from 'lodash.has';
import _bower from 'bower';
import Q from 'q';

/**
 * List all dependencies of a bower package.
 *
 * @param {Object} options Bower options.
 * @return {Promise<Object>} The promise of dependency object.
 */
function list(options = {}) {
  return execList(options);
}

/**
 * List all dependencies of a bower package.
 *
 * @param {Object} options Bower options.
 * @return {Promise<Object>} The promise of dependency object.
 */
function execList(options) {
  const deferred = Q.defer();

  const json = options.json !== false;
  const offline = options.offline !== false;
  const cwd = options.cwd || process.cwd();
  const config = {json, offline, cwd};

  _bower.commands.list(undefined, config)
      .on('end', (conf) => {
        deferred.resolve(flatten(conf));
      })
      .on('error', (error) => {
        deferred.reject(error);
      });

  return deferred.promise;
}

/**
 * Flatten dependency tree into a single dependency object:
 * - Object entry is the dependency name (i.e package name).
 * - Object value is the dependency metadata.
 *
 * @param {Object} pkg The package entrypoint.
 * @param {Object} dependencies Current dependencies (object populated and returned).
 * @return {Object} The dependencies.
 */
function flatten(pkg, dependencies = {}) {
  forEach(pkg.dependencies, (dep, id) => {
    if (!has(dependencies, id)) {
      // Store current dependency...
      dependencies[id] = dep;

      // ... and add transitive dependencies
      Object.assign(dependencies, flatten(dep, dependencies));
    }
  });

  return dependencies;
}

export const bower = {
  list,
};


text:
    /**
     * Propagates the observable sequence that reacts first.
     * @param {Observable} rightSource Second observable sequence.
     * @returns {Observable} {Observable} An observable sequence that surfaces either of the given sequences, whichever reacted first.
     */
    observableProto.amb = function (rightSource) {
        var leftSource = this;
        return new AnonymousObservable(function (observer) {

            var choice,
                leftChoice = 'L', rightChoice = 'R',
                leftSubscription = new SingleAssignmentDisposable(),
                rightSubscription = new SingleAssignmentDisposable();

            function choiceL() {
                if (!choice) {
                    choice = leftChoice;
                    rightSubscription.dispose();
                }
            }

            function choiceR() {
                if (!choice) {
                    choice = rightChoice;
                    leftSubscription.dispose();
                }
            }

            leftSubscription.setDisposable(leftSource.subscribe(function (left) {
                choiceL();
                if (choice === leftChoice) {
                    observer.onNext(left);
                }
            }, function (err) {
                choiceL();
                if (choice === leftChoice) {
                    observer.onError(err);
                }
            }, function () {
                choiceL();
                if (choice === leftChoice) {
                    observer.onCompleted();
                }
            }));

            rightSubscription.setDisposable(rightSource.subscribe(function (right) {
                choiceR();
                if (choice === rightChoice) {
                    observer.onNext(right);
                }
            }, function (err) {
                choiceR();
                if (choice === rightChoice) {
                    observer.onError(err);
                }
            }, function () {
                choiceR();
                if (choice === rightChoice) {
                    observer.onCompleted();
                }
            }));

            return new CompositeDisposable(leftSubscription, rightSubscription);
        });
    };


text:
#pragma once

#include "TomKitten12.g.h"

namespace PrintableTomKitten
{
    public ref class TomKitten12 sealed
    {
    public:
        TomKitten12();
    };
}


text:
package com.github.dozedoff.commonj.file;

import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.LinkedList;

/**
 * Convenience visitor to find all directories.
 *
 * @author Nicholas Wright
 *
 */
public class DirectoryVisitor extends SimpleFileVisitor<Path> {
	private LinkedList<Path> directoryList;

	/**
	 * Create a new {@link DirectoryVisitor} with the given list.
	 *
	 * @param directoryList
	 *            to store found directories in
	 */
	public DirectoryVisitor(LinkedList<Path> directoryList) {
		this.directoryList = directoryList;
	}

	/**
	 * Record the directory before entering it.
	 *
	 * @param dir
	 *            {@inheritDoc}
	 * @param attrs
	 *            {@inheritDoc}
	 */
	@Override
	public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
		directoryList.add(dir);
		return FileVisitResult.CONTINUE;
	}
}