text:
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Categoria

              <?php foreach($categorias as $categoriaNivel1):?>

                            <a class = "collapsed"  data-toggle="collapse" data-parent="#accordion" href="#cat-<?php echo $categoriaNivel1->idCategoriaBI?>" aria-expanded="false" aria-controls="collapseOne">
                               <?php echo $categoriaNivel1->nombreCategoria ?>

                    <div id="cat-<?php echo $categoriaNivel1->idCategoriaBI ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">

                                    <div class="panel-group" id="accordion-<?php echo $categoriaNivel1->idCategoriaBI?>" role="tablist" aria-multiselectable="true" style="margin-top:20px;">
                                        <?php foreach($categoriaNivel1->listCategoriasHijas as $categoriaNivel2):?>

                                                        <a class = "collapsed"  data-toggle="collapse" data-parent="#accordion-<?php echo $categoriaNivel2->idCategoriaBI?>" href="#cat-<?php echo $categoriaNivel2->idCategoriaBI ?>" aria-expanded="false" aria-controls="collapseOne">
                                                           <?php echo $categoriaNivel2->nombreCategoria ?>

                                                <div id="cat-<?php echo $categoriaNivel2->idCategoriaBI ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">

                                                             <div class="panel-group" id="accordion-<?php echo $categoriaNivel2->idCategoriaBI?>" role="tablist" aria-multiselectable="true" style="margin-top:20px;">
                                                                    <?php foreach($categoriaNivel2->listCategoriasHijasHijas as $categoriaNivel3):?>

                                                                                <a class = "collapsed"  data-toggle="collapse" data-parent="#accordion-<?php echo $categoriaNivel3->idCategoriaBI?>" href="#cat-<?php echo $categoriaNivel3->idCategoriaBI ?>" aria-expanded="false" aria-controls="collapseOne">
                                                                                <?php echo $categoriaNivel3->nombreCategoria ?>

                                                                                <div id='btn-<?php echo $categoriaNivel3->idCategoriaBI?>'>
                                                                                <?php if(count($categoriaNivel3->listCategoriasTiendaCategoria) > 0):?>
                                                                                Añadido
                                                                                <?php else:?>
                                                                                <a class="btn btn-xs btn-<?php echo Yii::app()->params->callcenter['estadoCompra']['colorClass'][3] ?>" href="#" data-categoria='<?php echo $idCategoriaTienda ?>' data-categoria-bi='<?php echo $categoriaNivel3->idCategoriaBI ?>' data-dispositivo='<?php echo $dispositivo ?>' data-role='add-categoria-bi'> Añadir
                                                                                <?php endif;?>

                                                                    <?php endforeach;?>

                                        <?php endforeach;?>

          <?php endforeach ?>

            <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>


text:
require 'spec_helper'

# Specs in this file have access to a helper object that includes
# the MapHelper. For example:
#
# describe MapHelper do
#   describe "string concat" do
#     it "concats two strings with spaces" do
#       expect(helper.concat_strings("this","that")).to eq("this that")
#     end
#   end
# end
describe MapHelper do
  pending "add some examples to (or delete) #{__FILE__}"
end

redpajama_set_name: RedPajamaGithub


text:
Ad Exchange Buyer API II . bidders . filterSets . filteredBidRequests

Instance Methods

  close()

Close httplib2 connections.

  list(filterSetName, pageSize=None, pageToken=None, x__xgafv=None)

List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.

  list_next()

Retrieves the next page of results.

Method Details

    close()

Close httplib2 connections.

    list(filterSetName, pageSize=None, pageToken=None, x__xgafv=None)

List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.

