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

/**
 * @fileoverview Definition of goog.messaging.MultiChannel, which uses a
 * single underlying MessageChannel to carry several independent virtual message
 * channels.
 *
 */

goog.provide('goog.messaging.MultiChannel');
goog.provide('goog.messaging.MultiChannel.VirtualChannel');

goog.require('goog.Disposable');
goog.require('goog.events.EventHandler');
goog.require('goog.log');
goog.require('goog.messaging.MessageChannel'); // interface
goog.require('goog.object');

/**
 * Creates a new MultiChannel wrapping a single MessageChannel. The
 * underlying channel shouldn't have any other listeners registered, but it
 * should be connected.
 *
 * Note that the other side of the channel should also be connected to a
 * MultiChannel with the same number of virtual channels.
 *
 * @param {goog.messaging.MessageChannel} underlyingChannel The underlying
 *     channel to use as transport for the virtual channels.
 * @constructor
 * @extends {goog.Disposable}
 */
goog.messaging.MultiChannel = function(underlyingChannel) {
  goog.base(this);

  /**
   * The underlying channel across which all requests are sent.
   * @type {goog.messaging.MessageChannel}
   * @private
   */
  this.underlyingChannel_ = underlyingChannel;

  /**
   * All the virtual channels that are registered for this MultiChannel.
   * These are null if they've been disposed.
   * @type {Object.<?goog.messaging.MultiChannel.VirtualChannel>}
   * @private
   */
  this.virtualChannels_ = {};

  this.underlyingChannel_.registerDefaultService(
      goog.bind(this.handleDefault_, this));
};
goog.inherits(goog.messaging.MultiChannel, goog.Disposable);

/**
 * Logger object for goog.messaging.MultiChannel.
 * @type {goog.log.Logger}
 * @private
 */
goog.messaging.MultiChannel.prototype.logger_ =
    goog.log.getLogger('goog.messaging.MultiChannel');

/**
 * Creates a new virtual channel that will communicate across the underlying
 * channel.
 * @param {string} name The name of the virtual channel. Must be unique for this
 *     MultiChannel. Cannot contain colons.
 * @return {!goog.messaging.MultiChannel.VirtualChannel} The new virtual
 *     channel.
 */
goog.messaging.MultiChannel.prototype.createVirtualChannel = function(name) {
  if (name.indexOf(':') != -1) {
    throw Error(
        'Virtual channel name "' + name + '" should not contain colons');
  }

  if (name in this.virtualChannels_) {
    throw Error('Virtual channel "' + name + '" was already created for ' +
                'this multichannel.');
  }

  var channel =
      new goog.messaging.MultiChannel.VirtualChannel(this, name);
  this.virtualChannels_[name] = channel;
  return channel;
};

/**
 * Handles the default service for the underlying channel. This dispatches any
 * unrecognized services to the appropriate virtual channel.
 *
 * @param {string} serviceName The name of the service being called.
 * @param {string|!Object} payload The message payload.
 * @private
 */
goog.messaging.MultiChannel.prototype.handleDefault_ = function(
    serviceName, payload) {
  var match = serviceName.match(/^([^:]*):(.*)/);
  if (!match) {
    goog.log.warning(this.logger_,
        'Invalid service name "' + serviceName + '": no ' +
        'virtual channel specified');
    return;
  }

  var channelName = match[1];
  serviceName = match[2];
  if (!(channelName in this.virtualChannels_)) {
    goog.log.warning(this.logger_,
        'Virtual channel "' + channelName + ' does not ' +
        'exist, but a message was received for it: "' + serviceName + '"');
    return;
  }

  var virtualChannel = this.virtualChannels_[channelName];
  if (!virtualChannel) {
    goog.log.warning(this.logger_,
        'Virtual channel "' + channelName + ' has been ' +
        'disposed, but a message was received for it: "' + serviceName + '"');
    return;
  }

  if (!virtualChannel.defaultService_) {
    goog.log.warning(this.logger_,
        'Service "' + serviceName + '" is not registered ' +
        'on virtual channel "' + channelName + '"');
    return;
  }

  virtualChannel.defaultService_(serviceName, payload);
};

/** @override */
goog.messaging.MultiChannel.prototype.disposeInternal = function() {
  goog.object.forEach(this.virtualChannels_, function(channel) {
    goog.dispose(channel);
  });
  goog.dispose(this.underlyingChannel_);
  delete this.virtualChannels_;
  delete this.underlyingChannel_;
};

/**
 * A message channel that proxies its messages over another underlying channel.
 *
 * @param {goog.messaging.MultiChannel} parent The MultiChannel
 *     which created this channel, and which contains the underlying
 *     MessageChannel that's used as the transport.
 * @param {string} name The name of this virtual channel. Unique among the
 *     virtual channels in parent.
 * @constructor
 * @implements {goog.messaging.MessageChannel}
 * @extends {goog.Disposable}
 */
goog.messaging.MultiChannel.VirtualChannel = function(parent, name) {
  goog.base(this);

  /**
   * The MultiChannel containing the underlying transport channel.
   * @type {goog.messaging.MultiChannel}
   * @private
   */
  this.parent_ = parent;

  /**
   * The name of this virtual channel.
   * @type {string}
   * @private
   */
  this.name_ = name;
};
goog.inherits(goog.messaging.MultiChannel.VirtualChannel,
              goog.Disposable);

/**
 * The default service to run if no other services match.
 * @type {?function(string, (string|!Object))}
 * @private
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.defaultService_;

/**
 * Logger object for goog.messaging.MultiChannel.VirtualChannel.
 * @type {goog.log.Logger}
 * @private
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.logger_ =
    goog.log.getLogger(
        'goog.messaging.MultiChannel.VirtualChannel');

/**
 * This is a no-op, since the underlying channel is expected to already be
 * initialized when it's passed in.
 *
 * @override
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.connect =
    function(opt_connectCb) {
  if (opt_connectCb) {
    opt_connectCb();
  }
};

/**
 * This always returns true, since the underlying channel is expected to already
 * be initialized when it's passed in.
 *
 * @override
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.isConnected =
    function() {
  return true;
};

/**
 * @override
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.registerService =
    function(serviceName, callback, opt_objectPayload) {
  this.parent_.underlyingChannel_.registerService(
      this.name_ + ':' + serviceName,
      goog.bind(this.doCallback_, this, callback),
      opt_objectPayload);
};

/**
 * @override
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.
    registerDefaultService = function(callback) {
  this.defaultService_ = goog.bind(this.doCallback_, this, callback);
};

/**
 * @override
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.send =
    function(serviceName, payload) {
  if (this.isDisposed()) {
    throw Error('#send called for disposed VirtualChannel.');
  }

  this.parent_.underlyingChannel_.send(this.name_ + ':' + serviceName,
                                       payload);
};

/**
 * Wraps a callback with a function that will log a warning and abort if it's
 * called when this channel is disposed.
 *
 * @param {function()} callback The callback to wrap.
 * @param {...*} var_args Other arguments, passed to the callback.
 * @private
 */
goog.messaging.MultiChannel.VirtualChannel.prototype.doCallback_ =
    function(callback, var_args) {
  if (this.isDisposed()) {
    goog.log.warning(this.logger_,
        'Virtual channel "' + this.name_ + '" received ' +
        ' a message after being disposed.');
    return;
  }

  callback.apply({}, Array.prototype.slice.call(arguments, 1));
};

/** @override */
goog.messaging.MultiChannel.VirtualChannel.prototype.disposeInternal =
    function() {
  this.parent_.virtualChannels_[this.name_] = null;
  this.parent_ = null;
};


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html

module Stratosphere.ResourceProperties.ApiGatewayDeploymentMethodSetting where

import Stratosphere.ResourceImports
import Stratosphere.Types

-- | Full data type definition for ApiGatewayDeploymentMethodSetting. See
-- 'apiGatewayDeploymentMethodSetting' for a more convenient constructor.
data ApiGatewayDeploymentMethodSetting =
  ApiGatewayDeploymentMethodSetting
  { _apiGatewayDeploymentMethodSettingCacheDataEncrypted :: Maybe (Val Bool)
  , _apiGatewayDeploymentMethodSettingCacheTtlInSeconds :: Maybe (Val Integer)
  , _apiGatewayDeploymentMethodSettingCachingEnabled :: Maybe (Val Bool)
  , _apiGatewayDeploymentMethodSettingDataTraceEnabled :: Maybe (Val Bool)
  , _apiGatewayDeploymentMethodSettingHttpMethod :: Maybe (Val HttpMethod)
  , _apiGatewayDeploymentMethodSettingLoggingLevel :: Maybe (Val LoggingLevel)
  , _apiGatewayDeploymentMethodSettingMetricsEnabled :: Maybe (Val Bool)
  , _apiGatewayDeploymentMethodSettingResourcePath :: Maybe (Val Text)
  , _apiGatewayDeploymentMethodSettingThrottlingBurstLimit :: Maybe (Val Integer)
  , _apiGatewayDeploymentMethodSettingThrottlingRateLimit :: Maybe (Val Double)
  } deriving (Show, Eq)

instance ToJSON ApiGatewayDeploymentMethodSetting where
  toJSON ApiGatewayDeploymentMethodSetting{..} =
    object $
    catMaybes
    [ fmap (("CacheDataEncrypted",) . toJSON) _apiGatewayDeploymentMethodSettingCacheDataEncrypted
    , fmap (("CacheTtlInSeconds",) . toJSON) _apiGatewayDeploymentMethodSettingCacheTtlInSeconds
    , fmap (("CachingEnabled",) . toJSON) _apiGatewayDeploymentMethodSettingCachingEnabled
    , fmap (("DataTraceEnabled",) . toJSON) _apiGatewayDeploymentMethodSettingDataTraceEnabled
    , fmap (("HttpMethod",) . toJSON) _apiGatewayDeploymentMethodSettingHttpMethod
    , fmap (("LoggingLevel",) . toJSON) _apiGatewayDeploymentMethodSettingLoggingLevel
    , fmap (("MetricsEnabled",) . toJSON) _apiGatewayDeploymentMethodSettingMetricsEnabled
    , fmap (("ResourcePath",) . toJSON) _apiGatewayDeploymentMethodSettingResourcePath
    , fmap (("ThrottlingBurstLimit",) . toJSON) _apiGatewayDeploymentMethodSettingThrottlingBurstLimit
    , fmap (("ThrottlingRateLimit",) . toJSON) _apiGatewayDeploymentMethodSettingThrottlingRateLimit
    ]

-- | Constructor for 'ApiGatewayDeploymentMethodSetting' containing required
-- fields as arguments.
apiGatewayDeploymentMethodSetting
  :: ApiGatewayDeploymentMethodSetting
