text:
package org.apache.hyracks.algebricks.core.algebra.operators.physical;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
import org.apache.hyracks.algebricks.common.utils.ListSet;
import org.apache.hyracks.algebricks.common.utils.Pair;
import org.apache.hyracks.algebricks.core.algebra.base.EquivalenceClass;
import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractBinaryJoinOperator.JoinKind;
import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
import org.apache.hyracks.algebricks.core.algebra.properties.BroadcastPartitioningProperty;
import org.apache.hyracks.algebricks.core.algebra.properties.ILocalStructuralProperty;
import org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty;
import org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningRequirementsCoordinator;
import org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector;
import org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements;
import org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertiesVector;
import org.apache.hyracks.algebricks.core.algebra.properties.UnorderedPartitionedProperty;

public abstract class AbstractHashJoinPOperator extends AbstractJoinPOperator {

    protected List<LogicalVariable> keysLeftBranch;
    protected List<LogicalVariable> keysRightBranch;

    public AbstractHashJoinPOperator(JoinKind kind, JoinPartitioningType partitioningType,
            List<LogicalVariable> sideLeftOfEqualities, List<LogicalVariable> sideRightOfEqualities) {
        super(kind, partitioningType);
        this.keysLeftBranch = sideLeftOfEqualities;
        this.keysRightBranch = sideRightOfEqualities;
    }

    public List<LogicalVariable> getKeysLeftBranch() {
        return keysLeftBranch;
    }

    public List<LogicalVariable> getKeysRightBranch() {
        return keysRightBranch;
    }

    @Override
    public void computeDeliveredProperties(ILogicalOperator iop, IOptimizationContext context)
            throws AlgebricksException {
        IPartitioningProperty pp;
        AbstractLogicalOperator op = (AbstractLogicalOperator) iop;

        if (op.getExecutionMode() == AbstractLogicalOperator.ExecutionMode.PARTITIONED) {
            AbstractLogicalOperator op0 = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
            IPhysicalPropertiesVector pv0 = op0.getPhysicalOperator().getDeliveredProperties();
            AbstractLogicalOperator op1 = (AbstractLogicalOperator) op.getInputs().get(1).getValue();
            IPhysicalPropertiesVector pv1 = op1.getPhysicalOperator().getDeliveredProperties();

            if (pv0 == null || pv1 == null) {
                pp = null;
            } else {
                pp = pv0.getPartitioningProperty();
            }
        } else {
            pp = IPartitioningProperty.UNPARTITIONED;
        }
        this.deliveredProperties = new StructuralPropertiesVector(pp, deliveredLocalProperties(iop, context));
    }

    @Override
    public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator iop,
            IPhysicalPropertiesVector reqdByParent) {
        StructuralPropertiesVector[] pv = new StructuralPropertiesVector[2];
        // In a cost-based optimizer, we would also try to propagate the
        // parent's partitioning requirements.
        AbstractLogicalOperator op = (AbstractLogicalOperator) iop;

        IPartitioningProperty pp1 = null;
        IPartitioningProperty pp2 = null;
        if (op.getExecutionMode() == AbstractLogicalOperator.ExecutionMode.PARTITIONED) {
            switch (partitioningType) {
                case PAIRWISE: {
                    pp1 = new UnorderedPartitionedProperty(new ListSet<LogicalVariable>(keysLeftBranch), null);
                    pp2 = new UnorderedPartitionedProperty(new ListSet<LogicalVariable>(keysRightBranch), null);
                    break;
                }
                case BROADCAST: {
                    pp2 = new BroadcastPartitioningProperty(null);
                    break;
                }
                default: {
                    throw new IllegalStateException();
                }
            }
        }

        pv[0] = new StructuralPropertiesVector(pp1, null);
        pv[1] = new StructuralPropertiesVector(pp2, null);

        IPartitioningRequirementsCoordinator prc;
        switch (kind) {
            case INNER: {
                prc = IPartitioningRequirementsCoordinator.EQCLASS_PARTITIONING_COORDINATOR;
                break;
            }
            case LEFT_OUTER: {
                prc = new IPartitioningRequirementsCoordinator() {

                    @Override
                    public Pair<Boolean, IPartitioningProperty> coordinateRequirements(
                            IPartitioningProperty requirements, IPartitioningProperty firstDeliveredPartitioning,
                            ILogicalOperator op, IOptimizationContext context) throws AlgebricksException {
                        if (firstDeliveredPartitioning != null
                                && firstDeliveredPartitioning.getPartitioningType() == requirements
                                        .getPartitioningType()) {
                            switch (requirements.getPartitioningType()) {
                                case UNORDERED_PARTITIONED: {
                                    UnorderedPartitionedProperty upp1 = (UnorderedPartitionedProperty) firstDeliveredPartitioning;
                                    Set<LogicalVariable> set1 = upp1.getColumnSet();
                                    UnorderedPartitionedProperty uppreq = (UnorderedPartitionedProperty) requirements;
                                    Set<LogicalVariable> modifuppreq = new ListSet<LogicalVariable>();
                                    Map<LogicalVariable, EquivalenceClass> eqmap = context.getEquivalenceClassMap(op);
                                    Set<LogicalVariable> covered = new ListSet<LogicalVariable>();
                                    for (LogicalVariable r : uppreq.getColumnSet()) {
                                        EquivalenceClass ecSnd = eqmap.get(r);
                                        boolean found = false;
                                        int j = 0;
                                        for (LogicalVariable rvar : keysRightBranch) {
                                            if (rvar == r || ecSnd != null && eqmap.get(rvar) == ecSnd) {
                                                found = true;
                                                break;
                                            }
                                            j++;
                                        }
                                        if (!found) {
                                            throw new IllegalStateException("Did not find a variable equivalent to "
                                                    + r + " among " + keysRightBranch);
                                        }
                                        LogicalVariable v2 = keysLeftBranch.get(j);
                                        EquivalenceClass ecFst = eqmap.get(v2);
                                        for (LogicalVariable vset1 : set1) {
                                            if (vset1 == v2 || ecFst != null && eqmap.get(vset1) == ecFst) {
                                                covered.add(vset1);
                                                modifuppreq.add(r);
                                                break;
                                            }
                                        }
                                    }
                                    if (!covered.equals(set1)) {
                                        throw new AlgebricksException("Could not modify " + requirements
                                                + " to agree with partitioning property " + firstDeliveredPartitioning
                                                + " delivered by previous input operator.");
                                    }
                                    UnorderedPartitionedProperty upp2 = new UnorderedPartitionedProperty(modifuppreq,
                                            requirements.getNodeDomain());
                                    return new Pair<Boolean, IPartitioningProperty>(false, upp2);
                                }
                                case ORDERED_PARTITIONED: {
                                    throw new NotImplementedException();
                                }
                            }
                        }
                        return new Pair<Boolean, IPartitioningProperty>(true, requirements);
                    }
                };
                break;
            }
            default: {
                throw new IllegalStateException();
            }
        }

        return new PhysicalRequirements(pv, prc);
    }

    protected abstract List<ILocalStructuralProperty> deliveredLocalProperties(ILogicalOperator op,
            IOptimizationContext context) throws AlgebricksException;
}


text:
<?php

namespace Payment\Saferpay\Data\Billpay;

interface BillpayPayCompleteParameterInterface
{
    /**
     * optional, only on buy with invoice
     * An additional invoice payment delay to the usual 20 or 30 days, default is 0
     */
    const POB_DELAY = 'n[..2]';

    /**
     * @param string $pobDelay
     * @return $this
     */
    public function setPobDelay($pobDelay);

    /**
     * @return string
     */
    public function getPobDelay();
}

redpajama_set_name: RedPajamaGithub


text:
import * as Preact from '#preact';
import {boolean, number, text, withKnobs} from '@storybook/addon-knobs';
import {withAmp} from '@ampproject/storybook-addon';

export default {
  title: 'amp-instagram-1_0',
  decorators: [withKnobs, withAmp],

  parameters: {
    extensions: [
      {name: 'amp-instagram', version: '1.0'},
      {name: 'amp-accordion', version: '1.0'},
    ],
    experiments: ['bento'],
  },
};

export const _default = () => {
  const width = number('width', 500);
  const height = number('height', 600);
  const shortcode = text('shortcode', 'B8QaZW4AQY_');
  const captioned = boolean('captioned');
  const layout = text('layout', 'fixed');

  return (
    <amp-instagram
      data-shortcode={shortcode}
      data-captioned={captioned}
      width={width}
      height={height}
      layout={layout}
    ></amp-instagram>
  );
};

export const InsideAccordion = () => {
  const shortcode = text('shortcode', 'Bp4I3hRhd_v');
  const width = number('width', 300);
  const height = number('height', 200);
  return (
    <amp-accordion expand-single-section>

Post

          <amp-instagram
            data-shortcode={shortcode}
            width={width}
            height={height}
          ></amp-instagram>

    </amp-accordion>
  );
};

export const InsideDetails = () => {
  const shortcode = text('shortcode', 'Bp4I3hRhd_v');
  const width = number('width', 300);
  const height = number('height', 200);
  return (

      Post
      <amp-instagram
        data-shortcode={shortcode}
        width={width}
        height={height}
      ></amp-instagram>

  );
};


text:
"""
Filter out tweets or retweets that Twitter thinks are sensitive (mostly porn).
"""
from __future__ import print_function

import json
import fileinput

for line in fileinput.input():
    tweet = json.loads(line)
    if 'possibly_sensitive' in tweet and tweet['possibly_sensitive']:
        pass
    elif 'retweeted_status' in tweet and 'possibly_sensitive' in tweet['retweeted_status'] and tweet['retweeted_status']['possibly_sensitive']:
        pass
    else:
        print(json.dumps(tweet))