Args:
  filterSetName: string, Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc` (required)
  pageSize: integer, Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.
  pageToken: string, A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidRequestsResponse.nextPageToken returned from the previous call to the filteredBidRequests.list method.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for listing all reasons that bid requests were filtered and not sent to the buyer.
  "calloutStatusRows": [ # List of rows, with counts of filtered bid requests aggregated by callout status.
    { # The number of impressions with the specified dimension values where the corresponding bid request or bid response was not successful, as described by the specified callout status.
      "calloutStatusId": 42, # The ID of the callout status. See [callout-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes).
      "impressionCount": { # A metric value, with an expected value and a variance; represents a count that may be either exact or estimated (for example, when sampled). # The number of impressions for which there was a bid request or bid response with the specified callout status.
        "value": "A String", # The expected value of the metric.
        "variance": "A String", # The variance (for example, square of the standard deviation) of the metric value. If value is exact, variance is 0. Can be used to calculate margin of error as a percentage of value, using the following formula, where Z is the standard constant that depends on the preferred size of the confidence interval (for example, for 90% confidence interval, use Z = 1.645): marginOfError = 100 * Z * sqrt(variance) / value
      },
      "rowDimensions": { # A response may include multiple rows, breaking down along various dimensions. Encapsulates the values of all dimensions for a given row. # The values of all dimensions associated with metric values in this row.
        "publisherIdentifier": "A String", # The publisher identifier for this row, if a breakdown by [BreakdownDimension.PUBLISHER_IDENTIFIER](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.filterSets#FilterSet.BreakdownDimension) was requested.
        "timeInterval": { # An interval of time, with an absolute start and end. # The time interval that this row represents.
          "endTime": "A String", # The timestamp marking the end of the range (exclusive) for which data is included.
          "startTime": "A String", # The timestamp marking the start of the range (inclusive) for which data is included.
        },
      },
    },
  ],
  "nextPageToken": "A String", # A token to retrieve the next page of results. Pass this value in the ListFilteredBidRequestsRequest.pageToken field in the subsequent call to the filteredBidRequests.list method to retrieve the next page of results.
}

    list_next()

Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.


text:
using System;
using System.Diagnostics;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using System.Web;
using System.Web.Hosting;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using T4MVC;
namespace Mn.NewsCms.Web.Controllers
{
    public partial class SharedController
    {
        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        protected SharedController(Dummy d) { }

        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        protected RedirectToRouteResult RedirectToAction(ActionResult result)
        {
            var callInfo = result.GetT4MVCResult();
            return RedirectToRoute(callInfo.RouteValueDictionary);
        }

        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        protected RedirectToRouteResult RedirectToAction(Task<ActionResult> taskResult)
        {
            return RedirectToAction(taskResult.Result);
        }

        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        protected RedirectToRouteResult RedirectToActionPermanent(ActionResult result)
        {
            var callInfo = result.GetT4MVCResult();
            return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
        }

        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        protected RedirectToRouteResult RedirectToActionPermanent(Task<ActionResult> taskResult)
        {
            return RedirectToActionPermanent(taskResult.Result);
        }

        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        public SharedController Actions { get { return MVC.Shared; } }
        [GeneratedCode("T4MVC", "2.0")]
        public readonly string Area = "";
        [GeneratedCode("T4MVC", "2.0")]
        public readonly string Name = "Shared";
        [GeneratedCode("T4MVC", "2.0")]
        public const string NameConst = "Shared";

        static readonly ActionNamesClass s_actions = new ActionNamesClass();
        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        public ActionNamesClass ActionNames { get { return s_actions; } }
        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        public class ActionNamesClass
        {
            public readonly string AnalysisScripts = "AnalysisScripts";
            public readonly string ShareInSocialScripts = "ShareInSocialScripts";
            public readonly string TopMenu = "TopMenu";
            public readonly string TopMenuMember = "TopMenuMember";
            public readonly string HeaderMenu = "HeaderMenu";
            public readonly string Footer = "Footer";
            public readonly string FooterMenu = "FooterMenu";
        }

        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        public class ActionNameConstants
        {
            public const string AnalysisScripts = "AnalysisScripts";
            public const string ShareInSocialScripts = "ShareInSocialScripts";
            public const string TopMenu = "TopMenu";
            public const string TopMenuMember = "TopMenuMember";
            public const string HeaderMenu = "HeaderMenu";
            public const string Footer = "Footer";
            public const string FooterMenu = "FooterMenu";
        }

        static readonly ViewsClass s_views = new ViewsClass();
        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        public ViewsClass Views { get { return s_views; } }
        [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
        public class ViewsClass
        {
            static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
            public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
            public class _ViewNamesClass
            {
                public readonly string _FeedItems_Sekuzan = "_FeedItems.Sekuzan";
                public readonly string _FeedItems_Tazeyab = "_FeedItems.Tazeyab";
                public readonly string _FeedItemsRemote = "_FeedItemsRemote";
                public readonly string _Items = "_Items";
                public readonly string _Layout_Sekuzan = "_Layout.Sekuzan";
                public readonly string _Layout_Tazeyab = "_Layout.Tazeyab";
                public readonly string _LayoutFeedItems_Sekuzan = "_LayoutFeedItems.Sekuzan";
                public readonly string _LayoutFeedItems_Tazeyab = "_LayoutFeedItems.Tazeyab";
                public readonly string _LayoutStandard_Sekuzan = "_LayoutStandard.Sekuzan";
                public readonly string _LayoutStandard_Tazeyab = "_LayoutStandard.Tazeyab";
                public readonly string _LogOnPartial = "_LogOnPartial";
                public readonly string _Script = "_Script";
                public readonly string _SearchBox = "_SearchBox";
                public readonly string _Sponser = "_Sponser";
                public readonly string _UserIndex = "_UserIndex";
                public readonly string BaseLayout_Sekuzan = "BaseLayout.Sekuzan";
                public readonly string BaseLayout_Tazeyab = "BaseLayout.Tazeyab";
            }
            public readonly string _FeedItems_Sekuzan = "~/Views/Shared/_FeedItems.Sekuzan.cshtml";
            public readonly string _FeedItems_Tazeyab = "~/Views/Shared/_FeedItems.Tazeyab.cshtml";
            public readonly string _FeedItemsRemote = "~/Views/Shared/_FeedItemsRemote.cshtml";
            public readonly string _Items = "~/Views/Shared/_Items.cshtml";
            public readonly string _Layout_Sekuzan = "~/Views/Shared/_Layout.Sekuzan.cshtml";
            public readonly string _Layout_Tazeyab = "~/Views/Shared/_Layout.Tazeyab.cshtml";
            public readonly string _LayoutFeedItems_Sekuzan = "~/Views/Shared/_LayoutFeedItems.Sekuzan.cshtml";
            public readonly string _LayoutFeedItems_Tazeyab = "~/Views/Shared/_LayoutFeedItems.Tazeyab.cshtml";
            public readonly string _LayoutStandard_Sekuzan = "~/Views/Shared/_LayoutStandard.Sekuzan.cshtml";
            public readonly string _LayoutStandard_Tazeyab = "~/Views/Shared/_LayoutStandard.Tazeyab.cshtml";
            public readonly string _LogOnPartial = "~/Views/Shared/_LogOnPartial.cshtml";
            public readonly string _Script = "~/Views/Shared/_Script.cshtml";
            public readonly string _SearchBox = "~/Views/Shared/_SearchBox.cshtml";
            public readonly string _Sponser = "~/Views/Shared/_Sponser.cshtml";
            public readonly string _UserIndex = "~/Views/Shared/_UserIndex.cshtml";
            public readonly string BaseLayout_Sekuzan = "~/Views/Shared/BaseLayout.Sekuzan.cshtml";
            public readonly string BaseLayout_Tazeyab = "~/Views/Shared/BaseLayout.Tazeyab.cshtml";
            static readonly _EditorTemplatesClass s_EditorTemplates = new _EditorTemplatesClass();
            public _EditorTemplatesClass EditorTemplates { get { return s_EditorTemplates; } }
            [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
            public partial class _EditorTemplatesClass
            {
                public readonly string _Flag = "_Flag";
                public readonly string _PageRank = "_PageRank";
                public readonly string _ShowContentType = "_ShowContentType";
                public readonly string _TagDropDown = "_TagDropDown";
            }
            static readonly _NavigationClass s_Navigation = new _NavigationClass();
            public _NavigationClass Navigation { get { return s_Navigation; } }
            [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
            public partial class _NavigationClass
            {
                static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
                public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
                public class _ViewNamesClass
                {
                    public readonly string _Footer = "_Footer";
                    public readonly string _FooterMenu = "_FooterMenu";
                    public readonly string _HeaderMenu_Sekuzan = "_HeaderMenu.Sekuzan";
                    public readonly string _SocialMenu = "_SocialMenu";
                    public readonly string _TopMenu_Sekuzan = "_TopMenu.Sekuzan";
                    public readonly string _TopMenu_Tazeyab = "_TopMenu.Tazeyab";
                    public readonly string _TopMenuMember_Tazeyab = "_TopMenuMember.Tazeyab";
                }
                public readonly string _Footer = "~/Views/Shared/Navigation/_Footer.cshtml";
                public readonly string _FooterMenu = "~/Views/Shared/Navigation/_FooterMenu.cshtml";
                public readonly string _HeaderMenu_Sekuzan = "~/Views/Shared/Navigation/_HeaderMenu.Sekuzan.cshtml";
                public readonly string _SocialMenu = "~/Views/Shared/Navigation/_SocialMenu.cshtml";
                public readonly string _TopMenu_Sekuzan = "~/Views/Shared/Navigation/_TopMenu.Sekuzan.cshtml";
                public readonly string _TopMenu_Tazeyab = "~/Views/Shared/Navigation/_TopMenu.Tazeyab.cshtml";
                public readonly string _TopMenuMember_Tazeyab = "~/Views/Shared/Navigation/_TopMenuMember.Tazeyab.cshtml";
            }
        }
    }

    [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
    public partial class T4MVC_SharedController : Mn.NewsCms.Web.Controllers.SharedController
    {
        public T4MVC_SharedController() : base(Dummy.Instance) { }

        [NonAction]
        partial void AnalysisScriptsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult AnalysisScripts()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AnalysisScripts);
            AnalysisScriptsOverride(callInfo);
            return callInfo;
        }

        [NonAction]
        partial void ShareInSocialScriptsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult ShareInSocialScripts()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.ShareInSocialScripts);
            ShareInSocialScriptsOverride(callInfo);
            return callInfo;
        }

        [NonAction]
        partial void TopMenuOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult TopMenu()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.TopMenu);
            TopMenuOverride(callInfo);
            return callInfo;
        }

        [NonAction]
        partial void TopMenuMemberOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult TopMenuMember()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.TopMenuMember);
            TopMenuMemberOverride(callInfo);
            return callInfo;
        }

        [NonAction]
        partial void HeaderMenuOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult HeaderMenu()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.HeaderMenu);
            HeaderMenuOverride(callInfo);
            return callInfo;
        }

        [NonAction]
        partial void FooterOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult Footer()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Footer);
            FooterOverride(callInfo);
            return callInfo;
        }

        [NonAction]
        partial void FooterMenuOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);

        [NonAction]
        public override System.Web.Mvc.ActionResult FooterMenu()
        {
            var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.FooterMenu);
            FooterMenuOverride(callInfo);
            return callInfo;
        }

    }
}

#endregion T4MVC
#pragma warning restore 1591, 3008, 3009, 0108, 0114


text:
package brooklyn.rest.domain;

import java.net.URI;
import java.util.Map;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import com.google.common.base.Objects;
import com.google.common.collect.ImmutableMap;

/** variant of Catalog*ItemDto objects for JS/JSON serialization;
 * see also, subclasses */
public class CatalogItemSummary {

    private final String id;

    // TODO too many types, see in CatalogItem
    private final String type;
    private final String javaType;
    private final String registeredType;

    private final String name;
    @JsonSerialize(include=Inclusion.NON_EMPTY)
    private final String description;
    @JsonSerialize(include=Inclusion.NON_EMPTY)
    private final String iconUrl;
    private final String planYaml;

    private final Map<String, URI> links;

    public CatalogItemSummary(
            @JsonProperty("id") String id,
            @JsonProperty("name") String name,
            @JsonProperty("registeredType") String registeredType,
            @JsonProperty("javaType") String javaType,
            @JsonProperty("type") String highLevelType,
            @JsonProperty("planYaml") String planYaml,
            @JsonProperty("description") String description,
            @JsonProperty("iconUrl") String iconUrl,
            @JsonProperty("links") Map<String, URI> links
        ) {
        this.id = id;
        this.name = name;
        this.javaType = javaType;
        this.registeredType = registeredType;
        this.type = highLevelType;
        this.planYaml = planYaml;
        this.description = description;
        this.iconUrl = iconUrl;
        this.links = ImmutableMap.copyOf(links);
    }

    public String getId() {
        return id;
    }

    public String getType() {
        return type;
    }

    public String getJavaType() {
        return javaType;
    }

    public String getRegisteredType() {
        return registeredType;
    }

    public String getPlanYaml() {
        return planYaml;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public Map<String, URI> getLinks() {
        return links;
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(this).add("id", id).toString();
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id, name, type);
    }

    @Override
    public boolean equals(Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }

}


text:
package org.lable.oss.dynamicconfig.core;

import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.CombinedConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.tree.OverrideCombiner;
import org.lable.oss.dynamicconfig.core.ConfigurationComposition.ConfigReference;
import org.lable.oss.dynamicconfig.core.ConfigurationComposition.ConfigState;
import org.lable.oss.dynamicconfig.core.commonsconfiguration.ConcurrentConfiguration;
import org.lable.oss.dynamicconfig.core.spi.ConfigurationSource;
import org.lable.oss.dynamicconfig.core.spi.HierarchicalConfigurationDeserializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.InputStream;
import java.util.*;

/**
 * Manages a configuration tree provided by implementations of {@link ConfigurationSource} and
 * {@link HierarchicalConfigurationDeserializer}. Provides methods that can bootstrap configuration
 * providers based on set system properties.
 */
public class ConfigurationManager {
    private static final Logger logger = LoggerFactory.getLogger(ConfigurationManager.class);

    /**
     * Common prefix used for all system properties that concern this library.
     */
    public final static String LIBRARY_PREFIX = "org.lable.oss.dynamicconfig";

    /**
     * Name of the property that holds the application name.
     */
    public static final String APPNAME_PROPERTY = "appname";

    /**
     * Name of the property that holds the name of the root configuration resource.
     */
    public static final String ROOTCONFIG_PROPERTY = "rootconfig";

    static final String[] COMMON_PROPERTIES = {APPNAME_PROPERTY, ROOTCONFIG_PROPERTY};

    static ConfigurationComposition composition;

    /**
     * Use system properties to initialize a configuration instance.
     *
     * @param deserializer Deserializer used to interpret the language the configuration file is written in.
     * @return Thread-safe configuration instance.
     * @throws ConfigurationException Thrown when the required system properties are not set.
     */
    public static InitializedConfiguration configureFromProperties(HierarchicalConfigurationDeserializer deserializer)
            throws ConfigurationException {
        return configureFromProperties(null, deserializer);
    }

    /**
     * Use system properties to initialize a configuration instance. The source-type will be read from the system
     * property {@code org.lable.oss.dynamicconfig.type}.
     *
     * @param defaults     Default configuration. Any keys not overridden by the dynamic configuration will remain as
     *                     set here.
     * @param deserializer Deserializer used to interpret the language the configuration file is written in.
     * @return Thread-safe configuration instance.
     * @throws ConfigurationException Thrown when the required system properties are not set.
     */
    public static InitializedConfiguration configureFromProperties(HierarchicalConfiguration defaults,
                                                                   HierarchicalConfigurationDeserializer deserializer)
            throws ConfigurationException {
        return configureFromProperties(null, defaults, deserializer);
    }

    /**
     * Use system properties to initialize a configuration instance.
     *
     * @param sourceType   Name of the configuration source type.
     * @param defaults     Default configuration. Any keys not overridden by the dynamic configuration will remain as
     *                     set here.
     * @param deserializer Deserializer used to interpret the language the configuration file is written in.
     * @return Thread-safe configuration instance.
     * @throws ConfigurationException Thrown when the required system properties are not set.
     */
    public static InitializedConfiguration configureFromProperties(String sourceType,
                                                                   HierarchicalConfiguration defaults,
                                                                   HierarchicalConfigurationDeserializer deserializer)
            throws ConfigurationException {

        if (sourceType == null) {
            sourceType = System.getProperty(LIBRARY_PREFIX + ".type");
            if (sourceType == null) {
                throw new ConfigurationException("System property " + LIBRARY_PREFIX + ".type is not set.");
            }
        }

        ConfigurationSource desiredSource = sourceFromString(sourceType);
        Configuration sourceConfiguration = gatherPropertiesFor(desiredSource, deserializer);

        return initialize(desiredSource, sourceConfiguration, deserializer, defaults);
    }

    /**
     * Initialize a configuration instance using these settings.
     *
     * @param rootConfig          Path or name of the root configuration resource.
     * @param appName             Application name.
     * @param configurationSource Configuration source.
     * @param deserializer        Deserializer.
     * @param sourceConfiguration Configuration for the {@code configurationSource} passed.
     * @param defaults            Default configuration (optional).
     * @return Thread-safe configuration instance.
     * @throws ConfigurationException Thrown when the required system properties are not set.
     */
    public static InitializedConfiguration fromTheseSettings(String rootConfig,
                                                  String appName,
                                                  ConfigurationSource configurationSource,
                                                  HierarchicalConfigurationDeserializer deserializer,
                                                  Configuration sourceConfiguration,
                                                  HierarchicalConfiguration defaults) throws ConfigurationException {

        sourceConfiguration.setProperty(ROOTCONFIG_PROPERTY, rootConfig);
        sourceConfiguration.setProperty(APPNAME_PROPERTY, appName);

        return initialize(configurationSource, sourceConfiguration, deserializer, defaults);
    }

    static InitializedConfiguration initialize(ConfigurationSource desiredSource,
                                               Configuration sourceConfiguration,
                                               HierarchicalConfigurationDeserializer deserializer,
                                               HierarchicalConfiguration defaults) throws ConfigurationException {

        if (defaults == null) defaults = new HierarchicalConfiguration();
        String rootConfigName = sourceConfiguration.getString(ROOTCONFIG_PROPERTY);

        final CombinedConfiguration allConfig = new CombinedConfiguration(new OverrideCombiner());
        final ConcurrentConfiguration concurrentConfiguration = new ConcurrentConfiguration(allConfig, desiredSource);
        composition = new ConfigurationComposition(defaults);

        logger.info("Root config: {}.", rootConfigName);
        desiredSource.configure(
                sourceConfiguration,
                defaults,
                (name, inputStream) -> {
                    logger.info("New runtime configuration received for configuration part {}.", name);
                    composition.markReferenceAsNeedsLoading(name);
                    load(name, desiredSource, deserializer, composition);
                    concurrentConfiguration.withConfiguration(composition::assembleConfigTree);
                    composition
                            .getReferences(ref -> ref.getConfigState() == ConfigState.ORPHANED)
                            .forEach(ref -> desiredSource.stopListening(ref.getName()));
                    composition.getRidOfOrphans();
                });
        String normalizedConfigName = desiredSource.normalizeRootConfigName(rootConfigName);

        ConfigReference rootReference = load(normalizedConfigName, desiredSource, deserializer, composition);
        composition.setRootReference(rootReference);

        concurrentConfiguration.withConfiguration(composition::assembleConfigTree);

        return new InitializedConfiguration(concurrentConfiguration, desiredSource);
    }

    static ConfigurationSource sourceFromString(String desiredSourceName) throws ConfigurationException {
        ServiceLoader<ConfigurationSource> loader = ServiceLoader.load(ConfigurationSource.class);
        for (ConfigurationSource source : loader) {
            if (source.name().equals(desiredSourceName)) {
                return source;
            }
        }

        throw new ConfigurationException("Could not find a ConfigurationSource with name " + desiredSourceName);
    }

    static ConfigReference load(String name,
                                ConfigurationSource desiredSource,
                                HierarchicalConfigurationDeserializer deserializer,
                                ConfigurationComposition composition) {

        // Don't try to load config parts that are already loaded.
        if (composition.hasMatchingReference(name, ref -> ref.getConfigState() != ConfigState.NEEDS_LOADING)) {
            return composition.getReference(name);
        }

        ConfigurationResult result;
        try {
            InputStream is = desiredSource.load(name);
            result = deserializer.deserialize(is);
        } catch (ConfigurationException e) {
            logger.error("Failed to (re)load (part of) configuration: {}.", name);
            return composition.markReferenceAsFailedToLoad(name);
        }

        desiredSource.listen(name);
        List<IncludeReference> includeReferences = result.getIncludeReferences();
        makeReferencesAbsolute(name, includeReferences);

        logger.info("Configuration part (re)loaded ({}).", name);
        ConfigReference reference = composition.updateReferences(name, includeReferences);
        composition.setConfigurationOnReference(reference, result.getConfiguration());

        // Recurse into every reference that was introduced here, but hasn't been loaded yet.
        composition
                .getReferences(ref -> ref.getConfigState() == ConfigState.NEEDS_LOADING)
                .forEach(ref -> load(ref.getName(), desiredSource, deserializer, composition));

        return reference;
    }

    /**
     * Make all include references 'absolute' for use in {@link ConfigurationComposition}.
     *

     * For example, with {@code name} as {@code a/b/c.yaml}:
     *

     *
include reference {@code ../d.yaml} becomes {@code /a/d.yaml}

     *
include reference {@code e.yaml} becomes {@code /a/b/f.yaml}

     *
include reference {@code /f.yaml} stays {@code /f.yaml}

     *

     *
     * @param name              Name of the configuration resource that provides these references.
     * @param includeReferences Include references.
     */
    static void makeReferencesAbsolute(String name, List<IncludeReference> includeReferences) {
        String baseDir = name.contains("/") ? name.substring(0, name.lastIndexOf('/') + 1) : "";
        for (Iterator<IncludeReference> iterator = includeReferences.iterator(); iterator.hasNext(); ) {
            IncludeReference reference = iterator.next();
            String refName = reference.getName();
            if (refName.startsWith("/")) {
                // Already absolute. Strip the '/', it will be added at the end.
                refName = refName.substring(1);
            } else {
                refName = baseDir + refName;
            }

            refName = solveDots(refName);
            if (refName == null) {
                logger.error("Illegal configuration include reference ({}); ignored.", reference.getName());
                iterator.remove();
                continue;
            }

            reference.setName("/" + refName);
        }
    }

    static String solveDots(String path) {
        if (!path.contains(".")) {
            return path;
        }
        String[] parts = path.split("/");
        Deque<String> pathStack = new ArrayDeque<>();
        for (String part : parts) {
            switch (part) {
                case ".":
                    // Just ignore.
                    break;
                case "..":
                    if (pathStack.isEmpty()) {
                        // Trying to go beyond the root path part is illegal.
                        return null;
                    }
                    pathStack.removeLast();
                    break;
                default:
                    pathStack.addLast(part);
                    break;
            }
        }

        return String.join("/", pathStack);
    }

    static Configuration gatherPropertiesFor(ConfigurationSource desiredSource,
                                             HierarchicalConfigurationDeserializer deserializer) {
        Configuration configuration = new BaseConfiguration();

        for (String propertyName : desiredSource.systemProperties()) {
            String value = System.getProperty(LIBRARY_PREFIX + "." + desiredSource.name() + "." + propertyName);
            if (value != null && !value.equals("")) {
                configuration.setProperty(propertyName, value);
            }
        }

        // 'appname' can be (and usually is) set locally. It can be overridden by a system property for development
        // and testing purposes.
        if (InstanceLocalSettings.INSTANCE.getAppName() != null) {
            configuration.setProperty(APPNAME_PROPERTY, InstanceLocalSettings.INSTANCE.getAppName());
        }

        for (String propertyName : COMMON_PROPERTIES) {
            String value = System.getProperty(LIBRARY_PREFIX + "." + propertyName);
            if (value != null && !value.isEmpty()) {
                configuration.setProperty(propertyName, value);
            }
        }

        // If the root config name is not explicitly set, fall back to the appname.
        // If that doesn't exist, default to whatever the deserializer deems a suitable default.
        if (configuration.getString(ROOTCONFIG_PROPERTY) == null) {
            String fallback = configuration.getString(APPNAME_PROPERTY, deserializer.defaultConfigName());
            configuration.setProperty(ROOTCONFIG_PROPERTY, fallback);
        }

        return configuration;
    }

    static List<ConfigurationSource> detectConfigurationSourceServiceProviders() {
        List<ConfigurationSource> providers = new ArrayList<>();
        ServiceLoader<ConfigurationSource> loader = ServiceLoader.load(ConfigurationSource.class);
        for (ConfigurationSource source : loader) {
            providers.add(source);
        }
        return providers;
    }
}


text:
.childview section[role=main] {
    margin-left: 120px;
    margin-right: 120px;
}


text:
package com.jstorm.example.unittests.sequence;

import backtype.storm.Config;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.tuple.Fields;
import com.alipay.dw.jstorm.example.sequence.SequenceTopologyDef;
import com.jstorm.example.unittests.utils.JStormUnitTestMetricValidator;
import com.jstorm.example.unittests.utils.JStormUnitTestRunner;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

/**
 * @author binyang.dby on 2016/7/8.
 *
 * basically the unit test for SequenceTopology. I just add some metrics to get some parameter
 * and make some assert.This can also be an example to show how to get metric data that user has
 * define and manage in his own component.
 *
 * @Test pass at 2016/7/19
 */
public class SequenceTopologyTest
{
    private static Logger LOG = LoggerFactory.getLogger(SequenceTopologyTest.class);

    public final static int SPOUT_PARALLELISM_HINT = 1;
    public final static int BOLT_PARALLELISM_HINT = 2;
    public final static long SPOUT_MAX_SEND_NUM = 100000;

    @Test
    public void testSequenceTopology()
    {
        TopologyBuilder topologyBuilder = new TopologyBuilder();
        topologyBuilder.setSpout(SequenceTopologyDef.SEQUENCE_SPOUT_NAME, new SequenceTestSpout(), SPOUT_PARALLELISM_HINT);

        topologyBuilder.setBolt(SequenceTopologyDef.SPLIT_BOLT_NAME, new SequenceTestSplitRecord(), BOLT_PARALLELISM_HINT)
                .localOrShuffleGrouping(SequenceTopologyDef.SEQUENCE_SPOUT_NAME);

        topologyBuilder.setBolt(SequenceTopologyDef.TRADE_BOLT_NAME, new SequenceTestPairCount(), BOLT_PARALLELISM_HINT)
                .shuffleGrouping(SequenceTopologyDef.SPLIT_BOLT_NAME, SequenceTopologyDef.TRADE_STREAM_ID);

        topologyBuilder.setBolt(SequenceTopologyDef.CUSTOMER_BOLT_NAME, new SequenceTestPairCount(), BOLT_PARALLELISM_HINT)
                .shuffleGrouping(SequenceTopologyDef.SPLIT_BOLT_NAME, SequenceTopologyDef.CUSTOMER_STREAM_ID);

        topologyBuilder.setBolt(SequenceTopologyDef.MERGE_BOLT_NAME, new SequenceTestMergeRecord(), BOLT_PARALLELISM_HINT)
                .fieldsGrouping(SequenceTopologyDef.TRADE_BOLT_NAME, new Fields("ID"))
                .fieldsGrouping(SequenceTopologyDef.CUSTOMER_BOLT_NAME, new Fields("ID"));

        topologyBuilder.setBolt(SequenceTopologyDef.TOTAL_BOLT_NAME, new SequenceTestTotalCount(), BOLT_PARALLELISM_HINT)
                .noneGrouping(SequenceTopologyDef.MERGE_BOLT_NAME);

        Map conf = new HashMap();                               //use config in detail.yaml
//        Config.setFallBackOnJavaSerialization(conf, true);      //fall.back.on.java.serialization: true
//                                                                //enable.split: true
//        Config.registerSerialization(conf, TradeCustomer.class, TradeCustomerSerializer.class);
//        Config.registerSerialization(conf, Pair.class, PairSerializer.class);
        Config.setNumAckers(conf, 1);
        Config.setNumWorkers(conf, 3);
        conf.put("spout.max.sending.num", SPOUT_MAX_SEND_NUM);  //set a limit for the spout to get a precise
                                                                //number to make sure the topology works well.
        conf.put(Config.TOPOLOGY_NAME, "SequenceTopologyTest");

        //the following is just for the JStormUnitTestMetricValidator to pick the metric data
        //from all the metrics.If you are not using JStormUnitTestMetricValidator, it is useless.
        //The first element is the key that register in the metric, the second one is the key
        //map with the metric value as a parameter in the callback function validateMetrics().
        Set<String> userDefineMetrics = new HashSet<String>();
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_SPOUT_EMIT);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_SPOUT_SUCCESS);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_SPOUT_FAIL);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_SPOUT_TRADE_SUM);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_SPOUT_CUSTOMER_SUM);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_SPLIT_EMIT);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_PAIR_TRADE_EMIT);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_PAIR_CUSTOMER_EMIT);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_MERGE_EMIT);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_TOTAL_EXECUTE);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_TOTAL_TRADE_SUM);
        userDefineMetrics.add(SequenceTestMetricsDef.METRIC_TOTAL_CUSTOMER_SUM);

        JStormUnitTestMetricValidator validator =  new JStormUnitTestMetricValidator(userDefineMetrics) {
            @Override
            public boolean validateMetrics(Map<String, Double> metrics)
            {
                for(Map.Entry<String, Double> entry : metrics.entrySet())
                    LOG.info("user define metric Key = " + entry.getKey() + " Value = " + entry.getValue());

                int spoutEmit = (int)(metrics.get(SequenceTestMetricsDef.METRIC_SPOUT_EMIT)).doubleValue();
                int spoutSuccess = (int)(metrics.get(SequenceTestMetricsDef.METRIC_SPOUT_SUCCESS)).doubleValue();
                int spoutFail = (int)(metrics.get(SequenceTestMetricsDef.METRIC_SPOUT_FAIL)).doubleValue();
                long spoutTradeSum = (long)(metrics.get(SequenceTestMetricsDef.METRIC_SPOUT_TRADE_SUM)).doubleValue();
                long spoutCustomerSum = (long)(metrics.get(SequenceTestMetricsDef.METRIC_SPOUT_CUSTOMER_SUM)).doubleValue();

                int splitEmit = (int)(metrics.get(SequenceTestMetricsDef.METRIC_SPLIT_EMIT)).doubleValue();
                int pairTradeEmit = (int)(metrics.get(SequenceTestMetricsDef.METRIC_PAIR_TRADE_EMIT)).doubleValue();
                int pairCustomerEmit = (int)(metrics.get(SequenceTestMetricsDef.METRIC_PAIR_CUSTOMER_EMIT)).doubleValue();
                int mergeEmit = (int)(metrics.get(SequenceTestMetricsDef.METRIC_MERGE_EMIT)).doubleValue();

                int totalExecute = (int)(metrics.get(SequenceTestMetricsDef.METRIC_TOTAL_EXECUTE)).doubleValue();
                long totalTradeSum = (long)(metrics.get(SequenceTestMetricsDef.METRIC_TOTAL_TRADE_SUM)).doubleValue();
                long totalCustomerSum = (long)(metrics.get(SequenceTestMetricsDef.METRIC_TOTAL_CUSTOMER_SUM)).doubleValue();

                assertEquals(SPOUT_MAX_SEND_NUM, spoutEmit);
                assertEquals(spoutEmit, spoutSuccess);
                assertEquals(0, spoutFail);
                assertEquals(2*spoutEmit, splitEmit);
                assertEquals(splitEmit, pairTradeEmit*2);
                assertEquals(splitEmit, pairCustomerEmit*2);
                assertEquals(splitEmit, mergeEmit*2);
                assertEquals(mergeEmit, totalExecute);
                assertEquals(spoutTradeSum, totalTradeSum);
                assertEquals(spoutCustomerSum, totalCustomerSum);
                return true;
            }
        };

        //the below line time in second 150 is recommend, at least it should be more than 120 since the
        //metric data was grabbed every 60s but not so precise.
        boolean result = JStormUnitTestRunner.submitTopology(topologyBuilder.createTopology(), conf, 150, validator);
        assertTrue("Topology should pass the validator", result);
    }
}


text:
use crate::verifier::VerifierErrors;
use failure_derive::Fail;

/// A compilation error.
///
/// When Cranelift fails to compile a function, it will return one of these error codes.
#[derive(Fail, Debug, PartialEq, Eq)]
pub enum CodegenError {
    /// A list of IR verifier errors.
    ///
    /// This always represents a bug, either in the code that generated IR for Cranelift, or a bug
    /// in Cranelift itself.
    #[fail(display = "Verifier errors:\n{}", _0)]
    Verifier(#[cause] VerifierErrors),

    /// An implementation limit was exceeded.
    ///
    /// Cranelift can compile very large and complicated functions, but the [implementation has
    /// limits][limits] that cause compilation to fail when they are exceeded.
    ///
    /// [limits]: https://cranelift.readthedocs.io/en/latest/ir.html#implementation-limits
    #[fail(display = "Implementation limit exceeded")]
    ImplLimitExceeded,

    /// The code size for the function is too large.
    ///
    /// Different target ISAs may impose a limit on the size of a compiled function. If that limit
    /// is exceeded, compilation fails.
    #[fail(display = "Code for function is too large")]
    CodeTooLarge,
}

/// A convenient alias for a `Result` that uses `CodegenError` as the error type.
pub type CodegenResult<T> = Result<T, CodegenError>;

impl From<VerifierErrors> for CodegenError {
    fn from(e: VerifierErrors) -> Self {
        CodegenError::Verifier(e)
    }
}


text:
/**
 * Created by JetBrains WebStorm.
 * User: bailey
 * Date: 11-12-5
 * Time: 上午11:18
 * To change this template use File | Settings | File Templates.
 */
html{ width: 100%; height: 100%; overflow: hidden;-webkit-transition: all 3s ease-in-out;
    -moz-transition: all 3s ease-in-out;
    -o-transition: all 3s ease-in-out;
    transition: all 3s ease-in-out;}
body{
    font-size: 14px; color: #585858;
    font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica,宋体;

}

#appInfo table{
    line-height: 2.5;
}
#appInfo table input,#appInfo table textarea{
    width: 360px;
}

#createPage{ text-align: center;}
#createPage fieldset{ border: 1px solid #aaa; padding: 10px; margin: 10px 0;}
#createPage fieldset legend{ text-align: left;}
#temps li{ float: left;font-size: 12px; margin: 0 5px; background: #eee; padding: 8px; cursor: pointer;}
#temps li img{ width: 100px; height: 150px; display: block; border:1px solid #ddd; margin-bottom:5px;}

#header{
    height: 62px; width: 100%; line-height: 62px; background:url(images/appbg.jpg) repeat-x; position:relative;
}
#header h1{
     font-size: 24px; font-weight: bold; position:relative; left:260px; top:0px; color:#dbf3ff; text-shadow: 0px 1px 1px rgba(0,0,0, 0.2);
}
#header .toolbar{
	position:absolute; top:2px; right:5px; font-size:12px;
}

#header .toolbar a{
	float:left;
	line-height:16px;
	text-align:center;
	color:#00528c;
	width:66px;
	padding:5px 0 1px 0 ;

}
#header .toolbar a:hover{
	float:left;
	line-height:20px;
	text-align:center;
	color:#fff;
	background:rgba(255,255,255,0.5);
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
}
#header .toolbar a span{

}
#header .toolbar a img{
	display:block;
	width:32px;
	height:32px;
	margin:0 auto
}

#content{}

#widgetPanel{ width: 240px; height:auto; position: absolute; top:62px; left:0;  bottom:26px; background: #ececec; border-right:1px solid #c7c7c7; }
#optionPanel{ width: 240px; height:auto; position: absolute; top:62px; right:0;  bottom:26px;  background: #fafafa; border-left:1px solid #c7c7c7;}
#board{background: #c7c7c7; text-align: center; height:auto; position: absolute; top:62px; left:240px; right:240px; bottom:26px;}
#tabs{background: #c7c7c7; position:absolute; top:0; bottom:39px; height:auto; left:0; right:0; width:100%;}
#tabs ul{
	background: #f1f1f1; /* Old browsers */
	background: linear-gradient(top, #f9f9f9 0%,#f1f1f1 100%);/* W3C */
	background: -moz-linear-gradient(top, #f9f9f9 0%, #f1f1f1 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f9f9f9), color-stop(100%,#f1f1f1)); /* Chrome,Safari4+ */
	background: -o-linear-gradient(top, #f9f9f9 0%,#f1f1f1 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, #f9f9f9 0%,#f1f1f1 100%); /* IE10+ */
	height:36px; width: 2000px; z-index: 99;
	line-height:36px;
	overflow: hidden;

	border-top:1px solid #ffffff;
	padding:0 14px;
}
#tabs ul li span{ float: right; cursor: pointer;}
#movel{position: absolute; display: none; z-index: 100; top:0px; left:0px;border-right:1px solid #76beff; width: 11px; height: 37px; background: #d2e8fc url("leftright.png") -6px center no-repeat;}
#mover{position: absolute; display: none; z-index: 100; top:0px; right:0px;border-left:1px solid #76beff; width: 11px; height: 37px; background: #d2e8fc url("leftright.png") 3px center no-repeat;;}
#rotate{ display: block; position: absolute; right: 20px; top: 50px; width: 32px; height: 32px;}
#reload{ display: block; position: absolute; right: 20px; top: 100px; width: 32px; height: 32px;}
#recode{ display: block; position: absolute; right: 20px; top: 150px; width: 32px; height: 32px;}

#widgets{ margin: 8px; width: 224px;}
#widgets h3 a{ font-size: 14px;}
#widgets h3.on{ color:#fff}
#widgets ul{ margin: 0; padding: 0; background: #fff;}
#widgets ul li a{ display: block; height:30px; line-height:30px; font-size: 12px; border-top: 1px dashed #e2e2e2; padding:0 5px;}
#widgets ul li a:hover,#widgets ul li a:active{ background: #dcf3ff url("images/are5.gif") no-repeat 205px 10px; -webkit-box-shadow: inset 0px 0px 3px 1px rgba(0, 153, 255, 0.2);
-moz-box-shadow: inset 0px 0px 3px 1px rgba(0, 153, 255, 0.2);
box-shadow: inset 0px 0px 3px 1px rgba(0, 153, 255, 0.2);}
#widgets ul li img{ vertical-align: middle; margin: 0 5px;}

#options{position:absolute;top:38px; width:100%; bottom: 0px; height:auto; background: #fafafa; overflow: auto;}
#scrollarea div{padding: 10px; font-size: 12px; border-bottom: 1px solid #ddd;}
#options form label{ display: block; font-weight: bold; margin-bottom: 5px;}
.ui-tabs-panel{ overflow:auto; position:relative;}
.phone{
    width:320px; height:460px; background: #fff;
	-webkit-box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.3);
box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.3);
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
	position:absolute;
	top:50%;
	left:50%;
	margin-left:-160px;
	margin-top:-230px;
}
.prototype{
    height: 460px; width: 320px; padding: 0; overflow: hidden; background: #fff;
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
}
.phone.rotate{
    -webkit-transform: rotate(90deg) scale(1);
    -moz-transform: rotate(90deg) scale(1);
    -o-transform: rotate(90deg) scale(1);
    transform: rotate(90deg) scale(1);
}
.prototype.rotate{
    width: 460px; height: 320px; margin-top: 70px; margin-left: -70px;
    -webkit-transform: rotate(-90deg) scale(1);
    -moz-transform: rotate(-90deg) scale(1);
    -o-transform: rotate(-90deg) scale(1);
    transform: rotate(-90deg) scale(1);
}

.titlebar{
	background: #f1f1f1; /* Old browsers */
	background: linear-gradient(top, #f9f9f9 0%,#f1f1f1 100%);/* W3C */
	background: -moz-linear-gradient(top, #f9f9f9 0%, #f1f1f1 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f9f9f9), color-stop(100%,#f1f1f1)); /* Chrome,Safari4+ */
	background: -o-linear-gradient(top, #f9f9f9 0%,#f1f1f1 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, #f9f9f9 0%,#f1f1f1 100%); /* IE10+ */
	height:36px; z-index: 100;
	line-height:36px;
    border:1px solid #c7c7c7;
	border-top:1px solid #ffffff;
	border-bottom:1px solid #c7c7c7; padding:0 0 0 30px;
	position:relative;
}
.titlebar img{ position:absolute; top:6px; left:4px;}
.titlebar h2{ color:#000; font-weight: bold;}
.titlebar input{ position:absolute; top:5px;right:5px; width:120px; height: 18px; line-height: 16px; padding: 0; font-size: 12px; border-radius: 5px !important; -webkit-border-radius: 5px !important; -moz-border-radius: 5px !important; border: none; background: #fff url("../themes/default/images/icon-search-black.png") no-repeat 105px center;}

#footer{ position: absolute; bottom: 0; width: 100%; height: 26px; line-height: 26px; font-size: 12px; background: #eeeeee; border-top: 1px solid #aaa;}
.copyright{ float: left; margin: 0 5px; }
#google_translate_element{ float: right; width: 180px; height: 20px; line-height: 20px; overflow: hidden; margin:3px 0 0 5px;}
.version{ float: right; margin: 0 5px;}
textarea.code{font: 12px 'Bitstream Vera Sans Mono','Courier',monospace; background: #eee;}

.loadingF{ position: absolute; width: 100%; height: 100%; left: 0; top: 0; background:url("images/loading.gif") center no-repeat; z-index: 999;}
.ui-selected{ background: #f9ad3e !important;}
.error{ border: 1px solid #dd0000 !important;}
span.error{ display: none !important;}
.tip{ color: #999; font-size: 12px; margin:0px 0 10px 0;}
.clear{ clear: both;}
.hidden{ display: none;}

ul.themelist{ height: 40px;}
ul.themelist li{ width: 18px; height:18px; float: left; margin: 1px; text-align: center; cursor: pointer; }
ul.themelist li span{ display: block;width: 18px; height:18px;}
ul.themelist li.check span{ background: url("../css/images/check.png") no-repeat;}
ul.themelist li input{ width: 18px; height: 18px; filter:alpha(opacity=100);-moz-opacity:0;opacity:0;}
ul.themelist li.a{
    border: 1px solid #2A2A2A /*{a-bar-border}*/;
	background:#111111 /*{a-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #3c3c3c /*{a-bar-background-start}*/), to( #111 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:-moz-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* FF3.6 */
	background-image:-ms-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* IE10 */
	background-image:-o-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Opera 11.10+ */
	background-image:linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/);
}
ul.themelist li.b{
    border: 1px solid #456f9a /*{b-bar-border}*/;
	background: 			#5e87b0 /*{b-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #81a8ce /*{b-bar-background-start}*/), to( #5e87b0 /*{b-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* FF3.6 */
	background-image:     -ms-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* IE10 */
	background-image:      -o-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* Opera 11.10+ */
	background-image:         linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/);
}
ul.themelist li.c{
    border: 1px solid #B3B3B3 /*{c-bar-border}*/;
	background: 			#dddddd /*{c-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #f8f8f8 /*{c-bar-background-start}*/), to( #dddddd /*{c-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#f8f8f8 /*{c-bar-background-start}*/, #dddddd /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#f8f8f8 /*{c-bar-background-start}*/, #dddddd /*{c-bar-background-end}*/); /* FF3.6 */
	background-image:     -ms-linear-gradient(#f8f8f8 /*{c-bar-background-start}*/, #dddddd /*{c-bar-background-end}*/); /* IE10 */
	background-image:      -o-linear-gradient(#f8f8f8 /*{c-bar-background-start}*/, #dddddd /*{c-bar-background-end}*/); /* Opera 11.10+ */
	background-image:         linear-gradient(#f8f8f8 /*{c-bar-background-start}*/, #dddddd /*{c-bar-background-end}*/);
}
ul.themelist li.d{
    border: 1px solid #ccc /*{d-bar-border}*/;
	background: 			#fff /*{d-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{d-bar-background-start}*/), to( #bbb /*{d-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#fff /*{d-bar-background-start}*/, #fff /*{d-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#fff /*{d-bar-background-start}*/, #fff /*{d-bar-background-end}*/); /* FF3.6 */
	background-image:     -ms-linear-gradient(#fff /*{d-bar-background-start}*/, #fff /*{d-bar-background-end}*/); /* IE10 */
	background-image:      -o-linear-gradient(#fff /*{d-bar-background-start}*/, #fff /*{d-bar-background-end}*/); /* Opera 11.10+ */
	background-image:         linear-gradient(#fff /*{d-bar-background-start}*/, #fff /*{d-bar-background-end}*/);
}
ul.themelist li.e{
    border: 1px solid #F7C942 /*{e-bar-border}*/;
	background: 			#fadb4e /*{e-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #fceda7 /*{e-bar-background-start}*/), to( #fadb4e /*{e-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* FF3.6 */
	background-image:     -ms-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* IE10 */
	background-image:      -o-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* Opera 11.10+ */
	background-image:         linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/);
}
ul.themelist li.f{
    border: 1px solid #075fc8 /*{a-bar-border}*/;
	background:#1c6ac7 /*{a-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #43b2e8 /*{a-bar-background-start}*/), to( #1c6ac7 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#43b2e8 /*{a-bar-background-start}*/, #1c6ac7 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:-moz-linear-gradient(#43b2e8 /*{a-bar-background-start}*/, #1c6ac7 /*{a-bar-background-end}*/); /* FF3.6 */
	background-image:-ms-linear-gradient(#43b2e8 /*{a-bar-background-start}*/, #1c6ac7 /*{a-bar-background-end}*/); /* IE10 */
	background-image:-o-linear-gradient(#43b2e8 /*{a-bar-background-start}*/, #1c6ac7 /*{a-bar-background-end}*/); /* Opera 11.10+ */
	background-image:linear-gradient(#43b2e8 /*{a-bar-background-start}*/, #1c6ac7 /*{a-bar-background-end}*/);
}
ul.themelist li.g{
    border: 1px solid #b65409 /*{b-bar-border}*/;
	background: 			#f07203 /*{b-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #fbae3a /*{b-bar-background-start}*/), to( #f07203 /*{b-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#fbae3a /*{b-bar-background-start}*/, #f07203 /*{b-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#fbae3a /*{b-bar-background-start}*/, #f07203 /*{b-bar-background-end}*/); /* FF3.6 */
	background-image:     -ms-linear-gradient(#fbae3a /*{b-bar-background-start}*/, #f07203 /*{b-bar-background-end}*/); /* IE10 */
	background-image:      -o-linear-gradient(#fbae3a /*{b-bar-background-start}*/, #f07203 /*{b-bar-background-end}*/); /* Opera 11.10+ */
	background-image:         linear-gradient(#fbae3a /*{b-bar-background-start}*/, #f07203 /*{b-bar-background-end}*/);
}
ul.themelist li.h{
    border: 1px solid #3c7e03 /*{c-bar-border}*/;
	background: 			#39a106 /*{c-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #89cc0a /*{c-bar-background-start}*/), to( #39a106 /*{c-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#89cc0a /*{c-bar-background-start}*/, #39a106 /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#89cc0a /*{c-bar-background-start}*/, #39a106 /*{c-bar-background-end}*/); /* FF3.6 */
	background-image:     -ms-linear-gradient(#89cc0a /*{c-bar-background-start}*/, #39a106 /*{c-bar-background-end}*/); /* IE10 */
	background-image:      -o-linear-gradient(#89cc0a /*{c-bar-background-start}*/, #39a106 /*{c-bar-background-end}*/); /* Opera 11.10+ */
	background-image:         linear-gradient(#89cc0a /*{c-bar-background-start}*/, #39a106 /*{c-bar-background-end}*/);
}
ul.themelist li.i{
    border: 1px solid #125730 /*{a-bar-border}*/;
	background:#036d44 /*{a-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #16a772 /*{a-bar-background-start}*/), to( #036d44 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#16a772 /*{a-bar-background-start}*/, #036d44 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:-moz-linear-gradient(#16a772 /*{a-bar-background-start}*/, #036d44 /*{a-bar-background-end}*/); /* FF3.6 */
	background-image:-ms-linear-gradient(#16a772 /*{a-bar-background-start}*/, #036d44 /*{a-bar-background-end}*/); /* IE10 */
	background-image:-o-linear-gradient(#16a772 /*{a-bar-background-start}*/, #036d44 /*{a-bar-background-end}*/); /* Opera 11.10+ */
	background-image:linear-gradient(#16a772 /*{a-bar-background-start}*/, #036d44 /*{a-bar-background-end}*/);
}
ul.themelist li.j{
    border: 1px solid #a40000 /*{a-bar-border}*/;
	background:#ce0000 /*{a-bar-background-color}*/;
	background-image: -webkit-gradient(linear, left top, left bottom, from( #ff0000 /*{a-bar-background-start}*/), to( #ce0000 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#ff0000 /*{a-bar-background-start}*/, #ce0000 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
	background-image:-moz-linear-gradient(#ff0000 /*{a-bar-background-start}*/, #ce0000 /*{a-bar-background-end}*/); /* FF3.6 */
	background-image:-ms-linear-gradient(#ff0000 /*{a-bar-background-start}*/, #ce0000 /*{a-bar-background-end}*/); /* IE10 */
	background-image:-o-linear-gradient(#ff0000 /*{a-bar-background-start}*/, #ce0000 /*{a-bar-background-end}*/); /* Opera 11.10+ */
	background-image:linear-gradient(#ff0000 /*{a-bar-background-start}*/, #ce0000 /*{a-bar-background-end}*/);
}

/*yangpl皮肤设置*/
.aaplogo{ height:62px; width:379px; background:url("images/applogo.jpg") no-repeat; position:absolute; top:0; left:0;}
h3.ui-state-active a, h3.ui-state-active a:link, h3.ui-state-active a:visited{ color:#fff}

h3.ui-state-default span{background:url("images/open.png") no-repeat  0 0!important; left:195px !important;}
h3.ui-state-active span {background:url("images/close.png") no-repeat  0 0!important; left:195px !important;}

.go2012{
    -webkit-transform: rotate(180deg) scale(1);
    -moz-transform: rotate(180deg) scale(1);
    -o-transform: rotate(180deg) scale(1);
    transform: rotate(180deg) scale(1);
}


text:
package org.cactoos.io;

import java.io.OutputStream;
import org.cactoos.Output;

/**
 * A decorator of {@link Output} that prevents {@link OutputStream}
 * to be closed by its performers.
 *
 * <p>There is no thread-safety guarantee.
 *
 * @since 1.0.0
 */
public final class CloseShieldOutput implements Output {

    /**
     * Output to preserve.
     */
    private final Output origin;

    /**
     * Ctor.
     * @param origin Output to preserve.
     */
    public CloseShieldOutput(final Output origin) {
        this.origin = origin;
    }

    @Override
    public OutputStream stream() throws Exception {
        return new CloseShieldOutputStream(this.origin.stream());
    }
}


text:
module.exports = function(server) {

  // Sample route
  server.get('/ping', function (req, res, next) {
    res.send({ 'result': 'pong' });
    return next();
  });

};


text:
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import {
  IDisposable
} from '@phosphor/disposable';

import {
  IInspector, InspectorPanel
} from '@jupyterlab/inspector';

/**
 * A class that manages inspector widget instances and offers persistent
 * `IInspector` instance that other plugins can communicate with.
 */
export
class InspectorManager implements IInspector {
  /**
   * The current inspector widget.
   */
  get inspector(): InspectorPanel {
    return this._inspector;
  }
  set inspector(inspector: InspectorPanel) {
    if (this._inspector === inspector) {
      return;
    }
    this._inspector = inspector;
    // If an inspector was added and it has no source
    if (inspector && !inspector.source) {
      inspector.source = this._source;
    }
  }

  /**
   * The source of events the inspector panel listens for.
   */
  get source(): IInspector.IInspectable {
    return this._source;
  }
  set source(source: IInspector.IInspectable) {
    if (this._source === source) {
      return;
    }

    if (this._source) {
      this._source.disposed.disconnect(this._onSourceDisposed, this);
    }

    this._source = source;

    if (this._inspector && !this._inspector.isDisposed) {
      this._inspector.source = this._source;
    }

    if (this._source) {
      this._source.disposed.connect(this._onSourceDisposed, this);
    }
  }

  /**
   * Create an inspector child item and return a disposable to remove it.
   *
   * @param item - The inspector child item being added to the inspector.
   *
   * @returns A disposable that removes the child item from the inspector.
   */
  add(item: IInspector.IInspectorItem): IDisposable {
    if (!this._inspector) {
      throw new Error('Cannot add child item before creating an inspector.');
    }
    return this._inspector.add(item);
  }

  /**
   * Handle the source disposed signal.
   */
  private _onSourceDisposed() {
    this._source = null;
  }

  private _inspector: InspectorPanel = null;
  private _source: IInspector.IInspectable = null;
}


text:
<?php

defined('_JEXEC') or die;

/**
 * HTML View class for the Categories component
 *
 * @package     Joomla.Administrator
 * @subpackage  com_categories
 * @since       1.6
 */
class CategoriesViewCategory extends JViewLegacy
{
	protected $form;

	protected $item;

	protected $state;

	protected $assoc;

	/**
	 * Display the view
	 */
	public function display($tpl = null)
	{
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = CategoriesHelper::getActions($this->state->get('category.component'));
		$this->assoc = $this->get('Assoc');

		$input = JFactory::getApplication()->input;

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}

		// Check for tag type
		$this->checkTags = JHelperTags::getTypes('objectList', array($this->state->get('category.extension') . '.category'), true);

		$input->set('hidemainmenu', true);

		if ($this->getLayout() == 'modal')
		{
			$this->form->setFieldAttribute('language', 'readonly', 'true');
			$this->form->setFieldAttribute('parent_id', 'readonly', 'true');
		}

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$input = JFactory::getApplication()->input;
		$extension = $input->get('extension');
		$user = JFactory::getUser();
		$userId = $user->get('id');

		$isNew = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);

		// Check to see if the type exists
		$ucmType = new JUcmType;
		$this->typeId = $ucmType->getTypeId($extension . '.category');

		// Avoid nonsense situation.
		if ($extension == 'com_categories')
		{
			return;
		}

		// The extension can be in the form com_foo.section
		$parts = explode('.', $extension);
		$component = $parts[0];
		$section = (count($parts) > 1) ? $parts[1] : null;

		// Need to load the menu language file as mod_menu hasn't been loaded yet.
		$lang = JFactory::getLanguage();
		$lang->load($component, JPATH_BASE, null, false, false)
		|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, null, false, false)
		|| $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false)
		|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, $lang->getDefault(), false, false);

		// Load the category helper.
		require_once JPATH_COMPONENT . '/helpers/categories.php';

		// Get the results for each action.
		$canDo = CategoriesHelper::getActions($component, $this->item->id);

		// If a component categories title string is present, let's use it.
		if ($lang->hasKey($component_title_key = $component . ($section ? "_$section" : '') . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE'))
		{
			$title = JText::_($component_title_key);
		}
		// Else if the component section string exits, let's use it
		elseif ($lang->hasKey($component_section_key = $component . ($section ? "_$section" : '')))
		{
			$title = JText::sprintf('COM_CATEGORIES_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE', $this->escape(JText::_($component_section_key)));
		}
		// Else use the base title
		else
		{
			$title = JText::_('COM_CATEGORIES_CATEGORY_BASE_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE');
		}

		// Load specific css component
		JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);

		// Prepare the toolbar.
		JToolbarHelper::title($title, 'category-' . ($isNew ? 'add' : 'edit') . ' ' . substr($component, 4) . ($section ? "-$section" : '') . '-category-' . ($isNew ? 'add' : 'edit'));

		// For new records, check the create permission.
		if ($isNew && (count($user->getAuthorisedCategories($component, 'core.create')) > 0))
		{
			JToolbarHelper::apply('category.apply');
			JToolbarHelper::save('category.save');
			JToolbarHelper::save2new('category.save2new');
		}

		// If not checked out, can save the item.
		elseif (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_user_id == $userId)))
		{
			JToolbarHelper::apply('category.apply');
			JToolbarHelper::save('category.save');
			if ($canDo->get('core.create'))
			{
				JToolbarHelper::save2new('category.save2new');
			}
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('category.save2copy');
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('category.cancel');
		}
		else
		{
			JToolbarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();

		// Compute the ref_key if it does exist in the component
		if (!$lang->hasKey($ref_key = strtoupper($component . ($section ? "_$section" : '')) . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_HELP_KEY'))
		{
			$ref_key = 'JHELP_COMPONENTS_' . strtoupper(substr($component, 4) . ($section ? "_$section" : '')) . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT');
		}

		// Get help for the category/section view for the component by
		// -remotely searching in a language defined dedicated URL: *component*_HELP_URL
		// -locally  searching in a component help file if helpURL param exists in the component and is set to ''
		// -remotely searching in a component URL if helpURL param exists in the component and is NOT set to ''
		if ($lang->hasKey($lang_help_url = strtoupper($component) . '_HELP_URL'))
		{
			$debug = $lang->setDebug(false);
			$url = JText::_($lang_help_url);
			$lang->setDebug($debug);
		}
		else
		{
			$url = null;
		}
		JToolbarHelper::help($ref_key, JComponentHelper::getParams($component)->exists('helpURL'), $url, $component);
	}
}


text:
"""
    cupoftee.application
    ~~~~~~~~~~~~~~~~~~~~

    The WSGI appliction for the cup of tee browser.

    :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
"""
import time
from os import path
from threading import Thread
from cupoftee.db import Database
from cupoftee.network import ServerBrowser
from werkzeug import Request, Response, Template, SharedDataMiddleware
from werkzeug.exceptions import HTTPException, NotFound
from werkzeug.routing import Map, Rule

templates = path.join(path.dirname(__file__), 'templates')
pages = {}
url_map = Map([Rule('/shared/<file>', endpoint='shared')])

def make_app(database, interval=60):
    return SharedDataMiddleware(Cup(database), {
        '/shared':  path.join(path.dirname(__file__), 'shared')
    })

class PageMeta(type):

    def __init__(cls, name, bases, d):
        type.__init__(cls, name, bases, d)
        if d.get('url_rule') is not None:
            pages[cls.identifier] = cls
            url_map.add(Rule(cls.url_rule, endpoint=cls.identifier,
                             **cls.url_arguments))

    identifier = property(lambda x: x.__name__.lower())

class Page(object):
    __metaclass__ = PageMeta
    url_arguments = {}

    def __init__(self, cup, request, url_adapter):
        self.cup = cup
        self.request = request
        self.url_adapter = url_adapter

    def url_for(self, endpoint, **values):
        return self.url_adapter.build(endpoint, values)

    def process(self):
        pass

    def render_template(self, template=None):
        if template is None:
            template = self.__class__.identifier + '.html'
        context = dict(self.__dict__)
        context.update(url_for=self.url_for, self=self)
        body_tmpl = Template.from_file(path.join(templates, template))
        layout_tmpl = Template.from_file(path.join(templates, 'layout.html'))
        context['body'] = body_tmpl.render(context)
        return layout_tmpl.render(context)

    def get_response(self):
        return Response(self.render_template(), mimetype='text/html')

class Cup(object):

    def __init__(self, database, interval=120):
        self.interval = interval
        self.db = Database(database)
        self.master = ServerBrowser(self)
        self.updater = Thread(None, self.update_master)
        self.updater.setDaemon(True)
        self.updater.start()

    def update_master(self):
        wait = self.interval
        while 1:
            time.sleep(wait)
            if self.master.sync():
                wait = self.interval
            else:
                wait = self.interval // 2

    def dispatch_request(self, request):
        url_adapter = url_map.bind_to_environ(request.environ)
        try:
            endpoint, values = url_adapter.match()
            page = pages[endpoint](self, request, url_adapter)
            response = page.process(**values)
        except NotFound, e:
            page = MissingPage(self, request, url_adapter)
            response = page.process()
        except HTTPException, e:
            return e
        return response or page.get_response()

    def __call__(self, environ, start_response):
        request = Request(environ)
        return self.dispatch_request(request)(environ, start_response)

from cupoftee.pages import MissingPage


text:
<?php

namespace Drupal\commerce_log;

use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;

class LogListBuilder extends EntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['type'] = t('Type');
    $header['time'] = t('Time');
    $header['log'] = t('Log');
    return $header + parent::buildHeader();
  }

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    /** @var \Drupal\commerce_log\Entity\LogInterface $entity */
    $row['type'] = $entity->getCategory()->getLabel();
    $row['time'] = $entity->getCreatedTime();
    $row['log'] = \Drupal::entityTypeManager()->getViewBuilder($entity->getEntityTypeId())->view($entity);
    return $row + parent::buildRow($entity);
  }

}


text:
package com.gradle.exportapi.dao;

import com.gradle.exportapi.model.CustomValue;
import org.knowm.yank.Yank;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.gradle.exportapi.dbutil.SQLHelper.insert;

public class CustomValueDAO {

    static final Logger log = LoggerFactory.getLogger(CustomValueDAO.class);

    public static long insertCustomValue(CustomValue cv) {

        Object[] params = new Object[]{
                cv.getBuildId(),
                cv.getKey(),
                cv.getValue(),
        };

        String SQL = insert("custom_values (build_id, key, value)", params);

        long newId = Yank.insert(SQL, params);
        log.debug("Created custom value id: " + newId + " key: " + cv.getKey() + " for build: " + cv.getBuildId());
        return newId;
    }
}


text:
//packages
package Pieces;

//imports
import java.awt.*;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import javax.swing.ImageIcon;

/**
 * The Bishop is a static piece; Image and number won't be changed as the game goes by, different then the Pawn
 * @author Yan Haeffner
 * @version v1.0
 *
 * Fixed in v0.4:
 * Image size fixed from 48,48 to 64,64
 */
public class Bishop extends Pieces implements Serializable
{
    //atribute(s)

    //constructor(s)
    public Bishop(int color) //creates the pawn with its default value: 10
    {
        number = 4;
        value = 3;
        name = "Bishop";
        this.color = color; //1 = White, 0 = Black
        try{
            BufferedImage img = ImageIO.read(getClass().getResourceAsStream("pieces.png"));
            pieceImage = new ImageIcon(img.getSubimage(number*64,color*64,64,64)); //as the image can be easily divided in a 64x64px, the images can be setted as 48x48 for better resizing
        }
        catch (Exception e)
        {
            e.printStackTrace();
            System.exit(1);
        }
    }

    //method(s)
}


text:
package org.apache.camel.component.salesforce.internal.client;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Phaser;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.thoughtworks.xstream.XStream;

import org.apache.camel.Service;
import org.apache.camel.component.salesforce.SalesforceHttpClient;
import org.apache.camel.component.salesforce.api.SalesforceException;
import org.apache.camel.component.salesforce.api.TypeReferences;
import org.apache.camel.component.salesforce.api.dto.RestError;
import org.apache.camel.component.salesforce.internal.PayloadFormat;
import org.apache.camel.component.salesforce.internal.SalesforceSession;
import org.apache.camel.component.salesforce.internal.dto.RestErrors;
import org.eclipse.jetty.client.HttpContentResponse;
import org.eclipse.jetty.client.api.ContentProvider;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.api.Result;
import org.eclipse.jetty.client.util.BufferingResponseListener;
import org.eclipse.jetty.client.util.ByteBufferContentProvider;
import org.eclipse.jetty.client.util.InputStreamContentProvider;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class AbstractClientBase implements SalesforceSession.SalesforceSessionListener, Service {

    protected static final String APPLICATION_JSON_UTF8 = "application/json;charset=utf-8";
    protected static final String APPLICATION_XML_UTF8 = "application/xml;charset=utf-8";

    private static final int DEFAULT_TERMINATION_TIMEOUT = 10;

    protected final Logger log = LoggerFactory.getLogger(getClass());

    protected final SalesforceHttpClient httpClient;
    protected final SalesforceSession session;
    protected final String version;

    protected String accessToken;
    protected String instanceUrl;

    private Phaser inflightRequests;

    private long terminationTimeout;

    public AbstractClientBase(String version, SalesforceSession session,
        SalesforceHttpClient httpClient) throws SalesforceException {
        this(version, session, httpClient, DEFAULT_TERMINATION_TIMEOUT);
    }

    AbstractClientBase(String version, SalesforceSession session,
                              SalesforceHttpClient httpClient, int terminationTimeout) throws SalesforceException {

        this.version = version;
        this.session = session;
        this.httpClient = httpClient;
        this.terminationTimeout = terminationTimeout;
    }

    public void start() throws Exception {
        // local cache
        accessToken = session.getAccessToken();
        if (accessToken == null) {
            // lazy login here!
            accessToken = session.login(accessToken);
        }
        instanceUrl = session.getInstanceUrl();

        // also register this client as a session listener
        session.addListener(this);

        inflightRequests = new Phaser(1);
    }

    @Override
    public void stop() throws Exception {
        if (inflightRequests != null) {
            inflightRequests.arrive();
            if (!inflightRequests.isTerminated()) {
                try {
                    inflightRequests.awaitAdvanceInterruptibly(0, terminationTimeout, TimeUnit.SECONDS);
                } catch (InterruptedException | TimeoutException ignored) {
                    // exception is ignored
                }
            }
        }

        // deregister listener
        session.removeListener(this);
    }

    @Override
    public void onLogin(String accessToken, String instanceUrl) {
        if (!accessToken.equals(this.accessToken)) {
            this.accessToken = accessToken;
            this.instanceUrl = instanceUrl;
        }
    }

    @Override
    public void onLogout() {
        // ignore, if this client makes another request with stale token,
        // SalesforceSecurityListener will auto login!
    }

    protected Request getRequest(HttpMethod method, String url) {
        return getRequest(method.asString(), url);
    }

    protected Request getRequest(String method, String url) {
        SalesforceHttpRequest request = (SalesforceHttpRequest) httpClient.newRequest(url)
            .method(method)
            .timeout(session.getTimeout(), TimeUnit.MILLISECONDS);
        request.getConversation().setAttribute(SalesforceSecurityHandler.CLIENT_ATTRIBUTE, this);
        return request;
    }

    protected interface ClientResponseCallback {
        void onResponse(InputStream response, SalesforceException ex);
    }

    protected void doHttpRequest(final Request request, final ClientResponseCallback callback) {
        // Highly memory inefficient,
        // but buffer the request content to allow it to be replayed for authentication retries
        final ContentProvider content = request.getContent();
        if (content instanceof InputStreamContentProvider) {
            final List<ByteBuffer> buffers = new ArrayList<>();
            for (ByteBuffer buffer : content) {
                buffers.add(buffer);
            }
            request.content(new ByteBufferContentProvider(buffers.toArray(new ByteBuffer[buffers.size()])));
            buffers.clear();
        }

        inflightRequests.register();
        // execute the request
        request.send(new BufferingResponseListener(httpClient.getMaxContentLength()) {
            @Override
            public void onComplete(Result result) {
                try {
                    Response response = result.getResponse();
                    if (result.isFailed()) {

                        // Failure!!!
                        // including Salesforce errors reported as exception from SalesforceSecurityHandler
                        Throwable failure = result.getFailure();
                        if (failure instanceof SalesforceException) {
                            callback.onResponse(null, (SalesforceException) failure);
                        } else {
                            final String msg = String.format("Unexpected error {%s:%s} executing {%s:%s}",
                                response.getStatus(), response.getReason(), request.getMethod(), request.getURI());
                            callback.onResponse(null, new SalesforceException(msg, response.getStatus(), failure));
                        }
                    } else {

                        // HTTP error status
                        final int status = response.getStatus();
                        SalesforceHttpRequest request = (SalesforceHttpRequest) ((SalesforceHttpRequest) result.getRequest())
                            .getConversation()
                            .getAttribute(SalesforceSecurityHandler.AUTHENTICATION_REQUEST_ATTRIBUTE);

                        if (status == HttpStatus.BAD_REQUEST_400 && request != null) {
                            // parse login error
                            ContentResponse contentResponse = new HttpContentResponse(response, getContent(), getMediaType(), getEncoding());
                            try {

                                session.parseLoginResponse(contentResponse, getContentAsString());
                                final String msg = String.format("Unexpected Error {%s:%s} executing {%s:%s}",
                                    status, response.getReason(), request.getMethod(), request.getURI());
                                callback.onResponse(null, new SalesforceException(msg, null));

                            } catch (SalesforceException e) {

                                final String msg = String.format("Error {%s:%s} executing {%s:%s}",
                                    status, response.getReason(), request.getMethod(), request.getURI());
                                callback.onResponse(null, new SalesforceException(msg, response.getStatus(), e));

                            }
                        } else if (status < HttpStatus.OK_200 || status >= HttpStatus.MULTIPLE_CHOICES_300) {
                            // Salesforce HTTP failure!
                            final SalesforceException exception = createRestException(response, getContentAsInputStream());

                            // for APIs that return body on status 400, such as Composite API we need content as well
                            callback.onResponse(getContentAsInputStream(), exception);
                        } else {

                            // Success!!!
                            callback.onResponse(getContentAsInputStream(), null);
                        }
                    }
                } finally {
                    inflightRequests.arriveAndDeregister();
                }
            }

            @Override
            public InputStream getContentAsInputStream() {
                if (getContent().length == 0) {
                    return null;
                }
                return super.getContentAsInputStream();
            }
        });
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public void setInstanceUrl(String instanceUrl) {
        this.instanceUrl = instanceUrl;
    }

    final List<RestError> readErrorsFrom(final InputStream responseContent, final PayloadFormat format,
        final ObjectMapper objectMapper, final XStream xStream)
        throws IOException, JsonParseException, JsonMappingException {
        final List<RestError> restErrors;
        if (PayloadFormat.JSON.equals(format)) {
            restErrors = objectMapper.readValue(responseContent, TypeReferences.REST_ERROR_LIST_TYPE);
        } else {
            RestErrors errors = new RestErrors();
            xStream.fromXML(responseContent, errors);
            restErrors = errors.getErrors();
        }
        return restErrors;
    }

    protected abstract void setAccessToken(Request request);

    protected abstract SalesforceException createRestException(Response response, InputStream responseContent);

}


text:
package com.vmware.vim25;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

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

 *

 * <simpleType name="VirtualMachinePowerState">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="poweredOff"/>
 *     <enumeration value="poweredOn"/>
 *     <enumeration value="suspended"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "VirtualMachinePowerState")
@XmlEnum
public enum VirtualMachinePowerState {

    @XmlEnumValue("poweredOff")
    POWERED_OFF("poweredOff"),
    @XmlEnumValue("poweredOn")
    POWERED_ON("poweredOn"),
    @XmlEnumValue("suspended")
    SUSPENDED("suspended");
    private final String value;

    VirtualMachinePowerState(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static VirtualMachinePowerState fromValue(String v) {
        for (VirtualMachinePowerState c: VirtualMachinePowerState.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}


text:
import { ValidationError } from '../validation_error';
import listIsAlphabetical from '../util/listIsAlphabetical';

export function InputObjectFieldsSortedAlphabetically(configuration, context) {
  const ruleKey = 'input-object-fields-sorted-alphabetically';
  return {
    InputObjectTypeDefinition(node) {
      const fieldList = (node.fields || []).map((field) => field.name.value);

      const { sortOrder = 'alphabetical' } =
        configuration.getRulesOptions()[ruleKey] || {};
      const { isSorted, sortedList } = listIsAlphabetical(fieldList, sortOrder);

      if (!isSorted) {
        context.reportError(
          new ValidationError(
            ruleKey,
            `The fields of input type \`${node.name.value}\` should be sorted in ${sortOrder} order. ` +
              `Expected sorting: ${sortedList.join(', ')}`,
            [node]
          )
        );
      }
    },
  };
}