apiGatewayDeploymentMethodSetting  =
  ApiGatewayDeploymentMethodSetting
  { _apiGatewayDeploymentMethodSettingCacheDataEncrypted = Nothing
  , _apiGatewayDeploymentMethodSettingCacheTtlInSeconds = Nothing
  , _apiGatewayDeploymentMethodSettingCachingEnabled = Nothing
  , _apiGatewayDeploymentMethodSettingDataTraceEnabled = Nothing
  , _apiGatewayDeploymentMethodSettingHttpMethod = Nothing
  , _apiGatewayDeploymentMethodSettingLoggingLevel = Nothing
  , _apiGatewayDeploymentMethodSettingMetricsEnabled = Nothing
  , _apiGatewayDeploymentMethodSettingResourcePath = Nothing
  , _apiGatewayDeploymentMethodSettingThrottlingBurstLimit = Nothing
  , _apiGatewayDeploymentMethodSettingThrottlingRateLimit = Nothing
  }

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachedataencrypted
agdmsCacheDataEncrypted :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Bool))
agdmsCacheDataEncrypted = lens _apiGatewayDeploymentMethodSettingCacheDataEncrypted (\s a -> s { _apiGatewayDeploymentMethodSettingCacheDataEncrypted = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachettlinseconds
agdmsCacheTtlInSeconds :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Integer))
agdmsCacheTtlInSeconds = lens _apiGatewayDeploymentMethodSettingCacheTtlInSeconds (\s a -> s { _apiGatewayDeploymentMethodSettingCacheTtlInSeconds = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-cachingenabled
agdmsCachingEnabled :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Bool))
agdmsCachingEnabled = lens _apiGatewayDeploymentMethodSettingCachingEnabled (\s a -> s { _apiGatewayDeploymentMethodSettingCachingEnabled = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-datatraceenabled
agdmsDataTraceEnabled :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Bool))
agdmsDataTraceEnabled = lens _apiGatewayDeploymentMethodSettingDataTraceEnabled (\s a -> s { _apiGatewayDeploymentMethodSettingDataTraceEnabled = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-httpmethod
agdmsHttpMethod :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val HttpMethod))
agdmsHttpMethod = lens _apiGatewayDeploymentMethodSettingHttpMethod (\s a -> s { _apiGatewayDeploymentMethodSettingHttpMethod = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-logginglevel
agdmsLoggingLevel :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val LoggingLevel))
agdmsLoggingLevel = lens _apiGatewayDeploymentMethodSettingLoggingLevel (\s a -> s { _apiGatewayDeploymentMethodSettingLoggingLevel = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-metricsenabled
agdmsMetricsEnabled :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Bool))
agdmsMetricsEnabled = lens _apiGatewayDeploymentMethodSettingMetricsEnabled (\s a -> s { _apiGatewayDeploymentMethodSettingMetricsEnabled = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-resourcepath
agdmsResourcePath :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Text))
agdmsResourcePath = lens _apiGatewayDeploymentMethodSettingResourcePath (\s a -> s { _apiGatewayDeploymentMethodSettingResourcePath = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-throttlingburstlimit
agdmsThrottlingBurstLimit :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Integer))
agdmsThrottlingBurstLimit = lens _apiGatewayDeploymentMethodSettingThrottlingBurstLimit (\s a -> s { _apiGatewayDeploymentMethodSettingThrottlingBurstLimit = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription-methodsetting.html#cfn-apigateway-deployment-stagedescription-methodsetting-throttlingratelimit
agdmsThrottlingRateLimit :: Lens' ApiGatewayDeploymentMethodSetting (Maybe (Val Double))
agdmsThrottlingRateLimit = lens _apiGatewayDeploymentMethodSettingThrottlingRateLimit (\s a -> s { _apiGatewayDeploymentMethodSettingThrottlingRateLimit = a })

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
    <color name="abc_input_method_navigation_guard">@android:color/black</color>
    <color name="black">#000000</color>
    <color name="abc_search_url_text_normal">#ff7fa87f</color>
    <color name="abc_search_url_text_pressed">@android:color/black</color>
    <color name="abc_search_url_text_selected">@android:color/black</color>
    <color name="accent_material_dark">@color/themeColor</color>
    <color name="actionBtnPrs">#ffd9dbdc</color>
    <color name="actionbarTabUnselected">#D3D3D3</color>
    <color name="addToPlayListDialogHeader">#ff303030</color>
    <color name="addToPlayListDisabled">#ff888888</color>
    <color name="addToPlayListNormal">#ff333333</color>
    <color name="allMVShadeViewBackgrandColor">#4ca9aaab</color>
    <color name="atNicknameBg">@color/actionBtnPrs</color>
    <color name="atNicknameFg">#ff3470ac</color>
    <color name="background_floating_material_dark">@color/material_grey_800</color>
    <color name="background_floating_material_light">@android:color/white</color>
    <color name="background_material_dark">@color/material_grey_850</color>
    <color name="background_material_light">@color/material_grey_50</color>
    <color name="blue">#ff0000ff</color>
    <color name="bottomSheetNormalBackground">#f9ffffff</color>
    <color name="bottomSheetNormalBackgroundNight">#f9222326</color>
    <color name="bottomSheetNormalBackgroundPress">#ffe5e5e5</color>
    <color name="bottomSheetNormalBackgroundPressNight">#ff1e1f22</color>
    <color name="bright_foreground_disabled_material_dark">#80ffffff</color>
    <color name="bright_foreground_disabled_material_light">#80000000</color>
    <color name="bright_foreground_inverse_material_dark">@color/bright_foreground_material_light
    </color>
    <color name="bright_foreground_inverse_material_light">@color/bright_foreground_material_dark
    </color>
    <color name="bright_foreground_material_dark">@android:color/white</color>
    <color name="bright_foreground_material_light">@android:color/black</color>
    <color name="bs_dark_divider_color">#80ffffff</color>
    <color name="bs_divider_color">#1f000000</color>
    <color name="bubbleBg">@color/themeColor</color>
    <color name="buttonPressedTextColor">#ffffffff</color>
    <color name="buttonTextColor">#ff333333</color>
    <color name="button_material_dark">#ff5a595b</color>
    <color name="button_material_light">#ffd6d7d7</color>
    <color name="chatBarEditHintTextColor">@color/commentBarEditHintTextColor</color>
    <color name="chatBarEditTextColor">@color/commentBarEditTextColor</color>
    <color name="chatBarLineColor">@color/commentBarLineColor</color>
    <color name="chatBarPostDisableTextColor">@color/commentBarPostDisableTextColor</color>
    <color name="chatBarPostTextColor">@color/commentBarPostTextColor</color>
    <color name="commentBarEditHintTextColor">#ffcccccc</color>
    <color name="commentBarEditTextColor">#ff333333</color>
    <color name="commentBarLineColor">@color/lineColor</color>
    <color name="commentBarPostDisableTextColor">#ff999999</color>
    <color name="commentBarPostTextColor">#ff333333</color>
    <color name="contentTvColor">#ff333333</color>
    <color name="creamPlaylistChooseClassTitleColor">#ff333333</color>
    <color name="creamPlaylistEntranceHeaderBackground">#ffffffff</color>
    <color name="creamPlaylistEntranceSubTitleColor">#ff999999</color>
    <color name="creamPlaylistEntranceTitleColor">#ff333333</color>
    <color name="design_fab_shadow_end_color">@android:color/transparent</color>
    <color name="design_fab_shadow_mid_color">#14000000</color>
    <color name="design_fab_shadow_start_color">#44000000</color>
    <color name="design_fab_stroke_end_inner_color">#0a000000</color>
    <color name="design_fab_stroke_end_outer_color">#0f000000</color>
    <color name="design_fab_stroke_top_inner_color">#1affffff</color>
    <color name="design_fab_stroke_top_outer_color">#2effffff</color>
    <color name="design_snackbar_background_color">#ff323232</color>
    <color name="design_textinput_error_color">#ffdd2c00</color>
    <color name="dim_foreground_disabled_material_dark">#80bebebe</color>
    <color name="dim_foreground_disabled_material_light">#80323232</color>
    <color name="dim_foreground_material_dark">#ffbebebe</color>
    <color name="dim_foreground_material_light">#ff323232</color>
    <color name="disableColor">#ff999999</color>
    <color name="dotFocusColor">@color/normalC1</color>
    <color name="dotNormalColor">#7fbbbbbb</color>
    <color name="dotNormalNightColor">#19ffffff</color>
    <color name="drawerNightBg">#ff1a1a1b</color>
    <color name="emotionDotFocusColor">#ffffffff</color>
    <color name="emotionDotNormalColor">#40000000</color>
    <color name="flipColor">#ffe8eaec</color>
    <color name="floatLrc00030Bg">#4d000000</color>
    <color name="floatLrcfff20Bg">#33ffffff</color>
    <color name="foreground_material_dark">@android:color/white</color>
    <color name="foreground_material_light">@android:color/black</color>
    <color name="headerImageCover">#4d000000</color>
    <color name="highlighted_text_material_dark">#6680cbc4</color>
    <color name="highlighted_text_material_light">#66009688</color>
    <color name="hint_foreground_material_dark">@color/bright_foreground_disabled_material_dark
    </color>
    <color name="hint_foreground_material_light">@color/bright_foreground_disabled_material_light
    </color>
    <color name="inputTextColor">#ff333333</color>
    <color name="inputTextHintColor">#ff999999</color>
    <color name="introduceBg">#ffffffff</color>
    <color name="invalidAlarmClockBellAndRepeat">#4c333333</color>
    <color name="invalidAlarmClockBellAndRepeatNight">#4c75777e</color>
    <color name="invalidAlarmClockSongName">#4c666666</color>
    <color name="invalidAlarmClockSongNameNight">#4c5d5d63</color>
    <color name="invalidAlarmClockTime">#b3333333</color>
    <color name="invalidAlarmClockTimeNight">#b375777e</color>
    <color name="lineColor">#19000000</color>
    <color name="listDivider">#ffd8d9da</color>
    <color name="listDividerColor">@color/listDivider</color>
    <color name="listHeavyDividerColor">#ffcdcfd1</color>
    <color name="listItemNightColorWhite">#ff17181a</color>
    <color name="listItemPressedColor">#19000000</color>
    <color name="listItemPressedColorWhite">#ffe5e5e5</color>
    <color name="listItemPressedNightColor">#0cffffff</color>
    <color name="listItemPressedNightColorWhite">#ff232426</color>
    <color name="listSubTextColor">#ff888888</color>
    <color name="listTextColor">#ff333333</color>
    <color name="listTitleBackground">#ffe6e8e9</color>
    <color name="listTitleDivider">#ffcdcfd1</color>
    <color name="liveHeadColor">#ff333333</color>
    <color name="liveIntroduceColor">#ff666666</color>
    <color name="liveMeColor">#ffff6e6d</color>
    <color name="liveRankGrey">#ff999999</color>
    <color name="liveRankYellow">#ffe67327</color>
    <color name="localImageBrowseActionbarColor">#cc252525</color>
    <color name="lrcAdjustListPrs">#10ffffff</color>
    <color name="lrcHighLight">#ffffffff</color>
    <color name="lrcNormal">#80ffffff</color>
    <color name="lrcOverLight">#b3ffffff</color>
    <color name="lrcShareColor">#ff1f1e1e</color>
    <color name="lrcShareListBg">#ff010102</color>
    <color name="lrcShareSaveAndShareNormalColor">#ffffffff</color>
    <color name="lrcShareSaveAndSharePressedColor">#80ffffff</color>
    <color name="lrcShareTextnormalColor">#ff808080</color>
    <color name="mainDrawerHeaderMask">#40000000</color>
    <color name="mainRadioBillboardHeaderPreEntranceForeground">#ffd33a31</color>
    <color name="mainTextColor">#ff333333</color>
    <color name="mainTextSongInfoColor">#ff999999</color>
    <color name="material_blue_grey_800">#ff37474f</color>
    <color name="material_blue_grey_900">#ff263238</color>
    <color name="material_blue_grey_950">#ff21272b</color>
    <color name="material_deep_teal_200">#ff80cbc4</color>
    <color name="material_deep_teal_500">#ff009688</color>
    <color name="material_grey_100">#fff5f5f5</color>
    <color name="material_grey_300">#ffe0e0e0</color>
    <color name="material_grey_50">#fffafafa</color>
    <color name="material_grey_600">#ff757575</color>
    <color name="material_grey_800">#ff424242</color>
    <color name="material_grey_850">#ff303030</color>
    <color name="material_grey_900">#ff212121</color>
    <color name="md_btn_selected">#33969696</color>
    <color name="md_btn_selected_dark">#40cbcbcb</color>
    <color name="md_divider_black">#10000000</color>
    <color name="md_divider_white">#10ffffff</color>
    <color name="md_edittext_error">#ffdd2c00</color>
    <color name="md_material_blue_600">#ff1e88e5</color>
    <color name="md_material_blue_800">#ff1565c0</color>
    <color name="md_material_btn_blue">#ff477aac</color>
    <color name="menuPressed">#ff1d1d1d</color>
    <color name="minPlayerBtnPrs">@color/pressedColor</color>
    <color name="minorTextColor">#D3D3D3</color>
    <color name="minorTextColor2">#ff888888</color>
    <color name="moreBvTextColor">#ffdf3131</color>
    <color name="musicTransName">#ff999999</color>
    <color name="mvBarBg">#bf131516</color>
    <color name="mvQualityNormal">#ffcccccc</color>
    <color name="mvQualitySelected">#ffffffff</color>
    <color name="nightLine">#0cffffff</color>
    <color name="nightLineBottomSheet">#19ffffff</color>
    <color name="nightLineColor">#0dffffff</color>
    <color name="nightNormalBackground">@color/nightY2</color>
    <color name="nightPressed">#19ffffff</color>
    <color name="nightPressedCombine">#ff1d1e20</color>
    <color name="nightY0">#ff17181a</color>
    <color name="nightY1">#ff902b2b</color>
    <color name="nightY10">#ff84858d</color>
    <color name="nightY11">#ffa2a2a2</color>
    <color name="nightY13">#ff84858d</color>
    <color name="nightY2">#ff111214</color>
    <color name="nightY3">#ffadaeb3</color>
    <color name="nightY4">#ff75777e</color>
    <color name="nightY4_4c">#4c75777e</color>
    <color name="nightY5">#ff6b6c74</color>
    <color name="nightY50001">#7f6b6c74</color>
    <color name="nightY6">#ff5d5d63</color>
    <color name="nightY7">#ff3e3f43</color>
    <color name="nightY70001">#333e3f43</color>
    <color name="nightY8">#ff303134</color>
    <color name="nightY9">#ff2b6e90</color>
    <color name="nightYa">#9a17181a</color>
    <color name="normalBackground">#fff2f4f5</color>
    <color name="normalBackground2">@color/radioPlayerBg</color>
    <color name="normalC1">@color/theme_color_Primary</color>
    <color name="normalC10">@color/minorTextColor</color>
    <color name="normalC2">@color/theme_color_c2_common_bg</color>
    <color name="normalC3">@color/theme_color_c3_333</color>
    <color name="normalC3_4c">#4c333333</color>
    <color name="normalC4">@color/theme_color_c4_666</color>
    <color name="normalC5">@color/theme_color_c5_888</color>
    <color name="normalC6">@color/theme_color_c6_999</color>
    <color name="normalC7">@color/theme_color_c7_b2</color>
    <color name="normalC9">@color/theme_color_c9_blue</color>
    <color name="normalCa">@color/theme_color_ca_fff</color>
    <color name="normalColor">#ff333333</color>
    <color name="notification_bg">#fffafafa</color>
    <color name="notification_content">#8a000000</color>
    <color name="notification_title">#de000000</color>
    <color name="playbarProgressColor">@color/themeColor</color>
    <color name="playbarSubTextColor">#ff888888</color>
    <color name="playbarTextColor">#ff333333</color>
    <color name="playerDropMenuBgPrs">#10ffffff</color>
    <color name="playerLyricBg">#33000000</color>
    <color name="playlistDefaultBackgound">#ffb5bdc0</color>
    <color name="playlistDetailMask">#26000000</color>
    <color name="playlistDetailMaskNight">#66000000</color>
    <color name="playlistDetailPlaceholder">#f2000000</color>
    <color name="pmsgSendBtnDisable">#ff999999</color>
    <color name="pmsgSendBtnEnable">#ff333333</color>
    <color name="pressedColor">#19000000</color>
    <color name="pressedWhiteColo2">#dfffffff</color>
    <color name="pressedWhiteColor">#19ffffff</color>
    <color name="primary_dark_material_dark">@android:color/black</color>
    <color name="primary_dark_material_light">@color/material_grey_600</color>
    <color name="primary_material_dark">@color/material_grey_900</color>
    <color name="primary_material_light">@color/material_grey_100</color>
    <color name="primary_text_default_material_dark">#ffffffff</color>
    <color name="primary_text_default_material_light">#de000000</color>
    <color name="primary_text_disabled_material_dark">#4dffffff</color>
    <color name="primary_text_disabled_material_light">#39000000</color>
    <color name="profileDotFocusColor">#ffffffff</color>
    <color name="profileDotNormalColor">#33ffffff</color>
    <color name="profileInfoTextColor">#9affffff</color>
    <color name="radioBillboardHeaderBackgroundBoxColor">#26000000</color>
    <color name="radioBillboardHeaderBackgroundPressedColor">#1a000000</color>
    <color name="radioPlayerBg">#fff5f6f7</color>
    <color name="rankNumNomalColor">@color/normalC6</color>
    <color name="rankNumTopThreeColor">@color/normalC1</color>
    <color name="recordProgramCaching">#fff7f9fa</color>
    <color name="recordProgramCachingNight">#ff161719</color>
    <color name="recordProgramProcess">#ffebeced</color>
    <color name="recordProgramProcessNight">#ff1d1e20</color>
    <color name="redTagColor">#ffe54343</color>
    <color name="resendPressedNightTextColor">#9a3e3f43</color>
    <color name="resendPressedTextColor">#9a888888</color>
    <color name="resendTextColor">#ff888888</color>
    <color name="ripple_material_dark">#42ffffff</color>
    <color name="ripple_material_light">#1f000000</color>
    <color name="searchHighlight">#ff3774b0</color>
    <color name="secondary_text_default_material_dark">#b3ffffff</color>
    <color name="secondary_text_default_material_light">#8a000000</color>
    <color name="secondary_text_disabled_material_dark">#36ffffff</color>
    <color name="secondary_text_disabled_material_light">#24000000</color>
    <color name="sportFMMask1">#66000000</color>
    <color name="sportFMMask2">#4d000000</color>
    <color name="sportRadioShareTextColor">#cdffffff</color>
    <color name="statusBarPress">#ff232323</color>
    <color name="statusBarPressVivo">#ffcccccc</color>
    <color name="statusBarTranslucent">#00000000</color>
    <color name="switch_thumb_disabled_material_dark">#ff616161</color>
    <color name="switch_thumb_disabled_material_light">#ffbdbdbd</color>
    <color name="switch_thumb_normal_material_dark">#ffbdbdbd</color>
    <color name="switch_thumb_normal_material_light">#fff1f1f1</color>
    <color name="tabColor">#fffcfdfd</color>
    <color name="tabShadow">#33000000</color>
    <color name="tabTextNormalColor">#ff666666</color>
    <color name="tagTextColor">#ff999999</color>
    <color name="themeColor">#ffce3d3a</color>
    <color name="theme_color_Primary">#ffce3d3c</color>
    <color name="theme_color_PrimaryAccent">#ffce3d3e</color>
    <color name="theme_color_PrimaryDark">#ffa13b41</color>
    <color name="theme_color_c2_common_bg">#fff2f4f5</color>
    <color name="theme_color_c3_333">#ff333333</color>
    <color name="theme_color_c4_666">#ff666666</color>
    <color name="theme_color_c5_888">#ff888888</color>
    <color name="theme_color_c6_999">#ff999999</color>
    <color name="theme_color_c7_b2">#ffb2b2b2</color>
    <color name="theme_color_c8_ccc">#ffcccccc</color>
    <color name="theme_color_c9_blue">#ff477aac</color>
    <color name="theme_color_ca_fff">#ffffffff</color>
    <color name="theme_color_common_section">#ffe6e8e9</color>
    <color name="theme_color_cover_dark">#10000000</color>
    <color name="theme_color_fff">#ffffffff</color>
    <color name="theme_color_forcard">#ffffffff</color>
    <color name="theme_color_forcard_night">#ff17181a</color>
    <color name="theme_ripple_dark">#40ffffff</color>
    <color name="theme_ripple_light">#40000000</color>
    <color name="theme_ripple_mask_dark">#ff000000</color>
    <color name="theme_ripple_mask_light">@color/theme_color_fff</color>
    <color name="toolbarIconColor">#ffffffff</color>
    <color name="toolbarSubTextColor">#ffd4d4d4</color>
    <color name="toolbarTextColor">#ffffffff</color>
    <color name="trackContentContainerNormalBg">#0b000000</color>
    <color name="trackContentContainerPressBg">@color/pressedColor</color>
    <color name="videoWindowBg">#ff1e2123</color>
    <color name="videoWindowBgPrs">#e5000000</color>
    <color name="white">#ffffff</color>
    <color name="smallRed">#faebeb</color>
    <color name="search_bg">#00000000</color>
    <color name="qianhuise">#E0E0E0</color>
    <color name="baiyan">#F5F5F5</color>
    <color name="whaite_text">#fafafa</color>
    <color name="status_bar">#70000000</color>
    <color name="accent_material_light">@color/themeColor</color>

</resources>


text:
newproperty(:temporary_tablespace) do
  include EasyType
  include EasyType::Validators::Name
  include EasyType::Mungers::Upcase

  desc "The user's temporary tablespace"
  defaultto 'TEMP'

  to_translate_to_resource do | raw_resource|
    raw_resource.column_data('TEMPORARY_TABLESPACE').upcase
  end

  on_apply do | command_builder|
    "temporary tablespace #{resource[:temporary_tablespace]}"
  end

end


text:
<?php
// Get the PHP helper library from twilio.com/docs/php/install

// this line loads the library
require_once '/path/to/vendor/autoload.php';

$response = new Services_Twilio_Twiml;
$response->say("hello world!", array('voice' => 'alice'));
print $response;


text:
$(document).ready(function () {
    var originalPos = null;
    var data = {};
    var keysEl = $('.sortOrder');
    data[keysEl.data('token-name')] = keysEl.data('token');

    var sortableHelper = function (a, el) {
        originalPos = el.prevAll().length;
        var helper = el.clone();

        return helper;
    };

    $('.gallery-thumbnails').sortable({
        helper: sortableHelper,
        update: function (event, ui) {
            var pos = $(ui.item).prevAll().length;

            if (originalPos !== null && originalPos != pos) {
                var keys = keysEl.children('span');
                var key = keys.eq(originalPos);
                var sort = [];

                keys.each(function (i) {
                    sort[i] = $(this).attr('data-order');
                });

                if (originalPos < pos) {
                    keys.eq(pos).after(key);
                }
                if (originalPos > pos) {
                    keys.eq(pos).before(key);
                }
                originalPos = null;
            }
            var sortOrder = {};
            keys = keysEl.children('span');
            keys.each(function (i) {
                $(this).attr('data-order', sort[i]);
                sortOrder[$(this).text()] = sort[i];
            });

            data["sortOrder"] = sortOrder;

            $.ajax({
                type: "POST",
                url: keysEl.data('action'),
                data: data
            });
        }
    });
});


text:
module Commerce
  class Cart < BaseController

    def self.add(id, _parameters, _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.POST _query_url, parameters: _parameters

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.contents(id,  _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}/items'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.GET _query_url

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.create( _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts'

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.GET _query_url

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.delete(id,  _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.DELETE _query_url

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.remove(id, line_item_id,  _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}/items/{line_item_id}'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id,
              'line_item_id' => line_item_id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.DELETE _query_url

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.reset(id,  _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}/items'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.DELETE _query_url

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.retrieve(id,  _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.GET _query_url

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

    def self.update(id, line_item_id, _parameters, _query_parameters = [])

      _query_builder = Commerce.api_base.dup
      _query_builder << '/carts/{id}/items/{line_item_id}'

      _query_builder = APIHelper.append_url_with_template_parameters _query_builder, {
              'id' => id,
              'line_item_id' => line_item_id
          }

      _query_url = APIHelper.clean_url _query_builder

      _request = @@http_client.PUT _query_url, parameters: _parameters

      CustomHeaderAuth.apply(_request)

      _request.headers = @@global_headers.clone.merge(_request.headers)

      _response = @@http_client.execute_as_string(_request)

      context = HttpContext.new(_request, _response)

      return context.response.array

    end

  end

end


text:
  || defined(AUTOBOOST_ASIO_WINDOWS_RUNTIME) \
  || defined(__CYGWIN__) || defined(__SYMBIAN32__)
# include <autoboost/asio/detail/null_signal_blocker.hpp>
#elif defined(AUTOBOOST_ASIO_HAS_PTHREADS)
# include <autoboost/asio/detail/posix_signal_blocker.hpp>
#else
# error Only Windows and POSIX are supported!
#endif

namespace autoboost {
namespace asio {
namespace detail {

#if !defined(AUTOBOOST_ASIO_HAS_THREADS) || defined(AUTOBOOST_ASIO_WINDOWS) \
  || defined(AUTOBOOST_ASIO_WINDOWS_RUNTIME) \
  || defined(__CYGWIN__) || defined(__SYMBIAN32__)
typedef null_signal_blocker signal_blocker;
#elif defined(AUTOBOOST_ASIO_HAS_PTHREADS)
typedef posix_signal_blocker signal_blocker;
#endif

} // namespace detail
} // namespace asio
} // namespace autoboost

#endif // AUTOBOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP


text:
package com.intellij.ide.actions;

import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentManager;
import com.intellij.ui.content.ContentManagerAdapter;
import com.intellij.ui.content.ContentManagerEvent;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.util.List;

/**
* @author gregsh
*/
public class ToggleToolbarAction extends ToggleAction implements DumbAware {

  @NotNull
  public static ActionGroup createToggleToolbarGroup(@NotNull Project project, @NotNull ToolWindow toolWindow) {
    return new DefaultActionGroup(new OptionsGroup(toolWindow),
                                  new ToggleToolbarAction(toolWindow, PropertiesComponent.getInstance(project)),
                                  Separator.getInstance());
  }

  private final PropertiesComponent myPropertiesComponent;
  private final ToolWindow myToolWindow;

  private ToggleToolbarAction(@NotNull ToolWindow toolWindow, @NotNull PropertiesComponent propertiesComponent) {
    super("Show Toolbar");
    myPropertiesComponent = propertiesComponent;
    myToolWindow = toolWindow;
    myToolWindow.getContentManager().addContentManagerListener(new ContentManagerAdapter() {
      @Override
      public void contentAdded(ContentManagerEvent event) {
        JComponent component = event.getContent().getComponent();
        setContentToolbarVisible(component, getVisibilityValue());

        // support nested content managers, e.g. RunnerLayoutUi as content component
        ContentManager contentManager =
          component instanceof DataProvider ? PlatformDataKeys.CONTENT_MANAGER.getData((DataProvider)component) : null;
        if (contentManager != null) contentManager.addContentManagerListener(this);
      }
    });
  }

  @Override
  public void update(@NotNull AnActionEvent e) {
    super.update(e);
    boolean hasToolbars = iterateToolbars(myToolWindow.getContentManager().getComponent()).iterator().hasNext();
    e.getPresentation().setVisible(hasToolbars);
  }

  @Override
  public boolean isSelected(AnActionEvent e) {
    return getVisibilityValue();
  }

  @Override
  public void setSelected(AnActionEvent e, boolean state) {
    myPropertiesComponent.setValue(getProperty(), String.valueOf(state), String.valueOf(true));
    for (Content content : myToolWindow.getContentManager().getContents()) {
      setContentToolbarVisible(content.getComponent(), state);
    }
  }

  @NotNull
  private String getProperty() {
    return getShowToolbarProperty(myToolWindow);
  }

  private boolean getVisibilityValue() {
    return myPropertiesComponent.getBoolean(getProperty(), true);
  }

  private static void setContentToolbarVisible(@NotNull JComponent root, boolean state) {
    for (ActionToolbar toolbar : iterateToolbars(root)) {
      toolbar.getComponent().setVisible(state);
    }
  }

  @NotNull
  public static String getShowToolbarProperty(@NotNull ToolWindow window) {
    return "ToolWindow" + window.getStripeTitle() + ".ShowToolbar";
  }

  @NotNull
  private static Iterable<ActionToolbar> iterateToolbars(JComponent root) {
    return UIUtil.uiTraverser().withRoot(root).preOrderDfsTraversal().filter(ActionToolbar.class);
  }

  private static class OptionsGroup extends ActionGroup implements DumbAware {

    private final ToolWindow myToolWindow;

    public OptionsGroup(ToolWindow toolWindow) {
      super("View Options", true);
      myToolWindow = toolWindow;
    }

    @Override
    public void update(AnActionEvent e) {
      e.getPresentation().setVisible(!ActionGroupUtil.isGroupEmpty(this, e));
    }

    @NotNull
    @Override
    public AnAction[] getChildren(@Nullable AnActionEvent e) {
      ContentManager contentManager = myToolWindow.getContentManager();
      Content selectedContent = contentManager.getSelectedContent();
      JComponent contentComponent = selectedContent != null ? selectedContent.getComponent() : null;
      if (contentComponent == null) return EMPTY_ARRAY;
      List<AnAction> result = ContainerUtil.newSmartList();
      for (final ActionToolbar toolbar : iterateToolbars(contentComponent)) {
        JComponent c = toolbar.getComponent();
        if (c.isVisible() || !c.isValid()) continue;
        if (!result.isEmpty() && !(ContainerUtil.getLastItem(result) instanceof Separator)) {
          result.add(Separator.getInstance());
        }

        List<AnAction> actions = toolbar.getActions(false);
        for (AnAction action : actions) {
          if (action instanceof ToggleAction && !result.contains(action)) {
            result.add(action);
          }
          else if (action instanceof Separator) {
            if (!result.isEmpty() && !(ContainerUtil.getLastItem(result) instanceof Separator)) {
              result.add(Separator.getInstance());
            }
          }
        }
      }
      boolean popup = result.size() > 3;
      setPopup(popup);
      if (!popup && !result.isEmpty()) result.add(Separator.getInstance());
      return result.toArray(new AnAction[result.size()]);
    }
  }
}


text:
set -e

function func_exit(){
    echo "${1}" >&2
    exit 1
}

repo_name=""
bare_repo=""
repository_url=""
repository_url_basename=""
branch=""
working_repo=""
destination=""
timeout="600"
user=""
postcmd=""

DEBUG="false"

while getopts ":r:b:u:a:n:w:d:t:i:c:" opt; do
    case $opt in
        r)
            [ "${DEBUG}" = "true" ] && echo "-r (repo_name), Parameter: $OPTARG" >&2
            repo_name="${OPTARG}"
            ;;
        b)
            [ "${DEBUG}" = "true" ] && echo "-b (bare_name), Parameter: $OPTARG" >&2
            bare_repo="${OPTARG}"
            ;;
        u)
            [ "${DEBUG}" = "true" ] && echo "-u (repository_url), Parameter: $OPTARG" >&2
            repository_url="${OPTARG}"
            ;;
        a)
            [ "${DEBUG}" = "true" ] && echo "-a (repository_url_basename), Parameter: $OPTARG" >&2
            repository_url_basename="${OPTARG}"
            ;;
        n)
            [ "${DEBUG}" = "true" ] && echo "-n (branch), Parameter: $OPTARG" >&2
            branch="${OPTARG}"
            ;;
        w)
            [ "${DEBUG}" = "true" ] && echo "-w (working_repo), Parameter: $OPTARG" >&2
            working_repo="${OPTARG}"
            ;;
        d)
            [ "${DEBUG}" = "true" ] && echo "-d (destination), Parameter: $OPTARG" >&2
            destination="${OPTARG}"
            ;;
        t)
            [ "${DEBUG}" = "true" ] && echo "-t (timeout), Parameter: $OPTARG" >&2
            timeout="${OPTARG}"
            ;;
        i)
            [ "${DEBUG}" = "true" ] && echo "-i (user), Parameter: $OPTARG" >&2
            user="${OPTARG}"
            ;;
        c)
            [ "${DEBUG}" = "true" ] && echo "-c (postcmd), Parameter: $OPTARG" >&2
            postcmd="${OPTARG}"
            ;;
        \?)
            echo "Invalid option: -$OPTARG" >&2
            exit 1
            ;;
        :)
            echo "Option -$OPTARG requires an argument." >&2
            exit 1
            ;;
    esac
