text:
using System;
using System.Diagnostics;

namespace Zephyr.DesignByContract
{
    ///
    ///    Design by Contract checks developed by http://www.codeproject.com/KB/cs/designbycontract.aspx.
    ///
    ///    Each method generates an exception or
    ///    a trace assertion statement if the contract is broken.
    ///
    /// <remarks>
    ///    This example shows how to call the Require method.
    ///    Assume DBC_CHECK_PRECONDITION is defined.
    ///
    ///        public void Test(int x)
    ///        {
    ///        try
    ///        {
    ///        Check.Require(x > 1, "x must be > 1");
    ///        }
    ///        catch (System.Exception ex)
    ///        {
    ///        Console.WriteLine(ex.ToString());
    ///        }
    ///        }
    ///
    ///    If you wish to use trace assertion statements, intended for Debug scenarios,
    ///    rather than exception handling then set
    ///
    ///    Check.UseAssertions = true
    ///
    ///    You can specify this in your application entry point and maybe make it
    ///    dependent on conditional compilation flags or configuration file settings, e.g.,
    ///
    ///        #if DBC_USE_ASSERTIONS
    ///        Check.UseAssertions = true;
    ///        #endif
    ///
    ///    You can direct output to a Trace listener. For example, you could insert
    ///
    ///        Trace.Listeners.Clear();
    ///        Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
    ///
    ///
    ///    or direct output to a file or the Event Log.
    ///
    ///    (Note: For ASP.NET clients use the Listeners collection
    ///    of the Debug, not the Trace, object and, for a Release build, only exception-handling
    ///    is possible.)
    /// </remarks>
    public static class Check
    {
        private static bool useAssertions;

        ///
        ///     Set this if you wish to use Trace Assert statements
        ///     instead of exception handling.
        ///     (The Check class uses exception handling by default.)
        ///
        public static bool UseAssertions
        {
            get
            {
                return useAssertions;
            }

            set
            {
                useAssertions = value;
            }
        }

        ///
        ///     Is exception handling being used?
        ///
        private static bool UseExceptions
        {
            get
            {
                return !useAssertions;
            }
        }

        ///
        ///     Assertion check.
        ///
        public static void Assert(bool assertion, string message)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new AssertionException(message);
                }
            }
            else
            {
                Trace.Assert(assertion, "Assertion: " + message);
            }
        }

        ///
        ///     Assertion check.
        ///
        public static void Assert(bool assertion, string message, Exception inner)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new AssertionException(message, inner);
                }
            }
            else
            {
                Trace.Assert(assertion, "Assertion: " + message);
            }
        }

        ///
        ///     Assertion check.
        ///
        public static void Assert(bool assertion)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new AssertionException("Assertion failed.");
                }
            }
            else
            {
                Trace.Assert(assertion, "Assertion failed.");
            }
        }

        ///
        ///     Postcondition check.
        ///
        public static void Ensure(bool assertion, string message)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new PostconditionException(message);
                }
            }
            else
            {
                Trace.Assert(assertion, "Postcondition: " + message);
            }
        }

        ///
        ///     Postcondition check.
        ///
        public static void Ensure(bool assertion, string message, Exception inner)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new PostconditionException(message, inner);
                }
            }
            else
            {
                Trace.Assert(assertion, "Postcondition: " + message);
            }
        }

        ///
        ///     Postcondition check.
        ///
        public static void Ensure(bool assertion)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new PostconditionException("Postcondition failed.");
                }
            }
            else
            {
                Trace.Assert(assertion, "Postcondition failed.");
            }
        }

        ///
        ///     Invariant check.
        ///
        public static void Invariant(bool assertion, string message)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new InvariantException(message);
                }
            }
            else
            {
                Trace.Assert(assertion, "Invariant: " + message);
            }
        }

        ///
        ///     Invariant check.
        ///
        public static void Invariant(bool assertion, string message, Exception inner)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new InvariantException(message, inner);
                }
            }
            else
            {
                Trace.Assert(assertion, "Invariant: " + message);
            }
        }

        ///
        ///     Invariant check.
        ///
        public static void Invariant(bool assertion)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new InvariantException("Invariant failed.");
                }
            }
            else
            {
                Trace.Assert(assertion, "Invariant failed.");
            }
        }

        ///
        ///     Precondition check - should run regardless of preprocessor directives.
        ///
        public static void Require(bool assertion, string message)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new PreconditionException(message);
                }
            }
            else
            {
                Trace.Assert(assertion, "Precondition: " + message);
            }
        }

        ///
        ///     Precondition check - should run regardless of preprocessor directives.
        ///
        public static void Require(bool assertion, string message, Exception inner)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new PreconditionException(message, inner);
                }
            }
            else
            {
                Trace.Assert(assertion, "Precondition: " + message);
            }
        }

        ///
        ///     Precondition check - should run regardless of preprocessor directives.
        ///
        public static void Require(bool assertion)
        {
            if (UseExceptions)
            {
                if (!assertion)
                {
                    throw new PreconditionException("Precondition failed.");
                }
            }
            else
            {
                Trace.Assert(assertion, "Precondition failed.");
            }
        }
    }
}


text:
FactoryGirl.define do
  factory :job_title do
    sequence(:name) { |n| "#{n} test job title" }
  end
end

redpajama_set_name: RedPajamaGithub


text:
UIKIT_EXTERN NSString * const MTAvaterGeneraterSize NS_AVAILABLE(10_0, 8_0);
UIKIT_EXTERN NSString * const MTAvaterGeneraterOuterMargin NS_AVAILABLE(10_0, 8_0);
UIKIT_EXTERN NSString * const MTAvaterGeneraterInnerMargin NS_AVAILABLE(10_0, 8_0);
UIKIT_EXTERN NSString * const MTAvaterGeneraterInnerCornerRadious NS_AVAILABLE(10_0, 8_0);
UIKIT_EXTERN NSString * const MTAvaterGeneraterOuterCornerRadious NS_AVAILABLE(10_0, 8_0);
UIKIT_EXTERN NSString * const MTAvaterGeneraterBackgroundColorAttributeName NS_AVAILABLE(10_0, 8_0);

@interface UIAvaterGenerater : NSObject

+ (void)generateGroupImageWithImages:(NSArray <UIImage *>*)images completion:(void (^)(UIImage *image))completion;

+ (void)generateGroupImageWithImages:(NSArray <UIImage *>*)images attributes:(NSDictionary *)attributeDic completion:(void (^)(UIImage *image))completion;

+ (void)generateGroupImageWithTop9UserIds:(NSArray <NSString *>*)top9UserIds
                               completion:(void (^)(UIImage *image))completion;

+ (void)generateGroupImageWithTop9UserIds:(NSArray <NSString *>*)top9UserIds attributes:(NSDictionary *)attributeDic
                               completion:(void (^)(UIImage *image))completion;

@end


text:
import React, { Component } from 'react';
import GoogleMapReact from 'google-map-react';

class GoogleMap extends Component {

  static defaultProps = {
    center: {lat: 39.95, lng: -75.16},
    zoom: 12
  };

  render() {
    return (
       <GoogleMapReact bootstrapURLKeys={{
            key: "AIzaSyDfuZzed_XvToL0wEDowa20VhPlcri2Who"
        }}
        defaultCenter={this.props.center}
        defaultZoom={this.props.zoom}
      />
    );
  };
}

export default GoogleMap;

/*import React, { Component } from 'react';

// Google map already knows how to render. but we are gonna use a different approach to integrate it with React

class GoogleMap extends Component {

    // Lifecyle methods. This is how to create embedded google map with keyword new.s
    componentDidMount(){
        new google.maps.Map(this.refs.map, {
            zoom: 12,
            center: {
                lat: 39.95,
                lng: -75.16
            }
        });
    }

    render (){
        return <div ref="map" />; // this.refs.map  It is a direct reference to actual HTML element
    }
}

export default GoogleMap; */


text:
from .exceptions import Auth0Error, RateLimitError, TokenValidationError

__all__ = ("Auth0Error", "RateLimitError", "TokenValidationError")


text:
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.gradle.service.project.data;

import com.intellij.openapi.externalSystem.model.DataNode;
import com.intellij.openapi.externalSystem.model.ExternalProjectInfo;
import com.intellij.openapi.externalSystem.model.Key;
import com.intellij.openapi.externalSystem.model.ProjectKeys;
import com.intellij.openapi.externalSystem.model.project.ProjectData;
import com.intellij.openapi.externalSystem.service.project.ProjectDataManager;
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.gradle.model.ExternalProject;
import org.jetbrains.plugins.gradle.model.ExternalSourceSet;
import org.jetbrains.plugins.gradle.util.GradleConstants;

import java.util.ArrayDeque;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Vladislav.Soroka
 */
public class ExternalProjectDataCache {
  @ApiStatus.Internal
  @NotNull public static final Key<ExternalProject> KEY = Key.create(ExternalProject.class, ProjectKeys.TASK.getProcessingWeight() + 1);
  private final Project myProject;

  public static ExternalProjectDataCache getInstance(@NotNull Project project) {
    return project.getService(ExternalProjectDataCache.class);
  }

  public ExternalProjectDataCache(@NotNull Project project) {
    myProject = project;
  }

  @Nullable
  public ExternalProject getRootExternalProject(@NotNull String externalProjectPath) {
    ExternalProjectInfo projectData =
      ProjectDataManager.getInstance().getExternalProjectData(myProject, GradleConstants.SYSTEM_ID, externalProjectPath);
    if (projectData == null) return null;
    DataNode<ProjectData> projectStructure = projectData.getExternalProjectStructure();
    if (projectStructure == null) return null;
    DataNode<ExternalProject> projectDataNode = ExternalSystemApiUtil.find(projectStructure, KEY);
    if (projectDataNode == null) return null;
    return projectDataNode.getData();
  }