text:
<?php

class HolidayCourse extends Course {

    private static $db = array (
		'TypicalDays' => 'Int'
    );

	private static $has_one = array(
		'CoursePage' => 'CoursePage'
	);

    private static $summary_fields = array (
        'Title' => 'Title',
        'TypicalPrice.Nice' => 'TypicalPrice',
        'TypicalDays' => 'TypicalDays',
        'CoursePage.Title' => 'Category'
    );

    public function getCMSFields() {
		$fields = parent::getCMSFields();
        $fields->addFieldsToTab('Root.Main', array(
            LabelField::create('How many days this course typically runs for.<br>This is display on courses that aren\'t currently available to book.'),
			DropdownField::create('TypicalDays', 'Typical Number of Days')
				->setSource(ArrayLib::valuekey(range(5, 1)))
        ), 'Description');

        return $fields;
    }

    public function searchableFields() {
        return array (
            'CoursePageID' => array (
                'filter' => 'ExactMatchFilter',
                'title' => 'Category',
                'field' => DropdownField::create('CoursePageID')
                    ->setSource(CoursePage::get()->map('ID','Title'))
                    ->setEmptyString('-- Any Category --')
            ),
            'Title' => array (
                'filter' => 'PartialMatchFilter',
                'title' => 'Title',
                'field' => 'TextField'
            ),
            'Days' => array (
                'filter' => 'ExactMatchFilter',
                'title' => 'Number of Days',
                'field' => DropdownField::create('Days')
                    ->setSource(ArrayLib::valuekey(range(1, 5)))
                    ->setEmptyString('-- Any --')
            )
        );
    }
}