done

[ -z "${repo_name}" ] && func_exit "Missing repo_name (-r)"
[ -z "${bare_repo}" ] && func_exit "Missing bare_repo (-b)"
[ -z "${repository_url}" ] && func_exit "Missing repository_url (-u)"
[ -z "${repository_url_basename}" ] && func_exit "Missing repository_url_basename (-a)"
[ -z "${branch}" ] && func_exit "Missing branch (-n)"
[ -z "${working_repo}" ] && func_exit "Missing working_repo (-w)"
[ -z "${destination}" ] && func_exit "Missing destination (-d)"
[ -z "${user}" ] && func_exit "Missing user (-i)"

if [ "${DEBUG}" = "true" ]; then
    echo "repo_name=${repo_name}"
    echo "bare_repo=${bare_repo}"
    echo "repository_url=${repository_url}"
    echo "repository_url_basename=${repository_url_basename}"
    echo "branch=${branch}"
    echo "working_repo=${working_repo}"
    echo "destination=${destination}"
    echo "timeout=${timeout}"
    echo "user=${user}"
    echo "postcmd=${postcmd}"
fi

(
flock -x -w ${timeout} 200 || exit 1
su - ${user} <<EOF
    [ -d ${destination} ] || mkdir -p ${destination}
    if [ ! -d ${working_repo} ]; then
        mkdir -p ${bare_repo}
        cd ${bare_repo}
        /usr/bin/git clone --mirror ${repository_url}
        /bin/mv ${repository_url_basename} ${repo_name}
        cd ${repo_name}
        GIT_WORK_TREE=${destination} /usr/bin/git checkout -f ${branch}
    fi

    cd ${working_repo}
    /usr/bin/git fetch
    GIT_WORK_TREE=${destination} /usr/bin/git checkout -f
    if [ ! -z "${postcmd}" ]; then
        cd ${destination}
        eval ${postcmd} > /dev/null 2>&1
    fi
EOF
) 200>/tmp/gitDeploy-${repository_url_basename}.lock
exit 0