  @NotNull
  public Map<String, ExternalSourceSet> findExternalProject(@NotNull ExternalProject parentProject, @NotNull Module module) {
    String externalProjectId = ExternalSystemApiUtil.getExternalProjectId(module);
    boolean isSourceSet = GradleConstants.GRADLE_SOURCE_SET_MODULE_TYPE_KEY.equals(ExternalSystemApiUtil.getExternalModuleType(module));
    return externalProjectId != null ? findExternalProject(parentProject, externalProjectId, isSourceSet)
                                     : Collections.emptyMap();
  }

  @NotNull
  private static Map<String, ExternalSourceSet> findExternalProject(@NotNull ExternalProject parentProject,
                                                                    @NotNull String externalProjectId,
                                                                    boolean isSourceSet) {
    ArrayDeque<ExternalProject> queue = new ArrayDeque<>();
    queue.add(parentProject);

    ExternalProject externalProject;
    while ((externalProject = queue.pollFirst()) != null) {
      final String projectId = externalProject.getId();
      boolean isRelatedProject = projectId.equals(externalProjectId);
      final Map<String, ExternalSourceSet> result = new HashMap<>();
      for (Map.Entry<String, ? extends ExternalSourceSet> sourceSetEntry : externalProject.getSourceSets().entrySet()) {
        final String sourceSetName = sourceSetEntry.getKey();
        final String sourceSetId = projectId + ":" + sourceSetName;
        if (isRelatedProject || (isSourceSet && externalProjectId.equals(sourceSetId))) {
          result.put(sourceSetName, sourceSetEntry.getValue());
        }
      }
      if(!result.isEmpty() || isRelatedProject) return result;

      queue.addAll(externalProject.getChildProjects().values());
    }

    return Collections.emptyMap();
  }

}


text:
package org.aries.runtime;

import org.aries.util.ObjectUtil;

public class BeanFactory {

	//TODO use ThreadLocal cache of classloaders here?

	public <T> T newInstance(String className) {
		ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
		return ObjectUtil.loadObject(className, classLoader);
	}

	public <T> T newInstance(Class<T> classObject) {
		return ObjectUtil.loadObject(classObject);
	}

}


text:
package org.knowm.xchange.bleutrade;

import java.io.IOException;
import java.util.List;

import org.knowm.xchange.BaseExchange;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeSpecification;
import org.knowm.xchange.bleutrade.dto.marketdata.BleutradeCurrency;
import org.knowm.xchange.bleutrade.dto.marketdata.BleutradeMarket;
import org.knowm.xchange.bleutrade.service.BleutradeAccountService;
import org.knowm.xchange.bleutrade.service.BleutradeMarketDataService;
import org.knowm.xchange.bleutrade.service.BleutradeMarketDataServiceRaw;
import org.knowm.xchange.bleutrade.service.BleutradeTradeService;
import org.knowm.xchange.utils.nonce.AtomicLongIncrementalTime2013NonceFactory;

import si.mazi.rescu.SynchronizedValueFactory;

public class BleutradeExchange extends BaseExchange implements Exchange {

  //until bluetrade offer more than one api key, it is invalid to create more than one nonce
  private static SynchronizedValueFactory<Long> nonceFactory = new AtomicLongIncrementalTime2013NonceFactory();

  @Override
  protected void initServices() {
    this.marketDataService = new BleutradeMarketDataService(this);
    this.accountService = new BleutradeAccountService(this);
    this.tradeService = new BleutradeTradeService(this);
  }

  @Override
  public ExchangeSpecification getDefaultExchangeSpecification() {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName());
    exchangeSpecification.setSslUri("https://bleutrade.com/api/");
    exchangeSpecification.setHost("bleutrade.com");
    exchangeSpecification.setPort(80);
    exchangeSpecification.setExchangeName("Bleutrade");
    exchangeSpecification.setExchangeDescription("Bleutrade is a bitcoin and altcoin exchange.");

    return exchangeSpecification;
  }

  @Override
  public SynchronizedValueFactory<Long> getNonceFactory() {

    return nonceFactory;
  }

  @Override
  public void remoteInit() throws IOException {
    List<BleutradeCurrency> currencies = ((BleutradeMarketDataServiceRaw) marketDataService).getBleutradeCurrencies();
    List<BleutradeMarket> markets = ((BleutradeMarketDataServiceRaw) marketDataService).getBleutradeMarkets();
    exchangeMetaData = BleutradeAdapters.adaptToExchangeMetaData(currencies, markets);
  }
}


text:
[class^="kdig-"], [class*=" kdig-"] {
  font-family: 'kdig';
  font-style: normal;
  font-weight: normal;

  /* fix buttons height */
  line-height: 1em;

  /* you can be more comfortable with increased icons size */
  /* font-size: 120%; */
}