text:
package org.lxp.design.pattern.chain.responsibility;

public class ManagerInterviewHandler extends AbstractInterviewHandler {

    public ManagerInterviewHandler(String name) {
        super(name);
    }

    @Override
    public int getLevel() {
        return AbstractInterviewHandler.LEVEL_MANAGER;
    }
}


text:
FROM ubuntu:14.04

RUN apt-get update
RUN apt-get update --fix-missing
RUN apt-get install -y build-essential
RUN apt-get install -y libclamav-dev
RUN apt-get install -y clamav-freshclam
RUN freshclam

RUN apt-get install -y python2.7
RUN ln -s /usr/bin/python2.7 /usr/bin/python

RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash -
RUN apt-get install -y nodejs


text:
This day we practice ours skills in frontend to build a grid of buttons with a simple
action.


text:
class CreateAssets < ActiveRecord::Migration[5.0]
  def change
    create_table :assets do |t|
      t.string :image_uid
      t.belongs_to :event

      t.timestamps
    end
  end
end


text:
var watch = require('watch')
var applescript = require('applescript')
var path = require('path')

var script = function (keyword) {
    return ['tell application "Google Chrome"',
            'set windowList to every window',
            'repeat with aWindow in windowList',
            'set tabList to every tab of aWindow',
            'repeat with atab in tabList',
            'if (URL of atab contains "' + keyword + '") then',
            'tell atab to reload',
            'end if',
            'end repeat',
            'end repeat',
            'end tell'
           ].join('\n')
}

var watch_folder = process.argv[2] || './'
var root_path = path.resolve(watch_folder)
var global_keyword = process.argv[3]
var root_keyword = 'file://' + root_path + '/'

var filter = function (file_name) { return ( file_name.match('.md') ? true : false ) }

watch.createMonitor(watch_folder, function (monitor) {
//    monitor.files['./.zshrc'] // Stat object for my zshrc.
    monitor.on('changed', function (f, curr, prev) {
        var keyword = global_keyword || root_keyword + f
        applescript.execString(script(keyword), function (err, response) {
            if (err) {throw err}
            console.log('Detected change in ' + watch_folder + ', refreshing Chrome at ' + keyword)
        })
    })
})


text:
export { default as config } from './config'
export { default as overlay } from './overlay'
export { default as toast } from './toast'
export { default as type } from './type'
export { default as rule } from './rule'


text:
"""I/O function wrappers for phylogenetic tree formats.

This API follows the same semantics as Biopython's `SeqIO` and `AlignIO`.
"""

# For with on Python/Jython 2.5
from __future__ import with_statement
__docformat__ = "restructuredtext en"

from Bio import File
from Bio.Phylo import BaseTree, NewickIO, NexusIO, PhyloXMLIO

supported_formats = {
        'newick':   NewickIO,
        'nexus':    NexusIO,
        'phyloxml': PhyloXMLIO,
        }

def parse(file, format, **kwargs):
    """Iteratively parse a file and return each of the trees it contains.

    If a file only contains one tree, this still returns an iterable object that
    contains one element.

    Example
    -------

    >>> trees = parse('../../Tests/PhyloXML/apaf.xml', 'phyloxml')
    >>> for tree in trees:
    ...     print tree.rooted
    True
    """
    with File.as_handle(file, 'r') as fp:
        for tree in getattr(supported_formats[format], 'parse')(fp, **kwargs):
            yield tree

def read(file, format, **kwargs):
    """Parse a file in the given format and return a single tree.

    Raises a `ValueError` if there are zero or multiple trees -- if this occurs,
    use `parse` instead to get the complete sequence of trees.
    """
    try:
        tree_gen = parse(file, format, **kwargs)
        tree = tree_gen.next()
    except StopIteration:
        raise ValueError("There are no trees in this file.")
    try:
        tree_gen.next()
    except StopIteration:
        return tree
    else:
        raise ValueError(
                "There are multiple trees in this file; use parse() instead.")

def write(trees, file, format, **kwargs):
    """Write a sequence of trees to file in the given format."""
    if isinstance(trees, BaseTree.Tree) or isinstance(trees, BaseTree.Clade):
        # Passed a single tree instead of an iterable -- that's OK
        trees = [trees]
    with File.as_handle(file, 'w+') as fp:
        n = getattr(supported_formats[format], 'write')(trees, fp, **kwargs)
    return n

def convert(in_file, in_format, out_file, out_format, **kwargs):
    """Convert between two tree file formats."""
    trees = parse(in_file, in_format)
    return write(trees, out_file, out_format, **kwargs)


text:
"""
    Module providing the :class:`TemplatePlugin` and
    :class:`IncludePlugin` classes.
"""

from circular.template.tpl import _compile, register_plugin
from circular.template.expression import parse
from circular.template.context import Context

from .tag import TagPlugin

class TemplateLoader:
    """
        The :class:`TemplateLoader` class takes care of storing and retrieving
        templates defined/requested by the user or other plugins.
    """
    TEMPLATES = {}

    @classmethod
    def store(cls, context, name, template):
        """
            Store the template :param:`template` under the key :param:`name`
            for the context :param:`context`. The template will be accessible
            from the given context and any of its children (i.e. those who have
            it (transitively) as their base).
        """
        if context not in cls.TEMPLATES:
            cls.TEMPLATES[context] = {}
        cls.TEMPLATES[context][name] = template

    @classmethod
    def load(cls, context, name):
        """
            Returns a template stored under the key :param:`name` for the
            context :param:`context` or one of its (transitive) bases. If
            there is no such template, raises an exception.
        """
        ctx_tpls = cls.TEMPLATES.get(context, {})
        if name in ctx_tpls:
            return ctx_tpls[name].clone()
        elif isinstance(context._base, Context):
            return cls.load(context._base, name)
        raise Exception("Template "+name+" not found")

class TemplatePlugin(TagPlugin):
    """
        The :class:`TemplatePlugin` plugin allows defining templates which can be included
        in other places.

        ```
            <div tpl-template='avatar' class='avatar'>
                <a href='person.url'>{{ person.name}}</a>
            </div>
        ```

        Once the template is defined, one can use the :class:`Include`
        plugin to use the template:

        ```
            <tpl-include template='avatar' tpl-context='me' />
        ```

        which, assuming the context contains a variable ``me`` with
        the attribute ``url`` set to ``http://me.com`` and ``name``
        set to ``John`` expand into:

        ```
            <div class='avatar'>
                <a href='http://me.com'>John</a>
            </div>
        ```
    """
    NAME = 'Template'
    PRIORITY = 200  # The template plugin should be processed before all the others

    def __init__(self, tpl_element, name):
        super().__init__(tpl_element)
        self._template = _compile(tpl_element)
        self._name = name

    def bind_ctx(self, ctx):
        super().bind_ctx(ctx)
        TemplateLoader.store(ctx, self._name, self._template)

    def clone(self):
        return self

    def update(self):
        pass

class Include(TagPlugin):
    """
        The :class:`Include` plugin allows instantiating templates
        saved in the template cache. Assuming a template ``avatar`` was
        declared in the current (or some base) context
        (e.g. via :class:`TemplatePlugin`) one can include it as follows:

        ```
            <include name='avatar'/>
        ```

        Also, one will typically want to provide a special context
        to the template. This can be done using the :class:`ContextPlugin`
        plugin as follows:

        ```
            <tpl-include name='avatar' tpl-context='me'/>
        ```

    """

    def __init__(self, tpl_element, name=None):
        super().__init__(tpl_element)
        if isinstance(tpl_element, Include):
            self._name = tpl_element._name
        else:
            self._name = name

    def bind_ctx(self, ctx):
        super().bind_ctx(ctx)
        self._tpl_instance = TemplateLoader.load(ctx, self._name)
        return self._tpl_instance.bind_ctx(ctx)

    def update(self):
        return self._tpl_instance.update()

register_plugin(Include)
register_plugin(TemplatePlugin)


text:
package com.tsy.sdk.myokhttp.builder;

import com.tsy.sdk.myokhttp.MyOkHttp;
import com.tsy.sdk.myokhttp.callback.MyCallback;
import com.tsy.sdk.myokhttp.response.IResponseHandler;
import com.tsy.sdk.myokhttp.util.LogUtils;

import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.RequestBody;

/**
 * put builder
 * Created by tsy on 16/12/06.
 */
public class PutBuilder extends OkHttpRequestBuilder<PutBuilder> {

    public PutBuilder(MyOkHttp myOkHttp){
        super(myOkHttp);
    }

    @Override
    public void enqueue(IResponseHandler responseHandler) {
        try {
            if(mUrl == null || mUrl.length() == 0) {
                throw new IllegalArgumentException("url can not be null !");
            }

            Request.Builder builder = new Request.Builder().url(mUrl);
            appendHeaders(builder, mHeaders);

            if (mTag != null) {
                builder.tag(mTag);
            }

            builder.put(RequestBody.create(MediaType.parse("text/plain;charset=utf-8"), ""));

            Request request = builder.build();

            mMyOkHttp.getOkHttpClient()
                    .newCall(request)
                    .enqueue(new MyCallback(responseHandler));
        } catch (Exception e) {
            LogUtils.e("Put enqueue error:" + e.getMessage());
            responseHandler.onFailure(0, e.getMessage());
        }
    }
}


text:
import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import theme from 'styled-theming'

import { OuterContainer } from '../helpers/outer-container'
import route from '../../data/routes'
import { myTheme, themedTextColor, themedTextColorRgb } from '../../styles'

import Logo from '../logo'
import { Navigation, NavigationItem } from '../navigation'

// Styles
// ----------------------------------------