text:
set -eu

# List tlds separated by comma.
yum_mirror_tlds=.jp

# Configuration file.
fastestmirror_conf=/etc/yum/pluginconf.d/fastestmirror.conf

# Change yum mirror configuration.
if [ -n "${yum_mirror_tlds:-}" ]; then
  if grep -q "include_only=" "$fastestmirror_conf"; then
    sed -r -i.bak "s/^#? *(include_only)=.*/\\1=$yum_mirror_tlds/" "$fastestmirror_conf"
  else
    echo "include_only=$yum_mirror_tlds" >> "$fastestmirror_conf"
  fi
fi

# yum update.
yum -y update


text:
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DrivenRop
{
   public static class EnumerableExtensions
   {
      //
      // ASYNC
      //

      public static async Task<T> FirstAsync<T>(this Task<IEnumerable<T>> e)
      {
         return (await e).First();
      }

      public static async Task<T> FirstOrDefaultAsync<T>(this Task<IEnumerable<T>> e)
      {
         return (await e).FirstOrDefault();
      }

      public static async Task<T> SingleAsync<T>(this Task<IEnumerable<T>> e)
      {
         return (await e).Single();
      }

      public static async Task<T> SingleOrDefaultAsync<T>(this Task<IEnumerable<T>> e)
      {
         return (await e).SingleOrDefault();
      }
   }
}