.kdig-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-globe-inv { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-fork { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-beaker { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-sitemap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-beer { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-monitor { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-mobile { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-cascade { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-branch { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-tree { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-line { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-globe { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-cc { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-picture-outline { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-picture-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-desktop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-laptop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-tablet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-mobile-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-split { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-merge { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-parallel-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-globe-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.kdig-flow-parallel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }


text:
package org.apache.cordova;

import java.util.Hashtable;

import org.json.JSONException;
import org.json.JSONObject;

import android.annotation.TargetApi;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Bitmap;
import android.net.http.SslError;
import android.view.View;
import android.webkit.HttpAuthHandler;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.webkit.WebViewClient;

/**
 * This class is the WebViewClient that implements callbacks for our web view.
 * The kind of callbacks that happen here are regarding the rendering of the
 * document instead of the chrome surrounding it, such as onPageStarted(),
 * shouldOverrideUrlLoading(), etc. Related to but different than
 * CordovaChromeClient.
 *
 * @see WebViewClient
 * @see WebView guide
 * @see CordovaChromeClient
 * @see CordovaWebView
 */
public class AndroidWebViewClient extends WebViewClient {

    private static final String TAG = "AndroidWebViewClient";
    protected final CordovaInterface cordova;
    protected final AndroidWebView appView;
    protected final CordovaUriHelper helper;
    private boolean doClearHistory = false;
    boolean isCurrentlyLoading;

    /** The authorization tokens. */
    private Hashtable<String, AuthenticationToken> authenticationTokens = new Hashtable<String, AuthenticationToken>();

    public AndroidWebViewClient(CordovaInterface cordova, AndroidWebView view) {
        this.cordova = cordova;
        this.appView = view;
        helper = new CordovaUriHelper(cordova, view);
    }

    /**
     * Give the host application a chance to take over the control when a new url
     * is about to be loaded in the current WebView.
     *
     * @param view          The WebView that is initiating the callback.
     * @param url           The url to be loaded.
     * @return              true to override, false for default behavior
     */
	@Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return helper.shouldOverrideUrlLoading(url);
    }

    /**
     * On received http auth request.
     * The method reacts on all registered authentication tokens. There is one and only one authentication token for any host + realm combination
     */
    @Override
    public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {

        // Get the authentication token
        AuthenticationToken token = this.getAuthenticationToken(host, realm);
        if (token != null) {
            handler.proceed(token.getUserName(), token.getPassword());
        }
        else {
            // Handle 401 like we'd normally do!
            super.onReceivedHttpAuthRequest(view, handler, host, realm);
        }
    }

    /**
     * Notify the host application that a page has started loading.
     * This method is called once for each main frame load so a page with iframes or framesets will call onPageStarted
     * one time for the main frame. This also means that onPageStarted will not be called when the contents of an
     * embedded frame changes, i.e. clicking a link whose target is an iframe.
     *
     * @param view          The webview initiating the callback.
     * @param url           The url of the page.
     */
    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        super.onPageStarted(view, url, favicon);
        isCurrentlyLoading = true;
        LOG.d(TAG, "onPageStarted(" + url + ")");
        // Flush stale messages & reset plugins.
        this.appView.onPageReset();

        // Broadcast message that page has loaded
        this.appView.getPluginManager().postMessage("onPageStarted", url);
    }

    /**
     * Notify the host application that a page has finished loading.
     * This method is called only for main frame. When onPageFinished() is called, the rendering picture may not be updated yet.
     *
     *
     * @param view          The webview initiating the callback.
     * @param url           The url of the page.
     */
    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);
        // Ignore excessive calls.
        if (!isCurrentlyLoading) {
            return;
        }
        isCurrentlyLoading = false;
        LOG.d(TAG, "onPageFinished(" + url + ")");

        /**
         * Because of a timing issue we need to clear this history in onPageFinished as well as
         * onPageStarted. However we only want to do this if the doClearHistory boolean is set to
         * true. You see when you load a url with a # in it which is common in jQuery applications
         * onPageStared is not called. Clearing the history at that point would break jQuery apps.
         */
        if (this.doClearHistory) {
            view.clearHistory();
            this.doClearHistory = false;
        }

        // Clear timeout flag
        appView.loadUrlTimeout++;

        // Broadcast message that page has loaded
        this.appView.getPluginManager().postMessage("onPageFinished", url);

        // Make app visible after 2 sec in case there was a JS error and Cordova JS never initialized correctly
        if (this.appView.getVisibility() == View.INVISIBLE) {
            Thread t = new Thread(new Runnable() {
                public void run() {
                    try {
                        Thread.sleep(2000);
                        cordova.getActivity().runOnUiThread(new Runnable() {
                            public void run() {
                                appView.getPluginManager().postMessage("spinner", "stop");
                            }
                        });
                    } catch (InterruptedException e) {
                    }
                }
            });
            t.start();
        }

        // Shutdown if blank loaded
        if (url.equals("about:blank")) {
            appView.getPluginManager().postMessage("exit", null);
        }
    }

    /**
     * Report an error to the host application. These errors are unrecoverable (i.e. the main resource is unavailable).
     * The errorCode parameter corresponds to one of the ERROR_* constants.
     *
     * @param view          The WebView that is initiating the callback.
     * @param errorCode     The error code corresponding to an ERROR_* value.
     * @param description   A String describing the error.
     * @param failingUrl    The url that failed to load.
     */
    @Override
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
        // Ignore error due to stopLoading().
        if (!isCurrentlyLoading) {
            return;
        }
        LOG.d(TAG, "CordovaWebViewClient.onReceivedError: Error code=%s Description=%s URL=%s", errorCode, description, failingUrl);

        // Clear timeout flag
        appView.loadUrlTimeout++;

        // If this is a "Protocol Not Supported" error, then revert to the previous
        // page. If there was no previous page, then punt. The application's config
        // is likely incorrect (start page set to sms: or something like that)
        if (errorCode == WebViewClient.ERROR_UNSUPPORTED_SCHEME) {
            if (view.canGoBack()) {
                view.goBack();
                return;
            } else {
                super.onReceivedError(view, errorCode, description, failingUrl);
            }
        }

        // Handle other errors by passing them to the webview in JS
        JSONObject data = new JSONObject();
        try {
            data.put("errorCode", errorCode);
            data.put("description", description);
            data.put("url", failingUrl);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        this.appView.getPluginManager().postMessage("onReceivedError", data);
    }

    /**
     * Notify the host application that an SSL error occurred while loading a resource.
     * The host application must call either handler.cancel() or handler.proceed().
     * Note that the decision may be retained for use in response to future SSL errors.
     * The default behavior is to cancel the load.
     *
     * @param view          The WebView that is initiating the callback.
     * @param handler       An SslErrorHandler object that will handle the user's response.
     * @param error         The SSL error object.
     */
    @TargetApi(8)
    @Override
    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

        final String packageName = this.cordova.getActivity().getPackageName();
        final PackageManager pm = this.cordova.getActivity().getPackageManager();

        ApplicationInfo appInfo;
        try {
            appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
            if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
                // debug = true
                handler.proceed();
                return;
            } else {
                // debug = false
                super.onReceivedSslError(view, handler, error);
            }
        } catch (NameNotFoundException e) {
            // When it doubt, lock it out!
            super.onReceivedSslError(view, handler, error);
        }
    }

    /**
     * Sets the authentication token.
     *
     * @param authenticationToken
     * @param host
     * @param realm
     */
    public void setAuthenticationToken(AuthenticationToken authenticationToken, String host, String realm) {
        if (host == null) {
            host = "";
        }
        if (realm == null) {
            realm = "";
        }
        this.authenticationTokens.put(host.concat(realm), authenticationToken);
    }

    /**
     * Removes the authentication token.
     *
     * @param host
     * @param realm
     *
     * @return the authentication token or null if did not exist
     */
    public AuthenticationToken removeAuthenticationToken(String host, String realm) {
        return this.authenticationTokens.remove(host.concat(realm));
    }

    /**
     * Gets the authentication token.
     *
     * In order it tries:
     * 1- host + realm
     * 2- host
     * 3- realm
     * 4- no host, no realm
     *
     * @param host
     * @param realm
     *
     * @return the authentication token
     */
    public AuthenticationToken getAuthenticationToken(String host, String realm) {
        AuthenticationToken token = null;
        token = this.authenticationTokens.get(host.concat(realm));

        if (token == null) {
            // try with just the host
            token = this.authenticationTokens.get(host);

            // Try the realm
            if (token == null) {
                token = this.authenticationTokens.get(realm);
            }

            // if no host found, just query for default
            if (token == null) {
                token = this.authenticationTokens.get("");
            }
        }

        return token;
    }

    /**
     * Clear all authentication tokens.
     */
    public void clearAuthenticationTokens() {
        this.authenticationTokens.clear();
    }
}


text:
# Plainion.Tests.Composition.DecoratorChainCatalogTests

**Namespace:** Plainion.Tests.Composition

**Assembly:** Plainion.Core.Tests

## Constructors

### Constructor()

## Methods

### void Compose_DecoratorGiven_DecoratedInstanceIsImported()


text:
/**
 *
 * No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 1.6.0
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.gatebuzz.oxfordapi.model;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * description of thesaurus information of a word
 */
public class HeadwordThesaurus   {
  @SerializedName("id")
  private String id = null;

  @SerializedName("language")
  private String language = null;

  @SerializedName("lexicalEntries")
  private List<ThesaurusLexicalEntry> lexicalEntries = new ArrayList<ThesaurusLexicalEntry>();

  @SerializedName("type")
  private String type = null;

  @SerializedName("word")
  private String word = null;

  public HeadwordThesaurus id(String id) {
    this.id = id;
    return this;
  }

   /**
   * The identifier of a word
   * @return id
  **/
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public HeadwordThesaurus language(String language) {
    this.language = language;
    return this;
  }

   /**
   * IANA language code
   * @return language
  **/
  public String getLanguage() {
    return language;
  }

  public void setLanguage(String language) {
    this.language = language;
  }

  public HeadwordThesaurus lexicalEntries(List<ThesaurusLexicalEntry> lexicalEntries) {
    this.lexicalEntries = lexicalEntries;
    return this;
  }

  public HeadwordThesaurus addLexicalEntriesItem(ThesaurusLexicalEntry lexicalEntriesItem) {
    this.lexicalEntries.add(lexicalEntriesItem);
    return this;
  }

   /**
   * A grouping of various senses in a specific language, and a lexical category that relates to a word
   * @return lexicalEntries
  **/
  public List<ThesaurusLexicalEntry> getLexicalEntries() {
    return lexicalEntries;
  }

  public void setLexicalEntries(List<ThesaurusLexicalEntry> lexicalEntries) {
    this.lexicalEntries = lexicalEntries;
  }

  public HeadwordThesaurus type(String type) {
    this.type = type;
    return this;
  }

   /**
   * The json object type. Could be 'headword', 'inflection' or 'phrase'
   * @return type
  **/
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public HeadwordThesaurus word(String word) {
    this.word = word;
    return this;
  }

   /**
   * A given written or spoken realisation of a an entry, lowercased.
   * @return word
  **/
  public String getWord() {
    return word;
  }

  public void setWord(String word) {
    this.word = word;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    HeadwordThesaurus headwordThesaurus = (HeadwordThesaurus) o;
    return Objects.equals(this.id, headwordThesaurus.id) &&
        Objects.equals(this.language, headwordThesaurus.language) &&
        Objects.equals(this.lexicalEntries, headwordThesaurus.lexicalEntries) &&
        Objects.equals(this.type, headwordThesaurus.type) &&
        Objects.equals(this.word, headwordThesaurus.word);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, language, lexicalEntries, type, word);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class HeadwordThesaurus {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    language: ").append(toIndentedString(language)).append("\n");
    sb.append("    lexicalEntries: ").append(toIndentedString(lexicalEntries)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    word: ").append(toIndentedString(word)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}


text: "Collective Unconscious".


text:
Suppresses normal console output.

```csharp
public bool IsQuiet { get; set; }
```

## See Also

* class [FileGeneratorSettings](../FileGeneratorSettings.md)
* namespace [Facility.Definition.CodeGen](../../Facility.Definition.md)

<!-- DO NOT EDIT: generated by xmldocmd for Facility.Definition.dll -->


text:
package me.jameshunt.hierarchyview;

/**
 * Created by James on 6/28/2017.
 */

interface PreComputedHeight {

    int getPreComputedHeight(int widthMeasureSpec);
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.3.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
  </parent>

  <groupId>com.azure</groupId>
  <artifactId>azure-spring-boot-sample-servicebus-jms-topic</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>

  <name>Azure Spring Boot Starter Sample - Service Bus JMS Topic</name>
  <description>Sample project for Spring Boot Service Bus JMS Starter</description>
  <url>https://github.com/Azure/azure-sdk-for-java</url>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-spring-boot-starter-servicebus-jms</artifactId>
      <version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-boot-starter-servicebus-jms;current} -->
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-test-autoconfigure</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>


text:
package My::Docker::DB::Schema;
use strict;
use warnings;
use utf8;

use Teng::Schema::Declare;

base_row_class 'My::Docker::DB::Row';

table {
    name 'member';
    pk 'id';
    columns qw(id name);
};

1;


text:
enum kViewTag {
    kViewTag_Message = 99,
    kViewTag_NotificationFrame,
    kViewTag_ActivityIndicator,
    kViewTag_MessageLabel,
};

static GNotificationAppearance *_sharedAppearance = nil;

@implementation GCustomNotification

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];

    if (self) {
    }

    return self;
}

#pragma mark -
#pragma mark Static Methods

+ (void) positionUIView:(UIView *)viewA inView:(UIView *)viewB
{
    float centeredX = (viewB.frame.size.width - viewA.frame.size.width) / 2.0;
    float centeredY = (viewB.frame.size.height - viewA.frame.size.height) / 2.0;
    viewA.frame = CGRectMake(centeredX, centeredY, viewA.frame.size.width, viewA.frame.size.height);
}

+ (GCustomNotification *) notificationViewWithMessage:(NSString *) message
                                        activityIndicator:(BOOL) hasActivityIndicator
                                         totalDismissTime:(NSTimeInterval) interval
{
    GCustomNotification *customNotificationView = [[GCustomNotification alloc] initWithMessage:message andDismissAfterTime:interval];

    if (hasActivityIndicator) {
        [GCustomNotification pushActivityIndicatorInCustomView:customNotificationView];
    }

    return customNotificationView;
}

+ (GCustomNotification *) showNotificationInView:(UIView*) view
                                         withMessage:(NSString *) message
                               withActivityIndicator:(BOOL) hasActivityIndicator
                                        forTotalTime:(NSTimeInterval) interval
{
    GCustomNotification *customView = [GCustomNotification notificationViewWithMessage:message
                                                                             activityIndicator:hasActivityIndicator
                                                                              totalDismissTime:interval];
    [self positionUIView:customView inView:view];
    [view addSubview:customView];
    return customView;
}

+ (GCustomNotification *) showNotificationInView:(UIView*) view
                                         withMessage:(NSString *) message
                               withActivityIndicator:(BOOL) hasActivityIndicator
                               dismissOnNotification:(NSString *) notificationName
{

    GCustomNotification *customView = [GCustomNotification notificationViewWithMessage:message
                                                                             activityIndicator:hasActivityIndicator
                                                                              totalDismissTime:kNoDismissInterval];
    // Listen in notification Center
    if (notificationName) {
       [[NSNotificationCenter defaultCenter] addObserver:customView
                                                 selector:@selector(dismissOnNotification:)
                                                     name:notificationName
                                                  object:nil];
    }

    [self positionUIView:customView inView:view];
    [view addSubview:customView];
    return customView;
}

+ (void) pushActivityIndicatorInCustomView:(GCustomNotification *) customView
{
    UIActivityIndicatorView *indicatorView = [customView createActivityIndicator];
    UILabel *messageView = (UILabel *)[customView viewWithTag:kViewTag_MessageLabel];
    CGSize sz = [messageView.text sizeWithFont:messageView.font];

    // The alignment of the text is not centered for easier placement of the UIActivityIndicatorView
    messageView.textAlignment = UITextAlignmentRight;
    float widthWithIndicator = sz.width + indicatorView.frame.size.width * 1.2f;
    float centeredX = (customView.frame.size.width - widthWithIndicator) / 2.0f;
    float centeredIndicatorY = (messageView.frame.size.height - indicatorView.frame.size.height) / 2.0f;

    // Adjust the Activity Indicator Y position so that it's centered with the Message Label
    indicatorView.frame = CGRectMake(indicatorView.frame.origin.x,
                                     centeredIndicatorY,
                                     indicatorView.frame.size.width,
                                     indicatorView.frame.size.height);

    // Adjust the Message View Frame to our indicator
    messageView.frame = CGRectMake(centeredX,
                                   messageView.frame.origin.y,
                                   widthWithIndicator,
                                   sz.height);

    customView.activityIndicator = indicatorView;
    [messageView addSubview:indicatorView];
}

+ (GCustomNotification *) notificationWithMessage:(NSString *) message forTotalTime:(NSTimeInterval) interval
{
    GCustomNotification *customView = [[GCustomNotification alloc] initWithMessage:message andDismissAfterTime:interval];
    return customView;
}

+ (GNotificationAppearance *) sharedAppearance
{
    if (!_sharedAppearance) {
        _sharedAppearance = [GAppearanceFactory defaultAppearance];
    }

    return _sharedAppearance;
}

#pragma mark -
#pragma mark Non Static Methods

- (id) initWithMessage:(NSString *) message andDismissAfterTime:(NSTimeInterval) interval
{
    if (!self.notificationAppearance) {
        self.notificationAppearance = [GCustomNotification sharedAppearance];
    }

    if (self = [super init]) {
        // First we create the UILabelView in order to match the Size
        UILabel *label = [[UILabel alloc] init];
        label.text = message;
        label.font = _notificationAppearance.font;
        label.textColor = _notificationAppearance.textColor;
        label.textAlignment = _notificationAppearance.textAlignment;
        label.shadowOffset = _notificationAppearance.shadowOffset;
        label.shadowColor = _notificationAppearance.shadowColor;
        label.backgroundColor = [UIColor clearColor];
        label.tag = kViewTag_MessageLabel;

        CGSize sz = [label.text sizeWithFont:label.font];

        // Now that we have the exact label size we can give our notification view a proper size
        _notificationView = [[UIView alloc] init];
        _notificationView.frame = CGRectMake(0, 0, sz.width * 2.0f, sz.height * 2.0f);
        super.frame = _notificationView.frame;

        // Adjust our label to the Notification View Frame
        label.frame = CGRectMake(0,
                                 (_notificationView.frame.size.height / 2.0f - sz.height / 2.0),
                                 _notificationView.frame.size.width,
                                 sz.height);

        // Perform View Customization
        _notificationView.backgroundColor = _notificationAppearance.backgroundColor;
        _notificationView.alpha = 0.0;
        _notificationView.layer.cornerRadius = _notificationAppearance.cornerRadius;
        _notificationView.layer.masksToBounds = YES;
        _notificationView.tag = kViewTag_NotificationFrame;
        [self addSubview:_notificationView];
        [_notificationView addSubview:label];

        [UIView animateWithDuration:0.4
                         animations:^ {_notificationView.alpha = _notificationAppearance.backgroundAlpha;}
                         completion:nil];

        if (interval != kNoDismissInterval) {
            [self performSelector:@selector(dismiss:) withObject:_notificationView afterDelay:interval];
        }
    }

    return self;
}

- (UIActivityIndicatorView *) createActivityIndicator
{
    UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:_notificationAppearance.activityIndicatorStyle];
    activityIndicator.tag = kViewTag_ActivityIndicator;
    activityIndicator.hidesWhenStopped = YES;
    [activityIndicator startAnimating];
    return activityIndicator;
}

- (void) dismissOnNotification:(NSNotification *) notification
{
    [self removeFromSuperview];
}

- (void) dismiss:(UIView *) view
{
    [UIView animateWithDuration:0.4
                     animations:^ {
                         view.alpha = 0.0;
                     }
                     completion:^(BOOL didFinish) {
                         [self removeFromSuperview];
                     }];
}

- (GNotificationAppearance *) appearance
{
    if (!_notificationAppearance) {
        _notificationAppearance = _sharedAppearance = [GAppearanceFactory defaultAppearance];
    }
    return _notificationAppearance;
}

- (void) setAppearance:(GNotificationAppearance *)appearance
{
    _notificationAppearance = appearance;
}

@end


text:
Library to share target browsers between different front-end tools.
It is used in:

* [Autoprefixer]
* [babel-preset-env]
  (external config in `package.json` or `browserslist` files supported in 2.0)
* [eslint-plugin-compat]
* [stylelint-no-unsupported-browser-features]
* [postcss-normalize]

All tools that rely on Browserslist will find its config automatically,
when you add the following to `package.json`:

```json
{
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}
```

Or in `.browserslistrc` config:

```yaml
# Browsers that we support

> 1%
Last 2 versions
IE 10 # sorry
```

Developers set browsers list in queries like `last 2 version`
to be free from updating browser versions manually.
Browserslist will use [Can I Use] data for this queries.

Browserslist will take browsers queries from tool option,
`browserslist` config, `.browserslistrc` config,
`browserslist` section in `package.json` or environment variables.

You can test Browserslist queries in [online demo].

[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features
[eslint-plugin-compat]:                      https://github.com/amilajack/eslint-plugin-compat
[babel-preset-env]:                          https://github.com/babel/babel-preset-env
[postcss-normalize]:                         https://github.com/jonathantneal/postcss-normalize
[Autoprefixer]:                              https://github.com/postcss/autoprefixer
[online demo]:                               http://browserl.ist/
[Can I Use]:                                 http://caniuse.com/

## Tools
* [browserslist-useragent] check browser by user agent string
  to match Browserslist target browsers query.

[browserslist-useragent]: https://github.com/pastelsky/browserslist-useragent

## Queries

Browserslist will use browsers query from one of this sources:

1. Tool options. For example `browsers` option in Autoprefixer.
2. `BROWSERSLIST` environment variable.
3. `browserslist` config file in current or parent directories.
3. `.browserslistrc` config file in current or parent directories.
4. `browserslist` key in `package.json` file in current or parent directories.
5. If the above methods did not produce a valid result
   Browserslist will use defaults: `> 1%, last 2 versions, Firefox ESR`.

We recommend to write queries in `package.json`.

You can specify the versions by queries (case insensitive):

* `last 2 versions`: the last 2 versions for each browser.
* `last 2 Chrome versions`: the last 2 versions of Chrome browser.
* `last 2 major versions`: all minor/patch releases of the current
  and previous major versions.
* `last 2 iOS major versions`: all minor/patch releases of the current
  and previous major versions of iOS Safari.
* `> 5%` or `>= 5%`: versions selected by global usage statistics.
* `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code].
* `> 5% in alt-AS`: uses Asia region usage statistics. List of all region codes
  can be found at [`caniuse-lite/data/regions`].
* `> 5% in my stats`: uses [custom usage data].
* `ie 6-8`: selects an inclusive range of versions.
* `Firefox > 20`: versions of Firefox newer than 20.
* `Firefox >= 20`: versions of Firefox newer than or equal to 20.
* `Firefox < 20`: versions of Firefox less than 20.
* `Firefox <= 20`: versions of Firefox less than or equal to 20.
* `Firefox ESR`: the latest [Firefox ESR] version.
* `iOS 7`: the iOS browser version 7 directly.
* `extends browserslist-config-mycompany`: take queries from
  `browserslist-config-mycompany` npm package.
* `unreleased versions`: alpha and beta versions of each browser.
* `unreleased Chrome versions`: alpha and beta versions of Chrome browser.
* `not ie <= 8`: exclude browsers selected before by previous queries.
* `since 2013`: all versions released since year 2013
  (also `since 2013-03` and `since 2013-03-10`).

You can add `not ` to any query.

Browserslist works with separated versions of browsers.
You should avoid queries like `Firefox > 0`.

Multiple criteria are combined as a boolean `OR`. A browser version must match
at least one of the criteria to be selected.

All queries are based on the [Can I Use] support table,
e.g. `last 3 iOS versions` might select `8.4, 9.2, 9.3` (mixed major and minor),
whereas `last 3 Chrome versions` might select `50, 49, 48` (major only).

[`caniuse-lite/data/regions`]: https://github.com/ben-eb/caniuse-lite/tree/master/data/regions
[two-letter country code]:     http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
[custom usage data]:           #custom-usage-data
[Can I Use]:                   http://caniuse.com/

## Browsers

Names are case insensitive:

* `Android` for Android WebView.
* `Baidu` for Baidu Browser.
* `BlackBerry` or `bb` for Blackberry browser.
* `Chrome` for Google Chrome.
* `ChromeAndroid` or `and_chr` for Chrome for Android
* `Edge` for Microsoft Edge.
* `Electron` for Electron framework. It will be converted to Chrome version.
* `Explorer` or `ie` for Internet Explorer.
* `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile.
* `Firefox` or `ff` for Mozilla Firefox.
* `FirefoxAndroid` or `and_ff` for Firefox for Android.
* `iOS` or `ios_saf` for iOS Safari.
* `Opera` for Opera.
* `OperaMini` or `op_mini` for Opera Mini.
* `OperaMobile` or `op_mob` for Opera Mobile.
* `QQAndroid` or `and_qq` for QQ Browser for Android.
* `Safari` for desktop Safari.
* `Samsung` for Samsung Internet.
* `UCAndroid` or `and_uc` for UC Browser for Android.

## `package.json`

If you want to reduce config files in project root, you can specify
browsers in `package.json` with `browserslist` key:

```json
{
  "private": true,
  "dependencies": {
    "autoprefixer": "^6.5.4"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}
```

## Config File

Browserslist config should be named `.browserslistrc` or `browserslist`
and have browsers queries split by a new line. Comments starts with `#` symbol:

```yaml
# Browsers that we support

> 1%
Last 2 versions
IE 8 # sorry
```

Browserslist will check config in every directory in `path`.
So, if tool process `app/styles/main.css`, you can put config to root,
`app/` or `app/styles`.

You can specify direct path in `BROWSERSLIST_CONFIG` environment variables.

## Shareable Configs

You can use the following query to reference an exported Browserslist config
from another package:

```json
  "browserslist": [
    "extends browserslist-config-mycompany"
  ]
```

For security reasons, external configuration only supports packages that have
the `browserslist-config-` prefix. npm scoped packages are also supported, by
naming or prefixing the module with `@scope/browserslist-config`, such as
`@scope/browserslist-config` or `@scope/browserslist-config-mycompany`.

If you don't accept Browserslist queries from users, you can disable the
validation by using the `dangerousExtend` option:

```js
browserslist(queries, { path, dangerousExtend: true })
```

Because this uses `npm`'s resolution, you can also reference specific files
in a package:

```json
  "browserslist": [
    "extends browserslist-config-mycompany/desktop",
    "extends browserslist-config-mycompany/mobile"
  ]
```

When writing a shared Browserslist package, just export an array.
`browserslist-config-mycompany/index.js`:

```js
module.exports = [
  'last 2 versions',
  'ie 9'
]
```

## Environment Variables

If some tool use Browserslist inside, you can change browsers settings
by [environment variables]:

* `BROWSERSLIST` with browsers queries.

   ```sh
  BROWSERSLIST="> 5%" gulp css
   ```

* `BROWSERSLIST_CONFIG` with path to config file.

   ```sh
  BROWSERSLIST_CONFIG=./config/browserslist gulp css
   ```

* `BROWSERSLIST_ENV` with environments string.

   ```sh
  BROWSERSLIST_ENV="development" gulp css
   ```

* `BROWSERSLIST_STATS` with path to the custom usage data
  for `> 1% in my stats` query.

   ```sh
  BROWSERSLIST_STATS=./config/usage_data.json gulp css
   ```

* `BROWSERSLIST_DISABLE_CACHE` if you want to disable config reading cache.

   ```sh
  BROWSERSLIST_DISABLE_CACHE=1 gulp css
   ```

[environment variables]: https://en.wikipedia.org/wiki/Environment_variable

## Environments

You can also specify different browser queries for various environments.
Browserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV`
variables. If none of them is declared, Browserslist will firstly look
for `development` queries and then use defaults.

In `package.json`:

```js
  "browserslist": {
    "production": [
      "last 2 version",
      "ie 9"
    ],
    "development": [
      "last 1 version"
    ]
  }
```

In `.browserslistrc` config:

```ini
[production]
last 2 version
ie 9

[development]
last 1 version
```

## Custom Usage Data

If you have a website, you can query against the usage statistics of your site:

1. Import your Google Analytics data into [Can I Use].
   Press `Import…` button in Settings page.
2. Open browser DevTools on [Can I Use] and paste this snippet
   into the browser console:

    ```js
   var e=document.createElement('a');e.setAttribute('href', 'data:text/plain;charset=utf-8,'+encodeURIComponent(JSON.stringify(JSON.parse(localStorage['usage-data-by-id'])[localStorage['config-primary_usage']])));e.setAttribute('download','stats.json');document.body.appendChild(e);e.click();document.body.removeChild(e);
    ```
3. Save the data to a `browserslist-stats.json` file in your project.

Of course, you can generate usage statistics file by any other method.
File format should be like:

```js
{
  "ie": {
    "6": 0.01,
    "7": 0.4,
    "8": 1.5
  },
  "chrome": {
    …
  },
  …
}
```

Note that you can query against your custom usage data
while also querying against global or regional data.
For example, the query `> 1% in my stats, > 5% in US, 10%` is permitted.

[Can I Use]: http://caniuse.com/

## Webpack

If you plan to use Browserslist on client-side (e. g., tools like CodePen)
Browserslist could take big part of your bundle — about 150 KB.

But the biggest part of this size will be region usage statistics, which could
be useless for you. You can use `IgnorePlugin` in webpack to cut it:

```js
const webpackConfig = {
  …
  plugins: [
    new webpack.IgnorePlugin(/caniuse-lite\/data\/regions/)
  ]
}
```

This plugin will reduce Browserslist size from 150 KB to 6 KB. But you loose
`> 1% in US` queries support.

## JS API

```js
var browserslist = require('browserslist');

// Your CSS/JS build tool code
var process = function (source, opts) {
    var browsers = browserslist(opts.browsers, {
        stats: opts.stats,
        path:  opts.file,
        env:   opts.env
    });
    // Your code to add features for selected browsers
}
```

Queries can be a string `"> 5%, last 1 version"`
or an array `['> 5%', 'last 1 version']`.

If a query is missing, Browserslist will look for a config file.
You can provide a `path` option (that can be a file) to find the config file
relatively to it.

For non-JS environment and debug purpose you can use CLI tool:

```sh
browserslist "> 1%, last 2 versions"
```

## Coverage

You can get total users coverage for selected browsers by JS API:

```js
browserslist.coverage(browserslist('> 1%')) //=> 81.4
```

```js
browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1
```

Or by CLI:

```sh
$ browserslist --coverage "> 1%"
These browsers account for 81.4% of all users globally
```

```sh
$ browserslist --coverage=US "> 1% in US"
These browsers account for 83.1% of all users in the US
```

## Internal caches

Browserslist caches the configuration it reads from `package.json` and
`browserslist` files, as well as knowledge about the existence of files,
for the duration of the hosting process.

To clear these caches, use:

```js
browserslist.clearCaches();
```

To disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`
environment variable.


text:
//
// Pythagoras - a collection of geometry classes
// http://github.com/samskivert/pythagoras

package pythagoras.d;

import java.io.Serializable;

/**
 * Represents an arc defined by a framing rectangle, start angle, angular extend, and closure type.
 */
public class Arc extends AbstractArc implements Serializable
{
    private static final long serialVersionUID = -2351063986218111710L;

    /** The x-coordinate of this arc's framing rectangle. */
    public double x;

    /** The y-coordinate of this arc's framing rectangle. */
    public double y;

    /** The width of this arc's framing rectangle. */
    public double width;

    /** The height of this arc's framing rectangle. */
    public double height;

    /** The starting angle of this arc. */
    public double start;

    /** The angular extent of this arc. */
    public double extent;

    /**
     * Creates an open arc with frame (0x0+0+0) and zero angles.
     */
    public Arc () {
        this(OPEN);
    }

    /**
     * Creates an arc of the specified type with frame (0x0+0+0) and zero angles.
     */
    public Arc (int type) {
        setArcType(type);
    }

    /**
     * Creates an arc of the specified type with the specified framing rectangle, starting angle
     * and angular extent.
     */
    public Arc (double x, double y, double width, double height, double start, double extent, int type) {
        setArc(x, y, width, height, start, extent, type);
    }

    /**
     * Creates an arc of the specified type with the supplied framing rectangle, starting angle and
     * angular extent.
     */
    public Arc (IRectangle bounds, double start, double extent, int type) {
        setArc(bounds.x(), bounds.y(), bounds.width(), bounds.height(),
               start, extent, type);
    }

    @Override // from interface IArc
    public int arcType () {
        return type;
    }

    @Override // from interface IArc
    public double x () {
        return x;
    }

    @Override // from interface IArc
    public double y () {
        return y;
    }

    @Override // from interface IArc
    public double width () {
        return width;
    }

    @Override // from interface IArc
    public double height () {
        return height;
    }

    @Override // from interface IArc
    public double angleStart () {
        return start;
    }

    @Override // from interface IArc
    public double angleExtent () {
        return extent;
    }

    /**
     * Sets the type of this arc to the specified value.
     */
    public void setArcType (int type) {
        if (type != OPEN && type != CHORD && type != PIE) {
            throw new IllegalArgumentException("Invalid Arc type: " + type);
        }
        this.type = type;
    }

    /**
     * Sets the starting angle of this arc to the specified value.
     */
    public void setAngleStart (double start) {
        this.start = start;
    }

    /**
     * Sets the angular extent of this arc to the specified value.
     */
    public void setAngleExtent (double extent) {
        this.extent = extent;
    }

    /**
     * Sets the location, size, angular extents, and closure type of this arc to the specified
     * values.
     */
    public void setArc (double x, double y, double width, double height,
                        double start, double extent, int type) {
        setArcType(type);
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
        this.start = start;
        this.extent = extent;
    }

    /**
     * Sets the location, size, angular extents, and closure type of this arc to the specified
     * values.
     */
    public void setArc (XY point, IDimension size, double start, double extent, int type) {
        setArc(point.x(), point.y(), size.width(), size.height(), start, extent, type);
    }

    /**
     * Sets the location, size, angular extents, and closure type of this arc to the specified
     * values.
     */
    public void setArc (IRectangle rect, double start, double extent, int type) {
        setArc(rect.x(), rect.y(), rect.width(), rect.height(), start, extent, type);
    }

    /**
     * Sets the location, size, angular extents, and closure type of this arc to the same values as
     * the supplied arc.
     */
    public void setArc (IArc arc) {
        setArc(arc.x(), arc.y(), arc.width(), arc.height(), arc.angleStart(),
               arc.angleExtent(), arc.arcType());
    }

    /**
     * Sets the location, size, angular extents, and closure type of this arc based on the
     * specified values.
     */
    public void setArcByCenter (double x, double y, double radius,
                                double start, double extent, int type) {
        setArc(x - radius, y - radius, radius * 2f, radius * 2f, start, extent, type);
    }

    /**
     * Sets the location, size, angular extents, and closure type of this arc based on the
     * specified values.
     */
    public void setArcByTangent (XY p1, XY p2, XY p3, double radius) {
        // use simple geometric calculations of arc center, radius and angles by tangents
        double a1 = -Math.atan2(p1.y() - p2.y(), p1.x() - p2.x());
        double a2 = -Math.atan2(p3.y() - p2.y(), p3.x() - p2.x());
        double am = (a1 + a2) / 2f;
        double ah = a1 - am;
        double d = radius / Math.abs(Math.sin(ah));
        double x = p2.x() + d * Math.cos(am);
        double y = p2.y() - d * Math.sin(am);
        ah = ah >= 0f ? Math.PI * 1.5f - ah : Math.PI * 0.5f - ah;
        a1 = normAngle(Math.toDegrees(am - ah));
        a2 = normAngle(Math.toDegrees(am + ah));
        double delta = a2 - a1;
        if (delta <= 0f) {
            delta += 360f;
        }
        setArcByCenter(x, y, radius, a1, delta, type);
    }

    /**
     * Sets the starting angle of this arc to the angle defined by the supplied point relative to
     * the center of this arc.
     */
    public void setAngleStart (XY point) {
        double angle = Math.atan2(point.y() - centerY(), point.x() - centerX());
        setAngleStart(normAngle(-Math.toDegrees(angle)));
    }

    /**
     * Sets the starting angle and angular extent of this arc using two sets of coordinates. The
     * first set of coordinates is used to determine the angle of the starting point relative to
     * the arc's center. The second set of coordinates is used to determine the angle of the end
     * point relative to the arc's center. The arc will always be non-empty and extend
     * counterclockwise from the first point around to the second point.
     */
    public void setAngles (double x1, double y1, double x2, double y2) {
        double cx = centerX();
        double cy = centerY();
        double a1 = normAngle(-Math.toDegrees(Math.atan2(y1 - cy, x1 - cx)));
        double a2 = normAngle(-Math.toDegrees(Math.atan2(y2 - cy, x2 - cx)));
        a2 -= a1;
        if (a2 <= 0f) {
            a2 += 360f;
        }
        setAngleStart(a1);
        setAngleExtent(a2);
    }

    /**
     * Sets the starting angle and angular extent of this arc using two sets of coordinates. The
     * first set of coordinates is used to determine the angle of the starting point relative to
     * the arc's center. The second set of coordinates is used to determine the angle of the end
     * point relative to the arc's center. The arc will always be non-empty and extend
     * counterclockwise from the first point around to the second point.
     */
    public void setAngles (XY p1, XY p2) {
        setAngles(p1.x(), p1.y(), p2.x(), p2.y());
    }

    @Override // from RectangularShape
    public void setFrame (double x, double y, double width, double height) {
        setArc(x, y, width, height, angleStart(), angleExtent(), type);
    }

    private int type;
}


text:
package com.github.esarbanis.roolr.expression;

import com.github.esarbanis.roolr.EvaluationContext;

/**
 * Joins two expressions.
 *

 * Should break the evaluation with true, if the left side is false.
 *

 * @author Efthymis Sarmpanis
 */
public class Or extends Join {

    public Or(Expression left, Expression right) {
        super(left, right);
    }

    @Override
    public boolean evaluate(EvaluationContext context) {
        return left.evaluate(context) || right.evaluate(context);
    }
}


text:
package goexoml

import (
	"errors"
)

var _ = errors.New("_")

// Setter returns setter function for the field given
func (hangupReceiver *Hangup) Setter(field string) (setter func(interface{}) (*Hangup, error)) {

	return
}

// NewHangup return a new Hangup pointer
func NewHangup() *Hangup {
	return new(Hangup)
}

// IHangup The interface that satisfies all the methods for this struct
// IHangup asserts implementation of setters for all the fields of Hangup
type IHangup interface {
	Setter(string) func(interface{}) (*Hangup, error)
}

// AddHangup appends the verb to response
func (r *Response) AddHangup(hangup IHangup) *Response {
	r.Response = append(r.Response, hangup)
	return r
}


text:
div {
  _list-space: space;
  _list-comma: comma;
  _single-item: space; }

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


text:
package macromedia.asc.semantics;

import macromedia.asc.util.Context;

public class ConfigurationBuilder extends Builder {

	@Override
	public void build(Context cx, ObjectValue ob) {
		// TODO Auto-generated method stub
		objectValue = ob;
		contextId = cx.getId();
	}

}


text:
namespace extensions {

class ExtensionFunctionalTest : public ExtensionBrowserTest {
 public:
  void InstallExtensionSilently(ExtensionService* service,
                                const char* filename) {
    service->set_show_extensions_prompts(false);
    ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
    size_t num_before = registry->enabled_extensions().size();

    base::FilePath path = test_data_dir_.AppendASCII(filename);

    TestExtensionRegistryObserver extension_observer(registry);

    scoped_refptr<CrxInstaller> installer(CrxInstaller::CreateSilent(service));
    installer->set_is_gallery_install(false);
    installer->set_allow_silent_install(true);
    installer->set_install_source(Manifest::INTERNAL);
    installer->set_off_store_install_allow_reason(
        CrxInstaller::OffStoreInstallAllowedInTest);

    observer_->Watch(NOTIFICATION_CRX_INSTALLER_DONE,
                     content::Source<CrxInstaller>(installer.get()));

    installer->InstallCrx(path);
    observer_->Wait();

    size_t num_after = registry->enabled_extensions().size();
    EXPECT_EQ(num_before + 1, num_after);

    extension_observer.WaitForExtensionLoaded();
    const Extension* extension =
        registry->enabled_extensions().GetByID(last_loaded_extension_id());
    EXPECT_TRUE(extension);
  }
};

IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest,
                       PRE_TestAdblockExtensionCrash) {
  InstallExtensionSilently(extension_service(), "adblock.crx");
}

// Timing out on XP and Vista: http://crbug.com/387866
#if defined(OS_WIN)
#define MAYBE_TestAdblockExtensionCrash DISABLED_TestAdblockExtensionCrash
#else
#define MAYBE_TestAdblockExtensionCrash TestAdblockExtensionCrash
#endif
IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest,
                       MAYBE_TestAdblockExtensionCrash) {
  ExtensionService* service = extension_service();
  // Verify that the extension is enabled and allowed in incognito
  // is disabled.
  EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id()));
  EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile()));
}

// Failing on Linux: http://crbug.com/654945
#if defined(OS_LINUX)
#define MAYBE_TestSetExtensionsState DISABLED_TestSetExtensionsState
#else
#define MAYBE_TestSetExtensionsState TestSetExtensionsState
#endif
IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, MAYBE_TestSetExtensionsState) {
  InstallExtensionSilently(extension_service(), "google_talk.crx");

  // Disable the extension and verify.
  util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false);
  ExtensionService* service = extension_service();
  service->DisableExtension(last_loaded_extension_id(),
                            Extension::DISABLE_USER_ACTION);
  EXPECT_FALSE(service->IsExtensionEnabled(last_loaded_extension_id()));

  // Enable the extension and verify.
  util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false);
  service->EnableExtension(last_loaded_extension_id());
  EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id()));

  // Allow extension in incognito mode and verify.
  service->EnableExtension(last_loaded_extension_id());
  util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), true);
  EXPECT_TRUE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile()));

  // Disallow extension in incognito mode and verify.
  service->EnableExtension(last_loaded_extension_id());
  util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false);
  EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile()));
}

}  // namespace extensions