const {
  color, fontWeight, breakpoint, space, borderRadii,
} = myTheme

const linkColor = theme('mode', {
  light: color.text,
  dark: color.white,
})

// About Site
// ----------------------------------------

const SiteTitle = styled.h1`
  font-size: 1.25rem;
  font-weight: ${fontWeight.four};
`
const StyledLink = styled(Link)`
  color: ${linkColor};
  text-decoration: none;

  @media screen and (min-width: ${breakpoint.medium}) {
    transition: background-color 150ms ease-in-out;
    border-radius: ${borderRadii.two};
    background-color: transparent;
    margin-left: -${space.one};
    padding: ${space.half} ${space.one};

    &:hover {
      color: ${themedTextColor};
      background-color: rgba(${themedTextColorRgb}, 0.1);
    }
  }
`

type Props = {
  title: string,
}

const Header = ({ title }: Props) => (
  <OuterContainer className="flex mb1 md-mb2 py3">

        <SiteTitle className="m0">

        </SiteTitle>

      <Navigation>
        <NavigationItem to={route.about}>About</NavigationItem>
        <NavigationItem to={route.works}>Works</NavigationItem>
        <NavigationItem to={route.writing}>Writing</NavigationItem>
      </Navigation>

      <Link to={route.home}>
        <Logo />
      </Link>

  </OuterContainer>
)

export default Header


text:
.class Lcom/android/systemui/statusbar/phone/StatusBar$41;
.super Ljava/lang/Object;
.source "StatusBar.java"

# interfaces
.implements Landroid/view/View$OnClickListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/android/systemui/statusbar/phone/StatusBar;->inflateShelf()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/StatusBar;

# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/StatusBar;)V
    .locals 0

    iput-object p1, p0, Lcom/android/systemui/statusbar/phone/StatusBar$41;->this$0:Lcom/android/systemui/statusbar/phone/StatusBar;

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

    return-void
.end method

# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 2

    sget-object v0, Lcom/android/systemui/SystemUIAnalytics;->mCurrentScreenID:Ljava/lang/String;

    const-string/jumbo v1, "1115"

    invoke-static {v0, v1}, Lcom/android/systemui/SystemUIAnalytics;->sendEventLog(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBar$41;->this$0:Lcom/android/systemui/statusbar/phone/StatusBar;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/StatusBar;->clearAllNotifications()V

    return-void
.end method


text:
layout: documentation
categories:
- documentation
- oauth
redirect_from:
- "/apis/oauth/"
title: OAuth API
excerpt: The Ticketmaster OAuth API provides a secure and standardized way to authenticate Ticketmaster users.
keywords: Oauth API, member details, access token
---

{: .article}
# OAuth API

The Ticketmaster OAuth API provides a secure and standardized way to authenticate Ticketmaster users.

Apps which implement Ticketmaster OAuth are able to have Ticketmaster users authorize their app to make requests to the Ticketmaster Open Platform on their behalf.  It can also be used as a social sign-on provider, i.e. a "Login with Ticketmaster" button.

## Overview
{: #overview }

### Terminology

| __Client ID__ | A public key which identifies your Ticketmaster API client / app.  Used when initiating the OAuth handshake.
| __Client Secret__ | A private token which is used to authenticate your Ticketmaster API client / app for certain operations.  Not meant to be shared in untrusted environments, i.e. served up in your app.
| __Access Token__ | Access tokens are credentials used to access protected resources. An access token is a random string representing an authorization issued to the client. Access tokens represent specific scopes and durations of access, granted by the resource owner, and enforced by the resource server and authorization server.
| __Refresh Token__ | Refresh tokens are credentials used to obtain access tokens. Refresh tokens are issued to the client by the authorization server and are used to obtain a new access token when the current access token becomes invalid or expires.
| __Auth Code__ | An intermediate token used in the Authorization Code Grant Flow, generated after the user has successfully provided valid login credentials, and can be exchanged for the actual OAuth tokens (access token & refresh token).

## Authorization Code Flow ("three-legged")

This flow must take place in a browser. It works by sending the user to a specially crafted URI on the OAuth trusted service (https://oauth.ticketmaster.com), where the user is then able to approve or decline your application's request to access their account.  If approved, the client is redirected to a URI hosted by your application, along with an Authorzation Code. The server which receives the redirected request can then exchange the auth code for the access tokens.

This flow is typically what people are thinking of when they talk about OAuth 2.0.

### Step 1
{: #step1}

Create an Authorization URI using the following scheme:

Base URI: `https://oauth.ticketmaster.com/oauth/authorize`

Query Parameters:

 + **client_id**
 + **redirect_uri**
 + **response_type = code**
 + **state** (Optional: Unique identifier to protect against CSRF)
 + **scope = all**

Note, the header `Content-Type: application/x-www-form-urlencoded` must be included when sending this request.

Example (unencoded for readability):

{% highlight bash %}
GET https://oauth.ticketmaster.com/oauth/token?client_id=12341234&redirect_uri=http://localhost/oauth/code_callback&scope=all&response_type=code
{% endhighlight %}

### Step 2
{: #step2}

Redirect the user to to the Authorization URI you constructed in Step 1.  Usually, this is the HREF for a stylized "Connect with Ticketmaster" button.

### Step 3
{: #step3}

User logs in to Ticketmaster, and grants your Application permission to access their account.

### Step 4
{: #step4}

The OAuth API uses a 302 Redirect to send the User back to your `redirect_uri`, including the `?code=` (Auth Code) query parameter:

{% highlight bash %}
GET http://localhost/oauth/code_callback?code=1c6b27fd4dbca7390b7d6cbbb8d4e41a5841d123
{% endhighlight %}

+ **code**
+ **state** (Optional: only sent back if provided initially)

### Step 5
{: #step5}

The server handling the request at the `redirect_uri` parses the `?code=` from the query string, and POSTs the auth code to `https://oauth.ticketmaster.com/oauth/token`.  The OAuth API responds with Access Token, Refresh Token, and expiration information.

Note, the header `Content-Type: application/x-www-form-urlencoded` must be included when sending this request.

Query Parameters:

+ **client_id**
+ **client_secret**
+ **code = the code you just parsed**
+ **redirect_uri**
+ **grant_type = "authorization_code" [note]**

>[Request](#req)
>[Response](#res)
{: .reqres}

{% highlight bash %}
POST https://oauth.ticketmaster.com/oauth/token

grant_type=authorization_code&client_id=12341234&client_secret=43214321&code=1c6b27fd4dbca7390b7d6cbbb8d4e41a5841d123

{% endhighlight %}

{% highlight js %}
Status 200
{
    "access_token": "2bn123okn123on12c9d620232f8259205ed70",
    "expires_in": 3600,
    "refresh_token": "bqwe123123538b9afa895a313ed5e0bc5fec43",
    "token_type": "bearer"
}
{% endhighlight %}

## Using Access Tokens
{: using-access-token}

Once you have obtained an Access Token, you can use it to identify the User until the time specified by the `expires_in` key in the response. At the time of writing, this is 3600 seconds (1 hour). After that time, you need to reissue a new Access Token using the Refresh Token (explained below), or will need the User to reauthenticate (via Step 1 above).

## Getting Refresh Tokens
{: getting-refresh-tokens}

At the end of the grant flow, you will receive both an Access Token and a Refresh Token. The Refresh Token is long-lived, and can be used to generate new short-lived (1 hour) Access Tokens while valid. Therefore, if you intend to make requests beyond 1 hour of receipt of the initial Access Token, you should save and store the Refresh Token.

To create new Access Tokens, use the following procedure:

Base URI: `https://oauth.ticketmaster.com/oauth/token`

Query Parameters:

+ grant_type = refresh_token
+ client_id
+ client_secret
+ refresh_token = The token you stored

To get new access and refresh tokens, we would send the following request. The following header `Content-Type: application/x-www-form-urlencoded`  must be set when sending this request.

>[Request](#req)
>[Response](#res)
{: .reqres}

{% highlight bash %}
POST https://oauth.ticketmaster.com/oauth/token

grant_type=refresh_token&client_id=12341234&client_secret=43214321&refresh_token=d777538b9afa895a313ed5e0bc5fec43

{% endhighlight %}

{% highlight js %}
Status 200
{
    "access_token": "2bn123okn123on12c9d620232f8259205ed70",
    "expires_in": 3600,
    "refresh_token": "bqwe123123538b9afa895a313ed5e0bc5fec43",
    "token_type": "bearer"
}
{% endhighlight %}


text:
<?php

final class DiffusionCommitTagsController extends DiffusionController {

  public function shouldAllowPublic() {
    return true;
  }

  protected function processDiffusionRequest(AphrontRequest $request) {
    $drequest = $this->getDiffusionRequest();
    $repository = $drequest->getRepository();

    $tag_limit = 10;
    switch ($repository->getVersionControlSystem()) {
      case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
        $tags = array();
        break;
      default:
        $tags = DiffusionRepositoryTag::newFromConduit(
          $this->callConduitWithDiffusionRequest(
            'diffusion.tagsquery',
            array(
              'commit' => $drequest->getCommit(),
              'limit' => $tag_limit + 1,
            )));
        break;
    }
    $has_more_tags = (count($tags) > $tag_limit);
    $tags = array_slice($tags, 0, $tag_limit);

    $tag_links = array();
    foreach ($tags as $tag) {
      $tag_links[] = phutil_tag(
        'a',
        array(
          'href' => $drequest->generateURI(
            array(
              'action'  => 'browse',
              'commit'  => $tag->getName(),
            )),
        ),
        $tag->getName());
    }

    if ($has_more_tags) {
      $tag_links[] = phutil_tag(
        'a',
        array(
          'href' => $drequest->generateURI(
            array(
              'action'  => 'tags',
            )),
        ),
        pht("More Tags\xE2\x80\xA6"));
    }

    return id(new AphrontAjaxResponse())
      ->setContent($tag_links ? implode(', ', $tag_links) : pht('None'));
  }
}


text:
tl;dr: it works but has limitations, one of them is
`renderToStaticMarkup` from [react-dom](/facebook/react).

See full example in the repo
[taxigy/try-prepack](/taxigy/try-prepack).


text:
__program__ = "posts"
__version__ = "0.1.0"
__author__ = "Darcy Jones"
__date__ = "5 January 2015"
__author_email__ = "darcy.ab.jones@gmail.com"
__license__ = """\
Copyright (C) 2014  Darcy Jones

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

"""############################ Import Modules #############################"""

import os
from os.path import splitext
from os.path import join
from os.path import isfile
from os import listdir
import re
from collections import defaultdict
from collections import OrderedDict
import json
import yaml
from datetime import datetime

"""#########################################################################"""

def get_posts(path, which=None, verbose=True):
    """ Prepare a list of posts taken from a directory.

    Keyword arguments:
    path -- Path to the directory containing blog posts (type str).
    which -- Specifies which posts to include in the output. 'None' includes
        all posts, a string will return only the post with an id that matches
        the string, and a list (or tuple, or set) of strings will include all
        posts with id's in the list (type None|str|list, default None).
    verbose -- Print information while running (type bool, default True).

    Returns:
    A list of dict objects (type list).
    """
    """ Here we conditionally define include_test depending on what type of
    object 'which' is."""

    class_ = type(which)
    if class_ == str:
        def include_test(name):
            if name == which:
                return True
            else:
                return False
    elif class_ in {list, tuple, set}:
        def include_test(name):
            if name in which:
                return True
            else:
                return False
    else:
        def include_test(name):
            return True

    """ Loop through all files in the posts directory and add each file format
    e.g. 'json', 'html', etc as keys for a subdictionary. The base dictionary
    is keyed by the file name (excluding the extension).

    example:
    >>> output = {
    ...    'myfile':{
    ...        'html':'/path/to/posts/myfile.html',
    ...        'json':'/path/to/posts/myfile.json'
    ...    }
    ...}
    """
    all_files = defaultdict(dict)
    for file_ in listdir(path):
        if isfile(join(path, file_)):
            name = file_.split('.')[0]
            type_ = splitext(file_)[1].strip('.')
            file_path = join(path, file_)
            all_files[name][type_] = file_path

    posts = list()
    required_keys = {'html', 'title', 'date'}
    for key, value in all_files.items():
        """ If include_test says that we don't need this file, we skip the
        rest of the current iteration and continue with the next key, value
        pair. """
        if not include_test(key):
            continue
        value['id_'] = key
        if 'json' in value:
            with open(value['json'], "rU") as json_handle:
                value.update(
                    json.load(json_handle, object_hook=json_date_parser)
                    )
        elif 'yaml' in value:
            with open(value['yaml'], 'rU') as yaml_handle:
                value.update(yaml.load(yaml_handle))
        elif 'yml' in value:
            with open(value['yml'], 'rU') as yaml_handle:
                value.update(yaml.load(yaml_handle))

        """ If some required keys are missing then we skip the rest of the
        current iteration and continue with the next key, value pair.
        If verbose is True we print which keys were missing."""
        if required_keys.intersection(value) != required_keys:
            if verbose:
                d = required_keys.difference(required_keys.intersection(value))
                print(
                    "Excluded {} from posts because it did not ".format(key) +
                    "have all of the required information. The field(s) " +
                    "'{}' was/were missing.".format("', '".join(list(d)))
                )
            continue

        """ Everything is cool, add the post to the list."""
        posts.append(value)

    """ We could run into problems here when dates aren't parsed as datetime
    objects. I might need to figure out a better way of ordering posts by date
    in the future."""
    posts.sort(key=lambda d: d['date'])
    return posts

def json_date_parser(dct):
    """ A dirty workaround for parsing dates from JSON files.

    Loops (non-recursively) through the dictionary from the parsed JSON file.
    If the value is a string we try to convert the string using several
    'datetime.strptime()' patterns. If the pattern matches the string, the
    string is replaced with the corresponding datetime object. If the pattern
    doesn't match the string we handle the exception, no biggie.

    Keyword arguments:
    dct -- A dictionary from the parsed JSON (type dict).

    Returns:
    A dictionary with string dates replaced with datetime objects (type dict).
    """
    date = "%Y-%m-%d"
    date_time = "%Y-%m-%dT%H:%M:%S"
    date_time2 = "%Y-%m-%dT%H:%M"
    date_time3 = "%Y-%m-%d %H:%M"
    date_time_offset = "%Y-%m-%dT%H:%M:%S%z"
    time = "%H:%M:%S"
    formats = [date, date_time, date_time2, date_time3, date_time_offset, time]
    for k, v in dct.items():
        if isinstance(v, str):
            for fmt in formats:
                try:
                    dct[k] = datetime.strptime(v, fmt)
                except ValueError:
                    pass
    return dct

def json_date_writer(obj):
    """ . """
    return obj.isoformat() if hasattr(obj, 'isoformat') else obj

def process_md(md_path):
    """ . """
    # Boundary is three or more '.' or '-'.
    yaml_boundary = re.compile("(-{3,}|\.{3,})")
    blankline = True
    yaml_block = False
    yaml = list()
    current_yaml = list()
    with open(md_path, 'rU') as md_handle:
        for line in md_handle:
            if yaml_boundary.match(line.strip()) is not None and blankline:
                if yaml_block:
                    yaml_block = False
                    yaml.append("\n".join(current_yaml))
                    current_yaml = list()
                else:
                    yaml_block = True
            elif line.strip == '':
                blankline = True
            elif yaml_block:
                current_yaml.append(line)
    with open(md_path, 'rU') as md_handle:
        markdown = md_handle.read()
    return markdown, process_yaml(yaml)

def process_yaml(yaml_list):
    """ . """
    yaml_dict = dict()
    for yaml_item in reversed(yaml_list):
        yaml_dict.update(yaml.load(yaml_item))
    return yaml_dict

def next_md_path(current_path):
    """ . """
    current_path = splitext(current_path)[0]
    next_ext = splitext(current_path)[1]
    if next_ext.lower() == '' or next_ext.lower() == '.md':
        next_path = '{}.md'.format(splitext(current_path)[0])
    else:
        next_path = splitext(current_path)
    return next_path

def generate_dir_path(path, suffix):
    """ . """
    id_ = path.split('.')[0]
    dir_path = "{}-{}".format(id_, suffix)
    # if not os.path.isdir(dir_path):
    #     os.makedirs(dir_path)
    return dir_path


text:
package io.aeron.samples.raw;

import io.aeron.driver.Configuration;
import org.HdrHistogram.Histogram;
import org.agrona.BitUtil;
import org.agrona.concurrent.SigInt;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.DatagramChannel;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.LockSupport;

import static io.aeron.samples.raw.Common.init;

/**
 * Benchmark used to calculate latency of underlying system.
 *
 * @see ReceiveSendUdpPong
 */
public class SendReceiveUdpPing
{
    public static void main(final String[] args) throws IOException
    {
        int numChannels = 1;
        if (1 == args.length)
        {
            numChannels = Integer.parseInt(args[0]);
        }

        final Histogram histogram = new Histogram(TimeUnit.SECONDS.toNanos(10), 3);

        final ByteBuffer buffer = ByteBuffer.allocateDirect(Configuration.MTU_LENGTH_DEFAULT);

        final DatagramChannel[] receiveChannels = new DatagramChannel[numChannels];
        for (int i = 0; i < receiveChannels.length; i++)
        {
            receiveChannels[i] = DatagramChannel.open();
            init(receiveChannels[i]);
            receiveChannels[i].bind(new InetSocketAddress("localhost", Common.PONG_PORT + i));
        }

        final InetSocketAddress sendAddress = new InetSocketAddress("localhost", Common.PING_PORT);
        final DatagramChannel sendChannel = DatagramChannel.open();
        init(sendChannel);

        final AtomicBoolean running = new AtomicBoolean(true);
        SigInt.register(() -> running.set(false));

        while (running.get())
        {
            measureRoundTrip(histogram, sendAddress, buffer, receiveChannels, sendChannel, running);

            histogram.reset();
            System.gc();
            LockSupport.parkNanos(1000_000_000);
        }
    }

    private static void measureRoundTrip(
        final Histogram histogram,
        final InetSocketAddress sendAddress,
        final ByteBuffer buffer,
        final DatagramChannel[] receiveChannels,
        final DatagramChannel sendChannel,
        final AtomicBoolean running)
        throws IOException
    {
        for (int sequenceNumber = 0; sequenceNumber < Common.NUM_MESSAGES; sequenceNumber++)
        {
            final long timestamp = System.nanoTime();

            buffer.clear();
            buffer.putLong(sequenceNumber);
            buffer.putLong(timestamp);
            buffer.flip();

            sendChannel.send(buffer, sendAddress);

            buffer.clear();
            boolean available = false;
            while (!available)
            {
                if (!running.get())
                {
                    return;
                }

                for (int i = receiveChannels.length - 1; i >= 0; i--)
                {
                    if (null != receiveChannels[i].receive(buffer))
                    {
                        available = true;
                        break;
                    }
                }
            }

            final long receivedSequenceNumber = buffer.getLong(0);
            if (receivedSequenceNumber != sequenceNumber)
            {
                throw new IllegalStateException("Data Loss:" + sequenceNumber + " to " + receivedSequenceNumber);
            }

            final long duration = System.nanoTime() - buffer.getLong(BitUtil.SIZE_OF_LONG);
            histogram.recordValue(duration);
        }

        histogram.outputPercentileDistribution(System.out, 1000.0);
    }
}


text:
// Copyright 2014 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.devtools.build.lib.analysis;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multimap;
import com.google.devtools.build.lib.analysis.config.BuildConfigurationCollection;
import com.google.devtools.build.lib.analysis.config.BuildConfigurationValue;
import com.google.devtools.build.lib.analysis.config.ConfigurationResolver;
import com.google.devtools.build.lib.analysis.config.ConfigurationResolver.TopLevelTargetsAndConfigsResult;
import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
import com.google.devtools.build.lib.analysis.config.TransitionResolver;
import com.google.devtools.build.lib.analysis.config.transitions.ConfigurationTransition;
import com.google.devtools.build.lib.analysis.config.transitions.NoTransition;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.events.ExtendedEventHandler;
import com.google.devtools.build.lib.packages.BuildType;
import com.google.devtools.build.lib.packages.BuiltinProvider;
import com.google.devtools.build.lib.packages.Info;
import com.google.devtools.build.lib.packages.Target;
import com.google.devtools.build.lib.packages.TriState;
import com.google.devtools.build.lib.packages.Type;
import com.google.devtools.build.lib.vfs.PathFragment;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;

/**
 * Utility functions for use during analysis.
 */
public final class AnalysisUtils {

  private AnalysisUtils() {
    throw new IllegalStateException(); // utility class
  }

  /**
   * Returns whether link stamping is enabled for a rule.
   *
   *
This returns false for unstampable rule classes and for rules used to build tools. Otherwise
   * it returns the value of the stamp attribute, or of the stamp option if the attribute value is
   * -1.
   */
  public static boolean isStampingEnabled(RuleContext ruleContext, BuildConfigurationValue config) {
    if (config.isToolConfiguration()) {
      return false;
    }
    TriState stamp;
    if (ruleContext.attributes().has("stamp", BuildType.TRISTATE)) {
      stamp = ruleContext.attributes().get("stamp", BuildType.TRISTATE);
    } else if (ruleContext.attributes().has("stamp", Type.INTEGER)) {
      int value = ruleContext.attributes().get("stamp", Type.INTEGER).toIntUnchecked();
      stamp = TriState.fromInt(value);
    } else {
      return false;
    }
    return stamp == TriState.YES || (stamp == TriState.AUTO && config.stampBinaries());
  }

  public static boolean isStampingEnabled(RuleContext ruleContext) {
    return isStampingEnabled(ruleContext, ruleContext.getConfiguration());
  }

  // TODO(bazel-team): These need Iterable<? extends TransitiveInfoCollection> because they need to
  // be called with Iterable<ConfiguredTarget>. Once the configured target lockdown is complete, we
  // can eliminate the "extends" clauses.
  /**
   * Returns the list of providers of the specified type from a set of transitive info collections.
   */
  public static <C extends TransitiveInfoProvider> List<C> getProviders(
      Iterable<? extends TransitiveInfoCollection> prerequisites, Class<C> provider) {
    ImmutableList.Builder<C> result = ImmutableList.builder();
    for (TransitiveInfoCollection prerequisite : prerequisites) {
      C prerequisiteProvider =  prerequisite.getProvider(provider);
      if (prerequisiteProvider != null) {
        result.add(prerequisiteProvider);
      }
    }
    return result.build();
  }

  /**
   * Returns the list of declared providers (native and Starlark) of the specified Starlark key from
   * a set of transitive info collections.
   */
  public static <T extends Info> List<T> getProviders(
      Iterable<? extends TransitiveInfoCollection> prerequisites,
      final BuiltinProvider<T> starlarkKey) {
    ImmutableList.Builder<T> result = ImmutableList.builder();
    for (TransitiveInfoCollection prerequisite : prerequisites) {
      T prerequisiteProvider = prerequisite.get(starlarkKey);
      if (prerequisiteProvider != null) {
        result.add(prerequisiteProvider);
      }
    }
    return result.build();
  }

  /**
   * Returns the iterable of collections that have the specified provider.
   */
  public static <S extends TransitiveInfoCollection, C extends TransitiveInfoProvider> Iterable<S>
      filterByProvider(Iterable<S> prerequisites, final Class<C> provider) {
    return Iterables.filter(prerequisites, target -> target.getProvider(provider) != null);
  }

  /** Returns the iterable of collections that have the specified provider. */
  public static <S extends TransitiveInfoCollection, C extends Info> Iterable<S> filterByProvider(
      Iterable<S> prerequisites, final BuiltinProvider<C> provider) {
    return Iterables.filter(prerequisites, target -> target.get(provider) != null);
  }

  /**
   * Returns the path of the associated manifest file for the path of a Fileset. Works for both
   * exec paths and root relative paths.
   */
  public static PathFragment getManifestPathFromFilesetPath(PathFragment filesetDir) {
    PathFragment manifestDir = filesetDir.replaceName("_" + filesetDir.getBaseName());
    PathFragment outputManifestFrag = manifestDir.getRelative("MANIFEST");
    return outputManifestFrag;
  }

  /**
   * Returns a path fragment qualified by the rule name and unique fragment to disambiguate
   * artifacts produced from the source file appearing in multiple rules.
   *
   *
For example "//pkg:target" -> "pkg/<fragment>/target.
   */
  public static PathFragment getUniqueDirectory(
      Label label, PathFragment fragment, boolean siblingRepositoryLayout) {
    return label
        .getPackageIdentifier()
        .getPackagePath(siblingRepositoryLayout)
        .getRelative(fragment)
        .getRelative(label.getName());
  }

  /**
   * Checks that the given provider class either refers to an interface or to a value class.
   */
  public static <T extends TransitiveInfoProvider> void checkProvider(Class<T> clazz) {
    // Write this check in terms of getName() rather than getSimpleName(); the latter is expensive.
    if (!clazz.isInterface() && clazz.getName().contains(".AutoValue_")) {
      // We must have a superclass due to the generic bound above.
      throw new IllegalArgumentException(
          clazz + " is generated by @AutoValue; use " + clazz.getSuperclass() + " instead");
    }
  }

  /**
   * Given a set of *top-level* targets and a configuration collection, evaluate top level
   * transitions, resolve configurations and return the appropriate <Target, Configuration> pair for
   * each target.
   *
   *
Preserves the original input ordering.
   */
  // Keep this in sync with PrepareAnalysisPhaseFunction.
  public static TopLevelTargetsAndConfigsResult getTargetsWithConfigs(
      BuildConfigurationCollection configurations,
      Collection<Target> targets,
      ExtendedEventHandler eventHandler,
      ConfiguredRuleClassProvider ruleClassProvider,
      ConfigurationsCollector configurationsCollector)
      throws InvalidConfigurationException, InterruptedException {
    // We use a hash set here to remove duplicate nodes; this can happen for input files and package
    // groups.
    LinkedHashSet<TargetAndConfiguration> nodes = new LinkedHashSet<>(targets.size());
    for (BuildConfigurationValue config : configurations.getTargetConfigurations()) {
      for (Target target : targets) {
        nodes.add(new TargetAndConfiguration(target, config));
      }
    }

    // We'll get the configs from ConfigurationsCollector#getConfigurations, which gets
    // configurations for deps including transitions.
    Multimap<BuildConfigurationValue, DependencyKey> asDeps =
        targetsToDeps(nodes, ruleClassProvider);

    return ConfigurationResolver.getConfigurationsFromExecutor(
        nodes, asDeps, eventHandler, configurationsCollector);
  }

  @VisibleForTesting
  public static Multimap<BuildConfigurationValue, DependencyKey> targetsToDeps(
      Collection<TargetAndConfiguration> nodes, ConfiguredRuleClassProvider ruleClassProvider) {
    Multimap<BuildConfigurationValue, DependencyKey> asDeps = ArrayListMultimap.create();
    for (TargetAndConfiguration targetAndConfig : nodes) {
      ConfigurationTransition transition =
          TransitionResolver.evaluateTransition(
              targetAndConfig.getConfiguration(),
              NoTransition.INSTANCE,
              targetAndConfig.getTarget(),
              ruleClassProvider.getTrimmingTransitionFactory());
      if (targetAndConfig.getConfiguration() != null) {
        // TODO(bazel-team): support top-level aspects
        asDeps.put(
            targetAndConfig.getConfiguration(),
            DependencyKey.builder()
                .setLabel(targetAndConfig.getLabel())
                .setTransition(transition)
                .build());
      }
    }
    return asDeps;
  }
}


text:
body {
  background-color: #f7f7f7;
  font-family: Arial, Helvetica, sans-serif; }

.cj {
  text-align: center; }

.rj {
  text-align: right; }

tr.row2,
.trade_browser tr.row1,
.listview tr.paginaterow,
.formview tr.row1 {
  background-color: #f1f1f1; }

.listview {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 10px;
  position: relative; }
  .listview thead {
    border: 1px solid #e9e9e9;
    border-bottom: 2px solid #e9e9e9; }
    .listview thead .superheader {
      border-bottom: none;
      font-size: 10px;
      text-transform: uppercase;
      text-align: center;
      font-weight: normal;
      color: #9e9e9e;
      padding: 5px 2px; }
    .listview thead .subheader {
      border: 0; }
    .listview thead .first_column {
      border-left: 1px solid #e9e9e9; }
  .listview td {
    font-size: 10px;
    border: 1px solid #e9e9e9;
    padding: 4px 3px;
    vertical-align: middle;
    white-space: nowrap; }
    .listview td.pre {
      white-space: pre-wrap; }
    .listview td span, .listview td a, .listview td div {
      font-size: 10px; }
    .listview td a.fa-lg {
      font-size: 1.33333333em; }
    .listview td label {
      line-height: 18px; }
  .listview td.wrap {
    white-space: normal; }
  .listview th {
    background-color: white;
    font-weight: bold;
    font-size: 10px;
    color: #535353;
    padding: 4px 3px;
    padding-bottom: 3px;
    border: 1px solid #e9e9e9; }
    .listview th.sorted_column {
      background-color: #d7d7d7; }
    .listview th a {
      display: inline-block;
      width: 100%;
      white-space: nowrap;
      color: #535353; }
    .listview th.thin {
      width: 10px; }
  .listview tr.spacer td {
    border: none; }
  .listview tr.row1.highlight_row {
    background-color: #dfe0ce; }
  .listview tr.row0.highlight_row {
    background-color: #feffef; }
  .listview tr.marked {
    background-color: #feffef; }
  .listview tr:hover, .listview tr.row1:hover, .listview tr.row0:hover {
    background-color: #d8ecee; }
  .listview tr.spacer:hover {
    background-color: transparent; }
  .listview input {
    margin: 0;
    padding: 0 2px; }
  .listview .numeric, .listview .percent {
    text-align: right; }
  .listview .string, .listview .date, .listview .time {
    text-align: left; }
  .listview .paginaterow td {
    text-align: right;
    padding-right: 4px; }

tr.row0,
tr.row1,
.listview td.col0,
.listview td.coln,
.formview tr.row2,
.formview tr.row0 {
  background-color: #fdfdfd; }

.paginator {
  font-size: 12px;
  background-color: white;
  display: inline-block;
  vertical-align: middle;
  margin-top: 14px;
  margin-bottom: 14px; }
  .paginator .paginate-link,
  .paginator .paginate-current,
  .paginator .paginate-next,
  .paginator .paginate-previous,
  .paginator .paginate-first,
  .paginator .paginate-last {
    margin: 0;
    padding: 0;
    text-align: center;
    display: inline-block;
    height: 33px;
    width: 33px;
    line-height: 33px;
    border-left: 1px solid #f7f7f7;
    cursor: pointer; }
    .paginator .paginate-link:hover,
    .paginator .paginate-current:hover,
    .paginator .paginate-next:hover,
    .paginator .paginate-previous:hover,
    .paginator .paginate-first:hover,
    .paginator .paginate-last:hover {
      background-color: #d7d7d7; }
  .paginator .paginate-current {
    cursor: default; }
  .paginator .paginator span:hover {
    text-decoration: none; }
  .paginator .paginate-current {
    color: black;
    background-color: #d7d7d7; }
  .paginator .paginate-hits,
  .paginator .paginate-pages {
    color: #888;
    font-weight: normal;
    padding: 11px; }
  .paginator .paginate-pages:hover {
    cursor: pointer;
    background-color: #d7d7d7; }

.compact {
  clear: both; }
  .compact input[type="text"] {
    width: 132px; }
  .compact .key-value {
    margin-right: 10px;
    display: inline-block;
    padding: 0;
    vertical-align: top; }
  .compact .submit {
    display: inline-block;
    vertical-align: bottom; }

/*# sourceMappingURL=table.css.map */


text:
daeElementRef
domFx_stenciltarget::create(DAE& dae)
{
	domFx_stenciltargetRef ref = new domFx_stenciltarget(dae);
	return ref;
}

daeMetaElement *
domFx_stenciltarget::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "fx_stenciltarget" );
	meta->registerClass(domFx_stenciltarget::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	cm = new daeMetaChoice( meta, cm, 0, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "param" );
	mea->setOffset( daeOffsetOf(domFx_stenciltarget,elemParam) );
	mea->setElementType( domParam::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "instance_image" );
	mea->setOffset( daeOffsetOf(domFx_stenciltarget,elemInstance_image) );
	mea->setElementType( domInstance_image::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	cm->setMaxOrdinal( 0 );
	meta->setCMRoot( cm );
	// Ordered list of sub-elements
	meta->addContents(daeOffsetOf(domFx_stenciltarget,_contents));
	meta->addContentsOrder(daeOffsetOf(domFx_stenciltarget,_contentsOrder));

	meta->addCMDataArray(daeOffsetOf(domFx_stenciltarget,_CMData), 1);
	//	Add attribute: index
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "index" );
		ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger"));
		ma->setOffset( daeOffsetOf( domFx_stenciltarget , attrIndex ));
		ma->setContainer( meta );
		ma->setDefaultString( "0");
		ma->setIsRequired( false );

		meta->appendAttribute(ma);
	}

	//	Add attribute: mip
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "mip" );
		ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger"));
		ma->setOffset( daeOffsetOf( domFx_stenciltarget , attrMip ));
		ma->setContainer( meta );
		ma->setDefaultString( "0");
		ma->setIsRequired( false );

		meta->appendAttribute(ma);
	}

	//	Add attribute: face
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "face" );
		ma->setType( dae.getAtomicTypes().get("Image_face"));
		ma->setOffset( daeOffsetOf( domFx_stenciltarget , attrFace ));
		ma->setContainer( meta );
		ma->setDefaultString( "POSITIVE_X");
		ma->setIsRequired( false );

		meta->appendAttribute(ma);
	}

	//	Add attribute: slice
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "slice" );
		ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger"));
		ma->setOffset( daeOffsetOf( domFx_stenciltarget , attrSlice ));
		ma->setContainer( meta );
		ma->setDefaultString( "0");
		ma->setIsRequired( false );

		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domFx_stenciltarget));
	meta->validate();

	return meta;
}


text:
[![Build Status](https://travis-ci.org/jmeakin/algorithm-zoo.svg?branch=master)](https://travis-ci.org/jmeakin/algorithm-zoo)
[![Code Climate](https://codeclimate.com/github/jmeakin/algorithm-zoo/badges/gpa.svg)](https://codeclimate.com/github/jmeakin/algorithm-zoo)

This repo will contain Python 3 implementations of algorithms for Stanfords Introduction to Algorithms course and from
_Introduction to Algorithms_ by Thomas H Cormen, Charles E Leiserson,
Ronald L. Rivest and Clifford Stein, 3rd Edition, 2009 MIT Press.

This is a purely academic exercise for my own personal development.


text:
class JohnJumbo < Formula
  desc "Enhanced version of john, a UNIX password cracker"
  homepage "http://www.openwall.com/john/"

  stable do
    url "http://openwall.com/john/j/john-1.8.0-jumbo-1.tar.xz"
    sha256 "bac93d025995a051f055adbd7ce2f1975676cac6c74a6c7a3ee4cfdd9c160923"
    version "1.8.0"

    # Previously john-jumbo ignored the value of $HOME; fixed
    # upstream.  See
    # https://github.com/magnumripper/JohnTheRipper/issues/1901
    patch do
      url "https://github.com/magnumripper/JohnTheRipper/commit/d29ad8aabaa9726eb08f440001c37611fa072e0c.diff"
      sha256 "29660e4fb33e01730b5650094b872b416b36565501acfca2eb94ee2217525e0c"
    end
  end

  bottle do
    cellar :any
    rebuild 6
    sha256 "6a2460e120f697e09a1ed62a948e5ecd767fc1b24a3f331aa4d59833205e48a4" => :sierra
    sha256 "a87bf02d882413393f3f3759ab0fa6a171438609d101c7c9bc7772fe69e2ab47" => :el_capitan
    sha256 "cf9c82f416a4eb3aad7d4202b21105988d346be8d8df262ea4ca18e683475d32" => :yosemite
    sha256 "b36f66b0469b5c6cde95f780671db5b32e4e4dd7c16c4e7e591043bfdef2b65c" => :mavericks
  end

  option "without-completion", "bash/zsh completion will not be installed"

  depends_on "pkg-config" => :build
  depends_on "openssl"
  depends_on "gmp"

  conflicts_with "john", :because => "both install the same binaries"

  # Patch taken from MacPorts, tells john where to find runtime files.
  # https://github.com/magnumripper/JohnTheRipper/issues/982
  patch :DATA

  # https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/INSTALL#L133-L143
  fails_with :gcc do
    cause "Upstream have a hacky workaround for supporting gcc that we can't use."
  end

  def install
    cd "src" do
      args = []
      if build.bottle?
        args << "--disable-native-tests" << "--disable-native-macro"
      end
      system "./configure", *args
      system "make", "clean"
      system "make", "-s", "CC=#{ENV.cc}"
    end

    # Remove the symlink and install the real file
    rm "README"
    prefix.install "doc/README"
    doc.install Dir["doc/*"]

    # Only symlink the main binary into bin
    (share/"john").install Dir["run/*"]
    bin.install_symlink share/"john/john"

    if build.with? "completion"
      bash_completion.install share/"john/john.bash_completion" => "john.bash"
      zsh_completion.install share/"john/john.zsh_completion" => "_john"
    end

    # Source code defaults to "john.ini", so rename
    mv share/"john/john.conf", share/"john/john.ini"
  end

  test do
    touch "john2.pot"
    (testpath/"test").write "dave:#{`printf secret | /usr/bin/openssl md5`}"
    assert_match(/secret/, shell_output("#{bin}/john --pot=#{testpath}/john2.pot --format=raw-md5 test"))
    assert_match(/secret/, (testpath/"john2.pot").read)
  end
end

__END__
--- a/src/params.h	2012-08-30 13:24:18.000000000 -0500
+++ b/src/params.h	2012-08-30 13:25:13.000000000 -0500
@@ -70,15 +70,15 @@
  * notes above.
  */
 #ifndef JOHN_SYSTEMWIDE
-#define JOHN_SYSTEMWIDE			0
+#define JOHN_SYSTEMWIDE			1
 #endif

 #if JOHN_SYSTEMWIDE
 #ifndef JOHN_SYSTEMWIDE_EXEC /* please refer to the notes above */
-#define JOHN_SYSTEMWIDE_EXEC		"/usr/libexec/john"
+#define JOHN_SYSTEMWIDE_EXEC		"HOMEBREW_PREFIX/share/john"
 #endif
 #ifndef JOHN_SYSTEMWIDE_HOME
-#define JOHN_SYSTEMWIDE_HOME		"/usr/share/john"
+#define JOHN_SYSTEMWIDE_HOME		"HOMEBREW_PREFIX/share/john"
 #endif
 #define JOHN_PRIVATE_HOME		"~/.john"
 #endif


text:
module MnoEnterprise
  class Jpi::V1::Impac::DashboardTemplatesController < Jpi::V1::BaseResourceController
    include MnoEnterprise::Concerns::Controllers::Jpi::V1::Impac::DashboardTemplatesController
  end
end


text:
<?php

/**
 * @apiGroup           RolePermission
 * @apiName            assignUserToRole
 * @api                {post} /v1/roles/assign Assign User to Roles
 * @apiDescription     Assign new roles to user. This endpoint does not sync the user with the
 *                     new roles. It simply assign new role to the user. So make sure
 *                     to never send an already assigned role since it will cause an error.
 *                     To sync (update) all existing roles with the new ones use
 *                     `/roles/sync` endpoint instead.
 *
 * @apiVersion         1.0.0
 * @apiPermission      Authenticated User
 *
 * @apiParam           {Number} user_id User ID
 * @apiParam           {Array} roles_ids Role ID or Array of Roles ID's
 *
 * @apiUse             UserSuccessSingleResponse
 */

$router->post('roles/assign', [
    'as' => 'api_authorization_assign_user_to_role',
    'uses'       => 'Controller@assignUserToRole',
    'middleware' => [
        'auth:api',
    ],
]);


text:
/* Define any benchmark-specific utility methods here, such as setup functions */
/* Note that things defined here can't be used in the benchmark itself */


text:
## [0.0.47](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.46...v0.0.47) (2016-12-12)

### Upgrade Instructions

Delete `main.dev.ts` and `main.prod.ts` and create a `main.ts` file with the following content:

```
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app.module';

platformBrowserDynamic().bootstrapModule(AppModule);
```

Change `ionic_source_map` to `ionic_source_map_type` in package.json if it is overridden.

There were significant improvements/changes to most configs. Please review the changes and make sure any custom configs are up to date.

### Breaking Changes
1. `main.dev.ts` and `main.prod.ts` have been deprecated in favor of `main.ts` with the content of `main.dev.ts`. The content of `main.ts` will be optimized at build time for production builds.
2. `copy.config` and `watch.config` have breaking changes moving to an easier-to-extend configuration style.
3. `copy.config` uses `node-glob` instead of `fs-extra` to do the copy. Migrate from directory/files to globs in any custom configs.
4. `ionic_source_map` configuration has been changed to `ionic_source_map_type`.
5. Source maps now use `source-map` devtool option by default instead of `eval`. Change `ionic_source_map_type` option to return to the faster building `eval`.

### Bug Fixes

* **AoT:** dynamically enable prod mode for AoT builds ([0594803](https://github.com/driftyco/ionic-app-scripts/commit/0594803))
* **AoT:** use in-memory data store instead of .tmp directory for AoT codegen ([93106ff](https://github.com/driftyco/ionic-app-scripts/commit/93106ff))
* **build:** every build should run clean sync and copy async. ([6d4eb6e](https://github.com/driftyco/ionic-app-scripts/commit/6d4eb6e))
* **copy:** Resolve race condition in copy task, move to glob config ([cc99a73](https://github.com/driftyco/ionic-app-scripts/commit/cc99a73))
* **lab:** add lab to files ([f42c980](https://github.com/driftyco/ionic-app-scripts/commit/f42c980))
* **livereload:** livereload now correctly serves cordova plugins on run and emulate. ([a0c3f5d](https://github.com/driftyco/ionic-app-scripts/commit/a0c3f5d))
* **livereload:** on project build all pages connected should reload. ([#513](https://github.com/driftyco/ionic-app-scripts/issues/513)) ([62d6b23](https://github.com/driftyco/ionic-app-scripts/commit/62d6b23))
* **livereload:** use localhost instead of 0.0.0.0 when injecting live reload script ([#450](https://github.com/driftyco/ionic-app-scripts/issues/450)) ([7f8a0c3](https://github.com/driftyco/ionic-app-scripts/commit/7f8a0c3))
* **logging:** remove unnecessary websocket error msg, clean up copy error msg ([1517b06](https://github.com/driftyco/ionic-app-scripts/commit/1517b06))
* **ngc:** simpler AoT error reporting ([1b0f163](https://github.com/driftyco/ionic-app-scripts/commit/1b0f163))
* **serve:** add flag to indicate to serve for a cordova app ([93782e7](https://github.com/driftyco/ionic-app-scripts/commit/93782e7))
* **source-maps:** use detailed source-map as default, fix windows path issue ([19464b3](https://github.com/driftyco/ionic-app-scripts/commit/19464b3))
* **workers:** generate context in worker threads ([af036ec](https://github.com/driftyco/ionic-app-scripts/commit/af036ec))

### Features

* **build:** replace --dev flag with --prod and add flags --aot, --minifyJs, --minifyCss, --optimizeJs ([99922ce](https://github.com/driftyco/ionic-app-scripts/commit/99922ce))
* **bundle:** pre and post bundle hooks ([4835550](https://github.com/driftyco/ionic-app-scripts/commit/4835550))
* **copy:** update copy config to move web workers ([a909fc4](https://github.com/driftyco/ionic-app-scripts/commit/a909fc4))
* **lab:** fresh coat of paint ([edb6f09](https://github.com/driftyco/ionic-app-scripts/commit/edb6f09))
* **replacePathVars:** support interpolation of objects and arrays ([#449](https://github.com/driftyco/ionic-app-scripts/issues/449)) ([e039d46](https://github.com/driftyco/ionic-app-scripts/commit/e039d46))
* all arguments passed should be compared as case insensitive ([085c897](https://github.com/driftyco/ionic-app-scripts/commit/085c897))

## [0.0.46](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.44...v0.0.46) (2016-11-21)

### Bug Fixes

* **build:** better support for saving multiple files at a time ([254bb6c](https://github.com/driftyco/ionic-app-scripts/commit/254bb6c))
* **copy:** ionicons copied from ionicons ([69f89a8](https://github.com/driftyco/ionic-app-scripts/commit/69f89a8))
* **errors:** skip HTTP errors ([5906167](https://github.com/driftyco/ionic-app-scripts/commit/5906167))
* **proxies:** Wrong parameter in Logger.info, in setupProxies function causing proxies not to load ([#395](https://github.com/driftyco/ionic-app-scripts/issues/395)) ([316b1de](https://github.com/driftyco/ionic-app-scripts/commit/316b1de))
* **typescript:** lock typescript version to 2.0.x for now due to build error with 2.1.x ([ef7203b](https://github.com/driftyco/ionic-app-scripts/commit/ef7203b))
* **webpack:** fix path resolution ([97c23f9](https://github.com/driftyco/ionic-app-scripts/commit/97c23f9))
* **webpack:** reference json-loader to account for webpack breaking change ([d6fe709](https://github.com/driftyco/ionic-app-scripts/commit/d6fe709))
* **webpack:** resolve modules to rootDir ([#365](https://github.com/driftyco/ionic-app-scripts/issues/365)) ([64eb845](https://github.com/driftyco/ionic-app-scripts/commit/64eb845))

### Features

* **options:** allow users to pass their own cleanCss Options ([#377](https://github.com/driftyco/ionic-app-scripts/issues/377)) ([20df6d4](https://github.com/driftyco/ionic-app-scripts/commit/20df6d4))

## [0.0.45](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.44...v0.0.45) (2016-11-17)

### Bug Fixes

* **errors:** runtime error immediately, selectable stack ([70f68da](https://github.com/driftyco/ionic-app-scripts/commit/70f68da))
* **inline-templates:** update bundle and memory file representation on template change ([11a949d](https://github.com/driftyco/ionic-app-scripts/commit/11a949d))
* **rollup:** invalidate cache on template change ([80c0eb6](https://github.com/driftyco/ionic-app-scripts/commit/80c0eb6))
* **webpack:** invalidate cache by use of timestamps ([4d6bbd5](https://github.com/driftyco/ionic-app-scripts/commit/4d6bbd5))

### Features

* **run-build-update:** handle linked npm modules ([#375](https://github.com/driftyco/ionic-app-scripts/issues/375)) ([0f113c8](https://github.com/driftyco/ionic-app-scripts/commit/0f113c8))
* **serve:** add '/ionic-lab' as an alias for the lab html file path. ([c319404](https://github.com/driftyco/ionic-app-scripts/commit/c319404))

## [0.0.44](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.43...v0.0.44) (2016-11-15)

### Bug Fixes

* **debug:** cmd+shift+8 to show debug menu ([a26d729](https://github.com/driftyco/ionic-app-scripts/commit/a26d729))
* **error:** (cmd/ctrl)+8 for debug menu ([89550af](https://github.com/driftyco/ionic-app-scripts/commit/89550af))
* **error:** add header padding for cordova iOS ([5c4c547](https://github.com/driftyco/ionic-app-scripts/commit/5c4c547))
* **error:** apply correct css for runtime error close ([81f1d75](https://github.com/driftyco/ionic-app-scripts/commit/81f1d75))
* **error:** fix content scrolling ([3b82465](https://github.com/driftyco/ionic-app-scripts/commit/3b82465))
* **error:** reload immediately after js/html update ([07f918e](https://github.com/driftyco/ionic-app-scripts/commit/07f918e))
* **error:** safari css fixes ([7c2fb59](https://github.com/driftyco/ionic-app-scripts/commit/7c2fb59))
* **serve:** correct paths so that --lab works ([1d99a98](https://github.com/driftyco/ionic-app-scripts/commit/1d99a98))
* **serve:** open browser to localhost ([14275c7](https://github.com/driftyco/ionic-app-scripts/commit/14275c7))
* **transpile:** normalize and resolve paths always for OS independence ([ca6c889](https://github.com/driftyco/ionic-app-scripts/commit/ca6c889))
* **watch:** fallback for when chokidar watch ready/error don't fire (happens on windows when file is ([519cd7f](https://github.com/driftyco/ionic-app-scripts/commit/519cd7f)), closes [#282](https://github.com/driftyco/ionic-app-scripts/issues/282)
* **watch:** watch now ignores Mac OS meta data files ([02d0b8d](https://github.com/driftyco/ionic-app-scripts/commit/02d0b8d)), closes [#331](https://github.com/driftyco/ionic-app-scripts/issues/331)
* **webpack:** source maps link to original src for ide debugging ([39edd2e](https://github.com/driftyco/ionic-app-scripts/commit/39edd2e))

### Features

* **debug:** debug menu options ([53d6e30](https://github.com/driftyco/ionic-app-scripts/commit/53d6e30))
* **debug:** shake device to show debug menu ([770f4e3](https://github.com/driftyco/ionic-app-scripts/commit/770f4e3))
* **error:** client runtime error reporting ([fc40b92](https://github.com/driftyco/ionic-app-scripts/commit/fc40b92))
* **error:** syntax and error highlighting ([8836310](https://github.com/driftyco/ionic-app-scripts/commit/8836310))

## [0.0.43](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.42...v0.0.43) (2016-11-10)

### Bug Fixes

* **rollup:** removing rollup metadata prefix for paths ([350a288](https://github.com/driftyco/ionic-app-scripts/commit/350a288))
* **watch:** remove shorthand arg for watch ([0685c0b](https://github.com/driftyco/ionic-app-scripts/commit/0685c0b)), closes [#290](https://github.com/driftyco/ionic-app-scripts/issues/290)
* **webpack:** typo in import, close [#326](https://github.com/driftyco/ionic-app-scripts/issues/326) ([#341](https://github.com/driftyco/ionic-app-scripts/issues/341)) ([6b89fa2](https://github.com/driftyco/ionic-app-scripts/commit/6b89fa2))

## [0.0.42](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.41...v0.0.42) (2016-11-09)

## Upgrade Steps
To use this version of `@ionic/app-scripts`, follow these steps to upgrade:

1. Install the latest version of the ionic cli

  ```
    npm install ionic@latest -g
  ```

  Note: sudo may be required depending on your workstation set-up

2. Update the project's `package.json` file's `script` section to look like this:

  ```
  ...
  "scripts" : {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  }
  ...
  ```

  Note: This is removing several deprecated Ionic scripts. If you have any of your own custom scripts, don't remove them.

3. Install the latest version of `@ionic/app-scripts`

  ```
  npm install @ionic/app-scripts@latest --save-dev
  ```

### Bug Fixes

* **bundling:** execute bundle updates if full bundle has completed at least once ([fbe56dc](https://github.com/driftyco/ionic-app-scripts/commit/fbe56dc))
* **sass:** remove broken sass caching ([91faf0b](https://github.com/driftyco/ionic-app-scripts/commit/91faf0b))

### Features

* **error:** use datauri for favicon build status ([892cf4a](https://github.com/driftyco/ionic-app-scripts/commit/892cf4a))
* **errors:** overlay build errors during development ([87f7648](https://github.com/driftyco/ionic-app-scripts/commit/87f7648))

## [0.0.41](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.40...v0.0.41) (2016-11-07)

### Bug Fixes

* **webpack:** use source-maps instead of eval for prod builds ([fdd86be](https://github.com/driftyco/ionic-app-scripts/commit/fdd86be))

## 0.0.40 (2016-11-07)

### Breaking Changes

`ionic_source_map` variable is now used to drive the `devtool` (sourcemap) value for webpack. It now defaults to `eval` for faster builds. Set it to `source-map` for `typescript` sourcemaps.

### Bug Fixes
* **sourcemaps:** fix source maps for all files ([066de6d](https://github.com/driftyco/ionic-app-scripts/commit/066de6d))
* **sourcemaps:** webpack .ts sourcemaps ([bfca1be](https://github.com/driftyco/ionic-app-scripts/commit/bfca1be))
* **webpack:** modify config to use IONIC_APP_SCRIPTS_DIR variable ([2b7c606](https://github.com/driftyco/ionic-app-scripts/commit/2b7c606))

### Features
* **events:** emit bundler events ([8d73da9](https://github.com/driftyco/ionic-app-scripts/commit/8d73da9))
* **exports:** add templateUpdate and fullBuildUpdate ([a31897d](https://github.com/driftyco/ionic-app-scripts/commit/a31897d))
* **webpack source maps:** make it easy to configure source map type ([03565b7](https://github.com/driftyco/ionic-app-scripts/commit/03565b7))

### Performance Improvements

* **webpack:** speed up webpack build by not using file-system and watches ([23ad195](https://github.com/driftyco/ionic-app-scripts/commit/23ad195))

# 0.0.39 (2016-10-31)
* Switch default bundler to Webpack

# 0.0.36 (2016-10-15)

* Fix handling multiple async template updates

# 0.0.35 (2016-10-15)

* Fix resolving index files correctly
* Fix template rebuilds for multiple templates in one file
* Fix ability to watchers to ignore paths

# 0.0.34 (2016-10-15)

* Fix silently failed bundles
* Fix template path resolving issues

# 0.0.33 (2016-10-14)

* Improve build times for template changes
* Fix bundle updates on template changes

# 0.0.32 (2016-10-14)

* Fix Windows entry path normalization

# 0.0.31 (2016-10-13)

* Add ability use multiple processor cores for various subtasks
* Use typescript `createProgram` to transpile entire app
* Add syntax highlighting and colors to typescript, sass and tslint errors
* Improved error messages for typescript errors
* `clean` task only cleans out the `www/build/` directory rather than all of `www/`
* Add task to copy `src/service-worker.js` to `www/service-worker.js`
* Add task to copy `src/manifest.json` to `www/manifest.json`

# 0.0.30 (2016-10-06)

* Fix JS source maps
* Fix template inlining

# 0.0.29 (2016-10-05)

* Addressed memory usage error
* Dev builds no longer use the `.tmp` directory
* Dev build entry files should be the source `main.dev.ts` file
* Custom rollup configs should remove the `ngTemplate()` plugin


text:
<ion-view hide-nav-bar="false" view-title="Add Medication">
    <ion-nav-bar class="bar-orange" align-title="center">
        <ion-nav-buttons side="left" >
            <button ui-sref="{{ medications_add.backState }}" class="button back-button button-clear header-item">

            </button>
        </ion-nav-buttons>
    </ion-nav-bar>

    <ion-content class="orange-bg" overflow-scroll="true">

            <form class="orange-form" name="medicationsAdd">

Name is required

                        <input type="text" data-ng-model="medications_add.medication.name" name="name" placeholder="Name" required />

                        <input type="text" data-ng-model="medications_add.medication.brand" name="phone"
                               placeholder="Brand"/>

            </form>

                <button type="submit" class="button button-full button-orange"
                        ng-click="medications_add.schedule(medicationsAdd); medication.medication=medications_add.medication">Schedule</button>

    </ion-content>
</ion-view>


text:
<?php

namespace Drupal\Tests\user\Unit\Migrate;

use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;

/**
 * Tests profile_field source plugin.
 *
 * @group user
 */
class ProfileFieldTest extends MigrateSqlSourceTestCase {

  const PLUGIN_CLASS = 'Drupal\user\Plugin\migrate\source\ProfileField';

  protected $migrationConfiguration = [
    'id' => 'test_profile_fields',
    'source' => [
      'plugin' => 'd6_profile_field',
    ],
  ];

  protected $expectedResults = [
    [
      'fid' => 1,
      'title' => 'First name',
      'name' => 'profile_first_name',
      'explanation' => 'First name user',
      'category' => 'profile',
      'page' => '',
      'type' => 'textfield',
      'weight' => 0,
      'required' => 1,
      'register' => 0,
      'visibility' => 2,
      'autocomplete' => 0,
      'options' => [],
    ],
    [
      'fid' => 2,
      'title' => 'Last name',
      'name' => 'profile_last_name',
      'explanation' => 'Last name user',
      'category' => 'profile',
      'page' => '',
      'type' => 'textfield',
      'weight' => 0,
      'required' => 0,
      'register' => 0,
      'visibility' => 2,
      'autocomplete' => 0,
      'options' => [],
    ],
    [
      'fid' => 3,
      'title' => 'Policy',
      'name' => 'profile_policy',
      'explanation' => 'A checkbox that say if you accept policy of website',
      'category' => 'profile',
      'page' => '',
      'type' => 'checkbox',
      'weight' => 0,
      'required' => 1,
      'register' => 1,
      'visibility' => 2,
      'autocomplete' => 0,
      'options' => [],
    ],
  ];

  /**
   * Prepopulate contents with results.
   */
  protected function setUp() {
    $this->databaseContents['profile_fields'] = $this->expectedResults;
    foreach ($this->databaseContents['profile_fields'] as &$row) {
      $row['options'] = serialize([]);
    }
    parent::setUp();
  }

}