text:
from scripty import *

with store.begin(write=True):
    for resource in Resource.iter():
        print resource
    print

    for resource in Resource.iter():
        print resource
        resource.delete()


text:
/**
 * @author Vlad
 * @author Rick
 */
package library;

public interface Observer
{
    public void Update(Subject subjectRef);
}


text:
sap.ui.define(["sap/base/Log", "sap/base/util/defineLazyProperty", "sap/ui/thirdparty/jquery"],
	function(Log, defineLazyProperty, jQuery) {
	"use strict";

	// Make sure to initialize the jQuery.sap namespace to apply stubs
	jQuery.sap = jQuery.sap || {};

	var mStubs = {
		"jQuery.sap.": {
			target: jQuery.sap,
			stubs: {
				"jquery.sap.act": ["act"],
				"jquery.sap.dom": [
					"domById",
					"byId",
					"focus",
					"pxToRem",
					"remToPx",
					"containsOrEquals",
					"denormalizeScrollLeftRTL",
					"denormalizeScrollBeginRTL",
					"ownerWindow",
					"scrollbarSize",
					"syncStyleClass"
				],
				"jquery.sap.encoder": [
					"encodeHTML",
					"encodeXML",
					"escapeHTML",
					"encodeJS",
					"escapeJS",
					"encodeURL",
					"encodeURLParameters",
					"encodeCSS",
					"clearUrlWhitelist",
					"addUrlWhitelist",
					"removeUrlWhitelist",
					"getUrlWhitelist",
					"validateUrl",
					"_sanitizeHTML"
				],
				"jquery.sap.events": [
					"PseudoEvents",
					"ControlEvents",
					"disableTouchToMouseHandling",
					"touchEventMode",
					"bindAnyEvent",
					"unbindAnyEvent",
					"checkMouseEnterOrLeave",
					"isSpecialKey",
					"handleF6GroupNavigation",
					"_FASTNAVIGATIONKEY",
					"_refreshMouseEventDelayedFlag",
					"isMouseEventDelayed"
				],
				"jquery.sap.global": [
					"Version",
					"now",
					"debug",
					"setReboot",
					"statistics",
					"log",
					"assert",
					"factory",
					"newObject",
					"getter",
					"getObject",
					"setObject",
					"measure",
					"getModulePath",
					"getResourcePath",
					"registerModulePath",
					"registerResourcePath",
					"registerModuleShims",
					"isDeclared",
					"isResourceLoaded",
					"getAllDeclaredModules",
					"declare",
					"require",
					"preloadModules",
					"registerPreloadedModules",
					"unloadResources",
					"getResourceName",
					"loadResource",
					"_loadJSResourceAsync",
					"includeScript",
					"includeStyleSheet",
					"FrameOptions",
					"globalEval"
				],
				"jquery.sap.history": ["history"],
				"jquery.sap.keycodes": ["KeyCodes"],
				"jquery.sap.mobile": [
					"initMobile",
					"setIcons",
					"setMobileWebAppCapable"
				],
				"jquery.sap.properties": ["properties"],
				"jquery.sap.resources": ["resources"],
				"jquery.sap.script": [
					"uid",
					"hashCode",
					"unique",
					"equal",
					"each",
					"arraySymbolDiff",
					"_createJSTokenizer",
					"parseJS",
					"extend",
					"getUriParameters",
					"delayedCall",
					"clearDelayedCall",
					"intervalCall",
					"clearIntervalCall",
					"forIn",
					"arrayDiff"
				],
				"jquery.sap.sjax": [
					"sjaxSettings",
					"sjax",
					"syncHead",
					"syncGet",
					"syncPost",
					"syncGetText",
					"syncGetJSON"
				],
				"jquery.sap.storage": ["storage"],
				"jquery.sap.strings": [
					"endsWith",
					"endsWithIgnoreCase",
					"startsWith",
					"startsWithIgnoreCase",
					"charToUpperCase",
					"padLeft",
					"padRight",
					"camelCase",
					"hyphen",
					"escapeRegExp",
					"formatMessage"
				],
				"jquery.sap.trace": [
					"interaction",
					"fesr",
					"passport"
				],
				"jquery.sap.xml": [
					"parseXML",
					"serializeXML",
					"isEqualNode",
					"getParseError"
				]
			}
		},
		"jQuery.": {
			target: jQuery,
			stubs: {
				"jquery.sap.mobile": [
					"os",
					"device"
				]
			}
		},
		"jQuery Plugin ": {
			target: jQuery.fn,
			stubs: {
				"jquery.sap.ui": ["root", "uiarea", "sapui"],
				"jquery.sap.dom": ["outerHTML"],
				"sap/ui/dom/jquery/Aria": [
					"addAriaLabelledBy",
					"removeAriaLabelledBy",
					"addAriaDescribedBy",
					"removeAriaDescribedBy"
				],
				"sap/ui/dom/jquery/control": ["control"],
				"sap/ui/dom/jquery/cursorPos": ["cursorPos"],
				"sap/ui/dom/jquery/Focusable": [
					"firstFocusableDomRef",
					"lastFocusableDomRef"
				],
				"sap/ui/dom/jquery/getSelectedText": ["getSelectedText"],
				"sap/ui/dom/jquery/hasTabIndex": ["hasTabIndex"],
				"sap/ui/dom/jquery/parentByAttribute": ["parentByAttribute"],
				"sap/ui/dom/jquery/rect": ["rect"],
				"sap/ui/dom/jquery/rectContains": ["rectContains"],
				"sap/ui/dom/jquery/scrollLeftRTL": ["scrollLeftRTL"],
				"sap/ui/dom/jquery/scrollRightRTL": ["scrollRightRTL"],
				"sap/ui/dom/jquery/selectText": ["selectText"],
				"sap/ui/dom/jquery/zIndex": ["zIndex"],
				"sap/ui/dom/jquery/Selection": [
					"disableSelection",
					"enableSelection"
				]
			}
		},
		"jQuery Selector :": {
			target: jQuery.expr.pseudos,
			stubs: {
				"sap/ui/dom/jquery/Selectors": [
					"focusable",
					"sapTabbable",
					"sapFocusable"
				]
			}
		}
	};

	function lazyLoad(sModule, oTarget, sProperty, sTargetName) {
		return function() {
			Log.warning("Sync loading of module '" + sModule + "' due to usage of deprecated API '" + sTargetName + sProperty + "'", "jquery.sap.stubs", null, function() {
				return {
					type: "jquery.sap.stubs",
					name: sTargetName + sProperty
				};
			});

			sap.ui.requireSync(sModule); // legacy-relevant: lazy loading stubs for legacy APIs
			return oTarget[sProperty];
		};
	}

	function applyLazyProperties(sTargetName, oTarget, mModuleToProp) {
		if (!oTarget) {
			// Stubbing target must be defined
			return;
		}
		Object.keys(mModuleToProp).forEach(function(sModule) {
			var aProperties = mModuleToProp[sModule];
			aProperties.forEach(function(sProperty) {
				// Do not stub already defined properties
				if (oTarget && !oTarget[sProperty]) {
					defineLazyProperty(oTarget, sProperty, lazyLoad(sModule, oTarget, sProperty, sTargetName), "jquery.sap.stubs");
				}
			});
		});
	}

	Log.debug("Applying lazy loading stubs for legacy APIs", "jquery.sap.stubs");
	Object.keys(mStubs).forEach(function(sStubName) {
		var oStub = mStubs[sStubName];
		applyLazyProperties(sStubName, oStub.target, oStub.stubs);
	});

	// Export stubbing config for testing
	if (typeof window === "object" && window["jquery.sap.stubs-test"]) {
		window["jquery.sap.stubs-test"] = mStubs;
	}

	return jQuery;
});


text:
/**
 * Probably split string into general purpose object representation for
 * event names and listeners. This function leaves objects un-modified.
 *
 * @param topicStringOrObject {String | Object}
 * @param listener {Function | false}
 *
 * @returns {Object} {
 *    eventname: listener,
 *    otherevent: listener
 * }
 */
const splitTopicStringOrObject = (topicStringOrObject, listener) =>
	typeof topicStringOrObject !== 'string'
		? topicStringOrObject
		: topicStringOrObject
				.replace(/\s\s+/g, ' ')
				.trim()
				.split(' ')
				.reduce(
					(allEvents, event) => ({
						...allEvents,
						[event]: listener,
					}),

					{}
				)

class EventsManager {
	_events = {}

	on(topicStringOrObject, listener) {
		const eventsAndListeners = splitTopicStringOrObject(
			topicStringOrObject,
			listener
		)

		Object.keys(eventsAndListeners).map(
			(eventName) =>
				(this._events = {
					...this._events,
					[eventName]: [
						...(this._events[eventName] || []),
						eventsAndListeners[eventName],
					],
				})
		)

		return this
	}

	/**
	 * In order to remove one single listener you should give as an argument
	 * the same callback function. If you want to remove *all* listeners from
	 * a particular event you should not pass the second argument.
	 *
	 * @param topicStringOrObject {String | Object}
	 * @param listener {Function | false}
	 */
	off(topicStringOrObject, listener) {
		const eventsAndListeners = splitTopicStringOrObject(
			topicStringOrObject,
			listener
		)

		Object.keys(eventsAndListeners).map((eventName) => {
			if (this._events[eventName]) {
				if (eventsAndListeners[eventName]) {
					this._events[eventName].splice(
						this._events[eventName].indexOf(listener) >>> 0,
						1
					)
				} else {
					this._events[eventName] = []
				}
			}
		})

		return this
	}