text:
layout: post
date: '2015-10-17'
title: "Weddington Way Alfred Angelo 7291L Sleeveless Floor-Length Mermaid/Trumpet"
category: Weddington Way
tags: [Weddington Way,Mermaid/Trumpet,One shoulder,Floor-Length,Sleeveless]
---
### Weddington Way Alfred Angelo 7291L
Just **$189.99**
###   Sleeveless Floor-Length Mermaid/Trumpet

BRANDS	Weddington Way

Silhouette	Mermaid/Trumpet

Neckline	One shoulder

Hemline/Train	Floor-Length

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/weddington-way/16048-weddington-way-alfred-angelo-7291l.html](https://www.readybrides.com/en/weddington-way/16048-weddington-way-alfred-angelo-7291l.html)


text:
define([
    "geometria/GMainContainer"
], function(mainContainer) {
    return {
        startUp: function(baseUrl) {
            mainContainer.startUp(baseUrl);
        }
    };
});


text:
sap.ui.define(['sap/ui/core/Renderer', 'sap/ui/layout/form/GridLayoutRenderer'],
	function(Renderer, LayoutGridLayoutRenderer) {
	"use strict";

	var GridLayoutRenderer = Renderer.extend(LayoutGridLayoutRenderer);

	return GridLayoutRenderer;

}, /* bExport= */ true);


text:
import { Component, OnInit } from '@angular/core';
import { HttpService, HttpPaths } from '../http.service';
import { SuperComponent } from '../super.component';

import { AppComponent } from '../app.component';

@Component({
  selector: 'app-dashboard',
  templateUrl: './dashboard.component.html',
  styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent extends SuperComponent implements OnInit {

  //root: Map<String, Object> = new Map<String, Object>();
  clusterHealth: Map<string, any> = new Map<string, any>();
  clusterStats: Map<string, any> = new Map<string, any>();
  nodesStats: Map<string, any> = new Map<string, any>();
  stats: Map<string, any> = new Map<string, any>();
  // indices: Map<string, any> = new Map<string, any>();

  constructor(private _appComponent: AppComponent, private _httpService: HttpService) {
    super();
  }

  ngOnInit() {
    // Cluster
    /*this._httpService.getResource(this._appComponent.esurl + '/_cluster/health').subscribe(
        root => this.root = root
    );*/
    this._httpService.getESResource(HttpPaths.CLUSTER_HEALTH).subscribe(
      clusterHealth => this.clusterHealth = clusterHealth
    );
    this._httpService.getESResource(HttpPaths.CLUSTER_STATS + '?filter_path=_shards,indices.count').subscribe(
      stats => this.clusterStats = stats
    );

    // Nodes
    this._httpService.getESResource(HttpPaths.NODES_STATS).subscribe(
      stats => this.nodesStats = stats
    );

    // Stats
    this._httpService.getESResource(HttpPaths.STATS).subscribe(
      stats => this.stats = stats
    );
  }

  refresh() {
    this.ngOnInit();
  }
}


text:
from __future__ import division
from __future__ import print_function

from builtins import bytes
from future.moves.urllib.parse import urlsplit
from future.moves.urllib.parse import urlunsplit
from future.utils import PY3
from future.utils import string_types
from future.utils import text_type

import calendar
import datetime
import itertools
import locale
import re
import textwrap
import time
import json

import dateutil.tz

from twisted.python import reflect
from twisted.python.versions import Version
from twisted.python.deprecate import deprecatedModuleAttribute

from zope.interface import implementer

from buildbot.interfaces import IConfigured
from buildbot.util.misc import deferredLocked
from buildbot.util.giturlparse import giturlparse
from ._notifier import Notifier

def naturalSort(array):
    array = array[:]

    def try_int(s):
        try:
            return int(s)
        except ValueError:
            return s

    def key_func(item):
        return [try_int(s) for s in re.split(r'(\d+)', item)]
    # prepend integer keys to each element, sort them, then strip the keys
    keyed_array = sorted([(key_func(i), i) for i in array])
    array = [i[1] for i in keyed_array]
    return array

def flattened_iterator(l, types=(list, tuple)):
    """
    Generator for a list/tuple that potentially contains nested/lists/tuples of arbitrary nesting
    that returns every individual non-list/tuple element.  In other words, [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]]
    will yield 5, 6, 8, 3, 2, 2, 1, 3, 4

    This is safe to call on something not a list/tuple - the original input is yielded.
    """
    if not isinstance(l, types):
        yield l
        return

    for element in l:
        for sub_element in flattened_iterator(element, types):
            yield sub_element

def flatten(l, types=(list, )):
    """
    Given a list/tuple that potentially contains nested lists/tuples of arbitrary nesting,
    flatten into a single dimension.  In other words, turn [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]]
    into [5, 6, 8, 3, 2, 2, 1, 3, 4]

    This is safe to call on something not a list/tuple - the original input is returned as a list
    """
    # For backwards compatibility, this returned a list, not an iterable.
    # Changing to return an iterable could break things.
    if not isinstance(l, types):
        return l
    return list(flattened_iterator(l, types))

def now(_reactor=None):
    if _reactor and hasattr(_reactor, "seconds"):
        return _reactor.seconds()
    return time.time()

def formatInterval(eta):
    eta_parts = []
    if eta > 3600:
        eta_parts.append("%d hrs" % (eta / 3600))
        eta %= 3600
    if eta > 60:
        eta_parts.append("%d mins" % (eta / 60))
        eta %= 60
    eta_parts.append("%d secs" % eta)
    return ", ".join(eta_parts)

@implementer(IConfigured)
class ComparableMixin(object):
    compare_attrs = ()

    class _None:
        pass

    def __hash__(self):
        compare_attrs = []
        reflect.accumulateClassList(
            self.__class__, 'compare_attrs', compare_attrs)

        alist = [self.__class__] + \
                [getattr(self, name, self._None) for name in compare_attrs]
        return hash(tuple(map(str, alist)))

    def _cmp_common(self, them):
        if type(self) != type(them):
            return (False, None, None)

        if self.__class__ != them.__class__:
            return (False, None, None)

        compare_attrs = []
        reflect.accumulateClassList(
            self.__class__, 'compare_attrs', compare_attrs)

        self_list = [getattr(self, name, self._None)
                     for name in compare_attrs]
        them_list = [getattr(them, name, self._None)
                     for name in compare_attrs]
        return (True, self_list, them_list)

    def __eq__(self, them):
        (isComparable, self_list, them_list) = self._cmp_common(them)
        if not isComparable:
            return False
        return self_list == them_list

    def __ne__(self, them):
        (isComparable, self_list, them_list) = self._cmp_common(them)
        if not isComparable:
            return True
        return self_list != them_list

    def __lt__(self, them):
        (isComparable, self_list, them_list) = self._cmp_common(them)
        if not isComparable:
            return False
        return self_list < them_list

    def __le__(self, them):
        (isComparable, self_list, them_list) = self._cmp_common(them)
        if not isComparable:
            return False
        return self_list <= them_list

    def __gt__(self, them):
        (isComparable, self_list, them_list) = self._cmp_common(them)
        if not isComparable:
            return False
        return self_list > them_list

    def __ge__(self, them):
        (isComparable, self_list, them_list) = self._cmp_common(them)
        if not isComparable:
            return False
        return self_list >= them_list

    def getConfigDict(self):
        compare_attrs = []
        reflect.accumulateClassList(
            self.__class__, 'compare_attrs', compare_attrs)
        return dict([(k, getattr(self, k)) for k in compare_attrs
                     if hasattr(self, k) and k not in ("passwd", "password")])

def diffSets(old, new):
    if not isinstance(old, set):
        old = set(old)
    if not isinstance(new, set):
        new = set(new)
    return old - new, new - old

# Remove potentially harmful characters from builder name if it is to be
# used as the build dir.
badchars_map = bytes.maketrans(b"\t !#$%&'()*+,./:;<=>?@[\\]^{|}~",
                               b"______________________________")

def safeTranslate(s):
    if isinstance(s, text_type):
        s = s.encode('utf8')
    return s.translate(badchars_map)

def encodeString(s, encoding='utf-8'):
    if isinstance(s, text_type):
        return s.encode(encoding)
    return s

def none_or_str(x):
    if x is not None and not isinstance(x, str):
        return str(x)
    return x

def unicode2bytes(x, encoding='utf-8', errors='strict'):
    if isinstance(x, text_type):
        x = x.encode(encoding, errors)
    return x

def bytes2unicode(x, encoding='utf-8', errors='strict'):
    if isinstance(x, (text_type, type(None))):
        return x
    return text_type(x, encoding, errors)

def ascii2unicode(x, errors='strict'):
    return bytes2unicode(x, encoding='ascii', errors=errors)

def bytes2NativeString(x, encoding='utf-8', errors='strict'):
    """
    Convert C{bytes} to a native C{str}.

    On Python 3 and higher, str and bytes
    are not equivalent.  In this case, decode
    the bytes, and return a native string.

    On Python 2 and lower, str and bytes
    are equivalent.  In this case, just
    just return the native string.

    @param x: a string of type C{bytes}
    @param encoding: an optional codec, default: 'utf-8'
    @return: a string of type C{str}
    """
    if isinstance(x, bytes) and PY3:
        # On Python 3 and higher, type("") != type(b"")
        # so we need to decode() to return a native string.
        return x.decode(encoding, errors)
    return x

def unicode2NativeString(x, encoding='utf-8', errors='strict'):
    """
    Convert C{unicode} to a native C{str}.

    On Python 3 and higher, the unicode type is gone,
    replaced by str.   In this case, do nothing
    and just return the native string.

    On Python 2 and lower, unicode and str are separate types.
    In this case, encode() to return the native string.

    @param x: a string of type C{unicode}
    @param encoding: an optional codec, default: 'utf-8'
    @return: a string of type C{str}
    """
    if isinstance(x, text_type) and not PY3:
        # On Python 2 and lower, type(u"") != type("")
        # so we need to encode() to return a native string.
        return x.encode(encoding, errors)
    return x

_hush_pyflakes = [json]

deprecatedModuleAttribute(
    Version("buildbot", 0, 9, 4),
    message="Use json from the standard library instead.",
    moduleName="buildbot.util",
    name="json",
)

def toJson(obj):
    if isinstance(obj, datetime.datetime):
        return datetime2epoch(obj)

# changes and schedulers consider None to be a legitimate name for a branch,
# which makes default function keyword arguments hard to handle.  This value
# is always false.

class NotABranch:

    def __bool__(self):
        return False
    if not PY3:
        __nonzero__ = __bool__

NotABranch = NotABranch()

# time-handling methods

# this used to be a custom class; now it's just an instance of dateutil's class
UTC = dateutil.tz.tzutc()

def epoch2datetime(epoch):
    """Convert a UNIX epoch time to a datetime object, in the UTC timezone"""
    if epoch is not None:
        return datetime.datetime.fromtimestamp(epoch, tz=UTC)

def datetime2epoch(dt):
    """Convert a non-naive datetime object to a UNIX epoch timestamp"""
    if dt is not None:
        return calendar.timegm(dt.utctimetuple())

# TODO: maybe "merge" with formatInterval?
def human_readable_delta(start, end):
    """
    Return a string of human readable time delta.
    """
    start_date = datetime.datetime.fromtimestamp(start)
    end_date = datetime.datetime.fromtimestamp(end)
    delta = end_date - start_date

    result = []
    if delta.days > 0:
        result.append('%d days' % (delta.days,))
    if delta.seconds > 0:
        hours = int(delta.seconds / 3600)
        if hours > 0:
            result.append('%d hours' % (hours,))
        minutes = int((delta.seconds - hours * 3600) / 60)
        if minutes:
            result.append('%d minutes' % (minutes,))
        seconds = delta.seconds % 60
        if seconds > 0:
            result.append('%d seconds' % (seconds,))

    if result:
        return ', '.join(result)
    return 'super fast'

def makeList(input):
    if isinstance(input, string_types):
        return [input]
    elif input is None:
        return []
    return list(input)

def in_reactor(f):
    """decorate a function by running it with maybeDeferred in a reactor"""
    def wrap(*args, **kwargs):
        from twisted.internet import reactor, defer
        result = []

        def async():
            d = defer.maybeDeferred(f, *args, **kwargs)

            @d.addErrback
            def eb(f):
                f.printTraceback()

            @d.addBoth
            def do_stop(r):
                result.append(r)
                reactor.stop()
        reactor.callWhenRunning(async)
        reactor.run()
        return result[0]
    wrap.__doc__ = f.__doc__
    wrap.__name__ = f.__name__
    wrap._orig = f  # for tests
    return wrap

def string2boolean(str):
    return {
        b'on': True,
        b'true': True,
        b'yes': True,
        b'1': True,
        b'off': False,
        b'false': False,
        b'no': False,
        b'0': False,
    }[str.lower()]

def asyncSleep(delay):
    from twisted.internet import reactor, defer
    d = defer.Deferred()
    reactor.callLater(delay, d.callback, None)
    return d

def check_functional_environment(config):
    try:
        locale.getdefaultlocale()
    except KeyError:
        config.error("\n".join([
            "Your environment has incorrect locale settings. This means python cannot handle strings safely.",
            " Please check 'LANG', 'LC_CTYPE', 'LC_ALL' and 'LANGUAGE'"
            " are either unset or set to a valid locale.",
        ]))

_netloc_url_re = re.compile(r':[^@]*@')

def stripUrlPassword(url):
    parts = list(urlsplit(url))
    parts[1] = _netloc_url_re.sub(':xxxx@', parts[1])
    return urlunsplit(parts)

def join_list(maybeList):
    if isinstance(maybeList, (list, tuple)):
        return u' '.join(ascii2unicode(s) for s in maybeList)
    return ascii2unicode(maybeList)

def command_to_string(command):
    words = command
    if isinstance(words, (bytes, string_types)):
        words = words.split()

    try:
        len(words)
    except (AttributeError, TypeError):
        # WithProperties and Property don't have __len__
        # For old-style classes instances AttributeError raised,
        # for new-style classes instances - TypeError.
        return None

    # flatten any nested lists
    words = flatten(words, (list, tuple))

    # strip instances and other detritus (which can happen if a
    # description is requested before rendering)
    stringWords = []
    for w in words:
        if isinstance(w, (bytes, string_types)):
            # If command was bytes, be gentle in
            # trying to covert it.
            w = ascii2unicode(w, "replace")
            stringWords.append(w)
    words = stringWords

    if len(words) < 1:
        return None
    if len(words) < 3:
        rv = "'%s'" % (' '.join(words))
    else:
        rv = "'%s ...'" % (' '.join(words[:2]))

    return rv

def rewrap(text, width=None):
    """
    Rewrap text for output to the console.

    Removes common indentation and rewraps paragraphs according to the console
    width.

    Line feeds between paragraphs preserved.
    Formatting of paragraphs that starts with additional indentation
    preserved.
    """

    if width is None:
        width = 80

    # Remove common indentation.
    text = textwrap.dedent(text)

    def needs_wrapping(line):
        # Line always non-empty.
        return not line[0].isspace()

    # Split text by lines and group lines that comprise paragraphs.
    wrapped_text = ""
    for do_wrap, lines in itertools.groupby(text.splitlines(True),
                                            key=needs_wrapping):
        paragraph = ''.join(lines)

        if do_wrap:
            paragraph = textwrap.fill(paragraph, width)

        wrapped_text += paragraph

    return wrapped_text

def dictionary_merge(a, b):
    """merges dictionary b into a
       Like dict.update, but recursive
    """
    for key, value in b.items():
        if key in a and isinstance(a[key], dict) and isinstance(value, dict):
            dictionary_merge(a[key], b[key])
            continue
        a[key] = b[key]
    return a

__all__ = [
    'naturalSort', 'now', 'formatInterval', 'ComparableMixin',
    'safeTranslate', 'none_or_str',
    'NotABranch', 'deferredLocked', 'UTC',
    'diffSets', 'makeList', 'in_reactor', 'string2boolean',
    'check_functional_environment', 'human_readable_delta',
    'rewrap',
    'Notifier',
    "giturlparse",
]


text:
<?php

namespace Nin\Database\Results;

use Nin\Database\Result;

class MySQL extends Result
{
	private $res;
	private $insert_id;

	public function __construct($res, $insert_id = false)
	{
		$this->res = $res;
		$this->insert_id = $insert_id;
	}

	public function fetch_assoc()
	{
		return $this->res->fetch_assoc();
	}

	public function insert_id($key = 'ID')
	{
		return $this->insert_id;
	}

	public function num_rows()
	{
		return $this->res->num_rows;
	}
}


text:
<?php
/**
 * DO NOT EDIT THIS FILE!
 *
 * This file was automatically generated from external sources.
 *
 * Any manual change here will be lost the next time the SDK
 * is updated. You've been warned!
 */

namespace DTS\eBaySDK\Trading\Enums;

class EndReasonCodeType
{
    const C_CUSTOM_CODE = 'CustomCode';
    const C_INCORRECT = 'Incorrect';
    const C_LOST_OR_BROKEN = 'LostOrBroken';
    const C_NOT_AVAILABLE = 'NotAvailable';
    const C_OTHER_LISTING_ERROR = 'OtherListingError';
    const C_SELL_TO_HIGH_BIDDER = 'SellToHighBidder';
    const C_SOLD = 'Sold';
}


text:
<!DOCTYPE html>

    <title>ImageRequestTarget Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>

Matisse Docs (100% documented)

        Matisse Reference

        ImageRequestTarget Protocol Reference

            Classes

                DefaultImageCreator

                DefaultImageLoader

                DefaultImageRequestHandler

                DiskImageCache

                ImageLoaderBase

                ImageRequest

                ImageRequestBuilder

                Matisse

                MatisseContext

                MemoryImageCache

                ResizeTransformation

            Enumerations

                MatisseErrorCode

            Extensions

                NSError

                UIImageView

            Protocols

                ImageCache

                ImageLoader

                ImageRequestHandler

                ImageRequestTarget

                ImageTransformation

ImageRequestTarget

public protocol ImageRequestTarget : AnyObject

An ImageRequestTarget specifies an object that can display the result of an ImageRequest

When a request is loaded into a target (using the showInTarget(_:) method on ImageRequestBuilder)
the handler calls updateForImageRequest(_:, image:, error:) on the target with the results
from the completion block. The target may then decide what it does with this information.

Additionally the handler associates the target with a request to make sure that multiple
request don’t overwrite now invalid targets. For this the request identifier is stored on
the target.

                    matisseRequestIdentifier

The identifier of the ImageRequest currently owning this target.

When a request finishes it checks to see wether the request is still
the owner of this target, and if not discards the results.

Declaration

Swift

var matisseRequestIdentifier: UUID? { get set }

                    update(forImageRequest:image:error:)

Update the target with the results of the given ImageRequest.

Declaration

Swift

func update(forImageRequest imageRequest: ImageRequest, image: UIImage?, error: NSError?)

Parameters

                                imageRequest

The ImageRequest whose results should be displayed.

                                image

The resolved image if the request was successful, or nil.

                                error

The error if the request failed, or nil.

© 2018 Markus Gasser. All rights reserved. (Last updated: 2018-11-07)

Generated by jazzy ♪♫ v0.9.4, a Realm project.