text:
'use strict';

/* jshint ignore:start */
/**
 * This code was generated by
 * \ / _    _  _|   _  _
 *  | (_)\/(_)(_|\/| |(/_  v1.0.0
 *       /       /
 */
/* jshint ignore:end */

var Q = require('q');  /* jshint ignore:line */
var _ = require('lodash');  /* jshint ignore:line */
var util = require('util');  /* jshint ignore:line */
var Page = require('../../../../../base/Page');  /* jshint ignore:line */
var deserialize = require(
    '../../../../../base/deserialize');  /* jshint ignore:line */
var values = require('../../../../../base/values');  /* jshint ignore:line */

var UserChannelList;
var UserChannelPage;
var UserChannelInstance;

/* jshint ignore:start */
/**
 * Initialize the UserChannelList
 *
 * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList
 *
 * @param {Twilio.IpMessaging.V1} version - Version of the resource
 * @param {string} serviceSid - The service_sid
 * @param {string} userSid - The sid
 */
/* jshint ignore:end */
UserChannelList = function UserChannelList(version, serviceSid, userSid) {
  /* jshint ignore:start */
  /**
   * @function userChannels
   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext#
   *
   * @param {string} sid - sid of instance
   *
   * @returns {Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelContext}
   */
  /* jshint ignore:end */
  function UserChannelListInstance(sid) {
    return UserChannelListInstance.get(sid);
  }

  UserChannelListInstance._version = version;
  // Path Solution
  UserChannelListInstance._solution = {serviceSid: serviceSid, userSid: userSid};
  UserChannelListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Channels`;
  /* jshint ignore:start */
  /**
   * Streams UserChannelInstance records from the API.
   *
   * This operation lazily loads records as efficiently as possible until the limit
   * is reached.
   *
   * The results are passed into the callback function, so this operation is memory
   * efficient.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @function each
   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#
   *
   * @param {object} [opts] - Options for request
   * @param {number} [opts.limit] -
   *         Upper limit for the number of records to return.
   *         each() guarantees never to return more than limit.
   *         Default is no limit
   * @param {number} [opts.pageSize] -
   *         Number of records to fetch per request,
   *         when not set will use the default value of 50 records.
   *         If no pageSize is defined but a limit is defined,
   *         each() will attempt to read the limit with the most efficient
   *         page size, i.e. min(limit, 1000)
   * @param {Function} [opts.callback] -
   *         Function to process each record. If this and a positional
   *         callback are passed, this one will be used
   * @param {Function} [opts.done] -
   *          Function to be called upon completion of streaming
   * @param {Function} [callback] - Function to process each record
   */
  /* jshint ignore:end */
  UserChannelListInstance.each = function each(opts, callback) {
    if (_.isFunction(opts)) {
      callback = opts;
      opts = {};
    }
    opts = opts || {};
    if (opts.callback) {
      callback = opts.callback;
    }
    if (_.isUndefined(callback)) {
      throw new Error('Callback function must be provided');
    }

    var done = false;
    var currentPage = 1;
    var currentResource = 0;
    var limits = this._version.readLimits({
      limit: opts.limit,
      pageSize: opts.pageSize
    });

    function onComplete(error) {
      done = true;
      if (_.isFunction(opts.done)) {
        opts.done(error);
      }
    }

    function fetchNextPage(fn) {
      var promise = fn();
      if (_.isUndefined(promise)) {
        onComplete();
        return;
      }

      promise.then(function(page) {
        _.each(page.instances, function(instance) {
          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {
            done = true;
            return false;
          }

          currentResource++;
          callback(instance, onComplete);
        });

        if (!done) {
          currentPage++;
          fetchNextPage(_.bind(page.nextPage, page));
        } else {
          onComplete();
        }
      });

      promise.catch(onComplete);
    }

    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));
  };

  /* jshint ignore:start */
  /**
   * Lists UserChannelInstance records from the API as a list.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @function list
   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#
   *
   * @param {object} [opts] - Options for request
   * @param {number} [opts.limit] -
   *         Upper limit for the number of records to return.
   *         list() guarantees never to return more than limit.
   *         Default is no limit
   * @param {number} [opts.pageSize] -
   *         Number of records to fetch per request,
   *         when not set will use the default value of 50 records.
   *         If no page_size is defined but a limit is defined,
   *         list() will attempt to read the limit with the most
   *         efficient page size, i.e. min(limit, 1000)
   * @param {function} [callback] - Callback to handle list of records
   *
   * @returns {Promise} Resolves to a list of records
   */
  /* jshint ignore:end */
  UserChannelListInstance.list = function list(opts, callback) {
    if (_.isFunction(opts)) {
      callback = opts;
      opts = {};
    }
    opts = opts || {};
    var deferred = Q.defer();
    var allResources = [];
    opts.callback = function(resource, done) {
      allResources.push(resource);

      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {
        done();
      }
    };

    opts.done = function(error) {
      if (_.isUndefined(error)) {
        deferred.resolve(allResources);
      } else {
        deferred.reject(error);
      }
    };

    if (_.isFunction(callback)) {
      deferred.promise.nodeify(callback);
    }

    this.each(opts);
    return deferred.promise;
  };

  /* jshint ignore:start */
  /**
   * Retrieve a single page of UserChannelInstance records from the API.
   *
   * The request is executed immediately.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @function page
   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#
   *
   * @param {object} [opts] - Options for request
   * @param {string} [opts.pageToken] - PageToken provided by the API
   * @param {number} [opts.pageNumber] -
   *          Page Number, this value is simply for client state
   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50
   * @param {function} [callback] - Callback to handle list of records
   *
   * @returns {Promise} Resolves to a list of records
   */
  /* jshint ignore:end */
  UserChannelListInstance.page = function page(opts, callback) {
    if (_.isFunction(opts)) {
      callback = opts;
      opts = {};
    }
    opts = opts || {};

    var deferred = Q.defer();
    var data = values.of({
      'PageToken': opts.pageToken,
      'Page': opts.pageNumber,
      'PageSize': opts.pageSize
    });

    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});

    promise = promise.then(function(payload) {
      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));
    }.bind(this));

    promise.catch(function(error) {
      deferred.reject(error);
    });

    if (_.isFunction(callback)) {
      deferred.promise.nodeify(callback);
    }

    return deferred.promise;
  };

  /* jshint ignore:start */
  /**
   * Retrieve a single target page of UserChannelInstance records from the API.
   *
   * The request is executed immediately.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @function getPage
   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#
   *
   * @param {string} [targetUrl] - API-generated URL for the requested results page
   * @param {function} [callback] - Callback to handle list of records
   *
   * @returns {Promise} Resolves to a list of records
   */
  /* jshint ignore:end */
  UserChannelListInstance.getPage = function getPage(targetUrl, callback) {
    var deferred = Q.defer();

    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});

    promise = promise.then(function(payload) {
      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));
    }.bind(this));

    promise.catch(function(error) {
      deferred.reject(error);
    });

    if (_.isFunction(callback)) {
      deferred.promise.nodeify(callback);
    }

    return deferred.promise;
  };

  /* jshint ignore:start */
  /**
   * Provide a user-friendly representation
   *
   * @function toJSON
   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#
   *
   * @returns Object
   */
  /* jshint ignore:end */
  UserChannelListInstance.toJSON = function toJSON() {
    return this._solution;
  };

  UserChannelListInstance[util.inspect.custom] = function inspect(depth, options)
      {
    return util.inspect(this.toJSON(), options);
  };

  return UserChannelListInstance;
};

/* jshint ignore:start */
/**
 * Initialize the UserChannelPage
 *
 * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelPage
 *
 * @param {V1} version - Version of the resource
 * @param {Response<string>} response - Response from the API
 * @param {UserChannelSolution} solution - Path solution
 *
 * @returns UserChannelPage
 */
/* jshint ignore:end */
UserChannelPage = function UserChannelPage(version, response, solution) {
  // Path Solution
  this._solution = solution;

  Page.prototype.constructor.call(this, version, response, this._solution);
};

_.extend(UserChannelPage.prototype, Page.prototype);
UserChannelPage.prototype.constructor = UserChannelPage;

/* jshint ignore:start */
/**
 * Build an instance of UserChannelInstance
 *
 * @function getInstance
 * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelPage#
 *
 * @param {UserChannelPayload} payload - Payload response from the API
 *
 * @returns UserChannelInstance
 */
/* jshint ignore:end */
UserChannelPage.prototype.getInstance = function getInstance(payload) {
  return new UserChannelInstance(
    this._version,
    payload,
    this._solution.serviceSid,
    this._solution.userSid
  );
};

/* jshint ignore:start */
/**
 * Provide a user-friendly representation
 *
 * @function toJSON
 * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelPage#
 *
 * @returns Object
 */
/* jshint ignore:end */
UserChannelPage.prototype.toJSON = function toJSON() {
  let clone = {};
  _.forOwn(this, function(value, key) {
    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
      clone[key] = value;
    }
  });
  return clone;
};

UserChannelPage.prototype[util.inspect.custom] = function inspect(depth,
    options) {
  return util.inspect(this.toJSON(), options);
};

/* jshint ignore:start */
/**
 * Initialize the UserChannelContext
 *
 * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelInstance
 *
 * @property {string} accountSid - The account_sid
 * @property {string} serviceSid - The service_sid
 * @property {string} channelSid - The channel_sid
 * @property {string} memberSid - The member_sid
 * @property {user_channel.channel_status} status - The status
 * @property {number} lastConsumedMessageIndex - The last_consumed_message_index
 * @property {number} unreadMessagesCount - The unread_messages_count
 * @property {string} links - The links
 *
 * @param {V1} version - Version of the resource
 * @param {UserChannelPayload} payload - The instance payload
 * @param {sid} serviceSid - The service_sid
 * @param {sid} userSid - The sid
 */
/* jshint ignore:end */
UserChannelInstance = function UserChannelInstance(version, payload, serviceSid,
                                                    userSid) {
  this._version = version;

  // Marshaled Properties
  this.accountSid = payload.account_sid; // jshint ignore:line
  this.serviceSid = payload.service_sid; // jshint ignore:line
  this.channelSid = payload.channel_sid; // jshint ignore:line
  this.memberSid = payload.member_sid; // jshint ignore:line
  this.status = payload.status; // jshint ignore:line
  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line
  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line
  this.links = payload.links; // jshint ignore:line

  // Context
  this._context = undefined;
  this._solution = {serviceSid: serviceSid, userSid: userSid, };
};

/* jshint ignore:start */
/**
 * Provide a user-friendly representation
 *
 * @function toJSON
 * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelInstance#
 *
 * @returns Object
 */
/* jshint ignore:end */
UserChannelInstance.prototype.toJSON = function toJSON() {
  let clone = {};
  _.forOwn(this, function(value, key) {
    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
      clone[key] = value;
    }
  });
  return clone;
};

UserChannelInstance.prototype[util.inspect.custom] = function inspect(depth,
    options) {
  return util.inspect(this.toJSON(), options);
};

module.exports = {
  UserChannelList: UserChannelList,
  UserChannelPage: UserChannelPage,
  UserChannelInstance: UserChannelInstance
};


text:
package org.apache.shardingsphere.elasticjob.restful.pipeline;

import io.netty.channel.embedded.EmbeddedChannel;
import lombok.SneakyThrows;
import org.apache.shardingsphere.elasticjob.restful.Filter;
import org.apache.shardingsphere.elasticjob.restful.handler.HandleContext;
import org.apache.shardingsphere.elasticjob.restful.handler.Handler;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

import java.util.List;

import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public final class FilterChainInboundHandlerTest {

    @Mock
    private List<Filter> filterInstances;

    @Mock
    private HandleContext<Handler> handleContext;

    private EmbeddedChannel channel;

    @Before
    public void setUp() {
        channel = new EmbeddedChannel(new FilterChainInboundHandler(filterInstances));
    }

    @Test
    @SneakyThrows
    public void assertNoFilter() {
        when(filterInstances.isEmpty()).thenReturn(true);
        channel.writeOneInbound(handleContext);
        verify(handleContext, never()).getHttpRequest();
    }

    @Test
    public void assertFilterExists() {
        when(filterInstances.isEmpty()).thenReturn(false);
        channel.writeOneInbound(handleContext);
        verify(handleContext, atLeastOnce()).getHttpRequest();
    }
}

redpajama_set_name: RedPajamaGithub


text: For now, see [CONTRIBUTING.md](../CONTRIBUTING.md) to get started.


text:
function ft_embed_video_live()
{
	// Add trigger to add button
	$('form .ft_embed_video_btn_add').not('.triggered').each(function(k,v){

		//$(v).unbind('mousedown');
		//$(v).mousedown(function(){
		$(v).live('mousedown', function(){

			if (embed_video_add_file_trigger_version == 2)
			{
				$.ee_filebrowser.add_trigger($(v), 'upload_file', {
					content_type: 'images',
					directory: 'all'
				}, function(a){

					// Fetch title
					if (typeof(a.name) !== 'undefined'){
						file_name = a.name;
					}

					if (typeof(a.title) !== 'undefined'){
						file_name = a.title;
					}

					var ft_embed_video_item = $(this).closest('.ft_embed_video_item');

					$(ft_embed_video_item).find('.ft_embed_video_dir').val(a.upload_location_id);
					$(ft_embed_video_item).find('.ft_embed_video_name').val(file_name);
					$(ft_embed_video_item).find('.ft_embed_video_file').removeClass('js_hide');
					$(ft_embed_video_item).find('.ft_embed_video_file_name').html(file_name);
					$(ft_embed_video_item).find('.ft_embed_video_add').addClass('js_hide');

					ft_embed_video_live();

				});
			}
			else
			{
				$.ee_filebrowser.add_trigger($(v), 'upload_file', function(a){

					// Fetch title
					if (typeof(a.name) !== 'undefined'){
						file_name = a.name;
					}

					if (typeof(a.title) !== 'undefined'){
						file_name = a.title;
					}

					var ft_embed_video_item = $(this).closest('.ft_embed_video_item');

					$(ft_embed_video_item).find('.ft_embed_video_dir').val(a.upload_location_id);
					$(ft_embed_video_item).find('.ft_embed_video_name').val(file_name);
					$(ft_embed_video_item).find('.ft_embed_video_file').removeClass('js_hide');
					$(ft_embed_video_item).find('.ft_embed_video_file_name').html(file_name);
					$(ft_embed_video_item).find('.ft_embed_video_add').addClass('js_hide');

					ft_embed_video_live();

				});
			}

		});

		$(v).addClass('triggered');
		$(v).click(function() {
			return false;
		});
	});

	// Show - hide add button
	$('.ft_embed_video_item_wrapper').each(function(k,v){
		var files_limit = parseInt($(v).find('.files_limit').text());
		if ($(v).find('.ft_embed_video_item').size() >= 1)
		{
			$(v).find('.ft_embed_video_item_btn_add_wrapper').addClass('js_hide');
		}
		else
		{
			$(v).find('.ft_embed_video_item_btn_add_wrapper').removeClass('js_hide');
		}
	});

	files_id_sortable_script();
}

function files_id_sortable_script()
{
	$( ".ft_embed_video_item_wrapper" ).sortable({
		handle: '.ft_embed_video_img',
		cursor: 'move',
		items: '.ft_embed_video_item',
		stop: function() {}
	});
}

ft_embed_video_live();

$('.ft_embed_video_remove_button').live("click", function(){

	var ft_embed_video_item = $(this).closest('.ft_embed_video_item');

	$(ft_embed_video_item).find('.ft_embed_video_add').removeClass('js_hide');
	$(ft_embed_video_item).find('.ft_embed_video_dir').val('');
	$(ft_embed_video_item).find('.ft_embed_video_name').val('');
	$(ft_embed_video_item).find('.ft_embed_video_file').addClass('js_hide');

	return false;
});


text:
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.title }}</title>
{% if page.excerpt %}<meta name="description" content="{{ page.excerpt | strip_html }}">{% endif %}
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
{% if page.author %}
  {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %}
{% endif %}

{% include _open-graph.html %}

{% if site.owner.google.verify %}<!-- Webmaster Tools verfication -->
<meta name="google-site-verification" content="{{ site.owner.google.verify }}">{% endif %}
{% if site.owner.bing-verify %}<meta name="msvalidate.01" content="{{ site.owner.bing-verify }}">{% endif %}

{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
<link rel="canonical" href="{{ canonical }}">
<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
<link rel="stylesheet" type="text/css" class="ui" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/semantic.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="/stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="/stylesheets/github-light.css" media="screen">
<link rel="stylesheet/less" type="text/css" href="/src/definitions/elements/button.less" />
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Karma:600,400,400italic,600italic' rel='stylesheet' type='text/css'>

<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- For all browsers
<link rel="stylesheet" href="{{ site.url }}/assets/css/main.css">
 -->
<meta http-equiv="cleartype" content="on">

<!-- HTML5 Shiv and Media Query Support -->
<!--[if lt IE 9]>
    <script src="{{ site.url }}/assets/js/vendor/html5shiv.min.js"></script>
    <script src="{{ site.url }}/assets/js/vendor/respond.min.js"></script>
<![endif]-->

<!-- Modernizr -->
<script src="/assets/js/vendor/modernizr-2.7.1.custom.min.js"></script>

<link href='//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700%7CPT+Serif:400,700,400italic' rel='stylesheet' type='text/css'>

<!-- Icons -->
<!-- 16x16 -->
<link rel="shortcut icon" href="/favicon.ico">
<!-- 32x32 -->
<link rel="shortcut icon" href="/favicon.png">
<!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon-precomposed" href="/assets/images/apple-touch-icon-precomposed.png">
<!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/images/apple-touch-icon-72x72-precomposed.png">
<!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/images/apple-touch-icon-114x114-precomposed.png">
<!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/images/apple-touch-icon-144x144-precomposed.png">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-migrate/1.2.1/jquery-migrate.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/semantic.min.js"></script>
<script src="/assets/js/plugins/jquery.xdomainajax.js"></script>

<style type="text/css">

    .hidden.menu {
      display: none;
    }

    .masthead.segment {
      min-height: 300px;
      padding: 1em 0em;
    }

    .masthead .logo.item img {
      margin-right: 1em;
    }
    .masthead .ui.menu .ui.button {
      margin-left: 0.5em;
    }
    .masthead h1.ui.header {
      margin-top: 0.5em;
      margin-bottom: 0em;
      font-size: 4em;
      font-weight: normal;
    }
    .masthead h2 {
      font-size: 1.7em;
      font-weight: normal;
    }

    .ui.vertical.stripe {
      padding: 8em 0em;
    }
    .ui.vertical.stripe h3 {
      font-size: 2em;
    }
    .ui.vertical.stripe .button + h3,
    .ui.vertical.stripe p + h3 {
      margin-top: 3em;
    }
    .ui.vertical.stripe .floated.image {
      clear: both;
    }
    .ui.vertical.stripe p {
      font-size: 1.33em;
    }
    .ui.vertical.stripe .horizontal.divider {
      margin: 3em 0em;
    }

    .quote.stripe.segment {
      padding: 0em;
    }
    .quote.stripe.segment .grid .column {
      padding-top: 5em;
      padding-bottom: 5em;
    }

    .footer.segment {
      padding: 5em 0em;
    }

    .secondary.pointing.menu .toc.item {
      display: none;
    }

    @media only screen and (max-width: 700px) {
      .ui.fixed.menu {
        display: none !important;
      }
      .secondary.pointing.menu .item,
      .secondary.pointing.menu .menu {
        display: none;
      }
      .secondary.pointing.menu .toc.item {
        display: block;
      }
      .masthead.segment {
        min-height: 350px;
      }
      .masthead h1.ui.header {
        font-size: 2em;
        margin-top: 1.5em;
      }
      .masthead h2 {
        margin-top: 0.5em;
        font-size: 1.5em;
      }
    }
</style>

<script>
  $(document)
    .ready(function() {

      // fix menu when passed
      $('.masthead')
        .visibility({
          once: false,
          onBottomPassed: function() {
            $('.fixed.menu').transition('fade in');
          },
          onBottomPassedReverse: function() {
            $('.fixed.menu').transition('fade out');
          }
        })
      ;

      // create sidebar and attach to menu open
      $('.ui.sidebar')
        .sidebar('attach events', '.toc.item')
      ;

    })
;
</script>


text:
<?php
namespace Light\ObjectService\Resource\Selection;

use Light\ObjectAccess\Type\ComplexTypeHelper;

final class NestedComplexSelection extends RootSelection
{
	/** @var Selection */
	private $parent;

	public function __construct(Selection $parent, ComplexTypeHelper $typeHelper)
	{
		parent::__construct($typeHelper);
		$this->parent = $parent;
	}
}


text:
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

            <form class="form-signin" id="form1" action="<?php echo base_url();?>index.php/Welcome/reg_user" method="post">

                <input type="text" id="name" name="display_name" class="form-control" placeholder="First name" required>
                <input type="text" id="name_last" name="display_name1" class="form-control" placeholder="Last name (Optional)" >

                <input type="email" id="user_name" name="user" class="form-control" placeholder="Email address" required>

                <input type="password" name="pass" id="inputPassword" class="form-control" placeholder="Password (Max 15 characters)" maxlength="15" required>

                <input type="password" name="pass2" id="inputPassword2" class="form-control" placeholder="Retype password" maxlength="15" required>

                <input type="text" id="phone" name="mobile" class="form-control" placeholder="Phone" maxlength="10">

                <button class="btn btn-lg btn-primary btn-block btn-signin" id="click" type="submit">Sign up</button>
            </form>
             <a title="Login" href="<?php echo base_url();?>index.php/Home/index">Login


text:
package com.mxgraph.canvas;

import com.mxgraph.util.mxConstants;

/**
 * Requirements for implementing technologies:
 *
 * - Path rendering (move, line, quad, curve, arc)
 * - Images, flip v/h, aspect, alpha (PNG, JPG, GIF)
 * - Linear gradients (in all four directions)
 * - Transparency, fill and stroke
 * - Rotation, flip v/h
 * - Font rendering
 * - Dash patterns
 * - Clipping by path (not just rectangle)
 * - Alpha gradients (for glass effect)
 * - Encode result as image (PNG, JPG)
 */
public interface mxICanvas2D
{
	/**
	 * Saves the current state of the canvas.
	 */
	void save();

	/**
	 * Restores the previous state of the canvas.
	 */
	void restore();

	/**
	 * Uniformaly scales the canvas by the given amount.
	 *
	 * @param value The new scale value.
	 */
	void scale(double value);

	/**
	 * Translates the canvas by the given amount.
	 *
	 * @param dx X-coordinate of the translation.
	 * @param dy Y-coordinate of the translation.
	 */
	void translate(double dx, double dy);

	/**
	 * Rotates the canvas by the given angle around the given center. This
	 * method may add rendering overhead and should be used with care.
	 *
	 * @param theta Rotation angle in degrees (0 - 360).
	 * @param flipH Specifies if drawing should be flipped horizontally.
	 * @param flipV Specifies if drawing should be flipped vertically.
	 * @param cx X-coordinate of the center point.
	 * @param cy Y-coordinate of the center point.
	 */
	void rotate(double theta, boolean flipH, boolean flipV, double cx, double cy);

	/**
	 * Sets the stroke width. This should default to 1 if unset.
	 *
	 * @param value Width of the stroke. The value should be multiplied by the
	 * current scale.
	 */
	void setStrokeWidth(double value);

	/**
	 * Sets the stroke color. This should default to {@link mxConstants#NONE}
	 * if unset.
	 *
	 * @param value Hex representation of the color or {@link mxConstants#NONE}.
	 */
	void setStrokeColor(String value);

	/**
	 * Sets the dashed state. This should default to false if unset.
	 *
	 * @param value Boolean representing the dashed state.
	 */
	void setDashed(boolean value);

	/**
	 * Sets the dash pattern. This should default to "3 3" if unset.
	 *
	 * @param value Space separated list of floats representing the dash
	 * pattern. The value should be multiplied by the current scale.
	 */
	void setDashPattern(String value);

	/**
	 * Sets the linecap. This should default to "flat" if unset.
	 *
	 * @param value "flat", "square" or "round".
	 */
	void setLineCap(String value);

	/**
	 * Sets the linejoin. This should default to "miter" if unset.
	 *
	 * @param value "miter", "round" or "bevel".
	 */
	void setLineJoin(String value);

	/**
	 * Sets the miterlimit. This should default to 10 if unset.
	 *
	 * @param value
	 */
	void setMiterLimit(double value);

	/**
	 * Default value {@link mxConstants#DEFAULT_FONTSIZE}.
	 *
	 * @param value
	 */
	void setFontSize(double value);

	/**
	 * Default value "#000000".
	 *
	 * @param value Hex representation of the color or {@link mxConstants#NONE}.
	 */
	void setFontColor(String value);

	/**
	 * Default value {@link mxConstants#DEFAULT_FONTFAMILY}.
	 *
	 * @param value
	 */
	void setFontFamily(String value);

	/**
	 * Default value 0. See {@link mxConstants#STYLE_FONTSTYLE}.
	 *
	 * @param value
	 */
	void setFontStyle(int value);

	/**
	 * Default value 1. This method may add rendering overhead and should be
	 * used with care.
	 *
	 * @param value
	 */
	void setAlpha(double value);

	/**
	 * Default value {@link mxConstants#NONE}.
	 *
	 * @param value Hex representation of the color or {@link mxConstants#NONE}.
	 */
	void setFillColor(String value);

	/**
	 * Prepares the canvas to draw a gradient.
	 *
	 * @param color1
	 * @param color2
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 * @param direction Direction may be null. Use default value
	 * 		{@link mxConstants#DIRECTION_SOUTH}.
	 */
	void setGradient(String color1, String color2, double x, double y,
			double w, double h, String direction);

	/**
	 * Prepares the canvas to draw a glass gradient.
	 *
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 */
	void setGlassGradient(double x, double y, double w, double h);

	/**
	 * Next fill or stroke should draw a rectangle.
	 *
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 */
	void rect(double x, double y, double w, double h);

	/**
	 *
	 * Next fill or stroke should draw a round rectangle.
	 *
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 * @param dx
	 * @param dy
	 */
	void roundrect(double x, double y, double w, double h, double dx, double dy);

	/**
	 *
	 * Next fill or stroke should draw an ellipse.
	 *
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 */
	void ellipse(double x, double y, double w, double h);

	/**
	 * Draws the given image.
	 *
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 * @param src
	 * @param aspect
	 * @param flipH
	 * @param flipV
	 */
	void image(double x, double y, double w, double h, String src,
			boolean aspect, boolean flipH, boolean flipV);

	/**
	 * Draws the given string.
	 *
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 * @param str
	 * @param align
	 * @param valign
	 * @param vertical
	 */
	void text(double x, double y, double w, double h, String str, String align,
			String valign, boolean vertical);

	/**
	 * Begins a new path.
	 */
	void begin();

	/**
	 * Moves to the given path.
	 *
	 * @param x
	 * @param y
	 */
	void moveTo(double x, double y);

	/**
	 * Draws a line to the given path.
	 *
	 * @param x
	 * @param y
	 */
	void lineTo(double x, double y);

	/**
	 * Draws a quadratic curve to the given point.
	 *
	 * @param x1
	 * @param y1
	 * @param x2
	 * @param y2
	 */
	void quadTo(double x1, double y1, double x2, double y2);

	/**
	 * Draws a bezier curve to the given point.
	 *
	 * @param x1
	 * @param y1
	 * @param x2
	 * @param y2
	 * @param x3
	 * @param y3
	 */
	void curveTo(double x1, double y1, double x2, double y2, double x3,
			double y3);

	/**
	 * Closes the current path.
	 */
	void close();

	/**
	 * Paints the outline of the current path.
	 */
	void stroke();

	/**
	 * Fills the current path.
	 */
	void fill();

	/**
	 * Fills and paints the outline of the current path.
	 */
	void fillAndStroke();

	/**
	 * Paints the current path as a shadow.
	 *
	 * @param value
	 */
	void shadow(String value);

	/**
	 * Uses the current path for clipping.
	 */
	void clip();

}


text:
#ifndef __INCLUDE_ARPA_INET_H
#define __INCLUDE_ARPA_INET_H

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

#include <sys/types.h>
#include <stdint.h>
#include <netinet/in.h>

/****************************************************************************
 * Public Type Definitions
 ****************************************************************************/
/*  Length of the string form for IP address (excludes NULL termination) */

#define INET_ADDRSTRLEN 16

/*  Length of the string form for IPv6 address (excludes NULL termination) */

#define INET6_ADDRSTRLEN 46

/* This macro to convert a 16/32-bit constant values quantity from host byte
 * order to network byte order.  The 16-bit version of this macro is required
 * for uIP:
 *
 *   Author Adam Dunkels <adam@dunkels.com>
 *   Copyright (c) 2001-2003, Adam Dunkels.
 *   All rights reserved.
 */

#ifdef CONFIG_ENDIAN_BIG
# define HTONS(ns) (ns)
# define HTONL(nl) (nl)
#else
# define HTONS(ns) \
  (unsigned short) \
    (((((unsigned short)(ns)) & 0x00ff) << 8) | \
     ((((unsigned short)(ns)) >> 8) & 0x00ff))
# define HTONL(nl) \
  (unsigned long) \
    (((((unsigned long)(nl)) & 0x000000ffUL) << 24) | \
     ((((unsigned long)(nl)) & 0x0000ff00UL) <<  8) | \
     ((((unsigned long)(nl)) & 0x00ff0000UL) >>  8) | \
     ((((unsigned long)(nl)) & 0xff000000UL) >> 24))
#endif

#define NTOHS(hs) HTONS(hs)
#define NTOHL(hl) HTONL(hl)

/****************************************************************************
 * Public Function Prototypes
 ****************************************************************************/

#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif

/* Functions to convert between nost and network byte ordering */

EXTERN uint32_t    ntohl(uint32_t nl);
EXTERN uint16_t    ntohs(uint16_t ns);
EXTERN uint32_t    htonl(uint32_t hl);
EXTERN uint16_t    htons(uint16_t hs);

/* Functions to manipulate address representations */

EXTERN int         inet_aton(FAR const char *cp, FAR struct in_addr *inp);
EXTERN in_addr_t   inet_addr(FAR const char *cp);
EXTERN in_addr_t   inet_network(FAR const char *cp);

#ifdef CONFIG_CAN_PASS_STRUCTS
EXTERN FAR char   *inet_ntoa(struct in_addr in);
EXTERN in_addr_t   inet_lnaof(struct in_addr in);
EXTERN in_addr_t   inet_netof(struct in_addr in);
#else
EXTERN FAR char   *_inet_ntoa(in_addr_t in);
# define inet_ntoa(in) _inet_ntoa(in.s_addr);

EXTERN in_addr_t   _inet_lnaof(in_addr_t in);
# define inet_lnaof(in) _inet_lnaof(in.s_addr);

EXTERN in_addr_t   _inet_netof(in_addr_t in);
# define inet_netof(in) _inet_netof(in.s_addr);
#endif
EXTERN struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host);

EXTERN int         inet_pton(int af, FAR const char *src, FAR void *dst);
EXTERN const char *inet_ntop(int af, FAR const void *src, FAR char *dst, socklen_t size);

#undef EXTERN
#ifdef __cplusplus
}
#endif

#endif /* __INCLUDE_ARPA_INET_H */


text:
from __future__ import annotations

# Bokeh imports
from .action import FAILED, PASSED, ActionReturn
from .config import Config
from .system import System

__all__ = (
    "publish_conda_package",
    "publish_documentation",
    "publish_npm_package",
    "publish_pip_packages",
    "unpack_deployment_tarball",
)

CLOUDFRONT_ID = "E2OC6Q27H5UQ63"
REGION = "--region us-east-1"

def publish_npm_package(config: Config, system: System) -> ActionReturn:
    tarball = f"bokeh-bokehjs-{config.js_version}.tgz"
    tags = "--tag=dev" if config.prerelease else ""
    try:
        system.cd(f"deployment-{config.version}")
        system.run(f"npm publish --access=public {tags} {tarball}")
        system.cd("..")
        return PASSED("Publish to npmjs.com succeeded")
    except RuntimeError as e:
        return FAILED("Could NOT publish to npmjs.com", details=e.args)

def publish_conda_package(config: Config, system: System) -> ActionReturn:
    version = config.version
    path = f"deployment-{version}/bokeh-{version}-py_0.tar.bz2"
    token = config.secrets["ANACONDA_TOKEN"]
    main_channel = "" if config.prerelease else "-l main"
    try:
        system.run(f"anaconda -t {token} upload -u bokeh {path} {main_channel} -l dev --force --no-progress")
        return PASSED("Publish to anaconda.org succeeded")
    except RuntimeError as e:
        return FAILED("Could NOT publish to anaconda.org", details=e.args)

def publish_documentation(config: Config, system: System) -> ActionReturn:
    version, release_level = config.version, config.release_level
    path = f"deployment-{version}/docs/bokeh/build/html"
    flags = "--acl bucket-owner-full-control --cache-control max-age=31536000,public"
    try:
        if config.prerelease:
            system.run(f"aws s3 sync {path} s3://docs.bokeh.org/en/dev-{release_level}/ {flags} {REGION}")
            system.run(f'aws cloudfront create-invalidation --distribution-id {CLOUDFRONT_ID} --paths "/en/dev-{release_level}*" {REGION}')
        else:
            system.run(f"aws s3 sync {path} s3://docs.bokeh.org/en/latest/ {flags} {REGION}")
            system.run(f"aws s3 sync {path} s3://docs.bokeh.org/en/{version}/ {flags} {REGION}")
            switcher = f"deployment-{version}/docs/bokeh/switcher.json"
            system.run(f"aws s3 cp {switcher} s3://docs.bokeh.org/ {flags} {REGION}")
            system.run(f'aws cloudfront create-invalidation --distribution-id {CLOUDFRONT_ID} --paths "/en/latest*" "/en/{version}*" "/switcher.json" {REGION}')
        return PASSED("Publish to documentation site succeeded")
    except RuntimeError as e:
        return FAILED("Could NOT publish to documentation site", details=e.args)

def publish_pip_packages(config: Config, system: System) -> ActionReturn:
    sdist_path = f"deployment-{config.version}/bokeh-{config.version}.tar.gz"
    wheel_path = f"deployment-{config.version}/bokeh-{config.version}-py3-none-any.whl"
    try:
        system.run(f"twine upload -u __token__ -p $PYPI_TOKEN {sdist_path} {wheel_path}")
        return PASSED("Publish to pypi.org succeeded")
    except RuntimeError as e:
        return FAILED("Could NOT publish to pypi.org", details=e.args)

def unpack_deployment_tarball(config: Config, system: System) -> ActionReturn:
    try:
        filename = f"deployment-{config.version}.tgz"
        system.run(f"tar xvf {filename}")
        return PASSED(f"Unpacked deployment tarball {filename!r}")
    except RuntimeError as e:
        return FAILED("Could NOT unpack deployment tarball", details=e.args)


text:
/*
 * MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
 *
 * 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.
 */

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Minio.DataModel.Tags;

namespace Minio.Examples.Cases;

internal class PutObjectWithTags
{
    private const int MB = 1024 * 1024;

    // Put an object from a local stream into bucket
    public static async Task Run(MinioClient minio,
        string bucketName = "my-bucket-name",
        string objectName = "my-object-name",
        string fileName = "location-of-file")
    {
        try
        {
            Console.WriteLine("Running example for API: PutObjectAsync with Tags");
            var tags = new Dictionary<string, string>
            {
                { "Test-TagKey", "Test-TagValue" }
            };
            var args = new PutObjectArgs()
                .WithBucket(bucketName)
                .WithObject(objectName)
                .WithContentType("application/octet-stream")
                .WithFileName(fileName)
                .WithTagging(Tagging.GetObjectTags(tags));
            await minio.PutObjectAsync(args);

            Console.WriteLine($"Uploaded object {objectName} to bucket {bucketName}");
            Console.WriteLine();
        }
        catch (Exception e)
        {
            Console.WriteLine($"[Bucket]  Exception: {e}");
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
NeighborIndex (JGraphT : a free Java graph library)
</TITLE>

<META NAME="date" CONTENT="2010-11-27">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.jgrapht.alg

Class NeighborIndex<V,E>

java.lang.Object
  org.jgrapht.alg.NeighborIndex<V,E>

All Implemented Interfaces:
java.util.EventListener, GraphListener<V,E>, VertexSetListener<V>

public class NeighborIndex<V,E>
extends java.lang.Object
implements GraphListener<V,E>

Maintains a cache of each vertex's neighbors. While lists of neighbors can be
 obtained from Graphs, they are re-calculated at each invocation by
 walking a vertex's incident edges, which becomes inordinately expensive when
 performed often.

Edge direction is ignored when evaluating neighbors; to take edge
 direction into account when indexing neighbors, use DirectedNeighborIndex.

A vertex's neighbors are cached the first time they are asked for (i.e.
 the index is built on demand). The index will only be updated automatically
 if it is added to the associated graph as a listener. If it is added as a
 listener to a graph other than the one it indexes, results are undefined.

Since:

Dec 13, 2005

Author:

Charles Fry

Constructor Summary

NeighborIndex(Graph<V,E> g)

          Creates a neighbor index for the specified undirected graph.

Method Summary

 void
edgeAdded(GraphEdgeChangeEvent<V,E> e)

          Notifies that an edge has been added to the graph.

 void
edgeRemoved(GraphEdgeChangeEvent<V,E> e)

          Notifies that an edge has been removed from the graph.

 java.util.List<V>
neighborListOf(V v)

          Returns a list of vertices which are adjacent to a specified vertex.

 java.util.Set<V>
neighborsOf(V v)

          Returns the set of vertices which are adjacent to a specified vertex.

 void
vertexAdded(GraphVertexChangeEvent<V> e)

          Notifies that a vertex has been added to the graph.

 void
vertexRemoved(GraphVertexChangeEvent<V> e)

          Notifies that a vertex has been removed from the graph.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NeighborIndex

public NeighborIndex(Graph<V,E> g)

Creates a neighbor index for the specified undirected graph.

Parameters:
g - the graph for which a neighbor index is to be created.

Method Detail

neighborsOf

public java.util.Set<V> neighborsOf(V v)

Returns the set of vertices which are adjacent to a specified vertex. The
 returned set is backed by the index, and will be updated when the graph
 changes as long as the index has been added as a listener to the graph.

Parameters:
v - the vertex whose neighbors are desired

Returns:
all unique neighbors of the specified vertex

neighborListOf

public java.util.List<V> neighborListOf(V v)

Returns a list of vertices which are adjacent to a specified vertex. If
 the graph is a multigraph, vertices may appear more than once in the
 returned list. Because a list of neighbors can not be efficiently
 maintained, it is reconstructed on every invocation, by duplicating
 entries in the neighbor set. It is thus more efficient to use neighborsOf(Object) unless duplicate neighbors are important.

Parameters:
v - the vertex whose neighbors are desired

Returns:
all neighbors of the specified vertex

edgeAdded

public void edgeAdded(GraphEdgeChangeEvent<V,E> e)

Description copied from interface: GraphListener

Notifies that an edge has been added to the graph.

Specified by:
edgeAdded in interface GraphListener<V,E>

Parameters:
e - the edge event.
See Also:
GraphListener.edgeAdded(GraphEdgeChangeEvent)

edgeRemoved

public void edgeRemoved(GraphEdgeChangeEvent<V,E> e)

Description copied from interface: GraphListener

Notifies that an edge has been removed from the graph.

Specified by:
edgeRemoved in interface GraphListener<V,E>

Parameters:
e - the edge event.
See Also:
GraphListener.edgeRemoved(GraphEdgeChangeEvent)

vertexAdded

public void vertexAdded(GraphVertexChangeEvent<V> e)

Description copied from interface: VertexSetListener

Notifies that a vertex has been added to the graph.

Specified by:
vertexAdded in interface VertexSetListener<V>

Parameters:
e - the vertex event.
See Also:
VertexSetListener.vertexAdded(GraphVertexChangeEvent)

vertexRemoved

public void vertexRemoved(GraphVertexChangeEvent<V> e)

Description copied from interface: VertexSetListener

Notifies that a vertex has been removed from the graph.

Specified by:
vertexRemoved in interface VertexSetListener<V>

Parameters:
e - the vertex event.
See Also:
VertexSetListener.vertexRemoved(GraphVertexChangeEvent)

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
<?php

declare(strict_types=1);

namespace Swarming\SubscribePro\Model\Config;

use Magento\Store\Model\ScopeInterface;

class ThirdPartyPayment
{
    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $scopeConfig;

    /**
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
     */
    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
    ) {
        $this->scopeConfig = $scopeConfig;
    }

    /**
     * @param int|null $storeId
     * @return bool
     */
    public function isAllowed(int $storeId = null): bool
    {
        return $this->scopeConfig->isSetFlag(
            'swarming_subscribepro/third_party_payment/is_allowed',
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }

    /**
     * @param int|null $storeId
     * @return array
     */
    public function getAllowedMethods(int $storeId = null): array
    {
        $allowedThirdPartyValue = $this->scopeConfig->getValue(
            'swarming_subscribepro/third_party_payment/allowed_method',
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
        $allowedThirdPartyArray = (!empty($allowedThirdPartyValue) && is_string($allowedThirdPartyValue))
            ? explode(',', $allowedThirdPartyValue)
            : [];
        return $this->isAllowed($storeId) ? $allowedThirdPartyArray : [];
    }

    /**
     * @param string $paymentCode
     * @return string|null
     */
    public function getVaultCodeByPaymentCode(string $paymentCode): ?string
    {
        return $this->scopeConfig->getValue('swarming_subscribepro/third_party_payment/' . $paymentCode);
    }
}


text:
layout: post
title: Clair Brooks wanks chair-tied and tape-gagged guy
titleinfo: pornvd
desc: Watch Clair Brooks wanks chair-tied and tape-gagged guy. Pornhub is the ultimate xxx porn and sex site.
---

Clair Brooks wanks chair-tied and tape-gagged guy

Watch Clair Brooks wanks chair-tied and tape-gagged guy. Pornhub is the ultimate xxx porn and sex site.


text:
"use strict";

/**
 * Copyright (c) 2017, Oracle and/or its affiliates.
 * All rights reserved.
 */
define(['ojs/ojcore', 'jquery', 'ojs/ojarraytabledatasource'], function(oj, $)
{
/**
 * Copyright (c) 2017, Oracle and/or its affiliates.
 * All rights reserved.
 */

/*jslint browser: true,devel:true*/
/**
 * @ignore
 * @export
 * @interface
 * @memberof oj
 */
oj.ProgressItem = function() {
};

/**
 * Attach an event handler
 *
 * @method
 * @name addEventListener
 * @memberof! oj.ProgressItem
 * @instance
 * @param {string} eventType eventType
 * @param {function(Object)} eventHandler event handler function
 *
 * @export
 */

/**
 * Detach an event handler
 *
 * @method
 * @name removeEventListener
 * @memberof! oj.ProgressItem
 * @instance
 * @param {string} eventType eventType
 * @param {function(Object)} eventHandler event handler function
 *
 * @export
 */

/**
 * @export
 * Status
 * @enum {string}
 */
oj.ProgressItem.Status = {
  /**
   * initial state before any progress events
   */
  'QUEUED': 'queued',
  /**
   * upload is in progress
   */
  'LOADSTARTED': 'loadstarted',
  /**
   * upload aborted
   */
  'ABORTED': 'aborted',
  /**
   * upload failed
   */
  'ERRORED': 'errored',
  /**
   * upload timeout
   */
  'TIMEDOUT': 'timedout',
  /**
   * upload is completed
   */
  'LOADED': 'loaded'
};

/**
 * @export
 * Event types
 * @enum {string}
 */
oj.ProgressItem.EventType = {
  /**
   * Triggered when the progress start
   */
  'LOADSTART': 'loadstart',
  /**
   * Triggered for upload progress events.
   */
  'PROGRESS': 'progress',
  /**
   * Triggered when an upload has been aborted.
   */
  'ABORT': 'abort',
  /**
   * Triggered when an upload failed.
   */
  'ERROR': 'error',
  /**
   * Triggered when an upload succeeded.
   */
  'LOAD': 'load',
  /**
   * Triggered when timeout has passed before upload completed
   */
  'TIMEOUT': 'timeout',
  /**
   * Triggered when an upload completed (success or failure).
   */
  'LOADEND': 'loadend'
};

/**
 * Copyright (c) 2017, Oracle and/or its affiliates.
 * All rights reserved.
 */

/*jslint browser: true,devel:true*/
/**
 * @ignore
 * @export
 * @class
 * @extends oj.TableDataSource
 * @classdesc Object representing data used by upload progress and progress list.
 * @param {Array|Object|function():Array} data data rows must be ProgressItem
 * @param {Object|null} options Array of options for the TableDataSource
 * @constructor
 * @since 4.0.0
 */
oj.ProgressListDataSource = function(data, options)
{
  // Initialize
  this._dataSource = new oj.ArrayTableDataSource(data, options);
  oj.ProgressListDataSource.superclass.constructor.call(this, data, options);
};

// Subclass from oj.DataSource
oj.Object.createSubclass(oj.ProgressListDataSource, oj.TableDataSource, "oj.ProgressListDataSource");

/**
 * @export
 * @desc The sort criteria. Whenever sort() is called with the criteria parameter, that value is copied to this
 * property. If sort() is called with empty sort criteria then the criteria set in this property is used.
 *
 * @type {Object} criteria the sort criteria.
 * @property {Object} criteria.key The key that identifies which field to sort
 * @property {string} criteria.direction the sort direction, valid values are "ascending", "descending", "none" (default)
 */
oj.ProgressListDataSource.prototype.sortCriteria = null;

/**
 * Initializes the instance.
 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.Init = function()
{
  this._dataSource.Init();
  oj.ProgressListDataSource.superclass.Init.call(this);

  this._resetProgress();
  this._progressHandler = this._handleUploadProgress.bind(this);
  this._errorHandler = this._handleUploadFail.bind(this);
  this._doneHandler = this._handleUploadDone.bind(this);

};

/**
 * Add a row (or array of rows) to the end
 *
 * @param {Object} m Row object data (or array of rows) to add. These should be sets of attribute/values.
 * @param {Object=} options silent: if set, do not fire an add event

 *                          at: splice the new row at the value given (at:index). If an array of rows then this should be an array of indexes

 * @return {Promise} Promise object resolves to a compound object which contains an array of row data objects, an array of keys, and an array of indexes which were added triggering done when complete.

 *         The structure of the resolved compound object is:

 *

 *

 *
data	An array of raw row data

 *
keys	An array of key values for the rows

 *
indexes	An array of index values for the rows

 *

 *

 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.add = function(m, options)
{
  var self = this;
  var promise = this._dataSource.add(m, options);
  promise.then(function (result) {
    self._addItems(m, options);
  });
  return promise;
};

/**
 * Return the row data found at the given index.
 *
 * @param {number} index Index for which to return the row data.
 * @param {Object=} options Options to control the at.
 * @param {number} options.fetchSize fetch size to use if the call needs to fetch more records from the server, if virtualized.  Overrides the overall fetchSize setting

 * @return {Promise} Promise resolves to a compound object which has the structure below. If the index is out of range, Promise resolves to null.

 *

 *

 *
data	The raw row data

 *
index	The index for the row

 *
key	The key value for the row

 *

 *

 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.at = function(index, options)
{
  return this._dataSource.at(index, options);
};

/**
 * Fetch the row data.
 * @param {Object=} options Options to control fetch
 * @param {number} options.startIndex The index at which to start fetching records.
 * @param {boolean} options.silent If set, do not fire a sync event.
 * @return {Promise} Promise object resolves to a compound object which contains an array of row data objects, an array of ids, and the startIndex triggering done when complete.

 *         The structure of the resolved compound object is:

 *

 *

 *
data	An array of raw row data

 *
keys	An array of key values for the rows

 *
startIndex	The startIndex for the returned set of rows

 *

 *

 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.fetch = function(options)
{
  return this._dataSource.fetch(options);
};

/**
 * Return the first row data whose id value is the given id
 * @param {string} id ID for which to return the row data, if found.
 * @param {Object=} options Options to control the get.
 * @return {Promise} Promise which resolves to a compound object which has the structure below where the id matches the given id. If none are found, resolves to null.

 *

 *

 *
data	The raw row data

 *
index	The index for the row

 *
key	The key value for the row

 *

 *

 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.get = function(id, options)
{
  return this._dataSource.get(id, options);
};

/**
 * Determines whether this TableDataSource supports certain feature.
 * @param {string} feature the feature in which its capabilities is inquired.  Currently the only valid feature is "sort".
 * @return {string|null} the name of the feature.  For "sort", the valid return values are: "full", "none".
 *         Returns null if the feature is not recognized.
 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.getCapability = function(feature)
{
  return this._dataSource.getCapability(feature);
};

/**
 * Remove a row (or array of rows), if found.
 * @param {Object}  m Row object data (or array of rows) to remove. These should be sets of attribute/values.
 * @param {Object=} options silent: if set, do not fire a remove event
 * @return {Promise} Promise object resolves to a compound object which contains an array of row data objects, an array of keys, and an array of indexes which were removed triggering done when complete.

 *         The structure of the resolved compound object is:

 *

 *

 *
data	An array of raw row data

 *
keys	An array of key values for the rows

 *
indexes	An array of index values for the rows

 *

 *

 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.remove = function(m, options)
{
  var self = this;
  var promise = this._dataSource.remove(m, options);
  promise.then(function (result) {
    self._removeItems(m, options);
  });
  return promise;
};

/**
 * Performs a sort on the data source.
 * @param {Object|null} criteria the sort criteria.
 * @param {Object} criteria.key The key that identifies which field to sort
 * @param {string} criteria.direction the sort direction, valid values are "ascending", "descending", "none" (default)
 * @return {Promise} promise object triggering done when complete.
 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.sort = function(criteria)
{
  this._dataSource['sortCriteria'] = this['sortCriteria'];
  var ret = this._dataSource.sort(criteria);
  this['sortCriteria'] = this._dataSource['sortCriteria'];
  return ret;
};

/**
 * Return the total size of data available, including server side if not local.
 * @returns {number} total size of data
 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.totalSize = function()
{
  return this._dataSource.totalSize();
};

/**
 * Attach an event handler
 * @param {string} eventType eventType
 * @param {function(Object)} eventHandler event handler function
 * @export
 */
oj.ProgressListDataSource.prototype.on = function(eventType, eventHandler)
{
  this._dataSource.on(eventType, eventHandler);
};

/**
 * Detach an event handler
 * @param {string} eventType eventType
 * @param {function(Object)} eventHandler event handler function
 * @export
 */
oj.ProgressListDataSource.prototype.off = function(eventType, eventHandler)
{
  this._dataSource.off(eventType, eventHandler);
};

/**
 * Handle the event
 * @param {string} eventType  event type
 * @param {Object} event  event
 * @return {boolean} Returns false if event is cancelled
 * @export
 */
oj.ProgressListDataSource.prototype.handleEvent = function(eventType, event)
{
  return this._dataSource.handleEvent(eventType, event);
};

/**
 * Remove the data rows having the ProgressItem status specified, If not specified remove all data rows.
 * @param {Array} statusList array of oj.ProgressItem.Status.
 * @return {Promise|IThenable} Promise object resolves to a compound object which contains an array of row data objects, an array of keys, and an array of indexes which were removed triggering done when complete.

 *         The structure of the resolved compound object is:

 *

 *

 *
data	An array of raw row data

 *
keys	An array of key values for the rows

 *
indexes	An array of index values for the rows

 *

 *

 * @export
 * @expose
 * @memberof! oj.ProgressListDataSource
 * @instance
 */
oj.ProgressListDataSource.prototype.clear = function(statusList)
{
  //remove all data rows
  if (! statusList || statusList.length == 0) {
    return this._dataSource.reset(null, {silent: true});
  }

  var self = this;
  var statuses = {};

  for (var i = 0; i < statusList.length; i++) {
    statuses[statusList[i]] = true;
  }

  return this._dataSource.fetch({silent: true}).then(function (model) {
    var data = model.data;
    var progressItem;
    var m = [];

    for (var i = 0; i < data.length; i++)
    {
      progressItem = data[i];
      if (statuses[progressItem.status])
        m.push(progressItem);
    }

    return self.remove(m);
  });
};

oj.ProgressListDataSource.prototype._addItems = function(m, options)
{
  var i, progressItem;
  if (!(m instanceof Array))
    m = [m];

  for (i = 0; i < m.length; i++)
  {
    progressItem = m[i];
    if (progressItem)
    {
      //add loadstart, progress, load and error listeners
      this._addListeners(progressItem);
    }
  }
  this._updateOverallLoaded(null);
};

oj.ProgressListDataSource.prototype._removeItems = function(m, options)
{
  var i, progressItem;
  if (!(m instanceof Array))
    m = [m];

  for (i = 0; i < m.length; i++)
  {
    progressItem = m[i];
    if (progressItem)
    {
      this._removeListeners(progressItem);
    }
  }
  this._updateOverallLoaded(null);
};

// Triggered for upload progress events
oj.ProgressListDataSource.prototype._handleUploadProgress = function(event)
{
  var progressItem = event.target;

  if (progressItem && event.lengthComputable) {
    this._updateOverallLoaded(progressItem);
  }
};

// Triggered when the upload is successfully completed.
oj.ProgressListDataSource.prototype._handleUploadDone = function(event)
{
  var progressItem = event.target;
/*
  if (progressItem && event.lengthComputable) {
    this._updateOverallLoaded(progressItem);
  }
*/
  if (this._totalUploaded >= this._totalFileLength)
    this._resetProgress();
};

// Triggered when the upload fails (error, timeout or aborted). The event payload contains:
// error: {object} {statusCode, statusText}
oj.ProgressListDataSource.prototype._handleUploadFail = function(event)
{
  var progressItem = event.target;
  if (progressItem) {
    //update progress all
    this._updateOverallLoaded(progressItem);
    this._errors++;
  }
};

oj.ProgressListDataSource.prototype._addListeners = function(progressItem)
{
  progressItem.addEventListener(oj.ProgressItem.EventType['PROGRESS'], this._progressHandler, false);
  progressItem.addEventListener(oj.ProgressItem.EventType['ERROR'], this._errorHandler, false);
  progressItem.addEventListener(oj.ProgressItem.EventType['LOAD'], this._doneHandler, false);
};

oj.ProgressListDataSource.prototype._removeListeners = function(progressItem)
{
  progressItem.removeEventListener(oj.ProgressItem.EventType['PROGRESS'], this._progressHandler, false);
  progressItem.removeEventListener(oj.ProgressItem.EventType['ERROR'], this._errorHandler, false);
  progressItem.removeEventListener(oj.ProgressItem.EventType['LOAD'], this._doneHandler, false);
};

oj.ProgressListDataSource.prototype._resetProgress = function()
{
  this._errors = 0;
  //total size in bytes of files in this collection
  this._totalFileLength = 0;
  //total bytes uploaded so far.
  this._totalUploaded = 0;
};

oj.ProgressListDataSource.prototype._updateOverallLoaded = function(progressItem)
{
  var data;
  var total = 0;
  var loaded = 0;
  var fireEvent = ! progressItem;
  var self = this;

  this._dataSource.fetch({silent: true}).then(function (model) {
    data = model.data;

    for (var item, i = 0; i < data.length; i++)
    {
      item = data[i];
      //Note item is a copy of progressItem
      if (! fireEvent && item.item === progressItem.item)
        fireEvent = true;

      if (item.loaded)
        loaded += item.loaded;

      //TODO: should we check if file is not queued for upload???
//      if (item.status !== oj.ProgressItem.Status['QUEUED'])
        total += item.total;
    }

    if (fireEvent) {
      self._totalUploaded = loaded;
      self._totalFileLength = total;
      self._fireOverallProgressEvent(loaded, total);
    }
  });

};

oj.ProgressListDataSource.prototype._fireOverallProgressEvent = function(loaded, total)
{
  var event = $.Event("overallProgress",
                      {'lengthComputable': true,
                       'total': total,
                       'loaded': loaded,
                       'error': this._errors,
                       'target': this});

  this._dataSource.handleEvent('overallProgress', event);
};

});


text:
package com.dreampany.framework.misc;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.TimeUnit;

/**
 * Created by Hawladar Roman on 6/4/2018.
 * BJIT Group
 * hawladar.roman@bjitgroup.com
 */
public class SmartQueue<T> extends LinkedBlockingDeque<T> {

    public boolean insertFirst(T t) {
        if (t == null) {
            return false;
        }
        while (true) {
            try {
                putFirst(t);
                return false;
            } catch (InterruptedException e) {
            }
        }
    }

    public boolean insertFirstUniquely(T t) {
        if (t == null) {
            return false;
        }
        if (!contains(t)) {
            remove(t);
        }
        while (true) {
            try {
                putFirst(t);
                return false;
            } catch (InterruptedException e) {
            }
        }
    }

    public boolean insertLast(T t) {
        if (t == null) {
            return false;
        }
        while (true) {
            try {
                super.putLast(t);
                return false;
            } catch (InterruptedException e) {
            }
        }
    }

    public boolean insertLastUniquely(T t) {
        if (t == null) {
            return false;
        }
        if (contains(t)) {
            remove(t);
        }
        while (true) {
            try {
                super.putLast(t);
                return false;
            } catch (InterruptedException e) {
            }
        }
    }

    public T pollFirst() {
        return super.pollFirst();
    }

    public T peekFirst() {
        return super.peekFirst();
    }

    public T pollFirst(long timeout) {
        try {
            return super.pollFirst(timeout, TimeUnit.MILLISECONDS);
        } catch (InterruptedException e) {
            return null;
        }
    }

    public T takeFirst() {
        try {
            return super.takeFirst();
        } catch (InterruptedException e) {
            return null;
        }
    }

    public void removeAll() {
        super.clear();
    }
}


text:
package main.java.com.iceteaviet.chess;

import main.java.com.iceteaviet.chess.gui.ChessGameWatcher;

public class JChess {

    public static void main(String[] args) {
        ChessGameWatcher.getInstance().show();
    }
}


text:
Given an integer, convert it to a roman numeral.

Input is guaranteed to be within the range from 1 to 3999.


text:
package com.peterpotts.gene

/**
  * Chromosome fragment.
  *
  * @param key   Description.
  * @param value Nucleotide sequence.
  */
case class Fragment(key: String, value: String)


text:
/**
 * @file device_discover.h
 *
 * Functions to discover supported devices attached to the
 * current host system, and then open them.
 */

#ifndef LIBCAER_DEVICES_DEVICE_DISCOVER_H_
#define LIBCAER_DEVICES_DEVICE_DISCOVER_H_

#include "davis.h"
#include "dvs128.h"
#include "dvs132s.h"
#include "dvxplorer.h"
#include "dynapse.h"
#include "edvs.h"
#include "samsung_evk.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Result of a device discovery operation.
 * Contains the type of the device and its informational structure; use the
 * device type to properly select the right info structure!
 * In the info structures, 'deviceID' will always be set to -1 and
 * 'deviceString' will always be NULL, as those are not present during
 * the generic discovery phase.
 */
struct caer_device_discovery_result {
	uint16_t deviceType;
	bool deviceErrorOpen;
	bool deviceErrorVersion;
	union {
		struct caer_dvs128_info dvs128Info;
		struct caer_edvs_info edvsInfo;
		struct caer_davis_info davisInfo;
		struct caer_dynapse_info dynapseInfo;
		struct caer_dvs132s_info dvs132sInfo;
		struct caer_dvx_info dvXplorerInfo;
		struct caer_samsung_evk_info samsungEVKInfo;
	} deviceInfo;
};

/**
 * Pointer to result of a device discovery operation.
 */
typedef struct caer_device_discovery_result *caerDeviceDiscoveryResult;

/**
 * Define for special value to discover all device types.
 */
#define CAER_DEVICE_DISCOVER_ALL -1

/**
 * Discover all supported devices that are accessible on this system.
 * Use -1 as 'deviceType' to search for any device, or an actual
 * device type ID to only search for matches of that specific type.
 *
 * @param deviceType type of device to search for, use -1 for any.
 * @param discoveredDevices pointer to array of results, memory will be
 *                          allocated for it automatically. On error,
 *                          the pointer is set to NULL. Remember to free()
 *                          the memory once done!
 *
 * @return number of discovered devices, 0 if no device could be found;
 *         or -1 if an error occurred.
 */
ssize_t caerDeviceDiscover(int16_t deviceType, caerDeviceDiscoveryResult *discoveredDevices);

/**
 * Open a specific device based on information returned by caerDeviceDiscover(),
 * then assign an ID to it and return a handle for further usage.
 *
 * @param deviceID a unique ID to identify the device from others. Will be used as the
 *                 source for EventPackets being generated from its data.
 * @param discoveredDevice pointer to the result of a device discovery operation.
 *                         Uniquely identifies a particular device.
 *
 * @return a valid device handle that can be used with the other libcaer functions,
 *         or NULL on error. Always check for this!
 */
caerDeviceHandle caerDeviceDiscoverOpen(uint16_t deviceID, caerDeviceDiscoveryResult discoveredDevice);

#ifdef __cplusplus
}
#endif

#endif /* LIBCAER_DEVICES_DEVICE_DISCOVER_H_ */


text:
class AddLongDescriptionToBadges < ActiveRecord::Migration
  def change
    add_column :badges, :long_description, :text
  end
end


text:
package org.apache.geode.internal.util;

import static org.apache.geode.distributed.ConfigurationProperties.CLUSTER_SSL_ENABLED;
import static org.apache.geode.distributed.ConfigurationProperties.CLUSTER_SSL_TRUSTSTORE_PASSWORD;
import static org.apache.geode.distributed.ConfigurationProperties.CONSERVE_SOCKETS;
import static org.apache.geode.distributed.ConfigurationProperties.GATEWAY_SSL_TRUSTSTORE_PASSWORD;
import static org.apache.geode.distributed.ConfigurationProperties.SERVER_SSL_KEYSTORE_PASSWORD;
import static org.apache.geode.internal.util.ArgumentRedactor.isTaboo;
import static org.apache.geode.internal.util.ArgumentRedactor.redact;
import static org.apache.geode.internal.util.ArgumentRedactor.redactEachInList;
import static org.assertj.core.api.Assertions.assertThat;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.junit.Test;

import org.apache.geode.internal.logging.Banner;

public class ArgumentRedactorJUnitTest {
  private static final String someProperty = "redactorTest.someProperty";
  private static final String somePasswordProperty = "redactorTest.aPassword";
  private static final String someOtherPasswordProperty =
      "redactorTest.aPassword-withCharactersAfterward";

  @Test
  public void theseLinesShouldRedact() {
    String argumentThatShouldBeRedacted = "__this_should_be_redacted__";
    List<String> someTabooOptions =
        Arrays.asList("-Dgemfire.password=" + argumentThatShouldBeRedacted,
            "--password=" + argumentThatShouldBeRedacted,
            "--J=-Dgemfire.some.very.qualified.item.password=" + argumentThatShouldBeRedacted,
            "--J=-Dsysprop-secret.information=" + argumentThatShouldBeRedacted);

    List<String> fullyRedacted = redactEachInList(someTabooOptions);
    assertThat(fullyRedacted).doesNotContainAnyElementsOf(someTabooOptions);
  }

  @Test
  public void redactorWillIdentifySampleTabooProperties() {
    List<String> shouldBeRedacted = Arrays.asList("gemfire.security-password", "password",
        "other-password-option", CLUSTER_SSL_TRUSTSTORE_PASSWORD, GATEWAY_SSL_TRUSTSTORE_PASSWORD,
        SERVER_SSL_KEYSTORE_PASSWORD, "security-username", "security-manager",
        "security-important-property", "javax.net.ssl.keyStorePassword",
        "javax.net.ssl.some.security.item", "javax.net.ssl.keyStoreType", "sysprop-secret-prop");
    for (String option : shouldBeRedacted) {
      assertThat(isTaboo(option))
          .describedAs("This option should be identified as taboo: " + option).isTrue();
    }
  }

  @Test
  public void redactorWillAllowSampleMiscProperties() {
    List<String> shouldNotBeRedacted = Arrays.asList("gemfire.security-manager",
        CLUSTER_SSL_ENABLED, CONSERVE_SOCKETS, "username", "just-an-option");
    for (String option : shouldNotBeRedacted) {
      assertThat(isTaboo(option))
          .describedAs("This option should not be identified as taboo: " + option).isFalse();
    }
  }

  @Test
  public void argListOfPasswordsAllRedact() {
    List<String> argList = new ArrayList<>();
    argList.add("--gemfire.security-password=secret");
    argList.add("--login-password=secret");
    argList.add("--gemfire-password = super-secret");
    argList.add("--geode-password= confidential");
    argList.add("--some-other-password =shhhh");
    argList.add("--justapassword =failed");
    String redacted = redact(argList);
    assertThat(redacted).contains("--gemfire.security-password=********");
    assertThat(redacted).contains("--login-password=********");
    assertThat(redacted).contains("--gemfire-password = ********");
    assertThat(redacted).contains("--geode-password= ********");
    assertThat(redacted).contains("--some-other-password =********");
    assertThat(redacted).contains("--justapassword =********");
  }

  @Test
  public void argListOfPasswordsAllRedactViaRedactEachInList() {
    List<String> argList = new ArrayList<>();
    argList.add("--gemfire.security-password=secret");
    argList.add("--login-password=secret");
    argList.add("--gemfire-password = super-secret");
    argList.add("--geode-password= confidential");
    argList.add("--some-other-password =shhhh");
    argList.add("--justapassword =failed");
    List<String> redacted = redactEachInList(argList);
    assertThat(redacted).contains("--gemfire.security-password=********");
    assertThat(redacted).contains("--login-password=********");
    assertThat(redacted).contains("--gemfire-password = ********");
    assertThat(redacted).contains("--geode-password= ********");
    assertThat(redacted).contains("--some-other-password =********");
    assertThat(redacted).contains("--justapassword =********");
  }

  @Test
  public void argListOfMiscOptionsDoNotRedact() {
    List<String> argList = new ArrayList<>();
    argList.add("--gemfire.security-properties=./security.properties");
    argList.add("--gemfire.sys.security-option=someArg");
    argList.add("--gemfire.use-cluster-configuration=true");
    argList.add("--someotherstringoption");
    argList.add("--login-name=admin");
    argList.add("--myArg --myArg2 --myArg3=-arg4");
    argList.add("--myArg --myArg2 --myArg3=\"-arg4\"");
    String redacted = redact(argList);
    assertThat(redacted).contains("--gemfire.security-properties=./security.properties");
    assertThat(redacted).contains("--gemfire.sys.security-option=someArg");
    assertThat(redacted).contains("--gemfire.use-cluster-configuration=true");
    assertThat(redacted).contains("--someotherstringoption");
    assertThat(redacted).contains("--login-name=admin");
    assertThat(redacted).contains("--myArg --myArg2 --myArg3=-arg4");
    assertThat(redacted).contains("--myArg --myArg2 --myArg3=\"-arg4\"");
  }

  @Test
  public void protectedIndividualOptionsRedact() {
    String arg;

    arg = "-Dgemfire.security-password=secret";
    assertThat(redact(arg)).endsWith("password=********");

    arg = "--J=-Dsome.highly.qualified.password=secret";
    assertThat(redact(arg)).endsWith("password=********");

    arg = "--password=foo";
    assertThat(redact(arg)).isEqualToIgnoringWhitespace("--password=********");

    arg = "-Dgemfire.security-properties=\"c:\\Program Files (x86)\\My Folder\"";
    assertThat(redact(arg)).isEqualTo(arg);
  }

  @Test
  public void miscIndividualOptionsDoNotRedact() {
    String arg;

    arg = "-Dgemfire.security-properties=./security-properties";
    assertThat(redact(arg)).isEqualTo(arg);

    arg = "-J-Dgemfire.sys.security-option=someArg";
    assertThat(redact(arg)).isEqualTo(arg);

    arg = "-Dgemfire.sys.option=printable";
    assertThat(redact(arg)).isEqualTo(arg);

    arg = "-Dgemfire.use-cluster-configuration=true";
    assertThat(redact(arg)).isEqualTo(arg);

    arg = "someotherstringoption";
    assertThat(redact(arg)).isEqualTo(arg);

    arg = "--classpath=.";
    assertThat(redact(arg)).isEqualTo(arg);
  }

  @Test
  public void wholeLinesAreProperlyRedacted() {
    String arg;
    arg = "-DmyArg -Duser-password=foo --classpath=.";
    assertThat(redact(arg)).isEqualTo("-DmyArg -Duser-password=******** --classpath=.");

    arg = "-DmyArg -Duser-password=foo -DOtherArg -Dsystem-password=bar";
    assertThat(redact(arg))
        .isEqualTo("-DmyArg -Duser-password=******** -DOtherArg -Dsystem-password=********");

    arg =
        "-Dlogin-password=secret -Dlogin-name=admin -Dgemfire-password = super-secret --geode-password= confidential -J-Dsome-other-password =shhhh";
    String redacted = redact(arg);
    assertThat(redacted).contains("login-password=********");
    assertThat(redacted).contains("login-name=admin");
    assertThat(redacted).contains("gemfire-password = ********");
    assertThat(redacted).contains("geode-password= ********");
    assertThat(redacted).contains("some-other-password =********");
  }

  @Test
  public void redactScriptLine() {
    assertThat(redact("connect --password=test --user=test"))
        .isEqualTo("connect --password=******** --user=test");

    assertThat(redact("connect --test-password=test --product-password=test1"))
        .isEqualTo("connect --test-password=******** --product-password=********");
  }

  @Test
  public void systemPropertiesGetRedactedInBanner() {
    try {
      System.setProperty(someProperty, "isNotRedacted");
      System.setProperty(somePasswordProperty, "isRedacted");
      System.setProperty(someOtherPasswordProperty, "isRedacted");

      List<String> args = ArrayUtils.asList("--user=me", "--password=isRedacted",
          "--another-password-for-some-reason =isRedacted", "--yet-another-password = isRedacted");
      String banner = new Banner().getString(args.toArray(new String[0]));
      assertThat(banner).doesNotContain("isRedacted");
    } finally {
      System.clearProperty(someProperty);
      System.clearProperty(somePasswordProperty);
      System.clearProperty(someOtherPasswordProperty);
    }
  }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package computerscience.linked_list;

/**
 *
 * @author mahdi
 */
public class LinkedList {
    public static void main(String args[]) {
        Node list = new Node(10);
        list.add(11);
        list.add(12);
        list.printList();

        System.out.println("=========");
        list.deleteNode(list, 11);
        list.printList();
    }

}

class Node {
    Node next;
    int data;

    public Node(int data) {
        this.data = data;
    }

    public void add(int data) {
        Node newNode = new Node(data);
        Node n = this;
        while (n.next != null) {
            n = n.next;
        }
        n.next = newNode;

    }

    public Node deleteNode(Node head, int data) {
        Node n = this;
        if(n.data == data) {
            return n.next;

        }

        while(n.next != null) {
            if(n.next.data == data) {
                n.next = n.next.next;
                return head;
            }

            n = n.next;
        }

        return head;

    }

    public void printList() {
        Node n = this;
        while (n != null) {
            System.out.println(n.data);
            n = n.next;
        }
    }
}


text:
#include <glog/logging.h>
#include <string>
#include "singa/singa.h"
#include "rnnlm.h"
#include "rnnlm.pb.h"

int main(int argc, char **argv) {
  // initialize glog before creating the driver
  google::InitGoogleLogging(argv[0]);

  singa::Driver driver;
  driver.Init(argc, argv);

  // if -resume in argument list, set resume to true; otherwise false
  int resume_pos = singa::ArgPos(argc, argv, "-resume");
  bool resume = (resume_pos != -1);

  // register all layers for rnnlm
  driver.RegisterLayer<rnnlm::EmbeddingLayer, std::string>("kEmbedding");
  driver.RegisterLayer<rnnlm::HiddenLayer, std::string>("kHidden");
  driver.RegisterLayer<rnnlm::LossLayer, std::string>("kLoss");
  driver.RegisterLayer<rnnlm::DataLayer, std::string>("kData");

  singa::JobProto jobConf = driver.job_conf();

  driver.Train(resume, jobConf);
  return 0;
}


text:
'use strict';

/* Regions manager */
WaveSurfer.Regions = {
    init: function (wavesurfer) {
        this.wavesurfer = wavesurfer;
        this.wrapper = this.wavesurfer.drawer.wrapper;

        /* Id-based hash of regions. */
        this.list = {};
    },

    /* Remove a region. */
    add: function (params) {
        var region = Object.create(WaveSurfer.Region);
        region.init(params, this.wavesurfer);

        this.list[region.id] = region;

        region.on('remove', (function () {
            delete this.list[region.id];
        }).bind(this));

        return region;
    },

    /* Remove all regions. */
    clear: function () {
        Object.keys(this.list).forEach(function (id) {
            this.list[id].remove();
        }, this);
    },

    enableDragSelection: function (params) {
        var my = this;
        var drag;
        var start;
        var region;

        this.wrapper.addEventListener('mousedown', function (e) {
            drag = true;
            start = my.wavesurfer.drawer.handleEvent(e);
            region = null;
        });
        this.wrapper.addEventListener('mouseup', function () {
            drag = false;
            region = null;
        });
        this.wrapper.addEventListener('mousemove', function (e) {
            if (!drag) { return; }

            if (!region) {
                region = my.add(params || {});
            }

            var duration = my.wavesurfer.getDuration();
            var end = my.wavesurfer.drawer.handleEvent(e);
            region.update({
                start: Math.min(end * duration, start * duration),
                end: Math.max(end * duration, start * duration)
            });
        });
    }
};

WaveSurfer.Region = {
    /* Helper function to assign CSS styles. */
    style: WaveSurfer.Drawer.style,

    init: function (params, wavesurfer) {
        this.wavesurfer = wavesurfer;
        this.wrapper = wavesurfer.drawer.wrapper;

        this.id = params.id == null ? WaveSurfer.util.getId() : params.id;
        this.start = Number(params.start) || 0;
        this.end = params.end == null ?
            // small marker-like region
            this.start + (4 / this.wrapper.scrollWidth) * this.wavesurfer.getDuration() :
            Number(params.end);
        this.resize = params.resize === undefined ? true : Boolean(params.resize);
        this.drag = params.drag === undefined ? true : Boolean(params.drag);
        this.loop = Boolean(params.loop);
        this.color = params.color || 'rgba(0, 0, 0, 0.1)';
        this.data = params.data || {};

        this.bindInOut();
        this.render();

        this.wavesurfer.fireEvent('region-created', this);
    },

    /* Update region params. */
    update: function (params) {
        if (null != params.start) {
            this.start = Number(params.start);
        }
        if (null != params.end) {
            this.end = Number(params.end);
        }
        if (null != params.loop) {
            this.loop = Boolean(params.loop);
        }
        if (null != params.color) {
            this.color = params.color;
        }
        if (null != params.data) {
            this.data = params.data;
        }
        if (null != params.resize) {
            this.resize = Boolean(params.resize);
        }
        if (null != params.drag) {
            this.drag = Boolean(params.drag);
        }
        this.updateRender();
        this.fireEvent('update');
        this.wavesurfer.fireEvent('region-updated', this);
    },

    /* Remove a single region. */
    remove: function (region) {
        if (this.element) {
            this.wrapper.removeChild(this.element);
            this.element = null;
            this.fireEvent('remove');
            this.wavesurfer.fireEvent('region-removed', this);
        }
    },

    /* Play the audio region. */
    play: function () {
        this.wavesurfer.play(this.start, this.end);
        this.fireEvent('play');
        this.wavesurfer.fireEvent('region-play', this);
    },

    /* Play the region in loop. */
    playLoop: function () {
        this.play();
        this.once('out', this.playLoop.bind(this));
    },

    /* Render a region as a DOM element. */
    render: function () {
        var regionEl = document.createElement('region');
        regionEl.className = 'wavesurfer-region';
        regionEl.title = this.formatTime(this.start, this.end);

        var width = this.wrapper.scrollWidth;
        this.style(regionEl, {
            position: 'absolute',
            zIndex: 2,
            height: '100%',
            top: '0px'
        });

        /* Resize handles */
        if (this.resize) {
            var handleLeft = regionEl.appendChild(document.createElement('handle'));
            var handleRight = regionEl.appendChild(document.createElement('handle'));
            handleLeft.className = 'wavesurfer-handle wavesurfer-handle-start';
            handleRight.className = 'wavesurfer-handle wavesurfer-handle-end';
            var css = {
                cursor: 'col-resize',
                position: 'absolute',
                left: '0px',
                top: '0px',
                width: '1%',
                maxWidth: '4px',
                height: '100%'
            };
            this.style(handleLeft, css);
            this.style(handleRight, css);
            this.style(handleRight, {
                left: '100%'
            });
        }

        this.element = this.wrapper.appendChild(regionEl);
        this.updateRender();
        this.bindEvents(regionEl);
    },

    formatTime: function (start, end) {
        return (start == end ? [ start ] : [ start, end ]).map(function (time) {
            return [
                Math.floor((time % 3600) / 60), // minutes
                ('00' + Math.floor(time % 60)).slice(-2) // seconds
            ].join(':');
        }).join('–');
    },

    /* Update element's position, width, color. */
    updateRender: function () {
        var dur = this.wavesurfer.getDuration();
        var width = this.wrapper.scrollWidth;

        if (this.start < 0) {
          this.start = 0;
          this.end = this.end - this.start;
        }
        if (this.end > dur) {
          this.end = dur;
          this.start = dur - (this.end - this.start);
        }
        this.style(this.element, {
            left: ~~(this.start / dur * width) + 'px',
            width: ~~((this.end - this.start) / dur * width) + 'px',
            backgroundColor: this.color,
            cursor: this.drag ? 'move' : 'default'
        });
        this.element.title = this.formatTime(this.start, this.end);
    },

    /* Bind audio events. */
    bindInOut: function () {
        var my = this;

        var onPlay = function () {
            my.firedIn = false;
            my.firedOut = false;
        };

        var onProcess = function (time) {
            if (!my.firedIn && my.start <= time && my.end > time) {
                my.firedIn = true;
                my.fireEvent('in');
                my.wavesurfer.fireEvent('region-in', my);
            }
            if (!my.firedOut && my.firedIn && my.end <= time) {
                my.firedOut = true;
                my.fireEvent('out');
                my.wavesurfer.fireEvent('region-out', my);
            }
        };

        this.wavesurfer.on('play', onPlay);
        this.wavesurfer.backend.on('audioprocess', onProcess);

        this.on('remove', function () {
            my.wavesurfer.un('play', onPlay);
            my.wavesurfer.backend.un('audioprocess', onProcess);
        });

        /* Loop playback. */
        this.on('out', function () {
            if (my.loop) {
                my.wavesurfer.play(my.start);
            }
        });
    },

    /* Bind DOM events. */
    bindEvents: function () {
        var my = this;

        this.element.addEventListener('mouseenter', function (e) {
            my.fireEvent('mouseenter', e);
            my.wavesurfer.fireEvent('region-mouseenter', my, e);
        });

        this.element.addEventListener('mouseleave', function (e) {
            my.fireEvent('mouseleave', e);
            my.wavesurfer.fireEvent('region-mouseleave', my, e);
        });

        this.element.addEventListener('click', function (e) {
            e.preventDefault();
            my.fireEvent('click', e);
            my.wavesurfer.fireEvent('region-click', my, e);
        });

        this.element.addEventListener('dblclick', function (e) {
            e.stopPropagation();
            e.preventDefault();
            my.fireEvent('dblclick', e);
            my.wavesurfer.fireEvent('region-dblclick', my, e);
        });

        /* Drag or resize on mousemove. */
        (this.drag || this.resize) && (function () {
            var duration = my.wavesurfer.getDuration();
            var drag;
            var resize;
            var startTime;

            var onDown = function (e) {
                e.stopPropagation();
                startTime = my.wavesurfer.drawer.handleEvent(e) * duration;

                if (e.target.tagName.toLowerCase() == 'handle') {
                    if (e.target.classList.contains('wavesurfer-handle-start')) {
                        resize = 'start';
                    } else {
                        resize = 'end';
                    }
                } else {
                    drag = true;
                }
            };
            var onUp = function (e) {
                if (drag || resize) {
                    drag = false;
                    resize = false;
                    e.stopPropagation();
                    e.preventDefault();

                    my.fireEvent('update-end');
                    my.wavesurfer.fireEvent('region-update-end');
                }
            };
            var onMove = function (e) {
                if (drag || resize) {
                    var time = my.wavesurfer.drawer.handleEvent(e) * duration;
                    var delta = time - startTime;
                    startTime = time;

                    // Drag
                    if (my.drag && drag) {
                        my.onDrag(delta);
                    }

                    // Resize
                    if (my.resize && resize) {
                        my.onResize(delta, resize);
                    }
                }
            };

            my.element.addEventListener('mousedown', onDown);
            my.wrapper.addEventListener('mousemove', onMove);
            document.body.addEventListener('mouseup', onUp);

            my.on('remove', function () {
                document.body.removeEventListener('mouseup', onUp);
                my.wrapper.removeEventListener('mousemove', onMove);
            });

            my.wavesurfer.on('destroy', function () {
                document.body.removeEventListener('mouseup', onUp);
            });
        }());
    },

    onDrag: function (delta) {
        this.update({
            start: this.start + delta,
            end: this.end + delta
        });
    },

    onResize: function (delta, direction) {
        if (direction == 'start') {
            this.update({
                start: Math.min(this.start + delta, this.end),
                end: Math.max(this.start + delta, this.end)
            });
        } else {
            this.update({
                start: Math.min(this.end + delta, this.start),
                end: Math.max(this.end + delta, this.start)
            });
        }
    }
};

WaveSurfer.util.extend(WaveSurfer.Region, WaveSurfer.Observer);

/* Augment WaveSurfer with region methods. */
WaveSurfer.initRegions = function () {
    if (!this.regions) {
        this.regions = Object.create(WaveSurfer.Regions);
        this.regions.init(this);
    }
};

WaveSurfer.addRegion = function (options) {
    this.initRegions();
    return this.regions.add(options);
};

WaveSurfer.clearRegions = function () {
    this.regions && this.regions.clear();
};

WaveSurfer.enableDragSelection = function (options) {
    this.initRegions();
    this.regions.enableDragSelection(options);
};


text:
package ru.appliedtech.application;

import java.nio.charset.Charset;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;
import java.util.Locale;

/**
 * Application global constants.
 * @author Igor Pavlenko
 */
public class Globals
{
	/**
	 * Default application charset
	 */
	public static final Charset CHARSET_UTF8 = Charset.forName("UTF-8"); //$NON-NLS-1$
	/**
	 * Date format object used to parse and format dates in the interaction with user. Used to format URL parameters and log data.
	 */
	public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$;

	/**
	 * Decimal format object used to parse and format dates in the interaction with user. Used to format URL parameters and log data.
	 */
	public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.##", new DecimalFormatSymbols(Locale.ENGLISH)); //$NON-NLS-1$
}


text:
# forklift.js

## A Promise-based node.js library for the [Crate](https://crate.io) database

## Status
TODO:
- [x] Table
- [x] Schema: Columns
- [x] Schema: Generated Columns
- [x] Schema: Fulltext Index Columns
- [x] Expressions: Standard
- [ ] Expressions: Math Operators
- [x] Expressions: Fulltext Match
- [x] Select
- [x] Row: Insert
- [x] Row: Delete
- [x] Row: Update
- [ ] Models

PERF:

3 node cluster, 1 host (i7-4712HQ, 8 core, 2.30GHz, 16GB, Samsung SSD 840)
```
npm run stress-test

rows:     100000
shards:   6
replicas: 1

* chunk: 1  time: 243756 ms  avg/row: 2.4376 ms  max mem: 99.990 mb
* chunk: 1000  time: 5946 ms  avg/row: 0.0595 ms  max mem: 83.736 mb
* chunk: 2000  time: 4771 ms  avg/row: 0.0477 ms  max mem: 58.311 mb
* chunk: 3000  time: 4443 ms  avg/row: 0.0444 ms  max mem: 61.225 mb
* chunk: 4000  time: 4035 ms  avg/row: 0.0403 ms  max mem: 81.539 mb
* chunk: 5000  time: 4936 ms  avg/row: 0.0494 ms  max mem: 73.033 mb
* chunk: 6000  time: 4474 ms  avg/row: 0.0447 ms  max mem: 92.932 mb
* chunk: 7000  time: 3917 ms  avg/row: 0.0392 ms  max mem: 164.269 mb
* chunk: 8000  time: 3723 ms  avg/row: 0.0372 ms  max mem: 68.700 mb
* chunk: 9000  time: 3744 ms  avg/row: 0.0374 ms  max mem: 86.052 mb
* chunk: 10000  time: 4156 ms  avg/row: 0.0416 ms  max mem: 86.429 mb
```

## Usage

Install.
```
sudo apt-get install libpq-dev
npm install forklift.js
```

Stand up a Crate cluster, visit 0.0.0.0:4200.
```
docker-compose up -d seed && docker-compose scale member=2
```

Initialize and connect the client.
Note: see test/readme.js for runnable version of this.
```
var forklift = require('forklift.js');
var cql = forklift.cql;
forklift.connect();
```

Create a table and schema with a few columns.
```
var table = new cql.Table('games')
    .columns(
        new cql.Column('id').type('integer').primary(),
        new cql.Column('name').type('string').required(),
        new cql.Column('platform').type('string'),
        new cql.Column('rating').type('integer')
    );

forklift.send(table).then(function (res) {
    console.log(res);
});
```

Make some data.
```
var games = [
    {
        id: 1,
        name: 'Uncharted 4: A Thief\'s End',
        platform: 'PS4',
        rating: 10
    },
    {
        id: 2,
        name: 'Call of Duty: Black Ops III',
        platform: 'PS4',
        rating: 7
    },
    {
        id: 3,
        name: 'Fallout 3',
        platform: 'PC'
        rating: 10,
    },
    {
        id: 4,
        name: 'Fallout 4',
        platform: 'PS4',
        rating: 9
    }
];
```

Write the data to the table.
```
var insert = new cql.Insert()
    .into('games')
    .data(games);

forklift.send(insert).then(function (res) {
    console.log(res);
});
```

Query the data.
```
var query = new cql.Select()
    .all()
    .from('games')
    .where(
        new cql.Expression()
            .gt('rating', 5)
            .and()
            .eq('platform', 'PS4')
    )
    .orderBy('rating');

forklift.send(query).then(function (res) {
    res.rows.forEach(function (row) {
        console.log(`${row.name}, ${row.platform}, ${row.rating}`);
    });
});
// Call of Duty: Black Ops III, PS4, 7
// Fallout 4, PS4, 9
// Uncharted 4: A Thief's End, PS4, 10
```

Update some data.
```
var update = new cql.Update()
    .table('games')
    .column('rating')
    .value(10)
    .where(
        new cql.Expression()
            .eq('name', 'Fallout 4')
    );

forklift.send(update).then(function (res) {
    console.log(res);
});
```

Delete some data.
```
var del = new cql.Delete()
    .table('games')
    .where(
        new cql.Expression()
            .lte('rating', 8)
    );

forklift.send(del).then(function (res) {
    console.log(res);
});
```

Drop the table.
```
table.drop();

forklift.send(table).then(function (res) {
    console.log(res);
});
```

## Developing / Contributing / Testing
Contributions welcome. Aim for clean. The tests are not particularly awesome.

Clone, bring up a cluster, and test.
```
git clone https://github.com/w-p/forklift.js.git
cd forklift.js
docker-compose up -d seed && docker-compose scale member=2
npm install --dev
npm test
npm run stress-test
```

## License
MIT