	/**
	 * Trigger an event. In case you provide multiple events via space-separated
	 * string or an object of events it will execute listeners for each event
	 * separatedly. You can use the "all" event to trigger all events.
	 *
	 * @param topicStringOrObject {String | Object}
	 * @param data {Object}
	 */
	trigger(eventName, data) {
		const events = splitTopicStringOrObject(eventName)

		const dispatchSingleEvent = (listenerDescriptor) =>
			listenerDescriptor && listenerDescriptor.call(window, data)

		Object.keys(events).map((eventName) => {
			try {
				;(this._events[eventName] || []).map(dispatchSingleEvent)
				;(this._events['all'] || []).map(dispatchSingleEvent)
			} catch (e) {
				console.log(
					'%c [Events] Exception raised.',
					'color: red; font-weight: bold;'
				)

				if (typeof console !== 'undefined') {
					console.error(e)
				} else {
					throw e
				}
			}
		})

		return this
	}
}

const events = new EventsManager()

window.ctEvents = events

export default events


text:
<?php
declare(strict_types=1);

namespace Doctrine\Tests\ORM\Functional\Ticket;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Tests\OrmFunctionalTestCase;

class GH7062Test extends OrmFunctionalTestCase
{
    private const SEASON_ID = 'season_18';
    private const TEAM_ID   = 'team_A';

    protected function setUp() : void
    {
        parent::setUp();

        $this->setUpEntitySchema(
            [
                GH7062Team::class,
                GH7062Season::class,
                GH7062Ranking::class,
                GH7062RankingPosition::class
            ]
        );
    }

    /**
     * @group 7062
     */
    public function testEntityWithAssociationKeyIdentityCanBeUpdated() : void
    {
        $this->createInitialRankingWithRelatedEntities();
        $this->modifyRanking();
        $this->verifyRanking();
    }

    private function createInitialRankingWithRelatedEntities() : void
    {
        $team    = new GH7062Team(self::TEAM_ID);
        $season  = new GH7062Season(self::SEASON_ID);

        $season->ranking = new GH7062Ranking($season, [$team]);

        $this->_em->persist($team);
        $this->_em->persist($season);
        $this->_em->flush();
        $this->_em->clear();

        foreach ($season->ranking->positions as $position) {
            self::assertSame(0, $position->points);
        }
    }

    private function modifyRanking() : void
    {
        /** @var GH7062Ranking $ranking */
        $ranking = $this->_em->find(GH7062Ranking::class, self::SEASON_ID);

        foreach ($ranking->positions as $position) {
            $position->points += 3;
        }

        $this->_em->flush();
        $this->_em->clear();
    }

    private function verifyRanking() : void
    {
        /** @var GH7062Season $season */
        $season = $this->_em->find(GH7062Season::class, self::SEASON_ID);
        self::assertInstanceOf(GH7062Season::class, $season);

        $ranking = $season->ranking;
        self::assertInstanceOf(GH7062Ranking::class, $ranking);

        foreach ($ranking->positions as $position) {
            self::assertSame(3, $position->points);
        }
    }
}

/**
 * Simple Entity whose identity is defined through another Entity (Season)
 *
 * @Entity
 * @Table(name="soccer_rankings")
 */
class GH7062Ranking
{
    /**
     * @Id
     * @OneToOne(targetEntity=GH7062Season::class, inversedBy="ranking")
     * @JoinColumn(name="season", referencedColumnName="id")
     *
     * @var GH7062Season
     */
    public $season;

    /**
     * @OneToMany(targetEntity=GH7062RankingPosition::class, mappedBy="ranking", cascade={"all"})
     *
     * @var Collection|GH7062RankingPosition[]
     * @psalm-var Collection<GH7062RankingPosition>
     */
    public $positions;

    /**
     * @param GH7062Team[] $teams
     */
    public function __construct(GH7062Season $season, array $teams)
    {
        $this->season    = $season;
        $this->positions = new ArrayCollection();

        foreach ($teams as $team) {
            $this->positions[] = new GH7062RankingPosition($this, $team);
        }
    }
}

/**
 * Entity which serves as a identity provider for other entities
 *
 * @Entity
 * @Table(name="soccer_seasons")
 */
class GH7062Season
{
    /**
     * @Id
     * @Column(type="string")
     *
     * @var string
     */
    public $id;

    /**
     * @OneToOne(targetEntity=GH7062Ranking::class, mappedBy="season", cascade={"all"})
     *
     * @var GH7062Ranking|null
     */
    public $ranking;

    public function __construct(string $id)
    {
        $this->id = $id;
    }
}

/**
 * Entity which serves as a identity provider for other entities
 *
 * @Entity
 * @Table(name="soccer_teams")
 */
class GH7062Team
{
    /**
     * @Id
     * @Column(type="string")
     *
     * @var string
     */
    public $id;

    public function __construct(string $id)
    {
        $this->id = $id;
    }
}

/**
 * Entity whose identity is defined through two other entities
 *
 * @Entity
 * @Table(name="soccer_ranking_positions")
 */
class GH7062RankingPosition
{
    /**
     * @Id
     * @ManyToOne(targetEntity=GH7062Ranking::class, inversedBy="positions")
     * @JoinColumn(name="season", referencedColumnName="season")
     *
     * @var GH7062Ranking
     */
    public $ranking;

    /**
     * @Id
     * @ManyToOne(targetEntity=GH7062Team::class)
     * @JoinColumn(name="team_id", referencedColumnName="id")
     *
     * @var GH7062Team
     */
    public $team;

    /**
     * @Column(type="integer")
     *
     * @var int
     */
    public $points;

    public function __construct(GH7062Ranking $ranking, GH7062Team $team)
    {
        $this->ranking = $ranking;
        $this->team    = $team;
        $this->points  = 0;
    }
}


text:
/*!
 * Imessage jQuery plugin v0.0.1
 */
(function($){
	$.fn.imessage = function(options) {

		var settings = {
			'timeout':			60,
			'url':				null,
			'onMessageHover':	function() {},
			'onMessageClick':	function() {},
			'onRequest':		function() {},
			'onResponse':		function() {},
			'onBeforeInsert':	function() {},
			'messageWrapper':	'<div>',
			'messageClass':		'imessage-item'
		};

		this.each(function() {

			$.extend(settings, options);

			var $this = $(this);

			if (!settings.url) {
				 $.error('Url is not specified');
			} else {

				setInterval(function() {
					$.post(settings.url, function(data) {

						callEvent(settings, 'onResponse', $this, data);

						if (data != undefined && $(data['messages']).length > 0) {

							$(data['messages']).each(function(number, element) {

								if (settings.messageWrapper != null) {
									var message = $(settings.messageWrapper).html(element);
								} else {
									var message = $(element);
								}

								message.addClass(settings.messageClass);

								addEvent(message, settings, 'onMessageHover', 'mouseover');
								addEvent(message, settings, 'onMessageClick', 'click');

								callEvent(settings, 'onBeforeInsert', $this, message);

								$this.prepend(message);
							});
						}

					}, 'json');

				}, settings.timeout * 1000);

				addEvent($this, settings, 'onRequest', 'ajaxStart');
			}

		});

	};

	// Custom helpers

	/**
	 * Sets element event
	 */
	function addEvent(element, settings, customEvent, event) {
		element.bind(event, settings[customEvent]);
	}

	/**
	 * Calls custom element event
	 */
	function callEvent(settings, event, _this, data) {
		settings[event].call(_this, data);
	}

})(jQuery);


text:
/**
 * Name of the migration framework version which has generated this file.
 * DO NOT EDIT MANUALLY.
 */
exports.FRAMEWORK_VERSION = '0.1';

/**
 * Time stamp where the migration has been generated.
 * DO NOT EDIT MANUALLY.
 */
exports.TIMESTAMP = 1343373227;

/**
 * Migration version.
 * DO NOT EDIT MANUALLY.
 */
exports.VERSION = 0;

/**
 * Fields on model  at version 0.
 * Notice: DO NOT EDIT MANUALLY.
 */
exports.FIELDS = {
  "service_id": null
};

exports.forward = function(obj) {
  return obj;
};

exports.backward = function(obj) {
  return obj;
};


text:
unsigned int  ntp_local_port;                     // local port to listen for UDP packets
IPAddress     ntp_server_ip;                      // time.nist.gov NTP server address
const char*   ntp_server_name = "time.nist.gov";  //
const int     NTP_PACKET_SIZE = 48;               // NTP time stamp is in the first 48 bytes of the message
byte          ntp_packet_buffer[NTP_PACKET_SIZE]; // buffer to hold incoming and outgoing packets
long          ntp_epoch_in_seconds;               // unix time
long          ntp_received_epoch;                 // unix time upon last receive from NTP server
long          ntp_received_millis;                // millis() upon last receive from NTP server
bool          ntp_packet_received;                // ntp request state
char*         ntp_hms;                            // HH:MM:SS

// A UDP instance to let us send and receive packets over UDP
WiFiUDP udp;

char* ntp_epoch2hms(unsigned long);
void ntp_setup();
void ntp_send_request();
void ntp_read_response();
unsigned long ntp_send_packet();


text:
//
// This file is auto-generated. Please don't modify it!
//
package org.opencv.photo;

import org.opencv.photo.Tonemap;

// C++: class TonemapMantiuk
/**
 * This algorithm transforms image to contrast using gradients on all levels of gaussian pyramid,
 * transforms contrast values to HVS response and scales the response. After this the image is
 * reconstructed from new contrast values.
 *
 * For more information see CITE: MM06 .
 */
public class TonemapMantiuk extends Tonemap {

    protected TonemapMantiuk(long addr) { super(addr); }

    // internal usage only
    public static TonemapMantiuk __fromPtr__(long addr) { return new TonemapMantiuk(addr); }

    //
    // C++:  float cv::TonemapMantiuk::getSaturation()
    //

    public float getSaturation() {
        return getSaturation_0(nativeObj);
    }

    //
    // C++:  float cv::TonemapMantiuk::getScale()
    //

    public float getScale() {
        return getScale_0(nativeObj);
    }

    //
    // C++:  void cv::TonemapMantiuk::setSaturation(float saturation)
    //

    public void setSaturation(float saturation) {
        setSaturation_0(nativeObj, saturation);
    }

    //
    // C++:  void cv::TonemapMantiuk::setScale(float scale)
    //

    public void setScale(float scale) {
        setScale_0(nativeObj, scale);
    }

    @Override
    protected void finalize() throws Throwable {
        delete(nativeObj);
    }

    // C++:  float cv::TonemapMantiuk::getSaturation()
    private static native float getSaturation_0(long nativeObj);

    // C++:  float cv::TonemapMantiuk::getScale()
    private static native float getScale_0(long nativeObj);

    // C++:  void cv::TonemapMantiuk::setSaturation(float saturation)
    private static native void setSaturation_0(long nativeObj, float saturation);

    // C++:  void cv::TonemapMantiuk::setScale(float scale)
    private static native void setScale_0(long nativeObj, float scale);

    // native support for java finalize()
    private static native void delete(long nativeObj);

}


text:
set -e

dir="$(mktemp -d)"
trap "rm -rf '$dir'" EXIT

cp Gemfile "$dir"

# make sure that running "bundle" twice doesn't change Gemfile.lock the second time
cd "$dir"
BUNDLE_FROZEN=0 bundle install
cp Gemfile.lock Gemfile.lock.orig
BUNDLE_FROZEN=1 bundle install
diff -u Gemfile.lock.orig Gemfile.lock >&2

if ruby -rbundler -e 'exit Gem::Version.new(Bundler::VERSION) >= Gem::Version.new("2.1") ? 0 : 1'; then
	BUNDLE_DEPLOYMENT=1 bundle install
else
	bundle install --deployment
fi
diff -u Gemfile.lock.orig Gemfile.lock >&2


text:
@class BSBserValues;
@class BSBserWriter;
@class ImActorModelEntityCompatObsoleteFileReference;

@interface ImActorModelEntityCompatContentObsoleteRemoteFileSource : ImActorModelEntityCompatContentObsoleteFileSource

#pragma mark Public

- (instancetype)initWithBSBserValues:(BSBserValues *)values;

- (ImActorModelEntityCompatObsoleteFileReference *)getFileReference;

- (void)parseWithBSBserValues:(BSBserValues *)values;

- (void)serializeWithBSBserWriter:(BSBserWriter *)writer;

@end

J2OBJC_EMPTY_STATIC_INIT(ImActorModelEntityCompatContentObsoleteRemoteFileSource)

FOUNDATION_EXPORT void ImActorModelEntityCompatContentObsoleteRemoteFileSource_initWithBSBserValues_(ImActorModelEntityCompatContentObsoleteRemoteFileSource *self, BSBserValues *values);

FOUNDATION_EXPORT ImActorModelEntityCompatContentObsoleteRemoteFileSource *new_ImActorModelEntityCompatContentObsoleteRemoteFileSource_initWithBSBserValues_(BSBserValues *values) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(ImActorModelEntityCompatContentObsoleteRemoteFileSource)

#endif // _ImActorModelEntityCompatContentObsoleteRemoteFileSource_H_


text:
<?php

namespace Google\Cloud\Core\Tests\Unit;

use Google\Cloud\Core\UriTrait;
use PHPUnit\Framework\TestCase;

/**
 * @group core
 */
class UriTraitTest extends TestCase
{
    private $implementation;

    public function setUp()
    {
        $this->implementation = $this->getObjectForTrait(UriTrait::class);
    }

    public function testExpandsUri()
    {
        $path = 'narf';
        $baseUri = 'http://www.example.com';
        $uri = $this->implementation->expandUri($baseUri . '/{path}', [
            'path' => $path
        ]);

        $this->assertEquals($baseUri . '/' . $path, $uri);
    }

    /**
     * @dataProvider queryProvider
     */
    public function testBuildsUriWithQuery($expectedQuery, $query)
    {
        $baseUri = 'http://www.example.com';
        $uri = $this->implementation->buildUriWithQuery($baseUri, $query);

        $this->assertEquals($baseUri . $expectedQuery, (string) $uri);
    }

    public function queryProvider()
    {
        return [
            ['?narf=yes', ['narf' => 'yes']],
            ['?narf=true', ['narf' => true]],
            ['?narf=false', ['narf' => false]],
            ['?narf=0', ['narf' => '0']]
        ];
    }
}


text:
/**
 * The SQL database-related extensions to the upgrade framework.
 * <p>
 * This package contains implementations of the core upgrade interfaces (such as
 * {@link com.vmware.upgrade.Task} and {@link com.vmware.upgrade.PersistenceContext})
 * specific to operating with SQL databases via JDBC.
 *
 * @since 1.0
 */
package com.vmware.upgrade.sql;


text:
/**
 * jQuery Steam - TF2Items plugin
 *
 * Licensed under MIT LICENSE:
 *  http://www.opensource.org/licenses/mit-license.php
 *
 * Depencies:
 *  jQuery [of course]
 *  WebAPI plugin
 *
 * With the methods provided by this plugin, you will be
 * able to have an always-updated player backpack. Since
 * the data is REALLY big, it will take some time to load
 * the data [about 5 seconds on a good connection].
 *
 * Some stuff on this plugin are really ugly, I'll try to
 * update it ASAP.
 */

(function($){
  $.steam.tf2items = (function(){
    // Game defines
    var classes = ['scout', 'sniper', 'soldier', 'demoman', 'medic', 'heavy', 'pyro', 'spy', 'engineer'];
    var particles = ['particle0', 'particle1', 'particle2', 'particle3', 'particle4', 'particle5',
                     'Green Confetti',  'Purple Confetti', 'Haunted Ghosts', 'Green Energy', 'Purple Energy',
                     'Circling TF Logo', 'Massed Flies', 'Burning Flames', 'Scorching Flames', 'Searing Plasma',
                     'Vivid Plasma', 'Sunbeams', 'Circling Peace Sign', 'Circling Heart'];

    // Attributes that shouldn't be added to items
    var attBlackList = [25, 37, 116, 142, 189, 195, 196];
    // Items that have limited uses number
    var limitedItems = [241, 280, 281, 282, 283, 284, 286, 287, 288, 289, 290, 291,
                        5020, 5021, 5023, 5027, 5028, 5029, 5030, 5031, 5032, 5033,
                        5034, 5035, 5036, 5037, 5038, 5039, 5040, 5042, 5043, 5044];
    // Strings that come unstralated from the server
    var unstraslated = {
      TF_Wearable_Hat: 'Hat',
      TF_LockedCrate: 'Crate'
    };

    var schema = null;
    var language = null;

    // Parse the inventory token to its real values
    // http://wiki.teamfortress.com/wiki/WebAPI#Inventory_Token
    var parseInventory = function(inv) {
      var val = Number(inv);
      var equipped = [];
      for(var n = 0; n < 9; n++) {
        if((val & 1 << (n + 16))) {
          equipped.push(classes[n]);
        }
      }

      return {
          position: val & 0xFFFF,
          equipped: equipped
      };
    };

    // Load the item data, parsing the Schema value
    var loadSchema = function(callback) {
      if(schema) {
        callback();
      }
      else {
        $.steam.webapi.tf2.schema((language || 'en'), function(data) {
          var items = data.result.items.item;
          var qualities = data.result.qualities;
          var qualityNames = data.result.qualityNames;
          var attributes = data.result.attributes.attribute;

          schema = {
            qualities: [],
            items: [],
            attributes: {}
          };

          for(var q in qualities) {
            schema.qualities[qualities[q]] = {
              code: q,
              name: qualityNames[q]
            };
          }

          for(var i in items) {
            var itm = items[i];
            schema.items[itm.defindex] = itm;
          }

          // Store the attributes indexed by their names. This optimizes the search
          for(var a in attributes) {
            var att = attributes[a];
            schema.attributes[att.name] = att;
          }

          callback();
        });
      }
    };

    // Build the item name
    var buildName = function(defindex, quality) {
      var ret = '';

      if(schema) {
        var name = schema.items[defindex].item_name;

        // This will allow us to get default item data
        if(quality) {
          var title = schema.qualities[quality].name;
          // If we the quality has a title [not unique], use it
          if(title !== 'Unique') {
            // If the name is like "The Cloack and Dagger" we insert the title after "The "
            // We could use schema.items[itm.defindex].proper_name to check this, but it's buggy
            if(name.indexOf("The ") === 0) {
              ret += "The ";
              name = name.substr(4);
            }

            ret += title + ' ';
          }
        }

        ret +=  name;
      }

      return ret;
    };

    // Get the list of item attributes
    var parseAttributes = function(defindex, extra) {
      var ret = [];

      if(schema) {
        // If the item has default attributes, parse them
        if(schema.items[defindex].attributes) {
          var attributes = schema.items[defindex].attributes.attribute;
          for(var a in attributes) {
            var att = attributes[a];
            var data = schema.attributes[att.name];
            if(validAttribute(data.defindex, att)) {
              ret.push({
                name: buildAttribute({
                  string: data.description_string || null,
                  format: data.description_format || null,
                  value: att.value,
                  float_value: att.float_value
                }),
                type: data.effect_type
              });
            }
          }
        }
        // Read extras attributes, if any
        if(extra) {
          var n = 0;
          for(var e in extra) {
            var att = extra[e];
            // Bypass the crate series from the item
            if(validAttribute(att.defindex, att) && att.defindex != 187) {
              var data = searchAttribute(att.defindex);
              ret.push({
                name: buildAttribute({
                  string: data.description_string || null,
                  format: data.description_format || null,
                  value: att.value,
                  float_value: att.float_value
                }),
                type: data.effect_type
              });
            }
          }
        }
      }
      return ret;
    };

    // Check if the attribute info matches with any bad one
    var validAttribute = function(defindex, data) {
      if(!(data.value || data.float_value)) {
        return false;
      }
      for(var i in attBlackList) {
        if(attBlackList[i] == defindex) {
          return false;
        }
      }
      return true;
    }

    // Get the attribute by its defindex
    var searchAttribute = function(defindex) {
      for(var a in schema.attributes) {
        if(schema.attributes[a].defindex == defindex){
          return schema.attributes[a];
        }
      }
    };

    // Build the attribute value string
    var buildAttribute = function(data) {
      var ret = '';

      if(data.format) {
        var value;

        switch(data.format) {
          case 'value_is_percentage':
            value = Math.round((data.value*100) - 100);
          break;
          case 'value_is_inverted_percentage':
            value = Math.round((100 - (data.value*100)));
          break;
          case 'value_is_additive':
            value = data.value;
          break;
          case 'value_is_additive_percentage':
            value = Math.round(data.value*100);
          break;
          case 'value_is_date':
            var date = new Date(data.value*1000);
            value = date.toLocaleDateString();
          break;
          case 'value_is_account_id':
            value = 'STEAM_0:'+(data.value%2)+':'+(data.value/2);
          break;
          case 'value_is_particle_index':
            value = particles[(data.float_value || data.value)];
          break;
          default:
            value = "V:"+data.value+"F:"+data.format;
        }

        ret = data.string.replace("%s1", value);
      }
      else {
        ret = data.string;
      }

      return ret;
    };

    var getUsedBy = function(data) {
      // If no data, the item is used by all classes
      if(!data.used_by_classes) {
        return classes;
      }

      var ret = [];
      for(var c in data.used_by_classes['class']) {
        if(data.used_by_classes['class'][c]) {
          ret.push(data.used_by_classes['class'][c].toLowerCase());
        }
      }

      return ret;
    }

    // Check and get the color of a painted item
    var itemPainted = function(itm) {
      var data = schema.items[itm.defindex];
      var attributes = data.attributes ? data.attributes.attribute : null;
      for(var a in attributes) {
        var att = attributes[a];
        if(att.name == 'set item tint RGB') {
          return parseInt(att.value).toString(16);
        }
      }
      var extra = itm.attributes ? itm.attributes.attribute : null;
      for(var e in extra) {
        var att = extra[e];
        if(att.defindex == 142) {
          return parseInt(att.float_value).toString(16);
        }
      }

      return false;
    };

    // Check and get who gifted the item
    var itemGifted = function(itm) {
      var attributes = itm.attributes ? itm.attributes.attribute : null;
      for(var a in attributes) {
        var att = attributes[a];
        if(att.defindex == 186) {
          // Avoid problems with the big number
          // Original sum was value + 76561197960265728
          return '7656119' + (att.value + 7960265728);
        }
      }

      return false;
    };

    var itemLimited = function(defindex) {
      for(var i in limitedItems) {
        if(limitedItems[i] == defindex) {
          return true;
        }
      }
      return false;
    };

    var fixString = function(str) {
      if(unstraslated[str]) {
        return unstraslated[str];
      }

      return str;
    }

    return {
      // Get and parse the items for a specific backpack
      getItems: function(id, callback) {
        $.steam.webapi.tf2.playerItems(id, function(data){
          var items = data.result.items.item;
          // Ensure that our schema is loaded
          loadSchema(function() {
            var ret = {
              items: [],
              invalid: []
            };
            // Parse the item data, to be readable
            var a = 0;
            for(var i in items) {
              var itm = items[i];
              var inv = parseInventory(itm.inventory);
              var data = schema.items[itm.defindex];
              var att = itm.attributes ? itm.attributes.attribute : null;
              var cur = {
                position: inv.position,
                name: buildName(itm.defindex, itm.quality),
                custom_name: itm.custom_name,
                custom_desc: itm.custom_desc,
                type: fixString(data.item_type_name),
                level: itm.level,
                quality: schema.qualities[itm.quality].code,
                quantity: itemLimited(itm.defindex) ? itm.quantity : null,
                equipped: inv.equipped,
                // Get the proper used_by_classes array
                used_by: getUsedBy(data),
                // Check and negate if something block the item from be traded
                tradable: !(itm.flag_cannot_trade || (typeof data.tradable === 'undefined' ? false : !data.tradable)),
                // Hardcoded: get the name of the image
                image: data.image_url,
                // Parse some usefull data from the attributes
                color: itemPainted(itm),
                gift: itemGifted(itm),
                attributes: parseAttributes(itm.defindex, att)
              };

              // Add the item to the invalid array if it's overlaping other items
              if(inv.position && typeof ret.items[inv.position] === 'undefined') {
                ret.items[inv.position] = cur;
              }
              else {
                ret.invalid.push(cur);
              }
            }

            callback(ret);
          });
        });
      },
      getItemList: function(callback) {
        // Get the schema
        loadSchema(function() {
          var items = schema.items;
          var ret = [];
          // Parse the item data, to be readable
          var a = 0;
          for(var i in items) {
            var itm = items[i];
            var att = itm.attributes;
            var cur = {
              name: buildName(itm.defindex),
              type: fixString(itm.item_type_name),
              // Itens for all classes dont have 'used_by_classes', so use the classes array
              used_by: getUsedBy(itm),
              // Check and negate if something block the item from be traded
              tradable: !(itm.flag_cannot_trade),
              // Hardcoded: get the name of the image
              image: itm.image_url,
              // Parse some usefull data from the attributes
              color: itemPainted(itm),
              attributes: parseAttributes(itm.defindex)
            };

            ret.push(cur);
          }

          callback(ret);
        });
      },
      // Allow us to use multiple languages
      setLanguage: function(_language){
        if(_language === null || (_language && typeof _language === 'string')) {
          language = _language;
          // Clear the itemData cache, since it has language specific stuff
          if(schema !== null) {
            schema = null;
          }
        }
      }
    }
  })();
})(jQuery);


text:
class DebugTool : public virtual Object {
    double timer;
    int frame, tick;
    char str[20];
    bool output;
public:
    DebugTool(bool output) : output(output) {}

    void setup() {
        LOG << "setup debug tool";
        timer = glfwGetTime();
        tick = frame = 0;
    }

    void render() {
        ++tick;
        double now = glfwGetTime();
        if (now - timer > 1.0) {
            INFO << "fps: " << tick;
            tick = 0;
            timer = now;
        }

        if (output || Application::getKey(GLFW_KEY_X) == GLFW_PRESS) {
            sprintf(str, "tmp/s_%04d.png", frame);
            INFO << "render: " << str;
            Application::screenShot(str);
        }

        ++frame;
    }

    void reset() { LOG << "reset debug tool"; }
};

Object *ObjectBox::debug(bool output) {
    return create<DebugTool>(output);
}


text:
var cdb = require('cartodb.js');
var _ = require('underscore');
var ViewFactory = require('../../../view_factory');
var EstimationView = require('./estimation_view');
var QuotaView = require('./quota_view');
var DefaultFooterView = require('../default_footer_view');
var pluralizeString = require('../../../view_helpers/pluralize_string');

/**
 * View to select long/lat couple to do the georeference.
 */
module.exports = cdb.core.View.extend({

  initialize: function() {
    this._initBinds();
    this._fetchEstimation();
  },

  render: function() {
    this.clearSubViews();
    this.$el.html(
      this.getTemplate('common/dialogs/georeference/street_addresses/street_addresses')({
      })
    );
    this._renderHeader();
    this._renderRows();
    this._renderEstimation();
    this._renderQuota();
    this._renderFooter();
    return this;
  },

  _renderHeader: function() {
    var view = ViewFactory.createByTemplate('common/dialogs/georeference/default_content_header', {
      title: 'Select the column(s) that has your street address',
      desc: 'Use this option if you need high resolution geocoding of your street adresses data.'
    });
    this.addView(view);
    this.$el.prepend(view.render().$el);
  },

  _renderRows: function() {
    this._$rows().toggleClass('u-disabled', !!this.model.isDisabled());
    this.model.get('rows').chain()
      .map(this._createRowView, this)
      .map(this._appendRowToDOM, this);
  },

  _renderEstimation: function() {
    var view = new EstimationView({
      model: this.model.get('estimation'),
      userGeocoding: this.model.get('userGeocoding'),
      hasHardLimit: this.model.hasHardLimit()
    });
    this.addView(view);
    this.$('.js-estimation').append(view.render().el);
  },

  _renderQuota: function() {
    var view = new QuotaView({
      model: this.model.get('userGeocoding')
    });
    this.addView(view);
    this.$('.js-quota').append(view.render().el);
  },

  _renderFooter: function() {
    var content;

    if (this.model.isDisabled()) {
      content = this.getTemplate('common/dialogs/georeference/street_addresses/upgrade_footer')({
        cartodb_com_hosted: cdb.config.get('cartodb_com_hosted'),
        upgradeURL: cdb.config.get('upgrade_url'),
        pluralizeString: pluralizeString,
        daysLeftToNextBilling: this.model.daysLeftToNextBilling()
      });
    } else {
      var view = new DefaultFooterView({
        model: this.model
      });
      this.addView(view);
      content = view.render().$el;
    }

    this.$el.append(content);
  },

  _createRowView: function(m) {
    var view = m.createView();
    this.addView(view);
    return view;
  },

  _appendRowToDOM: function(view) {
    this._$rows().append(view.render().el);
  },

  _$rows: function() {
    return this.$('.js-rows');
  },

  _initBinds: function() {
    var rows = this.model.get('rows');
    rows.bind('change', this._onChangeRows, this);
    rows.bind('add', this._onAddRow, this);
    this.add_related_model(rows);

    var estimation = this.model.get('estimation');
    estimation.bind('change', this._onChangeEstimation, this);
    estimation.bind('error', this._onEstimationError, this);
    this.add_related_model(estimation);

    var geocodeStuff = this.model.get('geocodeStuff');
    geocodeStuff.bind('change:forceAllRows', this._onChangeForceAllRows, this);
    this.add_related_model(geocodeStuff);

    this.model.bind('change:confirmTOS', this._onChangeConfirmTOS, this);
  },

  _onChangeForceAllRows: function() {
    this.model.get('estimation').reset();
    this._fetchEstimation();
  },

  _fetchEstimation: function() {
    this.model.get('estimation').fetch({
      data: {
        force_all_rows: this.model.get('geocodeStuff').get('forceAllRows')
      }
    });
  },

  _onChangeRows: function() {
    var formatter = this.model.get('rows').chain()
      .map(this.model.getFormatterItemByRow)
      .compact() // there might be rows that have no value, if so skip them
      .value().join(', ');

    this.model.set({
      formatter: formatter,
      canContinue: !_.isEmpty(formatter)
    });
  },

  _onAddRow: function(newRow, rows, opts) {
    var rowView = this._createRowView(newRow);
    this.$('.js-rows').children().eq(opts.index).before(rowView.render().el);
    this.model.assertIfCanAddMoreRows();
  },

  _onChangeEstimation: function() {
    var mustAgreeToTOS = this.model.get('estimation').mayHaveCost() &&
      !this.model.get('isGoogleMapsUser') && !this.model.hasHardLimit();

    this.model.set('mustAgreeToTOS', mustAgreeToTOS);
  },

  _onEstimationError: function() {
    // Force re-render, handled in subview
    this.model.get('estimation').set({
      estimation: -1,
      rows: -1
    });
  },

  _onChangeConfirmTOS: function(m, confirmTOS) {
    if (confirmTOS) {
      this.model.set('confirmTOS', false, { silent: true }); // to re-renable if cancelled
      var view = ViewFactory.createDialogByTemplate('common/dialogs/georeference/street_addresses/confirm_tos', {
        // template data
        costInDollars: this.model.get('estimation').costInDollars()
      }, {
        // dialog options
        triggerDialogEvents: false, // to avoid closing this modal
        enter_to_confirm: true,
        clean_on_hide: false
      });
      view.ok = this._onAgreeToTOS.bind(this);
      this.addView(view);
      view.appendToBody();
    }
  },

  _onAgreeToTOS: function() {
    this.model.set('hasAgreedToTOS', true);
    this.model.continue();
  }

});


text:
<?php
/**
 * All settings that are uncommented are mandatory
 * Others optional
 */

//Use a specific domain for links presented to the user
//Format: https://your.domain.name/
// MUST HAVE TAILING /
define('URL','https://dev.pictshare.net/');

//define('JPEG_COMPRESSION', 90);
//define('FFMPEG_BINARY','');
//define('ALT_FOLDER','/ftp/pictshare');
//define('ALLOWED_SUBNET','192.168.0.0/24');

//S3 settings
//
//define('S3_BUCKET','bucketname');
//define('S3_ACCESS_KEY','');
//define('S3_SECRET_KEY','');
//define('S3_ENDPOINT','http://localhost:9000'); //optional, only if you're using S3 compatible storage like Minio


text:
<!--
  ~ Copyright 2018 Google LLC
  ~
  ~ 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
  ~
  ~    https://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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportHeight="24.0"
        android:viewportWidth="24.0">
    <path
        android:fillColor="#FFFFFF"
        android:fillType="nonZero"
        android:pathData="M11,2L11,22C5.93,21.5 2,17.21 2,12C2,6.79 5.93,2.5 11,2ZM13.03,2L13.03,10.99L22,10.99C21.53,6.25 17.76,2.47 13.03,2ZM13.03,13.01L13.03,22C17.77,21.53 21.53,17.75 22,13.01L13.03,13.01Z"
        android:strokeColor="#00000000"
        android:strokeWidth="1"/>
</vector>


text:
package io.craftsman.creator;

import java.time.LocalDateTime;

public class LocalDateTimeCreator implements Creator<LocalDateTime> {

    @Override
    public LocalDateTime create(Object source) {
        LocalDateTime srcObject = (LocalDateTime) source;
        return LocalDateTime.of(
                srcObject.getYear(),
                srcObject.getMonth(),
                srcObject.getDayOfMonth(),
                srcObject.getHour(),
                srcObject.getMinute(),
                srcObject.getSecond(),
                srcObject.getNano()
        );
    }
}


text:
--this query provides an overview of the MHC SSP results
SELECT
  s.Id,
  s.shortName,
  max(s.Status) as result,

FROM study.MHC_SSP_Summary s

GROUP BY s.Id, s.shortName
PIVOT result BY shortName